From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 02 Sep 2022 11:23:14 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oU2tM-004Ftu-Cy for lore@lore.pengutronix.de; Fri, 02 Sep 2022 11:23:14 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1oU2tN-00028d-B6; Fri, 02 Sep 2022 11:23:13 +0200 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oU2ss-000281-Bq; Fri, 02 Sep 2022 11:22:42 +0200 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1oU2ss-0003sH-2t; Fri, 02 Sep 2022 11:22:42 +0200 Date: Fri, 2 Sep 2022 11:22:42 +0200 From: Michael Olbrich To: Marco Felsch Message-ID: <20220902092242.GX951@pengutronix.de> Mail-Followup-To: Marco Felsch , ptxdist@pengutronix.de References: <20220901085941.2597793-1-m.felsch@pengutronix.de> <20220902080342.4v2ryk5awaxaw7v6@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220902080342.4v2ryk5awaxaw7v6@pengutronix.de> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [ptxdist] [PATCH 1/3] blspec-entry: add linux-appendroot support X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: ptxdist@pengutronix.de Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false On Fri, Sep 02, 2022 at 10:03:42AM +0200, Marco Felsch wrote: > On 22-09-02, Michael Olbrich wrote: > > On Thu, Sep 01, 2022 at 10:59:39AM +0200, Marco Felsch wrote: > > > Add a Kconfig switch to set the linxu-appendroot option to true. This > > > can be very useful for the Barebox bootloader. > > > > > > Signed-off-by: Marco Felsch > > > --- > > > platforms/blspec-entry.in | 10 ++++++++++ > > > projectroot/loader/entries/default.conf | 1 + > > > rules/blspec-entry.make | 10 +++++++++- > > > 3 files changed, 20 insertions(+), 1 deletion(-) > > > > > > diff --git a/platforms/blspec-entry.in b/platforms/blspec-entry.in > > > index aed65d40a..1a4ecb26c 100644 > > > --- a/platforms/blspec-entry.in > > > +++ b/platforms/blspec-entry.in > > > @@ -16,4 +16,14 @@ config BLSPEC_ENTRY_CMDLINE > > > string > > > prompt "kernel command-line" > > > > > > +config BLSPEC_ENTRY_APPENDROOT > > > + bool > > > + prompt "Set linux-appendroot to true" > > > + help > > > + If enabled this options adds 'linux-appendroot true' to the blspec > > > + entry else 'linux-appendroot false' is added. This is a useful > > > + Barebox specific option. Barebox will set the the 'root=' kernel > > > + command line parameter to the source from which Barebox loaded the > > > + kernel image if specified. > > > + > > > 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..c0d2416cf 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 = linux-appendroot\tfalse > > > > Hmm, that's the default, right? So use an empty string here. It keeps the > > file shorter and (mostly) unchanged for those that keep the option > > disabled. It's a non-standard option so I'd prefer to not have it here > > unless it is explicitly enabled. > > Okay, I will do that. Just one question will it add a blank line instead > or is the line taken by @LINUXAPPENDROOT@ completely gone? It will be a blank line, but I think that's ok. You could merge it with the @DEVICETREE@ line and add a '\n' at the beginning of the substitution. But I'm not sure if it's worth it. Michael -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |