Message ID | 1450626876-9698-1-git-send-email-angelo@sysam.it |
---|---|
State | Changes Requested |
Delegated to: | Simon Glass |
Headers | show |
On 20 December 2015 at 08:54, Angelo Dureghello <angelo@sysam.it> wrote: > To use serial uclass and DM, CONFIG_SYS_MALLOC_F must be used. > So CONFIG_SYS_GENERIC_GLOBAL_DATA has been undefined and > call to board_init_f_mem() is added for all cpu's. > > Signed-off-by: Angelo Dureghello <angelo@sysam.it> > > --- > > Changes in v2: None > > arch/m68k/cpu/mcf5227x/start.S | 8 ++++++++ > arch/m68k/cpu/mcf523x/start.S | 8 ++++++++ > arch/m68k/cpu/mcf52x2/start.S | 8 ++++++++ > arch/m68k/cpu/mcf530x/cpu_init.c | 2 +- > arch/m68k/cpu/mcf530x/start.S | 8 ++++++++ > arch/m68k/cpu/mcf532x/start.S | 8 ++++++++ > arch/m68k/cpu/mcf5445x/start.S | 8 ++++++++ > arch/m68k/cpu/mcf547x_8x/start.S | 8 ++++++++ > arch/m68k/include/asm/config.h | 2 -- > 9 files changed, 57 insertions(+), 3 deletions(-) Reviewed-by: Simon Glass <sjg@chromium.org>
Hi Angelo, On 27 December 2015 at 21:22, Simon Glass <sjg@chromium.org> wrote: > On 20 December 2015 at 08:54, Angelo Dureghello <angelo@sysam.it> wrote: >> To use serial uclass and DM, CONFIG_SYS_MALLOC_F must be used. >> So CONFIG_SYS_GENERIC_GLOBAL_DATA has been undefined and >> call to board_init_f_mem() is added for all cpu's. >> >> Signed-off-by: Angelo Dureghello <angelo@sysam.it> >> >> --- >> >> Changes in v2: None >> >> arch/m68k/cpu/mcf5227x/start.S | 8 ++++++++ >> arch/m68k/cpu/mcf523x/start.S | 8 ++++++++ >> arch/m68k/cpu/mcf52x2/start.S | 8 ++++++++ >> arch/m68k/cpu/mcf530x/cpu_init.c | 2 +- >> arch/m68k/cpu/mcf530x/start.S | 8 ++++++++ >> arch/m68k/cpu/mcf532x/start.S | 8 ++++++++ >> arch/m68k/cpu/mcf5445x/start.S | 8 ++++++++ >> arch/m68k/cpu/mcf547x_8x/start.S | 8 ++++++++ >> arch/m68k/include/asm/config.h | 2 -- >> 9 files changed, 57 insertions(+), 3 deletions(-) > > Reviewed-by: Simon Glass <sjg@chromium.org> Unfortunately this breaks a lot of boards so I cannot apply it: 22: m68k: add malloc memory for early malloc m68k: + M5475FFE M5475GFE M5485AFE M5475BFE M52277EVB M5485FFE M54451EVB M54418TWR_nand_rmii M54418TWR_serial_mii M5475EFE M5485CFE M54451EVB_stmicro M5485BFE M5485HFE M54418TWR_serial_rmii M5475DFE M52277EVB_stmicro M5475AFE M5485GFE M54418TWR_nand_mii eb_cpu5282_internal amcore M53017EVB M54418TWR_nand_rmii_lowfreq M54418TWR M5475CFE M5485EFE M5485DFE eb_cpu5282 +arch/m68k/cpu/mcf547x_8x/start.o: In function `_start': +build/../arch/m68k/cpu/mcf547x_8x/start.S:153: undefined reference to `board_init_f_mem' +build/../arch/m68k/cpu/mcf547x_8x/start.S:153:(.text+0x470): relocation truncated to fit: R_68K_PC16 against undefined symbol `board_init_f_mem' +make[1]: *** [u-boot] Error 1 +make: *** [sub-make] Error 2 +arch/m68k/cpu/mcf5227x/start.o: In function `_start': +build/../arch/m68k/cpu/mcf5227x/start.S:384: undefined reference to `board_init_f_mem' +arch/m68k/cpu/mcf5445x/start.o: In function `_start': +build/../arch/m68k/cpu/mcf5445x/start.S:669: undefined reference to `board_init_f_mem' +build/../arch/m68k/cpu/mcf5445x/start.S:669:(.text+0x41c): relocation truncated to fit: R_68K_PC16 against undefined symbol `board_init_f_mem' +build/../arch/m68k/cpu/mcf5227x/start.S:384:(.text+0x44a): relocation truncated to fit: R_68K_PC16 against undefined symbol `board_init_f_mem' +arch/m68k/cpu/mcf52x2/start.o: In function `_after_flashbar_copy': +build/../arch/m68k/cpu/mcf52x2/start.S:203: undefined reference to `board_init_f_mem' +build/../arch/m68k/cpu/mcf52x2/start.S:203:(.text+0x494): relocation truncated to fit: R_68K_PC16 against undefined symbol `board_init_f_mem' +arch/m68k/cpu/mcf530x/start.o: In function `_start': +build/../arch/m68k/cpu/mcf530x/start.S:142: undefined reference to `board_init_f_mem' +build/../arch/m68k/cpu/mcf530x/start.S:142:(.text+0x45e): relocation truncated to fit: R_68K_PC16 against undefined symbol `board_init_f_mem' +arch/m68k/cpu/mcf532x/start.o: In function `_start': +build/../arch/m68k/cpu/mcf532x/start.S:160: undefined reference to `board_init_f_mem' +arch/m68k/cpu/mcf52x2/start.o: In function `_start': +build/../arch/m68k/cpu/mcf52x2/start.S:203:(.text+0x456): relocation truncated to fit: R_68K_PC16 against undefined symbol `board_init_f_mem' Regards, Simon
Hi Simon, On 15/04/2016 16:14, Simon Glass wrote: > Hi Angelo, > > On 27 December 2015 at 21:22, Simon Glass <sjg@chromium.org> wrote: >> On 20 December 2015 at 08:54, Angelo Dureghello <angelo@sysam.it> wrote: >>> To use serial uclass and DM, CONFIG_SYS_MALLOC_F must be used. >>> So CONFIG_SYS_GENERIC_GLOBAL_DATA has been undefined and >>> call to board_init_f_mem() is added for all cpu's. >>> >>> Signed-off-by: Angelo Dureghello <angelo@sysam.it> >>> >>> --- >>> >>> Changes in v2: None >>> >>> arch/m68k/cpu/mcf5227x/start.S | 8 ++++++++ >>> arch/m68k/cpu/mcf523x/start.S | 8 ++++++++ >>> arch/m68k/cpu/mcf52x2/start.S | 8 ++++++++ >>> arch/m68k/cpu/mcf530x/cpu_init.c | 2 +- >>> arch/m68k/cpu/mcf530x/start.S | 8 ++++++++ >>> arch/m68k/cpu/mcf532x/start.S | 8 ++++++++ >>> arch/m68k/cpu/mcf5445x/start.S | 8 ++++++++ >>> arch/m68k/cpu/mcf547x_8x/start.S | 8 ++++++++ >>> arch/m68k/include/asm/config.h | 2 -- >>> 9 files changed, 57 insertions(+), 3 deletions(-) >> >> Reviewed-by: Simon Glass <sjg@chromium.org> > > Unfortunately this breaks a lot of boards so I cannot apply it: > > 22: m68k: add malloc memory for early malloc > m68k: + M5475FFE M5475GFE M5485AFE M5475BFE M52277EVB > M5485FFE M54451EVB M54418TWR_nand_rmii M54418TWR_serial_mii M5475EFE > M5485CFE M54451EVB_stmicro M5485BFE M5485HFE M54418TWR_serial_rmii > M5475DFE M52277EVB_stmicro M5475AFE M5485GFE M54418TWR_nand_mii > eb_cpu5282_internal amcore M53017EVB M54418TWR_nand_rmii_lowfreq > M54418TWR M5475CFE M5485EFE M5485DFE eb_cpu5282 > +arch/m68k/cpu/mcf547x_8x/start.o: In function `_start': > +build/../arch/m68k/cpu/mcf547x_8x/start.S:153: undefined reference to > `board_init_f_mem' > +build/../arch/m68k/cpu/mcf547x_8x/start.S:153:(.text+0x470): > relocation truncated to fit: R_68K_PC16 against undefined symbol > `board_init_f_mem' > +make[1]: *** [u-boot] Error 1 > +make: *** [sub-make] Error 2 > +arch/m68k/cpu/mcf5227x/start.o: In function `_start': > +build/../arch/m68k/cpu/mcf5227x/start.S:384: undefined reference to > `board_init_f_mem' > +arch/m68k/cpu/mcf5445x/start.o: In function `_start': > +build/../arch/m68k/cpu/mcf5445x/start.S:669: undefined reference to > `board_init_f_mem' > +build/../arch/m68k/cpu/mcf5445x/start.S:669:(.text+0x41c): relocation > truncated to fit: R_68K_PC16 against undefined symbol > `board_init_f_mem' > +build/../arch/m68k/cpu/mcf5227x/start.S:384:(.text+0x44a): relocation > truncated to fit: R_68K_PC16 against undefined symbol > `board_init_f_mem' > +arch/m68k/cpu/mcf52x2/start.o: In function `_after_flashbar_copy': > +build/../arch/m68k/cpu/mcf52x2/start.S:203: undefined reference to > `board_init_f_mem' > +build/../arch/m68k/cpu/mcf52x2/start.S:203:(.text+0x494): relocation > truncated to fit: R_68K_PC16 against undefined symbol > `board_init_f_mem' > +arch/m68k/cpu/mcf530x/start.o: In function `_start': > +build/../arch/m68k/cpu/mcf530x/start.S:142: undefined reference to > `board_init_f_mem' > +build/../arch/m68k/cpu/mcf530x/start.S:142:(.text+0x45e): relocation > truncated to fit: R_68K_PC16 against undefined symbol > `board_init_f_mem' > +arch/m68k/cpu/mcf532x/start.o: In function `_start': > +build/../arch/m68k/cpu/mcf532x/start.S:160: undefined reference to > `board_init_f_mem' > +arch/m68k/cpu/mcf52x2/start.o: In function `_start': > +build/../arch/m68k/cpu/mcf52x2/start.S:203:(.text+0x456): relocation > truncated to fit: R_68K_PC16 against undefined symbol > `board_init_f_mem' > Issue was not there at that submit time, now it seems due to growing of u-boot size. The "truncated to fit" issue is fixed with this patch. https://patchwork.ozlabs.org/patch/609150/ So if you apply the above, and then this current, all should work. Regards, Angelo > Regards, > Simon >
Hi Angelo, On 15 April 2016 at 08:42, Angelo Dureghello <angelo@sysam.it> wrote: > Hi Simon, > > > On 15/04/2016 16:14, Simon Glass wrote: >> >> Hi Angelo, >> >> On 27 December 2015 at 21:22, Simon Glass <sjg@chromium.org> wrote: >>> >>> On 20 December 2015 at 08:54, Angelo Dureghello <angelo@sysam.it> wrote: >>>> >>>> To use serial uclass and DM, CONFIG_SYS_MALLOC_F must be used. >>>> So CONFIG_SYS_GENERIC_GLOBAL_DATA has been undefined and >>>> call to board_init_f_mem() is added for all cpu's. >>>> >>>> Signed-off-by: Angelo Dureghello <angelo@sysam.it> >>>> >>>> --- >>>> >>>> Changes in v2: None >>>> >>>> arch/m68k/cpu/mcf5227x/start.S | 8 ++++++++ >>>> arch/m68k/cpu/mcf523x/start.S | 8 ++++++++ >>>> arch/m68k/cpu/mcf52x2/start.S | 8 ++++++++ >>>> arch/m68k/cpu/mcf530x/cpu_init.c | 2 +- >>>> arch/m68k/cpu/mcf530x/start.S | 8 ++++++++ >>>> arch/m68k/cpu/mcf532x/start.S | 8 ++++++++ >>>> arch/m68k/cpu/mcf5445x/start.S | 8 ++++++++ >>>> arch/m68k/cpu/mcf547x_8x/start.S | 8 ++++++++ >>>> arch/m68k/include/asm/config.h | 2 -- >>>> 9 files changed, 57 insertions(+), 3 deletions(-) >>> >>> >>> Reviewed-by: Simon Glass <sjg@chromium.org> >> >> >> Unfortunately this breaks a lot of boards so I cannot apply it: >> >> 22: m68k: add malloc memory for early malloc >> m68k: + M5475FFE M5475GFE M5485AFE M5475BFE M52277EVB >> M5485FFE M54451EVB M54418TWR_nand_rmii M54418TWR_serial_mii M5475EFE >> M5485CFE M54451EVB_stmicro M5485BFE M5485HFE M54418TWR_serial_rmii >> M5475DFE M52277EVB_stmicro M5475AFE M5485GFE M54418TWR_nand_mii >> eb_cpu5282_internal amcore M53017EVB M54418TWR_nand_rmii_lowfreq >> M54418TWR M5475CFE M5485EFE M5485DFE eb_cpu5282 >> +arch/m68k/cpu/mcf547x_8x/start.o: In function `_start': >> +build/../arch/m68k/cpu/mcf547x_8x/start.S:153: undefined reference to >> `board_init_f_mem' >> +build/../arch/m68k/cpu/mcf547x_8x/start.S:153:(.text+0x470): >> relocation truncated to fit: R_68K_PC16 against undefined symbol >> `board_init_f_mem' >> +make[1]: *** [u-boot] Error 1 >> +make: *** [sub-make] Error 2 >> +arch/m68k/cpu/mcf5227x/start.o: In function `_start': >> +build/../arch/m68k/cpu/mcf5227x/start.S:384: undefined reference to >> `board_init_f_mem' >> +arch/m68k/cpu/mcf5445x/start.o: In function `_start': >> +build/../arch/m68k/cpu/mcf5445x/start.S:669: undefined reference to >> `board_init_f_mem' >> +build/../arch/m68k/cpu/mcf5445x/start.S:669:(.text+0x41c): relocation >> truncated to fit: R_68K_PC16 against undefined symbol >> `board_init_f_mem' >> +build/../arch/m68k/cpu/mcf5227x/start.S:384:(.text+0x44a): relocation >> truncated to fit: R_68K_PC16 against undefined symbol >> `board_init_f_mem' >> +arch/m68k/cpu/mcf52x2/start.o: In function `_after_flashbar_copy': >> +build/../arch/m68k/cpu/mcf52x2/start.S:203: undefined reference to >> `board_init_f_mem' >> +build/../arch/m68k/cpu/mcf52x2/start.S:203:(.text+0x494): relocation >> truncated to fit: R_68K_PC16 against undefined symbol >> `board_init_f_mem' >> +arch/m68k/cpu/mcf530x/start.o: In function `_start': >> +build/../arch/m68k/cpu/mcf530x/start.S:142: undefined reference to >> `board_init_f_mem' >> +build/../arch/m68k/cpu/mcf530x/start.S:142:(.text+0x45e): relocation >> truncated to fit: R_68K_PC16 against undefined symbol >> `board_init_f_mem' >> +arch/m68k/cpu/mcf532x/start.o: In function `_start': >> +build/../arch/m68k/cpu/mcf532x/start.S:160: undefined reference to >> `board_init_f_mem' >> +arch/m68k/cpu/mcf52x2/start.o: In function `_start': >> +build/../arch/m68k/cpu/mcf52x2/start.S:203:(.text+0x456): relocation >> truncated to fit: R_68K_PC16 against undefined symbol >> `board_init_f_mem' >> > > Issue was not there at that submit time, now it seems due to growing of > u-boot size. > > The "truncated to fit" issue is fixed with this patch. > > https://patchwork.ozlabs.org/patch/609150/ > > So if you apply the above, and then this current, all should work. There is mention of a v2 patch there - is it coming? Regards, Simon
Hi Simon, On 15/04/2016 17:23, Simon Glass wrote: > Hi Angelo, > > On 15 April 2016 at 08:42, Angelo Dureghello <angelo@sysam.it> wrote: >> Hi Simon, >> >> >> On 15/04/2016 16:14, Simon Glass wrote: >>> >>> Hi Angelo, >>> >>> On 27 December 2015 at 21:22, Simon Glass <sjg@chromium.org> wrote: >>>> >>>> On 20 December 2015 at 08:54, Angelo Dureghello <angelo@sysam.it> wrote: >>>>> >>>>> To use serial uclass and DM, CONFIG_SYS_MALLOC_F must be used. >>>>> So CONFIG_SYS_GENERIC_GLOBAL_DATA has been undefined and >>>>> call to board_init_f_mem() is added for all cpu's. >>>>> >>>>> Signed-off-by: Angelo Dureghello <angelo@sysam.it> >>>>> >>>>> --- >>>>> >>>>> Changes in v2: None >>>>> >>>>> arch/m68k/cpu/mcf5227x/start.S | 8 ++++++++ >>>>> arch/m68k/cpu/mcf523x/start.S | 8 ++++++++ >>>>> arch/m68k/cpu/mcf52x2/start.S | 8 ++++++++ >>>>> arch/m68k/cpu/mcf530x/cpu_init.c | 2 +- >>>>> arch/m68k/cpu/mcf530x/start.S | 8 ++++++++ >>>>> arch/m68k/cpu/mcf532x/start.S | 8 ++++++++ >>>>> arch/m68k/cpu/mcf5445x/start.S | 8 ++++++++ >>>>> arch/m68k/cpu/mcf547x_8x/start.S | 8 ++++++++ >>>>> arch/m68k/include/asm/config.h | 2 -- >>>>> 9 files changed, 57 insertions(+), 3 deletions(-) >>>> >>>> >>>> Reviewed-by: Simon Glass <sjg@chromium.org> >>> >>> >>> Unfortunately this breaks a lot of boards so I cannot apply it: >>> >>> 22: m68k: add malloc memory for early malloc >>> m68k: + M5475FFE M5475GFE M5485AFE M5475BFE M52277EVB >>> M5485FFE M54451EVB M54418TWR_nand_rmii M54418TWR_serial_mii M5475EFE >>> M5485CFE M54451EVB_stmicro M5485BFE M5485HFE M54418TWR_serial_rmii >>> M5475DFE M52277EVB_stmicro M5475AFE M5485GFE M54418TWR_nand_mii >>> eb_cpu5282_internal amcore M53017EVB M54418TWR_nand_rmii_lowfreq >>> M54418TWR M5475CFE M5485EFE M5485DFE eb_cpu5282 >>> +arch/m68k/cpu/mcf547x_8x/start.o: In function `_start': >>> +build/../arch/m68k/cpu/mcf547x_8x/start.S:153: undefined reference to >>> `board_init_f_mem' >>> +build/../arch/m68k/cpu/mcf547x_8x/start.S:153:(.text+0x470): >>> relocation truncated to fit: R_68K_PC16 against undefined symbol >>> `board_init_f_mem' >>> +make[1]: *** [u-boot] Error 1 >>> +make: *** [sub-make] Error 2 >>> +arch/m68k/cpu/mcf5227x/start.o: In function `_start': >>> +build/../arch/m68k/cpu/mcf5227x/start.S:384: undefined reference to >>> `board_init_f_mem' >>> +arch/m68k/cpu/mcf5445x/start.o: In function `_start': >>> +build/../arch/m68k/cpu/mcf5445x/start.S:669: undefined reference to >>> `board_init_f_mem' >>> +build/../arch/m68k/cpu/mcf5445x/start.S:669:(.text+0x41c): relocation >>> truncated to fit: R_68K_PC16 against undefined symbol >>> `board_init_f_mem' >>> +build/../arch/m68k/cpu/mcf5227x/start.S:384:(.text+0x44a): relocation >>> truncated to fit: R_68K_PC16 against undefined symbol >>> `board_init_f_mem' >>> +arch/m68k/cpu/mcf52x2/start.o: In function `_after_flashbar_copy': >>> +build/../arch/m68k/cpu/mcf52x2/start.S:203: undefined reference to >>> `board_init_f_mem' >>> +build/../arch/m68k/cpu/mcf52x2/start.S:203:(.text+0x494): relocation >>> truncated to fit: R_68K_PC16 against undefined symbol >>> `board_init_f_mem' >>> +arch/m68k/cpu/mcf530x/start.o: In function `_start': >>> +build/../arch/m68k/cpu/mcf530x/start.S:142: undefined reference to >>> `board_init_f_mem' >>> +build/../arch/m68k/cpu/mcf530x/start.S:142:(.text+0x45e): relocation >>> truncated to fit: R_68K_PC16 against undefined symbol >>> `board_init_f_mem' >>> +arch/m68k/cpu/mcf532x/start.o: In function `_start': >>> +build/../arch/m68k/cpu/mcf532x/start.S:160: undefined reference to >>> `board_init_f_mem' >>> +arch/m68k/cpu/mcf52x2/start.o: In function `_start': >>> +build/../arch/m68k/cpu/mcf52x2/start.S:203:(.text+0x456): relocation >>> truncated to fit: R_68K_PC16 against undefined symbol >>> `board_init_f_mem' >>> >> >> Issue was not there at that submit time, now it seems due to growing of >> u-boot size. >> >> The "truncated to fit" issue is fixed with this patch. >> >> https://patchwork.ozlabs.org/patch/609150/ >> >> So if you apply the above, and then this current, all should work. > > There is mention of a v2 patch there - is it coming? > No, v2 was an attempt to fix the issue trough the linker script, but was too complex. So this is the definitive patch. > Regards, > Simon > Regards, Angelo
Hi Angelo, On 15 April 2016 at 10:38, Angelo Dureghello <angelo@sysam.it> wrote: > Hi Simon, > > > On 15/04/2016 17:23, Simon Glass wrote: >> >> Hi Angelo, >> >> On 15 April 2016 at 08:42, Angelo Dureghello <angelo@sysam.it> wrote: >>> >>> Hi Simon, >>> >>> >>> On 15/04/2016 16:14, Simon Glass wrote: >>>> >>>> >>>> Hi Angelo, >>>> >>>> On 27 December 2015 at 21:22, Simon Glass <sjg@chromium.org> wrote: >>>>> >>>>> >>>>> On 20 December 2015 at 08:54, Angelo Dureghello <angelo@sysam.it> >>>>> wrote: >>>>>> >>>>>> >>>>>> To use serial uclass and DM, CONFIG_SYS_MALLOC_F must be used. >>>>>> So CONFIG_SYS_GENERIC_GLOBAL_DATA has been undefined and >>>>>> call to board_init_f_mem() is added for all cpu's. >>>>>> >>>>>> Signed-off-by: Angelo Dureghello <angelo@sysam.it> >>>>>> >>>>>> --- >>>>>> >>>>>> Changes in v2: None >>>>>> >>>>>> arch/m68k/cpu/mcf5227x/start.S | 8 ++++++++ >>>>>> arch/m68k/cpu/mcf523x/start.S | 8 ++++++++ >>>>>> arch/m68k/cpu/mcf52x2/start.S | 8 ++++++++ >>>>>> arch/m68k/cpu/mcf530x/cpu_init.c | 2 +- >>>>>> arch/m68k/cpu/mcf530x/start.S | 8 ++++++++ >>>>>> arch/m68k/cpu/mcf532x/start.S | 8 ++++++++ >>>>>> arch/m68k/cpu/mcf5445x/start.S | 8 ++++++++ >>>>>> arch/m68k/cpu/mcf547x_8x/start.S | 8 ++++++++ >>>>>> arch/m68k/include/asm/config.h | 2 -- >>>>>> 9 files changed, 57 insertions(+), 3 deletions(-) >>>>> >>>>> >>>>> >>>>> Reviewed-by: Simon Glass <sjg@chromium.org> >>>> >>>> >>>> >>>> Unfortunately this breaks a lot of boards so I cannot apply it: >>>> >>>> 22: m68k: add malloc memory for early malloc >>>> m68k: + M5475FFE M5475GFE M5485AFE M5475BFE M52277EVB >>>> M5485FFE M54451EVB M54418TWR_nand_rmii M54418TWR_serial_mii M5475EFE >>>> M5485CFE M54451EVB_stmicro M5485BFE M5485HFE M54418TWR_serial_rmii >>>> M5475DFE M52277EVB_stmicro M5475AFE M5485GFE M54418TWR_nand_mii >>>> eb_cpu5282_internal amcore M53017EVB M54418TWR_nand_rmii_lowfreq >>>> M54418TWR M5475CFE M5485EFE M5485DFE eb_cpu5282 >>>> +arch/m68k/cpu/mcf547x_8x/start.o: In function `_start': >>>> +build/../arch/m68k/cpu/mcf547x_8x/start.S:153: undefined reference to >>>> `board_init_f_mem' >>>> +build/../arch/m68k/cpu/mcf547x_8x/start.S:153:(.text+0x470): >>>> relocation truncated to fit: R_68K_PC16 against undefined symbol >>>> `board_init_f_mem' >>>> +make[1]: *** [u-boot] Error 1 >>>> +make: *** [sub-make] Error 2 >>>> +arch/m68k/cpu/mcf5227x/start.o: In function `_start': >>>> +build/../arch/m68k/cpu/mcf5227x/start.S:384: undefined reference to >>>> `board_init_f_mem' >>>> +arch/m68k/cpu/mcf5445x/start.o: In function `_start': >>>> +build/../arch/m68k/cpu/mcf5445x/start.S:669: undefined reference to >>>> `board_init_f_mem' >>>> +build/../arch/m68k/cpu/mcf5445x/start.S:669:(.text+0x41c): relocation >>>> truncated to fit: R_68K_PC16 against undefined symbol >>>> `board_init_f_mem' >>>> +build/../arch/m68k/cpu/mcf5227x/start.S:384:(.text+0x44a): relocation >>>> truncated to fit: R_68K_PC16 against undefined symbol >>>> `board_init_f_mem' >>>> +arch/m68k/cpu/mcf52x2/start.o: In function `_after_flashbar_copy': >>>> +build/../arch/m68k/cpu/mcf52x2/start.S:203: undefined reference to >>>> `board_init_f_mem' >>>> +build/../arch/m68k/cpu/mcf52x2/start.S:203:(.text+0x494): relocation >>>> truncated to fit: R_68K_PC16 against undefined symbol >>>> `board_init_f_mem' >>>> +arch/m68k/cpu/mcf530x/start.o: In function `_start': >>>> +build/../arch/m68k/cpu/mcf530x/start.S:142: undefined reference to >>>> `board_init_f_mem' >>>> +build/../arch/m68k/cpu/mcf530x/start.S:142:(.text+0x45e): relocation >>>> truncated to fit: R_68K_PC16 against undefined symbol >>>> `board_init_f_mem' >>>> +arch/m68k/cpu/mcf532x/start.o: In function `_start': >>>> +build/../arch/m68k/cpu/mcf532x/start.S:160: undefined reference to >>>> `board_init_f_mem' >>>> +arch/m68k/cpu/mcf52x2/start.o: In function `_start': >>>> +build/../arch/m68k/cpu/mcf52x2/start.S:203:(.text+0x456): relocation >>>> truncated to fit: R_68K_PC16 against undefined symbol >>>> `board_init_f_mem' >>>> >>> >>> Issue was not there at that submit time, now it seems due to growing of >>> u-boot size. >>> >>> The "truncated to fit" issue is fixed with this patch. >>> >>> https://patchwork.ozlabs.org/patch/609150/ >>> >>> So if you apply the above, and then this current, all should work. >> >> >> There is mention of a v2 patch there - is it coming? >> > > No, v2 was an attempt to fix the issue trough the linker script, but was too > complex. > So this is the definitive patch. I'm not really sure what to do here - the patches do not apply cleanly to mainline. Can you please point me to the patches that should be applied, and the order? Or perhaps resend if necessary. I am trying this: http://patchwork.ozlabs.org/bundle/sjg/dm6/ Regards, Simon
Hi Simon, On 22/04/2016 20:33, Simon Glass wrote: > Hi Angelo, > > On 15 April 2016 at 10:38, Angelo Dureghello <angelo@sysam.it> wrote: >> Hi Simon, >> >> >> On 15/04/2016 17:23, Simon Glass wrote: >>> >>> Hi Angelo, >>> >>> On 15 April 2016 at 08:42, Angelo Dureghello <angelo@sysam.it> wrote: >>>> >>>> Hi Simon, >>>> >>>> >>>> On 15/04/2016 16:14, Simon Glass wrote: >>>>> >>>>> >>>>> Hi Angelo, >>>>> >>>>> On 27 December 2015 at 21:22, Simon Glass <sjg@chromium.org> wrote: >>>>>> >>>>>> >>>>>> On 20 December 2015 at 08:54, Angelo Dureghello <angelo@sysam.it> >>>>>> wrote: >>>>>>> >>>>>>> >>>>>>> To use serial uclass and DM, CONFIG_SYS_MALLOC_F must be used. >>>>>>> So CONFIG_SYS_GENERIC_GLOBAL_DATA has been undefined and >>>>>>> call to board_init_f_mem() is added for all cpu's. >>>>>>> >>>>>>> Signed-off-by: Angelo Dureghello <angelo@sysam.it> >>>>>>> >>>>>>> --- >>>>>>> >>>>>>> Changes in v2: None >>>>>>> >>>>>>> arch/m68k/cpu/mcf5227x/start.S | 8 ++++++++ >>>>>>> arch/m68k/cpu/mcf523x/start.S | 8 ++++++++ >>>>>>> arch/m68k/cpu/mcf52x2/start.S | 8 ++++++++ >>>>>>> arch/m68k/cpu/mcf530x/cpu_init.c | 2 +- >>>>>>> arch/m68k/cpu/mcf530x/start.S | 8 ++++++++ >>>>>>> arch/m68k/cpu/mcf532x/start.S | 8 ++++++++ >>>>>>> arch/m68k/cpu/mcf5445x/start.S | 8 ++++++++ >>>>>>> arch/m68k/cpu/mcf547x_8x/start.S | 8 ++++++++ >>>>>>> arch/m68k/include/asm/config.h | 2 -- >>>>>>> 9 files changed, 57 insertions(+), 3 deletions(-) >>>>>> >>>>>> >>>>>> >>>>>> Reviewed-by: Simon Glass <sjg@chromium.org> >>>>> >>>>> >>>>> >>>>> Unfortunately this breaks a lot of boards so I cannot apply it: >>>>> >>>>> 22: m68k: add malloc memory for early malloc >>>>> m68k: + M5475FFE M5475GFE M5485AFE M5475BFE M52277EVB >>>>> M5485FFE M54451EVB M54418TWR_nand_rmii M54418TWR_serial_mii M5475EFE >>>>> M5485CFE M54451EVB_stmicro M5485BFE M5485HFE M54418TWR_serial_rmii >>>>> M5475DFE M52277EVB_stmicro M5475AFE M5485GFE M54418TWR_nand_mii >>>>> eb_cpu5282_internal amcore M53017EVB M54418TWR_nand_rmii_lowfreq >>>>> M54418TWR M5475CFE M5485EFE M5485DFE eb_cpu5282 >>>>> +arch/m68k/cpu/mcf547x_8x/start.o: In function `_start': >>>>> +build/../arch/m68k/cpu/mcf547x_8x/start.S:153: undefined reference to >>>>> `board_init_f_mem' >>>>> +build/../arch/m68k/cpu/mcf547x_8x/start.S:153:(.text+0x470): >>>>> relocation truncated to fit: R_68K_PC16 against undefined symbol >>>>> `board_init_f_mem' >>>>> +make[1]: *** [u-boot] Error 1 >>>>> +make: *** [sub-make] Error 2 >>>>> +arch/m68k/cpu/mcf5227x/start.o: In function `_start': >>>>> +build/../arch/m68k/cpu/mcf5227x/start.S:384: undefined reference to >>>>> `board_init_f_mem' >>>>> +arch/m68k/cpu/mcf5445x/start.o: In function `_start': >>>>> +build/../arch/m68k/cpu/mcf5445x/start.S:669: undefined reference to >>>>> `board_init_f_mem' >>>>> +build/../arch/m68k/cpu/mcf5445x/start.S:669:(.text+0x41c): relocation >>>>> truncated to fit: R_68K_PC16 against undefined symbol >>>>> `board_init_f_mem' >>>>> +build/../arch/m68k/cpu/mcf5227x/start.S:384:(.text+0x44a): relocation >>>>> truncated to fit: R_68K_PC16 against undefined symbol >>>>> `board_init_f_mem' >>>>> +arch/m68k/cpu/mcf52x2/start.o: In function `_after_flashbar_copy': >>>>> +build/../arch/m68k/cpu/mcf52x2/start.S:203: undefined reference to >>>>> `board_init_f_mem' >>>>> +build/../arch/m68k/cpu/mcf52x2/start.S:203:(.text+0x494): relocation >>>>> truncated to fit: R_68K_PC16 against undefined symbol >>>>> `board_init_f_mem' >>>>> +arch/m68k/cpu/mcf530x/start.o: In function `_start': >>>>> +build/../arch/m68k/cpu/mcf530x/start.S:142: undefined reference to >>>>> `board_init_f_mem' >>>>> +build/../arch/m68k/cpu/mcf530x/start.S:142:(.text+0x45e): relocation >>>>> truncated to fit: R_68K_PC16 against undefined symbol >>>>> `board_init_f_mem' >>>>> +arch/m68k/cpu/mcf532x/start.o: In function `_start': >>>>> +build/../arch/m68k/cpu/mcf532x/start.S:160: undefined reference to >>>>> `board_init_f_mem' >>>>> +arch/m68k/cpu/mcf52x2/start.o: In function `_start': >>>>> +build/../arch/m68k/cpu/mcf52x2/start.S:203:(.text+0x456): relocation >>>>> truncated to fit: R_68K_PC16 against undefined symbol >>>>> `board_init_f_mem' >>>>> >>>> >>>> Issue was not there at that submit time, now it seems due to growing of >>>> u-boot size. >>>> >>>> The "truncated to fit" issue is fixed with this patch. >>>> >>>> https://patchwork.ozlabs.org/patch/609150/ >>>> >>>> So if you apply the above, and then this current, all should work. >>> >>> >>> There is mention of a v2 patch there - is it coming? >>> >> >> No, v2 was an attempt to fix the issue trough the linker script, but was too >> complex. >> So this is the definitive patch. > > I'm not really sure what to do here - the patches do not apply cleanly > to mainline. Can you please point me to the patches that should be > applied, and the order? Or perhaps resend if necessary. I am trying > this: > > http://patchwork.ozlabs.org/bundle/sjg/dm6/ 1) http://patchwork.ozlabs.org/patch/609150/ has already been applied to master, just tried buildman and all boards compile. ------------------------------------------------------------------------ 2) http://patchwork.ozlabs.org/patch/559343/ can't apply correctly anymore due to the patch 1 above, i'll resend a new updated version. 3) http://patchwork.ozlabs.org/patch/559344/ It applies as is. But it is the 2/2 of the patch 2 above (559343), so i resend in short a patch v3 including both patches (559343 and 559344). So you don't need to do nothing until i send v.3. Regards, Angelo Dureghello > > Regards, > Simon >
diff --git a/arch/m68k/cpu/mcf5227x/start.S b/arch/m68k/cpu/mcf5227x/start.S index 23024f9..bcb5611 100644 --- a/arch/m68k/cpu/mcf5227x/start.S +++ b/arch/m68k/cpu/mcf5227x/start.S @@ -379,6 +379,14 @@ _start: move.l #__got_start, %a5 /* put relocation table address to a5 */ + /* Allocate and zero GD, update SP */ + move.l %sp,-(%sp) + bsr board_init_f_mem + + /* Update stack- and frame-pointers */ + move.l %d0, %sp + move.l %sp, %fp + bsr cpu_init_f /* run low-level CPU init code (from flash) */ bsr board_init_f /* run low-level board init code (from flash) */ diff --git a/arch/m68k/cpu/mcf523x/start.S b/arch/m68k/cpu/mcf523x/start.S index 8a23e72..14b3025 100644 --- a/arch/m68k/cpu/mcf523x/start.S +++ b/arch/m68k/cpu/mcf523x/start.S @@ -141,6 +141,14 @@ _start: move.l #__got_start, %a5 /* put relocation table address to a5 */ + /* Allocate and zero GD, update SP */ + move.l %sp,-(%sp) + bsr board_init_f_mem + + /* Update stack- and frame-pointers */ + move.l %d0, %sp + move.l %sp, %fp + bsr cpu_init_f /* run low-level CPU init code (from flash) */ bsr board_init_f /* run low-level board init code (from flash) */ diff --git a/arch/m68k/cpu/mcf52x2/start.S b/arch/m68k/cpu/mcf52x2/start.S index 8a59496..abb9291 100644 --- a/arch/m68k/cpu/mcf52x2/start.S +++ b/arch/m68k/cpu/mcf52x2/start.S @@ -198,6 +198,14 @@ _after_flashbar_copy: move.l #__got_start, %a5 /* put relocation table address to a5 */ + /* Allocate and zero GD, update SP */ + move.l %sp,-(%sp) + bsr board_init_f_mem + + /* Update stack- and frame-pointers */ + move.l %d0, %sp + move.l %sp, %fp + bsr cpu_init_f /* run low-level CPU init code (from flash) */ bsr board_init_f /* run low-level board init code (from flash) */ diff --git a/arch/m68k/cpu/mcf530x/cpu_init.c b/arch/m68k/cpu/mcf530x/cpu_init.c index 80dc239..b09eed8 100644 --- a/arch/m68k/cpu/mcf530x/cpu_init.c +++ b/arch/m68k/cpu/mcf530x/cpu_init.c @@ -142,7 +142,7 @@ int cpu_init_r(void) return 0; } -void uart_port_conf(void) +void uart_port_conf(int port) { } diff --git a/arch/m68k/cpu/mcf530x/start.S b/arch/m68k/cpu/mcf530x/start.S index 097958a..d9034e1 100644 --- a/arch/m68k/cpu/mcf530x/start.S +++ b/arch/m68k/cpu/mcf530x/start.S @@ -137,6 +137,14 @@ _start: /* put relocation table address to a5 */ move.l #__got_start, %a5 + /* Allocate and zero GD, update SP */ + move.l %sp,-(%sp) + bsr board_init_f_mem + + /* Update stack- and frame-pointers */ + move.l %d0, %sp + move.l %sp, %fp + /* run low-level CPU init code (from flash) */ bsr cpu_init_f diff --git a/arch/m68k/cpu/mcf532x/start.S b/arch/m68k/cpu/mcf532x/start.S index 3b9ede0..98a5401 100644 --- a/arch/m68k/cpu/mcf532x/start.S +++ b/arch/m68k/cpu/mcf532x/start.S @@ -155,6 +155,14 @@ _start: move.l #__got_start, %a5 /* put relocation table address to a5 */ + /* Allocate and zero GD, update SP */ + move.l %sp,-(%sp) + bsr board_init_f_mem + + /* Update stack- and frame-pointers */ + move.l %d0, %sp + move.l %sp, %fp + bsr cpu_init_f /* run low-level CPU init code (from flash) */ bsr board_init_f /* run low-level board init code (from flash) */ diff --git a/arch/m68k/cpu/mcf5445x/start.S b/arch/m68k/cpu/mcf5445x/start.S index 979eb5a..340ab84 100644 --- a/arch/m68k/cpu/mcf5445x/start.S +++ b/arch/m68k/cpu/mcf5445x/start.S @@ -664,6 +664,14 @@ _start: move.l #__got_start, %a5 /* put relocation table address to a5 */ + /* Allocate and zero GD, update SP */ + move.l %sp,-(%sp) + bsr board_init_f_mem + + /* Update stack- and frame-pointers */ + move.l %d0, %sp + move.l %sp, %fp + bsr cpu_init_f /* run low-level CPU init code (from flash) */ bsr board_init_f /* run low-level board init code (from flash) */ diff --git a/arch/m68k/cpu/mcf547x_8x/start.S b/arch/m68k/cpu/mcf547x_8x/start.S index 75de22d..0468d1a 100644 --- a/arch/m68k/cpu/mcf547x_8x/start.S +++ b/arch/m68k/cpu/mcf547x_8x/start.S @@ -148,6 +148,14 @@ _start: move.l #__got_start, %a5 /* put relocation table address to a5 */ + /* Allocate and zero GD, update SP */ + move.l %sp,-(%sp) + bsr board_init_f_mem + + /* Update stack- and frame-pointers */ + move.l %d0, %sp + move.l %sp, %fp + jbsr cpu_init_f /* run low-level CPU init code (from flash) */ jbsr board_init_f /* run low-level board init code (from flash) */ diff --git a/arch/m68k/include/asm/config.h b/arch/m68k/include/asm/config.h index e1458ac..9c4d3fb 100644 --- a/arch/m68k/include/asm/config.h +++ b/arch/m68k/include/asm/config.h @@ -7,8 +7,6 @@ #ifndef _ASM_CONFIG_H_ #define _ASM_CONFIG_H_ -#define CONFIG_SYS_GENERIC_GLOBAL_DATA - #define CONFIG_NEEDS_MANUAL_RELOC #define CONFIG_LMB
To use serial uclass and DM, CONFIG_SYS_MALLOC_F must be used. So CONFIG_SYS_GENERIC_GLOBAL_DATA has been undefined and call to board_init_f_mem() is added for all cpu's. Signed-off-by: Angelo Dureghello <angelo@sysam.it> --- Changes in v2: None arch/m68k/cpu/mcf5227x/start.S | 8 ++++++++ arch/m68k/cpu/mcf523x/start.S | 8 ++++++++ arch/m68k/cpu/mcf52x2/start.S | 8 ++++++++ arch/m68k/cpu/mcf530x/cpu_init.c | 2 +- arch/m68k/cpu/mcf530x/start.S | 8 ++++++++ arch/m68k/cpu/mcf532x/start.S | 8 ++++++++ arch/m68k/cpu/mcf5445x/start.S | 8 ++++++++ arch/m68k/cpu/mcf547x_8x/start.S | 8 ++++++++ arch/m68k/include/asm/config.h | 2 -- 9 files changed, 57 insertions(+), 3 deletions(-)