Commit Graph

234 Commits

Author SHA1 Message Date
Wolfgang Denk
ceb2d57c22 kwbimage.c: Fix compile warning when building on 64 bit systems (again)
Commit 51003b89 attempted to fix a build problem on 64 bit systems,
but just turned it into a build problem on 32 bit systems (silly me).

Now do the Right Thing (TM) and use a "%zu" printf format.

Also fix spelling error.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-09-15 21:32:19 +02:00
Wolfgang Denk
51003b8981 kwbimage.c: Fix compile warning when building on 64 bit systems
Fix this warning when building on 64 bit systems:
tools/kwbimage.c: In function 'kwbimage_checksum32':
tools/kwbimage.c:135: warning: format '%d' expects type 'int',
but argument 4 has type 'long unsigned int'

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
2009-09-11 09:11:03 +02:00
Prafulla Wadaskar
aa0c7a86cd mkimage: Add Kirkwood Boot Image support (kwbimage)
This patch adds support for "kwbimage" (Kirkwood Boot Image)
image types to the mkimage code.

For details refer to docs/README.kwbimage

This patch is tested with Sheevaplug board

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Acked-by: Ron Lee <ron@debian.org>

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2009-09-10 22:58:48 +02:00
Prafulla Wadaskar
37b801888c mkimage: Include missing files in build dependency calculations
Include default_image.o and fit_image.o into the build dependency
calculations. This makes sure they get rebuilt if any of the headers
they include are modified

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Acked-by: Ron Lee <ron@debian.org>

Edited commit message.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-09-10 22:58:48 +02:00
Wolfgang Denk
3a2003f61e tools/mkimage: fix compiler warnings, use "const"
This fixes some compiler warnings:
tools/default_image.c:141: warning: initialization from incompatible pointer type
tools/fit_image.c:202: warning: initialization from incompatible pointer type
and changes to code to use "const" attributes in a few places where
it's appropriate.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-09-10 22:58:48 +02:00
Prafulla Wadaskar
89a4d6b12f tools: mkimage: split code into core, default and FIT image specific
This is a first step towards reorganizing the mkimage code to make it
easier to add support for additional images types. Current mkimage
code is specific to generating uImage and FIT image files, but the
same framework can be used to generate other image types like
Kirkwood boot images (kwbimage-TBD). For this, the mkimage code gets
reworked:

Here is the brief plan for the same:-
a) Split mkimage code into core and image specific support
b) Implement callback functions for image specific code
c) Move image type specific code to respective C files
       Currently there are two types of file generation/list
       supported (i.e uImage, FIT), the code is abstracted from
       mkimage.c/.h and put in default_image.c and fit_image.c;
       all code in these file is static except init function call
d) mkimage_register API is added to add new image type support
All above is addressed in this patch
e) Add kwbimage type support to this new framework (TBD)
This will be implemented in a following commit.

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Edit commit message, fix coding style and typos.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-09-10 22:58:48 +02:00
Prafulla Wadaskar
449609f5b1 tools: mkimage: Fixed build warnings
uninitialized retval variable warning fixed
crc32 APIs moved to crc.h (newly added) and build warnings fixed

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-09-10 22:58:47 +02:00
Prafulla Wadaskar
14821d7dea tools: mkimage: Makefile sorted
The tools/Makefile is sorted for all entries,

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2009-09-10 22:58:47 +02:00
Prafulla Wadaskar
f7644c0bf3 tools: mkimage : bugfix returns correct value for list command
List command always return "EXIT_SUCCESS" even in case of
failure by any means.

This patch return 0 if list command is sucessful,
returns negative value reported by check_header functions

Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-09-10 22:58:47 +02:00
Wolfgang Denk
46ff6d4613 License cleanup: remove unintended "All Rights Reserved" notices.
Some files included my old standerd file header which had a "All
Rights Reserved" part. As this has never been my intention, I remove
these lines to make the files compatible with GPL v.2 and later.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-09-04 23:00:56 +02:00
Mike Frysinger
9aef738885 unify HOST_CFLAGS and HOSTCFLAGS
The top build system sets up HOSTCFLAGS a bit and exports it, but other
places use HOST_CFLAGS instead.  Unify the two as HOSTCFLAGS so that the
values stay in sync.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-23 21:26:14 +02:00
Mike Frysinger
3756609076 compiler.h: unify system ifdef cruft here
Shove a lot of the HOSTCC and related #ifdef checking crap into the new
compiler.h header so that we can keep all other headers nice and clean.

