summaryrefslogtreecommitdiff
path: root/common/cmd_bootm.c
Commit message (Collapse)AuthorAgeLines
* FIT: make iminfo check hashes of all images in FIT, return 1 on failed checkBartlomiej Sieka2008-09-09-0/+6
| | | | Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
* Add support for booting of INTEGRITY operating system uImagesPeter Tyser2008-09-09-0/+38
| | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Remove support for booting ARTOS imagesKumar Gala2008-09-09-99/+0
| | | | | | | | | | | Pantelis Antoniou stated: AFAIK, it is still used but the products using PPC are long gone. Nuke it plz (from orbit). So remove it since it cleans up a usage of env_get_char outside of the environment code. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* common/cmd_bootm.c: fix printf() format warningsWolfgang Denk2008-09-08-2/+2
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Prevent crash if random/invalid ramdisks are passed to bootmKumar Gala2008-09-07-1/+1
| | | | | | | | | Adds returning an error from the ramdisk detection code if its not a real ramdisk (invalid). There is no reason we can't just return back to the console if we detect an invalid ramdisk or CRC error. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* Prevent crash if random DTB address is passed to bootmAnatolij Gustschin2008-09-07-1/+2
| | | | | | | | | This patch adds bootm_start() return value check. If error status is returned, we do not proceed further to prevent board reset or crash as we still can recover at this point. Signed-off-by: Anatolij Gustschin <agust@denx.de>
* bootm: refactor do_reset and os boot function argsKumar Gala2008-08-26-32/+35
| | | | | | | | | | | | There is no need for each OS specific function to call do_reset() we can just do it once in bootm. This means its feasible on an error for the OS boot function to return. Also, remove passing in cmd_tbl_t as its not needed by the OS boot functions. flag isn't currently used but might be in the future so we left it alone. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* bootm: refactor image detection and os load stepsKumar Gala2008-08-26-90/+126
| | | | | | | | | | | | | | Created a bootm_start() that handles the parsing and detection of all the images that will be used by the bootm command (OS, ramdisk, fdt). As part of this we now tract all the relevant image offsets in the bootm_headers_t struct. This will allow us to have all the needed state for future sub-commands and lets us reduce a bit of arch specific code on SPARC. Created a bootm_load_os() that deals with decompression and loading the OS image. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* bootm: move lmb into the bootm_headers_t structureKumar Gala2008-08-26-7/+4
| | | | | | | | To allow for persistent state between future bootm subcommands we need the lmb to exist in a global state. Moving it into the bootm_headers_t allows us to do that. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* bootm: Set working fdt address as part of the bootm flowKumar Gala2008-08-26-0/+8
| | | | | | | | Set the fdt working address so "fdt FOO" commands can be used as part of the bootm flow. Also set an the environment variable "fdtaddr" with the value. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* bootm: refactor fdt locating and relocation codeKumar Gala2008-08-26-0/+10
| | | | | | | Move the code that handles finding a device tree blob and relocating it (if needed) into common code so all arch's have access to it. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* bootm: refactor ramdisk locating codeKumar Gala2008-08-26-0/+38
| | | | | | | | Move determing if we have a ramdisk and where its located into the common code. Keep track of the ramdisk start and end in the bootm_headers_t image struct. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* bootm: refactor entry point codeKumar Gala2008-08-26-9/+22
| | | | | | | Move entry point code out of each arch and into common code. Keep the entry point in the bootm_headers_t images struct. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* Clean up usage of icache_disable/dcache_disableKumar Gala2008-08-19-2/+0
| | | | | | | | | | | | There is no point in disabling the icache on 7xx/74xx/86xx parts and not also flushing the icache. All callers of invalidate_l1_instruction_cache() call icache_disable() right after. Make it so icache_disable() calls invalidate_l1_instruction_cache() for us. Also, dcache_disable() already calls dcache_flush() so there is no point in the explicit calls of dcache_flush(). Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* Fix fallout from autostart revertKumar Gala2008-08-12-3/+2
| | | | | | | | The autostart revert caused a bit of duplicated code as well as code that was using images->autostart that needs to get removed so we can build again. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* Revert "[new uImage] Add autostart flag to bootm_headers structure"Wolfgang Denk2008-08-10-1/+0
| | | | | | | | | | | | | | | | | This reverts commit f5614e7926863bf0225ec860d9b319741a9c4004. The commit was based on a misunderstanding of the (documented) meaning of the 'autostart' environment variable. It might cause boards to hang if 'autostart' was used, with the potential to brick them. Go back to the documented behaviour. Conflicts: common/cmd_bootm.c common/image.c include/image.h Signed-off-by: Wolfgang Denk <wd@denx.de>
* Uncompressed images loaded to their start address shall set load_end tooGuennadi Liakhovetski2008-07-31-3/+2
| | | | | Signed-off-by: Guennadi Liakhovetski <lg@denx.de> Acked-by: Bartlomiej Sieka <tur@semihalf.com>
* cmd_bootm.c: Fix problem with '#if (CONFIG_CMD_USB)'Stefan Roese2008-07-31-2/+2
| | | | | | | | | A recent patch used '#if (CONFIG_CMD_USB)' instead of '#if defined(CONFIG_CMD_USB)'. This patch fixes this problem and makes common/bootm.c compile again. Signed-off-by: Stefan Roese <sr@denx.de> Acked-by: Markus Klotzbuecher <mk@denx.de>
* Fix remaining CFG_CMD_ define, ifdef and commentsJean-Christophe PLAGNIOL-VILLARD2008-07-30-2/+2
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Prepare v1.3.4-rc1: Code cleanup, update CHANGELOG, sort MakefileWolfgang Denk2008-07-15-9/+9
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* USB: shutdown USB before bootingMarkus Klotzbücher2008-07-10-0/+18
| | | | | | | | | | | | | | | | | | This patch fixes a potentially serious issue related to USB which was discouvered by Martin Krause <martin.krause@tqs.de> and fixed for ARM920T. Martin wrote: Turn off USB to prevent the host controller from writing to the SDRAM while Linux is booting. This could happen, because the HCCA (Host Controller Communication Area) lies within the SDRAM and the host controller writes continously to this area (as busmaster!), for example to increase the HccaFrameNumber variable, which happens every 1 ms. This is a slightly modified version of the patch in order to shutdown USB when booting on all architectures. Signed-off-by: Markus Klotzbuecher <mk@denx.de>
* Fix some more print() format errors.Wolfgang Denk2008-07-10-1/+1
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Change lmb to use phys_size_t/phys_addr_tBecky Bruce2008-06-12-2/+3
| | | | | | | | | | | This updates the lmb code to use phys_size_t and phys_addr_t instead of unsigned long. Other code which interacts with this code, like getenv_bootm_size() is also updated. Booted on MPC8641HPCN, build-tested ppc, arm, mips. Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
* Fix build errors when CONFIG_LOGBUFFER and CONFIG_FIT are enabledMarian Balakowicz2008-05-10-11/+0
| | | | | | | | | | | Recent modifcations to LOGBUFFER handling code were incorrecly introduced to fit_check_kernel() routine during "Merge branch 'new-image' of git://www.denx.de/git/u-boot-testing", commit 27f33e9f45ef7f9685cbdc65066a1828e85dde4f. This patch cleans up this merge issue. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* Memory footprint optimizationsBartlomiej Sieka2008-04-24-2/+2
| | | | | | | | | | As suggested by Wolfgang Denk: - image printing functions: - remove wrappers - remove indentation prefix from functions' signatures - merge getenv_verify and getenv_autostart into one parametrized function Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
* Fix build breakage casued by commit c0559be371b2Wolfgang Denk2008-04-18-1/+0
| | | | | | Change env_get_char from a global function ptr to a function. Signed-off-by: Wolfgang Denk <wd@denx.de>
* Restore the ability to continue booting after legacy image overwriteMarian Balakowicz2008-04-17-11/+26
| | | | | | | | | | | Before new uImage code was merged, bootm code allowed for the kernel image to get overwritten during decompresion. new uImage introduced a check for image overwrites and refused to boot the image that got overwritten. This patch restores the old behavior. It also adds a warning when the image overwriten is a multi-image file, because in such case accessing componentes other than the first one will fail. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* Merge branch 'new-image' of git://www.denx.de/git/u-boot-testingBartlomiej Sieka2008-03-26-1244/+725
|\ | | | | | | | | | | | | | | | | Conflicts: common/cmd_bootm.c cpu/mpc8xx/cpu.c Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
| * [new uImage] Disable debuging output in preparation for merge with masterBartlomiej Sieka2008-03-20-1/+0
| | | | | | | | Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
| * [new uImage] Add proper ramdisk/FDT handling when FIT configuration is usedMarian Balakowicz2008-03-12-4/+10
| | | | | | | | | | | | | | | | Save FIT configuration provied in the first bootm argument and use it when to get ramdisk/FDT subimages when second and third (ramdisk/FDT) arguments are not specified. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] More verbose kernel image uncompress error messageMarian Balakowicz2008-03-12-2/+4
| | | | | | | | Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Use show_boot_progress() for new uImage formatMarian Balakowicz2008-03-12-4/+26
| | | | | | | | | | | | | | This patch allocates a set of show_boot_progress() IDs for new uImage format and adds show_boot_progress() calls in new uImage format handling code. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Add node offsets for FIT images listed in struct bootm_headersMarian Balakowicz2008-03-12-15/+8
| | | | | | | | | | | | | | | | This patch adds new node offset fields to struct bootm_headers and updates bootm_headers processing code to make use of them. Saved node offsets allow to avoid repeating fit_image_get_node() calls. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Re-enable interrupts for non automatic bootingMarian Balakowicz2008-03-12-1/+5
| | | | | | | | | | | | | | Re-enable interrupts if we return from do_bootm_<os> and 'autostart' environment variable is not set to 'yes'. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Add new uImage format support for kernel bootingMarian Balakowicz2008-03-12-11/+144
| | | | | | | | | | | | | | | | | | New format uImages are recognized by the bootm command, validity of specified kernel component image is checked and its data section located and used for further processing (uncompress, load, etc.) Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Add new uImage format support for imls and iminfo commandsMarian Balakowicz2008-03-11-5/+11
| | | | | | | | | | | | | | imls and iminfo can now recognize nad print out contents of the new (FIT) format uImages. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Update naming convention for bootm/uImage related codeMarian Balakowicz2008-02-29-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces the following prefix convention for the image format handling and bootm related code: genimg_ - dual format shared code image_ - legacy uImage format specific code fit_ - new uImage format specific code boot_ - booting process related code Related routines are renamed and a few pieces of code are moved around and re-grouped. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Provide ability to restrict region used for boot imagesKumar Gala2008-02-29-5/+5
| | | | | | | | | | | | | | | | Allow the user to set 'bootm_low' and 'bootm_size' env vars as a way to restrict what memory range is used for bootm. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Use lmb for bootm allocationsKumar Gala2008-02-29-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert generic ramdisk_high(), get_boot_cmdline(), get_boot_kbd() functions over to using lmb for allocation of the ramdisk, command line and kernel bd info. Convert PPC specific fdt_relocate() to use lmb for allocation of the device tree. Provided a weak function that board code can call to do additional lmb reserves if needed. Also introduce the concept of bootmap_base to specify the offset in physical memory that the bootmap is located at. This is used for allocations of the cmdline, kernel bd, and device tree as they should be contained within bootmap_base and bootmap_base + CFG_BOOTMAPSZ. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * [new uImage] Add autostart flag to bootm_headers structureKumar Gala2008-02-29-0/+1
| | | | | | | | | | | | | | | | | | The autostart env variable was dropped as part of the initial new uImage cleanup. Add it back here so the arch specific code can decide if it wants to really boot or not. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Introduce lmb from linux kernel for memory mgmt of boot imagesKumar Gala2008-02-29-0/+14
| | | | | | | | | | | | | | | | Introduce the LMB lib used on PPC in the kernel as a clean way to manage the memory spaces used by various boot images and structures. This code will allow us to simplify the code in bootm and its support functions. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * [new uImage] Add image_get_kernel() routineMarian Balakowicz2008-02-27-33/+53
| | | | | | | | | | | | | | | | Legacy image specific verification is factored out to a separate helper routine to keep get_kernel() generic and simple. Signed-off-by: Marian Balakowicz <m8@semihalf.com> Acked-by: Kumar Gala <galak@kernel.crashing.org>
| * [new uImage] Move image verify flag to bootm_headers structureMarian Balakowicz2008-02-27-26/+21
| | | | | | | | | | | | | | | | | | | | Do not pass image verification flag directly to related routines. Simplify argument passing and move it to the bootm_header structure which contains curently processed image specific data and is already being passed on the argument list. Signed-off-by: Marian Balakowicz <m8@semihalf.com> Acked-by: Kumar Gala <galak@kernel.crashing.org>
| * [new uImage] Add dual format uImage support frameworkMarian Balakowicz2008-02-25-110/+251
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds framework for dual format images. Format detection is added and the bootm controll flow is updated to include cases for new FIT format uImages. When the legacy (image_header based) format is detected appropriate legacy specific handling is invoked. For the new (FIT based) format uImages dual boot framework has a minial support, that will only print out a corresponding debug messages. Implementation of the FIT specific handling will be added in following patches. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Rename and move print_image_hdr() routineMarian Balakowicz2008-02-21-58/+3
| | | | | | | | Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Add gen_get_image() routineMarian Balakowicz2008-02-21-19/+3
| | | | | | | | | | | | | | | | | | This routine assures that image (whether legacy or FIT) is not in a special dataflash storage. If image address is a dataflash address image is moved to system RAM. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Move kernel data find code to get_kernel() routineMarian Balakowicz2008-02-07-74/+107
| | | | | | | | | | | | | | | | Verification of the kernel image (in old format) and finding kernel data is moved to a dedicated routine. The routine will also hold support for, to be added, new image format. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Factor out common routines for getting os/arch/type/comp namesMarian Balakowicz2008-02-07-65/+12
| | | | | | | | | | | | | | | | Move numeric-id to name translation for image os/arch/type/comp header fields to a helper routines: image_get_os_name(), image_get_arch_name(), image_get_type_name(), image_get_comp_name(). Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Remove standalone applications handling from boootmMarian Balakowicz2008-02-07-37/+1
| | | | | | | | | | | | | | Standalone applications are supposed to be run using the "go" command. This patch removes standalone images handling from the do_bootm(). Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Remove OF_FLAT_TREE support from PPC bootm codeMarian Balakowicz2008-02-07-9/+1
| | | | | | | | | | | | | | Support for OF_FLAT_TREE is to be obsoleted in the near future, remove related code from the bootm routines. Signed-off-by: Marian Balakowicz <m8@semihalf.com>