2001 Commits

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