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.

Signed-off-by: Petr Hodina <[email protected]>
---
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,
--  
Petr Hodina <[email protected]>


Reply via email to