mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 21:21:37 +00:00
M28: Cleanup memsize.o OOT build
The current way memsize.c is built just made a symlink into the directory with SPL and then compiled it like any other file there. This was bad as that broke the out-of-tree build. The new way introduced in this patch uses the standard spl/Makefile methods (CONFIG_SPL_LIBCOMMON_SUPPORT / CONFIG_SPL_LIBGENERIC_SUPPORT) to let files in common/ be built. Because common/Makefile says memsize.c is always built (SPL and non-SPL build), this fixes our issue with memsize.c out-of-tree build. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de> Cc: Stefano Babic <sbabic@denx.de>
This commit is contained in:
parent
c944a3ef82
commit
8ba1604d34
4 changed files with 11 additions and 23 deletions
|
@ -28,7 +28,7 @@ LIB = $(obj)lib$(SOC).o
|
||||||
COBJS = clock.o mx28.o iomux.o timer.o
|
COBJS = clock.o mx28.o iomux.o timer.o
|
||||||
|
|
||||||
ifdef CONFIG_SPL_BUILD
|
ifdef CONFIG_SPL_BUILD
|
||||||
COBJS += memsize.o spl_boot.o spl_mem_init.o spl_power_init.o
|
COBJS += spl_boot.o spl_mem_init.o spl_power_init.o
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SRCS := $(START:.o=.S) $(COBJS:.o=.c)
|
SRCS := $(START:.o=.S) $(COBJS:.o=.c)
|
||||||
|
@ -40,11 +40,6 @@ all: $(obj).depend $(LIB)
|
||||||
$(LIB): $(OBJS)
|
$(LIB): $(OBJS)
|
||||||
$(call cmd_link_o_target, $(OBJS))
|
$(call cmd_link_o_target, $(OBJS))
|
||||||
|
|
||||||
ifdef CONFIG_SPL_BUILD
|
|
||||||
memsize.c:
|
|
||||||
ln -sf $(TOPDIR)/common/memsize.c $@
|
|
||||||
endif
|
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
|
|
||||||
# defines $(obj).depend target
|
# defines $(obj).depend target
|
||||||
|
|
|
@ -68,17 +68,8 @@ inline void board_init_r(gd_t *id, ulong dest_addr)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int printf(const char *fmt, ...)
|
void serial_putc(const char c) {}
|
||||||
{
|
void serial_puts(const char *s) {}
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void __coloured_LED_init(void) {}
|
|
||||||
inline void __red_LED_on(void) {}
|
|
||||||
void coloured_LED_init(void)
|
|
||||||
__attribute__((weak, alias("__coloured_LED_init")));
|
|
||||||
void red_LED_on(void)
|
|
||||||
__attribute__((weak, alias("__red_LED_on")));
|
|
||||||
void hang(void) __attribute__ ((noreturn));
|
void hang(void) __attribute__ ((noreturn));
|
||||||
void hang(void)
|
void hang(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -67,16 +67,16 @@ SECTIONS
|
||||||
*(.dynsym)
|
*(.dynsym)
|
||||||
}
|
}
|
||||||
|
|
||||||
_end = .;
|
.bss : {
|
||||||
|
. = ALIGN(4);
|
||||||
.bss __rel_dyn_start (OVERLAY) : {
|
|
||||||
__bss_start = .;
|
__bss_start = .;
|
||||||
*(.bss)
|
*(.bss*)
|
||||||
. = ALIGN(4);
|
. = ALIGN(4);
|
||||||
__bss_end__ = .;
|
__bss_end__ = .;
|
||||||
}
|
}
|
||||||
|
|
||||||
/DISCARD/ : { *(.bss*) }
|
_end = .;
|
||||||
|
|
||||||
/DISCARD/ : { *(.dynstr*) }
|
/DISCARD/ : { *(.dynstr*) }
|
||||||
/DISCARD/ : { *(.dynsym*) }
|
/DISCARD/ : { *(.dynsym*) }
|
||||||
/DISCARD/ : { *(.dynamic*) }
|
/DISCARD/ : { *(.dynamic*) }
|
||||||
|
|
|
@ -50,6 +50,8 @@
|
||||||
#define CONFIG_SPL_NO_CPU_SUPPORT_CODE
|
#define CONFIG_SPL_NO_CPU_SUPPORT_CODE
|
||||||
#define CONFIG_SPL_START_S_PATH "arch/arm/cpu/arm926ejs/mx28"
|
#define CONFIG_SPL_START_S_PATH "arch/arm/cpu/arm926ejs/mx28"
|
||||||
#define CONFIG_SPL_LDSCRIPT "arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds"
|
#define CONFIG_SPL_LDSCRIPT "arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds"
|
||||||
|
#define CONFIG_SPL_LIBCOMMON_SUPPORT
|
||||||
|
#define CONFIG_SPL_LIBGENERIC_SUPPORT
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* U-Boot Commands
|
* U-Boot Commands
|
||||||
|
|
Loading…
Add table
Reference in a new issue