[U-Boot] [PATCH v3] add nand spl boot for qi_lb60 board

Xiangfu Liu xiangfu at openmobilefree.net
Thu Oct 11 04:14:15 CEST 2012


Hi 

Thanks for feedback. PATVH v4 will coming soon. about 'CONFIG_SPL_FRAMEWORK'
I don't know this when I working on ben nanonote spl. I think I will stick
with this spl for awhile. 

is there a plan remove drivers/mtd/nand/nand_spl_*.c?

Xiangfu


On 10/10/2012 05:27 AM, Daniel Schwierzeck wrote:
> 2012/10/9 Tom Rini <trini at ti.com>:
>> On Tue, Oct 09, 2012 at 04:28:05PM +0800, xiangfu at openmobilefree.net wrote:
>>
>>> From: Xiangfu Liu <xiangfu at openmobilefree.net>
>>>
>>>  * After create u-boot-spl.bin. it needs those 4 commands create final image for jz4740 cpu.
>>>   ~~~~
>>>   dd if=spl/u-boot-spl.bin of=u-boot-nand.bin conv=sync bs=8192 count=1
>>>   dd if=spl/u-boot-spl.bin of=u-boot-nand.bin conv=sync,notrunc oflag=append bs=8192 count=1
>>>   tr '\0' '\377' < /dev/zero | dd of=u-boot-nand.bin conv=sync,notrunc oflag=append bs=16384 count=1
>>>   cat u-boot-nand.bin u-boot.bin > u-boot-nand-final.bin
>>>   ~~~~
>>>   The JZ4740 CPU can load 8KB from two different addresses:
>>>    1. the normal area up to 8KB starting from NAND flash address 0x00000000
>>>    2. the backup area up to 8KB starting from NAND flash address 0x00002000
>>>
>>>
>>>  * Add software usbboot mode
>>>    Downloads user program from the USB port to internal
>>>    SRAM and branches to the internal SRAM to execute the program.
>>>    (JZ4740 CPU have a internal ROM have such kind of code, that make
>>>     JZ4740 can boot from USB)
>>> ---
>>> v3:
>>>   * add simpile string.c to mips/lib
>>>   * some cleanup on jz4740.c
>>>   * move to new spl/ structure
>>>   * support software usbboot mode
>>
>> I'm happy you've moved to the new SPL infrastructure.  A few comments:
>>
>> In general, please check for checkpatch.pl issues, I spotted a few.
>> Also, don't use // comments in asm, everything else in MIPS uses '#' or
>> '/* ... */'.  Please use 'puts' rather than 'serial_puts' directly.
>>
>> [snip]
>>> diff --git a/arch/mips/lib/string.c b/arch/mips/lib/string.c
>>> new file mode 100644
>>> index 0000000..d59f44a
>>> --- /dev/null
>>> +++ b/arch/mips/lib/string.c
>>> @@ -0,0 +1,32 @@
>>
>> Can you try just enabling CONFIG_SPL_LIBGENERIC_SUPPORT ?  You should
>> have the unused functions garbage collected automatically.
>>
>>> diff --git a/drivers/mtd/nand/jz4740_nand.c b/drivers/mtd/nand/jz4740_nand.c
>>> index 3ec34f3..4ab2229 100644
>>> --- a/drivers/mtd/nand/jz4740_nand.c
>>> +++ b/drivers/mtd/nand/jz4740_nand.c
>>> @@ -15,6 +15,9 @@
>>>  #include <asm/io.h>
>>>  #include <asm/jz4740.h>
>>>
>>> +#ifdef CONFIG_SPL_BUILD
>>> +#define printf(arg...) do {} while (0)
>>> +#endif
>>
>> In this case you should just switch to puts.
>>
>> And a non-blocking question, have you looked at the CONFIG_SPL_FRAMEWORK
>> code in common/spl/ now?
>>
> 
> in addition to Tom's comments:
> please split coding style cleanups, code reordering, NAND SPL and USB
> boot into separate patches
> 



More information about the U-Boot mailing list