Also introduce custom uswap functions so we don't have to rely on the non
standard implementations that a host may (or may not in the case of OS X)
provide.  This allows mkimage to finally build cleanly on an OS X system.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-19 21:41:46 +02:00
Mike Frysinger
2d8d2adde3 envcrc: add missing dependencies on env storage
When the envcrc building was made conditional, it missed a bunch of env
storage types, so add all currently supported types.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-17 22:14:05 +02:00
Mike Frysinger
c11ff779f4 Blackfin: add jtagconsole helper script
This script is similar to the netconsole script, but instead works with
the JTAG console device driver that exists on Blackfin parts.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-15 11:15:04 +02:00
Mike Frysinger
837db3d87f tools/envcrc: add --binary option to export embedded env
The --binary option to envcrc can be used to export the embedded env as a
binary blob so that it can be manipulated/examined/whatever externally.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12 20:39:47 +02:00
Marco Stornelli
f578a2da67 Add imls utility command
This patch adds, under tools folder, a new command called imls. Its
goal is the same of UBoot's imls but it can be used as Linux shell
command. It reads from raw mtd partition and prints the list of the
stored images.

Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
2009-05-15 21:24:23 +02:00
Peter Tyser
65351a8793 bmp_logo: Check return value of fread()
Add basic error handling to fread() function calls.  This prevents
compililation warnings such as:

bmp_logo.c: In function ‘main’:
bmp_logo.c:71: warning: ignoring return value of ‘fread’, declared with
attribute warn_unused_result
...

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-28 01:16:50 +02:00
Peter Tyser
eea8be86d1 ncb: Check return value of write()
This prevents the compilation warning:

ncb.c: In function 'main':
ncb.c:32: warning: ignoring return value of ‘write’, declared with
attribute warn_unused_result

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-28 01:16:46 +02:00
Peter Tyser
54e822f959 Replace __asm references with __asm__
__asm__ follows gcc's documented syntax and is generally more common
than __asm.  This change is only asthetic and should not affect
functionality.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-28 01:02:04 +02:00
Ilko Iliev
f0a2c7b4b6 at91: add support for the PM9263 board of Ronetix GmbH
The PM9263 board is based on the AT91SAM9263-EK board.

Here is the page on Ronetix website:
http://www.ronetix.at/starter_kit_9263.html

Signed-off-by: Ilko Iliev <iliev@ronetix.at>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2009-04-16 21:30:48 +02:00
Wolfgang Denk
f63728c804 One more fix for building env_embedded.o
In addition to the changes for CONFIG_ENV_IS_IN_FLASH as done in
commit afcbce07, we also need to do the same for
CONFIG_ENV_IS_IN_EEPROM and CONFIG_ENV_IS_IN_NVRAM.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-04-05 00:18:44 +02:00
Peter Korsgaard
6b6bb02f27 tools/setlocalversion: use git svn instead of git-svn
Use the new "git <subcmd>" syntax instead of the deprecated
"git-<subcmd>".

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2009-04-04 23:11:16 +02:00
Wolfgang Denk
ecf3fb223a Fix implicit declaration of function 'htons'
Include <netinet/in.h> instead of <linux/in.h> to get htons()
prototpye.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-04-04 17:58:19 +02:00
Wolfgang Denk
afcbce07e9 Fix building of env_embedded.o
Since commit a706bfc7 common/env_embedded.o and tools/envcrc were
only built when CONFIG_ENV_IS_EMBEDDED was set, but this breaks
building for many boards.

We always have to build these files when CONFIG_ENV_IS_IN_FLASH is
set.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-04-04 16:10:40 +02:00
Jean-Christophe PLAGNIOL-VILLARD
ae644c178f tools/Makefile: fix image.c dependancy location
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-04-04 15:36:15 +02:00
Mike Frysinger
b074a70811 tools: add ncb to gitignore
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-04-04 15:34:16 +02:00
Peter Tyser
0a145ce6e7 Delete now unused tools/Makefile.win32
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-04 01:21:05 +02:00
Peter Tyser
2f8d396b93 Add support for building native win32 tools
Add support for compiling the host tools in the tools directory using
the MinGW toolchain.  This produces executables which can be used on
standard Windows computers without requiring cygwin.

