2175 Commits

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