summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAgeLines
...
| * patman: Add a missing space in GetMetaDataForList()Simon Glass2016-03-14-1/+1
| | | | | | | | | | | | | | Fix this nit to keep the code consistent. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
| * fdtgrep: Improve error handling with invalid device treeSimon Glass2016-03-14-4/+10
| | | | | | | | | | | | | | | | | | | | This tool requires that the aliases node be the first node in the tree. But when it is not, it does not handle things gracefully. In fact it crashes. Fix this, and add a more helpful error message. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | mkimage: Bring data into the FIT before processingSimon Glass2016-03-14-0/+97
| | | | | | | | | | | | | | | | Since we now support data outside the FIT image, bring it into the FIT image first before we do any processing. This avoids adding new functionality to the core FIT code for now. Signed-off-by: Simon Glass <sjg@chromium.org>
* | mkimage: Support placing data outside the FITSimon Glass2016-03-14-1/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One limitation of FIT is that all the data is 'inline' within it, using a 'data' property in each image node. This means that to find out what is in the FIT it is necessary to scan the entire file. Once loaded it can be scanned and then the images can be copied to the correct place in memory. In SPL it can take a significant amount of time to copy images around in memory. Also loading data that does not end up being used is wasteful. It would be useful if the FIT were small, acting as a directory, with the actual data stored elsewhere. This allows SPL to load the entire FIT, without the images, then load the images it wants later. Add a -E option to mkimage to request that it output an 'external' FIT. Signed-off-by: Simon Glass <sjg@chromium.org>
* | mkimage: Support adding device tree files to a FITSimon Glass2016-03-14-10/+133
| | | | | | | | | | | | | | | | | | | | | | To make the auto-FIT feature useful we need to be able to provide a list of device tree files on the command line for mkimage to add into the FIT. Add support for this feature. So far there is no support for hashing or verified boot using this method. For those cases, a .its file must still be provided. Signed-off-by: Simon Glass <sjg@chromium.org>
* | mkimage: Support automatic creating of a FIT without a .itsSimon Glass2016-03-14-5/+220
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present, when generating a FIT, mkimage requires a .its file containing the structure of the FIT and referring to the images to be included. Creating the .its file is a separate step that makes it harder to use FIT. This is not required for creating legacy images. Often the FIT is pretty standard, consisting of an OS image, some device tree files and a single configuration. We can handle this case automatically and avoid needing a .its file at all. To start with, support automatically generate the FIT using a new '-f auto' option. Initially this only supports adding a single image (e.g. a linux kernel) and a single configuration. Signed-off-by: Simon Glass <sjg@chromium.org>
* | tools: Add a function to obtain the size of a fileSimon Glass2016-03-14-0/+34
| | | | | | | | | | | | | | This will be used in mkimage when working out the required size of the FIT based on the files to be placed into it. Signed-off-by: Simon Glass <sjg@chromium.org>
* | mkimage: Allow a FIT to include an image of any typeSimon Glass2016-03-14-5/+29
| | | | | | | | | | | | | | | | | | | | At present FIT images are set up by providing a device tree source file which is a file with a .its extension. We want to support automatically creating this file based on the image supplied to mkimage. This means that even though the final file type is always IH_TYPE_FLATDT, the image inside may be something else. Signed-off-by: Simon Glass <sjg@chromium.org>
* | tools: Include fdt_sw.o in libfdt for mkimageSimon Glass2016-03-14-1/+1
| | | | | | | | | | | | | | At present this file is omitted. It is used to build up a binary device tree. We plan to do this in mkimage, so include this file in the build. Signed-off-by: Simon Glass <sjg@chromium.org>
* | mkimage: Make 'params' staticSimon Glass2016-03-14-1/+1
| | | | | | | | | | | | This is not used outside mkimage.c, so make this variable static. Signed-off-by: Simon Glass <sjg@chromium.org>
* | mkimage: Show an error message when usage() is calledSimon Glass2016-03-14-8/+9
| | | | | | | | | | | | | | Sometimes incorrect arguments are supplied but the reason is not obvious to the user. Add some helpful messages. Signed-off-by: Simon Glass <sjg@chromium.org>
* | mkimage: Move usage() up to the topSimon Glass2016-03-14-39/+42
| | | | | | | | | | | | | | To avoid a forward declaration, move the usage() function higher in the file. Signed-off-by: Simon Glass <sjg@chromium.org>
* | mkimage: Sort the option processing code by optionSimon Glass2016-03-14-25/+25
| | | | | | | | | | | | | | Adjust the code so that option alphabetical order matches the order in the switch() statement. This makes it easier to find options. Signed-off-by: Simon Glass <sjg@chromium.org>
* | mkimage: Convert to use getopt()Simon Glass2016-03-14-132/+101
| | | | | | | | | | | | | | | | | | The current way of parsing arguments is a bit clumsy. It seems better to use getopt() which is commonly used for this purpose. Convert the code to use getopt() and make a few minor adjustments as needed. Signed-off-by: Simon Glass <sjg@chromium.org>
* | mkimage: Move argument processing into its own functionSimon Glass2016-03-14-24/+32
|/ | | | | | | At present main() is very long. Split out the argument processing to make it easier to follow. Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge git://git.denx.de/u-boot-dmTom Rini2016-02-25-1/+4
|\
| * patman: fix series-notes handling for buildmanAlbert ARIBAUD2016-02-24-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A patman series with a 'Series-notes' section causes buildman to crash with: self.series.notes += self.section TypeError: cannot concatenate 'str' and 'list' objects Fix by initializing series.notes as a one-element array rather than a scalar. Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
* | tools: Update openrisc toolchain informationBin Meng2016-02-24-2/+9
| | | | | | | | | | | | | | | | | | Since commit 87da2690ab81b5f29f83dc85c55f933e6ef414bc "openrisc: updating build tools naming convention", openrisc kernel.org toolchain is out of date and cannot build U-Boot. Update buildman and moveconfig tools to refer to the new one. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
* | tools: -Wno-deprecated-declarations for OpenSSL on darwinAndreas Bießmann2016-02-24-0/+8
| | | | | | | | | | | | | | | | | | | | | | Since OpenSSL is deprecated on OS X in favour of Common Crypto API disable the warning for this host OS. Another solution would be to add some glue layer for crypto stuff, but I think this is not worth the effort. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | Gracefully handle 64-bit signed-extended 32-bit Load addressesWilliam Cohen2016-02-24-2/+2
|/ | | | | | | | | | | | | | | | | | | | | To follow the MIPS 32-bit and 64-bit memory map conventions (*) recent MIPS Linux kernels are using a 64-bit sign extended value (0xffffffff80010000) for the 32-bit load address (0x80010000) of the Creator CI20 board kernel. When this 64-bit argument was passed to mkimage running on a 32-bit machine such as the Creator CI20 board the load address was incorrectly formed from the upper 32-bit sign-extend bits (0xffffffff) by the strtoul instead of from the lower 32-bits (0x80010000). The mkimage should be able to tolerate the longer sign-extended 64-bit version of the 32-bit arguments with the use of strtoull. Use of the strtoll in place of the strtol in mkimage.c resolves the issue of self hosted kernel builds for the Creator CI20 board (+) and (++). (*) http://techpubs.sgi.com/library/dynaweb_docs/0620/SGI_Developer/books/DevDriver_PG/sgi_html/ch01.html (+) https://github.com/MIPS/CI20_linux/issues/23 (++) https://github.com/MIPS/CI20_linux/issues/22 Signed-off-by: William Cohen <wcohen@redhat.com>
* Merge branch 'master' of git://www.denx.de/git/u-boot-imxTom Rini2016-02-21-1/+0
|\
| * mxsboot: remove unused includeAndreas Bießmann2016-02-21-1/+0
| | | | | | | | | | | | | | | | | | | | Commit 276d3ebb883024d753cd9c69ab2fd243ffa1262e removed htole32() but missed to remove the corresponding header. This is annoying, since BSD systems do not have endian.h. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Michael Heimpold <mhei@heimpold.de>
* | test, tools: introduce tbot READMEHeiko Schocher2016-02-08-0/+734
| | | | | | | | | | | | | | introduce a README how to use tbot for testing U-Boot and/or linux kernels. Signed-off-by: Heiko Schocher <hs@denx.de>
* | tools: env: update usage stringsAndreas Fenkart2016-02-08-42/+75
| | | | | | | | Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
* | tools: env: factor out parse_common_argsAndreas Fenkart2016-02-08-25/+37
| | | | | | | | Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
* | tools: env: shift optind arguments and fix argument indicesAndreas Fenkart2016-02-08-43/+15
| | | | | | | | Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
* | tools: env: parse aes key / suppress flag into argument structAndreas Fenkart2016-02-08-57/+53
| | | | | | | | | | | | | | disabled original parsing, but not yet removed since the argument indexing needs to be fixed Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
* | tools: env: introduce setenv/printenv argument structsAndreas Fenkart2016-02-08-38/+84
| | | | | | | | | | | | | | goal is to use getopt for all argument parsing instead of adhoc parsing in fw_getenv/fw_setenv functions Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
* | tools: env: make parse_aes_key statelessAndreas Fenkart2016-02-08-6/+6
| | | | | | | | Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
* | tools: env validate: pass values as 0-based arrayAndreas Fenkart2016-02-08-4/+7
| | | | | | | | | | | | passing argv/argc can produce off-by-one errors Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com>
* | Use correct spelling of "U-Boot"Bin Meng2016-02-06-2/+2
|/ | | | | | | | | | Correct spelling of "U-Boot" shall be used in all written text (documentation, comments in source files etc.). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
* tools: mxsboot: Use more portable cpu_to_le32()Bin Meng2016-02-02-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently when building mxsboot on certain machines it reports: HOSTCC tools/mxsboot tools/mxsboot.c: In function 'mx28_create_sd_image': tools/mxsboot.c:560: warning: implicit declaration of function 'htole32' /tmp/cchLIV6q.o: In function 'main': mxsboot.c:(.text+0x6d8): undefined reference to 'htole32' mxsboot.c:(.text+0x6e7): undefined reference to 'htole32' mxsboot.c:(.text+0x6f6): undefined reference to 'htole32' mxsboot.c:(.text+0x705): undefined reference to 'htole32' mxsboot.c:(.text+0x711): undefined reference to 'htole32' /tmp/cchLIV6q.o:mxsboot.c:(.text+0x71d): more undefined references to 'htole32' follow collect2: ld returned 1 exit status make[1]: *** [tools/mxsboot] Error 1 make: *** [tools] Error 2 The solution is to use cpu_to_le32() instead which is more portable, just like other U-Boot tools [1] do. [1] http://lists.denx.de/pipermail/u-boot/2014-October/192919.html Suggested-by: Marek Vasut <marex@denx.de> Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Marek Vasut <marex@denx.de>
* rockchip: Add a script to parse datasheetsSimon Glass2016-01-21-0/+218
| | | | | | | | This script has proved useful for parsing datasheets and creating register shift/mask values for use in header files. Include it in case it is useful for others. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: video: test: Test that bitmap display works correctlySimon Glass2016-01-20-0/+0
| | | | | | | | Add a test for the 'bmp' command. Test both the uncompressed and compressed versions of the file, since they use different code paths. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
* patman: Add --thread optionMateusz Kulikowski2016-01-20-2/+8
| | | | | | | | | | | | | | Add option to create threaded series of patches. With it, it will be possible to create patch threads like this: [PATCH 0/10] Add support for time travel [PATCH 1/10] Add Flux Capacitor driver [PATCH 2/10] Add Mr. Fusion driver (...) Internally it will call git send-email with --thread option Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* Merge branch 'master' of git://git.denx.de/u-boot-x86Tom Rini2016-01-14-0/+14
|\
| * tools: microcode-tool: Support parsing header file with a license blockBin Meng2016-01-13-0/+14
| | | | | | | | | | | | | | | | | | The microcode header files in the Intel Chief River FSP package have a license comment block. Update the microcode-tool to support parsing it and extract the license text to the .dtsi file. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* | arm: mvebu: Add runtime detection of UART (xmodem) boot-modeStefan Roese2016-01-14-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds runtime detection of the Marvell UART boot-mode (xmodem protocol). If this boot-mode is detected, SPL will return to the BootROM to continue the UART booting. With this patch its now possible, to generate a U-Boot image that can be booted either from the strapped boot-device (e.g. SPI NOR, MMC, etc) or via the xmodem protocol from the UART. In the UART case, the kwboot tool will dynamically insert the UART boot-device type into the image. And also patch the load address in the header, so that the mkimage header will be skipped (as its not expected by the Marvell BootROM). This simplifies the development for Armada XP / 38x based boards. As no special images need to be generated by selecting the MVEBU_BOOTROM_UARTBOOT Kconfig option. Since the Kconfig option MVEBU_BOOTROM_UARTBOOT is not needed any more, its now completely removed. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr> Cc: Dirk Eibach <dirk.eibach@gdsys.cc> Cc: Phil Sutter <phil@nwl.cc> Cc: Kevin Smith <kevin.smith@elecsyscorp.com>
* | arm: mvebu: Move SoC selection (A38X vs AXP) into KconfigStefan Roese2016-01-14-1/+1
|/ | | | | | | | | | | | | | | | | | Until now, the SoC selection for the ARCH_MVEBU platforms has been done in the config header. Using CONFIG_ARMADA_XP in a non-clear way. As it needed to get selected for AXP and A38x based boards. This patch now changes this to move the SoC selection to Kconfig. And also uses CONFIG_ARCH_MVEBU as a common define for both AXP and A38x. This makes things a bit clearer - especially for new board additions. Additionally the defines CONFIG_SYS_MVEBU_DDR_AXP and CONFIG_SYS_MVEBU_DDR_A38X are replaced with the already available CONFIG_ARMADA_38X and CONFIG_ARMADA_XP. And CONFIG_DDR3 is removed, as its not referenced anywhere. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr>
* rockchip: Drop a debug message when outputing SPI imagesSimon Glass2016-01-08-1/+1
| | | | | | There is an unnecessary sector count displayed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* rockchip: Enable generation of SPI imagesSimon Glass2016-01-08-1/+1
| | | | | | This feature was dropped at some point. Restore it. Signed-off-by: Simon Glass <sjg@chromium.org>
* tools: zynqimage: Clean up check_paramsNathan Rossi2015-12-18-2/+1
| | | | | | | | | | | | Clean up the param checking, removing some code paths that will never happen. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Cc: Michal Simek <michal.simek@xilinx.com> Cc: Tom Rini <trini@konsulko.com> Reported-by: Coverity (CID 133251) Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* Merge git://git.denx.de/u-boot-rockchipTom Rini2015-12-16-44/+121
|\
| * rockchip: mkimage: use imagename to select spl hdr & spl sizeJeffy Chen2015-12-13-38/+120
| | | | | | | | | | | | | | | | Our chips may have different spl size and spl header, so use imagename(passed by "mkimage -n") to select them now. Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Acked-by: Simon Glass <sjg@chromium.org>
| * Revert "rockchip: Add max spl size & spl header configs"Jeffy Chen2015-12-13-13/+8
| | | | | | | | | | | | | | This reverts commit 10b4615f9d7e177ec7fe644fbb2616e0e0956f6e Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Acked-by: Simon Glass <sjg@chromium.org>
* | tools: env: include compiler.hPeter Robinson2015-12-13-0/+1
|/ | | | | | | With gcc 5.2 and later we get a bunch of "error: unknown type name" for 'uint8_t', 'uint32_t' and friends. Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
* buildman: README: add links for toolchains not available on kernel.orgThomas Chou2015-12-10-1/+22
| | | | | | | | | | | Add links for toolchains not available on kernel.org. The sh4 toolchains from kernel.org dose not work for some boards, so use the sh from Sourcery. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* mkimage: Fix warning from fix for generating multi and script images againMarek Vasut2015-12-07-2/+1
| | | | | | | | | | | | | | | | | | | | | | | Seems 6ae6e160 broke creating images in certain cases, there are two problems with that patch. First is that the expression "!x == 4 || !x == 6" is ambiguous. The intention here was "!(x == 4) || !(x == 6)" based on reading further in the file, where this was borrowed from. This however is interpreted by gcc as "(!x) == 4 || (!x) == 6" and always false. gcc-5.x will warn about this case. The second problem is that we do not want to test for the case of "(NOT x is 4) OR (NOT x is 6)" but instead "(x is not equal to 4) AND (x is not equal to 6)". This is because in those two cases we already execute the code question in another part of the file. Rewrite the expression and add parenthesis for clarity. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@konsulko.com> Cc: Philippe De Swert <philippedeswert@gmail.com> Cc: Simon Glass <sjg@chromium.org> [trini: Re-word Marek's explanation]
* mkimage : Fix generating multi and script imagesPhilippe De Swert2015-12-05-13/+18
| | | | | | | | | | | | | | | Seems 92a655c3 broke creating multi and script type images. Since the file1:file2:file3 string does not get split up, it fails on trying to open an non-existing file. mkimage -A arm -O linux -T multi -C none -d zImage:splash.bmp:device.dtb uimage tools/mkimage: Can't open zImage:splash.bmp:device.dtb: No such file or directory Since the sizes of the different parts seem to get added in the actual routine that handles multi and script type images, we can probably skip the bit of the code that causes the failure for that type of images. Signed-off-by: Philippe De Swert <philippedeswert@gmail.com>
* rockchip: Add support for rk's second level loaderJeffy Chen2015-12-01-17/+14
| | | | | | | | | | The Rockchip boot ROM could load & run an initial spl loader, and continue to load a second level boot-loader(which stored right after the initial loader) when it returns. Modify idblock generation code to support it. Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com> Acked-by: Simon Glass <sjg@chromium.org>