Commit Graph

381 Commits

Author SHA1 Message Date
Horst Kronstorfer d30011bf61 mkenvimage: Fix some typos
Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
2011-12-20 23:51:20 +01:00
Kyle Moffett a7b3918533 tools/setlocalversion: Update from the Linux Kernel
Several bugfixes have occurred upstream since this script was imported
into U-Boot.  In particular, the script currently in U-Boot does not
describe commit f8bbb4dad0 correctly,
resulting in a version of "2011.09" instead of "2011.09-01460-gf8bbb4d".

With that commit checked out, the command "git name-rev --tags HEAD"
gives this result:
  HEAD tags/v2011.12-rc1~30^2

Then the "changes" regex does not match because of the trailing '^2':
  grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$'

The new version of tools/setlocalversion in the kernel correctly handles
those situations by using different plumbing commands.

The version from the kernel is not directly usable as it does not append
the full GIT version that U-Boot expects unless the right config options
are set (CONFIG_LOCALVERSION_AUTO=y).  Other than a few minor changes
for Kconfig, the imported version is very similar to Linux v3.2-rc4.

Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Mike Frysinger <vapier@gentoo.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-12-17 20:58:48 +01:00
Aneesh V 28a181ff81 omap: Improve PLL parameter calculation tool
Improve the tool that finds multiplier and divider for PLLs:
The previous algorithm could get stuck on local maxima
and required the user to specify the tolerance. Improve
the algorithm to go through the entire search space and find
the optimal solution.

Signed-off-by: Aneesh V <aneesh@ti.com>
2011-12-06 23:59:34 +01:00
Igor Grinberg 73f94ed403 tools/envcrc: fix compile breakage
When ENV_IS_EMBEDDED is not set, but CONFIG_BUILD_ENVCRC is set,
the environment.h file does not get included resulting in unrecognized
env_t type.
Fix this by moving the include directive.

Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Tested-by: Mike Frysinger <vapier@gentoo.org>
2011-12-06 22:11:25 +01:00
Simon Glass 94e9d4c3e8 Fix tsize warning in tools/aisimage.c
This fixes the following warning with gcc 4.4.3.

aisimage.c: In function 'aisimage_generate':
aisimage.c:365: warning: 'tsize' may be used uninitialized in this function

Signed-off-by: Simon Glass <sjg@chromium.org>
2011-12-05 23:05:04 +01:00
Andreas Bießmann 6f26185435 tools/os_support: add OS X Lion support
OS X Lion's c-library implements getline(), therefore prevent including the old
helper implementation for __DARWIN_C_LEVEL < 200809L.

Without this patch following error occours:

---8<---
In file included from os_support.h:32,
                 from img2srec.c:55:
getline.h:1: error: conflicting types for ‘getline’
/usr/include/stdio.h:449: error: previous declaration of ‘getline’ was
here
--->8---

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2011-12-02 10:56:21 +01:00
Stephen Warren b9b50e89d3 image: Implement IH_TYPE_KERNEL_NOLOAD
The legacy uImage format includes an absolute load and entry-point
address. When bootm operates on a kernel uImage in memory that isn't
loaded at the address in the image's load address, U-Boot will copy
the image to its address in the header.

Some kernel images can actually be loaded and used at any arbitrary
address. An example is an ARM Linux kernel zImage file. To represent
this capability, IH_TYPE_KERNEL_NOLOAD is implemented, which operates
just like IH_TYPE_KERNEL, except that the load address header is
ignored, and U-Boot does not copy the image to its load address, but
rather uses it in-place.

This is useful when sharing a single (uImage-wrapped) zImage across
multiple boards with different memory layouts; in this case, a specific
load address need not be picked when creating the uImage, but instead
is selected by the board-specific U-Boot environment used to load and
boot that image.

