Passing kernel arguments - SAMA5D4EK

Sascha Hauer s.hauer at pengutronix.de
Thu Feb 5 23:33:18 PST 2015


Hi,

On Tue, Feb 03, 2015 at 05:16:53PM +0800, Bo Shen wrote:
> Hi Sascha,
> 
> On 02/03/2015 04:59 PM, Sascha Hauer wrote:
> >Note that we started with trying to build a generic default environment
> >which at some point grew into a monster. We now have the 2nd version of
> >the generic default environment which is much better. Unfortunately
> >usage of this new default environment is board specific and your board
> >isn't converted yet. If you are interested I can show you the steps to
> >convert it.
> 
> I am interested in this, could you show me the steps to convert it?
> Thanks.

Here we go:

- Add "select HAVE_DEFAULT_ENVIRONMENT_NEW" to your board config
- Enable CONFIG_DEFAULT_ENVIRONMENT in the default config
- move everything that should be run during startup to one or multiple
  scripts in /env/init/. For example the at91sam9260ek has some stuff
  depending on $armlinux_architecture, that should be done in an init
  script.
- create /env/boot/* scripts several examples can be found in the tree
- Create /env/nv/* variables for the corresponding global variables that
  you wish to have. do a "find -name nv" to see what I mean.
- /env/config should normally be empty in the board code, then the
  generic one from defaultenv/defaultenv-2-base/config is used
- MTD partitions should for now be defined in /env/init/mtdparts-* or later
  in the device tree.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list