One must specify the MinGW compiler and strip utilities as if they
were the host toolchain in order to build win32 executables, eg:

make HOSTCC=i586-mingw32msvc-gcc HOSTSTRIP=i586-mingw32msvc-strip tools

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-04 01:21:02 +02:00
Peter Tyser
e50abf662e tools/Makefile: Simplify HOST_CFLAGS/HOST_LDFLAGS generation
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-04 01:18:11 +02:00
Peter Tyser
b0d4d7219a tools/Makefile: Create generic build rules
Create a few generic build rules to replace the current method which has
1 build target for each file

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-04 01:17:30 +02:00
Peter Tyser
273174ddbc tools/Makefile: Use auto-generated object file dependencies
Files in the SRCS variable have their dependencies automatically
generated so remove duplicate explicit dependencies

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-04 01:14:32 +02:00
Peter Tyser
fb8b33c1e6 tools/Makefile: Remove symlinks for remaining source files
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-04 01:14:28 +02:00
Peter Tyser
eed073315b tools/Makefile: Dynamically generate libfdt object dependencies
Add the libfdt files to the SRCS variable so that they have their
dependencies automatically generated

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-04 01:14:25 +02:00
Peter Tyser
c017017539 tools/Makefile: Remove symlinks for fdt targets
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-04 01:14:19 +02:00
Peter Tyser
45d6bdff68 tools/Makefile: Add libfdt/ to the include search path
This change makes the process of symlinking libfdt_internal.h
unnecessary

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-04 01:14:14 +02:00
Peter Tyser
fba0e3a081 tools: Remove unecessary symlinking of zlib.h
crc32.c uses the zlib.h header in include/u-boot/zlib.h.  The symlink
was previously necessary to give U-Boot's version of zlib.h precedence
over the host computer's version of zlib.h.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-04 01:14:09 +02:00
Peter Tyser
40b8d909ac tools/Makefile: Add tools/ to the include search path
This change makes the process of symlinking mkimage.h and fdt_host.h
unnecessary

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-04 01:13:59 +02:00
Peter Tyser
1cd300de5e tools/Makefile: Compile ncb when CONFIG_NETCONSOLE
Also conditionally add ncb.o to OBJ_FILES list

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-04 01:12:25 +02:00
Peter Tyser
123c48a21c tools/Makefile: Make gen_eth_addr dependent upon CONFIG_CMD_NET
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-04 01:12:22 +02:00
Peter Tyser
4d93a0a807 tools/Makefile: Make envcrc dependent upon CONFIG_ENV_IS_EMBEDDED
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-04 01:12:20 +02:00
Peter Tyser
cd26a31a23 tools/Makefile: Make inca-swap-bytes dependent on CONFIG_INCA_IP
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-04 01:12:18 +02:00
Peter Tyser
7cd5cbc346 tools/Makefile: Make ubsha1 dependent upon CONFIG_SHA1_CHECK_UB_IMG
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-04 01:12:16 +02:00
Peter Tyser
eeba861790 tools/Makefile: Make img2srec dependent upon CONFIG_CMD_LOADS
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-04 01:11:14 +02:00
Peter Tyser
335ffe7e0e tools/Makefile: Build bmp_logo only when LCD or VIDEO logos are enabled
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-04 01:11:12 +02:00
Peter Tyser
ee3584a597 tools/Makefile: Split variable declarations into multiple lines
Split variable declarations into multiple lines and use the standard
VAR-y convention.  Also move object and binary variable declarations to
after config.mk has been included to allow for these lists to utilize
the CONFIG_XXX variables.

