summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-02-18 08:36:44 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-02-18 08:36:44 +0100
commitd6787a36a64aeaff019bfb61b40f247f04c5ade8 (patch)
tree8f4fd0981b811d925420b5ffb7c8bf12fd730939 /arch/arm
parent0a54a21f182751a0f256119d8b048d8d169ed395 (diff)
parentf246b4079c746f80e29b07252c546d37a359105f (diff)
downloadbarebox-d6787a36a64aeaff019bfb61b40f247f04c5ade8.tar.gz
barebox-d6787a36a64aeaff019bfb61b40f247f04c5ade8.tar.xz
Merge branch 'for-next/misc'
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/Makefile7
-rw-r--r--arch/arm/boards/stm32mp157c-dk2/board.c2
2 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 740b0790e7..29fd8e276c 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -140,6 +140,7 @@ CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
# Add cleanup flags
CPPFLAGS += -fdata-sections -ffunction-sections
LDFLAGS_barebox += --gc-sections
+LDFLAGS_pbl += --gc-sections
# early code often runs at addresses we are not linked at
CPPFLAGS += -fPIE
@@ -150,6 +151,12 @@ else
LDFLAGS_barebox += -static
endif
+ifdef CONFIG_PBL_RELOCATABLE
+LDFLAGS_pbl += -pie
+else
+LDFLAGS_pbl += -static
+endif
+
KBUILD_BINARY := barebox.bin
barebox.s5p: $(KBUILD_BINARY)
diff --git a/arch/arm/boards/stm32mp157c-dk2/board.c b/arch/arm/boards/stm32mp157c-dk2/board.c
index 9cd5b4ee1f..6da99d9353 100644
--- a/arch/arm/boards/stm32mp157c-dk2/board.c
+++ b/arch/arm/boards/stm32mp157c-dk2/board.c
@@ -14,6 +14,8 @@ static int dk2_postcore_init(void)
stm32mp_bbu_mmc_register_handler("sd", "/dev/mmc0.ssbl",
BBU_HANDLER_FLAG_DEFAULT);
+ barebox_set_model("STM32MP157C-DK2");
+
return 0;
}
postcore_initcall(dk2_postcore_init);