On Sun, 9 Jan 2011 23:48:01 +0800 Xiangfu Liu <xian...@openmobilefree.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi Scott > > > > > I don't see any of my comments on v3 addressed or responded to: > > http://lists.denx.de/pipermail/u-boot/2010-December/083601.html > > > On 12/14/2010 08:05 AM, Scott Wood wrote: > >> nand_spl/nand_boot_jz4740.c | 344 > >> +++++++++++++++++++++++++++++ > > > > As I asked last time, is there any reason you can't use the standard > > nand_boot.c? Your non-SPL NAND driver looks like the type that would > > work with it. > > thanks for point out, in next version patches, I will remove the > nand_boot_jz4740.c > > > > >> +LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds > >> +LDFLAGS = -Bstatic -T $(LDSCRIPT) -Ttext $(TEXT_BASE) > >> +AFLAGS += -DCONFIG_NAND_SPL > >> +CFLAGS += -DCONFIG_NAND_SPL -O2 > > > > Are you sure you want -O2 and not -Os? What are the space constraints > > for this SPL? > > > > the nand_spl must less then 8kb. > ~~~ > #The boot program can load two areas of data from NAND flash to internal > SRAM, one is the normal > #area up to 8KB starting from NAND flash address 0, the other is the backup > area up to 8KB starting > #from NAND flash address 0x2000. After reset, the boot program will first > read the normal area data > #from NAND flash using hardware Reed-Solomon ECC. If no ECC error is detected > or ECC error is > #correctable, the boot program then branches to internal SRAM at 4 bytes > offset. If it detects an > #uncorrectable ECC error, it will continue to read the backup area of data > from NAND flash using > #hardware Reed-Solomon ECC. > ~~~ > > I try to add "-Os", then I got some compile error: > ~~~ > mipsel-openwrt-linux-gcc -g -Os -D__KERNEL__ > -DCONFIG_SYS_TEXT_BASE=0x80100000 > -I/home/xiangfu/workspace/PanGu/u-boot.upstream/include -fno-builtin > -ffreestanding -nostdinc -isystem > /home/xiangfu/workspace/PanGu/openwrt-xburst/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/lib/gcc/mipsel-openwrt-linux-uclibc/4.3.3/include > -pipe -DCONFIG_MIPS -D__MIPS__ -G 0 -mabicalls -fpic -msoft-float > -march=4kc -mtune=4kc -mabicalls -mips32 -Wall -Wstrict-prototypes > -fno-stack-protector -DCONFIG_NAND_SPL -Os -c -o jz4740_nand.o jz4740_nand.c > jz4740_nand.c: In function 'board_nand_init': > jz4740_nand.c:298: warning: implicit declaration of function 'usb_boot' > cd > /home/xiangfu/workspace/PanGu/u-boot.upstream/nand_spl/board/xburst/nanonote > && mipsel-openwrt-linux-ld -Bstatic -T > /home/xiangfu/workspace/PanGu/u-boot.upstream/nand_spl/board/xburst/nanonote/u-boot.lds > -Ttext 0x80000000 $UNDEF_SYM start.o usbboot.o nand_boot.o cpu.o jz4740.o > jz_serial.o jz4740_nand.o \ > -Map > /home/xiangfu/workspace/PanGu/u-boot.upstream/nand_spl/u-boot-spl.map \ > -o > /home/xiangfu/workspace/PanGu/u-boot.upstream/nand_spl/u-boot-spl > jz4740.o: In function `sdram_init': > jz4740.c:(.text+0x60): undefined reference to `memcpy' > ~~~ Try -fno-builtin > >> +$(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl.bin > >> + dd bs=1024 count=8 if=/dev/zero of=$(nandobj)junk1 > >> + cat $< $(nandobj)junk1 > $(nandobj)junk2 > >> + dd bs=1024 count=8 if=$(nandobj)junk2 of=$(nandobj)junk3 > >> + cat $(nandobj)junk3 $(nandobj)junk3 > $(nandobj)junk4 > >> + dd bs=1024 count=256 if=/dev/zero of=$(nandobj)junk5 > >> + cat $(nandobj)junk4 $(nandobj)junk5 > $(nandobj)junk6 > >> + dd bs=1024 count=256 if=$(nandobj)junk6 of=$@ > >> + rm -f $(nandobj)junk* > > > > Again, please explain what's going on here. Other boards don't do this. > > > > add comments in "Makefile" in next patches. Is there no way that can be simplified? It looks like a very elaborate and obfuscated means of getting some zero padding between the SPL and the payload. Other boards do this in a much more straightforward manner. -Scott _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot