]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Merge branch 'tx53-bugfix'
authorLothar Waßmann <LW@KARO-electronics.de>
Mon, 4 Jul 2016 12:49:50 +0000 (14:49 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Mon, 4 Jul 2016 12:49:50 +0000 (14:49 +0200)
board/karo/tx53/config.mk
board/karo/tx53/flash.c
board/karo/tx53/lowlevel_init.S
board/karo/tx53/u-boot.lds
include/configs/tx53.h

index 09d6709dfea90bb405122eed42ad42d4effc4a73..55eb15e5c428b9aede69b2c8467c2f763cdc1ec3 100644 (file)
@@ -2,6 +2,12 @@
 CONFIG_SYS_TEXT_BASE := 0x700ff000
 
 __HAVE_ARCH_GENERIC_BOARD := y
+
 PLATFORM_CPPFLAGS += -Werror
+ifneq ($(CONFIG_SECURE_BOOT),)
+#      promote config variable to linker script
+       PLATFORM_CPPFLAGS += -DCONFIG_SECURE_BOOT
+endif
+
 LOGO_BMP = logos/karo.bmp
 OBJCOPYFLAGS += -j .pad
index c5fe8d7a42f904cb1482e261c56572912b6a3b03..19bb9b6dc783b6d9344d4cefa7823af67339b379 100644 (file)
@@ -211,9 +211,9 @@ static int tx53_prog_uboot(void *addr, int start_block, int skip,
        nand_erase_options_t erase_opts = { 0, };
        size_t actual;
        size_t prg_length = max_len - skip * mtd->erasesize;
-       int prg_start = (start_block + skip) * mtd->erasesize;
+       int prg_start = start_block * mtd->erasesize;
 
-       erase_opts.offset = start_block * mtd->erasesize;
+       erase_opts.offset = (start_block - skip) * mtd->erasesize;
        erase_opts.length = max_len;
        erase_opts.quiet = 1;
 
index ad43e481ac8cf7711cbf3daf5906c704055f7c0f..5aa31af63d64764bbd53d30ed284432a6fe562f6 100644 (file)
@@ -382,7 +382,11 @@ boot_data_ptr:
 self_ptr:
        .word   ivt_header
 app_code_csf:
+#ifdef CONFIG_SECURE_BOOT
        .word   __csf_data
+#else
+       .word   0x0
+#endif
        .word   0x0
 boot_data:
        .long   CONFIG_SYS_TEXT_BASE
index 392a9ef42a5027b08dd0d16e37b01cc716bf1b04..e010d99f533a82b5de24f89badb78080992ae895 100644 (file)
@@ -83,19 +83,18 @@ SECTIONS
                . = ALIGN(4096);
        } = 0x01f0adde
 
-       _image_binary_end = . + (__ivt_end - __uboot_img_start);
-
        .uboot_img_end :
        {
                KEEP(*(.__uboot_img_end))
        }
 
-       . = CONFIG_SYS_TEXT_BASE + 0x70000;
+#ifdef CONFIG_SECURE_BOOT
        .csf_data :
        {
                *(.__csf_data)
                . = . + 0x2000;
        }
+#endif
        __uboot_img_len = . - __uboot_img_start;
 
 /*
@@ -117,7 +116,6 @@ SECTIONS
                KEEP(*(.__bss_end));
        }
 
-       .dynsym _image_binary_end : { *(.dynsym) }
        /DISCARD/ : { *(.debug*) }
        /DISCARD/ : { *(.note*) }
        /DISCARD/ : { *(.comment*) }
index 65a3a4be5b673e41f2488232970610d8f87a4171..07893ff115f4ad0af4ac44175e9722fceaf4ac94 100644 (file)
@@ -25,6 +25,7 @@
 #define CONFIG_BOARD_LATE_INIT
 #define CONFIG_BOARD_EARLY_INIT_F
 #define CONFIG_SYS_GENERIC_BOARD
+#define CONFIG_CMD_GPIO
 
 /* LCD Logo and Splash screen support */
 #ifdef CONFIG_LCD