diff mbox

[U-Boot,v3,06/62] sandbox: Support building an SPL image

Message ID 1467655123-29441-7-git-send-email-sjg@chromium.org
State Accepted
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass July 4, 2016, 5:57 p.m. UTC
When building an SPL image, override the link flags so that it uses the
system libraries. This is similar to the way the non-SPL image is built.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v3: None
Changes in v2: None

 arch/sandbox/config.mk | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Simon Glass July 15, 2016, 3:57 a.m. UTC | #1
On 4 July 2016 at 11:57, Simon Glass <sjg@chromium.org> wrote:
> When building an SPL image, override the link flags so that it uses the
> system libraries. This is similar to the way the non-SPL image is built.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v3: None
> Changes in v2: None
>
>  arch/sandbox/config.mk | 5 +++++
>  1 file changed, 5 insertions(+)

Applied to u-boot-dm
diff mbox

Patch

diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk
index 16fd6d5..6d62abb 100644
--- a/arch/sandbox/config.mk
+++ b/arch/sandbox/config.mk
@@ -20,4 +20,9 @@  cmd_u-boot__ = $(CC) -o $@ -Wl,-T u-boot.lds \
 	-Wl,--start-group $(u-boot-main) -Wl,--end-group \
 	$(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map
 
+cmd_u-boot-spl = (cd $(obj) && $(CC) -o $(SPL_BIN) -Wl,-T u-boot-spl.lds \
+	-Wl,--start-group $(patsubst $(obj)/%,%,$(u-boot-spl-main)) \
+	$(patsubst $(obj)/%,%,$(u-boot-spl-platdata)) -Wl,--end-group \
+	$(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot-spl.map -Wl,--gc-sections)
+
 CONFIG_ARCH_DEVICE_TREE := sandbox