1657 Commits

Author SHA1 Message Date
Jan Čermák
7a19b892a5
Bump OS to pre-release version 13.0.rc1 2024-08-06 14:45:45 +02:00
Jan Čermák
c2527a2ae1
Linux: Update kernel to 6.6.44 (#3500)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.44
2024-08-05 14:04:32 +02:00
Jan Čermák
a32974e1a7
Use GRUB2 legacy loader only on some Intel Atom boards specifically (#3498)
* Use GRUB2 legacy loader only on some Intel Atom boards specifically

Previous revert of GRUB2 change that introduced usage of the generic EFI loader
for all x86 boards in #3324 caused regressions, the one confirmed is #3348.
This commit adds a specific patch that identifies the broken platforms based
on SMBIOS data gathered in #3305 and falls back to the legacy loader there.

Tested on Intel D525MW (falls back) and QEMU (no fallback).

* Enable GRUB's smbios module

Having smbios command in GRUB can help in future debugging, e.g. to add more
CPUs that should use the linux loader fallback.
2024-07-31 09:22:07 +02:00
Jan Čermák
d51a0d3cec
Patch genimage to force first usable LBA @ 34 to fix RPi 5/Windows issues (#3497)
Genimage sets the first usable LBA to the offset of the first partition. While
it shouldn't be an issue in theory, Windows may do some nasty things with the
GPT header afterwards which breaks the Raspberry Pi bootloader, manifesting as

Before purpose of this behavior is clarified in [1], add a downstream patch
that sets the first usable LBA back to 34, which was the value that was used
before migrating to Genimage in #3388. Since changing this value (hopefully)
doesn't have any other consequences, and the images now should be closer to
pre-genimage builds, no more side-effects are expected from this change.

[1] https://www.github.com/pengutronix/genimage/issues/262

Fixes #3437
2024-07-30 18:57:37 +02:00
Jan Čermák
327e9a07c9
Linux: Update kernel to 6.6.43 (#3495)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.42
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.43
2024-07-29 14:06:21 +02:00
Jan Čermák
568499072f
Allow EROFS compression for Rockchip kernels (#3493)
Rockchip config fragment had EROFS compression explicitly disabled. Remove that
option and also remove the EROFS one, as it's already set in common config.
2024-07-25 21:51:36 +02:00
Stefan Agner
bc7c109163
Enable Netfilter MARK match kernel configuration (#3492)
Make the Netfitler MARK match kernel config a OS required configuration.
This config is required by the OpenThread Border Router add-on.

Fixes: https://github.com/home-assistant/addons/issues/3698
2024-07-24 16:40:37 +02:00
Jan Čermák
b0bc71a835
Reduce log spam from Docker health checks (#3491)
Reduce verbosity from deactivated Docker mounts, triggered by the Docker
healthcheck. These messages do not carry any value for us and logs supplied by
users are often spammed mostly with these. Moreover, they sometimes cause
confusion that something is wrong, see for example #3021.

Unfortunately, it's not possible to use LogFilterPatterns= here, because it's
not applied to these messages, as explicitly said in the docs:

  Filtering is based on the unit for which LogFilterPatterns= is defined
  meaning log messages coming from systemd(1) about the unit are not taken
  into account.

runc 1.2.0 supposedly should fix this, but it's unclear when it would be
available, so let's stick to this solution (reducing verbosity from debug to
notice for all units `run-docker-*.mount`) for the time being.
2024-07-24 16:34:37 +02:00
Jan Čermák
a80311a285
Use EROFS for the root filesystem (#3456)
* Use name.sh functions for paths in genimage

Paths for images generated outside of genimage were not used in genimage
definitions. Use them as the single source of truth.

Images generated by genimage itself (e.g. kernel.img) don't need to use those
functions, so remove the unused ones.

* Use EROFS instead of SquashFS for root FS

* Enabled EROFS in common kernel fragment
* RootFS image switched to EROFS with options to get decent compression
* rootfstype removed from kernel command line

* Get size of correct FS image in GH build summary
2024-07-24 16:34:26 +02:00
Jan Čermák
eb2bdf85e9
Linux: Update kernel to 6.6.41 (#3482)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.39
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.40
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.41
2024-07-22 12:57:35 +02:00
Jan Čermák
63a05a5a1e
Revert "Revert GRUB2 patch causing boot failure on some old x86_64 BIOSes (#3324)" (#3470) 2024-07-11 00:01:52 +02:00
Jan Čermák
150be514e4
Enable i6300ESB watchdog driver for generic-aarch64 (#3468)
This is one of WDT drivers used by KVM/QEMU. For OVA it's been already enabled
in #2627 - enable it for aarch64 as well.

Fixes #3414
2024-07-10 14:39:08 +02:00
Jan Čermák
45cbd1d9b7
Linux: Update kernel to 6.6.38 (#3469)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.38
2024-07-10 14:38:51 +02:00
Jan Čermák
00171ae44c
Enable aQuantia AQtion ethernet driver (#3467)
Enable driver for wide range of multi-gigabit NICs.

Fixes #3438
2024-07-09 13:01:25 +02:00
Jan Čermák
3ef8b07676
Linux: Update kernel to 6.6.37 (#3463)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.37
2024-07-08 12:13:14 +02:00
Jan Čermák
ea286d9dad
Populate grubenv with RAUC data in clean aarch64 OS image (#3458)
While not as bad as in 87a6c84, because the grubenv already exists in the
image, RAUC still complains about missing ORDER on the very first boot on
aarch64. Populate the environment in the same way as we do for other GRUB
platforms.
2024-07-08 12:12:58 +02:00
Jan Čermák
4308c45391
Remove old code from rauc-hook and GRUB env initialization (#3457)
With upgrade path enforced in standard HAOS upgrade procedure, we don't need to
keep some old code anymore. This means that upgrade from some very old HAOS
version (pre-8.0) to HAOS 13+ will fail in the install-check hook but this is
rather desirable.
2024-07-08 12:12:45 +02:00
Cyprien Laplace
33d8b538ad
Fix rauc hook to save and restore the grub environment (#3451)
Without a machine-id, the next boot will be considered as a
first boot, and any external data disk will be disabled.

Fixes #3247.
2024-07-04 10:14:47 +02:00
Jan Čermák
245c0d0b03
Bump OS to development version 13.0.dev0 2024-07-03 19:38:47 +02:00
Jan Čermák
0555e89ad0
Linux: Update kernel to 6.6.36 (#3448)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.36
2024-06-27 17:53:15 +02:00
Jan Čermák
203885a7d8
Linux: Update kernel to 6.6.35 (#3443)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.35
2024-06-25 16:21:48 +02:00
Jan Čermák
6c7b6fdebe
Generate version information for RAUC when rauc.db is empty (#3436)
RAUC currently doesn't know the version of the booted slot when booted for the
first time or after wiping the data partition. As a result `ha os info` is
missing this information too.

As there's no built-in mechanism for generating these data by RAUC itself, add
a oneshot service that checks if the boot slot information is contained in the
rauc.db and if not, then generate it.

RAUC seems to cope quite well even with bogus data contained in rauc.db but in
any case, a test has been added to check that everything works as expected.
2024-06-20 16:50:14 +02:00
Jan Čermák
87a6c84025
Fix boot slot A marked as bad on the very first boot (#3435)
On the very first boot, grubenv doesn't exist and loading and saving it
silently fails. However, it is later created by the hassos-persists script and
the missing information are added by grub.cfg on the next boot. As the
consequence, when RAUC tries to get information from grubenv on the first boot,
ORDER variable is missing and the slot is reported as bad.

Fixes #3376
2024-06-20 12:57:25 +02:00
Jan Čermák
8490b3bf70
Linux: Update kernel to 6.6.34 (#3420)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.34
2024-06-17 16:00:58 +02:00
Jan Čermák
abe018d4aa
Improve resiliency of skopeo operations in hassio package (#3416)
We still face occasional build errors when fetching from the Docker registry
fails and is not retried with the Skopeo's built-in retry mechanism that was
enabled in #1866. This happens on some network failures, or when premature EOF
is returned when fetching the HTTP data. Seems we're not the only ones having
such issues [1].

To workaround this, add a generic retry shell function that simply retries when
the command ends with a non-zero status, no matter what was the actual cause of
the error.

[1] https://www.github.com/containers/common/issues/654
2024-06-13 15:44:11 +02:00
Jan Čermák
27bc7306ff
Linux: Update kernel to 6.6.33 (#3415)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.33
2024-06-13 11:39:02 +02:00
Jan Čermák
89533755bc
Fix writing to eMMC in U-Boot on Green (#3412)
When Green starts, there is an error indicating the MMC write failed when
saving the bootstate:

  storing env...

  MMC write: dev # 0, block # 1214464, count 64 ... mmc write failed 0 blocks written: ERROR

This results in the boot count not being updated properly if the boot fails.

Seems to be a known issue for this platform, disabling the DDR52 mode (which is
the same what upstream does for other RK356x boards [1]) fixes the issues and
the bootstate is updated correctly.

[1] https://patchwork.ozlabs.org/project/uboot/patch/20240204205312.2342868-2-jonas@kwiboo.se/
2024-06-12 21:52:36 +02:00
Jan Čermák
6d77355c1c
Temporary revert ODROID-N2 U-Boot to 2023.01 to fix eMMC issues (#3409)
As we don't have proper solution for #3319 and #3351 yet, revert to
previous U-Boot which was proven working. This is intended as a
workaround but as there's nothing in the latest U-Boot that will be
really missed on N2, we can stay on the older version for the time
being.

This also means reverting the "40 MHz hack" back to the 24 MHz one.
Since this patch only applies to N2 (meson gx), it can stay along the
common hardkernel uboot patches.
2024-06-11 19:02:40 +02:00
Jan Čermák
542f69efa4
Update Buildroot to 2024.02.3 (#3406)
* Bump buildroot to 2024.02.3

* buildroot 691077e577...770f939463 (1):
  > Merge tag '2024.02.3' into 2024.02.x-haos

* package/hassio: update dind to version 26.0 used in current buildroot
2024-06-10 17:14:17 +02:00
Jan Čermák
6135ecdcc7
Use Genimage for declarative image layout (#3388)
* Use Genimage for declarative image layout instead of s[fg]disk and dd

* Change partition type to hybrid for M1, M1S and Green

This is what it really is, so just make sure only one "fix" function is
called.

* Change efi BOOT_SYS to gpt

There is no reason to have separate efi and boot sys, since all boards
that use efi also use grub as the loader.

* Change BOOT_SYS to more explanatory PARTITION_TABLE_TYPE

* Add units to DISK_SIZE

* Add forced-primary patch and use it in MBR images

* Avoid disabling SC2155, remove old comments
2024-06-07 13:44:14 +02:00
Jan Čermák
22b63ae779
Set tty0 in cmdline as the default preferred console (#3402)
The preferred console (which is used for printing the systemd boot log)
is the last one specified in the cmdline boot arguments. Make sure it is
always tty0, i.e. the first graphical console.

In some places tty1 was used - change it to tty0 which is commonly used,
and in HAOS points to tty1 anyway.

The only exception is the Yellow, which doesn't have an HDMI port, so
the serial console is used as the preferred one instead.

For ASUS Tinker, use a versioned cmdline.txt file instead of in-place
generating it in the post-build hook.
2024-06-07 12:59:21 +02:00
Jan Čermák
bd7474fc97
RaspberryPi: Update kernel to 6.6.31 - stable_20240529 (#3400)
* RaspberryPi: Update kernel to 6.6.31 - stable_20240529

* Unify Linux patches after RPi update to non-conflicting 6.6.31

* Bump buildroot to update rpi-firmware

* buildroot 9af2384782...691077e577 (1):
  > package/rpi-firmware: bump to version 1.20240529 for kernel 6.6.31
2024-06-04 17:33:51 +02:00
Jan Čermák
682d59434e
Linux: Update kernel to 6.6.32 (#3394)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.32
2024-05-27 15:00:13 +02:00
Jan Čermák
2c725d90f6
Reintroduce IPv6 reachability probe patch for RPi lost after refactoring (#3389)
* Reintroduce IPv6 reachability probe patch for RPi lost after refactoring

In #3384 we moved the patches around, which results in version-specific
patches not applied for RPi linux-custom build. Copy the missing IPv6
reachability probe patch to the RPi patches directory.

* Only copy IPv6 reachability probe patch to top-level linux patches

Instead of copying the patch to RPi directory and renumbering the
patches, only copy it upper level so it's applied for all linux versions
other than 6.6.31.
2024-05-24 09:30:07 +02:00
Jan Čermák
8dbc03cc76
Linux: Update kernel to 6.6.31 (#3384)
* Linux: Update kernel to 6.6.31

* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.31

* Update patch workarounding Z-Wave.me USB issues

Linux commit 480c3abbba36628dab063b9ca218bb28090e5b46 changed code that
is reverted by the patch. Use a version-specific patch directory again
for upstream Linux patches before RPi kernel is updated to 6.6.31+.
2024-05-21 21:27:51 +02:00
Jan Čermák
8aa9869e4f
Use U-Boot tarball for all boards (#3361)
ODROID M1, M1S and Green historically used git repo as the source. Now
that we use the same version for all boards, use always use distribution
tarball for consistency and more efficient caching.
2024-05-14 11:23:31 +02:00
Jan Čermák
ca71774e7d
Linux: Update kernel to 6.6.30 (#3342)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.30
2024-05-08 21:26:45 +02:00
Stefan Agner
2c266c53f1
Enable grep context feature (#3339)
Add context feature to Busybox grep configuration. Context is really useful
when checking host logs directly on the OS shell.
2024-05-01 19:05:01 +02:00
Jan Čermák
9fa953745a
RaspberryPi: Update kernel to 6.6.28 - stable_20240423 (#3336)
* RaspberryPi: Update kernel to 6.6.28 - stable_20240423

* Bump buildroot to update rpi-firmware

* buildroot 0a64bfe8f1...e8948ce36e (1):
  > package/rpi-firmware: bump to version 1.20240424 for kernel 6.6.28
2024-04-30 11:55:13 +02:00
Jan Čermák
65f35c65b2
Linux: Update kernel to 6.6.29 (#3334)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.29
2024-04-29 15:12:50 +02:00
Jan Čermák
67315f86d4
Enable kernel userspace crypto API interface for all platforms (#3330)
Enable libkcapi in generic kernel config. The bloat is minimal and the
options are enabled on most distributions. These modules are also needed
for Bluetooth Mesh and adding them fixes compatibility with some HCI USB
adapters.

Fixes #3322
2024-04-26 21:27:35 +02:00
Jan Čermák
21fd9e64c8
Bump OS to development version 12.4.dev0 2024-04-26 11:59:15 +02:00
Jan Čermák
478538eac0
Revert GRUB2 patch causing boot failure on some old x86_64 BIOSes (#3324)
GRUB 2.12 release contains a change of the loader [1] used for loading
the kernel on x86_64 platform. This change was identified to cause boot
failure on some old Intel Atom boards with the NM10 chipset, and
possibly some others. Revert this patch before we get a more proper fix
for the issue.

[1] https://git.savannah.gnu.org/cgit/grub.git/commit/?id=cfbfae1aef0694b416aa199291cfef7596cdfc20

Fixes #3305
2024-04-25 08:33:01 +02:00
Stefan Agner
e1b11540a1
ODROID-N2/C2/C4: Force 40MHz instead of 24MHz as eMMC clock (#3319)
It seems that forcing 24MHz clocks is problematic for newer 32GB
Kingston based eMMC modules on ODROID-N2(+). Use what downstream
U-Boot is using as f_max, which is 40MHz.

Fixes: #3227
2024-04-24 20:37:14 +02:00
Jan Čermák
9272065664
Linux: Update kernel to 6.6.28 (#3316)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.28
2024-04-17 16:23:18 +02:00
Jan Čermák
77c28be3cd
Increase maximum length of usb_storage.quirks in RPi kernel params (#3311)
With #3281 we hit the maximum length of the quirks parameter. Since
cmdline.txt changes are not applied on OS update, only new installs of
12.2 are affected, effectively disabling all quirks until this patch
lands in future OS release.

Fixes #3308
2024-04-15 14:27:41 +02:00
Jan Čermák
85d7c23a5f
Linux: Update kernel to 6.6.27 (#3310)
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.26
* https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.27
2024-04-15 14:27:28 +02:00
Stefan Agner
4f53947596
Update Raspberry Pi 3 device tree list (#3301)
Make sure all Raspberry Pi devices using the BCM2837 SoC (or the SiP
version RP3A0 of it) are deployed. This especially makes sure that
we only deploy the downstream device trees (named bcm2710*) and deploy
device trees for the CM3 as well as the Zero 2 and Zero 2 W consistently
for 32-bit and 64-bit.
2024-04-12 09:42:05 +02:00
Jan Čermák
56ae6e1cb7
Remove BT_HS from kernel configs after upstream removal (#3299)
BT_HS has been removed in e7b02296fb400ee64822fbdd81a0718449066333 and
backported to stable branches - remove it from our configs to avoid
warnings.
2024-04-10 15:53:21 +02:00
Jan Čermák
2254260dad
Update Raspberry Pi Kernel to v6.6.20 (#3297)
* RaspberryPi: Update kernel to 6.6.20 - 6f16847710cc0502450788b9f12f0a14d3429668

Used version specified in RPi OS release notes [1].

[1] https://downloads.raspberrypi.org/raspios_arm64/release_notes.txt

* Update RPi Buildroot defconfigs for v6.6.y kernel

* Update RPi kernel patches for v6.6.y kernel

* Amended old patches to accomodate for new DTS paths
* Removed 6.6.25 patches -> moved to the common folder
* Added patch to fix Yellow DTS compilation

* Bump buildroot to update rpi-firmware

* buildroot b45d671fe3...9f5750121a (1):
  > package/rpi-firmware: bump to version for (untagged) kernel v6.6.20

* Remove kernel v6.1.y config fragments, as they're not needed anymore
2024-04-10 10:04:35 +02:00