These changes lay the groundwork for conditional compilation of files
in the tools directory.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-04 01:11:07 +02:00
Peter Tyser
21d28e95ed tools/Makefile: Remove inappropriate double-tabs
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-04 01:10:31 +02:00
Peter Tyser
652f4ba076 tools/Makefile: Remove HOSTARCH HOSTOS defines
The values of HOSTARCH and HOSTOS which are exported from the top-level
Makefile should be used

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-04 01:10:25 +02:00
Peter Tyser
2eeb4e95fb gen_eth_addr: Use POSIX rand() and srand()
Replace random()/srandom() use with rand()/srand() to support
compilation with the mingw toolchain.  The rand()/srand() functions are
generally more common and are functionally equivalent to the original
random()/srandom() calls.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-04-04 01:09:56 +02:00
Peter Tyser
62c3ae7c6e Standardize command usage messages with cmd_usage()
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-01-28 08:43:45 +01:00
Mike Frysinger
24113a44ed easylogo: add optional gzip support
Some images can be quite large, so add an option to compress the
image data with gzip in the U-Boot image. Then at runtime, the
board can decompress it with the normal zlib functions.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-01-24 02:05:22 +01:00
Mike Frysinger
fadad1573f ncb: use socklen_t
The recvfrom() function takes a socklen_t, not an int.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-01-16 09:31:05 +01:00
Martin Michlmayr
22525779cb Fix a typo in fw_env.config
Reported-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-12-15 21:49:03 +01:00
Mike Frysinger
bcb6dd9187 tools/netconsole: new script for working with netconsole over UDP
While the doc/README.NetConsole does have a snippet for people to
create their own netcat script, it's a lot easier to make a simple
dedicated script and tell people to use it.

Also spruce it up a bit to make it user friendly.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-12-10 09:23:11 +01:00
Jean-Christophe PLAGNIOL-VILLARD
6d0f6bcf33 rename CFG_ macros to CONFIG_SYS
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-10-18 21:54:03 +02:00
richardretanubun
c68a05feeb Adds two more ethernet interface to 83xx
Added as a convenience for other platforms that uses MPC8360 (has 8 UCC).
Six eth interface is chosen because the platform I am using combines
UCC1&2 and UCC3&4 as 1000 Eth and the other four UCCs as 10/100 Eth.

Signed-off-by: Richard Retanubun <RichardRetanubun@RugggedCom.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2008-10-18 21:54:00 +02:00
Jean-Christophe PLAGNIOL-VILLARD
0e8d158664 rename CFG_ENV macros to CONFIG_ENV
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:48:06 +02:00
Jean-Christophe PLAGNIOL-VILLARD
5a1aceb068 rename CFG_ENV_IS_IN_FLASH in CONFIG_ENV_IS_IN_FLASH
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:48:04 +02:00
Jean-Christophe PLAGNIOL-VILLARD
0cf4fd3cf8 rename environment.c in env_embedded.c to reflect is functionality
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10 22:48:01 +02:00
Guennadi Liakhovetski
5608692104 fw_env: add NAND support
Add support for environment in NAND with automatic NOR / NAND recognition,
including unaligned environment, bad-block skipping, redundant environment
copy.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
2008-09-09 10:39:55 +02:00
Wolfgang Denk
1711f3bd16 fw_env.c: fix build problems with MTD_VERSION=old
(as needed to support old 2.4 Linux kernel based releases)

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-09-02 21:17:36 +02:00
Harald Welte
0a823aa2a8 Add 'license' command to U-Boot command line
The 'license' command includes the U-Boot license (GPLv2) into the
actual bootloader binary. The license text can be shown interactively
at the U-Boot commandline.

For products where the commandline can actually be accessed by the
end user, this helps to prevent inadvertent GPL violations, since the
GPLv2 license text can no longer be 'forgotten' to be included into
the product.

The 'license' command can be enabled by CONFIG_CMD_LICENSE.

Signed-off-by: Harald Welte <laforge@openmoko.org>
2008-08-18 23:21:49 +02:00
Jean-Christophe PLAGNIOL-VILLARD
31cfe57491 tools/gitignore: update to all generated files
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-07-15 21:40:21 +02:00
Wolfgang Denk
d0ff51ba5d Code cleanup: fix old style assignment ambiguities like "=-" etc.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-14 15:19:07 +02:00
Wolfgang Denk
184f1b404a Fixed some out-of-tree build issues
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-07-11 22:55:31 +02:00
Gary Jennejohn
a7a5982cd0 Add logos for RRvision board
Signed-off-by: Gary Jennejohn <garyj@denx.de>
2008-07-02 16:36:35 +02:00
Jean-Christophe PLAGNIOL-VILLARD
42fd5f87b1 Merging Stelian Pop AT91 patches
Merge branch 'testing-V2'

