Commit Graph

58 Commits

Author SHA1 Message Date
Marian Balakowicz cd7c596e9f [new uImage] Add new uImage format support to arch specific do_bootm_linux() routines
This patch updates architecture specific implementations of
do_bootm_linux() adding new uImage format handling for
operations like get kernel entry point address, get kernel
image data start address.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-03-12 10:33:00 +01:00
Marian Balakowicz d985c8498c [new uImage] Remove unnecessary arguments passed to ramdisk routines
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>
2008-03-12 10:14:38 +01:00
Marian Balakowicz 9a4daad0a3 [new uImage] Update naming convention for bootm/uImage related code
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>
2008-02-29 14:58:34 +01:00
Kumar Gala 75fa002c47 [new uImage] Respect autostart setting in linux bootm
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Marian Balakowicz <m8@semihalf.com>
2008-02-29 13:15:56 +01:00
Kumar Gala d3f2fa0d27 [new uImage] Provide ability to restrict region used for boot images
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>
2008-02-29 13:15:56 +01:00
Kumar Gala e822d7fc4d [new uImage] Use lmb for bootm allocations
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>
2008-02-29 13:15:56 +01:00
Kumar Gala 274cea2bdd [new uImage] rework error handling so common functions don't reset
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>
2008-02-29 12:32:50 +01:00
Kumar Gala a6612bdfe7 [new uImage] Don't pass kdb to ramdisk_high since we may not have one
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>
2008-02-29 12:27:21 +01:00
Marian Balakowicz 8a5ea3e616 [new uImage] Move image verify flag to bootm_headers structure
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>
2008-02-27 11:01:04 +01:00
Marian Balakowicz 823afe7cef [Makefile] Sort COBJS in lib_<arch> Makefiles
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-27 11:00:47 +01:00
Marian Balakowicz d5934ad775 [new uImage] Add dual format uImage support framework
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>
2008-02-25 15:53:49 +01:00
Marian Balakowicz b6b0fe6460 [new uImage] Cleanup do_botm_linux() boot allocations
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>
2008-02-07 01:13:00 +01:00
Marian Balakowicz ceaed2b1e5 [new uImage] Move ramdisk loading to a common routine
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>
2008-02-07 01:13:00 +01:00
Marian Balakowicz 5ad03eb385 [new uImage] Factor out common image_get_ramdisk() routine
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>
2008-02-07 01:12:59 +01:00
Marian Balakowicz 4a995edec1 [new uImage] Rename architecture specific bootm code files
Implementation of the do_bootm_linux() and other bootm helper routines is
architecture specific code. As such it resides in lib_<arch> directories
in files named <arch>_linux.c

This patch renames those files to a more clear and accurate
lib_<arch>/bootm.c form.

List of the renamed files:
   lib_arm/armlinux.c -> lib_arm/bootm.c
   lib_avr32/avr32_linux.c -> lib_avr32/bootm.c
   lib_blackfin/bf533_linux.c -> lib_blackfin/bootm.c
   lib_i386/i386_linux.c -> lib_i386/bootm.c
   lib_m68k/m68k_linux.c -> lib_m68k/bootm.c
   lib_microblaze/microblaze_linux.c -> lib_microblaze/bootm.c
   lib_mips/mips_linux.c -> lib_mips/bootm.c
   lib_nios/nios_linux.c -> lib_nios/bootm.c
   lib_nios2/nios_linux.c -> lib_nios2/bootm.c
   lib_ppc/ppc_linux.c -> lib_ppc/bootm.c
   lib_sh/sh_linux.c -> lib_sh/bootm.c

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-07 01:12:57 +01:00
Marian Balakowicz f13e7b2e99 [new uImage] Cleanup image header pointer use in bootm code
- 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>
2008-02-07 01:12:57 +01:00
Marian Balakowicz af13cdbc01 [new uImage] Add memmove_wd() common routine
Move common, watchdog sensible memmove code to a helper memmmove_wd() routine.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-07 01:12:56 +01:00
Marian Balakowicz 559316faf7 [new uImage] Move CHUNKSZ definition to image.h
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>
2008-02-07 01:12:55 +01:00
Marian Balakowicz b97a2a0a21 [new uImage] Define a API for image handling operations
- 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>
2008-02-07 01:12:53 +01:00
TsiChungLiew 1552af70ec ColdFire: Add MCF5227x cpu and M52277EVB support-1
Signed-off-by: TsiChungLiew <Tsi-Chung.Liew@freescale.com>
Signed-off by: John Rigby <jrigby@freescale.com>
2008-01-17 14:59:41 -06:00
TsiChungLiew 688e8eb414 ColdFire: Fix build error when CONFIG_WATCHDOG is defined
Signed-off-by: TsiChungLiew <Tsi-Chung.Liew@freescale.com>
2007-10-25 17:14:00 -05:00
Stefan Roese 8280f6a1c4 Coding style cleanup
Signed-off-by: Stefan Roese <sr@denx.de>
2007-08-18 14:33:02 +02:00
TsiChungLiew 8ae158cd87 ColdFire: Add M54455EVB for MCF5445x
Signed-off-by: TsiChungLiew <Tsi-Chung.Liew@freescale.com>
2007-08-16 17:43:23 -06:00
TsiChungLiew a1436a8426 ColdFire: Add M5253EVBE platform for MCF52x2
Signed-off-by: TsiChungLiew <Tsi-Chung.Liew@freescale.com>
2007-08-16 17:43:21 -06:00
TsiChungLiew 83ec20bc43 ColdFire: MCF52x2 update
Signed-off-by: TsiChungLiew <Tsi-Chung.Liew@freescale.com>
2007-08-16 17:43:20 -06:00
TsiChungLiew ab77bc547b ColdFire: MCF5329 Update and cleanup
Signed-off-by: TsiChungLiew <Tsi-Chung.Liew@freescale.com>
2007-08-16 17:43:19 -06:00
Stefan Roese d61ea14885 Merge with git://www.denx.de/git/u-boot.git 2007-08-15 14:51:27 +02:00
TsiChungLiew 99c03c175d Changed CFG_CLK to gd->bus_clk for CFG_TIMER_PRESCALER. Added DECLARE_GLOBAL_DATA_PTR for time.c
Signed-off-by: TsiChungLiew <Tsi-Chung.Liew@freescale.com>
2007-08-08 09:47:31 +02:00
Wolfgang Denk f2c2a937d8 Merge with /home/wd/git/u-boot/custodian/u-boot-testing 2007-08-06 01:11:08 +02:00
Stefan Roese c7e8410e3c Merge with /home/stefan/git/u-boot/u-boot-coldfire-freescale 2007-07-16 11:51:41 +02:00
Heiko Schocher fad6340715 make show_boot_progress () weak.
Signed-off-by: Heiko Schocher <hs@denx.de>
2007-07-13 09:54:17 +02:00
TsiChungLiew 52b017604a Update header file. Include dtimer_intr_setup(). Changed timer divider to global define.
Include immap.h and timer.h. Moved dtimer interrupt setup to dtimer_intr_setup() from cpu/mcf532x/interrupts.c. Changed (CFG_CLK /1000000) -1 << 8 to CFG_TIMER_PRESCALER

Signed-off-by: TsiChungLiew <Tsi-Chung.Liew@freescale.com>
2007-07-10 14:29:10 -06:00
TsiChungLiew 45a25bfd0c Update header file and clean up
Include immap.h

Signed-off-by: TsiChungLiew <Tsi-Chung.Liew@freescale.com>
2007-07-10 14:29:10 -06:00
Jon Loeliger b3aff0cb9e disk/ doc/ lib_*/ and tools/: Remove lingering references to CFG_CMD_* symbols.
Fixed some broken instances of "#ifdef CMD_CFG_IDE" too.
Those always evaluated TRUE, and thus were always compiled
even when IDE really wasn't defined/wanted.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-07-10 11:19:50 -05:00
Jon Loeliger 7def6b34f9 lib_{m68k,microblaze,mips,ppc}/: Remove obsolete references to CONFIG_COMMANDS
Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-07-09 18:02:11 -05:00
Jon Loeliger 0c505db0a0 lib_*/: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).
This is a compatibility step that allows both the older form
and the new form to co-exist for a while until the older can
be removed entirely.

All transformations are of the form:
Before:
    #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT)
After:
    #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT)

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-07-04 00:23:17 +02:00
TsiChung Liew 8e585f02f8 Added M5329AFEE and M5329BFEE Platforms
Added board/freescale/m5329evb, cpu/mcf532x, drivers/net,
drivers/serial,  immap_5329.h, m5329.h, mcfrtc.h,
include/configs/M5329EVB.h, lib_m68k/interrupts.c, and
rtc/mcfrtc.c

Modified CREDITS, MAKEFILE, Makefile, README, common/cmd_bdinfo.c,
common/cmd_mii.c, include/asm-m68k/byteorder.h, include/asm-m68k/fec.h,
include/asm-m68k/io.h, include/asm-m68k/mcftimer.h,
include/asm-m68k/mcfuart.h, include/asm-m68k/ptrace.h,
include/asm-m68k/u-boot.h, lib_m68k/Makefile, lib_m68k/board.c,
lib_m68k/time.c, net/eth.c and rtc/Makefile

Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
2007-06-18 15:17:56 -06:00
Bartlomiej Sieka daa6e418bc Preliminary support for the iDMR board (ColdFire). 2006-12-20 00:27:32 +01:00
Wolfgang Denk 2b208f5308 Move "ar" flags to config.mk to allow for silent "make -s"
Based on patch by Mike Frysinger, 20 Jun 2006
2006-10-09 01:02:05 +02:00
Marian Balakowicz f93286397e Add support for a saving build objects in a separate directory.
Modifications are based on the linux kernel approach and
support two use cases:

  1) Add O= to the make command line
  'make O=/tmp/build all'

  2) Set environement variable BUILD_DIR to point to the desired location
  'export BUILD_DIR=/tmp/build'
  'make'

The second approach can also be used with a MAKEALL script
'export BUILD_DIR=/tmp/build'
'./MAKEALL'

Command line 'O=' setting overrides BUILD_DIR environent variable.

When none of the above methods is used the local build is performed and
the object files are placed in the source directory.
2006-09-01 19:49:50 +02:00
Wolfgang Denk 977b50f868 Minor cleanup. 2006-05-10 17:43:20 +02:00
Wolfgang Denk 1cfefe8cb6 Merge with /home/m8/git/u-boot 2006-05-09 13:46:55 +02:00
Marian Balakowicz 483a0cf804 Fixes for gcc 3.4 based m68k toolchain,
based on patch by Jate Sujjavanich.
2006-05-09 11:28:36 +02:00
Marian Balakowicz 7a635e004e Add support for Freescale M5271: Merge with /work/u-boot.mcf5271 2006-04-27 19:12:19 +02:00
Markus Klotzbuecher d860c34ff0 cosmetic: print amount of NAND flash aligned with the other values such as
DRAM
2006-04-25 17:00:33 +02:00
Wolfgang Denk d87080b721 GCC-4.x fixes: clean up global data pointer initialization for all boards. 2006-03-31 18:32:53 +02:00
Zachary P. Landau eacbd31775 Add support for Freescale M5271 processor 2006-01-26 17:35:56 -05:00
wdenk 3c2b3d454d * Patch by Ladislav Michl, 05 Apr 2005:
Add support for VoiceBlue board.

* Patch by Ladislav Michl, 05 Apr 2005:
  Fix netboot_common() prototypes.

* Cleanup.
2005-04-05 23:32:21 +00:00
wdenk 50712ba16e * Patch by Mathias Küster, 23 Nov 2004:
add udelay support for the mcf5282 cpu

* Patch by Tolunay Orkun, 16 November 2004:
  fix incorrect onboard Xilinx CPLD base address
2005-04-03 23:35:57 +00:00
stroese cd42deebd2 Coldfire MCF5249 support added 2004-12-16 17:56:09 +00:00