[Buildroot] [PATCH 1/1] package/rpi-firmware: add configurable kernel cmdline option

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Mon Aug 10 14:00:22 UTC 2015


Dear Jeremy Rosen,

On Mon, 10 Aug 2015 10:12:28 +0200 (CEST), Jeremy Rosen wrote:

> > solution, that could be used for all bootloaders. I.e. an entry in
> > the
> > kernel menu.
> > 
> > But I'm not really a fan of this; post-build scripts have been
> > introduced just for this kind of local customisation. Others may
> > disagree, though...
> > 
> 
> I kinda disagree here...
> 
> The problem is that the kernel commandline is partly built purely by
> buildroot (for instance console=)

Not at all. Buildroot does not define console= anywhere. It uses the
kernel console as the default tty for getty, but does not anything else
beyond that: it's still up to the user to pass console= on the kernel
command line.

> and partly by the user (depending
> on the architecture, the boot partition can be manually specified)
> so having a generic way to specify "add this strin at the end of
> the kernel command line when you save the commandline wherever
> this particular architecture needs it" would be handy
> 
> Of course it can always be done with with post-build script, but
> it can sometime be tricky when what you need is to modify a string
> in a variable place that is half-generated by buildroot.

Except that there is clearly not generic way to specify the kernel
command line. Depending on the bootloader being used, the mechanism is
completely different. Even with the same bootloader (e. U-Boot), there
is typically a specific environment for each board/platform that builds
the kernel command line at runtime from various other bootloader
environment variables.

So just like Yann said: defining the kernel command line is way too
hardware/project specific to be solved by Buildroot, and it is not
something for which Buildroot would provide a lot of useful help anyway.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com



More information about the buildroot mailing list