summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2016-09-29tools/env: allow negative offsetsStefan Agner
A negative value for the offset is treated as a backwards offset for from the end of the device/partition for block devices. This aligns the behavior of the config file with the syntax of CONFIG_ENV_OFFSET where the functionality has been introduced with commit 5c088ee841f9 ("env_mmc: allow negative CONFIG_ENV_OFFSET"). Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-09-29tools/env: complete environment device config earlyStefan Agner
Currently flash_read completes a crucial part of the environment device configuration, the device type (mtd_type). This is rather confusing as flash_io calls flash_read conditionally, and one might think flash_write, which also makes use of mtd_type, gets called before flash_read. But since flash_io is always called with O_RDONLY first, this is not actually the case in reality. However, it is much cleaner to complete and verify the config early in parse_config. This also prepares the code for further extension. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2016-07-14tools: env: replace WHITESPACE macro by isblankAndreas Fenkart
Signed-off-by: Andreas Fenkart <andreas.fenkart@digitalstrom.com> (cherry picked from commit 10667e15f48613e264a4da78a36bbd7daf5c4ce8)
2016-03-09Revert "tools: make imxheader size align on page size"Max Krummenacher
This reverts commit c31a8b2bdb47dc8fa71c259423bd8fed840b8a25. The introduction of a union results in correct alignment. The additional reserved word now misaligns the structure again. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Conflicts: tools/imximage.h
2016-03-09tools/imximage: set DCD pointer to NULL when its length is 0Baruch Siach
When dcd_len is 0 the Write Data command that the set_dcd_rst_v2() routine generates is empty. This causes HAB to complain that the command is invalid. --------- HAB Event 1 ----------------- event data: 0xdb 0x00 0x0c 0x41 0x33 0x06 0xc0 0x00 0xcc 0x00 0x04 0x04 To fix this set the DCD pointer in the IVT to NULL in this case. The DCD header itself is still needed for detect_imximage_version() to determine the image version. Conflicts: tools/imximage.c cherry-picked from http://git.denx.de/?p=u-boot/u-boot-imx.git;a=commitdiff;h=873bf926bfbb0a667158261813115fa6819661b7 Signed-off-by: Baruch Siach <baruch@tkos.co.il> Acked-by: Stefano Babic <sbabic@denx.de> (cherry picked from commit 873bf926bfbb0a667158261813115fa6819661b7)
2016-03-09MLK-10567: Extend u-boot imximage to support check bits set/clrNitin Garg
Add support for HAB "Check data" all bits set and clear check functionality. Rename CHECK_DATA to CHECK_BITS_SET. Flag=0 -> (*address & mask) == 0 | All bits clear Flag=2 -> (*address & mask) == mask | All bits set Signed-off-by: Nitin Garg <nitin.garg@freescale.com> (cherry picked from commit 0836912ef7a53d1f3d65f95556a34d03b8d65399)
2016-03-09MLK-10186-2 imximage: support new commandPeng Fan
Since rom code supports clear bit and check data command, and new ddrc needs such commands, add clear bit and check data command in imximage.c. CHECK_DATA 4 xxxx bit This command is dead loop until bit set at address xxxx. CLR_BIT 4 xxxx bit This command is to clear bit at address xxxx. Signed-off-by: Peng Fan <Peng.Fan@freescale.com> (cherry picked from commit 257600d197bf9a58a2b8d08419296aaf901d850d) Conflicts: tools/imximage.c
2016-03-09MLK-10186-1 imximage: add fixed IVT offset supportYe.Li
Since from mx7, we use fixed IVT offset for all boot devices. Introduce a new configuration CONFIG_IMX_FIXED_IVT_OFFSET for this. Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Signed-off-by: Ye.Li <B37916@freescale.com> (cherry picked from commit 88e0a3552b08627b18d98380a32dbafacb18854b) Conflicts: tools/imximage.h
2016-03-09MLK-10774-25 imx:imximage add plugin supportPeng Fan
This patch is from commit 441fd86d055c57b79257943449a8101b83e98c61 Signed-off-by: Nitin Garg <nitin.garg@freescale.com> Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
2015-05-11logos: update Toradex logoStefan Agner
Use the boot loader splash screen from WinCE, which maches positionwise our wallpapers. Altough the logo is a 8-Bit indexed BMP as well, colors looked odd at first on U-Boot. After converting to full RGB pallette and coverting back to indexed BMP using imagemagick, the Logo showed up properly. $ convert tools/logos/toradex-rgb.bmp -type Palette -colors 256 \ -compress none -verbose BMP3:tools/logos/toradex.bmp
2015-04-21logos: add Toradex logoStefan Agner
2015-04-15fw_env.h: include autoconf.hMax Krummenacher
Without this, when CONFIG_ENV_VARS_UBOOT_CONFIG is active we get a compile time error when doing 'make env'. In file included from tools/env/fw_env.c:117:0: include/env_default.h:110:11: error: expected ‘}’ before ‘CONFIG_SYS_ARCH’ When building U-Boot this is included indirectly by the compiler switch -include /home/trdx/git.toradex.com/u-boot-2014.10-toradex/include/linux/kconfig.h (cherry picked from commit 7031ed747021815dd8303d8a70b8c070ba709c56)
2015-04-14tools: make imxheader size align on page sizeStefan Agner
The i.MX V2 headers total size is 0x7fc. The header is placed in front of the U-Boot binary which of course is aligned to text base. Hence the header starting point is not page aligned (e.g. at 0x3f400404). This is still a valid header, which boots fine using serial loader. However, the image fails to boot from NAND (tested on a VF61x SoC). Most parts of the header have a length of a multiply of 16 bytes.The rest of the header is filled with 8 bytes long DCD data. Only the boot data header is 3 word long (12 bytes). This patch makes sure the whole image is exactly 0x800 by adding one padding word after the boot data header. Since the individual data structures are referenced by pointers, this still results in a valid i.MX V2 header while maintaining page alignment.
2015-04-10lpc32xx: add lpc32xx-spl.bin boot image targetAlbert ARIBAUD \(3ADEV\)
Signed-off-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>
2015-04-03Merge branch 'master' of git://git.denx.de/u-boot-tegraTom Rini
Conflicts: board/armltd/vexpress64/vexpress64.c Signed-off-by: Tom Rini <trini@konsulko.com>
2015-03-30ARM: tegra: rename colibri_t20 board/configuration/device-treeMarcel Ziswiler
In accordance with our other modules supported by U-Boot and as agreed upon for Apalis/Colibri T30 get rid of the carrier board in the board/ configuration/device-tree naming. While at it also bring the prompt more in line with our other products. Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
2015-03-28Patch to mkenvimage to handle text files with length that exceed env sizeBrian McFarland
The current head revision of mkenvimage (e72be8947e129f5ab274c0a9f235d2cc0014b2ea) will prevent you from creating an env image from a text file that is larger than the env length specified by the '-s' option. That doesn't make sense given that the tool now allows comments and blank lines. This patch removes that limitation and allows longer text files to be used. I don't have time / desire at the moment to figure out "patman" and could really care less if this is adopted up stream. Just figured I would share in case anybody else finds it useful enough to take time to do a proper patch. >From 39ff30190c2bf687861f4b4b33230f1944fb64f9 Mon Sep 17 00:00:00 2001 From: Brian McFarland <bmcfarland@rldrake.com> Date: Thu, 12 Mar 2015 11:37:19 -0400 Subject: [PATCH] In mkenvimage, removed the check that prevented using a source text file larger than the output environment image. Instead, the main parsing loop checks to see if the environment buffer is full, and quits if it is. After the main parse loop, a second loop swallows comments and whitespace until either the EOF is reached or more env vars are found, in which case an error will be thrown.
2015-03-05Merge branch 'buildman' of git://git.denx.de/u-boot-x86Tom Rini
2015-03-05buildman: Add a space before the list of boardsSimon Glass
Tweak the output slightly so we don't get things like: - board1 board2+ board3 board4 There should be a space before the '+'. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-03-05buildman: Correct toolchain download featureSimon Glass
Commit d908898 updated the ScanPath() function but not its documentation and not all its callers. This breaks the toolchain check after it is downloaded. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de>
2015-03-05kwbimage: align v1 binary header to 4BChris Packham
According to the Armada-XP documentation the binary header format requires the header length to be aligned to 4B. Signed-off-by: Chris Packham <judge.packham@gmail.com> Acked-by: Stefan Roese <sr@denx.de> Acked-by: Prafulla Wadaskar <prafulla@marvell.com>
2015-02-17add example for file on VFAT filesystem usageWaldemar Brodkorb
For example on a raspberry pi the u-boot environment can be saved in a file on the first VFAT partition. This example illustrates how to use it with fw_printenv/fw_setenv. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
2015-02-17Merge branch 'master' of http://git.denx.de/u-boot-sunxiTom Rini
2015-02-16tools: mksunxiboot: Fix problems on big endian systemsSiarhei Siamashka
Now my PS3 can be also used to build u-boot for sunxi devices. Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-02-16tools/imagetool: remove linker scriptAndreas Bießmann
Commit a93648d197df48fa46dd55f925ff70468bd81c71 introduced linker generated lists for imagetool which is the base for some host tools (mkimage, dumpimage, et al.). Unfortunately some host tool chains do not support the used type of linker scripts. Therefore this commit broke these host-tools for them, namely FreeBSD and Darwin (OS/X). This commit tries to fix this. In order to have a clean distinction between host and embedded code space we need to introduce our own linker generated list instead of re-using the available linker_lists.h provided functionality. So we copy the implementation used in linux kernel script/mod/file2alias.c which has the very same problem (cause it is a host tool). This code also comes with an abstraction for Mach-O binary format used in Darwin systems. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> Cc: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
2015-02-15buildman: allow multiple toolchains in a single pathAlbert ARIBAUD
When buildman scans a toolchain path, it stops at the first toolchain found. However, a single path can contains several toolchains, each with its own prefix. This patch lets buildman scan all toolchains in the path. Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> Acked-by: Simon Glass <sjg@chromium.org>
2015-02-15patman: Read in the git-mailrc alias fileSimon Glass
We should read this file to obtain a set of aliases. This reduces the need to create them in the ~/.patman file. This feature did exist in some version of patman, and is mentioned in the help but it did not find its way upstream. Reported-by: Graeme Russ <gruss@tss-engineering.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2015-02-15buildman: Fix incorrect arguemnt in GetUpstream()Simon Glass
This causes an error when trying to build a local branch which has a local branch as its upstream. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2015-02-10Merge branch 'master' of git://git.denx.de/u-boot-x86Tom Rini
2015-02-10Merge branch 'master' of git://www.denx.de/git/u-boot-imxTom Rini
2015-02-10imx: imximage: Add QuadSPI boot supportYe.Li
Add QuadSPI boot support to imximage tool. Note: The QuadSPI configuration parameters at offset 0x400 are not included in this patch. Need other tools to generate the parameters part. Signed-off-by: Ye.Li <B37916@freescale.com>
2015-02-07kwbimage: Make the Makefile pass in CONFIG_SYS_SPI_U_BOOT_OFFSTom Rini
We can't use config.h directly as some platforms include headers that aren't safe to use in normal Linux userland. Signed-off-by: Tom Rini <trini@ti.com>
2015-02-06tools: kwbimage: Support u-boot.img padding to CONFIG_SYS_SPI_U_BOOT_OFFSStefan Roese
This is used on the AXP boards, to pad u-boot.img to the desired offset in SPI flash (only this boot target supported right now). This offset is used by the SPL then to load u-boot.img into SDRAM and execute it there. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Luka Perkov <luka.perkov@sartura.hr>
2015-02-05x86: Enhance the microcode tool to support header files as inputSimon Glass
Sometimes microcode is delivered as a header file. Allow the tool to support this as well as collecting multiple microcode blocks into a single update. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Bin Meng <bmeng.cn@gmail.com>
2015-01-31Merge branch 'patman' of git://git.denx.de/u-boot-x86Tom Rini
2015-01-30patman: Explain how to make doc/git-mailrc workSimon Glass
Add an explanation for how to set up git so that patman can find the alias file. Fix up the get_maintainers message too. Reported-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-30patman: Check commit_match before stripping leading whitespaceScott Wood
True commit lines start at column zero. Anything that is indented is part of the commit message instead. I noticed this by trying to run buildman with commit e3a4facdfc07179ebe017a07b8de6224a935a9f3 as master, which contained a reference to a Linux commit inside the commit message. ProcessLine saw that as a genuite commit line, and thus buildman tried to build it, and died with an exception because that SHA is not present in the U-Boot tree. Signed-off-by: Scott Wood <scottwood@freescale.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-01-30patman: Make dry-run output match real functionalityPeter Tyser
When run with the --dry-run argument patman prints out information showing what it would do. This information currently doesn't line up with what patman/git send-email really do. Some basic examples: - If an email address is addressed via "Series-cc" and "Patch-cc" patman shows that email address would be CC-ed two times. - If an email address is addressed via "Series-to" and "Patch-cc" patman shows that email address would be sent TO and CC-ed. - If an email address is addressed from a combination of tag aliases, get_maintainer.pl output, "Series-cc", "Patch-cc", etc patman shows that the email address would be CC-ed multiple times. Patman currently does try to send duplicate emails like the --dry-run output shows, but "git send-email" intelligently removes duplicate addresses so this patch shouldn't change the non-dry-run functionality. Change patman's output and email addressing to line up with the "git send-email" logic. This trims down patman's dry-run output and prevents confusion about what patman will do when emails are actually sent. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2015-01-30Merge branch 'master' of git://git.denx.de/u-boot-dmTom Rini
2015-01-29Use hash.c in mkimageRuchika Gupta
Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com> CC: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
2015-01-29rsa: Split the rsa-verify to separate the modular exponentiationRuchika Gupta
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>
2015-01-29tools: do not print error messages in verify_header() functionsGuilherme Maciel Ferreira
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>
2015-01-29dumpimage: fit: extract FIT imagesGuilherme Maciel Ferreira
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>
2015-01-29dumpimage: replace the term "datafile" by "subimage"Guilherme Maciel Ferreira
Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
2015-01-29dumpimage: add 'T' option to explicitly set the image typeGuilherme Maciel Ferreira
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>
2015-01-29imagetool: replace image registration function by linker_lists featureGuilherme Maciel Ferreira
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>
2015-01-29imagetool: make the image_save_datafile() available to all image typesGuilherme Maciel Ferreira
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>
2015-01-29imagetool: move common code to imagetool moduleGuilherme Maciel Ferreira
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>
2015-01-29arm: mx6: cm-fx6: display compulab logoNikita Kiryanov
Add compulab logo and display it on boot. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Cc: Stefano Babic <sbabic@denx.de> Cc: Igor Grinberg <grinberg@compulab.co.il> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
2015-01-19mxsboot : Support of 224-bytes OOB area lengthAlexandre Coffignal
Add support for the NAND Flash chip with page size of 4096+224-bytes OOB area length For example Micron MT29F4G08 NAND flash device defines a OOB area which is 224 bytes long (oobsize). Signed-off-by: Alexandre Coffignal <acoffignal@geral.com>