summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Felsch <m.felsch@pengutronix.de>2023-02-10 20:21:44 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2023-02-17 09:30:23 +0100
commit09f00b06b28298cbf135bee30b2d5d04874ab410 (patch)
tree9564a618489296b7e2d7fba0580c794fa23974d4
parent3cd9ed42479559d2da59df83063c9e28941121dd (diff)
downloadptxdist-09f00b06b28298cbf135bee30b2d5d04874ab410.tar.gz
ptxdist-09f00b06b28298cbf135bee30b2d5d04874ab410.tar.xz
blspec-entry: add linux-appendroot support
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>
-rw-r--r--platforms/blspec-entry.in8
-rw-r--r--projectroot/loader/entries/default.conf1
-rw-r--r--rules/blspec-entry.make10
3 files changed, 18 insertions, 1 deletions
diff --git a/platforms/blspec-entry.in b/platforms/blspec-entry.in
index aed65d40a..c2aea36dc 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 5650907ab..d28156975 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 f393b1bda..7523009f6 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)