Wrong barebox_image_size value

Rostislav Lisovy lisovy at gmail.com
Thu Sep 26 16:30:29 EDT 2013


Dear barebox developers and users;
I am compiling barebox for freescale-imx53-smd board. My issue is,
that the image does not contain the correct size record.
The "bootloader size" needed by the flashing tool is initialized in
freescale-mx53-smd/flash_header.c, in structure flash_header,
field .boot_data.size.
Formerly there used to be a hardcoded value 0x40000, nowadays we use
DCD_BAREBOX_SIZE which expands into (barebox_image_size + 4095), where
"barebox_image_size" has real size computed by the linker.
When the value .boot_data.size is filled by hand (as 0x40000), correct
value is stored in the barebox image.
Proof: hexdump -s 0x24 -n 4 barebox-flash-image
0000024 0000 0004

however if .boot_data.size = DCD_BAREBOX_SIZE,
$ hexdump -s 0x24 -n 4 barebox-flash-image
0000024 0fff 0000
where this 0xfff is the "+4095" added to round the value. (I am pretty
sure the offset into the image used by hexdump is correct).

The barebox version I am using most recent git, branch master.
The compiler (maybe here is the point of failure) is
arm-cortex_a8-linux-gnueabi-gcc (crosstool-NG hg+default-86a8d1d467c8)
4.4.6.

I will appreciate any help;
Rostislav Lisovy




More information about the barebox mailing list