From f778edfac3cbc15042d29fdd9b447950c6bf00b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Wed, 8 Jan 2025 10:58:33 +0100 Subject: [PATCH] Change RPi bootargs order to keep cgroup memory controller enabled (#3772) With "cgroup: Use kernel command line to disable memory cgroup" merged to RPi kernel as 86099de [1], the device tree now contains "cgroup_disable=memory" parameter. The parameters are parsed in the order defined in the cmdline and with the previous order, the memory CG ends up disabled. Switching the order fixes that and makes the order similar to what we get with standard bootloader and parameters in cmdline.txt only. The possible downside is that it won't be possible to override parameters from hardcoded bootargs_hassos using cmdline.txt anymore, however, it's unlikely any of these parameters will need to be adjusted by users. Fixes #3765 [1] https://github.com/raspberrypi/linux/commit/86099deff5abf5f63643eecaedb4c11ae77474ce --- buildroot-external/board/raspberrypi/uboot-boot.ush | 4 ++-- buildroot-external/board/raspberrypi/uboot-boot64.ush | 4 ++-- buildroot-external/board/raspberrypi/yellow/uboot-boot64.ush | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/buildroot-external/board/raspberrypi/uboot-boot.ush b/buildroot-external/board/raspberrypi/uboot-boot.ush index 6b46edcb1..b1dcdd328 100644 --- a/buildroot-external/board/raspberrypi/uboot-boot.ush +++ b/buildroot-external/board/raspberrypi/uboot-boot.ush @@ -42,7 +42,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1 echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..." if load ${devtype} ${devnum}:2 ${kernel_addr_r} zImage; then - setenv bootargs "${bootargs_hassos} ${bootargs_rpi} ${bootargs_a} rauc.slot=A" + setenv bootargs "${bootargs_rpi} ${bootargs_hassos} ${bootargs_a} rauc.slot=A" fi fi elif test "x${BOOT_SLOT}" = "xB"; then @@ -50,7 +50,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1 echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..." if load ${devtype} ${devnum}:4 ${kernel_addr_r} zImage; then - setenv bootargs "${bootargs_hassos} ${bootargs_rpi} ${bootargs_b} rauc.slot=B" + setenv bootargs "${bootargs_rpi} ${bootargs_hassos} ${bootargs_b} rauc.slot=B" fi fi fi diff --git a/buildroot-external/board/raspberrypi/uboot-boot64.ush b/buildroot-external/board/raspberrypi/uboot-boot64.ush index 8c4c4a27c..c2f8685a6 100644 --- a/buildroot-external/board/raspberrypi/uboot-boot64.ush +++ b/buildroot-external/board/raspberrypi/uboot-boot64.ush @@ -42,7 +42,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1 echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..." if load ${devtype} ${devnum}:2 ${kernel_addr_r} Image; then - setenv bootargs "${bootargs_hassos} ${bootargs_rpi} ${bootargs_a} rauc.slot=A" + setenv bootargs "${bootargs_rpi} ${bootargs_hassos} ${bootargs_a} rauc.slot=A" fi fi elif test "x${BOOT_SLOT}" = "xB"; then @@ -50,7 +50,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1 echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..." if load ${devtype} ${devnum}:4 ${kernel_addr_r} Image; then - setenv bootargs "${bootargs_hassos} ${bootargs_rpi} ${bootargs_b} rauc.slot=B" + setenv bootargs "${bootargs_rpi} ${bootargs_hassos} ${bootargs_b} rauc.slot=B" fi fi fi diff --git a/buildroot-external/board/raspberrypi/yellow/uboot-boot64.ush b/buildroot-external/board/raspberrypi/yellow/uboot-boot64.ush index 43097e41f..c7b67e1b3 100644 --- a/buildroot-external/board/raspberrypi/yellow/uboot-boot64.ush +++ b/buildroot-external/board/raspberrypi/yellow/uboot-boot64.ush @@ -68,7 +68,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do setexpr BOOT_A_LEFT ${BOOT_A_LEFT} - 1 echo "Trying to boot slot A, ${BOOT_A_LEFT} attempts remaining. Loading kernel ..." if load ${devtype} ${devnum}:2 ${kernel_addr_r} Image; then - setenv bootargs "${bootargs_hassos} ${bootargs_rpi} ${bootargs_a} rauc.slot=A" + setenv bootargs "${bootargs_rpi} ${bootargs_hassos} ${bootargs_a} rauc.slot=A" fi fi elif test "x${BOOT_SLOT}" = "xB"; then @@ -76,7 +76,7 @@ for BOOT_SLOT in "${BOOT_ORDER}"; do setexpr BOOT_B_LEFT ${BOOT_B_LEFT} - 1 echo "Trying to boot slot B, ${BOOT_B_LEFT} attempts remaining. Loading kernel ..." if load ${devtype} ${devnum}:4 ${kernel_addr_r} Image; then - setenv bootargs "${bootargs_hassos} ${bootargs_rpi} ${bootargs_b} rauc.slot=B" + setenv bootargs "${bootargs_rpi} ${bootargs_hassos} ${bootargs_b} rauc.slot=B" fi fi fi