summaryrefslogtreecommitdiff
path: root/include/image.h
Commit message (Collapse)AuthorAgeLines
* Change lmb to use phys_size_t/phys_addr_tBecky Bruce2008-06-12-1/+1
| | | | | | | | | | | 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>
* Use watchdog-aware functions when calculating hashes of images - take twoBartlomiej Sieka2008-04-25-2/+15
| | | | | | | | | Some files didn't get updated properly with the "Use watchdog-aware functions when calculating hashes of images" commit, this commit fixes this. Signed-off-by: Bartlomiej Sieka <tur@semihalf.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
* Memory footprint optimizationsBartlomiej Sieka2008-04-24-6/+3
| | | | | | | | | | 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>
* Restore the ability to continue booting after legacy image overwriteMarian Balakowicz2008-04-17-1/+2
| | | | | | | | | | | 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>
* SPARC: added SPARC support for new uimage in common code.Daniel Hellstrom2008-04-08-0/+4
| | | | Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
* [new uImage] Do not compile new uImage format support by defaultBartlomiej Sieka2008-03-20-6/+0
| | | | | | | | | | | | | | | Disable default building of new uImage format support in preparation for merge with the master. Support for new format can be enabled on a per-board basis, by defining the following in the board's config file: #define CONFIG_FIT 1 #define CONFIG_OF_LIBFDT 1 This can be optionally defined to give more verbose output: #define CONFIG_FIT_VERBOSE 1 /* enable fit_format_{error,warning}() */ Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
* Add MD5 support to the new uImage formatBartlomiej Sieka2008-03-14-0/+1
| | | | Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
* [new uImage] Fix definition of common bootm_headers_t fieldsMarian Balakowicz2008-03-12-1/+2
| | | | | | | verify, autostart and lmb fields are used regardless of CONFIG_FIT setting, move their definitions to common section. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Add proper ramdisk/FDT handling when FIT configuration is usedMarian Balakowicz2008-03-12-0/+3
| | | | | | | | 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] Add node offsets for FIT images listed in struct bootm_headersMarian Balakowicz2008-03-12-2/+5
| | | | | | | | 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] Remove unnecessary arguments passed to ramdisk routinesMarian Balakowicz2008-03-12-3/+2
| | | | | | | boot_get_ramdisk() and image_get_ramdisk() do not need all cmdtp, flag, argc and argv arguments. Simplify routines definition. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Add support for new uImage format to mkimage toolBartlomiej Sieka2008-03-11-4/+11
| | | | | | | | | | | | | | Support for the new uImage format (FIT) is added to mkimage tool. Commandline syntax is appropriately extended: mkimage [-D dtc_options] -f fit-image.its fit-image mkimage (together with dtc) takes fit-image.its and referenced therein binaries (like vmlinux.bin.gz) as inputs, and produces fit-image file -- the final image that can be transferred to the target (e.g., via tftp) and then booted using the bootm command in U-Boot. Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
* [new uImage] Make node unit names const in struct bootm_headersMarian Balakowicz2008-03-10-3/+3
| | | | Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] New uImage low-level APIMarian Balakowicz2008-03-10-2/+151
| | | | | | | | | | | | | Add FDT-based functions for handling new format component images, configurations, node operations, property get/set, etc. fit_ - routines handling global new format uImage operations like get/set top level property, process all nodes, etc. fit_image_ - routines handling component images subnodes fit_conf_ - routines handling configurations node Signed-off-by: Bartlomiej Sieka <tur@semihalf.com> Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Share common uImage code between mkimage and U-bootMarian Balakowicz2008-02-29-8/+13
| | | | | | | | | | | | | | | | | | | | This patch adds the following common routines: 1) Dedicated mkimage print_header() is replaced with common image_print_contents() image_print_contents_noindent() 2) Common os/arch/type/comp fields name <--> id translation routines genimg_get_os_name() genimg_get_arch_name() genimg_get_type_name() genimg_get_comp_name() genimg_get_os_id() genimg_get_arch_id() genimg_get_type_id() genimg_get_comp_id() Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Update naming convention for bootm/uImage related codeMarian Balakowicz2008-02-29-33/+39
| | | | | | | | | | | | | | | 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-0/+2
| | | | | | | | 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-7/+5
| | | | | | | | | | | | | | | | | | | 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/+2
| | | | | | | | | 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/+2
| | | | | | | | 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] rework error handling so common functions don't resetKumar Gala2008-02-29-1/+1
| | | | | | | | | | | | | Changed image_get_ramdisk() to just return NULL on error and have get_ramdisk() propogate that error to the caller. It's left to the caller to call do_reset() if it wants to. Also moved calling do_reset() in get_fdt() and fdt_relocate() on ppc to a common location. In the future we will change get_fdt() and fdt_relocate() to return success/failure and not call do_reset() at all. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Don't pass kdb to ramdisk_high since we may not have oneKumar Gala2008-02-29-1/+1
| | | | | | | | | We don't actually need the kdb param as we are just using it to get bd->bi_memsize which we can get from gd->bd->bi_memsize. Also, if we boot via OF we might not actually fill out a kdb. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Correct raw FDT blob handlig when CONFIG_FIT is disabledMarian Balakowicz2008-02-27-2/+3
| | | | | | | | | | | | | | Dual format image code must properly handle all three FDT passing methods: - raw FDT blob passed - FDT blob embedded in the legacy uImage - FDT blob embedded in the new uImage This patch enables proper raw FDT handling when no FIT imaeg support is compiled in. This is a bit tricky as we must dected FIT format even when FIT uImage handling is not enabled as both FIT uImages and raw FDT blobs use tha same low level format (libfdt). Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Move image verify flag to bootm_headers structureMarian Balakowicz2008-02-27-5/+2
| | | | | | | | | | 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-4/+49
| | | | | | | | | | | | | | 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-0/+1
| | | | Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Add fit_parse_conf() and fit_parse_subimage() routinesMarian Balakowicz2008-02-21-0/+10
| | | | | | | | | | | | | | | | | | | Introducing routines for parsing new uImage format bootm arguments: [<addr>]#<conf> - configuration specification [<addr>]:<subimg> - subimage specification New format images can contain multiple subimages of the same type. For example a single new format image file can contain three kernels, two ramdisks and a couple of FDT blobs. Subimage and configuration specifications are extensions to bootm (and other image-related commands) arguments' syntax that allow to specify which particular subimage should be operated on. Subimage specification is used to denote a particular subimage. Configurations are a bit more complex -- they are used to define a particualr booting setup, for example a (kernel, fdt blob) pair, or a (kernel, ramdisk, fdt blob) tuple, etc. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Add gen_get_image() routineMarian Balakowicz2008-02-21-0/+6
| | | | | | | | | 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] Pull in libfdt if CONFIG_FIT is enabledMarian Balakowicz2008-02-21-0/+9
| | | | | | | | | | | New uImage format (Flattened Image Tree) requires libfdt functionality, print out error message if CONFIG_OF_LIBFDT is not defined. New uImage support is enabled by defining CONFIG_FIT (and CONFIG_OF_LIBFDT). This commit turns it on by default. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Cleanup do_botm_linux() boot allocationsMarian Balakowicz2008-02-07-2/+8
| | | | | | | | | | | | | | | This patch moves common pre-boot allocation steps shared between PPC and M68K to a helper routines: common: - get_boot_sp_limit() - get_boot_cmline() - get_boot_kbd() platform: - set_clocks_in_mhz() Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Move ramdisk loading to a common routineMarian Balakowicz2008-02-07-1/+6
| | | | | | | | | Ramdisk loading code, including initrd_high variable handling, was duplicated for PPC and M68K platforms. This patch creates common helper routine that is being called from both platform do_bootm_linux() routines. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Factor out common image_get_ramdisk() routineMarian Balakowicz2008-02-07-0/+10
| | | | | | | | Architecture specific do_bootm_linux() routines share common ramdisk image processing code. Move this code to a common helper routine. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Factor out common routines for getting os/arch/type/comp namesMarian Balakowicz2008-02-07-4/+9
| | | | | | | | 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] Cleanup image header pointer use in bootm codeMarian Balakowicz2008-02-07-3/+24
| | | | | | | - use single image header pointer instead of a set of auxilliary variables. - add multi component image helper routines: get component size/data address Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Add memmove_wd() common routineMarian Balakowicz2008-02-07-0/+3
| | | | | | Move common, watchdog sensible memmove code to a helper memmmove_wd() routine. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Move CHUNKSZ definition to image.hMarian Balakowicz2008-02-07-0/+7
| | | | | | | CHUNKSZ defined for PPC and M68K is set to the same value of 64K, move this definition to a common header. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Define a API for image handling operationsMarian Balakowicz2008-02-07-20/+159
| | | | | | | | | - Add inline helper macros for basic header processing - Move common non inline code common/image.c - Replace direct header access with the API routines - Rename IH_CPU_* to IH_ARCH_* Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* Allocate CPU Architecture Code for STMicroelectronics' ST200.Sean MCGOOGAN2007-09-10-0/+1
| | | | | Signed-off-by: Sean McGoogan <Sean.McGoogan@st.com> ---------------------------------------------------
* Merge with /home/wd/git/u-boot/masterWolfgang Denk2006-10-11-0/+1
|\
| * Define IH_CPU_AVR32Stefan Roese2006-10-09-0/+1
| | | | | | | | | | | | Make it possible to generate AVR32 uImage files with mkimage and make cmd_bootm recognize them. Patch by Haavard Skinnemoen, 22 Sep 2006
* | * Support for FDT in uImage format, error when using FDT from flashMatthew McClintock2006-08-16-0/+1
|/ | | | Signed-off-by: Matthew McClintock <msm@freescale.com>
* Add ADI Blackfin supportWolfgang Denk2006-03-12-0/+1
| | | | | | | - add support for Analog Devices Blackfin BF533 CPU - add support for the ADI BF533 Stamp uClinux board - add support for the ADI BF533 EZKit board Patches by Richard Klingler, June 11th 2005:
* Remove unnnecessary #include <linux/types.h> from include/asm-*/u-boot.hWolfgang Denk2005-11-25-1/+8
|
* * Patch by Gridish Shlomi, 30 Aug 2004:wdenk2004-10-10-1/+1
| | | | | | | | | | | | | | | | | - Add support to revA version of PQ27 and PQ27E. - Reverted MPC8260ADS baudrate back to original 115200 * Patch by Hojin, 17 Sep 2004: Fix typo in cfi_flash.c * Patch by Mark Jonas, 09 September 2004: mtest's data line test (with CFG_ALT_MEMTEST set) returned a wrong error message * Patch by Mark Jonas, 31 August 2004: Added option CFG_XLB_PIPELINING to enable XLB pipelining. This improves FTP performance for MPC5200 systems. Enabled for IceCube by default.
* Patches by Scott McNutt, 24 Aug 2004:wdenk2004-10-10-0/+1
| | | | | | - Add support for Altera Nios-II processors. - Add support for Psyent PCI-5441 board. - Add support for Psyent PK1C20 board.
* * Patch by Yasushi Shoji, 07 Apr 2004:wdenk2004-04-18-2/+3
| | | | | - add support for microblaze processors - add support for AtmarkTechno "suzaku" board
* * Patch by Scott McNutt, 04 Oct 2003:wdenk2003-10-08-0/+1
| | | | | | | | | | | | | | | | | | - add support for Altera Nios-32 CPU - add support for Nios Cyclone Development Kit (DK-1C20) * Patch by Steven Scholz, 29 Sep 2003: - A second parameter for bootm overwrites the load address for "Standalone Application" images. - bootm sets environment variable "filesize" to the resulting (uncompressed) data length for "Standalone Application" images when autostart is set to "no". Now you can do something like if bootm $fpgadata $some_free_ram ; then fpga load 0 $some_free_ram $filesize fi * Patch by Denis Peter, 25 Sept 2003: add support for the MIP405 Rev. C board
* * Patch by Anders Larsen, 18 Sep 2003:wdenk2003-10-08-5/+0
| | | | | | | | | | | allow mkimage to build and run on Cygwin-hosted systems * Patch by Frank Müller, 18 Sep 2003: use bi_intfreq instead of bi_busfreq to compute fec_mii_speed in cpu/mpc8xx/fec.c * Patch by Pantelis Antoniou, 16 Sep 2003: add tool to compute fileds in the PLPRCR register for MPC86x
* * Update TRAB auto update codewdenk2003-10-06-0/+1
| | | | | | | | | | | * Make fatload set filesize environment variable fix potential buffer overlow problem * enable basic / medium / high-end configurations for PPChameleonEVB board; fix NAND code * enable TFTP client code to specify to the server the desired timeout value (see RFC-2349)
* * Implement new mechanism to export U-Boot's functions to standalonewdenk2003-07-24-1/+2
| | | | | | | | applications: instead of using (PPC-specific) system calls we now use a jump table; please see doc/README.standalone for details * Patch by Dave Westwood, 24 Jul 2003: added support for Unity OS (a proprietary OS)