summaryrefslogtreecommitdiff
path: root/common
Commit message (Collapse)AuthorAgeLines
* [new uImage] Add new uImage format support to imgextract commandMarian Balakowicz2008-03-12-31/+78
| | | | Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Add new uImage format support to autoscript routineMarian Balakowicz2008-03-12-19/+87
| | | | | | | | | | | | | | | autoscript() routine is updated to accept second argument, which is only used for FIT images and provides a FIT subimage unit name. autoscript() routine callers must now pass two arguments. For non-interactive use (like in cmd_load.c, cmd_net.c), new environment variable 'autoscript_uname' is introduced and used as a FIT subimage unit name source. autoscript command accepts extended syntax of the addr argument: addr:<subimg_uname> 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/+9
| | | | | | | | 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] Remove unnecessary arguments passed to ramdisk routinesMarian Balakowicz2008-03-12-20/+12
| | | | | | | 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 new uImage format support for ramdisk handlingMarian Balakowicz2008-03-12-16/+108
| | | | | | | This patch updates boot_get_ramdisk() routine adding format verification and handling for new (FIT) uImages. 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] New uImage low-level APIMarian Balakowicz2008-03-10-4/+1261
| | | | | | | | | | | | | 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] Fix component handling for legacy multi component imagesMarian Balakowicz2008-02-29-8/+8
| | | | | | | | | Use uint32_t when accessing size table in image_multi_count() and image_multi_getimg() for multi component images. Add missing uimage_to_cpu() endianness conversion. Signed-off-by: Marian Balakowicz <m8@semihalf.com>
* [new uImage] Share common uImage code between mkimage and U-bootMarian Balakowicz2008-02-29-97/+244
| | | | | | | | | | | | | | | | | | | | 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-242/+249
| | | | | | | | | | | | | | | 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>
* Merge branch 'master' of git://www.denx.de/git/u-boot into new-imageMarian Balakowicz2008-02-29-4/+6
|\
| * 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>
* | [new uImage] Provide ability to restrict region used for boot imagesKumar Gala2008-02-29-5/+31
| | | | | | | | | | | | | | | | 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-87/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+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
|\ \ | |/
| * 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>
| | * \ Merge commit 'wd/master'Jon Loeliger2008-02-14-3/+3
| | |\ \ | | | |/
| | * | Merge commit 'wd/master'Jon Loeliger2008-02-13-49/+18
| | |\ \
| | * | | 86xx: Add reginfo commandBecky Bruce2008-01-24-2/+8
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
| * | | | Merge branch 'master' of git://www.denx.de/git/u-boot-blackfinWolfgang Denk2008-02-15-8/+340
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile doc/README.standalone Signed-off-by: Wolfgang Denk <wd@denx.de>
| | * | | | new command for displaying strings at specified memory locationsMike Frysinger2008-02-04-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| | * | | | interface to Blackfin on-chip One-Time-Programmable memoryMike Frysinger2008-02-04-0/+164
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| | * | | | add support for memory commands with Blackfin L1 instruction memoryMike Frysinger2008-02-04-3/+48
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| | * | | | add Blackfin-specific reginfo commandMike Frysinger2008-02-04-4/+41
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| | * | | | add Blackfin-specific bdinfo commandMike Frysinger2008-02-04-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| | * | | | fix building on Blackfin as the assembler supports the .set syntax, not the ↵Mike Frysinger2008-02-04-1/+6
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | = syntax, for assigning symbols Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * | | | Fix return value of mtest when CFG_ALT_MEMTEST setGuennadi Liakhovetski2008-02-14-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a missing return statement from a non-void function. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
| * | | | common/miiphyutil.c: Cleanup MII_DEBUG and debug()Shinya Kuribayashi2008-02-14-22/+9
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current MII_DEBUG is confusing in two ways. One is useless define-then- undef at the top of the file. The other is there is only one debug() in this file, and that doesn't seem worthwhile to bother having MII_DEBUG. While there are many useful printf()/puts() debug codes, but they are for DEBUG, not for MII_DEBUG. This patch tries to put them all together into MII_DEBUG and debug(). Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
| * | | Fix building of fdt_support.c if DEBUG setKumar Gala2008-02-13-3/+3
| | |/ | |/| | | | | | | Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * | QE: Move FDT support into a common fileKumar Gala2008-02-12-48/+0
| | | | | | | | | | | | | | | | | | | | | Move the flat device tree setup for QE related devices into a common file shared between 83xx & 85xx platforms that have QE's. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | | [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>