[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240512132513.2831-4-ansuelsmth@gmail.com>
Date: Sun, 12 May 2024 15:25:10 +0200
From: Christian Marangi <ansuelsmth@...il.com>
To: Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Saravana Kannan <saravanak@...gle.com>,
Arnd Bergmann <arnd@...db.de>,
Helge Deller <deller@....de>,
Javier Martinez Canillas <javierm@...hat.com>,
Baoquan He <bhe@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Jiaxun Yang <jiaxun.yang@...goat.com>,
David Bauer <mail@...id-bauer.net>,
Liviu Dudau <liviu@...au.co.uk>,
Serge Semin <fancer.lancer@...il.com>,
devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-mips@...r.kernel.org
Cc: Christian Marangi <ansuelsmth@...il.com>
Subject: [PATCH 3/4] of: add support for bootargs-append chosen property
Add support for bootargs-append chosen property.
The bootargs-append can be used to append additional kernel arguments
to the bootargs property. This can be useful in the context of a
bootargs overridden by the bootloader that contains correct that but
the kernel require additional one to be correctly setup.
Signed-off-by: Christian Marangi <ansuelsmth@...il.com>
---
drivers/of/fdt.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 253315421591..cc99958872e4 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -1080,6 +1080,9 @@ int __init early_init_dt_scan_chosen(char *cmdline)
p = of_get_flat_dt_prop(node, "bootargs", &l);
if (p != NULL && l > 0)
strscpy(cmdline, p, min(l, COMMAND_LINE_SIZE));
+ p = of_get_flat_dt_prop(node, "bootargs-append", &l);
+ if (p != NULL && l > 0)
+ strlcat(cmdline, p, min_t(int, strlen(cmdline) + l, COMMAND_LINE_SIZE));
handle_cmdline:
/*
--
2.43.0
Powered by blists - more mailing lists