29 Nov, 2015
3 commits
-
Fix computation of haeder size and binary header size.
Size of opt header and some 32bit values were not taken into account. This could
result in invalid boot images (due to the wrong binary header size, the image could
claim to have another extension header after the binary extension although there
is none).Use "uint32_t" instead of "unsigned int" for header size computation.
Signed-off-by: Reinhard Pfau
Reviewed-by: Stefan Roese
Cc: Luka Perkov -
KWB image header values are in little endian (LE).
So adding appropriate cpu_to_leXX() calls to allow building those images
on BE hosts, too.Signed-off-by: Reinhard Pfau
Reviewed-by: Stefan Roese -
With the dtb added to the main U-Boot image, it can happen, that
the resulting image is not 4-byte aligned. As the dtb tends to
be unaligned. But the image needs to be 4-byte aligned. At least the
Marvell hdrparser tool complains if its unaligned. By returning 1 here
in kwbimage_generate(), called via tparams->vrec_header() in mkimage.c,
mkimage will automatically pad the resulting image to a 4-byte size
if necessary.Signed-off-by: Stefan Roese
Cc: Luka Perkov
Cc: Dirk Eibach
18 Nov, 2015
1 commit
-
The binary header ends with one lword, defining if another header
follows this one. This additions 4 bytes need to be taken into
account in the generation of the header size. And the complete
4 bytes at the end of this binary header need to get cleared.Signed-off-by: Stefan Roese
Cc: Luka Perkov
Cc: Kevin Smith
21 Oct, 2015
1 commit
-
The MVEBU BootROM does not allow non word aligned payloads.
Signed-off-by: Stefan Roese
Cc: Luka Perkov
01 Oct, 2015
1 commit
-
Currently, kwboot only allows dynamic UART boot mode patching for SoCs
with header version 0 (Orion, Kirkwood). This patch now enables this "-p"
feature also for SoCs with header version 1 (Armada XP / 38x etc). With
this its possible now to use the UART boot mode without on images that
are generated for other boot devices, like SPI. So no need to change
BOOT_FROM to "uart" for UART xmodem booting any more.Signed-off-by: Stefan Roese
Tested-by: Kevin Smith
Cc: Luka Perkov
Cc: Dirk Eibach
24 Jul, 2015
2 commits
-
To use this offset for other boot device (like SDIO/MMC), lets rename
it to a more generic name. This will be used be the SDIO/MMC SPL boot
support for the A38x.Signed-off-by: Stefan Roese
Cc: Luka Perkov
Cc: Dirk Eibach -
This patch adds support to select the "sdio" as boot device in the
kwbimage.cfg file. This line selects this SDIO device:BOOT_FROM sdio
Tested on Marvell DB-88F6820-GP board.
Signed-off-by: Stefan Roese
Cc: Luka Perkov
Cc: Dirk Eibach
14 Jun, 2015
1 commit
-
If defined, the macro CONFIG_SYS_SPI_U_BOOT_OFFS allows a board
to specify the offset of the payload image into the kwb image
file. This value was being used to locate the image, but was not
used in the "header size" field of the main header. Move the
use of this macro into the function that returns the header size
so that the same value is used in all places.Signed-off-by: Kevin Smith
Tested-by: Stefan Roese
06 Mar, 2015
1 commit
-
According to the Armada-XP documentation the binary header format
requires the header length to be aligned to 4B.Signed-off-by: Chris Packham
Acked-by: Stefan Roese
Acked-by: Prafulla Wadaskar
07 Feb, 2015
2 commits
-
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
-
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
Reviewed-by: Luka Perkov
30 Jan, 2015
1 commit
-
The registration was introduced in commit f86ed6a8d52c99bb2d17d3cac1647edca0c4399c
This commit also removes all registration functions, and the member "next"
from image_type_params structSigned-off-by: Guilherme Maciel Ferreira
11 Jan, 2015
2 commits
-
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< 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
Acked-By: Jeroen Hofstee -
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
Acked-by: Stefan Roese
Acked-by: Heiko Schocher
05 Nov, 2014
1 commit
-
This patch fix the kwimage tools for version 0 fileformat used for kirkwood
Tested on sheevaplugSigned-off-by: Gerald Kerma
Tested-by: Stefan Roese
Reviewed-by: Stefan Roese
Acked-By: Prafulla Wadaskar
31 Oct, 2014
2 commits
-
This patch fixes a compilation warning of kwbimage.c:
tools/kwbimage.c: In function ‘kwbimage_set_header’:
tools/kwbimage.c:784:8: warning: ‘headersz’ may be used uninitialized in this function [-Wmaybe-uninitialized]
memcpy(ptr, image, headersz);
^
Instead of using multiple if statements, use a switch statement with
a default entry. And return with error if an unsupported version
is configured in the cfg file.Signed-off-by: Stefan Roese
Acked-By: Wolfgang Denk -
kwbimage uses get_current_dir_name(3) which is a gnu extension and not
available on darwin host. Fix this by converting to portable getcwd(3)
function.This patch fixes the following error:
---88---Signed-off-by: Andreas Bießmann
Cc: Stefan Roese
Acked-by: Stefan Roese
[agust: fixed getcwd() return warning]
Signed-off-by: Anatolij Gustschin
23 Oct, 2014
1 commit
-
This patch integrates the Barebox version of this kwbimage.c file into
U-Boot. As this version supports the image version 1 type for the
Armada XP / 370 SoCs.It was easier to integrate the existing and known to be working Barebox
source than to update the current U-Boot version to support this
v1 image header format. Now all Marvell MVEBU SoCs are supported:Image type 0: Kirkwood & Dove
Image type 1: Armada 370 & Armada XPPlease note that the current v1 support has this restuction (same as
has Barebox version):Not implemented: support for the register headers and secure headers
in v1 imagesTested on Marvell DB-78460-BP eval board.
Signed-off-by: Stefan Roese
Tested-by: Luka Perkov
13 Dec, 2013
1 commit
-
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 |--------> | | | |
Signed-off-by: Simon Glass
17 Aug, 2013
1 commit
-
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
Acked-by: Simon Glass
24 Jul, 2013
1 commit
-
Signed-off-by: Wolfgang Denk
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini
13 May, 2011
1 commit
-
calc_hdrcsum two times are checked. checksumi of exthdr is not checked.
Signed-off-by: Nobuhiro Iwamatsu
CC: Prafulla Wadaskar
19 Jan, 2011
1 commit
-
Signed-off-by: Loïc Minier
16 Sep, 2009
1 commit
-
Commit 51003b89 attempted to fix a build problem on 64 bit systems,
but just turned it into a build problem on 32 bit systems (silly me).Now do the Right Thing (TM) and use a "%zu" printf format.
Also fix spelling error.
Signed-off-by: Wolfgang Denk
11 Sep, 2009
2 commits
-
Fix this warning when building on 64 bit systems:
tools/kwbimage.c: In function 'kwbimage_checksum32':
tools/kwbimage.c:135: warning: format '%d' expects type 'int',
but argument 4 has type 'long unsigned int'Signed-off-by: Wolfgang Denk
Cc: Prafulla Wadaskar -
This patch adds support for "kwbimage" (Kirkwood Boot Image)
image types to the mkimage code.For details refer to docs/README.kwbimage
This patch is tested with Sheevaplug board
Signed-off-by: Prafulla Wadaskar
Acked-by: Ron LeeSigned-off-by: Prafulla Wadaskar