summaryrefslogtreecommitdiffstats
path: root/include/blspec.h
Commit message (Collapse)AuthorAgeFilesLines
* bootentries: Move struct bootentries to include/boot.hSascha Hauer2016-07-261-20/+1
| | | | | | | The boot function prototypes are declared in include/blspec.h. Move them to include/boot.h where they belong. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* blspec: Make blspec_boot staticSascha Hauer2016-07-261-2/+0
| | | | | | | Since blspec_boot is now only used locally we can make it static. Move it up to avoid a static declaration. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* blspec: separate bootentries from blspec entriesSascha Hauer2016-07-261-56/+4
| | | | | | | | | This completes the separation of the blspec code from the boot code. With this the boot code only handles generic boot entries of type struct bootentry which are embedded into the type (blspec/bootscript) specific structs. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootentries: Add title/descriptionSascha Hauer2016-07-261-0/+4
| | | | | | | | | | We currently have to special case blspec entries vs. boot scripts in the common boot code since we want to print different informations about them. This adds a 'title' and 'description' which can be filled in with different information by bootscripts and blspec entries and so we get rid of the special handling. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* blspec: factor out a struct bootentrySascha Hauer2016-07-261-11/+18
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* blpec: rename struct lspec -> bootentriesSascha Hauer2016-07-261-19/+19
| | | | | | | | | | | The code in common/boot.c collects the different boot entries in lists of type struct blspec, eventhough many of them may not be bootloader spec entries but for example boot scripts. This is the first step of separating the data structures from boot entries and bootloader spec: As struct blspec is merely a container for collecting boot entries We simply rename struct blspec to struct bootentries. No functional change. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* blspec: remove unused function prototypeSascha Hauer2016-07-221-2/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* blspec: Remove once/default handlingSascha Hauer2016-07-221-11/+0
| | | | | | | | This is widely unused and in the way of subsequent cleanups. If you are indeed using it please complain on the list, we'll find a solution to add it back in a different way. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* blspec: remove unused blspec_boot_devicenameSascha Hauer2016-07-221-2/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* blspec: Add missing prototype for blspec_scan_deviceSascha Hauer2015-06-171-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* blspec: honor default/once entries againSascha Hauer2014-03-241-1/+9
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* blspec: make cdev optionalSascha Hauer2013-11-051-0/+1
| | | | | | | | | the cdev for a given directory can be determined by get_cdev_by_mountpath(). Use this function and remove the cdev argument from blspec_scan_directory(). Also, export the function to make code possible which boots the bootloader spec entries found in directories. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* blspec: Let scan functions return the number of entries foundSascha Hauer2013-11-051-1/+1
| | | | | | So that callers can detect whether entries are found or not. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* blspec: rename _hwdevice functions to _devicenameSascha Hauer2013-11-051-2/+2
| | | | | | | Since it's not necessarily the hardware device this seems to be a more appropriate name. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* blspec: Fix crash with menu disabledSascha Hauer2013-10-301-1/+2
| | | | | | | blspec->menu is only valid when menu support is enabled. Check for it before dereferencing the pointer. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Implement bootloader spec support for bareboxSascha Hauer2013-10-141-0/+92
The Bootloader Specification describes a way how kernels can be installed on devices and how they can be started by the bootloader. The bootloader spec is currently supported by (x86) gummiboot and by systemd which provides a kernel-install script. With the bootloader spec it's possible for the Operating system to install a new kernel without knowing about the bootloader and for the bootloader it's possible to discover and start Operating Systems on a media without being configured. For more details about the spec see: http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec/ This patch adds barebox support for the spec. It enhances the 'boot' command so that not only boot script names can be given, but also devices containing bootloader spec entries. With this it's possible to call the 'boot' command like: 'boot sd emmc net'. It would then first look for bootloader spec entries on the (removable) sd card, then, is nothing is found, on the internal emmc and if still unsuccessful would call the 'net' bootscript. The bootloader Spec currently doesn't specify which entry should be default if multiple entries are found on a single device. Therefore barebox currently has two extensions of the spec. The $BOOT diretory can contain a file named 'default'. If present, the content of the file is treated as a filename under $BOOT/loader/entries/ which is used as default. Similarly if a file named 'once' is present, the entry is started once and the file is removed afterwards. This is useful for testing if a newly installed kernel works before making it the default. As on ARM and other Architectures a devicetree has to be specified for the kernel, the 'devicetree' property is used to specify a devicetree. Like 'kernel' and 'initrd' this also contains a pth relative to $BOOT. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>