common/board_f.c: adjust reloc_offs for secure boot
authorLothar Waßmann <LW@KARO-electronics.de>
Tue, 16 Jun 2015 09:05:37 +0000 (11:05 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 26 Jun 2015 06:06:22 +0000 (08:06 +0200)
common/board_f.c

index 7953137..2a10222 100644 (file)
@@ -734,7 +734,11 @@ static int reloc_fdt(void)
 static int setup_reloc(void)
 {
 #ifdef CONFIG_SYS_TEXT_BASE
+#ifndef CONFIG_SECURE_BOOT
        gd->reloc_off = gd->relocaddr - CONFIG_SYS_TEXT_BASE;
+#else
+       gd->reloc_off = gd->relocaddr - (unsigned long)__image_copy_start;
+#endif
 #endif
        memcpy(gd->new_gd, (char *)gd, sizeof(gd_t));