Skip to content

Commit

Permalink
Change RPi bootargs order to keep cgroup memory controller enabled
Browse files Browse the repository at this point in the history
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] raspberrypi/linux@86099de
  • Loading branch information
sairon committed Jan 3, 2025
1 parent 29c8cf8 commit 3fd3760
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions buildroot-external/board/raspberrypi/uboot-boot.ush
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ 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
if test ${BOOT_B_LEFT} -gt 0; then
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
Expand Down
4 changes: 2 additions & 2 deletions buildroot-external/board/raspberrypi/uboot-boot64.ush
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ 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
if test ${BOOT_B_LEFT} -gt 0; then
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
Expand Down
4 changes: 2 additions & 2 deletions buildroot-external/board/raspberrypi/yellow/uboot-boot64.ush
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ 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
if test ${BOOT_B_LEFT} -gt 0; then
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
Expand Down

0 comments on commit 3fd3760

Please sign in to comment.