summaryrefslogtreecommitdiffstats
path: root/commands/bootm.c
Commit message (Collapse)AuthorAgeFilesLines
* bootm: Do not cross 1MiB sections for the devicetreeSascha Hauer2012-11-011-1/+9
| | | | | | | | ARM Linux only maps a single 1MiB section for the devicetree. This has a 1Mib alignment, so we are not allowed to cross such a boundary. Align the devicetree to the next power of two so that this never happens. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: Add a define for the additional devicetree sizeSascha Hauer2012-11-011-2/+9
| | | | | | | | The fixed devicetree may need more space than the original one. We used to use 0x8000 here. Add a define for it to have the space defined at a single place. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: close open filesVicente2012-10-101-1/+5
| | | | | Signed-off-by: Vicente <vicencb@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-171-4/+0
| | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* trivial: bootm: correct grammar in error messageSteffen Trumtrar2012-08-311-1/+1
| | | | | Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: do not load the initrd in the common codeJean-Christophe PLAGNIOL-VILLARD2012-08-131-8/+0
| | | | | | | This need to be handled by the arch bootm as the address can be invalid and provided at arch level. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* resource: store 'end' instead of 'size' in struct resourceSascha Hauer2012-07-011-4/+2
| | | | | | | | | | Storing the size instead of the resource end in struct resource was a mistake. 'size' ranges from 0 to UINT[32|64]_MAX + 1 which obviously leads to problems. 'end' on the other hand will never exceed UINT[32|64]_MAX. Also this way we can express a iomem region covering the whole address space. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: Add default images variablesSascha Hauer2012-05-181-14/+52
| | | | | | | | | | It turns out useful to be able to configure bootm before its usage. This allows us to overwrite bootm settings on an individual base. This patch adds global variables to configure the kernel image, the initrd image and the devicetree image. These values will be used unless overwritten explicitely with command line switches. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: fix initrd handlingSascha Hauer2012-05-011-14/+10
| | | | | | | | bootm_initrd tests for data->initrd, but this never becomes true because the settingof data->initrd is inside a if(bootm_initrd()). Fix this. Also, do not support the initrd options when initrd is disabled. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'binfmt' of git://git.jcrosoft.org/barebox into nextSascha Hauer2012-04-181-0/+12
|\
| * bootm: add uimage binfmt supportJean-Christophe PLAGNIOL-VILLARD2012-04-181-0/+12
| | | | | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | bootm: Align oftreeSteffen Trumtrar2012-04-181-6/+10
| | | | | | | | | | | | | | | | | | | | Arm needs 64-Bit alignment of the oftree as mentioned in the documentation Documentation/arm/Booting. Other architectures may need a bigger alignment so align to 4K. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | bootm: Fix check for ret-valueSteffen Trumtrar2012-04-181-4/+3
|/ | | | | | | | The intention of this code was to check the return value of fdt_open_into. Fix this. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: be more informative with oftreesSascha Hauer2012-04-141-4/+6
| | | | | | | | - print error message when the specified oftree cannot be opened - move verbose info to top of function so that the information is printed before something else fails. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: remove struct command pointer from commandsSascha Hauer2012-02-271-1/+1
| | | | | | This is unused in all commands and thus can be removed. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* uimage: Fix error messageSascha Hauer2012-02-131-1/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'work/uimage' into nextSascha Hauer2011-12-171-125/+326
|\ | | | | | | | | | | | | | | | | Conflicts: arch/ppc/lib/ppclinux.c commands/bootm.c include/boot.h Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * bootm: use new uimage codeSascha Hauer2011-12-151-125/+326
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+5
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'pu/ppc-oftree' into nextSascha Hauer2011-12-151-0/+5
|\ \
| * | ppc: switch to libfdt based oftree implementationSascha Hauer2011-12-151-0/+5
| |/ | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* / remove unused watchdog headerSascha Hauer2011-12-151-1/+0
|/ | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: factor out initrd code from option parserSascha Hauer2011-12-071-11/+15
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: remove dead codeSascha Hauer2011-11-291-8/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: use generic uncompress functionSascha Hauer2011-11-291-27/+4
| | | | | | | | | This simplifies the code somewhat. The user visible change here is that we now ignore the compression specified in the uImage. Instead we detect the compression type from the data which also means that we now support lzo compressed uImages. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: do not select uncompression methodsSascha Hauer2011-11-291-2/+2
| | | | | | | Instead, let the user select them manually so that bootm supports all compression types compiled in. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* add kernel gunzip implementationSascha Hauer2011-11-291-4/+6
| | | | | | | The kernel uncompression functions have a unified API so use this implementation to get it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* use kernel bunzip implementationSascha Hauer2011-11-291-11/+12
| | | | | | | | The kernel uncompression functions have a unified API. Switch to the kernel implementation to unify the different uncompression APIs. As a bonus the kernel implementation is much smaller. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: use initrd_address and initrd_sizeSascha Hauer2011-11-291-5/+6
| | | | | | Make these fields in struct image_data the reference for image handlers Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: push relocate_image up to the generic commandSascha Hauer2011-11-291-0/+17
| | | | | | | | | All handlers used to just relocate the image without any checks, so we are doomed if we write outside of SDRAM or will overwrite ourselves. Move the relocation up to the generic part where we have a chance of catching these issues. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm relocate_image: honour load_addressSascha Hauer2011-11-291-7/+7
| | | | | | | | | the uImage should be relocated to load_address. This is handled correctly in gzip/bzip2 compressed images, but not in uncompressed images. fix this. Also, when a variable is not used once without casting to another type it probably means that its type is wrong. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: fix typo, update help strSascha Hauer2011-11-291-2/+2
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: do not require -L after -rSascha Hauer2011-11-291-8/+5
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: fix various memory leaksSascha Hauer2011-11-291-8/+11
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: remove image handler optionsSascha Hauer2011-11-291-54/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: handle initrds inlineSascha Hauer2011-11-291-50/+28
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* factor out iminfo commandSascha Hauer2011-11-291-79/+0
| | | | | | | | The rests of U-Boots iminfo command are sitting in commands/bootm.c and are in a nonusable state. Factor it out to its own file and make it work again. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: remove dead codeSascha Hauer2011-11-291-47/+0
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'work/magicvars' into nextSascha Hauer2011-11-291-0/+3
|\
| * bootm: Add bootargs magicvarSascha Hauer2011-11-291-0/+3
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | remove irq support fragmentsSascha Hauer2011-11-281-2/+0
|/ | | | | | | | We never had interrupt support in barebox and we have no plans to add interrupt support. Even if we do I doubt the current fragments of irq support are helpful, so remove them. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: add -L option to specify the initrd load addressJean-Christophe PLAGNIOL-VILLARD2011-10-091-3/+17
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* get_fake_image_handle: set nb_data_entries to 1 and update the header sizeJean-Christophe PLAGNIOL-VILLARD2011-10-091-0/+2
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* bootm: ensure the uImage is mapped first to allow option to used itJean-Christophe PLAGNIOL-VILLARD2011-10-091-4/+16
| | | | | | | needed for multi image support Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* image: move map_image amd unmap_image to image.cJean-Christophe PLAGNIOL-VILLARD2011-09-281-114/+0
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* image: add multi image support for bootmJean-Christophe PLAGNIOL-VILLARD2011-09-281-2/+76
| | | | | | | you can choose the initrd via @<num> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* image: use data base addr for image_print_contents, image_multi_count/getimgJean-Christophe PLAGNIOL-VILLARD2011-09-281-1/+1
| | | | | | | | as in barebox the data could be the mapped file or a allocated memory with just the data (non header) Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands/bootm.c: fix unused-but-set-variable gcc warningAntony Pavlov2011-07-041-2/+1
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Remove m68k supportSascha Hauer2010-11-171-1/+0
| | | | | | | | | The m68k support is compile broken for a long time now and nobody cared so far. We cannot keep the architecture uptodate with current development wihtout being able to compile it. It's still in the archives and can be re-added anytime once somebody cares for. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* doc: add documentation for 'bootm'Robert Schwebel2010-11-011-15/+23
| | | | Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>