summaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Use hash.c in mkimageRuchika Gupta2015-01-291-0/+1
| | | | | | | | | | | | | | | | | | Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com> CC: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
| * | rsa: Split the rsa-verify to separate the modular exponentiationRuchika Gupta2015-01-291-1/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Public exponentiation which is required in rsa verify functionality is tightly integrated with verification code in rsa_verify.c. The patch splits the file into twp separating the modular exponentiation. 1. rsa-verify.c - The file parses device tree keys node to fill a keyprop structure. The keyprop structure can then be converted to implementation specific format. (struct rsa_pub_key for sw implementation) - The parsed device tree node is then passed to a generic rsa_mod_exp function. 2. rsa-mod-exp.c Move the software specific functions related to modular exponentiation from rsa-verify.c to this file. Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com> CC: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* | tools: do not print error messages in verify_header() functionsGuilherme Maciel Ferreira2015-01-292-11/+12
| | | | | | | | | | | | | | | | | | | | | | default_image.c and socfpgaimage.c are the only image modules that print error messages during header verification. The verify_header() is used to query if a given image file is processed by the image format. Thus, if the image format can't handle the file, it must simply return an error. Otherwise we pollute the screen with errors messages until we find the image format that handle a given image file. Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
* | dumpimage: fit: extract FIT imagesGuilherme Maciel Ferreira2015-01-291-1/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dumpimage is able to extract components contained in a FIT image: $ ./dumpimage -T flat_dt -i CONTAINER.ITB -p INDEX FILE The CONTAINER.ITB is a regular FIT container file. The INDEX is the poisition of the sub-image to be retrieved, and FILE is the file (path+name) to save the extracted sub-image. For example, given the following kernel.its to build a kernel.itb: /dts-v1/; / { ... images { kernel@1 { description = "Kernel 2.6.32-34"; data = /incbin/("/boot/vmlinuz-2.6.32-34-generic"); type = "kernel"; arch = "ppc"; os = "linux"; compression = "gzip"; load = <00000000>; entry = <00000000>; hash@1 { algo = "md5"; }; }; ... }; ... }; The dumpimage can extract the 'kernel@1' node through the following command: $ ./dumpimage -T flat_dt -i kernel.itb -p 0 kernel Extracted: Image 0 (kernel@1) Description: Kernel 2.6.32-34 Created: Wed Oct 22 15:50:26 2014 Type: Kernel Image Compression: gzip compressed Data Size: 4040128 Bytes = 3945.44 kB = 3.85 MB Architecture: PowerPC OS: Linux Load Address: 0x00000000 Entry Point: 0x00000000 Hash algo: md5 Hash value: 22352ad39bdc03e2e50f9cc28c1c3652 Which results in the file 'kernel' being exactly the same as '/boot/vmlinuz-2.6.32-34-generic'. Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
* | dumpimage: replace the term "datafile" by "subimage"Guilherme Maciel Ferreira2015-01-294-18/+19
| | | | | | | | Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
* | dumpimage: add 'T' option to explicitly set the image typeGuilherme Maciel Ferreira2015-01-293-39/+37
| | | | | | | | | | | | | | | | | | | | Some image types, like "KeyStone GP", do not have magic numbers to distinguish them from other image types. Thus, the automatic image type discovery does not work correctly. This patch also fix some integer type mismatches. Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
* | imagetool: replace image registration function by linker_lists featureGuilherme Maciel Ferreira2015-01-2918-376/+254
| | | | | | | | | | | | | | | | | | The registration was introduced in commit f86ed6a8d52c99bb2d17d3cac1647edca0c4399c This commit also removes all registration functions, and the member "next" from image_type_params struct Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
* | imagetool: make the image_save_datafile() available to all image typesGuilherme Maciel Ferreira2015-01-293-27/+45
| | | | | | | | | | | | | | | | Move the image_save_datafile() function from an U-Multi specific file (default_image.c) to a file common to all image types (image.c). And rename it to genimg_save_datafile(), to make clear it is useful for any image type. Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
* | imagetool: move common code to imagetool moduleGuilherme Maciel Ferreira2015-01-294-130/+90
|/ | | | | | | The get_type() and verify_print_header() functions have the same code on both dumpimage.c and mkimage.c modules. Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
* buildman: Add an option to write the full build outputSimon Glass2015-01-144-3/+9
| | | | | | | | Normally buildman runs with 'make -s' meaning that only errors and warnings appear in the log file. Add a -V option to run make in verbose mode, and with V=1, causing a full build log to be created. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add the option to download toolchains from kernel.orgSimon Glass2015-01-146-13/+303
| | | | | | | | | | | | | The site at https://www.kernel.org/pub/tools/crosstool/ is a convenient repository of toolchains which can be used for U-Boot. Add a feature to download and install a toolchain for a selected architecture automatically. It isn't clear how long this site will stay in the current place and format, but we should be able to rely on bug reports if it changes. Suggested-by: Marek Vašut <marex@denx.de> Suggested-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Allow architecture to alias to multiple toolchainsSimon Glass2015-01-143-5/+23
| | | | | | | Some archs have need than one alias, so support a list of alises in the ..buildman file. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Don't use the local settings when running testsSimon Glass2015-01-141-1/+14
| | | | | | | We should create a test setting file when running testes, not use whatever happens to be on the local machine. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Don't complain about missing sections in ~/.buildmanSimon Glass2015-01-141-1/+0
| | | | | | Silently ignore this since it is valid to have missing sections. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add documentation about the .buildman fileSimon Glass2015-01-141-20/+53
| | | | | | | This file is only partially documented. Add some more details. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Wolfgang Denk <wd@denx.de>
* buildman: Add a note about Python pre-requisitesSimon Glass2015-01-141-1/+10
| | | | | | | | Since we need a few modules which might not be available in a bare-bones distribution, add a note about that to the README. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Wolfgang Denk <wd@denx.de>
* buildman: Add an option to use the full tool chain pathSimon Glass2015-01-145-10/+25
| | | | | | | | | | | | | | In some cases there may be multiple toolchains with the same name in the path. Provide an option to use the full path in the CROSS_COMPILE environment variable. Note: Wolfgang mentioned that this is dangerous since in some cases there may be other tools on the path that are needed. So this is set up as an option, not the default. I will need test confirmation (i.e. that this commit fixes a real problem) before merging it. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Steve Rae <srae@broadcom.com>
* buildman: Put the toolchain path first instead of last in PATHSimon Glass2015-01-141-1/+1
| | | | | | | | | | | | | | | | If: 1. Toolchains A and B have the same filename 2. Toolchain A is in the PATH 3. Toolchain B is given in ~/.buildman and buildman uses it to build then buildman will add toolchain B to the end of its path but will not necessarily use it since U-Boot will find toolchain A first in the PATH. Try to fix this by putting the toolchain first in the path instead of last. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Try to avoid hard-coded string parsingSimon Glass2015-01-141-1/+8
| | | | | | | The assumption that the compiler name will always end in gcc is incorrect for clang and apparently on BSD. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Allow specifying a range of commits to buildSimon Glass2015-01-143-9/+45
| | | | | | | | Adjust the -b flag to permit a range expression as well as a branch. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Tested-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
* buildman: Don't remove entire output directory when testingSimon Glass2015-01-141-1/+2
| | | | | | | | When running tests the output directory is often wiped. This is only safe if a branch is being built. The output directory may contain other things besides the buildman test output. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add an option to flatten output directory treesSimon Glass2015-01-144-6/+24
| | | | | | | | | | When building current source for a single board, buildman puts the output in <output_dir>/current/current/<board>. Add an option to make it use <output_dir>/<board> instead. This removes the unnecessary directories in that case, controlled by the --no-subdirs/-N option. Suggested-by: Tom Rini <trini@ti.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Try to guess the upstream commitSimon Glass2015-01-143-16/+67
| | | | | | | | | | | | | | | Buildman normally obtains the upstream commit by asking git. Provided that the branch was created with 'git checkout -b <branch> <some_upstream>' then this normally works. When there is no upstream, we can try to guess one, by looking up through the commits until we find a branch. Add a function to try this and print a warning if buildman ends up relying on it. Also update the documentation to match. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Wolfgang Denk <wd@denx.de>
* buildman: Don't prune output space for 'current source' buildSimon Glass2015-01-141-0/+2
| | | | | | | | | | This is not needed since we always do a full (non-incremental) build. Also it might be dangerous since it will try to delete everything below the base directory. Fix this potentially nasty bug. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Put build in 'current', not 'current/current'Simon Glass2015-01-141-4/+3
| | | | | | | | Buildman currently puts current-source builds in a current/current subdirectory, but there is no need for the extra depth. Suggested-by: Albert Aribaud <albert.u.boot@aribaud.net> Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add tests that check the correct output directory is usedSimon Glass2015-01-141-0/+31
| | | | | | Add a few tests of the output directory logic. Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge branch 'buildman' of git://git.denx.de/u-boot-x86Tom Rini2015-01-141-0/+2
|\ | | | | | | | | | | | | Conflicts: tools/buildman/control.py Signed-off-by: Tom Rini <trini@ti.com>
| * patman: Use the full commit hash for 'git checkout'Simon Glass2014-11-032-3/+2
| | | | | | | | | | | | | | Even with the initial 8 characeters of the hash we will sometimes get a collision. Use the full hash. Signed-off-by: Simon Glass <sjg@chromium.org>
| * buildman: Don't default to -e when using -sSimon Glass2014-11-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | When using summary mode (-s) we don't always want to display errors. Allow this option to be omitted. Series-to: u-boot Series-cc: albert Change-Id: I6b37754d55eb920ecae114fceba55834b43ea3b9 Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
| * buildman: Fix repeating board list with -lSimon Glass2014-11-031-1/+2
| | | | | | | | | | | | | | | | Ensure that we don't print duplicate board names when -l is used. Change-Id: I56adb138fc18f772ba61eba0fa194cdd7bc7efc6 Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
* | x86: Correct ifdtool microcode calculationSimon Glass2015-01-131-2/+2
| | | | | | | | | | | | | | | | This currently assumes that U-Boot resides at the start of ROM. Update it to remove this assumption. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Bin Meng <bmeng.cn@gmail.com>
* | tools/kwbimage.c: fix parser error handlingAndreas Bießmann2015-01-111-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The two error checks for image_boot_mode_id and image_nand_ecc_mode_id where wrong and would never fail, fix that! This was detected by Apple's clang compiler: ---8<--- HOSTCC tools/kwbimage.o tools/kwbimage.c:553:20: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] if (el->bootfrom < 0) { ~~~~~~~~~~~~ ^ ~ tools/kwbimage.c:571:23: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] if (el->nandeccmode < 0) { ~~~~~~~~~~~~~~~ ^ ~ 2 warnings generated. --->8--- Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> Acked-By: Jeroen Hofstee <jeroen@myspectrum.nl>
* | fix: tools: kwbimage.c: Initialize headersz to suppress warningŁukasz Majewski2015-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building with my toolchain (4.8.2): CROSS_COMPILE=/home/lukma/work/ptxdist/toolchains/arm/OSELAS.Toolchain-2013.12.0/arm-v7a-linux-gnueabi/gcc-4.8.2-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/bin/arm-v7a-linux-gnueabi- I see following WARNING: tools/kwbimage.c: In function "kwbimage_set_header": tools/kwbimage.c:803:8: warning: "headersz" may be used uninitialized in this function [-Wmaybe-uninitialized] memcpy(ptr, image, headersz); ^ This fix aims to suppress it. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Acked-by: Stefan Roese <sr@denx.de> Acked-by: Heiko Schocher <hs@denx.de>
* | buildman: Fix some typos in READMEDirk Behme2014-12-291-7/+7
| | | | | | | | | | Signed-off-by: Dirk Behme <dirk.behme@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* | x86: Add a script to process Intel microcode filesSimon Glass2014-12-182-0/+254
| | | | | | | | | | | | | | | | | | | | Intel delivers microcode updates in a microcode.dat file which must be split up into individual files for each CPU. Add a tool which performs this task. It can list available microcode updates for each model and produce a new microcode update in U-Boot's .dtsi format. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Bin Meng <bmeng.cn@gmail.com>
* | x86: ifdtool: Add support for early microcode accessSimon Glass2014-12-182-8/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some Intel CPUs use an 'FSP' binary blob which provides an inflexible means of starting up the CPU. One result is that microcode updates can only be done before RAM is available and therefore parsing of the device tree is impracticle. Worse, the addess of the microcode update must be stored in ROM since a pointer to its start address and size is passed to the 'FSP' blob. It is not possible to perform any calculations to obtain the address and size. To work around this, ifdtool is enhanced to work out the address and size of the first microcode update it finds in the supplied device tree. It then writes these into the correct place in the ROM. U-Boot can then start up the FSP correctly. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | x86: ifdtool: Use a structure for the file/address listSimon Glass2014-12-181-6/+18
| | | | | | | | | | | | | | | | | | Rather than two independent arrays, use a single array of a suitable structure. Also add a 'type' member since we will shortly add additional types. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | x86: ifdtool: Display filename when file errors are reportedSimon Glass2014-12-181-12/+18
| | | | | | | | | | | | | | | | When a file is missing it helps to know which file. Update the error message to print this information. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | x86: ifdtool: Correct a debug() missing parameterSimon Glass2014-12-181-1/+2
| | | | | | | | | | | | | | | | This is missing a parameter. Fix it to avoid a warning when debug is enabled. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* | x86: ifdtool: Separate out filenames for -D and -iSimon Glass2014-12-131-6/+6
| | | | | | | | | | | | | | To allow these options to be specified together, separate them out. Change-Id: Ib93f11cd51eb3302127f4c82936ff2b44c88d5a2 Signed-off-by: Simon Glass <sjg@chromium.org>
* | tools/ifdtool: Support writing multiple files (-w) simultaneouslyBin Meng2014-12-132-7/+26
| | | | | | | | | | | | | | | | | | Currently ifdtool only supports writing one file (-w) at a time. This looks verbose when generating u-boot.rom for x86 targets. This change allows at most 16 files to be written simultaneously. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* | ls102xa: pblimage: Add pblimage tool support for LS102xAAlison Wang2014-12-111-35/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For LS102xA, the size of spl/u-boot-spl.bin is variable. This patch adds the support to deal with the variable u-boot size in pblimage tool. It will be padded to 64 byte boundary. Use pblimage_check_params() to add the specific operations for ARM, such as PBI CRC and END command and the calculation of pbl_cmd_initaddr. Signed-off-by: Alison Wang <alison.wang@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
* | Merge branch 'sandbox' of git://git.denx.de/u-boot-x86Tom Rini2014-12-045-19/+17
|\ \
| * | buildman: Don't default to -e when building current sourceSimon Glass2014-11-262-14/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | We probably don't need to enable this option by default. It is useful to display only failure boards (not errors) and it is easy to add -e if it is required. Also update the docs. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
| * | buildman: Fix repeating board list with -lSimon Glass2014-11-261-1/+2
| | | | | | | | | | | | | | | | | | | | | Ensure that we don't print duplicate board names when -l is used. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
| * | patman: Use the full commit hash for 'git checkout'Simon Glass2014-11-262-3/+2
| | | | | | | | | | | | | | | | | | | | | Even with the initial 8 characeters of the hash we will sometimes get a collision. Use the full hash. Signed-off-by: Simon Glass <sjg@chromium.org>
| * | buildman: Save *.img files tooTom Rini2014-11-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When saving binary files we likely want to keep any .img files that have been generated as well. Signed-off-by: Tom Rini <trini@ti.com> Acked-by: Simon Glass <sjg@chromium.org>
* | | tools: Add ifdtool to .gitignoreBin Meng2014-11-251-0/+1
|/ / | | | | | | | | Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
* | Merge branch 'master' of git://www.denx.de/git/u-boot-imxTom Rini2014-11-242-9/+16
|\ \
| * | tools/msximage.c: fix warning about nptr possibly uninitializedAlbert ARIBAUD2014-11-201-1/+1
| | | | | | | | | | | | Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
OpenPOWER on IntegriCloud