Conflicts:

	board/atmel/at91cap9adk/Makefile
                Fixing copyright
	board/atmel/at91sam9260ek/Makefile
                Fixing copyright
	board/atmel/at91sam9260ek/u-boot.lds
                Delete no more needed ld script

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-05-24 12:56:53 +02:00
Wolfgang Denk
53677ef18e Big white-space cleanup.
This commit gets rid of a huge amount of silly white-space issues.
Especially, all sequences of SPACEs followed by TAB characters get
removed (unless they appear in print statements).

Also remove all embedded "vim:" and "vi:" statements which hide
indentation problems.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-21 00:14:08 +02:00
Stelian Pop
098b7b4b44 Use custom logo for Atmel boards
This patch adds a custom vendor logo for the Atmel AT91 boards.

Signed-off-by: Stelian Pop <stelian@popies.net>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-05-10 11:45:03 +02:00
Grant Erickson
bc11756daf Propagate Error Status to the Shell on fw_printenv Errors
Changed implementation such that fw_printenv returns failure status
when one or more specified variables do not exist or when incorrect
command syntax is used.

This aids scripting fw_printenv such that the script can key of the
return status rather than relying on standard error "scraping".

Signed-off-by: Grant Erickson <gerickson@nuovations.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-05-09 23:40:40 +02:00
Grant Erickson
f3b6d528e4 Fix Compilation Errors with 'tools/env/fw_printenv'
In the current top-of-tree, 1.3.3.-rc2, the optional tool
'tools/env/fw_printenv' fails to compile for two reasons:

1) The header watchdog.h cannot be found.
2) The header zlib.h is picked up from the tool chain rather than the
   project causing a prototype conflict for crc32.

This patch addresses both of these issues.

Platforms Tested On:
- AMCC "Kilauea"

Signed-off-by: Grant Erickson <gerickson@nuovations.com>
2008-05-09 23:04:41 +02:00
Mike Frysinger
fa956fde60 mkimage: make mmap() checks consistent
The mmap() related code is full of inconsistent casts/constants when
it comes to error checking, and may break when building on some
systems (like ones that do not implicitly define the caddr_t type).
Let's just avoid the whole mess by writing the code nice and clean in
the first place.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-05-03 23:33:43 +02:00
Kumar Gala
8ea08e5be6 Update .gitignore for zlib.h
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2008-04-29 20:02:51 +02:00
Bartlomiej Sieka
edbed247a1 Memory footprint optimizations
As suggested by Wolfgang Denk:
- image printing functions:
  - remove wrappers
  - remove indentation prefix from functions' signatures
- merge getenv_verify and getenv_autostart into one parametrized function

Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
2008-04-24 17:21:55 +02:00
Mike Frysinger
89cdab788f crc32: use uint32_t rather than unsigned long
The envcrc.c does sizeof(unsigned long) when calculating the crc, but
this is done with the build toolchain instead of the target tool
chain, so if the build is a 64bit system but the target is 32bits,
the size will obviously be wrong. This converts all unsigned long
stuff related to crc32 to uint32_t types. Compile tested only: output
of ./tools/envcrc when run on a 32bit build system matches that of a
64bit build system.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-04-24 13:18:17 +02:00
Mike Frysinger
92bad20ad7 Add support for u-boot in svn and localversion-* files
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-04-18 10:08:31 -07:00
Anatolij Gustschin
b9670dd85b Fix out of tree building issue
Currently U-Boot building in some external directory
doesn't work. This patch tries to fix the problem.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2008-03-27 00:18:58 +01:00
Bartlomiej Sieka
27f33e9f45 Merge branch 'new-image' of git://www.denx.de/git/u-boot-testing
Conflicts:

	common/cmd_bootm.c
	cpu/mpc8xx/cpu.c

Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
2008-03-26 09:38:06 +01:00
Bartlomiej Sieka
766529fccc Add MD5 support to the new uImage format
Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
2008-03-14 16:22:34 +01:00
Wolfgang Denk
b8aa57b5d4 tools/setlocalversion: use a git-describe-ish format
Change the automatic local version to have the form -nnnnn-gSHA1SUMID,
where 'nnnnn' is the number of commits since the last tag (i.e.,
1.3.2-rc3).  This makes it much easier to recognize "newer" versions
and to see how much has been changed since the referenced tag.

