mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: "Tomaž Šolc" <tomaz.solc@klevio.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 3/3] commands: add of_bootargs command.
Date: Fri, 22 Feb 2019 12:08:50 +0100	[thread overview]
Message-ID: <20190222110850.mihkopunhulsabr7@pengutronix.de> (raw)
In-Reply-To: <c63c27fe-9e12-e3a2-16b1-279b047bf3a1@klevio.com>

On Fri, Feb 22, 2019 at 11:38:58AM +0100, Tomaž Šolc wrote:
> Hi Sascha,
> 
> On 22. 02. 19 08:49, Sascha Hauer wrote:
> > On Thu, Feb 21, 2019 at 10:28:48AM +0100, Tomaz Solc wrote:
> > > This commit adds an of_bootargs command that extracts a bootargs
> > > property from a device tree and saves it to a global variable.
> > > 
> > > For example, a bootloader environment can use this command to extract
> > > the bootargs to linux.bootargs.vc, which then gets included into the
> > > final bootargs for the kernel using CONFIG_FLEXIBLE_BOOTARGS.
> > 
> > Do we need an extra command for this? Can't you just unflatten the
> > VideoCore provided device tree in the board code you have added in 2/3
> > and set global.linux.bootargs.vc from there? It seems to be just the
> > right thing without further user intervention.
> 
> I wanted to keep things flexible. I thought having an explicit command to
> import the args into Barebox is better than doing this automatically in
> rpi-common.c.

You can still set nv.linux.bootargs.vc="" if you want to drop the
vc provided bootargs later. Or other way round, set some other
variable, say global.vc.bootargs, to the vc provided bootargs, and
in some initscript set global.linux.bootargs.vc to $global.vc.bootargs.

> 
> As far as I know [1], upstream kernels use their own device tree and don't
> need bootargs and fdt from VideoCore. On the other hand, I'm using the
> Raspbian-supplied kernels that do depend on these two things. That's also
> why I liked the approach where the VideoCore fdt is saved into a file, where
> it can be passed to boot or not, depending on the environment.

Yes, that's fine. Having the devicetree available is a good thing.

> 
> If you think of_bootargs is too specific for a command, I can make it more
> general and have it save an arbitrary property from a fdt into a global
> variable (something similar to readf). That might be useful for something
> else as well.

Could be integrated into of_property maybe.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2019-02-22 11:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-21  9:28 [PATCH 0/3] VideoCore FDT interop for Raspberry Pi Tomaz Solc
2019-02-21  9:28 ` [PATCH 1/3] ARM: start: save end of memory passed to start Tomaz Solc
2019-02-21  9:28 ` [PATCH 2/3] ARM: rpi: save fdt that was passed from VideoCore Tomaz Solc
2019-02-26 15:18   ` Roland Hieber
2019-02-21  9:28 ` [PATCH 3/3] commands: add of_bootargs command Tomaz Solc
2019-02-22  7:49   ` Sascha Hauer
2019-02-22 10:38     ` Tomaž Šolc
2019-02-22 11:08       ` Sascha Hauer [this message]
2019-02-26 15:21   ` Roland Hieber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190222110850.mihkopunhulsabr7@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=tomaz.solc@klevio.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox