Compare commits

...

810 Commits
1.13 ... 6.0

Author SHA1 Message Date
Stefan Agner
cb0fa11eeb Fix release builds without dev part in version number (#1396) 2021-06-09 01:18:42 +02:00
Stefan Agner
89c4d57b18 Bump linux to 5.10.42 (#1395)
* Linux: Update kernel 5.10.42

* Fix kernel version documentation
2021-06-08 23:59:31 +02:00
Stefan Agner
a66f3380e3 Enable Wireless Extension for proc API (#1389) (#1394)
The Wireless Extension framework is deprecated, but it seems that the
Wireless Extensions proc API is still popular (/proc/net/wireless).
Enable the minimal set of Wireless Extension to get the proc API.
2021-06-08 23:44:06 +02:00
Marius
288f4a0082 Verify Power Supply Rating (#1393)
* Add paragraph on Power Supply

see: https://jamesachambers.com/raspberry-pi-4-ubuntu-20-04-usb-mass-storage-boot-guide/
2021-06-07 11:51:06 +02:00
Stefan Agner
622cbb806d Restart console on tty1 on exit (#1387) (#1391)
Since we start the HomeAssistant shell directly on tty the service
responsible for starting did not restart the shell on exit. Remove the
RemainAfterExit flag to make sure that the shell restarts on exit.
2021-06-05 15:17:14 +02:00
Herr Frei
5c8a0307fb Add thinkpad_acpi module (#1388)
* Add defconfig entry for thinkpad_acpi module
2021-06-05 15:16:56 +02:00
Stefan Agner
51e80cb7bc Avoid spurious shutdown on ODROID-XU4 (#1385) (#1386)
It seems that the TPU (thermal monitoring) sometimes reports
unreasonable high temperatures, leading the kernel to trigger a thermal
shutdown. Add a patch which filters out such spurious temperature
readings.
2021-06-04 15:20:10 +02:00
Stefan Agner
9e921ed9ad Add additional directories to .dockerignore (#1382) 2021-05-30 21:43:44 +02:00
Stefan Agner
56730adf48 Keep Linux patches for 5.10.37 for other ODROID boards (#1381) 2021-05-27 11:57:26 +02:00
Stefan Agner
22aa316483 Update Barebox to 2021.05.0 (#1380)
* Remove CONFIG_CLOCKSOURCE_EFI configuration

It seems to cause messages like this on some machines:
EFI Event timer too slow freq = 100 Hz

The Barebox efi_defconfig configurationd doesn't enable it either.
Disable it by default as well.

* Enable CONFIG_CMD_ECHO_E to fix menutree

It seems that menutree needs CONFIG_CMD_ECHO_E to properly display the
boot menu.

Also enable other useful commands such as edit or reset.

* Bump Barebox to 2021.05.0
2021-05-27 00:33:34 +02:00
Stefan Agner
d60272b79a Revert ODROID-N2(+) back to use Linux 5.9 (#1379)
Since the move to 5.10 multiple users experience stability issues
leading to random crashes. All reboots follow a SError Interrupt:
[48112.247242] SError Interrupt on CPU5, code 0xbf000000 -- SError
...

Revert back to Linux 5.9.16 for now.
2021-05-27 00:29:20 +02:00
Stefan Agner
068a57763c Enable serial console as well (#1339) (#1378)
Using console focused virtualization environments such as virsh having
a serial console is the easiest way to interact with a virtual machine.
It also saves resources since no video memory needs to be allocated.
Enable serial console besides tty1 by default.

Note: The bootloader as well as the kernel shows its boot messages on
all consoles. However, only the last console is mapped to /dev/console,
which systemd is using to show service startup messages. Putting tty1 as
last console makes sure that systemd messages are still shown on the
console screen.
2021-05-27 00:29:06 +02:00
Stefan Agner
6810659f9b Pass ha command with quotes to CLI container (#1377)
When using quotes currently, they are not passed to HA due to $*. This
doesn't allow to use some commands properly, e.g. snapshot restore with
a passwort with spaces:

```
ha snapshot restore c31f3c93 --password "test test"
...
time="2021-05-26T11:24:19+02:00" level=fatal msg="Error while executing rootCmd: accepts 1 arg(s), received 2"
```

Properly pass all arguments using $@ in quotes.
2021-05-26 14:16:43 +02:00
Stefan Agner
8020671ca6 Drop directories when creating zip file (#1372)
We zip a single file nested in a rather deep directory tree which stems
from the build system. This doesn't need to be exposed to users.
2021-05-25 19:32:42 +02:00
Stefan Agner
0f57b55b4c Add minimal message of the day (#1373)
Add a minimal motd so users know what kind of system they just logged
in. Also add the hint that the Home Assistant CLI is still available
using the command ha.
2021-05-25 14:40:54 +02:00
Stefan Agner
c7909de767 Recreate Supervisor container on OS upgrade/downgrade (#1368)
* Recreate Supervisor container on OS upgrade/downgrade

When the operating system gets upgraded or downgraded the Supervisor
start script might start the Supervisor slightly differently (e.g. with
RT scheduling support). If the container has already been created, a OS
upgrade or downgrade won't recreate the Supervisor container.

* Move startup script version file to /mnt/data
2021-05-19 22:27:16 +02:00
Stefan Agner
c1c6a6ce21 Update buildroot to 2021.02.2 (#1370) 2021-05-19 22:20:50 +02:00
Stefan Agner
111018b911 Remove obsolete Busybox ACPI config (#1369) 2021-05-19 14:41:30 +02:00
Stefan Agner
40b4d5ca2e Start Home Assistant CLI on tty1 without login (#1366)
* Start ha-cli on tty1 instead of a getty

Instead of starting a getty start the ha-cli directly. This will show
the banner right on startup with the important information such as IP
address of the instance or the URL to reach it.

* Use default shell as root shell instead of HA CLI

Instead of using the ha-cli.sh script as login shell use the regular
shell. Amongst other things, this allows to run VS Code devcontainers
remotely via SSH or using scp. The HA CLI is still available using the
`ha` command.
2021-05-19 13:18:02 +02:00
Stefan Agner
25d1f5d7d1 RaspberryPi: Update kernel 5.10.17 - 3a33f11c48572b9dd0fecac164b3990fc9234da8 (#1365) 2021-05-19 09:59:54 +02:00
Stefan Agner
d6a86c29f9 Linux: Update kernel 5.10.37 (#1364) 2021-05-19 09:50:45 +02:00
Stefan Agner
2d3119ef22 Delay Supervisor start until time has been sychronized (#1360)
* Enable systemd-time-wait-sync.service by default

Enable the systemd-time-wait-sync.service by default. This allows to use
the time-sync.target which allows to make sure services only get started
once the time is synchronized.

* Make sure time is synchronized when starting  hassos-supervisor.service

Use the time-sync.target to make sure that the Supervisor gets stsarted
after the time has been synchronized.

* Set timeout for systemd-time-wait-sync.service

Don't delay startup forever in case time synchronization doesn't work.
This allows to boot the system even without Internet connection.
2021-05-12 17:47:42 +02:00
Pascal Vizeli
9dd269d766 Fix NM connectivity URL (#1359) 2021-05-12 14:37:37 +02:00
Ajinkya Bawaskar
3c6897e2cd Update getting_started_development.md (#1355)
Changed name of the repository cloned from `hassos` to `operating-system`
2021-05-09 11:19:51 +02:00
Krzysztof Karol
7afe867fd5 Fix typos in issue template (#1356) 2021-05-09 11:08:47 +02:00
Stefan Agner
779dc0bcb8 Make sure to upload correct image files in release pipeline (#1353)
The images have been renamed from hassos to haos. Make sure to upload
the correct files.
2021-05-07 00:24:21 +02:00
Stefan Agner
70d6252eae Support OS releases with custom dev part (#1352)
Support OS releases (tags) with custom dev part (3rd group of the
release number). This allows to create tagged release candidates with
the form 6.0.rc1.
2021-05-07 00:14:33 +02:00
Jens Maus
9ed200a70e add ODROID-C2/C4/N2/N2+ support for RPI-RF-MOD/HM-MOD-RPI-PCB integration (#1323)
* add ODROID-C2/C4/N2/N2+ support for RPI-RF-MOD/HM-MOD-RPI-PCB integration

* updated rpi-rf-mod package to latest version with dtbo fixes
2021-05-04 20:42:57 +02:00
Stefan Agner
be2cfd7622 Enable UART and I2C on J2 header (#1349)
Enable UART as well as I2C on the J2 header. Also backport the upstream
version of the I2C3/RTC patch.
2021-04-29 23:04:34 +02:00
Stefan Agner
367fc1561b Use upstream SoC version detection (#1348)
With U-Boot 2021.04 we can use the upstream SoC revision detection by
enabling runtime variables and using the "soc_rev" variable.
2021-04-29 22:52:46 +02:00
Stefan Agner
5ac85a4c45 Use built-in Meson DRM driver (#1347)
It seems that the crash of the Meson DRM driver on shutdown can also be
fixed by compiling it in. The driver is also built-in in LibreELEC,
hence this is better tested by the upstream community.

Note the underlying issue seems to be a disabled clock: Since the
introduction of meson_drv_shutdown some registers are touched at a very
late stage. Those clock get disabled in meson_ee_pwrc_shutdown. It seems
that when the driver is built-in, meson_drv_shutdown gets called before
meson_ee_pwrc_shutdown and hence sidesteps the problem.

Note: This increases the kernel by a bit since DRM needs to be built-in
as well. Configure some less common used file systems as modules
(ext3/NFS).
2021-04-29 22:52:27 +02:00
Stefan Agner
3d793dc7ef Drop global patch from Raspberry Pi patchset (#1346)
Since 0001-CMD-read-string-from-fileinto-env.patch is in the global
directory to be applied for U-Boot, drop it from the Raspberry Pi
specific patch directory.
2021-04-29 11:26:55 +02:00
Stefan Agner
b76d55283d Fix reboot issue on ODROID-N2+ on Linux 5.10 (#1345)
In Linux 5.10.24 a regression has been introduced which broke reboot on
ODROID-N2(+). Interestingly the patch should improve reboot stability
for VIM3, which uses the same SoC. However, it seems that in the
ODROID-N2 case, this causes more problems then it fixes. Revert the
offending patch.
2021-04-29 01:31:13 +02:00
Stefan Agner
422bf2d1e1 Add fileenv patch for U-Boot 2021.04 (#1344)
Update of this patch has been missed. Also drop the versions for U-Boot
2020.01 and 2020.10 since they are no longer required.
2021-04-29 01:30:55 +02:00
Stefan Agner
33e0ccb9ce Linux: Update kernel 5.10.33 (#1343) 2021-04-29 01:17:02 +02:00
Stefan Agner
f86fcbd609 Fix shellcheck issues (#1341)
* Fix issue with latest shellcheck version

The latest shellcheck versions use a new error number for non-POSIX
string replacement. Change to ignore this new error number.

* Ignore shellcheck issue about not following sourced files

Newer shellcheck versions also warn when shellcheck does not follow
sourcing of files with known path:
  Not following: ./meta was not specified as input (see shellcheck -x).

We check those files separately so ignore this error for the two scripts
affected.
2021-04-29 01:15:47 +02:00
Stefan Agner
99a4d4ea75 Bump Raspberry Pi firmware to 1.20210303 (#1334) 2021-04-19 23:56:54 +02:00
Stefan Agner
0b1c349a8f Bump Raspberry Pi kernel to 1.20210303-1 (#1333)
* Update docs, the default kernel version is now 5.10

* RaspberryPi: Update kernel v5.10.17 - 623ca2ba45d86eb1b0323637330295c3f8d93c76
2021-04-19 23:56:33 +02:00
Stefan Agner
2a910b0e45 Use zip file format for virtual disk images (#1327)
Virtual Disk images are often used on Windows and/or Mac platforms where
xz is not a widely known file ending and also not supported by dafault.
Use zip which is much better known.

Keep using xz for boards since those are not meant to be extracted by
users but directly used in Etcher. Also keep using xz for qcow2, since
qcow2 is mostly used on Linux platforms where xz is available by default
and zip usually needs an extra package.
2021-04-19 10:53:22 +02:00
Stefan Agner
05ba57e006 Bump Docker to 20.10.6 (#1328)
Bump Docker to latest release 20.10.6. Also make sure to upgrade
docker-proxy with various IPv6 releated features and fixes.
2021-04-15 18:10:56 +02:00
Stefan Agner
56e0d941d0 Use sparse files when generating image (#1326)
Use sparse files instead of files written full of zeros. This speeds up
the image generation process significantly. It also makes sure that
virtual disk image formats are minimal in size.

Note: qemu-img automatically generates sparse files when detecting a
block full of zeros. But this is applied on the write side, after image
convertion: The disk image format itself still thinks the whole image
is allocated, leading to larger image than necessary. Also some output
format seem to regonize chunks of zero and create sparse files themself.

With this change, the raw source image file is a sparse file. This is
regocnized by qemu-img at read time (see block/file-posix.c), and leads
to "native" sparse files in the output format.

Some numbers
- qcow2 1.8G -> 862M (same on-disk size)
- vdi 15G -> 888M (same on-disk size)
- vhdx 30G -> 1.1G (918M -> 861M on-disk size)
- vmdk 1.8G -> 866M (about the same on-disk size)

Obviously this also affects the compressed size. But because there are
still lots of zeros, the difference in compressed size is not that big.
2021-04-15 16:27:02 +02:00
Stefan Agner
2d9540117f script/enter.sh: Exit if there is an error (#1325) 2021-04-15 13:06:43 +02:00
Pascal Vizeli
5cae40c396 Update to OS Agent 1.1.0 (#1319) 2021-04-11 21:35:18 +02:00
Stefan Agner
ae0aeb84f5 Update to OS Agent 1.0.0 (#1317)
* Update to OS Agent 1.0.0

* Use new D-Bus path/interface/object in haos-wipe.service
2021-04-08 20:22:19 +02:00
Stefan Agner
c9d091c1b3 Change OS name from HassOS to HAOS in user visible places (#1316) 2021-04-08 16:01:57 +02:00
Stefan Agner
a52f7ae02c Enable Intel IGC driver for I225-LM/I225-V Ethernet support (#1309) (#1315) 2021-04-08 15:52:29 +02:00
Stefan Agner
366bb0e495 Push dev to dev channel (#1313) 2021-04-08 15:51:59 +02:00
Stefan Agner
aff28ce60e Update buildroot to 2021.02.1 (#1312)
Signed-off-by: Stefan Agner <stefan@agner.ch>
2021-04-08 15:51:24 +02:00
Stefan Agner
40a705bbd3 Linux: Update kernel 5.10.28 (#1310) 2021-04-08 15:51:14 +02:00
Stefan Agner
1e1d10570c Use interface-name to exclude veth (#1314)
* Use interface-name to exclude veth

The type veth is not a valid type (see [1] for how to obtain a list of
valid device types. Use `driver` to filter veth.

Note: It seems that NetworkManager did not manage veth so far, so this
change seems not to be relevant in practice.

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2021-04-08 15:50:56 +02:00
Stefan Agner
fe1083822d Fix file name of generic-x86-64 defconfig (#1311) 2021-04-08 11:11:58 +02:00
Malachi Soord
b4710290b6 Typo fix in issue template (#1307) 2021-04-07 23:28:33 +02:00
Stefan Agner
bb7964ff02 Fix ODROID-C2 Ethernet on some boards (#1202) (#1305) 2021-04-07 19:21:30 +02:00
Pascal Vizeli
7f934b4470 Use updater instead of config version (#1301) 2021-04-07 15:46:56 +02:00
Jens Maus
0eef6473ba Support for RPI-RF-MOD/HM-MOD-RPI-PCB for HomeMatic/homematicIP communication (#1266)
* add eq3_char_loop package (eQ-3 char loopback kernel module)

* add generic_raw_uart package (low-latency raw UART kernel driver)

* add rpi-rf-mod package 

* add device tree overlay support for RPI-RF-MOD/HM-MOD-RPI-PCB on Raspberry Pi

* enable GPIOLIB and GPIO_SYSFS required for RPI-RF-MOD/HM-MOD-RPI-PCB support.

* add basic RPI-RF-MOD/HM-MOD-RPI-PCB support for ASUS Tinker Board

* add device tree overlay support for ASUS Tinker Board and add
haos-config.txt loading support to U-Boot boot script
2021-04-07 15:17:41 +02:00
Stefan Agner
9c6cb6e1f0 Update to U-Boot 2021.04 (#1300)
* Re-add patches missed with U-Boot 2021.04-rc4 upgrade

Also add patches for Raspberry Pi again.

* Regenerate patches for U-Boot 2021.04

* Update to U-Boot 2021.04
2021-04-07 00:37:41 +02:00
Pascal Vizeli
98ce2bec4a Remove OS mount in favor of os-agent (#1297) 2021-04-07 00:36:56 +02:00
Stefan Agner
1d6ab42f88 Re-add patches missed with U-Boot 2021.04-rc4 upgrade (#1293) 2021-04-06 19:51:07 +02:00
Stefan Agner
dde7f1d073 Bump to latest OS Agent version to support Device Wipe (#1292)
The latest version of OS Agent sets haos.wipe=1 as kernel argument to
trigger a device wipe. Let systemd pickup this kernel command line
argument and start haos-wipe.service.

This rather complex architecture allows to add other triggers in the
future, e.g. a button read in the boot loader.
2021-03-31 23:43:26 +02:00
capstan1
ef25289a6d Update datactl move documentation (#1290)
Add reboot command to the instructions. Also document how to check if data move has been successful.
2021-03-31 23:40:09 +02:00
Stefan Agner
82db02756c Make D-Bus and udisks2 available early (#1291)
* Disable systemd-logind support for udisks2

Currently udisks2 uses systemd-logind to prevent the system from
rebooting or similar operations while udisks operations are ongoing.
Unfortunately this stops us from using udisks2 during early boot since
systemd-logind is not ready at this point. Make the dependency
configureable so we can opt-out of using systemd-logind.

* Make dbus.service/socket and udisks2.service/socket available early

Disable default dependencies. This avoids those services to be ordered
after sysinit.target, and makes them available before local-fs.target
is reached. All mounts like mnt-data.mount are ordered before
local-fs.target, so breaking this dependency allows to use D-Bus before
mounting local file systems.

This seems fine when using the system bus directly from /run (instead of
/var/run, which is anyway a symlink to /run normally). It seems that
udisks misses /var/lib/udisks2 but it seems not to be required for the
features used so far.
2021-03-31 21:46:02 +02:00
Stefan Agner
905aa21e8c Only start the HA CLI if we are in the default.target (#1287)
This makes sure that we always get a Linux shell in other targets such
as the rescue.target.
2021-03-24 19:14:06 +01:00
Stefan Agner
ab19c8c6cf Improve dropbear.service to avoid failed state after stop (#1286)
So far the exit code has been evaluated, which seems to be non-zero even
with a regular term signal. With that systemd assumed the service is in
a failed state, when in fact this seems the regular behavior of dropbear
when shutting it down.
2021-03-24 19:13:43 +01:00
Stefan Agner
fdd8c246dd Add udisks2 dameon and udisks2 OS agent support (#1284)
* Add udisks2 package

Add latest release of udisks2 as a package. Also disable polkit to avoid
excessive dependencies.

* Add udisks2 and os-agent to Home Assistant OS

* Bump OS Agent to latest version with udisks support
2021-03-22 23:43:09 +01:00
Stefan Agner
23fb6b8dd3 Enable Realtek Bluetooth firmwares (#1283)
* Add RTL87xx/RTL88xx Bluetooth firmware

Enable Realtek Bluetooth dongles by adding firmware for RTL87xx and
RTL8xx devices.

* Enable Wireless firmwares for OVA and Generic x86-64 machines

Virtual machines might use hardware pass through functionality to get
direct access to wireless hardware. Add all firmwares we use in Generic
x86-64 image also to the OVA image. Also enable Ralink devices for the
two machines.

* Add RTL87xx/RTL88xx Bluetooth firmwares (#1273)

Add RTL87xx/RTL88xx Bluetooth to all devices without on-board Bluetooth.
2021-03-22 23:37:53 +01:00
Stefan Agner
45abe203f5 Restore AppArmor profile when not present on the system (#1278)
Restore our default AppArmor profile when not present on the system.
This allows to implement factory reset.
2021-03-19 10:53:49 +01:00
Stefan Agner
86cabd3d1a Remove unnecessary avahi-daemon.service configs (#1280)
The avahi-daemon.service has been removed a while ago, this extra
systemd configurations are no longer necessary.
2021-03-19 10:53:32 +01:00
Stefan Agner
8fe1d2ddbe Rename NetworkManager default profile (#1277)
* Rename NetworkManager default profile

Rename the NetworkManager default profile to "Home Assistant OS
default". Improve documentation on how to reset to default
configuration.
2021-03-18 17:35:04 +01:00
Stefan Agner
a15671a530 Remove unnecessary avahi-daemon.service configs (#1279)
The avahi-daemon.service has been removed a while ago, this extra
systemd configurations are no longer necessary.
2021-03-18 16:06:51 +01:00
Stefan Agner
6f512527aa Bump to U-Boot 2021.04-rc4 (#1275)
Bump to the latest U-Boot release 2021.04-rc4. This alows to drop quite
some patches which have been sent to the mailing list or picked from the
mailing list and have been merged upstream now.
2021-03-16 21:36:11 +01:00
Stefan Agner
7e702a2ab2 Clarify network configuration support (#1276)
Clarify what type of network configuration is supported.

Related to: #1262
2021-03-16 12:52:41 +01:00
Stefan Agner
37d2f13e49 Update Buildroot to 2021.02 (#1274) 2021-03-16 11:45:43 +01:00
Stefan Agner
0a2fdf47b3 Add OS agent (#1269)
* Add OS Agent

* Do go vendoring as part of the buildroot build

* Allow to skip confirmation in datactl
2021-03-12 18:00:39 +01:00
Stefan Agner
55f8704523 Update Github Actions to use generic-x86-64 (#1267) 2021-03-11 23:29:21 +01:00
Stefan Agner
19c03729f3 Accept installation with intel-nuc in compatible string (#1265)
* Accept installation with intel-nuc in compatible string

For the OS release 6 intel-nuc gets renamed to generic-x86-64. Since
the machine name is in the OS compatible string we need to make sure
OS release 5 installation can update to release 6 despite the new
machine name.
2021-03-09 23:53:15 +01:00
Stefan Agner
66e5ea3b4b Rename hassos to haos (#1213)
* Change HASSOS_ID from hassos to haos

Use a rauc install-check hook to make this update compatible with OS
releases using hassos in the compatible string.

* Use home-assistant as organization in CPE_NAME

Align with Home Assistant core which uses home-assistant with a dash as
organization in CPE_NAME.
2021-03-09 15:27:12 +01:00
Stefan Agner
28e3b109b7 Rename Intel NUC machine to Generic x86-64 (#1209)
* Rename Intel NUC machine to Generic x86-64

The Intel NUC machine has evolved and supports various x86-64 machines
today. Rename the board.

Note that this does not address the migration issue. This will be
handled separately.

* Update Scripts/Documentation
2021-03-09 15:25:35 +01:00
ryddler
a5256fb2d0 Adding gasket/apex kernel modules so that Google Coral EdgeTPU pcie devices can be used. (#1263) 2021-03-08 11:15:19 +01:00
Stefan Agner
f358f322da Bump Buildroot to 2021.02-rc3 (#1260)
* Rebase patches to Buildroot 2021.02-rc3

* Update Buildroot to 2021.02-rc3

* Declare Kernel headers to be Linux version 5.10 (since they are, and new Buildroot knows about 5.10)
2021-03-04 00:50:33 +01:00
Stefan Agner
b77d633382 Remove the no longer required busybox-acpid service (#1261)
The BusyBox option has been disabled in #1210.
2021-03-04 00:49:04 +01:00
Stefan Agner
cd022e6d5e Update Raspberry Pi to Linux 5.10 (raspberrypi-kernel_1.20210201-1) (#1258)
Move to the new Linux 5.10 based kernel for all Raspberry Pi boards.
This uses the version of the last OS version used in Raspberry Pi OS
raspberrypi-kernel_1.20210201-1.
2021-03-02 15:33:36 +01:00
Stefan Agner
27e6aa60fd Add Ralink rt27xx/rt28xx/rt30xx driver and firmware (#1242) (#1248)
* Add Ralink rt27xx/rt28xx/rt30xx firmware (#1242)

Add Ralink firmware for devices which have the driver enabled. The
firmware's are rather small at 20KiB in total.

* Remove Ralink and other WiFi drivers from Tinker Board

The board has on-board WiFi, no need for Ralink drivers to be enabled.

* Add Ralink WiFi drivers and firmware to ODROID boards
2021-03-01 22:34:49 +01:00
Stefan Agner
dc795cfc51 Update Bluetooth firmware for CYW43455 (Raspberry Pi 3 B+/4) (#1250)
This matches the 1.2-4+rpt8 release of Raspberry Pi OS' bluez-firmware
package. It addresses mainly addresses Spectra fix for CYW43455
(CVE-2020-10370).

Also update the Bluetooth start scripts with CM4 support and some
minor improvements.
2021-03-01 16:40:29 +01:00
Fredrik Erlandsson
4d2229e50b Fix: ovf:id to get Synology VMM detect Guest Agent (#1233) 2021-02-26 18:38:42 +01:00
Stefan Agner
82a40de894 Add --cpu-rt-runtime to allow Docker allocate real-time CPU time (#1235) (#1236)
* Add --cpu-rt-runtime to allow Docker allocate real-time CPU time (#1235)

* Enable Supervisor's CPU bandwith allocation feature (#1235)

Since we have CONFIG_RT_GROUP_SCHED enabled in the Home Assistant OS
kernel the Supervisor needs to enable CPU bandwith allocation for
Add-Ons which need real-time scheduling. Set the appropriate environment
variable.
2021-02-25 18:40:24 +01:00
Stefan Agner
5c17e0974b Don't filter previous releases on dev branch (#1246)
It seems that the release drafter filters commits which have been made
before the last release has been made. If the last release is a
unrelated stable release, this clears the full changelog for the next
major release. It seems `filter-by-commitish` should prevent that.

While at it, also set `commitish` to be dev (which is the default, but
being explicit certainly doesn't hurt).
2021-02-25 15:43:08 +01:00
Stefan Agner
9db5dc7ab8 Fix Bluetooth on ASUS Tinker (#1234)
* Improve ASUS Tinker Board support for 5.10

Remove patches which are unnecessary. Revert DMA for UART as it seems to
cause more problems (its also what Armbian is doing). With that
Bluetooth firmware seems to load without errors when loaded before the
bluetooth daemon is running!

Note: It seems that the board overheats quite quickly. With Armbian,
without load, that seems not to be a big deal, but HAOS does quite a
bunch at startup, leading the CPU to reach the 90°C trip point. Maybe it
was related to the rather closed shelf I have the ASUS Tinker board
running, but only after using a fan the board behaved for me.

* Use hardware flow control explicitly

The rtk_hciattach program uses hardware flow control by default (judging
from tty settings after starting the program). Just to be sure,
explicitly request 115200 and hardware flow control.
2021-02-19 23:53:18 +01:00
Stefan Agner
9ba4dd5524 Linux: Update kernel 5.10.17 (#1231) 2021-02-18 11:05:36 +01:00
pergolafabio
32b037af32 Add SocketCAN support (#1228)
* Add SocketCAN support

A Controller Area Network (CAN bus) is a robust vehicle bus standard designed to allow microcontrollers and devices to communicate with each other's applications without a host computer. It is a message-based protocol, designed originally for multiplex electrical wiring within automobiles to save on copper, but it can also be used in many other contexts. For each device, the data in a frame is transmitted sequentially but in such a way that if more than one device transmits at the same time, the highest priority device can continue while the others back off. Frames are received by all devices, including by the transmitting device.

* Update also for GS_USB support

There is a port of the candleLight USB to CAN firmware for CANable. The port works very well under Linux using the gs_usb driver. This firmware does not use slcan, so it is not interchangeable with the stock firmware. However, the CANable appears as a CAN interface natively in Linux

With the candlelight firmware, simply plug in the CANable and the device will enumerate as can0. Set the baud rate and bring the interface up with the following command, and you're good to go!

ip link set can0 up type can bitrate 500000

* Update for Peak PCAN-USB Support
2021-02-17 10:26:00 +01:00
Stefan Agner
c2c05312a0 Increase maximum IGMP memberships (#1222)
Currently Linux has a limit of IGMP memberships of 20. When trying to
add membership to more than that, Linux fails with:
OSError: [Errno 105] No buffer space available

Allowing more memberships should not really be problematic as memory is
allocated dynamically when membership is actually added.

However, there is a protocol limit of how many memberships a host can be
in. The number of memberships needs to fit in a single group report
datagram of 64kB. In total 5459 group records fit in a datagram, but due
to IP header options this might be slightly smaller in practise.
(see https://github.com/home-assistant/core/issues/45957).

Use a limit of 1024, which should be plenty of headroom in both
directions.

Related to: https://github.com/home-assistant/core/issues/45957
2021-02-15 19:27:35 +01:00
Stefan Agner
b91c432fa8 Deploy all variants of the Raspberry Pi firmwares (#947) (#1219) 2021-02-09 14:06:13 +01:00
Stefan Agner
023d0b27f5 Bump out-of-tree Intel e1000e driver to build with Linux 5.10 (#1215) 2021-02-09 14:06:00 +01:00
Stefan Agner
57ffd6444b Update Linux kernel to 5.10 LTS (#1214)
* Drop ODROID specific kernel update script

With the jump to Linux 5.10 LTS we can use the same upstream kernel for
Hardkernel ODROID boards as well. Extend the update-kernel-upstream.sh
to support the ODROID boards.

* Linux: Update kernel 5.10.13
2021-02-05 18:52:16 +01:00
Stefan Agner
8bbc330407 Disable acpid (#1210)
Disable Busybox' acpid since systemd-logind provides the same
functionality.
2021-02-05 17:11:13 +01:00
Stefan Agner
76853d1171 RaspberryPi: Update firmware 0d458874a89921fbe460e422b239695e1e101e2b (#1211)
* RaspberryPi: Update firmware 0d458874a89921fbe460e422b239695e1e101e2b

* update-firmware-rpi.sh: Fix to work with new hash files
2021-02-05 16:30:31 +01:00
Stefan Agner
0daf748c97 Fix partition resize for MBR for all sizes (#1193) (#1204)
It seems that Busybox shell (ash) cannot calculate the disk size
properly probably due to integer overflow. Use jq to calculate the last
usable LBA which seems to be able to handle large integers.
2021-02-03 17:42:04 +01:00
Stefan Agner
8aabf65bb7 Bump systemd to latest stable release 246.10 (#1205) 2021-02-03 17:41:51 +01:00
Stefan Agner
825ef58f85 Update buildroot to 2020.11.2 (#1200)
Signed-off-by: Stefan Agner <stefan@agner.ch>
2021-02-03 17:23:40 +01:00
Pascal Vizeli
614ff50394 Map host udev data ro to supervisor container (#1186)
* Mapp host udev data ro to container

* fix lint

* fix paths
2021-01-29 17:47:24 +01:00
Stefan Agner
907857985a Disable fsck.fat for boot partition (might help #1125) (#1190)
There are incident reports on the internet where poeple report that
fsck.(v)fat actually leads to problems rather file system fixes. Around
the time when Home Assistant OS added fsck.fat for the boot partition,
reports of empty boot partitions or file with weired filenames started
to appear. This could be caused by fsck.fat.

Disable fsck on the boot partition.
2021-01-29 15:02:08 +01:00
Stefan Agner
846512a283 RaspberryPi: Update kernel 5.4.83 - 76c49e60e742d0bebd798be972d67dd3fd007691 (#1187) 2021-01-29 15:01:21 +01:00
Pascal Vizeli
e646650a7e Fix connectivity check updated NM (#1182) 2021-01-28 10:36:00 +01:00
Stefan Agner
038f1b4bd6 Add GPIO fan support for ODROID-N2 (#1117) (#1166) 2021-01-11 22:50:30 +01:00
Mario Limonciello
d7c09e15b9 Allow setting BUILDDIR in the build to dictate where to find directories (#1153)
This allows building many components without elevated permissions or
needing to do it within a container.
2021-01-11 19:56:51 +01:00
Stefan Agner
2c3c066ea0 Add GPIO power button support for ODROID-N2 (#1161) (#1165) 2021-01-11 18:14:07 +01:00
Mario Limonciello
184eb9e048 Add r8169 firmware into intel_nuc build (Fixes: #1150) (#1152) 2021-01-08 23:23:56 +01:00
Stefan Agner
ce1f07126f Enable memory and CPU hotplugging for virtual machines (#1156) (#1158)
Use udev rules to set the CPU online. For memory, we let the kernel
bring memory online automatically. This is preferred as udev rule
processing might be delayed in a low memory situation, see:
https://lwn.net/Articles/668944/
2021-01-05 23:19:42 +01:00
Stefan Agner
0188f24a0d Fix partition resize for MBR (#1149)
Partition handling for disks with 4k sectors broke partition resizing
when using MBR disk label. It seems that sfdisk doesn't calculate the
last LBA for diks with MBR label. Calculate the last usable LBA ourselfs
in the MBR case.
2020-12-31 14:58:21 +01:00
Stefan Agner
581de22a06 Fix boot from eMMC on ODROID-C2 (#1142) (#1148)
Latest U-Boot broke boot from eMMC on ODROID-C2. Revert the offending
device tree change to make the system boot again.
2020-12-31 14:45:31 +01:00
Stefan Agner
9764273894 Fix handling of disks with 4k sector size (#1141) (#1146)
The calculation whether to resize the partition only works with disks
with 512 byte sector size. Use values provided by sfdisk exclusively to
make sure comparing the same sector size.

Furthermore, it seems that sgdisk does not like sfdisk's backup GPT
placement:
$ sgdisk -e /dev/zram1
Warning! Secondary partition table overlaps the last partition by 250 blocks!

Today it seems sfdisk can handle GPT quite well. Use sfdisk for all
operations in hassos-expand.
2020-12-30 18:12:44 +01:00
Mario Limonciello
cc53ad4fd6 Add LPSS support for intel-nuc (#1145)
This is needed for MMC to enumerate properly (Fixes: #1112)
2020-12-30 16:04:34 +01:00
Stefan Agner
142e7df6cf Drop e2scrub (#1144)
The e2scrub utilities only make sense on system which use LVM. They
come with e2fsprogs and can't be disabled currently. Drop them manually
in our post-build script.
2020-12-29 23:55:38 +01:00
Stefan Agner
4d6991fd45 Fix 64-bit image to boot on Raspberry Pi 400 (#1134) (#1143)
Add the missing PCIe node to make U-Boot's PCIe driver happy on
Raspberry Pi 400 as well.
2020-12-29 23:55:27 +01:00
Stefan Agner
98ab22c119 Add sulogin to make the systemd recovery.target work (#1139)
The systemd recovery.target starts a shell using sulogin. This can be
useful to debug Home Assistant OS if it isn't able to boot completely
anymore.
2020-12-29 20:57:52 +01:00
Stefan Agner
381d2aa8f7 Fix systemd-udevd rule warning (#1136)
systemd-udevd substitutes variables starting with $ in the PROGRAM
argument. If a shell variable is to be used, two $ need to be used to
escape properly. This fixes three instances of the following warning:
Invalid value "..." for PROGRAM (char 58: invalid substitution type), ignoring, but please fix it.
2020-12-29 20:57:29 +01:00
carras
594c24eab7 Update network.md (#1114)
* Mention Supervisor network configuration capabilities
2020-12-29 13:48:06 +01:00
Stefan Agner
be2a64f4d2 Add hassos-apparmor dependency to supervisor (#1140)
The supervisor container requires the "hassio-supervisor" AppArmor
profile. Make sure our AppArmor service hassos-apparmor is a dependency
of the hassos-supervisor.service.
2020-12-29 13:46:40 +01:00
Stefan Agner
51bd8bd0e5 Add eMMC support for Intel NUC with ACPI (#1112) (#1137)
Also enable CONFIG_MMC_SDHCI_ACPI which seems to be required for Intel
NUC with eMMC.
2020-12-29 00:37:24 +01:00
Stefan Agner
4fa3329d59 Update buildroot to 2020.11.1 (#1135)
Signed-off-by: Stefan Agner <stefan@agner.ch>
2020-12-28 23:48:23 +01:00
Stefan Agner
7959113c97 Use systemd-growfs (#1133)
* Use systemd-growfs instead of resize2fs (#1106)

Since systemd 236 systemd has a built-in file system growing mechanism.
The mechanism relies on the kernels online file system resize
capabilities instead of the external resize2fs utility. Online resizing
is supposedly much faster since the kernel takes care of things.

This also makes sure that external file systems get resized which
previously have not been taken care of.

* Drop HA OS specific file system resizing

Since we have systemd-growfs in place now we can drop our file system
resizing code.

* Make sure /dev/disk/by-label/hassos-data is present after resizing

Note: systemd will retry mnt-data.mount later, so at least in theory
this shouldn't really matter. However, the journal has a lot of churn
due to that reordering.
2020-12-28 23:46:55 +01:00
Stefan Agner
cd385be81f Don't use page table mapping for compressed pages (#1129) (#1132)
It seems that page table mappings for compressed tables cause issues in
certain situation leading to "zram: Decompression failed!" errors.
Upstream Linux seems to have recognized the problem and a patch to drop
the functionality entirly has been proposed:
https://lore.kernel.org/linux-mm/20201117135632.GA27763@infradead.org/
2020-12-28 15:43:21 +01:00
Stefan Agner
8ed6bc2e31 Add firmware for TI 3410/5052 USB to UART adapters (#1124) (#1126)
* Add firmware for TI 3410/5052 USB to UART adapters (#1124)
2020-12-28 15:40:53 +01:00
Stefan Agner
68e63d15e5 Add eMMC support for Intel NUC (#1112) (#1123)
Enable CONFIG_MMC and friends for Intel NUC with eMMC.
2020-12-22 18:43:19 +01:00
Stefan Agner
89c31bb967 Enable hidraw driver (#1120) (#1122)
* Enable hidraw driver (#1120)

The hidraw driver is required by some IoT devices such as Wyze sense or
Jablotron JA-100. Enable the driver on all platforms by default.
2020-12-22 18:43:12 +01:00
Stefan Agner
e3120df5d0 Disable DNS over TLS by default (#1113) (#1121)
It seems that on certain setups the default DNS over TLS mode
"opportunistic" causes delays of ~10s when trying to resolve names. This
is probably caused by providers and/or firewall setups not properly rejecting
connections on port 853.

It seems that also other distributions (such as Arch Linux) still
disable DNS over TLS currently. Side step issues with DNS over TLS by
disabling it for now.
2020-12-22 18:42:58 +01:00
Thanasis
59b687f0db Mention potential need for quirks on usb boot (#1111)
Directing people from discord to this page but there wasn't any mention they will likely be needing quirks enabled for usb boot on Rpi4. Also some minor layout adjustments on that section.
2020-12-21 11:31:02 +01:00
Stefan Agner
cee0123105 Bump systemd to latest stable release 246.9 (#1110) 2020-12-20 17:26:31 +01:00
Stefan Agner
22aede0278 Copy the Raspberry Pi 4 EEPROM only if we deploy the package (#1104)
Fix build by only copy the EEPROM update to the boot partition if we
actually enable the EEPROM package.
2020-12-18 19:29:46 +01:00
Stefan Agner
dadc82ae37 Document Hardkernel WiFi modules WiFi status (#1099) 2020-12-18 16:41:13 +01:00
Stefan Agner
26af1dd907 Disable Raspberry Pi EEPROM upgrade (#1045) (#1103)
The EEPROM upgrade 2020-10-28 causes issues with JMS583 or JMS580
controller from Jmicron. Others reported that the same update fixes
reboot issues. Currently there is no Raspberry Pi 4 firmware which works
for all cases. Therefor don't ship an EEPROM upgrade so users can flash
and continue using what works for their setup.
2020-12-17 16:30:02 +01:00
Stefan Agner
c515dd19f2 Don't suspend Home Assistant OS on closed lids (#1093) (#1100)
Old Laptops are a popular choice to run Home Assistant: They have low
power consumption, are relatively fast and cheap to come by. However,
closing their lid by default puts a Linux system into suspend. This is
not what the typical user of Home Assistant OS wants. Ignore lid
activity in any state by default.
2020-12-17 16:29:45 +01:00
Stefan Agner
a39b8576e8 Deploy firmware for RTL8188CUS chipset (#1098)
The Hardkernel WiFi Module 3 comes with a Realtek RTL8188CUS chipset.
Make sure to ship the latest firmware files provided by kernel.org.
2020-12-17 16:28:50 +01:00
Stefan Agner
a4d8e8492f Add RTL8812AU driver from aircrack-ng (#1097)
* Add Realtek RTL8812AU out-of-tree driver

This adds support for Realtek RTL8812AU devices such as the Hardkernel
WiFi Module 5A (with the RTL8811AU chipset, supported by this driver as
well). This patch uses Realtek driver 5.9.3.2 which has been made to
compile up to Linux 5.10.

Note: This driver does not seem to support 5GHz networks! But it seems
the only driver which supports the RTL8811AU chipset and also works with
recent mainline drivers...

* Enable RTL8812AU driver for Hardkernel modules

The WiFi Module 5A comes with a RTL8811AU chipset. Enable the driver for
all Hardkernel modules.
2020-12-17 16:28:36 +01:00
Stefan Agner
323f415fa8 Mount boot partition sync (#1092) (#1101)
When we write the update to the boot partiton, there is nothing which
makes sure that data is written to disk. This leaves a rather large
window (probably around 30s) where a machine reset/poweroff can lead
to a corrupted boot partition. Use the sync mount option to minimize the
corruption window.

Note that sync is not ideal for flash drives normally. But since we
write very little and typically only on OS update to the boot partition,
this shouldn't be a problem.
2020-12-17 14:09:43 +01:00
Stefan Agner
4255425b93 Deploy Raspberry Pi 400 and Compute Module 4 device tree (#1094)
To properly support those devices the dedicated device tree should be
present on the boot partition. Make sure those device trees get
deployed.
2020-12-16 21:23:22 +01:00
Stefan Agner
7c70e3ef84 Increasee disk image capacity to 32GB in OVF as well (#1084) (#1088)
After increasing the actual disk image size the capacity field in the
OVF description file still was mentioning 6GB. This seems to be
problematic for VMware hypervisor. Increase the size to 32GB as well.
2020-12-15 13:22:42 +01:00
Pascal Vizeli
d42f80c65e Update data disk documentation (#1082)
* Add Data disk picture to documentation

Co-authored-by: Joakim Sørensen <joasoe@gmail.com>
2020-12-13 11:08:59 +01:00
Stefan Agner
c3cc81249b Upload ova (Open Virtualization Appliance) image as well (#1080) 2020-12-12 12:57:37 +01:00
Stefan Agner
d8273af0ad Bump version to 6.0 2020-12-12 11:49:46 +01:00
Stefan Agner
a6bdf2c1c9 Set OS pretty name to Home Assistant OS 2020-12-11 12:59:17 +01:00
Stefan Agner
14bb885ce9 Odroid: Update kernel 5.9.13 (#1077) 2020-12-10 22:19:00 +01:00
Stefan Agner
e5eefc9978 Use correct label for ODROID boards in release drafter (#1078)
The correct label for Hardkernel's ODROID is board/odroid.
2020-12-10 22:08:41 +01:00
Stefan Agner
6001c34091 Linux: Update kernel 5.4.82 (#1076) 2020-12-10 22:03:50 +01:00
Stefan Agner
17d0cdf823 Fix another boot script syntax error on Tinker Board (S) (#1074) (#1075) 2020-12-10 15:06:56 +01:00
Stefan Agner
8aceb287de Add major.minor to development build sub-directory (#1073) 2020-12-10 00:45:31 +01:00
Stefan Agner
e42835f163 Cap eMMC frequency to 24MHz in U-Boot for ODROID-N2(+) (#1072)
* Revert "Fix boot from 128GB Micron eMMC on ODROID-N2(+) (#1064)"

This reverts commit 162084082e.

This patches seem to cause issue on a ODROID-N2 with 32GB eMMC.

* Cap eMMC frequency to 24MHz in U-Boot for ODROID-N2(+)

Also remove the ODROID-C4 specific patch.
2020-12-10 00:45:05 +01:00
Stefan Agner
1a8f9ca2e3 Avoid waiting for external drive unnecessarily (#1066)
* Avoid waiting for external drive unnecessarily

Even though the condition to start hassos-data.service is not met (the
file /mnt/overlay/data-move is not there by default), it seems that
systemd waits for the dependencies for hassos-data.service. Don't
Require or Wants any dependencies which might not be present by
default.

* Use systemd to wait for partition using partlabel device

* Use sfdisk which allows to wipe filesystem signatures

Even though we zap the partition table using sgdisk, the file system
superblock (which contains the file system label) does survive. This
can cause problems when trying to reuse a disk previously already
labeled using hassos-data: It might take precendence on next boot
over the existing data partition on the eMMC.

Make sure to clean all file system signatures using sfdisk.
2020-12-08 01:11:00 +01:00
Stefan Agner
162084082e Fix boot from 128GB Micron eMMC on ODROID-N2(+) (#1064) 2020-12-07 22:18:35 +01:00
Pascal Vizeli
c2098e1cf4 No random mac for wifi scan (#1061) 2020-12-05 22:31:19 +01:00
Stefan Agner
22c668b500 Add support for LSI53C10XX SCSI controller commonly used in VMs (#1056) (#1060)
VMware as well as Qemu emulate LSI53C1030 SCSI controller when choosing
a SCSI controller has host interface for disks. For VMware this seems
to be the default choice. Enable the driver by default.
2020-12-05 19:16:07 +01:00
Stefan Agner
6672046b6f Make the datactl command more robust (#1059)
* Make the datactl command more robust

Validate target disk (partition) size to avoid a copy attempt which will
fail. If e2image operation fails, make sure the leftover copy is not
regonized as data partition.

* Fix hassos-data service device unit dependencies
2020-12-04 20:55:35 +01:00
Stefan Agner
78b456d05c Fix U-Boot crash seen on RPi400 (#1057) (#1058) 2020-12-04 20:54:49 +01:00
Stefan Agner
2cc78abe56 Enter console if data partition is missing (#1055)
In case the data partition is missing avoid using the Docker command.
The Docker command triggers a socket activation, which in turn makes
systemd wait for the data partition. This blocks entry into the shell
forever.

Just enter the shell in case data partition is not mounted.
2020-12-03 20:29:07 +01:00
Stefan Agner
46bb12844f Rewrite datactl command (#1046)
* Rewrite datactl command

Prepare the target partition as part of the datactl command. Rely on
partlabel for the target disk since we are always using GPT on the
target disk. Use systemd and partlabel mechanism to wait and find
the target data disk. Keep using the file system label to identify
the source disk.

Also use e2image instead of raw dd to move data. This should
speed up the processes significantly.

* Fix corner case when reusing same disk again
2020-12-03 20:05:02 +01:00
Stefan Agner
1537d02408 Lower console log level after boot-up (#1054)
Some console logs are really not helpful in practise and are more
confusing then helpful. Show warnings and higher on console after
boot-up.
2020-12-03 15:38:10 +01:00
Stefan Agner
a66591166f Update BusyBox configuration (#1053)
* Add find utility helpful to find things

* Add hwclock utility useful to debug RTC issues

* Remove several utilities which are provided by util-linux (such as
  dmesg, mount, blkid etc.)

* Drop unused utilities e.g. for raw nand (nandread/write/ubi)
2020-12-03 15:37:29 +01:00
Stefan Agner
7443c45001 Add explicit apparmor dependency for Docker (#1052)
Signed-off-by: Stefan Agner <stefan@agner.ch>
2020-12-03 15:36:45 +01:00
Stefan Agner
a4f5670cd8 Update buildroot to 2020.11 (#1051)
Signed-off-by: Stefan Agner <stefan@agner.ch>
2020-12-03 12:34:02 +01:00
Stefan Agner
c9c5f1b3e9 Fix boot script issue on Tinker Board (S) (#1043) (#1044) 2020-12-02 13:44:28 +01:00
Stefan Agner
b4c9f2fce2 Fix ethernet link not comming up on ODROID-C2 (#1042)
Use the latest patches from the mailing list to fix Ethernet on
ODROID-C2/N2(+).
2020-12-01 14:54:41 +01:00
Pascal Vizeli
c48184cf91 Set NetworkManager default value / fix mDNS in OTA updates (#1041)
* Set NetworkManager default values / fix mDNS in OTA updates
2020-12-01 10:15:06 +01:00
Stefan Agner
681fe1421a Merge pull request #1039 from agners/fix-ethernet-link-restart
Fix ethernet link not comming up (#1038)
2020-12-01 01:03:22 +01:00
Stefan Agner
acc293b662 Fix ethernet link not comming up (#1038)
Fix ethernet PHY reset timing to make sure the link comes up when
reconfiguring the link.

Also drop 0006-clk-meson-g12a-mark-fclk_div2-as-critical.patch which has
been applied in v5.9.2 stable release.
2020-12-01 00:53:18 +01:00
Stefan Agner
3a67e2e8c4 Merge pull request #1036 from agners/fix-barebox-use-run
Fix Barebox Environment handling
2020-11-30 17:03:08 +01:00
Stefan Agner
8682d8af78 Fix Barebox Environment handling (#1037)
Similar to U-Boot dt-utils (barebox-state in particular) use /var/lock
as location for lockfiles. Use the recommended location /run.
2020-11-29 22:34:06 +01:00
Stefan Agner
b82707ff9a Pass empty VERSION_DEV variable to make for release builds 2020-11-28 19:27:12 +01:00
Stefan Agner
525dcfedfb Upload xz output files instead of gz 2020-11-28 19:27:11 +01:00
Stefan Agner
18cc261e35 Bump linux buildroot (#1032)
* Update buildroot to 2020.11-rc3

Signed-off-by: Stefan Agner <stefan@agner.ch>

* ODROID: Update kernel 5.9.11

* Remove patch which has been applied upstream

* Linux: Update kernel 5.4.80
2020-11-28 16:19:21 +01:00
Stefan Agner
bda9c3d715 Fix ODROID-N2(+) SoC version banner (#1031)
The version banner was showing "Amlogic Meson G12A (Unknown) Revision
28:0 (0:0)" in all cases instead of the correct SoC name and revision.
Make sure the SoC revision is properly read also for the banner.
2020-11-27 16:37:04 +01:00
Stefan Agner
4cbbeeb7dc Improve OVF descriptor (#1030)
* Add sound card by default using the hdaudio driver (#925)

* Use virtio-net for VirtualBox

The virtio-net driver is a paravirtualization driver which means less
overhead than virtualizing a full network card. The driver is supported
by VirtualBox since several releases by now.

* Use full OS name in product name.
2020-11-27 16:36:44 +01:00
Stefan Agner
beaad9ac9b Fix boot script issues (#1024) (#1026)
The change "Avoid trying to boot non-existing kernel image in failover
case" introduced a broken boot script on Raspberry Pi (when booting from
partition B) and ODROID-XU4.
2020-11-27 13:47:46 +01:00
Stefan Agner
bf1eaf44d5 Raspberry Pi: Add RPi400 and CM4 support (#1025)
Backport patches for RPi400 and CM4 support. Tested on a RPi400 which
seems to successfully boot and run Home Assistant OS with this.
2020-11-26 23:13:57 +01:00
Stefan Agner
c94f7933ef RaspberryPi: Update kernel 5.4.79 - 9797f1a4938c20139b00a25de93cc99efb5c291b (#1023) 2020-11-26 23:04:39 +01:00
Stefan Agner
01475a8c45 Fix boot from USB for Raspberry Pi 32-bit installations (#987) (#1022) 2020-11-26 23:04:24 +01:00
Stefan Agner
9436661958 Bump dev channel after build (#1021)
* Bump dev channel after build

Bump version on dev channel automatically when building a dev branch
pre-release.

Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>
2020-11-26 23:04:05 +01:00
Stefan Agner
e88ae15272 Add sub-directory per development build (#1020)
HAOS builds add a lot of files and things get quickly messy. Use a
directory per build.

Also don't abort the complete build if a single board failed, we still
might be interested in the rest.
2020-11-26 00:34:46 +01:00
Aman Gupta Karmani
1fa53bc3dc Add rpi-eeprom firmware (#939)
* Add 2020-10-28 beta EEPROM

This improves boot from USB and speeds up boot times.
also includes sd card v1 boot reliability.
see https://github.com/raspberrypi/rpi-eeprom/pull/246

Also add HDMI_DELAY=0 so HDMI display is always visible
for easier debugging.
2020-11-26 00:33:48 +01:00
Stefan Agner
1a6dcbbf5b Compress images using xz instead of gzip (#1018)
The xz compression allows higher compression rates and higher speeds,
a quick measurement lead to this numbers:
gzip --best: compression 131.11s, decompression 9.797s (299M)
xz -3 (single thread): compression 95.13s, decompression 14.902s (228M)
xz -3 (multi thread): compression 12.146s, decompression 14.902s (228M)
2020-11-26 00:29:11 +01:00
Stefan Agner
4be3dee0b4 Add dev build workflow (#1017)
* Add development build version part to version number

Add third part in the version number to indicate development builds.
Generate a default version number based on the date, e.g.
"5.6.dev20201124".

* Add GitHub Action workflow for development builds

Add another GitHub workflow for development builds. Make it triggered
only for now. The version number is generated by the workflow and
passed to all builds to make sure all builds have the same development
build version.

* Add documentation
2020-11-25 10:52:28 +01:00
Stefan Agner
5756969be9 Avoid trying to boot non-existing kernel image in failover case (#1016)
* Avoid trying to boot non-existing kernel image in fail-over case

The A/B update system automatically switches to the other boot slot when
booting fails. However, in a fresh installation, only boot slot A
exists. If booting fails three times (e.g. if somebody plugs out power
before the slot can be marked as good), then the system switches to boot
slot B which does not contain a kernel image yet. Avoid trying to boot
the non-existing kernel image.

With this change, if slot B is empty U-Boot will restore both slots to 3
attempts and retry booting from slot A on next reboot:

```
Trying to boot slot B, 2 attempts remaining. Loading kernel ...
** Unrecognized filesystem type **
No valid slot found, resetting tries to 3
storing env...
```

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2020-11-24 17:33:44 +01:00
Stefan Agner
8442d2ccfa ODROID: disable USB enumeration (#1015)
* Fix N2+ boot by disabling USB enumeration

On some devices USB enumeration in U-Boot seems to freeze:
starting USB...
Bus usb@ff500000: Register 3000140 NbrPorts 3
Starting the controller
USB XHCI 1.10
scanning bus usb@ff500000 for devices... <freeze>

We don't use USB currenty in the U-Boot script, disable it for now.

* Disable USB enumeration on all ODROID devices
2020-11-23 11:10:55 +01:00
Stefan Agner
300986f129 Increase OVA disk image default size to 32GB (#1009)
The current default size of 6GB can fill up pretty quickly. Since most
disk images we offer resize dynamically its not really problem to ship
with a bigger default size. It avoids support cases when people forget
to increase the disk image size.
2020-11-21 10:21:38 +01:00
Stefan Agner
08cbbe8988 Improve issue reporting template (#1008) 2020-11-20 21:57:24 +01:00
Stefan Agner
827c97f0ca Make sure ALSA modprobe parameters get applied (#1007)
* Remove busybox Linux module support

Since systemd relies on the upstream Linux kernel module handling
utility "kmod" the busybox implementations are not required. Already
today the official "kmod" utility takes precedence:
haos # ls -la /usr/sbin/*mod*
lrwxrwxrwx    1 root     root            11 Nov 11 11:32 /usr/sbin/depmod -> ../bin/kmod
lrwxrwxrwx    1 root     root            11 Nov 11 11:32 /usr/sbin/insmod -> ../bin/kmod
lrwxrwxrwx    1 root     root            11 Nov 11 11:32 /usr/sbin/lsmod -> ../bin/kmod
lrwxrwxrwx    1 root     root            11 Nov 11 11:32 /usr/sbin/modinfo -> ../bin/kmod
lrwxrwxrwx    1 root     root            11 Nov 11 11:32 /usr/sbin/modprobe -> ../bin/kmod
lrwxrwxrwx    1 root     root            11 Nov 11 11:32 /usr/sbin/rmmod -> ../bin/kmod

* Move modprobe configuration alsa-base.conf to correct location

The official modprobe package from kmod checks three locations:
/etc/modprobe.d/, /lib/modprobe.d/ and /run/modprobe.d/. Since usr-move
/lib is a symlink to /usr/lib, the correct location for distribution
provided modprobe files is /usr/lib/modprobe.d.
2020-11-20 19:35:20 +01:00
Stefan Agner
3f5b28a0b4 Use GitHub Actions (#1005)
* Initial version of release workflow using GitHub Actions

Add release workflow using GitHub Actions to replace the current Azure
DevOps pipeline. Currently the same functionality is implemented. This
uses multiple builds in parallel to make better use of CPU resources.

Remove Azure DevOps pipeline.

* Add GitHub Actions workflow for pull-request checks

Lint Dockerfile and shell scripts when PRs are opened.

* Use multiple runners in parallel

Buildroot has stretches where CPU resources are not fully utilized.
Spawn multiple builds accross builders to increase load. Also sort them
by architecture to maximize ccache hit rate.

* Checkout before validate version
2020-11-19 12:29:21 +01:00
Stefan Agner
7c25f7c187 Fix DNS resolving (#1004)
* Add resolved.conf to disable stub resolver and DNSSEC

There are Add-Ons which try to bind port 53 on all interfaces including
127.0.0.53. Disable the stub resolver to make them continue working. We
don't need the resolver currently anyway.

Also disable DNSSEC to make sure the baords can access a NTP time server
even when their time is incorrect (since DNSSEC validation may fail).
This is a known chicken-egg problem with systemd-resolved/systemd-timesyncd
and might be addressed in a future version, with what we can reenable
DNSSEC:
https://github.com/systemd/systemd/issues/5873

* Make sure resolve gets added only once to nsswitch.conf

Only add resolve to nsswitch.conf if not already present.
2020-11-18 09:56:38 +01:00
Stefan Agner
52e21c9ccf Fix shellcheck warnings (#1003)
* Use double quote to prevent globbing and exit with error in case
  directory doesn't exit in hassos-hook.sh

* echo flags are undefined in POSIX, use bash instead in
  bluetooth-rtl8723
2020-11-17 20:06:03 +01:00
Stefan Agner
8d448a130c Set permissions for builder on entry (#1002)
Make sure the builder can write the ccache directory. This is useful
e.g. when using a Docker volume or a newly created directory.
2020-11-17 16:27:30 +01:00
Stefan Agner
39debca9fc Fix U-Boot environment handling (#1001)
* Use /run as default location for lock files for U-Boot tools

While there is a command line parameter to set the lock file explicitly,
there are other tools invoking fw_setenv (in particular rauc) which do
not set the lock file. Using /run by default makes fw_setenv use the
correct lock file in all situations.

* Don't explicitly set lock file location

Since we patch U-Boot tools to use /run by default setting it explicitly
is unnecessary.
2020-11-17 15:15:50 +01:00
Stefan Agner
29e92f4231 Add on-board RTC support for ODROID-N2+ (#999)
Make the NXP PCF8563TS on-board RTC the primary RTC of the system.
2020-11-17 10:49:01 +01:00
Stefan Agner
0797bccc36 Improve release drafter (#998)
* Change titels to reflect official/new naming

* Use GitHub Actions to trigger Release Drafter

The Add-On is no longer developed and GitHub Actions is the recommended
way to use the Release Drafter
2020-11-16 22:13:01 +01:00
Stefan Agner
e8c2bacae6 Use upstream fix for zram on 32-bit ARM with LPAE (RPi4) (#996) 2020-11-16 15:09:12 +01:00
Stefan Agner
80f02b8ab6 Update buildroot to 2020.11-rc2 (#995)
Signed-off-by: Stefan Agner <stefan@agner.ch>
2020-11-16 11:06:25 +01:00
Stefan Agner
a0871be6c0 Bump buildroot to 2020.11-rc1 (#985)
* Update buildroot-patches for 2020.11-rc1 buildroot

* Update buildroot to 2020.11-rc1

Signed-off-by: Stefan Agner <stefan@agner.ch>

* Don't rely on sfdisk --list-free output

The --list-free (-F) argument does not allow machine readable mode. And
it seems that the output format changes over time (different spacing,
using size postfixes instead of raw blocks).

Use sfdisk json output and calculate free partition space ourselfs. This
works for 2.35 and 2.36 and is more robust since we rely on output which
is meant for scripts to parse.

* Migrate defconfigs for Buildroot 2020.11-rc1

In particular, rename BR2_TARGET_UBOOT_BOOT_SCRIPT(_SOURCE) to
BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT(_SOURCE).

* Rebase/remove systemd patches for systemd 246

* Drop apparmor/libapparmor from buildroot-external

* hassos-persists: use /run as directory for lockfiles

The U-Boot tools use /var/lock by default which is not created any more
by systemd by default (it is under tmpfiles legacy.conf, which we no
longer install).

* Disable systemd-update-done.service

The service is not suited for pure read-only systems. In particular the
service needs to be able to write a file in /etc and /var. Remove the
service. Note: This is a static service and cannot be removed using
systemd-preset.

* Disable apparmor.service for now

The service loads all default profiles. Some might actually cause
problems. E.g. the profile for ping seems not to match our setup for
/etc/resolv.conf:
[85503.634653] audit: type=1400 audit(1605286002.684:236): apparmor="DENIED" operation="open" profile="ping" name="/run/resolv.conf" pid=27585 comm="ping" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
2020-11-13 18:25:44 +01:00
Stefan Agner
25a0dd3082 Use systemd-resolved to announce hostname via mDNS and LLMNR (#986)
Drop AVAHI and use systemd-resolved to announce hostname via mDNS
and LLMNR. Also continue to offer the _workstation._tcp.local service
since it is used by the CoreDNS mDNS plug-in.
2020-11-13 17:43:46 +01:00
Stefan Agner
50d304d7f3 Drop services we don't offer (#988)
Stop announcing services using DNS-SD we don't offer.
2020-11-13 15:26:30 +01:00
Stefan Agner
021b2c0357 Bump version 5.6 2020-11-10 22:55:18 +01:00
Stefan Agner
f922c14f15 Enable dropbear client to make scp work (#951) (#979)
When trying to use scp it fails due to missing /usr/bin/dbclient. For
debugging/testing scp can be helpful and is rather slim. Add it to all
configs.
2020-11-10 22:21:32 +01:00
Stefan Agner
92541b7280 Move patch for the RPi Linux kernel to the correct location (#978) 2020-11-10 21:30:32 +01:00
Stefan Agner
f5ff224358 Bump Raspberry Pis to 5.4 kernel (#956)
* Bump Raspberry Pi kernel to 5.4

Bump kernel to the downstream Raspberry Pi 5.4 kernel. Drop patches
already merged upstream and use rebased patches for USB reset
controller (required for U-Boot 2020.10 for USB SSD boot).

* Add compatible node for upstream U-Boot

Add brcm,bcm2835-pl011 to make upstream U-Boot bind with the
bcm283x_pl011 driver. This allows to boot with the device tree provided
by the Raspberry Pi Linux kernel 5.4 even without enable_uart=1.
2020-11-10 18:25:51 +01:00
Stefan Agner
6bc6300149 ODROID: Update kernel 5.9.6 (#976)
The CDC ACM cooldown fix is now part of upstream Linux, so we can drop
our patch.
2020-11-10 14:25:39 +01:00
Stefan Agner
fe9fc1cbd2 Use performance governor to avoid frequency scaling (#973)
After running HAOS on my ODROID N2+ several hours I see freezes and
sometimes stack traces which point to a problem in CPU frequency
scaling. This crash seems not to appear on Hardkernel's 18.04 Ubuntu
stable release. However, Hardkernel's Ubuntu uses the performance
governor. Use the performance governor as well to avoid crashes on N2+.
2020-11-10 13:40:39 +01:00
Stefan Agner
4f28a284be Make self healing capabilities more robust (#960)
In case a container image is corrupted `docker inspect` might fail:
  # docker inspect --format='{{.Id}}' "${SUPERVISOR_IMAGE}"

  Error response from daemon: readlink /mnt/data/docker/overlay2: invalid argument

In that same state the `docker images` command still shows the images.
Since `docker inspect` returns an error SUPERVISOR_IMAGE_ID will be empty
and a simple `docker pull` will be attempted. That does not suffice to
recover from a corrupted container image.

Use `docker images` to get the image ids and make sure to delete all
image ids found by that command.

Also don't use RuntimeDirectory since it deletes the runtime directory
between the service start attempts which defeats the purpose.
2020-11-09 13:05:54 +01:00
Stefan Agner
094208492e ODROID-C4 fixes (#963)
* Add machine specific landingpage container to ODROID-C4 as well (#949)

* Fetch script from new repo location and layout as well
2020-11-07 19:46:42 +01:00
Stefan Agner
ce95fdccd3 Revert "use GPT partition table for RPi4 (#936)" (#969)
This reverts commit c92b4b54be.

Pure GPT would be nice, but older EEPROM/firmware version seem not to
handle it properly (before EEPROM 2020-09-03/firmware 2020-10-22). Since
devices still get shipped with older EEPROM we currently moving to pure
GPT would make those devices not booting.

Stick with hybrid mode for now to make sure HAOS boots on all devices no
matter if a new or old EEPROM is in use.
2020-11-07 19:46:17 +01:00
Jakub Bartkowiak
2c335a4dd9 Fix configuration.md link in raspberrypi README.md (#967) 2020-11-07 13:39:29 +01:00
Stefan Agner
1a99d07cae Update ODROID-N2 binary blobs to those built with latest U-Boot (#961) 2020-11-06 10:10:26 +01:00
Stefan Agner
58d4b79376 Update ODROID N2 U-Boot reference to get latest DDR timings (#958)
The DDR timings are taken direclty from the checked out hardkernel
U-Boot tree. Make sure to use the lastest hash to get the latest timing
changes.
2020-11-05 15:51:16 +01:00
ubergeek801
0b52271b3a Support ODROID C4 SBC (#926)
* initial ODROID-C4 support
* setting clk_ignore_unused
2020-11-05 10:40:25 +01:00
Stefan Agner
503117d8bf Move RuntimeDirectory to the Service section (#957)
RuntimeDirectory needs to be in the [Service] section to take effect.
2020-11-04 16:55:19 +01:00
Aman Gupta Karmani
c92b4b54be use GPT partition table for RPi4 (#936)
* use GPT partition table for RPi4
2020-11-04 11:10:57 +01:00
Stefan Agner
5e44dcc681 RaspberryPi: Update firmware 2ba11f2a07760588546821aed578010252c9ecb3 (#954) 2020-11-04 11:09:06 +01:00
Stefan Agner
2d257bd671 Simplify self healing capabilities of Supervisor service (#952)
* Simplify self healing capabilities of Supervisor service

Instead of relying on time based information on how long the container
has been running use a startup marker file to infer if the last startup
has been successful.

* Update buildroot-external/rootfs-overlay/usr/sbin/hassos-supervisor

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2020-11-04 10:05:38 +01:00
Aman Gupta Karmani
8ed04ed73c reboot kernels on panic so u-boot can fallback to previous update (#937) 2020-11-03 18:31:59 +01:00
Stefan Agner
737a6f18c3 Add machine specific landingpage container at build time (#949)
The landingpage container is a minimal webserver with built-in zeroconf
annoucement. Preinstall the machine specific landingpage container to
make sure it will show up right after startup.
2020-11-02 13:35:00 +01:00
Aman Gupta Karmani
ac942b8ed9 add fsck.repair=yes to all uboot kernel cmdline args (#943) 2020-10-30 21:54:20 +01:00
Aman Gupta Karmani
a8bad54efc automatically fsck to repair issues after an unclean shutdown (#938)
* automatically fsck to repair partitions

* add fsck.fat so rpi boot partition can be repaired

* Use Wants= instead of Requires=

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>

* add dosfstools to all images

* run hassos-data and hassos-expand after fsck

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2020-10-30 21:52:24 +01:00
Stefan Agner
481a79eb28 Revert "bump rpi-firmware to latest stable release (sep 2020) (#899)" (#928) (#942)
This reverts commit dade3adf80.
The new firmware lead to black screens and rainbow screen on various
Raspberry Pis.
2020-10-27 09:42:21 +01:00
Aman Gupta Karmani
8cd7dfe822 make it easier to edit and transfer files in the docker builder (#935) 2020-10-27 09:32:32 +01:00
Aman Gupta Karmani
2416c6c26c add .DS_Store to .gitignore (#934) 2020-10-27 09:26:03 +01:00
Harsh Kevadia
4eb0cd6460 Update README.md (#930)
* Update README.md

* Update based on PR comments
2020-10-25 18:36:15 +01:00
Stefan Agner
e43747c2e9 ODROID N2+ fixes (#929)
* Make sure to set board_rev for N2+ correctly

For some reason the code to set the environment did not make it into the
ODROID N2 board code. Fix the patch to correctly set board_rev for N2(+).
Also remove the w400 patch as it is no longer required.

* Use latest ODROID-N2+ patches

Use the queued patches (and fixes) for upstream ODROID-N2+ support.
This uses the clock settings from meson-g12b-a311d.dtsi running the
CPUs at the following clocks:
- 4xA73@2.2GHz
- 2xA53@1.8GHz
2020-10-24 18:45:41 +02:00
Pascal Vizeli
5f8aeb1c6d Bump version 5.5 2020-10-22 17:07:52 +02:00
Pascal Vizeli
dcfb296dcf Update buildroot to 2020.02.7 (#923)
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-10-22 17:05:36 +02:00
Stefan Agner
fdcb94f0d8 Actually fix CDC ACM error recovery path (#712) (#921)
Instead of reverting the CDC ACM cool-down patch fix the intention of
that change. This should fix the error recovery paths in the CDC ACM
driver and allow CDC ACM devices to continue working even in the event
of USB issues.
2020-10-21 20:34:26 +02:00
Stefan Agner
5f0a8fe627 Bump firmware to RPi bluez-firmware 1.2-4+rpt6 release (#918)
This addresses recent Bluetooth secruity vulnerabilities.
2020-10-20 22:39:59 +02:00
Pascal Vizeli
0495ba25ad RaspberryPI: Fix issue with correct SYMLINK with ttyAMA (#915) 2020-10-20 19:08:19 +02:00
Pascal Vizeli
fa242e32d7 Remove not needed partition magic (#901)
* Update Documentation/partition.md

Co-authored-by: Stefan Agner <stefan@agner.ch>
2020-10-18 15:08:11 +02:00
Stefan Agner
fc3b098170 Fix CDC ACM error recovery path (#712) (#905)
Revert CDC ACM cool-down patch. This should fix the error recovery paths
in the CDC ACM driver and allow CDC ACM devices to continue working even
in the event of USB issues.
2020-10-17 13:16:08 +02:00
Stefan Agner
2b0fff31a3 Bump ODROID boards to Linux 5.9 (#898)
* Bump ODROID boards to Linux 5.9.1

This makes quite some patches obsolete which since have been upstreamed.

* Drop Linux 5.7 header symbols

Since we do not introduce new packages which actually require a newer
kernel headers, there is no value in having config symbols for the new
kernel version. Buildroot is still using the headers from our kernel,
and hence gets the latest version of the headers.
2020-10-17 13:14:47 +02:00
Aman Gupta Karmani
dade3adf80 bump rpi-firmware to latest stable release (sep 2020) (#899) 2020-10-16 15:12:35 +02:00
Souradip Mookerjee
b4fad03613 Make clear this should be with UNIX line endings (#884) 2020-10-15 11:49:08 +02:00
Aman Gupta Karmani
59b8636bc8 Fix systemd-time-wait-sync getting stuck with upstream patches (#897) 2020-10-13 00:38:04 +02:00
Aman Gupta Karmani
3337cd0f79 Fix var-lib-NetworkManager.mount dependencies (#895) 2020-10-12 21:41:12 +02:00
Pascal Vizeli
0c7cd8023e Bump version 5.4 2020-10-11 19:38:10 +02:00
Stefan Agner
502ef82b80 Bump U-Boot to 2020.10 for all boards using U-Boot (#889) 2020-10-10 12:27:47 +02:00
Stefan Agner
1708ed11b4 Fix Docker socket path (#885)
The Docker socket path is /run/docker.sock. Also only one path can be
used per property. This fixes the supervisor service, which currently
refuses to start due to missing Docker socket.
2020-10-06 12:17:39 +02:00
cogneato
59b9d82a55 Clean up initial description (#886) 2020-10-05 22:11:19 +02:00
Stefan Agner
39babd5368 Extend RPi default config.txt (#875)
Add commented out commands to enable serial console (useful for
debugging) and to disable SD card poll (useful for USB SSD boot).
2020-09-25 08:46:27 +02:00
Stefan Agner
2595dd815b Enable drivers for Intel Network devices with Virtual Function (#754) (#878) 2020-09-25 08:45:22 +02:00
Stefan Agner
d1577a6a65 Enable Hyper-V PCI support (#872) (#877) 2020-09-25 08:43:39 +02:00
Pascal Vizeli
f219f239d8 Improve handling with services on supervisor (#867)
* Improve handling with services on supervisor

* add condition

* move dbus to required, since we can't start the supervisor
2020-09-24 13:40:39 +02:00
Stefan Agner
ebc93692f5 Drop UART write retry patch from U-Boot (#873)
The patch causes U-Boot freezes in some configurations. The root cause
is that U-Boot does not allow to use the bss section in pre-relocation
code (which is where the UART is used). Drop the patch as it is not
required currently.

See also:
http://u-boot.10912.n7.nabble.com/RPi4-U-Boot-freeze-td424432.html#a427198
2020-09-24 13:37:44 +02:00
Pascal Vizeli
3af31c2265 Add observer plugin (#864) 2020-09-14 10:21:03 +02:00
Stefan Agner
f4f6908c80 Make sure udev rule only applies to first PL011 UART (#778) (#862)
The to symlink serial0/1 currently might apply to the first or second
ttyAMAX instance. In downstream, a patch makes sure that the first
PL011 is always ttyAMA0. However, upstream the numbering depends on the
UART alias, which leads to the first PL011 being ttyAMA1.

Check the actual iobase too to make sure we are dealing with the first
PL011 instance.

See also:
05cfe136f7 (diff-2678c183f503319c8d8c09c818af789a)
2020-09-12 09:08:27 +02:00
Stefan Agner
31fc13cf03 Resize serial terminal on login (#860) (#863)
The new readline utilty used by the CLI add-on requires the size of the
terminal to be set. Use the resize command to initialize terminal size
on login if we are running on a serial terminal.
2020-09-12 09:07:03 +02:00
Stefan Agner
ec1561661b Make sure U-Boot built idbloader.img gets copied (#854)
The U-Boot build system creates a ready to use idbloader.img. A earlier
commit dropped the HAOS code to create the same. However, the commit
missed copying the one built by U-Boot. Make sure idbloader.img gets
copied to the image output directory.
2020-09-10 10:55:41 +02:00
Pascal Vizeli
272430a58c Revert "Use Microsoft Basic Data instead of Microsoft Reserved Partition (#847)" (#852)
This reverts commit 31bb38ffd4.
2020-09-07 11:19:03 +02:00
Pascal Vizeli
1537e14dfc Bump version 5.3 2020-09-06 22:29:39 +02:00
Pascal Vizeli
22f7777099 Make getty for serial/tty same (#850)
* Make getty for serial/tty same

* adjust log output
2020-09-06 22:18:19 +02:00
Pascal Vizeli
813030bb4c Linux: Update kernel 5.4.63 / 5.7.13 (#849)
* Odroid: Update kernel 5.7.19

* Linux: Update kernel 5.4.63
2020-09-06 22:17:13 +02:00
Stefan Agner
31bb38ffd4 Use Microsoft Basic Data instead of Microsoft Reserved Partition (#847)
Currently the Microsoft Reserved Partition GUID is used for this FAT32
formatted partition. This GUID is a rather Microsoft Windows specific
GUID and not commonly used on Linux.

On Linux systems partitions of this type do not get automatically
mounted (see /usr/lib/udev/rules.d/80-udisks2.rules). However, since
this partition contains some files user commonly need to adjust
(config.txt, cmdline.txt) it would be good if the partition does get
mounted.

Use Microsoft Basic Data instead, which is used by default for FAT32
partition (even by Linux partitioning tools such as gparted). Tested
on ASUS Tinker Board and RPi4.
2020-09-06 11:57:17 +02:00
Stefan Agner
b6cfe04422 Do not attempt to resize on every boot (#843) (#848)
The hassos-expand script calls sfdisk to find free disk space. It seems
that today it considers the space before the first partition as free:
$ sudo sfdisk -Fq /dev/sdi
Start   End Sectors Size
 2048 16383   14336   7M

This causes the script to always resize. It seems not to cause harm to
the partition table (it does not resize really). However, the call to
partx seems to confuse systemd and kill the mnt-data.mount process
(presumably because udev causes remove/add events for the by-label
device units).

Consider everything below 8MiB to not be worthy of a size change. This
avoids missdetection and resize attempts where there is no need.
2020-09-06 11:22:43 +02:00
Stefan Agner
0ae67991d1 Cleanup Tinker Board patches (#846)
* Remove rk3288-xt-q8l-v10.dts related patches

We only support ASUS Tinker Board, so no need for those patches.

* Remove unnecessary patches and rebase some for Tinker Board S

Some patches only apply to the Tinker Board device tree. Rebase them to
apply to the dtsi file so they apply for both boards, the Tinker Board
and the Tinker Board S board.
2020-09-05 11:11:18 +02:00
Stefan Agner
f892334077 Support custom output directory (#842)
Support custom output directories akin to how buildroot supports O=.
This allows to use separate output directory per board, e.g. using
make O=output_odroid-n2.
2020-09-04 21:07:32 +02:00
Stefan Agner
2e2f6e893b Fix Tinker Board S (eMMC) boot (#650) (#845)
* Fix Tinker Board S (eMMC) boot (#650)

Use Tinker Board S U-Boot configuration which is capable to boot from
eMMC as well as from SD card.

Note that this makes U-Boot always claiming to run on Tinker Board S:
..
Model: Rockchip RK3288 Asus Tinker Board S
..

It seems that there is no generic Tinker Board configuration. However,
Tinker Board S configuration really seems to work well with Tinker Board
as well, so just use it.

Also today the U-Boot Makefile seems to generate a working idbloader.img
already. Drop our special handling.

* Use Tinker Board S device tree if booting from eMMC for Linux

Instead of patching the Tinker Board device tree, select the device tree
based on what device we are booting from.

Note: This boots the non-S device tree when booting a Tinker Board S
from SD card! But there is no reliable detection otherwise, so let's
just live with that fact.

* Document how to use our U-Boot to flash eMMC
2020-09-04 21:05:49 +02:00
Stefan Agner
a2a4cf8668 Align all partitions to 1MiB boundary (#808)
Aligning partitions (and hence file system structures) to higher level
then 512 byte sectors is common practise and highly recommended for flash
backed block devices. It makes sure that the underlaying flash translation
layer (FTL) does not amplify writes due to missalignment of its erase
block size. Use a 1MiB boundary which is what a modern fdisk is doing.

Before this change:

 # fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.35.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): p
Disk /dev/mmcblk0: 14.57 GiB, 15634268160 bytes, 30535680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x48617373

Device         Boot   Start      End  Sectors  Size Id Type
/dev/mmcblk0p1 *      16384    65537    49154   24M  c W95 FAT32 (LBA)
/dev/mmcblk0p2        65539  1228814  1163276  568M  5 Extended
/dev/mmcblk0p3      1228816  1425425   196610   96M 83 Linux
/dev/mmcblk0p4      1425427 30535679 29110253 13.9G 83 Linux
/dev/mmcblk0p5        65540   114693    49154   24M 83 Linux
/dev/mmcblk0p6       114695   638984   524290  256M 83 Linux
/dev/mmcblk0p7       638986   688139    49154   24M 83 Linux
/dev/mmcblk0p8       688141  1212430   524290  256M 83 Linux
/dev/mmcblk0p9      1212432  1228814    16383    8M 83 Linux

After this change:

 # fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.35.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): p
Disk /dev/mmcblk0: 14.57 GiB, 15634268160 bytes, 30535680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x48617373

Device         Boot   Start      End  Sectors  Size Id Type
/dev/mmcblk0p1 *      16384    65535    49152   24M  c W95 FAT32 (LBA)
/dev/mmcblk0p2        65536  1239039  1173504  573M  5 Extended
/dev/mmcblk0p3      1241088  1437695   196608   96M 83 Linux
/dev/mmcblk0p4      1439744 30535679 29095936 13.9G 83 Linux
/dev/mmcblk0p5        67584   116735    49152   24M 83 Linux
/dev/mmcblk0p6       118784   643071   524288  256M 83 Linux
/dev/mmcblk0p7       645120   694271    49152   24M 83 Linux
/dev/mmcblk0p8       696320  1220607   524288  256M 83 Linux
/dev/mmcblk0p9      1222656  1239039    16384    8M 83 Linux

See also:
https://unix.stackexchange.com/questions/248939/how-to-achieve-optimal-alignment-for-emmc-partition
http://3gfp.com/wp/2014/07/formatting-sd-cards-for-speed-and-lifetime/
2020-09-01 22:54:19 +02:00
Stefan Agner
b8cf3face0 Load socinfo only once (#838)
Remove code duplication and make sure to load socinfo only once. Also
set board_rev before MAC address to make sure board_rev is set even if
loading MAC address from efuses fails.
2020-09-01 19:07:07 +02:00
mikebaz
1c991c229d Update network.md (#833)
small change to reflect the renaming of the OS as shown in the top-level README
2020-08-28 10:37:01 +02:00
Stefan Agner
a3c5e670ef Fix ODROID-N2(+) SD card boot (#835) (#836) 2020-08-28 10:18:50 +02:00
Pascal Vizeli
ffc75a5053 Optimize overlay driver (#831)
* Optimize overlay driver

https://www.youtube.com/watch?v=fSyr_IXM21Y&feature=youtu.be

Not sure about the INDEX, but the other should be safe.

* Update buildroot-external/kernel/docker.config

Co-authored-by: Stefan Agner <stefan@agner.ch>

Co-authored-by: Stefan Agner <stefan@agner.ch>
2020-08-27 11:50:16 +02:00
Stefan Agner
4d6246be4d RPi4 fix WiFi with 802.11r fast roaming enabled (#733) (#830)
Add brcmfmac patch which adds 802.11r fast roaming support.
2020-08-22 15:08:14 +02:00
Stefan Agner
c6a1e668f4 Load loop module before starting the container (#824)
This makes sure that the kernel module loop is loaded, the loop devices
under /dev have been created before the container starts. Docker uses
the current /dev as template for the container /dev. If the loop entries
are missing, loop devices can't be used inside the container. Use
losetup which does not make assumption weather loop support is built-in.

This fixes issues seen on my machine when entering the build environment
the first time after build:
  mount: /mnt/data: failed to setup loop device for /export/data.ext4.
  make[2]: *** [package/pkg-generic.mk:364: /build/buildroot/output_rpi4/build/hassio-1.0.0/.stamp_target_installed] Error 32
2020-08-18 10:46:28 +02:00
Pascal Vizeli
b19f83d74d N2: fix possible issue with end up in not working device (#818) 2020-08-10 09:59:49 +02:00
Pascal Vizeli
a877e0c3dd Fix RPi4 with buildroot v2020.02.4 (#815) 2020-08-07 12:49:52 +02:00
Pascal Vizeli
265cb08e79 Bump version 5.2 2020-08-06 21:23:03 +02:00
Pascal Vizeli
c473aca701 Add support for USB wifi (#813)
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-08-06 21:20:29 +02:00
Pascal Vizeli
f93f8e34b3 Kernel 5.4.56 / Odroid 5.7.13 (#812)
* Linux: Update kernel 5.4.56

* Odroid: Update kernel 5.7.13
2020-08-06 21:12:41 +02:00
Pascal Vizeli
fa53c7bc99 Update buildroot v2020.02.4 (#811)
* Update buildroot to 2020.02.4

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* fix patches

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-08-06 20:54:14 +02:00
Pascal Vizeli
1f4bd67f7e Improve the compatibility (#810)
* Improve the compatibility

* small style fix
2020-08-06 20:49:42 +02:00
Pascal Vizeli
0c427d0dee Update rauc 1.4 to fix mounted boot partition issue (#809)
* Update rauc 1.4 to fix mounted boot partition issue

* applay update

* fix characters

* fix CI

* Support old format

* fix mcopy prefix

* fix lint

* fix lint

* clean style

* Fix script

* fix syntax

* Support all system

* fix shell

* Fix script
2020-08-06 19:37:52 +02:00
Konpon96
701e4f78aa Enable systemd-logind (#797)
Signed-off-by: Konrad Ponichtera <konpon96@gmail.com>
2020-08-06 08:38:14 +02:00
Stefan Agner
cd5cb880ea Do not break device tree changes made by audio patches (#807) 2020-08-06 08:32:25 +02:00
Stefan Agner
cf033ec49d hardkernel: Fix build warning when building U-Boot (#806)
Drop const since we actually modify the buffer in meson_get_soc_rev
2020-08-05 12:07:53 +02:00
Pascal Vizeli
0ec506470a Fix amlogic patch for soc rev (#804) 2020-08-04 16:46:26 +02:00
cogneato
606da02461 Fix duplicate link and typo in documentation (#805) 2020-08-04 16:44:37 +02:00
Pascal Vizeli
e49f8fe630 Update kernel mainline 5.4.55 / Odroid 5.7.12 (#803)
* Odroid: Update kernel 5.7.12

* Linux: Update kernel 5.4.55

* Fix patch
2020-08-03 22:58:40 +02:00
Adam Griffiths
02836524ce Documentation (#769)
* spelling correction

* Restuctured, added "features", "supported hardware", intro for developers and links to the developer documentation.

* Spelling correction

* URL correction

* Documentation restructure

* Moving developer documentation index from top level README to Documentation directory README

* fixing URLS

* Restructuring and adding to board config

* Improving navigation of docs oon github

* New line after first heading

(https://github.com/home-assistant/operating-system/pull/768#discussion_r453336692)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update README.md

https://github.com/home-assistant/operating-system/pull/768#discussion_r453336871

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update README.md

(https://github.com/home-assistant/operating-system/pull/768#discussion_r453336999)
- Surround headings with newlines
- ODROID
- Use dashes for unordered lists

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update README.md

- new line after heading
(https://github.com/home-assistant/operating-system/pull/768#discussion_r453337043)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update README.md

- \- for unordered lists
- new line after heading
(https://github.com/home-assistant/operating-system/pull/768#discussion_r453337101)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Update README.md

- new line after heading
- \- for unordered lists
(https://github.com/home-assistant/operating-system/pull/768#discussion_r453337183)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

* Spelling correction, to ensure /Dpcumentation/kernel.mdhas the correct spelling

* capitalisation

* using - for unordered lists

* Adding links to config files

* fixing links to _defconfig files

* fixing link for rpi0_w

* fixing link for rpi3_64 and rpi4_64

* making the ova README consistent with the others

* formmating

* fixing numbered list

* fixing indent for sub-bullets

* questions regarding Tinker S and OVA support

* resolving PR comment from fabaff

* resolving PR comment from fabaff

* https://github.com/home-assistant/operating-system/pull/769\#discussion_r456774209

* Changing uBoot to U-Boot (https://github.com/home-assistant/operating-system/pull/769#discussion_r456774290)

* s/boot sector/eMMC boot partition/ (See https://github.com/home-assistant/operating-system/pull/769#discussion_r456774329)

* As per comments here:
https://github.com/home-assistant/operating-system/pull/769#discussion_r456791491
https://github.com/home-assistant/operating-system/pull/769#discussion_r456791580

* HassOS is no longer the official name (https://github.com/home-assistant/operating-system/pull/769#discussion_r456791863)

* Should be Home Assistant Operating System (or OS) (see https://community.home-assistant.io/t/changing-the-home-assistant-brand/167500/16). See also commennts here https://github.com/home-assistant/operating-system/pull/769#discussion_r456793030, taken in to account along with previous comments about this paragraph.

* s/HassOS/Home Assistant Operating System/

* 8Gb Pi 4 will be supported soon (see comment https://github.com/home-assistant/operating-system/pull/769#discussion_r459768349)

* resolving conflict with main dev branch.

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
Co-authored-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-08-03 16:31:36 +02:00
Pascal Vizeli
50176a0e3b Add support for snapshots/restore on OS level (#801) 2020-08-03 16:28:08 +02:00
Pascal Vizeli
06e7ee7efb Change VM naming handling (#794) 2020-07-29 11:19:00 +02:00
Stefan Agner
e08bbd7047 Add ODROID-N2+ support (#793)
* Add ODROID-N2+ support

Add ODROID-N2+ support with the new SoC revision c. Extend the U-Boot
script: Assume ODROID-N2 if the SoC revision is "a" (there are only "a"
revision SoCs on ODROID N2) and assume N2+ otherwise.

Currently using overclock mode as proposed in the upstream kernel patches.

* Update hassos-hook.sh

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2020-07-29 11:06:01 +02:00
Pascal Vizeli
653bcbe3ae Add functionts for RPi to handle kernel options (#792) 2020-07-27 12:09:43 +02:00
Pascal Vizeli
3700516097 Show board info on startup & Cleanup unused functionality (#784)
* Show board info on startup & Cleanup unused functionality

* Add patch for get env

* move patch
2020-07-27 11:54:25 +02:00
Pascal Vizeli
3fe09a4e6a Bump version to 5.1 2020-07-24 12:27:02 +02:00
Pascal Vizeli
2b8dc1c913 Fix deployment questions 2020-07-24 12:20:08 +02:00
Pascal Vizeli
9f7a846d6b RaspberryPi: Update kernel 4.19.127 - cc39f1c9f82f6fe5a437836811d906c709e0661c 2020-07-24 10:17:10 +00:00
Pascal Vizeli
466225806e Linux: Update kernel 5.4.53 2020-07-24 10:15:39 +00:00
Pascal Vizeli
8e42ad5536 Cleanup boot files & Kenrel 5.7.10 (#782)
* Odroid: Update kernel 5.7.10

* Cleanup boot files

* Fix patches
2020-07-23 18:52:01 +02:00
Pascal Vizeli
39e78a1014 fix lint 2020-07-23 12:20:50 +02:00
Stefan Agner
cc4a6ebf96 Allow to execute commands using enter.sh directly (#781)
This is useful e.g. if one just wants to run a build.
2020-07-22 23:40:45 +02:00
Pascal Vizeli
4a3837374f Fix linter 2020-07-22 17:53:10 +02:00
Pascal Vizeli
f70067c570 Add update script (#780) 2020-07-21 18:06:07 +02:00
Brad Simmons
24b6463fbb Update network.md for bad NetworkManager.conf link (#779)
Corrected bad link for Gnome NetworkManager.conf
2020-07-19 14:20:37 -07:00
Stefan Agner
78152db78f Add boot from USB mass storage device support for RPi 4 (#746) (#776)
* Backport USB PCIe/XHCI patches to U-Boot 2020.07

Backport relevant patches required to make PCIe/USB XHCI work.

* Backport/integrate PCIe device tree changes from upstream Linux

U-Boot uses the device tree provided by upstream Linux. Make sure the
device tree has the relevant chanages to make VL805 USB controller
reset work.

* Document RPi 4 USB mass storage support (#746)
2020-07-19 13:59:10 +02:00
Stefan Agner
985f3b8e3d Bump RPi 64-bit to U-Boot 2020.07 release to fix RPi 4 8GB boot (#740) (#775)
Unfortunately builds for 32-bit seem to lead to freezes. Conservatively
only update to 2020.07 for 64-bit builds.

Co-authored-by: Malcolm Lashley <mlashley@gmail.com>

Co-authored-by: Malcolm Lashley <mlashley@gmail.com>
2020-07-18 23:32:19 +02:00
kdhoermann
245dc7603f Add sound card support to OVA. (#770)
* Add sound card support to OVA.

* Audio device support for all platforms
2020-07-15 19:06:18 +02:00
Simon Opelt
53bbc43ff3 Add NUC (10) support info (#766) 2020-07-08 13:33:07 +02:00
Simon Opelt
ad6ac0a770 add out-of-tree intel e1000e ethernet module (#765)
* add intel-e1000e net module for nuc (e.g. i219v)

* disable mainline E1000E

* fix hash case

* add e1000e module make opts

* add missing newline

* remove redundant MD5

* Update intel-e1000e.hash

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2020-07-06 13:46:00 +02:00
cogneato
de67752a46 Update datactl docs (#756)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
2020-07-05 11:58:42 +02:00
Pascal Vizeli
a5eb7ffc8e Fix tinker for 5.4.50 (#764) 2020-07-05 00:17:26 +02:00
Pascal Vizeli
b09e5b5688 Revert DTS rpi4 2020-07-03 07:38:38 +00:00
Sean Mooney
a4c65b3fd1 Update issue template (#760) 2020-07-02 15:09:36 -07:00
Pascal Vizeli
ec6f7978b5 cleanup patch 2020-07-02 13:22:09 +00:00
Pascal Vizeli
c9033551f2 Fix patch for 5.4.50 (#758) 2020-07-02 14:42:48 +02:00
Pascal Vizeli
375e688938 Update kernel 20200702 (#757)
* Odroid: Update kernel 5.7.7

* Linux: Update kernel 5.4.50

* RaspberryPi: Update kernel 4.19.127 - a03605b08ae73107100c72dc92c92adf0dde3e42

* Fix script

* Add bcm2711-rpi-cm4
2020-07-02 11:28:39 +02:00
Pascal Vizeli
9d6b3a1d0b Kernel improvments for Amlogic / Odroid (#747)
* Kernel improvments for Amlogic / Odroid

* Odroid: Update kernel 5.7.4

* Fix script

* include audio into kernel
2020-06-27 10:48:08 +02:00
thecode
43e4bc81d3 Add condition to run QEMU guest agent for QEMU hypervisor (#752)
The proposed changed is to run the qemu guest agent for QEMU hypervisor. QEMU hypervisor and KVM hypervisor are using the same guest agent.
systemd allow detecting the difference between the two hypervisors. The change is using OR trigger, meaning it will trigger if one of the "ConditionVirtualization" rules is true.
2020-06-27 10:47:28 +02:00
Pascal Vizeli
4bcba322ff Fix jitters during first update/boot (#742)
* Fix jitters during first update/boot

* Address comments

* fix lint
2020-06-15 14:48:58 +02:00
Pascal Vizeli
0991cc1c25 Fix version json name if image is missing (#741)
* Fix version json name if image is missing

* Update hassos-supervisor
2020-06-15 14:48:02 +02:00
Bram Kragten
83cbc37422 Add line about Raspberry Pi overlays (#736)
* Add line about Raspberry Pi overlays

* Update .github/ISSUE_TEMPLATE.md

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2020-06-11 13:20:21 +02:00
Bram Kragten
0909462d51 Add overlay message (#735) 2020-06-11 11:44:40 +02:00
Franck Nijhof
27fc2de146 Fix missing wmv namespace in ovf definition (#732) 2020-06-08 15:36:38 +02:00
Pascal Vizeli
be7228c7e6 Bump wireguard linux compat for RPi kernel 2020-06-06 22:54:26 +00:00
Pascal Vizeli
e51b1bd9eb Make odroid upstream again (#724)
* Make odroid upstream again

* Fix question

* Linux 5.7

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* Add patch

* Add DT sound

* fix build

* Fix kernel options

* working audio
2020-06-06 11:44:41 +02:00
Franck Nijhof
2706b4d866 Improve self healing capabilities of Supervisor service (#726)
* Improve self healing capabilities of Supervisor service

* Fixes shellcheck linter warnings
2020-06-05 23:28:05 +02:00
Franck Nijhof
83af2731a8 Fix Supervisor container name reference in hassos-supervisor service (#727) 2020-06-05 22:14:34 +02:00
Pascal Vizeli
f66fbda032 RaspberryPi move back to 4.19 Kernel (#723)
* RaspberryPi: Update kernel 4.19.126 - f6b3ac28f0a9137d4c24c0b8832e693bbd16f5b7

* RaspberryPi: Update firmware 7caead9416f64b2d33361c703fb243b8e157eba4

* Remove kernel for 5.4
2020-06-05 16:08:50 +02:00
Pascal Vizeli
d215e81fb1 Update kernel Upstream/RPi (#708)
* Linux: Update kernel 5.4.44

* RaspberryPi: Update kernel 5.4.42 - 3d1e5203531fd1791762f018538e670bf10f722c

* RaspberryPi: Update firmware f382cc150445b3ef07de941e4877a5890d665aa7
2020-06-03 13:36:26 +02:00
Pascal Vizeli
afe39c279b Fix RPi4 uart 2-5 (#706) 2020-06-02 23:32:49 +02:00
Pascal Vizeli
ee13d1fb45 Add emergency Console (#705)
* Add emergency Console

* fix lint
2020-06-02 23:28:13 +02:00
Pascal Vizeli
917f022614 Fix issue with RPi2 armhf / armv7 2020-06-02 21:56:41 +02:00
Sergey Avdeev
fc68bce7d9 Update home-assistant.ovf (#696) 2020-06-02 10:56:30 +02:00
Adorem
0363ddab37 Update link to operating-system/debugging in configuration.md (#699) 2020-05-30 11:23:35 +02:00
Adorem
f18345a6c4 Update link to partition.md (#698) 2020-05-30 11:23:05 +02:00
Pascal Vizeli
8b13cfd902 RaspberryPi: Update firmware 62fc8c01165a80021054a430182b504f7b877c2d 2020-05-27 20:22:25 +00:00
Pascal Vizeli
16313059d9 RaspberryPi: Update kernel 5.4.42 - 5e5024f643caa53ff59a6e00f40a9b55f7fc4e17 2020-05-27 20:20:20 +00:00
Pascal Vizeli
deb072cb76 Linux: Update kernel 5.4.43 2020-05-27 20:17:42 +00:00
Pascal Vizeli
b206787520 Fix issue with mbr partition remove on MBR (#694) 2020-05-27 16:30:07 +02:00
Pascal Vizeli
0db61e85b0 Fix issue with Odroid-N2 on USB (#693) 2020-05-27 15:54:44 +02:00
Pascal Vizeli
c3fba76142 Use odroid defconfig for XU4 (#690) 2020-05-27 11:01:28 +02:00
Pascal Vizeli
7fc9c7d03b Fix build issues with gcc (#685)
* Fix build issues with gcc

* fix qemu
2020-05-26 08:02:53 +02:00
Pascal Vizeli
70c41b5690 Fix doc 2020-05-25 11:34:29 +00:00
Pascal Vizeli
68522d2062 Bump version to 5.0 2020-05-25 13:33:07 +02:00
Pascal Vizeli
3bb6442117 Mark stable release 2020-05-25 11:31:18 +00:00
Pascal Vizeli
2b3e806e56 Cleanup U-boot 2020-05-25 07:24:03 +00:00
Pascal Vizeli
a034fc9997 RaspberryPi: Update firmware a6c9b6b48ce86ef2527586a50760d52f1b33f642 2020-05-25 07:07:51 +00:00
Pascal Vizeli
4861cc58ce Linux: Update kernel 5.4.42 2020-05-25 07:06:32 +00:00
Pascal Vizeli
3160b59730 RaspberryPi: Update kernel 5.4.42 - 79495a5ecdfba69de51e88701a69c42d09806d84 2020-05-25 07:06:10 +00:00
Pascal Vizeli
032af2f56d Odroid: Update kernel 5.4.41 - 237731e3d2c145bd711bd1dcad0479c912b9fb4f 2020-05-25 07:05:20 +00:00
Pascal Vizeli
035e3884d8 Update Buildroot 2020.02.2 (#682)
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-05-20 17:32:11 +02:00
Pascal Vizeli
ce3c80641b cleanup-device (#681) 2020-05-19 21:29:57 +02:00
Pascal Vizeli
4eda8a1ff3 Wait until device is exists for moving data (#680)
* Wait until device is exists for moving data

* Update hassos-data

* Update hassos-data

* Update hassos-data
2020-05-19 15:21:08 +02:00
Pascal Vizeli
b410b70814 Update the old partition layout not just partial (#679) 2020-05-19 10:38:27 +02:00
Pascal Vizeli
eca72c9898 Fix vmware OS-Type for OVA (#677) 2020-05-18 11:43:45 +02:00
Fabian Affolter
71974edfd7 Update the README file (#666) 2020-05-14 09:27:11 +02:00
Fabian Affolter
613604ea74 Update style and static IPv4 address section (#667) 2020-05-14 09:25:31 +02:00
Fabian Affolter
6c62029a74 Fix typos (#668) 2020-05-14 09:21:53 +02:00
Fabian Affolter
a5209dc400 Fix typo and style (#669) 2020-05-14 09:17:04 +02:00
Fabian Affolter
1118335b1c Fix some typos and use the upstream project's spelling (#670) 2020-05-14 09:16:22 +02:00
Fabian Affolter
f96163f04e Keep the packages sorted and one per line (as above) (#672) 2020-05-14 08:54:18 +02:00
Fabian Affolter
b0dbbf963c Update spelling (#671) 2020-05-14 01:02:35 +02:00
Pascal Vizeli
a38bf6e75a Fix issue with loop devices (#659)
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-05-08 10:21:40 +02:00
Pascal Vizeli
0d892dbf23 Remove wrong support on the docs for Tinker S (#658) 2020-05-08 09:38:48 +02:00
Pascal Vizeli
a403b790f7 Update docker proxy (#657) 2020-05-07 22:55:37 +02:00
Pascal Vizeli
43aa64bb86 Add CRDA packages (#656)
* Add CRDA packages

* add ova too
2020-05-07 10:38:00 +02:00
Pascal Vizeli
ba17e542c5 Fix nl80211 crda errors (#655) 2020-05-07 09:48:07 +02:00
Pascal Vizeli
73dedf35de Bump version 4.7 2020-05-06 11:51:10 +02:00
Pascal Vizeli
96c622b36f Update deployment.md 2020-05-06 11:50:19 +02:00
Pascal Vizeli
698f2bb7d4 Move to staging 2020-05-06 09:42:39 +00:00
Pascal Vizeli
be39da4855 RaspberryPi: Update firmware 7eff9f6774bb43bfd61e749a0b45ffddc98c2311 2020-05-06 09:41:24 +00:00
Pascal Vizeli
b14d0223c2 Linux: Update kernel 5.4.39 2020-05-06 09:35:40 +00:00
Pascal Vizeli
fcfd951f2b RaspberryPi: Update kernel 5.4.38 - c41ae7cf543c1d680b4ac1afae40ca5bb0a96661 2020-05-06 09:35:18 +00:00
Pascal Vizeli
fcefb1e515 expand 2020-05-06 08:33:48 +00:00
Pascal Vizeli
3070b52a3e fix spell 2020-05-06 08:29:26 +00:00
Pascal Vizeli
37639fc3ff cleanup badge 2020-05-06 08:27:59 +00:00
Pascal Vizeli
770bcb62a0 Update docs 2020-05-06 08:26:44 +00:00
Pascal Vizeli
b3530d1ce1 Allow easy move data partition (#651)
* Allow easy move data partition

* Cleanup handling systemd

* Improve handling

* fix pipeline

* pipeline

* fix shell handling

* fix scripts

* Add bin folder

* fix lint

* Fix service handling

* Fix loading

* hide output

* Fix handling
2020-05-06 00:00:28 +02:00
Pascal Vizeli
ba9d1bac1e Use older Kernel for N2 (#652)
* Use older Kernel for N2

* Update docs

* Update kernel-amlogic.config
2020-05-05 14:23:17 +02:00
Pascal Vizeli
db184bf5d3 Make machine-id persist (#649)
* Make machine-id persist

* update

* Adjustments

* cleanup

* fix cleanups

* small cleanup
2020-05-04 15:11:43 +02:00
Pascal Vizeli
15a80bb405 Odroid N2 - update boot firmware (#647) 2020-04-30 17:09:30 +02:00
Pascal Vizeli
f0b5be41fe Bugfix qemu agent 4.2.0 (#646) 2020-04-29 22:09:47 +02:00
Pascal Vizeli
517abe0ea9 Check keyring of ota update file (#645) 2020-04-29 14:49:32 +02:00
Pascal Vizeli
ca90fa515d Bump version 4.6 2020-04-29 12:43:10 +02:00
Pascal Vizeli
6605b1511f Kernel updates (#643)
* Odroid: Update kernel 5.35 - f2eb401e73e9b54432cf4234722cb4fad1b334f2

* RaspberryPi: Update kernel 5.4.35 - 9a583229eff3263202522945a594a9115d49fcc6

* Odroid: Update kernel 5.4.35 - f2eb401e73e9b54432cf4234722cb4fad1b334f2

* Fix script

* RaspberryPi: Update firmware 2b731476edc463f2d6b3d751cb47c515b4b5853f

* Add script for rpi update

* RaspberryPi: Update firmware 2b731476edc463f2d6b3d751cb47c515b4b5853f

* fix script
2020-04-29 11:16:38 +02:00
Pascal Vizeli
f8b24f4b70 Make odroid downstream (#642)
* Make odroid downstream

* Fix patch

* Fix config

* audio support exynos

* Cleanup scripts

* Fix commit message

* clean options

* Extend options

* Cleanup
2020-04-28 22:23:08 +02:00
Pascal Vizeli
ada03f6736 Update qemu guest agent 4.2.0 (#639) 2020-04-26 12:33:54 +02:00
Pascal Vizeli
04e679798a Fix workstation avahi handling & add NSS mdns to host (#638)
* Fix workstation avahi handling & add NSS mdns to host

* disable avahi daemon on internal
2020-04-26 11:19:28 +02:00
Pascal Vizeli
6a49aa1c2b Create OVA file from release (#636)
* Create OVA file from release

* Fix name & add boot flag

* revert name

* style cleanup

* Fix script

* Add cleanup
2020-04-26 01:09:51 +02:00
Pascal Vizeli
34b7bbd68d New approach for uboot and rpi 5.4 (#635)
* New approach for uboot and rpi 5.4

* fix dts

* Update firmware to next
2020-04-25 11:17:03 +02:00
Pascal Vizeli
c0d8e14c2a Rpi update (#633)
* RaspberryPi: Update kernel 9daf4531948808f4a1913e6767fae6f421fb7896

* Update firmware
2020-04-24 18:28:08 +02:00
Pascal Vizeli
c017b43456 Tinker linux5.4 (#632)
* Migrate Tinker to linux 5.4

* Update bootloader
2020-04-24 15:12:57 +02:00
Pascal Vizeli
98f13d9282 RPi 5.4 (#631)
* RaspberryPi: Update kernel 68fd7d52c9fc7c40b996d6b91acaf3e03b2c3ea0

* update kernel config

* update bootloader

* Fix boot

* work

* fix boot

* Fix script

* optimize script
2020-04-23 23:05:28 +02:00
Pascal Vizeli
5ef1e83197 Update apparmor 2.13.4 (#630) 2020-04-22 22:54:58 +02:00
Pascal Vizeli
4df2ab6013 Use default CloudFlare anycast time service (#629) 2020-04-21 14:41:13 +02:00
Pascal Vizeli
45c62716cb New way to install/run supervisor + plugins (#620)
* Use new layout for CLI/Supervisor

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* Fix install script

* Fix config

* Add docs

* Fix shellcheck

* Fix issue

* rename package

* Fix build

* Fix apparmor
2020-04-21 14:37:25 +02:00
Pascal Vizeli
48f3045854 Support NVMe & update barebox (#626)
* Support NVMe & Update barebox

* same for ova
2020-04-19 01:33:45 +02:00
Pascal Vizeli
3281cbd365 Optimize GCC9 & busybox (#623)
* Optimize GCC9 & busybox

* Move to o2 for stable

* fix shell issue
2020-04-17 14:44:34 +02:00
Pascal Vizeli
5a6678147e Update buildroot 2020.02.01 (#622)
* Update buildroot 2020.02.01

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* Fix LN

* Fix wpa

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* Fix lint

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* fix-network

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* Fix script

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2020-04-16 20:03:01 +02:00
Pascal Vizeli
0c2b5aff65 Update azure-pipelines-release.yml 2020-04-15 16:21:55 +02:00
Pascal Vizeli
9dca4fc837 Update enter.sh 2020-04-15 16:08:16 +02:00
Pascal Vizeli
fff08c6101 Fix script 2020-04-15 14:06:39 +00:00
Pascal Vizeli
1022053aef Fix enter script & permission 2020-04-15 11:55:53 +00:00
Pascal Vizeli
0629c58d31 Update azure-pipelines-release.yml for Azure Pipelines 2020-04-15 12:37:36 +02:00
Pascal Vizeli
bc2afe33b0 Update rpi kernel/firmware (#621)
* RaspberryPi: Update kernel 2e79fd01b4b9a7eea5acb234ad4e4cdca8449d5a

* Update rpi firmware & kernel
2020-04-15 11:52:11 +02:00
Pascal Vizeli
2c963fcd05 Add dbus config for pulseaudio (#619) 2020-04-03 14:53:42 +02:00
lucagiove
d4a403b640 Fixed bluetooth-bcm43xx build (#616)
Brutally added patch command after download.

> I'm not a buildroot expert but the best way seemed to move the
> upstream btuart download in a PRE_PATCH_HOOK so that standard
> buildroot way of patching can be applied.

I've been finally able to test it and the PRE_PATCH_HOOK does not work
seems it's never triggered.
I tried also th POST_RSYNC_HOOK that works but still patch is not
applied.
I think that patch is not detected (odd, patch naming seems complient)
or since source code is not downloaded buildroot thinks that patch is
not needed, couldn't sort it out.
2020-04-03 10:27:55 +02:00
Perry Naseck
89cb68f7b7 Add USB video kernel support (#609)
* Add USB video kernel support for intel_nuc

* Add USB video kernel support for all boards

* Support USB video capture devices only, not tuners
2020-04-03 10:26:06 +02:00
lucagiove
c371e45144 Attempt to fix bluetooth communication problem on rpi3b (#614)
This problem is referenced in many different issues, some of them:
Bluetooth: hci0: Frame reassembly failed (-84)
https://github.com/raspberrypi/firmware/issues/1150

Error communicating with local bluetooth adapter (RPi3)
https://github.com/home-assistant/core/issues/30147

Xiaomi BLE Temperature and Humidity sensor no longer working after update from 0.95.4 to .096.5
https://github.com/home-assistant/core/issues/25704

Xiaomi BLE Temperature and Humidity sensor
https://github.com/home-assistant/core/issues/24313#issuecomment-578554315

Solution seemed to reeduce the boud rate of the serial connection to BT
on rpi3b where flow control is missing.

The patch to the original btuart file is to reduce the baudrate only for
rpi3b models where flow control is missing:

-		$HCIATTACH /dev/serial1 bcm43xx 921600 noflow - $BDADDR
+		$HCIATTACH /dev/serial1 bcm43xx 460800 noflow - $BDADDR

I'm not a buildroot expert but the best way seemed to move the
upstream btuart download in a PRE_PATCH_HOOK so that standard
buildroot way of patching can be applied.
2020-03-31 11:03:14 +02:00
Pascal Vizeli
2e7e039899 Optimize SND kernel module handling (#606)
* Optimize SND kernel module handling

* Update alsa-base.conf

* Update alsa-base.conf
2020-03-10 10:28:45 +01:00
Pascal Vizeli
c6e01d3468 Bump version to 4.5 2020-03-07 14:08:39 +01:00
Pascal Vizeli
5336e17a06 Update Kernel 5.4.24 (#603) 2020-03-07 14:07:05 +01:00
Pascal Vizeli
a017fae49d OS: Update CLI 21 2020-03-07 11:13:34 +00:00
Pascal Vizeli
96d59c2a40 OS: Update supervisor 209 2020-03-07 11:13:30 +00:00
Pascal Vizeli
1f23c3ac72 Replace on upload 2020-03-06 11:59:02 +01:00
Pascal Vizeli
3f26a61d9a Update RaspberryPi Kernel & Firmware 4.19.106 (#601)
* RaspberryPi: Update kernel ecb440abef61d198478b6e598b3510ff6680090a

* Update RaspberryPi kernel 4.19.106
2020-03-05 16:33:48 +01:00
nepozs
6a728d916f Update nuc.md (#591) 2020-02-20 21:42:23 +01:00
Pascal Vizeli
7f0ab07752 Bump version to 4.4 2020-02-18 13:25:39 +01:00
Pascal Vizeli
7d7a52732d Fix supervisor name on cli config (#588) 2020-02-17 13:25:44 +01:00
Pascal Vizeli
2d6f692a4c Rename Hass.io (#587) 2020-02-17 09:53:09 +01:00
Pascal Vizeli
279a4c4db1 Change uptime for offline update (#585) 2020-02-16 11:46:41 +01:00
Pascal Vizeli
a65db13c9e Support better armv7 emulation N2/C2 (#584)
* Support better armv7 emulation N2/C2

* Update kernel.config
2020-02-16 11:46:25 +01:00
Pascal Vizeli
a592fc9866 Change handling for SPL based images (#578)
* Change handling for SPL based images

* Fix script

* Fix path for rauc-hook
2020-02-10 14:52:03 +01:00
Pascal Vizeli
66c1b016c9 Bump version to 4.3 2020-02-06 18:57:20 +01:00
Pascal Vizeli
f9a3bccf7b Update Kernel 5.4.18 (#572) 2020-02-06 18:40:30 +01:00
Pascal Vizeli
1c95022184 Add support for audio & thermal & small FTD fixes (#571) 2020-02-06 18:36:44 +01:00
Pascal Vizeli
d4deca66b2 OS: Update CLI 16 2020-02-06 13:40:17 +00:00
Pascal Vizeli
1c2ef541ea OS: Update supervisor 199 2020-02-06 13:39:50 +00:00
Jason Hines
55d84758a2 Update bluetooth.md (#569)
grammatical changes
2020-02-06 08:27:22 +01:00
Pascal Vizeli
82010866b1 Bump version to 4.2 2020-02-05 16:58:30 +01:00
Pascal Vizeli
294ad6cd58 Merge branch 'master' into dev 2020-02-05 16:29:11 +01:00
Pascal Vizeli
bfdedbffe6 Support usb audio all (#566)
* Add support for SND USB audio over all

* Cleanup
2020-02-05 16:25:58 +01:00
Pascal Vizeli
d409e328be Add CEC & audo support for odroid C2/N2 (#565) 2020-02-05 16:16:22 +01:00
Etzion Bar-Noy
a6ae25da06 BT support for all platforms (#563)
* Update azure-pipelines-release.yml for Azure Pipelines

* Update azure-pipelines-release.yml for Azure Pipelines

* Update azure-pipelines-release.yml for Azure Pipelines

* Fix double LINUX_HEADERS

* Add support for TI USB 3410 or 5052 serial devices (#542)

* Added BT support to device-support.conf file, and removed BT support from kernel.config file

* Removed BT support, as it was moved to device-support.config file

* Added new line at the end of the file

* Changed:
CONFIG_BT_HCIBTUSB from 'm' to 'y'
CONFIG_BT_HCIBTUSB_BCM from 'y' to 'm'
CONFIG_BT_HCIBTUSB_RTL from 'y' to 'm'

* Update device-support.config

Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
2020-02-04 18:03:51 +01:00
Pascal Vizeli
bc1266a44b [skip ci] Change group 2020-02-03 14:30:37 +01:00
Pascal Vizeli
c1eb0ac4cd Update docker 19.03.5 on builder (#561) 2020-02-03 12:12:07 +01:00
Pascal Vizeli
9939422d10 Add more SND audio codec modules (#560)
* Add more SND audio codec modules

* Update kernel.config
2020-02-03 11:06:35 +01:00
Pascal Vizeli
51cf310472 Fix odroid issues (#556)
* Adjust kernel for C2/N2 & Kenrel 5.4.16

* Update docs

* Add script to fix mac with efuse

* Fix script

* update description

* Fix script

* Use u-boot patch

* Fix patch
2020-02-01 21:57:20 +01:00
Pascal Vizeli
f38a31eee3 Update README.md 2020-01-17 13:20:18 +01:00
Pascal Vizeli
e388662422 Add support for TI USB 3410 or 5052 serial devices (#542) 2020-01-13 14:55:08 +00:00
Pascal Vizeli
0258ef641d Fix double LINUX_HEADERS 2020-01-13 14:54:57 +00:00
Pascal Vizeli
bf29dd3971 Fix double LINUX_HEADERS 2020-01-13 15:54:13 +01:00
Pascal Vizeli
7314ce1963 Add support for TI USB 3410 or 5052 serial devices (#542) 2020-01-13 15:36:56 +01:00
Pascal Vizeli
70d69d3518 Bump version 4.1 2020-01-13 15:09:24 +01:00
Pascal Vizeli
574c883207 Merge pull request #540 from home-assistant/dev
Release 4.0
2020-01-13 15:02:39 +01:00
Pascal Vizeli
5812ed014e Default Kernel 5.4 (#541) 2020-01-13 15:02:21 +01:00
Pascal Vizeli
13e4578b7a Migrate Buildroot 2019.02.9 (#539) 2020-01-13 14:47:52 +01:00
Pascal Vizeli
d6a700565e Update RPI firmware (#537) 2020-01-12 11:03:59 +01:00
Pascal Vizeli
d9d8c96c70 Add CONFIG_VIRT_DRIVERS to ova (#536) 2020-01-12 10:21:10 +01:00
Pascal Vizeli
329caf6c1c Cleanup 2020-01-11 16:52:26 +00:00
Pascal Vizeli
27ee3ef98f VirtIO MMIO kernel module (#534)
* VirtIO MMIO kernel module

* Update kernel.config

* Update kernel.config
2020-01-11 11:50:28 +01:00
Pascal Vizeli
63967cf6c0 Buildroot 2019.02.8 (#533)
* Update Buildroot 2019.02.8

* Update patches
2020-01-11 11:24:41 +01:00
Pascal Vizeli
a874bb5fb5 RaspberryPi update stable u-boot / Kernel + Firmware (#532)
* RaspberryPi: Update kernel b4180819d3a119c56133d6a2d8301775bf6c60bb

* Update kernel docs

* Update firmware
2020-01-10 14:16:32 +01:00
Pascal Vizeli
dc4ee61809 Remove orangepi (#531) 2020-01-09 23:16:03 +01:00
Pascal Vizeli
febc4473d3 New supervisor / Adjust rauc handling (#530)
* OS: Update supervisor 194

* Remove old rauc mark code

* OS: Update supervisor 195

* Adjust dockerd
2020-01-09 23:02:46 +01:00
Pascal Vizeli
7b379e648c Initial support Odroid N2 / Linux 5.4 (#523)
* Initial version Odroid N2

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* fix some issue

* optimize

* cleanup kernel config

* Fix HDMI output

* Migrate to upstream u-boot

* Use own HA image

* Add kernel for odroid xu4

* Add N2 to release pipeline

* Use uboot 2020.01 / fix version hardkernel

* Fix image
2020-01-07 18:13:24 +01:00
Pascal Vizeli
e4bff62923 Create ISSUE_TEMPLATE.md 2019-12-18 10:27:09 +01:00
Pascal Vizeli
3839e43428 OS: Update supervisor 193 2019-12-13 16:14:08 +00:00
Pascal Vizeli
9e8cccdf82 OS: Update CLI 15 2019-12-13 16:13:49 +00:00
Pascal Vizeli
f87032c302 Some cleanups (#511) 2019-12-13 15:48:22 +01:00
Pascal Vizeli
30aa775450 Fix Kernel For odroid XU4/C2 (#510) 2019-12-13 09:13:41 +01:00
Pascal Vizeli
308fccd7b1 Kernel updates 4.19.88 (#509)
* Update kernel 4.19.88

* Fix asus
2019-12-12 12:28:31 +01:00
Franck Nijhof
6e7bbdbe63 Fix auto expand disk for GPT (#508) 2019-12-12 12:12:49 +01:00
Pascal Vizeli
4c9a4aadc8 Add qemu guest agent (#505)
* Add qemu guest agent

* Fix make file

* Fix targets

* Convert it to autobuild

* Fix paths

* fix target

* Fix options

* Fix startup

* Update kernel

* Fix state dir

* Only load on kvm
2019-12-12 10:44:41 +01:00
Pascal Vizeli
d340e79bea Fix RPI issues with u-boot / firmware (#503)
* Fix RPI issues with u-boot / firmware

* Cleanup bluetooth handling

* Use RC4 for u-boot on rpi4
2019-12-10 19:07:16 +01:00
Pascal Vizeli
09cf67cb73 RaspberryPi: Update kernel 988cc7beacc150756c3fbe40646afcf8438b741b 2019-12-10 09:14:09 +00:00
Pascal Vizeli
0ef7c459ca Fix RPI bluetooth issues (#502)
* Fix RPI bluetooth issues

* Add to buildroot
2019-12-10 10:13:08 +01:00
Pascal Vizeli
bf9795f70b Update RPI firmware (#501)
* Update RPI firmware

* Update buildroot
2019-12-10 10:10:59 +01:00
Robin Harmsen
712dcf9f74 Update azure-pipelines-ci.yml (#486) 2019-10-03 12:16:30 +02:00
Robin Harmsen
c42dba1623 Update azure-pipelines-release.yml (#487) 2019-10-03 12:16:13 +02:00
Oscar Calvo
d44d271c28 Add support for SMS integrations with USB/GSM modem dongles (#485)
* Add support for USB/GSM modem dongles

* Apply PR feedback
2019-09-30 22:57:45 +02:00
mbo18
501b4bd9f4 Update network.md (#446)
* Update network.md

Solve https://community.home-assistant.io/t/setting-a-static-ip-on-hassio-hassos/63378

* Update network.md

Forgot to update the text
2019-09-26 11:29:54 +02:00
capstan1
2fd14442c7 new subheading 'configure network' (#443)
added a new subheading to make clear what the page is about
2019-09-26 11:16:14 +02:00
capstan1
4efd038805 make clear the usb drive needs to be connected only while configuration (#442) 2019-09-26 11:15:18 +02:00
Pascal Vizeli
3e1adf8325 Delete build.md 2019-09-25 23:03:14 +02:00
Pascal Vizeli
60e4d1a3cd Don't hang on serial interupts (#483) 2019-09-23 09:11:45 +02:00
Pascal Vizeli
a13089516e Bump version 4.0 / development 2019-09-13 14:15:47 +02:00
Pascal Vizeli
2e3e518982 Merge branch 'dev' of https://github.com/home-assistant/hassos into dev 2019-09-13 12:13:32 +00:00
Pascal Vizeli
c12ae11ed7 OS: Update supervisor 187 2019-09-13 12:13:28 +00:00
Pascal Vizeli
956badb2fd Change to RC 2019-09-13 14:11:53 +02:00
Pascal Vizeli
e71400cd5c Fix handling with FB on RPi4 (#477) 2019-09-13 14:08:47 +02:00
Pascal Vizeli
6668d77b93 Fix rpi firmware checksum 2019-09-12 15:57:15 +00:00
Pascal Vizeli
629f13f3d9 Update kernels to 4.19.72 (#476) 2019-09-12 16:45:44 +02:00
Pascal Vizeli
dfe261a715 rpi-update-firmware (#475) 2019-09-12 16:34:12 +02:00
Pascal Vizeli
756a0c9b13 RaspberryPi: Update kernel bd3452c84c206a171fa4cf5f6ddfab5687667228 2019-09-12 14:20:36 +00:00
Pascal Vizeli
49948b577e Remove ModemManager (#474) 2019-09-12 16:11:36 +02:00
Pascal Vizeli
61516914ce Fix screen issue with RPi4 (#472) 2019-09-09 17:10:28 +02:00
Moshe Levi
c424b295b1 create cache dir if not exist (#471)
Signed-off-by: Moshe Levi <moshele@mellanox.com>
2019-09-09 16:06:53 +02:00
Pascal Vizeli
c37d0ecd76 Bump version 3.5 2019-08-28 15:55:12 +02:00
Pascal Vizeli
37615a135b Merge pull request #460 from home-assistant/dev
Release 3.4
2019-08-28 15:54:47 +02:00
Pascal Vizeli
abf9a3b7c3 OS: Update supervisor 184 2019-08-28 13:53:54 +00:00
Pascal Vizeli
c87ac63e9b Update Some Boards to 4.19.68 2019-08-28 13:52:51 +00:00
Pascal Vizeli
28d262eecd Add simple fb for 64bit 2019-08-28 13:16:50 +00:00
Pascal Vizeli
d1d3593d65 Fix boot (#459)
* Fix permission check

* Remove fails on copy

* Disable FB_BCM2708

* Don't touch the memory map from first stage

* bootcode.bin is not needed on rpi4
2019-08-28 10:32:46 +02:00
Pascal Vizeli
9f06ffbbd5 Rpi update (#457)
* RaspberryPi: Update kernel 64f2b1b0a728a13373f9c74c6247ecf17af2caef

* Update documentation & Script

* Update firmware

* Update bluetooth firmware

* Update wifi driver
2019-08-24 14:57:16 +02:00
Pascal Vizeli
b963b1a587 Build: update script to do also commits 2019-08-23 15:39:09 +00:00
Pascal Vizeli
998c8365c0 OS: Update CLI 14 2019-08-23 15:38:29 +00:00
Pascal Vizeli
70e43c02fb OS: Update supervisor 183 2019-08-23 15:37:39 +00:00
Ryan Bray
fed40532c1 rpi: Add USB boot support (#440) 2019-07-23 14:28:22 +02:00
Alexey Pristavkin
08fac89fb0 Note that disk controller must be SATA not SCSI. (#424)
The image hang on startup on the SCSI controller, which is the default controller type for custom VMs in VMWare Fusion.
2019-07-22 16:49:39 +02:00
Pascal Vizeli
e7da2e0779 Fix defconfig name for rpi zero (#436) 2019-07-17 22:07:25 +02:00
Pascal Vizeli
3d999f8936 Update release-drafter.yml 2019-07-16 14:23:28 +02:00
Pascal Vizeli
b26d4bbb40 Pump version 3.4 2019-07-16 14:18:43 +02:00
Pascal Vizeli
e5734a9024 Merge pull request #432 from home-assistant/dev
Release 3.3
2019-07-16 14:18:13 +02:00
Pascal Vizeli
8c691e8e56 Update Hass.io Supervisor (#431) 2019-07-16 13:47:03 +02:00
Pascal Vizeli
14d91e094a RaspberryPi 4 (#428)
* RaspberryPi4 support

* Update kernel file

* Fix lint

* Fix uboot defconfig

* Update firmware for rpi4

* fix naming

* Add support for 64bit

* fix path for dts
2019-07-16 09:44:29 +02:00
Pascal Vizeli
2f40d76b6f Update bootloader RPi (#427) 2019-07-15 15:47:54 +02:00
Pascal Vizeli
219e9ca1ef Raspberry Pi Firmware/Kernel update (#426)
* Raspberry Pi Firmware/Kernel update

* Fix checksum

* Update Kernel doc
2019-07-15 14:44:22 +02:00
Ryan Bray
f3f9bd9697 Odroid xu4 updates (#425)
* Odroid-XU4: Attempt to fix some eMMC devices

* Linux-firmware: add s5p to buildroot

* Odroid-XU4: fix uboot env size
2019-07-15 09:24:43 +02:00
Franck Nijhof
2e205cafd3 Merge pull request #423 from rbrenton/patch-1
Update ova.md
2019-07-13 15:59:16 +02:00
Franck Nijhof
4d7e0977ac ✏️ More improvements 2019-07-13 15:38:59 +02:00
Brenton
0f93fcc477 Update ova.md
I had issues with "Other Linux (64-bit)", and "Other 4.x or later Linux (64-bit)" appears to be the correct choice.
2019-07-08 18:41:03 -04:00
Pascal Vizeli
fa6f7ac74d Fix build error raspberry pi3 2019-06-30 23:29:34 +02:00
Pascal Vizeli
081f7124d7 Update azure-pipelines-release.yml for Azure Pipelines 2019-06-28 11:17:25 +00:00
Pascal Vizeli
2caaf89186 Update azure-pipelines-release.yml for Azure Pipelines 2019-06-28 13:16:49 +02:00
Pascal Vizeli
5a612922f3 Update azure-pipelines-release.yml for Azure Pipelines 2019-06-28 11:10:51 +00:00
Pascal Vizeli
9f584f2c6a Update azure-pipelines-release.yml for Azure Pipelines 2019-06-28 13:10:31 +02:00
Pascal Vizeli
ee4b3a101e Update azure-pipelines-release.yml for Azure Pipelines 2019-06-28 11:09:32 +00:00
Pascal Vizeli
a04fa47883 Update azure-pipelines-release.yml for Azure Pipelines 2019-06-28 13:08:06 +02:00
Pascal Vizeli
efc61a57d9 Bump version 3.3 2019-06-28 12:17:17 +02:00
Pascal Vizeli
1e627fed34 Merge pull request #420 from home-assistant/dev
Release 3.2
2019-06-28 12:16:42 +02:00
Pascal Vizeli
20afea35d9 Update kernel patch for 4.19 (#419) 2019-06-28 10:35:20 +02:00
Pascal Vizeli
db8127c253 Update kernel 4.19.56 (#418) 2019-06-27 22:32:57 +02:00
Pascal Vizeli
e03ea97133 Cleanup host linux header pinning (#417)
* Cleanup host linux header pinning

* Update intel_nuc_defconfig
2019-06-27 22:26:29 +02:00
Pascal Vizeli
3d858e3bb6 Create azure-pipelines-release.yml 2019-06-27 18:05:36 +02:00
Pascal Vizeli
a0cba05830 Update and rename azure-pipelines.yml to azure-pipelines-ci.yml 2019-06-27 18:04:20 +02:00
Pascal Vizeli
868935f8a0 Update azure-pipelines.yml for Azure Pipelines 2019-06-27 17:11:36 +02:00
Pascal Vizeli
6581ec4028 Update Supervisor 167 (#416) 2019-06-27 16:32:19 +02:00
Pascal Vizeli
41d3f59002 Update Buildroot to 2019.02.3 (#415)
* Update Buildroot to 2019-02.3

* Fix enter script

* Update ova_defconfig

* Fix network manager

* Remove runc patches

* Use same docker version

* Fix build

* Fix vmtools

* Fix depens

* Fix handling with tempfiles

* Fix permission handling

* Fix cp

* Cleanup

* Fix mounts
2019-06-27 11:58:50 +02:00
Fabio Fantoni
bb201fb842 Add cifs support (#408)
* Add cifs support in hassos kernel

This make possible mount remote smb share in addons (if they have cifs-utils)

* Update hassos.config
2019-05-19 11:22:02 +02:00
Pascal Vizeli
a55aaf7f38 Update azure-pipelines.yml for Azure Pipelines 2019-05-15 14:36:22 +02:00
Piotr Witek
edcca58e38 ID parameter in file have to be the same as name of file (#400) 2019-05-15 13:55:05 +02:00
Pascal Vizeli
d1c2715402 Update azure-pipelines.yml for Azure Pipelines 2019-05-14 23:34:02 +02:00
Pascal Vizeli
1febb31647 Lint hostapp.sh and robust umount (#406)
* Lint hostapp.sh and robust umount

* Update hostapp.sh

* Update Dockerfile

* Update Dockerfile

* Update hassos.mk

* Update hostapp.sh

* Update Dockerfile

* Update hassos.mk

* Update hostapp.sh

* Update hdd-image.sh

* Update entry.sh
2019-05-14 23:22:48 +02:00
Pascal Vizeli
d5e6cc78d5 Update azure-pipelines.yml for Azure Pipelines 2019-05-14 01:23:58 +02:00
Pascal Vizeli
e8d14bdc60 Support build as user (#405)
* Support build as user

* Update enter.sh

* Update Dockerfile

* Update enter.sh

* Update entry.sh
2019-05-14 01:16:40 +02:00
Pascal Vizeli
5f1fadad29 Update azure-pipelines.yml for Azure Pipelines 2019-05-14 01:14:17 +02:00
Pascal Vizeli
5c38357ba6 Update HassOS App to use alpine 3.9 (#404) 2019-05-14 00:52:23 +02:00
Pascal Vizeli
27aa12911d Update azure-pipelines.yml 2019-05-13 23:31:52 +02:00
Pascal Vizeli
c662ef86d7 Update azure-pipelines.yml for Azure Pipelines 2019-05-13 22:33:54 +02:00
Pascal Vizeli
450a8295f7 Delete ghr 2019-05-13 22:08:24 +02:00
Pascal Vizeli
a13e7ad3e1 Update azure-pipelines.yml for Azure Pipelines 2019-05-13 22:07:59 +02:00
Pascal Vizeli
3077b9423d Update azure-pipelines.yml for Azure Pipelines 2019-05-13 21:53:47 +02:00
Pascal Vizeli
6204b3d165 Update azure-pipelines.yml 2019-05-13 21:31:43 +02:00
Pascal Vizeli
1624e26447 Update azure-pipelines.yml 2019-05-13 21:23:59 +02:00
Pascal Vizeli
cec027a6e6 Update azure-pipelines.yml 2019-05-13 18:48:28 +02:00
Pascal Vizeli
d347532c96 Change docker entry point script to allow additional commands (#403)
* Change docker entry point script to allow additional commands

* Delete Dockerfile
2019-05-13 17:43:11 +02:00
Pascal Vizeli
d9c2347e7c Update azure-pipelines.yml for Azure Pipelines 2019-05-13 10:38:43 +02:00
Pascal Vizeli
2e7c93428d Update azure-pipelines.yml for Azure Pipelines 2019-05-13 10:27:29 +02:00
Pascal Vizeli
4455e9a907 Update azure-pipelines.yml for Azure Pipelines 2019-05-13 08:50:10 +02:00
Pascal Vizeli
5d16ac24c3 Update azure-pipelines.yml for Azure Pipelines 2019-05-13 08:33:05 +02:00
Pascal Vizeli
f715486c58 Update azure-pipelines.yml for Azure Pipelines 2019-05-12 23:18:38 +02:00
Pascal Vizeli
7c77a692ce Update azure-pipelines.yml for Azure Pipelines 2019-05-12 23:13:54 +02:00
Pascal Vizeli
ac5121f067 Update azure-pipelines.yml for Azure Pipelines 2019-05-12 23:07:23 +02:00
Pascal Vizeli
e34b01755e Update azure-pipelines.yml for Azure Pipelines 2019-05-12 23:03:55 +02:00
Pascal Vizeli
5971ee1a46 Update Dockerfile 2019-05-12 22:57:52 +02:00
Pascal Vizeli
6bda70a451 Update azure-pipelines.yml for Azure Pipelines 2019-05-12 22:57:04 +02:00
Pascal Vizeli
9a9e2cc5df Update azure-pipelines.yml for Azure Pipelines 2019-05-12 22:53:15 +02:00
Pascal Vizeli
3dbe3e9ea7 Update azure-pipelines.yml for Azure Pipelines 2019-05-12 22:44:50 +02:00
Pascal Vizeli
3ad7dc3714 Update azure-pipelines.yml for Azure Pipelines 2019-05-12 22:35:50 +02:00
Pascal Vizeli
1a3bcf6486 Update azure-pipelines.yml for Azure Pipelines 2019-05-12 22:33:18 +02:00
Pascal Vizeli
6ddbfabfae Update azure-pipelines.yml for Azure Pipelines 2019-05-12 22:22:11 +02:00
Pascal Vizeli
c72e61e542 Update Dockerfile 2019-05-12 22:10:56 +02:00
Pascal Vizeli
f8081d7829 Create Dockerfile 2019-05-12 22:10:19 +02:00
Pascal Vizeli
27c25da90d Update azure-pipelines.yml for Azure Pipelines 2019-05-12 21:49:13 +02:00
Pascal Vizeli
d47e169bd5 Update azure-pipelines.yml for Azure Pipelines 2019-05-12 21:46:36 +02:00
Pascal Vizeli
6510cf9619 Update azure-pipelines.yml for Azure Pipelines 2019-05-12 21:42:23 +02:00
Pascal Vizeli
1419e72dbc Update azure-pipelines.yml for Azure Pipelines 2019-05-12 21:41:36 +02:00
Pascal Vizeli
30448dbc5a Update azure-pipelines.yml for Azure Pipelines 2019-05-12 21:40:32 +02:00
Pascal Vizeli
85c82c4479 Update azure-pipelines.yml for Azure Pipelines 2019-05-12 21:37:25 +02:00
Pascal Vizeli
e21f59111c Update README.md 2019-05-12 19:08:31 +02:00
Pascal Vizeli
543075222e Bump version 3.2 2019-05-12 19:05:25 +02:00
Pascal Vizeli
661b39565f Merge pull request #402 from home-assistant/dev
Version 3.1
2019-05-12 18:47:08 +02:00
Pascal Vizeli
7439de3d25 Supervisor: update Hass.io to 163 2019-05-12 09:03:02 +00:00
Pascal Vizeli
c9f4879780 Update Hass.io cli to 11 2019-05-12 09:02:31 +00:00
Pascal Vizeli
60cf077e48 Update Dockerfile 2019-05-12 11:00:07 +02:00
Pascal Vizeli
06e65b5734 Update release-drafter.yml 2019-05-11 11:10:00 +02:00
Pascal Vizeli
ac70f1bfac Update release-drafter.yml 2019-05-11 11:01:47 +02:00
Pascal Vizeli
1fc912eaf9 Create release-drafter.yml 2019-05-11 10:59:36 +02:00
Pascal Vizeli
83a0981113 Update Dockerfile 2019-05-09 10:14:23 +02:00
Pascal Vizeli
79dc34c531 Update Dockerfile 2019-05-09 10:11:42 +02:00
Pascal Vizeli
6ca35fb1af Create .hadolint.yaml 2019-05-09 10:10:53 +02:00
Pascal Vizeli
e273883077 Update Dockerfile 2019-05-09 10:08:58 +02:00
Pascal Vizeli
0fb9102e69 Set up CI with Azure Pipelines
[skip ci]
2019-05-09 10:00:51 +02:00
Pascal Vizeli
9a4027e9d4 Delete main.workflow 2019-05-09 09:43:43 +02:00
Maël Kimmerlin
5e82060124 Adding /etc/modprobe.d folder for module configuration (#397)
* Add a /etc/modprobe.d folder

populated using a config USB stick with folder modprobe

* Add the documentation for the modprobe folder
2019-05-08 13:15:48 +02:00
TonyApuzzo
d861ecae6f Add PROCPS_NG package to enable portainer stats (#398)
portainer requires ability to run 'ps -e' which is not supported
by busybox's ps.

This fixes https://github.com/hassio-addons/addon-portainer/issues/3

Tested on odroid_xu4 target.
2019-05-07 18:15:18 +02:00
Jan
061ab0ed8a Added Vmware specific kernel modules to support paravirtualized drivers (#395)
This adds VMXNET3 support and the paravirtualized SCSI controller along with virtual sockets for the guest additions and memory ballooning so that unused memory can be shared with other Vmware guests. Tested on ESXi 6.5 and it works great.
2019-04-29 22:58:03 +02:00
Pascal Vizeli
722f27d3c8 Create stale.yml 2019-04-16 11:05:56 +02:00
Ryan Bray
57ec2bb25c Merge pull request #391 from home-assistant/rbray89-patch-1
Update odroid-xu4.md to add additional eMMC instruction
2019-04-05 09:09:51 -06:00
Ryan Bray
f0c38a20bc Update odroid-xu4.md 2019-04-05 09:05:30 -06:00
Ryan Bray
267b61405d Update odroid-xu4.md 2019-04-05 08:56:29 -06:00
Franck Nijhof
98b14be0f6 OS: Adds universal TUN/TAP kernel support (#390) 2019-04-05 12:12:22 +02:00
Pascal Vizeli
fa20ccdd94 OS: Enable systemd-coredump (#382) 2019-03-20 18:10:44 +01:00
Pascal Vizeli
454964877d Add support for privileged supervisor (#381) 2019-03-18 12:45:15 +01:00
Pascal Vizeli
16fcb84886 Update CLI v9 with armv7 (#379)
* Update CLI v9 with armv7

* Update rpi2_defconfig
2019-03-18 10:36:25 +01:00
Pascal Vizeli
1d40ffd4f9 OS: Fix boot problem (#370)
* OS: Fix boot problem

* Update var-lib-docker.mount

* Update var-lib-docker.mount

* Update var-lib-docker.mount
2019-03-18 09:53:22 +01:00
Pascal Vizeli
a21871f4af OS: Disable coredump (#365) 2019-02-22 21:24:58 +01:00
Pascal Vizeli
ba01ed951b Fix workflow (#363)
* Fix workflow

* Update rauc.sh

* Update rootfs-layer.sh

* Delete .travis.yml
2019-02-22 00:51:46 +01:00
Pascal Vizeli
7308bad953 Update main.workflow (#362) 2019-02-22 00:28:52 +01:00
Pascal Vizeli
9415e2c5d0 Bump version 3.1 2019-02-21 16:04:58 +01:00
Pascal Vizeli
aa392e78a6 Merge pull request #361 from home-assistant/dev
Release 3.0
2019-02-21 16:04:25 +01:00
Pascal Vizeli
2703ec31b9 Supervisor: update Hass.io to 144 2019-02-21 14:24:45 +00:00
Pascal Vizeli
8cd0ca2cfe Rpi: update kernel 4.14.98 42f1859 (#360)
* Rpi: update kernel 4.14.98

* Update kernel
2019-02-21 15:23:42 +01:00
Pascal Vizeli
c317941767 Fix cve-2019-5736 (#359)
* Fix CVE-2019-5736

* Fix cve-2019-5736
2019-02-21 12:07:59 +01:00
TonyApuzzo
d1cf8e0016 Odroid: Fix ring buffer errors by applying (#355) 2019-02-15 15:56:14 +01:00
Pascal Vizeli
188fbc340e OVA: update kernel 4.19.20 (#353)
* OVA: update kernel 4.19.20

* Update kernel.md
2019-02-11 11:16:15 +01:00
mbo18
5e8f910714 Documentation: Tinker eMMC 2019-02-10 23:35:21 +01:00
Pascal Vizeli
30b599acc6 Tinker: update kernel 4.19 (#349) 2019-02-09 11:45:13 +01:00
Pascal Vizeli
7b4be3b4f7 OS: change zram swap to 25% of available memory (#348) 2019-02-08 11:53:31 +01:00
Ryan Bray
662eda3c3b Update odroid-xu4.md
Fix bullets
2019-02-06 02:15:51 -07:00
Ryan Bray
aad41225f4 Create odroid-xu4.md 2019-02-06 02:12:47 -07:00
Pascal Vizeli
d697c4bc8e Odroid XU4: Use ondemand (#341) 2019-02-03 11:55:15 +01:00
Pascal Vizeli
2a2e97ddf9 Build: speedup uboot kernel load (#338) 2019-02-03 11:47:45 +01:00
Ryan Bray
32fe415515 OdroidC2: fix long-running ethernet issues (#337) 2019-01-31 09:03:29 +01:00
Pascal Vizeli
292e4b3515 OVA: update kernel 4.19.18 (#335) 2019-01-28 17:49:36 +01:00
Pascal Vizeli
1a337ab937 OVA: fix openvmtools load (#334) 2019-01-28 16:31:32 +01:00
Bryan Berg
43828c2555 Migrate from LABEL= to /dev/disk/by-label/* (#318) 2019-01-28 09:58:40 +01:00
Simon Holzmayer
73a875c263 Fix modules import from USB-Stick (#331) 2019-01-25 14:27:02 +01:00
Pascal Vizeli
c270ac5c9a Bump version 3.0 2019-01-18 00:12:30 +01:00
Pascal Vizeli
c37a6d4c8c Merge pull request #323 from home-assistant/dev
Prepare new release tree
2019-01-18 00:11:34 +01:00
Pascal Vizeli
d677e2d5b2 OS: update supervisor to version 142 2019-01-17 23:05:49 +00:00
Pascal Vizeli
2d44748080 OS: update cli to version 8 2019-01-17 23:05:18 +00:00
Pascal Vizeli
b959d9c805 OS: update AppArmor to 2.13.2 (#325) 2019-01-18 00:02:40 +01:00
Pascal Vizeli
5e9ba3bb7a OS: Add kernel support for wireguard (#324) 2019-01-17 21:49:52 +01:00
Ryan Bray
3d91ac2374 Odroid-C2: Updating to 4.19 kernel (#321)
* Odroid-C2: Updating to 4.19 kernel

* Fix and tested config.
2019-01-17 12:16:13 +01:00
Pascal Vizeli
b0f95fcaec Update deployment.md 2019-01-17 11:27:38 +01:00
Ryan Bray
fffa24ed1e Odroid-XU4: Initial commit (#303) 2019-01-17 11:02:47 +01:00
Jasper van der Neut - Stulen
07bec45d8a NUC: Enable bluetooth support (#320)
* NUC: Enable bluetooth support

Enable kernel support for the intel bt-wifi-combo devices and usb
bluetooth modules. This will make Bluetooth and Bluetooth LE device
trackers work.

* BUILD: Make bluetooth kernel config the same for all boards.

The defconfig for a board may include more drivers, but this
set should be enough to get device trackers working. BLE support
is also enabled.

* Revert "BUILD: Make bluetooth kernel config the same for all boards."

This reverts commit 58f9b7c651.
2019-01-14 23:55:35 +01:00
Jasper van der Neut - Stulen
5835b6a683 OS: Fix unmount of busy mounts (#319)
dhclient and systemd-journald will be running during shutdown and are
only killed in the final shutdown fase. Unmounting the directories
they use will fail. Use lazy unmouting to fix this.
2019-01-13 21:04:57 +01:00
Pascal Vizeli
2d870984e2 Merge pull request #312 from home-assistant/dev
Release 2.5
2019-01-09 22:23:28 +01:00
Alastair D'Silva
e858c774d2 Opi prime updates (#315)
* Backport support for Linux 4.19

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>

* OPI: Update Orange Pi Prime config to use Linux 4.19

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>

* OPI: Enable I2C0 on the Orange Pi Prime

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>

* OPI: Enable GPIO via sysfs

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>
2019-01-09 16:27:20 +01:00
Jasper van der Neut - Stulen
4aa07960d8 BUILD: Build with make (#306)
* Use a Makefile to configure,build or clean the images.

* Update docs

* Remove old build script.
2019-01-04 22:01:43 +01:00
Jasper van der Neut - Stulen
5fc32d2eb7 OS: Run ash as login shell, so $PATH is set correctly. (#305) 2019-01-04 22:00:03 +01:00
Pascal Vizeli
2be8aecfbd OS: Fix docker-init (#302) 2019-01-03 21:47:44 +01:00
Pascal Vizeli
e0e87141c6 Build: Enable LTO for GCC/Binutils (#301)
* Build: Enable LTO for GCC/Binutils

* Update odroid_c2_defconfig

* Update ova_defconfig

* Update rpi0_w_defconfig

* Update rpi2_defconfig

* Update rpi3_64_defconfig

* Update rpi3_defconfig

* Update rpi_defconfig

* Update tinker_defconfig
2019-01-01 15:46:33 +01:00
Pascal Vizeli
76553bf984 OPI: Fix kernel config path 2019-01-01 15:17:03 +01:00
Alastair D'Silva
96e7e57fc4 Add support for the Orange Pi Prime (#298)
* Add support for the Orange Pi Prime

Signed-off-by: Alastair D'Silva <alastair@d-silva.org>

* Update opi_prime_defconfig

* Delete kernel.config

* Update opi_prime_defconfig
2018-12-31 11:58:41 +01:00
Pascal Vizeli
26d427ef1d Update README.md 2018-12-31 11:18:22 +01:00
Pascal Vizeli
f7eb215016 Build: Update buildroot 2018-11.1 (#300)
* Build: Update buildroot 2018-11.1

* Add cli to image
2018-12-31 02:32:21 +01:00
Jasper van der Neut - Stulen
8810b0409c OS: Make use of hardware rng devices (#299) 2018-12-30 23:04:01 +01:00
Pascal Vizeli
5adc9d0080 Kernel: Add support for RFLink (#297) 2018-12-29 22:25:57 +01:00
Jasper van der Neut - Stulen
59dba51f38 OVA: Make image bootable from virtio disk (#296) 2018-12-29 18:24:02 +01:00
Jasper van der Neut - Stulen
f711123582 Documentation: Add for intel-nuc board (#295)
Documentation: Add for intel-nuc board
2018-12-28 22:38:50 +01:00
Pascal Vizeli
3cbe6c9816 Bump version to 2.5 2018-12-28 17:42:33 +01:00
Pascal Vizeli
a5aaf01042 Build: Split kernel files for maintaining (#294)
* Build: Split kernel files for maintaining

* Update hassos.config

* Update odroid_c2_defconfig

* Update ova_defconfig

* Update rpi0_w_defconfig

* Update rpi2_defconfig

* Update rpi3_64_defconfig

* Update rpi_defconfig

* Update tinker_defconfig

* Update hassos.config

* Update intel_nuc_defconfig

* Delete misc.config

* Update hassos.config

* Update intel_nuc_defconfig

* Update odroid_c2_defconfig

* Update ova_defconfig

* Update rpi0_w_defconfig

* Update rpi2_defconfig

* Update rpi3_64_defconfig

* Update rpi3_defconfig

* Update rpi_defconfig

* Update tinker_defconfig

* Update hassos.config
2018-12-28 17:34:30 +01:00
Pascal Vizeli
934b276a3c Revert "Build: Split kernel files for maintaining (#291)" (#293)
This reverts commit 615daddbf6.
2018-12-28 14:16:31 +01:00
Pascal Vizeli
615daddbf6 Build: Split kernel files for maintaining (#291)
* Build: Split kernel files for maintaining

* Update hassos.config

* Update odroid_c2_defconfig

* Update ova_defconfig

* Update rpi0_w_defconfig

* Update rpi2_defconfig

* Update rpi3_64_defconfig

* Update rpi_defconfig

* Update tinker_defconfig

* Update hassos.config

* Update intel_nuc_defconfig
2018-12-28 14:15:22 +01:00
Jasper van der Neut - Stulen
9bc61e6318 Intel NUC support (#288)
* Add hassos configuration for intel-nuc:

 * Cloned from ova config
 * Use default amd64 kernel config
 * Add support for Intel IGB type nics
 * Add rng-tools for better random

* Build with iwlwifi module & firmware (only newer modules with iwlmvm firmware)

* Include firmware for 915, which should improve power efficiency.
Build display and audio as a module to make it all work.

* Add intel_nuc to build script.

* Change directory structure as proposed by @pvizeli

*  * Fix paths
 * Remove unused patch directory

* Unduplicate barebox config.
2018-12-28 11:09:24 +01:00
Pascal Vizeli
a860374d64 Merge pull request #285 from home-assistant/dev
Release 2.4
2018-12-18 21:21:11 +01:00
Justin Otherguy
42c2f88588 Build: Replace "~/hassos-cache" with "$HOME/hassos-cache" (#281)
Build: Replace "~/hassos-cache" with "$HOME/hassos-cache"
2018-12-10 23:54:50 +01:00
Pascal Vizeli
2107a6b64d Build: Add patch source to tinker (#278) 2018-12-06 10:20:42 +01:00
Ryan Bray
75e721e77e OdroidC2: Updating Kernel (#277) 2018-12-06 10:09:16 +01:00
Pascal Vizeli
fd707ba270 Build: Fix bug with glibc dt-utils (#275)
* Fix bug with glibc dt-utils

* Fix openvmtools

* Fix openvmtools p2
2018-12-05 07:33:15 +01:00
Pascal Vizeli
76fad70ebe Update buildroot 2018.11 (#274) 2018-12-02 16:25:21 +01:00
Pascal Vizeli
d6ad746fda Documentation: maintain local changes for ntp (#271) 2018-11-30 17:00:56 +01:00
Pascal Vizeli
60c9013535 Travis (#269)
* Update build-all.sh

* Delete ovf-create.sh

* Update patches.sh

* Update hdd-image.sh

* Create .travis.yml

* Update hdd-image.sh

* Update hdd-image.sh

* Update hdd-image.sh

* Update hdd-image.sh

* Update ota.sh

* Update post-build.sh

* Update post-image.sh

* Update rauc.sh

* Update rootfs-layer.sh

* Update hassos-cli

* Update hassos-supervisor

* Update hassos-config

* Update hassos-apparmor

* Update hassos-expand

* Update hassos-persists-journald

* Update hassos-rate

* Update hassos-hook.sh

* Update hassos-hook.sh

* Rename uboot-boot.sh to uboot-boot.ush

* Rename uboot-boot.sh to uboot-boot.ush

* Update hassos-hook.sh

* Rename uboot-boot.sh to uboot-boot.ush

* Rename uboot-boot.sh to uboot-boot.ush

* Update hassos-hook.sh

* Update odroid_c2_defconfig

* Update rpi0_w_defconfig

* Update rpi2_defconfig

* Update rpi3_64_defconfig

* Update rpi3_defconfig

* Update rpi_defconfig

* Update tinker_defconfig

* Update enter.sh

* Update .travis.yml
2018-11-30 16:22:04 +01:00
Pascal Vizeli
ae0a2fe264 OS: move service scripts into libexec 2018-11-29 16:01:16 +00:00
Pascal Vizeli
bc3cc20629 Don't use a bind mount for docker data (#266) 2018-11-29 15:20:58 +01:00
Pascal Vizeli
d94095a565 OVA: Add driver support for Xen, Hyper-V (#265)
* OVA: Add driver support for Xen, Hyper-V

* Fix devices
2018-11-28 01:04:18 +01:00
Pascal Vizeli
8ed63a9aab Fix tini static for docker (#263) 2018-11-27 21:34:54 +01:00
Pascal Vizeli
27a94565ea Update containerd to 1.2.0 (#262) 2018-11-27 09:20:21 +01:00
Pascal Vizeli
d46e2a808f Revert "Update containerd to 1.2.0 (#260)" (#261)
This reverts commit 50bc0451d0.
2018-11-27 00:06:46 +01:00
Pascal Vizeli
50bc0451d0 Update containerd to 1.2.0 (#260) 2018-11-26 16:35:54 +01:00
Pascal Vizeli
5ff51846e2 Build: Support VDI, VDHX, VMDK (#259)
* Support VDI, VDHX, VMDK

* Update hassos-hook.sh

* Update hdd-image.sh
2018-11-26 12:14:44 +01:00
Pascal Vizeli
4411307353 Buildroot 2018-11 (#258)
* Update to buildroot 2018.11

* containerd update

* runc update

* runc docker engine

* runc docker proxy

* update rpi firmware

* update network manager

* update dhcpd

* update wait on network

* update rpi wifi

* revert glibc
2018-11-26 11:04:01 +01:00
Pascal Vizeli
a9bbc7babe Bump version 2.4 2018-11-25 16:31:10 +01:00
Pascal Vizeli
80f5fe0722 Delete release-drafter.yml 2018-11-23 08:06:20 +01:00
Pascal Vizeli
519acca46d CLI: Update to version 7 2018-11-22 23:52:50 +00:00
Pascal Vizeli
566641bf8a Supervisor: Update to version 140 2018-11-22 23:52:29 +00:00
Pascal Vizeli
4d99243c91 Merge pull request #256 from home-assistant/dev
Release 2.3
2018-11-23 00:47:07 +01:00
Pascal Vizeli
18640da277 Merge branch 'dev' of https://github.com/home-assistant/hassos into dev 2018-11-22 14:45:25 +00:00
Pascal Vizeli
5351b542ff Raspberry: fix wrong patch folder in config p2 2018-11-22 14:44:54 +00:00
Pascal Vizeli
033e153d49 Delete move.yml 2018-11-22 14:48:18 +01:00
Pascal Vizeli
ad898040ac Create release-drafter.yml 2018-11-22 14:48:09 +01:00
Pascal Vizeli
9e29a12f95 Raspberry: fix wrong patch folder in config 2018-11-22 12:24:13 +00:00
Pascal Vizeli
0ab78a97c7 Tinker: update kernel 4.14.82 2018-11-21 14:57:01 +00:00
Pascal Vizeli
43c423243a OVA: update kernel 4.14.82 2018-11-21 10:14:58 +00:00
Pascal Vizeli
19488834e4 Raspberry: update kernel 4.14.81 2018-11-21 10:13:28 +00:00
Pascal Vizeli
dc35208efe OS: allow set NTP (#252)
* OS: allow set NTP

* Create etc-systemd-timesyncd.conf.mount

* Update hassos-config

* Update configuration.md

* add link

* Update Documentation/configuration.md

Co-Authored-By: pvizeli <pascal.vizeli@syshack.ch>
2018-11-21 00:28:40 +01:00
Simon Holzmayer
2435ca9065 provide a message when the OTA is skipped (#255)
Closes #249
2018-11-20 15:57:58 +01:00
cogneato
404efdee52 clarity and grammar fixes (#248) 2018-11-16 16:34:13 +01:00
Joeboyc2
cbd9b45adc Updated the fine nmcli command (#243) 2018-11-14 21:26:07 +01:00
seanodell
56992c6a77 Documentation: Add hidden=true comment for Wifi routers not broadcasting SSID (#241) 2018-11-05 20:45:24 +01:00
thomasvs
47bb76acec Clarify the format of the address field to avoid people accidentally swapping IP address of hassio vs. gateway. (#237) 2018-11-01 13:45:41 +01:00
Pascal Vizeli
caf708e14a Raspberry: Bugfix not try to load Bluetooth (#235) 2018-10-29 22:42:47 +01:00
Simon Holzmayer
809abbfde2 Fixed keeping name of udev rules after usb import (#232)
Closes #231
2018-10-29 16:01:29 +01:00
Pascal Vizeli
a2363d9a27 OS: bugfix acpid service file (#229)
* OS: bugfix acpid service file

* Update busybox-acpid.service
2018-10-29 16:00:20 +01:00
Josh Cooper
5cdf66c2c8 Typo fix (#228)
* typo fix

stands instead of stays

* typo fix 2
2018-10-28 00:04:59 +02:00
Pascal Vizeli
a7fa7efbf9 Raspberry: update kernel 4.14.78 2018-10-27 13:07:12 +00:00
Pascal Vizeli
976e9b0bce OVA: update kernel 4.14.78 2018-10-27 12:07:46 +00:00
Ryan Bray
960e11dc4f Uboot bootstate (#215)
* Uboot: cleaning up bootstate env import/export.

* Tinker: Add potential eMMC boot support.
2018-10-26 11:36:29 +02:00
Pascal Vizeli
2291e8599e OS: Config importer support now also boot partition (#212)
* OS: Config importer support now also boot partition

* Update configuration.md

* Cleanup config after import

* Update hassos-config
2018-10-25 21:59:58 +02:00
Dave
bcb9c3fa1f Remove smart quotes and fix typo (#222)
Both of these create errors when copy pasting to follow the instructions:
  - Remove smart quotes from around "HassOS default"
  - Changing typo of 'system_connections' to 'system-connections'
2018-10-24 15:55:09 +02:00
Johannes Truschnigg
b827a90a35 Enable XHCI (USB3) support in ova kernel config (#221)
With this change, hassos can have USB devices passed into a guest VM
with the hypervisor emulating an XHCI controller. QEMU recommends using
XHCI whenever possible, as it offers a much more virtualization-friendly
architecture than its [EO]HCI predecessors (which are already support by
the hassos kernel).
2018-10-24 15:54:26 +02:00
Johannes Truschnigg
921dd693dd Add informal "getting started with development" document (#220) 2018-10-24 15:52:45 +02:00
Pascal Vizeli
005cbc0b89 OS: use newer docker run command (#217)
* OS: use newer docker run command

* Update hassos-supervisor
2018-10-16 16:32:00 +02:00
Robert Schindler
482e6f7a7b Added 8021q kernel module for VLAN support (#216) 2018-10-13 17:58:13 +02:00
Pascal Vizeli
b83bfc5910 Bump version 2018-10-13 17:57:22 +02:00
Pascal Vizeli
c475daf889 build: tuning dockerignore 2018-10-11 20:56:11 +02:00
Pascal Vizeli
dac76b1632 Allow udev rules & make it persistent (#210)
* Install default to lib

* Create hmip-rfusb.rules

* Create etc-udev-rules.d.mount

* Update hassos-config

* Update configuration.md

* Update rauc.sh

* Add ln
2018-10-11 20:49:20 +02:00
Johannes Truschnigg
faa371191f Implement basic ACPI shutdown support via busybox acpid (#209)
On systems where ACPI support is present as inidcated by the presence of
/proc/acpi (e.g. on OVA compatible hypervisors), we want to properly
shut down the system when the power button is pressed (or the hypervisor
simulates this kind of event to the guest machine that executes hassos).

This changeset provides the following basic infrastructure for this
feature to work as expected:

 * a systemd service to start acpid, if ACPI support can be assumed
 * an acpid configuration directory
 * a trivial shutdown script to invoke when a PWR event is registered
2018-10-10 11:34:06 +02:00
Makrand Gupta
8cde7f9192 Fixed typo in 'address' property name for Static IP (#208) 2018-10-10 11:31:59 +02:00
Pascal Vizeli
1112a10509 Raspberry: Fix power options 2018-09-24 16:30:04 +02:00
borpin
ad9f21fdfb Update documentation for a static IPV4 address via nmcli (#199)
* Update documentation for a static IPV4 address via nmcli

This update documents a method to change to a Static IPV4 address using the NetworkManager CLI (nmcli).

Happy for the formatting to be modified to suit local convention.

I cannot be more specific about how to get into the base OS as I don't know!

* Additional nmcli commands for dns and gateway

I found that there is a need to add in the dns and gateway IP addresses otherwise there was no route out.  I note there are a number of issues alive re this routing problem e.g. https://github.com/home-assistant/home-assistant/issues/15221

* Update network.md
2018-09-20 11:48:57 +02:00
Ryan Kladar
55cc60fc8e MYLAN_SECRED_KEY should be MYLAN_SECRET_KEY, no? (#196)
Changed the placeholder secret key name spelling mistake.
2018-09-17 23:07:08 +02:00
Pascal Vizeli
075799aaa8 Raspberrypi: Performance on Raspberry Pi due to governor (#193)
* Raspberrypi: Performance on Raspberry Pi due to governor

* Update rpi0_w_defconfig

* Update rpi2_defconfig

* Update rpi3_defconfig

* Update rpi_defconfig

* Update rpi3_64_defconfig
2018-09-10 12:22:52 +02:00
Johannes Truschnigg
3733a07bac Do not assume index 0 for boot medium (#188)
When booting the HassOS VMDK appliance disk image on QEMU with OVMF UEFI
firmware, barebox numbers devices differently from other environments.

This patch makes the barebox `sh` implementation expand a pathname
wildcard at runtime, so that assigned disk indices != 0 will also work.

This fix introduces a potential (but most likely irrelevant)
bug/problem: If there is more than one disk connected to the system with
a matching name assigned, the wildcard will expand to two or more
pathnames, breaking the resulting `mount` command.
2018-09-04 21:30:32 +02:00
Ryan Bray
eb553bec07 Odroid-C2: updating kernel to 4.14.67 (#176) 2018-08-26 22:09:49 +02:00
Pascal Vizeli
803bfc8391 Merge pull request #177 from home-assistant/dev
Release 2.2
2018-08-26 10:06:14 +02:00
Pascal Vizeli
e7e2dc2aad Raspberry: fix path for config.txt 2018-08-25 22:37:47 +00:00
Pascal Vizeli
352072cc5a Supervisor: Update to version 127 2018-08-25 21:13:11 +00:00
Pascal Vizeli
5d90fa9e20 Merge pull request #175 from home-assistant/kernel
Latest kernel updates/bugfixes
2018-08-25 23:10:07 +02:00
Pascal Vizeli
54389be443 Raspberry: Bump Firmware for 4.14.66 2018-08-25 21:07:50 +00:00
Pascal Vizeli
ae8dec9f72 Documentation: Update Kernel infos 2018-08-25 20:49:46 +00:00
Pascal Vizeli
064ee9ef84 Raspberry: update kernel 4.14.66 2018-08-25 20:47:18 +00:00
Pascal Vizeli
21e3a30012 Tinker: update kernel 4.14.67 2018-08-25 20:44:10 +00:00
Pascal Vizeli
8d86fa9ec9 OVA: update kernel 4.14.67 2018-08-25 20:43:50 +00:00
Pascal Vizeli
1ead97f64a raspberry: Use new config.txt (#174) 2018-08-25 22:40:17 +02:00
Pascal Vizeli
703f0168bf odroid-c2: Add device to auto build list (#173) 2018-08-25 22:38:52 +02:00
Pascal Vizeli
7cea5a829f Merge pull request #172 from home-assistant/ota-odriod
odroid-c2: initial import
2018-08-25 22:13:26 +02:00
Dmitri Pribysh
0bc81f78ec Fix syntax highlighting in network docs (#171) 2018-08-25 21:40:15 +02:00
Ryan Bray
331336a2d4 Odroid-C2: Fix documentation typo/formatting 2018-08-25 11:48:42 -06:00
Ryan Bray
8086b55acd Odroid-C2: Updating Documentation 2018-08-25 11:45:59 -06:00
Pascal Vizeli
2a0d551667 Bump version 2.2 2018-08-25 16:46:35 +00:00
Pascal Vizeli
61b0b333f0 ota: skeep mbr 2018-08-25 07:52:46 +00:00
Ryan Bray
dc0f6367cb Odroid-C2: Build Fixes, correct root partition 2018-08-24 22:40:15 -06:00
Pascal Vizeli
486161f2d8 Fix uboot 2018-08-25 00:37:00 +00:00
Pascal Vizeli
9441f6b16e Fix uboot 2018-08-24 23:05:05 +00:00
Ryan Bray
514c59796f Odroid-c2: Moving to 4.14.36 kernel 2018-08-24 22:52:18 +00:00
Pascal Vizeli
ebf84216e9 cleanup 2018-08-24 22:46:03 +00:00
Pascal Vizeli
74ff13e25e P1 2018-08-24 21:50:29 +00:00
Pascal Vizeli
9b170812d6 Cleanup odroid 2018-08-22 22:15:08 +00:00
Ryan Bray
3b45011982 Reverting 4.17 buildroot changes 2018-08-21 03:05:25 -06:00
Ryan Bray
8e1af1313b Odroid: Allow booting from eMMC, Use bootstate partition rather than env file 2018-08-21 02:59:30 -06:00
Ryan Bray
0f8010bc90 Odroid-C2: Move to 4.17 kernel, rework directories 2018-08-21 02:56:00 -06:00
Pascal Vizeli
7006a5fd64 Merge pull request #162 from rbray89/dev
Adding Support for Odroid C2
2018-08-19 19:14:36 +02:00
Ryan Bray
170ed2db00 updating to proper homeassistant image 2018-08-17 02:19:19 -06:00
Ryan Bray
ef40d38b12 rename hardkernel-sbl to hardkernel-boot 2018-08-16 22:24:11 -06:00
Ryan Bray
d144f72868 Odroidc2: boot arg cleanup 2018-08-16 22:24:11 -06:00
Ryan Bray
11088580c5 odroid-c2: Initial Support
Working:
* Ethernet
* Resize of Data
* RAUC boot marking/fetching
* CMD Line into HASSOS and Linux

Partially working:
* USB (requires 1+ devices in at boot. Seems to be a kernel/dt issue.)

Untested:
* RAUC Update
* HDMI

Not working:
* Homeassistant
** We see:
hassio > ha info
The HTTP request failed with the error: Get http://hassio/homeassistant/info: dial tcp 172.30.32.2:80: getsockopt: connection refused
2018-08-16 22:24:11 -06:00
Fabian Affolter
5c8f8bea48 Minor changes 2018-08-15 08:30:15 +02:00
Fabian Affolter
8bb3732934 Fix typos 2018-08-15 08:27:52 +02:00
Fabian Affolter
86f88aae0a Minor changes 2018-08-15 08:26:12 +02:00
Fabian Affolter
10e310d8b5 Minor changes 2018-08-15 08:24:24 +02:00
Pascal Vizeli
6467f343cd Merge pull request #158 from home-assistant/doc-rpi
Documentation: RPI, disable bluetooth for serial console
2018-08-11 23:21:19 +02:00
Pascal Vizeli
e20249676a Documentation: RPI, disable bluetooth for serial console 2018-08-11 23:20:37 +02:00
Pascal Vizeli
67e722b032 Merge pull request #157 from home-assistant/dev
Beta 2.1
2018-08-11 21:46:24 +02:00
Pascal Vizeli
518df77e05 Merge branch 'master' into dev 2018-08-11 21:45:46 +02:00
Pascal Vizeli
202b267d09 os: add spl mbr 2018-08-11 11:03:50 +00:00
Pascal Vizeli
5ad184f943 os: use hyprid for SPL to fix windows 2018-08-11 11:02:15 +00:00
Pascal Vizeli
6ab6cd7ff4 os: revert gpt fix / not needed 2018-08-11 10:35:43 +00:00
Pascal Vizeli
a2c6107685 os: fix GPT alligne with SPL images 2018-08-11 08:56:46 +00:00
Pascal Vizeli
5f24bd5574 build: optimize vmdk 2018-08-10 15:10:38 +00:00
Pascal Vizeli
ef61756566 Documentation: Raspeberry Pi I2C (#147) 2018-08-10 12:18:45 +02:00
Pascal Vizeli
7a3d3ae502 tinker: use a other address for boot config 2018-08-10 00:40:55 +02:00
Pascal Vizeli
4346220e27 os: fix bootstate link 2018-08-08 15:09:08 +00:00
Pascal Vizeli
12b5731e20 os: fix u-boot env size (#153)
* os: fix u-boot env size

* Delete fw_env.config
2018-08-08 12:48:07 +02:00
Pascal Vizeli
72a3aec55b tinker: fix bluetooth forking 2018-08-07 20:28:55 +00:00
Pascal Vizeli
9ef96373a9 Update buildroot 2018.05.1 / u-boot (#150)
* Update buildroot 2018.05.1 / u-boot

* Cleanup

* Fix bl
2018-08-07 16:45:12 +02:00
Pascal Vizeli
bbe4c47574 os: improve fileenv u-boot (#148) 2018-08-06 23:45:12 +02:00
Pascal Vizeli
1dc2392f15 Fix some build errors (#146)
* Fix folder

* Add tinker board to build all

* Fix download URL

* Revert uart patch

* Fix link p2

* Fix cmdline
2018-08-06 00:51:12 +02:00
Pascal Vizeli
c5e85a625f OS: Update supervisor 123 2018-08-05 10:22:34 +00:00
Pascal Vizeli
fbb45e1544 tinker: Initial support (#140)
* tinker: initial support

* Fix info

* Fix uboot defconfig

* Split kernel config

* Fix name

* Add post-image

* Init different boot

* Add SPL images

* Dynamic rauc config

* Support SPL for OTA

* Fix expand script style

* Fix SPL

* Bump build u-boot

* Cleanup

* Add cmd for scritps

* Use kernel from armbian

* Fix u-boot

* Add bluetooth support

* Fix bt

* Fix env

* Change uart debug like rpi

* move config
2018-08-03 13:21:55 +02:00
Pascal Vizeli
48500a6c6e rpi: Update kernel & firmware 4.14.58 (#139) 2018-07-29 00:10:24 +02:00
Pascal Vizeli
ae58be25ad OVA: Update kernel to 4.14.59 (#138) 2018-07-28 23:52:06 +02:00
Pascal Vizeli
42087b40c5 OVA: Add support for Aeotec Zstick (#132) 2018-07-28 23:39:03 +02:00
Pascal Vizeli
e4b99ea7c0 OS: Update supervisor 121 (#137) 2018-07-28 23:38:40 +02:00
Pascal Vizeli
233e097cc4 fix wireless settings (#124) 2018-07-19 10:50:46 +02:00
Pascal Vizeli
e093875e66 OVA: Fix serial support (#119)
OVA: Fix serial support
2018-07-18 16:07:06 +02:00
Pascal Vizeli
312766e962 Add support for VIRTIO (#118)
* Add support for VIRTIO

* Update kernel.config
2018-07-18 11:57:31 +02:00
Pascal Vizeli
e3ceea2058 Allow more USB serial device on OVA (#115)
* Allow more USB serial device on OVA

* Update kernel.config
2018-07-17 09:57:35 +02:00
Robin
49edc087b0 Update network.md (#114)
Clarify that you are editing the file `my-network` which is what I understand from https://www.home-assistant.io/hassio/installation/
2018-07-17 09:48:30 +02:00
Pascal Vizeli
75cd510283 Fix prevent device tree on rpi (#107)
* Fix prevent device tree

* Update uboot-boot.sh

* Update rauc-hook

* Update rauc-hook
2018-07-15 21:40:28 +02:00
Pascal Vizeli
3847d13b1a Update OVA kernel to 4.14.55 (#108) 2018-07-15 21:40:09 +02:00
Pascal Vizeli
eaab4a7a86 Raspberry Pi node of 64bit (#103) 2018-07-14 11:07:18 +02:00
DubhAd
d5953e13be Grammar and language tweaks (#101)
Some grammar and language tweaks
2018-07-14 09:01:36 +00:00
DubhAd
ac2a1883a2 Grammar and language tweaks (#101)
Some grammar and language tweaks
2018-07-14 11:00:13 +02:00
Pascal Vizeli
85c9aa4191 Fix handling with resolv.conf (#99) 2018-07-13 18:29:34 +02:00
Pascal Vizeli
a7b16cd051 Update rpi kernel 4.14.54 / Firmware / wifi (#98)
* Update rpi kernel 4.14.54 / Firmware / wifi

Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>

* Fix patch

* Update bluetooth-bcm43xx.mk

* Update bluetooth-bcm43xx.mk

* Update bluetooth-bcm43xx.mk
2018-07-13 09:52:45 +02:00
Pascal Vizeli
d7129fb57c Update docker & new publish (#96) 2018-07-12 12:59:45 +02:00
Pascal Vizeli
1254c6162c Update Documentation (#95)
* Update deployment.md

* Update raspberrypi.md

* Update raspberrypi.md

* Update raspberrypi.md
2018-07-12 12:50:28 +02:00
Pascal Vizeli
95a2844265 Fix boot menu (#94)
* Fix boot menu

* Update action
2018-07-10 14:53:29 +02:00
Pascal Vizeli
5ce7331001 Update bluetooth docs & add udev rules (#92)
* Update bluetooth docs

* add udev rules

* Add cmp to build

* Create bluetooth.md
2018-07-10 10:11:58 +02:00
Pascal Vizeli
7cffb1f45b Native bluetooth support (#91)
* Add bluez

* rpi firmware

* add rpi support

* Make packages from rpi

* Fix build

* Fix target

* persistent

* fix package

* Auto enable

* Fix parameter

* Fix rpi

* Fix done
2018-07-10 01:14:07 +02:00
Pascal Vizeli
a0551d8010 Check simlink (#90) 2018-07-08 14:19:30 +02:00
Pascal Vizeli
38c1df36c0 Fix time on overlay (#88)
* Fix time on overlay

* Fix rights

* Fix timesync
2018-07-08 00:43:46 +02:00
Pascal Vizeli
5526dbb2f7 Bump version to 2.1 2018-07-07 13:25:20 +02:00
Pascal Vizeli
fd56d6544c Merge pull request #85 from home-assistant/dev
Beta 2.0
2018-07-07 13:24:51 +02:00
Pascal Vizeli
d2ba03164b Add powersave config to network manager (#86)
* Add powersave config to network manager

* Update network.md
2018-07-07 10:45:59 +02:00
Pascal Vizeli
c6d0fef0b4 Some cleanup (#84) 2018-07-06 21:04:48 +02:00
Pascal Vizeli
0671e3f71c Reset if we can't boot (#83)
* Update uboot-boot.sh

* Update uboot-boot.sh
2018-07-06 19:08:52 +02:00
Pascal Vizeli
14833a110f Use wait on network to delay the startup (#81)
* Use wait on network to delay the startup

* Update nm.conf

* Create nm.conf

* Update hassos-supervisor.service

* Rename hassos.conf to docker.conf

* Create hassos.conf

* Create hassos.conf

* Update hassos.conf

* aply patch

* Mark only failed

* Fix start order
2018-07-06 18:21:19 +02:00
Pascal Vizeli
988d4ebecf Update supervisor 115 (#82) 2018-07-06 14:35:22 +02:00
Pascal Vizeli
bf59b7744d Use dhcp client / avahi after NM (#75)
* Use dhcp client / avahi after NM

* Store networkmanager

* Add default connection

* cleanup

* cleanup lease

* faster boot

* Cleanup

* Fix permission
2018-07-05 20:00:56 +02:00
Gabriel Oliveira
4a80c7fcd0 Fix config documentation closing tags (#80) 2018-07-05 16:40:41 +02:00
Pascal Vizeli
6c58eb1615 Fix /usr/sbin/hassos-cli is not in /etc/shells (#78)
* Update rootfs-layer.sh

* Update rootfs-layer.sh

* Update rootfs-layer.sh
2018-07-05 13:44:52 +02:00
cogneato
46d6dba859 Update configuration.md (#50)
* Update configuration.md

Clearing up documentation, grammar fixes.

* changed known_hosts to authorized_keys

* Update configuration.md
2018-07-03 07:32:44 +02:00
cogneato
12393e083d Update network.md (#51)
* Update network.md

Clearing up network documentation, grammar

* Update network.md
2018-07-03 07:30:17 +02:00
Pascal Vizeli
3700d744b4 Update CLI / Supervisor (#71) 2018-07-03 00:00:25 +02:00
Pascal Vizeli
7e665a7b42 Fix persistent log (#70) 2018-07-02 23:53:07 +02:00
Pascal Vizeli
c860229130 Change chmod of network connection files from fat32 (#69) 2018-07-02 23:03:13 +02:00
Pascal Vizeli
32ab05bd2e Fix update script with uptime (#68) 2018-07-02 22:51:54 +02:00
Pascal Vizeli
8792d37402 Fix docker warning on rpi (#67) 2018-07-02 21:43:33 +02:00
Pascal Vizeli
414b59ac4a Fix label name in test script (#66)
* Fix label name in test script

* Update hassos-config
2018-07-02 21:24:05 +02:00
Pascal Vizeli
f8fa170e2a Fix spell in journald script (#65) 2018-07-02 19:58:00 +02:00
Pascal Vizeli
11b1946cd7 Make logs persistent over reboot and cleanup (#61)
* Create hassos-persists-journald

* Create hassos-persists-journald.service

* Set ln & permission

* Enable persists journald

* Update hassos-persists-journald
2018-07-02 01:05:21 +02:00
Pascal Vizeli
7d4b424d2f Map /etc/machine-id into supervisor/cli (#60)
* Map /etc/machine-id into supervisor/cli

* Update hassos-cli

* Update hassos-supervisor
2018-07-01 15:15:54 +02:00
Pascal Vizeli
6aa8e61d88 Add lost persistent ssh folder (#58)
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2018-07-01 00:38:30 +02:00
Pascal Vizeli
d536e3d7a7 Use wpa_supplicant with NetworkManager (#57) 2018-07-01 00:29:10 +02:00
Pascal Vizeli
2614ffce40 Use CONFIG as label for config partition (#56)
* Use CONFIG as label for config partition

* Update configuration.md

* Update hassos-config
2018-07-01 00:28:00 +02:00
Pascal Vizeli
dde6d8f806 Set hassos supervisor to rauc (#55)
* Set hassos supervisor to rauc

* Update post-install

* Update hassos-config
2018-06-29 15:23:49 +02:00
Pascal Vizeli
8dd8816e4e Fix authorized_keys keys (#53)
* Fix authorized_keys keys

* Update hassos.conf

* Update configuration.md

* Update hassos-config

* Update hassos-config
2018-06-28 22:21:50 +02:00
Pascal Vizeli
f739aed8de Fix hassos-conf label (#48)
* Update mnt-config.mount

* Update configuration.md

* Update configuration.md

* Update mnt-config.mount

* Update configuration.md
2018-06-28 22:20:34 +02:00
Pascal Vizeli
f6a916001d Update ova.md (#47) 2018-06-27 13:56:52 +02:00
Pascal Vizeli
23a58b23b5 We publish now the vmdk and not OVA/OVF (#46)
* Update upload-rel.sh

* Create ova.md
2018-06-27 12:05:44 +02:00
Pascal Vizeli
d3e3e36a6e Improve the documentation (#44)
* Create network.md

* Update configuration.md

* Update network.md

* Update network.md
2018-06-26 22:24:15 +02:00
Pascal Vizeli
af23b6199e Add script for github upload (#43)
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
2018-06-26 21:32:41 +02:00
Pascal Vizeli
80079930c5 Include ota script into board image (#42) 2018-06-26 13:28:00 +02:00
Pascal Vizeli
ca50a86768 Bump version to next development release (#41) 2018-06-26 12:27:09 +02:00
Pascal Vizeli
6e9326d11b Fix build script for new layout (#40) 2018-06-26 11:48:16 +02:00
10985 changed files with 256404 additions and 117447 deletions

View File

@@ -1,3 +1,11 @@
buildroot
buildroot-external
buildroot-patches
# We don't need this folder because we map the hole folder
buildroot/
buildroot-external/
buildroot-patches/
# Release directory gets created using build scripts
release/
# Ignore hidden directories as well
.git/
.github/

54
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,54 @@
<!-- READ THIS FIRST:
- If you need additional help with this template please refer to https://www.home-assistant.io/help/reporting_issues/
- Make sure you are running the latest version before reporting an issue: https://github.com/home-assistant/operating-system/releases
- Do not report issues for integrations here, please refer to https://github.com/home-assistant/core/issues
- Do not report issues for Add-Ons here, please refer to
Official Add-ons: https://github.com/home-assistant/addons/issues
Home Assistant Community Add-ons: https://github.com/hassio-addons/repository
- This is for bugs only. Feature and enhancement requests should go in our community forum: https://community.home-assistant.io/c/feature-requests
- Provide as many details as possible. Paste logs, configuration sample and code using blocks with three backticks. Do not delete text from this template!
- Please add modifications to boot files, e.g. if you are using Raspberry Pi and did modifications in config.txt.
-->
**Hardware Environment**
<!--
Describe the Home Assistant image you are using and the hardware environment
-->
- [ ] Raspberry Pi [1/2/3/4]
- [ ] ODROID [C2/C4/N2(+)/XU4]
- [ ] ASUS Tinker [S]
- [ ] Generic x86-64 (like Intel NUC)
- [ ] OVA (Open Virtualization Appliance, on Intel NUC or any other hardware, please add the Hypervisor you are using)
**Home Assistant OS release:**
- [ ] Fresh installation of release x.y
- [ ] Updated from version x.y
- Additional information (if accessible):
<!--
- Home Assistant Frontend -> Configuration -> Info (use the copy button in the System Health block)
- Or use this command: `ha info`
-->
**Supervisor logs:**
<!--
- Home Assistant Frontend -> Supervisor -> System (Log Provider Supervisor)
- Or use this command: ha su logs
-->
**Journal logs:**
<!--
- Enable SSH on OS level and login, then use `journalctl`
-->
**Kernel logs:**
<!--
- use this command: dmesg
- Enable SSH on OS level and login, then use `dmesg`.
-->
**Description of problem:**
<!--
- Is the problem reproducible?
- Has this been working before (is this a regression?)
- Has there been attempt to rule out hardware issues? (different SD card etc.)
-->

13
.github/move.yml vendored
View File

@@ -1,13 +0,0 @@
# Configuration for move-issues - https://github.com/dessant/move-issues
# Delete the command comment. Ignored when the comment also contains other content
deleteCommand: true
# Close the source issue after moving
closeSourceIssue: true
# Lock the source issue after moving
lockSourceIssue: false
# Set custom aliases for targets
# aliases:
# r: repo
# or: owner/repo

21
.github/release-drafter.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
categories:
- title: 'Home Assistant Operating System'
label: 'os'
- title: 'Build System'
label: 'build'
- title: 'Raspberry Pi'
label: 'board/raspberrypi'
- title: 'Open Virtual Appliance'
label: 'board/ova'
- title: 'Generic x86-64'
label: 'board/generic-x86-64'
- title: 'Hardkernel ODROID'
label: 'board/odroid'
- title: 'ASUS Tinker'
label: 'board/tinker'
filter-by-commitish: true
commitish: dev
template: |
## Changes
$CHANGES

17
.github/stale.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false

109
.github/workflows/dev.yml vendored Normal file
View File

@@ -0,0 +1,109 @@
# Home Assistant Operating System build workflow
name: Development build
on:
workflow_dispatch:
jobs:
version:
name: Generate version
runs-on: [ "ubuntu-20.04" ]
outputs:
version_main: ${{ steps.version_main.outputs.version_main }}
version_dev: ${{ steps.version_dev.outputs.version_dev }}
steps:
- name: Generate Development build version
shell: bash
id: version_dev
run: |
version_dev="dev$(date --utc +'%Y%m%d')"
echo "Development version \"${version_dev}\""
echo "::set-output name=version_dev::${version_dev}"
- uses: actions/checkout@v2
- name: Get Major/Minor version
id: version_main
run: |
major=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_MAJOR | cut -d'=' -f2)
build=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_BUILD | cut -d'=' -f2)
echo "::set-output name=version_main::${major}.${build}"
build:
name: Release build for ${{ matrix.board.name }}
needs: version
strategy:
fail-fast: false
matrix:
board:
- {"name": "ova", "output": "ova", "runner": "x86-64-runner"}
- {"name": "generic_x86_64", "output": "generic-x86-64", "runner": "x86-64-runner"}
- {"name": "odroid_c2", "output": "odroid-c2", "runner": "aarch64-runner"}
- {"name": "odroid_c4", "output": "odroid-c4", "runner": "aarch64-runner"}
- {"name": "odroid_n2", "output": "odroid-n2", "runner": "aarch64-runner"}
- {"name": "odroid_xu4", "output": "odroid-xu4" , "runner": "aarch64-runner"}
- {"name": "rpi", "output": "rpi", "runner": "arm-runner"}
- {"name": "rpi0_w", "output": "rpi0-w", "runner": "arm-runner"}
- {"name": "rpi2", "output": "rpi2", "runner": "arm-runner"}
- {"name": "rpi3", "output": "rpi3", "runner": "arm-runner"}
- {"name": "rpi3_64", "output": "rpi3-64", "runner": "aarch64-runner"}
- {"name": "rpi4", "output": "rpi4", "runner": "arm-runner"}
- {"name": "rpi4_64", "output": "rpi4-64", "runner": "aarch64-runner"}
- {"name": "tinker", "output": "tinker", "runner": "arm-runner"}
runs-on: ${{ matrix.board.runner }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Build container
run: docker build -t haos-builder .
- name: 'Add release PKI certs'
env:
RAUC_CERTIFICATE: ${{ secrets.RAUC_CERTIFICATE }}
RAUC_PRIVATE_KEY: ${{ secrets.RAUC_PRIVATE_KEY }}
run: |
echo -e "-----BEGIN CERTIFICATE-----\n${RAUC_CERTIFICATE}\n-----END CERTIFICATE-----" > cert.pem
echo -e "-----BEGIN PRIVATE KEY-----\n${RAUC_PRIVATE_KEY}\n-----END PRIVATE KEY-----" > key.pem
- name: Build
run: |
BUILDER_UID="$(id -u)"
BUILDER_GID="$(id -g)"
docker run --rm --privileged -v "${GITHUB_WORKSPACE}:/build" \
-e BUILDER_UID="${BUILDER_UID}" -e BUILDER_GID="${BUILDER_GID}" \
-v "${{ matrix.board.runner }}-build-cache:/cache" \
haos-builder make BUILDDIR=/build VERSION_DEV=${{ needs.version.outputs.version_dev }} ${{ matrix.board.name }}
- name: Upload images
uses: appleboy/scp-action@master
with:
host: ${{ secrets.DEV_HOST }}
username: ${{ secrets.DEV_USERNAME }}
port: ${{ secrets.DEV_PORT }}
key: ${{ secrets.DEV_SCP_KEY }}
source: "release/*"
target: ${{ secrets.DEV_TARGET_PATH }}/${{ needs.version.outputs.version_main }}.${{ needs.version.outputs.version_dev }}/
strip_components: 1
bump_version:
name: Bump dev version to ${{ needs.version.outputs.version_main }}.${{ needs.version.outputs.version_dev }}
needs: [ build, version ]
runs-on: [ "ubuntu-20.04" ]
steps:
- name: Initialize git
uses: home-assistant/actions/helpers/git-init@master
with:
name: ${{ secrets.GIT_NAME }}
email: ${{ secrets.GIT_EMAIL }}
token: ${{ secrets.GIT_TOKEN }}
- name: Bump Home Assistant OS dev version
uses: home-assistant/actions/helpers/version-push@master
with:
key: "hassos[]"
key-description: "Home Assistant OS"
version: ${{ needs.version.outputs.version_main }}.${{ needs.version.outputs.version_dev }}
channel: "dev"

20
.github/workflows/pr-checks.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
# Home Assistant Operating System pull-request checks
name: PR checks
on: [pull_request]
jobs:
linters:
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v1
- name: Check Dockerfile
uses: brpaz/hadolint-action@v1.1.0
with:
dockerfile: Dockerfile
- name: Check shell scripts
uses: ludeeus/action-shellcheck@1.0.0
with:
ignore: "buildroot"

15
.github/workflows/release-drafter.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
name: Release Drafter
on:
push:
branches:
- dev
- rel-4
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

179
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,179 @@
# Home Assistant Operating System release build workflow
name: Release build
on:
release:
types: [published]
jobs:
validate_release:
name: Validate release
runs-on: [ "ubuntu-20.04" ]
outputs:
version: ${{ steps.version_check.outputs.version }}
version_dev: ${{ steps.version_check.outputs.version_dev }}
steps:
- uses: actions/checkout@v2
- name: Validate version
id: version_check
run: |
major=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_MAJOR | cut -d'=' -f2)
build=$(cat ${GITHUB_WORKSPACE}/buildroot-external/meta | grep VERSION_BUILD | cut -d'=' -f2)
tag_major=$(echo "${{ github.event.release.tag_name }}" | cut -d '.' -f 1)
tag_build=$(echo "${{ github.event.release.tag_name }}" | cut -d '.' -f 2)
tag_dev=$(echo "${{ github.event.release.tag_name }}" | cut -d '.' -f 3)
if [ "${major}.${build}" != "${tag_major}.${tag_build}" ]; then
echo "Version number in Buildroot metadata is does not match tag (${major}.${build} vs ${{ github.event.release.tag_name }})."
exit 1
fi
if [ "" != "${tag_dev}" ]; then
echo "Note: Release build with custom dev part: ${tag_dev}."
echo "::set-output name=version::${major}.${build}.${tag_dev}"
else
echo "::set-output name=version::${major}.${build}"
fi
echo "::set-output name=version_dev::${tag_dev}"
build:
name: Release build for ${{ matrix.board.name }}
needs: validate_release
strategy:
matrix:
board:
- {"name": "ova", "output": "ova", "runner": "x86-64-runner"}
- {"name": "generic_x86_64", "output": "generic-x86-64", "runner": "x86-64-runner"}
- {"name": "odroid_c2", "output": "odroid-c2", "runner": "aarch64-runner"}
- {"name": "odroid_c4", "output": "odroid-c4", "runner": "aarch64-runner"}
- {"name": "odroid_n2", "output": "odroid-n2", "runner": "aarch64-runner"}
- {"name": "odroid_xu4", "output": "odroid-xu4" , "runner": "aarch64-runner"}
- {"name": "rpi", "output": "rpi", "runner": "arm-runner"}
- {"name": "rpi0_w", "output": "rpi0-w", "runner": "arm-runner"}
- {"name": "rpi2", "output": "rpi2", "runner": "arm-runner"}
- {"name": "rpi3", "output": "rpi3", "runner": "arm-runner"}
- {"name": "rpi3_64", "output": "rpi3-64", "runner": "aarch64-runner"}
- {"name": "rpi4", "output": "rpi4", "runner": "arm-runner"}
- {"name": "rpi4_64", "output": "rpi4-64", "runner": "aarch64-runner"}
- {"name": "tinker", "output": "tinker", "runner": "arm-runner"}
runs-on: ${{ matrix.board.runner }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Build container
run: docker build -t haos-builder .
- name: 'Add release PKI certs'
env:
RAUC_CERTIFICATE: ${{ secrets.RAUC_CERTIFICATE }}
RAUC_PRIVATE_KEY: ${{ secrets.RAUC_PRIVATE_KEY }}
run: |
echo -e "-----BEGIN CERTIFICATE-----\n${RAUC_CERTIFICATE}\n-----END CERTIFICATE-----" > cert.pem
echo -e "-----BEGIN PRIVATE KEY-----\n${RAUC_PRIVATE_KEY}\n-----END PRIVATE KEY-----" > key.pem
- name: Build
run: |
BUILDER_UID="$(id -u)"
BUILDER_GID="$(id -g)"
docker run --rm --privileged -v "${GITHUB_WORKSPACE}:/build" \
-e BUILDER_UID="${BUILDER_UID}" -e BUILDER_GID="${BUILDER_GID}" \
-v "${{ matrix.board.runner }}-build-cache:/cache" \
haos-builder make BUILDDIR=/build VERSION_DEV=${{ needs.validate_release.outputs.version_dev }} ${{ matrix.board.name }}
- name: Upload disk image
if: ${{ matrix.board.name != 'ova' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.img.xz
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.img.xz
asset_content_type: application/x-xz
- name: Upload rauc update
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.raucb
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.raucb
asset_content_type: application/octet-stream
- name: Upload ova image
if: ${{ matrix.board.name == 'ova' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.ova
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.ova
asset_content_type: application/x-tar
- name: Upload qcow2 image
if: ${{ matrix.board.name == 'ova' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.qcow2.xz
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.qcow2.xz
asset_content_type: application/x-xz
- name: Upload vdi image
if: ${{ matrix.board.name == 'ova' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vdi.zip
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vdi.zip
asset_content_type: application/zip
- name: Upload vhdx image
if: ${{ matrix.board.name == 'ova' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vhdx.zip
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vhdx.zip
asset_content_type: application/zip
- name: Upload vmdk image
if: ${{ matrix.board.name == 'ova' }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ github.workspace }}/release/haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vmdk.zip
asset_name: haos_${{ matrix.board.output }}-${{ needs.validate_release.outputs.version }}.vmdk.zip
asset_content_type: application/zip
bump_version:
name: Bump dev version to ${{ needs.validate_release.outputs.version }}
needs: [ build, validate_release ]
runs-on: [ "ubuntu-20.04" ]
steps:
- name: Initialize git
uses: home-assistant/actions/helpers/git-init@master
with:
name: ${{ secrets.GIT_NAME }}
email: ${{ secrets.GIT_EMAIL }}
token: ${{ secrets.GIT_TOKEN }}
- name: Bump Home Assistant OS beta version
uses: home-assistant/actions/helpers/version-push@master
with:
key: "hassos[]"
key-description: "Home Assistant OS"
version: ${{ needs.validate_release.outputs.version }}
channel: "beta"

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
.DS_Store
/release
*.pem

2
.hadolint.yaml Normal file
View File

@@ -0,0 +1,2 @@
ignored:
- DL3008

View File

@@ -1,21 +1,46 @@
FROM ubuntu:16.04
FROM debian:buster
# Set shell
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Docker
RUN apt-get update && apt-get install -y \
RUN apt-get update && apt-get install -y --no-install-recommends \
apt-transport-https \
ca-certificates \
curl \
gpg-agent \
gpg \
dirmngr \
software-properties-common \
&& rm -rf /var/lib/apt/lists/* \
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
&& add-apt-repository "deb https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
&& apt-get update && apt-get install -y docker-ce \
&& curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - \
&& add-apt-repository "deb https://download.docker.com/linux/debian $(lsb_release -cs) stable" \
&& apt-get update && apt-get install -y --no-install-recommends \
docker-ce \
&& rm -rf /var/lib/apt/lists/*
# Build Tools
RUN apt-get update && apt-get install -y \
wget patch vim cpio python unzip rsync bc bzip2 ncurses-dev \
git make g++ file perl bash binutils locales qemu-utils \
# Build tools
RUN apt-get update && apt-get install -y --no-install-recommends \
bash \
bc \
binutils \
build-essential \
bzip2 \
cpio \
file \
git \
make \
ncurses-dev \
patch \
perl \
python \
rsync \
sudo \
unzip \
zip \
wget \
qemu-utils \
openssh-client \
vim \
&& rm -rf /var/lib/apt/lists/*
# Init entry

13
Documentation/README.md Normal file
View File

@@ -0,0 +1,13 @@
# Developer Documentation
## Contents
- [Getting started](./getting_started_development.md) - the place for developers to begin
- [Development](./development.md) - more details for developers
- [Deployment](./deployment.md) - approach to git branching and releases
- [Configuration](./configuration.md) - how users can configure HassOS
- [Partition](./partition.md) - partition layout
- [Network](./network.md) - approach to networking
- [Bluetooth](./bluetooth.md) - approach to bluetooth
- [Kernel](./kernel.md) - kernel versions
- [Boards](./boards/README.md) - board specific documentation

View File

@@ -0,0 +1,12 @@
# Bluetooth
We support `bluetoothctl` on the host. Later we want to support Bluetooth through the UI.
All pairs and settings are persistent over reboots and updates.
If you want to setup Bluetooth on the host, use the `bluetoothctl` utility.
## Scan devices
```
[bluetooth]# scan on
```

View File

@@ -0,0 +1,55 @@
# Boards
## Overview
The following boards/devices are supported:
- Raspberry Pi
- Pi 4 Model B (1 GB, 2 GB and 4 GB model) 32-bit (recommended)
- Pi 4 Model B (1 GB, 2 GB and 4 GB model) 64-bit
- Pi 3 Model B and B+ 32-bit (recommended)
- Pi 3 Model B and B+ 64-bit
- Pi 2 (not recommended)
- Pi Zero-W (not recommended)
- Pi (not recommended)
- Hardkernel
- Odroid-C2
- Odroid-C4 (_experimental_)
- Odroid-N2
- Odroid-XU4
- Generic x86-64 (UEFI, not suited for virtualization)
- Intel NUC5CPYH
- Intel NUC6CAYH
- Intel NUC10I3FNK2
- Gigabyte GB-BPCE-3455
- Computers supporting x64-64 architecture and UEFI boot should generally work
- Asus
- Tinker Board
- Virtual appliance (x86_64/UEFI):
- VMDK
- OVA ?
- VHDX ?
- VDI ?
- QCOW2 ?
Notes:
- see ? above: are these currently supported? see ova documentation which explains issues with previous OVA distribution)
## Board specifics
|Board|Build|Config|Docs|
|-----|----|------|----|
|Pi4B 32-bit |`make rpi4` |[rpi4](../../buildroot-external/configs/rpi4_defconfig)|[raspberrypi](./raspberrypi/)|
|Pi4B 64-bit |`make rpi4_64` |[rpi4_64](../../buildroot-external/configs/rpi4_64_defconfig)|[raspberrypi](./raspberrypi/)|
|Pi3B 32-bit |`make rpi3` |[rpi3](../../buildroot-external/configs/rpi3_defconfig)|[raspberrypi](./raspberrypi/)|
|Pi3B 64-bit |`make rpi3_64` |[rpi3_64](../../buildroot-external/configs/rpi3_64_defconfig)|[raspberrypi](./raspberrypi/)|
|Pi2 |`make rpi2` |[rpi2](../../buildroot-external/configs/rpi2_defconfig)|[raspberrypi](./raspberrypi/)|
|Pi Zero |`make rpi0_w` |[rpi0_w](../../buildroot-external/configs/rpi0_w_defconfig)|[raspberrypi](./raspberrypi/)|
|Pi |`make rpi` |[rpi](../../buildroot-external/configs/rpi_defconfig)|[raspberrypi](./raspberrypi/)|
|Odroid-C2 |`make odroid_c2` |[odroid_c2](../../buildroot-external/configs/odroid_c2_defconfig)|[hardkernel](./hardkernel/)|
|Odroid-C4 |`make odroid_c4` |[odroid_c4](../../buildroot-external/configs/odroid_c4_defconfig)|[hardkernel](./hardkernel/)|
|Odroid-N2 |`make odroid_n2` |[odroid_n2](../../buildroot-external/configs/odroid_n2_defconfig)|[hardkernel](./hardkernel/)|
|Odroid-XU4 |`make odroid_xu4` |[odroid_xu4](../../buildroot-external/configs/odroid_xu4_defconfig)|[hardkernel](./hardkernel/)|
|Tinker Board |`make tinker` |[tinker](../../buildroot-external/configs/tinker_defconfig)|[asus](./asus/)|
|Generic x86-64 |`make generic_x86_64` |[generic_x86_64](../../buildroot-external/configs/generic_x86_64_defconfig)|[generic-x86-64](./generic-x86-64/)|
|OVA |`make ova` |[ova](../../buildroot-external/configs/ova_defconfig)|[ova](./ova/)|

View File

@@ -0,0 +1,31 @@
# Tinker Board
## Supported Hardware
| Device | Release Date | Support | Config |
|----------------|---------------|---------|----------|
| Tinker RK3288 | April 2017 | yes | [tinker](../../../buildroot-external/configs/tinker_defconfig) |
| Tinker S RK3288| January 2018 | yes | [tinker](../../../buildroot-external/configs/tinker_defconfig) |
| Tinker Edge T | November 2019 | no? | |
| Tinker Edge R | November 2019 | no? | |
## eMMC
eMMC support is provided with the same image. Just flash the image to the eMMC by connecting your Tinker Board S to your PC via Micro-USB. Refer to the Tinkerboard documentation how-to flash using Micro-USB and UMS.
The Home Assistant OS provided U-Boot does support UMS as well,
however manual intervention is necessary:
1. Set the jumper between Micro-USB and HDMI the maskrom mode
2. Insert SD card and connect the board via Micro-USB to your PC
3. Continusly press Ctrl+C to interrupt boot
4. Set the jumper back to the park position
5. Start UMS using:
```
ums 0 mmc 0
```
6. A mass storage device should appear. Flash Home Assistant OS to it.
## Serial console
To access the terminal over serial console, add `console=ttyS2,115200` to `cmdline.txt`. GPIO pins are: 34 = GND / 32 = UART TXD / 33 = UART RXD.

View File

@@ -0,0 +1,61 @@
# Generic x86-64
## Supported Hardware
This board configuration aims to support most x86-64 systems with UEFI boot. The
main aim is to support Intel NUC mini PCs and similar systems. Hardware it has
been tested with is listed below.
## Tested Hardware
| Device | Release Date | Support | Config |
|-----------------------|--------------|---------|-------------|
| Intel NUC5CPYH | Q3 2015 | yes | [generic_x86_64](../../../buildroot-external/configs/generic_x86_64_defconfig) |
| Intel NUC6CAYH | Q4 2016 | yes | [generic_x86_64](../../../buildroot-external/configs/generic_x86_64_defconfig) |
| Intel NUC7i3DNHE | Q3 2017 | yes | [generic_x86_64](../../../buildroot-external/configs/generic_x86_64_defconfig) |
| Intel NUC10i3FNK2 | Q4 2019 | yes | [generic_x86_64](../../../buildroot-external/configs/generic_x86_64_defconfig) |
| Gigabyte GB-BPCE-3455 | 2017 | yes* | [generic_x86_64](../../../buildroot-external/configs/generic_x86_64_defconfig) |
\* needs 'nomodeset' in cmdline.txt if you want a console
## Requirements
- x86-64 support
- UEFI boot
- SATA/AHCI or eMMC storage
- Supported NIC:
- Intel Gigabit NIC (e1000, igb - via Linux mainline)
- Intel PCIe Gigabit NIC (e1000e - via out-of-tree module in *buildroot-external/package/intel-e1000e*)
- Realtek Gigabit NIC (r8169)
- Intel Wireless Wifi 802.11ac (iwlwifi, see below)
## Wifi
The following cards are supported:
- Intel Wireless 3160
- Intel Wireless 7260
- Intel Wireless 7265
- Intel Wireless-AC 3165
- Intel Wireless-AC 3168
- Intel Wireless-AC 8260
- Intel Wireless-AC 8265
- Intel Wireless-AC 9260
- Intel Wireless-AC 9461
- Intel Wireless-AC 9462
- Intel Wireless-AC 9560
## Bluetooth
Bluetooth is untested.
## Installation
Make sure secure boot is disabled in the UEFI BIOS settings.
Currently there is no shiny installation method. Checklist:
- Boot PC to live environment using PXE or USB
- Copy or download the Home Assistant OS image into your live environment
- unxz the image and dd to the local hard disk
- Reboot

View File

@@ -0,0 +1,26 @@
# ODROID
## Supported Hardware
| Device | Release Date | Support | Config |
|----------------|---------------|--------------|-----------|
| ODROID-XU4 | 2015 | yes | [odroid_xu4](../../../buildroot-external/configs/odroid_xu4_defconfig)|
| ODROID-C2 | 2016 | yes | [odroid_c2](../../../buildroot-external/configs/odroid_c2_defconfig) |
| ODROID-C4 | 2020 | experimental | [odroid_c4](../../../buildroot-external/configs/odroid_c4_defconfig) |
| ODROID-N2 | 2019 | yes | [odroid_n2](../../../buildroot-external/configs/odroid_n2_defconfig) |
See separate documentation for each board.
## Connectivity devices
### Wi-Fi
The following devices have been tested on Home Assistant OS 5.8:
- [Bluetooth Module 2](https://www.hardkernel.com/shop/bluetooth-module-2/)
- [WiFi Module 3](https://www.hardkernel.com/shop/wifi-module-3/)
The [WiFi Module 5A](https://www.hardkernel.com/shop/wifi-module-5a/) is not
recommended as there is no upstream driver support available. The driver
currently compatible with recent Linux kernel version seems to have issues
connecting to 5GHz networks.

View File

@@ -0,0 +1,22 @@
# Odroid-C2
## eMMC
eMMC support is provided transparently. Just flash the image to the eMMC board as you would an SD card.
## Console
By default, console access is granted over the serial header and over HDMI. Certain startup messages will only appear on the serial console by default. To show the messages on the HDMI console instead, swap the order of the two consoles in the `cmdline.txt` file on the boot partition. You can also delete the AML0 console if you don't plan on using the serial adapter.
eg. `console=ttyAML0,115200n8 console=tty0`
## USB
A long-standing kernel bug currently results in some odd behavior. To use the USB, a device must be plugged into one of the USB ports at hard boot. If all devices are removed from the USB ports, the USB will cease to function until a reboot.
### OTG
The OTG USB is untested.
## GPIO
Refer to [the odroid wiki](https://wiki.odroid.com/odroid-c2/hardware/expansion_connectors).

View File

@@ -0,0 +1,16 @@
# Odroid-C4
## Experimental
Odroid-C4 support is based heavily on the Odroid-C2 and N2 configurations. Given the similarity of the SoCs, as well as the comparable level of support in the Linux kernel, the C4 should hopefully present few surprises. However, Home Assistant support should be regarded as experimental.
Please also refer to the documentation pages for the [Odroid-C2](./odroid-c2.md) and [Odroid-N2](./odroid-n2.md), as some of that information may apply to the C4 as well.
Common C4 issues that have been specifically tested and appear to be working:
- boot from SD
- boot from eMMC
- MAC address obtained from eFuse
## GPIO
Refer to [the odroid wiki](https://wiki.odroid.com/odroid-c4/hardware/expansion_connectors).

View File

@@ -0,0 +1,18 @@
# Odroid-N2
## eMMC
eMMC support is provided transparently. Just flash the image to the eMMC board as you would an SD card.
## Console
By default, console access is granted over the serial header and over HDMI. Certain startup messages will only appear on the serial console by default. To show the messages on the HDMI console instead, swap the order of the two consoles in the `cmdline.txt` file on the boot partition. You can also delete the AML0 console if you don't plan on using the serial adapter.
eg. `console=ttyAML0,115200n8 console=tty0`
## GPIO
Refer to [the odroid wiki](https://wiki.odroid.com/odroid-n2/hardware/expansion_connectors).
At this point not all functionality is supported by the upstream kernel used
by Home Assistant OS.
The GPIO on pin 11 is used as a low active power button input.

View File

@@ -0,0 +1,29 @@
# ODROID-XU4
## eMMC
The ODROID XU4 uses the eMMC boot partition to boot from. Typically eMMC readers can't write to this eMMC boot partition. There are a couple of possibilities:
1. **Working** e.g. the eMMC already had a working image before flashing HassOS:
- It will be booting to U-Boot (but no further).
- If you have the serial adapter, you should be able to enter `distro_bootcmd` at the uboot prompt to continue booting.
- If not, flash the HassOS image to an SD card and boot off that temporarily (while the eMMC is also plugged in).
- Once booted, login at the prompts and then enter `dd if=/dev/mmcblk0 of=/dev/mmcblk0boot0 bs=512 skip=63 seek=62 count=1440` at the linux prompt.
- Reboot with eMMC (don't forget to flip the boot switch to eMMC)
2. **Not Working** e.g. a clean/wiped/corruped eMMC boot partition:
- You'll need to follow [Hardkernel's instructions](https://forum.odroid.com/viewtopic.php?f=53&t=6173) to get a working boot sector. Then flash HassOS and follow instructions above.
- Alternatively, you can try flash HassOS to both an SD and eMMC, then boot off the SD with the eMMC also plugged in, then run `dd if=/dev/mmcblk1 of=/dev/mmcblk0boot0 bs=512 skip=1 seek=0 count=16381` at the Linux prompt. Note that this is untested, but in theory should work..
If you are getting permissions issues when using the dd command, try disabling RO:
`echo 0 > /sys/block/mmcblk0boot0/force_ro`
to re-enable after running dd:
`echo 1 > /sys/block/mmcblk0boot0/force_ro`
## Console
By default, console access is granted over the serial header and over HDMI. Certain startup messages will only appear on the serial console by default. To show the messages on the HDMI console instead, swap the order of the two consoles in the `cmdline.txt` file on the boot partition. You can also delete the SAC2 console if you don't plan on using the serial adapter.
eg. `console=tty1 console=ttySAC2,115200`
## GPIO
Refer to [the odroid wiki](https://wiki.odroid.com/odroid-xu4/hardware/expansion_connectors).

View File

@@ -0,0 +1,22 @@
# Virtual Machine
## Supported Hypervisors
| Hypervisor | Vendor | Support | Config |
|---------------------|-----------|-----------------|--------------------|
| HyperV | Microsoft | yes, via VMDK | [ova](../../../buildroot-external/configs/ova_defconfig) |
| VirtualBox | Oracle | yes, via VMDK | [ova](../../../buildroot-external/configs/ova_defconfig) |
| VMware | VMware | yes, via VMDK | [ova](../../../buildroot-external/configs/ova_defconfig) |
Currently we only publish a VMDK virtual disk due to issues with our previous OVA distribution. We are investigating our options to bring back the OVA distribution, however, the VMDK works for the hypervisors listed above.
## Requirements
Using this VMDK in a virtual machine requires the following:
- Operating system: Other 4.x or later Linux (64-bit)
- Enabled support for UEFI boot
- SATA disk controller
- Minimal of 1GB RAM
- At least 2x vCPU
- An assigned network

View File

@@ -1,5 +0,0 @@
# Raspberry PI
## Serial console
For access to terminal over serial console, add `console=ttyAMA0,115200` to `cmdline.txt` and `enable_uart=1` into `config.txt`.

View File

@@ -0,0 +1,58 @@
# Raspberry PI
## Supported Hardware
| Device | Release Date | Support | Config |
|---------------------|---------------|-----------------|--------------------|
| Raspberry Pi B/B+/A+|2012/2014/2014 | not recommended | [rpi](../../../buildroot-external/configs/rpi_defconfig) |
| Raspberry Pi 2 B |2015 | not recommended | [rpi2](../../../buildroot-external/configs/rpi2_defconfig) |
| Raspberry Pi Zero |2015 | not recommended | [rpi](../../../buildroot-external/configs/rpi_defconfig) |
| Raspberry Pi Zero W |2017 | not recommended | [rpi0_w](../../../buildroot-external/configs/rpi0_w_defconfig) |
| Raspberry Pi 3 B/B+ |2016/2018 | yes | [rpi3](../../../buildroot-external/configs/rpi3_defconfig) / [rpi3_64](../../../buildroot-external/configs/rpi3_64_defconfig) |
| Raspberry Pi 4 B |2019 | yes* | [rpi4](../../../buildroot-external/configs/rpi4_defconfig) / [rpi4_64](../../../buildroot-external/configs/rpi4_64_defconfig) |
\*1,2 and 4 GiB versions of the Raspberry Pi 4 B are supported. Support for the 8 GiB version is coming soon is part of #740.
## Limitation 64bit
The 64bit version is under development by RPi-Team. It work very nice but it could have some impacts. Actual we see that the SDcard access with ext4 are a bit slower than on 32bit.
## Serial console
For access to terminal over serial console, add `console=ttyAMA0,115200` to `cmdline.txt` and `enable_uart=1`, `dtoverlay=pi3-disable-bt` into `config.txt`. GPIO pins are: 6 = GND / 8 = UART TXD / 10 = UART RXD.
## I2C
Add `dtparam=i2c1=on` and `dtparam=i2c_arm=on` to `config.txt`. After that we create a module file on host with [config usb stick][config] or direct into `/etc/modules-load.d`.
rpi-i2c.conf:
```
i2c-dev
i2c-bcm2708
```
## USB Boot
USB mass storage boot is available on Raspberry Pi 4 (64-bit only), 3B, 3B+, 3A+, and 2B v1.2.
For Raspberry 3B, 3A+ and 2B v1.2, to enable USB boot, add `program_usb_boot_mode=1` into `config.txt`. Note that this **permanently** alters the one-time programmable memory of the device.
For Raspberry 4
* Make sure to update the bootloader to a stable release supporting USB mass storage boot (see [bcm2711_bootloader_config.md](https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711_bootloader_config.md#usbmassstorageboot)).
* If no SD card is used add `sd_poll_once=on` to `dtparam` in `config.txt` (comma separated). This gets rid of `mmc0: timeout waiting for hardware interrupt` kernel errors.
* If install still fails, then your SSD likely needs quirks enabled to work correctly (see [Finding the VID and PID of your USB SSD](https://www.raspberrypi.org/forums/viewtopic.php?t=245931)). Once you find your adapter's ID, add the quirks parameter in `cmdline.txt`.
For more information see [RaspberryPi](https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md).
### Caveats
* All bootable SD cards must be removed.
* Boot time can be significantly longer with USB. This is due to the boot process first attempting to boot from SD card, failing, and resorting to USB.
* Many USB drives simply do not work for boot. This is likely due to minimal driver support in uboot and will not be fixed. If you can't get it to boot on one drive, try a different brand/model. SanDisk Cruzer drives seem to have a higher rate of issues.
## Tweaks
If you don't need bluetooth, disabled it with add `dtoverlay=pi3-disable-bt` into `config.txt`.
[config]: ../../configuration.md#automatic

View File

@@ -1,21 +0,0 @@
# Building
Running `sudo ./enter.sh` will get you into the build Docker container.
`make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external xy_defconfig`
## Scripts
## Helpers
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external xy_defconfig`
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external menuconfig`
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external linux-menuconfig`
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external barebox-menuconfig`
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external busybox-menuconfig`
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external savedefconfig`
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external linux-update-defconfig`
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external barebox-update-defconfig`
- `make -C /build/buildroot BR2_EXTERNAL=/build/buildroot-external busybox-update-config`

View File

@@ -2,28 +2,61 @@
## Automatic
You can format a USB stick with FAT32 and name it with `hassos-config`. The layout could be look like:
```
You can use an USB drive with HassOS to configure network options, SSH access to the host and to install updates.
Format a USB stick with FAT32/EXT4/NTFS and name it `CONFIG` (in all capitals). Alternative you can create a `CONFIG` folder inside the `boot` partition. Use the following directory structure within the USB drive:
```text
network/
modules/
known_hosts
modprobe/
udev/
authorized_keys
timesyncd.conf
hassos-xy.raucb
```
- On `network` folder can hold any kind of NetworkManager connections files.
- The folder `modules` is for modules-load configuration files.
- `known_hosts` file activate debug SSH access of port `22222`.
- For firmware updates you can but the `hassos-*.raucb` OTA update they should be install.
- The `network` folder can contain any kind of NetworkManager connection files. For more information see [Network][network.md].
- The `modules` folder is for modules-load configuration files.
- The `modprobe` folder is for modules configuration files (/etc/modprobe.d)
- The `udev` folder is for udev rules files.
- The `authorized_keys` file activates debug SSH access on port `22222`. See [Debugging Home Assistant][debug-homeassistant].
- The `timesyncd.conf` file allow you to set different NTP servers. HassOS won't boot without correct working time servers!
- The `hassos-*.raucb` file is a firmware OTA update which will be installed. These can be found on on the [release][hassos-release] page.
You can put this USB stick into the device and it will be read on startup and files written to the correct places. You can also trigger this process later over the
API/UI or by calling `systemctl restart hassos-config` on the host. *The USB Stick just needs to be inserted to the device during this setup process and can be disconnected afterwards.*
## Local
### Bootargs
You can edit or create a `cmdline.txt` into your boot partition. That will be read from our bootloader.
You can edit or create a `cmdline.txt` in your boot partition. That will be read from the bootloader.
### Kernel-Module
The kernel module folder `/etc/modules-load.d` is persistent and you can add your config files there. See [Systemd modules load][systemd-modules].
The kernel module folder `/etc/modules-load.d` is persistent and you can add your configuration files there. See [Systemd modules load][systemd-modules]. You can add the modules configuration files in `/etc/modprobe.d` that is also persistent.
### Udev rules
The udev rules folder `/etc/udev/rules.d` is persistent and you can add your configuration files there.
### Network
You can manual add, edit or remove connections configurations from `/etc/NetworkManager/system-connections`.
### NTP
You can manual edit the systemd timesync file on `/etc/systemd/timesyncd.conf`.
Our default NTP configuration look like:
```
[Time]
NTP=time1.google.com time2.google.com time3.google.com
FallbackNTP=0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org
```
[systemd-modules]: https://www.freedesktop.org/software/systemd/man/modules-load.d.html
[network.md]: network.md
[hassos-release]: https://github.com/home-assistant/hassos/releases/
[debug-homeassistant]: https://developers.home-assistant.io/docs/operating-system/debugging

View File

@@ -1,23 +1,22 @@
# Deployment
We know 3 types of release builds:
- development (beta/dev)
- staging (rc)
We provide 3 different types of release builds:
- development (dev)
- staging (beta)
- production (stable)
## Versioning
The format of version is *MAJOR.BUILD*. Everytime we create a new release with same userland, we bump the build number.
The development use here own major number they will be bump for the stable version and the development version go to next major number.
The development number they will be bump for the stable release version and the development version go to next major number.
```
0.x = development
1.x = stable
2.x = development
3.x = stable
```
## Git branch/Tag
## GIT Branch/Tag
The branch `dev` ist the actual development branch and from there we never make a release. The `master` branch hould the development
version from they we build a beta release.
The branch `dev` ist the actual development branch and from there we never make a release. The `master` branch contains the development version and from there we build a beta release.
If we create a new staging/productive release, we create a new branch `rel-{MAJOR}`. They will be used for the hole cycle of this release.
If we create a new productive/staging release, we create a new branch `rel-{MAJOR}`. They will be used for the whole cycle of this release.
## Upload release files
We use [ghr](https://github.com/tcnksm/ghr) to upload files to our repository. A binary version is available inside `scripts`.

View File

@@ -0,0 +1,60 @@
# Development
## Boot system
`BOOT_SYS`:
- efi
- hybrid
- mbr
HassOS is using GPT. But to use GPT we need own the first 1024 of boot drive. Is that's not possible, you can use MBR for your device. This also work with SPLs.
Hybrid and SPL use both a hybrid MBR/GPT table but SPL move the GPT header 8 MB for give space to write SPL and boot images before.
`BOOT_SPL`:
- true
- false
Enable SPL update handling.
`BOOTLOADER`:
- U-Boot
- barebox
We support mainly U-Boot but for UEFI systems we can also use [barebox](https://barebox.org/). In the future, we hope to remove barebox with U-Boot also on UEFI.
`DISK_SIZE`:
Default 2. That is the size of end image in GB.
## Supervisor
`SUPERVISOR_MACHINE`:
- intel-nuc
- odroid-c2
- odroid-c4
- odroid-n2
- odroid-xu
- qemuarm
- qemuarm-64
- qemux86
- qemux86-64
- raspberrypi
- raspberrypi2
- raspberrypi3
- raspberrypi4
- raspberrypi3-64
- raspberrypi4-64
- tinker
`SUPERVISOR_ARCH`:
- amd64
- i386
- armhf
- armv7
- aarch64

View File

@@ -0,0 +1,101 @@
# Getting started with HassOS development using Docker on GNU/Linux
First, install `docker-ce` for your distribution. I'd advise to use your distro's provided packages, since that will make sure permissions et al. are sanely set up for what you are about to run. You're also expected to have your current user properly set up in in your sudoers policy, so that this account may elevate to root and execute arbitrary commands as UID 0 (this is required, since at some point during the build process, a new loopback device-backed filesystem image will be mounted inside a Docker container - which requires a "privileged" container to run, which can only be done as root).
Next, make sure the Docker daemon is running:
```bash
$ sudo systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Docs: https://docs.docker.com
```
My desktop distro doesn't start newly installed services by default, which means I'll have to manually fire up the `docker` service:
```bash
$ sudo systemctl start docker
$ sudo systemctl --no-pager status docker -n0
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: active (running) since Wed 2018-10-10 21:08:23 CEST; 25s ago
Docs: https://docs.docker.com
Main PID: 1531 (dockerd)
Tasks: 27 (limit: 4915)
Memory: 163.4M
CGroup: /system.slice/docker.service
├─1531 /usr/bin/dockerd -H fd://
└─1539 docker-containerd --config /var/run/docker/containerd/containerd.toml
```
Now, change your working directory to your home-assistant/operating-system repository checkout (please adapt path names as needed), make sure your intended changes to the source tree are applied (and committed, ideally :)), and execute the `enter.sh` helper script:
```bash
$ cd ~/codebase/operating-system/
$ sudo scripts/enter.sh
Sending build context to Docker daemon 30.48MB
Step 1/6 : FROM ubuntu:18.04
[...]
---> 4dc25a21556b
Successfully built 4dc25a21556b
Successfully tagged hassbuildroot:latest
```
Note that the current iteration of `enter.sh` will try to load the **overlayfs** kernel module, which is not strictly required for Docker's operation, as far as I can tell. It's OK if loading that module fails; the shell script will continue executing. If everything works out, you will find yourself in an interactive login shell inside your Docker container/build environment, where you can peek around:
```bash
root@somehashinhex:/build#
root@somehashinhex:/build# make help
[...]
```
The HassOS developers provide a `Makefile` that will build HassOS images for a list of targets. For example run the command below to start building the _ova_ variant, and go make a cup of tea. Or fifteen.
```bash
root@0db6f7079872:/build# make ova
[...]
```
That will result in a single VMDK image file at the very end of the build process. This image file is a compressed block device dump with a proper GPT partition table, prepared to ship into any OVA-compatible hypervisor's innards. For me, the end of the **ova** build steps looks like this:
```bash
[...]
2097152+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 12.2145 s, 87.9 MB/s
make: Leaving directory '/build/buildroot'
make: Entering directory '/build/buildroot'
rm -rf /build/buildroot/output/target /build/buildroot/output/images /build/buildroot/output/host \
/build/buildroot/output/build /build/buildroot/output/staging \
/build/buildroot/output/legal-info /build/buildroot/output/graphs
make: Leaving directory '/build/buildroot'
```
The artifacts you just built are placed in the `target/` subdirectory:
```bash
root@fd292c061896:/build# ls -lh release/
total 141M
-rw-r--r-- 1 root root 141M Oct 10 20:22 hassos_ova-2.2.vmdk.gz
```
In order to be able to use this image file with the QEMU hypervisor, you'll need to unpack it, and convert it to an image format that QEMU can work with. Conveniently, the HassOS buildenv already provides all the tools we need for this conversion:
```bash
root@fd292c061896:/build# gunzip release/hassos_ova-2.2.qcow2.gz
root@fd292c061896:/build# ls -lh release/
total 673M
-rw-r--r-- 1 root root 337M Oct 10 20:25 hassos_ova-2.2.qcow2
```
Now, exit the docker container's environment, and find the build artifacts in the `releases/` directory beneath your repository checkout dir. (The generated files will be owned by _root_; make sure to `chown` them to your user account, if needed.)
From there, QEMU can try to boot it. Since the generated image assumes UEFI support in the host/hypervisor, this is slightly more tricky than with "classic"(/legacy) MBR-based images. On the *Debian* host I use to run my QEMU virtual machine on, you'll need to install the **ovmf** package which provides the "UEFI firmware for 64-bit x86 virtual machines". That package will install a **TianoCore**-derived QEMU UEFI image build at `/usr/share/OVMF/OVMF_CODE.fd`, which we'll use with QEMU to boot the generated qcow2 image. (Please adapt path names as necessary, for example if you have installed the ovmf firmware image at another location.)
```bash
$ /usr/bin/qemu-system-x86_64 -enable-kvm -name hassos_ova -smp 2 -m 1024 -drive file=release/hassos_ova-2.2.qcow2,index=0,media=disk,if=ide,cache=none,format=qcow2 -drive file=/usr/share/ovmf/x64/OVMF_CODE.fd,if=pflash,format=raw,readonly=on
```
This should pop up QEMU's SDL frontend, displaying _hassos_' VT/CLI environment. Specifying additional options and flags to QEMU for network access, keyboard layout et al. are left as an exercise for the reader.
After the boot process has finished, you can log in to _hassos_ without a password, providing *root* as the username. From there, executing `login` on the *ha>* shell prompt will yield a root shell in the host OS.

19
Documentation/kernel.md Normal file
View File

@@ -0,0 +1,19 @@
# Kernel Version
Default Kernel tree: 5.10
| Board | Version |
|-------|---------|
| Open Virtual Appliance | 5.10.42 |
| Raspberry Pi | 5.10.17 |
| Raspberry Pi 0-W | 5.10.17 |
| Raspberry Pi 2 | 5.10.17 |
| Raspberry Pi 3 | 5.10.17 |
| Raspberry Pi 4 | 5.10.17 |
| Tinker Board | 5.10.42 |
| Odroid-C2 | 5.10.42 |
| Odroid-C4 | 5.10.42 |
| Odroid-N2 | 5.9.16 |
| Odroid-XU4 | 5.10.42 |
| Generic x86-64 | 5.10.42 |

185
Documentation/network.md Normal file
View File

@@ -0,0 +1,185 @@
# Network
Home Assistant Operating System uses NetworkManager to control the host network.
## Configure network
By default the device will be in DHCP state.
Basic network settings can be set through the Supervisor frontend in the System
tab. Advanced configurations such as VLAN are also available through the
`ha network` CLI command.
To restore the default configuration the `ha network` CLI command can be used as
well:
```
ha network update default --ipv4-method auto
```
If more advanced network settings are required network connection files can be
placed on a USB drive and imported to the host as described in
[Configuration][configuration-usb].
## Manual Network Configuration
If the frontend or `ha network` CLI cannot meet your use case, it is still
possible to configure the underlying NetworkManager manually.
You can read the [NetworkManager manual][nm-manual] or find many configuration
examples across the internet. Note that changes to `NetworkManager.conf` are
not supported currently, only connection keyfiles are supported. Keep in mind
that the system is read-only. If you don't want the IP address to change on
every boot, you should modify the UUID property to a generic [UUID4][uuid].
Inside the `\CONFIG\network\` directory on the USB drive or SD card, create a
file called `my-network` and add the appropriate contents below:
**NOTE: Please make sure to save this file with UNIX line endings (LF, and not Windows' default CRLF endings). You can do this using Notepad these days!**
### Default
A preinstalled connection profile for wired network is active by default:
```ini
[connection]
id=Home Assistant OS default
uuid=f62bf7c2-e565-49ff-bbfc-a4cf791e6add
type=802-3-ethernet
llmnr=2
mdns=2
[ipv4]
method=auto
[ipv6]
addr-gen-mode=stable-privacy
method=auto
```
### Wired connection to the LAN
```ini
[connection]
id=my-network
uuid=d55162b4-6152-4310-9312-8f4c54d86afa
type=802-3-ethernet
llmnr=2
mdns=2
[ipv4]
method=auto
[ipv6]
addr-gen-mode=stable-privacy
method=auto
```
### Wireless LAN WPA/PSK
```ini
[connection]
id=my-network
uuid=72111c67-4a5d-4d5c-925e-f8ee26efb3c3
type=802-11-wireless
[802-11-wireless]
mode=infrastructure
ssid=MY_SSID
# Uncomment below if your SSID is not broadcasted
#hidden=true
[802-11-wireless-security]
auth-alg=open
key-mgmt=wpa-psk
psk=MY_WLAN_SECRET_KEY
[ipv4]
method=auto
[ipv6]
addr-gen-mode=stable-privacy
method=auto
```
### Static IP
Replace the following configuration:
```ini
[ipv4]
method=manual
address=192.168.1.111/24;192.168.1.1
dns=8.8.8.8;8.8.4.4;
```
For `address`, the value before the semicolon is the IP address and subnet prefix bitlength. The second value (after the semicolon) is the IP address of the local gateway.
## Tips
### Reset network
If you want to reset the network configuration back to the default connection
profile using DHCP, use the following commands on the host console:
```bash
# rm -r /mnt/overlay/etc/NetworkManager/system-connections
# reboot
```
Home Assistant OS will recreate the default connection profile during boot.
### Powersave
If you have trouble with powersave then apply the following changes:
```ini
[wifi]
# Values are 0 (use default), 1 (ignore/don't touch), 2 (disable) or 3 (enable).
powersave=0
```
## Using `nmcli` to set a static IPv4 address
Log into the the Home Assistant OS base system via a console:
```bash
Welcome to Home Assistant
homeassistant login:
```
- Login as `root` (no password needed). At the `ha >` prompt, type `login` (as instructed).
From there you use the `nmcli` configuration tool.
- `# nmcli con show` will list the "Home Assistant OS default" connection in use.
- `# nmcli con show "Home Assistant OS default"` will list all the properties of the connection.
To start editing the configuration setting for "Home Assistant OS default":
```bash
# nmcli con edit "Home Assistant OS default"
```
To add your static IP address (select 'yes' for manual method);
```bash
nmcli> set ipv4.addresses 192.168.100.10/24
Do you also want to set 'ipv4.method' to 'manual'? [yes]:
```
In addition, it's recommended to set the DNS server and the local gateway. For most home routers the DNS server will have the same IP address as the router itself. If you are using Pi-Hole or a third-party DNS system then you can set the DNS server to that.
```bash
nmcli> set ipv4.dns 192.168.100.1
nmcli> set ipv4.gateway 192.168.100.1
```
`nmcli> print ipv4` will show you the IPv4 properties of this connection. With `nmcli> save` you will save the changes afterwards.
If you now view the default connection `cat /etc/NetworkManager/system-connections/default` you should see the method is manual and the address is set.
Doing a `nmcli con reload` does not always work, so restart the virtual machine or the physical system.
[nm-manual]: https://developer.gnome.org/NetworkManager/stable/manpages.html
[configuration-usb]: configuration.md
[uuid]: https://www.uuidgenerator.net/

View File

@@ -0,0 +1,81 @@
# Partition
The partition layout is a bit different than the typical setup. We prefer GPT, if possible. With SoCs which don't support GPT, we use a hybrid GPT. For more details about this topic, please refer to the [development](development.md) documentation.
The system is designed to have as few write operations to the storage media as possible. This means that we only write during the OTA updates and 5-6 times per week on the overlay partition. The data partition receives the main I/O operations and for this reason is ideal for placing on a different drive.
A visual representation looks like this:
```text
-------------------------
| Bootloader |
-------------------------
| Kernel A |
-------------------------
| System A |
| |
-------------------------
| Kernel B |
-------------------------
| System B |
| |
-------------------------
| Bootstate |
-------------------------
| Overlay |
| |
...
-------------------------
| Data |
| |
-------------------------
```
Sometime the bootloader part can look different because there can be firmware or SPLs for boot the CPU on the SoC.
## Data disk
![Data-Disk preview](./usb-disk.png)
The data partition is the only partition with real I/O. It will be expanded automatically at boot to the full size of the disk.
## Using datactl to move the data partition.
In a Home Assistant OS installation, the data is stored on the `/mnt/data` partition of the SD card. This is the only read+write partition on the SD drive. Using the `datactl` move command, this partition can be moved off of the SD card onto an externally connected drive, leaving the rest of the read-only system on the SD.
The storage capacity of the external drive must be larger than the storage capacity of the existing SD card.
The command needs to be run from the host console by either connecting a keyboard and monitor or making use of the [debug ssh access](https://developers.home-assistant.io/docs/operating-system/debugging/) over port 22222. The command will not work from within an SSH add-on container.
Log in as `root` to get to the Home Assistant CLI and then enter `login` to continue to the host.
Confirm your USB SSD/HD is connected and recognized using `fdisk -l`.
With the drive connected, use the following command (replacing sdx with your drive, without a partition number):
```sh
$ datactl move /dev/sdx
```
Enter "yes" to confirm the operation. This will prepare the disk, however, the
actual move will be running on next reboot. This will make the first boot significantly longer than usual; please be patient. Reboot with the following command:
```sh
$ ha host reboot
```
Once complete, the external drive
will contain the data and will need to be plugged in to successfully boot Home
Assistant.
## Check if the move was succesful.
Within the Home Assistant interface you won't see if the move was succesful. To check this, go to your host console again (as described above) and enter:
```sh
$ systemctl status mnt-data.mount
```
If the data partition was moved to your USB drive you should see ```sh Active: active (mounted) ``` in the output. Also, it will show, which drive got mounted as /mnt/data (```sh Where ``` and ```sh what ``` section of the output)
## Check Power Supply Rating
Using an USB attached SSD can draw quite some power. For instance on Raspberry Pi 3 the official Raspberry Pi power supply (PSU) only provides 2.5A which can be too tight. Use a power supply which can at least provide 3.5A. Alternatively use a powered USB hub. Connect the Hub to one of the USB slots of your Raspberry Pi, and connect the SSD to the Hub. The power supply that came with the Hub will power the attached device(s).

BIN
Documentation/usb-disk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

53
Makefile Normal file
View File

@@ -0,0 +1,53 @@
BUILDDIR:=$(shell pwd)
RELEASE_DIR = $(BUILDDIR)/release
BUILDROOT=$(BUILDDIR)/buildroot
BUILDROOT_EXTERNAL=$(BUILDDIR)/buildroot-external
DEFCONFIG_DIR = $(BUILDROOT_EXTERNAL)/configs
VERSION_DATE := $(shell date --utc +'%Y%m%d')
VERSION_DEV := "dev$(VERSION_DATE)"
TARGETS := $(notdir $(patsubst %_defconfig,%,$(wildcard $(DEFCONFIG_DIR)/*_defconfig)))
TARGETS_CONFIG := $(notdir $(patsubst %_defconfig,%-config,$(wildcard $(DEFCONFIG_DIR)/*_defconfig)))
# Set O variable if not already done on the command line
ifneq ("$(origin O)", "command line")
O := $(BUILDROOT)/output
else
override O := $(BUILDROOT)/$(O)
endif
.NOTPARALLEL: $(TARGETS) $(TARGETS_CONFIG) all
.PHONY: $(TARGETS) $(TARGETS_CONFIG) all clean help
all: $(TARGETS)
$(RELEASE_DIR):
mkdir -p $(RELEASE_DIR)
$(TARGETS_CONFIG): %-config:
@echo "config $*"
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) "$*_defconfig"
$(TARGETS): %: $(RELEASE_DIR) %-config
@echo "build $@"
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) VERSION_DEV=$(VERSION_DEV)
cp -f $(O)/images/haos_* $(RELEASE_DIR)/
# Do not clean when building for one target
ifneq ($(words $(filter $(TARGETS),$(MAKECMDGOALS))), 1)
@echo "clean $@"
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) clean
endif
@echo "finished $@"
clean:
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=$(BUILDROOT_EXTERNAL) clean
help:
@echo "Supported targets: $(TARGETS)"
@echo "Run 'make <target>' to build a target image."
@echo "Run 'make all' to build all target images."
@echo "Run 'make clean' to clean the build output."
@echo "Run 'make <target>-config' to configure buildroot for a target."

View File

@@ -1,14 +1,58 @@
# HassOS
Hass.io OS based on [buildroot](https://buildroot.org/). It's a hypervisor for Docker and supports various kind of IoT hardware. It is also available as virtual appliance. The whole system is optimized for embedded system and security. You can update the system simple with OTA updates or offline updates.
# Home Assistant Operating System
## Focus
Home Assistant Operating System (formerly HassOS) is an operating system optimized for hosting [Home Assistant](https://www.home-assistant.io) and its [Add-ons](https://www.home-assistant.io/addons/).
- Linux kernel 4.14 (LT)
- Barebox as bootloader on EFI
- U-Boot as bootloader on IoT
- RAUC for OTA updates
- SquashFS LZ4 as filesystem
- Docker 18.03.1
- AppArmor protected
- ZRAM LZ4 for /tmp, /var, swap
- Run every supervisor
Home Assistant Operating System uses Docker as Container engine. It by default deploys the Home Assistant Supervisor as a container. Home Assistant Supervisor in turn uses the Docker container engine to control Home Assistant Core and Add-Ons in separate containers. Home Assistant Operating System is **not** based on a regular Linux distribution like Ubuntu. It is built using [buildroot](https://buildroot.org/) and it is optimized for running Home Assistant, especially on single board compute (SBC) devices like the Pi, ODROID, NUC and Tinker Board (see supported hardware below).
## Features
- Lightweight and memory-efficient
- Minimized I/O
- Over The Air (OTA) updates
- Offline updates
- Modular using Docker
## Supported hardware
- Raspberry Pi
- Hardkernel ODROID
- Intel NUC
- Asus Tinker Board
- Virtual appliances
See the full list and specific models [here](./Documentation/boards/README.md)
## Getting Started
If you just want to use Home Assistant the official [getting started guide](https://www.home-assistant.io/getting-started/) and [installation instructions](https://www.home-assistant.io/hassio/installation/) take you through how to download Home Assistant Operating System and get it running on your machine.
If you're interested in finding out more about Home Assistant Operating System and how it works read on...
## HassOS components
- **Bootloader:**
- [Barebox](https://barebox.org/) for devices that support EFI
- [U-Boot](https://www.denx.de/wiki/U-Boot) for devices that don't support EFI
- **Operating System:**
- [Buildroot](https://buildroot.org/) LTS Linux
- **File Systems:**
- [SquashFS](https://www.kernel.org/doc/Documentation/filesystems/squashfs.txt) for read-only file systems (using LZ4 compression)
- [ZRAM](https://www.kernel.org/doc/Documentation/blockdev/zram.txt) for `/tmp`, `/var` and swap (using LZ4 compression)
- **Container Platform:**
- [Docker Engine](https://docs.docker.com/engine/) for running Home Assistant components in containers
- **Updates:**
- [RAUC](https://rauc.io/) for Over The Air (OTA) and USB updates
- **Security:**
- [AppArmor](https://apparmor.net/) Linux kernel security module
If you don't have experience with these, embedded systems, buildroot or the build process for Linux distributions, then please read up on these topics. The rest of the documentation in this project is for developers and assumes you have experience with embedded systems or a strong understanding of the internal workings of operating systems.
## Developer Documentation
All developer documentation is in the [Documentation](./Documentation) directory.
### Development builds
The Development build GitHub Action Workflow is a manually triggered workflow
which creates Home Assistant OS development builds. The development builds are
available at [os-builds.home-assistant.io](https://os-builds.home-assistant.io/).

View File

@@ -1,3 +1,13 @@
source "$BR2_EXTERNAL_HASSOS_PATH/package/hassos/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/libapparmor/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/apparmor/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/hassio/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/bluetooth-bcm43xx/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/bluetooth-rtl8723/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/hardkernel-boot/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/qemu-guest-agent/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/intel-e1000e/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/rpi-eeprom/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/rtl8812au/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/os-agent/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/udisks2/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/eq3_char_loop/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/generic_raw_uart/Config.in"
source "$BR2_EXTERNAL_HASSOS_PATH/package/rpi-rf-mod/Config.in"

View File

@@ -0,0 +1,29 @@
#!/bin/bash
# shellcheck disable=SC2155
function hassos_pre_image() {
local BOOT_DATA="$(path_boot_dir)"
local SPL_IMG="$(path_spl_img)"
cp -t "${BOOT_DATA}" \
"${BINARIES_DIR}/boot.scr" \
"${BINARIES_DIR}/rk3288-tinker.dtb" \
"${BINARIES_DIR}/rk3288-tinker-s.dtb"
mkdir -p "${BOOT_DATA}/overlays"
cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/"
cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt"
echo "console=tty1" > "${BOOT_DATA}/cmdline.txt"
# SPL
create_spl_image
dd if="${BINARIES_DIR}/idbloader.img" of="${SPL_IMG}" conv=notrunc bs=512 seek=64
dd if="${BINARIES_DIR}/u-boot-dtb.img" of="${SPL_IMG}" conv=notrunc bs=512 seek=8192
}
function hassos_post_image() {
convert_disk_image_xz
}

View File

@@ -0,0 +1,2 @@
# Uncomment this to enable GPIO support for RPI-RF-MOD/HM-MOD-RPI-PCB
#overlays=rpi-rf-mod

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,10 @@
BOARD_ID=tinker
BOARD_NAME="Asus TinkerBoard"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=zImage
BOOT_SYS=hyprid
BOOT_SPL=true
BOOT_ENV_SIZE=0x8000
SUPERVISOR_MACHINE=tinker
SUPERVISOR_ARCH=armv7

View File

@@ -0,0 +1,5 @@
## Kernel
https://github.com/armbian/build/tree/master/patch/kernel/rockchip-next
## u-boot
https://github.com/armbian/build/tree/master/patch/u-boot/u-boot-rockchip/board_tinkerboard

View File

@@ -0,0 +1,64 @@
From 2ae3821fd824560ef2db3c87cfbec985177911f6 Mon Sep 17 00:00:00 2001
Message-Id: <2ae3821fd824560ef2db3c87cfbec985177911f6.1599249626.git.stefan@agner.ch>
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
Date: Mon, 5 Nov 2018 22:03:26 +0100
Subject: [PATCH 1/2] ARM: DTS: rk3288-tinker: Setup the Bluetooth UART pins
The most essential being the RTS pin, which is clearly needed to
upload the initial configuration into the Realtek Bluetooth
chip, and make the Bluetooth chip work.
Now, the Bluetooth chip also needs 3 other GPIOS to be enabled.
I'll see how I do that through the DTS file in a near future.
The 3 GPIOS being :
Bluetooth Reset : <&gpio4 29 GPIO_ACTIVE_HIGH>
Bluetooth Wake : <&gpio4 26 GPIO_ACTIVE_HIGH>
Bluetooth Wake_Host_IRQ : <&gpio4 31 GPIO_ACTIVE_HIGH>
These are currently setup manually, through scripts. But it seems that
GPIO handling through /sys entries might not be possible in the long
term, the replacement being libgpio.
Anyway, if you're interesting in enabling the Bluetooth GPIO by hand,
here are the commands :
cd /sys/class/gpio &&
echo 146 > export &&
echo 149 > export &&
echo 151 > export &&
echo high > gpio146/direction &&
echo high > gpio149/direction &&
echo high > gpio151/direction
Resetting the chip is done like this :
echo "Resetting the Bluetooth chip"
cd /sys/class/gpio/gpio149 &&
echo 0 > value &&
sleep 1 &&
echo 1 > value &&
sleep 1
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
[move change to rk3288-tinker.dtsi]
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm/boot/dts/rk3288-tinker.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
index acfaa12ec239..284e7982925d 100644
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
@@ -492,6 +492,8 @@ &tsadc {
};
&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
status = "okay";
};
--
2.28.0

View File

@@ -0,0 +1,55 @@
From 3f3c4cd047234fb94de4d6b701d05ff0450890cf Mon Sep 17 00:00:00 2001
Message-Id: <3f3c4cd047234fb94de4d6b701d05ff0450890cf.1613588152.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Wed, 17 Feb 2021 19:55:41 +0100
Subject: [PATCH] Revert "ARM: dts: rockchip: use DMA channels for UARTs for
RK3288"
This reverts commit 3425fe335c29310f6628faf9a7947d07f32d8962.
---
arch/arm/boot/dts/rk3288.dtsi | 8 --------
1 file changed, 8 deletions(-)
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 8fa80facc8cd..8636d95c45e1 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -422,8 +422,6 @@ uart0: serial@ff180000 {
reg-io-width = <4>;
clocks = <&cru SCLK_UART0>, <&cru PCLK_UART0>;
clock-names = "baudclk", "apb_pclk";
- dmas = <&dmac_peri 1>, <&dmac_peri 2>;
- dma-names = "tx", "rx";
pinctrl-names = "default";
pinctrl-0 = <&uart0_xfer>;
status = "disabled";
@@ -437,8 +435,6 @@ uart1: serial@ff190000 {
reg-io-width = <4>;
clocks = <&cru SCLK_UART1>, <&cru PCLK_UART1>;
clock-names = "baudclk", "apb_pclk";
- dmas = <&dmac_peri 3>, <&dmac_peri 4>;
- dma-names = "tx", "rx";
pinctrl-names = "default";
pinctrl-0 = <&uart1_xfer>;
status = "disabled";
@@ -465,8 +461,6 @@ uart3: serial@ff1b0000 {
reg-io-width = <4>;
clocks = <&cru SCLK_UART3>, <&cru PCLK_UART3>;
clock-names = "baudclk", "apb_pclk";
- dmas = <&dmac_peri 7>, <&dmac_peri 8>;
- dma-names = "tx", "rx";
pinctrl-names = "default";
pinctrl-0 = <&uart3_xfer>;
status = "disabled";
@@ -480,8 +474,6 @@ uart4: serial@ff1c0000 {
reg-io-width = <4>;
clocks = <&cru SCLK_UART4>, <&cru PCLK_UART4>;
clock-names = "baudclk", "apb_pclk";
- dmas = <&dmac_peri 9>, <&dmac_peri 10>;
- dma-names = "tx", "rx";
pinctrl-names = "default";
pinctrl-0 = <&uart4_xfer>;
status = "disabled";
--
2.30.1

View File

@@ -0,0 +1,55 @@
From fc25c993bf2feb6e66d55bf03eb725ec688e47eb Mon Sep 17 00:00:00 2001
Message-Id: <fc25c993bf2feb6e66d55bf03eb725ec688e47eb.1599250914.git.stefan@agner.ch>
In-Reply-To: <2ae3821fd824560ef2db3c87cfbec985177911f6.1599250914.git.stefan@agner.ch>
References: <2ae3821fd824560ef2db3c87cfbec985177911f6.1599250914.git.stefan@agner.ch>
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
Date: Mon, 5 Nov 2018 22:15:14 +0100
Subject: [PATCH 2/3] ARM: DTS: rk3288-tinker: Defining the SPI interface
Taken from, and tested by @TonyMac32 .
Well, the original one was tested by him but I had to adapt the
registers definitions to the new 64-bits LPAE-compliant syntax.
Therefore that *might* break, along with a few other patches.
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
[move change to rk3288-tinker.dtsi]
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm/boot/dts/rk3288-tinker.dtsi | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
index 284e7982925d..d6cc66ab5bb1 100644
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
@@ -485,6 +485,25 @@ &sdio0 {
status = "okay";
};
+&spi2 {
+ max-freq = <50000000>;
+ status = "okay";
+
+ spidev@0 {
+ compatible = "rockchip,spi_tinker";
+ reg = <0x0 0>;
+ spi-max-frequency = <50000000>;
+ spi-cpha = <1>;
+ };
+
+ spidev@1 {
+ compatible = "rockchip,spi_tinker";
+ reg = <0x1>;
+ spi-max-frequency = <50000000>;
+ spi-cpha = <1>;
+ };
+};
+
&tsadc {
rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
--
2.28.0

View File

@@ -0,0 +1,41 @@
From 3a9d71847ae869ffdb2b0818aa86a36d57d96331 Mon Sep 17 00:00:00 2001
Message-Id: <3a9d71847ae869ffdb2b0818aa86a36d57d96331.1599250914.git.stefan@agner.ch>
In-Reply-To: <2ae3821fd824560ef2db3c87cfbec985177911f6.1599250914.git.stefan@agner.ch>
References: <2ae3821fd824560ef2db3c87cfbec985177911f6.1599250914.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Fri, 4 Sep 2020 21:57:55 +0200
Subject: [PATCH 3/3] ARM: dts: rockchip: enable I2C1/4 on rk3288-tinker
Enable I2C devices which are accessible via 40-pin header.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm/boot/dts/rk3288-tinker.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
index d6cc66ab5bb1..7af5818ac77c 100644
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
@@ -344,10 +344,18 @@ regulator-state-mem {
};
};
+&i2c1 {
+ status = "okay";
+};
+
&i2c2 {
status = "okay";
};
+&i2c4 {
+ status = "okay";
+};
+
&i2c5 {
status = "okay";
};
--
2.28.0

View File

@@ -0,0 +1,31 @@
From 062488e4b8fd552c01e1104b3bc91a6f7ffe6c41 Mon Sep 17 00:00:00 2001
From: Myy Miouyouyou <myy@miouyouyou.fr>
Date: Thu, 19 Oct 2017 21:24:47 +0200
Subject: [PATCH 10/28] RK3288: DTSI: rk3288.dtsi: Add missing SPI2 pinctrl
The spi2_cs1 pin reference is missing in the spi2 first pin control
definition.
This patch is taken from the patches provided by the ARMbian team.
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
---
arch/arm/boot/dts/rk3288.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 5b789528..9ed532cc 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -334,7 +334,7 @@
dma-names = "tx", "rx";
interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
pinctrl-names = "default";
- pinctrl-0 = <&spi2_clk &spi2_tx &spi2_rx &spi2_cs0>;
+ pinctrl-0 = <&spi2_clk &spi2_tx &spi2_rx &spi2_cs0 &spi2_cs1>;
reg = <0x0 0xff130000 0x0 0x1000>;
#address-cells = <1>;
#size-cells = <0>;
--
2.11.0

View File

@@ -0,0 +1,98 @@
From d5d5c53173c484a13cda62a537cbf75a5df4b0e4 Mon Sep 17 00:00:00 2001
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
Date: Mon, 5 Nov 2018 21:58:56 +0100
Subject: [PATCH] ARM: DTS: rk3288-tinker: Enabling SDIO and Wifi
Adding the appropriate nodes in order to exploit the WiFi capabilities
of the board.
Since these capabilities are provided through SDIO, and the SDIO
nodes were not defined, these were added too.
These seems to depend on each other so they are added in one big
patch.
Split if necessary.
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
---
arch/arm/boot/dts/rk3288-tinker.dts | 62 +++++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
diff --git a/arch/arm/boot/dts/rk3288-tinker.dts b/arch/arm/boot/dts/rk3288-tinker.dts
index 1e43527aa..d4df13bed 100644
--- a/arch/arm/boot/dts/rk3288-tinker.dts
+++ b/arch/arm/boot/dts/rk3288-tinker.dts
@@ -6,8 +6,70 @@
/dts-v1/;
#include "rk3288-tinker.dtsi"
+#include <dt-bindings/clock/rockchip,rk808.h>
/ {
model = "Rockchip RK3288 Asus Tinker Board";
compatible = "asus,rk3288-tinker", "rockchip,rk3288";
+
+ /* This is essential to get SDIO devices working.
+ The Wifi depends on SDIO ! */
+ sdio_pwrseq: sdio-pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ clocks = <&rk808 RK808_CLKOUT1>;
+ clock-names = "ext_clock";
+ pinctrl-names = "default";
+ pinctrl-0 = <&chip_enable_h>, <&wifi_enable_h>;
+
+ /*
+ * On the module itself this is one of these (depending
+ * on the actual card populated):
+ * - SDIO_RESET_L_WL_REG_ON
+ * - PDN (power down when low)
+ */
+ reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>, <&gpio4 27 GPIO_ACTIVE_LOW>;
+ };
+
+ wireless-wlan {
+ compatible = "wlan-platdata";
+ rockchip,grf = <&grf>;
+ sdio_vref = <1800>;
+ status = "okay";
+ wifi_chip_type = "8723bs";
+ WIFI,host_wake_irq = <&gpio4 30 GPIO_ACTIVE_HIGH>;
+ };
+};
+
+&io_domains {
+ wifi-supply = <&vcc_18>;
+};
+
+&pinctrl {
+ sdio-pwrseq {
+ wifi_enable_h: wifienable-h {
+ rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ chip_enable_h: chip-enable-h {
+ rockchip,pins = <4 27 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+};
+
+&sdio0 {
+ bus-width = <4>;
+ cap-sd-highspeed;
+ cap-sdio-irq;
+ clock-frequency = <50000000>;
+ clock-freq-min-max = <200000 50000000>;
+ disable-wp;
+ keep-power-in-suspend;
+ mmc-pwrseq = <&sdio_pwrseq>;
+ non-removable;
+ num-slots = <1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
+ sd-uhs-sdr104;
+ status = "okay";
+ supports-sdio;
};
--
2.16.4

View File

@@ -0,0 +1,28 @@
From ebc29962ac27264772a4227f5abd6900cb72fa79 Mon Sep 17 00:00:00 2001
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
Date: Mon, 5 Nov 2018 20:16:05 +0100
Subject: [PATCH] ARM: DTSI: rk3288-tinker: Improving the CPU max voltage
Taken from the various patches provided by @TonyMac32 .
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
---
arch/arm/boot/dts/rk3288-tinker.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
index aa107ee41..3da1c830f 100644
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
@@ -164,7 +164,7 @@
regulator-always-on;
regulator-boot-on;
regulator-min-microvolt = <750000>;
- regulator-max-microvolt = <1400000>;
+ regulator-max-microvolt = <1450000>;
regulator-name = "vdd_arm";
regulator-ramp-delay = <6000>;
regulator-state-mem {
--
2.16.4

View File

@@ -0,0 +1,116 @@
From 302cd9b8a9f1f8a7735fabea3b9a7645dc40f9cc Mon Sep 17 00:00:00 2001
From: Myy Miouyouyou <myy@miouyouyou.fr>
Date: Sun, 7 Jan 2018 01:52:44 +0100
Subject: [PATCH] drivers: mmc: dw-mci-rockchip: Handle ASUS Tinkerboard reboot
On ASUS Tinkerboard systems, if the SDMMC hardware is shutdown before
rebooting, the system will be dead, as the SDMMC is the only way to
boot anything, and the hardware doesn't power up the SDMMC hardware
automatically when rebooting.
So, when using an ASUS Tinkerboard system, a new reboot handler is
installed. This reboot handler takes care of powering the SDMMC
hardware again before restarting the system, resolving the issue.
The code was inspired by the pwrseq_emmc.c, which seems to overcome
similar effects with eMMC hardware.
Signed-off-by: Myy Miouyouyou <myy@miouyouyou.fr>
---
drivers/mmc/host/dw_mmc-rockchip.c | 66 ++++++++++++++++++++++++++++++++++++++
1 file changed, 66 insertions(+)
diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c
index a3f1c2b30..7eac1f221 100644
--- a/drivers/mmc/host/dw_mmc-rockchip.c
+++ b/drivers/mmc/host/dw_mmc-rockchip.c
@@ -16,6 +16,11 @@
#include <linux/pm_runtime.h>
#include <linux/slab.h>
+#include <linux/regulator/consumer.h>
+#include <linux/reboot.h>
+#include <linux/delay.h>
+#include "../core/core.h"
+
#include "dw_mmc.h"
#include "dw_mmc-pltfm.h"
@@ -334,6 +339,66 @@ static const struct of_device_id dw_mci_rockchip_match[] = {
};
MODULE_DEVICE_TABLE(of, dw_mci_rockchip_match);
+struct dw_mci_rockchip_broken_boards_data {
+ struct notifier_block reset_nb;
+ struct platform_device *pdev;
+};
+
+/* This reboot handler handles cases where disabling the SDMMC on
+ * reboot will cause the hardware to be unable to start correctly
+ * after rebooting.
+ *
+ * This happens with Tinkerboard systems...
+ */
+static int dw_mci_rockchip_broken_boards_reset_nb(
+ struct notifier_block *this,
+ unsigned long mode, void *cmd)
+{
+ struct dw_mci_rockchip_broken_boards_data const *data =
+ container_of(this,
+ struct dw_mci_rockchip_broken_boards_data,
+ reset_nb);
+ struct dw_mci *host = platform_get_drvdata(data->pdev);
+ struct mmc_host *mmc = host->slot->mmc;
+
+ printk(KERN_ERR "Meow.\n");
+
+ mmc_power_off(mmc);
+
+ mdelay(20);
+
+ if (!IS_ERR(mmc->supply.vmmc))
+ regulator_enable(mmc->supply.vmmc);
+
+ if (!IS_ERR(mmc->supply.vqmmc))
+ regulator_set_voltage(mmc->supply.vqmmc, 3000000, 3300000);
+
+ printk(KERN_ERR "woeM.\n");
+
+ return NOTIFY_DONE;
+}
+
+static void dw_mci_rockchip_register_broken_boards_reboot_handler(
+ struct platform_device *pdev)
+{
+ struct dw_mci_rockchip_broken_boards_data *data;
+
+ if (!of_machine_is_compatible("asus,rk3288-tinker"))
+ return;
+
+ data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
+
+ if (!data)
+ return;
+
+ data->reset_nb.notifier_call =
+ dw_mci_rockchip_broken_boards_reset_nb;
+ data->reset_nb.priority = 255;
+ register_restart_handler(&data->reset_nb);
+
+ data->pdev = pdev;
+}
+
static int dw_mci_rockchip_probe(struct platform_device *pdev)
{
const struct dw_mci_drv_data *drv_data;
@@ -361,6 +426,7 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev)
}
pm_runtime_put_autosuspend(&pdev->dev);
+ dw_mci_rockchip_register_broken_boards_reboot_handler(pdev);
return 0;
}
--
2.14.1

View File

@@ -0,0 +1,19 @@
diff --git a/sound/usb/card.c b/sound/usb/card.c
index 2bfe4e80a..cea93aaf5 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -382,6 +382,14 @@ static void usb_audio_make_shortname(struct usb_device *dev,
}
strim(card->shortname);
+
+ /* Tinker Board ALC4040 CODEC */
+
+ if(USB_ID_VENDOR(chip->usb_id) == 0x0bda &&
+ USB_ID_PRODUCT(chip->usb_id) == 0x481a) {
+ strlcat(card->shortname, " OnBoard", sizeof(card->shortname));
+ }
+
}
static void usb_audio_make_longname(struct usb_device *dev,

View File

@@ -0,0 +1,37 @@
From 983121a741192153492a61befc0e0fc61b9f8b14 Mon Sep 17 00:00:00 2001
Message-Id: <983121a741192153492a61befc0e0fc61b9f8b14.1617731428.git.stefan@agner.ch>
From: Pascal Vizeli <pvizeli@syshack.ch>
Date: Fri, 24 Apr 2020 12:41:50 +0000
Subject: [PATCH 1/2] SPL: modify load address of U-Boot
Default load address of U-Boot is at sector 16384, which is where HAOS
has its first partition. Use 0x2000 (8192) instead.
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
configs/tinker-rk3288_defconfig | 1 +
configs/tinker-s-rk3288_defconfig | 1 +
2 files changed, 2 insertions(+)
diff --git a/configs/tinker-rk3288_defconfig b/configs/tinker-rk3288_defconfig
index 8686a66d13..c3363821dd 100644
--- a/configs/tinker-rk3288_defconfig
+++ b/configs/tinker-rk3288_defconfig
@@ -88,3 +88,4 @@ CONFIG_VIDEO_ROCKCHIP=y
CONFIG_DISPLAY_ROCKCHIP_HDMI=y
CONFIG_CMD_DHRYSTONE=y
CONFIG_ERRNO_STR=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x2000
diff --git a/configs/tinker-s-rk3288_defconfig b/configs/tinker-s-rk3288_defconfig
index 22714833cc..f5dd23577c 100644
--- a/configs/tinker-s-rk3288_defconfig
+++ b/configs/tinker-s-rk3288_defconfig
@@ -90,3 +90,4 @@ CONFIG_DISPLAY_ROCKCHIP_HDMI=y
CONFIG_CONSOLE_SCROLL_LINES=10
CONFIG_CMD_DHRYSTONE=y
CONFIG_ERRNO_STR=y
+CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x2000
--
2.31.1

View File

@@ -0,0 +1,68 @@
From f9195bc5cb18f71117f6efc1c352209e62c53706 Mon Sep 17 00:00:00 2001
Message-Id: <f9195bc5cb18f71117f6efc1c352209e62c53706.1617731428.git.stefan@agner.ch>
In-Reply-To: <983121a741192153492a61befc0e0fc61b9f8b14.1617731428.git.stefan@agner.ch>
References: <983121a741192153492a61befc0e0fc61b9f8b14.1617731428.git.stefan@agner.ch>
From: Pascal Vizeli <pvizeli@syshack.ch>
Date: Fri, 24 Apr 2020 11:37:55 +0000
Subject: [PATCH 2/2] pmic: enable LDO2 vcc33_mipi at bootup
Signed-off-by: Pascal Vizeli <pvizeli@syshack.ch>
---
board/rockchip/tinker_rk3288/tinker-rk3288.c | 37 ++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/board/rockchip/tinker_rk3288/tinker-rk3288.c b/board/rockchip/tinker_rk3288/tinker-rk3288.c
index f85209c649..6fa1bb0c66 100644
--- a/board/rockchip/tinker_rk3288/tinker-rk3288.c
+++ b/board/rockchip/tinker_rk3288/tinker-rk3288.c
@@ -13,6 +13,7 @@
#include <netdev.h>
#include <asm/arch-rockchip/bootrom.h>
#include <asm/io.h>
+#include <power/regulator.h>
static int get_ethaddr_from_eeprom(u8 *addr)
{
@@ -48,3 +49,39 @@ int mmc_get_env_dev(void)
return 1;
}
+
+
+#ifdef CONFIG_DM_PMIC
+static int rockchip_set_regulator_on(const char *name, uint uv)
+{
+ struct udevice *dev;
+ int ret;
+
+ ret = regulator_get_by_platname(name, &dev);
+ if (ret) {
+ debug("%s: Cannot find regulator %s\n", __func__, name);
+ return ret;
+ }
+ ret = regulator_set_value(dev, uv);
+ if (ret) {
+ debug("%s: Cannot set regulator %s\n", __func__, name);
+ return ret;
+ }
+ ret = regulator_set_enable(dev, 1);
+ if (ret) {
+ debug("%s: Cannot enable regulator %s\n", __func__, name);
+ return ret;
+ }
+
+ return 0;
+}
+
+int power_init_board(void)
+{
+ int ret = rockchip_set_regulator_on("vcc33_mipi", 3300000);
+ if (ret)
+ return ret;
+
+ return 0;
+}
+#endif
--
2.31.1

View File

@@ -0,0 +1,96 @@
part start mmc ${devnum} 6 mmc_env
mmc dev ${devnum}
setenv loadbootstate " \
echo 'loading env...'; \
mmc read ${ramdisk_addr_r} ${mmc_env} 0x40; \
env import -c ${ramdisk_addr_r} 0x8000;"
setenv storebootstate " \
echo 'storing env...'; \
env export -c -s 0x8000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT MACHINE_ID; \
mmc write ${ramdisk_addr_r} ${mmc_env} 0x40;"
run loadbootstate
test -n "${BOOT_ORDER}" || setenv BOOT_ORDER "A B"
test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3
test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
# HassOS bootargs
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory fsck.repair=yes"
# HassOS system A/B
setenv bootargs_a "root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro rootwait"
setenv bootargs_b "root=PARTUUID=a3ec664e-32ce-4665-95ea-7ae90ce9aa20 rootfstype=squashfs ro rootwait"
# Load environment from haos-config.txt
if test -e mmc ${devnum}:1 haos-config.txt; then
fatload mmc ${devnum}:1 ${ramdisk_addr_r} haos-config.txt
env import -t ${ramdisk_addr_r} ${filesize}
fi
# Load extraargs
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
# Load device tree
if test "$devnum" = "0"; then
setenv fdtfile "rk3288-tinker-s.dtb"
else
setenv fdtfile "rk3288-tinker.dtb"
fi
echo "Loading standard device tree ${fdtfile}"
fatload mmc ${devnum}:1 ${fdt_addr_r} ${fdtfile}
fdt addr ${fdt_addr_r}
# load dt overlays
fdt resize 65536
for overlay_file in ${overlays}; do
if fatload mmc ${devnum}:1 ${ramdisk_addr_r} overlays/${overlay_file}.dtbo; then
echo "Applying kernel provided DT overlay ${overlay_file}.dtbo"
fdt apply ${ramdisk_addr_r} || setenv overlay_error "true"
fi
done
if test "${overlay_error}" = "true"; then
echo "Error applying DT overlays, restoring original DT"
fatload mmc ${devnum}:1 ${fdt_addr_r} ${fdtfile}
fi
setenv bootargs
for BOOT_SLOT in "${BOOT_ORDER}"; do
if test "x${bootargs}" != "x"; then
# skip remaining slots
elif test "x${BOOT_SLOT}" = "xA"; then
if test ${BOOT_A_LEFT} -gt 0; then
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:2 ${kernel_addr_r} zImage; then
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
fi
fi
elif test "x${BOOT_SLOT}" = "xB"; then
if test ${BOOT_B_LEFT} -gt 0; then
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:4 ${kernel_addr_r} zImage; then
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
fi
fi
fi
done
if test -n "${bootargs}"; then
run storebootstate
else
echo "No valid slot found, resetting tries to 3"
setenv BOOT_A_LEFT 3
setenv BOOT_B_LEFT 3
run storebootstate
reset
fi
echo "Starting kernel"
bootz ${kernel_addr_r} - ${fdt_addr_r}
echo "Boot failed, resetting..."
reset

View File

@@ -0,0 +1,3 @@
# CONFIG_USB_STORAGE is not set
# CONFIG_DOS_PARTITION is not set
CONFIG_OF_LIBFDT_OVERLAY=y

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
# Uncomment this to enable GPIO support for RPI-RF-MOD/HM-MOD-RPI-PCB
#overlays=rpi-rf-mod

View File

@@ -0,0 +1,31 @@
#!/bin/bash
# shellcheck disable=SC2155
function hassos_pre_image() {
local BOOT_DATA="$(path_boot_dir)"
local BL1="${BINARIES_DIR}/bl1.bin.hardkernel"
local UBOOT_GXBB="${BINARIES_DIR}/u-boot.gxbb"
local SPL_IMG="$(path_spl_img)"
cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr"
cp "${BINARIES_DIR}/meson-gxbb-odroidc2.dtb" "${BOOT_DATA}/meson-gxbb-odroidc2.dtb"
mkdir -p "${BOOT_DATA}/overlays"
cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/"
cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt"
echo "console=tty0 console=ttyAML0,115200n8" > "${BOOT_DATA}/cmdline.txt"
# SPL
create_spl_image
dd if="${BL1}" of="${SPL_IMG}" conv=notrunc bs=1 count=440
dd if="${BL1}" of="${SPL_IMG}" conv=notrunc bs=512 skip=1 seek=1
dd if="${UBOOT_GXBB}" of="${SPL_IMG}" conv=notrunc bs=512 seek=97
}
function hassos_post_image() {
convert_disk_image_xz
}

View File

@@ -0,0 +1,10 @@
BOARD_ID=odroid-c2
BOARD_NAME="Hardkernel Odroid-C2"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=Image
BOOT_SYS=mbr
BOOT_SPL=true
BOOT_ENV_SIZE=0x2000
SUPERVISOR_MACHINE=odroid-c2
SUPERVISOR_ARCH=aarch64

View File

@@ -0,0 +1,104 @@
###########################################
part start mmc ${devnum} 9 mmc_env
mmc dev ${devnum}
setenv loadbootstate " \
echo 'loading env...'; \
mmc read ${ramdisk_addr_r} ${mmc_env} 0x10; \
env import -c ${ramdisk_addr_r} 0x2000;"
setenv storebootstate " \
echo 'storing env...'; \
env export -c -s 0x2000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT MACHINE_ID; \
mmc write ${ramdisk_addr_r} ${mmc_env} 0x10;"
run loadbootstate
test -n "${BOOT_ORDER}" || setenv BOOT_ORDER "A B"
test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3
test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
# HassOS bootargs
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory fsck.repair=yes"
# HassOS system A/B
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
setenv bootargs_b "root=PARTUUID=48617373-08 rootfstype=squashfs ro rootwait"
# Load environment from haos-config.txt
if test -e mmc ${devnum}:1 haos-config.txt; then
fatload mmc ${devnum}:1 ${ramdisk_addr_r} haos-config.txt
env import -t ${ramdisk_addr_r} ${filesize}
fi
# Load extraargs
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
# Load device tree
setenv fdtfile "meson-gxbb-odroidc2.dtb"
echo "Loading standard device tree ${fdtfile}"
fatload mmc ${devnum}:1 ${fdt_addr_r} ${fdtfile}
fdt addr ${fdt_addr_r}
# load dt overlays
fdt resize 65536
for overlay_file in ${overlays}; do
if fatload mmc ${devnum}:1 ${ramdisk_addr_r} overlays/${overlay_file}.dtbo; then
echo "Applying kernel provided DT overlay ${overlay_file}.dtbo"
fdt apply ${ramdisk_addr_r} || setenv overlay_error "true"
fi
done
if test "${overlay_error}" = "true"; then
echo "Error applying DT overlays, restoring original DT"
fatload mmc ${devnum}:1 ${fdt_addr_r} ${fdtfile}
fi
# logical volumes get numbered after physical ones.
# 1. boot
# 2. Extended partition
# 3. Overlay
# 4. Data
# 5. KernelA
# 6. SystemA
# 7. KernelB
# 8. SystemB
# 9. BootInfo
setenv bootargs
for BOOT_SLOT in "${BOOT_ORDER}"; do
if test "x${bootargs}" != "x"; then
# skip remaining slots
elif test "x${BOOT_SLOT}" = "xA"; then
if test ${BOOT_A_LEFT} -gt 0; then
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:5 ${kernel_addr_r} Image; then
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
fi
fi
elif test "x${BOOT_SLOT}" = "xB"; then
if test ${BOOT_B_LEFT} -gt 0; then
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:7 ${kernel_addr_r} Image; then
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
fi
fi
fi
done
if test -n "${bootargs}"; then
run storebootstate
else
echo "No valid slot found, resetting tries to 3"
setenv BOOT_A_LEFT 3
setenv BOOT_B_LEFT 3
run storebootstate
reset
fi
printenv bootargs
echo "Starting kernel"
booti ${kernel_addr_r} - ${fdt_addr_r}
echo "Boot failed, resetting..."
reset

View File

@@ -0,0 +1,4 @@
CONFIG_DOS_PARTITION=y
# CONFIG_EFI_PARTITION is not set
# CONFIG_USB_STORAGE is not set
CONFIG_DISPLAY_BOARDINFO=y

View File

@@ -0,0 +1,2 @@
# Uncomment this to enable GPIO support for RPI-RF-MOD/HM-MOD-RPI-PCB
#overlays=rpi-rf-mod

View File

@@ -0,0 +1,27 @@
#!/bin/bash
# shellcheck disable=SC2155
function hassos_pre_image() {
local BOOT_DATA="$(path_boot_dir)"
local UBOOT_SM1="${BINARIES_DIR}/u-boot.sm1"
local SPL_IMG="$(path_spl_img)"
cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr"
cp "${BINARIES_DIR}/meson-sm1-odroid-c4.dtb" "${BOOT_DATA}/meson-sm1-odroid-c4.dtb"
mkdir -p "${BOOT_DATA}/overlays"
cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/"
cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt"
echo "console=tty0 console=ttyAML0,115200n8" > "${BOOT_DATA}/cmdline.txt"
# SPL
create_spl_image
dd if="${UBOOT_SM1}" of="${SPL_IMG}" conv=notrunc bs=512 seek=1
}
function hassos_post_image() {
convert_disk_image_xz
}

View File

@@ -0,0 +1,10 @@
BOARD_ID=odroid-c4
BOARD_NAME="Hardkernel Odroid-C4"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=Image
BOOT_SYS=mbr
BOOT_SPL=true
BOOT_ENV_SIZE=0x2000
SUPERVISOR_MACHINE=odroid-c4
SUPERVISOR_ARCH=aarch64

View File

@@ -0,0 +1,104 @@
###########################################
part start mmc ${devnum} 9 mmc_env
mmc dev ${devnum}
setenv loadbootstate " \
echo 'loading env...'; \
mmc read ${ramdisk_addr_r} ${mmc_env} 0x10; \
env import -c ${ramdisk_addr_r} 0x2000;"
setenv storebootstate " \
echo 'storing env...'; \
env export -c -s 0x2000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT MACHINE_ID; \
mmc write ${ramdisk_addr_r} ${mmc_env} 0x10;"
run loadbootstate
test -n "${BOOT_ORDER}" || setenv BOOT_ORDER "A B"
test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3
test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
# HassOS bootargs
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory clk_ignore_unused usb-storage.quirks=0x2537:0x1066:u,0x2537:0x1068:u"
# HassOS system A/B
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
setenv bootargs_b "root=PARTUUID=48617373-08 rootfstype=squashfs ro rootwait"
# Load environment from haos-config.txt
if test -e mmc ${devnum}:1 haos-config.txt; then
fatload mmc ${devnum}:1 ${ramdisk_addr_r} haos-config.txt
env import -t ${ramdisk_addr_r} ${filesize}
fi
# Load extraargs
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
# Load device tree
setenv fdtfile "meson-sm1-odroid-c4.dtb"
echo "Loading standard device tree ${fdtfile}"
fatload mmc ${devnum}:1 ${fdt_addr_r} ${fdtfile}
fdt addr ${fdt_addr_r}
# load dt overlays
fdt resize 65536
for overlay_file in ${overlays}; do
if fatload mmc ${devnum}:1 ${ramdisk_addr_r} overlays/${overlay_file}.dtbo; then
echo "Applying kernel provided DT overlay ${overlay_file}.dtbo"
fdt apply ${ramdisk_addr_r} || setenv overlay_error "true"
fi
done
if test "${overlay_error}" = "true"; then
echo "Error applying DT overlays, restoring original DT"
fatload mmc ${devnum}:1 ${fdt_addr_r} ${fdtfile}
fi
# logical volumes get numbered after physical ones.
# 1. boot
# 2. Extended partition
# 3. Overlay
# 4. Data
# 5. KernelA
# 6. SystemA
# 7. KernelB
# 8. SystemB
# 9. BootInfo
setenv bootargs
for BOOT_SLOT in "${BOOT_ORDER}"; do
if test "x${bootargs}" != "x"; then
# skip remaining slots
elif test "x${BOOT_SLOT}" = "xA"; then
if test ${BOOT_A_LEFT} -gt 0; then
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:5 ${kernel_addr_r} Image; then
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
fi
fi
elif test "x${BOOT_SLOT}" = "xB"; then
if test ${BOOT_B_LEFT} -gt 0; then
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:7 ${kernel_addr_r} Image; then
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
fi
fi
fi
done
if test -n "${bootargs}"; then
run storebootstate
else
echo "No valid slot found, resetting tries to 3"
setenv BOOT_A_LEFT 3
setenv BOOT_B_LEFT 3
run storebootstate
reset
fi
printenv bootargs
echo "Starting kernel"
booti ${kernel_addr_r} - ${fdt_addr_r}
echo "Boot failed, resetting..."
reset

View File

@@ -0,0 +1,4 @@
CONFIG_DOS_PARTITION=y
# CONFIG_EFI_PARTITION is not set
# CONFIG_USB_STORAGE is not set
CONFIG_DISPLAY_BOARDINFO=y

View File

@@ -0,0 +1,2 @@
# Uncomment this to enable GPIO support for RPI-RF-MOD/HM-MOD-RPI-PCB
#overlays=rpi-rf-mod

View File

@@ -0,0 +1,28 @@
#!/bin/bash
# shellcheck disable=SC2155
function hassos_pre_image() {
local BOOT_DATA="$(path_boot_dir)"
local UBOOT_G12B="${BINARIES_DIR}/u-boot.g12b"
local SPL_IMG="$(path_spl_img)"
cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr"
cp "${BINARIES_DIR}"/*.dtb "${BOOT_DATA}/"
mkdir -p "${BOOT_DATA}/overlays"
cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/"
cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt"
echo "console=tty0 console=ttyAML0,115200n8" > "${BOOT_DATA}/cmdline.txt"
# SPL
create_spl_image
dd if="${UBOOT_G12B}" of="${SPL_IMG}" conv=notrunc bs=512 seek=1
}
function hassos_post_image() {
convert_disk_image_xz
}

View File

@@ -0,0 +1,7 @@
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
CONFIG_THERMAL_GOV_BANG_BANG=y
CONFIG_SENSORS_GPIO_FAN=y
CONFIG_KEYBOARD_GPIO=y
CONFIG_KEYBOARD_GPIO_POLLED=y

View File

@@ -0,0 +1,10 @@
BOARD_ID=odroid-n2
BOARD_NAME="Hardkernel Odroid-N2"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=Image
BOOT_SYS=mbr
BOOT_SPL=true
BOOT_ENV_SIZE=0x2000
SUPERVISOR_MACHINE=odroid-n2
SUPERVISOR_ARCH=aarch64

View File

@@ -0,0 +1,109 @@
###########################################
part start mmc ${devnum} 9 mmc_env
mmc dev ${devnum}
setenv loadbootstate " \
echo 'loading env...'; \
mmc read ${ramdisk_addr_r} ${mmc_env} 0x10; \
env import -c ${ramdisk_addr_r} 0x2000;"
setenv storebootstate " \
echo 'storing env...'; \
env export -c -s 0x2000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT MACHINE_ID; \
mmc write ${ramdisk_addr_r} ${mmc_env} 0x10;"
run loadbootstate
test -n "${BOOT_ORDER}" || setenv BOOT_ORDER "A B"
test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3
test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
# HassOS bootargs
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory fsck.repair=yes"
# HassOS system A/B
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
setenv bootargs_b "root=PARTUUID=48617373-08 rootfstype=squashfs ro rootwait"
# Load environment from haos-config.txt
if test -e mmc ${devnum}:1 haos-config.txt; then
fatload mmc ${devnum}:1 ${ramdisk_addr_r} haos-config.txt
env import -t ${ramdisk_addr_r} ${filesize}
fi
# Load extraargs
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
# Load device tree
if test "${soc_rev}" = "c"; then
setenv fdtfile "meson-g12b-odroid-n2-plus.dtb"
else
setenv fdtfile "meson-g12b-odroid-n2.dtb"
fi
echo "Loading standard device tree ${fdtfile}"
fatload mmc ${devnum}:1 ${fdt_addr_r} ${fdtfile}
fdt addr ${fdt_addr_r}
# load dt overlays
fdt resize 65536
for overlay_file in ${overlays}; do
if fatload mmc ${devnum}:1 ${ramdisk_addr_r} overlays/${overlay_file}.dtbo; then
echo "Applying kernel provided DT overlay ${overlay_file}.dtbo"
fdt apply ${ramdisk_addr_r} || setenv overlay_error "true"
fi
done
if test "${overlay_error}" = "true"; then
echo "Error applying DT overlays, restoring original DT"
fatload mmc ${devnum}:1 ${fdt_addr_r} ${fdtfile}
fi
# logical volumes get numbered after physical ones.
# 1. boot
# 2. Extended partition
# 3. Overlay
# 4. Data
# 5. KernelA
# 6. SystemA
# 7. KernelB
# 8. SystemB
# 9. BootInfo
setenv bootargs
for BOOT_SLOT in "${BOOT_ORDER}"; do
if test "x${bootargs}" != "x"; then
# skip remaining slots
elif test "x${BOOT_SLOT}" = "xA"; then
if test ${BOOT_A_LEFT} -gt 0; then
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:5 ${kernel_addr_r} Image; then
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
fi
fi
elif test "x${BOOT_SLOT}" = "xB"; then
if test ${BOOT_B_LEFT} -gt 0; then
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:7 ${kernel_addr_r} Image; then
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
fi
fi
fi
done
if test -n "${bootargs}"; then
run storebootstate
else
echo "No valid slot found, resetting tries to 3"
setenv BOOT_A_LEFT 3
setenv BOOT_B_LEFT 3
run storebootstate
reset
fi
printenv bootargs
echo "Starting kernel"
booti ${kernel_addr_r} - ${fdt_addr_r}
echo "Boot failed, resetting..."
reset

View File

@@ -0,0 +1,5 @@
CONFIG_DOS_PARTITION=y
# CONFIG_EFI_PARTITION is not set
# CONFIG_USB_STORAGE is not set
CONFIG_DISPLAY_BOARDINFO=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y

View File

@@ -0,0 +1,30 @@
#!/bin/bash
# shellcheck disable=SC2155
function hassos_pre_image() {
local BOOT_DATA="$(path_boot_dir)"
local BL1="${BINARIES_DIR}/bl1.bin.hardkernel"
local BL2="${BINARIES_DIR}/bl2.bin.hardkernel.720k_uboot"
local BLTZ="${BINARIES_DIR}/tzsw.bin.hardkernel"
local UBOOT="${BINARIES_DIR}/u-boot.bin"
local spl_img="$(path_spl_img)"
cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr"
cp "${BINARIES_DIR}/exynos5422-odroidxu4.dtb" "${BOOT_DATA}/exynos5422-odroidxu4.dtb"
echo "console=tty1 console=ttySAC2,115200" > "${BOOT_DATA}/cmdline.txt"
# SPL
create_spl_image
dd if="${BL1}" of="${spl_img}" conv=notrunc bs=512 seek=1
dd if="${BL2}" of="${spl_img}" conv=notrunc bs=512 seek=31
dd if="${UBOOT}" of="${spl_img}" conv=notrunc bs=512 seek=63
dd if="${BLTZ}" of="${spl_img}" conv=notrunc bs=512 seek=1503
dd if=/dev/zero of="${spl_img}" conv=notrunc bs=512 count=32 seek=2015
}
function hassos_post_image() {
convert_disk_image_xz
}

View File

@@ -0,0 +1,10 @@
BOARD_ID=odroid-xu4
BOARD_NAME="Hardkernel Odroid-XU4"
CHASSIS=embedded
BOOTLOADER=uboot
KERNEL_FILE=zImage
BOOT_SYS=mbr
BOOT_SPL=true
BOOT_ENV_SIZE=0x4000
SUPERVISOR_MACHINE=odroid-xu
SUPERVISOR_ARCH=armv7

View File

@@ -0,0 +1,61 @@
From d6b82edb420c7df4fa8bb0924dae2476beb649a2 Mon Sep 17 00:00:00 2001
Message-Id: <d6b82edb420c7df4fa8bb0924dae2476beb649a2.1622398359.git.stefan@agner.ch>
From: "charles.park" <charles.park@hardkernel.com>
Date: Fri, 1 Jun 2018 18:12:01 +0900
Subject: [PATCH] ODROID-XU4: Update hack avoiding the invalid temperature by
TMU broken
Change-Id: I6092834427950a50746535458e99bf7089212044
---
drivers/thermal/thermal_helpers.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/drivers/thermal/thermal_helpers.c b/drivers/thermal/thermal_helpers.c
index c94bc824e5d3..2880126c5861 100644
--- a/drivers/thermal/thermal_helpers.c
+++ b/drivers/thermal/thermal_helpers.c
@@ -75,6 +75,10 @@ EXPORT_SYMBOL(get_thermal_instance);
*
* Return: On success returns 0, an error code otherwise
*/
+
+#define CRITICAL_TEMP 120000
+int thermal_zone_data[4] = { 0, };
+
int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp)
{
int ret = -EINVAL;
@@ -108,6 +112,30 @@ int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp)
*temp = tz->emul_temperature;
}
+ /* save thermal_zone data */
+ if (!ret)
+ thermal_zone_data[tz->id] = *temp;
+ /*
+ * This case is that the thermal sensor is broken.
+ * That's not real temperature. Set the fake temperature value in order to
+ * avoid reaching the ciritical temperature.
+ */
+ if ((thermal_zone_data[tz->id] > CRITICAL_TEMP) && (tz->id != 4)) {
+ int i, broken_sensor = 0, correct_temp = 0;
+ for (i = 0; i < 4; i++) {
+ if ((thermal_zone_data[i] <= CRITICAL_TEMP) &&
+ (correct_temp <= thermal_zone_data[i]))
+ correct_temp = thermal_zone_data[i];
+ if (thermal_zone_data[i] > CRITICAL_TEMP)
+ broken_sensor++;
+ }
+ /*
+ * if all thermal sensor broken then critical temperature data send
+ * for system poweroff.
+ */
+ *temp = (broken_sensor == 4) ? CRITICAL_TEMP : correct_temp;
+ }
+
mutex_unlock(&tz->lock);
exit:
return ret;
--
2.31.1

View File

@@ -0,0 +1,84 @@
###########################################
part start mmc ${devnum} 9 mmc_env
mmc dev ${devnum}
# Note that import is performed twice for backwards compatability.
setenv loadbootstate " \
echo 'loading env...'; \
mmc read ${ramdisk_addr_r} ${mmc_env} 0x20; \
env import -c ${ramdisk_addr_r} 0x4000;"
setenv storebootstate " \
echo 'storing env...'; \
env export -c -s 0x4000 ${ramdisk_addr_r} BOOT_ORDER BOOT_A_LEFT BOOT_B_LEFT MACHINE_ID; \
mmc write ${ramdisk_addr_r} ${mmc_env} 0x20;"
run loadbootstate
test -n "${BOOT_ORDER}" || setenv BOOT_ORDER "A B"
test -n "${BOOT_A_LEFT}" || setenv BOOT_A_LEFT 3
test -n "${BOOT_B_LEFT}" || setenv BOOT_B_LEFT 3
# HassOS bootargs
setenv bootargs_hassos "zram.enabled=1 zram.num_devices=3 apparmor=1 security=apparmor systemd.machine_id=${MACHINE_ID} cgroup_enable=memory fsck.repair=yes"
# HassOS system A/B
setenv bootargs_a "root=PARTUUID=48617373-06 rootfstype=squashfs ro rootwait"
setenv bootargs_b "root=PARTUUID=48617373-08 rootfstype=squashfs ro rootwait"
# Load extraargs
fileenv mmc ${devnum}:1 ${ramdisk_addr_r} cmdline.txt cmdline
fatload mmc ${devnum}:1 ${fdt_addr_r} exynos5422-odroidxu4.dtb
fdt addr ${fdt_addr_r}
# logical volumes get numbered after physical ones.
# 1. boot
# 2. Extended partition
# 3. Overlay
# 4. Data
# 5. KernelA
# 6. SystemA
# 7. KernelB
# 8. SystemB
# 9. BootInfo
setenv bootargs
for BOOT_SLOT in "${BOOT_ORDER}"; do
if test "x${bootargs}" != "x"; then
# skip remaining slots
elif test "x${BOOT_SLOT}" = "xA"; then
if test ${BOOT_A_LEFT} -gt 0; then
setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1
echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:5 ${kernel_addr_r} zImage; then
setenv bootargs "${bootargs_hassos} ${bootargs_a} rauc.slot=A ${cmdline}"
fi
fi
elif test "x${BOOT_SLOT}" = "xB"; then
if test ${BOOT_B_LEFT} -gt 0; then
setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1
echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..."
if ext4load mmc ${devnum}:7 ${kernel_addr_r} zImage; then
setenv bootargs "${bootargs_hassos} ${bootargs_b} rauc.slot=B ${cmdline}"
fi
fi
fi
done
if test -n "${bootargs}"; then
run storebootstate
else
echo "No valid slot found, resetting tries to 3"
setenv BOOT_A_LEFT 3
setenv BOOT_B_LEFT 3
run storebootstate
reset
fi
printenv bootargs
echo "Starting kernel"
bootz ${kernel_addr_r} - ${fdt_addr_r}
echo "Boot failed, resetting..."
reset

View File

@@ -0,0 +1,3 @@
CONFIG_DOS_PARTITION=y
# CONFIG_EFI_PARTITION is not set
# CONFIG_USB_STORAGE is not set

View File

@@ -0,0 +1,53 @@
From cdfb8eea4103e537898073dc3f7bf8f75cec5efb Mon Sep 17 00:00:00 2001
Message-Id: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Mon, 11 Jan 2021 13:58:31 +0000
Subject: [PATCH 1/8] arm64: dts: meson: add i2c3/rtc nodes and rtc aliases to
ODROID-N2 dtsi
Enable the onboard pcf8563 rtc hardware on ODROID N2/N2+ boards via the
common dtsi. Also add aliases to ensure vrtc does not claim /dev/rtc0.
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20210111135831.2218-1-christianshewitt@gmail.com
---
.../boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index 39a09661c5f6..b78be3e6974d 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -13,6 +13,8 @@ / {
aliases {
serial0 = &uart_AO;
ethernet0 = &ethmac;
+ rtc0 = &rtc;
+ rtc1 = &vrtc;
};
dioo2133: audio-amplifier-0 {
@@ -478,6 +480,18 @@ &ir {
linux,rc-map-name = "rc-odroid";
};
+&i2c3 {
+ status = "okay";
+ pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
+ pinctrl-names = "default";
+
+ rtc: rtc@51 {
+ compatible = "nxp,pcf8563";
+ reg = <0x51>;
+ wakeup-source;
+ };
+};
+
&pwm_ab {
pinctrl-0 = <&pwm_a_e_pins>;
pinctrl-names = "default";
--
2.31.1

View File

@@ -0,0 +1,37 @@
From 8b2ab165b2ed529f74b242159648893d53272c24 Mon Sep 17 00:00:00 2001
Message-Id: <8b2ab165b2ed529f74b242159648893d53272c24.1619725559.git.stefan@agner.ch>
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
From: Hyeonki Hong <hhk7734@gmail.com>
Date: Wed, 7 Apr 2021 04:26:08 +0000
Subject: [PATCH 2/8] arm64: dts: meson: add saradc node to ODROID N2/N2+
Add the meson saradc node to the ODROID N2/N2+ common dtsi.
Signed-off-by: Hyeonki Hong <hhk7734@gmail.com>
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20210407042609.9736-3-christianshewitt@gmail.com
---
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index b78be3e6974d..8a5e132c4b79 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -508,6 +508,11 @@ &pwm_AO_cd {
status = "okay";
};
+&saradc {
+ status = "okay";
+ vref-supply = <&vddao_1v8>;
+};
+
/* SD card */
&sd_emmc_b {
status = "okay";
--
2.31.1

View File

@@ -0,0 +1,78 @@
From 602012d9081be7a54d2d6cee59035ae019dd3bb4 Mon Sep 17 00:00:00 2001
Message-Id: <602012d9081be7a54d2d6cee59035ae019dd3bb4.1619725559.git.stefan@agner.ch>
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
From: Hyeonki Hong <hhk7734@gmail.com>
Date: Wed, 7 Apr 2021 04:26:09 +0000
Subject: [PATCH 3/8] arm64: dts: meson: add GPIO line names to ODROID N2/N2+
Add GPIO line-name identifiers to the ODROID N2/N2+ common dtsi.
Signed-off-by: Hyeonki Hong <hhk7734@gmail.com>
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20210407042609.9736-4-christianshewitt@gmail.com
---
.../dts/amlogic/meson-g12b-odroid-n2.dtsi | 45 +++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index 8a5e132c4b79..41b2f9c96b5f 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -446,6 +446,51 @@ &frddr_c {
};
&gpio {
+ gpio-line-names =
+ /* GPIOZ */
+ "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "",
+ /* GPIOH */
+ "", "", "", "", "", "", "", "",
+ "",
+ /* BOOT */
+ "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "",
+ /* GPIOC */
+ "", "", "", "", "", "", "", "",
+ /* GPIOA */
+ "PIN_44", /* GPIOA_0 */
+ "PIN_46", /* GPIOA_1 */
+ "PIN_45", /* GPIOA_2 */
+ "PIN_47", /* GPIOA_3 */
+ "PIN_26", /* GPIOA_4 */
+ "", "", "", "", "", "",
+ "PIN_42", /* GPIOA_11 */
+ "PIN_32", /* GPIOA_12 */
+ "PIN_7", /* GPIOA_13 */
+ "PIN_27", /* GPIOA_14 */
+ "PIN_28", /* GPIOA_15 */
+ /* GPIOX */
+ "PIN_16", /* GPIOX_0 */
+ "PIN_18", /* GPIOX_1 */
+ "PIN_22", /* GPIOX_2 */
+ "PIN_11", /* GPIOX_3 */
+ "PIN_13", /* GPIOX_4 */
+ "PIN_33", /* GPIOX_5 */
+ "PIN_35", /* GPIOX_6 */
+ "PIN_15", /* GPIOX_7 */
+ "PIN_19", /* GPIOX_8 */
+ "PIN_21", /* GPIOX_9 */
+ "PIN_24", /* GPIOX_10 */
+ "PIN_23", /* GPIOX_11 */
+ "PIN_8", /* GPIOX_12 */
+ "PIN_10", /* GPIOX_13 */
+ "PIN_29", /* GPIOX_14 */
+ "PIN_31", /* GPIOX_15 */
+ "PIN_12", /* GPIOX_16 */
+ "PIN_3", /* GPIOX_17 */
+ "PIN_5", /* GPIOX_18 */
+ "PIN_36"; /* GPIOX_19 */
/*
* WARNING: The USB Hub on the Odroid-N2 needs a reset signal
* to be turned high in order to be detected by the USB Controller
--
2.31.1

View File

@@ -0,0 +1,42 @@
From 0a70fbc9a556737d3f70a1a194ba7be280b007c5 Mon Sep 17 00:00:00 2001
Message-Id: <0a70fbc9a556737d3f70a1a194ba7be280b007c5.1619725559.git.stefan@agner.ch>
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Mon, 11 Jan 2021 11:20:48 +0100
Subject: [PATCH 4/8] arm64: dts: meson: g12b: add power button support
Add power button support on J2 pin 11 (GPIOX_3 on the SoC side). The
GPIO is low active, e.g. when connecting with pin 9 (GND) a power
button press is triggered.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index 41b2f9c96b5f..4b6bb7e74e25 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -39,6 +39,17 @@ emmc_pwrseq: emmc-pwrseq {
reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
};
+ gpio-keys-polled {
+ compatible = "gpio-keys-polled";
+ poll-interval = <100>;
+
+ power-button {
+ label = "power";
+ linux,code = <KEY_POWER>;
+ gpios = <&gpio GPIOX_3 GPIO_ACTIVE_LOW>;
+ };
+ };
+
leds {
compatible = "gpio-leds";
--
2.31.1

View File

@@ -0,0 +1,42 @@
From 8a4a640d1b8dea977795de3f49b6ea3a791e401a Mon Sep 17 00:00:00 2001
Message-Id: <8a4a640d1b8dea977795de3f49b6ea3a791e401a.1619725559.git.stefan@agner.ch>
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Mon, 11 Jan 2021 11:38:54 +0100
Subject: [PATCH 5/8] arm64: dts: meson: g12b: add GPIO fan support
Add simple GPIO fan node to support a fan on GPIO J8. Unfortunately the
pad used to control the fan does not support real PWM, hence the RPM
cannot be modulated.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index 4b6bb7e74e25..e8a3ede698b5 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -39,6 +39,17 @@ emmc_pwrseq: emmc-pwrseq {
reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
};
+ /*
+ * 5V 80x80x10.8mm cooling fan from Hardkernel shop.
+ */
+ fan0: gpio-fan {
+ #cooling-cells = <2>;
+ compatible = "gpio-fan";
+ gpio-fan,speed-map = <0 0 1600 1>;
+ gpios = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+ };
+
gpio-keys-polled {
compatible = "gpio-keys-polled";
poll-interval = <100>;
--
2.31.1

View File

@@ -0,0 +1,74 @@
From eee30c74e72b6092b5e30c4744a4f1d7d9526403 Mon Sep 17 00:00:00 2001
Message-Id: <eee30c74e72b6092b5e30c4744a4f1d7d9526403.1619725559.git.stefan@agner.ch>
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Mon, 11 Jan 2021 15:53:55 +0100
Subject: [PATCH 6/8] arm64: dts: meson: g12b: odroid-n2: add fan as cooling
device
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Add the GPIO fan as a cooling device for the CPU thermal zone. Since we
have only full fan speed available with this, set the tripping point to
65°C which is the highest tripping point which Hardkernel used in their
downstream kernel.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
.../dts/amlogic/meson-g12b-odroid-n2.dtsi | 38 +++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index e8a3ede698b5..dd345c6aa4b5 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -388,6 +388,44 @@ &clkc_audio {
status = "okay";
};
+&cpu_thermal {
+ trips {
+ cpu_warm: cpu_warm {
+ hysteresis = <5000>;
+ temperature = <65000>;
+ type = "active";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ cooling-device =
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ trip = <&cpu_warm>;
+ };
+ map1 {
+ trip = <&cpu_passive>;
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ map2 {
+ trip = <&cpu_hot>;
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
+};
+
&cpu0 {
cpu-supply = <&vddcpu_b>;
operating-points-v2 = <&cpu_opp_table_0>;
--
2.31.1

View File

@@ -0,0 +1,44 @@
From b10ae8fd3bef195eda4a30bc5f3995ca13b6cffd Mon Sep 17 00:00:00 2001
Message-Id: <b10ae8fd3bef195eda4a30bc5f3995ca13b6cffd.1619725559.git.stefan@agner.ch>
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
From: Hyeonki Hong <hhk7734@gmail.com>
Date: Fri, 27 Mar 2020 17:05:22 +0900
Subject: [PATCH 7/8] arm64: dts: meson: add uart_A node
The UART_A is available through J3 pin 8/10 and documented to be
available as UART by default.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index dd345c6aa4b5..cec346178e3d 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -12,6 +12,7 @@
/ {
aliases {
serial0 = &uart_AO;
+ serial1 = &uart_A;
ethernet0 = &ethmac;
rtc0 = &rtc;
rtc1 = &vrtc;
@@ -728,6 +729,12 @@ &toddr_c {
status = "okay";
};
+&uart_A {
+ status = "okay";
+ pinctrl-0 = <&uart_a_pins>;
+ pinctrl-names = "default";
+};
+
&uart_AO {
status = "okay";
pinctrl-0 = <&uart_ao_a_pins>;
--
2.31.1

View File

@@ -0,0 +1,37 @@
From aea42d4a9a307438bf7099aee38daedac2bd5044 Mon Sep 17 00:00:00 2001
Message-Id: <aea42d4a9a307438bf7099aee38daedac2bd5044.1619725559.git.stefan@agner.ch>
In-Reply-To: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
References: <cdfb8eea4103e537898073dc3f7bf8f75cec5efb.1619725559.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 29 Apr 2021 21:32:43 +0200
Subject: [PATCH 8/8] arm64: dts: meson: add i2c2 node to ODROID N2/N2+
The J2 connectors pinout documents "I2C.SDA0/SCL0" on pin 3 and 5, which
are connected to GPIOX_17/18. This GPIO allow to mux I2C to the second
I2C instance. Enable i2c2 and use the appropriate pinmux.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index cec346178e3d..f1c3356c78a0 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -586,6 +586,12 @@ &ir {
linux,rc-map-name = "rc-odroid";
};
+&i2c2 {
+ status = "okay";
+ pinctrl-0 = <&i2c2_sda_x_pins>, <&i2c2_sck_x_pins>;
+ pinctrl-names = "default";
+};
+
&i2c3 {
status = "okay";
pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
--
2.31.1

View File

@@ -0,0 +1,38 @@
From a189f6229a9462ae2fc406b1e45286d2eea32b40 Mon Sep 17 00:00:00 2001
Message-Id: <a189f6229a9462ae2fc406b1e45286d2eea32b40.1622055679.git.stefan@agner.ch>
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Tue, 15 Sep 2020 17:24:31 +0200
Subject: [PATCH 02/11] dt-bindings: arm: amlogic: add support for the
ODROID-N2+
HardKernel ODROID-N2+ uses a revised Amlogic S922X v2 chip that supports
higher cpu clock speeds than the original ODROID-N2.
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20200915152432.30616-3-narmstrong@baylibre.com
(cherry picked from commit 88ba71cdc5497390350c87e68ce35688e88be3e8)
---
Documentation/devicetree/bindings/arm/amlogic.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/arm/amlogic.yaml b/Documentation/devicetree/bindings/arm/amlogic.yaml
index 5eba9f48823e..12ba8d074370 100644
--- a/Documentation/devicetree/bindings/arm/amlogic.yaml
+++ b/Documentation/devicetree/bindings/arm/amlogic.yaml
@@ -153,6 +153,7 @@ properties:
- azw,gtking
- azw,gtking-pro
- hardkernel,odroid-n2
+ - hardkernel,odroid-n2-plus
- khadas,vim3
- ugoos,am6
- const: amlogic,s922x
--
2.31.1

View File

@@ -0,0 +1,79 @@
From 2f09401241a0f2348d3e30617e89a00c1dc45895 Mon Sep 17 00:00:00 2001
Message-Id: <2f09401241a0f2348d3e30617e89a00c1dc45895.1622055679.git.stefan@agner.ch>
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Tue, 15 Sep 2020 17:24:32 +0200
Subject: [PATCH 03/11] arm64: dts: meson: add support for the ODROID-N2+
HardKernel ODROID-N2+ uses an Amlogic S922X rev. C chip capable of higher
clock speeds than the original ODROID-N2.
The rev. C support a slighly higher VDDCPU_A & VDDCPU_B voltages and supports
the same OPPs as the Amlogic A311D SoC from the same G12B family.
Suggested-by: Dongjin Kim <tobetter@hardkernel.com>
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20200915152432.30616-4-narmstrong@baylibre.com
(cherry picked from commit 98d24896ee117b1f0969405476c943e9307e30d4)
---
arch/arm64/boot/dts/amlogic/Makefile | 1 +
.../dts/amlogic/meson-g12b-odroid-n2-plus.dts | 31 +++++++++++++++++++
2 files changed, 32 insertions(+)
create mode 100644 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
diff --git a/arch/arm64/boot/dts/amlogic/Makefile b/arch/arm64/boot/dts/amlogic/Makefile
index 4e2239ffcaa5..b0b3d6791499 100644
--- a/arch/arm64/boot/dts/amlogic/Makefile
+++ b/arch/arm64/boot/dts/amlogic/Makefile
@@ -8,6 +8,7 @@ dtb-$(CONFIG_ARCH_MESON) += meson-g12b-gtking-pro.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-a311d-khadas-vim3.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-s922x-khadas-vim3.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2.dtb
+dtb-$(CONFIG_ARCH_MESON) += meson-g12b-odroid-n2-plus.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-g12b-ugoos-am6.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-kii-pro.dtb
dtb-$(CONFIG_ARCH_MESON) += meson-gxbb-nanopi-k2.dtb
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
new file mode 100644
index 000000000000..5de2815ba99d
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2-plus.dts
@@ -0,0 +1,31 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 BayLibre, SAS
+ * Author: Neil Armstrong <narmstrong@baylibre.com>
+ */
+
+/dts-v1/;
+
+/* The Amlogic S922X Rev. C supports the same OPPs as the A311D variant */
+#include "meson-g12b-a311d.dtsi"
+#include "meson-g12b-odroid-n2.dtsi"
+
+/ {
+ compatible = "hardkernel,odroid-n2-plus", "amlogic,s922x", "amlogic,g12b";
+ model = "Hardkernel ODROID-N2Plus";
+};
+
+&vddcpu_a {
+ regulator-min-microvolt = <680000>;
+ regulator-max-microvolt = <1040000>;
+
+ pwms = <&pwm_AO_cd 1 1500 0>;
+};
+
+&vddcpu_b {
+ regulator-min-microvolt = <680000>;
+ regulator-max-microvolt = <1040000>;
+
+ pwms = <&pwm_AO_cd 1 1500 0>;
+};
+
--
2.31.1

View File

@@ -0,0 +1,55 @@
From 7dba042e7863dc61ec74c0759493264e48d32df2 Mon Sep 17 00:00:00 2001
Message-Id: <7dba042e7863dc61ec74c0759493264e48d32df2.1622055679.git.stefan@agner.ch>
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
From: Christian Hewitt <christianshewitt@gmail.com>
Date: Mon, 11 Jan 2021 13:58:31 +0000
Subject: [PATCH 04/11] arm64: dts: meson: add i2c3/rtc nodes and rtc aliases
to ODROID-N2 dtsi
Enable the onboard pcf8563 rtc hardware on ODROID N2/N2+ boards via the
common dtsi. Also add aliases to ensure vrtc does not claim /dev/rtc0.
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20210111135831.2218-1-christianshewitt@gmail.com
---
.../boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index 6982632ae646..5927c4493f5a 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -13,6 +13,8 @@ / {
aliases {
serial0 = &uart_AO;
ethernet0 = &ethmac;
+ rtc0 = &rtc;
+ rtc1 = &vrtc;
};
dioo2133: audio-amplifier-0 {
@@ -478,6 +480,18 @@ &ir {
linux,rc-map-name = "rc-odroid";
};
+&i2c3 {
+ status = "okay";
+ pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
+ pinctrl-names = "default";
+
+ rtc: rtc@51 {
+ compatible = "nxp,pcf8563";
+ reg = <0x51>;
+ wakeup-source;
+ };
+};
+
&pwm_ab {
pinctrl-0 = <&pwm_a_e_pins>;
pinctrl-names = "default";
--
2.31.1

View File

@@ -0,0 +1,37 @@
From 3f2aecc668b172e0c91bf1bfdc78ee18a6bb6645 Mon Sep 17 00:00:00 2001
Message-Id: <3f2aecc668b172e0c91bf1bfdc78ee18a6bb6645.1622055679.git.stefan@agner.ch>
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
From: Hyeonki Hong <hhk7734@gmail.com>
Date: Wed, 7 Apr 2021 04:26:08 +0000
Subject: [PATCH 05/11] arm64: dts: meson: add saradc node to ODROID N2/N2+
Add the meson saradc node to the ODROID N2/N2+ common dtsi.
Signed-off-by: Hyeonki Hong <hhk7734@gmail.com>
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20210407042609.9736-3-christianshewitt@gmail.com
---
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index 5927c4493f5a..194a437b4e3f 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -508,6 +508,11 @@ &pwm_AO_cd {
status = "okay";
};
+&saradc {
+ status = "okay";
+ vref-supply = <&vddao_1v8>;
+};
+
/* SD card */
&sd_emmc_b {
status = "okay";
--
2.31.1

View File

@@ -0,0 +1,78 @@
From d13c62fab2c91cacda74a9001ea6a6c7d8a9af39 Mon Sep 17 00:00:00 2001
Message-Id: <d13c62fab2c91cacda74a9001ea6a6c7d8a9af39.1622055679.git.stefan@agner.ch>
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
From: Hyeonki Hong <hhk7734@gmail.com>
Date: Wed, 7 Apr 2021 04:26:09 +0000
Subject: [PATCH 06/11] arm64: dts: meson: add GPIO line names to ODROID N2/N2+
Add GPIO line-name identifiers to the ODROID N2/N2+ common dtsi.
Signed-off-by: Hyeonki Hong <hhk7734@gmail.com>
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20210407042609.9736-4-christianshewitt@gmail.com
---
.../dts/amlogic/meson-g12b-odroid-n2.dtsi | 45 +++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index 194a437b4e3f..fe85aa6da460 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -446,6 +446,51 @@ &frddr_c {
};
&gpio {
+ gpio-line-names =
+ /* GPIOZ */
+ "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "",
+ /* GPIOH */
+ "", "", "", "", "", "", "", "",
+ "",
+ /* BOOT */
+ "", "", "", "", "", "", "", "",
+ "", "", "", "", "", "", "", "",
+ /* GPIOC */
+ "", "", "", "", "", "", "", "",
+ /* GPIOA */
+ "PIN_44", /* GPIOA_0 */
+ "PIN_46", /* GPIOA_1 */
+ "PIN_45", /* GPIOA_2 */
+ "PIN_47", /* GPIOA_3 */
+ "PIN_26", /* GPIOA_4 */
+ "", "", "", "", "", "",
+ "PIN_42", /* GPIOA_11 */
+ "PIN_32", /* GPIOA_12 */
+ "PIN_7", /* GPIOA_13 */
+ "PIN_27", /* GPIOA_14 */
+ "PIN_28", /* GPIOA_15 */
+ /* GPIOX */
+ "PIN_16", /* GPIOX_0 */
+ "PIN_18", /* GPIOX_1 */
+ "PIN_22", /* GPIOX_2 */
+ "PIN_11", /* GPIOX_3 */
+ "PIN_13", /* GPIOX_4 */
+ "PIN_33", /* GPIOX_5 */
+ "PIN_35", /* GPIOX_6 */
+ "PIN_15", /* GPIOX_7 */
+ "PIN_19", /* GPIOX_8 */
+ "PIN_21", /* GPIOX_9 */
+ "PIN_24", /* GPIOX_10 */
+ "PIN_23", /* GPIOX_11 */
+ "PIN_8", /* GPIOX_12 */
+ "PIN_10", /* GPIOX_13 */
+ "PIN_29", /* GPIOX_14 */
+ "PIN_31", /* GPIOX_15 */
+ "PIN_12", /* GPIOX_16 */
+ "PIN_3", /* GPIOX_17 */
+ "PIN_5", /* GPIOX_18 */
+ "PIN_36"; /* GPIOX_19 */
/*
* WARNING: The USB Hub on the Odroid-N2 needs a reset signal
* to be turned high in order to be detected by the USB Controller
--
2.31.1

View File

@@ -0,0 +1,42 @@
From 25cd545d370b67f5e5e19d93484d378571526da2 Mon Sep 17 00:00:00 2001
Message-Id: <25cd545d370b67f5e5e19d93484d378571526da2.1622055679.git.stefan@agner.ch>
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Mon, 11 Jan 2021 11:20:48 +0100
Subject: [PATCH 07/11] arm64: dts: meson: g12b: add power button support
Add power button support on J2 pin 11 (GPIOX_3 on the SoC side). The
GPIO is low active, e.g. when connecting with pin 9 (GND) a power
button press is triggered.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index fe85aa6da460..9b1541ee2273 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -39,6 +39,17 @@ emmc_pwrseq: emmc-pwrseq {
reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
};
+ gpio-keys-polled {
+ compatible = "gpio-keys-polled";
+ poll-interval = <100>;
+
+ power-button {
+ label = "power";
+ linux,code = <KEY_POWER>;
+ gpios = <&gpio GPIOX_3 GPIO_ACTIVE_LOW>;
+ };
+ };
+
leds {
compatible = "gpio-leds";
--
2.31.1

View File

@@ -0,0 +1,42 @@
From b94a0698f21a2d8f6623b69fc17fe9491bc22a9b Mon Sep 17 00:00:00 2001
Message-Id: <b94a0698f21a2d8f6623b69fc17fe9491bc22a9b.1622055679.git.stefan@agner.ch>
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Mon, 11 Jan 2021 11:38:54 +0100
Subject: [PATCH 08/11] arm64: dts: meson: g12b: add GPIO fan support
Add simple GPIO fan node to support a fan on GPIO J8. Unfortunately the
pad used to control the fan does not support real PWM, hence the RPM
cannot be modulated.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index 9b1541ee2273..8ad7c3ee1aa3 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -39,6 +39,17 @@ emmc_pwrseq: emmc-pwrseq {
reset-gpios = <&gpio BOOT_12 GPIO_ACTIVE_LOW>;
};
+ /*
+ * 5V 80x80x10.8mm cooling fan from Hardkernel shop.
+ */
+ fan0: gpio-fan {
+ #cooling-cells = <2>;
+ compatible = "gpio-fan";
+ gpio-fan,speed-map = <0 0 1600 1>;
+ gpios = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_HIGH>;
+ status = "okay";
+ };
+
gpio-keys-polled {
compatible = "gpio-keys-polled";
poll-interval = <100>;
--
2.31.1

View File

@@ -0,0 +1,74 @@
From 4d9f93dbdc93e83ba8ddf01893b3c29cd11a87f9 Mon Sep 17 00:00:00 2001
Message-Id: <4d9f93dbdc93e83ba8ddf01893b3c29cd11a87f9.1622055679.git.stefan@agner.ch>
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Mon, 11 Jan 2021 15:53:55 +0100
Subject: [PATCH 09/11] arm64: dts: meson: g12b: odroid-n2: add fan as cooling
device
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Add the GPIO fan as a cooling device for the CPU thermal zone. Since we
have only full fan speed available with this, set the tripping point to
65°C which is the highest tripping point which Hardkernel used in their
downstream kernel.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
.../dts/amlogic/meson-g12b-odroid-n2.dtsi | 38 +++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index 8ad7c3ee1aa3..c4052293ea0d 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -388,6 +388,44 @@ &clkc_audio {
status = "okay";
};
+&cpu_thermal {
+ trips {
+ cpu_warm: cpu_warm {
+ hysteresis = <5000>;
+ temperature = <65000>;
+ type = "active";
+ };
+ };
+
+ cooling-maps {
+ map0 {
+ cooling-device =
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ trip = <&cpu_warm>;
+ };
+ map1 {
+ trip = <&cpu_passive>;
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ map2 {
+ trip = <&cpu_hot>;
+ cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+ <&fan0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+ };
+ };
+};
+
&cpu0 {
cpu-supply = <&vddcpu_b>;
operating-points-v2 = <&cpu_opp_table_0>;
--
2.31.1

View File

@@ -0,0 +1,44 @@
From 1eeec94aa6dd6f9900e6213025916eb85f6b3b62 Mon Sep 17 00:00:00 2001
Message-Id: <1eeec94aa6dd6f9900e6213025916eb85f6b3b62.1622055679.git.stefan@agner.ch>
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
From: Hyeonki Hong <hhk7734@gmail.com>
Date: Fri, 27 Mar 2020 17:05:22 +0900
Subject: [PATCH 10/11] arm64: dts: meson: add uart_A node
The UART_A is available through J3 pin 8/10 and documented to be
available as UART by default.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index c4052293ea0d..38a996ed3e19 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -12,6 +12,7 @@
/ {
aliases {
serial0 = &uart_AO;
+ serial1 = &uart_A;
ethernet0 = &ethmac;
rtc0 = &rtc;
rtc1 = &vrtc;
@@ -728,6 +729,12 @@ &toddr_c {
status = "okay";
};
+&uart_A {
+ status = "okay";
+ pinctrl-0 = <&uart_a_pins>;
+ pinctrl-names = "default";
+};
+
&uart_AO {
status = "okay";
pinctrl-0 = <&uart_ao_a_pins>;
--
2.31.1

View File

@@ -0,0 +1,37 @@
From 400fce2e1eaab6d04f542eaa0fe3b53fb9d79d82 Mon Sep 17 00:00:00 2001
Message-Id: <400fce2e1eaab6d04f542eaa0fe3b53fb9d79d82.1622055679.git.stefan@agner.ch>
In-Reply-To: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
References: <0955f7e64f302c5c331b90fd07fc48dfb677eab5.1622055679.git.stefan@agner.ch>
From: Stefan Agner <stefan@agner.ch>
Date: Thu, 29 Apr 2021 21:32:43 +0200
Subject: [PATCH 11/11] arm64: dts: meson: add i2c2 node to ODROID N2/N2+
The J2 connectors pinout documents "I2C.SDA0/SCL0" on pin 3 and 5, which
are connected to GPIOX_17/18. This GPIO allow to mux I2C to the second
I2C instance. Enable i2c2 and use the appropriate pinmux.
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
index 38a996ed3e19..45a8998c4a3a 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dtsi
@@ -586,6 +586,12 @@ &ir {
linux,rc-map-name = "rc-odroid";
};
+&i2c2 {
+ status = "okay";
+ pinctrl-0 = <&i2c2_sda_x_pins>, <&i2c2_sck_x_pins>;
+ pinctrl-names = "default";
+};
+
&i2c3 {
status = "okay";
pinctrl-0 = <&i2c3_sda_a_pins>, <&i2c3_sck_a_pins>;
--
2.31.1

View File

@@ -0,0 +1,32 @@
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index 1cc9dc6..9f48dff 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -16,6 +16,8 @@
aliases {
serial0 = &uart_AO;
+ serial1 = &uart_A;
+ serial2 = &uart_C;
ethernet0 = &ethmac;
};
@@ -290,6 +355,18 @@
pinctrl-names = "default";
};
+&uart_A {
+ status = "disabled";
+ pinctrl-0 = <&uart_a_pins>;
+ pinctrl-names = "default";
+};
+
+&uart_C {
+ status = "disabled";
+ pinctrl-0 = <&uart_c_pins>;
+ pinctrl-names = "default";
+};
+
&usb0_phy {
status = "okay";
phy-supply = <&usb_otg_pwr>;

View File

@@ -0,0 +1,22 @@
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
index 98cbba6..48ca119 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi
@@ -321,6 +322,8 @@
&i2c_A {
clocks = <&clkc CLKID_I2C>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c_a_pins>;
};
&i2c_AO {
@@ -329,6 +332,8 @@
&i2c_B {
clocks = <&clkc CLKID_I2C>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c_b_pins>;
};
&i2c_C {

View File

@@ -0,0 +1,41 @@
From ca89096189299862a7b2b3123d96fc8bfbe74ce3 Mon Sep 17 00:00:00 2001
From: Hyeonki Hong <hhk7734@gmail.com>
Date: Tue, 14 Apr 2020 14:15:25 +0900
Subject: [PATCH 13/74] ODROID-C4: arm64/dts: add uart_A node
Change-Id: Ib66a03da2fcf39fc459c20c9f98b1baca34dcf5b
---
arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
index 1b749bd340ce..e5d73598c131 100644
--- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
@@ -14,8 +14,9 @@ / {
model = "Hardkernel ODROID-C4";
aliases {
- serial0 = &uart_AO;
ethernet0 = &ethmac;
+ serial0 = &uart_AO;
+ serial1 = &uart_A;
};
chosen {
@@ -385,6 +386,12 @@ &sd_emmc_c {
vqmmc-supply = <&flash_1v8>;
};
+&uart_A {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart_a_pins>;
+};
+
&uart_AO {
status = "okay";
pinctrl-0 = <&uart_ao_a_pins>;
--
2.25.1

View File

@@ -0,0 +1,85 @@
From 400645dd70ae5a0efbbce35067c8674d380ed2a7 Mon Sep 17 00:00:00 2001
From: Hyeonki Hong <hhk7734@gmail.com>
Date: Wed, 13 May 2020 10:37:28 +0900
Subject: [PATCH 21/74] ODROID-C4: arm64/dts: add i2c2, i2c3 node
Change-Id: Id75f935111744ff6945791deefef20f897dc98ac
(cherry picked from commit 3f4b2ffd0905946175c478baa65361695e78e0de)
---
.../boot/dts/amlogic/meson-sm1-odroid-c4.dts | 53 +++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
index 831053aa6dff..5988dc5f34d0 100644
--- a/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-sm1-odroid-c4.dts
@@ -16,6 +16,8 @@ / {
aliases {
ethernet0 = &ethmac;
+ i2c0 = &i2c2;
+ i2c1 = &i2c3;
serial0 = &uart_AO;
serial1 = &uart_A;
spi0 = &spicc0;
@@ -434,6 +436,57 @@ &ir {
linux,rc-map-name = "rc-odroid";
};
+&i2c2 {
+ status = "okay";
+
+ /*
+ * 40 Pin Header : SDA(GPIOX.17->3 Pin)
+ * SCL(GPIOX.18->5 Pin)
+ */
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c2_master_pins1>;
+
+ /* default 400k */
+ clock-frequency = <400000>;
+};
+
+&i2c3 {
+ /* default i2c clock-frequency is 100Khz */
+ status = "okay";
+
+ /*
+ * 40 Pin Header : SDA(GPIOA.14->27 Pin)
+ * SCL(GPIOA.15->28 Pin)
+ */
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2c3_master_pins2>;
+
+ /* default 100k */
+ clock-frequency = <100000>;
+};
+
+&periphs_pinctrl {
+ i2c2_master_pins1: i2c2-master-pins1 {
+ mux {
+ groups = "i2c2_sda_x",
+ "i2c2_sck_x";
+ function = "i2c2";
+ bias-pull-up;
+ drive-strength-microamp = <3000>;
+ };
+ };
+
+ i2c3_master_pins2: i2c3-master-pins2 {
+ mux {
+ groups = "i2c3_sda_a",
+ "i2c3_sck_a";
+ function = "i2c3";
+ bias-pull-up;
+ drive-strength-microamp = <3000>;
+ };
+ };
+};
+
&pwm_AO_cd {
pinctrl-0 = <&pwm_ao_d_e_pins>;
pinctrl-names = "default";
--
2.25.1

Some files were not shown because too many files have changed in this diff Show More