summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeLines
...
| | * | | [new uImage] Add autostart flag to bootm_headers structureKumar Gala2008-02-29-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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] rework error handling so common functions don't resetKumar Gala2008-02-29-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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] 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-31/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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] Optimize gen_get_image() flow controlMarian Balakowicz2008-02-27-31/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When CONFIG_HAS_DATAFLASH is not defined gen_get_image() routine has nothing to do, update its control flow to better reflect that simple case. 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-293/+616
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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] Fix erroneous use of image_get_magic() in fdc/usb cmdsMarian Balakowicz2008-02-21-2/+2
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| | * | | [new uImage] Rename and move print_image_hdr() routineMarian Balakowicz2008-02-21-67/+66
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Marian Balakowicz <m8@semihalf.com>
| | * | | [new uImage] Add fit_parse_conf() and fit_parse_subimage() routinesMarian Balakowicz2008-02-21-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-40/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | | Merge branch 'master' of /home/git/u-bootMarian Balakowicz2008-02-21-107/+377
| | |\ \ \
| | * | | | [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] Cleanup do_botm_linux() boot allocationsMarian Balakowicz2008-02-07-9/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-65/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-94/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-311/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-302/+268
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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>
| | * | | | Add missing cmd_ximg.o to common/MakefileMarian Balakowicz2008-02-07-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* | | | | | USB Storage, add meaningful return valueAras Vaichas2008-03-26-5/+7
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the "usb storage" command to return success if it finds a USB storage device, otherwise it returns error. Signed-off-by: Markus Klotzbuecher <mk@denx.de>
* | | | | 83xx/fdt_support: let user specifiy FSL USB Dual-Role controller roleAnton Vorontsov2008-03-25-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linux understands "host" (default), "peripheral" and "otg" (broken). Though, U-Boot doesn't restrict dr_mode variable to these values (think of renames in future). Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
* | | | | Remove deprecated CONFIG_OF_HAS_UBOOT_ENV and CONFIG_OF_HAS_BD_TJerry Van Baren2008-03-26-224/+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>
* | | | | Add setexpr commandKumar Gala2008-03-25-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a simple expr style command that will set an env variable as the result of the command. This allows us to do simple math in shell. The following operations are supported: &, |, ^, +, -, *, /. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | | | | Merge git://www.denx.de/git/u-boot into ubootGerald Van Baren2008-03-21-7/+43
|\ \ \ \ \
| * | | | | The patch introduces the alternative configuration of the log buffer for the ↵Yuri Tikhonov2008-03-18-6/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | | | | The patch introduces the CRITICAL feature of POST tests. If the test marked ↵Yuri Tikhonov2008-03-18-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | as POST_CRITICAL fails then the alternative, post_critical, boot-command is used. If this command is not defined then U-Boot enters into interactive mode. Signed-off-by: Dmitry Rakhchev <rda@emcraft.com> Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
* | | | | | Fix fdt boardsetup command parsingKumar Gala2008-03-18-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The introduciton of the 'fdt bootcpu' broke parsing for 'fdt boardsetup'. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | | | | | Add sub-commands to fdtKumar Gala2008-03-18-1/+111
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fdt header - Display header info fdt bootcpu <id> - Set boot cpuid fdt memory <addr> <size> - Add/Update memory node fdt rsvmem print - Show current mem reserves fdt rsvmem add <addr> <size> - Add a mem reserve fdt rsvmem delete <index> - Delete a mem reserves Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | | | | Blackfin: new cplbinfo command for viewing cplb tablesMike Frysinger2008-03-15-0/+60
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | | | | Blackfin: move bootldr command to common codeMike Frysinger2008-03-15-0/+65
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the Blackfin-common bootldr command out of the BF537-STAMP specific board directory and into the common directory so that all Blackfin boards may utilize it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | | | common/kgdb.c: fix 'dereferencing type-punned pointer' warningWolfgang Denk2008-03-09-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | and get rid of a couple of unneeded casts. Signed-off-by: Wolfgang Denk <wd@denx.de>
* | | | fix copy from ram to dataflashKim B. Heino2008-03-03-1/+1
| |_|/ |/| | | | | | | | | | | | | | | | | | | | If I try to "cp.b <ram> <dataflash>", u-boot selects normal flash routines instead of dataflash. This is because it checks "if source address is not dataflash" instead of target address. Signed-off-by: Kim B. Heino <Kim.Heino@bluegiga.com>
* | | ENV: remove saveenv when CFG_ENV_IS_NOWHERE is selectedJean-Christophe PLAGNIOL-VILLARD2008-02-23-4/+6
| |/ |/| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | Merge branch '080116_at91cap9' of git://linux-arm.org/u-boot-armdevPeter Pearse2008-02-15-8/+9
|\ \
| * | AT91CAP9 supportStelian Pop2008-02-14-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | --------------------------------- read_dataflash() takes a signed char pointer as a parameter. Silence a few warnings dues to incorrect parameter types in env_dataflash.c. Signed-off-by: Stelian Pop <stelian@popies.net>
* | | Fix wrong memory limit calculation in memory-testGuennadi Liakhovetski2008-02-15-15/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the length of the memory address range passed to the "mtest" command is not of the form 2^x - 1, not all address lines are tested. This bug is inherited from the original software at http://www.netrino.com/Embedded-Systems/How-To/Memory-Test-Suite-C. Fix this. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
* | | Merge branch 'master' of git://www.denx.de/git/u-boot-mpc86xxWolfgang Denk2008-02-15-1/+6
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: common/cmd_reginfo.c Signed-off-by: Wolfgang Denk <wd@denx.de>