Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Rosen <jeremy.rosen@openwide.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/rpi-firmware: add configurable kernel cmdline option
Date: Mon, 10 Aug 2015 10:12:28 +0200 (CEST)	[thread overview]
Message-ID: <1466242774.5054496.1439194348268.JavaMail.root@openwide.fr> (raw)
In-Reply-To: <20150809162240.GB4299@free.fr>


> > 
> > This patch adds option to specify content of cmdline.txt and store
> > it
> > in configuration file.

[...]

> And *if* we were to have a mean to set the kernel command line in
> Buildroot, it should not be specific to the RPi. It should be a
> generic


Completely agreee on this part...


> 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=) 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.


so yes, it would be handy. Not a huge problem but still handy

Regards

J?r?my Rosen


> Regards,
> Yann E. MORIN.
> 
> > ---
> >  package/rpi-firmware/Config.in       | 6 ++++++
> >  package/rpi-firmware/cmdline.txt     | 1 -
> >  package/rpi-firmware/rpi-firmware.mk | 2 +-
> >  3 files changed, 7 insertions(+), 2 deletions(-)
> >  delete mode 100644 package/rpi-firmware/cmdline.txt
> > 
> > diff --git a/package/rpi-firmware/Config.in
> > b/package/rpi-firmware/Config.in
> > index 405674f..978ecfd 100644
> > --- a/package/rpi-firmware/Config.in
> > +++ b/package/rpi-firmware/Config.in
> > @@ -39,6 +39,12 @@ config BR2_PACKAGE_RPI_FIRMWARE_CD
> >  
> >  endchoice
> >  
> > +config BR2_PACKAGE_RPI_FIRMWARE_CMDLINE
> > +	string "Kernel cmdline"
> > +	default "root=/dev/mmcblk0p2 rootwait"
> > +	help
> > +	  Set this value to customize cmdline.txt file at boot partition.
> > +
> >  config BR2_PACKAGE_RPI_FIRMWARE_BOOT
> >  	string
> >  	default ""      if BR2_PACKAGE_RPI_FIRMWARE_DEFAULT
> > diff --git a/package/rpi-firmware/cmdline.txt
> > b/package/rpi-firmware/cmdline.txt
> > deleted file mode 100644
> > index 38aa378..0000000
> > --- a/package/rpi-firmware/cmdline.txt
> > +++ /dev/null
> > @@ -1 +0,0 @@
> > -root=/dev/mmcblk0p2 rootwait
> > diff --git a/package/rpi-firmware/rpi-firmware.mk
> > b/package/rpi-firmware/rpi-firmware.mk
> > index 1ef15aa..9d22a69 100644
> > --- a/package/rpi-firmware/rpi-firmware.mk
> > +++ b/package/rpi-firmware/rpi-firmware.mk
> > @@ -41,7 +41,7 @@ define RPI_FIRMWARE_INSTALL_IMAGES_CMDS
> >  	$(INSTALL) -D -m 0644
> >  	$(@D)/boot/start$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).elf
> >  	$(BINARIES_DIR)/rpi-firmware/start.elf
> >  	$(INSTALL) -D -m 0644
> >  	$(@D)/boot/fixup$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).dat
> >  	$(BINARIES_DIR)/rpi-firmware/fixup.dat
> >  	$(INSTALL) -D -m 0644 package/rpi-firmware/config.txt
> >  	$(BINARIES_DIR)/rpi-firmware/config.txt
> > -	$(INSTALL) -D -m 0644 package/rpi-firmware/cmdline.txt
> > $(BINARIES_DIR)/rpi-firmware/cmdline.txt
> > +	echo $(BR2_PACKAGE_RPI_FIRMWARE_CMDLINE) >
> > $(BINARIES_DIR)/rpi-firmware/cmdline.txt
> >  	$(RPI_FIRMWARE_INSTALL_DTB)
> >  	$(RPI_FIRMWARE_INSTALL_DTB_OVERLAYS)
> >  endef
> > --
> > 2.1.4
> > 
> > _______________________________________________
> > buildroot mailing list
> > buildroot at busybox.net
> > http://lists.busybox.net/mailman/listinfo/buildroot
> 
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics'
> |  conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___
> |               |
> | +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/
> |  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v
> |   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 

  reply	other threads:[~2015-08-10  8:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-09 15:47 [Buildroot] [PATCH 1/1] package/rpi-firmware: add configurable kernel cmdline option Ivo Slanina
2015-08-09 16:22 ` Yann E. MORIN
2015-08-10  8:12   ` Jeremy Rosen [this message]
2015-08-10 14:00     ` Thomas Petazzoni
2015-08-10 13:57   ` Thomas Petazzoni

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=1466242774.5054496.1439194348268.JavaMail.root@openwide.fr \
    --to=jeremy.rosen@openwide.fr \
    --cc=buildroot@busybox.net \
    /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