Re: [PATCH 3/3] commands: add of_bootargs command.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

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.

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.

[1] https://elinux.org/RPi_Upstream_Kernel_Compilation#Building_your_bootloader

Best regards
Tomaž

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




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux