On Sun, Apr 15, 2012 at 06:57:09PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > On 18:22 Sun 15 Apr , Sascha Hauer wrote: > > The current default environment grows in complexity and still is > > quite unflexible. The basic mistake we (or better I) made is that > > we had a boot script and tried to control its behaviour with > > variables passed to this script. This had the consequence that > > with every new feature we had to pass another variable to this > > script and add another if/else to the script. This environment > > set inverts this behaviour. It introduces a set of helper functions > > which /env/config can use to do its job. > > > > The helpers are: > > > > /env/bin/ifup > > > > bring up networking. Uses /env/network/$interface to configure the > > interface. If something has to be done to discover the interface (for > > USB devices), the code can be put into /env/network/${interface}-discover > > > > /env/bin/bootargs-root-* > > > > Add fields to $bootargs relevant for the kernel to find its rootfs. We > > currently have helpers for ubi, nfs, initrd and jffs2 > > > > /env/bin/bootargs-ip-* > > > > Add fields to $bootargs relevant for the kernel to configure networking. > > Currently we have helpers for dhcp, static or ip=none > > > > /env/bin/mtdparts-init > > /env/bin/mtdparts-add > > > > Add barebox partitions to mtd like devices and construct the mtdparts > > Kernel option. > > > > Additionally the automount feature is used to transparently mount > > filesystems. With this only the device/file which contains the kernel > > has to be specified in /env/config. > > can you give us few days to try before apply it Sure, no problem. In fact I would be glad to get some feedback on this. Changing the defaultenv can be quite painful later when the board files are changed. I am sure though that something like that is needed, the current defaultenv doesn't bring us much further. 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 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox