aboutsummaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)AuthorFilesLines
2014-01-24tools: move kermit files to tools/kermit directoryMasahiro Yamada5-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>
2014-01-24cosmetic: tools/scripts/README: insert only one space between wordsMasahiro Yamada1-1/+1
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-01-20.gitignore: ignore u-boot.elf and tools/relocate-relaMasahiro Yamada1-0/+1
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-01-10Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini4-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>
2014-01-09arm64: Add tool to statically apply RELA relocationsScott Wood2-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>
2014-01-06Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'Albert ARIBAUD2-44/+126
2014-01-06Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'Albert ARIBAUD1-0/+1
Conflicts: include/micrel.h The conflict above was trivial, caused by four lines being added in both branches with different whitepace.
2013-12-30SPL: EXYNOS: Prepare for variable size SPL supportRajeshwari Birje1-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>
2013-12-30Exynos5420: Add base patch for SMDK5420Rajeshwari Birje1-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>
2013-12-17ARM: mxs: tools: Fix errno handling in strtoul() invocationMarek Vasut1-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>
2013-12-16Makefile, .gitignore: Cleanup non-existing binariesMasahiro Yamada1-1/+0
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2013-12-13Makefile: Move some scripts imported from LinuxMasahiro Yamada7-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>
2013-12-13Add dumpimage, a tool to extract data from U-Boot imagesGuilherme Maciel Ferreira6-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>
2013-12-13tools: moved code common to all image tools to a separated module.Guilherme Maciel Ferreira14-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>
2013-12-13mkimage: added 'static' specifier to match function's prototype.Guilherme Maciel Ferreira1-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>
2013-11-25Merge branch 'buildpatman' of http://git.denx.de/u-boot-x86Tom Rini5-14/+69
2013-11-25tools: updater: Remove remainders of dead boardMasahiro Yamada11-2107/+0
tools/updater needs board/MAI/AmigaOneG3SE board for compiling. But AmigaOneG3SE board was already deleted by Commit 953b7e6. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2013-11-25tools: imls: Remove a broken and unused tool.Masahiro Yamada3-381/+0
It looks like tools/imls/Makefile is invoked from nowhere. And also it is broken. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2013-11-21buildman: make board selector argument a regexStephen Warren2-5/+21
A common use-case is to build all boards for a particular SoC. This can be achieved by: ./tools/buildman/buildman -b mainline_dev tegra20 However, when the SoC is a member of a family of SoCs, and each SoC has a different name, it would be even more useful to build all boards for every SoC in that family. This currently isn't possible since buildman's board selection command-line arguments are compared to board definitions using pure string equality. To enable this, compare using a regex match instead. This matches MAKEALL's handling of command-line arguments. This enables: (all Tegra) ./tools/buildman/buildman -b mainline_dev tegra (all Tegra) ./tools/buildman/buildman -b mainline_dev '^tegra.*$' (all Tegra20, Tegra30 boards, but not Tegra114) ./tools/buildman/buildman -b mainline_dev 'tegra[23]' Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
2013-11-21buildman: fix READMEAndreas Bießmann1-1/+1
This is a trivial fix for c'n'p error. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> Acked-by: Simon Glass <sjg@chromium.org>
2013-11-21patman: add Commit-notes tag and sectionAlbert ARIBAUD3-8/+47
Sometimes a commit should have notes enclosed with it rather than withing the cover letter -- possibly even because there is no cover letter. Add a 'Commit-notes' tag, similar to the 'Series-notes' one; lines between this tag and the next END line are inserted in the patch right after the '---' commit delimiter. Change-Id: I01e99ae125607dc6dec08f3be8a5a0b37f0a483d Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> Signed-off-by: Simon Glass <sjg@chromium.org> (Updated README)
2013-11-17tools: Makefile: delete redundant linesMasahiro Yamada1-2/+0
HOSTOS is defined and exported at the top Makefile. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2013-11-08Makefile: do not create a symbolic link to arch/${ARCH}/include/asmMasahiro Yamada3-3/+3
In-tree build: - Do not create a symbolic link from include/asm to arch/${ARCH}/include/asm - Add ${SRCTREE}/arch/arm/include into the header search path Out-of-tree build: - Do not create a directory ${OBJTREE}/include2 - Do not create a symbolic link from ${OBJTREE}/include2/asm to ${SRCTREE}/arch/${ARCH}/include/asm - Add ${SRCTREE}/arch/arm/include into the header search path Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2013-10-15buildman: Use env to pick the python from $PATHJagannadha Sutradharudu Teki1-1/+1
python used in buildman doesn't need to be placed in /usr/bin/python, So use env to ensure that the interpreter will pick the python from environment. Usefull with several versions of python's installed on system. Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com> Acked-by: Simon Glass <sjg@chromium.org>
2013-10-14Merge branch 'buildman' of git://git.denx.de/u-boot-x86Tom Rini1-1/+2
2013-10-14Coding Style cleanup: drop some excessive empty linesWolfgang Denk1-1/+0
Signed-off-by: Wolfgang Denk <wd@denx.de>
2013-10-14Coding Style cleanup: replace leading SPACEs by TABsWolfgang Denk9-51/+51
Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Drop changes for PEP 4 following python tools] Signed-off-by: Tom Rini <trini@ti.com>
2013-10-14Coding Style cleanup: remove trailing white spaceWolfgang Denk15-28/+28
Signed-off-by: Wolfgang Denk <wd@denx.de>
2013-10-10buildman: don't fail --list-toolchains when toolchains failStephen Warren1-1/+2
When a toolchain invocation fails, an exception is thrown but not caught which then aborts the entire toolchain detection process. To solve this, request that exceptions not be thrown, since the toolchain init code already error-checks the command result. This solves e.g.: - found '/usr/bin/winegcc' Traceback (most recent call last): ... Exception: Error running '/usr/bin/winegcc --version' Change-Id: I579c72ab3b021e38b14132893c3375ea257c74f0 Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> (formatted to 80cols)
2013-10-02Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2-8/+10
2013-10-01buildman: Allow make flags to be specified for each boardSimon Glass5-5/+115
There are a few make options such as BUILD_TAG which can be provided when building U-Boot. Provide a way for buildman to pass these flags to make also. The flags should be in a [make-flags] section and arranged by target name (the 'target' column in boards.cfg. See the README for more details. Signed-off-by: Simon Glass <sjg@chromium.org>
2013-10-01buildman: Adjust tests for new boards.cfg formatSimon Glass1-5/+5
Commit 27af930e9a5c91365ca639ada580b338eabe4989 changed the boards.cfg format but missed to change the parsing in buildman. A follow-on commit 03c1bb242548e4e9d267d784861ccd69a1887aa0 fixed this but missed fixing the tests. This patch updates the tests to fit the new Board constructor. ./tools/buildman/buildman -t <unittest.result.TestResult run=1 errors=0 failures=0> Signed-off-by: Simon Glass <sjg@chromium.org>
2013-09-27tools/imximage.c: Fix compiling warningYork Sun1-4/+4
Convert set_hdr_func(struct imx_header *imxhdr) to set_hdr_func(void) to get rid of the warning warning: ‘imxhdr’ is used uninitialized in this function Signed-off-by: York Sun <yorksun@freescale.com> Acked-by: Stefano Babic <sbabic@denx.de>
2013-09-20buildman: fix boards.cfg parsingAndreas Bießmann1-5/+8
Commit 27af930e9a5c91365ca639ada580b338eabe4989 changed the boards.cfg format but missed to change the parsing in buildman. This patch changes c'tor of Board class to the new sequence, but omits maintainer field. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
2013-09-20FIT: delete unnecessary castsMasahiro Yamada1-1/+1
Becuase fdt_check_header function takes (const void *) type argument, the argument should be passed to it without being casted to (char *). Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2013-09-20boards.cfg: show info about boards.cfg instead of MAINTAINERSRoger Meier1-2/+2
Signed-off-by: Roger Meier <roger@bufferoverflow.ch>
2013-09-13Merge branch 'master' of git://git.denx.de/u-boot-armStefano Babic4-30/+180
Conflicts: MAINTAINERS boards.cfg Signed-off-by: Stefano Babic <sbabic@denx.de>
2013-09-12Merge and reformat boards.cfg and MAINTAINERSAlbert ARIBAUD2-1/+133
Put all informations about targets, including state (active or orphan) and maintainers, in boards.cfg; remove MAINTAINERS; adjust the build system accordingly. Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
2013-09-12Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini1-1/+2
2013-09-11Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'Albert ARIBAUD1-1/+2
Conflicts: tools/Makefile
2013-09-10tools: mxsboot: Mark the FCB pages as validMarek Vasut1-4/+6
Without this marker, Linux will complain that the NAND pages with FCB are invalid. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Stefano Babic <sbabic@denx.de>
2013-09-06Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini9-51/+2812
2013-09-06fw_env: fix writing environment for mtd devicesOliver Metz1-28/+42
Signed-off-by: Oliver Metz <oliver@freetz.org> Tested-by: Luka Perkov <luka@openwrt.org>
2013-09-06fw_env: add redundant env support for MTD_ABSENTOliver Metz1-0/+3
Signed-off-by: Oliver Metz <oliver@freetz.org> Tested-by: Luka Perkov <luka@openwrt.org>
2013-09-05Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'Albert ARIBAUD8-51/+2812
Conflicts: drivers/serial/serial.c The conflict above was a trivial case of adding one init function in each branch, and manually resolved in merge.
2013-09-04Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'Albert ARIBAUD1-0/+0
2013-08-31tools: mxsboot: Staticize functionsMarek Vasut1-6/+6
Make remaining non-static functions static and the same for vars. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Stefano Babic <sbabic@denx.de>
2013-08-31tools: Sort lists of files in MakefileMarek Vasut1-22/+22
Fix the lists of files so they are in order again. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@ti.com> Cc: Stefano Babic <sbabic@denx.de>
2013-08-31ARM: mxs: tools: Add mkimage support for MXS bootstreamMarek Vasut5-0/+2582
Add mkimage support for generating and verifying MXS bootstream. The implementation here is mostly a glue code between MXSSB v0.4 and mkimage, but the long-term goal is to rectify this and merge MXSSB with mkimage more tightly. Once this code is properly in U-Boot, MXSSB shall be deprecated in favor of mkimage-mxsimage support. Note that the mxsimage generator needs libcrypto from OpenSSL, I therefore enabled the libcrypto/libssl unconditionally. MXSSB: http://git.denx.de/?p=mxssb.git;a=summary The code is based on research presented at: http://www.rockbox.org/wiki/SbFileFormat Signed-off-by: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@ti.com> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Otavio Salvador <otavio@ossystems.com.br>
2013-08-31tools: add support for setting the CSF into imximageStefano Babic2-4/+40
Add support for setting the CSF (Command Sequence File) pointer which is used for HAB (High Assurance Boot) in the imximage by adding e.g. CSF 0x2000 in the imximage.cfg file. This will set the CSF pointer accordingly just after the padded data image area. The boot_data.length is adjusted with the value from the imximage.cfg config file. The resulting u-boot.imx can be signed with the FSL HAB tooling. The generated CSF block needs to be appended to the u-boot.imx. Signed-off-by: Stefano Babic <sbabic@denx.de>