With this every devicetree is first converted to the barebox internal
format before it's converted back to dtb again.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This allows to boot a sequence of boot entries until one succeeds.
boot sources can be passed in $global.boot.default, which is now treated
as a list. Also a list of boot entries can be specified as arguments
to the boot script. The entries can be:
- a plain filename from /env/boot/
- a full path to an arbitrary file
- a directory containing boot entries
With this this command:
boot net nand-ubi /env/boot.d
would first use the /env/boot/net entry, if this fails the /env/boot/nand-ubi
entry and if this also fails the files from /env/boot.d/ (which could also
be links to boot scripts)
To make the above the default, global.boot.default would be specified as:
global.boot.default="net nand-ubi /env/boot.d"
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
- heavily copied from register_persistant_environment which was
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Use puts() because printf() isn't necessary,
to fix the following compiler warnings:
/barebox/common/menu.c: In function ‘menu_show’:
/barebox/common/menu.c:277:4: warning: format not a string literal and no format arguments [-Wformat-security]
/barebox/scripts/omap4_usbboot.c: In function ‘read_asic_id’:
/barebox/scripts/omap4_usbboot.c:101:3: warning: format not a string literal and no format arguments [-Wformat-security]
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Vicente <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
form linux 3.8
so you can have part by num or name
not by GUID as this is a non human reading name
`---- ffe08000.sata
`---- 0x00000000-0x3fffffff: /dev/ata0
`---- 0x00100000-0x063fffff: /dev/ata0.0
`---- 0x00100000-0x063fffff: /dev/ata0.boot
`---- 0x06400000-0x3fefffff: /dev/ata0.1
`---- 0x06400000-0x3fefffff: /dev/ata0.linux
Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
so we can register partion with name as present in EFI GPT
Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
so we can support multiple format
use filetpye to detect the parser to use
Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
GPT need to be check before MBR
Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The different console implementations share a good amount of code,
share this in console_common.c.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Add the initrd start and end address to the DT, code comes from u-boot.
Signed-off-by: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This patch add getopt to the command list if it enabled via
Kconfig. With this patch we get a 'command not found' error.
Otherwise getopt doing nothing.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This optionally enabled the MMU in the PBL or during early startup for
the non PBL case. The regular MMU init code will pickup the already enabled
MMU later. This might complicate debugging early code, so this has been
made optional.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
so it more easy to add new entry and to maintain
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
this will allow to have no console support
Use full for bootstrap as we can save 6.5 KiB (barebox.bin) and
3.8 KiB (zbarebox.bin lzo) on at91sam9263 as example vs console simple
As on bootstrap we have often very limited size.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
so we can add easly the console_none support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
environment.h is for environment variables, not for the environment
storage (envfs), so move the prototypes to envfs.h
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Currently Kconfig dependencies are used to allow non-interactive builds.
This leads to problems in Kconfig getting the dependencies right.
This patch adds a barebox_main function pointer which is called at the
end of the startup process. This defaults to run_shell when a shell is
enabled.
With this the HAVE_NOSHELL Kconfig variable can be removed. Non interactive
builds can now be enabled for every board allowing to compile a binary
without further Kconfig dependencies. This also allows for more flexibility,
for example boards may decide to try non-interactive startup first and
call run_shell if that fails.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This has several improvements for the oftree command:
- loading a devicetree (-l) and actually probing (-p) it now is separated
- the command now can dump the internal devicetree or a dtb given on the
command line.
- The -f option now actually frees the internal devicetree
With this the usage pattern for this command is:
oftree -l /env/oftree
oftree -d -n /sound
oftree -d /env/oftree
oftree -f
oftree -p
oftree -l -p /env/oftree
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>