[U-Boot] [PATCH] Fix fastboot boot address

Fastboot loads an image at CONFIG_FASTBOOT_BUF_ADDR, but currently tells do_bootm() to look for an image at $loadaddr. This breaks if CONFIG_FASTBOOT_BUF_ADDR is different from the current user-set loadaddr.
Instead, tell do_bootm() to pick up the image where it was laoded.
Signed-off-by: Peter Chubb peter.chubb@data61.csiro.au --- drivers/usb/gadget/f_fastboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 2160b1c..6d02248 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -553,7 +553,7 @@ static void do_bootm_on_complete(struct usb_ep *ep, struct usb_request *req)
puts("Booting kernel..\n");
- sprintf(boot_addr_start, "0x%lx", load_addr); + sprintf(boot_addr_start, "0x%lx", CONFIG_FASTBOOT_BUF_ADDR); do_bootm(NULL, 0, 2, bootm_args);
/* This only happens if image is somehow faulty so we start over */

On Thu, Sep 08, 2016 at 08:51:57PM +0000, Peter.Chubb@data61.csiro.au wrote:
Fastboot loads an image at CONFIG_FASTBOOT_BUF_ADDR, but currently tells do_bootm() to look for an image at $loadaddr. This breaks if CONFIG_FASTBOOT_BUF_ADDR is different from the current user-set loadaddr.
Instead, tell do_bootm() to pick up the image where it was laoded.
Signed-off-by: Peter Chubb peter.chubb@data61.csiro.au
Reviewed-by: Tom Rini trini@konsulko.com

On Thu, Sep 8, 2016 at 2:07 PM, Tom Rini trini@konsulko.com wrote:
On Thu, Sep 08, 2016 at 08:51:57PM +0000, Peter.Chubb@data61.csiro.au wrote:
Fastboot loads an image at CONFIG_FASTBOOT_BUF_ADDR, but currently tells do_bootm() to look for an image at $loadaddr. This breaks if CONFIG_FASTBOOT_BUF_ADDR is different from the current user-set loadaddr.
Instead, tell do_bootm() to pick up the image where it was laoded.
Signed-off-by: Peter Chubb peter.chubb@data61.csiro.au
Reviewed-by: Tom Rini trini@konsulko.com
-- Tom
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Acked-by: Steve Rae steve.rae@raedomain.com
Thanks, Steve
participants (3)
-
Peter.Chubb@data61.csiro.au
-
Steve Rae
-
Tom Rini