From: Lothar Waßmann Date: Thu, 30 Jun 2016 08:44:39 +0000 (+0200) Subject: karo: tx53: various fixes for CONFIG_SECURE_BOOT X-Git-Tag: KARO-TX-2016-07-05~2^2~2 X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=commitdiff_plain;h=6eb9c03b43586d536df11dba254e30d265f93a63 karo: tx53: various fixes for CONFIG_SECURE_BOOT --- diff --git a/board/karo/tx53/config.mk b/board/karo/tx53/config.mk index 09d6709dfe..55eb15e5c4 100644 --- a/board/karo/tx53/config.mk +++ b/board/karo/tx53/config.mk @@ -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 diff --git a/board/karo/tx53/lowlevel_init.S b/board/karo/tx53/lowlevel_init.S index ad43e481ac..5aa31af63d 100644 --- a/board/karo/tx53/lowlevel_init.S +++ b/board/karo/tx53/lowlevel_init.S @@ -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 diff --git a/board/karo/tx53/u-boot.lds b/board/karo/tx53/u-boot.lds index 392a9ef42a..e010d99f53 100644 --- a/board/karo/tx53/u-boot.lds +++ b/board/karo/tx53/u-boot.lds @@ -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*) }