[U-Boot] [PATCH v2] add nand spl boot for qi_lb60 board
Daniel Schwierzeck
daniel.schwierzeck at googlemail.com
Tue Jan 10 17:24:40 CET 2012
On Tue, Jan 10, 2012 at 4:13 PM, Xiangfu Liu <xiangfu at openmobilefree.net> wrote:
> Hi Scott
>
> thanks for your comments. PATCH v3 have sent out for you to review.
>
>
> On 01/07/2012 06:36 AM, Scott Wood wrote:
>>
>> We are transitioning from nand_spl/ to spl/. Please try to work within
>> the new infrastructure. You may run into problems with size in spl/,
>> due to gc-sections not removing strings on components you don't need --
>> I plan to fix those issues (for NAND), hopefully this merge window, by
>> requiring all files to be explicitly asked for. Feel free to fix them
>> first if you'd like. :-)
>>
>
> I'd like to move the new spl/. I have one question about the new spl/
> I didn't see the new spl/ link to nand_spl/nand_boot.c. so how the new
> spl/ using nand_boot()?
>
> can we add a new define 'CONFIG_SPL_START_S_NAME', since qi_lb60 using
> start_spl.S for SPL, not start.S.
you could create a spl/ directory under arch/mips/cpu/xburst/ and move
your start_spl.S
to arch/mips/cpu/xburst/spl/start.S.
Then define in your board config:
#define CONFIG_SPL
#define CONFIG_SPL_TEXT_BASE YOUR_SPL_TEXT_BASE
#define CONFIG_SPL_START_S_PATH "arch/mips/cpu/xburst/spl"
Add defines CONFIG_SPL_XXX_SUPPORT where XXX is an additional library you
need in your SPL binary. I guees you need at least CONFIG_SPL_NAND_SUPPORT.
Have a look at spl/Makefile or doc/README.SPL for reference.
You should also move your files from nand_spl/board/qi/qi_lb60/ to
board/qi/qi_lb60/ and
rename u-boot.lds to u-boot-spl.lds. The spl Makefile will
automatically use this script.
>
> I think better I make the nand_spl/ working. then move to the new spl/ :)
>
>
>>> +include $(TOPDIR)/config.mk
>>> +
>>> +LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
>>> +LDFLAGS = -Bstatic -T $(LDSCRIPT) -Ttext
>>> $(CONFIG_NAND_SPL_TEXT_BASE)
>>> +AFLAGS += -DCONFIG_NAND_SPL
>>> +CFLAGS += -DCONFIG_NAND_SPL -O2
>>
>>
>> Why -O2 and not the -Os that you should already be inheriting from
>> config.mk?
>
>
> when I remove the -O2. it give me error:
> jz4740.c:(.text.sdram_init+0x14): undefined reference to `memcpy'
> so I keep the -O2 there. please anyone give me some advice on how to fix
> this.
> that will be great.
If you use the SPL framework, memcpy won't be linked if you don't use it
due to gc-sections.
--
Best regards,
Daniel
More information about the U-Boot
mailing list