summaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* Add dumpimage, a tool to extract data from U-Boot imagesGuilherme Maciel Ferreira2013-12-136-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-1314-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-131-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>
* Merge branch 'buildpatman' of http://git.denx.de/u-boot-x86Tom Rini2013-11-255-14/+69
|\
| * buildman: make board selector argument a regexStephen Warren2013-11-212-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>
| * buildman: fix READMEAndreas Bießmann2013-11-211-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>
| * patman: add Commit-notes tag and sectionAlbert ARIBAUD2013-11-213-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)
* | tools: updater: Remove remainders of dead boardMasahiro Yamada2013-11-2511-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>
* | tools: imls: Remove a broken and unused tool.Masahiro Yamada2013-11-253-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>
* tools: Makefile: delete redundant linesMasahiro Yamada2013-11-171-2/+0
| | | | | | HOSTOS is defined and exported at the top Makefile. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* Makefile: do not create a symbolic link to arch/${ARCH}/include/asmMasahiro Yamada2013-11-083-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>
* buildman: Use env to pick the python from $PATHJagannadha Sutradharudu Teki2013-10-151-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>
* Merge branch 'buildman' of git://git.denx.de/u-boot-x86Tom Rini2013-10-141-1/+2
|\
| * buildman: don't fail --list-toolchains when toolchains failStephen Warren2013-10-101-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)
* | Coding Style cleanup: drop some excessive empty linesWolfgang Denk2013-10-141-1/+0
| | | | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* | Coding Style cleanup: replace leading SPACEs by TABsWolfgang Denk2013-10-149-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>
* | Coding Style cleanup: remove trailing white spaceWolfgang Denk2013-10-1415-28/+28
|/ | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2013-10-022-8/+10
|\
| * tools/imximage.c: Fix compiling warningYork Sun2013-09-271-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>
| * Merge branch 'master' of git://git.denx.de/u-boot-armStefano Babic2013-09-134-30/+180
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: MAINTAINERS boards.cfg Signed-off-by: Stefano Babic <sbabic@denx.de>
| * | tools: mxsboot: Mark the FCB pages as validMarek Vasut2013-09-101-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>
* | | buildman: Allow make flags to be specified for each boardSimon Glass2013-10-015-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>
* | | buildman: Adjust tests for new boards.cfg formatSimon Glass2013-10-011-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>
* | | buildman: fix boards.cfg parsingAndreas Bießmann2013-09-201-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>
* | | FIT: delete unnecessary castsMasahiro Yamada2013-09-201-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>
* | | boards.cfg: show info about boards.cfg instead of MAINTAINERSRoger Meier2013-09-201-2/+2
| |/ |/| | | | | Signed-off-by: Roger Meier <roger@bufferoverflow.ch>
* | Merge and reformat boards.cfg and MAINTAINERSAlbert ARIBAUD2013-09-122-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>
* | Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2013-09-121-1/+2
|\ \
| * \ Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'Albert ARIBAUD2013-09-111-1/+2
| |\ \ | | |/ | |/| | | | | | | Conflicts: tools/Makefile
| | * CONFIG: EXYNOS5: Replace misnomer SMDK5250 with EXYNOS5250 and update MakefilesChander Kashyap2013-08-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Update the Makefiles so that all boards can use the same spl generation tool Signed-off-by: Inderpal Singh <inderpal.singh@linaro.org> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* | | Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2013-09-069-51/+2812
|\ \ \ | |/ /
| * | Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'Albert ARIBAUD2013-09-058-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.
| | * | tools: mxsboot: Staticize functionsMarek Vasut2013-08-311-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>
| | * | tools: Sort lists of files in MakefileMarek Vasut2013-08-311-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>
| | * | ARM: mxs: tools: Add mkimage support for MXS bootstreamMarek Vasut2013-08-315-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>
| | * | tools: add support for setting the CSF into imximageStefano Babic2013-08-312-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>
| | * | tools: add padding of data image file for imximageStefano Babic2013-08-311-3/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement function vrec_header to be able to pad the final data image file according the what has been calculated for boot_data.length. Signed-off-by: Stefano Babic <sbabic@denx.de>
| | * | tools: add variable padding of data image in mkimageStefano Babic2013-08-312-4/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use previously unused return value of function vrec_header to return a padding size to generic mkimage. This padding size is used in copy_files to pad with zeros after copying the data image. Signed-off-by: Stefano Babic <sbabic@denx.de>
| | * | tools: dynamically allocate imx_header in imximageStefano Babic2013-08-312-10/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change to dynamically allocate the imx_header to correctly allocate the IVT, Boot Data and DCD at correct locations depending on the boot media. Also check that the Image Vector Table Offset + IVT + Boot Data + DCD <= Initial Load Region Size. Previously struct imx_header was always 4096 bytes and was not dealing correctly with the Image Vector Table Offset. Now, the memory allocation looks for e.g. SD boot like this Storage u-boot.imx RAM Device 00000000 177ff000 <-------------- | 00000400 00000000 d1 00 20 40 IVT.header 177ff400 <------- | 00000404 00000004 00 00 80 17 IVT.entry 177ff404 ----------- | 00000408 00000008 00 00 00 00 IVT.reserved1 177ff408 | | | 0000040C 0000000C 2c f4 7f 17 IVT.dcd 177ff40C ------ | | | 00000410 00000010 20 f4 7f 17 IVT.boot 177ff410 ---- | | | | 00000414 00000014 00 f4 7f 17 IVT.self 177ff414 -------- | | 00000418 00000018 00 00 00 00 IVT.csf 177ff418 | | | | 0000041C 0000001C 00 00 00 00 IVT.reserved2 177ff41C | | | | 00000420 00000020 00 f0 7f 17 BootData.start 177ff420 <--- | | --- 00000424 00000024 00 60 03 00 BootData.length 177ff424 | | 00000428 00000028 00 00 00 00 BootData.plugin 177ff428 | | 0000042C 0000002C d2 03 30 40 DCD.header 177ff42C <----- | ... | 00001000 00000c00 13 00 00 ea U-Boot Start 17800000 <---------- While at it also remove the unused #define HEADER_OFFSET. Signed-off-by: Stefano Babic <sbabic@denx.de>
| | * | tools: rename mximage_flash_offset to imximage_ivt_offsetStefano Babic2013-08-311-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This better reflects the naming from the Reference Manual as well as fits better since "flash" is not really applicabe for SATA. Signed-off-by: Stefano Babic <sbabic@denx.de>
| | * | tools: imx_header should not include flash_offsetStefano Babic2013-08-312-8/+8
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Doing a make distclean; make mx6qsabresd_config; make and hexdump -C u-boot.imx | less ... 00000360 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 000003f0 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 |................| ^^^^^^^^^^^ 00000400 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00001000 13 00 00 ea 14 f0 9f e5 14 f0 9f e5 14 f0 9f e5 |...ê.ð.å.ð.å.ð.å| ... shows the flash_offset value being written into the final generated image, wich is not correct. Instead create flash_offset as static variable such that the generated image is "clean". 00000360 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| * 00001000 13 00 00 ea 14 f0 9f e5 14 f0 9f e5 14 f0 9f e5 |...ê.ð.å.ð.å.ð.å| Signed-off-by: Stefano Babic <sbabic@denx.de>
| * | Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'Albert ARIBAUD2013-09-041-0/+0
| |\ \
| | * | arm, am335x: add support for 3 siemens boardsHeiko Schocher2013-08-281-0/+0
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | add support for the am335x based boards from siemens: dxr2: - DDR3 128MiB - NAND 256MiB - Ethernet with external Switch SMSC LAN9303 - no PMIC - internal Watchdog - DFU support pxm2: - DDR2 512 MiB - NAND 1024 MiB - PMIC - PHY atheros ar803x - USB Host - internal Watchdog - DFU support rut: - DDR3 256 MiB - NAND 256 MiB - PMIC - PHY natsemi dp83630 - external Watchdog - DFU support Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Roger Meier <r.meier@siemens.com> Signed-off-by: Samuel Egli <samuel.egli@siemens.com> Cc: Pascal Bach <pascal.bach@siemens.com> Cc: Tom Rini <trini@ti.com>
* | | fw_env: fix writing environment for mtd devicesOliver Metz2013-09-061-28/+42
| | | | | | | | | | | | | | | Signed-off-by: Oliver Metz <oliver@freetz.org> Tested-by: Luka Perkov <luka@openwrt.org>
* | | fw_env: add redundant env support for MTD_ABSENTOliver Metz2013-09-061-0/+3
|/ / | | | | | | | | Signed-off-by: Oliver Metz <oliver@freetz.org> Tested-by: Luka Perkov <luka@openwrt.org>
* | tools/Makefile: Move _GNU_SOURCE to MakefileYork Sun2013-08-168-21/+3
| | | | | | | | | | | | | | | | | | | | Commit 669dfc2e adds libfdt_env.h to HOSTCPPFLAGS. It causes stdio.h to be included before _GNU_SOURCE is defined in C files. On some old hosts some prototypes are protected by #ifdef __USE_GNU, which is set when _GNU_SOURCE is defined. Signed-off-by: York Sun <yorksun@freescale.com> Acked-by: Simon Glass <sjg@chromium.org>
* | tools, bmp_logo: fix index from uint16_t to int to allow bigger logosHeiko Schocher2013-08-101-1/+1
| | | | | | | | | | | | | | | | | | when generating the bmp_logo_bitmap, the index is casted as an uint16_t. So bigger logos as 65535 bytes are converted wrong Fix this. Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Anatolij Gustschin <agust@denx.de>
* | Validate dtc is new enoughStephen Warren2013-08-021-0/+20
|/ | | | | | | | | Subsequent patches assume that dtc supports various recent features. These are available in dtc 1.4.0. Validate that dtc is at least that version. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
* Add LGPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-244-52/+4
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-2476-1262/+84
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
OpenPOWER on IntegriCloud