summaryrefslogtreecommitdiffstats
path: root/common/bootm.c
Commit message (Collapse)AuthorAgeFilesLines
* move file helper functions to separate fileSascha Hauer2014-08-071-0/+1
| | | | | | | | | | We have our file helper functions in several places. Move them all to lib/libfile.c. With this we no longer have file helpers in fs/fs.c which contains the core fs functions and no functions in lib/libbb.c which are not from busybox. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fix format specifiersSascha Hauer2014-06-051-2/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: beautify outputHolger Schurig2014-06-021-2/+2
| | | | | | | | | * fix indentation of options in 'help bootm' * add missing help for -m * put some output into debug/verbose mode Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* misc: upper-case some abbreviationsHolger Schurig2014-06-021-2/+2
| | | | | Signed-off-by: Holger Schurig <holgerschurig@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* of: Drop devicetree merge supportSascha Hauer2014-05-221-1/+1
| | | | | | | | | | | | I assume I am the only person knowing that barebox is able to merge devicetrees. This feature seems broken for a while now since trying to merge devicetress results in: unflatten: too many end nodes Remove this feature to save the complexity. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: Return error when devicetree file is not a dtbSascha Hauer2014-02-131-0/+1
| | | | | | | We check whether the file passed as devicetree actually is a devicetree, but we missed to return an error if it's not. Fix this. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: introduce bootm_load_devicetree helperSascha Hauer2014-01-141-0/+63
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: introduce bootm_load_initrd helperSascha Hauer2014-01-141-0/+38
| | | | | | | 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-9/+40
| | | | | | | | | | 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-13/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: Add dryrun supportSascha Hauer2013-09-241-1/+5
| | | | | | 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/+44
| | | | | | | | | | | | 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 globalvars from command to commonSascha Hauer2013-09-241-0/+16
| | | | | | | The globalvars should be available even if the bootm command is not directly present. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: move getenv_loadaddr from command to commonSascha Hauer2013-09-241-0/+13
| | | | | | | 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: check for os image fileSascha Hauer2013-09-241-0/+5
| | | | | | Check if an os image file has been given. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: fix memory leakSascha Hauer2013-09-241-0/+2
| | | | | | | data->of_root_node may be allocated from of of_unflatten_dtb. Free it in this case. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: fix possible memory leakSascha Hauer2013-09-241-0/+1
| | | | | | fdt is allocated, free it in error case. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: factor out code to make it usable from CSascha Hauer2013-06-191-0/+303
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>