summaryrefslogtreecommitdiffstats
path: root/include/boot.h
Commit message (Collapse)AuthorAgeFilesLines
* boot: Allow to register boot entry providersSascha Hauer2017-04-061-0/+2
| | | | | | | | | | 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>
* boot: Move code to common/Sascha Hauer2016-07-261-0/+9
| | | | | | | | | 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>
* bootentries: Move struct bootentries to include/boot.hSascha Hauer2016-07-261-0/+20
| | | | | | | 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>
* include: Move bulk of boot.h to bootm.hSascha Hauer2016-07-261-120/+0
| | | | | | | | The majority of the stuff currently in include/boot.h is about bootm code implemented common/bootm.c. To be more consistent move it to a new file include/bootm.h. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: Add verify mode "available"Sascha Hauer2016-05-101-0/+1
| | | | | | | | | The verify "available" mode checks whatever is available in the booted image, so when an image has a signature, it is checked and must be correct and when an image is hashed, it is also checked for correctness. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: Move bootm options to common/KconfigSascha Hauer2016-05-101-1/+1
| | | | | | | | | | | | bootm has a C API, so the bootm options have to depend on the option providing the bootm code (CONFIG_BOOTM), not on the option providing the command (CONFIG_CMD_BOOTM). Fixing the dependencies makes it possible to fully use bootm from C without enabling the bootm command support. This also removes the CMD_ prefix from the options which means we have to update the defconfigs aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: Optionally add a root= option to Kernel command lineSascha Hauer2016-05-041-0/+5
| | | | | | | | | It becomes a common case that the Kernel is loaded from the filesystem which later becomes the rootfs. This adds a possibility to let bootm automatically append the root= option to the kernel command line. This is done when global.bootm.appendroot is true. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: add initial FIT supportJan Luebbe2016-01-261-0/+4
| | | | | | | | | | | | | | | This implementation is inspired by U-Boot's FIT support. Instead of using libfdt (which does not exist in barebox), configuration signatures are verified by using a simplified DT parser based on barebox's own code. Currently, only signed configurations with hashed images are supported, as the other variants are less useful for verified boot. Compatible FIT images can be created using U-Boot's mkimage tool. Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: make verifying/hashing configurableSascha Hauer2016-01-261-2/+10
| | | | | | | | | So long struct bootm_data.verify is a bool which enables CRC checking (hashing). Extend this to a enum and add support for signature checking in the same option. This also adds the corresponding globalvar and a -s option to bootm. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: Initialize bootm_data defaults in single placeSascha Hauer2016-01-261-0/+2
| | | | | | | | Both the bootm and the boot code initialize the struct bootm_data with defaults from the bootm global variables. Create a common function for doing this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: move initrd code togetherSascha Hauer2016-01-261-0/+3
| | | | | | | The initrd code is distributed in several places in the bootm code. Move it all together in bootm_load_initrd(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: use names instead of numbers for image partsSascha Hauer2016-01-221-3/+3
| | | | | | | | | The uImage format uses numbers for to identify the different parts of a image, but the FIT image format uses names. To better integrate the FIT image format into bootm always use names and convert them to numbers when necessary. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: introduce bootm_get_os_sizeSascha Hauer2016-01-221-0/+1
| | | | | | | | ARM do_bootm_linux is not only called with uImages but also with raw images, so we can't use uimage_get_size() here. Introduce bootm_get_os_size() which handles the different image types. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: introduce bootm_load_devicetree helperSascha Hauer2014-01-141-0/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: introduce bootm_load_initrd helperSascha Hauer2014-01-141-0/+1
| | | | | | | Make the bootm handlers simpler by factoring out an initrd load function. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: introduce bootm_load_os helperSascha Hauer2014-01-101-0/+2
| | | | | | | | | | The common bootm code used to load uImage contents to SDRAM before calling into the handlers if possible. This makes the handlers complicated since they have to handle many cases. Instead, introduce a helper to load the os after the handlers have figured out a good load address. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: Replace getenv_loadaddr with getenv_ulSascha Hauer2013-10-071-2/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: Add dryrun supportSascha Hauer2013-09-241-0/+2
| | | | | | This adds support for checking the bootm command without actually booting. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: separate bootm input data and internal dataSascha Hauer2013-09-241-2/+14
| | | | | | | | | | | | We used to use struct image_data as the central data structure for bootm and also as the input data structure. This makes it unclear which of the fields are actually input data. This patch creates a struct bootm_data which is exclusively used for input data to make usage clearer. Also it moves the dispatching of multifile uImage pathnames to the core bootm code so that the core code gets more flexible and the command code simpler. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: move getenv_loadaddr from command to commonSascha Hauer2013-09-241-0/+2
| | | | | | | getenv_loadaddr may be used by other code, so move it from command/ to common/ Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: factor out code to make it usable from CSascha Hauer2013-06-191-0/+8
| | | | | | | Much of the bootm code is implemented in the command itself. Move it to a common place to be able to call it from C aswell. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: Pass unflattened devicetree to handlersSascha Hauer2013-03-061-0/+1
| | | | | | | | | This makes it possible to modify the tree in the handlers. This is necessary because the initrd addresses are only known inside the handlers, but not to the generic bootm code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* booting: more flexible Linux bootargs generationSascha Hauer2012-05-141-0/+16
| | | | | | | | | | | | | | | | | | | | | | We currently use the environment variable 'bootargs' to get the Linux bootargs. This patch allows for a more flexible bootargs generation using global variables. With it the Linux bootargs are concatenated from multiple variables. This allows to replace parts of the bootargs string without having to reconstruct it completely. With this bootargs can be constructed like: global linux.bootargs.base="console=ttyS0,115200" global linux.bootargs.ip="ip=dhcp" global linux.mtdparts="physmap-flash.0:512K(nor0.barebox),-(root)" This will then automatically be combined into a kernel bootargs string during boot. If the 'linux.bootargs.' variables are all empty the old standard 'bootargs' way will be used. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: use new uimage codeSascha Hauer2011-12-151-7/+55
| | | | | | | | | | | | | | This switches the bootm code to the new uimage code. Also bootm can now handle other types of images than uImages. Currently the only architecture making use of this is arm which allows to boot zImages, raw images and barebox images. I intended to make a more bisectable series from this but I failed becuase there are many dependencies and no matter how I tried the patches grew bigger and and bigger. So I decided to put this all in a single patch. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* ppc: switch to libfdt based oftree implementationSascha Hauer2011-12-141-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: use initrd_address and initrd_sizeSascha Hauer2011-11-291-0/+1
| | | | | | Make these fields in struct image_data the reference for image handlers Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: do not require -L after -rSascha Hauer2011-11-291-0/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: remove image handler optionsSascha Hauer2011-11-291-4/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* list: remove duplicated list.hSascha Hauer2009-11-031-1/+1
| | | | | | | | We accidently have two list implementations in the tree: include/list.h and include/linux/list.h. This patch moves the latter (newer one) to include/linux/list.h. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* - Add functions to register image handlers for booting uImagesSascha Hauer2008-02-201-6/+20
|
* cleanup do_bootm_linux()Robert Schwebel2007-11-281-2/+4
| | | | | | | | This patch cleans up the do_bootm_linux() function. It removes most of the uggly ifdefery and replaces it by a sane function optimizing structure. Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
* use memmap() to save one memcpy call in bootmSascha Hauer2007-07-151-12/+2
|
* svn_rev_625Sascha Hauer2007-07-051-0/+22