* [ptxdist] [PATCH v2] blspec-entry: add linux-appendroot support
@ 2023-02-10 19:21 Marco Felsch
2023-02-17 15:35 ` [ptxdist] [APPLIED] " Michael Olbrich
0 siblings, 1 reply; 2+ messages in thread
From: Marco Felsch @ 2023-02-10 19:21 UTC (permalink / raw)
To: ptxdist
Add the option to add the 'linux-appendroot true' to blspec config file
which is very useful in case of using barebox as bootlaoder.
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
Hi,
the v1 of this patch can be found here:
https://lore.ptxdist.org/ptxdist/20220901085941.2597793-1-m.felsch@pengutronix.de/
Changes:
v2:
- keep the @LINUXAPPENDROOT@ empty if not enabled
platforms/blspec-entry.in | 8 ++++++++
projectroot/loader/entries/default.conf | 1 +
rules/blspec-entry.make | 10 +++++++++-
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/platforms/blspec-entry.in b/platforms/blspec-entry.in
index aed65d4..c2aea36 100644
--- a/platforms/blspec-entry.in
+++ b/platforms/blspec-entry.in
@@ -16,4 +16,12 @@ config BLSPEC_ENTRY_CMDLINE
string
prompt "kernel command-line"
+config BLSPEC_ENTRY_APPENDROOT
+ bool
+ prompt "Add 'linux-appendroot true'"
+ help
+ If enabled this options adds 'linux-appendroot true' to the blspec
+ entry. This is a barebox specific blspec option which tells barebox
+ to add the 'root=' kernel command line automatically if set.
+
endif
diff --git a/projectroot/loader/entries/default.conf b/projectroot/loader/entries/default.conf
index 5650907..d281569 100644
--- a/projectroot/loader/entries/default.conf
+++ b/projectroot/loader/entries/default.conf
@@ -3,3 +3,4 @@ version @VERSION@
options @CMDLINE@
linux @KERNEL@
@DEVICETREE@
+@LINUXAPPENDROOT@
diff --git a/rules/blspec-entry.make b/rules/blspec-entry.make
index f393b1b..7523009 100644
--- a/rules/blspec-entry.make
+++ b/rules/blspec-entry.make
@@ -35,6 +35,12 @@ else
BLSPEC_KERNEL_IMAGE = $(KERNEL_IMAGE)
endif
+ifdef PTXCONF_BLSPEC_ENTRY_APPENDROOT
+BLSPEC_APPENDROOT = linux-appendroot\ttrue
+else
+BLSPEC_APPENDROOT =
+endif
+
$(STATEDIR)/blspec-entry.targetinstall:
@$(call targetinfo)
@@ -56,7 +62,9 @@ $(STATEDIR)/blspec-entry.targetinstall:
$(call install_replace, blspec-entry, /loader/entries/$(name).conf, \
@KERNEL@,'/boot/$(BLSPEC_KERNEL_IMAGE)')$(ptx/nl) \
$(call install_replace, blspec-entry, /loader/entries/$(name).conf, \
- @DEVICETREE@,'$(call blspec/devicetree,$(name))')$(ptx/nl))
+ @DEVICETREE@,'$(call blspec/devicetree,$(name))')$(ptx/nl) \
+ $(call install_replace, blspec-entry, /loader/entries/$(name).conf, \
+ @LINUXAPPENDROOT@,'$(BLSPEC_APPENDROOT)')$(ptx/nl))
@$(call install_finish,blspec-entry)
--
2.30.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ptxdist] [APPLIED] blspec-entry: add linux-appendroot support
2023-02-10 19:21 [ptxdist] [PATCH v2] blspec-entry: add linux-appendroot support Marco Felsch
@ 2023-02-17 15:35 ` Michael Olbrich
0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2023-02-17 15:35 UTC (permalink / raw)
To: ptxdist; +Cc: Marco Felsch
Thanks, applied as 09f00b06b28298cbf135bee30b2d5d04874ab410.
Michael
[sent from post-receive hook]
On Fri, 17 Feb 2023 16:35:34 +0100, Marco Felsch <m.felsch@pengutronix.de> wrote:
> Add the option to add the 'linux-appendroot true' to blspec config file
> which is very useful in case of using barebox as bootlaoder.
>
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> Message-Id: <20230210192144.2133757-1-m.felsch@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
>
> diff --git a/platforms/blspec-entry.in b/platforms/blspec-entry.in
> index aed65d40a329..c2aea36dc8cc 100644
> --- a/platforms/blspec-entry.in
> +++ b/platforms/blspec-entry.in
> @@ -16,4 +16,12 @@ config BLSPEC_ENTRY_CMDLINE
> string
> prompt "kernel command-line"
>
> +config BLSPEC_ENTRY_APPENDROOT
> + bool
> + prompt "Add 'linux-appendroot true'"
> + help
> + If enabled this options adds 'linux-appendroot true' to the blspec
> + entry. This is a barebox specific blspec option which tells barebox
> + to add the 'root=' kernel command line automatically if set.
> +
> endif
> diff --git a/projectroot/loader/entries/default.conf b/projectroot/loader/entries/default.conf
> index 5650907ab11b..d2815697511e 100644
> --- a/projectroot/loader/entries/default.conf
> +++ b/projectroot/loader/entries/default.conf
> @@ -3,3 +3,4 @@ version @VERSION@
> options @CMDLINE@
> linux @KERNEL@
> @DEVICETREE@
> +@LINUXAPPENDROOT@
> diff --git a/rules/blspec-entry.make b/rules/blspec-entry.make
> index f393b1bda162..7523009f6197 100644
> --- a/rules/blspec-entry.make
> +++ b/rules/blspec-entry.make
> @@ -35,6 +35,12 @@ else
> BLSPEC_KERNEL_IMAGE = $(KERNEL_IMAGE)
> endif
>
> +ifdef PTXCONF_BLSPEC_ENTRY_APPENDROOT
> +BLSPEC_APPENDROOT = linux-appendroot\ttrue
> +else
> +BLSPEC_APPENDROOT =
> +endif
> +
> $(STATEDIR)/blspec-entry.targetinstall:
> @$(call targetinfo)
>
> @@ -56,7 +62,9 @@ $(STATEDIR)/blspec-entry.targetinstall:
> $(call install_replace, blspec-entry, /loader/entries/$(name).conf, \
> @KERNEL@,'/boot/$(BLSPEC_KERNEL_IMAGE)')$(ptx/nl) \
> $(call install_replace, blspec-entry, /loader/entries/$(name).conf, \
> - @DEVICETREE@,'$(call blspec/devicetree,$(name))')$(ptx/nl))
> + @DEVICETREE@,'$(call blspec/devicetree,$(name))')$(ptx/nl) \
> + $(call install_replace, blspec-entry, /loader/entries/$(name).conf, \
> + @LINUXAPPENDROOT@,'$(BLSPEC_APPENDROOT)')$(ptx/nl))
>
> @$(call install_finish,blspec-entry)
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-17 15:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-10 19:21 [ptxdist] [PATCH v2] blspec-entry: add linux-appendroot support Marco Felsch
2023-02-17 15:35 ` [ptxdist] [APPLIED] " Michael Olbrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox