Commit Graph

2278 Commits

Author SHA1 Message Date
Marian Balakowicz
1ec73761d2 [new uImage] Fix definition of common bootm_headers_t fields
verify, autostart and lmb fields are used regardless of CONFIG_FIT
setting, move their definitions to common section.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-03-12 10:35:52 +01:00
Marian Balakowicz
f773bea8e1 [new uImage] Add proper ramdisk/FDT handling when FIT configuration is used
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>
2008-03-12 10:35:46 +01:00
Marian Balakowicz
424c4abdd1 [new uImage] Add new uImage format support to autoscript routine
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>
2008-03-12 10:33:00 +01:00
Marian Balakowicz
3dfe110149 [new uImage] Add node offsets for FIT images listed in struct bootm_headers
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>
2008-03-12 10:32:59 +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
Bartlomiej Sieka
9d25438fe7 [new uImage] Add support for new uImage format to mkimage tool
Support for the new uImage format (FIT) is added to mkimage tool.
Commandline syntax is appropriately extended:

mkimage [-D dtc_options] -f fit-image.its fit-image

mkimage (together with dtc) takes fit-image.its and referenced therein
binaries (like vmlinux.bin.gz) as inputs, and produces fit-image file -- the
final image that can be transferred to the target (e.g., via tftp) and then
booted using the bootm command in U-Boot.

Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
2008-03-11 12:34:47 +01:00
Marian Balakowicz
eb6175edd6 [new uImage] Make node unit names const in struct bootm_headers
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-03-10 17:53:49 +01:00
Marian Balakowicz
5dfb521386 [new uImage] New uImage low-level API
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>
2008-03-10 17:51:07 +01:00
David Gibson
d1cc52879c libfdt: Add and use a node iteration helper function.
This patch adds an fdt_next_node() function which can be used to
iterate through nodes of the tree while keeping track of depth.  This
function is used to simplify the iteration code in a lot of other
functions, and is also exported for use by library users.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2008-02-29 16:00:31 +01:00
Bartlomiej Sieka
8cf30809a8 [new uImage] Add libfdt support to mkimage
Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
2008-02-29 16:00:24 +01:00
Marian Balakowicz
570abb0ad1 [new uImage] Share common uImage code between mkimage and U-boot
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>
2008-02-29 15:59:59 +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
Marian Balakowicz
e18489e8c2 Merge branch 'master' of git://www.denx.de/git/u-boot into new-image 2008-02-29 13:56:44 +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
f5614e7926 [new uImage] Add autostart flag to bootm_headers structure
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>
2008-02-29 13:15:56 +01:00
Kumar Gala
4ed6552f71 [new uImage] Introduce lmb from linux kernel for memory mgmt of boot images
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>
2008-02-29 13:15:55 +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
4efbe9dbb1 [new uImage] Correct raw FDT blob handlig when CONFIG_FIT is disabled
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>
2008-02-27 11:02:26 +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
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
Shinya Kuribayashi
b075d74efb Remove the __STRICT_ANSI__ check from the __u64/__s64 declaration on 32bit targets.
----------------------------------------------------------------
Olaf Hering [Wed, 17 Oct 2007 06:27:13 +0000 (23:27 -0700)]

Remove the __STRICT_ANSI__ check from the __u64/__s64 declaration on
32bit targets.

GCC can be made to warn about usage of long long types with ISO C90
(-ansi), but only with -pedantic.  You can write this in a way that even
then it doesn't cause warnings, namely by:

#ifdef __GNUC__
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
#endif

The __extension__ keyword in front of this switches off any pedantic
warnings for this expression.

Signed-off-by: Olaf Hering <olh@suse.de>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
----------------------------------------------------------------

Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
2008-02-23 09:49:48 +01:00
Detlev Zundel
e5084af8de Replace deprecated "ramdisk" with "ramdisk_size" kernel parameter.
The Linux commit fac8b209b1084bc85748bd54e13d00c1262b220f ("Remove
final traces of long-deprecated "ramdisk" kernel parm") makes these
changes neccessary.

Signed-off-by: Detlev Zundel <dzu@denx.de>
2008-02-22 17:26:13 +01:00
Yuri Tikhonov
2e721094a7 lwmon5: enable hardware watchdog
Some boards (e.g. lwmon5) may use rather small watchdog intervals, so
causing it to reboot the board if U-Boot does a long busy-wait with
udelay(). Thus, for these boards we have to restart WD more
frequently.

This patch splits the busy-wait udelay() into smaller, predefined,
intervals, so that the watchdog timer may be resetted with the
configurable (CONFIG_WD_PERIOD) interval.

Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
2008-02-22 15:54:34 +01:00
Anatolij Gustschin
bc77881247 ppc4xx: Support for ATI Radeon 9200 card on sequoia
Adds configuration option for ATI Radeon 9200 card
support to sequoia config file. If CONFIG_VIDEO
is enabled, TEXT_BASE should be changed to 0xFFF80000.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2008-02-22 15:51:08 +01:00
Wolfgang Denk
6a2dcaf1ee Merge branch 'master' of git://www.denx.de/git/u-boot-mpc86xx 2008-02-22 13:03:28 +01:00
Wolfgang Denk
239c885802 Merge branch 'master' of git://www.denx.de/git/u-boot-freebsd 2008-02-22 13:01:04 +01:00
Kumar Gala
5a9abcc317 Remove duplicate defines for ARRAY_SIZE
A few duplicate of the ARRAY_SIZE macro sneaked in since we put
the define in common.h.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-02-22 12:36:44 +01:00
Marian Balakowicz
2242f53698 [new uImage] Rename and move print_image_hdr() routine
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-21 17:27:41 +01:00
Marian Balakowicz
f50433d670 [new uImage] Add fit_parse_conf() and fit_parse_subimage() routines
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>
2008-02-21 17:20:20 +01:00
Marian Balakowicz
fff888a199 [new uImage] Add gen_get_image() routine
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>
2008-02-21 17:20:19 +01:00
Marian Balakowicz
75d3e8fbd9 [new uImage] Pull in libfdt if CONFIG_FIT is enabled
New uImage format (Flattened Image Tree) requires libfdt
functionality, print out error message if CONFIG_OF_LIBFDT
is not defined.

New uImage support is enabled by defining CONFIG_FIT (and CONFIG_OF_LIBFDT).
This commit turns it on by default.

Signed-off-by: Marian Balakowicz <m8@semihalf.com>
2008-02-21 17:20:18 +01:00
Marian Balakowicz
20c9395933 Merge branch 'master' of /home/git/u-boot 2008-02-21 17:18:01 +01:00
Rafal Jaworowski
e7a85f2683 API: Add (c) and licensing notice to the public API header.
Signed-off-by: Rafal Jaworowski <raj@semihalf.com>
2008-02-21 11:56:44 +01:00
Jon Loeliger
a551cee99a 86xx: Fix GUR PCI config registers properly.
Back in commit 975a083a5e where
I tried to "8610HPCD: Fix typos in two PCI setup registers", I
botched it due to not realizing that 8610 and 8641 had different
Global Utility Register defintions, one of which was like 85xx,
and the other wasn't.  Correct this problem by introducing two
symbols, one for each 86xx SoC, but neither of which is named
anything like 85xx.

My bad.  Lovely Wednesday with git bisect.  You know.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2008-02-20 14:45:09 -06:00
Jon Loeliger
cb06eb961b 8610HPCD: Don't use VIDEO/CFB_CONSOLE by default.
Without an actual supported video card hooked up, enabling
the CONFIG_VIDEO by default just makes it look broken by
routing all console output to the video card.   Don't.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2008-02-20 14:38:20 -06:00
Jon Loeliger
975a083a5e 8610HPCD: Fix typos in two PCI setup registers.
The two symbols MPC86xx_PORDEVSR_IO_SEL and MPC86xx_PORBMSR_HA
were erroneously present as 85xx names and values, leftover from
the clone wars.  Fix this by removing the 85xx cruft from the
86xx codebase.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2008-02-19 12:31:08 -06:00
Jon Loeliger
13f5433f70 86xx: Convert sbc8641d to use libfdt.
This is the proper fix for a missing closing brace in the function
ft_cpu_setup() noticed by joe.hamman <at> embeddedspecialties.com.
The ft_cpu_setup() function in mpc8641hpcn.c should have been
removed earlier as it was under the obsolete CONFIG_OF_FLAT_TREE,
but was missed.  Only, the sbc8641d was nominally still using it.
It all got ripped out, and the funcality that was in ft_board_setup()
was refactored to remove the CPU portions into the new file
cpu/mpc86xx/fdt.c instead.  Make sbc8641d use this now.

Based loosely on an original patch from joe.hamman@embeddedspecialties.com

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2008-02-18 14:01:56 -06:00
Niklaus Giger
ef5b4f221c ppc4xx: HCU4/5. Cleanup configs
- hcu4.h: Removed define of CONFIG_PPC405GPr
- Corrected phy addresses
- Fix boot variables
- Respect line length of 80 chars

Signed-off-by: Niklaus Giger <niklaus.giger@netstal.com>
2008-02-16 06:40:13 +01:00
Niklaus Giger
8cc10d06b8 ppc4xx: PPC405GPr fix missing register definitions
Signed-off-by: Niklaus Giger <niklaus.giger@netstal.com>
2008-02-16 06:39:46 +01:00
Larry Johnson
214398d9cb ppc4xx: Beautify configuration files for Sequoia and Korat boards
Signed-off-by: Larry Johnson <lrj@acm.org>
2008-02-16 06:38:55 +01:00
Peter Pearse
d7d9afa48c Merge branch '080131_artila' of git://linux-arm.org/u-boot-armdev 2008-02-15 12:59:56 +00:00
Peter Pearse
ae92069abe Merge branch '080116_at91cap9' of git://linux-arm.org/u-boot-armdev 2008-02-15 12:59:15 +00:00
Peter Pearse
e42d2b0479 Merge branch '070524_netstar' of git://linux-arm.org/u-boot-armdev 2008-02-15 12:58:10 +00:00
Anatolij Gustschin
f33e9653c9 Fix compile warning on lib_ppc/board.c
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2008-02-15 00:55:08 +01:00
Anatolij Gustschin
1b8607e1f7 Extend ATI Radeon driver to support more video modes
Adds ATI Radeon 9200 support for 1280x1024, 1024x768,
800x600, 640x480 at 24, 16 and 8 bpp.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2008-02-15 00:54:01 +01:00
Jean-Christophe PLAGNIOL-VILLARD
4124382de0 xsengine: fix typo and few coding style
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-02-15 00:52:04 +01:00
Wolfgang Denk
ae91a8055c Merge ../custodians 2008-02-15 00:27:11 +01:00
Wolfgang Denk
9e04a81388 Merge branch 'master' of git://www.denx.de/git/u-boot-mpc86xx
Conflicts:

	common/cmd_reginfo.c

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-02-15 00:26:52 +01:00