aboutsummaryrefslogtreecommitdiff
path: root/include/image.h
AgeCommit message (Collapse)Author
2011-10-27image: Fix inverted logic in architecture check.Thierry Reding
Commit 476af29 broke this check when the ifdef lists we consolidated. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-10-23mkimage: adding support for Davinci AIS imageStefano Babic
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>
2011-10-22checkpatch whitespace cleanupsStephen Warren
This avoids the following checkpatch warning in later patches: ERROR: "(foo*)" should be "(foo *)" ERROR: space required before the open brace '{' ERROR: space prohibited before that close parenthesis ')' ERROR: spaces required around that '||' (ctx:WxV) WARNING: space prohibited between function name and open parenthesis '(' WARNING: line over 80 characters This fixes all the white-space warnings/errors in my subsequent patch, and within this current patch. A number of other checkpatch warnings and errors are still present in this patch itself, but are beyond simple whitespace fixes, so are not solved by this patch. v2: New patch Signed-off-by: Stephen Warren <swarren@nvidia.com> Tested-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2011-10-22nds32: common bdinfo, bootm, image supportMacpaul Lin
Add support of NDS32 to common commands bdinfo, bootm, and image format. Signed-off-by: Macpaul Lin <macpaul@andestech.com>
2011-10-17sandbox: Add architecture image supportSimon Glass
We won't actually load an image with this architecture, but we still need to define it. Signed-off-by: Simon Glass <sjg@chromium.org>
2011-10-05image: push default arch values to arch headersMike Frysinger
This pushes the ugly duplicated arch ifdef lists we maintain in various image related files out to the arch headers themselves. Acked-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Tested-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-08-03mkimage: Add OMAP boot image supportJohn Rigby
- 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>
2011-07-28mkimage: add UBL header support for booting davinci cpusHeiko Schocher
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>
2011-04-25Respect memreserve regions specified in the device treeGrant Likely
If a regions is reserved in the fdt, then it should not be used. Add the memreserve regions to the lmb so that u-boot doesn't use them to store the initrd. Signed-off-by: Grant Likely <grant.likely@linaro.org>
2011-04-25Default to bootm_size() when CONFIG_SYS_BOOTMAPSZ is not definedGrant Likely
This patch adds a function getenv_bootm_mapsize() for obtaining the size of the early mapped region accessible by the kernel during early boot. It defaults to CONFIG_SYS_BOOTMAPSZ, or if not defined, defaults to getenv_bootm_size(), which in turn defaults to the size of RAM. getenv_bootm_mapsize() can also be overridden with a "bootm_mapsize" environmental variable. Signed-off-by: Grant Likely <grant.likely@linaro.org>
2011-04-25Stop passing around bootmem_base value.Grant Likely
For the calls to boot_relocate_fdt(), boot_get_cmdline(), and boot_get_kbd(), the value of bootmem_base is always obtained by calling getenv_bootm_low(). Since the value always comes from the same source, the calling signature for those functions can be simplified by making them call getenv_bootm_low() directly. Signed-off-by: Grant Likely <grant.likely@linaro.org>
2010-11-28image: constify lookup tablesMike Frysinger
These are pure lookup tables -- no need to be writable. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-18boot: change some arch ifdefs to feature ifdefsJohn Rigby
The routines boot_ramdisk_high, boot_get_cmdline and boot_get_kbd are currently enabled by various combinations of CONFIG_M68K, CONFIG_POWERPC and CONFIG_SPARC. Use CONFIG_SYS_BOOT_<FEATURE> defines instead. CONFIG_SYS_BOOT_RAMDISK_HIGH CONFIG_SYS_BOOT_GET_CMDLINE CONFIG_SYS_BOOT_GET_KBD Define these as appropriate in arch/include/asm/config.h files. Signed-off-by: John Rigby <john.rigby@linaro.org> Acked-by: Wolfgang Denk <wd@denx.de>
2010-09-28Add support for operating system OSETorkel Lundgren
Add OSE as operating system for mkimage and bootm. Signed-off-by: Torkel Lundgren <torkel.lundgren@enea.com>
2010-07-04Make sure that argv[] argument pointers are not modified.Wolfgang Denk
The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
2010-06-29image.h: remove bogus ';' after function declarationsWolfgang Denk
ISO C does not allow extra ';' outside of a function Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-05-28nios: remove nios-32 archThomas Chou
The nios-32 arch is obsolete and broken. So it is removed. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
2010-01-25mkimage: Add Freescale imx Boot Image support (imximage)Stefano Babic
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>
2010-01-21image.h: avoid command.h for host toolsMike Frysinger
The u-boot command structures don't get used with host systems, so don't bother including it when building host code. This avoids an implicit need on config.h in the process. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-01-21lmb: only force on arches that use itMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-01-21sha1: add dedicated config optionMike Frysinger
The sha1 code is currently compiled for everyone, but in reality, it's only used by the FIT code. So make it optional just like MD5. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
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-24Repair build fail in case CONFIG_PPC=n and CONFIG_FIT=yRemy Bohmer
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-09-10mkimage: Add Kirkwood Boot Image support (kwbimage)Prafulla Wadaskar
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>
2009-09-10mkimage: Make table_entry code globalPrafulla Wadaskar
- make get_table_entry_id() global - make get_table_entry_name() global - move struct table_entry to image.h Currently this code is used by image.c only. This patch makes this API global so it can be used by other parts of code, too. Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com> Acked-by: Ron Lee <ron.debian.org> Edit comments and commit message. Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-09-10mkimage: Make genimg_print_size() globalPrafulla Wadaskar
Currently it is used by image.c only, but the the function can be used to support additional mkimage types like for example kwbimage, so make this function globally visible. Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com> Edited commit message. Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-09-10tools/mkimage: fix compiler warnings, use "const"Wolfgang Denk
This fixes some compiler warnings: tools/default_image.c:141: warning: initialization from incompatible pointer type tools/fit_image.c:202: warning: initialization from incompatible pointer type and changes to code to use "const" attributes in a few places where it's appropriate. Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-07-19compiler.h: unify system ifdef cruft hereMike Frysinger
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>
2009-04-04Add support for building native win32 toolsPeter Tyser
Add support for compiling the host tools in the tools directory using the MinGW toolchain. This produces executables which can be used on standard Windows computers without requiring cygwin. One must specify the MinGW compiler and strip utilities as if they were the host toolchain in order to build win32 executables, eg: make HOSTCC=i586-mingw32msvc-gcc HOSTSTRIP=i586-mingw32msvc-strip tools Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-02-18include/image.h: Ease grepping of image_* functionsPetri Lehtinen
Because the functions have been defined using macros, grepping for their definitions is not possible. This patch adds the real function names in comments. Signed-off-by: Petri Lehtinen <petri.lehtinen@inoi.fi> Acked-by: Mike Frysinger <vapier@gentoo.org>
2008-12-13Fix FIT and FDT support to have CONFIG_OF_LIBFDT and CONFIG_FIT independentJean-Christophe PLAGNIOL-VILLARD
FDT support is used for both FIT style images and for architectures that can pass a fdt blob to an OS (ppc, m68k, sparc). For other architectures and boards which do not pass a fdt blob to an OS but want to use the new uImage format, we just need FIT support. Now we can have the 4 following configurations : 1) FIT only CONFIG_FIT 2) fdt blob only CONFIG_OF_LIBFDT 3) both CONFIG_OF_LIBFDT & CONFIG_FIT 4) none none Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
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-21FDT: don't use private kernel header filesWolfgang Denk
On some systems (for example Fedora Core 4) U-Boot builds with the following wanrings only: ... In file included from /home/wd/git/u-boot/include/libfdt_env.h:33, from fdt.c:51: /usr/include/asm/byteorder.h:6:2: warning: #warning using private kernel header; include <endian.h> instead! This patch fixes this problem. Signed-off-by: Wolfgang Denk <wd@denx.de>
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-09FIT: add ability to check hashes of all images in FIT, improve outputBartlomiej Sieka
- add function fit_all_image_check_hashes() that verifies if all hashes of all images in the FIT are valid - improve output of fit_image_check_hashes() when the hash check fails 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-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: 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-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-06-12Change lmb to use phys_size_t/phys_addr_tBecky Bruce
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>
2008-04-25Use watchdog-aware functions when calculating hashes of images - take twoBartlomiej Sieka
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>
2008-04-24Memory footprint optimizationsBartlomiej Sieka
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>
2008-04-17Restore the ability to continue booting after legacy image overwriteMarian Balakowicz
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>
2008-04-08SPARC: added SPARC support for new uimage in common code.Daniel Hellstrom
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2008-03-20[new uImage] Do not compile new uImage format support by defaultBartlomiej Sieka
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>
2008-03-14Add MD5 support to the new uImage formatBartlomiej Sieka
Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>