09 Mar, 2018
1 commit
-
Sometimes imximage throws the following error:
CFGS board/freescale/vf610twr/imximage.cfg.cfgtmp
CFGS board/freescale/vf610twr/imximage.cfg.cfgtmp
MKIMAGE u-boot-dtb.imx
Error: No BOOT_FROM tag in board/freescale/vf610twr/imximage.cfg.cfgtmp
arch/arm/mach-imx/Makefile:100: recipe for target 'u-boot-dtb.imx' failedLater on, when running mkimage for the u-boot.imx it will succeed in
finding the IVT offset.Looks like some race condition happening during parallel build when
processing mkimage for u-boot-dtb.imx and u-boot.imx.A proper fix still needs to be implemented, but as a workaround let's
remove the error when the IVT offset is not found.It is useful to have such message, especially during bring-up phase,
but the build error that it causes is severe, so better avoid the
build error for now.The error checking can be re-implemented later when we have a proper
fix.Reported-by: Breno Lima
Reported-by: Thomas Petazzoni
Signed-off-by: Fabio Estevam
20 Mar, 2017
1 commit
-
Add set bit command support.
Usage: SET_BIT 4 [address] [bitmask]Signed-off-by: Peng Fan
Cc: Stefano Babic
Reviewed-by: Stefano Babic
27 Jan, 2017
1 commit
-
We can use the same header length calculations for both imximage v1 and
v2. This addresses TODO comments about imximage v1 in the current code.With this patch applied, *header_size_ptr in imximage_set_header() will
have the correct value for both imximage v1 and v2. This is necessary
for people wanting to add proprietary data behind the created imximage.Signed-off-by: Martin Kaiser
Cc: sbabic@denx.de
29 Nov, 2016
1 commit
-
These values can be used to sign a U-Boot image for use when
loading an image through the Serial Download Protocol (SDP).Note that the address of 0x910000 is usable with the stock
configuration of imx_usb_loader on i.MX6 and i.MX7 SOCs:https://github.com/boundarydevices/imx_usb_loader/blob/master/mx6_usb_work.conf#L3
Refer to the section on imx_usb_loader in this post for more
details:https://boundarydevices.com/high-assurance-boot-hab-dummies/
Signed-off-by: Eric Nelson
05 Nov, 2016
1 commit
-
Check return value when open the plugin file.
Coverity report:
** CID 153926: Error handling issues (NEGATIVE_RETURNS)
/tools/imximage.c: 542 in copy_plugin_code()ifd = open(plugin_file, O_RDONLY|O_BINARY);
>>> CID 153926: Error handling issues (NEGATIVE_RETURNS)
>>> "ifd" is passed to a parameter that cannot be negative.Signed-off-by: Peng Fan
Cc: Stefano Babic
Cc: Tom Rini
Reported-by: Coverity (CID: 153926)
Reviewed-by: Tom Rini
24 Oct, 2016
1 commit
-
Add plugin support for imximage.
Define CONFIG_USE_IMXIMG_PLUGIN in defconfig to enable using plugin.
Signed-off-by: Peng Fan
Cc: Stefano Babic
Cc: Eric Nelson
Cc: Ye Li
Reviewed-by: Tom Rini
17 May, 2016
1 commit
-
Fix incorrect parametr in CMD_CHECK_BITS_CLR command
Pass CLR parameter to DCD header for CMD_CHECK_BITS_CLRSigned-off-by: Adrian Alonso
07 Oct, 2015
2 commits
-
When CHECK_BITS_SET was added, they forgot to add
a new command table, and instead overwrote the
previous table.Signed-off-by: Troy Kisky
Tested-by: Fabio Estevam -
Signed-off-by: Troy Kisky
02 Sep, 2015
1 commit
-
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 0x04To 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.Signed-off-by: Baruch Siach
Acked-by: Stefano Babic
26 Jul, 2015
1 commit
-
* Extend imximage DCD version 2 to support DCD commands
CMD_WRITE_CLR_BIT 4 [address] [mask bit] means:
while ((*address & ~mask) != 0);
CMD_CHECK_BITS_SET 4 [address] [mask bit] means:
while ((*address & mask) != mask);
CMD_CHECK_BITS_CLR 4 [address] [mask bit] means:
*address = *address & ~mask;
* Add set_dcd_param_v2 helper function to set DCD
command parametersSigned-off-by: Adrian Alonso
Signed-off-by: Peng Fan
10 Feb, 2015
2 commits
-
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
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
03 Nov, 2014
1 commit
-
In system boot chapter of i.MX6 reference manual, the "Image Vector Table"
figure shows the bootdata.start points to the beginning of the destination
memory. It means the bootdata.size should contain the IVT offset part,
but the calculation in imximage tool does not have.We found this issue when booting from QuadSPI NOR on i.MX6SX. The u-boot
runs into abnormal (crash or stop) after booting. After checked the destination
memory where the image is loaded to, there are hundreds of bytes at
the image end are not loaded into memory. Since there is a 4096 bytes
round in the calculation, for the booting devices using smaller IVT offset,
such as SD and SPI booting, they are not easy to reproduce.Signed-off-by: Ye.Li
09 Sep, 2014
1 commit
-
The load region size of EIM-NOR are defined to 0. For this case,
the parameter "imximage_init_loadsize" must be calculated.
The imximage tool implements the calculation in the "imximage_generate"
function, but the following function "imximage_set_header" resets the value
and not calculate. This bug cause some fields of IVT head are not
correct, for example the boot_data and DCD overlay the application area.Signed-off-by: Ye.Li
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
15 Oct, 2013
1 commit
-
Signed-off-by: Wolfgang Denk
27 Sep, 2013
1 commit
-
Convert set_hdr_func(struct imx_header *imxhdr) to set_hdr_func(void)
to get rid of the warningwarning: ‘imxhdr’ is used uninitialized in this function
Signed-off-by: York Sun
Acked-by: Stefano Babic
05 Sep, 2013
1 commit
-
Conflicts:
drivers/serial/serial.cThe conflict above was a trivial case of adding one init
function in each branch, and manually resolved in merge.
31 Aug, 2013
5 commits
-
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
-
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
-
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 -
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
-
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
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
05 May, 2013
1 commit
-
The MX53 ROM loads the data from NAND in multiples of pages and
supports maximum page size of 4k. Thus, align the image and header
to 4k to be safe from ROM bugs.Signed-off-by: Marek Vasut
Cc: Albert ARIBAUD
Cc: Benoît Thébaudeau
Cc: Fabio Estevam
Cc: Scott Wood
Cc: Stefano Babic
Cc: Tom Rini
28 Apr, 2013
1 commit
-
Implement BOOT_OFFSET command for imximage. This command is parallel
to current BOOT_FROM command, but allows more flexibility in configuring
arbitrary image header offset. Also add an imximage.cfg with default
offset values into arm/arch/imx-common/ so the board-specific imximage.cfg
can include this file to avoid magic constants.The syntax of BOOT_OFFSET command is "BOOT_OFFSET ".
Signed-off-by: Marek Vasut
Cc: Albert ARIBAUD
Cc: Benoît Thébaudeau
Cc: Fabio Estevam
Cc: Scott Wood
Cc: Stefano Babic
Cc: Tom Rini
Acked-by: Stefano Babic
Acked-by: Stefan Roese
28 Jan, 2013
1 commit
-
Since this structure is not i.MX5x specific, remove the '5x' to make it more
generic.Signed-off-by: Fabio Estevam
06 Jan, 2013
1 commit
-
In order to mx53 ROM to properly load the U-boot image, its header size should
be multiple of 512 bytes.This issue was observed with gcc 4.6.2/4.7.3, which caused data aborts:
U-Boot 2013.01-rc2-00172-gf8cfcf1-dirty (Dec 26 2012 - 13:13:28)
Board: MX53 LOCO
I2C: ready
DRAM: 1 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
In: serial
Out: serial
Err: serial
CPU: Freescale i.MX53 family rev2.1 at 1000 MHz
Reset cause: WDOG
Net: FEC
Warning: FEC using MAC address from net deviceHit any key to stop autoboot: 0
data abortMAYBE you should read doc/README.arm-unaligned-accesses
pc : [] lr : []
sp : af565e20 ip : af566918 fp : 00000000
r10: 00000003 r9 : affabb5b r8 : af565f58
r7 : 00000000 r6 : 36747fff r5 : af5668e8 r4 : 36747fff
r3 : af5668ec r2 : af5668eb r1 : 00000000 r0 : af5668e8
Flags: NzcV IRQs off FIQs off Mode SVC_32
Resetting CPU ...resetting ...
,and this patch fixes it.
Also, even though the ROUND macro is already defined in common.h,
the reason for redefining it in image.h is explained by Stefano Babic:"I will remark a previous comment - even if including common.h seems a
good idea to avoid duplications, it makes tools like mkimage to depend
on the selected board, because _config must run. Even if this is
not a problem for us u-boot developers, it becomes an issue when these
tools are included in distros (like u-boot-tools in Ubuntu) and cannot
be packaged."Signed-off-by: Troy Kisky
Signed-off-by: Fabio Estevam
20 Oct, 2012
7 commits
-
Signed-off-by: Troy Kisky
-
Call with the value the function will use
instead of going through a pointer.Signed-off-by: Troy Kisky
-
When later we change to variable length
header, we won't know the file size when
set_imx_hdr is called. So this is prep work.Signed-off-by: Troy Kisky
-
sbuf->st_size already includes sizeof(struct imx_header),
so remove extra addition.Signed-off-by: Troy Kisky
-
Both set_imx_hdr_v1 and set_imx_hdr_v2 perform the
same check. Move check to before the set_imx_hdr call.Signed-off-by: Troy Kisky
Acked-by: Stefano Babic -
Signed-off-by: Troy Kisky
Acked-by: Stefano Babic -
Before the len was checked after the entire file
was processed, so it could have already overflowed.Signed-off-by: Troy Kisky
27 Mar, 2012
1 commit
-
The flash header supports different flash offsets for different
boot devices. E.g. parallel NOR or OneNAND use a different offset
than FLASH_OFFSET_STANDARD (== 0x400).The flash offset is correctly read from the configuration in
parse_cfg_cmd(). But is then overwritten wrongly in set_imx_hdr_v1/2().Fix this by removing this overwriting. Use the flash offset
correctly read from the configuration, instead.If there is no flash_offset read from the configuration file, i.e.
the BOOT_FROM tag is missing, exit with an error message.Signed-off-by: Dirk Behme
CC: Jason Liu
CC: Stefano Babic
Tested-by: Stefano Babic
12 Feb, 2012
1 commit
-
Signed-off-by: Dirk Behme
CC: Fabio Estevam
CC: Stefano Babic
CC: Jason Liu
Acked-by: Jason Liu