Skip to content

arm: carry and filter previous bootloader's bootargs

Petr Hodina b4-sent u-boot 1 version In review

Get series with b4
b4 am 20260911-b4-android-bootargs-carryover-v1-0-6ebb43da3df0@protonmail.com change-id 20260909-b4-android-bootargs-carryover-3ebbc6685ba6

Versions newest first

  1. v1 Latest4 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4common: Add command line parsing utilitiesMAINTAINERS include/cmdline_utils.h lib/Makefile +1 more+124 -08 replies
2/4common: Add command line parameter masking functionalityinclude/cmdline_utils.h lib/cmdline_utils.c+157 -00 replies
3/4common: Add Android bootloader parameter parsing helperinclude/cmdline_utils.h lib/cmdline_utils.c+117 -00 replies
4/4arm: carry previous bootloader's bootargs into $bootargsarch/arm/lib/save_prev_bl_data.c boot/Kconfig+22 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] arm: carry and filter previous bootloader's bootargs

This series supports chainloaded U-Boot on Android devices where the previous stage bootloader (e.g. Android ABL) hands off a kernel command line via /chosen/bootargs. Some of those parameters need to be carried over into U-Boot's own $bootargs, while others such as skip_initramfs need to be explicitly dropped before the command line reaches the kernel.

Therefore this series adds a small command-line utility library and uses it to carry over and filter the inherited bootargs.

Four patches:

1. common: Add command line parsing utilities Parse key=value parameters out of a command-line string.

2. common: Add command line parameter masking functionality Mask or drop individual parameters from a command-line string.

3. common: Add Android bootloader parameter parsing helper Convenience wrapper for the numerous androidboot.* parameters.

4. arm: carry previous bootloader's bootargs into $bootargs Wire the above utilities into the boot path. Copy the previous bootloader's /chosen/bootargs into $bootargs. Drop parameters that must not survive the handoff (e.g. skip_initramfs) when CONFIG_SAVE_PREV_BL_BOOTARGS is enabled.

---
Petr Hodina (4):
common: Add command line parsing utilities
common: Add command line parameter masking functionality
common: Add Android bootloader parameter parsing helper
arm: carry previous bootloader's bootargs into $bootargs

 MAINTAINERS                      |   6 +
 arch/arm/lib/save_prev_bl_data.c |  15 +-
 boot/Kconfig                     |   8 +
 include/cmdline_utils.h          |  60 +++++++
 lib/Makefile                     |   1 +
 lib/cmdline_utils.c              | 331 +++++++++++++++++++++++++++++++++++++++
 6 files changed, 420 insertions(+), 1 deletion(-)

---
base-commit: ece349ade2973e220f524ce59e59711cc919263f
change-id: 20260909-b4-android-bootargs-carryover-3ebbc6685ba6

Best regards,

Signature · 1 line
Petr Hodina <[email protected]>