summaryrefslogtreecommitdiff
path: root/common/cmd_bootm.c
Commit message (Collapse)AuthorAgeLines
* 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>
| * [new uImage] Return error on image move/uncompress overwritesMarian Balakowicz2008-02-07-0/+22
| | | | | | | | | | | | | | | | | | Check for overwrites during image move/uncompress, return with error when the original image gets corrupted. Report clear message to the user and prevent further troubles when pointer to the corrupted images is passed to do_bootm_linux routine. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Cleanup image header pointer use in bootm codeMarian Balakowicz2008-02-07-89/+64
| | | | | | | | | | | | | | - 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] Cleanup cmd_bootm.cMarian Balakowicz2008-02-07-290/+301
| | | | | | | | | | | | | | | | - sort and cleanup headers, declarations, etc. - group related routines - cleanup indentation, white spaces Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Add memmove_wd() common routineMarian Balakowicz2008-02-07-16/+4
| | | | | | | | | | | | Move common, watchdog sensible memmove code to a helper memmmove_wd() routine. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Remove I386 uImage fake_header() routineMarian Balakowicz2008-02-07-17/+1
| | | | | | | | | | | | | | | | | | I386 targets are not using a uImage format, instead fake header is added to ram image before it is further processed by bootm. Remove this fixup and force proper uImage use for I386. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Move CHUNKSZ definition to image.hMarian Balakowicz2008-02-07-7/+0
| | | | | | | | | | | | | | 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] Move gunzip() common code to common/gunzip.cMarian Balakowicz2008-02-07-91/+3
| | | | | | | | | | | | | | Move gunzip(), zalloc() and zfree() to a separate file. Share zalloc() and zfree() with cramfs uncompress routine. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Cleanup OF/FDT #if/#elif/#endif use in do_bootm_linux()Marian Balakowicz2008-02-07-2/+1
| | | | | | | | | | | | | | Make CONFIG_OF_LIBFDT and CONFIG_OF_FLAT_TREE use more readable in PPC variant of do_bootm_linux() routine. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Move PPC do_bootm_linux() to lib_ppc/ppc_linux.cMarian Balakowicz2008-02-07-542/+1
| | | | | | | | | | | | | | PPC implementation of do_bootm_linux() routine is moved to a dedicated file lib_ppc/ppc_linux.c Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| * [new uImage] Define a API for image handling operationsMarian Balakowicz2008-02-07-213/+121
| | | | | | | | | | | | | | | | | | - 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>
* | Remove deprecated CONFIG_OF_HAS_UBOOT_ENV and CONFIG_OF_HAS_BD_TJerry Van Baren2008-03-26-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These defines embedded the u-boot env variables and/or the bd_t structure in the fdt blob. The conclusion of discussion on the u-boot email list was that embedding these in the fdt blob is not useful: there are better ways of passing the data (in fact, the fdt blob itself replaces the bd_t struct). The only board that enables these is the stxxtc and they don't appear to be used by linux. Signed-off-by: Gerald Van Baren <vanbaren@cideas.com> Acked-by: Kim Phillips <kim.phillips@freescale.com>
* | The patch introduces the alternative configuration of the log buffer for the ↵Yuri Tikhonov2008-03-18-0/+4
|/ | | | | | | | | | | | | | lwmon5 board: the storage for the log-buffer itself is OCM(on-chip memory), the log-buffer header is moved to six GPT registers (PPC440EPX_GPT0_COMP1, ..., PPC440EPX_GPT0_COMP5). To enable this, alternative, configuration the U-Boot board configuration file for lwmon5 includes the definitions of alternative addresses for header (CONFIG_ALT_LH_ADDR) and buffer (CONFIG_ALT_LB_ADDR). The Linux shall be configured with the CONFIG_ALT_LB_LOCATION option set, and has the BOARD_ALT_LH_ADDR and BOARD_ALT_LB_ADDR constants defined in the lwmon5 board-specific header (arch/ppc/platforms/4xx/lwmon5.h). Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
* Merge git://www.denx.de/git/u-bootNobuhiro Iwamatsu2007-11-29-1/+1
|\ | | | | | | | | | | Conflicts: drivers/Makefile
| * Fix two typos.Detlev Zundel2007-10-19-1/+1
| | | | | | | | Signed-off-by: Detlev Zundel <dzu@denx.de>
* | Merge git://www.denx.de/git/u-bootNobuhiro Iwamatsu2007-09-23-166/+185
|\ \ | |/ | | | | | | | | Conflicts: CREDITS
| * Bugfix: make bootm+libfdt compile on boards with no flashGrant Likely2007-09-09-0/+2
| | | | | | | | Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * Fix do_bootm_linux() so that multi-file images with FDT blob boot.Bartlomiej Sieka2007-09-07-10/+19
| | | | | | | | | | | | | | | | | | Fix incorrect blob address calculation in do_bootm_linux() that prevents booting the kernel from a multi-file image (kernel + initrd + blob). Also, make minor updates to the U-Boot's output and to the coding style. Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
| * bootm/fdt: Only process the fdt if an fdt address was providedGrant Likely2007-09-06-17/+19
| | | | | | | | | | | | | | | | | | | | Boards with CONFIG_OF_LIBFDT enabled are not able to boot old-style kernels using the board info structure (instead of passing a device tree) This change allows the old style booting to be used if the fdt argument was not passed to 'bootm'. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Kim Phillips <kim.phillips@freescale.com>
| * Fix warnings from of_data copy fixAndy Fleming2007-08-16-2/+2
| | | | | | | | | | | | Forgot to cast of_flat_tree to ulong. Signed-off-by: Andy Fleming <afleming@freescale.com>
| * Fix of_data copying for CONFIG_OF_FLAT_TREE-using boardsAndy Fleming2007-08-16-0/+9
| | | | | | | | | | | | | | | | The fix, "Fix where the #ifdef CFG_BOOTMAPSZ is placed" neglected to *also* put the code inside the similar #ifdef for CONFIG_OF_FLAT_TREE. Signed-off-by: Andy Fleming <afleming@freescale.com>
| * Fix where the #ifdef CFG_BOOTMAPSZ is placed.Jerry Van Baren2007-08-15-2/+3
| | | | | | | | | | | | | | | | | | | | | | Commit 073e1b509980cefe6f53c2d7fbbcd135df1e3924 "Fix initrd/dtb interaction" put the new code outside of the #if defined(CONFIG_OF_LIBFDT) when it should have gone inside of the conditional. As a result, it broke non-LIBFDT board builds. Also added a missing "not." to the comment. Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
| * Fix initrd/dtb interactionAndy Fleming2007-08-14-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | The original code would wrongly relocate the blob to be right before the initrd if it existed. The blob *must* be within CFG_BOOTMAPSZ, if it is defined. So we make two changes: 1) flag the blob for relocation whenever its address is above BOOTMAPSZ 2) If the blob is being relocated, relocate it before kbd, not initrd Signed-off-by: Andy Fleming <afleming@freescale.com>
| * fdt: do board setup based on fdt address specified on bootm lineKim Phillips2007-08-10-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The last fdt patch to bootm did board setup based on the address specified by a prior fdt address command invocation. The bootm code, as its call to fdt_chosen does, should use the fdt specified by the user on the bootm command. Note this restores full functionality for the 8360's existing default boot environment values, e.g. 'run nfsboot' (i.e. no having to 'fdt addr $fdtaddr' before booting a kernel). Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
| * Call ft_board_setup() from the bootm command.Gerald Van Baren2007-08-10-0/+4
| | | | | | | | | | | | | | | | | | | | In the patch titled "Create new fdt boardsetup command..." I removed the call to ft_board_setup() from the routine fdt_chosen(), but I forgot to add a direct call back into cmd_bootm.c This fixes the oversight by adding the direct call to the bootm command. Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
| * Asthetic improvements: error messages and line lengths.Gerald Van Baren2007-08-10-65/+61
| | | | | | | | | | | | Tighten up the error messages, split overlength lines. Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
| * Reorganize and fix problems (returns) in the bootm command.Gerald Van Baren2007-08-10-66/+64
| | | | | | | | | | | | | | | | | | Do *NOT* return after the "point of no return" has been passed. If something goes wrong, the board must be reset after that point. Move the "Transferring control to Linux" debug message back to where it belongs: just before transferring control to linux. Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>
| * Fix bugs in the CONFIG_OF_LIBFDTGerald Van Baren2007-08-10-2/+2
| | | | | | | | | | | | Stupid coding mistakes (identified by Timur Tabi, thanks). Signed-off-by: Gerald Van Baren <vanbaren@cideas.com>