[PATCH 0/3] fdt_support: improve board_fdt_chosen_bootargs() for flexibility

Dmitry Rokosov ddrokosov at salutedevices.com
Thu Dec 19 22:42:07 CET 2024


This series consists of three patches.

The first patch modifies the function documentation style in the
include/fdt_support.h file to comply with kernel-doc requirements.

The second patch modifies the board_fdt_chosen_bootargs() function to
return a const char* type. This change clarifies to the caller that the
returned string should neither be freed nor modified. It aligns with the
existing fdt_setprop() function, which already utilizes a const char*
parameter. This promotes consistency within the codebase and enhances
code safety by preventing unintended modifications to the returned
string.

The third patch addresses the need for flexibility in providing kernel
command line arguments (bootargs) for different kernel images within the
same U-Boot environment. It introduces a read-only (RO) fdt_property
argument to the board_fdt_chosen_bootargs() function, allowing access to
the original chosen/bootargs data. This is crucial for scenarios where
different kernel versions require distinct console setups (e.g., ttyS0
for vendor kernels and ttyAML0 for upstream kernels). By enabling board
developers to either merge or replace the original bootargs, this
patch enhances the configurability of U-Boot for various kernel
images without relying on outdated configurations like CMDLINE_EXTEND.

CI/CD results: https://github.com/u-boot/u-boot/pull/716/checks

Signed-off-by: Dmitry Rokosov <ddrokosov at salutedevices.com>
---
Dmitry Rokosov (3):
      include/fdt_support: fix docstyle to comply with kernel-doc requirements
      fdt_support: board_fdt_chosen_bootargs() should return const char*
      common: fdt: hand over original fdt bootargs into board chosen handler

 boot/fdt_support.c    |   7 +-
 include/fdt_support.h | 173 ++++++++++++++++++++++++++++++--------------------
 2 files changed, 107 insertions(+), 73 deletions(-)
---
base-commit: 69bd83568c57813cd23bc2d100c066a17e7e349d
change-id: 20241219-board_fdt_chosen_bootargs_improvements-7646b2029ba7

Best regards,
-- 
Dmitry Rokosov <ddrokosov at salutedevices.com>



More information about the U-Boot mailing list