v2: Rename from IH_TYPE_KERNEL_ANYLOAD to IH_TYPE_KERNEL_NOLOAD.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2011-12-01 09:45:35 +01:00
Mike Frysinger ca8a30ec6a ignore new mkenvimage tool
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-11-27 15:44:41 +01:00
Andreas Bießmann dca61f0128 tools/env: use lib/crc32.c directly
Instead of linking the file into $(obj) tree use directly the source file.
This also prevents littered source tree if building not out-of-tree.

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-11-22 08:49:21 +01:00
Igor Grinberg 994bc671cf env: move extern environment[] to environment.h
Extract all extern declarations for environment out of c files
into the environment.h header.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
2011-11-22 08:39:25 +01:00
David Wagner a6337e6ffd new tool mkenvimage: generates an env image from an arbitrary config file
This tool takes a key=value configuration file (same as would a `printenv' show)
and generates the corresponding environment image, ready to be flashed.

use case: flash the environment with an external tool

Signed-off-by: David Wagner <david.wagner@free-electrons.com>
Acked-by; Mike Frysinger <vapier@gentoo.org>
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2011-11-22 08:39:24 +01:00
Joe Hershberger 05622191e5 tools: checkpatch.pl from Linux added to tools
Added from Linux - commit 30ecad51849ae132dc6ef6ddb62d499c7257515b

Include config file to ignore common false-positives

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
2011-11-17 14:27:11 +01:00
Wolfgang Denk 9dfa8da709 Merge branch 'master' of git://git.denx.de/u-boot-video
* 'master' of git://git.denx.de/u-boot-video:
  api: export LCD device to external apps
  font: split font data from video_font.h
  tools: logo: split bmp arrays from bmp_logo.h
  lcd: add clear and draw bitmap declaration
  VIDEO: mx3fb: GCC4.6 fix build warnings
  Powerpc/DIU: Fixed the 800x600 and 1024x768 resolution bug
2011-11-16 20:44:03 +01:00
Che-Liang Chiou c270730f58 tools: logo: split bmp arrays from bmp_logo.h
The generated header bmp_logo.h is useful even outside common/lcd.c for
the logo dimension.  However, the problem is, the generated bmp_logo.h
cannot be included multiple times because bmp_logo_palette[] and
bmp_logo_bitmap[] are defined in the bmp_logo.h.

This patch fixes this by defining these arrays in another header
bmp_logo_data.h and in bmp_logo.h only declaring these arrays.

Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-11-15 23:58:26 +01:00
Marek Vasut f29f7e02ce iMX28: Add image header generator tool
This tool can now generate proper image for "BootStream" files.

NOTE: This tool now works only for NAND.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
2011-11-11 11:36:57 +01:00
Heiko Schocher 4dd834906d arm, davinci: add cam_enc_4xx support
- DM368 SOC
- booting with spl not with UBL from TI
- before loading u-boot from NAND into RAM, test
  the RAM with the post memory test. If error
  is found, switch all LEDs on and halt system.
- SPI Flash
  Dataflash Typ: M25PE80
- Ethernet DM9161BI
- MMC
- USB

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2011-11-03 22:56:25 +01:00
Stefano Babic 4962e38e9a mkimage: adding support for Davinci AIS image
Some Davinci processors supports the Application
Image Script (AIS) boot process. The patch adds the generation
of the AIS image inside the mkimage tool to make possible
to generate a bootable U-boot without external tools
(TI Davinci AIS Generator).

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Wolfgang Denk <wd@denx.de>
2011-10-23 23:34:21 +02:00
Joe Hershberger b3f44c21ea common: cosmetic: CONFIG_BOOTFILE checkpatch compliance
Remove MK_STR from places that consume CONFIG_BOOTFILE to force all definitions to be string literals.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-10-22 01:21:35 +02:00
Joe Hershberger 8b3637c662 common: cosmetic: CONFIG_ROOTPATH checkpatch compliance
Remove MK_STR from places that consume CONFIG_ROOTPATH to force all definitions to be string literals.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Cc: Joe Hershberger <joe.hershberger@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-10-22 01:21:15 +02:00
Stephen Warren 712fbcf384 checkpatch whitespace cleanups
This avoids the following checkpatch warning in later patches:

ERROR: "(foo*)" should be "(foo *)"
ERROR: space required before the open brace '{'
ERROR: space prohibited before that close parenthesis ')'
ERROR: spaces required around that '||' (ctx:WxV)
WARNING: space prohibited between function name and open parenthesis '('
WARNING: line over 80 characters

This fixes all the white-space warnings/errors in my subsequent patch,
and within this current patch. A number of other checkpatch warnings
and errors are still present in this patch itself, but are beyond simple
whitespace fixes, so are not solved by this patch.

v2: New patch

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
2011-10-22 01:13:35 +02:00
Luka Perkov 8603b69b8b fix compile warning for env tools
Patch fixes this issue:

fw_env.c: In function ‘fw_setenv’:
fw_env.c:492:5: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘size_t’ [-Wformat]
fw_env.c: In function ‘flash_write_buf’:
fw_env.c:806:6: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘size_t’ [-Wformat]

Signed-off-by: Luka Perkov <lists@lukaperkov.net>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-10-22 00:16:29 +02:00
Loïc Minier 9f87658054 ublimage: NAND block size isn't set at build-time
mkimage's ublimage support can't depend of build-time board configs;
instead, this should be set in ublimage.cfg.  Since currently no configs
in u-boot override the NAND block size, hardcode it as such in
ublimage.h to fix a build failure with "make tools":
gcc [...] -o ublimage.o ublimage.c -c
In file included from ublimage.c:37:0:
ublimage.h:31:20: fatal error: config.h: No such file or directory

Cc: Heiko Schocher <hs@denx.de>
Cc: patches@linaro.org
Signed-off-by: Loïc Minier <loic.minier@linaro.org>
Acked-by: Heiko Schocher <hs@denx.de>
2011-10-06 20:21:16 +02:00
Stefano Babic f0662105b6 mkimage: Add variable lenght header support
Some images have not a header of fix lenght. The patch will be
used for the generation of AIS images, because this header has
a variable lenght. The patch adds also the parameter "-s" (skip)
to not copy automatically the passed image file.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2011-10-05 22:03:12 +02:00
Stefano Babic 163967905f mkimage: ublimage must return if the header is not verified
Each image handler must return a not-zero velue if the
header is not recognized to allow the main program to
iterate to the next handler.

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Heiko Schocher <hs@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
2011-10-05 22:03:11 +02:00
Dirk Behme 8fcf5959a8 mkimage: Fix 'Unknown OMAP image type - 5'
Using mkimage with e.g.

tools/mkimage -A arm -T firmware -O u-boot -d u-boot.bin foo.img

gives a warning

"Unknown OMAP image type - 5"

while it seems that the image itself is created successfully.

This does come from the patch "mkimage: Add OMAP boot image support".

The method check_image_type in image_type_params is supposed to just
return success or failure.  However, for omap it also calls fprintf:

static int omapimage_check_image_types(uint8_t type)
{
	if (type == IH_TYPE_OMAPIMAGE)
		return EXIT_SUCCESS;
	else {
		fprintf(stderr, "Unknown OMAP image type - %x", type);
		return EXIT_FAILURE;
	}
}

All the other image checkers and no others have this, so the fix is to
simply remove the fprintf.

Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
CC: John Rigby <john.rigby@linaro.org>
CC: Aneesh V <aneesh@ti.com>
CC: Sandeep Paulraj <s-paulraj@ti.com>
2011-09-04 11:34:00 +02:00
John Rigby 3decb14abe mkimage: Add OMAP boot image support
- Add mkimage support for OMAP boot image
- Add support for OMAP boot image(MLO) generation in the new
  SPL framework

Signed-off-by: John Rigby <john.rigby@linaro.org>
Signed-off-by: Aneesh V <aneesh@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2011-08-03 12:49:20 +02:00
Aneesh V 3776801d0a omap4: add clock support
Add support for:
1. DPLL locking
2. Initialization of clock domains and clock modules
3. Setting up the right voltage on voltage rails

This work draws upon previous work done for x-loader by:
	Santosh Shilimkar <santosh.shilimkar@ti.com>
	Rajendra Nayak <rnayak@ti.com>

Signed-off-by: Aneesh V <aneesh@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2011-08-03 12:49:19 +02:00
Daniel Schwierzeck 60b74bde92 MIPS: INCA-IP: rename inca-swap-bytes host tool
The INCA-IP SoC belongs to the Lantiq XWAY SoC product portfolio.
For the upcoming support of other Lantiq SoC devices this tool should
not solely depend on the INCA-IP board.

Rename the tool to xway-swap-bytes and add an config option
to enable compilation optionally.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
Acked-by: Thomas Langer <thomas.langer@lantiq.com>
Signed-off-by: Shinya Kuribayashi <skuribay@pobox.com>
2011-07-31 23:25:41 +09:00
Heiko Schocher 7816f2cf81 mkimage: add UBL header support for booting davinci cpus
creating an u-boot.ubl file, which contains the UBL Header
needed for booting from NAND with the RBL from TI. For more
information read doc/README.ublimage.

Signed-off-by: Heiko Schocher <hs@denx.de>
2011-07-28 16:52:41 +02:00
Anatolij Gustschin 348de314be digsy_mtc: move board into vendor dir and add vendor logo
Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-07-27 23:27:07 +02:00
Mike Frysinger c3eb3fe490 env: allow people to force envcrc building
For people who want to manually extract the embedded environment so that
it can be manually packed into the final u-boot image, add a config opt
to force building of the envcrc tool.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-26 16:33:49 +02:00
Mike Frysinger 2ad6e27dcd tools: make it possible to build tools unconfigured
On Sunday, June 19, 2011 13:55:13 Ilya Yanok wrote:
> On 18.06.2011 23:03, Mike Frysinger wrote:
> >>  - tools/Makefile put common/env_embedded.o and envcrc.o to object list
> >>
> >> conditionally. This fixes errors during dependency generation.
> >
> > pretty sure this breaks board builds.  if the only thing this fixes is a
>
> I'm sorry but I can't see how this can break the builds. Could you
> please be more specific? I've tried to build some boards, it actually
> works...

i might be thinking of a different env_embedded situation.  a different
problem with your patch to tools/Makefile: you copied the same logic multiple
times which means more bitrot.

why dont you do something like:

> > harmless warning when generating dependency files, then i say ignore it.
> > after all, this is how it has always worked in the past and no one really
> > cared.
>
> Yep, they are harmless but they are not warnings but rather scary errors
> actually. ;) I think it's better to fix them.

i guess my threshold for being scared is a bit higher :p
-mike
2011-06-22 20:03:13 +02:00
Wolfgang Denk 566e5cf451 ARM: drop unsupported 'trab' board
The 'trab' board configuration is broken, and there is nobody who is
interested and willing to fix it.  Drop it.

This includes support for VFD displays which have always been used by
this board only.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-06-22 20:00:51 +02:00
Wolfgang Denk 91081e01b1 Revert "Fix building tools alone with host compiler"
This reverts commit bbc6353c74.
It breaks building on many systems:
...
.../common/env_embedded.c:28:20: fatal error: config.h: No such file or directory
compilation terminated.
.../common/image.c:27:20: fatal error: common.h: No such file or directory
compilation terminated.
.../lib/crc32.c:12:20: fatal error: common.h: No such file or directory
compilation terminated.
.../lib/md5.c:28:22: fatal error: compiler.h: No such file or directory
compilation terminated.
.../lib/sha1.c:33:20: fatal error: common.h: No such file or directory
compilation terminated.
2011-05-13 13:37:20 +02:00
Nobuhiro Iwamatsu 3500e9aed6 kwbimage: Fix check variable of checksum
calc_hdrcsum two times are checked. checksumi of exthdr is not checked.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
CC: Prafulla Wadaskar <prafulla@marvell.com>
2011-05-12 23:53:41 +02:00
François Revol bbc6353c74 Fix building tools alone with host compiler
- don't include config.h when building with host cc,
- HOSTCFLAGS was defined with the wrong name, so wasn't used,
- make sure make finds sources outside of tools/.

Signed-off-by: Franois Revol <revol@free.fr>
2011-05-12 22:46:42 +02:00
Luca Ceresoli 56c1769806 tools/env: document current cross-compilation issues and workaround
Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it>
2011-04-30 01:10:28 +02:00
Jon Povey 735eb0f0e6 tools/env: fix redundant env flag comparison
This fixes two bugs with comparison of redundant environment flags on
read.

flag0 and flag1 in fw_env_open() were declared signed instead of
unsigned char breaking BOOLEAN mode "== 0xFF" tests and in INCREMENTAL
mode the wrong environment would be chosen where the flag values are
127 and 128 (either way round). With both flags over 128, both signs
flipped and the logic worked by happy accident.

Also there was a logic bug in the INCREMENTAL test (after signedness was
fixed) in the case flag0=0, flag1=255, env 1 would be incorrectly chosen.

Fix both of these.

Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk>
2011-04-21 00:25:08 +02:00
Remy Bohmer 9eeaa8e66c Add support for dataflash to U-boot environment settings tool.
* The sector size for SPI-dataflash (like AT45 flashes) are not always
  a power-of-2. So, the sector calculations are rewritten such that it
  works for either power-of-2 as any size sectors.
* Make the flash sector size optional in case it is the same value as
  the environment size.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
2011-04-12 22:58:34 +02:00
Wolfgang Denk 976b38c074 mkimage: add "-V" option to print version information
Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-04-12 22:58:33 +02:00
Loïc Minier 13d72f02ef Drop config.h include in tools/imximage.h
"make tools-all" should allow building tools such as mkimage and the new
imximage without any config, but imximage.c currently fails to build
with:
imximage.h:27:20: error: config.h: No such file or directory

config.h is not needed in imximage.h nor in imximage.c, and imximage.h
is only included from imximage.c, so drop this include to fix the build.

Signed-off-by: Loc Minier <loic.minier@linaro.org>
2011-04-12 22:58:31 +02:00
Liu Hui-R64343 8a1edd7d54 imximage: Add MX53 boot image support
This patch add the MX53 boot image support.

This patch has been tested on Freescale MX53EVK board
and MX51EVK board.

Signed-off-by: Jason Liu <r64343@freescale.com>
2011-02-02 00:54:42 +01:00
Loïc Minier 47aa51cd98 Fix typo ("comand" instead of "command")
Signed-off-by: Loc Minier <loic.minier@linaro.org>
2011-01-19 00:07:22 +01:00
Wolfgang Denk 844f07d8a1 Coding Style (white space) cleanup
Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-11-27 23:35:14 +01:00
François Revol a98ae78fe1 Makefile: move include for config.mk up
Reorder including config.mk before the HOSTCC check, so HOSTCC is
actually defined when checking for it.

Signed-off-by: Franois Revol <revol@free.fr>

Cleaned up commit message
Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-11-14 23:53:00 +01:00
Daniel Hobi 02bd475e34 tools/env: cleanup host build flags
This patch makes tools/env/Makefile more similar to tools/imls:
- define HOSTSRCS and HOSTCPPFLAGS, so that .depend generation works.
- include U-Boot headers using -idirafter to prevent picking up
  u-boot/include/errno.h.
- use HOSTCFLAGS_NOPED (fw_env.c does not conform to -pedantic).

In order to cross-compile tools/env, override the HOSTCC variable
as in this example:

  make tools env HOSTCC=bfin-uclinux-gcc

Signed-off-by: Daniel Hobi <daniel.hobi@schmid-telecom.ch>
Tested-by: Detlev Zundel <dzu@denx.de>
Tested-by: Steve Sakoman <steve.sakoman@linaro.org>
2010-11-14 23:26:29 +01:00
Wolfgang Denk e4691f5ed1 make-asm-offsets: fix sed script
When copying the "sed" script to generate the asm-offsets.h file from
the Linux Kbuild script into the make-asm-offsets file I missed the
fact that the former runs in a "make" context and thus uses double
"$$" to escape a single "$", while the latter is a shell script, where
this must not be done.  Unfortunately the problem did not show up
during the initial tests on Power Architecture systems, but on ARM the
generated asm-offsets.h was not correct.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Tested-by: Heiko Schocher <hs@denx.de>
Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>
2010-10-27 20:16:52 +02:00
Wolfgang Denk 16a354f920 include/asm-offsets.h: automatically generate assembler constants
A recurrent issue is that certain C level constructs like sizeof() or
offsetof() cannot be used in assembler files, which is inconvenient
when such constructs are used in the definition of macro names etc.

To avoid duplication of such definitions (and thus another cause of
problems), we adapt the Linux way to automatically generate the
respective definitions from the respective C header files.

In Linux, this is implemented in include/linux/kbuild.h, Kbuild, and
arch/*/kernel/asm-offsets.c; we adapt the code from the Linux v2.6.36
kernel tree.

We also copy the concept of the include/generated/ directory which can
be used to hold other automatically generated files as well.

We start with an architecture-independent lib/asm-offsets.c which
generates include/generated/generic-asm-offsets.h (included by
include/asm-offsets.h, which is what will be referred to in the actual
source code).  Later this may be extended by architecture-specific
arch/*/lib/asm-offsets.c files that will generate a
include/generated/asm-offsets.h.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-26 21:04:34 +02:00
Wolfgang Denk 2bad5df727 autoconfig.mk: avoid apostophes around hex values
When generating include/autoconfig.mk, hex numbers would be quoted.
This caused some false positives during automatic testing of the
builds, and is known to cause some real issues for some Blackfin
configurations. Don't use apostophes for decimal and hex numbers (nor
for octal numbers).

Signed-off-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-10-18 22:08:22 +02:00
Wolfgang Denk 14d0a02a16 Rename TEXT_BASE into CONFIG_SYS_TEXT_BASE
The change is currently needed to be able to remove the board
configuration scripting from the top level Makefile and replace it by
a simple, table driven script.

Moving this configuration setting into the "CONFIG_*" name space is
also desirable because it is needed if we ever should move forward to
a Kconfig driven configuration system.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-10-18 22:07:10 +02:00
Daniel Hobi b75a2dde47 tools/imls: fix comment in Makefile
Commit d984fed0 (makefiles: fixes for building build tools)
changed the variable name FIT_CFLAGS to HOSTCFLAGS_NOPED
but forgot to update to corresponding comment.

Signed-off-by: Daniel Hobi <daniel.hobi@schmid-telecom.ch>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Wolfgang Denk <wd@denx.de>
2010-10-12 21:49:28 +02:00
Wolfgang Denk 2e6e1772c0 Merge branch 'next' of /home/wd/git/u-boot/next
Conflicts:
	include/ppc4xx.h

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-09-28 23:30:47 +02:00
Timur Tabi ef351fe1f7 logos: add Freescale logo
Add the Freescale logo and update the Makefile to build it when building
a Freescale board.

Signed-off-by: Timur Tabi <timur@freescale.com>
2010-09-21 22:44:53 +02:00
Mike Frysinger 16e66cf194 setlocalversion: add some more fallbacks for git describe
If working out of a custom git tree that lacks annotated tags, the
'git describe' operation spews "fatal: cannot describe" errors all
over the place.  So add some fallback code in case the best naming
was unable to locate something useful.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-09-21 21:33:16 +02:00
Mike Frysinger 570d7d50b0 tools: enable img2srec for "tools-all" target
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-09-19 19:29:50 +02:00
Mike Frysinger abd315a135 tools/env: use host build flags
Convert the tools/env/Makefile to use the same host tool syntax as the
other tool subdirs.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-09-19 19:29:49 +02:00
Mike Frysinger 8e0ec82eb4 tools: update .gitignore
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-09-19 19:29:49 +02:00
Daniel Hobi 29ccd7c312 tools/env: fail on invalid options
Signed-off-by: Daniel Hobi <daniel.hobi@schmid-telecom.ch>
2010-09-18 23:56:19 +02:00
Daniel Hobi 122bc08845 tools/env: allow option "-n" for fw_printenv
In commit bd7b26f8 (Tools: set multiple variable with fw_setenv utility),
the option parsing was changed to getopt_long(3), but option "-n"
of fw_printenv was not included.

This leads to an error message "invalid option -- 'n'" on stderr,
although the output on stdout is correct.

Signed-off-by: Daniel Hobi <daniel.hobi@schmid-telecom.ch>
2010-09-18 23:56:02 +02:00
Matthias Weisser 18a056a18f ARM: Add support for jadecpu board based on MB86R01 SoC
This patch adds support for the jadecpu board using the
MB86R01 'Jade' SoC from Fujitsu.

Signed-off-by: Matthias Weisser <weisserm@arcor.de>
2010-08-10 23:14:35 +02:00
Detlev Zundel 0aef7bc719 tools/env/fw_printenv: Make redundant env work on locked flashes also
The invalidation of the old environment instance did not work for flashes
supporting hardware locking.  Now we unlock/lock around this update also.

Signed-off-by: Detlev Zundel <dzu@denx.de>
2010-08-09 01:05:37 +02:00
Mike Frysinger f5ff2030bf Blackfin: jtagconsole: disable output processing
Avoid extra carriage returns in the output by disabling output processing.
Otherwise, whenever the remote sends a \r\n, we end up with \r\r\n.

Reported-by: Vivi Li <vivi.li@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-07-25 15:17:23 -04:00
Wolfgang Denk 47e26b1bf9 cmd_usage(): simplify return code handling
Lots of code use this construct:

	cmd_usage(cmdtp);
	return 1;

Change cmd_usage() let it return 1 - then we can replace all these
ocurrances by

	return cmd_usage(cmdtp);

This fixes a few places with incorrect return code handling, too.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-07-24 20:43:57 +02:00
Stefano Babic bd7b26f879 Tools: set multiple variable with fw_setenv utility
Add a sort of batch mode to fw_setenv, allowing to set
multiple variables in one shot, without updating the flash after
each set as now. It is added the possibility to pass
a config file with a list of pairs <variable, value> to be set,
separated by a TAB character.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-06-29 22:43:27 +02:00
Stefano Babic f581e3a215 mkimage: correct spelling error in imximage
Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-04-30 05:23:25 -05:00
Peter Tyser 0de71d5071 Move libfdt/ into lib/
Move the libfdt directory into the common lib/ directory to clean up the
top-level directory.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2010-04-13 09:13:04 +02:00
Peter Tyser 78acc472d9 Rename lib_generic/ to lib/
Now that the other architecture-specific lib directories have been
moved out of the top-level directory there's not much reason to have the
'_generic' suffix on the common lib directory.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2010-04-13 09:13:04 +02:00
Peter Tyser a2513e27e8 mkimage: Fix strict-aliasing compiler warning
Version 4.2.4 of gcc produces the following warnings without this change:
  mkimage.c: In function ‘main’:
  mkimage.c:204: warning: dereferencing type-punned pointer will break strict-aliasing rules
  mkimage.c:222: warning: dereferencing type-punned pointer will break strict-aliasing rules

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2010-04-10 00:30:26 +02:00
Wolfgang Denk 04387d24a1 mkimage: fix Segmentation Fault when run without "-n name" option
The restructuring of the mkimage command in commit 89a4d6b1 ("tools:
mkimage: split code into core, default and FIT image specific")
introduced a bug that caused mkimage to segfault when run without
"-n name" option.  Initialize the imagename entry to prevent that.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-03-28 00:13:54 +01:00
Mike Frysinger 1b691bb0c2 mkimage: dont force entry point with xip
Some people boot images with the entry point in the middle of the blob
(like Linux with the head code in discardable .init.text), and there is no
no real requirement that the entry point be right after the mkimage header
when doing XIP, so let people specify whatever they want.  If they do need
an entry right after the header, then they still can do that with normal
-e behavior.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-03-11 23:50:06 +01:00
Kim Phillips 0ad22703f0 tools: fix imximage warning
Fix build warning:

Configuring for MPC837XEMDS board...
imximage.c: In function `imximage_parse_cfg_file':
imximage.c:146: warning: passing argument 2 of `getline' from incompatible pointer type
/usr/include/bits/stdio.h:116: note: expected `size_t *' but argument is of type `uint32_t *'

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2010-02-24 00:06:18 +01:00
Stefano Babic 5b28e913f4 mkimage: SEGFAULT with imximage on 64 bit systems
Running mkimage to generate an imximage produces a SEGFAULT
on 64 bit machines due to pointer arithmetic limited to 32 bit.

Signed-off-by: Stefano Babic <sbabic@denx.de>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
2010-02-24 00:04:03 +01:00
Daniel Gorsulowski 44d8025622 at91: Add esd gmbh OTC570 board support
This patch adds support for esd gmbh OTC570 board.
The OTC570 is based on an Atmel AT91SAM9263 SoC.

Signed-off-by: Daniel Gorsulowski <Daniel.Gorsulowski@esd.eu>
2010-02-12 12:31:53 -06:00
Kumar Gala 249d4dec69 Fix compiler warning in imximage.c due to getline prototype
imximage.c: In function 'imximage_parse_cfg_file':
imximage.c:142: warning: implicit declaration of function 'getline'

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-01-27 20:10:01 +01:00
Mike Frysinger 64b1502133 getline: split out for darwin systems
At least on OS X 10.5 and older, getline does not exist.  So split out the
function from the mingw code so that we can pull it in for Darwin systems.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-01-26 00:07:13 +01:00
Mike Frysinger e852d36a1e tools: give explicit libfdt paths
The current libfdt object rules hard depend implicitly on the .depend file
being correct.  If it isn't, then it is unable to properly compile the
objects.  Give it a full path like all the other implicit rules here so it
will always work in face of .depend issues.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-01-26 00:05:42 +01:00
Stefano Babic 8edcde5e4e mkimage: Add Freescale imx Boot Image support (imximage)
This patch adds support for "imximage" (MX Boot Image)
to the mkimage utility. The imximage is used on the Freescales's
MX.25, MX.35 and MX.51 processors.

Further details under doc/README.imximage.

This patch was tested on a Freescale mx51evk board.

Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-01-25 23:58:29 +01:00
Mike Frysinger c7c0d542a1 tools: allow people to compile w/out configuring
It's useful to be able to build up the host tools without having to select
a board first.  Pretty much all tools in there are config-independent
anyways.

Also add a shortcut "tools-all" to quickly build all host tools that are
actually config-independent to allow for simple test builds.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-01-21 23:00:08 +01:00
Mike Frysinger c5a028f085 ubsha1: drop unnecessary includes/prototypes
This code doesn't use any config.h defines, and the sha1.h header already
declares a sha1_csum prototype.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-01-21 22:59:29 +01:00
Michael Hennerich 7293e0577f easylogo: add support for 16-bit RGB565
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-01-18 00:21:05 +01:00
Wolfgang Denk 35e3717772 Merge branch 'master' of ../work into next 2009-12-07 23:42:33 +01:00
Peter Tyser fbc1c8f6f6 tools/mkimage: Remove duplicate line of code
Recent commits 1a99de2cb4 and
6a590c5f5f both fixed the same bug in the
same manner.  Unfortunately git was "smart" enough to merge both changes
which resulted in some duplicate code.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>

Reordered code and comment a bit.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-12-07 23:01:42 +01:00
Wolfgang Denk 2a49bf3149 Merge branch 'master' into next
Conflicts:
	board/esd/plu405/plu405.c
	drivers/rtc/ftrtc010.c

Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-12-05 02:11:59 +01:00
Peter Tyser c81296c16f tools/mkimage: Print FIT image contents after creation
Previously, there was no indication to the user that a FIT image was
successfully created after executing mkimage.  For example:

  $ mkimage -f uImage.its uImage.itb
  DTC: dts->dtb  on file "uImage.its"

Adding some additional output after creating a FIT image lets the user
know exactly what is contained in their image, eg:

  $ mkimage -f uImage.its uImage.itb
  DTC: dts->dtb  on file "uImage.its"
  FIT description: Linux kernel 2.6.32-rc7-00201-g7550d6f-dirty
  Created:         Tue Nov 24 15:43:01 2009
   Image 0 (kernel@1)
    Description:  Linux Kernel 2.6.32-rc7-00201-g7550d6f-dirty
    Type:         Kernel Image
    Compression:  gzip compressed
    Data Size:    2707311 Bytes = 2643.86 kB = 2.58 MB
    Architecture: PowerPC
    OS:           Linux
    Load Address: 0x00000000
    Entry Point:  0x00000000
    Hash algo:    crc32
    Hash value:   efe0798b
    Hash algo:    sha1
    Hash value:   ecafba8c95684f2c8fec67e33c41ec88df1534d7
   Image 1 (fdt@1)
    Description:  Flattened Device Tree blob
    Type:         Flat Device Tree
    Compression:  uncompressed
    Data Size:    12288 Bytes = 12.00 kB = 0.01 MB
    Architecture: PowerPC
    Hash algo:    crc32
    Hash value:   a5cab676
    Hash algo:    sha1
    Hash value:   168722b13e305283cfd6603dfe8248cc329adea6
   Default Configuration: 'config@1'
   Configuration 0 (config@1)
    Description:  Default Linux kernel
    Kernel:       kernel@1
    FDT:          fdt@1

This brings the behavior of creating a FIT image in line with creating a
standard uImage, which also prints out the uImage contents after
creation.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-12-05 01:13:51 +01:00
Peter Tyser 8e1c89663c tools/fit_image.c: Remove unused fit_set_header()
The FIT fit_set_header() function was copied from the standard uImage's
image_set_header() function during mkimage reorganization.  However, the
fit_set_header() function is not used since FIT images use a standard
device tree blob header.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-12-05 01:12:45 +01:00
Peter Tyser 1a99de2cb4 tools/mkimage: Assume FDT image type for FIT images
When building a Flattened Image Tree (FIT) the image type needs to be
"flat_dt".  Commit 89a4d6b12f introduced a
regression which caused the user to need to specify the "-T flat_dt"
parameter on the command line when building a FIT image.  The "-T
flat_dt" parameter should not be needed and is at odds with the current
FIT image documentation.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-12-05 01:12:39 +01:00
Scott Wood d984fed068 makefiles: fixes for building build tools
Currently, some of the tools instead set CC to be HOSTCC in order to re-use
some pattern rules -- but this fails when the user overrides CC on the make
command line.  Also, the HOSTCFLAGS in tools/Makefile are currently not
being used because config.mk overwrites them.

This patch adds static pattern rules for files that have been requested to
be built with the native compiler using $(HOSTSRCS) and $(HOSTOBJS), and
converts the tools to use them.

It restores easylogo to using the host compiler, which was broken by commit
38d299c2db (if this was an intentional change,
please let me know -- but it seems to be a build tool).

It restores -pedantic and the special flags for darwin and cygwin that were
requested in tools/makefile (but keeps the flags added by config.mk) --
hopefully someone can test this on those platforms.  It no longer
conditionalizes -pedantic on not being darwin; it wasn't clear that that was
intentional, and unless there's a real problem it's just inviting people to
contribute non-pedantic patches to those files (I'm not a fan of -pedantic
personally, but if it's on for one platform it should be on for all).

HOST_LDFLAGS is renamed HOSTLDFLAGS for consistency with the previous
HOST_CFLAGS to HOSTCFLAGS rename.  A new HOSTCFLAGS_NOPED is made available
for those files which currently cannot be built with -pedantic, and replaces
the old FIT_CFLAGS.

imls now uses the cross compiler properly, rather than by trying to
reconstruct CC using the typoed $(CROSS_COMPILER).

envcrc.c is now dependency-processed unconditionally -- previously it would
be built without being on (HOST)SRCS if CONFIG_ENV_IS_EMBEDDED was not
selected.

Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-12-02 22:58:46 +01:00
Mike Frysinger fd66066ee3 img2srec: use standard types
The img2srec code creates a lot of typedefs with common names.  These
easily clash with system headers that include these typedefs (like mingw).

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-11-24 23:43:18 +01:00
Mike Frysinger 8204e06811 tools: gitignore *.exe binaries
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-11-24 23:42:15 +01:00
Remy Bohmer faf36c1437 Fix mingw tools build
mkimage does not build due to missing strtok_r() and getline() implementation

Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-11-23 23:43:35 +01:00
Remy Bohmer 6a590c5f5f Building of FIT images does not work.
The type is not set for generation of the FIT images, resulting
in no images being created without printing or returning an error

Signed-off-by: Remy Bohmer <linux@bohmer.net>
2009-11-23 23:42:48 +01:00
Wolfgang Denk a747a7f310 Revert "env: only build env_embedded and envcrc when needed"
Breaks building on many boards, and no really clean fix available yet.

This reverts commit 6dab6add2d.
2009-10-27 20:46:31 +01:00
Mike Frysinger f67066b6b0 envcrc: check return value of fwrite()
Newer toolchains will often complain about unchecked fwrite():
	envcrc.c:117: warning: ignoring return value of `fwrite, declared
		with attribute warn_unused_result

So check the return value to silence the warnings.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-19 10:36:31 +02:00
Mike Frysinger 6dab6add2d env: only build env_embedded and envcrc when needed
The env code is protected by the ENV_IS_EMBEDDED define, so attempting to
compile the code when this isn't defined is pointless.  Now that the env
headers have unified around CONFIG_ENV_IS_EMBEDDED, convert the build
system to only build the env objects when this is enabled.  And now that
the env code is conditionally compiled, we can drop the source code checks.

For people who want to extract the environment manually, add a new option
CONFIG_BUILD_ENVCRC that only enables the envcrc utility.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-18 22:53:18 +02:00
Wolfgang Denk 084f3ddac6 Merge branch 'warning-cleanup' 2009-09-18 23:20:12 +02:00
Mike Frysinger 1c20e4a9fb tools/netconsole: use ncb automatically if available
The standard netcat, while ubiquitous, doesn't handle broadcast udp packets
properly.  The local ncb util does however.  So if ncb can be located in
the standard locations, automatically use that instead.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-15 22:55:45 +02:00
Mike Frysinger 770931805d tools/netconsole: make a bit more robust
The netcat utility likes to exit when it receives an empty packet (as it
thinks this means EOF).  This can easily occur when working with command
line editing as this behavior will be triggered when using backspace.  Or
with tabs and command line completion.  So create two netcat processes -
one to only listen (and put it into a loop), and one to do the sending.
Once the user quits the transmitting netcat, the listening one will be
killed automatically.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-15 22:54:19 +02:00
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