From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Petazzoni Date: Mon, 10 Aug 2015 16:00:22 +0200 Subject: [Buildroot] [PATCH 1/1] package/rpi-firmware: add configurable kernel cmdline option In-Reply-To: <1466242774.5054496.1439194348268.JavaMail.root@openwide.fr> References: <20150809162240.GB4299@free.fr> <1466242774.5054496.1439194348268.JavaMail.root@openwide.fr> Message-ID: <20150810160022.663a2fb7@free-electrons.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net 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