summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAgeLines
* patman: Suppress duplicate signoffs only for real patchesSimon Glass2014-05-16-1/+2
| | | | | | | | | | | | | There is an unfortunate bug in the signoff suppression logic. The first pass is performed with 'git log', and all signoffs are added to the supression set, such that the second time (when processing the real patches) we always suppress the signoffs. Correct this by only suppressing signoffs in the second pass. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Michal Simek <monstr@monstr.eu> Tested-by: Andreas Bießmann <andreas.devel@googlemail.com>
* Merge branch 'master' of git://git.denx.de/u-boot-videoTom Rini2014-05-13-0/+0
|\
| * logos: Update of the syteco company logoThomas Diener2014-05-05-0/+0
| | | | | | | | | | Signed-off-by: Thomas Diener <dietho@gmx.de> Signed-off-by: Anatolij Gustschin <agust@denx.de>
* | tools: env: Add aes.c placeholderMarek Vasut2014-05-12-0/+1
| | | | | | | | | | | | | | | | | | | | | | Add missing aes.c placeholder which includes lib/aes.c . Without this one, tools/env/ will fail to build. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com> Cc: Masahiro Yamada <yamada.m@jp.panasonic.com> Tested-by: Alexey Brodkin <abrodkin@synopsys.com> Tested-by: Heiko Schocher <hs@denx.de>
* | Merge branch 'tom' of git://git.denx.de/u-boot-x86Tom Rini2014-05-09-4/+27
|\ \
| * | patman: Avoid duplicate sign-offsSimon Glass2014-05-09-2/+23
| | | | | | | | | | | | | | | | | | | | | Keep track of all Signed-off-by tags in a commit and silently suppress any duplicates. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | patman: Deal with 'git apply' failures correctlySimon Glass2014-05-09-2/+4
| |/ | | | | | | | | | | | | This sort of failure is rare, but the code to deal with it is wrong. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
* | Merge branch 'u-boot/master'Albert ARIBAUD2014-05-09-70/+473
|\ \ | |/ | | | | | | | | | | Conflicts: drivers/net/Makefile (trivial merge)
| * buildman: make output dir configurableDaniel Schwierzeck2014-04-18-1/+4
| | | | | | | | | | | | | | | | Add an option to specify the output directory to override the default path '../'. This is useful for building in a ramdisk. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
| * tools: fix Makefile to clean-up fit_info and fit_check_signMasahiro Yamada2014-04-18-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We should avoid the description in Makefile like this ifdef CONFIG_FIT_SIGNATURE hostprogs-y += fit_info$(SFX) fit_check_sign$(SFX) endif Otherwise, fit_info and fit_check_sign would never be cleaned by "make clean". Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Heiko Schocher <hs@denx.de>
| * Merge branch 'next'Tom Rini2014-04-17-69/+471
| |\
| | * env: Implement support for AES encryption into fw_* toolsMarek Vasut2014-03-21-8/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement support for encrypting/decrypting the environment block into the tools/env/fw_* tools. The cipher used is AES 128 CBC and the implementation depends solely on components internal to U-Boot. To allow building against the internal AES library, the library did need minor adjustments to not include U-Boot's headers which are not wanted to be included and define missing types. Signed-off-by: Marek Vasut <marex@denx.de>
| | * tools, fit_check_sign: verify a signed fit imageHeiko Schocher2014-03-21-2/+111
| | | | | | | | | | | | | | | | | | | | | | | | add host tool "fit_check_sign" which verifies, if a fit image is signed correct. Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Simon Glass <sjg@chromium.org>
| | * tools, fit: add fit_info host commandHeiko Schocher2014-03-21-58/+217
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add fit_info command to the host tools. This command prints the name, offset and the len from a property from a node in a fit file. This info can be used to extract a properties data with linux tools, for example "dd". Signed-off-by: Heiko Schocher <hs@denx.de> Acked-by: Simon Glass <sjg@chromium.org>
| | * fit: add sha256 supportHeiko Schocher2014-03-21-1/+3
| | | | | | | | | | | | | | | | | | | | | add sha256 support to fit images Signed-off-by: Heiko Schocher <hs@denx.de> Acked-by: Simon Glass <sjg@chromium.org>
| | * tools/image-host: fix sign-images bugHeiko Schocher2014-03-21-1/+1
| | | | | | | | | | | | | | | | | | | | | property "sign-images" is never found, fix this. Signed-off-by: Heiko Schocher <hs@denx.de> Acked-by: Simon Glass <sjg@chromium.org>
* | | tools: mkimage: add support for gpimage formatKaricheri, Muralidharan2014-04-17-93/+218
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch add support for gpimage format as a preparatory patch for porting u-boot for keystone2 devices and is based on omapimage format. It re-uses gph header to store the size and loadaddr as done in omapimage.c Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Acked-by: Tom Rini <trini@ti.com>
* | | fw_env.c: Switch get_config to use '%ms' in sscanfTom Rini2014-04-17-5/+8
|/ / | | | | | | | | | | | | | | | | | | We currently limit ourself to 16 characters for the device name to read the environment from. This is insufficient for /dev/mmcblk0boot1 to work for example. Switch to '%ms' which gives us a dynamically allocated buffer instead. We're short lived enough to not bother free()ing the buffer. Signed-off-by: Tom Rini <trini@ti.com>
* | patman: Use Patch-cc: instead of Cc:Simon Glass2014-03-22-11/+14
|/ | | | | | | | | | | | | Add a new Patch-cc: tag which performs the service now provided by the Cc: tag. The Cc: tag is interpreted by git send-email but ignored by patman. So now: Cc: patman does nothing. (git send-email can cc patches) Patch-cc: patman Cc's patch and removes this tag from the patch Signed-off-by: Simon Glass <sjg@chromium.org>
* kbuild: rename SRCTREE to srctreeMasahiro Yamada2014-03-12-4/+4
| | | | | | | | | | | | | | | Prior to Kbuild, $(TOPDIR) or $(SRCTREE) was used for pointing to the top of source directory. (No difference between the two.) In Kbuild style, $(srctree) is used for instead. This commit renames SRCTREE to srctree and deletes the defition of SRCTREE. Note that SRCTREE in scripts/kernel-doc, scripts/docproc.c, doc/DocBook/Makefile should be keep. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* fw_env: correct writes to devices with small erase blocksDustin Byford2014-03-12-2/+2
| | | | | | | | | | | | | | | | | Some NOR flash devices have a small erase block size. For example, the Micron N25Q512 can erase in 4K blocks. These devices expose a bug in fw_env.c where flash_write_buf() incorrectly calculates bytes written and attempts to write past the environment sectors. Luckily, a range check prevents any real damage, but this does cause fw_setenv to fail with an error. This change corrects the write length calculation. The bug was introduced with commit 56086921 from 2008 and only affects configurations where the erase block size is smaller than the total environment data size. Signed-off-by: Dustin Byford <dustin@cumulusnetworks.com>
* fw_env: calculate default number of env sectorsDustin Byford2014-03-12-7/+9
| | | | | | | | | | | | | | | The assumed number of environment sectors (always 1) leads to an incorrect top_of_range calculation in fw.env.c when a flash device has an erase block size smaller than the environment data size (number of environment sectors > 1). This change updates the default number of environment sectors to at least cover the size of the environment. Also corrected a false statement about the number of sectors column in fw_env.config. Signed-off-by: Dustin Byford <dustin@cumulusnetworks.com>
* kbuild: tools: fix a bug that always builds Denx logoMasahiro Yamada2014-03-04-2/+2
| | | | | | | | | LOGO_BMP was never overwritten by board-specific or vendor-specific logos. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Reported-by: Bo Shen <voice.shen@atmel.com> Tested-by: Bo Shen <voice.shen@atmel.com>
* kbuild: add "cross_tools" target to build tools for the targetMasahiro Yamada2014-03-04-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Programs in tools/ directory are usually built for the host. But some of them (mkimage, dumpimge, gen_eth_addr, etc.) are useful on the target OS too. Actually, prior to Kbuild, U-Boot could build tools for the target like follows: $ make <target_board>_config $ export CROSS_COMPILE=<cross_gcc_prefix> $ make HOSTCC=${CROSS_COMPILE}gcc HOSTSTRIP=${CROSS_COMPILE}strip tools In Kbuild, we can no longer replace HOSTCC at the command line. In order to get back that feature, this commit adds "cross-tools" target. Usage: Build tools for the host $ make CROSS_COMPILE=<cross_gcc_prefix> tools Build tools for the target $ make CROSS_COMPILE=<cross_gcc_prefix> cross_tools Besides, "make cross_tools" strip tools programs because we generally expect smaller storages on embedded systems. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Reported-by: Heiko Schocher <hs@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Tom Rini <trini@ti.com> Tested-by: Heiko Schocher <hs@denx.de> Acked-by: Heiko Schocher <hs@denx.de>
* kbuild: move asm-offsets.h rules to ./KbuildMasahiro Yamada2014-02-25-27/+0
| | | | | | | | | | | | | | | | Generate include/generated/generic-asm-offsets.h and include/generated/asm-offsets.h in ./Kbuild. This commit also changes the include guard. Before this commit, __ASM_OFFSETS_H__ was used for both of them. So we could not include generic-asm-offsets.h and asm-offsets.h at the same time. This commit renames the include guard of the former to __GENERIC_ASM_OFFSETS_H__. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* kernel-doc: move kernel-doc tools to scripts/Masahiro Yamada2014-02-19-3146/+0
| | | | | | | | | | | | tools/kernel-doc/docproc.c and tools/kernel-doc/kernel-doc are files imported from Linux Kernel. They originally resided under scripts/ directory in Linux Kernel. This commit moves them to the original location. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* tools/env: cross-compile fw_printenv without setting HOSTCCMasahiro Yamada2014-02-19-7/+18
| | | | | | | | | | | | | | | fw_printenv is a program which mostly runs on the target Linux. Before switching to Kbuild, we needed to set HOSTCC at the command line like this: make HOSTCC=<your CC cross-compiler> env Going forward we can cross compile it by specifying CROSS_COMPILE: make CROSS_COMPILE=<your cross-compiler prefix> env This looks more natural. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Tested-by: Gerhard Sittig <gsi@denx.de>
* Makefile: refactor tools-all targetsMasahiro Yamada2014-02-19-1/+7
| | | | | | | - Move "easylogo", "gdb" tagets to tools/Makefile - Delete "gdbtools" target (same as "gdb") Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* kbuild: use Linux Kernel build scriptsMasahiro Yamada2014-02-19-14/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now we are ready to switch over to real Kbuild. This commit disables temporary scripts: scripts/{Makefile.build.tmp, Makefile.host.tmp} and enables real Kbuild scripts: scripts/{Makefile.build,Makefile.host,Makefile.lib}. This switch is triggered by the line in scripts/Kbuild.include -build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj +build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj We need to adjust some build scripts for U-Boot. But smaller amount of modification is preferable. Additionally, we need to fix compiler flags which are locally added or removed. In Kbuild, it is not allowed to change CFLAGS locally. Instead, ccflags-y, asflags-y, cppflags-y, CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o are prepared for that purpose. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Tested-by: Gerhard Sittig <gsi@denx.de>
* kbuild: change out-of-tree buildMasahiro Yamada2014-02-19-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the working directory where the build process occurs. Before this commit, build process occurred under the source tree for both in-tree and out-of-tree build. That's why we needed to add $(obj) prefix to all generated files in makefiles like follows: $(obj)u-boot.bin: $(obj)u-boot Here, $(obj) is empty for in-tree build, whereas it points to the output directory for out-of-tree build. And our old build system changes the current working directory with "make -C <sub-dir>" syntax when descending into the sub-directories. On the other hand, Kbuild uses a different idea to handle out-of-tree build and directory descending. The build process of Kbuild always occurs under the output tree. When "O=dir/to/store/output/files" is given, the build system changes the current working directory to that directory and restarts the make. Kbuild uses "make -f $(srctree)/scripts/Makefile.build obj=<sub-dir>" syntax for descending into sub-directories. (We can write it like "make $(obj)=<sub-dir>" with a shorthand.) This means the current working directory is always the top of the output directory. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Tested-by: Gerhard Sittig <gsi@denx.de>
* Makefile: refactor include path settingsMasahiro Yamada2014-02-19-8/+4
| | | | | | | | This commit merges commonly-used header include paths to UBOOTINCLUDE and NOSTDINC_FLAGS variables, which are placed at the top Makefile. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* Makefile: move BFD_ROOT_DIR to tools/gdb/MakefileMasahiro Yamada2014-02-19-0/+21
| | | | | | BFD_ROOT_DIR is used only in tools/gdb/Makefile Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* tools: convert makefiles to kbuild styleMasahiro Yamada2014-02-19-325/+141
| | | | | | | | | | | | | Before this commit, makefiles under tools/ directory were implemented with their own way. This commit refactors them by using "hostprogs-y" variable. Several C sources have been added to wrap other C sources to simplify Makefile. For example, tools/crc32.c includes lib/crc32.c Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* tools: correct proftool build ruleIan Campbell2014-02-19-2/+2
| | | | | | | | The incorrect substitution made it rebuild every time. Signed-off-by: Ian Campbell <ijc@hellion.org.uk> Cc: Tom Rini <trini@ti.com> Acked-by: Simon Glass <sjg@chromium.org>
* relocate-rela: replace a magic number with sizeof(Elf64_Rela)Masahiro Yamada2014-02-13-1/+1
| | | | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Scott Wood <scottwood@freescale.com> Cc: David Feng <fenghua@phytium.com.cn> Acked-by: Scott Wood <scottwood@freescale.com>
* tools: move kermit files to tools/kermit directoryMasahiro Yamada2014-01-24-0/+0
| | | | | | | | | | | | | | | | | | The script files, define2mk.sed and make-asm-offsets are used to create autoconf.mk and asm-offsets.h while build. Whereas README, dot.kermrc, flash_param, send_cmd, send_image are files useful for kermit. We should not put files which have the totally different purpose into the same directory. This commit creates a new directory, tools/kermit, and move kermit files into it. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Wolfgang Denk <wd@denx.de>
* cosmetic: tools/scripts/README: insert only one space between wordsMasahiro Yamada2014-01-24-1/+1
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* .gitignore: ignore u-boot.elf and tools/relocate-relaMasahiro Yamada2014-01-20-0/+1
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2014-01-10-44/+322
|\ | | | | | | | | | | | | | | | | | | Bringing in the MMC tree means that CONFIG_BOUNCE_BUFFER needed to be added to include/configs/exynos5-dt.h now. Conflicts: include/configs/exynos5250-dt.h Signed-off-by: Tom Rini <trini@ti.com>
| * arm64: Add tool to statically apply RELA relocationsScott Wood2014-01-09-0/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ARM64 uses the newer RELA-style relocations rather than the older REL. RELA relocations have an addend in the relocation struct, rather than expecting the loader to read a value from the location to be updated. While this is beneficial for ordinary program loading, it's problematic for U-Boot because the location to be updated starts out with zero, rather than a pre-relocation value. Since we need to be able to run C code before relocation, we need a tool to apply the relocations at build time. In theory this tool is applicable to other newer architectures (mainly 64-bit), but currently the only relocations it supports are for arm64, and it assumes a 64-bit little-endian target. If the latter limitation is ever to be changed, we'll need a way to tell the tool what format the image is in. Eventually this may be replaced by a tool that uses libelf or similar and operates directly on the ELF file. I've written some code for such an approach but libelf does not make it easy to poke addresses by memory address (rather than by section), and I was hesitant to write code to manually parse the program headers and do the update outside of libelf (or to iterate over sections) -- especially since it wouldn't get test coverage on things like binaries with multiple PT_LOAD segments. This should be good enough for now to let the manual relocation stuff be removed from the arm64 patches. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: David Feng <fenghua@phytium.com.cn>
| * Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'Albert ARIBAUD2014-01-06-44/+126
| |\
| | * SPL: EXYNOS: Prepare for variable size SPL supportRajeshwari Birje2013-12-30-43/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When variable size SPL is used, the BL1 expects the SPL to be encapsulated differently: instead of putting the checksum at a fixed offset in the SPL blob, prepend the blob with a header including the size and the checksum. The enhancements include - adding a command line option, '--vs' to indicate the need for the variable size encapsulation - padding the fixed size encapsulated blob with 0xff instead of random memory contents - do not silently truncate the input file, report error instead - no need to explicitly closing files/freeing memory, this all happens on exit; removing cleanups it makes code clearer - profuse commenting - modify Makefile to allow enabling the new feature per board Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Rajeshwari S Shinde <rajeshwari.s@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| | * Exynos5420: Add base patch for SMDK5420Rajeshwari Birje2013-12-30-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding the base patch for Exynos based SMDK5420. This shall enable compilation and basic boot support for SMDK5420. Signed-off-by: Rajeshwari S Shinde <rajeshwari.s@samsung.com> Signed-off-by: Akshay Saraswat <akshay.s@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * | Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'Albert ARIBAUD2014-01-06-0/+1
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | Conflicts: include/micrel.h The conflict above was trivial, caused by four lines being added in both branches with different whitepace.
| | * ARM: mxs: tools: Fix errno handling in strtoul() invocationMarek Vasut2013-12-17-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to NOTE in strtoul(3), the errno must be zeroed before strtoul() is called. Zero the errno. The NOTE reads as such: Since strtoul() can legitimately return 0 or ULONG_MAX (ULLONG_MAX for strtoull()) on both success and failure, the calling program should set errno to 0 before the call, and then determine if an error occurred by checking whether errno has a nonzero value after the call. This issue was detected on Fedora 19 with glibc 2.17 . Signed-off-by: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de> Cc: Tom Rini <trini@ti.com>
* | | Makefile, .gitignore: Cleanup non-existing binariesMasahiro Yamada2013-12-16-1/+0
| | | | | | | | | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | | Makefile: Move some scripts imported from LinuxMasahiro Yamada2013-12-13-4387/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have some scripts imported from Linux Kernel: setlocalversion, checkstack.pl, checkpatch.pl, cleanpatch They are located under tools/ directory in U-Boot now. But they were originally located under scripts/ directory in Linux Kernel. This commit moves them to the original location. It is true that binutils-version.sh and dtc-version.sh do not originate in Linux Kernel, but they should be moved by analogy to gcc-version.sh. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | | Add dumpimage, a tool to extract data from U-Boot imagesGuilherme Maciel Ferreira2013-12-13-0/+434
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given a multi-file image created through the mkimage's -d option: $ mkimage -A x86 -O linux -T multi -n x86 -d vmlinuz:initrd.img:System.map \ multi.img Image Name: x86 Created: Thu Jul 25 10:29:13 2013 Image Type: Intel x86 Linux Multi-File Image (gzip compressed) Data Size: 13722956 Bytes = 13401.32 kB = 13.09 MB Load Address: 00000000 Entry Point: 00000000 Contents: Image 0: 4040128 Bytes = 3945.44 kB = 3.85 MB Image 1: 7991719 Bytes = 7804.41 kB = 7.62 MB Image 2: 1691092 Bytes = 1651.46 kB = 1.61 MB It is possible to perform the innverse operation -- extracting any file from the image -- by using the dumpimage's -i option: $ dumpimage -i multi.img -p 2 System.map Although it's feasible to retrieve "data files" from image through scripting, the requirement to embed tools such 'dd', 'awk' and 'sed' for this sole purpose is cumbersome and unreliable -- once you must keep track of file sizes inside the image. Furthermore, extracting data files using "dumpimage" tool is faster than through scripting. Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* | | tools: moved code common to all image tools to a separated module.Guilherme Maciel Ferreira2013-12-13-191/+276
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to avoid duplicating code and keep only one point of modification, the functions, structs and defines useful for "dumpimage" were moved from "mkimage" to a common module called "imagetool". This modification also weakens the coupling between image types (FIT, IMX, MXS, and so on) and image tools (mkimage and dumpimage). Any tool may initialize the "imagetool" through register_image_tool() function, while the image types register themselves within an image tool using the register_image_type() function: +---------------+ +------| fit_image | +--------------+ +-----------+ | +---------------+ | mkimage |--------> | | <-----+ +--------------+ | | +---------------+ | imagetool | <------------| imximage | +--------------+ | | +---------------+ | dumpimage |--------> | | <-----+ +--------------+ +-----------+ | +---------------+ +------| default_image | +---------------+ register_image_tool() register_image_type() Also, the struct "mkimage_params" was renamed to "image_tool_params" to make clear its general purpose. Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* | | mkimage: added 'static' specifier to match function's prototype.Guilherme Maciel Ferreira2013-12-13-2/+1
|/ / | | | | | | | | | | | | This function should be declared static. Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com> Signed-off-by: Simon Glass <sjg@chromium.org>