[U-Boot] 2016.07 regression: kwboot does not work on Kirkwood

Simon Baatz gmbnomis at gmail.com
Tue Aug 2 23:40:04 CEST 2016


Hi,

I just tried to boot a freshly built u-boot.kwb using UART boot on a
Kirkwood box (IB-NAS6210), but to no avail.  An old backup image does
not boot either.

After scratching my head for quite some time, I found this change in
commit f4db6c976cf ("arm: mvebu: Add runtime detection of UART
(xmodem) boot-mode") to kwboot.c:

@@ -652,6 +654,14 @@ kwboot_img_patch_hdr(void *img, size_t size)
 
        hdr->blockid = IBR_HDR_UART_ID;
 
+       /*
+        * Subtract mkimage header size from destination address
+        * as this header is not expected by the Marvell BootROM.
+        * This way, the execution address is identical to the
+        * one the image is compiled for (TEXT_BASE).
+        */
+       hdr->destaddr = hdr->destaddr - sizeof(struct image_header);
+
        if (image_ver == 0) {
                struct main_hdr_v0 *hdr_v0 = img;


Reverting this change makes kwboot work again for me.

I don't know what the correct fix is. Should we change hdr->destaddr
only for header version 1? (Orion and Kirkwood use header version 0,
right?)
 

- Simon


More information about the U-Boot mailing list