summaryrefslogtreecommitdiff
path: root/tools/mkimage.c
Commit message (Collapse)AuthorAgeLines
* mkimage: adding support for Davinci AIS imageStefano Babic2011-10-23-0/+2
| | | | | | | | | | | Some Davinci processors supports the Application Image Script (AIS) boot process. The patch adds the generation of the AIS image inside the mkimage tool to make possible to generate a bootable U-boot without external tools (TI Davinci AIS Generator). Signed-off-by: Stefano Babic <sbabic@denx.de> CC: Wolfgang Denk <wd@denx.de>
* mkimage: Add variable lenght header supportStefano Babic2011-10-05-5/+14
| | | | | | | | | Some images have not a header of fix lenght. The patch will be used for the generation of AIS images, because this header has a variable lenght. The patch adds also the parameter "-s" (skip) to not copy automatically the passed image file. Signed-off-by: Stefano Babic <sbabic@denx.de>
* mkimage: Add OMAP boot image supportJohn Rigby2011-08-03-0/+2
| | | | | | | | | | - Add mkimage support for OMAP boot image - Add support for OMAP boot image(MLO) generation in the new SPL framework Signed-off-by: John Rigby <john.rigby@linaro.org> Signed-off-by: Aneesh V <aneesh@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* mkimage: add UBL header support for booting davinci cpusHeiko Schocher2011-07-28-0/+2
| | | | | | | | creating an u-boot.ubl file, which contains the UBL Header needed for booting from NAND with the RBL from TI. For more information read doc/README.ublimage. Signed-off-by: Heiko Schocher <hs@denx.de>
* mkimage: add "-V" option to print version informationWolfgang Denk2011-04-12-0/+6
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* mkimage: Fix strict-aliasing compiler warningPeter Tyser2010-04-10-5/+3
| | | | | | | | | Version 4.2.4 of gcc produces the following warnings without this change: mkimage.c: In function ‘main’: mkimage.c:204: warning: dereferencing type-punned pointer will break strict-aliasing rules mkimage.c:222: warning: dereferencing type-punned pointer will break strict-aliasing rules Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* mkimage: fix Segmentation Fault when run without "-n name" optionWolfgang Denk2010-03-28-0/+1
| | | | | | | | | The restructuring of the mkimage command in commit 89a4d6b1 ("tools: mkimage: split code into core, default and FIT image specific") introduced a bug that caused mkimage to segfault when run without "-n name" option. Initialize the imagename entry to prevent that. Signed-off-by: Wolfgang Denk <wd@denx.de>
* mkimage: dont force entry point with xipMike Frysinger2010-03-11-14/+0
| | | | | | | | | | | Some people boot images with the entry point in the middle of the blob (like Linux with the head code in discardable .init.text), and there is no no real requirement that the entry point be right after the mkimage header when doing XIP, so let people specify whatever they want. If they do need an entry right after the header, then they still can do that with normal -e behavior. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* mkimage: Add Freescale imx Boot Image support (imximage)Stefano Babic2010-01-25-0/+2
| | | | | | | | | | | | This patch adds support for "imximage" (MX Boot Image) to the mkimage utility. The imximage is used on the Freescales's MX.25, MX.35 and MX.51 processors. Further details under doc/README.imximage. This patch was tested on a Freescale mx51evk board. Signed-off-by: Stefano Babic <sbabic@denx.de>
* tools/mkimage: Remove duplicate line of codePeter Tyser2009-12-07-4/+2
| | | | | | | | | | | | | Recent commits 1a99de2cb4d08eb3bf9fb3f60a9d533150de8c0e and 6a590c5f5fd12cdd27f3153522acfac3854590e7 both fixed the same bug in the same manner. Unfortunately git was "smart" enough to merge both changes which resulted in some duplicate code. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Reordered code and comment a bit. Signed-off-by: Wolfgang Denk <wd@denx.de>
* tools/mkimage: Print FIT image contents after creationPeter Tyser2009-12-05-25/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, there was no indication to the user that a FIT image was successfully created after executing mkimage. For example: $ mkimage -f uImage.its uImage.itb DTC: dts->dtb on file "uImage.its" Adding some additional output after creating a FIT image lets the user know exactly what is contained in their image, eg: $ mkimage -f uImage.its uImage.itb DTC: dts->dtb on file "uImage.its" FIT description: Linux kernel 2.6.32-rc7-00201-g7550d6f-dirty Created: Tue Nov 24 15:43:01 2009 Image 0 (kernel@1) Description: Linux Kernel 2.6.32-rc7-00201-g7550d6f-dirty Type: Kernel Image Compression: gzip compressed Data Size: 2707311 Bytes = 2643.86 kB = 2.58 MB Architecture: PowerPC OS: Linux Load Address: 0x00000000 Entry Point: 0x00000000 Hash algo: crc32 Hash value: efe0798b Hash algo: sha1 Hash value: ecafba8c95684f2c8fec67e33c41ec88df1534d7 Image 1 (fdt@1) Description: Flattened Device Tree blob Type: Flat Device Tree Compression: uncompressed Data Size: 12288 Bytes = 12.00 kB = 0.01 MB Architecture: PowerPC Hash algo: crc32 Hash value: a5cab676 Hash algo: sha1 Hash value: 168722b13e305283cfd6603dfe8248cc329adea6 Default Configuration: 'config@1' Configuration 0 (config@1) Description: Default Linux kernel Kernel: kernel@1 FDT: fdt@1 This brings the behavior of creating a FIT image in line with creating a standard uImage, which also prints out the uImage contents after creation. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* tools/mkimage: Assume FDT image type for FIT imagesPeter Tyser2009-12-05-0/+6
| | | | | | | | | | | When building a Flattened Image Tree (FIT) the image type needs to be "flat_dt". Commit 89a4d6b12fd6394898b8a454cbabeaf1cd59bae5 introduced a regression which caused the user to need to specify the "-T flat_dt" parameter on the command line when building a FIT image. The "-T flat_dt" parameter should not be needed and is at odds with the current FIT image documentation. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* Building of FIT images does not work.Remy Bohmer2009-11-23-0/+1
| | | | | | | The type is not set for generation of the FIT images, resulting in no images being created without printing or returning an error Signed-off-by: Remy Bohmer <linux@bohmer.net>
* mkimage: Add Kirkwood Boot Image support (kwbimage)Prafulla Wadaskar2009-09-10-0/+2
| | | | | | | | | | | | | | This patch adds support for "kwbimage" (Kirkwood Boot Image) image types to the mkimage code. For details refer to docs/README.kwbimage This patch is tested with Sheevaplug board Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com> Acked-by: Ron Lee <ron@debian.org> Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
* tools: mkimage: split code into core, default and FIT image specificPrafulla Wadaskar2009-09-10-291/+260
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a first step towards reorganizing the mkimage code to make it easier to add support for additional images types. Current mkimage code is specific to generating uImage and FIT image files, but the same framework can be used to generate other image types like Kirkwood boot images (kwbimage-TBD). For this, the mkimage code gets reworked: Here is the brief plan for the same:- a) Split mkimage code into core and image specific support b) Implement callback functions for image specific code c) Move image type specific code to respective C files Currently there are two types of file generation/list supported (i.e uImage, FIT), the code is abstracted from mkimage.c/.h and put in default_image.c and fit_image.c; all code in these file is static except init function call d) mkimage_register API is added to add new image type support All above is addressed in this patch e) Add kwbimage type support to this new framework (TBD) This will be implemented in a following commit. Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com> Edit commit message, fix coding style and typos. Signed-off-by: Wolfgang Denk <wd@denx.de>
* tools: mkimage: Fixed build warningsPrafulla Wadaskar2009-09-10-7/+9
| | | | | | | | uninitialized retval variable warning fixed crc32 APIs moved to crc.h (newly added) and build warnings fixed Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
* tools: mkimage : bugfix returns correct value for list commandPrafulla Wadaskar2009-09-10-12/+14
| | | | | | | | | | | List command always return "EXIT_SUCCESS" even in case of failure by any means. This patch return 0 if list command is sucessful, returns negative value reported by check_header functions Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
* License cleanup: remove unintended "All Rights Reserved" notices.Wolfgang Denk2009-09-04-1/+0
| | | | | | | | Some files included my old standerd file header which had a "All Rights Reserved" part. As this has never been my intention, I remove these lines to make the files compatible with GPL v.2 and later. Signed-off-by: Wolfgang Denk <wd@denx.de>
* compiler.h: unify system ifdef cruft hereMike Frysinger2009-07-19-10/+4
| | | | | | | | | | | Shove a lot of the HOSTCC and related #ifdef checking crap into the new compiler.h header so that we can keep all other headers nice and clean. Also introduce custom uswap functions so we don't have to rely on the non standard implementations that a host may (or may not in the case of OS X) provide. This allows mkimage to finally build cleanly on an OS X system. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* mkimage: make mmap() checks consistentMike Frysinger2008-05-03-13/+9
| | | | | | | | | | The mmap() related code is full of inconsistent casts/constants when it comes to error checking, and may break when building on some systems (like ones that do not implicitly define the caddr_t type). Let's just avoid the whole mess by writing the code nice and clean in the first place. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Memory footprint optimizationsBartlomiej Sieka2008-04-24-3/+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>
* [new uImage] Add support for new uImage format to mkimage toolBartlomiej Sieka2008-03-11-52/+205
| | | | | | | | | | | | | | 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] Share common uImage code between mkimage and U-bootMarian Balakowicz2008-02-29-234/+10
| | | | | | | | | | | | | | | | | | | | 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-2/+2
| | | | | | | | | | | | | | | 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] Define a API for image handling operationsMarian Balakowicz2008-02-07-111/+69
| | | | | | | | | - 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>
* Fix compilation issues on MACOSXAubrey.Li2007-05-15-2/+2
| | | | | Singed-off-by: Marc Hoffman <Marc.Hoffman@analog.com> Signed-off-by: Aubrey Li <aubrey.adi@gmail.com>
* Merge with /home/wd/git/u-boot/masterWolfgang Denk2006-10-11-1/+2
|\
| * 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
| * Fix mkimage -l bug with multifile images on 64bit platformsWolfgang Denk2006-09-06-1/+1
| | | | | | | | Patch by David Updegraff, 06 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>
* Fixed handling of bad checksums with "mkimage -l"Wolfgang Denk2006-04-28-5/+8
|
* 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:
* Fix mkimage bug with multifile images created on 64 bit systems.Wolfgang Denk2006-01-11-1/+1
|
* * Patch by Scott McNutt, 01 Nov 2004:wdenk2005-04-03-0/+2
| | | | | | | Add missing NIOS/NIOS2 support for "iminfo" command * Patch by Detlev Zundel, 29 Oct 2004: Add missing NIOS/NIOS2 support for "mkimage" tool.
* * Update for AT91RM9200DK and CMC_PU2 boards:wdenk2004-11-21-1/+1
| | | | | | | - Enable booting directly from flash - fix CMC_PU2 flash driver * Fix mkimage usage message
* * Rename SBC8560 into sbc8560 for consistencywdenk2004-07-10-31/+32
| | | | | | | | | * Patch by Daniel Poirot, 24 Jun 2004: Add support for Wind River's sbc8240 board * Patches by Yasushi Shoji, 26 Jun 2004: - drivers/serial_xuartlite.c: fix "return 0" in void function - add microblaze support to mkimage tool
* * Patch by Rahul Shanbhag, 19 Feb 2004:wdenk2004-02-26-1/+16
| | | | | | | | | | Fixes for for OMAP1610 board: - shift some IRQ specific code to platform.S file - remove duplicatewatchdog reset code from start.S * Make Auto-MDIX Support configurable on INCA-IP board * Fix license for mkimage tool
* * Use "-fPIC" instead of "-mrelocatable" to prevent problems withwdenk2003-11-17-2/+2
| | | | | | | | | | | | | recent tools * Add checksum verification to 'imls' command * Add bd_info fields needed for 4xx Linux I2C driver * Patch by Martin Krause, 4 Nov. 2003: Fix error in cmd_vfd.c (TRAB board: "vfd /1" shows now only one Bitmap) * Print used network interface when CONFIG_NET_MULTI is set
* * Patch by Anders Larsen, 18 Sep 2003:wdenk2003-10-08-2/+2
| | | | | | | | | | | 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
* Fix build problems under FreeBSDwdenk2003-10-07-2/+2
|
* Add generic filesystem image typewdenk2003-10-06-0/+1
|
* Make IPB clock on MGT5100/MPC5200 configurable in board config file;wdenk2003-09-16-5/+5
| | | | go back to 66 MHz for stability
* * Map ISP1362 USB OTG controller for NSCU boardwdenk2003-08-05-3/+3
| | | | | | | | | * Patch by Brad Parker, 02 Aug 2003: fix sc520_cdp problems * Implement Boot Cycle Detection (Req. 2.3 of OSDL CGL Reqirements) * Allow erase command to cross flash bank boundaries
* * Patches by Yuli Barcohen, 13 Jul 2003:wdenk2003-07-14-0/+1
| | | | | | | | | | | | | | | | | | - Correct flash and JFFS2 support for MPC8260ADS - fix PVR values and clock generation for PowerQUICC II family (8270/8275/8280) * Patch by Bernhard Kuhn, 08 Jul 2003: - add support for M68K targets * Patch by Ken Chou, 3 Jul: - Fix PCI config table for A3000 - Fix iobase for natsemi.c (PCI_BASE_ADDRESS_0 is the IO base register for DP83815) * Allow to enable "slow" POST routines by key press on power-on * Fix temperature dependend switching of LCD backlight on LWMON * Tweak output format for LWMON
* * Patch by David Updegraff, 22 Apr 2003:wdenk2003-05-20-0/+1
| | | | | | | | | | | | | update for CrayL1 board * Patch by Pantelis Antoniou, 21 Apr 2003: add boot support for ARTOS (a proprietary OS) * Patch by Steven Scholz, 11 Apr 2003: Add support for RTC DS1338 * Patch by Rod Boyce, 24 Jan 2003: Fix counting of extended partitions in diskboot command
* * Make sure Block Lock Bits get cleared in R360MPI flash driverwdenk2003-04-20-0/+1
| | | | | | | | | | | | | | * MPC823 LCD driver: Fill color map backwards, to allow for steady display when Linux takes over * Patch by Erwin Rol, 27 Feb 2003: Add support for RTEMS (this time for real). * Add support for "bmp info" and "bmp display" commands to load bitmap images; this can be used (for example in a "preboot" command) to display a splash screen very quickly after poweron. * Add support for 133 MHz clock on INCA-IP board
* * Fix startup problems with VFD display on TRABwdenk2002-12-03-2/+3
| | | | | | * Patch by Pierre Aubert, 20 Nov 2002 Add driver for Epson SED13806 graphic controller. Add support for BMP logos in cfb_console driver.
* Initial revisionwdenk2002-11-03-0/+722