1867 Commits

Author SHA1 Message Date
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 162084082e92384d40c1789457eb574f8790ea87.

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