path: root/tools
AgeCommit message (Collapse)Author
2011-04-21tools/env: fix redundant env flag comparisonJon Povey
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-12Add support for dataflash to U-boot environment settings tool.Remy Bohmer
* 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-12mkimage: add "-V" option to print version informationWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-04-12Drop config.h include in tools/imximage.hLoïc Minier
"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-02-02imximage: Add MX53 boot image supportLiu Hui-R64343
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-01-19Fix typo ("comand" instead of "command")Loïc Minier
Signed-off-by: Loc Minier <loic.minier@linaro.org>
2010-11-27Coding Style (white space) cleanupWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-11-14Makefile: move include for config.mk upFrançois Revol
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-14tools/env: cleanup host build flagsDaniel Hobi
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-10-27make-asm-offsets: fix sed scriptWolfgang Denk
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-26include/asm-offsets.h: automatically generate assembler constantsWolfgang Denk
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-18autoconfig.mk: avoid apostophes around hex valuesWolfgang Denk
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-18Rename TEXT_BASE into CONFIG_SYS_TEXT_BASEWolfgang Denk
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-12tools/imls: fix comment in MakefileDaniel Hobi
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-09-28Merge branch 'next' of /home/wd/git/u-boot/nextWolfgang Denk
Conflicts: include/ppc4xx.h Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-09-21logos: add Freescale logoTimur Tabi
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-21setlocalversion: add some more fallbacks for git describeMike Frysinger
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-19tools: enable img2srec for "tools-all" targetMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-09-19tools/env: use host build flagsMike Frysinger
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-19tools: update .gitignoreMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-09-18tools/env: fail on invalid optionsDaniel Hobi
Signed-off-by: Daniel Hobi <daniel.hobi@schmid-telecom.ch>
2010-09-18tools/env: allow option "-n" for fw_printenvDaniel Hobi
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-08-10ARM: Add support for jadecpu board based on MB86R01 SoCMatthias Weisser
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-09tools/env/fw_printenv: Make redundant env work on locked flashes alsoDetlev Zundel
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-07-25Blackfin: jtagconsole: disable output processingMike Frysinger
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-24cmd_usage(): simplify return code handlingWolfgang Denk
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-06-29Tools: set multiple variable with fw_setenv utilityStefano Babic
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-04-30mkimage: correct spelling error in imximageStefano Babic
Signed-off-by: Stefano Babic <sbabic@denx.de>
2010-04-13Move libfdt/ into lib/Peter Tyser
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-13Rename lib_generic/ to lib/Peter Tyser
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-10mkimage: Fix strict-aliasing compiler warningPeter Tyser
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-03-28mkimage: fix Segmentation Fault when run without "-n name" optionWolfgang Denk
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-11mkimage: dont force entry point with xipMike Frysinger
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-02-24tools: fix imximage warningKim Phillips
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-24mkimage: SEGFAULT with imximage on 64 bit systemsStefano Babic
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-12at91: Add esd gmbh OTC570 board supportDaniel Gorsulowski
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-01-27Fix compiler warning in imximage.c due to getline prototypeKumar Gala
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-26getline: split out for darwin systemsMike Frysinger
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-26tools: give explicit libfdt pathsMike Frysinger
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-25mkimage: Add Freescale imx Boot Image support (imximage)Stefano Babic
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-21tools: allow people to compile w/out configuringMike Frysinger
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-21ubsha1: drop unnecessary includes/prototypesMike Frysinger
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-18easylogo: add support for 16-bit RGB565Michael Hennerich
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-12-07Merge branch 'master' of ../work into nextWolfgang Denk
2009-12-07tools/mkimage: Remove duplicate line of codePeter Tyser
Recent commits 1a99de2cb4d08eb3bf9fb3f60a9d533150de8c0e and 6a590c5f5fd12cdd27f3153522acfac3854590e7 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-05Merge branch 'master' into nextWolfgang Denk
Conflicts: board/esd/plu405/plu405.c drivers/rtc/ftrtc010.c Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-12-05tools/mkimage: Print FIT image contents after creationPeter Tyser
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-05tools/fit_image.c: Remove unused fit_set_header()Peter Tyser
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-05tools/mkimage: Assume FDT image type for FIT imagesPeter Tyser
When building a Flattened Image Tree (FIT) the image type needs to be "flat_dt". Commit 89a4d6b12fd6394898b8a454cbabeaf1cd59bae5 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-02makefiles: fixes for building build toolsScott Wood
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 38d299c2db81bd889c601b5dfc12c4e83ef83333 (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>