Generating kwb image for custom board
cover Generating kwb image for custom board
Hi,
I'm trying to get u-boot 2015.01 up and running on a custom board using an integrated version of Marvell's Armada-XP in a switch ASIC (the Marvell term is MSYS).
One thing I ran into after extracting the DDR initialisation from the Marvell bootloader was that the Bootrom Firmware (Marvell's pre-bootloader) reported the following
BootROM 1.34
Booting from SPI flash
BootROM: Bad header at offset 00000000
BootROM: Bad header at offset 00200000
...
After a bit of debugging I found that this was because the binary.0 for my board had a length of 0x0148ec which doesn't conform to the following requirement in the Marvell functional spec -- "The header length in bytes. The value must be aligned to 4B." While I could pad out my binary.0 it seems safer to update kwbimage.c to conform with the specification.
The original issue still exists in master but I suspect now that master is using a u-boot-spl image for the Armada-XP boards the spl image is implicitly conformant.
Chris Packham (1):
kwbimage: Align v1 binary header to 4B
tools/kwbimage.c | 1 + 1 file changed, 1 insertion(+)
Signature · 1 line
2.2.0.rc0
RFC PATCH 1/1 kwbimage: Align v1 binary header to 4B
According to the Armada-XP documentation the binary header format requires the header length to be aligned to 4B.
---
tools/kwbimage.c | 1 + 1 file changed, 1 insertion(+)
tools/kwbimage.c +1 -0
@@ -498,6 +498,7 @@ static void *image_create_v1(size_t *imagesz, struct image_tool_params *params, binhdrsz =sizeof (struct opt_hdr_v1 ) + (binarye->binary.nargs +1 ) *sizeof (unsigned int ) + s.st_size; + binhdrsz =ALIGN_SUP (binhdrsz,32 ); hdr->headersz_lsb = binhdrsz &0xFFFF ; hdr->headersz_msb = (binhdrsz &0xFFFF0000 ) >>16 ;
Signature · 1 line
2.2.0.rc0
RFC PATCH 1/1 kwbimage: Align v1 binary header to 4B
Hi Chris,
(added Prafulla and Luka to Cc)
Quoted 4 lines · Chris 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 <[email protected]>
Thanks for spotting this:
Thanks,
Stefan
A message that is not in the archive (sent off-list or not yet received): [email protected]
RFC PATCH 1/1 kwbimage: Align v1 binary header to 4B
Quoted 8 lines · Prafulla Wadaskar
Quoted 8 lines
Hi Chris,
(added Prafulla and Luka to Cc)
Quoted 3 lines · Chris Packham
According to the Armada-XP documentation the binary header format requires the header length to be aligned to 4B.
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Chris Packham <[email protected]>Thanks for spotting this:
Acked-by Stefan Roese <[email protected]>
Pushed to u-boot-marvell master branch. Thank you.
Luka