Message ID | 1323347237-6021-1-git-send-email-marek.vasut@gmail.com |
---|---|
State | Accepted |
Headers | show |
On 08/12/2011 13:27, Marek Vasut wrote: > 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> > --- Hi Marek, > arch/arm/cpu/arm926ejs/mx28/Makefile | 7 +------ > arch/arm/cpu/arm926ejs/mx28/spl_boot.c | 13 ++----------- > arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds | 12 ++++++------ > include/configs/m28evk.h | 2 ++ > 4 files changed, 11 insertions(+), 23 deletions(-) > It seems to me that your patch does much more as what you describe in the commit message. > diff --git a/arch/arm/cpu/arm926ejs/mx28/spl_boot.c b/arch/arm/cpu/arm926ejs/mx28/spl_boot.c > index 3cd4c24..dfb8309 100644 > --- a/arch/arm/cpu/arm926ejs/mx28/spl_boot.c > +++ b/arch/arm/cpu/arm926ejs/mx28/spl_boot.c > @@ -68,17 +68,8 @@ inline void board_init_r(gd_t *id, ulong dest_addr) > ; > } > > -inline int printf(const char *fmt, ...) > -{ > - 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 serial_putc(const char c) {} > +void serial_puts(const char *s) {} Make a note in the commit message about these changes (not related to the subject) > void hang(void) __attribute__ ((noreturn)); > void hang(void) > { > diff --git a/arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds b/arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds > index 893320f..0fccd52 100644 > --- a/arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds > +++ b/arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds > @@ -67,16 +67,16 @@ SECTIONS > *(.dynsym) > } > > - _end = .; > - > - .bss __rel_dyn_start (OVERLAY) : { > + .bss : { > + . = ALIGN(4); > __bss_start = .; > - *(.bss) > - . = ALIGN(4); > + *(.bss*) > + . = ALIGN(4); > __bss_end__ = .; > } > > - /DISCARD/ : { *(.bss*) } > + _end = .; > + > /DISCARD/ : { *(.dynstr*) } > /DISCARD/ : { *(.dynsym*) } > /DISCARD/ : { *(.dynamic*) } However, these change fix another issue. You want to cleanup u-boot-spl.lds, but then there are some other parts I cannot understand. For example, why is __u_boot_cmd_start = needed ? If your goal is to cleanup the linker file, please submit a separate patch removing also the unused sections in SPL. Best regards, Stefano Babic
> On 08/12/2011 13:27, Marek Vasut wrote: > > 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> > > --- > > Hi Marek, > > > arch/arm/cpu/arm926ejs/mx28/Makefile | 7 +------ > > arch/arm/cpu/arm926ejs/mx28/spl_boot.c | 13 ++----------- > > arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds | 12 ++++++------ > > include/configs/m28evk.h | 2 ++ > > 4 files changed, 11 insertions(+), 23 deletions(-) > > It seems to me that your patch does much more as what you describe in > the commit message. Please check V2 > > > diff --git a/arch/arm/cpu/arm926ejs/mx28/spl_boot.c > > b/arch/arm/cpu/arm926ejs/mx28/spl_boot.c index 3cd4c24..dfb8309 100644 > > --- a/arch/arm/cpu/arm926ejs/mx28/spl_boot.c > > +++ b/arch/arm/cpu/arm926ejs/mx28/spl_boot.c > > @@ -68,17 +68,8 @@ inline void board_init_r(gd_t *id, ulong dest_addr) > > > > ; > > > > } > > > > -inline int printf(const char *fmt, ...) > > -{ > > - 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 serial_putc(const char c) {} > > +void serial_puts(const char *s) {} > > Make a note in the commit message about these changes (not related to > the subject) Actually I explained this in V2. > > > void hang(void) __attribute__ ((noreturn)); > > void hang(void) > > { > > > > diff --git a/arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds > > b/arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds index 893320f..0fccd52 > > 100644 > > --- a/arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds > > +++ b/arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds > > @@ -67,16 +67,16 @@ SECTIONS > > > > *(.dynsym) > > > > } > > > > - _end = .; > > - > > - .bss __rel_dyn_start (OVERLAY) : { > > + .bss : { > > + . = ALIGN(4); > > > > __bss_start = .; > > > > - *(.bss) > > - . = ALIGN(4); > > + *(.bss*) > > + . = ALIGN(4); > > > > __bss_end__ = .; > > > > } > > > > - /DISCARD/ : { *(.bss*) } > > + _end = .; > > + > > > > /DISCARD/ : { *(.dynstr*) } > > /DISCARD/ : { *(.dynsym*) } > > /DISCARD/ : { *(.dynamic*) } > > However, these change fix another issue. Not really actually. > You want to cleanup > u-boot-spl.lds, but then there are some other parts I cannot understand. > For example, why is __u_boot_cmd_start = needed ? Well, u-boot-spl.lds will need a separate cleanup patch eventually maybe. > > If your goal is to cleanup the linker file, please submit a separate > patch removing also the unused sections in SPL. Not now, right now my goal is to fix the build issue. Linker file cleanup can wait after .12 release. M
On 09/12/2011 10:48, Marek Vasut wrote: >> On 08/12/2011 13:27, Marek Vasut wrote: >>> 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> >>> --- >> >> Hi Marek, >> >>> arch/arm/cpu/arm926ejs/mx28/Makefile | 7 +------ >>> arch/arm/cpu/arm926ejs/mx28/spl_boot.c | 13 ++----------- >>> arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds | 12 ++++++------ >>> include/configs/m28evk.h | 2 ++ >>> 4 files changed, 11 insertions(+), 23 deletions(-) >> >> It seems to me that your patch does much more as what you describe in >> the commit message. > > Please check V2 Ah, ok, I see it. >>> -inline int printf(const char *fmt, ...) >>> -{ >>> - 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 serial_putc(const char c) {} >>> +void serial_puts(const char *s) {} >> >> Make a note in the commit message about these changes (not related to >> the subject) > > Actually I explained this in V2. Ok, it is enough >>> /DISCARD/ : { *(.dynstr*) } >>> /DISCARD/ : { *(.dynsym*) } >>> /DISCARD/ : { *(.dynamic*) } >> >> However, these change fix another issue. > > Not really actually. > >> You want to cleanup >> u-boot-spl.lds, but then there are some other parts I cannot understand. >> For example, why is __u_boot_cmd_start = needed ? > > Well, u-boot-spl.lds will need a separate cleanup patch eventually maybe. >> >> If your goal is to cleanup the linker file, please submit a separate >> patch removing also the unused sections in SPL. > > Not now, right now my goal is to fix the build issue. Linker file cleanup can > wait after .12 release. Ok, well - I will merge it into u-boot-imx. Stefano
diff --git a/arch/arm/cpu/arm926ejs/mx28/Makefile b/arch/arm/cpu/arm926ejs/mx28/Makefile index 372de8a..a2e3f77 100644 --- a/arch/arm/cpu/arm926ejs/mx28/Makefile +++ b/arch/arm/cpu/arm926ejs/mx28/Makefile @@ -28,7 +28,7 @@ LIB = $(obj)lib$(SOC).o COBJS = clock.o mx28.o iomux.o timer.o 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 SRCS := $(START:.o=.S) $(COBJS:.o=.c) @@ -40,11 +40,6 @@ all: $(obj).depend $(LIB) $(LIB): $(OBJS) $(call cmd_link_o_target, $(OBJS)) -ifdef CONFIG_SPL_BUILD -memsize.c: - ln -sf $(TOPDIR)/common/memsize.c $@ -endif - ######################################################################### # defines $(obj).depend target diff --git a/arch/arm/cpu/arm926ejs/mx28/spl_boot.c b/arch/arm/cpu/arm926ejs/mx28/spl_boot.c index 3cd4c24..dfb8309 100644 --- a/arch/arm/cpu/arm926ejs/mx28/spl_boot.c +++ b/arch/arm/cpu/arm926ejs/mx28/spl_boot.c @@ -68,17 +68,8 @@ inline void board_init_r(gd_t *id, ulong dest_addr) ; } -inline int printf(const char *fmt, ...) -{ - 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 serial_putc(const char c) {} +void serial_puts(const char *s) {} void hang(void) __attribute__ ((noreturn)); void hang(void) { diff --git a/arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds b/arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds index 893320f..0fccd52 100644 --- a/arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds +++ b/arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds @@ -67,16 +67,16 @@ SECTIONS *(.dynsym) } - _end = .; - - .bss __rel_dyn_start (OVERLAY) : { + .bss : { + . = ALIGN(4); __bss_start = .; - *(.bss) - . = ALIGN(4); + *(.bss*) + . = ALIGN(4); __bss_end__ = .; } - /DISCARD/ : { *(.bss*) } + _end = .; + /DISCARD/ : { *(.dynstr*) } /DISCARD/ : { *(.dynsym*) } /DISCARD/ : { *(.dynamic*) } diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h index cdf7636..39c841f 100644 --- a/include/configs/m28evk.h +++ b/include/configs/m28evk.h @@ -50,6 +50,8 @@ #define CONFIG_SPL_NO_CPU_SUPPORT_CODE #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_LIBCOMMON_SUPPORT +#define CONFIG_SPL_LIBGENERIC_SUPPORT /* * U-Boot Commands
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> --- arch/arm/cpu/arm926ejs/mx28/Makefile | 7 +------ arch/arm/cpu/arm926ejs/mx28/spl_boot.c | 13 ++----------- arch/arm/cpu/arm926ejs/mx28/u-boot-spl.lds | 12 ++++++------ include/configs/m28evk.h | 2 ++ 4 files changed, 11 insertions(+), 23 deletions(-)