kbuild: use shorten log for linking u-boot

Move sandbox-specific link rule to arch/sandbox/config.mk.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
master
Masahiro Yamada 10 years ago committed by Tom Rini
parent 982a1199c9
commit ad0fed46b9
  1. 33
      Makefile
  2. 4
      arch/sandbox/config.mk

@ -738,7 +738,7 @@ endif
endif endif
endif endif
LDFLAGS_u-boot += -T u-boot.lds $(LDFLAGS_FINAL) LDFLAGS_u-boot += $(LDFLAGS_FINAL)
ifneq ($(CONFIG_SYS_TEXT_BASE),) ifneq ($(CONFIG_SYS_TEXT_BASE),)
LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE) LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE)
endif endif
@ -913,27 +913,22 @@ u-boot.elf: u-boot.bin
--defsym=_start=$(CONFIG_SYS_TEXT_BASE) \ --defsym=_start=$(CONFIG_SYS_TEXT_BASE) \
-Ttext=$(CONFIG_SYS_TEXT_BASE) -Ttext=$(CONFIG_SYS_TEXT_BASE)
ifeq ($(CONFIG_SANDBOX),y) # Rule to link u-boot
GEN_UBOOT = \ # May be overridden by arch/$(ARCH)/config.mk
$(CC) $(SYMS) -T u-boot.lds \ quiet_cmd_u-boot__ ?= LD $@
-Wl,--start-group $(u-boot-main) -Wl,--end-group \ cmd_u-boot__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_u-boot) -o $@ \
$(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map -o u-boot -T u-boot.lds $(u-boot-init) \
else --start-group $(u-boot-main) --end-group \
GEN_UBOOT = \ $(PLATFORM_LIBS) -Map u-boot.map
$(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) \
$(u-boot-init) \
--start-group $(u-boot-main) --end-group $(PLATFORM_LIBS) \
-Map u-boot.map -o u-boot
endif
u-boot: $(u-boot-init) $(u-boot-main) u-boot.lds u-boot: $(u-boot-init) $(u-boot-main) u-boot.lds
$(GEN_UBOOT) $(call if_changed,u-boot__)
ifeq ($(CONFIG_KALLSYMS),y) ifeq ($(CONFIG_KALLSYMS),y)
smap=`$(call SYSTEM_MAP,u-boot) | \ smap=`$(call SYSTEM_MAP,u-boot) | \
awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \ awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \
$(CC) $(c_flags) -DSYSTEM_MAP="\"$${smap}\"" \ $(CC) $(c_flags) -DSYSTEM_MAP="\"$${smap}\"" \
-c $(srctree)/common/system_map.c -o common/system_map.o -c $(srctree)/common/system_map.c -o common/system_map.o
$(GEN_UBOOT) common/system_map.o $(call cmd,u-boot__) common/system_map.o
endif endif
# The actual objects are generated when descending, # The actual objects are generated when descending,

@ -7,3 +7,7 @@ PLATFORM_LIBS += -lrt
# Support generic board on sandbox # Support generic board on sandbox
__HAVE_ARCH_GENERIC_BOARD := y __HAVE_ARCH_GENERIC_BOARD := y
cmd_u-boot__ = $(CC) -o $@ -T u-boot.lds \
-Wl,--start-group $(u-boot-main) -Wl,--end-group \
$(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map

Loading…
Cancel
Save