summaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* mkimage: correct spelling error in imximageStefano Babic2010-04-301-1/+1
| | | | Signed-off-by: Stefano Babic <sbabic@denx.de>
* Move libfdt/ into lib/Peter Tyser2010-04-132-6/+6
| | | | | | | 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>
* Rename lib_generic/ to lib/Peter Tyser2010-04-133-9/+9
| | | | | | | | 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>
* mkimage: Fix strict-aliasing compiler warningPeter Tyser2010-04-101-5/+3
| | | | | | | | | 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>
* mkimage: fix Segmentation Fault when run without "-n name" optionWolfgang Denk2010-03-281-0/+1
| | | | | | | | | 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>
* mkimage: dont force entry point with xipMike Frysinger2010-03-111-14/+0
| | | | | | | | | | | 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>
* tools: fix imximage warningKim Phillips2010-02-241-1/+1
| | | | | | | | | | | 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>
* mkimage: SEGFAULT with imximage on 64 bit systemsStefano Babic2010-02-242-17/+15
| | | | | | | | 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>
* at91: Add esd gmbh OTC570 board supportDaniel Gorsulowski2010-02-122-0/+3
| | | | | | | 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>
* Fix compiler warning in imximage.c due to getline prototypeKumar Gala2010-01-271-0/+3
| | | | | | | 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>
* getline: split out for darwin systemsMike Frysinger2010-01-266-99/+111
| | | | | | | 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>
* tools: give explicit libfdt pathsMike Frysinger2010-01-261-1/+1
| | | | | | | | | 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>
* mkimage: Add Freescale imx Boot Image support (imximage)Stefano Babic2010-01-255-0/+434
| | | | | | | | | | | | 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>
* tools: allow people to compile w/out configuringMike Frysinger2010-01-211-0/+9
| | | | | | | | | | | 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>
* ubsha1: drop unnecessary includes/prototypesMike Frysinger2010-01-211-8/+0
| | | | | | | 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>
* easylogo: add support for 16-bit RGB565Michael Hennerich2010-01-181-18/+60
| | | | | Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Merge branch 'master' of ../work into nextWolfgang Denk2009-12-071-4/+2
|\
| * tools/mkimage: Remove duplicate line of codePeter Tyser2009-12-071-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'master' into nextWolfgang Denk2009-12-056-160/+256
|\ \ | |/ | | | | | | | | | | | | Conflicts: board/esd/plu405/plu405.c drivers/rtc/ftrtc010.c Signed-off-by: Wolfgang Denk <wd@denx.de>
| * tools/mkimage: Print FIT image contents after creationPeter Tyser2009-12-051-25/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * tools/fit_image.c: Remove unused fit_set_header()Peter Tyser2009-12-051-33/+1
| | | | | | | | | | | | | | | | | | 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>
| * tools/mkimage: Assume FDT image type for FIT imagesPeter Tyser2009-12-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | 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>
| * img2srec: use standard typesMike Frysinger2009-11-241-102/+62
| | | | | | | | | | | | | | 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>
| * tools: gitignore *.exe binariesMike Frysinger2009-11-241-0/+1
| | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * Fix mingw tools buildRemy Bohmer2009-11-232-0/+159
| | | | | | | | | | | | mkimage does not build due to missing strtok_r() and getline() implementation Signed-off-by: Remy Bohmer <linux@bohmer.net>
| * Building of FIT images does not work.Remy Bohmer2009-11-231-0/+1
| | | | | | | | | | | | | | 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>
* | makefiles: fixes for building build toolsScott Wood2009-12-024-118/+56
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Revert "env: only build env_embedded and envcrc when needed"Wolfgang Denk2009-10-272-3/+17
| | | | | | Breaks building on many boards, and no really clean fix available yet. This reverts commit 6dab6add2d8ee80905234b326abc3de11be1d178.
* envcrc: check return value of fwrite()Mike Frysinger2009-10-191-1/+3
| | | | | | | | | | 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>
* env: only build env_embedded and envcrc when neededMike Frysinger2009-10-182-17/+3
| | | | | | | | | | | | | 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>
* Merge branch 'warning-cleanup'Wolfgang Denk2009-09-181-1/+1
|\
| * kwbimage.c: Fix compile warning when building on 64 bit systems (again)Wolfgang Denk2009-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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>
* | tools/netconsole: use ncb automatically if availableMike Frysinger2009-09-151-3/+14
| | | | | | | | | | | | | | | | 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>
* | tools/netconsole: make a bit more robustMike Frysinger2009-09-151-3/+9
|/ | | | | | | | | | | | 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>
* kwbimage.c: Fix compile warning when building on 64 bit systemsWolfgang Denk2009-09-111-1/+1
| | | | | | | | | | 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>
* mkimage: Add Kirkwood Boot Image support (kwbimage)Prafulla Wadaskar2009-09-105-0/+519
| | | | | | | | | | | | | | 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>
* mkimage: Include missing files in build dependency calculationsPrafulla Wadaskar2009-09-101-0/+2
| | | | | | | | | | | | | 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>
* tools/mkimage: fix compiler warnings, use "const"Wolfgang Denk2009-09-101-1/+1
| | | | | | | | | | 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>
* tools: mkimage: split code into core, default and FIT image specificPrafulla Wadaskar2009-09-105-294/+736
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* tools: mkimage: Fixed build warningsPrafulla Wadaskar2009-09-101-7/+9
| | | | | | | | 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>
* tools: mkimage: Makefile sortedPrafulla Wadaskar2009-09-101-25/+25
| | | | | | The tools/Makefile is sorted for all entries, Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
* tools: mkimage : bugfix returns correct value for list commandPrafulla Wadaskar2009-09-101-12/+14
| | | | | | | | | | | 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>
* License cleanup: remove unintended "All Rights Reserved" notices.Wolfgang Denk2009-09-042-2/+0
| | | | | | | | 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>
* unify HOST_CFLAGS and HOSTCFLAGSMike Frysinger2009-07-233-9/+9
| | | | | | | | 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>
* compiler.h: unify system ifdef cruft hereMike Frysinger2009-07-198-73/+9
| | | | | | | | | | | 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>
* envcrc: add missing dependencies on env storageMike Frysinger2009-07-171-0/+4
| | | | | | | 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>
* Blackfin: add jtagconsole helper scriptMike Frysinger2009-06-151-0/+39
| | | | | | | 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>
* tools/envcrc: add --binary option to export embedded envMike Frysinger2009-06-121-4/+42
| | | | | | | 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>
* Add imls utility commandMarco Stornelli2009-05-153-0/+433
| | | | | | | | | 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>
* bmp_logo: Check return value of fread()Peter Tyser2009-04-281-13/+22
| | | | | | | | | | | | 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>
OpenPOWER on IntegriCloud