Stolen from Linux kernel's scripts/setlocalversio, see commit d882421f.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-03-14 16:04:54 +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
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
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
Bartlomiej Sieka
a6e530f00d [new uImage] Add sha1.o object to mkimage binary build
Signed-off-by: Bartlomiej Sieka <tur@semihalf.com>
2008-02-29 16:00:23 +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
Marcel Moolenaar
02409f8cf5 make define2mk.sed work on FreeBSD
In the thread "[1.3.2-rc1] MPC8548CDS/MPC8555CDS configs fails to link",
the define2mk.sed script was identified as the source of the link
failure on FreeBSD. The problem is that sed(1) does not always support
the '+' operator. It isn't on FreeBSD. The attach patch implements the
equivalent, using the '*' operator instead and should work everywhere.

Signed-off-by: Marcel Moolenaar <marcelm@juniper.net>
2008-02-22 21:27:01 +01:00
Mike Frysinger
edfed1d91d easylogo: clean up some more and add -r (rgb) support
Michael Hennerich added support for outputting an image in RGB format rather
than forcing YUYV all the time.  This makes obvious sense if the display you
have takes RGB input rather than YUYV.

Rather than hack in support for options, I've converted it to use getopt and
cleaned up the argument parsing in the process.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-02-22 12:07:39 +01:00
Marian Balakowicz
20c9395933 Merge branch 'master' of /home/git/u-boot 2008-02-21 17:18:01 +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
Mike Frysinger
24e02d0fd3 add the default Blackfin logo used by Blackfin boards with splash screens
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2008-02-04 19:26:54 -05:00
Mike Frysinger
01c687aa6e Do not reference sha1.c when building mkimage.
remove sha1.o from mkimage linking since it isn't actually used.

Signed-Off-By: Mike Frysinger <vapier@gentoo.org>
2008-01-09 21:42:04 +01:00
Wolfgang Denk
6007f3251c Coding Style cleanup, update CHANGELOG
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-01-09 15:14:46 +01:00
Mike Frysinger
fc6414eca5 fix easylogo on big endian dev systems
didnt realize how out of shape easylogo actually was until i tried using it.
this patch does byte swapping as need be on the input tga header since the tga
is in little endian but the host could just as well be big endian.  i didnt
bother using bswap macros or such stuff from system headers as nothing in
POSIX dictates byte swapping functionality.

Signed-Off-By: Mike Frysinger <vapier@gentoo.org>
2008-01-09 15:10:08 +01:00
Mike Frysinger
38d299c2db cleanup easylogo
- make the Makefile not suck
- include proper headers for prototypes
- fix obvious broken handling of strchr() when handling '.' in filenames

Signed-Off-By: Mike Frysinger <vapier@gentoo.org>
2008-01-09 15:09:05 +01:00
raptorbrino@aim.com
883e3925d9 Fix build problems under Cygwin
This patch allows u-boot to build without error in a cygwin
environment.  Cygwin does not define __u64 in it's
include/asm/types.h file.  The -idirafter flag in the u-boot
build causes the inclusion of the cygwin types.h file as opposed
to u-bot/include/asm/types.h file which does define __u64.
Subsequently, sha1.c compile fails due to unknown symbol.

Signed-off-by: Brian Miller <raptorbrino@netscape.net>
2008-01-09 15:07:02 +01:00
Wolfgang Denk
46f6e50190 Fix compile problem with new env code.
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-01-09 09:51:14 +01:00
Markus Klotzbücher
64b3727b97 tools: fix fw_printenv tool to compile again
This patch updates the fw_printenv/fw_setenv userspace tool to include
the correct MTD header in order to compile against current kernel
headers. Backward compatibility is preserved by introducing an option
MTD_VERSION which can be set to "old" for compilation using the old MTD
headers. Along with this a number of warnings are fixed.

Signed-off-by: Markus Klotzbuecher <mk@denx.de>
2008-01-09 09:51:12 +01:00
Grant Likely
2f155f6c0a [BUILD] Generate include/autoconf.mk from board config files
Use cpp and sed to postprocess config.h and import the defined values
into include/autoconf.mk.  autoconf.mk is then included by config.mk to
give 'make' access to the board configuration.

Doing this enables conditional compilation at the Makefile level instead
of by wrapping every .c file with #ifdef/#endif wrappers.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2007-11-20 22:33:38 -07:00
Grant Likely
1b4aaffe4f Add .gitignore files
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
2007-11-15 08:46:46 -07:00