summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorZakharov Vlad <Vladislav.Zakharov@synopsys.com>2016-05-27 20:51:41 +0300
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2016-06-12 21:40:19 +0200
commit41a077d2b1c94d208c34509e6361d159cab83367 (patch)
treee12f6132e83010fedefe48ba99777bdd7177da20 /boot
parentf075afcbd6445b470b7556574a06ed712232807e (diff)
uboot: Use "mdbtrick" target when building elf for ARC
By default position independent executables (PIE) are generated when building U-Boot elf target. MetaWare debugger doesn't support PIE (position-independent executable). In order to allow MDB load and run U-Boot elf, we need to do a special trick, called "mdbtrick". This special build target is used to fake generated U-Boot elf by: 1. Reset PIE flag in ELF header 2. Strip all debug information from elf Signed-off-by: Zakharov Vlad <vzakhar@synopsys.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'boot')
-rw-r--r--boot/uboot/uboot.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index bc5d952bb..a2274eea7 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -38,6 +38,10 @@ endif
ifeq ($(BR2_TARGET_UBOOT_FORMAT_ELF),y)
UBOOT_BIN = u-boot
+# To make elf usable for debuging on ARC use special target
+ifeq ($(BR2_arc),y)
+UBOOT_MAKE_TARGET = mdbtrick
+endif
else ifeq ($(BR2_TARGET_UBOOT_FORMAT_KWB),y)
UBOOT_BIN = u-boot.kwb
UBOOT_MAKE_TARGET = $(UBOOT_BIN)