From: Ahmad Fatoum <[email protected]>

bootm: add fitimage command line to bootargs

Since FIT image specification v0.9, it is now possible to pass command
line arguments for the next boot stage in FIT images.

Add parsing of the cmdline optional property when reading the fitimage.
Create a new bootm-scope global variable that will be appended to the
command line when CONFIG_FLEXIBLE_BOOTARGS is enabled.

Signed-off-by: Thomas Bonnefille <[email protected]>
Link: 
https://lore.barebox.org/[email protected]
Signed-off-by: Sascha Hauer <[email protected]>
[ahmad: use LINUX_BOOTARGS_BOOTM_EARLY to fix bootargs order and cleanup]
Signed-off-by: Ahmad Fatoum <[email protected]>
---
 common/bootm-fit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/bootm-fit.c b/common/bootm-fit.c
index c7142f490fa5..f0a4c83f5950 100644
--- a/common/bootm-fit.c
+++ b/common/bootm-fit.c
@@ -108,7 +108,7 @@ static void bootm_fit_config_cmdline(struct device_node 
*config)
        if (of_property_read_string(config, "cmdline", &cmdline))
                return;
 
-       globalvar_add_simple("linux.bootargs.dyn.bootentries.fit", cmdline);
+       globalvar_add_simple(LINUX_BOOTARGS_BOOTM_EARLY "fit", cmdline);
 
        pr_info("Using command line from FIT configuration: %s\n", cmdline);
 }
-- 
2.47.3


Reply via email to