Commit Graph

264 Commits

Author SHA1 Message Date
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