Commit Graph

1318 Commits

Author SHA1 Message Date
Stefan Agner
1a551c0753 Bump version 5.11 5.11 2021-01-31 00:28:57 +01:00
Pascal Vizeli
0cf378164c Map host udev data ro to supervisor container (#1186)
* Mapp host udev data ro to container

* fix lint

* fix paths
2021-01-31 00:28:33 +01:00
Stefan Agner
3bc6e2b10a 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-31 00:27:56 +01:00
Stefan Agner
5662a6230f RaspberryPi: Update kernel 5.4.83 - 76c49e60e742d0bebd798be972d67dd3fd007691 (#1187) 2021-01-31 00:27:32 +01:00
Pascal Vizeli
bc8db10ae6 Fix connectivity check updated NM (#1182) 2021-01-31 00:26:13 +01:00
Stefan Agner
9822625a3d Linux: Update kernel 5.4.94 (#1195) 2021-01-31 00:24:49 +01:00
Stefan Agner
f142640e2e Linux: Update kernel 5.4.93 (#1189) 2021-01-29 15:01:47 +01:00
Stefan Agner
e648285fca Bump version 5.10 5.10 2020-12-31 15:07:26 +01:00
Stefan Agner
3cf1b78d55 Bump upstream Linux kernel (#1147)
* Linux: Update kernel 5.4.86

* Odroid: Update kernel 5.9.16
2020-12-31 15:06:32 +01:00
Stefan Agner
4dd3b8bc0d 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:59:53 +01:00
Stefan Agner
918c14fce0 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-31 14:59:48 +01:00
Stefan Agner
d56344414b 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:59:43 +01:00
Stefan Agner
6b51d5a8ab 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-30 16:58:38 +01:00
Stefan Agner
5c2b6bd6e3 Update buildroot to 2020.11.1 (#1135)
Signed-off-by: Stefan Agner <stefan@agner.ch>
2020-12-30 16:57:55 +01:00
Stefan Agner
103ddb150b 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-30 16:57:40 +01:00
Stefan Agner
0e7310e8db 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-30 16:57:22 +01:00
Stefan Agner
b4d587e53b 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-30 16:56:15 +01:00
Mario Limonciello
01923727d0 Add LPSS support for intel-nuc (#1145)
This is needed for MMC to enumerate properly (Fixes: #1112)
2020-12-30 16:55:52 +01:00
Stefan Agner
8cc42b3adb 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-30 16:55:45 +01:00
Stefan Agner
fe25d03b09 Add eMMC support for Intel NUC (#1112) (#1123)
Enable CONFIG_MMC and friends for Intel NUC with eMMC.
2020-12-30 16:55:34 +01:00
Stefan Agner
e0f435bae1 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-30 16:54:11 +01:00
Stefan Agner
810de4efdb 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-30 16:53:53 +01:00
Stefan Agner
5f41501292 Bump systemd to latest stable release 246.9 (#1110) 2020-12-30 16:53:20 +01:00
Stefan Agner
45d6d287e8 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.
5.9
2020-12-18 19:30:18 +01:00
Stefan Agner
14ddf8800e Bump version 5.9 2020-12-18 19:22:07 +01:00
Stefan Agner
33cc77eff0 Rel 5 bump upstream kernel (#1105)
* Linux: Update kernel 5.4.84

* Odroid: Update kernel 5.9.15
2020-12-18 19:20:00 +01:00
Stefan Agner
1bdccc83d9 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-18 16:46:11 +01:00
Stefan Agner
a0f63549f4 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-18 16:46:02 +01:00
Stefan Agner
f679638a9c 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-18 16:45:52 +01:00
Stefan Agner
ac3017fc15 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-18 16:45:44 +01:00
Stefan Agner
c98e1557bb 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-18 16:45:33 +01:00
Stefan Agner
4ffe277bcb 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-18 09:26:15 +01:00
Stefan Agner
e1c1f052dc 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-18 09:25:55 +01:00
Stefan Agner
6d5c41c682 Bump version 5.8 and deployment to production 5.8 2020-12-13 11:27:24 +01:00
Stefan Agner
9e78409db8 Upload ova (Open Virtualization Appliance) image as well 2020-12-13 11:25:07 +01:00
Stefan Agner
f649995a08 Set OS pretty name to Home Assistant OS 2020-12-13 11:25:07 +01:00
Stefan Agner
6bbf0b382c Bump Linux kernel to 5.4.83/5.9.14 (#1083)
* Odroid: Update kernel 5.9.14

* Linux: Update kernel 5.4.83
2020-12-13 11:24:31 +01:00
Stefan Agner
abfe9da03e Bump version 5.7 and deployment to staging 5.7 2020-12-10 22:27:53 +01:00
Stefan Agner
81275e7189 Merge branch 'dev'
Prepare release-candidate
2020-12-10 22:23:29 +01:00
Stefan Agner
9b81e50e19 Linux: Update kernel 5.4.82 2020-12-10 21:55:00 +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