From 21fd9e64c83fb985502c91bf03e08ceb51af6c2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Fri, 26 Apr 2024 11:59:15 +0200 Subject: [PATCH 01/27] Bump OS to development version 12.4.dev0 --- buildroot-external/meta | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildroot-external/meta b/buildroot-external/meta index af1eac648a4..a30da9ad8cb 100644 --- a/buildroot-external/meta +++ b/buildroot-external/meta @@ -1,5 +1,5 @@ VERSION_MAJOR="12" -VERSION_MINOR="3" +VERSION_MINOR="4" VERSION_SUFFIX="dev0" HASSOS_NAME="Home Assistant OS" From 4e44b101f32d677d5de19e9baae0773c09640d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Fri, 26 Apr 2024 15:30:23 +0200 Subject: [PATCH 02/27] Enable KVM for running tests in GH Actions (#3329) It was not possible on free runners previously, but it should be now: https://github.com/actions/runner-images/discussions/7191#discussioncomment-9018826 --- .github/workflows/test.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 980b98e9cf9..cf66c86ac66 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -28,9 +28,6 @@ jobs: test: if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }} - env: - NO_KVM: 1 - name: Test in QEMU runs-on: ubuntu-22.04 steps: @@ -69,6 +66,12 @@ jobs: xz -dc haos*.qcow2.xz > tests/haos.qcow2 rm haos*.qcow2.xz + - name: Enable KVM group perms + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm + - name: Run tests run: | ./tests/run_tests.sh From 67315f86d49ae117766491c366c68845ffa68548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Fri, 26 Apr 2024 21:27:35 +0200 Subject: [PATCH 03/27] 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 --- buildroot-external/board/asus/tinker/kernel.config | 5 ----- buildroot-external/kernel/v6.6.y/hassos.config | 6 ++++++ .../kernel/v6.6.y/kernel-arm64-rockchip.config | 5 ----- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/buildroot-external/board/asus/tinker/kernel.config b/buildroot-external/board/asus/tinker/kernel.config index 84e955a96be..6b108c724e9 100644 --- a/buildroot-external/board/asus/tinker/kernel.config +++ b/buildroot-external/board/asus/tinker/kernel.config @@ -1555,7 +1555,6 @@ CONFIG_SECURITY=y CONFIG_SECURITY_APPARMOR=y CONFIG_SECURITY_YAMA=y CONFIG_LSM="apparmor" -CONFIG_CRYPTO_USER=m CONFIG_CRYPTO_PCRYPT=m CONFIG_CRYPTO_TEST=m CONFIG_CRYPTO_DH=m @@ -1597,10 +1596,6 @@ CONFIG_CRYPTO_ZSTD=m CONFIG_CRYPTO_ANSI_CPRNG=y CONFIG_CRYPTO_DRBG_HASH=y CONFIG_CRYPTO_DRBG_CTR=y -CONFIG_CRYPTO_USER_API_HASH=m -CONFIG_CRYPTO_USER_API_SKCIPHER=m -CONFIG_CRYPTO_USER_API_RNG=m -CONFIG_CRYPTO_USER_API_AEAD=m CONFIG_CRYPTO_GHASH_ARM_CE=m CONFIG_CRYPTO_SHA1_ARM_NEON=m CONFIG_CRYPTO_SHA1_ARM_CE=m diff --git a/buildroot-external/kernel/v6.6.y/hassos.config b/buildroot-external/kernel/v6.6.y/hassos.config index 826d0b382f1..76bae809a3d 100644 --- a/buildroot-external/kernel/v6.6.y/hassos.config +++ b/buildroot-external/kernel/v6.6.y/hassos.config @@ -64,6 +64,12 @@ CONFIG_CRYPTO=y CONFIG_CRYPTO_LZ4=y CONFIG_CRYPTO_MICHAEL_MIC=y +CONFIG_CRYPTO_USER=m +CONFIG_CRYPTO_USER_API_HASH=m +CONFIG_CRYPTO_USER_API_SKCIPHER=m +CONFIG_CRYPTO_USER_API_RNG=m +CONFIG_CRYPTO_USER_API_AEAD=m + CONFIG_PARTITION_ADVANCED=y CONFIG_EFI_PARTITION=y CONFIG_MSDOS_PARTITION=y diff --git a/buildroot-external/kernel/v6.6.y/kernel-arm64-rockchip.config b/buildroot-external/kernel/v6.6.y/kernel-arm64-rockchip.config index c6274b7dc5e..98394ee6022 100644 --- a/buildroot-external/kernel/v6.6.y/kernel-arm64-rockchip.config +++ b/buildroot-external/kernel/v6.6.y/kernel-arm64-rockchip.config @@ -4086,7 +4086,6 @@ CONFIG_INTEGRITY_PLATFORM_KEYRING=y CONFIG_DEFAULT_SECURITY_APPARMOR=y CONFIG_LSM="lockdown,yama,integrity,apparmor" CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y -CONFIG_CRYPTO_USER=m CONFIG_CRYPTO_PCRYPT=m CONFIG_CRYPTO_CRYPTD=y CONFIG_CRYPTO_AUTHENC=y @@ -4136,10 +4135,6 @@ CONFIG_CRYPTO_LZ4=m CONFIG_CRYPTO_ANSI_CPRNG=m CONFIG_CRYPTO_DRBG_HASH=y CONFIG_CRYPTO_DRBG_CTR=y -CONFIG_CRYPTO_USER_API_HASH=m -CONFIG_CRYPTO_USER_API_SKCIPHER=m -CONFIG_CRYPTO_USER_API_RNG=m -CONFIG_CRYPTO_USER_API_AEAD=m CONFIG_CRYPTO_STATS=y CONFIG_CRYPTO_NHPOLY1305_NEON=y CONFIG_CRYPTO_CHACHA20_NEON=y From 65f35c65b2756e239ae0ea0d0fc46ab0d04e9796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Mon, 29 Apr 2024 15:12:50 +0200 Subject: [PATCH 04/27] Linux: Update kernel to 6.6.29 (#3334) * https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.29 --- Documentation/kernel.md | 24 +++++++++---------- .../configs/generic_aarch64_defconfig | 2 +- .../configs/generic_x86_64_defconfig | 2 +- buildroot-external/configs/green_defconfig | 2 +- .../configs/khadas_vim3_defconfig | 2 +- .../configs/odroid_c2_defconfig | 2 +- .../configs/odroid_c4_defconfig | 2 +- .../configs/odroid_m1_defconfig | 2 +- .../configs/odroid_m1s_defconfig | 2 +- .../configs/odroid_n2_defconfig | 2 +- .../configs/odroid_xu4_defconfig | 2 +- buildroot-external/configs/ova_defconfig | 2 +- buildroot-external/configs/tinker_defconfig | 2 +- 13 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Documentation/kernel.md b/Documentation/kernel.md index c3266bd2011..17627264eea 100644 --- a/Documentation/kernel.md +++ b/Documentation/kernel.md @@ -5,7 +5,7 @@ Default Kernel tree: 6.1 | Board | Version | |-------|---------| -| Open Virtual Appliance | 6.6.28 | +| Open Virtual Appliance | 6.6.29 | | Raspberry Pi | 6.6.20 | | Raspberry Pi 0-W | 6.6.20 | | Raspberry Pi 2 | 6.6.20 | @@ -13,14 +13,14 @@ Default Kernel tree: 6.1 | Raspberry Pi 4 | 6.6.20 | | Raspberry Pi 5 | 6.6.20 | | Home Assistant Yellow | 6.6.20 | -| Home Assistant Green | 6.6.28 | -| Tinker Board | 6.6.28 | -| ODROID-C2 | 6.6.28 | -| ODROID-C4 | 6.6.28 | -| ODROID-M1 | 6.6.28 | -| ODROID-M1S | 6.6.28 | -| ODROID-N2 | 6.6.28 | -| ODROID-XU4 | 6.6.28 | -| Generic aarch64 | 6.6.28 | -| Generic x86-64 | 6.6.28 | -| Khadas VIM3 | 6.6.28 | +| Home Assistant Green | 6.6.29 | +| Tinker Board | 6.6.29 | +| ODROID-C2 | 6.6.29 | +| ODROID-C4 | 6.6.29 | +| ODROID-M1 | 6.6.29 | +| ODROID-M1S | 6.6.29 | +| ODROID-N2 | 6.6.29 | +| ODROID-XU4 | 6.6.29 | +| Generic aarch64 | 6.6.29 | +| Generic x86-64 | 6.6.29 | +| Khadas VIM3 | 6.6.29 | diff --git a/buildroot-external/configs/generic_aarch64_defconfig b/buildroot-external/configs/generic_aarch64_defconfig index 86077f5a5a3..0dc07740f81 100644 --- a/buildroot-external/configs/generic_aarch64_defconfig +++ b/buildroot-external/configs/generic_aarch64_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/arm-uefi/generic-aarch64 $(BR2_EXTERNAL_HASSOS_PATH)/board/arm-uefi/generic-aarch64/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.28" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.29" BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/board/arm-uefi/generic-aarch64/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/generic_x86_64_defconfig b/buildroot-external/configs/generic_x86_64_defconfig index 69704cbd5ca..069a81583fa 100644 --- a/buildroot-external/configs/generic_x86_64_defconfig +++ b/buildroot-external/configs/generic_x86_64_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/pc/generic-x86-64 $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/generic-x86-64/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.28" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.29" BR2_LINUX_KERNEL_DEFCONFIG="x86_64" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/generic-x86-64/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/green_defconfig b/buildroot-external/configs/green_defconfig index 5b4cc412867..ba8925649f6 100755 --- a/buildroot-external/configs/green_defconfig +++ b/buildroot-external/configs/green_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/nabucasa/green $(BR2_EXTERNAL_HASSOS_PATH)/board/nabucasa/green/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.28" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.29" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/kernel-arm64-rockchip.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/nabucasa/green/kernel.config" diff --git a/buildroot-external/configs/khadas_vim3_defconfig b/buildroot-external/configs/khadas_vim3_defconfig index f14db6d3679..b63f1cfc7d1 100644 --- a/buildroot-external/configs/khadas_vim3_defconfig +++ b/buildroot-external/configs/khadas_vim3_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/khadas/vim3 $(BR2_EXTERNAL_HASSOS_PATH)/board/khadas/vim3/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.28" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.29" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/khadas/kernel-vim.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config" diff --git a/buildroot-external/configs/odroid_c2_defconfig b/buildroot-external/configs/odroid_c2_defconfig index b4f5ef471b3..3a7a9e81a13 100644 --- a/buildroot-external/configs/odroid_c2_defconfig +++ b/buildroot-external/configs/odroid_c2_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.28" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.29" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/kernel-amlogic.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config" diff --git a/buildroot-external/configs/odroid_c4_defconfig b/buildroot-external/configs/odroid_c4_defconfig index 96f9e284618..973a85110fe 100644 --- a/buildroot-external/configs/odroid_c4_defconfig +++ b/buildroot-external/configs/odroid_c4_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c4 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c4/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.28" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.29" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/kernel-amlogic.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config" diff --git a/buildroot-external/configs/odroid_m1_defconfig b/buildroot-external/configs/odroid_m1_defconfig index 8c69f3e3ba6..15177d291a0 100644 --- a/buildroot-external/configs/odroid_m1_defconfig +++ b/buildroot-external/configs/odroid_m1_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.28" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.29" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/kernel-arm64-rockchip.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1/kernel.config" diff --git a/buildroot-external/configs/odroid_m1s_defconfig b/buildroot-external/configs/odroid_m1s_defconfig index e0513c1b116..90d5b48236a 100644 --- a/buildroot-external/configs/odroid_m1s_defconfig +++ b/buildroot-external/configs/odroid_m1s_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1s $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1s/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.28" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.29" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/kernel-arm64-rockchip.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1s/kernel.config" diff --git a/buildroot-external/configs/odroid_n2_defconfig b/buildroot-external/configs/odroid_n2_defconfig index c8565eb5a73..06540604bd9 100644 --- a/buildroot-external/configs/odroid_n2_defconfig +++ b/buildroot-external/configs/odroid_n2_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.28" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.29" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/kernel-amlogic.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2/kernel.config" diff --git a/buildroot-external/configs/odroid_xu4_defconfig b/buildroot-external/configs/odroid_xu4_defconfig index 86f330b3e4c..d9149e96ede 100644 --- a/buildroot-external/configs/odroid_xu4_defconfig +++ b/buildroot-external/configs/odroid_xu4_defconfig @@ -17,7 +17,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-xu4 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-xu4/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.28" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.29" BR2_LINUX_KERNEL_DEFCONFIG="exynos" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-xu4/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/ova_defconfig b/buildroot-external/configs/ova_defconfig index c7808177ee0..cb79172041a 100644 --- a/buildroot-external/configs/ova_defconfig +++ b/buildroot-external/configs/ova_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/pc/ova $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/ova/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.28" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.29" BR2_LINUX_KERNEL_DEFCONFIG="x86_64" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/ova/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/tinker_defconfig b/buildroot-external/configs/tinker_defconfig index 5141974a96d..df9e86a346b 100644 --- a/buildroot-external/configs/tinker_defconfig +++ b/buildroot-external/configs/tinker_defconfig @@ -18,7 +18,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/asus/tinker $(BR2_EXTERNAL_HASSOS_PATH)/board/asus/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.28" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.29" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/asus/tinker/kernel.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config" From fce19b784615261ddc0c710cb6866a95e3e817ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Mon, 29 Apr 2024 15:20:36 +0200 Subject: [PATCH 05/27] Fix incorrect mapping of DT overlays on RPi 5 (#3335) RPi 5 config uses BR2_LINUX_KERNEL_INSTALL_INTREE_OVERLAYS which builds the device tree overlays from the Linux tree when building the kernel. The overlays directory also contains overlay_map.dtb which is necessary to correctly map overlays without RPi version suffix to the platform-specific ones. Without this, some peripherals may not work correctly on Pi 5 without any obvious error messages in the kernel log because an incorrect (Pi 4) overlay is used as the default. Fixes #3321 * buildroot cc0481f40e...0a64bfe8f1 (1): > Install overlay_map.dtb when using in-tree DT overlays --- buildroot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildroot b/buildroot index cc0481f40ef..0a64bfe8f19 160000 --- a/buildroot +++ b/buildroot @@ -1 +1 @@ -Subproject commit cc0481f40ef0b33cad32ce443fe2d124bf3a36cc +Subproject commit 0a64bfe8f19aa1d7516c07e5b45a6be5aa5dd444 From 9fa953745a0ded34b4501bae64b9492292278a7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Tue, 30 Apr 2024 11:55:13 +0200 Subject: [PATCH 06/27] 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 --- Documentation/kernel.md | 14 +++++++------- buildroot | 2 +- buildroot-external/configs/rpi2_defconfig | 2 +- buildroot-external/configs/rpi3_64_defconfig | 2 +- buildroot-external/configs/rpi3_defconfig | 2 +- buildroot-external/configs/rpi4_64_defconfig | 2 +- buildroot-external/configs/rpi4_defconfig | 2 +- buildroot-external/configs/rpi5_64_defconfig | 2 +- buildroot-external/configs/yellow_defconfig | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Documentation/kernel.md b/Documentation/kernel.md index 17627264eea..95db21cbabf 100644 --- a/Documentation/kernel.md +++ b/Documentation/kernel.md @@ -6,13 +6,13 @@ Default Kernel tree: 6.1 | Board | Version | |-------|---------| | Open Virtual Appliance | 6.6.29 | -| Raspberry Pi | 6.6.20 | -| Raspberry Pi 0-W | 6.6.20 | -| Raspberry Pi 2 | 6.6.20 | -| Raspberry Pi 3 | 6.6.20 | -| Raspberry Pi 4 | 6.6.20 | -| Raspberry Pi 5 | 6.6.20 | -| Home Assistant Yellow | 6.6.20 | +| Raspberry Pi | 6.6.28 | +| Raspberry Pi 0-W | 6.6.28 | +| Raspberry Pi 2 | 6.6.28 | +| Raspberry Pi 3 | 6.6.28 | +| Raspberry Pi 4 | 6.6.28 | +| Raspberry Pi 5 | 6.6.28 | +| Home Assistant Yellow | 6.6.28 | | Home Assistant Green | 6.6.29 | | Tinker Board | 6.6.29 | | ODROID-C2 | 6.6.29 | diff --git a/buildroot b/buildroot index 0a64bfe8f19..34e790c5dae 160000 --- a/buildroot +++ b/buildroot @@ -1 +1 @@ -Subproject commit 0a64bfe8f19aa1d7516c07e5b45a6be5aa5dd444 +Subproject commit 34e790c5dae7f54c8beed3d3fd05600934c6f0db diff --git a/buildroot-external/configs/rpi2_defconfig b/buildroot-external/configs/rpi2_defconfig index fc346a444c4..7183f805ab5 100644 --- a/buildroot-external/configs/rpi2_defconfig +++ b/buildroot-external/configs/rpi2_defconfig @@ -19,7 +19,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi2 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/6f16847710cc0502450788b9f12f0a14d3429668.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/stable_20240423.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcm2709" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel-armv7.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/rpi3_64_defconfig b/buildroot-external/configs/rpi3_64_defconfig index 3c7e28fee1e..434c153bd5b 100644 --- a/buildroot-external/configs/rpi3_64_defconfig +++ b/buildroot-external/configs/rpi3_64_defconfig @@ -18,7 +18,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi3-64 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/6f16847710cc0502450788b9f12f0a14d3429668.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/stable_20240423.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi3" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/rpi3_defconfig b/buildroot-external/configs/rpi3_defconfig index 1b4964fef59..370352f1117 100644 --- a/buildroot-external/configs/rpi3_defconfig +++ b/buildroot-external/configs/rpi3_defconfig @@ -19,7 +19,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi3 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/6f16847710cc0502450788b9f12f0a14d3429668.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/stable_20240423.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcm2709" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel-armv7.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/rpi4_64_defconfig b/buildroot-external/configs/rpi4_64_defconfig index 59e9455a7d0..6b852cd93b4 100644 --- a/buildroot-external/configs/rpi4_64_defconfig +++ b/buildroot-external/configs/rpi4_64_defconfig @@ -18,7 +18,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi4-64 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/6f16847710cc0502450788b9f12f0a14d3429668.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/stable_20240423.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcm2711" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/rpi4_defconfig b/buildroot-external/configs/rpi4_defconfig index d9b24d143e3..7ec6a74506f 100644 --- a/buildroot-external/configs/rpi4_defconfig +++ b/buildroot-external/configs/rpi4_defconfig @@ -19,7 +19,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi4 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/6f16847710cc0502450788b9f12f0a14d3429668.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/stable_20240423.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcm2711" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel-armv7.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/rpi5_64_defconfig b/buildroot-external/configs/rpi5_64_defconfig index 99d52adb320..ce33a13076b 100644 --- a/buildroot-external/configs/rpi5_64_defconfig +++ b/buildroot-external/configs/rpi5_64_defconfig @@ -18,7 +18,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi5-64 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi5-64/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/6f16847710cc0502450788b9f12f0a14d3429668.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/stable_20240423.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcm2712" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/yellow_defconfig b/buildroot-external/configs/yellow_defconfig index 73334bd1d10..6086b6c2799 100644 --- a/buildroot-external/configs/yellow_defconfig +++ b/buildroot-external/configs/yellow_defconfig @@ -18,7 +18,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/yellow $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/6f16847710cc0502450788b9f12f0a14d3429668.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/stable_20240423.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcm2711" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config" BR2_LINUX_KERNEL_LZ4=y From 2c266c53f1e361caaebcc2595a731f9ee42a0cc3 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Wed, 1 May 2024 19:05:01 +0200 Subject: [PATCH 07/27] 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. --- buildroot-external/busybox.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildroot-external/busybox.config b/buildroot-external/busybox.config index 2044a6aed54..b772e5baa4a 100644 --- a/buildroot-external/busybox.config +++ b/buildroot-external/busybox.config @@ -479,7 +479,7 @@ CONFIG_FEATURE_FIND_LINKS=y CONFIG_GREP=y # CONFIG_EGREP is not set # CONFIG_FGREP is not set -# CONFIG_FEATURE_GREP_CONTEXT is not set +CONFIG_FEATURE_GREP_CONTEXT=y CONFIG_XARGS=y # CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set # CONFIG_FEATURE_XARGS_SUPPORT_QUOTES is not set From ca71774e7da4604f7ef1f924b152617ecfb9913d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Wed, 8 May 2024 21:26:45 +0200 Subject: [PATCH 08/27] Linux: Update kernel to 6.6.30 (#3342) * https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.30 --- Documentation/kernel.md | 24 +++++++++---------- .../configs/generic_aarch64_defconfig | 2 +- .../configs/generic_x86_64_defconfig | 2 +- buildroot-external/configs/green_defconfig | 2 +- .../configs/khadas_vim3_defconfig | 2 +- .../configs/odroid_c2_defconfig | 2 +- .../configs/odroid_c4_defconfig | 2 +- .../configs/odroid_m1_defconfig | 2 +- .../configs/odroid_m1s_defconfig | 2 +- .../configs/odroid_n2_defconfig | 2 +- .../configs/odroid_xu4_defconfig | 2 +- buildroot-external/configs/ova_defconfig | 2 +- buildroot-external/configs/tinker_defconfig | 2 +- 13 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Documentation/kernel.md b/Documentation/kernel.md index 95db21cbabf..e2c9bf073f9 100644 --- a/Documentation/kernel.md +++ b/Documentation/kernel.md @@ -5,7 +5,7 @@ Default Kernel tree: 6.1 | Board | Version | |-------|---------| -| Open Virtual Appliance | 6.6.29 | +| Open Virtual Appliance | 6.6.30 | | Raspberry Pi | 6.6.28 | | Raspberry Pi 0-W | 6.6.28 | | Raspberry Pi 2 | 6.6.28 | @@ -13,14 +13,14 @@ Default Kernel tree: 6.1 | Raspberry Pi 4 | 6.6.28 | | Raspberry Pi 5 | 6.6.28 | | Home Assistant Yellow | 6.6.28 | -| Home Assistant Green | 6.6.29 | -| Tinker Board | 6.6.29 | -| ODROID-C2 | 6.6.29 | -| ODROID-C4 | 6.6.29 | -| ODROID-M1 | 6.6.29 | -| ODROID-M1S | 6.6.29 | -| ODROID-N2 | 6.6.29 | -| ODROID-XU4 | 6.6.29 | -| Generic aarch64 | 6.6.29 | -| Generic x86-64 | 6.6.29 | -| Khadas VIM3 | 6.6.29 | +| Home Assistant Green | 6.6.30 | +| Tinker Board | 6.6.30 | +| ODROID-C2 | 6.6.30 | +| ODROID-C4 | 6.6.30 | +| ODROID-M1 | 6.6.30 | +| ODROID-M1S | 6.6.30 | +| ODROID-N2 | 6.6.30 | +| ODROID-XU4 | 6.6.30 | +| Generic aarch64 | 6.6.30 | +| Generic x86-64 | 6.6.30 | +| Khadas VIM3 | 6.6.30 | diff --git a/buildroot-external/configs/generic_aarch64_defconfig b/buildroot-external/configs/generic_aarch64_defconfig index 0dc07740f81..700e8865053 100644 --- a/buildroot-external/configs/generic_aarch64_defconfig +++ b/buildroot-external/configs/generic_aarch64_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/arm-uefi/generic-aarch64 $(BR2_EXTERNAL_HASSOS_PATH)/board/arm-uefi/generic-aarch64/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.29" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30" BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/board/arm-uefi/generic-aarch64/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/generic_x86_64_defconfig b/buildroot-external/configs/generic_x86_64_defconfig index 069a81583fa..1e5c6475940 100644 --- a/buildroot-external/configs/generic_x86_64_defconfig +++ b/buildroot-external/configs/generic_x86_64_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/pc/generic-x86-64 $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/generic-x86-64/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.29" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30" BR2_LINUX_KERNEL_DEFCONFIG="x86_64" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/generic-x86-64/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/green_defconfig b/buildroot-external/configs/green_defconfig index ba8925649f6..697fce40320 100755 --- a/buildroot-external/configs/green_defconfig +++ b/buildroot-external/configs/green_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/nabucasa/green $(BR2_EXTERNAL_HASSOS_PATH)/board/nabucasa/green/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.29" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/kernel-arm64-rockchip.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/nabucasa/green/kernel.config" diff --git a/buildroot-external/configs/khadas_vim3_defconfig b/buildroot-external/configs/khadas_vim3_defconfig index b63f1cfc7d1..cfd2c806e0a 100644 --- a/buildroot-external/configs/khadas_vim3_defconfig +++ b/buildroot-external/configs/khadas_vim3_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/khadas/vim3 $(BR2_EXTERNAL_HASSOS_PATH)/board/khadas/vim3/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.29" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/khadas/kernel-vim.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config" diff --git a/buildroot-external/configs/odroid_c2_defconfig b/buildroot-external/configs/odroid_c2_defconfig index 3a7a9e81a13..bbd75adedc0 100644 --- a/buildroot-external/configs/odroid_c2_defconfig +++ b/buildroot-external/configs/odroid_c2_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.29" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/kernel-amlogic.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config" diff --git a/buildroot-external/configs/odroid_c4_defconfig b/buildroot-external/configs/odroid_c4_defconfig index 973a85110fe..230778b20eb 100644 --- a/buildroot-external/configs/odroid_c4_defconfig +++ b/buildroot-external/configs/odroid_c4_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c4 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c4/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.29" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/kernel-amlogic.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config" diff --git a/buildroot-external/configs/odroid_m1_defconfig b/buildroot-external/configs/odroid_m1_defconfig index 15177d291a0..b4b62020f94 100644 --- a/buildroot-external/configs/odroid_m1_defconfig +++ b/buildroot-external/configs/odroid_m1_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.29" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/kernel-arm64-rockchip.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1/kernel.config" diff --git a/buildroot-external/configs/odroid_m1s_defconfig b/buildroot-external/configs/odroid_m1s_defconfig index 90d5b48236a..b34ce309f3d 100644 --- a/buildroot-external/configs/odroid_m1s_defconfig +++ b/buildroot-external/configs/odroid_m1s_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1s $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1s/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.29" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/kernel-arm64-rockchip.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1s/kernel.config" diff --git a/buildroot-external/configs/odroid_n2_defconfig b/buildroot-external/configs/odroid_n2_defconfig index 06540604bd9..d7ca0cb7d8c 100644 --- a/buildroot-external/configs/odroid_n2_defconfig +++ b/buildroot-external/configs/odroid_n2_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.29" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/kernel-amlogic.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2/kernel.config" diff --git a/buildroot-external/configs/odroid_xu4_defconfig b/buildroot-external/configs/odroid_xu4_defconfig index d9149e96ede..aba527b913c 100644 --- a/buildroot-external/configs/odroid_xu4_defconfig +++ b/buildroot-external/configs/odroid_xu4_defconfig @@ -17,7 +17,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-xu4 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-xu4/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.29" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30" BR2_LINUX_KERNEL_DEFCONFIG="exynos" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-xu4/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/ova_defconfig b/buildroot-external/configs/ova_defconfig index cb79172041a..712be0bbd9a 100644 --- a/buildroot-external/configs/ova_defconfig +++ b/buildroot-external/configs/ova_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/pc/ova $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/ova/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.29" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30" BR2_LINUX_KERNEL_DEFCONFIG="x86_64" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/ova/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/tinker_defconfig b/buildroot-external/configs/tinker_defconfig index df9e86a346b..2e12717dfae 100644 --- a/buildroot-external/configs/tinker_defconfig +++ b/buildroot-external/configs/tinker_defconfig @@ -18,7 +18,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/asus/tinker $(BR2_EXTERNAL_HASSOS_PATH)/board/asus/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.29" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/asus/tinker/kernel.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config" From dd96b5019ab7631f01eefe16794911aff17fdff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Tue, 14 May 2024 11:06:37 +0200 Subject: [PATCH 09/27] Bump buildroot to update openvmtools to 12.3.0 (again) (#3370) Cherry-picked downstream-only patch lost in Buildroot 2024.02 bump. * buildroot 34e790c5da...9af2384782 (1): > package/openvmtools: bump version to 12.3.0 Fixes #3366 --- buildroot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildroot b/buildroot index 34e790c5dae..9af23847829 160000 --- a/buildroot +++ b/buildroot @@ -1 +1 @@ -Subproject commit 34e790c5dae7f54c8beed3d3fd05600934c6f0db +Subproject commit 9af23847829bdc426562ee2a25cc096265c9e6ab From 8aa9869e4fb1773f53e13978fd95f9178c01a01f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Tue, 14 May 2024 11:23:31 +0200 Subject: [PATCH 10/27] 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. --- buildroot-external/configs/green_defconfig | 5 ++--- buildroot-external/configs/odroid_m1_defconfig | 5 ++--- buildroot-external/configs/odroid_m1s_defconfig | 5 ++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/buildroot-external/configs/green_defconfig b/buildroot-external/configs/green_defconfig index 697fce40320..5a342a50281 100755 --- a/buildroot-external/configs/green_defconfig +++ b/buildroot-external/configs/green_defconfig @@ -136,9 +136,8 @@ BR2_TARGET_ROOTFS_SQUASHFS4_LZ4=y # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y -BR2_TARGET_UBOOT_CUSTOM_GIT=y -BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/u-boot/u-boot.git" -BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="v2024.01" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2024.01" BR2_TARGET_UBOOT_BOARD_DEFCONFIG="green" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config" BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y diff --git a/buildroot-external/configs/odroid_m1_defconfig b/buildroot-external/configs/odroid_m1_defconfig index b4b62020f94..997a1732838 100644 --- a/buildroot-external/configs/odroid_m1_defconfig +++ b/buildroot-external/configs/odroid_m1_defconfig @@ -131,9 +131,8 @@ BR2_TARGET_ROOTFS_SQUASHFS4_LZ4=y # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y -BR2_TARGET_UBOOT_CUSTOM_GIT=y -BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/u-boot/u-boot.git" -BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="v2024.01" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2024.01" BR2_TARGET_UBOOT_BOARD_DEFCONFIG="odroid-m1-rk3568" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1/uboot.config" BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y diff --git a/buildroot-external/configs/odroid_m1s_defconfig b/buildroot-external/configs/odroid_m1s_defconfig index b34ce309f3d..1d8f86ec330 100644 --- a/buildroot-external/configs/odroid_m1s_defconfig +++ b/buildroot-external/configs/odroid_m1s_defconfig @@ -131,9 +131,8 @@ BR2_TARGET_ROOTFS_SQUASHFS4_LZ4=y # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y -BR2_TARGET_UBOOT_CUSTOM_GIT=y -BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/u-boot/u-boot.git" -BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="v2024.01" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2024.01" BR2_TARGET_UBOOT_BOARD_DEFCONFIG="odroid-m1s-rk3566" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1s/uboot.config" BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y From 8dbc03cc76b0d13a53ebcbfefc778f72ceb18428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Tue, 21 May 2024 21:27:51 +0200 Subject: [PATCH 11/27] 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+. --- Documentation/kernel.md | 24 +- ...hanges-causing-issues-with-Z-Wave.m.patch} | 0 .../configs/generic_aarch64_defconfig | 2 +- .../configs/generic_x86_64_defconfig | 2 +- buildroot-external/configs/green_defconfig | 2 +- .../configs/khadas_vim3_defconfig | 2 +- .../configs/odroid_c2_defconfig | 2 +- .../configs/odroid_c4_defconfig | 2 +- .../configs/odroid_m1_defconfig | 2 +- .../configs/odroid_m1s_defconfig | 2 +- .../configs/odroid_n2_defconfig | 2 +- .../configs/odroid_xu4_defconfig | 2 +- buildroot-external/configs/ova_defconfig | 2 +- buildroot-external/configs/tinker_defconfig | 2 +- ...to-explicitly-enable-reachability-te.patch | 0 ...changes-causing-issues-with-Z-Wave.m.patch | 650 ++++++++++++++++++ 16 files changed, 674 insertions(+), 24 deletions(-) rename buildroot-external/{patches/linux/0002-Revert-USB-core-changes-causing-issues-with-Z-Wave.m.patch => board/raspberrypi/patches/linux/0003-Revert-USB-core-changes-causing-issues-with-Z-Wave.m.patch} (100%) rename buildroot-external/patches/linux/{ => 6.6.31}/0001-ipv6-add-option-to-explicitly-enable-reachability-te.patch (100%) create mode 100644 buildroot-external/patches/linux/6.6.31/0002-Revert-USB-core-changes-causing-issues-with-Z-Wave.m.patch diff --git a/Documentation/kernel.md b/Documentation/kernel.md index e2c9bf073f9..493ed2e98e4 100644 --- a/Documentation/kernel.md +++ b/Documentation/kernel.md @@ -5,7 +5,7 @@ Default Kernel tree: 6.1 | Board | Version | |-------|---------| -| Open Virtual Appliance | 6.6.30 | +| Open Virtual Appliance | 6.6.31 | | Raspberry Pi | 6.6.28 | | Raspberry Pi 0-W | 6.6.28 | | Raspberry Pi 2 | 6.6.28 | @@ -13,14 +13,14 @@ Default Kernel tree: 6.1 | Raspberry Pi 4 | 6.6.28 | | Raspberry Pi 5 | 6.6.28 | | Home Assistant Yellow | 6.6.28 | -| Home Assistant Green | 6.6.30 | -| Tinker Board | 6.6.30 | -| ODROID-C2 | 6.6.30 | -| ODROID-C4 | 6.6.30 | -| ODROID-M1 | 6.6.30 | -| ODROID-M1S | 6.6.30 | -| ODROID-N2 | 6.6.30 | -| ODROID-XU4 | 6.6.30 | -| Generic aarch64 | 6.6.30 | -| Generic x86-64 | 6.6.30 | -| Khadas VIM3 | 6.6.30 | +| Home Assistant Green | 6.6.31 | +| Tinker Board | 6.6.31 | +| ODROID-C2 | 6.6.31 | +| ODROID-C4 | 6.6.31 | +| ODROID-M1 | 6.6.31 | +| ODROID-M1S | 6.6.31 | +| ODROID-N2 | 6.6.31 | +| ODROID-XU4 | 6.6.31 | +| Generic aarch64 | 6.6.31 | +| Generic x86-64 | 6.6.31 | +| Khadas VIM3 | 6.6.31 | diff --git a/buildroot-external/patches/linux/0002-Revert-USB-core-changes-causing-issues-with-Z-Wave.m.patch b/buildroot-external/board/raspberrypi/patches/linux/0003-Revert-USB-core-changes-causing-issues-with-Z-Wave.m.patch similarity index 100% rename from buildroot-external/patches/linux/0002-Revert-USB-core-changes-causing-issues-with-Z-Wave.m.patch rename to buildroot-external/board/raspberrypi/patches/linux/0003-Revert-USB-core-changes-causing-issues-with-Z-Wave.m.patch diff --git a/buildroot-external/configs/generic_aarch64_defconfig b/buildroot-external/configs/generic_aarch64_defconfig index 700e8865053..1514fdd9102 100644 --- a/buildroot-external/configs/generic_aarch64_defconfig +++ b/buildroot-external/configs/generic_aarch64_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/arm-uefi/generic-aarch64 $(BR2_EXTERNAL_HASSOS_PATH)/board/arm-uefi/generic-aarch64/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.31" BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/board/arm-uefi/generic-aarch64/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/generic_x86_64_defconfig b/buildroot-external/configs/generic_x86_64_defconfig index 1e5c6475940..696d2e81a46 100644 --- a/buildroot-external/configs/generic_x86_64_defconfig +++ b/buildroot-external/configs/generic_x86_64_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/pc/generic-x86-64 $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/generic-x86-64/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.31" BR2_LINUX_KERNEL_DEFCONFIG="x86_64" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/generic-x86-64/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/green_defconfig b/buildroot-external/configs/green_defconfig index 5a342a50281..80d0324ede0 100755 --- a/buildroot-external/configs/green_defconfig +++ b/buildroot-external/configs/green_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/nabucasa/green $(BR2_EXTERNAL_HASSOS_PATH)/board/nabucasa/green/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.31" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/kernel-arm64-rockchip.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/nabucasa/green/kernel.config" diff --git a/buildroot-external/configs/khadas_vim3_defconfig b/buildroot-external/configs/khadas_vim3_defconfig index cfd2c806e0a..aecc812f0e6 100644 --- a/buildroot-external/configs/khadas_vim3_defconfig +++ b/buildroot-external/configs/khadas_vim3_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/khadas/vim3 $(BR2_EXTERNAL_HASSOS_PATH)/board/khadas/vim3/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.31" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/khadas/kernel-vim.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config" diff --git a/buildroot-external/configs/odroid_c2_defconfig b/buildroot-external/configs/odroid_c2_defconfig index bbd75adedc0..6a7ad54d09d 100644 --- a/buildroot-external/configs/odroid_c2_defconfig +++ b/buildroot-external/configs/odroid_c2_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.31" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/kernel-amlogic.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config" diff --git a/buildroot-external/configs/odroid_c4_defconfig b/buildroot-external/configs/odroid_c4_defconfig index 230778b20eb..c27a378bf8c 100644 --- a/buildroot-external/configs/odroid_c4_defconfig +++ b/buildroot-external/configs/odroid_c4_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c4 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c4/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.31" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/kernel-amlogic.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config" diff --git a/buildroot-external/configs/odroid_m1_defconfig b/buildroot-external/configs/odroid_m1_defconfig index 997a1732838..dff1ffa6e58 100644 --- a/buildroot-external/configs/odroid_m1_defconfig +++ b/buildroot-external/configs/odroid_m1_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.31" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/kernel-arm64-rockchip.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1/kernel.config" diff --git a/buildroot-external/configs/odroid_m1s_defconfig b/buildroot-external/configs/odroid_m1s_defconfig index 1d8f86ec330..aa3489ed7e0 100644 --- a/buildroot-external/configs/odroid_m1s_defconfig +++ b/buildroot-external/configs/odroid_m1s_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1s $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1s/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.31" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/kernel-arm64-rockchip.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1s/kernel.config" diff --git a/buildroot-external/configs/odroid_n2_defconfig b/buildroot-external/configs/odroid_n2_defconfig index d7ca0cb7d8c..1b2ae6b2535 100644 --- a/buildroot-external/configs/odroid_n2_defconfig +++ b/buildroot-external/configs/odroid_n2_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.31" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/kernel-amlogic.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2/kernel.config" diff --git a/buildroot-external/configs/odroid_xu4_defconfig b/buildroot-external/configs/odroid_xu4_defconfig index aba527b913c..7e32320253c 100644 --- a/buildroot-external/configs/odroid_xu4_defconfig +++ b/buildroot-external/configs/odroid_xu4_defconfig @@ -17,7 +17,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-xu4 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-xu4/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.31" BR2_LINUX_KERNEL_DEFCONFIG="exynos" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-xu4/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/ova_defconfig b/buildroot-external/configs/ova_defconfig index 712be0bbd9a..ccd9b2886a2 100644 --- a/buildroot-external/configs/ova_defconfig +++ b/buildroot-external/configs/ova_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/pc/ova $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/ova/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.31" BR2_LINUX_KERNEL_DEFCONFIG="x86_64" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/ova/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/tinker_defconfig b/buildroot-external/configs/tinker_defconfig index 2e12717dfae..481f7ac7260 100644 --- a/buildroot-external/configs/tinker_defconfig +++ b/buildroot-external/configs/tinker_defconfig @@ -18,7 +18,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/asus/tinker $(BR2_EXTERNAL_HASSOS_PATH)/board/asus/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.31" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/asus/tinker/kernel.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config" diff --git a/buildroot-external/patches/linux/0001-ipv6-add-option-to-explicitly-enable-reachability-te.patch b/buildroot-external/patches/linux/6.6.31/0001-ipv6-add-option-to-explicitly-enable-reachability-te.patch similarity index 100% rename from buildroot-external/patches/linux/0001-ipv6-add-option-to-explicitly-enable-reachability-te.patch rename to buildroot-external/patches/linux/6.6.31/0001-ipv6-add-option-to-explicitly-enable-reachability-te.patch diff --git a/buildroot-external/patches/linux/6.6.31/0002-Revert-USB-core-changes-causing-issues-with-Z-Wave.m.patch b/buildroot-external/patches/linux/6.6.31/0002-Revert-USB-core-changes-causing-issues-with-Z-Wave.m.patch new file mode 100644 index 00000000000..0a9221b3a40 --- /dev/null +++ b/buildroot-external/patches/linux/6.6.31/0002-Revert-USB-core-changes-causing-issues-with-Z-Wave.m.patch @@ -0,0 +1,650 @@ +From f9037c133775498d0ff2f035a957ce4f294e4e81 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= +Date: Wed, 6 Mar 2024 13:25:41 +0100 +Subject: [PATCH] Revert USB core changes causing issues with Z-Wave.me UZB + stick +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Workaround for issues described on GH [1] and reported in [2]. + +* Revert "USB: core: Fix oversight in SuperSpeed initialization" + This reverts commit 59cf445754566984fd55af19ba7146c76e6627bc. + +* Revert "USB: core: Fix race by not overwriting udev->descriptor in hub_port_init()" + This reverts commit ff33299ec8bb80cdcc073ad9c506bd79bb2ed20b. + +* Revert "USB: core: Change usb_get_device_descriptor() API" + This reverts commit de28e469da75359a2bb8cd8778b78aa64b1be1f4. + +* Revert "USB: core: Unite old scheme and new scheme descriptor reads" + This reverts commit 85d07c55621676d47d873d2749b88f783cd4d5a1. + +[1] https://github.com/home-assistant/operating-system/issues/2995 +[2] https://lore.kernel.org/linux-usb/1e954652-dfb3-4248-beea-b8a449128ff0@sairon.cz/ + +Signed-off-by: Jan Čermák +--- + drivers/usb/core/hcd.c | 10 +- + drivers/usb/core/hub.c | 336 ++++++++++++++++--------------------- + drivers/usb/core/message.c | 29 ++-- + drivers/usb/core/usb.h | 4 +- + 4 files changed, 166 insertions(+), 213 deletions(-) + +diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c +index 12b6dfeaf658c..d895f6ebbc400 100644 +--- a/drivers/usb/core/hcd.c ++++ b/drivers/usb/core/hcd.c +@@ -958,7 +958,6 @@ static int register_root_hub(struct usb_hcd *hcd) + { + struct device *parent_dev = hcd->self.controller; + struct usb_device *usb_dev = hcd->self.root_hub; +- struct usb_device_descriptor *descr; + const int devnum = 1; + int retval; + +@@ -970,16 +969,13 @@ static int register_root_hub(struct usb_hcd *hcd) + mutex_lock(&usb_bus_idr_lock); + + usb_dev->ep0.desc.wMaxPacketSize = cpu_to_le16(64); +- descr = usb_get_device_descriptor(usb_dev); +- if (IS_ERR(descr)) { +- retval = PTR_ERR(descr); ++ retval = usb_get_device_descriptor(usb_dev, USB_DT_DEVICE_SIZE); ++ if (retval != sizeof usb_dev->descriptor) { + mutex_unlock(&usb_bus_idr_lock); + dev_dbg (parent_dev, "can't read %s device descriptor %d\n", + dev_name(&usb_dev->dev), retval); +- return retval; ++ return (retval < 0) ? retval : -EMSGSIZE; + } +- usb_dev->descriptor = *descr; +- kfree(descr); + + if (le16_to_cpu(usb_dev->descriptor.bcdUSB) >= 0x0201) { + retval = usb_get_bos_descriptor(usb_dev); +diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c +index 1ba3feb5e1900..ef1d63537a9b7 100644 +--- a/drivers/usb/core/hub.c ++++ b/drivers/usb/core/hub.c +@@ -4742,67 +4742,6 @@ static int hub_enable_device(struct usb_device *udev) + return hcd->driver->enable_device(hcd, udev); + } + +-/* +- * Get the bMaxPacketSize0 value during initialization by reading the +- * device's device descriptor. Since we don't already know this value, +- * the transfer is unsafe and it ignores I/O errors, only testing for +- * reasonable received values. +- * +- * For "old scheme" initialization, size will be 8 so we read just the +- * start of the device descriptor, which should work okay regardless of +- * the actual bMaxPacketSize0 value. For "new scheme" initialization, +- * size will be 64 (and buf will point to a sufficiently large buffer), +- * which might not be kosher according to the USB spec but it's what +- * Windows does and what many devices expect. +- * +- * Returns: bMaxPacketSize0 or a negative error code. +- */ +-static int get_bMaxPacketSize0(struct usb_device *udev, +- struct usb_device_descriptor *buf, int size, bool first_time) +-{ +- int i, rc; +- +- /* +- * Retry on all errors; some devices are flakey. +- * 255 is for WUSB devices, we actually need to use +- * 512 (WUSB1.0[4.8.1]). +- */ +- for (i = 0; i < GET_MAXPACKET0_TRIES; ++i) { +- /* Start with invalid values in case the transfer fails */ +- buf->bDescriptorType = buf->bMaxPacketSize0 = 0; +- rc = usb_control_msg(udev, usb_rcvaddr0pipe(), +- USB_REQ_GET_DESCRIPTOR, USB_DIR_IN, +- USB_DT_DEVICE << 8, 0, +- buf, size, +- initial_descriptor_timeout); +- switch (buf->bMaxPacketSize0) { +- case 8: case 16: case 32: case 64: case 9: +- if (buf->bDescriptorType == USB_DT_DEVICE) { +- rc = buf->bMaxPacketSize0; +- break; +- } +- fallthrough; +- default: +- if (rc >= 0) +- rc = -EPROTO; +- break; +- } +- +- /* +- * Some devices time out if they are powered on +- * when already connected. They need a second +- * reset, so return early. But only on the first +- * attempt, lest we get into a time-out/reset loop. +- */ +- if (rc > 0 || (rc == -ETIMEDOUT && first_time && +- udev->speed > USB_SPEED_FULL)) +- break; +- } +- return rc; +-} +- +-#define GET_DESCRIPTOR_BUFSIZE 64 +- + /* Reset device, (re)assign address, get device descriptor. + * Device connection must be stable, no more debouncing needed. + * Returns device in USB_STATE_ADDRESS, except on error. +@@ -4812,17 +4751,10 @@ static int get_bMaxPacketSize0(struct usb_device *udev, + * the port lock. For a newly detected device that is not accessible + * through any global pointers, it's not necessary to lock the device, + * but it is still necessary to lock the port. +- * +- * For a newly detected device, @dev_descr must be NULL. The device +- * descriptor retrieved from the device will then be stored in +- * @udev->descriptor. For an already existing device, @dev_descr +- * must be non-NULL. The device descriptor will be stored there, +- * not in @udev->descriptor, because descriptors for registered +- * devices are meant to be immutable. + */ + static int + hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, +- int retry_counter, struct usb_device_descriptor *dev_descr) ++ int retry_counter) + { + struct usb_device *hdev = hub->hdev; + struct usb_hcd *hcd = bus_to_hcd(hdev->bus); +@@ -4834,13 +4766,6 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, + int devnum = udev->devnum; + const char *driver_name; + bool do_new_scheme; +- const bool initial = !dev_descr; +- int maxp0; +- struct usb_device_descriptor *buf, *descr; +- +- buf = kmalloc(GET_DESCRIPTOR_BUFSIZE, GFP_NOIO); +- if (!buf) +- return -ENOMEM; + + /* root hub ports have a slightly longer reset period + * (from USB 2.0 spec, section 7.1.7.5) +@@ -4873,31 +4798,31 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, + } + oldspeed = udev->speed; + +- if (initial) { +- /* USB 2.0 section 5.5.3 talks about ep0 maxpacket ... +- * it's fixed size except for full speed devices. ++ /* USB 2.0 section 5.5.3 talks about ep0 maxpacket ... ++ * it's fixed size except for full speed devices. ++ * For Wireless USB devices, ep0 max packet is always 512 (tho ++ * reported as 0xff in the device descriptor). WUSB1.0[4.8.1]. ++ */ ++ switch (udev->speed) { ++ case USB_SPEED_SUPER_PLUS: ++ case USB_SPEED_SUPER: ++ udev->ep0.desc.wMaxPacketSize = cpu_to_le16(512); ++ break; ++ case USB_SPEED_HIGH: /* fixed at 64 */ ++ udev->ep0.desc.wMaxPacketSize = cpu_to_le16(64); ++ break; ++ case USB_SPEED_FULL: /* 8, 16, 32, or 64 */ ++ /* to determine the ep0 maxpacket size, try to read ++ * the device descriptor to get bMaxPacketSize0 and ++ * then correct our initial guess. + */ +- switch (udev->speed) { +- case USB_SPEED_SUPER_PLUS: +- case USB_SPEED_SUPER: +- udev->ep0.desc.wMaxPacketSize = cpu_to_le16(512); +- break; +- case USB_SPEED_HIGH: /* fixed at 64 */ +- udev->ep0.desc.wMaxPacketSize = cpu_to_le16(64); +- break; +- case USB_SPEED_FULL: /* 8, 16, 32, or 64 */ +- /* to determine the ep0 maxpacket size, try to read +- * the device descriptor to get bMaxPacketSize0 and +- * then correct our initial guess. +- */ +- udev->ep0.desc.wMaxPacketSize = cpu_to_le16(64); +- break; +- case USB_SPEED_LOW: /* fixed at 8 */ +- udev->ep0.desc.wMaxPacketSize = cpu_to_le16(8); +- break; +- default: +- goto fail; +- } ++ udev->ep0.desc.wMaxPacketSize = cpu_to_le16(64); ++ break; ++ case USB_SPEED_LOW: /* fixed at 8 */ ++ udev->ep0.desc.wMaxPacketSize = cpu_to_le16(8); ++ break; ++ default: ++ goto fail; + } + + speed = usb_speed_string(udev->speed); +@@ -4917,24 +4842,22 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, + if (udev->speed < USB_SPEED_SUPER) + dev_info(&udev->dev, + "%s %s USB device number %d using %s\n", +- (initial ? "new" : "reset"), speed, ++ (udev->config) ? "reset" : "new", speed, + devnum, driver_name); + +- if (initial) { +- /* Set up TT records, if needed */ +- if (hdev->tt) { +- udev->tt = hdev->tt; +- udev->ttport = hdev->ttport; +- } else if (udev->speed != USB_SPEED_HIGH +- && hdev->speed == USB_SPEED_HIGH) { +- if (!hub->tt.hub) { +- dev_err(&udev->dev, "parent hub has no TT\n"); +- retval = -EINVAL; +- goto fail; +- } +- udev->tt = &hub->tt; +- udev->ttport = port1; ++ /* Set up TT records, if needed */ ++ if (hdev->tt) { ++ udev->tt = hdev->tt; ++ udev->ttport = hdev->ttport; ++ } else if (udev->speed != USB_SPEED_HIGH ++ && hdev->speed == USB_SPEED_HIGH) { ++ if (!hub->tt.hub) { ++ dev_err(&udev->dev, "parent hub has no TT\n"); ++ retval = -EINVAL; ++ goto fail; + } ++ udev->tt = &hub->tt; ++ udev->ttport = port1; + } + + /* Why interleave GET_DESCRIPTOR and SET_ADDRESS this way? +@@ -4958,6 +4881,9 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, + } + + if (do_new_scheme) { ++ struct usb_device_descriptor *buf; ++ int r = 0; ++ + retval = hub_enable_device(udev); + if (retval < 0) { + dev_err(&udev->dev, +@@ -4966,14 +4892,52 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, + goto fail; + } + +- maxp0 = get_bMaxPacketSize0(udev, buf, +- GET_DESCRIPTOR_BUFSIZE, retries == 0); +- if (maxp0 > 0 && !initial && +- maxp0 != udev->descriptor.bMaxPacketSize0) { +- dev_err(&udev->dev, "device reset changed ep0 maxpacket size!\n"); +- retval = -ENODEV; +- goto fail; ++#define GET_DESCRIPTOR_BUFSIZE 64 ++ buf = kmalloc(GET_DESCRIPTOR_BUFSIZE, GFP_NOIO); ++ if (!buf) { ++ retval = -ENOMEM; ++ continue; ++ } ++ ++ /* Retry on all errors; some devices are flakey. ++ * 255 is for WUSB devices, we actually need to use ++ * 512 (WUSB1.0[4.8.1]). ++ */ ++ for (operations = 0; operations < GET_MAXPACKET0_TRIES; ++ ++operations) { ++ buf->bMaxPacketSize0 = 0; ++ r = usb_control_msg(udev, usb_rcvaddr0pipe(), ++ USB_REQ_GET_DESCRIPTOR, USB_DIR_IN, ++ USB_DT_DEVICE << 8, 0, ++ buf, GET_DESCRIPTOR_BUFSIZE, ++ initial_descriptor_timeout); ++ switch (buf->bMaxPacketSize0) { ++ case 8: case 16: case 32: case 64: case 255: ++ if (buf->bDescriptorType == ++ USB_DT_DEVICE) { ++ r = 0; ++ break; ++ } ++ fallthrough; ++ default: ++ if (r == 0) ++ r = -EPROTO; ++ break; ++ } ++ /* ++ * Some devices time out if they are powered on ++ * when already connected. They need a second ++ * reset. But only on the first attempt, ++ * lest we get into a time out/reset loop ++ */ ++ if (r == 0 || (r == -ETIMEDOUT && ++ retries == 0 && ++ udev->speed > USB_SPEED_FULL)) ++ break; + } ++ udev->descriptor.bMaxPacketSize0 = ++ buf->bMaxPacketSize0; ++ kfree(buf); + + retval = hub_port_reset(hub, port1, udev, delay, false); + if (retval < 0) /* error or disconnect */ +@@ -4984,13 +4948,14 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, + retval = -ENODEV; + goto fail; + } +- if (maxp0 < 0) { +- if (maxp0 != -ENODEV) ++ if (r) { ++ if (r != -ENODEV) + dev_err(&udev->dev, "device descriptor read/64, error %d\n", +- maxp0); +- retval = maxp0; ++ r); ++ retval = -EMSGSIZE; + continue; + } ++#undef GET_DESCRIPTOR_BUFSIZE + } + + for (operations = 0; operations < SET_ADDRESS_TRIES; ++operations) { +@@ -5031,21 +4996,18 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, + if (do_new_scheme) + break; + +- maxp0 = get_bMaxPacketSize0(udev, buf, 8, retries == 0); +- if (maxp0 < 0) { +- retval = maxp0; ++ retval = usb_get_device_descriptor(udev, 8); ++ if (retval < 8) { + if (retval != -ENODEV) + dev_err(&udev->dev, + "device descriptor read/8, error %d\n", + retval); ++ if (retval >= 0) ++ retval = -EMSGSIZE; + } else { + u32 delay; + +- if (!initial && maxp0 != udev->descriptor.bMaxPacketSize0) { +- dev_err(&udev->dev, "device reset changed ep0 maxpacket size!\n"); +- retval = -ENODEV; +- goto fail; +- } ++ retval = 0; + + delay = udev->parent->hub_delay; + udev->hub_delay = min_t(u32, delay, +@@ -5064,62 +5026,48 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, + goto fail; + + /* +- * Check the ep0 maxpacket guess and correct it if necessary. +- * maxp0 is the value stored in the device descriptor; +- * i is the value it encodes (logarithmic for SuperSpeed or greater). ++ * Some superspeed devices have finished the link training process ++ * and attached to a superspeed hub port, but the device descriptor ++ * got from those devices show they aren't superspeed devices. Warm ++ * reset the port attached by the devices can fix them. + */ +- i = maxp0; +- if (udev->speed >= USB_SPEED_SUPER) { +- if (maxp0 <= 16) +- i = 1 << maxp0; +- else +- i = 0; /* Invalid */ +- } +- if (usb_endpoint_maxp(&udev->ep0.desc) == i) { +- ; /* Initial ep0 maxpacket guess is right */ +- } else if (((udev->speed == USB_SPEED_FULL || +- udev->speed == USB_SPEED_HIGH) && +- (i == 8 || i == 16 || i == 32 || i == 64)) || +- (udev->speed >= USB_SPEED_SUPER && i > 0)) { +- /* Initial guess is wrong; use the descriptor's value */ ++ if ((udev->speed >= USB_SPEED_SUPER) && ++ (le16_to_cpu(udev->descriptor.bcdUSB) < 0x0300)) { ++ dev_err(&udev->dev, "got a wrong device descriptor, " ++ "warm reset device\n"); ++ hub_port_reset(hub, port1, udev, ++ HUB_BH_RESET_TIME, true); ++ retval = -EINVAL; ++ goto fail; ++ } ++ ++ if (udev->descriptor.bMaxPacketSize0 == 0xff || ++ udev->speed >= USB_SPEED_SUPER) ++ i = 512; ++ else ++ i = udev->descriptor.bMaxPacketSize0; ++ if (usb_endpoint_maxp(&udev->ep0.desc) != i) { ++ if (udev->speed == USB_SPEED_LOW || ++ !(i == 8 || i == 16 || i == 32 || i == 64)) { ++ dev_err(&udev->dev, "Invalid ep0 maxpacket: %d\n", i); ++ retval = -EMSGSIZE; ++ goto fail; ++ } + if (udev->speed == USB_SPEED_FULL) + dev_dbg(&udev->dev, "ep0 maxpacket = %d\n", i); + else + dev_warn(&udev->dev, "Using ep0 maxpacket: %d\n", i); + udev->ep0.desc.wMaxPacketSize = cpu_to_le16(i); + usb_ep0_reinit(udev); +- } else { +- /* Initial guess is wrong and descriptor's value is invalid */ +- dev_err(&udev->dev, "Invalid ep0 maxpacket: %d\n", maxp0); +- retval = -EMSGSIZE; +- goto fail; + } + +- descr = usb_get_device_descriptor(udev); +- if (IS_ERR(descr)) { +- retval = PTR_ERR(descr); ++ retval = usb_get_device_descriptor(udev, USB_DT_DEVICE_SIZE); ++ if (retval < (signed)sizeof(udev->descriptor)) { + if (retval != -ENODEV) + dev_err(&udev->dev, "device descriptor read/all, error %d\n", + retval); +- goto fail; +- } +- if (initial) +- udev->descriptor = *descr; +- else +- *dev_descr = *descr; +- kfree(descr); +- +- /* +- * Some superspeed devices have finished the link training process +- * and attached to a superspeed hub port, but the device descriptor +- * got from those devices show they aren't superspeed devices. Warm +- * reset the port attached by the devices can fix them. +- */ +- if ((udev->speed >= USB_SPEED_SUPER) && +- (le16_to_cpu(udev->descriptor.bcdUSB) < 0x0300)) { +- dev_err(&udev->dev, "got a wrong device descriptor, warm reset device\n"); +- hub_port_reset(hub, port1, udev, HUB_BH_RESET_TIME, true); +- retval = -EINVAL; ++ if (retval >= 0) ++ retval = -ENOMSG; + goto fail; + } + +@@ -5145,7 +5093,6 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, + hub_port_disable(hub, port1, 0); + update_devnum(udev, devnum); /* for disconnect processing */ + } +- kfree(buf); + return retval; + } + +@@ -5226,7 +5173,7 @@ hub_power_remaining(struct usb_hub *hub) + + + static int descriptors_changed(struct usb_device *udev, +- struct usb_device_descriptor *new_device_descriptor, ++ struct usb_device_descriptor *old_device_descriptor, + struct usb_host_bos *old_bos) + { + int changed = 0; +@@ -5237,8 +5184,8 @@ static int descriptors_changed(struct usb_device *udev, + int length; + char *buf; + +- if (memcmp(&udev->descriptor, new_device_descriptor, +- sizeof(*new_device_descriptor)) != 0) ++ if (memcmp(&udev->descriptor, old_device_descriptor, ++ sizeof(*old_device_descriptor)) != 0) + return 1; + + if ((old_bos && !udev->bos) || (!old_bos && udev->bos)) +@@ -5415,7 +5362,7 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus, + } + + /* reset (non-USB 3.0 devices) and get descriptor */ +- status = hub_port_init(hub, udev, port1, i, NULL); ++ status = hub_port_init(hub, udev, port1, i); + if (status < 0) + goto loop; + +@@ -5562,8 +5509,9 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1, + { + struct usb_port *port_dev = hub->ports[port1 - 1]; + struct usb_device *udev = port_dev->child; +- struct usb_device_descriptor *descr; ++ struct usb_device_descriptor descriptor; + int status = -ENODEV; ++ int retval; + + dev_dbg(&port_dev->dev, "status %04x, change %04x, %s\n", portstatus, + portchange, portspeed(hub, portstatus)); +@@ -5590,20 +5538,23 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1, + * changed device descriptors before resuscitating the + * device. + */ +- descr = usb_get_device_descriptor(udev); +- if (IS_ERR(descr)) { ++ descriptor = udev->descriptor; ++ retval = usb_get_device_descriptor(udev, ++ sizeof(udev->descriptor)); ++ if (retval < 0) { + dev_dbg(&udev->dev, +- "can't read device descriptor %ld\n", +- PTR_ERR(descr)); ++ "can't read device descriptor %d\n", ++ retval); + } else { +- if (descriptors_changed(udev, descr, ++ if (descriptors_changed(udev, &descriptor, + udev->bos)) { + dev_dbg(&udev->dev, + "device descriptor has changed\n"); ++ /* for disconnect() calls */ ++ udev->descriptor = descriptor; + } else { + status = 0; /* Nothing to do */ + } +- kfree(descr); + } + #ifdef CONFIG_PM + } else if (udev->state == USB_STATE_SUSPENDED && +@@ -6060,7 +6011,7 @@ static int usb_reset_and_verify_device(struct usb_device *udev) + struct usb_device *parent_hdev = udev->parent; + struct usb_hub *parent_hub; + struct usb_hcd *hcd = bus_to_hcd(udev->bus); +- struct usb_device_descriptor descriptor; ++ struct usb_device_descriptor descriptor = udev->descriptor; + struct usb_host_bos *bos; + int i, j, ret = 0; + int port1 = udev->portnum; +@@ -6096,7 +6047,7 @@ static int usb_reset_and_verify_device(struct usb_device *udev) + /* ep0 maxpacket size may change; let the HCD know about it. + * Other endpoints will be handled by re-enumeration. */ + usb_ep0_reinit(udev); +- ret = hub_port_init(parent_hub, udev, port1, i, &descriptor); ++ ret = hub_port_init(parent_hub, udev, port1, i); + if (ret >= 0 || ret == -ENOTCONN || ret == -ENODEV) + break; + } +@@ -6108,6 +6059,7 @@ static int usb_reset_and_verify_device(struct usb_device *udev) + /* Device might have changed firmware (DFU or similar) */ + if (descriptors_changed(udev, &descriptor, bos)) { + dev_info(&udev->dev, "device firmware changed\n"); ++ udev->descriptor = descriptor; /* for disconnect() calls */ + goto re_enumerate; + } + +diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c +index 077dfe48d01c1..0d2bfc909019b 100644 +--- a/drivers/usb/core/message.c ++++ b/drivers/usb/core/message.c +@@ -1041,35 +1041,40 @@ char *usb_cache_string(struct usb_device *udev, int index) + EXPORT_SYMBOL_GPL(usb_cache_string); + + /* +- * usb_get_device_descriptor - read the device descriptor +- * @udev: the device whose device descriptor should be read ++ * usb_get_device_descriptor - (re)reads the device descriptor (usbcore) ++ * @dev: the device whose device descriptor is being updated ++ * @size: how much of the descriptor to read + * + * Context: task context, might sleep. + * ++ * Updates the copy of the device descriptor stored in the device structure, ++ * which dedicates space for this purpose. ++ * + * Not exported, only for use by the core. If drivers really want to read + * the device descriptor directly, they can call usb_get_descriptor() with + * type = USB_DT_DEVICE and index = 0. + * +- * Returns: a pointer to a dynamically allocated usb_device_descriptor +- * structure (which the caller must deallocate), or an ERR_PTR value. ++ * This call is synchronous, and may not be used in an interrupt context. ++ * ++ * Return: The number of bytes received on success, or else the status code ++ * returned by the underlying usb_control_msg() call. + */ +-struct usb_device_descriptor *usb_get_device_descriptor(struct usb_device *udev) ++int usb_get_device_descriptor(struct usb_device *dev, unsigned int size) + { + struct usb_device_descriptor *desc; + int ret; + ++ if (size > sizeof(*desc)) ++ return -EINVAL; + desc = kmalloc(sizeof(*desc), GFP_NOIO); + if (!desc) +- return ERR_PTR(-ENOMEM); +- +- ret = usb_get_descriptor(udev, USB_DT_DEVICE, 0, desc, sizeof(*desc)); +- if (ret == sizeof(*desc)) +- return desc; ++ return -ENOMEM; + ++ ret = usb_get_descriptor(dev, USB_DT_DEVICE, 0, desc, size); + if (ret >= 0) +- ret = -EMSGSIZE; ++ memcpy(&dev->descriptor, desc, size); + kfree(desc); +- return ERR_PTR(ret); ++ return ret; + } + + /* +diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h +index 60363153fc3f3..69ca59841083b 100644 +--- a/drivers/usb/core/usb.h ++++ b/drivers/usb/core/usb.h +@@ -43,8 +43,8 @@ extern bool usb_endpoint_is_ignored(struct usb_device *udev, + struct usb_endpoint_descriptor *epd); + extern int usb_remove_device(struct usb_device *udev); + +-extern struct usb_device_descriptor *usb_get_device_descriptor( +- struct usb_device *udev); ++extern int usb_get_device_descriptor(struct usb_device *dev, ++ unsigned int size); + extern int usb_set_isoch_delay(struct usb_device *dev); + extern int usb_get_bos_descriptor(struct usb_device *dev); + extern void usb_release_bos_descriptor(struct usb_device *dev); From 2c725d90f6857a183c5257ab7ffc7bc742d7027e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Fri, 24 May 2024 09:30:07 +0200 Subject: [PATCH 12/27] 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. --- ...to-explicitly-enable-reachability-te.patch | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 buildroot-external/patches/linux/0001-ipv6-add-option-to-explicitly-enable-reachability-te.patch diff --git a/buildroot-external/patches/linux/0001-ipv6-add-option-to-explicitly-enable-reachability-te.patch b/buildroot-external/patches/linux/0001-ipv6-add-option-to-explicitly-enable-reachability-te.patch new file mode 100644 index 00000000000..2e82302b3b8 --- /dev/null +++ b/buildroot-external/patches/linux/0001-ipv6-add-option-to-explicitly-enable-reachability-te.patch @@ -0,0 +1,52 @@ +From 76591e4075194cf717dc085b8285912f706bcd46 Mon Sep 17 00:00:00 2001 +From: Stefan Agner +Date: Tue, 28 Mar 2023 12:02:10 +0200 +Subject: [PATCH] ipv6: add option to explicitly enable reachability test + +Systems which act as host as well as router might prefer the host +behavior. Currently the kernel does not allow to use IPv6 forwarding +globally and at the same time use route reachability probing. + +Add a compile time flag to enable route reachability probe in any +case. + +Signed-off-by: Stefan Agner +--- + net/ipv6/Kconfig | 9 +++++++++ + net/ipv6/route.c | 3 ++- + 2 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/net/ipv6/Kconfig b/net/ipv6/Kconfig +index 08d4b7132d4c..242bf2eeb7ae 100644 +--- a/net/ipv6/Kconfig ++++ b/net/ipv6/Kconfig +@@ -48,6 +48,15 @@ config IPV6_OPTIMISTIC_DAD + + If unsure, say N. + ++config IPV6_REACHABILITY_PROBE ++ bool "IPv6: Always use reachability probing (RFC 4191)" ++ help ++ By default reachability probing is disabled on router devices (when ++ IPv6 forwarding is enabled). This option explicitly enables ++ reachability probing always. ++ ++ If unsure, say N. ++ + config INET6_AH + tristate "IPv6: AH transformation" + select XFRM_AH +diff --git a/net/ipv6/route.c b/net/ipv6/route.c +index 56525b5b95a2..916769b9a772 100644 +--- a/net/ipv6/route.c ++++ b/net/ipv6/route.c +@@ -2211,7 +2211,8 @@ struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table, + + strict |= flags & RT6_LOOKUP_F_IFACE; + strict |= flags & RT6_LOOKUP_F_IGNORE_LINKSTATE; +- if (net->ipv6.devconf_all->forwarding == 0) ++ if (net->ipv6.devconf_all->forwarding == 0 || ++ IS_ENABLED(CONFIG_IPV6_REACHABILITY_PROBE)) + strict |= RT6_LOOKUP_F_REACHABLE; + + rcu_read_lock(); From 682d59434ee39958f9a52b34cde633913544863e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Mon, 27 May 2024 15:00:13 +0200 Subject: [PATCH 13/27] Linux: Update kernel to 6.6.32 (#3394) * https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.32 --- Documentation/kernel.md | 24 +++++++++---------- .../configs/generic_aarch64_defconfig | 2 +- .../configs/generic_x86_64_defconfig | 2 +- buildroot-external/configs/green_defconfig | 2 +- .../configs/khadas_vim3_defconfig | 2 +- .../configs/odroid_c2_defconfig | 2 +- .../configs/odroid_c4_defconfig | 2 +- .../configs/odroid_m1_defconfig | 2 +- .../configs/odroid_m1s_defconfig | 2 +- .../configs/odroid_n2_defconfig | 2 +- .../configs/odroid_xu4_defconfig | 2 +- buildroot-external/configs/ova_defconfig | 2 +- buildroot-external/configs/tinker_defconfig | 2 +- ...to-explicitly-enable-reachability-te.patch | 0 ...changes-causing-issues-with-Z-Wave.m.patch | 0 15 files changed, 24 insertions(+), 24 deletions(-) rename buildroot-external/patches/linux/{6.6.31 => 6.6.32}/0001-ipv6-add-option-to-explicitly-enable-reachability-te.patch (100%) rename buildroot-external/patches/linux/{6.6.31 => 6.6.32}/0002-Revert-USB-core-changes-causing-issues-with-Z-Wave.m.patch (100%) diff --git a/Documentation/kernel.md b/Documentation/kernel.md index 493ed2e98e4..321dddabfa7 100644 --- a/Documentation/kernel.md +++ b/Documentation/kernel.md @@ -5,7 +5,7 @@ Default Kernel tree: 6.1 | Board | Version | |-------|---------| -| Open Virtual Appliance | 6.6.31 | +| Open Virtual Appliance | 6.6.32 | | Raspberry Pi | 6.6.28 | | Raspberry Pi 0-W | 6.6.28 | | Raspberry Pi 2 | 6.6.28 | @@ -13,14 +13,14 @@ Default Kernel tree: 6.1 | Raspberry Pi 4 | 6.6.28 | | Raspberry Pi 5 | 6.6.28 | | Home Assistant Yellow | 6.6.28 | -| Home Assistant Green | 6.6.31 | -| Tinker Board | 6.6.31 | -| ODROID-C2 | 6.6.31 | -| ODROID-C4 | 6.6.31 | -| ODROID-M1 | 6.6.31 | -| ODROID-M1S | 6.6.31 | -| ODROID-N2 | 6.6.31 | -| ODROID-XU4 | 6.6.31 | -| Generic aarch64 | 6.6.31 | -| Generic x86-64 | 6.6.31 | -| Khadas VIM3 | 6.6.31 | +| Home Assistant Green | 6.6.32 | +| Tinker Board | 6.6.32 | +| ODROID-C2 | 6.6.32 | +| ODROID-C4 | 6.6.32 | +| ODROID-M1 | 6.6.32 | +| ODROID-M1S | 6.6.32 | +| ODROID-N2 | 6.6.32 | +| ODROID-XU4 | 6.6.32 | +| Generic aarch64 | 6.6.32 | +| Generic x86-64 | 6.6.32 | +| Khadas VIM3 | 6.6.32 | diff --git a/buildroot-external/configs/generic_aarch64_defconfig b/buildroot-external/configs/generic_aarch64_defconfig index 1514fdd9102..3df8f2fcf6e 100644 --- a/buildroot-external/configs/generic_aarch64_defconfig +++ b/buildroot-external/configs/generic_aarch64_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/arm-uefi/generic-aarch64 $(BR2_EXTERNAL_HASSOS_PATH)/board/arm-uefi/generic-aarch64/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.31" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.32" BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/board/arm-uefi/generic-aarch64/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/generic_x86_64_defconfig b/buildroot-external/configs/generic_x86_64_defconfig index 696d2e81a46..b0986048573 100644 --- a/buildroot-external/configs/generic_x86_64_defconfig +++ b/buildroot-external/configs/generic_x86_64_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/pc/generic-x86-64 $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/generic-x86-64/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.31" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.32" BR2_LINUX_KERNEL_DEFCONFIG="x86_64" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/generic-x86-64/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/green_defconfig b/buildroot-external/configs/green_defconfig index 80d0324ede0..60a3f859bb4 100755 --- a/buildroot-external/configs/green_defconfig +++ b/buildroot-external/configs/green_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/nabucasa/green $(BR2_EXTERNAL_HASSOS_PATH)/board/nabucasa/green/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.31" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.32" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/kernel-arm64-rockchip.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/nabucasa/green/kernel.config" diff --git a/buildroot-external/configs/khadas_vim3_defconfig b/buildroot-external/configs/khadas_vim3_defconfig index aecc812f0e6..6473378d21f 100644 --- a/buildroot-external/configs/khadas_vim3_defconfig +++ b/buildroot-external/configs/khadas_vim3_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/khadas/vim3 $(BR2_EXTERNAL_HASSOS_PATH)/board/khadas/vim3/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.31" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.32" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/khadas/kernel-vim.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config" diff --git a/buildroot-external/configs/odroid_c2_defconfig b/buildroot-external/configs/odroid_c2_defconfig index 6a7ad54d09d..9d23568ea9e 100644 --- a/buildroot-external/configs/odroid_c2_defconfig +++ b/buildroot-external/configs/odroid_c2_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.31" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.32" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/kernel-amlogic.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config" diff --git a/buildroot-external/configs/odroid_c4_defconfig b/buildroot-external/configs/odroid_c4_defconfig index c27a378bf8c..de65cf5fd53 100644 --- a/buildroot-external/configs/odroid_c4_defconfig +++ b/buildroot-external/configs/odroid_c4_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c4 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c4/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.31" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.32" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/kernel-amlogic.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config" diff --git a/buildroot-external/configs/odroid_m1_defconfig b/buildroot-external/configs/odroid_m1_defconfig index dff1ffa6e58..9208b9e4420 100644 --- a/buildroot-external/configs/odroid_m1_defconfig +++ b/buildroot-external/configs/odroid_m1_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.31" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.32" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/kernel-arm64-rockchip.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1/kernel.config" diff --git a/buildroot-external/configs/odroid_m1s_defconfig b/buildroot-external/configs/odroid_m1s_defconfig index aa3489ed7e0..86af3d1a23f 100644 --- a/buildroot-external/configs/odroid_m1s_defconfig +++ b/buildroot-external/configs/odroid_m1s_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1s $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1s/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.31" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.32" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/kernel-arm64-rockchip.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1s/kernel.config" diff --git a/buildroot-external/configs/odroid_n2_defconfig b/buildroot-external/configs/odroid_n2_defconfig index 1b2ae6b2535..c83380e8a90 100644 --- a/buildroot-external/configs/odroid_n2_defconfig +++ b/buildroot-external/configs/odroid_n2_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.31" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.32" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/kernel-amlogic.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2/kernel.config" diff --git a/buildroot-external/configs/odroid_xu4_defconfig b/buildroot-external/configs/odroid_xu4_defconfig index 7e32320253c..e0bdec1d083 100644 --- a/buildroot-external/configs/odroid_xu4_defconfig +++ b/buildroot-external/configs/odroid_xu4_defconfig @@ -17,7 +17,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-xu4 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-xu4/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.31" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.32" BR2_LINUX_KERNEL_DEFCONFIG="exynos" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-xu4/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/ova_defconfig b/buildroot-external/configs/ova_defconfig index ccd9b2886a2..030360ac615 100644 --- a/buildroot-external/configs/ova_defconfig +++ b/buildroot-external/configs/ova_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/pc/ova $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/ova/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.31" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.32" BR2_LINUX_KERNEL_DEFCONFIG="x86_64" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/ova/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/tinker_defconfig b/buildroot-external/configs/tinker_defconfig index 481f7ac7260..1afce47f3ad 100644 --- a/buildroot-external/configs/tinker_defconfig +++ b/buildroot-external/configs/tinker_defconfig @@ -18,7 +18,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/asus/tinker $(BR2_EXTERNAL_HASSOS_PATH)/board/asus/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.31" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.32" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/asus/tinker/kernel.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config" diff --git a/buildroot-external/patches/linux/6.6.31/0001-ipv6-add-option-to-explicitly-enable-reachability-te.patch b/buildroot-external/patches/linux/6.6.32/0001-ipv6-add-option-to-explicitly-enable-reachability-te.patch similarity index 100% rename from buildroot-external/patches/linux/6.6.31/0001-ipv6-add-option-to-explicitly-enable-reachability-te.patch rename to buildroot-external/patches/linux/6.6.32/0001-ipv6-add-option-to-explicitly-enable-reachability-te.patch diff --git a/buildroot-external/patches/linux/6.6.31/0002-Revert-USB-core-changes-causing-issues-with-Z-Wave.m.patch b/buildroot-external/patches/linux/6.6.32/0002-Revert-USB-core-changes-causing-issues-with-Z-Wave.m.patch similarity index 100% rename from buildroot-external/patches/linux/6.6.31/0002-Revert-USB-core-changes-causing-issues-with-Z-Wave.m.patch rename to buildroot-external/patches/linux/6.6.32/0002-Revert-USB-core-changes-causing-issues-with-Z-Wave.m.patch From 5ed90577285558dd6e7b884b9c5379b7c68a3ac9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 15:15:55 +0200 Subject: [PATCH 14/27] Bump docker/login-action from 3.1.0 to 3.2.0 (#3399) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ef5e704cdca..3b166f4a91b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -138,7 +138,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3.3.0 - name: Log in to the GitHub container registry - uses: docker/login-action@v3.1.0 + uses: docker/login-action@v3.2.0 with: registry: ghcr.io username: ${{ github.repository_owner }} From bd7474fc97f93c9e019fb714d9a51c37abe9164c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Tue, 4 Jun 2024 17:33:51 +0200 Subject: [PATCH 15/27] 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 --- Documentation/kernel.md | 14 +- buildroot | 2 +- ...changes-causing-issues-with-Z-Wave.m.patch | 652 ------------------ buildroot-external/configs/rpi2_defconfig | 2 +- buildroot-external/configs/rpi3_64_defconfig | 2 +- buildroot-external/configs/rpi3_defconfig | 2 +- buildroot-external/configs/rpi4_64_defconfig | 2 +- buildroot-external/configs/rpi4_defconfig | 2 +- buildroot-external/configs/rpi5_64_defconfig | 2 +- buildroot-external/configs/yellow_defconfig | 2 +- ...changes-causing-issues-with-Z-Wave.m.patch | 0 ...to-explicitly-enable-reachability-te.patch | 52 -- 12 files changed, 15 insertions(+), 719 deletions(-) delete mode 100644 buildroot-external/board/raspberrypi/patches/linux/0003-Revert-USB-core-changes-causing-issues-with-Z-Wave.m.patch rename buildroot-external/patches/linux/{6.6.32 => }/0002-Revert-USB-core-changes-causing-issues-with-Z-Wave.m.patch (100%) delete mode 100644 buildroot-external/patches/linux/6.6.32/0001-ipv6-add-option-to-explicitly-enable-reachability-te.patch diff --git a/Documentation/kernel.md b/Documentation/kernel.md index 321dddabfa7..56cbf1b40f4 100644 --- a/Documentation/kernel.md +++ b/Documentation/kernel.md @@ -6,13 +6,13 @@ Default Kernel tree: 6.1 | Board | Version | |-------|---------| | Open Virtual Appliance | 6.6.32 | -| Raspberry Pi | 6.6.28 | -| Raspberry Pi 0-W | 6.6.28 | -| Raspberry Pi 2 | 6.6.28 | -| Raspberry Pi 3 | 6.6.28 | -| Raspberry Pi 4 | 6.6.28 | -| Raspberry Pi 5 | 6.6.28 | -| Home Assistant Yellow | 6.6.28 | +| Raspberry Pi | 6.6.31 | +| Raspberry Pi 0-W | 6.6.31 | +| Raspberry Pi 2 | 6.6.31 | +| Raspberry Pi 3 | 6.6.31 | +| Raspberry Pi 4 | 6.6.31 | +| Raspberry Pi 5 | 6.6.31 | +| Home Assistant Yellow | 6.6.31 | | Home Assistant Green | 6.6.32 | | Tinker Board | 6.6.32 | | ODROID-C2 | 6.6.32 | diff --git a/buildroot b/buildroot index 9af23847829..691077e5773 160000 --- a/buildroot +++ b/buildroot @@ -1 +1 @@ -Subproject commit 9af23847829bdc426562ee2a25cc096265c9e6ab +Subproject commit 691077e577359aaa257597bebe0e3cec0954038a diff --git a/buildroot-external/board/raspberrypi/patches/linux/0003-Revert-USB-core-changes-causing-issues-with-Z-Wave.m.patch b/buildroot-external/board/raspberrypi/patches/linux/0003-Revert-USB-core-changes-causing-issues-with-Z-Wave.m.patch deleted file mode 100644 index bd05bc6693c..00000000000 --- a/buildroot-external/board/raspberrypi/patches/linux/0003-Revert-USB-core-changes-causing-issues-with-Z-Wave.m.patch +++ /dev/null @@ -1,652 +0,0 @@ -From 85cfbef1cf29aba24abe21409b180b7bea76e562 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= -Date: Wed, 6 Mar 2024 13:25:41 +0100 -Subject: [PATCH] Revert USB core changes causing issues with Z-Wave.me UZB - stick -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Workaround for issues described on GH [1] and reported in [2]. - -* Revert "USB: core: Fix oversight in SuperSpeed initialization" - This reverts commit 59cf445754566984fd55af19ba7146c76e6627bc. - -* Revert "USB: core: Fix race by not overwriting udev->descriptor in hub_port_init()" - This reverts commit ff33299ec8bb80cdcc073ad9c506bd79bb2ed20b. - -* Revert "USB: core: Change usb_get_device_descriptor() API" - This reverts commit de28e469da75359a2bb8cd8778b78aa64b1be1f4. - -* Revert "USB: core: Unite old scheme and new scheme descriptor reads" - This reverts commit 85d07c55621676d47d873d2749b88f783cd4d5a1. - -[1] https://github.com/home-assistant/operating-system/issues/2995 -[2] https://lore.kernel.org/linux-usb/1e954652-dfb3-4248-beea-b8a449128ff0@sairon.cz/ - -Signed-off-by: Jan Čermák ---- - drivers/usb/core/hcd.c | 10 +- - drivers/usb/core/hub.c | 335 ++++++++++++++++--------------------- - drivers/usb/core/message.c | 29 ++-- - drivers/usb/core/usb.h | 4 +- - 4 files changed, 166 insertions(+), 212 deletions(-) - -diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c -index 12b6dfeaf658c..d895f6ebbc400 100644 ---- a/drivers/usb/core/hcd.c -+++ b/drivers/usb/core/hcd.c -@@ -958,7 +958,6 @@ static int register_root_hub(struct usb_hcd *hcd) - { - struct device *parent_dev = hcd->self.controller; - struct usb_device *usb_dev = hcd->self.root_hub; -- struct usb_device_descriptor *descr; - const int devnum = 1; - int retval; - -@@ -970,16 +969,13 @@ static int register_root_hub(struct usb_hcd *hcd) - mutex_lock(&usb_bus_idr_lock); - - usb_dev->ep0.desc.wMaxPacketSize = cpu_to_le16(64); -- descr = usb_get_device_descriptor(usb_dev); -- if (IS_ERR(descr)) { -- retval = PTR_ERR(descr); -+ retval = usb_get_device_descriptor(usb_dev, USB_DT_DEVICE_SIZE); -+ if (retval != sizeof usb_dev->descriptor) { - mutex_unlock(&usb_bus_idr_lock); - dev_dbg (parent_dev, "can't read %s device descriptor %d\n", - dev_name(&usb_dev->dev), retval); -- return retval; -+ return (retval < 0) ? retval : -EMSGSIZE; - } -- usb_dev->descriptor = *descr; -- kfree(descr); - - if (le16_to_cpu(usb_dev->descriptor.bcdUSB) >= 0x0201) { - retval = usb_get_bos_descriptor(usb_dev); -diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c -index 71635dfa741d2..b937bf8b6b3d3 100644 ---- a/drivers/usb/core/hub.c -+++ b/drivers/usb/core/hub.c -@@ -4722,67 +4722,6 @@ static int hub_enable_device(struct usb_device *udev) - return hcd->driver->enable_device(hcd, udev); - } - --/* -- * Get the bMaxPacketSize0 value during initialization by reading the -- * device's device descriptor. Since we don't already know this value, -- * the transfer is unsafe and it ignores I/O errors, only testing for -- * reasonable received values. -- * -- * For "old scheme" initialization, size will be 8 so we read just the -- * start of the device descriptor, which should work okay regardless of -- * the actual bMaxPacketSize0 value. For "new scheme" initialization, -- * size will be 64 (and buf will point to a sufficiently large buffer), -- * which might not be kosher according to the USB spec but it's what -- * Windows does and what many devices expect. -- * -- * Returns: bMaxPacketSize0 or a negative error code. -- */ --static int get_bMaxPacketSize0(struct usb_device *udev, -- struct usb_device_descriptor *buf, int size, bool first_time) --{ -- int i, rc; -- -- /* -- * Retry on all errors; some devices are flakey. -- * 255 is for WUSB devices, we actually need to use -- * 512 (WUSB1.0[4.8.1]). -- */ -- for (i = 0; i < GET_MAXPACKET0_TRIES; ++i) { -- /* Start with invalid values in case the transfer fails */ -- buf->bDescriptorType = buf->bMaxPacketSize0 = 0; -- rc = usb_control_msg(udev, usb_rcvaddr0pipe(), -- USB_REQ_GET_DESCRIPTOR, USB_DIR_IN, -- USB_DT_DEVICE << 8, 0, -- buf, size, -- initial_descriptor_timeout); -- switch (buf->bMaxPacketSize0) { -- case 8: case 16: case 32: case 64: case 9: -- if (buf->bDescriptorType == USB_DT_DEVICE) { -- rc = buf->bMaxPacketSize0; -- break; -- } -- fallthrough; -- default: -- if (rc >= 0) -- rc = -EPROTO; -- break; -- } -- -- /* -- * Some devices time out if they are powered on -- * when already connected. They need a second -- * reset, so return early. But only on the first -- * attempt, lest we get into a time-out/reset loop. -- */ -- if (rc > 0 || (rc == -ETIMEDOUT && first_time && -- udev->speed > USB_SPEED_FULL)) -- break; -- } -- return rc; --} -- --#define GET_DESCRIPTOR_BUFSIZE 64 -- - /* Reset device, (re)assign address, get device descriptor. - * Device connection must be stable, no more debouncing needed. - * Returns device in USB_STATE_ADDRESS, except on error. -@@ -4792,17 +4731,10 @@ static int get_bMaxPacketSize0(struct usb_device *udev, - * the port lock. For a newly detected device that is not accessible - * through any global pointers, it's not necessary to lock the device, - * but it is still necessary to lock the port. -- * -- * For a newly detected device, @dev_descr must be NULL. The device -- * descriptor retrieved from the device will then be stored in -- * @udev->descriptor. For an already existing device, @dev_descr -- * must be non-NULL. The device descriptor will be stored there, -- * not in @udev->descriptor, because descriptors for registered -- * devices are meant to be immutable. - */ - static int - hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, -- int retry_counter, struct usb_device_descriptor *dev_descr) -+ int retry_counter) - { - struct usb_device *hdev = hub->hdev; - struct usb_hcd *hcd = bus_to_hcd(hdev->bus); -@@ -4814,13 +4746,6 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, - int devnum = udev->devnum; - const char *driver_name; - bool do_new_scheme; -- const bool initial = !dev_descr; -- int maxp0; -- struct usb_device_descriptor *buf, *descr; -- -- buf = kmalloc(GET_DESCRIPTOR_BUFSIZE, GFP_NOIO); -- if (!buf) -- return -ENOMEM; - - /* root hub ports have a slightly longer reset period - * (from USB 2.0 spec, section 7.1.7.5) -@@ -4853,31 +4778,31 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, - } - oldspeed = udev->speed; - -- if (initial) { -- /* USB 2.0 section 5.5.3 talks about ep0 maxpacket ... -- * it's fixed size except for full speed devices. -+ /* USB 2.0 section 5.5.3 talks about ep0 maxpacket ... -+ * it's fixed size except for full speed devices. -+ * For Wireless USB devices, ep0 max packet is always 512 (tho -+ * reported as 0xff in the device descriptor). WUSB1.0[4.8.1]. -+ */ -+ switch (udev->speed) { -+ case USB_SPEED_SUPER_PLUS: -+ case USB_SPEED_SUPER: -+ udev->ep0.desc.wMaxPacketSize = cpu_to_le16(512); -+ break; -+ case USB_SPEED_HIGH: /* fixed at 64 */ -+ udev->ep0.desc.wMaxPacketSize = cpu_to_le16(64); -+ break; -+ case USB_SPEED_FULL: /* 8, 16, 32, or 64 */ -+ /* to determine the ep0 maxpacket size, try to read -+ * the device descriptor to get bMaxPacketSize0 and -+ * then correct our initial guess. - */ -- switch (udev->speed) { -- case USB_SPEED_SUPER_PLUS: -- case USB_SPEED_SUPER: -- udev->ep0.desc.wMaxPacketSize = cpu_to_le16(512); -- break; -- case USB_SPEED_HIGH: /* fixed at 64 */ -- udev->ep0.desc.wMaxPacketSize = cpu_to_le16(64); -- break; -- case USB_SPEED_FULL: /* 8, 16, 32, or 64 */ -- /* to determine the ep0 maxpacket size, try to read -- * the device descriptor to get bMaxPacketSize0 and -- * then correct our initial guess. -- */ -- udev->ep0.desc.wMaxPacketSize = cpu_to_le16(64); -- break; -- case USB_SPEED_LOW: /* fixed at 8 */ -- udev->ep0.desc.wMaxPacketSize = cpu_to_le16(8); -- break; -- default: -- goto fail; -- } -+ udev->ep0.desc.wMaxPacketSize = cpu_to_le16(64); -+ break; -+ case USB_SPEED_LOW: /* fixed at 8 */ -+ udev->ep0.desc.wMaxPacketSize = cpu_to_le16(8); -+ break; -+ default: -+ goto fail; - } - - speed = usb_speed_string(udev->speed); -@@ -4897,24 +4822,22 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, - if (udev->speed < USB_SPEED_SUPER) - dev_info(&udev->dev, - "%s %s USB device number %d using %s\n", -- (initial ? "new" : "reset"), speed, -+ (udev->config) ? "reset" : "new", speed, - devnum, driver_name); - -- if (initial) { -- /* Set up TT records, if needed */ -- if (hdev->tt) { -- udev->tt = hdev->tt; -- udev->ttport = hdev->ttport; -- } else if (udev->speed != USB_SPEED_HIGH -- && hdev->speed == USB_SPEED_HIGH) { -- if (!hub->tt.hub) { -- dev_err(&udev->dev, "parent hub has no TT\n"); -- retval = -EINVAL; -- goto fail; -- } -- udev->tt = &hub->tt; -- udev->ttport = port1; -+ /* Set up TT records, if needed */ -+ if (hdev->tt) { -+ udev->tt = hdev->tt; -+ udev->ttport = hdev->ttport; -+ } else if (udev->speed != USB_SPEED_HIGH -+ && hdev->speed == USB_SPEED_HIGH) { -+ if (!hub->tt.hub) { -+ dev_err(&udev->dev, "parent hub has no TT\n"); -+ retval = -EINVAL; -+ goto fail; - } -+ udev->tt = &hub->tt; -+ udev->ttport = port1; - } - - /* Why interleave GET_DESCRIPTOR and SET_ADDRESS this way? -@@ -4938,6 +4861,9 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, - } - - if (do_new_scheme) { -+ struct usb_device_descriptor *buf; -+ int r = 0; -+ - retval = hub_enable_device(udev); - if (retval < 0) { - dev_err(&udev->dev, -@@ -4946,14 +4872,52 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, - goto fail; - } - -- maxp0 = get_bMaxPacketSize0(udev, buf, -- GET_DESCRIPTOR_BUFSIZE, retries == 0); -- if (maxp0 > 0 && !initial && -- maxp0 != udev->descriptor.bMaxPacketSize0) { -- dev_err(&udev->dev, "device reset changed ep0 maxpacket size!\n"); -- retval = -ENODEV; -- goto fail; -+#define GET_DESCRIPTOR_BUFSIZE 64 -+ buf = kmalloc(GET_DESCRIPTOR_BUFSIZE, GFP_NOIO); -+ if (!buf) { -+ retval = -ENOMEM; -+ continue; -+ } -+ -+ /* Retry on all errors; some devices are flakey. -+ * 255 is for WUSB devices, we actually need to use -+ * 512 (WUSB1.0[4.8.1]). -+ */ -+ for (operations = 0; operations < GET_MAXPACKET0_TRIES; -+ ++operations) { -+ buf->bMaxPacketSize0 = 0; -+ r = usb_control_msg(udev, usb_rcvaddr0pipe(), -+ USB_REQ_GET_DESCRIPTOR, USB_DIR_IN, -+ USB_DT_DEVICE << 8, 0, -+ buf, GET_DESCRIPTOR_BUFSIZE, -+ initial_descriptor_timeout); -+ switch (buf->bMaxPacketSize0) { -+ case 8: case 16: case 32: case 64: case 255: -+ if (buf->bDescriptorType == -+ USB_DT_DEVICE) { -+ r = 0; -+ break; -+ } -+ fallthrough; -+ default: -+ if (r == 0) -+ r = -EPROTO; -+ break; -+ } -+ /* -+ * Some devices time out if they are powered on -+ * when already connected. They need a second -+ * reset. But only on the first attempt, -+ * lest we get into a time out/reset loop -+ */ -+ if (r == 0 || (r == -ETIMEDOUT && -+ retries == 0 && -+ udev->speed > USB_SPEED_FULL)) -+ break; - } -+ udev->descriptor.bMaxPacketSize0 = -+ buf->bMaxPacketSize0; -+ kfree(buf); - - retval = hub_port_reset(hub, port1, udev, delay, false); - if (retval < 0) /* error or disconnect */ -@@ -4964,13 +4928,14 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, - retval = -ENODEV; - goto fail; - } -- if (maxp0 < 0) { -- if (maxp0 != -ENODEV) -+ if (r) { -+ if (r != -ENODEV) - dev_err(&udev->dev, "device descriptor read/64, error %d\n", -- maxp0); -- retval = maxp0; -+ r); -+ retval = -EMSGSIZE; - continue; - } -+#undef GET_DESCRIPTOR_BUFSIZE - } - - for (operations = 0; operations < SET_ADDRESS_TRIES; ++operations) { -@@ -5011,21 +4976,18 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, - if (do_new_scheme) - break; - -- maxp0 = get_bMaxPacketSize0(udev, buf, 8, retries == 0); -- if (maxp0 < 0) { -- retval = maxp0; -+ retval = usb_get_device_descriptor(udev, 8); -+ if (retval < 8) { - if (retval != -ENODEV) - dev_err(&udev->dev, - "device descriptor read/8, error %d\n", - retval); -+ if (retval >= 0) -+ retval = -EMSGSIZE; - } else { - u32 delay; - -- if (!initial && maxp0 != udev->descriptor.bMaxPacketSize0) { -- dev_err(&udev->dev, "device reset changed ep0 maxpacket size!\n"); -- retval = -ENODEV; -- goto fail; -- } -+ retval = 0; - - delay = udev->parent->hub_delay; - udev->hub_delay = min_t(u32, delay, -@@ -5044,61 +5006,48 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, - goto fail; - - /* -- * Check the ep0 maxpacket guess and correct it if necessary. -- * maxp0 is the value stored in the device descriptor; -- * i is the value it encodes (logarithmic for SuperSpeed or greater). -+ * Some superspeed devices have finished the link training process -+ * and attached to a superspeed hub port, but the device descriptor -+ * got from those devices show they aren't superspeed devices. Warm -+ * reset the port attached by the devices can fix them. - */ -- i = maxp0; -- if (udev->speed >= USB_SPEED_SUPER) { -- if (maxp0 <= 16) -- i = 1 << maxp0; -- else -- i = 0; /* Invalid */ -- } -- if (usb_endpoint_maxp(&udev->ep0.desc) == i) { -- ; /* Initial ep0 maxpacket guess is right */ -- } else if ((udev->speed == USB_SPEED_FULL || -- udev->speed == USB_SPEED_HIGH) && -- (i == 8 || i == 16 || i == 32 || i == 64)) { -- /* Initial guess is wrong; use the descriptor's value */ -+ if ((udev->speed >= USB_SPEED_SUPER) && -+ (le16_to_cpu(udev->descriptor.bcdUSB) < 0x0300)) { -+ dev_err(&udev->dev, "got a wrong device descriptor, " -+ "warm reset device\n"); -+ hub_port_reset(hub, port1, udev, -+ HUB_BH_RESET_TIME, true); -+ retval = -EINVAL; -+ goto fail; -+ } -+ -+ if (udev->descriptor.bMaxPacketSize0 == 0xff || -+ udev->speed >= USB_SPEED_SUPER) -+ i = 512; -+ else -+ i = udev->descriptor.bMaxPacketSize0; -+ if (usb_endpoint_maxp(&udev->ep0.desc) != i) { -+ if (udev->speed == USB_SPEED_LOW || -+ !(i == 8 || i == 16 || i == 32 || i == 64)) { -+ dev_err(&udev->dev, "Invalid ep0 maxpacket: %d\n", i); -+ retval = -EMSGSIZE; -+ goto fail; -+ } - if (udev->speed == USB_SPEED_FULL) - dev_dbg(&udev->dev, "ep0 maxpacket = %d\n", i); - else - dev_warn(&udev->dev, "Using ep0 maxpacket: %d\n", i); - udev->ep0.desc.wMaxPacketSize = cpu_to_le16(i); - usb_ep0_reinit(udev); -- } else { -- /* Initial guess is wrong and descriptor's value is invalid */ -- dev_err(&udev->dev, "Invalid ep0 maxpacket: %d\n", maxp0); -- retval = -EMSGSIZE; -- goto fail; - } - -- descr = usb_get_device_descriptor(udev); -- if (IS_ERR(descr)) { -- retval = PTR_ERR(descr); -+ retval = usb_get_device_descriptor(udev, USB_DT_DEVICE_SIZE); -+ if (retval < (signed)sizeof(udev->descriptor)) { - if (retval != -ENODEV) - dev_err(&udev->dev, "device descriptor read/all, error %d\n", - retval); -- goto fail; -- } -- if (initial) -- udev->descriptor = *descr; -- else -- *dev_descr = *descr; -- kfree(descr); -- -- /* -- * Some superspeed devices have finished the link training process -- * and attached to a superspeed hub port, but the device descriptor -- * got from those devices show they aren't superspeed devices. Warm -- * reset the port attached by the devices can fix them. -- */ -- if ((udev->speed >= USB_SPEED_SUPER) && -- (le16_to_cpu(udev->descriptor.bcdUSB) < 0x0300)) { -- dev_err(&udev->dev, "got a wrong device descriptor, warm reset device\n"); -- hub_port_reset(hub, port1, udev, HUB_BH_RESET_TIME, true); -- retval = -EINVAL; -+ if (retval >= 0) -+ retval = -ENOMSG; - goto fail; - } - -@@ -5124,7 +5073,6 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1, - hub_port_disable(hub, port1, 0); - update_devnum(udev, devnum); /* for disconnect processing */ - } -- kfree(buf); - return retval; - } - -@@ -5205,7 +5153,7 @@ hub_power_remaining(struct usb_hub *hub) - - - static int descriptors_changed(struct usb_device *udev, -- struct usb_device_descriptor *new_device_descriptor, -+ struct usb_device_descriptor *old_device_descriptor, - struct usb_host_bos *old_bos) - { - int changed = 0; -@@ -5216,8 +5164,8 @@ static int descriptors_changed(struct usb_device *udev, - int length; - char *buf; - -- if (memcmp(&udev->descriptor, new_device_descriptor, -- sizeof(*new_device_descriptor)) != 0) -+ if (memcmp(&udev->descriptor, old_device_descriptor, -+ sizeof(*old_device_descriptor)) != 0) - return 1; - - if ((old_bos && !udev->bos) || (!old_bos && udev->bos)) -@@ -5394,7 +5342,7 @@ static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus, - } - - /* reset (non-USB 3.0 devices) and get descriptor */ -- status = hub_port_init(hub, udev, port1, i, NULL); -+ status = hub_port_init(hub, udev, port1, i); - if (status < 0) - goto loop; - -@@ -5541,8 +5489,9 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1, - { - struct usb_port *port_dev = hub->ports[port1 - 1]; - struct usb_device *udev = port_dev->child; -- struct usb_device_descriptor *descr; -+ struct usb_device_descriptor descriptor; - int status = -ENODEV; -+ int retval; - - dev_dbg(&port_dev->dev, "status %04x, change %04x, %s\n", portstatus, - portchange, portspeed(hub, portstatus)); -@@ -5569,20 +5518,23 @@ static void hub_port_connect_change(struct usb_hub *hub, int port1, - * changed device descriptors before resuscitating the - * device. - */ -- descr = usb_get_device_descriptor(udev); -- if (IS_ERR(descr)) { -+ descriptor = udev->descriptor; -+ retval = usb_get_device_descriptor(udev, -+ sizeof(udev->descriptor)); -+ if (retval < 0) { - dev_dbg(&udev->dev, -- "can't read device descriptor %ld\n", -- PTR_ERR(descr)); -+ "can't read device descriptor %d\n", -+ retval); - } else { -- if (descriptors_changed(udev, descr, -+ if (descriptors_changed(udev, &descriptor, - udev->bos)) { - dev_dbg(&udev->dev, - "device descriptor has changed\n"); -+ /* for disconnect() calls */ -+ udev->descriptor = descriptor; - } else { - status = 0; /* Nothing to do */ - } -- kfree(descr); - } - #ifdef CONFIG_PM - } else if (udev->state == USB_STATE_SUSPENDED && -@@ -6039,7 +5991,7 @@ static int usb_reset_and_verify_device(struct usb_device *udev) - struct usb_device *parent_hdev = udev->parent; - struct usb_hub *parent_hub; - struct usb_hcd *hcd = bus_to_hcd(udev->bus); -- struct usb_device_descriptor descriptor; -+ struct usb_device_descriptor descriptor = udev->descriptor; - struct usb_host_bos *bos; - int i, j, ret = 0; - int port1 = udev->portnum; -@@ -6075,7 +6027,7 @@ static int usb_reset_and_verify_device(struct usb_device *udev) - /* ep0 maxpacket size may change; let the HCD know about it. - * Other endpoints will be handled by re-enumeration. */ - usb_ep0_reinit(udev); -- ret = hub_port_init(parent_hub, udev, port1, i, &descriptor); -+ ret = hub_port_init(parent_hub, udev, port1, i); - if (ret >= 0 || ret == -ENOTCONN || ret == -ENODEV) - break; - } -@@ -6087,6 +6039,7 @@ static int usb_reset_and_verify_device(struct usb_device *udev) - /* Device might have changed firmware (DFU or similar) */ - if (descriptors_changed(udev, &descriptor, bos)) { - dev_info(&udev->dev, "device firmware changed\n"); -+ udev->descriptor = descriptor; /* for disconnect() calls */ - goto re_enumerate; - } - -diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c -index 077dfe48d01c1..0d2bfc909019b 100644 ---- a/drivers/usb/core/message.c -+++ b/drivers/usb/core/message.c -@@ -1041,35 +1041,40 @@ char *usb_cache_string(struct usb_device *udev, int index) - EXPORT_SYMBOL_GPL(usb_cache_string); - - /* -- * usb_get_device_descriptor - read the device descriptor -- * @udev: the device whose device descriptor should be read -+ * usb_get_device_descriptor - (re)reads the device descriptor (usbcore) -+ * @dev: the device whose device descriptor is being updated -+ * @size: how much of the descriptor to read - * - * Context: task context, might sleep. - * -+ * Updates the copy of the device descriptor stored in the device structure, -+ * which dedicates space for this purpose. -+ * - * Not exported, only for use by the core. If drivers really want to read - * the device descriptor directly, they can call usb_get_descriptor() with - * type = USB_DT_DEVICE and index = 0. - * -- * Returns: a pointer to a dynamically allocated usb_device_descriptor -- * structure (which the caller must deallocate), or an ERR_PTR value. -+ * This call is synchronous, and may not be used in an interrupt context. -+ * -+ * Return: The number of bytes received on success, or else the status code -+ * returned by the underlying usb_control_msg() call. - */ --struct usb_device_descriptor *usb_get_device_descriptor(struct usb_device *udev) -+int usb_get_device_descriptor(struct usb_device *dev, unsigned int size) - { - struct usb_device_descriptor *desc; - int ret; - -+ if (size > sizeof(*desc)) -+ return -EINVAL; - desc = kmalloc(sizeof(*desc), GFP_NOIO); - if (!desc) -- return ERR_PTR(-ENOMEM); -- -- ret = usb_get_descriptor(udev, USB_DT_DEVICE, 0, desc, sizeof(*desc)); -- if (ret == sizeof(*desc)) -- return desc; -+ return -ENOMEM; - -+ ret = usb_get_descriptor(dev, USB_DT_DEVICE, 0, desc, size); - if (ret >= 0) -- ret = -EMSGSIZE; -+ memcpy(&dev->descriptor, desc, size); - kfree(desc); -- return ERR_PTR(ret); -+ return ret; - } - - /* -diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h -index 60363153fc3f3..69ca59841083b 100644 ---- a/drivers/usb/core/usb.h -+++ b/drivers/usb/core/usb.h -@@ -43,8 +43,8 @@ extern bool usb_endpoint_is_ignored(struct usb_device *udev, - struct usb_endpoint_descriptor *epd); - extern int usb_remove_device(struct usb_device *udev); - --extern struct usb_device_descriptor *usb_get_device_descriptor( -- struct usb_device *udev); -+extern int usb_get_device_descriptor(struct usb_device *dev, -+ unsigned int size); - extern int usb_set_isoch_delay(struct usb_device *dev); - extern int usb_get_bos_descriptor(struct usb_device *dev); - extern void usb_release_bos_descriptor(struct usb_device *dev); --- -2.34.1 - diff --git a/buildroot-external/configs/rpi2_defconfig b/buildroot-external/configs/rpi2_defconfig index 7183f805ab5..b22fd92189c 100644 --- a/buildroot-external/configs/rpi2_defconfig +++ b/buildroot-external/configs/rpi2_defconfig @@ -19,7 +19,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi2 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/stable_20240423.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/stable_20240529.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcm2709" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel-armv7.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/rpi3_64_defconfig b/buildroot-external/configs/rpi3_64_defconfig index 434c153bd5b..4abd059e809 100644 --- a/buildroot-external/configs/rpi3_64_defconfig +++ b/buildroot-external/configs/rpi3_64_defconfig @@ -18,7 +18,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi3-64 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/stable_20240423.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/stable_20240529.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi3" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/rpi3_defconfig b/buildroot-external/configs/rpi3_defconfig index 370352f1117..8cff48c1c37 100644 --- a/buildroot-external/configs/rpi3_defconfig +++ b/buildroot-external/configs/rpi3_defconfig @@ -19,7 +19,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi3 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/stable_20240423.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/stable_20240529.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcm2709" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel-armv7.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/rpi4_64_defconfig b/buildroot-external/configs/rpi4_64_defconfig index 6b852cd93b4..a77949c06dc 100644 --- a/buildroot-external/configs/rpi4_64_defconfig +++ b/buildroot-external/configs/rpi4_64_defconfig @@ -18,7 +18,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi4-64 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/stable_20240423.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/stable_20240529.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcm2711" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/rpi4_defconfig b/buildroot-external/configs/rpi4_defconfig index 7ec6a74506f..e82a2a4e305 100644 --- a/buildroot-external/configs/rpi4_defconfig +++ b/buildroot-external/configs/rpi4_defconfig @@ -19,7 +19,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi4 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/stable_20240423.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/stable_20240529.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcm2711" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel-armv7.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/rpi5_64_defconfig b/buildroot-external/configs/rpi5_64_defconfig index ce33a13076b..a9d1256b8d9 100644 --- a/buildroot-external/configs/rpi5_64_defconfig +++ b/buildroot-external/configs/rpi5_64_defconfig @@ -18,7 +18,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi5-64 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi5-64/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/stable_20240423.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/stable_20240529.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcm2712" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/yellow_defconfig b/buildroot-external/configs/yellow_defconfig index 6086b6c2799..3ab1d0c06bb 100644 --- a/buildroot-external/configs/yellow_defconfig +++ b/buildroot-external/configs/yellow_defconfig @@ -18,7 +18,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/yellow $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/stable_20240423.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/stable_20240529.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="bcm2711" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/patches/linux/6.6.32/0002-Revert-USB-core-changes-causing-issues-with-Z-Wave.m.patch b/buildroot-external/patches/linux/0002-Revert-USB-core-changes-causing-issues-with-Z-Wave.m.patch similarity index 100% rename from buildroot-external/patches/linux/6.6.32/0002-Revert-USB-core-changes-causing-issues-with-Z-Wave.m.patch rename to buildroot-external/patches/linux/0002-Revert-USB-core-changes-causing-issues-with-Z-Wave.m.patch diff --git a/buildroot-external/patches/linux/6.6.32/0001-ipv6-add-option-to-explicitly-enable-reachability-te.patch b/buildroot-external/patches/linux/6.6.32/0001-ipv6-add-option-to-explicitly-enable-reachability-te.patch deleted file mode 100644 index 2e82302b3b8..00000000000 --- a/buildroot-external/patches/linux/6.6.32/0001-ipv6-add-option-to-explicitly-enable-reachability-te.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 76591e4075194cf717dc085b8285912f706bcd46 Mon Sep 17 00:00:00 2001 -From: Stefan Agner -Date: Tue, 28 Mar 2023 12:02:10 +0200 -Subject: [PATCH] ipv6: add option to explicitly enable reachability test - -Systems which act as host as well as router might prefer the host -behavior. Currently the kernel does not allow to use IPv6 forwarding -globally and at the same time use route reachability probing. - -Add a compile time flag to enable route reachability probe in any -case. - -Signed-off-by: Stefan Agner ---- - net/ipv6/Kconfig | 9 +++++++++ - net/ipv6/route.c | 3 ++- - 2 files changed, 11 insertions(+), 1 deletion(-) - -diff --git a/net/ipv6/Kconfig b/net/ipv6/Kconfig -index 08d4b7132d4c..242bf2eeb7ae 100644 ---- a/net/ipv6/Kconfig -+++ b/net/ipv6/Kconfig -@@ -48,6 +48,15 @@ config IPV6_OPTIMISTIC_DAD - - If unsure, say N. - -+config IPV6_REACHABILITY_PROBE -+ bool "IPv6: Always use reachability probing (RFC 4191)" -+ help -+ By default reachability probing is disabled on router devices (when -+ IPv6 forwarding is enabled). This option explicitly enables -+ reachability probing always. -+ -+ If unsure, say N. -+ - config INET6_AH - tristate "IPv6: AH transformation" - select XFRM_AH -diff --git a/net/ipv6/route.c b/net/ipv6/route.c -index 56525b5b95a2..916769b9a772 100644 ---- a/net/ipv6/route.c -+++ b/net/ipv6/route.c -@@ -2211,7 +2211,8 @@ struct rt6_info *ip6_pol_route(struct net *net, struct fib6_table *table, - - strict |= flags & RT6_LOOKUP_F_IFACE; - strict |= flags & RT6_LOOKUP_F_IGNORE_LINKSTATE; -- if (net->ipv6.devconf_all->forwarding == 0) -+ if (net->ipv6.devconf_all->forwarding == 0 || -+ IS_ENABLED(CONFIG_IPV6_REACHABILITY_PROBE)) - strict |= RT6_LOOKUP_F_REACHABLE; - - rcu_read_lock(); From 22b63ae779121c6f7ced06e6a5f39ee4be0ce0af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Fri, 7 Jun 2024 12:59:21 +0200 Subject: [PATCH 16/27] 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. --- buildroot-external/board/arm-uefi/generic-aarch64/cmdline.txt | 2 +- buildroot-external/board/asus/hassos-hook.sh | 3 +-- buildroot-external/board/asus/tinker/cmdline.txt | 1 + buildroot-external/board/hardkernel/odroid-c2/cmdline.txt | 2 +- buildroot-external/board/hardkernel/odroid-c4/cmdline.txt | 2 +- buildroot-external/board/hardkernel/odroid-m1/cmdline.txt | 1 + buildroot-external/board/hardkernel/odroid-m1s/cmdline.txt | 1 + buildroot-external/board/hardkernel/odroid-n2/cmdline.txt | 2 +- buildroot-external/board/hardkernel/odroid-xu4/cmdline.txt | 2 +- buildroot-external/board/khadas/vim3/cmdline.txt | 2 +- buildroot-external/board/nabucasa/green/cmdline.txt | 1 + buildroot-external/board/pc/generic-x86-64/cmdline.txt | 2 +- buildroot-external/board/pc/ova/cmdline.txt | 2 +- buildroot-external/board/raspberrypi/cmdline.txt | 2 +- buildroot-external/board/raspberrypi/rpi5-64/cmdline.txt | 2 +- buildroot-external/board/raspberrypi/yellow/cmdline.txt | 2 +- 16 files changed, 16 insertions(+), 13 deletions(-) create mode 100644 buildroot-external/board/asus/tinker/cmdline.txt diff --git a/buildroot-external/board/arm-uefi/generic-aarch64/cmdline.txt b/buildroot-external/board/arm-uefi/generic-aarch64/cmdline.txt index d2ae94d7907..f51360b1364 100644 --- a/buildroot-external/board/arm-uefi/generic-aarch64/cmdline.txt +++ b/buildroot-external/board/arm-uefi/generic-aarch64/cmdline.txt @@ -1 +1 @@ -console=tty1 console=ttyS0 +console=ttyS0 console=tty0 diff --git a/buildroot-external/board/asus/hassos-hook.sh b/buildroot-external/board/asus/hassos-hook.sh index 0ef27ce4326..8791179280a 100755 --- a/buildroot-external/board/asus/hassos-hook.sh +++ b/buildroot-external/board/asus/hassos-hook.sh @@ -13,8 +13,7 @@ function hassos_pre_image() { mkdir -p "${BOOT_DATA}/overlays" cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/" cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt" - - echo "console=tty1" > "${BOOT_DATA}/cmdline.txt" + cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt" # SPL create_spl_image diff --git a/buildroot-external/board/asus/tinker/cmdline.txt b/buildroot-external/board/asus/tinker/cmdline.txt new file mode 100644 index 00000000000..235f637c54f --- /dev/null +++ b/buildroot-external/board/asus/tinker/cmdline.txt @@ -0,0 +1 @@ +console=tty0 diff --git a/buildroot-external/board/hardkernel/odroid-c2/cmdline.txt b/buildroot-external/board/hardkernel/odroid-c2/cmdline.txt index b4cd5464aee..d1b58e1ee0c 100644 --- a/buildroot-external/board/hardkernel/odroid-c2/cmdline.txt +++ b/buildroot-external/board/hardkernel/odroid-c2/cmdline.txt @@ -1 +1 @@ -console=tty0 console=ttyAML0,115200n8 +console=ttyAML0,115200n8 console=tty0 diff --git a/buildroot-external/board/hardkernel/odroid-c4/cmdline.txt b/buildroot-external/board/hardkernel/odroid-c4/cmdline.txt index b4cd5464aee..d1b58e1ee0c 100644 --- a/buildroot-external/board/hardkernel/odroid-c4/cmdline.txt +++ b/buildroot-external/board/hardkernel/odroid-c4/cmdline.txt @@ -1 +1 @@ -console=tty0 console=ttyAML0,115200n8 +console=ttyAML0,115200n8 console=tty0 diff --git a/buildroot-external/board/hardkernel/odroid-m1/cmdline.txt b/buildroot-external/board/hardkernel/odroid-m1/cmdline.txt index e69de29bb2d..235f637c54f 100644 --- a/buildroot-external/board/hardkernel/odroid-m1/cmdline.txt +++ b/buildroot-external/board/hardkernel/odroid-m1/cmdline.txt @@ -0,0 +1 @@ +console=tty0 diff --git a/buildroot-external/board/hardkernel/odroid-m1s/cmdline.txt b/buildroot-external/board/hardkernel/odroid-m1s/cmdline.txt index e69de29bb2d..235f637c54f 100644 --- a/buildroot-external/board/hardkernel/odroid-m1s/cmdline.txt +++ b/buildroot-external/board/hardkernel/odroid-m1s/cmdline.txt @@ -0,0 +1 @@ +console=tty0 diff --git a/buildroot-external/board/hardkernel/odroid-n2/cmdline.txt b/buildroot-external/board/hardkernel/odroid-n2/cmdline.txt index b4cd5464aee..d1b58e1ee0c 100644 --- a/buildroot-external/board/hardkernel/odroid-n2/cmdline.txt +++ b/buildroot-external/board/hardkernel/odroid-n2/cmdline.txt @@ -1 +1 @@ -console=tty0 console=ttyAML0,115200n8 +console=ttyAML0,115200n8 console=tty0 diff --git a/buildroot-external/board/hardkernel/odroid-xu4/cmdline.txt b/buildroot-external/board/hardkernel/odroid-xu4/cmdline.txt index cd2045ff03d..decfc024ae2 100644 --- a/buildroot-external/board/hardkernel/odroid-xu4/cmdline.txt +++ b/buildroot-external/board/hardkernel/odroid-xu4/cmdline.txt @@ -1 +1 @@ -console=tty1 console=ttySAC2,115200 +console=ttySAC2,115200 console=tty0 diff --git a/buildroot-external/board/khadas/vim3/cmdline.txt b/buildroot-external/board/khadas/vim3/cmdline.txt index b4cd5464aee..d1b58e1ee0c 100644 --- a/buildroot-external/board/khadas/vim3/cmdline.txt +++ b/buildroot-external/board/khadas/vim3/cmdline.txt @@ -1 +1 @@ -console=tty0 console=ttyAML0,115200n8 +console=ttyAML0,115200n8 console=tty0 diff --git a/buildroot-external/board/nabucasa/green/cmdline.txt b/buildroot-external/board/nabucasa/green/cmdline.txt index e69de29bb2d..235f637c54f 100644 --- a/buildroot-external/board/nabucasa/green/cmdline.txt +++ b/buildroot-external/board/nabucasa/green/cmdline.txt @@ -0,0 +1 @@ +console=tty0 diff --git a/buildroot-external/board/pc/generic-x86-64/cmdline.txt b/buildroot-external/board/pc/generic-x86-64/cmdline.txt index 04415e63031..235f637c54f 100644 --- a/buildroot-external/board/pc/generic-x86-64/cmdline.txt +++ b/buildroot-external/board/pc/generic-x86-64/cmdline.txt @@ -1 +1 @@ -console=tty1 +console=tty0 diff --git a/buildroot-external/board/pc/ova/cmdline.txt b/buildroot-external/board/pc/ova/cmdline.txt index 333f840e680..f51360b1364 100644 --- a/buildroot-external/board/pc/ova/cmdline.txt +++ b/buildroot-external/board/pc/ova/cmdline.txt @@ -1 +1 @@ -console=ttyS0 console=tty1 +console=ttyS0 console=tty0 diff --git a/buildroot-external/board/raspberrypi/cmdline.txt b/buildroot-external/board/raspberrypi/cmdline.txt index e1e26dabc72..669314f907c 100644 --- a/buildroot-external/board/raspberrypi/cmdline.txt +++ b/buildroot-external/board/raspberrypi/cmdline.txt @@ -1 +1 @@ -dwc_otg.lpm_enable=0 console=tty1 usb-storage.quirks=174c:55aa:u,2109:0715:u,152d:0578:u,152d:0579:u,152d:1561:u,174c:0829:u,14b0:0206:u,174c:225c:u,7825:a2a4:u,152d:0562:u,125f:a88a:u +dwc_otg.lpm_enable=0 console=tty0 usb-storage.quirks=174c:55aa:u,2109:0715:u,152d:0578:u,152d:0579:u,152d:1561:u,174c:0829:u,14b0:0206:u,174c:225c:u,7825:a2a4:u,152d:0562:u,125f:a88a:u diff --git a/buildroot-external/board/raspberrypi/rpi5-64/cmdline.txt b/buildroot-external/board/raspberrypi/rpi5-64/cmdline.txt index 36b9721f621..112bcaf92f1 100644 --- a/buildroot-external/board/raspberrypi/rpi5-64/cmdline.txt +++ b/buildroot-external/board/raspberrypi/rpi5-64/cmdline.txt @@ -1 +1 @@ -zram.enabled=1 zram.num_devices=3 rootwait cgroup_enable=memory fsck.repair=yes console=tty1 root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro rauc.slot=A +zram.enabled=1 zram.num_devices=3 rootwait cgroup_enable=memory fsck.repair=yes console=tty0 root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro rauc.slot=A diff --git a/buildroot-external/board/raspberrypi/yellow/cmdline.txt b/buildroot-external/board/raspberrypi/yellow/cmdline.txt index 5216a4c103b..3b610ebdbb5 100644 --- a/buildroot-external/board/raspberrypi/yellow/cmdline.txt +++ b/buildroot-external/board/raspberrypi/yellow/cmdline.txt @@ -1 +1 @@ -dwc_otg.lpm_enable=0 console=tty1 console=ttyAMA2,115200n8 +dwc_otg.lpm_enable=0 console=tty0 console=ttyAMA2,115200n8 From 6135ecdcc7c2efc175a265568322f6d73eedd1f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Fri, 7 Jun 2024 13:44:14 +0200 Subject: [PATCH 17/27] 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 --- .../board/arm-uefi/generic-aarch64/meta | 4 +- buildroot-external/board/asus/hassos-hook.sh | 6 - .../board/asus/tinker/image-spl-spl.cfg | 13 + buildroot-external/board/asus/tinker/meta | 2 +- .../board/asus/tinker/partition-spl-spl.cfg | 7 + .../board/hardkernel/odroid-c2/hassos-hook.sh | 10 - .../hardkernel/odroid-c2/image-spl-spl.cfg | 20 + .../board/hardkernel/odroid-c2/meta | 2 +- .../odroid-c2/partition-spl-spl.cfg | 8 + .../board/hardkernel/odroid-c4/hassos-hook.sh | 7 - .../hardkernel/odroid-c4/image-spl-spl.cfg | 13 + .../board/hardkernel/odroid-c4/meta | 2 +- .../odroid-c4/partition-spl-spl.cfg | 7 + .../board/hardkernel/odroid-m1/hassos-hook.sh | 6 - .../hardkernel/odroid-m1/image-spl-spl.cfg | 13 + .../board/hardkernel/odroid-m1/meta | 2 +- .../odroid-m1/partition-spl-spl.cfg | 17 + .../hardkernel/odroid-m1s/hassos-hook.sh | 6 - .../hardkernel/odroid-m1s/image-spl-spl.cfg | 13 + .../board/hardkernel/odroid-m1s/meta | 2 +- .../odroid-m1s/partition-spl-spl.cfg | 17 + .../board/hardkernel/odroid-n2/hassos-hook.sh | 7 - .../hardkernel/odroid-n2/image-spl-spl.cfg | 13 + .../board/hardkernel/odroid-n2/meta | 2 +- .../odroid-n2/partition-spl-spl.cfg | 7 + .../hardkernel/odroid-xu4/hassos-hook.sh | 14 - .../hardkernel/odroid-xu4/image-spl-spl.cfg | 33 + .../board/hardkernel/odroid-xu4/meta | 2 +- .../odroid-xu4/partition-spl-spl.cfg | 7 + .../board/khadas/vim3/hassos-hook.sh | 8 - .../board/khadas/vim3/image-spl-spl.cfg | 16 + buildroot-external/board/khadas/vim3/meta | 2 +- .../board/khadas/vim3/partition-spl-spl.cfg | 7 + .../board/nabucasa/green/hassos-hook.sh | 6 - .../board/nabucasa/green/image-spl-spl.cfg | 13 + buildroot-external/board/nabucasa/green/meta | 2 +- .../nabucasa/green/partition-spl-spl.cfg | 7 + .../board/pc/generic-x86-64/meta | 4 +- buildroot-external/board/pc/ova/meta | 4 +- .../board/raspberrypi/rpi2/meta | 2 +- .../board/raspberrypi/rpi3-64/meta | 2 +- .../board/raspberrypi/rpi3/meta | 2 +- .../board/raspberrypi/rpi4-64/meta | 2 +- .../board/raspberrypi/rpi4/meta | 2 +- .../board/raspberrypi/rpi5-64/meta | 2 +- .../board/raspberrypi/yellow/meta | 2 +- .../configs/generic_x86_64_defconfig | 1 + buildroot-external/configs/green_defconfig | 1 + .../configs/khadas_vim3_defconfig | 1 + .../configs/odroid_c2_defconfig | 1 + .../configs/odroid_c4_defconfig | 1 + .../configs/odroid_m1_defconfig | 1 + .../configs/odroid_m1s_defconfig | 1 + .../configs/odroid_n2_defconfig | 1 + .../configs/odroid_xu4_defconfig | 1 + buildroot-external/configs/ova_defconfig | 1 + buildroot-external/configs/rpi2_defconfig | 2 +- buildroot-external/configs/rpi3_64_defconfig | 2 +- buildroot-external/configs/rpi3_defconfig | 2 +- buildroot-external/configs/rpi4_64_defconfig | 2 +- buildroot-external/configs/rpi4_defconfig | 2 +- buildroot-external/configs/rpi5_64_defconfig | 2 +- buildroot-external/configs/tinker_defconfig | 1 + buildroot-external/configs/yellow_defconfig | 2 +- buildroot-external/genimage/genimage.cfg | 15 + buildroot-external/genimage/hdimage-gpt.cfg | 4 + .../genimage/hdimage-hybrid.cfg | 4 + buildroot-external/genimage/hdimage-mbr.cfg | 6 + .../genimage/image-raucb-nospl.cfg | 10 + .../genimage/image-raucb-spl.cfg | 11 + .../genimage/image-spl-nospl.cfg | 1 + buildroot-external/genimage/images-boot.cfg | 9 + buildroot-external/genimage/images-os.cfg | 19 + .../genimage/partition-gptboot-gpt.cfg | 6 + .../genimage/partition-gptboot-hybrid.cfg | 8 + .../genimage/partition-spl-nospl.cfg | 1 + .../genimage/partitions-os-gpt.cfg | 47 ++ .../genimage/partitions-os-hybrid.cfg | 1 + .../genimage/partitions-os-mbr.cfg | 47 ++ buildroot-external/ota/system.conf.gtpl | 4 - ...ced-primary-flag-for-higher-MBR-layo.patch | 598 ++++++++++++++++++ buildroot-external/scripts/hdd-image.sh | 364 ++--------- buildroot-external/scripts/name.sh | 8 +- buildroot-external/scripts/ota.sh | 44 -- buildroot-external/scripts/post-image.sh | 2 - buildroot-external/scripts/rauc.sh | 8 +- 86 files changed, 1115 insertions(+), 472 deletions(-) create mode 100644 buildroot-external/board/asus/tinker/image-spl-spl.cfg create mode 100644 buildroot-external/board/asus/tinker/partition-spl-spl.cfg create mode 100644 buildroot-external/board/hardkernel/odroid-c2/image-spl-spl.cfg create mode 100644 buildroot-external/board/hardkernel/odroid-c2/partition-spl-spl.cfg create mode 100644 buildroot-external/board/hardkernel/odroid-c4/image-spl-spl.cfg create mode 100644 buildroot-external/board/hardkernel/odroid-c4/partition-spl-spl.cfg create mode 100644 buildroot-external/board/hardkernel/odroid-m1/image-spl-spl.cfg create mode 100644 buildroot-external/board/hardkernel/odroid-m1/partition-spl-spl.cfg create mode 100644 buildroot-external/board/hardkernel/odroid-m1s/image-spl-spl.cfg create mode 100644 buildroot-external/board/hardkernel/odroid-m1s/partition-spl-spl.cfg create mode 100644 buildroot-external/board/hardkernel/odroid-n2/image-spl-spl.cfg create mode 100644 buildroot-external/board/hardkernel/odroid-n2/partition-spl-spl.cfg create mode 100644 buildroot-external/board/hardkernel/odroid-xu4/image-spl-spl.cfg create mode 100644 buildroot-external/board/hardkernel/odroid-xu4/partition-spl-spl.cfg create mode 100644 buildroot-external/board/khadas/vim3/image-spl-spl.cfg create mode 100644 buildroot-external/board/khadas/vim3/partition-spl-spl.cfg create mode 100644 buildroot-external/board/nabucasa/green/image-spl-spl.cfg create mode 100644 buildroot-external/board/nabucasa/green/partition-spl-spl.cfg create mode 100644 buildroot-external/genimage/genimage.cfg create mode 100644 buildroot-external/genimage/hdimage-gpt.cfg create mode 100644 buildroot-external/genimage/hdimage-hybrid.cfg create mode 100644 buildroot-external/genimage/hdimage-mbr.cfg create mode 100644 buildroot-external/genimage/image-raucb-nospl.cfg create mode 100644 buildroot-external/genimage/image-raucb-spl.cfg create mode 100644 buildroot-external/genimage/image-spl-nospl.cfg create mode 100644 buildroot-external/genimage/images-boot.cfg create mode 100644 buildroot-external/genimage/images-os.cfg create mode 100644 buildroot-external/genimage/partition-gptboot-gpt.cfg create mode 100644 buildroot-external/genimage/partition-gptboot-hybrid.cfg create mode 100644 buildroot-external/genimage/partition-spl-nospl.cfg create mode 100644 buildroot-external/genimage/partitions-os-gpt.cfg create mode 120000 buildroot-external/genimage/partitions-os-hybrid.cfg create mode 100644 buildroot-external/genimage/partitions-os-mbr.cfg create mode 100644 buildroot-external/patches/genimage/0001-image-hd-add-forced-primary-flag-for-higher-MBR-layo.patch delete mode 100755 buildroot-external/scripts/ota.sh diff --git a/buildroot-external/board/arm-uefi/generic-aarch64/meta b/buildroot-external/board/arm-uefi/generic-aarch64/meta index e4938191a8f..a7c53f40bd3 100644 --- a/buildroot-external/board/arm-uefi/generic-aarch64/meta +++ b/buildroot-external/board/arm-uefi/generic-aarch64/meta @@ -3,9 +3,9 @@ BOARD_NAME="Generic aarch64" CHASSIS=embedded BOOTLOADER=grub KERNEL_FILE=Image -BOOT_SYS=efi +PARTITION_TABLE_TYPE=gpt BOOT_SIZE=32M BOOT_SPL=false -DISK_SIZE=6 +DISK_SIZE=6G SUPERVISOR_MACHINE=qemuarm-64 SUPERVISOR_ARCH=aarch64 diff --git a/buildroot-external/board/asus/hassos-hook.sh b/buildroot-external/board/asus/hassos-hook.sh index 8791179280a..84d85bde615 100755 --- a/buildroot-external/board/asus/hassos-hook.sh +++ b/buildroot-external/board/asus/hassos-hook.sh @@ -3,7 +3,6 @@ function hassos_pre_image() { local BOOT_DATA="$(path_boot_dir)" - local SPL_IMG="$(path_spl_img)" cp -t "${BOOT_DATA}" \ "${BINARIES_DIR}/boot.scr" \ @@ -14,11 +13,6 @@ function hassos_pre_image() { cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/" cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt" cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt" - - # SPL - create_spl_image - - dd if="${BINARIES_DIR}/u-boot-rockchip.bin" of="${SPL_IMG}" conv=notrunc bs=512 seek=64 } diff --git a/buildroot-external/board/asus/tinker/image-spl-spl.cfg b/buildroot-external/board/asus/tinker/image-spl-spl.cfg new file mode 100644 index 00000000000..98f092e0c9c --- /dev/null +++ b/buildroot-external/board/asus/tinker/image-spl-spl.cfg @@ -0,0 +1,13 @@ +image spl.img { + size = ${BOOT_SPL_SIZE} + + hdimage { + partition-table-type = "none" + fill = "yes" + } + + partition uboot { + offset = 32k + image = "u-boot-rockchip.bin" + } +} diff --git a/buildroot-external/board/asus/tinker/meta b/buildroot-external/board/asus/tinker/meta index 9683ec2686f..6b17011094b 100644 --- a/buildroot-external/board/asus/tinker/meta +++ b/buildroot-external/board/asus/tinker/meta @@ -3,7 +3,7 @@ BOARD_NAME="Asus TinkerBoard" CHASSIS=embedded BOOTLOADER=uboot KERNEL_FILE=zImage -BOOT_SYS=hybrid +PARTITION_TABLE_TYPE=hybrid BOOT_SIZE=24M BOOT_SPL=true BOOT_SPL_SIZE=8M diff --git a/buildroot-external/board/asus/tinker/partition-spl-spl.cfg b/buildroot-external/board/asus/tinker/partition-spl-spl.cfg new file mode 100644 index 00000000000..fcc6beff5fc --- /dev/null +++ b/buildroot-external/board/asus/tinker/partition-spl-spl.cfg @@ -0,0 +1,7 @@ +partition spl { + size = ${BOOT_SPL_SIZE} + image = "spl.img" + in-partition-table = "no" + offset = 0 + holes = {"(0; 17k)"} +} diff --git a/buildroot-external/board/hardkernel/odroid-c2/hassos-hook.sh b/buildroot-external/board/hardkernel/odroid-c2/hassos-hook.sh index c9be2185567..9913db2f67a 100755 --- a/buildroot-external/board/hardkernel/odroid-c2/hassos-hook.sh +++ b/buildroot-external/board/hardkernel/odroid-c2/hassos-hook.sh @@ -3,9 +3,6 @@ function hassos_pre_image() { local BOOT_DATA="$(path_boot_dir)" - local BL1="${BINARIES_DIR}/bl1.bin.hardkernel" - local UBOOT_GXBB="${BINARIES_DIR}/u-boot.gxbb" - local SPL_IMG="$(path_spl_img)" cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr" cp "${BINARIES_DIR}/meson-gxbb-odroidc2.dtb" "${BOOT_DATA}/meson-gxbb-odroidc2.dtb" @@ -14,13 +11,6 @@ function hassos_pre_image() { cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/" cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt" cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt" - - # SPL - create_spl_image - - dd if="${BL1}" of="${SPL_IMG}" conv=notrunc bs=1 count=440 - dd if="${BL1}" of="${SPL_IMG}" conv=notrunc bs=512 skip=1 seek=1 - dd if="${UBOOT_GXBB}" of="${SPL_IMG}" conv=notrunc bs=512 seek=97 } diff --git a/buildroot-external/board/hardkernel/odroid-c2/image-spl-spl.cfg b/buildroot-external/board/hardkernel/odroid-c2/image-spl-spl.cfg new file mode 100644 index 00000000000..4936adddd99 --- /dev/null +++ b/buildroot-external/board/hardkernel/odroid-c2/image-spl-spl.cfg @@ -0,0 +1,20 @@ +image spl.img { + size = ${BOOT_SPL_SIZE} + + hdimage { + partition-table-type = "none" + fill = "yes" + } + + partition bl1 { + in-partition-table = "no" + image = "bl1.bin.hardkernel" + offset = 0 + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot.gxbb" + offset = 97s + } +} diff --git a/buildroot-external/board/hardkernel/odroid-c2/meta b/buildroot-external/board/hardkernel/odroid-c2/meta index e8683b420e1..378185a3184 100644 --- a/buildroot-external/board/hardkernel/odroid-c2/meta +++ b/buildroot-external/board/hardkernel/odroid-c2/meta @@ -3,7 +3,7 @@ BOARD_NAME="Hardkernel ODROID-C2" CHASSIS=embedded BOOTLOADER=uboot KERNEL_FILE=Image -BOOT_SYS=mbr +PARTITION_TABLE_TYPE=mbr BOOT_SIZE=24M BOOT_SPL=true BOOT_SPL_SIZE=8M diff --git a/buildroot-external/board/hardkernel/odroid-c2/partition-spl-spl.cfg b/buildroot-external/board/hardkernel/odroid-c2/partition-spl-spl.cfg new file mode 100644 index 00000000000..66b25d3e3cb --- /dev/null +++ b/buildroot-external/board/hardkernel/odroid-c2/partition-spl-spl.cfg @@ -0,0 +1,8 @@ +partition spl { + size = ${BOOT_SPL_SIZE} + image = "spl.img" + in-partition-table = "no" + offset = 0 + holes = {"(440; 512)"} +} + diff --git a/buildroot-external/board/hardkernel/odroid-c4/hassos-hook.sh b/buildroot-external/board/hardkernel/odroid-c4/hassos-hook.sh index 34a71d51f96..20910b685f7 100755 --- a/buildroot-external/board/hardkernel/odroid-c4/hassos-hook.sh +++ b/buildroot-external/board/hardkernel/odroid-c4/hassos-hook.sh @@ -3,8 +3,6 @@ function hassos_pre_image() { local BOOT_DATA="$(path_boot_dir)" - local UBOOT_SM1="${BINARIES_DIR}/u-boot.sm1" - local SPL_IMG="$(path_spl_img)" cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr" cp "${BINARIES_DIR}/meson-sm1-odroid-c4.dtb" "${BOOT_DATA}/meson-sm1-odroid-c4.dtb" @@ -13,11 +11,6 @@ function hassos_pre_image() { cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/" cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt" cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt" - - # SPL - create_spl_image - - dd if="${UBOOT_SM1}" of="${SPL_IMG}" conv=notrunc bs=512 seek=1 } diff --git a/buildroot-external/board/hardkernel/odroid-c4/image-spl-spl.cfg b/buildroot-external/board/hardkernel/odroid-c4/image-spl-spl.cfg new file mode 100644 index 00000000000..336450b4eda --- /dev/null +++ b/buildroot-external/board/hardkernel/odroid-c4/image-spl-spl.cfg @@ -0,0 +1,13 @@ +image spl.img { + size = ${BOOT_SPL_SIZE} + + hdimage { + partition-table-type = "none" + fill = "yes" + } + + partition uboot { + offset = 512 + image = "u-boot.sm1" + } +} diff --git a/buildroot-external/board/hardkernel/odroid-c4/meta b/buildroot-external/board/hardkernel/odroid-c4/meta index 52bb0e7c8e1..bc78074fec9 100644 --- a/buildroot-external/board/hardkernel/odroid-c4/meta +++ b/buildroot-external/board/hardkernel/odroid-c4/meta @@ -3,7 +3,7 @@ BOARD_NAME="Hardkernel ODROID-C4" CHASSIS=embedded BOOTLOADER=uboot KERNEL_FILE=Image -BOOT_SYS=mbr +PARTITION_TABLE_TYPE=mbr BOOT_SIZE=24M BOOT_SPL=true BOOT_SPL_SIZE=8M diff --git a/buildroot-external/board/hardkernel/odroid-c4/partition-spl-spl.cfg b/buildroot-external/board/hardkernel/odroid-c4/partition-spl-spl.cfg new file mode 100644 index 00000000000..8eb324b4b96 --- /dev/null +++ b/buildroot-external/board/hardkernel/odroid-c4/partition-spl-spl.cfg @@ -0,0 +1,7 @@ +partition spl { + size = ${BOOT_SPL_SIZE} + image = "spl.img" + in-partition-table = "no" + offset = 0 + holes = {"(0; 512)"} +} diff --git a/buildroot-external/board/hardkernel/odroid-m1/hassos-hook.sh b/buildroot-external/board/hardkernel/odroid-m1/hassos-hook.sh index 14c703f380b..49f56dda663 100755 --- a/buildroot-external/board/hardkernel/odroid-m1/hassos-hook.sh +++ b/buildroot-external/board/hardkernel/odroid-m1/hassos-hook.sh @@ -3,18 +3,12 @@ function hassos_pre_image() { local BOOT_DATA="$(path_boot_dir)" - local SPL_IMG="$(path_spl_img)" cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr" cp "${BINARIES_DIR}"/*.dtb "${BOOT_DATA}/" cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt" cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt" - - # SPL - create_spl_image - - dd if="${BINARIES_DIR}/u-boot-rockchip.bin" of="${SPL_IMG}" conv=notrunc bs=512 seek=64 } diff --git a/buildroot-external/board/hardkernel/odroid-m1/image-spl-spl.cfg b/buildroot-external/board/hardkernel/odroid-m1/image-spl-spl.cfg new file mode 100644 index 00000000000..98f092e0c9c --- /dev/null +++ b/buildroot-external/board/hardkernel/odroid-m1/image-spl-spl.cfg @@ -0,0 +1,13 @@ +image spl.img { + size = ${BOOT_SPL_SIZE} + + hdimage { + partition-table-type = "none" + fill = "yes" + } + + partition uboot { + offset = 32k + image = "u-boot-rockchip.bin" + } +} diff --git a/buildroot-external/board/hardkernel/odroid-m1/meta b/buildroot-external/board/hardkernel/odroid-m1/meta index 4c7f16a9a81..b152313a2b0 100644 --- a/buildroot-external/board/hardkernel/odroid-m1/meta +++ b/buildroot-external/board/hardkernel/odroid-m1/meta @@ -3,7 +3,7 @@ BOARD_NAME="Hardkernel ODROID-M1" CHASSIS=embedded BOOTLOADER=uboot KERNEL_FILE=Image -BOOT_SYS=gpt +PARTITION_TABLE_TYPE=hybrid BOOT_SIZE=16M BOOT_SPL=true BOOT_SPL_SIZE=16M diff --git a/buildroot-external/board/hardkernel/odroid-m1/partition-spl-spl.cfg b/buildroot-external/board/hardkernel/odroid-m1/partition-spl-spl.cfg new file mode 100644 index 00000000000..5db7ebff8cc --- /dev/null +++ b/buildroot-external/board/hardkernel/odroid-m1/partition-spl-spl.cfg @@ -0,0 +1,17 @@ +partition spl { + size = ${BOOT_SPL_SIZE} + image = "spl.img" + in-partition-table = "no" + offset = 0 + holes = {"(0; 17k)", "(8M; 16M)"} +} + +partition uboot { + size = 8M + offset = 8M + # FIXME: hdd-image intended to use the following, but the next one + # is in the img because of the _fix_disk_spl_gpt function + # partition-type-uuid = "21686148-6449-6e6f-744e-656564454649" + partition-type-uuid = "e3c9e316-0b5c-4db8-817d-f92df00215ae" + # no image here - already contains data from spl.img +} diff --git a/buildroot-external/board/hardkernel/odroid-m1s/hassos-hook.sh b/buildroot-external/board/hardkernel/odroid-m1s/hassos-hook.sh index 14c703f380b..49f56dda663 100755 --- a/buildroot-external/board/hardkernel/odroid-m1s/hassos-hook.sh +++ b/buildroot-external/board/hardkernel/odroid-m1s/hassos-hook.sh @@ -3,18 +3,12 @@ function hassos_pre_image() { local BOOT_DATA="$(path_boot_dir)" - local SPL_IMG="$(path_spl_img)" cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr" cp "${BINARIES_DIR}"/*.dtb "${BOOT_DATA}/" cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt" cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt" - - # SPL - create_spl_image - - dd if="${BINARIES_DIR}/u-boot-rockchip.bin" of="${SPL_IMG}" conv=notrunc bs=512 seek=64 } diff --git a/buildroot-external/board/hardkernel/odroid-m1s/image-spl-spl.cfg b/buildroot-external/board/hardkernel/odroid-m1s/image-spl-spl.cfg new file mode 100644 index 00000000000..98f092e0c9c --- /dev/null +++ b/buildroot-external/board/hardkernel/odroid-m1s/image-spl-spl.cfg @@ -0,0 +1,13 @@ +image spl.img { + size = ${BOOT_SPL_SIZE} + + hdimage { + partition-table-type = "none" + fill = "yes" + } + + partition uboot { + offset = 32k + image = "u-boot-rockchip.bin" + } +} diff --git a/buildroot-external/board/hardkernel/odroid-m1s/meta b/buildroot-external/board/hardkernel/odroid-m1s/meta index b73bb38e066..9c75b6f31f2 100644 --- a/buildroot-external/board/hardkernel/odroid-m1s/meta +++ b/buildroot-external/board/hardkernel/odroid-m1s/meta @@ -3,7 +3,7 @@ BOARD_NAME="Hardkernel ODROID-M1S" CHASSIS=embedded BOOTLOADER=uboot KERNEL_FILE=Image -BOOT_SYS=gpt +PARTITION_TABLE_TYPE=hybrid BOOT_SIZE=16M BOOT_SPL=true BOOT_SPL_SIZE=16M diff --git a/buildroot-external/board/hardkernel/odroid-m1s/partition-spl-spl.cfg b/buildroot-external/board/hardkernel/odroid-m1s/partition-spl-spl.cfg new file mode 100644 index 00000000000..5db7ebff8cc --- /dev/null +++ b/buildroot-external/board/hardkernel/odroid-m1s/partition-spl-spl.cfg @@ -0,0 +1,17 @@ +partition spl { + size = ${BOOT_SPL_SIZE} + image = "spl.img" + in-partition-table = "no" + offset = 0 + holes = {"(0; 17k)", "(8M; 16M)"} +} + +partition uboot { + size = 8M + offset = 8M + # FIXME: hdd-image intended to use the following, but the next one + # is in the img because of the _fix_disk_spl_gpt function + # partition-type-uuid = "21686148-6449-6e6f-744e-656564454649" + partition-type-uuid = "e3c9e316-0b5c-4db8-817d-f92df00215ae" + # no image here - already contains data from spl.img +} diff --git a/buildroot-external/board/hardkernel/odroid-n2/hassos-hook.sh b/buildroot-external/board/hardkernel/odroid-n2/hassos-hook.sh index 2beb6e245d1..a22915932a9 100755 --- a/buildroot-external/board/hardkernel/odroid-n2/hassos-hook.sh +++ b/buildroot-external/board/hardkernel/odroid-n2/hassos-hook.sh @@ -3,8 +3,6 @@ function hassos_pre_image() { local BOOT_DATA="$(path_boot_dir)" - local UBOOT_G12B="${BINARIES_DIR}/u-boot.g12b" - local SPL_IMG="$(path_spl_img)" cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr" cp "${BINARIES_DIR}"/*.dtb "${BOOT_DATA}/" @@ -13,11 +11,6 @@ function hassos_pre_image() { cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/" cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt" cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt" - - # SPL - create_spl_image - - dd if="${UBOOT_G12B}" of="${SPL_IMG}" conv=notrunc bs=512 seek=1 } diff --git a/buildroot-external/board/hardkernel/odroid-n2/image-spl-spl.cfg b/buildroot-external/board/hardkernel/odroid-n2/image-spl-spl.cfg new file mode 100644 index 00000000000..0bef44fa460 --- /dev/null +++ b/buildroot-external/board/hardkernel/odroid-n2/image-spl-spl.cfg @@ -0,0 +1,13 @@ +image spl.img { + size = ${BOOT_SPL_SIZE} + + hdimage { + partition-table-type = "none" + fill = "yes" + } + + partition uboot { + offset = 512 + image = "u-boot.g12b" + } +} diff --git a/buildroot-external/board/hardkernel/odroid-n2/meta b/buildroot-external/board/hardkernel/odroid-n2/meta index a35e1c5c34c..ac72f7eddd4 100644 --- a/buildroot-external/board/hardkernel/odroid-n2/meta +++ b/buildroot-external/board/hardkernel/odroid-n2/meta @@ -3,7 +3,7 @@ BOARD_NAME="Hardkernel ODROID-N2" CHASSIS=embedded BOOTLOADER=uboot KERNEL_FILE=Image -BOOT_SYS=mbr +PARTITION_TABLE_TYPE=mbr BOOT_SIZE=24M BOOT_SPL=true BOOT_SPL_SIZE=8M diff --git a/buildroot-external/board/hardkernel/odroid-n2/partition-spl-spl.cfg b/buildroot-external/board/hardkernel/odroid-n2/partition-spl-spl.cfg new file mode 100644 index 00000000000..8eb324b4b96 --- /dev/null +++ b/buildroot-external/board/hardkernel/odroid-n2/partition-spl-spl.cfg @@ -0,0 +1,7 @@ +partition spl { + size = ${BOOT_SPL_SIZE} + image = "spl.img" + in-partition-table = "no" + offset = 0 + holes = {"(0; 512)"} +} diff --git a/buildroot-external/board/hardkernel/odroid-xu4/hassos-hook.sh b/buildroot-external/board/hardkernel/odroid-xu4/hassos-hook.sh index 437a39fb44b..8614412d6b3 100644 --- a/buildroot-external/board/hardkernel/odroid-xu4/hassos-hook.sh +++ b/buildroot-external/board/hardkernel/odroid-xu4/hassos-hook.sh @@ -3,24 +3,10 @@ function hassos_pre_image() { local BOOT_DATA="$(path_boot_dir)" - local BL1="${BINARIES_DIR}/bl1.bin.hardkernel" - local BL2="${BINARIES_DIR}/bl2.bin.hardkernel.720k_uboot" - local BLTZ="${BINARIES_DIR}/tzsw.bin.hardkernel" - local UBOOT="${BINARIES_DIR}/u-boot.bin" - local spl_img="$(path_spl_img)" cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr" cp "${BINARIES_DIR}/exynos5422-odroidxu4.dtb" "${BOOT_DATA}/exynos5422-odroidxu4.dtb" cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt" - - # SPL - create_spl_image - - dd if="${BL1}" of="${spl_img}" conv=notrunc bs=512 seek=1 - dd if="${BL2}" of="${spl_img}" conv=notrunc bs=512 seek=31 - dd if="${UBOOT}" of="${spl_img}" conv=notrunc bs=512 seek=63 - dd if="${BLTZ}" of="${spl_img}" conv=notrunc bs=512 seek=1503 - dd if=/dev/zero of="${spl_img}" conv=notrunc bs=512 count=32 seek=2015 } diff --git a/buildroot-external/board/hardkernel/odroid-xu4/image-spl-spl.cfg b/buildroot-external/board/hardkernel/odroid-xu4/image-spl-spl.cfg new file mode 100644 index 00000000000..239af3697d8 --- /dev/null +++ b/buildroot-external/board/hardkernel/odroid-xu4/image-spl-spl.cfg @@ -0,0 +1,33 @@ +image spl.img { + size = ${BOOT_SPL_SIZE} + + hdimage { + partition-table-type = "none" + fill = "yes" + } + + partition 0 { + size = 512 + fill = "yes" + } + + partition bl1 { + image = "bl1.bin.hardkernel" + holes = {"(15360; 15616)"} # last 256 bytes are overwritten by bl2 + } + + partition bl2 { + offset = 31s + image = "bl2.bin.hardkernel.720k_uboot" + } + + partition uboot { + offset = 63s + image = "u-boot.bin" + } + + partition tzsw { + offset = 1503s + image = "tzsw.bin.hardkernel" + } +} diff --git a/buildroot-external/board/hardkernel/odroid-xu4/meta b/buildroot-external/board/hardkernel/odroid-xu4/meta index 4543d1b3671..d87e987f191 100644 --- a/buildroot-external/board/hardkernel/odroid-xu4/meta +++ b/buildroot-external/board/hardkernel/odroid-xu4/meta @@ -3,7 +3,7 @@ BOARD_NAME="Hardkernel ODROID-XU4" CHASSIS=embedded BOOTLOADER=uboot KERNEL_FILE=zImage -BOOT_SYS=mbr +PARTITION_TABLE_TYPE=mbr BOOT_SIZE=24M BOOT_SPL=true BOOT_SPL_SIZE=8M diff --git a/buildroot-external/board/hardkernel/odroid-xu4/partition-spl-spl.cfg b/buildroot-external/board/hardkernel/odroid-xu4/partition-spl-spl.cfg new file mode 100644 index 00000000000..1e3ecfebad2 --- /dev/null +++ b/buildroot-external/board/hardkernel/odroid-xu4/partition-spl-spl.cfg @@ -0,0 +1,7 @@ +partition spl { + size = ${BOOT_SPL_SIZE} + image = "spl.img" + in-partition-table = "no" + offset = 0 + holes = {"(440; 512)"} +} diff --git a/buildroot-external/board/khadas/vim3/hassos-hook.sh b/buildroot-external/board/khadas/vim3/hassos-hook.sh index 62760913365..b45a20d01f6 100755 --- a/buildroot-external/board/khadas/vim3/hassos-hook.sh +++ b/buildroot-external/board/khadas/vim3/hassos-hook.sh @@ -3,20 +3,12 @@ function hassos_pre_image() { local BOOT_DATA="$(path_boot_dir)" - local UBOOT_GXL="${BINARIES_DIR}/u-boot.gxl" - local SPL_IMG="$(path_spl_img)" cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr" cp "${BINARIES_DIR}/meson-g12b-s922x-khadas-vim3.dtb" "${BOOT_DATA}/meson-g12b-s922x-khadas-vim3.dtb" cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt" cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt" - - # SPL - create_spl_image - - dd if="${UBOOT_GXL}" of="${SPL_IMG}" conv=notrunc bs=1 count=444 - dd if="${UBOOT_GXL}" of="${SPL_IMG}" conv=notrunc bs=512 skip=1 seek=1 } diff --git a/buildroot-external/board/khadas/vim3/image-spl-spl.cfg b/buildroot-external/board/khadas/vim3/image-spl-spl.cfg new file mode 100644 index 00000000000..a734a318a0b --- /dev/null +++ b/buildroot-external/board/khadas/vim3/image-spl-spl.cfg @@ -0,0 +1,16 @@ +image spl.img { + size = ${BOOT_SPL_SIZE} + + # FIXME: May not be necessary, but keeping it for now for binary-identical output + exec-post = "dd if=/dev/zero of=${BINARIES_DIR}/spl.img seek=444 count=68 bs=1 conv=notrunc" + + hdimage { + partition-table-type = "none" + fill = "yes" + } + + partition uboot { + offset = 0 + image = "u-boot.gxl" + } +} diff --git a/buildroot-external/board/khadas/vim3/meta b/buildroot-external/board/khadas/vim3/meta index facf0fd2cbb..7496e36a771 100644 --- a/buildroot-external/board/khadas/vim3/meta +++ b/buildroot-external/board/khadas/vim3/meta @@ -3,7 +3,7 @@ BOARD_NAME="Khadas VIM3" CHASSIS=embedded BOOTLOADER=uboot KERNEL_FILE=Image -BOOT_SYS=mbr +PARTITION_TABLE_TYPE=mbr BOOT_SIZE=24M BOOT_SPL=true BOOT_SPL_SIZE=8M diff --git a/buildroot-external/board/khadas/vim3/partition-spl-spl.cfg b/buildroot-external/board/khadas/vim3/partition-spl-spl.cfg new file mode 100644 index 00000000000..1e3ecfebad2 --- /dev/null +++ b/buildroot-external/board/khadas/vim3/partition-spl-spl.cfg @@ -0,0 +1,7 @@ +partition spl { + size = ${BOOT_SPL_SIZE} + image = "spl.img" + in-partition-table = "no" + offset = 0 + holes = {"(440; 512)"} +} diff --git a/buildroot-external/board/nabucasa/green/hassos-hook.sh b/buildroot-external/board/nabucasa/green/hassos-hook.sh index 14c703f380b..49f56dda663 100644 --- a/buildroot-external/board/nabucasa/green/hassos-hook.sh +++ b/buildroot-external/board/nabucasa/green/hassos-hook.sh @@ -3,18 +3,12 @@ function hassos_pre_image() { local BOOT_DATA="$(path_boot_dir)" - local SPL_IMG="$(path_spl_img)" cp "${BINARIES_DIR}/boot.scr" "${BOOT_DATA}/boot.scr" cp "${BINARIES_DIR}"/*.dtb "${BOOT_DATA}/" cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt" cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt" - - # SPL - create_spl_image - - dd if="${BINARIES_DIR}/u-boot-rockchip.bin" of="${SPL_IMG}" conv=notrunc bs=512 seek=64 } diff --git a/buildroot-external/board/nabucasa/green/image-spl-spl.cfg b/buildroot-external/board/nabucasa/green/image-spl-spl.cfg new file mode 100644 index 00000000000..98f092e0c9c --- /dev/null +++ b/buildroot-external/board/nabucasa/green/image-spl-spl.cfg @@ -0,0 +1,13 @@ +image spl.img { + size = ${BOOT_SPL_SIZE} + + hdimage { + partition-table-type = "none" + fill = "yes" + } + + partition uboot { + offset = 32k + image = "u-boot-rockchip.bin" + } +} diff --git a/buildroot-external/board/nabucasa/green/meta b/buildroot-external/board/nabucasa/green/meta index 84f207e32e6..38b611ac0cc 100644 --- a/buildroot-external/board/nabucasa/green/meta +++ b/buildroot-external/board/nabucasa/green/meta @@ -3,7 +3,7 @@ BOARD_NAME="Home Assistant Green" CHASSIS=embedded BOOTLOADER=uboot KERNEL_FILE=Image -BOOT_SYS=gpt +PARTITION_TABLE_TYPE=hybrid BOOT_SIZE=16M BOOT_SPL=true BOOT_SPL_SIZE=16M diff --git a/buildroot-external/board/nabucasa/green/partition-spl-spl.cfg b/buildroot-external/board/nabucasa/green/partition-spl-spl.cfg new file mode 100644 index 00000000000..fcc6beff5fc --- /dev/null +++ b/buildroot-external/board/nabucasa/green/partition-spl-spl.cfg @@ -0,0 +1,7 @@ +partition spl { + size = ${BOOT_SPL_SIZE} + image = "spl.img" + in-partition-table = "no" + offset = 0 + holes = {"(0; 17k)"} +} diff --git a/buildroot-external/board/pc/generic-x86-64/meta b/buildroot-external/board/pc/generic-x86-64/meta index 0283b2cc2d2..6672e3a3ee4 100644 --- a/buildroot-external/board/pc/generic-x86-64/meta +++ b/buildroot-external/board/pc/generic-x86-64/meta @@ -3,9 +3,9 @@ BOARD_NAME="Generic x86-64" CHASSIS=embedded BOOTLOADER=grub KERNEL_FILE=bzImage -BOOT_SYS=efi +PARTITION_TABLE_TYPE=gpt BOOT_SIZE=32M BOOT_SPL=false -DISK_SIZE=6 +DISK_SIZE=6G SUPERVISOR_MACHINE=generic-x86-64 SUPERVISOR_ARCH=amd64 diff --git a/buildroot-external/board/pc/ova/meta b/buildroot-external/board/pc/ova/meta index 10f8d56c885..0250513b874 100644 --- a/buildroot-external/board/pc/ova/meta +++ b/buildroot-external/board/pc/ova/meta @@ -3,9 +3,9 @@ BOARD_NAME="Open Virtual Appliance" CHASSIS=vm BOOTLOADER=grub KERNEL_FILE=bzImage -BOOT_SYS=efi +PARTITION_TABLE_TYPE=gpt BOOT_SIZE=32M BOOT_SPL=false -DISK_SIZE=32 +DISK_SIZE=32G SUPERVISOR_MACHINE=qemux86-64 SUPERVISOR_ARCH=amd64 diff --git a/buildroot-external/board/raspberrypi/rpi2/meta b/buildroot-external/board/raspberrypi/rpi2/meta index 28dd227f032..59b08e4e845 100644 --- a/buildroot-external/board/raspberrypi/rpi2/meta +++ b/buildroot-external/board/raspberrypi/rpi2/meta @@ -3,7 +3,7 @@ BOARD_NAME="RaspberryPi 2" CHASSIS=embedded BOOTLOADER=uboot KERNEL_FILE=zImage -BOOT_SYS=hybrid +PARTITION_TABLE_TYPE=hybrid BOOT_SIZE=32M BOOT_SPL=false BOOT_ENV_SIZE=0x4000 diff --git a/buildroot-external/board/raspberrypi/rpi3-64/meta b/buildroot-external/board/raspberrypi/rpi3-64/meta index ee1a6c8ffe9..831091c7af0 100644 --- a/buildroot-external/board/raspberrypi/rpi3-64/meta +++ b/buildroot-external/board/raspberrypi/rpi3-64/meta @@ -3,7 +3,7 @@ BOARD_NAME="RaspberryPi 3 64bit" CHASSIS=embedded BOOTLOADER=uboot KERNEL_FILE=Image -BOOT_SYS=hybrid +PARTITION_TABLE_TYPE=hybrid BOOT_SIZE=32M BOOT_SPL=false BOOT_ENV_SIZE=0x4000 diff --git a/buildroot-external/board/raspberrypi/rpi3/meta b/buildroot-external/board/raspberrypi/rpi3/meta index 66f7b812326..f5031696a0d 100644 --- a/buildroot-external/board/raspberrypi/rpi3/meta +++ b/buildroot-external/board/raspberrypi/rpi3/meta @@ -3,7 +3,7 @@ BOARD_NAME="RaspberryPi 3" CHASSIS=embedded BOOTLOADER=uboot KERNEL_FILE=zImage -BOOT_SYS=hybrid +PARTITION_TABLE_TYPE=hybrid BOOT_SIZE=32M BOOT_SPL=false BOOT_ENV_SIZE=0x4000 diff --git a/buildroot-external/board/raspberrypi/rpi4-64/meta b/buildroot-external/board/raspberrypi/rpi4-64/meta index 7f95185b148..75e834ea827 100644 --- a/buildroot-external/board/raspberrypi/rpi4-64/meta +++ b/buildroot-external/board/raspberrypi/rpi4-64/meta @@ -3,7 +3,7 @@ BOARD_NAME="RaspberryPi 4 64bit" CHASSIS=embedded BOOTLOADER=uboot KERNEL_FILE=Image -BOOT_SYS=hybrid +PARTITION_TABLE_TYPE=hybrid BOOT_SIZE=32M BOOT_SPL=false BOOT_ENV_SIZE=0x4000 diff --git a/buildroot-external/board/raspberrypi/rpi4/meta b/buildroot-external/board/raspberrypi/rpi4/meta index bb4fa2e03cf..7ea312c7abd 100644 --- a/buildroot-external/board/raspberrypi/rpi4/meta +++ b/buildroot-external/board/raspberrypi/rpi4/meta @@ -3,7 +3,7 @@ BOARD_NAME="RaspberryPi 4" CHASSIS=embedded BOOTLOADER=uboot KERNEL_FILE=zImage -BOOT_SYS=hybrid +PARTITION_TABLE_TYPE=hybrid BOOT_SIZE=32M BOOT_SPL=false BOOT_ENV_SIZE=0x4000 diff --git a/buildroot-external/board/raspberrypi/rpi5-64/meta b/buildroot-external/board/raspberrypi/rpi5-64/meta index dc41809d7d4..f6d6efcac11 100644 --- a/buildroot-external/board/raspberrypi/rpi5-64/meta +++ b/buildroot-external/board/raspberrypi/rpi5-64/meta @@ -3,7 +3,7 @@ BOARD_NAME="RaspberryPi 5 64bit" CHASSIS=embedded BOOTLOADER=tryboot KERNEL_FILE=Image -BOOT_SYS=gpt +PARTITION_TABLE_TYPE=gpt BOOT_SIZE=64M BOOT_SPL=false BOOT_ENV_SIZE=0x4000 diff --git a/buildroot-external/board/raspberrypi/yellow/meta b/buildroot-external/board/raspberrypi/yellow/meta index 373ab9ab169..cf124b26b21 100644 --- a/buildroot-external/board/raspberrypi/yellow/meta +++ b/buildroot-external/board/raspberrypi/yellow/meta @@ -3,7 +3,7 @@ BOARD_NAME="Yellow" CHASSIS=embedded BOOTLOADER=uboot KERNEL_FILE=Image -BOOT_SYS=hybrid +PARTITION_TABLE_TYPE=hybrid BOOT_SIZE=32M BOOT_SPL=false BOOT_ENV_SIZE=0x4000 diff --git a/buildroot-external/configs/generic_x86_64_defconfig b/buildroot-external/configs/generic_x86_64_defconfig index b0986048573..ff3a3ba0d08 100644 --- a/buildroot-external/configs/generic_x86_64_defconfig +++ b/buildroot-external/configs/generic_x86_64_defconfig @@ -164,6 +164,7 @@ BR2_TARGET_GRUB2_BUILTIN_MODULES_EFI="boot linux ext2 fat squash4 part_msdos par BR2_TARGET_GRUB2_INSTALL_TOOLS=y BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_E2FSPROGS=y +BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_GPTFDISK=y BR2_PACKAGE_HOST_MTOOLS=y BR2_PACKAGE_HOST_RAUC=y diff --git a/buildroot-external/configs/green_defconfig b/buildroot-external/configs/green_defconfig index 60a3f859bb4..3e86a6b2050 100755 --- a/buildroot-external/configs/green_defconfig +++ b/buildroot-external/configs/green_defconfig @@ -149,6 +149,7 @@ BR2_TARGET_UBOOT_FORMAT_CUSTOM=y BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-rockchip.bin" BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_E2FSPROGS=y +BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_GPTFDISK=y BR2_PACKAGE_HOST_MTOOLS=y BR2_PACKAGE_HOST_RAUC=y diff --git a/buildroot-external/configs/khadas_vim3_defconfig b/buildroot-external/configs/khadas_vim3_defconfig index 6473378d21f..cdf6813df5f 100644 --- a/buildroot-external/configs/khadas_vim3_defconfig +++ b/buildroot-external/configs/khadas_vim3_defconfig @@ -137,6 +137,7 @@ BR2_TARGET_UBOOT_BOARD_DEFCONFIG="khadas-vim3" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/khadas/vim3/uboot.config" BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_E2FSPROGS=y +BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_GPTFDISK=y BR2_PACKAGE_HOST_MTOOLS=y BR2_PACKAGE_HOST_RAUC=y diff --git a/buildroot-external/configs/odroid_c2_defconfig b/buildroot-external/configs/odroid_c2_defconfig index 9d23568ea9e..841e063e5f2 100644 --- a/buildroot-external/configs/odroid_c2_defconfig +++ b/buildroot-external/configs/odroid_c2_defconfig @@ -137,6 +137,7 @@ BR2_TARGET_UBOOT_BOARD_DEFCONFIG="odroid-c2" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2/uboot.config" BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_E2FSPROGS=y +BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_GPTFDISK=y BR2_PACKAGE_HOST_MTOOLS=y BR2_PACKAGE_HOST_RAUC=y diff --git a/buildroot-external/configs/odroid_c4_defconfig b/buildroot-external/configs/odroid_c4_defconfig index de65cf5fd53..cc92be1d86b 100644 --- a/buildroot-external/configs/odroid_c4_defconfig +++ b/buildroot-external/configs/odroid_c4_defconfig @@ -135,6 +135,7 @@ BR2_TARGET_UBOOT_BOARD_DEFCONFIG="odroid-c4" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c4/uboot.config" BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_E2FSPROGS=y +BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_GPTFDISK=y BR2_PACKAGE_HOST_MTOOLS=y BR2_PACKAGE_HOST_RAUC=y diff --git a/buildroot-external/configs/odroid_m1_defconfig b/buildroot-external/configs/odroid_m1_defconfig index 9208b9e4420..30fe08ae08f 100644 --- a/buildroot-external/configs/odroid_m1_defconfig +++ b/buildroot-external/configs/odroid_m1_defconfig @@ -144,6 +144,7 @@ BR2_TARGET_UBOOT_FORMAT_CUSTOM=y BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-rockchip.bin" BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_E2FSPROGS=y +BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_GPTFDISK=y BR2_PACKAGE_HOST_MTOOLS=y BR2_PACKAGE_HOST_RAUC=y diff --git a/buildroot-external/configs/odroid_m1s_defconfig b/buildroot-external/configs/odroid_m1s_defconfig index 86af3d1a23f..9a83c73ffc4 100644 --- a/buildroot-external/configs/odroid_m1s_defconfig +++ b/buildroot-external/configs/odroid_m1s_defconfig @@ -144,6 +144,7 @@ BR2_TARGET_UBOOT_FORMAT_CUSTOM=y BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-rockchip.bin" BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_E2FSPROGS=y +BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_GPTFDISK=y BR2_PACKAGE_HOST_MTOOLS=y BR2_PACKAGE_HOST_RAUC=y diff --git a/buildroot-external/configs/odroid_n2_defconfig b/buildroot-external/configs/odroid_n2_defconfig index c83380e8a90..b21a8fba083 100644 --- a/buildroot-external/configs/odroid_n2_defconfig +++ b/buildroot-external/configs/odroid_n2_defconfig @@ -137,6 +137,7 @@ BR2_TARGET_UBOOT_BOARD_DEFCONFIG="odroid-n2" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2/uboot.config" BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_E2FSPROGS=y +BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_GPTFDISK=y BR2_PACKAGE_HOST_MTOOLS=y BR2_PACKAGE_HOST_RAUC=y diff --git a/buildroot-external/configs/odroid_xu4_defconfig b/buildroot-external/configs/odroid_xu4_defconfig index e0bdec1d083..7686fa78aa5 100644 --- a/buildroot-external/configs/odroid_xu4_defconfig +++ b/buildroot-external/configs/odroid_xu4_defconfig @@ -139,6 +139,7 @@ BR2_TARGET_UBOOT_NEEDS_DTC=y BR2_TARGET_UBOOT_FORMAT_DTB_BIN=y BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_E2FSPROGS=y +BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_GPTFDISK=y BR2_PACKAGE_HOST_MTOOLS=y BR2_PACKAGE_HOST_RAUC=y diff --git a/buildroot-external/configs/ova_defconfig b/buildroot-external/configs/ova_defconfig index 030360ac615..829d210f86c 100644 --- a/buildroot-external/configs/ova_defconfig +++ b/buildroot-external/configs/ova_defconfig @@ -165,6 +165,7 @@ BR2_TARGET_GRUB2_BUILTIN_MODULES_EFI="boot linux ext2 fat squash4 part_msdos par BR2_TARGET_GRUB2_INSTALL_TOOLS=y BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_E2FSPROGS=y +BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_GPTFDISK=y BR2_PACKAGE_HOST_MTOOLS=y BR2_PACKAGE_HOST_RAUC=y diff --git a/buildroot-external/configs/rpi2_defconfig b/buildroot-external/configs/rpi2_defconfig index b22fd92189c..f6bb7adc36a 100644 --- a/buildroot-external/configs/rpi2_defconfig +++ b/buildroot-external/configs/rpi2_defconfig @@ -1,7 +1,6 @@ BR2_arm=y BR2_cortex_a7=y BR2_ARM_FPU_VFPV4=y -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y BR2_TOOLCHAIN_BUILDROOT_CXX=y BR2_DL_DIR="/cache/dl" BR2_CCACHE=y @@ -141,6 +140,7 @@ BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rpi_2" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot.config" BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_E2FSPROGS=y +BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_GPTFDISK=y BR2_PACKAGE_HOST_MTOOLS=y BR2_PACKAGE_HOST_RAUC=y diff --git a/buildroot-external/configs/rpi3_64_defconfig b/buildroot-external/configs/rpi3_64_defconfig index 4abd059e809..20003a1a506 100644 --- a/buildroot-external/configs/rpi3_64_defconfig +++ b/buildroot-external/configs/rpi3_64_defconfig @@ -1,6 +1,5 @@ BR2_aarch64=y BR2_ARM_FPU_VFPV4=y -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y BR2_TOOLCHAIN_BUILDROOT_CXX=y BR2_DL_DIR="/cache/dl" BR2_CCACHE=y @@ -142,6 +141,7 @@ BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rpi_3" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot.config" BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_E2FSPROGS=y +BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_GPTFDISK=y BR2_PACKAGE_HOST_MTOOLS=y BR2_PACKAGE_HOST_RAUC=y diff --git a/buildroot-external/configs/rpi3_defconfig b/buildroot-external/configs/rpi3_defconfig index 8cff48c1c37..a3794f06331 100644 --- a/buildroot-external/configs/rpi3_defconfig +++ b/buildroot-external/configs/rpi3_defconfig @@ -1,7 +1,6 @@ BR2_arm=y BR2_cortex_a53=y BR2_ARM_FPU_VFPV4=y -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y BR2_TOOLCHAIN_BUILDROOT_CXX=y BR2_DL_DIR="/cache/dl" BR2_CCACHE=y @@ -143,6 +142,7 @@ BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rpi_3_32b" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot.config" BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_E2FSPROGS=y +BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_GPTFDISK=y BR2_PACKAGE_HOST_MTOOLS=y BR2_PACKAGE_HOST_RAUC=y diff --git a/buildroot-external/configs/rpi4_64_defconfig b/buildroot-external/configs/rpi4_64_defconfig index a77949c06dc..7bf9ad2df88 100644 --- a/buildroot-external/configs/rpi4_64_defconfig +++ b/buildroot-external/configs/rpi4_64_defconfig @@ -1,6 +1,5 @@ BR2_aarch64=y BR2_cortex_a72=y -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y BR2_TOOLCHAIN_BUILDROOT_CXX=y BR2_DL_DIR="/cache/dl" BR2_CCACHE=y @@ -143,6 +142,7 @@ BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rpi_4" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi4-64/uboot.config" BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_E2FSPROGS=y +BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_GPTFDISK=y BR2_PACKAGE_HOST_MTOOLS=y BR2_PACKAGE_HOST_RAUC=y diff --git a/buildroot-external/configs/rpi4_defconfig b/buildroot-external/configs/rpi4_defconfig index e82a2a4e305..a20d03d1ab3 100644 --- a/buildroot-external/configs/rpi4_defconfig +++ b/buildroot-external/configs/rpi4_defconfig @@ -1,7 +1,6 @@ BR2_arm=y BR2_cortex_a72=y BR2_ARM_FPU_NEON_VFPV4=y -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y BR2_TOOLCHAIN_BUILDROOT_CXX=y BR2_DL_DIR="/cache/dl" BR2_CCACHE=y @@ -142,6 +141,7 @@ BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rpi_4_32b" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi4/uboot.config" BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_E2FSPROGS=y +BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_GPTFDISK=y BR2_PACKAGE_HOST_MTOOLS=y BR2_PACKAGE_HOST_RAUC=y diff --git a/buildroot-external/configs/rpi5_64_defconfig b/buildroot-external/configs/rpi5_64_defconfig index a9d1256b8d9..a312282f7ec 100644 --- a/buildroot-external/configs/rpi5_64_defconfig +++ b/buildroot-external/configs/rpi5_64_defconfig @@ -1,6 +1,5 @@ BR2_aarch64=y BR2_cortex_a76=y -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y BR2_TOOLCHAIN_BUILDROOT_CXX=y BR2_DL_DIR="/cache/dl" BR2_CCACHE=y @@ -135,6 +134,7 @@ BR2_TARGET_ROOTFS_SQUASHFS4_LZ4=y # BR2_TARGET_ROOTFS_TAR is not set BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_E2FSPROGS=y +BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_GPTFDISK=y BR2_PACKAGE_HOST_MTOOLS=y BR2_PACKAGE_HOST_RAUC=y diff --git a/buildroot-external/configs/tinker_defconfig b/buildroot-external/configs/tinker_defconfig index 1afce47f3ad..ebb530c3133 100644 --- a/buildroot-external/configs/tinker_defconfig +++ b/buildroot-external/configs/tinker_defconfig @@ -140,6 +140,7 @@ BR2_TARGET_UBOOT_FORMAT_CUSTOM=y BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-rockchip.bin" BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_E2FSPROGS=y +BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_GPTFDISK=y BR2_PACKAGE_HOST_MTOOLS=y BR2_PACKAGE_HOST_RAUC=y diff --git a/buildroot-external/configs/yellow_defconfig b/buildroot-external/configs/yellow_defconfig index 3ab1d0c06bb..c553cf8e2cd 100644 --- a/buildroot-external/configs/yellow_defconfig +++ b/buildroot-external/configs/yellow_defconfig @@ -1,6 +1,5 @@ BR2_aarch64=y BR2_cortex_a72=y -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y BR2_TOOLCHAIN_BUILDROOT_CXX=y BR2_DL_DIR="/cache/dl" BR2_CCACHE=y @@ -145,6 +144,7 @@ BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rpi_4" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/yellow/uboot.config" BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_E2FSPROGS=y +BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_GPTFDISK=y BR2_PACKAGE_HOST_MTOOLS=y BR2_PACKAGE_HOST_RAUC=y diff --git a/buildroot-external/genimage/genimage.cfg b/buildroot-external/genimage/genimage.cfg new file mode 100644 index 00000000000..fcd29a773af --- /dev/null +++ b/buildroot-external/genimage/genimage.cfg @@ -0,0 +1,15 @@ +include("images-os.cfg") + +image "${IMAGE_NAME}.img" { + size = "${DISK_SIZE:-2G}" + + include("hdimage-${PARTITION_TABLE_TYPE}.cfg") + + include("partition-spl-${BOOT_SPL_TYPE}.cfg") + + include("partitions-os-${PARTITION_TABLE_TYPE}.cfg") +} + +image "${IMAGE_NAME}.raucb" { + include("image-raucb-${BOOT_SPL_TYPE}.cfg") +} diff --git a/buildroot-external/genimage/hdimage-gpt.cfg b/buildroot-external/genimage/hdimage-gpt.cfg new file mode 100644 index 00000000000..2cfe6af76c8 --- /dev/null +++ b/buildroot-external/genimage/hdimage-gpt.cfg @@ -0,0 +1,4 @@ +hdimage { + partition-table-type = "gpt" + align = 1M +} diff --git a/buildroot-external/genimage/hdimage-hybrid.cfg b/buildroot-external/genimage/hdimage-hybrid.cfg new file mode 100644 index 00000000000..d9d14b44fea --- /dev/null +++ b/buildroot-external/genimage/hdimage-hybrid.cfg @@ -0,0 +1,4 @@ +hdimage { + partition-table-type = "hybrid" + align = 1M +} diff --git a/buildroot-external/genimage/hdimage-mbr.cfg b/buildroot-external/genimage/hdimage-mbr.cfg new file mode 100644 index 00000000000..69db2cc0a95 --- /dev/null +++ b/buildroot-external/genimage/hdimage-mbr.cfg @@ -0,0 +1,6 @@ +hdimage { + partition-table-type = "mbr" + align = 1M + disk-signature = 0x48617373 + extended-partition = 2 +} diff --git a/buildroot-external/genimage/image-raucb-nospl.cfg b/buildroot-external/genimage/image-raucb-nospl.cfg new file mode 100644 index 00000000000..57697fb83a5 --- /dev/null +++ b/buildroot-external/genimage/image-raucb-nospl.cfg @@ -0,0 +1,10 @@ +rauc { + key = "/build/key.pem" + cert = "/build/cert.pem" + keyring = "${TARGET_DIR}/etc/rauc/keyring.pem" + manifest = "${RAUC_MANIFEST:-PLEASE_SPECIFY_RAUC_MANIFEST}" + file hook { image = "${BR2_EXTERNAL_HASSOS_PATH}/ota/rauc-hook" } + file boot.vfat { image = "boot.vfat" } + file kernel.img { image = "kernel.img" } + file rootfs.img { image = "rootfs.squashfs" } +} diff --git a/buildroot-external/genimage/image-raucb-spl.cfg b/buildroot-external/genimage/image-raucb-spl.cfg new file mode 100644 index 00000000000..474497b7dbd --- /dev/null +++ b/buildroot-external/genimage/image-raucb-spl.cfg @@ -0,0 +1,11 @@ +rauc { + key = "/build/key.pem" + cert = "/build/cert.pem" + keyring = "${TARGET_DIR}/etc/rauc/keyring.pem" + manifest = "${RAUC_MANIFEST:-PLEASE_SPECIFY_RAUC_MANIFEST}" + file hook { image = "${BR2_EXTERNAL_HASSOS_PATH}/ota/rauc-hook" } + file spl.img { image = "spl.img" } + file boot.vfat { image = "boot.vfat" } + file kernel.img { image = "kernel.img" } + file rootfs.img { image = "rootfs.squashfs" } +} diff --git a/buildroot-external/genimage/image-spl-nospl.cfg b/buildroot-external/genimage/image-spl-nospl.cfg new file mode 100644 index 00000000000..636bc1a8abf --- /dev/null +++ b/buildroot-external/genimage/image-spl-nospl.cfg @@ -0,0 +1 @@ +# intentionally empty diff --git a/buildroot-external/genimage/images-boot.cfg b/buildroot-external/genimage/images-boot.cfg new file mode 100644 index 00000000000..04d48197e27 --- /dev/null +++ b/buildroot-external/genimage/images-boot.cfg @@ -0,0 +1,9 @@ +image boot.vfat { + size = ${BOOT_SIZE:-PLEASE_SPECIFY_BOOT_SIZE} + + vfat { + label = "hassos-boot" + } +} + +include("image-spl-${BOOT_SPL_TYPE}.cfg") diff --git a/buildroot-external/genimage/images-os.cfg b/buildroot-external/genimage/images-os.cfg new file mode 100644 index 00000000000..7a1eaeb8727 --- /dev/null +++ b/buildroot-external/genimage/images-os.cfg @@ -0,0 +1,19 @@ +image kernel.img { + size = ${KERNEL_SIZE} + srcpath = "${BINARIES_DIR:-PLEASE_SPECIFY_BINARIES_DIR}/${KERNEL_FILE:-PLEASE_SPECIFY_KERNEL_FILE}" + + squashfs { + compression = "lzo" + } +} + +image overlay.ext4 { + size = ${OVERLAY_SIZE} + empty = "yes" + + ext4 { + use-mke2fs = "yes" + label = "hassos-overlay" + extraargs = "-I 256 -E lazy_itable_init=0,lazy_journal_init=0" + } +} diff --git a/buildroot-external/genimage/partition-gptboot-gpt.cfg b/buildroot-external/genimage/partition-gptboot-gpt.cfg new file mode 100644 index 00000000000..872266c417e --- /dev/null +++ b/buildroot-external/genimage/partition-gptboot-gpt.cfg @@ -0,0 +1,6 @@ +partition hassos-boot { + size = ${BOOT_SIZE} + partition-type-uuid = "esp" + partition-uuid = "b3dd0952-733c-4c88-8cba-cab9b8b4377f" + image = "boot.vfat" +} diff --git a/buildroot-external/genimage/partition-gptboot-hybrid.cfg b/buildroot-external/genimage/partition-gptboot-hybrid.cfg new file mode 100644 index 00000000000..27b2ede6bde --- /dev/null +++ b/buildroot-external/genimage/partition-gptboot-hybrid.cfg @@ -0,0 +1,8 @@ +partition hassos-boot { + size = ${BOOT_SIZE} + partition-type = 0xc + # partition-type-uuid = "e3c9e316-0b5c-4db8-817d-f92df00215ae" # Microsoft reserved partition + partition-type-uuid = "esp" + partition-uuid = "b3dd0952-733c-4c88-8cba-cab9b8b4377f" + image = "boot.vfat" +} diff --git a/buildroot-external/genimage/partition-spl-nospl.cfg b/buildroot-external/genimage/partition-spl-nospl.cfg new file mode 100644 index 00000000000..636bc1a8abf --- /dev/null +++ b/buildroot-external/genimage/partition-spl-nospl.cfg @@ -0,0 +1 @@ +# intentionally empty diff --git a/buildroot-external/genimage/partitions-os-gpt.cfg b/buildroot-external/genimage/partitions-os-gpt.cfg new file mode 100644 index 00000000000..e3ba0cef2f0 --- /dev/null +++ b/buildroot-external/genimage/partitions-os-gpt.cfg @@ -0,0 +1,47 @@ +include("partition-gptboot-${PARTITION_TABLE_TYPE}.cfg") + +partition hassos-kernel0 { + partition-type-uuid = "linux" + partition-uuid = "26700fc6-b0bc-4ccf-9837-ea1a4cba3e65" + size = ${KERNEL_SIZE} + image = "kernel.img" +} + +partition hassos-system0 { + partition-type-uuid = "linux" + partition-uuid = "8d3d53e3-6d49-4c38-8349-aff6859e82fd" + size = ${SYSTEM_SIZE} + image = "rootfs.squashfs" +} + +partition hassos-kernel1 { + partition-type-uuid = "linux" + partition-uuid = "fc02a4f0-5350-406f-93a2-56cbed636b5f" + size = ${KERNEL_SIZE} +} + +partition hassos-system1 { + partition-type-uuid = "linux" + partition-uuid = "a3ec664e-32ce-4665-95ea-7ae90ce9aa20" + size = ${SYSTEM_SIZE} +} + +partition hassos-bootstate { + partition-type-uuid = "linux" + partition-uuid = "33236519-7f32-4dff-8002-3390b62c309d" + size = ${BOOTSTATE_SIZE} +} + +partition hassos-overlay { + partition-type-uuid = "linux" + partition-uuid = "f1326040-5236-40eb-b683-aaa100a9afcf" + size = ${OVERLAY_SIZE} + image = "overlay.ext4" +} + +partition hassos-data { + partition-type-uuid = "linux" + partition-uuid = "a52a4597-fa3a-4851-aefd-2fbe9f849079" + size = ${DATA_SIZE} + image = "data.ext4" +} diff --git a/buildroot-external/genimage/partitions-os-hybrid.cfg b/buildroot-external/genimage/partitions-os-hybrid.cfg new file mode 120000 index 00000000000..8380e68c23e --- /dev/null +++ b/buildroot-external/genimage/partitions-os-hybrid.cfg @@ -0,0 +1 @@ +partitions-os-gpt.cfg \ No newline at end of file diff --git a/buildroot-external/genimage/partitions-os-mbr.cfg b/buildroot-external/genimage/partitions-os-mbr.cfg new file mode 100644 index 00000000000..f0afe13330f --- /dev/null +++ b/buildroot-external/genimage/partitions-os-mbr.cfg @@ -0,0 +1,47 @@ +partition hassos-boot { + size = ${BOOT_SIZE} + partition-type = 0xc + bootable = "yes" + image = "boot.vfat" +} + +partition hassos-kernel0 { + partition-type = 0x83 + size = ${KERNEL_SIZE} + image = "kernel.img" +} + +partition hassos-system0 { + partition-type = 0x83 + size = ${SYSTEM_SIZE} + image = "rootfs.squashfs" +} + +partition hassos-kernel1 { + partition-type = 0x83 + size = ${KERNEL_SIZE} +} + +partition hassos-system1 { + partition-type = 0x83 + size = ${SYSTEM_SIZE} +} + +partition hassos-bootstate { + partition-type = 0x83 + size = ${BOOTSTATE_SIZE} +} + +partition hassos-overlay { + partition-type = 0x83 + size = ${OVERLAY_SIZE} + image = "overlay.ext4" + forced-primary = "yes" +} + +partition hassos-data { + partition-type = 0x83 + size = ${DATA_SIZE} + image = "data.ext4" + forced-primary = "yes" +} diff --git a/buildroot-external/ota/system.conf.gtpl b/buildroot-external/ota/system.conf.gtpl index eb866ffefce..4d15e371c44 100644 --- a/buildroot-external/ota/system.conf.gtpl +++ b/buildroot-external/ota/system.conf.gtpl @@ -8,11 +8,7 @@ bootloader=custom bootloader={{ env "BOOTLOADER" }} {{- end }} {{- if eq (env "BOOTLOADER") "grub" }} -{{- if eq (env "BOOT_SYS") "efi" }} grubenv=/mnt/boot/EFI/BOOT/grubenv -{{- else }} -grubenv=/mnt/boot/grubenv -{{- end }} {{- end }} {{- if eq (env "BOOTLOADER") "tryboot" }} diff --git a/buildroot-external/patches/genimage/0001-image-hd-add-forced-primary-flag-for-higher-MBR-layo.patch b/buildroot-external/patches/genimage/0001-image-hd-add-forced-primary-flag-for-higher-MBR-layo.patch new file mode 100644 index 00000000000..cf544e6c6be --- /dev/null +++ b/buildroot-external/patches/genimage/0001-image-hd-add-forced-primary-flag-for-higher-MBR-layo.patch @@ -0,0 +1,598 @@ +From 90f09d1766dfaad29f1c19c39f6b4b7a8483a86e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= +Date: Tue, 28 May 2024 15:49:32 +0200 +Subject: [PATCH] image-hd: add forced-primary flag for higher MBR layout + flexibility +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The current limitation of Genimage is that it is not able to create +MBR images that have primary partitions that start after a logical +partition. This can be useful for images that can be later resized based +on the actual device size - for this operation the partition must be at +the end of the device, and if it is present in a logical partition, it +must be resized first, making it a two-step process. + +This commit adds the "forced-primary" flag which can be used to indicate +that the partition should be put into the disk's MBR instead of creating +another logical partition. Validation ensures that this syntax allows to +create such partitions only after an existing logical partition, and +that the maximum number of MBR entries woudn't be exceeded by doing so. + +Test cases for valid and invalid configuiration has been added. Also +added few more details in the debug print to make it more obvious how +the MBR/EBR layout looks like. + +Signed-off-by: Jan Čermák +Upstream: https://github.com/pengutronix/genimage/pull/248 +--- + README.rst | 5 ++ + genimage.c | 2 + + genimage.h | 3 +- + image-hd.c | 116 +++++++++++++++++++---------- + test/hdimage-fail10.config | 33 ++++++++ + test/hdimage-fail11.config | 32 ++++++++ + test/hdimage-fail8.config | 28 +++++++ + test/hdimage-fail9.config | 27 +++++++ + test/hdimage-forced-primary.config | 47 ++++++++++++ + test/hdimage-forced-primary.fdisk | 10 +++ + test/hdimage.test | 14 +++- + 11 files changed, 275 insertions(+), 42 deletions(-) + create mode 100644 test/hdimage-fail10.config + create mode 100644 test/hdimage-fail11.config + create mode 100644 test/hdimage-fail8.config + create mode 100644 test/hdimage-fail9.config + create mode 100644 test/hdimage-forced-primary.config + create mode 100644 test/hdimage-forced-primary.fdisk + +diff --git a/README.rst b/README.rst +index d908ff5..7e2a0c5 100644 +--- a/README.rst ++++ b/README.rst +@@ -131,6 +131,11 @@ Partition options: + :bootable: Boolean specifying whether to set the bootable flag. + :in-partition-table: Boolean specifying whether to include this partition in + the partition table. Defaults to true. ++:forced-primary: Force this partition to be a primary partition in the ++ MBR partition table, useful when the extended partition should be ++ followed by primary partitions. If there are more partitions ++ defined after the first forced-primary, they must be also defined ++ as forced-primary. Defaults to false. + :partition-uuid: UUID string used by GPT partition tables to specify the partition + id. Defaults to a random value. + :partition-type-uuid: String used by GPT partition tables to specify the partition type. +diff --git a/genimage.c b/genimage.c +index 5bd235b..2fa9fa2 100644 +--- a/genimage.c ++++ b/genimage.c +@@ -96,6 +96,7 @@ static cfg_opt_t partition_opts[] = { + CFG_STR("align", NULL, CFGF_NONE), + CFG_INT("partition-type", 0, CFGF_NONE), + CFG_BOOL("bootable", cfg_false, CFGF_NONE), ++ CFG_BOOL("forced-primary", cfg_false, CFGF_NONE), + CFG_BOOL("read-only", cfg_false, CFGF_NONE), + CFG_BOOL("hidden", cfg_false, CFGF_NONE), + CFG_BOOL("no-automount", cfg_false, CFGF_NONE), +@@ -396,6 +397,7 @@ static int parse_partitions(struct image *image, cfg_t *imagesec) + part->align = cfg_getint_suffix(partsec, "align"); + part->partition_type = cfg_getint(partsec, "partition-type"); + part->bootable = cfg_getbool(partsec, "bootable"); ++ part->forced_primary = cfg_getbool(partsec, "forced-primary"); + part->read_only = cfg_getbool(partsec, "read-only"); + part->hidden = cfg_getbool(partsec, "hidden"); + part->no_automount = cfg_getbool(partsec, "no-automount"); +diff --git a/genimage.h b/genimage.h +index 8c86e77..b630984 100644 +--- a/genimage.h ++++ b/genimage.h +@@ -39,7 +39,8 @@ struct partition { + unsigned long long align; + unsigned char partition_type; + cfg_bool_t bootable; +- cfg_bool_t extended; ++ cfg_bool_t logical; ++ cfg_bool_t forced_primary; + cfg_bool_t read_only; + cfg_bool_t hidden; + cfg_bool_t no_automount; +diff --git a/image-hd.c b/image-hd.c +index 4ea55b6..6fb850f 100644 +--- a/image-hd.c ++++ b/image-hd.c +@@ -35,10 +35,12 @@ + #define TYPE_GPT 2 + #define TYPE_HYBRID (TYPE_MBR|TYPE_GPT) + ++#define PARTITION_TYPE_EXTENDED 0x0F ++ + struct hdimage { +- unsigned int extended_partition; ++ unsigned int extended_partition_index; ++ struct partition *extended_partition; + unsigned long long align; +- unsigned long long extended_lba; + uint32_t disksig; + const char *disk_uuid; + int table_type; +@@ -151,32 +153,24 @@ static int hdimage_insert_mbr(struct image *image, struct list_head *partitions) + list_for_each_entry(part, partitions, list) { + struct mbr_partition_entry *entry; + +- if (!part->in_partition_table) ++ if (!part->in_partition_table || part->logical) + continue; + + if (hd->table_type == TYPE_HYBRID && !part->partition_type) + continue; + +- if (hd->table_type == TYPE_HYBRID && part->extended) +- continue; +- + entry = &mbr.part_entry[i]; + + entry->boot = part->bootable ? 0x80 : 0x00; +- if (!part->extended) { +- entry->partition_type = part->partition_type; +- entry->relative_sectors = part->offset/512; +- entry->total_sectors = part->size/512; +- } +- else { +- entry->partition_type = 0x0F; +- entry->relative_sectors = (hd->extended_lba)/512; +- entry->total_sectors = (image->size - hd->extended_lba)/512; +- } ++ entry->partition_type = part->partition_type; ++ entry->relative_sectors = part->offset/512; ++ entry->total_sectors = part->size/512; + hdimage_setup_chs(entry); + +- if (part->extended) +- break; ++ image_debug(image, "[MBR entry %d]: type=%x start=%d size=%d\n", ++ i, entry->partition_type, ++ entry->relative_sectors, entry->total_sectors); ++ + i++; + } + +@@ -215,8 +209,9 @@ static int hdimage_insert_ebr(struct image *image, struct partition *part) + struct mbr_partition_entry *entry; + char ebr[4*sizeof(struct mbr_partition_entry)+2], *part_table; + int ret; ++ unsigned long long ebr_offset = part->offset - hd->align + 446; + +- image_info(image, "writing EBR\n"); ++ image_debug(image, "writing EBR to sector %llu\n", ebr_offset / 512); + + memset(ebr, 0, sizeof(ebr)); + part_table = ebr; +@@ -229,12 +224,12 @@ static int hdimage_insert_ebr(struct image *image, struct partition *part) + hdimage_setup_chs(entry); + struct partition *p = part; + list_for_each_entry_continue(p, &image->partitions, list) { +- if (!p->extended) ++ if (!p->logical) + continue; + ++entry; + entry->boot = 0x00; +- entry->partition_type = 0x0F; +- entry->relative_sectors = (p->offset - hd->align - hd->extended_lba)/512; ++ entry->partition_type = PARTITION_TYPE_EXTENDED; ++ entry->relative_sectors = (p->offset - hd->align - hd->extended_partition->offset)/512; + entry->total_sectors = (p->size + hd->align)/512; + hdimage_setup_chs(entry); + break; +@@ -245,7 +240,7 @@ static int hdimage_insert_ebr(struct image *image, struct partition *part) + part_table[1] = 0xaa; + + ret = insert_data(image, ebr, imageoutfile(image), sizeof(ebr), +- part->offset - hd->align + 446); ++ ebr_offset); + if (ret) { + image_error(image, "failed to write EBR\n"); + return ret; +@@ -577,13 +572,15 @@ static int hdimage_generate(struct image *image) + list_for_each_entry(part, &image->partitions, list) { + struct image *child; + +- image_info(image, "adding partition '%s'%s%s%s%s ...\n", part->name, ++ image_info(image, "adding %s partition '%s'%s%s%s%s ...\n", ++ part->logical ? "logical" : "primary", ++ part->name, + part->in_partition_table ? " (in MBR)" : "", + part->image ? " from '": "", + part->image ? part->image : "", + part->image ? "'" : ""); + +- if (part->extended) { ++ if (part->logical) { + ret = hdimage_insert_ebr(image, part); + if (ret) { + image_error(image, "failed to write EBR\n"); +@@ -756,13 +753,14 @@ static int hdimage_setup(struct image *image, cfg_t *cfg) + struct partition *autoresize_part = NULL; + int has_extended; + unsigned int partition_table_entries = 0, hybrid_entries = 0; ++ unsigned int mbr_entries = 0, forced_primary_entries = 0; + unsigned long long now = 0; + const char *disk_signature, *table_type; + struct hdimage *hd = xzalloc(sizeof(*hd)); + struct partition *gpt_backup = NULL; + + hd->align = cfg_getint_suffix(cfg, "align"); +- hd->extended_partition = cfg_getint(cfg, "extended-partition"); ++ hd->extended_partition_index = cfg_getint(cfg, "extended-partition"); + disk_signature = cfg_getstr(cfg, "disk-signature"); + table_type = cfg_getstr(cfg, "partition-table-type"); + hd->gpt_location = cfg_getint_suffix(cfg, "gpt-location"); +@@ -809,10 +807,10 @@ static int hdimage_setup(struct image *image, cfg_t *cfg) + if (!hd->align) + hd->align = hd->table_type == TYPE_NONE ? 1 : 512; + +- if (hd->extended_partition > 4) { ++ if (hd->extended_partition_index > 4) { + image_error(image, "invalid extended partition index (%i). must be " + "inferior or equal to 4 (0 for automatic)\n", +- hd->extended_partition); ++ hd->extended_partition_index); + return -EINVAL; + } + +@@ -821,11 +819,41 @@ static int hdimage_setup(struct image *image, cfg_t *cfg) + "multiple of 1 sector (512 bytes)\n", hd->align); + return -EINVAL; + } ++ if (hd->table_type == TYPE_MBR && hd->extended_partition_index) ++ mbr_entries = hd->extended_partition_index; ++ ++ has_extended = hd->extended_partition_index > 0; ++ + list_for_each_entry(part, &image->partitions, list) { + if (hd->table_type == TYPE_NONE) + part->in_partition_table = false; + if (part->in_partition_table) + ++partition_table_entries; ++ if (hd->table_type == TYPE_MBR && part->in_partition_table) { ++ if (!hd->extended_partition_index && partition_table_entries > 4) { ++ hd->extended_partition_index = mbr_entries = 4; ++ has_extended = true; ++ } ++ if (part->forced_primary) { ++ ++forced_primary_entries; ++ ++mbr_entries; ++ if (partition_table_entries <= hd->extended_partition_index) { ++ image_error(image, "partition %s: forced-primary can only be used for " ++ "partitions following the extended partition\n", ++ part->name); ++ return -EINVAL; ++ } ++ } else if (forced_primary_entries > 0) { ++ image_error(image, ++ "cannot create non-primary partition %s after forced-primary partition\n", ++ part->name); ++ return -EINVAL; ++ } ++ if (mbr_entries > 4) { ++ image_error(image, "too many primary partitions\n"); ++ return -EINVAL; ++ } ++ } + if (!part->align) + part->align = (part->in_partition_table || hd->table_type == TYPE_NONE) ? hd->align : 1; + if (part->in_partition_table && part->align % hd->align) { +@@ -834,10 +862,6 @@ static int hdimage_setup(struct image *image, cfg_t *cfg) + part->align, part->name, hd->align); + } + } +- if (hd->table_type == TYPE_MBR && !hd->extended_partition && +- partition_table_entries > 4) +- hd->extended_partition = 4; +- has_extended = hd->extended_partition > 0; + + if (hd->disk_uuid) { + if (!(hd->table_type & TYPE_GPT)) { +@@ -958,12 +982,12 @@ static int hdimage_setup(struct image *image, cfg_t *cfg) + if (part->partition_type) + ++hybrid_entries; + } +- /* reserve space for extended boot record if necessary */ + if (part->in_partition_table) + ++partition_table_entries; +- part->extended = has_extended && part->in_partition_table && +- (partition_table_entries >= hd->extended_partition); +- if (part->extended) { ++ part->logical = !part->forced_primary && has_extended && part->in_partition_table && ++ (partition_table_entries >= hd->extended_partition_index); ++ if (part->logical) { ++ /* reserve space for extended boot record */ + now += hd->align; + now = roundup(now, part->align); + } +@@ -978,8 +1002,6 @@ static int hdimage_setup(struct image *image, cfg_t *cfg) + if (!part->offset && (part->in_partition_table || hd->table_type == TYPE_NONE)) { + part->offset = roundup(now, part->align); + } +- if (part->extended && !hd->extended_lba) +- hd->extended_lba = part->offset - hd->align; + + if (part->offset % part->align) { + image_error(image, "part %s offset (%lld) must be a" +@@ -1027,7 +1049,7 @@ static int hdimage_setup(struct image *image, cfg_t *cfg) + part->name); + return -EINVAL; + } +- if (!part->extended) { ++ if (!part->logical) { + int ret = check_overlap(image, part); + if (ret) + return ret; +@@ -1051,8 +1073,22 @@ static int hdimage_setup(struct image *image, cfg_t *cfg) + hd->file_size = part->offset + child->size; + } + } +- else if (part->extended) ++ else if (part->logical) + hd->file_size = part->offset - hd->align + 512; ++ ++ if (has_extended && hd->extended_partition_index == partition_table_entries) { ++ struct partition *p = fake_partition("[Extended]", now - hd->align - part->size, ++ 0); ++ p->in_partition_table = true; ++ p->partition_type = PARTITION_TYPE_EXTENDED; ++ ++ hd->extended_partition = p; ++ list_add_tail(&p->list, &part->list); ++ } ++ ++ if (part->logical) { ++ hd->extended_partition->size = now - hd->extended_partition->offset; ++ } + } + + if (hybrid_entries > 3) { +diff --git a/test/hdimage-fail10.config b/test/hdimage-fail10.config +new file mode 100644 +index 0000000..782c090 +--- /dev/null ++++ b/test/hdimage-fail10.config +@@ -0,0 +1,33 @@ ++image test.hdimage { ++ hdimage { ++ align = 1M ++ extended-partition = 3 ++ } ++ partition primary1 { ++ image = "part1.img" ++ partition-type = 0x83 ++ } ++ partition primary2 { ++ image = "part1.img" ++ partition-type = 0x83 ++ } ++ partition extended1 { ++ image = "part1.img" ++ partition-type = 0x83 ++ } ++ partition extended2 { ++ image = "part1.img" ++ partition-type = 0x83 ++ } ++ partition primary3 { ++ image = "part1.img" ++ partition-type = 0x83 ++ forced-primary = "yes" ++ } ++ partition primary4 { ++ image = "part1.img" ++ partition-type = 0x83 ++ /* would be 5th primary partition */ ++ forced-primary = "yes" ++ } ++} +diff --git a/test/hdimage-fail11.config b/test/hdimage-fail11.config +new file mode 100644 +index 0000000..06bf64b +--- /dev/null ++++ b/test/hdimage-fail11.config +@@ -0,0 +1,32 @@ ++image test.hdimage { ++ hdimage { ++ align = 1M ++ extended-partition = 1 ++ } ++ partition extended1 { ++ image = "part1.img" ++ partition-type = 0x83 ++ } ++ partition extended2 { ++ image = "part1.img" ++ partition-type = 0x83 ++ } ++ partition extended3 { ++ image = "part1.img" ++ partition-type = 0x83 ++ } ++ partition extended4 { ++ image = "part1.img" ++ partition-type = 0x83 ++ } ++ partition primary2 { ++ image = "part1.img" ++ partition-type = 0x83 ++ forced-primary = "yes" ++ } ++ partition extended5 { ++ image = "part1.img" ++ partition-type = 0x83 ++ /* extended partition would overlap the forced-primary one */ ++ } ++} +diff --git a/test/hdimage-fail8.config b/test/hdimage-fail8.config +new file mode 100644 +index 0000000..8f55faa +--- /dev/null ++++ b/test/hdimage-fail8.config +@@ -0,0 +1,28 @@ ++image test.hdimage { ++ hdimage { ++ align = 1M ++ extended-partition = 1 ++ } ++ partition part1 { ++ image = "part1.img" ++ partition-type = 0x83 ++ forced-primary = "yes" ++ /* forced-primary can be only used for partitions defined after the extended partition */ ++ } ++ partition part2 { ++ image = "part1.img" ++ partition-type = 0x83 ++ } ++ partition part3 { ++ image = "part1.img" ++ partition-type = 0x83 ++ } ++ partition part4 { ++ image = "part1.img" ++ partition-type = 0x83 ++ } ++ partition part5 { ++ image = "part1.img" ++ partition-type = 0x83 ++ } ++} +diff --git a/test/hdimage-fail9.config b/test/hdimage-fail9.config +new file mode 100644 +index 0000000..d811b7b +--- /dev/null ++++ b/test/hdimage-fail9.config +@@ -0,0 +1,27 @@ ++image test.hdimage { ++ hdimage { ++ align = 1M ++ } ++ partition primary1 { ++ image = "part1.img" ++ partition-type = 0x83 ++ } ++ partition primary2 { ++ image = "part1.img" ++ partition-type = 0x83 ++ } ++ partition primary3 { ++ image = "part1.img" ++ partition-type = 0x83 ++ } ++ partition primary4 { ++ image = "part1.img" ++ partition-type = 0x83 ++ } ++ partition primary5 { ++ image = "part1.img" ++ partition-type = 0x83 ++ /* part4 is implicitly extended -> too many primary entries */ ++ forced-primary = "yes" ++ } ++} +diff --git a/test/hdimage-forced-primary.config b/test/hdimage-forced-primary.config +new file mode 100644 +index 0000000..c15b3a5 +--- /dev/null ++++ b/test/hdimage-forced-primary.config +@@ -0,0 +1,47 @@ ++image test.hdimage { ++ hdimage { ++ align = 1M ++ disk-signature = 0x12345678 ++ extended-partition = 2 ++ } ++ partition part1 { ++ image = "part1.img" ++ partition-type = 0xc ++ bootable = "yes" ++ } ++ /* ++ * partition 2 will be the extended partition entry ++ * partitions 3-4 will be primary partitions at the end ++ * partition 5 is first logical partition of the extended partition ++ */ ++ partition part5-logical { ++ image = "part1.img" ++ partition-type = 0x83 ++ } ++ partition part6-logical { ++ image = "part2.img" ++ partition-type = 0x83 ++ } ++ partition part7-logical { ++ image = "part1.img" ++ partition-type = 0x83 ++ } ++ partition part8-logical { ++ image = "part2.img" ++ partition-type = 0x83 ++ } ++ partition part9-logical { ++ image = "part1.img" ++ partition-type = 0x83 ++ } ++ partition part3 { ++ image = "part1.img" ++ partition-type = 0x83 ++ forced-primary = "yes" ++ } ++ partition part4 { ++ image = "part2.img" ++ partition-type = 0x82 ++ forced-primary = "yes" ++ } ++} +diff --git a/test/hdimage-forced-primary.fdisk b/test/hdimage-forced-primary.fdisk +new file mode 100644 +index 0000000..ff0e903 +--- /dev/null ++++ b/test/hdimage-forced-primary.fdisk +@@ -0,0 +1,10 @@ ++Disk identifier: 0x12345678 ++images/test.hdimage1:start=2048,size=2048,type=c,bootable ++images/test.hdimage2:start=4096,size=20480,type=f ++images/test.hdimage3:start=24576,size=2048,type=83 ++images/test.hdimage4:start=26624,size=2048,type=82 ++images/test.hdimage5:start=6144,size=2048,type=83 ++images/test.hdimage6:start=10240,size=2048,type=83 ++images/test.hdimage7:start=14336,size=2048,type=83 ++images/test.hdimage8:start=18432,size=2048,type=83 ++images/test.hdimage9:start=22528,size=2048,type=83 +diff --git a/test/hdimage.test b/test/hdimage.test +index c284613..a81c3f1 100755 +--- a/test/hdimage.test ++++ b/test/hdimage.test +@@ -96,7 +96,11 @@ test_expect_success "hdimage syntax" " + test_must_fail run_genimage hdimage-fail4.config && + test_must_fail run_genimage hdimage-fail5.config && + test_must_fail run_genimage hdimage-fail6.config && +- test_must_fail run_genimage hdimage-fail7.config ++ test_must_fail run_genimage hdimage-fail7.config && ++ test_must_fail run_genimage hdimage-fail8.config && ++ test_must_fail run_genimage hdimage-fail9.config && ++ test_must_fail run_genimage hdimage-fail10.config && ++ test_must_fail run_genimage hdimage-fail11.config + " + + setup_gpt_files() { +@@ -163,6 +167,14 @@ test_expect_success "hdimage no-partition" " + test_cmp 'hdimage-nopart.hexdump' '${testdir}/hdimage-nopart.hexdump' + " + ++test_expect_success "hdimage forced-primary" " ++ setup_test_images && ++ run_genimage hdimage-forced-primary.config && ++ sfdisk_validate images/test.hdimage && ++ sanitized_fdisk_sfdisk images/test.hdimage > hdimage.fdisk && ++ test_cmp '${testdir}/hdimage-forced-primary.fdisk' hdimage.fdisk ++" ++ + test_done + + # vim: syntax=sh diff --git a/buildroot-external/scripts/hdd-image.sh b/buildroot-external/scripts/hdd-image.sh index 48cbc05d7d5..dcf625067e7 100755 --- a/buildroot-external/scripts/hdd-image.sh +++ b/buildroot-external/scripts/hdd-image.sh @@ -1,14 +1,4 @@ #!/bin/bash -# shellcheck disable=SC2155 - -BOOT_UUID="b3dd0952-733c-4c88-8cba-cab9b8b4377f" -BOOTSTATE_UUID="33236519-7F32-4DFF-8002-3390B62C309D" -SYSTEM0_UUID="8d3d53e3-6d49-4c38-8349-aff6859e82fd" -SYSTEM1_UUID="a3ec664e-32ce-4665-95ea-7ae90ce9aa20" -KERNEL0_UUID="26700fc6-b0bc-4ccf-9837-ea1a4cba3e65" -KERNEL1_UUID="fc02a4f0-5350-406f-93a2-56cbed636b5f" -OVERLAY_UUID="f1326040-5236-40eb-b683-aaa100a9afcf" -DATA_UUID="a52a4597-fa3a-4851-aefd-2fbe9f849079" BOOTSTATE_SIZE=8M SYSTEM_SIZE=256M @@ -16,315 +6,55 @@ KERNEL_SIZE=24M OVERLAY_SIZE=96M DATA_SIZE=1280M - -function size2sectors() { - local f=0 - for v in "${@}" - do - local p=$(echo "$v" | awk \ - 'BEGIN{IGNORECASE = 1} - function printsectors(n,b,p) {printf "%u\n", n*b^p/512} - /B$/{ printsectors($1, 1, 0)}; - /K(iB)?$/{printsectors($1, 2, 10)}; - /M(iB)?$/{printsectors($1, 2, 20)}; - /G(iB)?$/{printsectors($1, 2, 30)}; - /T(iB)?$/{printsectors($1, 2, 40)}; - /KB$/{ printsectors($1, 10, 3)}; - /MB$/{ printsectors($1, 10, 6)}; - /GB$/{ printsectors($1, 10, 9)}; - /TB$/{ printsectors($1, 10, 12)}') - for s in $p - do - f=$((f+s)) - done - - done - echo $f -} - - -function _check_image_size() { - local image="${1}" - local max_size="${2}" - - local image_size=$(stat -c %s "${image}") - local image_size_sectors=$((image_size / 512)) - local max_size_sectors=$(size2sectors "${max_size}") - - - if [ "${image_size_sectors}" -gt "${max_size_sectors}" ]; then - echo "Image ${image} is too big: ${image_size_sectors} sectors > ${max_size_sectors} sectors" >&2 - exit 1 - fi -} - - -function get_boot_size() { - # shellcheck disable=SC2153 - echo "${BOOT_SIZE}" -} - - -function create_spl_image() { - local boot_img="$(path_spl_img)" - - rm -f "${boot_img}" - truncate --size="${BOOT_SPL_SIZE}" "${boot_img}" -} - - -function create_boot_image() { - local boot_data="$(path_boot_dir)" - local boot_img="$(path_boot_img)" - - echo "mtools_skip_check=1" > ~/.mtoolsrc - rm -f "${boot_img}" - truncate --size="$(get_boot_size)" "${boot_img}" - mkfs.vfat -n "hassos-boot" "${boot_img}" - mcopy -i "${boot_img}" -sv "${boot_data}"/* :: - - _check_image_size "${boot_img}" "$(get_boot_size)" -} - - -function create_overlay_image() { - local overlay_img="$(path_overlay_img)" - - rm -f "${overlay_img}" - truncate --size="${OVERLAY_SIZE}" "${overlay_img}" - mkfs.ext4 -L "hassos-overlay" -I 256 -E lazy_itable_init=0,lazy_journal_init=0 "${overlay_img}" - - _check_image_size "${overlay_img}" "${OVERLAY_SIZE}" -} - - -function create_kernel_image() { - local kernel_img="$(path_kernel_img)" - # shellcheck disable=SC2153 - local kernel="${BINARIES_DIR}/${KERNEL_FILE}" - - # Make image - rm -f "${kernel_img}" - mksquashfs "${kernel}" "${kernel_img}" -comp lzo - - _check_image_size "${kernel_img}" "${KERNEL_SIZE}" -} - - -function _prepare_disk_image() { - _check_image_size "$(path_data_img)" "${DATA_SIZE}" - _check_image_size "$(path_rootfs_img)" "${SYSTEM_SIZE}" - - create_boot_image - create_overlay_image - create_kernel_image -} - - function create_disk_image() { - _prepare_disk_image - - if [ "${BOOT_SYS}" == "mbr" ]; then - _create_disk_mbr + if [ -f "${BOARD_DIR}/genimage.cfg" ]; then + echo "Using custom genimage.cfg from ${BOARD_DIR}" else - _create_disk_gpt + echo "Using default genimage.cfg" fi -} - - -function _create_disk_gpt() { - local boot_img="$(path_boot_img)" - local rootfs_img="$(path_rootfs_img)" - local overlay_img="$(path_overlay_img)" - local data_img="$(path_data_img)" - local kernel_img="$(path_kernel_img)" - local hdd_img="$(hassos_image_name img)" - local hdd_count=${DISK_SIZE:-2} - - local boot_offset=0 - local rootfs_offset=0 - local kernel_offset=0 - local overlay_offset=0 - local data_offset=0 - ## - # Write new image & GPT - rm -f "${hdd_img}" - truncate --size="${hdd_count}G" "${hdd_img}" - sgdisk -o "${hdd_img}" - - ## - # Partition layout - - # boot - boot_offset="$(sgdisk -F "${hdd_img}")" - if [ "${BOOT_SPL}" == "true" ]; then - # Make sure boot partition is shifted by SPL size - boot_offset=$((boot_offset+$(size2sectors "${BOOT_SPL_SIZE}"))) - fi - if [ "${BOARD_ID}" == "odroid-m1" ] || [ "${BOARD_ID}" == "odroid-m1s" ]; then - # Create partition for U-Boot binary (required by Hardkernel SPL to boot - # using default petitboot SPI - sgdisk -n "0:16384:+8M" -c 0:"uboot" -t 0:"21686148-6449-6E6F-744E-656564454649" "${hdd_img}" - fi - sgdisk -n "0:${boot_offset}:+$(get_boot_size)" -c 0:"hassos-boot" -t 0:"C12A7328-F81F-11D2-BA4B-00A0C93EC93B" -u 0:${BOOT_UUID} "${hdd_img}" - - # Kernel 0 - kernel_offset="$(sgdisk -F "${hdd_img}")" - sgdisk -n "0:0:+${KERNEL_SIZE}" -c 0:"hassos-kernel0" -t 0:"0FC63DAF-8483-4772-8E79-3D69D8477DE4" -u "0:${KERNEL0_UUID}" "${hdd_img}" - - # System 0 - rootfs_offset="$(sgdisk -F "${hdd_img}")" - sgdisk -n "0:0:+${SYSTEM_SIZE}" -c 0:"hassos-system0" -t 0:"0FC63DAF-8483-4772-8E79-3D69D8477DE4" -u "0:${SYSTEM0_UUID}" "${hdd_img}" - - # Kernel 1 - sgdisk -n "0:0:+${KERNEL_SIZE}" -c 0:"hassos-kernel1" -t 0:"0FC63DAF-8483-4772-8E79-3D69D8477DE4" -u "0:${KERNEL1_UUID}" "${hdd_img}" - - # System 1 - sgdisk -n "0:0:+${SYSTEM_SIZE}" -c 0:"hassos-system1" -t 0:"0FC63DAF-8483-4772-8E79-3D69D8477DE4" -u "0:${SYSTEM1_UUID}" "${hdd_img}" - - # Bootstate - sgdisk -n "0:0:+${BOOTSTATE_SIZE}" -c 0:"hassos-bootstate" -u 0:${BOOTSTATE_UUID} "${hdd_img}" - - # Overlay - overlay_offset="$(sgdisk -F "${hdd_img}")" - sgdisk -n "0:0:+${OVERLAY_SIZE}" -c 0:"hassos-overlay" -t 0:"0FC63DAF-8483-4772-8E79-3D69D8477DE4" -u "0:${OVERLAY_UUID}" "${hdd_img}" - - # Data - data_offset="$(sgdisk -F "${hdd_img}")" - sgdisk -n "0:0:+${DATA_SIZE}" -c 0:"hassos-data" -t 0:"0FC63DAF-8483-4772-8E79-3D69D8477DE4" -u "0:${DATA_UUID}" "${hdd_img}" - - ## - # Write Images - sgdisk -v "${hdd_img}" - dd if="${boot_img}" of"=${hdd_img}" conv=notrunc,sparse bs=512 seek="${boot_offset}" - dd if="${kernel_img}" of="${hdd_img}" conv=notrunc,sparse bs=512 seek="${kernel_offset}" - dd if="${rootfs_img}" of="${hdd_img}" conv=notrunc,sparse bs=512 seek="${rootfs_offset}" - dd if="${overlay_img}" of="${hdd_img}" conv=notrunc,sparse bs=512 seek="${overlay_offset}" - dd if="${data_img}" of="${hdd_img}" conv=notrunc,sparse bs=512 seek="${data_offset}" - - # Set Hyprid partition - if [ "${BOOT_SYS}" == "hybrid" ]; then - _fix_disk_hybrid - fi - - # Write SPL - if [ "${BOOT_SPL}" == "true" ]; then - _fix_disk_spl_gpt - fi + export GENIMAGE_INPUTPATH="${BINARIES_DIR}" + export GENIMAGE_OUTPUTPATH="${BINARIES_DIR}" + export GENIMAGE_TMPPATH="${BUILD_DIR}/genimage.tmp" + + # variables from meta file + export DISK_SIZE BOOTLOADER KERNEL_FILE PARTITION_TABLE_TYPE BOOT_SIZE BOOT_SPL BOOT_SPL_SIZE + # variables used in raucb manifest template + ota_compatible="$(hassos_rauc_compatible)" + ota_version="$(hassos_version)" + export ota_compatible ota_version + # variables used in genimage configs + export BOOTSTATE_SIZE SYSTEM_SIZE KERNEL_SIZE OVERLAY_SIZE DATA_SIZE + RAUC_MANIFEST=$(tempio -template "${BR2_EXTERNAL_HASSOS_PATH}/ota/manifest.raucm.gtpl") + IMAGE_NAME="$(hassos_image_basename)" + BOOT_SPL_TYPE=$(test "$BOOT_SPL" == "true" && echo "spl" || echo "nospl") + export RAUC_MANIFEST IMAGE_NAME BOOT_SPL_TYPE + + trap 'rm -rf "${ROOTPATH_TMP}" "${GENIMAGE_TMPPATH}"' EXIT + ROOTPATH_TMP="$(mktemp -d)" + + rm -rf "${GENIMAGE_TMPPATH}" + # Generate boot FS image - run in a separate step with specific rootpath + genimage \ + --rootpath "$(path_boot_dir)" \ + --configdump - \ + --includepath "${BOARD_DIR}:${BR2_EXTERNAL_HASSOS_PATH}/genimage" \ + --config images-boot.cfg + + rm -rf "${GENIMAGE_TMPPATH}" + # Generate OS image (no files are copied to temporary rootpath here) + genimage \ + --rootpath "${ROOTPATH_TMP}" \ + --configdump - \ + --includepath "${BOARD_DIR}:${BR2_EXTERNAL_HASSOS_PATH}/genimage" } - -function _create_disk_mbr() { - local boot_img="$(path_boot_img)" - local rootfs_img="$(path_rootfs_img)" - local overlay_img="$(path_overlay_img)" - local data_img="$(path_data_img)" - local kernel_img="$(path_kernel_img)" - local hdd_img="$(hassos_image_name img)" - local hdd_count=${DISK_SIZE:-2} - local disk_layout="${BINARIES_DIR}/disk.layout" - - # All boards with MBR disk layout have SPL - local boot_start=$(size2sectors "${BOOT_SPL_SIZE}") - - local boot_size=$(size2sectors "$(get_boot_size)") - local kernel0_size=$(size2sectors "$KERNEL_SIZE") - local system0_size=$(size2sectors "$SYSTEM_SIZE") - local kernel1_size=$(size2sectors "$KERNEL_SIZE") - local system1_size=$(size2sectors "$SYSTEM_SIZE") - local bootstate_size=$(size2sectors "$BOOTSTATE_SIZE") - local overlay_size=$(size2sectors "$OVERLAY_SIZE") - local data_size=$(size2sectors "$DATA_SIZE") - local extended_size=$((kernel0_size+system0_size+kernel1_size+system1_size+bootstate_size+5*$(size2sectors "1M"))) - - # we add one here for the extended header. - local extended_start=$((boot_start+boot_size)) - local kernel0_start=$((extended_start+$(size2sectors "1M"))) - local system0_start=$((kernel0_start+kernel0_size+$(size2sectors "1M"))) - local kernel1_start=$((system0_start+system0_size+$(size2sectors "1M"))) - local system1_start=$((kernel1_start+kernel1_size+$(size2sectors "1M"))) - local bootstate_start=$((system1_start+system1_size+$(size2sectors "1M"))) - local overlay_start=$((extended_start+extended_size+$(size2sectors "1M"))) - local data_start=$((overlay_start+overlay_size+$(size2sectors "1M"))) - - local boot_offset=${boot_start} - local kernel_offset=${kernel0_start} - local rootfs_offset=${system0_start} - local overlay_offset=${overlay_start} - local data_offset=${data_start} - - # Write new image & MBR - rm -f "${hdd_img}" - truncate --size="${hdd_count}G" "${hdd_img}" - - # Update disk layout - ( - echo "label: dos" - echo "label-id: 0x48617373" - echo "unit: sectors" - echo "hassos-boot : start= ${boot_start}, size= ${boot_size}, type=c, bootable" #create the boot partition - echo "hassos-extended : start= ${extended_start}, size= ${extended_size}, type=5" #Make an extended partition - echo "hassos-kernel : start= ${kernel0_start}, size= ${kernel0_size}, type=83" #Make a logical Linux partition - echo "hassos-system : start= ${system0_start}, size= ${system0_size}, type=83" #Make a logical Linux partition - echo "hassos-kernel : start= ${kernel1_start} size= ${kernel1_size}, type=83" #Make a logical Linux partition - echo "hassos-system : start= ${system1_start}, size= ${system1_size}, type=83" #Make a logical Linux partition - echo "hassos-bootstate : start= ${bootstate_start}, size= ${bootstate_size}, type=83" #Make a logical Linux partition - echo "hassos-overlay : start= ${overlay_start}, size= ${overlay_size}, type=83" #Make a Linux partition - echo "hassos-data : start= ${data_start}, size= ${data_size}, type=83" #Make a Linux partition - ) > "${disk_layout}" - - # Update Labels - sfdisk "${hdd_img}" < "${disk_layout}" - - # Write Images - dd if="${boot_img}" of="${hdd_img}" conv=notrunc,sparse bs=512 seek="${boot_offset}" - dd if="${kernel_img}" of="${hdd_img}" conv=notrunc,sparse bs=512 seek="${kernel_offset}" - dd if="${rootfs_img}" of="${hdd_img}" conv=notrunc,sparse bs=512 seek="${rootfs_offset}" - dd if="${overlay_img}" of="${hdd_img}" conv=notrunc,sparse bs=512 seek="${overlay_offset}" - dd if="${data_img}" of="${hdd_img}" conv=notrunc,sparse bs=512 seek="${data_offset}" - - # Write SPL - if [ "${BOOT_SPL}" == "true" ]; then - _fix_disk_spl_mbr - fi -} - - -function _fix_disk_hybrid() { - local hdd_img="$(hassos_image_name img)" - - sgdisk -t 1:"E3C9E316-0B5C-4DB8-817D-F92DF00215AE" "${hdd_img}" - dd if="${BR2_EXTERNAL_HASSOS_PATH}/bootloader/mbr.img" of="${hdd_img}" conv=notrunc bs=512 count=1 -} - - -function _fix_disk_spl_gpt() { - local hdd_img="$(hassos_image_name img)" - local spl_img="$(path_spl_img)" - - sgdisk -t 1:"E3C9E316-0B5C-4DB8-817D-F92DF00215AE" "${hdd_img}" - dd if="${BR2_EXTERNAL_HASSOS_PATH}/bootloader/mbr-spl.img" of="${hdd_img}" conv=notrunc bs=512 count=1 - - # Copy SPL, make sure to not overwrite GPT - dd if="${spl_img}" of="${hdd_img}" conv=notrunc bs=512 seek=64 skip=64 -} - - -function _fix_disk_spl_mbr() { - local hdd_img="$(hassos_image_name img)" - local spl_img="$(path_spl_img)" - - # backup MBR - dd if="${spl_img}" of="${hdd_img}" conv=notrunc bs=1 count=440 - dd if="${spl_img}" of="${hdd_img}" conv=notrunc bs=512 seek=1 skip=1 -} - - function convert_disk_image_virtual() { local hdd_ext="${1}" - local hdd_img="$(hassos_image_name img)" - local hdd_virt="$(hassos_image_name "${hdd_ext}")" + local hdd_img + hdd_img="$(hassos_image_name img)" + local hdd_virt + hdd_virt="$(hassos_image_name "${hdd_ext}")" local -a qemu_img_opts=() if [ "${hdd_ext}" == "vmdk" ]; then @@ -337,8 +67,10 @@ function convert_disk_image_virtual() { } function convert_disk_image_ova() { - local hdd_img="$(hassos_image_name img)" - local hdd_ova="$(hassos_image_name ova)" + local hdd_img + hdd_img="$(hassos_image_name img)" + local hdd_ova + hdd_ova="$(hassos_image_name ova)" local ova_data="${BINARIES_DIR}/ova" mkdir -p "${ova_data}" @@ -352,7 +84,8 @@ function convert_disk_image_ova() { function convert_disk_image_xz() { local hdd_ext=${1:-img} - local hdd_img="$(hassos_image_name "${hdd_ext}")" + local hdd_img + hdd_img="$(hassos_image_name "${hdd_ext}")" rm -f "${hdd_img}.xz" xz -3 -T0 "${hdd_img}" @@ -360,7 +93,8 @@ function convert_disk_image_xz() { function convert_disk_image_zip() { local hdd_ext=${1:-img} - local hdd_img="$(hassos_image_name "${hdd_ext}")" + local hdd_img + hdd_img="$(hassos_image_name "${hdd_ext}")" rm -f "${hdd_img}.zip" zip -j -m -q -r "${hdd_img}.zip" "${hdd_img}" diff --git a/buildroot-external/scripts/name.sh b/buildroot-external/scripts/name.sh index 0867c521280..b6a622d653c 100755 --- a/buildroot-external/scripts/name.sh +++ b/buildroot-external/scripts/name.sh @@ -4,6 +4,10 @@ function hassos_image_name() { echo "${BINARIES_DIR}/${HASSOS_ID}_${BOARD_ID}-$(hassos_version).${1}" } +function hassos_image_basename() { + echo "${BINARIES_DIR}/${HASSOS_ID}_${BOARD_ID}-$(hassos_version)" +} + function hassos_rauc_compatible() { echo "${HASSOS_ID}-${BOARD_ID}" } @@ -16,10 +20,6 @@ function hassos_version() { fi } -function path_spl_img() { - echo "${BINARIES_DIR}/spl.img" -} - function path_kernel_img() { echo "${BINARIES_DIR}/kernel.img" } diff --git a/buildroot-external/scripts/ota.sh b/buildroot-external/scripts/ota.sh deleted file mode 100755 index 2a22254cfc1..00000000000 --- a/buildroot-external/scripts/ota.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -# shellcheck disable=SC2155 - -function create_ota_update() { - local ota_file="$(hassos_image_name raucb)" - local ota_compatible="$(hassos_rauc_compatible)" - local ota_version="$(hassos_version)" - local rauc_folder="${BINARIES_DIR}/rauc" - local boot="${BINARIES_DIR}/boot.vfat" - local kernel="${BINARIES_DIR}/kernel.img" - local rootfs="${BINARIES_DIR}/rootfs.squashfs" - local spl="${BINARIES_DIR}/spl.img" - local key="/build/key.pem" - local cert="/build/cert.pem" - local keyring="${TARGET_DIR}/etc/rauc/keyring.pem" - - # Skip if no dev key is arround - if [ ! -f "${key}" ]; then - echo "Skip creating OTA update because of missing key ${key}" - return 0 - fi - - rm -rf "${rauc_folder}" "${ota_file}" - mkdir -p "${rauc_folder}" - - cp -f "${kernel}" "${rauc_folder}/kernel.img" - cp -f "${boot}" "${rauc_folder}/boot.vfat" - cp -f "${rootfs}" "${rauc_folder}/rootfs.img" - cp -f "${BR2_EXTERNAL_HASSOS_PATH}/ota/rauc-hook" "${rauc_folder}/hook" - - # SPL - if [ "${BOOT_SPL}" == "true" ]; then - cp -f "${spl}" "${rauc_folder}/spl.img" - fi - - export BOOTLOADER BOOT_SPL - export ota_compatible ota_version - ( - "${HOST_DIR}/bin/tempio" \ - -template "${BR2_EXTERNAL_HASSOS_PATH}/ota/manifest.raucm.gtpl" - ) > "${rauc_folder}/manifest.raucm" - - rauc bundle -d --cert="${cert}" --key="${key}" --keyring="${keyring}" "${rauc_folder}" "${ota_file}" -} diff --git a/buildroot-external/scripts/post-image.sh b/buildroot-external/scripts/post-image.sh index b1c174d0dd2..bad8480da8a 100755 --- a/buildroot-external/scripts/post-image.sh +++ b/buildroot-external/scripts/post-image.sh @@ -13,7 +13,6 @@ HOOK_FILE=${3} . "${SCRIPT_DIR}/rootfs-layer.sh" . "${SCRIPT_DIR}/name.sh" . "${SCRIPT_DIR}/rauc.sh" -. "${SCRIPT_DIR}/ota.sh" . "${HOOK_FILE}" # Cleanup @@ -25,7 +24,6 @@ hassos_pre_image # Disk & OTA create_disk_image -create_ota_update # Hook post image build stuff hassos_post_image diff --git a/buildroot-external/scripts/rauc.sh b/buildroot-external/scripts/rauc.sh index a5c23cbf509..a1e5fa594e8 100755 --- a/buildroot-external/scripts/rauc.sh +++ b/buildroot-external/scripts/rauc.sh @@ -20,7 +20,7 @@ function write_rauc_config() { ota_compatible="$(hassos_rauc_compatible)" export ota_compatible - export BOOTLOADER BOOT_SYS BOOT_SPL + export BOOTLOADER PARTITION_TABLE_TYPE BOOT_SPL ( "${HOST_DIR}/bin/tempio" \ @@ -50,13 +50,13 @@ function install_rauc_certs() { function install_bootloader_config() { if [ "${BOOTLOADER}" == "uboot" ]; then - # shellcheck disable=SC1117 + # shellcheck disable=SC1117 echo -e "/dev/disk/by-partlabel/hassos-bootstate\t0x0000\t${BOOT_ENV_SIZE}" > "${TARGET_DIR}/etc/fw_env.config" fi # Fix MBR - if [ "${BOOT_SYS}" == "mbr" ]; then + if [ "${PARTITION_TABLE_TYPE}" == "mbr" ]; then mkdir -p "${TARGET_DIR}/usr/lib/udev/rules.d" - cp -f "${BR2_EXTERNAL_HASSOS_PATH}/bootloader/mbr-part.rules" "${TARGET_DIR}/usr/lib/udev/rules.d/" + cp -f "${BR2_EXTERNAL_HASSOS_PATH}/bootloader/mbr-part.rules" "${TARGET_DIR}/usr/lib/udev/rules.d/" fi } From ae588b762a2d5d596a2e104cea646973defe7e5f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 15:08:18 +0200 Subject: [PATCH 18/27] Bump docker/build-push-action from 5.3.0 to 5.4.0 (#3405) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3b166f4a91b..1b2499515b9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -144,7 +144,7 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and Push - uses: docker/build-push-action@v5.3.0 + uses: docker/build-push-action@v5.4.0 id: build_haos_builder with: context: . From 542f69efa413f40e718785fa02b11dc654dc13ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Mon, 10 Jun 2024 17:14:17 +0200 Subject: [PATCH 19/27] 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 --- buildroot | 2 +- buildroot-external/package/hassio/create-data-partition.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/buildroot b/buildroot index 691077e5773..770f939463d 160000 --- a/buildroot +++ b/buildroot @@ -1 +1 @@ -Subproject commit 691077e577359aaa257597bebe0e3cec0954038a +Subproject commit 770f939463d103890b629396b24ebf0b4fdada7a diff --git a/buildroot-external/package/hassio/create-data-partition.sh b/buildroot-external/package/hassio/create-data-partition.sh index 4691f2bb021..5eb754b1ee7 100755 --- a/buildroot-external/package/hassio/create-data-partition.sh +++ b/buildroot-external/package/hassio/create-data-partition.sh @@ -22,7 +22,7 @@ container=$(docker run --privileged -e DOCKER_TLS_CERTDIR="" \ -v "${build_dir}/data/":/data \ -v "${build_dir}/data/docker/":/var/lib/docker \ -v "${build_dir}":/build \ - -d docker:25.0-dind --storage-driver overlay2) + -d docker:26.0-dind --storage-driver overlay2) docker exec "${container}" sh /build/dind-import-containers.sh From 26f0b5a9b711e62edf4da863e75453fdaf7ad07f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Tue, 11 Jun 2024 12:49:20 +0200 Subject: [PATCH 20/27] Fix linux-firmware compression after BR 2024.02.3 merge (#3407) The compression is necessary for successful generic-x86-64 build. * buildroot 770f939463...b9520eedc6 (1): > package/linux-firmware: fix compression after bad merge --- buildroot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildroot b/buildroot index 770f939463d..b9520eedc65 160000 --- a/buildroot +++ b/buildroot @@ -1 +1 @@ -Subproject commit 770f939463d103890b629396b24ebf0b4fdada7a +Subproject commit b9520eedc650ea75ee9ba22cd74fd0aa868350b8 From 6d77355c1c3f35fdb5c43cc762b224b19767cce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Tue, 11 Jun 2024 19:02:40 +0200 Subject: [PATCH 21/27] 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. --- ...01-HACK-mmc-meson-gx-limit-to-24MHz.patch} | 19 ++++++++----------- .../configs/odroid_n2_defconfig | 2 +- 2 files changed, 9 insertions(+), 12 deletions(-) rename buildroot-external/board/hardkernel/patches/uboot/{0001-HACK-mmc-meson-gx-limit-to-40MHz.patch => 0001-HACK-mmc-meson-gx-limit-to-24MHz.patch} (58%) diff --git a/buildroot-external/board/hardkernel/patches/uboot/0001-HACK-mmc-meson-gx-limit-to-40MHz.patch b/buildroot-external/board/hardkernel/patches/uboot/0001-HACK-mmc-meson-gx-limit-to-24MHz.patch similarity index 58% rename from buildroot-external/board/hardkernel/patches/uboot/0001-HACK-mmc-meson-gx-limit-to-40MHz.patch rename to buildroot-external/board/hardkernel/patches/uboot/0001-HACK-mmc-meson-gx-limit-to-24MHz.patch index 4e9e0daf067..c56843027f5 100644 --- a/buildroot-external/board/hardkernel/patches/uboot/0001-HACK-mmc-meson-gx-limit-to-40MHz.patch +++ b/buildroot-external/board/hardkernel/patches/uboot/0001-HACK-mmc-meson-gx-limit-to-24MHz.patch @@ -1,18 +1,15 @@ -From 820e6f6e3745e988246a1acca4aaacdd759b778f Mon Sep 17 00:00:00 2001 -From: Stefan Agner -Date: Thu, 18 Apr 2024 18:01:54 +0200 -Subject: [PATCH] HACK: mmc: meson-gx: limit to 40MHz +From 11f015e13ef0442b6d2bb734954291abde415f73 Mon Sep 17 00:00:00 2001 +From: Neil Armstrong +Date: Mon, 2 Sep 2019 15:42:04 +0200 +Subject: [PATCH] HACK: mmc: meson-gx: limit to 24MHz -This is the limit used by downstream U-Boot for ODROID-N2(+) (odroidg12 -branch). - -Signed-off-by: Stefan Agner +Signed-off-by: Neil Armstrong --- drivers/mmc/meson_gx_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/meson_gx_mmc.c b/drivers/mmc/meson_gx_mmc.c -index fcf4f03d1e..c578ac0f74 100644 +index fcf4f03d1e..6ded4b619b 100644 --- a/drivers/mmc/meson_gx_mmc.c +++ b/drivers/mmc/meson_gx_mmc.c @@ -279,7 +279,7 @@ static int meson_mmc_probe(struct udevice *dev) @@ -20,10 +17,10 @@ index fcf4f03d1e..c578ac0f74 100644 MMC_MODE_HS_52MHz | MMC_MODE_HS; cfg->f_min = DIV_ROUND_UP(SD_EMMC_CLKSRC_24M, CLK_MAX_DIV); - cfg->f_max = 100000000; /* 100 MHz */ -+ cfg->f_max = 40000000; /* 40 MHz */ ++ cfg->f_max = SD_EMMC_CLKSRC_24M; cfg->b_max = 511; /* max 512 - 1 blocks */ cfg->name = dev->name; -- -2.44.0 +2.43.0 diff --git a/buildroot-external/configs/odroid_n2_defconfig b/buildroot-external/configs/odroid_n2_defconfig index b21a8fba083..d23f50be8aa 100644 --- a/buildroot-external/configs/odroid_n2_defconfig +++ b/buildroot-external/configs/odroid_n2_defconfig @@ -132,7 +132,7 @@ BR2_TARGET_ROOTFS_SQUASHFS4_LZ4=y BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_VERSION=y -BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2024.01" +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2023.01" BR2_TARGET_UBOOT_BOARD_DEFCONFIG="odroid-n2" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2/uboot.config" BR2_PACKAGE_HOST_DOSFSTOOLS=y From 89533755bc0647ae658261f8eef565172c4b58c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Wed, 12 Jun 2024 21:52:36 +0200 Subject: [PATCH 22/27] 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/ --- ...009-green-Do-not-use-eMMC-DDR52-mode.patch | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 buildroot-external/board/nabucasa/green/patches/uboot/0009-green-Do-not-use-eMMC-DDR52-mode.patch diff --git a/buildroot-external/board/nabucasa/green/patches/uboot/0009-green-Do-not-use-eMMC-DDR52-mode.patch b/buildroot-external/board/nabucasa/green/patches/uboot/0009-green-Do-not-use-eMMC-DDR52-mode.patch new file mode 100644 index 00000000000..cb43497880f --- /dev/null +++ b/buildroot-external/board/nabucasa/green/patches/uboot/0009-green-Do-not-use-eMMC-DDR52-mode.patch @@ -0,0 +1,42 @@ +From 766d53ce6143b7e5f09a5f478e328cf8a1f183d4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= +Date: Wed, 12 Jun 2024 15:20:46 +0200 +Subject: [PATCH] green: Do not use eMMC DDR52 mode +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +There is a known issue on RK356x boards that the eMMC writing fails when +DDR52 mode is used. Disable this mode and other HS modes, keep only +HS200 which works reliably with the eMMC used on Green. For more details +see the upstream commit and mailing list discussion [1]. + +[1] https://patchwork.ozlabs.org/project/uboot/patch/20240204205312.2342868-2-jonas@kwiboo.se/ + +Signed-off-by: Jan Čermák +--- + arch/arm/dts/rk3566-ha-green-u-boot.dtsi | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/arch/arm/dts/rk3566-ha-green-u-boot.dtsi b/arch/arm/dts/rk3566-ha-green-u-boot.dtsi +index 48d7b61513..8dc1585aac 100644 +--- a/arch/arm/dts/rk3566-ha-green-u-boot.dtsi ++++ b/arch/arm/dts/rk3566-ha-green-u-boot.dtsi +@@ -71,10 +71,7 @@ + + &sdhci { + cap-mmc-highspeed; +- mmc-ddr-1_8v; + mmc-hs200-1_8v; +- mmc-hs400-1_8v; +- mmc-hs400-enhanced-strobe; + }; + + &sfc { +@@ -115,4 +112,4 @@ + + &vcc5v0_usb_host { + regulator-boot-on; +-}; +\ No newline at end of file ++}; From d847b9803a8cdac7a9c46d24fd9ec4a569a5fa6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Wed, 12 Jun 2024 21:52:48 +0200 Subject: [PATCH 23/27] Add hardware details to bug issue template (#3413) Very often we have to ask for further details about the hardware that HAOS is running on. Add a required field that asks for these details - in the end it should't complicate the form a lot and might result in faster turnaround of resolving the issues. Also adjust the question about the upgrade and swap the order (people often don't care and keep the pre-selected value). --- .github/ISSUE_TEMPLATE/bug_report.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 79167abafc3..3dbbe72dec1 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -23,6 +23,7 @@ body: required: true attributes: label: What operating system image do you use? + default: 0 options: - generic-x86-64 (Generic UEFI capable x86-64 systems) - generic-aarch64 (Generic UEFI capable aarch64 systems) @@ -59,10 +60,21 @@ body: validations: required: true attributes: - label: Did you upgrade the Operating System. + label: Did the problem occur after upgrading the Operating System? + default: 0 options: - - "Yes" - "No" + - "Yes" + - type: textarea + validations: + required: true + attributes: + label: Hardware details + description: > + Provide details about the hardware used for your install. + This is especially important for bare-metal x86 installations. + If you have any USB devices attached, please list them here. + For VMs, include the hypervisor type and version. - type: textarea validations: required: true From 6c2d5b50068765d3573f0b53701d514dc075bdc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Wed, 12 Jun 2024 23:04:34 +0200 Subject: [PATCH 24/27] Bump Docker to v26.1.4 (#3411) * buildroot b9520eedc6...ad5e711bc1 (4): > package/containerd: bump to v1.7.17 > package/docker-cli: bump version to v26.1.4 > package/docker-engine: bump version to v26.1.4 > .github: remove upstream's PR template discouraging GH usage --- buildroot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildroot b/buildroot index b9520eedc65..d03dda4fcfa 160000 --- a/buildroot +++ b/buildroot @@ -1 +1 @@ -Subproject commit b9520eedc650ea75ee9ba22cd74fd0aa868350b8 +Subproject commit d03dda4fcfa0a701e07de1dcf9a0c035c12b609e From 27bc7306ff1bc016f7e05635204fa8f55729749b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Thu, 13 Jun 2024 11:39:02 +0200 Subject: [PATCH 25/27] Linux: Update kernel to 6.6.33 (#3415) * https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.33 --- Documentation/kernel.md | 24 +++++++++---------- .../configs/generic_aarch64_defconfig | 2 +- .../configs/generic_x86_64_defconfig | 2 +- buildroot-external/configs/green_defconfig | 2 +- .../configs/khadas_vim3_defconfig | 2 +- .../configs/odroid_c2_defconfig | 2 +- .../configs/odroid_c4_defconfig | 2 +- .../configs/odroid_m1_defconfig | 2 +- .../configs/odroid_m1s_defconfig | 2 +- .../configs/odroid_n2_defconfig | 2 +- .../configs/odroid_xu4_defconfig | 2 +- buildroot-external/configs/ova_defconfig | 2 +- buildroot-external/configs/tinker_defconfig | 2 +- 13 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Documentation/kernel.md b/Documentation/kernel.md index 56cbf1b40f4..a19e9ef2ed8 100644 --- a/Documentation/kernel.md +++ b/Documentation/kernel.md @@ -5,7 +5,7 @@ Default Kernel tree: 6.1 | Board | Version | |-------|---------| -| Open Virtual Appliance | 6.6.32 | +| Open Virtual Appliance | 6.6.33 | | Raspberry Pi | 6.6.31 | | Raspberry Pi 0-W | 6.6.31 | | Raspberry Pi 2 | 6.6.31 | @@ -13,14 +13,14 @@ Default Kernel tree: 6.1 | Raspberry Pi 4 | 6.6.31 | | Raspberry Pi 5 | 6.6.31 | | Home Assistant Yellow | 6.6.31 | -| Home Assistant Green | 6.6.32 | -| Tinker Board | 6.6.32 | -| ODROID-C2 | 6.6.32 | -| ODROID-C4 | 6.6.32 | -| ODROID-M1 | 6.6.32 | -| ODROID-M1S | 6.6.32 | -| ODROID-N2 | 6.6.32 | -| ODROID-XU4 | 6.6.32 | -| Generic aarch64 | 6.6.32 | -| Generic x86-64 | 6.6.32 | -| Khadas VIM3 | 6.6.32 | +| Home Assistant Green | 6.6.33 | +| Tinker Board | 6.6.33 | +| ODROID-C2 | 6.6.33 | +| ODROID-C4 | 6.6.33 | +| ODROID-M1 | 6.6.33 | +| ODROID-M1S | 6.6.33 | +| ODROID-N2 | 6.6.33 | +| ODROID-XU4 | 6.6.33 | +| Generic aarch64 | 6.6.33 | +| Generic x86-64 | 6.6.33 | +| Khadas VIM3 | 6.6.33 | diff --git a/buildroot-external/configs/generic_aarch64_defconfig b/buildroot-external/configs/generic_aarch64_defconfig index 3df8f2fcf6e..32d2f2c066a 100644 --- a/buildroot-external/configs/generic_aarch64_defconfig +++ b/buildroot-external/configs/generic_aarch64_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/arm-uefi/generic-aarch64 $(BR2_EXTERNAL_HASSOS_PATH)/board/arm-uefi/generic-aarch64/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.32" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.33" BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/board/arm-uefi/generic-aarch64/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/generic_x86_64_defconfig b/buildroot-external/configs/generic_x86_64_defconfig index ff3a3ba0d08..cd557ee363d 100644 --- a/buildroot-external/configs/generic_x86_64_defconfig +++ b/buildroot-external/configs/generic_x86_64_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/pc/generic-x86-64 $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/generic-x86-64/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.32" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.33" BR2_LINUX_KERNEL_DEFCONFIG="x86_64" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/generic-x86-64/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/green_defconfig b/buildroot-external/configs/green_defconfig index 3e86a6b2050..0d192a1bbd6 100755 --- a/buildroot-external/configs/green_defconfig +++ b/buildroot-external/configs/green_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/nabucasa/green $(BR2_EXTERNAL_HASSOS_PATH)/board/nabucasa/green/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.32" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.33" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/kernel-arm64-rockchip.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/nabucasa/green/kernel.config" diff --git a/buildroot-external/configs/khadas_vim3_defconfig b/buildroot-external/configs/khadas_vim3_defconfig index cdf6813df5f..ec86dabb8a3 100644 --- a/buildroot-external/configs/khadas_vim3_defconfig +++ b/buildroot-external/configs/khadas_vim3_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/khadas/vim3 $(BR2_EXTERNAL_HASSOS_PATH)/board/khadas/vim3/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.32" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.33" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/khadas/kernel-vim.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config" diff --git a/buildroot-external/configs/odroid_c2_defconfig b/buildroot-external/configs/odroid_c2_defconfig index 841e063e5f2..235b8011d50 100644 --- a/buildroot-external/configs/odroid_c2_defconfig +++ b/buildroot-external/configs/odroid_c2_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c2/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.32" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.33" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/kernel-amlogic.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config" diff --git a/buildroot-external/configs/odroid_c4_defconfig b/buildroot-external/configs/odroid_c4_defconfig index cc92be1d86b..70b93c36085 100644 --- a/buildroot-external/configs/odroid_c4_defconfig +++ b/buildroot-external/configs/odroid_c4_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c4 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-c4/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.32" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.33" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/kernel-amlogic.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config" diff --git a/buildroot-external/configs/odroid_m1_defconfig b/buildroot-external/configs/odroid_m1_defconfig index 30fe08ae08f..b65751f8bb2 100644 --- a/buildroot-external/configs/odroid_m1_defconfig +++ b/buildroot-external/configs/odroid_m1_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.32" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.33" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/kernel-arm64-rockchip.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1/kernel.config" diff --git a/buildroot-external/configs/odroid_m1s_defconfig b/buildroot-external/configs/odroid_m1s_defconfig index 9a83c73ffc4..7f658532653 100644 --- a/buildroot-external/configs/odroid_m1s_defconfig +++ b/buildroot-external/configs/odroid_m1s_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1s $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1s/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.32" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.33" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/kernel-arm64-rockchip.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-m1s/kernel.config" diff --git a/buildroot-external/configs/odroid_n2_defconfig b/buildroot-external/configs/odroid_n2_defconfig index d23f50be8aa..2cc10398f08 100644 --- a/buildroot-external/configs/odroid_n2_defconfig +++ b/buildroot-external/configs/odroid_n2_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.32" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.33" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/kernel-amlogic.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-n2/kernel.config" diff --git a/buildroot-external/configs/odroid_xu4_defconfig b/buildroot-external/configs/odroid_xu4_defconfig index 7686fa78aa5..5b54713eab4 100644 --- a/buildroot-external/configs/odroid_xu4_defconfig +++ b/buildroot-external/configs/odroid_xu4_defconfig @@ -17,7 +17,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-xu4 $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-xu4/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.32" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.33" BR2_LINUX_KERNEL_DEFCONFIG="exynos" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/board/hardkernel/odroid-xu4/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/ova_defconfig b/buildroot-external/configs/ova_defconfig index 829d210f86c..0918ffd72ee 100644 --- a/buildroot-external/configs/ova_defconfig +++ b/buildroot-external/configs/ova_defconfig @@ -16,7 +16,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/pc/ova $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/ova/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.32" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.33" BR2_LINUX_KERNEL_DEFCONFIG="x86_64" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless-pci.config $(BR2_EXTERNAL_HASSOS_PATH)/board/pc/ova/kernel.config" BR2_LINUX_KERNEL_LZ4=y diff --git a/buildroot-external/configs/tinker_defconfig b/buildroot-external/configs/tinker_defconfig index ebb530c3133..a60dd5f3cbf 100644 --- a/buildroot-external/configs/tinker_defconfig +++ b/buildroot-external/configs/tinker_defconfig @@ -18,7 +18,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/asus/tinker $(BR2_EXTERNAL_HASSOS_PATH)/board/asus/hassos-hook.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.32" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.33" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_HASSOS_PATH)/board/asus/tinker/kernel.config" BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/v6.6.y/device-support-wireless.config" From 0e9e8ca2a6d791124c2825107cd6dda10e6a8ece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Thu, 13 Jun 2024 13:01:03 +0200 Subject: [PATCH 26/27] Bump OS to pre-release version 12.4.rc1 --- buildroot-external/meta | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildroot-external/meta b/buildroot-external/meta index a30da9ad8cb..859a4b05918 100644 --- a/buildroot-external/meta +++ b/buildroot-external/meta @@ -1,8 +1,8 @@ VERSION_MAJOR="12" VERSION_MINOR="4" -VERSION_SUFFIX="dev0" +VERSION_SUFFIX="rc1" HASSOS_NAME="Home Assistant OS" HASSOS_ID="haos" -DEPLOYMENT="development" +DEPLOYMENT="staging" From a70ed7e81ec8b4158f4e9bda4e9a94ed6923247b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Tue, 18 Jun 2024 12:26:14 +0200 Subject: [PATCH 27/27] Bump OS to release version 12.4 --- buildroot-external/meta | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildroot-external/meta b/buildroot-external/meta index 859a4b05918..18f3c554bf0 100644 --- a/buildroot-external/meta +++ b/buildroot-external/meta @@ -1,8 +1,8 @@ VERSION_MAJOR="12" VERSION_MINOR="4" -VERSION_SUFFIX="rc1" +VERSION_SUFFIX="" HASSOS_NAME="Home Assistant OS" HASSOS_ID="haos" -DEPLOYMENT="staging" +DEPLOYMENT="production"