summaryrefslogtreecommitdiffstats
path: root/common/boot.c
Commit message (Collapse)AuthorAgeFilesLines
* boot: Make independent of command supportSascha Hauer2018-02-061-1/+1
| | | | | | | | The boot code works with command support disabled if we skip support for boot scripts. Bail out before parsing boot scripts and allow to build with command support disabled. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Revert "globalvar: make globalvar functions more consistent"Sascha Hauer2017-06-131-1/+1
| | | | This reverts commit 1b4a05c9263ae26083526acfabdea1ef96531a1d.
* globalvar: make globalvar functions more consistentSascha Hauer2017-04-111-1/+1
| | | | | | | | | Similar to the device parameter functions also make the globalvar functions more consistent. This also adds support for readonly globalvars and changes several existing globalvars which should really be readonly to readonly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootchooser: register as bootentry providerSascha Hauer2017-04-061-6/+0
| | | | | | | | Instead of using a global function called by bootentry_create_from_name(), register the bootchooser as bootentry provider. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* blspec: register as bootentry providerSascha Hauer2017-04-061-12/+0
| | | | | | | | Instead of using a global function called by bootentry_create_from_name(), register blspec as bootentry provider. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* boot: Allow to register boot entry providersSascha Hauer2017-04-061-0/+26
| | | | | | | | | | bootentry_create_from_name() takes a name and creates bootentries for it. It tries different providers that interpret the name: blspec, bootchooser or script pathes. Instead of hardcoding the different providers in the function, allow the providers to register themselves. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* menu: sanitize menu_add_titleSascha Hauer2017-01-101-1/+1
| | | | | | | | passing a string to menu_add_title() which then gets free by this function is just plain ugly. Pass it a const char * which gets duplicated in menu_add_title() when necessary. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* boot: add framework for redundant boot scenariosMarc Kleine-Budde2016-09-221-0/+7
| | | | | | | | | | | | | | | There are several use cases where a redundant Linux system is needed. The barebox bootchooser framework provides the building blocks to model different use cases without the need to start from the scratch over and over again. The bootchooser works on abstract boot targets, each with a set of properties and implements an algorithm which selects the highest priority target to boot. See the documentation contained in this patch for more information. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/menu'Sascha Hauer2016-09-131-3/+7
|\
| * rework menu so that it can support multiline titlesAleksey Kuleshov2016-09-051-2/+6
| | | | | | | | | | Signed-off-by: Aleksey Kuleshov <rndfax@yandex.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * properly remove menu entryAleksey Kuleshov2016-08-181-0/+1
| | | | | | | | | | Signed-off-by: Aleksey Kuleshov <rndfax@yandex.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * fix double freeAleksey Kuleshov2016-08-181-1/+0
| | | | | | | | | | | | | | | | it already gets free in bootentries_free no need to do this in ->release method Signed-off-by: Aleksey Kuleshov <rndfax@yandex.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | blspec: Handle nfs:// pathes from bootSascha Hauer2016-08-291-1/+2
|/ | | | | | | | | | Fixes: cb47dde boot: Call blspec_scan_directory() only on strings containing an absolute path This commit introduced a check if the path contains a '/' at the beginning. For booting a bootloader spec entry from NFS we have to test the path for starting with "nfs://" aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* boot: add single quotes when printing boot target namesSascha Hauer2016-07-261-3/+3
| | | | | | | It's nicer to read when target names have quotes around them, it makes it clear that this is a string passed in somewhere. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* boot: Move code to common/Sascha Hauer2016-07-261-0/+339
Normally code in commands/ shall only do the option parsing whereas the functionality shall be in common/ to make the code usable from C aswell. Do this in the boot code aswell, move it to common/boot.c and add the function prototypes to include/boot.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>