[LEDE-DEV] [PATCH] kernel: make fix extending dtb cmd with bootloader

Hauke Mehrtens hauke at hauke-m.de
Sat Dec 10 06:42:17 PST 2016


On 12/09/2016 08:08 AM, John Crispin wrote:
> 
> 
> On 09/12/2016 00:21, Hauke Mehrtens wrote:
>> This was introduced in kernel 4.4, but broken there and fixed in 4.5.
>> I would like to activate it, but I am scared about the boot loader
>> around giving us all sorts of command lines.
>>
>> Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
> 
> we had previously used a syntax of prepending the cmdline with +/- to
> indicate whether this should replace/extend the bootloader cmdline. the
> biggest problem is that the bootloaders will pass console= and root= and
> thus breaking boot. merging/activating this as is will most likely lead
> to 50% of lantiq boards not booting anymore. imho this feature should be
> an opt-in based on the specific board
> 
> 	John

Yes when you do not have control over the boot loader this is a big
problem, like I said in the commit comment.

We had this "bootargs-append" option in our kernel for a long time, but
this never got upstream. Are there any more upstream ways to extend the
boot loader command line in a device tree file, but not replacing it
completely?

I was thinking about adding a Kconfig option to append the device tree
version to the boot loader version, but I would prefer to do this in the
device tree for each board and not globally.

Currently I would remove the dtb bootargs line for every board were we
need the boot loader command line. Sometimes the Mac address is given by
the boot loader in the boot args.

Internally at Intel we are booting some SoC with a root file system
mounted from a NFS server that makes it pretty easy to modify files
without reboot. For this use case we provide the settings for the NFS
server in the boot command line. This works with just not defining any
bootargs line in the device tree at all.

Hauke



More information about the Lede-dev mailing list