summaryrefslogtreecommitdiff
path: root/common/cmd_bootm.c
AgeCommit message (Collapse)Author
2011-01-27db8500: Verify signature of kernel before bootingRobert Rosengren
Verification of the kernel and ITP signature before allowing to boot is added. This feature is configurable and by default not activated. MeeGo- built RPM will have this enabled. ST-Ericsson ID: WP275634, ER275440 Change-Id: Ib888f39dd5dca1bc8b7d6e1b002da83a77908b07 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/11415 Tested-by: Robert ROSENGREN <robert.rosengren@stericsson.com> Reviewed-by: Michael BRANDT <michael.brandt@stericsson.com> Reviewed-by: QATOOLS Reviewed-by: Jens WIKLANDER <jens.wiklander@stericsson.com>
2009-12-21move prototypes for gunzip() and zunzip() to common.hWolfgang Wegner
Prototype for gunzip/zunzip was only in lib_generic/gunzip.c and thus repeated in every file using it. This patch moves the prototypes to common.h and removes all prototypes distributed anywhere else. Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de>
2009-12-07Merge branch 'master' into nextWolfgang Denk
Conflicts: lib_generic/zlib.c Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-12-07bootm: Fix help message's sub-command orderingPeter Tyser
The help message for the 'bootm' command listed the 'cmdline' and 'bdt' sub-commands in the wrong order which resulted in the error below when following the 'help' command's instructions: "Trying to execute a command out of order" Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-12-05Merge branch 'master' into nextWolfgang Denk
Conflicts: board/esd/plu405/plu405.c drivers/rtc/ftrtc010.c Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-12-05add lzop decompression supportPeter Korsgaard
Add lzop decompression support to the existing lzo bitstream handling (think gzip versus zlib), and support it for uImage decompression if CONFIG_LZO is enabled. Lzop doesn't compress as good as gzip (~10% worse), but decompression is very fast (~0.7s faster here on a slow ppc). The lzop decompression code is based on Albin Tonnerre's recent ARM Linux lzo support patch. Cc: albin.tonnerre@free-electrons.com Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-11-24bootm: mark local boot_os[] table staticMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-11-24Repair build fail in case CONFIG_PPC=n and CONFIG_FIT=yRemy Bohmer
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-10-03Conditionally perform common relocation fixupsPeter Tyser
Add #ifdefs where necessary to not perform relocation fixups. This allows boards/architectures which support relocation to trim a decent chunk of code. Note that this patch doesn't add #ifdefs to architecture-specific code which does not support relocation. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-09-04Add ability for arch code to make changes before we bootKumar Gala
Added a arch_preboot_os() function that cpu specific code can implement to allow for various modifications to the state of the machine right before we boot. This can be useful to setup register state to a specific configuration. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2009-07-23Re-add support for image type 'Standalone Program'Detlev Zundel
Support for this type was lost during the bootm refactoring. Signed-off-by: Detlev Zundel <dzu@denx.de>
2009-07-23Add error checking for unsupported OS types.Detlev Zundel
Signed-off-by: Detlev Zundel <dzu@denx.de>
2009-07-22Refresh LZMA-lib to v4.65Luigi 'Comio' Mantellini
Signed-off-by: Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>
2009-06-12General help message cleanupWolfgang Denk
Many of the help messages were not really helpful; for example, many commands that take no arguments would not print a correct synopsis line, but "No additional help available." which is not exactly wrong, but not helpful either. Commit ``Make "usage" messages more helpful.'' changed this partially. But it also became clear that lots of "Usage" and "Help" messages (fields "usage" and "help" in struct cmd_tbl_s respective) were actually redundant. This patch cleans this up - for example: Before: => help dtt dtt - Digital Thermometer and Thermostat Usage: dtt - Read temperature from digital thermometer and thermostat. After: => help dtt dtt - Read temperature from Digital Thermometer and Thermostat Usage: dtt Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-04-04rename include/zlib.h to include/u-boot/zlib.hJean-Christophe PLAGNIOL-VILLARD
Some systems have zlib.h installed in /usr/include/. This isn't the desired file for u-boot code - we want the one in include/zlib.h. This rename will avoid the conflict. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-02-21bootm: Reduce the unnecessary memmoveMinkyu Kang
Although load address and image start address are same address, bootm command always does memmove. That is unnecessary memmove and can be taken few milliseconds (about 500 msec to 1000 msec). If skip this memmove, we can reduce the boot time. Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2009-01-28Command usage cleanupPeter Tyser
Remove command name from all command "usage" fields and update common/command.c to display "name - usage" instead of just "usage". Also remove newlines from command usage fields. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-01-28Standardize command usage messages with cmd_usage()Peter Tyser
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-01-27Fix gunzip in case of insufficient output bufferMatthias Fuchs
U-Boot's gunzip() function does not handle the return code of zlib's inflate() function correctly. gunzip() is implemented to uncompress all input data in one run. So the correct return code for the good case is Z_STREAM_END. In case of insufficient output buffer memory inflate returns Z_OK. For gunzip() this is an error. It also makes sense to me to call inflateEnd() also in case of an error. Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
2008-10-29bootm: Added CONFIG_BOOTM_{LINUX, NETBSD, RTEMS}Kumar Gala
Added the ability to config out bootm support for Linux, NetBSD, RTEMS Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-10-29bootm: Add subcommandsKumar Gala
Add the ability to break the steps of the bootm command into several subcommands: start, loados, ramdisk, fdt, bdt, cmdline, prep, go. This allows us to do things like manipulate device trees before they are passed to a booting kernel or setup memory for a secondary core in multicore situations. Not all OS types support all subcommands (currently only start, loados, ramdisk, fdt, and go are supported). Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-10-29bootm: Move to using a function pointer table for the boot os functionKumar Gala
This removes a bit of code and makes it easier for the upcoming sub bootm command support to call into the proper OS specific handler. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-10-18Added arch_lmb_reserve to allow arch specific memory regions protectionKumar Gala
Each architecture has different ways of determine what regions of memory might not be valid to get overwritten when we boot. This provides a hook to allow them to reserve any regions they care about. Currently only ppc, m68k and sparc need/use this. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-10-18rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-10-13Fix lzma uncompress call (image_start wrongly used instead image_len)Luigi 'Comio' Mantellini
Signed-off-by: Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>
2008-09-13Add support for LZMA uncompression algorithm.Luigi 'Comio' Mantellini
Signed-off-by: Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-09bootm_load_os: fix load_end debug messageJean-Christophe PLAGNIOL-VILLARD
print load_end value not pointer Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-09bootm: enable fdt support only on ppc, m68k and sparcJean-Christophe PLAGNIOL-VILLARD
...as done in image.c Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-09FIT: make iminfo check hashes of all images in FIT, return 1 on failed checkBartlomiej Sieka
Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
2008-09-09Add support for booting of INTEGRITY operating system uImagesPeter Tyser
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2008-09-09Remove support for booting ARTOS imagesKumar Gala
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>
2008-09-08common/cmd_bootm.c: fix printf() format warningsWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-09-07Prevent crash if random/invalid ramdisks are passed to bootmKumar Gala
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>
2008-09-07Prevent crash if random DTB address is passed to bootmAnatolij Gustschin
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>
2008-08-26bootm: refactor do_reset and os boot function argsKumar Gala
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>
2008-08-26bootm: refactor image detection and os load stepsKumar Gala
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>
2008-08-26bootm: move lmb into the bootm_headers_t structureKumar Gala
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>
2008-08-26bootm: Set working fdt address as part of the bootm flowKumar Gala
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>
2008-08-26bootm: refactor fdt locating and relocation codeKumar Gala
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>
2008-08-26bootm: refactor ramdisk locating codeKumar Gala
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>
2008-08-26bootm: refactor entry point codeKumar Gala
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>
2008-08-19Clean up usage of icache_disable/dcache_disableKumar Gala
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>
2008-08-12Fix fallout from autostart revertKumar Gala
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>
2008-08-10Revert "[new uImage] Add autostart flag to bootm_headers structure"Wolfgang Denk
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>
2008-07-31Uncompressed images loaded to their start address shall set load_end tooGuennadi Liakhovetski
Signed-off-by: Guennadi Liakhovetski <lg@denx.de> Acked-by: Bartlomiej Sieka <tur@semihalf.com>
2008-07-31cmd_bootm.c: Fix problem with '#if (CONFIG_CMD_USB)'Stefan Roese
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>
2008-07-30Fix remaining CFG_CMD_ define, ifdef and commentsJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-07-15Prepare v1.3.4-rc1: Code cleanup, update CHANGELOG, sort MakefileWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-10USB: shutdown USB before bootingMarkus Klotzbücher
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>
2008-07-10Fix some more print() format errors.Wolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>