gadget: fastboot: u-boot.bin works, uImage not working

$ fastboot boot uImage
creating boot image...
creating boot image - 1566720 bytes
        downloading 'boot.img'... OKAY [  1.537s]
                       booting... OKAY [  0.002s]
finished. total time: 1.539s

SMDK2440 # recv data: addr=33000000 size=17e800
booting linux at 0x33000800 ...
   Image Name:   Linux-2.6.29
   Created:      2010-01-31   7:21:28 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1562816 Bytes = 1.5 MiB
   Load Address: 30008000
   Entry Point:  30008000
   Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!

Signed-off-by: Fudong Bai <fudongbai@gmail.com>
gadget: fastboot: code cleanup

replace hex2unsigned with simple_strtoul

running in RAM:
fastboot boot u-boot.bin

flash into nand using the command below:
fastboot erase x-loader
fastboot flash x-loader u-boot.bin

Signed-off-by: Fudong Bai <fudongbai@gmail.com>
mini2440: changed boot partition size

Signed-off-by: Fudong Bai <fudongbai@gmail.com>
gadget: fastboot: cleanup

Signed-off-by: Fudong Bai <fudongbai@gmail.com>
gadget: fastboot: cmd and data using same buffer

cmd and data using same buffer will cause downloaded data were
overwritten by the fastboot command, see below:

SMDK2440 # recv data: addr=33000000 size=17e800
rx_data, req->buf: 33f617c0
usb_rx_data_complete, addr= 33000000 len=17e800
rx_data, req->buf: 33000000
usb_rx_data_complete, addr= 33001000 len=17d800
rx_data, req->buf: 33001000
usb_rx_data_complete, addr= 33002000 len=17c800
rx_data, req->buf: 33002000
usb_rx_data_complete, addr= 33003000 len=17b800
rx_data, req->buf: 33003000
usb_rx_data_complete, addr= 33004000 len=17a800
rx_data, req->buf: 33004000
usb_rx_data_complete, addr= 33005000 len=179800
rx_data, req->buf: 33005000
usb_rx_data_complete, addr= 33006000 len=178800
rx_data, req->buf: 33006000
usb_rx_data_complete, addr= 33007000 len=177800
rx_data, req->buf: 33007000
usb_rx_data_complete, addr= 33008000 len=176800
rx_data, req->buf: 33008000
usb_rx_data_complete, addr= 33009000 len=175800
rx_data, req->buf: 33009000
usb_rx_data_complete, addr= 3300a000 len=174800
rx_data, req->buf: 3300a000
usb_rx_data_complete, addr= 3300b000 len=173800
rx_data, req->buf: 3300b000
usb_rx_data_complete, addr= 3300c000 len=172800
rx_data, req->buf: 3300c000
usb_rx_data_complete, addr= 3300d000 len=171800
rx_data, req->buf: 3300d000
usb_rx_data_complete, addr= 3300e000 len=170800
rx_data, req->buf: 3300e000
usb_rx_data_complete, addr= 3300f000 len=16f800
rx_data, req->buf: 3300f000
usb_rx_data_complete, addr= 33010000 len=16e800
rx_data, req->buf: 33010000
usb_rx_data_complete, addr= 33011000 len=16d800
rx_data, req->buf: 33011000
usb_rx_data_complete, addr= 33012000 len=16c800
rx_data, req->buf: 33012000
usb_rx_data_complete, addr= 33013000 len=16b800
rx_data, req->buf: 33013000
usb_rx_data_complete, addr= 33014000 len=16a800
rx_data, req->buf: 33014000
usb_rx_data_complete, addr= 33015000 len=169800
rx_data, req->buf: 33015000
usb_rx_data_complete, addr= 33016000 len=168800
rx_data, req->buf: 33016000
usb_rx_data_complete, addr= 33017000 len=167800
rx_data, req->buf: 33017000
usb_rx_data_complete, addr= 33018000 len=166800
rx_data, req->buf: 33018000
usb_rx_data_complete, addr= 33019000 len=165800
rx_data, req->buf: 33019000
usb_rx_data_complete, addr= 3301a000 len=164800
rx_data, req->buf: 3301a000
usb_rx_data_complete, addr= 3301b000 len=163800
rx_data, req->buf: 3301b000
usb_rx_data_complete, addr= 3301c000 len=162800
rx_data, req->buf: 3301c000
usb_rx_data_complete, addr= 3301d000 len=161800
rx_data, req->buf: 3301d000
usb_rx_data_complete, addr= 3301e000 len=160800
rx_data, req->buf: 3301e000
usb_rx_data_complete, addr= 3301f000 len=15f800
rx_data, req->buf: 3301f000
usb_rx_data_complete, addr= 33020000 len=15e800
rx_data, req->buf: 33020000
usb_rx_data_complete, addr= 33021000 len=15d800
rx_data, req->buf: 33021000
usb_rx_data_complete, addr= 33022000 len=15c800
rx_data, req->buf: 33022000
usb_rx_data_complete, addr= 33023000 len=15b800
rx_data, req->buf: 33023000
usb_rx_data_complete, addr= 33024000 len=15a800
rx_data, req->buf: 33024000
usb_rx_data_complete, addr= 33025000 len=159800
rx_data, req->buf: 33025000
usb_rx_data_complete, addr= 33026000 len=158800
rx_data, req->buf: 33026000
usb_rx_data_complete, addr= 33027000 len=157800
rx_data, req->buf: 33027000
usb_rx_data_complete, addr= 33028000 len=156800
rx_data, req->buf: 33028000
usb_rx_data_complete, addr= 33029000 len=155800
rx_data, req->buf: 33029000
usb_rx_data_complete, addr= 3302a000 len=154800
rx_data, req->buf: 3302a000
usb_rx_data_complete, addr= 3302b000 len=153800
rx_data, req->buf: 3302b000
usb_rx_data_complete, addr= 3302c000 len=152800
rx_data, req->buf: 3302c000
usb_rx_data_complete, addr= 3302d000 len=151800
rx_data, req->buf: 3302d000
usb_rx_data_complete, addr= 3302e000 len=150800
rx_data, req->buf: 3302e000
usb_rx_data_complete, addr= 3302f000 len=14f800
rx_data, req->buf: 3302f000
usb_rx_data_complete, addr= 33030000 len=14e800
rx_data, req->buf: 33030000
usb_rx_data_complete, addr= 33031000 len=14d800
rx_data, req->buf: 33031000
usb_rx_data_complete, addr= 33032000 len=14c800
rx_data, req->buf: 33032000
usb_rx_data_complete, addr= 33033000 len=14b800
rx_data, req->buf: 33033000
usb_rx_data_complete, addr= 33034000 len=14a800
rx_data, req->buf: 33034000
usb_rx_data_complete, addr= 33035000 len=149800
rx_data, req->buf: 33035000
usb_rx_data_complete, addr= 33036000 len=148800
rx_data, req->buf: 33036000
usb_rx_data_complete, addr= 33037000 len=147800
rx_data, req->buf: 33037000
usb_rx_data_complete, addr= 33038000 len=146800
rx_data, req->buf: 33038000
usb_rx_data_complete, addr= 33039000 len=145800
rx_data, req->buf: 33039000
usb_rx_data_complete, addr= 3303a000 len=144800
rx_data, req->buf: 3303a000
usb_rx_data_complete, addr= 3303b000 len=143800
rx_data, req->buf: 3303b000
usb_rx_data_complete, addr= 3303c000 len=142800
rx_data, req->buf: 3303c000
usb_rx_data_complete, addr= 3303d000 len=141800
rx_data, req->buf: 3303d000
usb_rx_data_complete, addr= 3303e000 len=140800
rx_data, req->buf: 3303e000
usb_rx_data_complete, addr= 3303f000 len=13f800
rx_data, req->buf: 3303f000
usb_rx_data_complete, addr= 33040000 len=13e800
rx_data, req->buf: 33040000
usb_rx_data_complete, addr= 33041000 len=13d800
rx_data, req->buf: 33041000
usb_rx_data_complete, addr= 33042000 len=13c800
rx_data, req->buf: 33042000
usb_rx_data_complete, addr= 33043000 len=13b800
rx_data, req->buf: 33043000
usb_rx_data_complete, addr= 33044000 len=13a800
rx_data, req->buf: 33044000
usb_rx_data_complete, addr= 33045000 len=139800
rx_data, req->buf: 33045000
usb_rx_data_complete, addr= 33046000 len=138800
rx_data, req->buf: 33046000
usb_rx_data_complete, addr= 33047000 len=137800
rx_data, req->buf: 33047000
usb_rx_data_complete, addr= 33048000 len=136800
rx_data, req->buf: 33048000
usb_rx_data_complete, addr= 33049000 len=135800
rx_data, req->buf: 33049000
usb_rx_data_complete, addr= 3304a000 len=134800
rx_data, req->buf: 3304a000
usb_rx_data_complete, addr= 3304b000 len=133800
rx_data, req->buf: 3304b000
usb_rx_data_complete, addr= 3304c000 len=132800
rx_data, req->buf: 3304c000
usb_rx_data_complete, addr= 3304d000 len=131800
rx_data, req->buf: 3304d000
usb_rx_data_complete, addr= 3304e000 len=130800
rx_data, req->buf: 3304e000
usb_rx_data_complete, addr= 3304f000 len=12f800
rx_data, req->buf: 3304f000
usb_rx_data_complete, addr= 33050000 len=12e800
rx_data, req->buf: 33050000
usb_rx_data_complete, addr= 33051000 len=12d800
rx_data, req->buf: 33051000
usb_rx_data_complete, addr= 33052000 len=12c800
rx_data, req->buf: 33052000
usb_rx_data_complete, addr= 33053000 len=12b800
rx_data, req->buf: 33053000
usb_rx_data_complete, addr= 33054000 len=12a800
rx_data, req->buf: 33054000
usb_rx_data_complete, addr= 33055000 len=129800
rx_data, req->buf: 33055000
usb_rx_data_complete, addr= 33056000 len=128800
rx_data, req->buf: 33056000
usb_rx_data_complete, addr= 33057000 len=127800
rx_data, req->buf: 33057000
usb_rx_data_complete, addr= 33058000 len=126800
rx_data, req->buf: 33058000
usb_rx_data_complete, addr= 33059000 len=125800
rx_data, req->buf: 33059000
usb_rx_data_complete, addr= 3305a000 len=124800
rx_data, req->buf: 3305a000
usb_rx_data_complete, addr= 3305b000 len=123800
rx_data, req->buf: 3305b000
usb_rx_data_complete, addr= 3305c000 len=122800
rx_data, req->buf: 3305c000
usb_rx_data_complete, addr= 3305d000 len=121800
rx_data, req->buf: 3305d000
usb_rx_data_complete, addr= 3305e000 len=120800
rx_data, req->buf: 3305e000
usb_rx_data_complete, addr= 3305f000 len=11f800
rx_data, req->buf: 3305f000
usb_rx_data_complete, addr= 33060000 len=11e800
rx_data, req->buf: 33060000
usb_rx_data_complete, addr= 33061000 len=11d800
rx_data, req->buf: 33061000
usb_rx_data_complete, addr= 33062000 len=11c800
rx_data, req->buf: 33062000
usb_rx_data_complete, addr= 33063000 len=11b800
rx_data, req->buf: 33063000
usb_rx_data_complete, addr= 33064000 len=11a800
rx_data, req->buf: 33064000
usb_rx_data_complete, addr= 33065000 len=119800
rx_data, req->buf: 33065000
usb_rx_data_complete, addr= 33066000 len=118800
rx_data, req->buf: 33066000
usb_rx_data_complete, addr= 33067000 len=117800
rx_data, req->buf: 33067000
usb_rx_data_complete, addr= 33068000 len=116800
rx_data, req->buf: 33068000
usb_rx_data_complete, addr= 33069000 len=115800
rx_data, req->buf: 33069000
usb_rx_data_complete, addr= 3306a000 len=114800
rx_data, req->buf: 3306a000
usb_rx_data_complete, addr= 3306b000 len=113800
rx_data, req->buf: 3306b000
usb_rx_data_complete, addr= 3306c000 len=112800
rx_data, req->buf: 3306c000
usb_rx_data_complete, addr= 3306d000 len=111800
rx_data, req->buf: 3306d000
usb_rx_data_complete, addr= 3306e000 len=110800
rx_data, req->buf: 3306e000
usb_rx_data_complete, addr= 3306f000 len=10f800
rx_data, req->buf: 3306f000
usb_rx_data_complete, addr= 33070000 len=10e800
rx_data, req->buf: 33070000
usb_rx_data_complete, addr= 33071000 len=10d800
rx_data, req->buf: 33071000
usb_rx_data_complete, addr= 33072000 len=10c800
rx_data, req->buf: 33072000
usb_rx_data_complete, addr= 33073000 len=10b800
rx_data, req->buf: 33073000
usb_rx_data_complete, addr= 33074000 len=10a800
rx_data, req->buf: 33074000
usb_rx_data_complete, addr= 33075000 len=109800
rx_data, req->buf: 33075000
usb_rx_data_complete, addr= 33076000 len=108800
rx_data, req->buf: 33076000
usb_rx_data_complete, addr= 33077000 len=107800
rx_data, req->buf: 33077000
usb_rx_data_complete, addr= 33078000 len=106800
rx_data, req->buf: 33078000
usb_rx_data_complete, addr= 33079000 len=105800
rx_data, req->buf: 33079000
usb_rx_data_complete, addr= 3307a000 len=104800
rx_data, req->buf: 3307a000
usb_rx_data_complete, addr= 3307b000 len=103800
rx_data, req->buf: 3307b000
usb_rx_data_complete, addr= 3307c000 len=102800
rx_data, req->buf: 3307c000
usb_rx_data_complete, addr= 3307d000 len=101800
rx_data, req->buf: 3307d000
usb_rx_data_complete, addr= 3307e000 len=100800
rx_data, req->buf: 3307e000
usb_rx_data_complete, addr= 3307f000 len=ff800
rx_data, req->buf: 3307f000
usb_rx_data_complete, addr= 33080000 len=fe800
rx_data, req->buf: 33080000
usb_rx_data_complete, addr= 33081000 len=fd800
rx_data, req->buf: 33081000
usb_rx_data_complete, addr= 33082000 len=fc800
rx_data, req->buf: 33082000
usb_rx_data_complete, addr= 33083000 len=fb800
rx_data, req->buf: 33083000
usb_rx_data_complete, addr= 33084000 len=fa800
rx_data, req->buf: 33084000
usb_rx_data_complete, addr= 33085000 len=f9800
rx_data, req->buf: 33085000
usb_rx_data_complete, addr= 33086000 len=f8800
rx_data, req->buf: 33086000
usb_rx_data_complete, addr= 33087000 len=f7800
rx_data, req->buf: 33087000
usb_rx_data_complete, addr= 33088000 len=f6800
rx_data, req->buf: 33088000
usb_rx_data_complete, addr= 33089000 len=f5800
rx_data, req->buf: 33089000
usb_rx_data_complete, addr= 3308a000 len=f4800
rx_data, req->buf: 3308a000
usb_rx_data_complete, addr= 3308b000 len=f3800
rx_data, req->buf: 3308b000
usb_rx_data_complete, addr= 3308c000 len=f2800
rx_data, req->buf: 3308c000
usb_rx_data_complete, addr= 3308d000 len=f1800
rx_data, req->buf: 3308d000
usb_rx_data_complete, addr= 3308e000 len=f0800
rx_data, req->buf: 3308e000
usb_rx_data_complete, addr= 3308f000 len=ef800
rx_data, req->buf: 3308f000
usb_rx_data_complete, addr= 33090000 len=ee800
rx_data, req->buf: 33090000
usb_rx_data_complete, addr= 33091000 len=ed800
rx_data, req->buf: 33091000
usb_rx_data_complete, addr= 33092000 len=ec800
rx_data, req->buf: 33092000
usb_rx_data_complete, addr= 33093000 len=eb800
rx_data, req->buf: 33093000
usb_rx_data_complete, addr= 33094000 len=ea800
rx_data, req->buf: 33094000
usb_rx_data_complete, addr= 33095000 len=e9800
rx_data, req->buf: 33095000
usb_rx_data_complete, addr= 33096000 len=e8800
rx_data, req->buf: 33096000
usb_rx_data_complete, addr= 33097000 len=e7800
rx_data, req->buf: 33097000
usb_rx_data_complete, addr= 33098000 len=e6800
rx_data, req->buf: 33098000
usb_rx_data_complete, addr= 33099000 len=e5800
rx_data, req->buf: 33099000
usb_rx_data_complete, addr= 3309a000 len=e4800
rx_data, req->buf: 3309a000
usb_rx_data_complete, addr= 3309b000 len=e3800
rx_data, req->buf: 3309b000
usb_rx_data_complete, addr= 3309c000 len=e2800
rx_data, req->buf: 3309c000
usb_rx_data_complete, addr= 3309d000 len=e1800
rx_data, req->buf: 3309d000
usb_rx_data_complete, addr= 3309e000 len=e0800
rx_data, req->buf: 3309e000
usb_rx_data_complete, addr= 3309f000 len=df800
rx_data, req->buf: 3309f000
usb_rx_data_complete, addr= 330a0000 len=de800
rx_data, req->buf: 330a0000
usb_rx_data_complete, addr= 330a1000 len=dd800
rx_data, req->buf: 330a1000
usb_rx_data_complete, addr= 330a2000 len=dc800
rx_data, req->buf: 330a2000
usb_rx_data_complete, addr= 330a3000 len=db800
rx_data, req->buf: 330a3000
usb_rx_data_complete, addr= 330a4000 len=da800
rx_data, req->buf: 330a4000
usb_rx_data_complete, addr= 330a5000 len=d9800
rx_data, req->buf: 330a5000
usb_rx_data_complete, addr= 330a6000 len=d8800
rx_data, req->buf: 330a6000
usb_rx_data_complete, addr= 330a7000 len=d7800
rx_data, req->buf: 330a7000
usb_rx_data_complete, addr= 330a8000 len=d6800
rx_data, req->buf: 330a8000
usb_rx_data_complete, addr= 330a9000 len=d5800
rx_data, req->buf: 330a9000
usb_rx_data_complete, addr= 330aa000 len=d4800
rx_data, req->buf: 330aa000
usb_rx_data_complete, addr= 330ab000 len=d3800
rx_data, req->buf: 330ab000
usb_rx_data_complete, addr= 330ac000 len=d2800
rx_data, req->buf: 330ac000
usb_rx_data_complete, addr= 330ad000 len=d1800
rx_data, req->buf: 330ad000
usb_rx_data_complete, addr= 330ae000 len=d0800
rx_data, req->buf: 330ae000
usb_rx_data_complete, addr= 330af000 len=cf800
rx_data, req->buf: 330af000
usb_rx_data_complete, addr= 330b0000 len=ce800
rx_data, req->buf: 330b0000
usb_rx_data_complete, addr= 330b1000 len=cd800
rx_data, req->buf: 330b1000
usb_rx_data_complete, addr= 330b2000 len=cc800
rx_data, req->buf: 330b2000
usb_rx_data_complete, addr= 330b3000 len=cb800
rx_data, req->buf: 330b3000
usb_rx_data_complete, addr= 330b4000 len=ca800
rx_data, req->buf: 330b4000
usb_rx_data_complete, addr= 330b5000 len=c9800
rx_data, req->buf: 330b5000
usb_rx_data_complete, addr= 330b6000 len=c8800
rx_data, req->buf: 330b6000
usb_rx_data_complete, addr= 330b7000 len=c7800
rx_data, req->buf: 330b7000
usb_rx_data_complete, addr= 330b8000 len=c6800
rx_data, req->buf: 330b8000
usb_rx_data_complete, addr= 330b9000 len=c5800
rx_data, req->buf: 330b9000
usb_rx_data_complete, addr= 330ba000 len=c4800
rx_data, req->buf: 330ba000
usb_rx_data_complete, addr= 330bb000 len=c3800
rx_data, req->buf: 330bb000
usb_rx_data_complete, addr= 330bc000 len=c2800
rx_data, req->buf: 330bc000
usb_rx_data_complete, addr= 330bd000 len=c1800
rx_data, req->buf: 330bd000
usb_rx_data_complete, addr= 330be000 len=c0800
rx_data, req->buf: 330be000
usb_rx_data_complete, addr= 330bf000 len=bf800
rx_data, req->buf: 330bf000
usb_rx_data_complete, addr= 330c0000 len=be800
rx_data, req->buf: 330c0000
usb_rx_data_complete, addr= 330c1000 len=bd800
rx_data, req->buf: 330c1000
usb_rx_data_complete, addr= 330c2000 len=bc800
rx_data, req->buf: 330c2000
usb_rx_data_complete, addr= 330c3000 len=bb800
rx_data, req->buf: 330c3000
usb_rx_data_complete, addr= 330c4000 len=ba800
rx_data, req->buf: 330c4000
usb_rx_data_complete, addr= 330c5000 len=b9800
rx_data, req->buf: 330c5000
usb_rx_data_complete, addr= 330c6000 len=b8800
rx_data, req->buf: 330c6000
usb_rx_data_complete, addr= 330c7000 len=b7800
rx_data, req->buf: 330c7000
usb_rx_data_complete, addr= 330c8000 len=b6800
rx_data, req->buf: 330c8000
usb_rx_data_complete, addr= 330c9000 len=b5800
rx_data, req->buf: 330c9000
usb_rx_data_complete, addr= 330ca000 len=b4800
rx_data, req->buf: 330ca000
usb_rx_data_complete, addr= 330cb000 len=b3800
rx_data, req->buf: 330cb000
usb_rx_data_complete, addr= 330cc000 len=b2800
rx_data, req->buf: 330cc000
usb_rx_data_complete, addr= 330cd000 len=b1800
rx_data, req->buf: 330cd000
usb_rx_data_complete, addr= 330ce000 len=b0800
rx_data, req->buf: 330ce000
usb_rx_data_complete, addr= 330cf000 len=af800
rx_data, req->buf: 330cf000
usb_rx_data_complete, addr= 330d0000 len=ae800
rx_data, req->buf: 330d0000
usb_rx_data_complete, addr= 330d1000 len=ad800
rx_data, req->buf: 330d1000
usb_rx_data_complete, addr= 330d2000 len=ac800
rx_data, req->buf: 330d2000
usb_rx_data_complete, addr= 330d3000 len=ab800
rx_data, req->buf: 330d3000
usb_rx_data_complete, addr= 330d4000 len=aa800
rx_data, req->buf: 330d4000
usb_rx_data_complete, addr= 330d5000 len=a9800
rx_data, req->buf: 330d5000
usb_rx_data_complete, addr= 330d6000 len=a8800
rx_data, req->buf: 330d6000
usb_rx_data_complete, addr= 330d7000 len=a7800
rx_data, req->buf: 330d7000
usb_rx_data_complete, addr= 330d8000 len=a6800
rx_data, req->buf: 330d8000
usb_rx_data_complete, addr= 330d9000 len=a5800
rx_data, req->buf: 330d9000
usb_rx_data_complete, addr= 330da000 len=a4800
rx_data, req->buf: 330da000
usb_rx_data_complete, addr= 330db000 len=a3800
rx_data, req->buf: 330db000
usb_rx_data_complete, addr= 330dc000 len=a2800
rx_data, req->buf: 330dc000
usb_rx_data_complete, addr= 330dd000 len=a1800
rx_data, req->buf: 330dd000
usb_rx_data_complete, addr= 330de000 len=a0800
rx_data, req->buf: 330de000
usb_rx_data_complete, addr= 330df000 len=9f800
rx_data, req->buf: 330df000
usb_rx_data_complete, addr= 330e0000 len=9e800
rx_data, req->buf: 330e0000
usb_rx_data_complete, addr= 330e1000 len=9d800
rx_data, req->buf: 330e1000
usb_rx_data_complete, addr= 330e2000 len=9c800
rx_data, req->buf: 330e2000
usb_rx_data_complete, addr= 330e3000 len=9b800
rx_data, req->buf: 330e3000
usb_rx_data_complete, addr= 330e4000 len=9a800
rx_data, req->buf: 330e4000
usb_rx_data_complete, addr= 330e5000 len=99800
rx_data, req->buf: 330e5000
usb_rx_data_complete, addr= 330e6000 len=98800
rx_data, req->buf: 330e6000
usb_rx_data_complete, addr= 330e7000 len=97800
rx_data, req->buf: 330e7000
usb_rx_data_complete, addr= 330e8000 len=96800
rx_data, req->buf: 330e8000
usb_rx_data_complete, addr= 330e9000 len=95800
rx_data, req->buf: 330e9000
usb_rx_data_complete, addr= 330ea000 len=94800
rx_data, req->buf: 330ea000
usb_rx_data_complete, addr= 330eb000 len=93800
rx_data, req->buf: 330eb000
usb_rx_data_complete, addr= 330ec000 len=92800
rx_data, req->buf: 330ec000
usb_rx_data_complete, addr= 330ed000 len=91800
rx_data, req->buf: 330ed000
usb_rx_data_complete, addr= 330ee000 len=90800
rx_data, req->buf: 330ee000
usb_rx_data_complete, addr= 330ef000 len=8f800
rx_data, req->buf: 330ef000
usb_rx_data_complete, addr= 330f0000 len=8e800
rx_data, req->buf: 330f0000
usb_rx_data_complete, addr= 330f1000 len=8d800
rx_data, req->buf: 330f1000
usb_rx_data_complete, addr= 330f2000 len=8c800
rx_data, req->buf: 330f2000
usb_rx_data_complete, addr= 330f3000 len=8b800
rx_data, req->buf: 330f3000
usb_rx_data_complete, addr= 330f4000 len=8a800
rx_data, req->buf: 330f4000
usb_rx_data_complete, addr= 330f5000 len=89800
rx_data, req->buf: 330f5000
usb_rx_data_complete, addr= 330f6000 len=88800
rx_data, req->buf: 330f6000
usb_rx_data_complete, addr= 330f7000 len=87800
rx_data, req->buf: 330f7000
usb_rx_data_complete, addr= 330f8000 len=86800
rx_data, req->buf: 330f8000
usb_rx_data_complete, addr= 330f9000 len=85800
rx_data, req->buf: 330f9000
usb_rx_data_complete, addr= 330fa000 len=84800
rx_data, req->buf: 330fa000
usb_rx_data_complete, addr= 330fb000 len=83800
rx_data, req->buf: 330fb000
usb_rx_data_complete, addr= 330fc000 len=82800
rx_data, req->buf: 330fc000
usb_rx_data_complete, addr= 330fd000 len=81800
rx_data, req->buf: 330fd000
usb_rx_data_complete, addr= 330fe000 len=80800
rx_data, req->buf: 330fe000
usb_rx_data_complete, addr= 330ff000 len=7f800
rx_data, req->buf: 330ff000
usb_rx_data_complete, addr= 33100000 len=7e800
rx_data, req->buf: 33100000
usb_rx_data_complete, addr= 33101000 len=7d800
rx_data, req->buf: 33101000
usb_rx_data_complete, addr= 33102000 len=7c800
rx_data, req->buf: 33102000
usb_rx_data_complete, addr= 33103000 len=7b800
rx_data, req->buf: 33103000
usb_rx_data_complete, addr= 33104000 len=7a800
rx_data, req->buf: 33104000
usb_rx_data_complete, addr= 33105000 len=79800
rx_data, req->buf: 33105000
usb_rx_data_complete, addr= 33106000 len=78800
rx_data, req->buf: 33106000
usb_rx_data_complete, addr= 33107000 len=77800
rx_data, req->buf: 33107000
usb_rx_data_complete, addr= 33108000 len=76800
rx_data, req->buf: 33108000
usb_rx_data_complete, addr= 33109000 len=75800
rx_data, req->buf: 33109000
usb_rx_data_complete, addr= 3310a000 len=74800
rx_data, req->buf: 3310a000
usb_rx_data_complete, addr= 3310b000 len=73800
rx_data, req->buf: 3310b000
usb_rx_data_complete, addr= 3310c000 len=72800
rx_data, req->buf: 3310c000
usb_rx_data_complete, addr= 3310d000 len=71800
rx_data, req->buf: 3310d000
usb_rx_data_complete, addr= 3310e000 len=70800
rx_data, req->buf: 3310e000
usb_rx_data_complete, addr= 3310f000 len=6f800
rx_data, req->buf: 3310f000
usb_rx_data_complete, addr= 33110000 len=6e800
rx_data, req->buf: 33110000
usb_rx_data_complete, addr= 33111000 len=6d800
rx_data, req->buf: 33111000
usb_rx_data_complete, addr= 33112000 len=6c800
rx_data, req->buf: 33112000
usb_rx_data_complete, addr= 33113000 len=6b800
rx_data, req->buf: 33113000
usb_rx_data_complete, addr= 33114000 len=6a800
rx_data, req->buf: 33114000
usb_rx_data_complete, addr= 33115000 len=69800
rx_data, req->buf: 33115000
usb_rx_data_complete, addr= 33116000 len=68800
rx_data, req->buf: 33116000
usb_rx_data_complete, addr= 33117000 len=67800
rx_data, req->buf: 33117000
usb_rx_data_complete, addr= 33118000 len=66800
rx_data, req->buf: 33118000
usb_rx_data_complete, addr= 33119000 len=65800
rx_data, req->buf: 33119000
usb_rx_data_complete, addr= 3311a000 len=64800
rx_data, req->buf: 3311a000
usb_rx_data_complete, addr= 3311b000 len=63800
rx_data, req->buf: 3311b000
usb_rx_data_complete, addr= 3311c000 len=62800
rx_data, req->buf: 3311c000
usb_rx_data_complete, addr= 3311d000 len=61800
rx_data, req->buf: 3311d000
usb_rx_data_complete, addr= 3311e000 len=60800
rx_data, req->buf: 3311e000
usb_rx_data_complete, addr= 3311f000 len=5f800
rx_data, req->buf: 3311f000
usb_rx_data_complete, addr= 33120000 len=5e800
rx_data, req->buf: 33120000
usb_rx_data_complete, addr= 33121000 len=5d800
rx_data, req->buf: 33121000
usb_rx_data_complete, addr= 33122000 len=5c800
rx_data, req->buf: 33122000
usb_rx_data_complete, addr= 33123000 len=5b800
rx_data, req->buf: 33123000
usb_rx_data_complete, addr= 33124000 len=5a800
rx_data, req->buf: 33124000
usb_rx_data_complete, addr= 33125000 len=59800
rx_data, req->buf: 33125000
usb_rx_data_complete, addr= 33126000 len=58800
rx_data, req->buf: 33126000
usb_rx_data_complete, addr= 33127000 len=57800
rx_data, req->buf: 33127000
usb_rx_data_complete, addr= 33128000 len=56800
rx_data, req->buf: 33128000
usb_rx_data_complete, addr= 33129000 len=55800
rx_data, req->buf: 33129000
usb_rx_data_complete, addr= 3312a000 len=54800
rx_data, req->buf: 3312a000
usb_rx_data_complete, addr= 3312b000 len=53800
rx_data, req->buf: 3312b000
usb_rx_data_complete, addr= 3312c000 len=52800
rx_data, req->buf: 3312c000
usb_rx_data_complete, addr= 3312d000 len=51800
rx_data, req->buf: 3312d000
usb_rx_data_complete, addr= 3312e000 len=50800
rx_data, req->buf: 3312e000
usb_rx_data_complete, addr= 3312f000 len=4f800
rx_data, req->buf: 3312f000
usb_rx_data_complete, addr= 33130000 len=4e800
rx_data, req->buf: 33130000
usb_rx_data_complete, addr= 33131000 len=4d800
rx_data, req->buf: 33131000
usb_rx_data_complete, addr= 33132000 len=4c800
rx_data, req->buf: 33132000
usb_rx_data_complete, addr= 33133000 len=4b800
rx_data, req->buf: 33133000
usb_rx_data_complete, addr= 33134000 len=4a800
rx_data, req->buf: 33134000
usb_rx_data_complete, addr= 33135000 len=49800
rx_data, req->buf: 33135000
usb_rx_data_complete, addr= 33136000 len=48800
rx_data, req->buf: 33136000
usb_rx_data_complete, addr= 33137000 len=47800
rx_data, req->buf: 33137000
usb_rx_data_complete, addr= 33138000 len=46800
rx_data, req->buf: 33138000
usb_rx_data_complete, addr= 33139000 len=45800
rx_data, req->buf: 33139000
usb_rx_data_complete, addr= 3313a000 len=44800
rx_data, req->buf: 3313a000
usb_rx_data_complete, addr= 3313b000 len=43800
rx_data, req->buf: 3313b000
usb_rx_data_complete, addr= 3313c000 len=42800
rx_data, req->buf: 3313c000
usb_rx_data_complete, addr= 3313d000 len=41800
rx_data, req->buf: 3313d000
usb_rx_data_complete, addr= 3313e000 len=40800
rx_data, req->buf: 3313e000
usb_rx_data_complete, addr= 3313f000 len=3f800
rx_data, req->buf: 3313f000
usb_rx_data_complete, addr= 33140000 len=3e800
rx_data, req->buf: 33140000
usb_rx_data_complete, addr= 33141000 len=3d800
rx_data, req->buf: 33141000
usb_rx_data_complete, addr= 33142000 len=3c800
rx_data, req->buf: 33142000
usb_rx_data_complete, addr= 33143000 len=3b800
rx_data, req->buf: 33143000
usb_rx_data_complete, addr= 33144000 len=3a800
rx_data, req->buf: 33144000
usb_rx_data_complete, addr= 33145000 len=39800
rx_data, req->buf: 33145000
usb_rx_data_complete, addr= 33146000 len=38800
rx_data, req->buf: 33146000
usb_rx_data_complete, addr= 33147000 len=37800
rx_data, req->buf: 33147000
usb_rx_data_complete, addr= 33148000 len=36800
rx_data, req->buf: 33148000
usb_rx_data_complete, addr= 33149000 len=35800
rx_data, req->buf: 33149000
usb_rx_data_complete, addr= 3314a000 len=34800
rx_data, req->buf: 3314a000
usb_rx_data_complete, addr= 3314b000 len=33800
rx_data, req->buf: 3314b000
usb_rx_data_complete, addr= 3314c000 len=32800
rx_data, req->buf: 3314c000
usb_rx_data_complete, addr= 3314d000 len=31800
rx_data, req->buf: 3314d000
usb_rx_data_complete, addr= 3314e000 len=30800
rx_data, req->buf: 3314e000
usb_rx_data_complete, addr= 3314f000 len=2f800
rx_data, req->buf: 3314f000
usb_rx_data_complete, addr= 33150000 len=2e800
rx_data, req->buf: 33150000
usb_rx_data_complete, addr= 33151000 len=2d800
rx_data, req->buf: 33151000
usb_rx_data_complete, addr= 33152000 len=2c800
rx_data, req->buf: 33152000
usb_rx_data_complete, addr= 33153000 len=2b800
rx_data, req->buf: 33153000
usb_rx_data_complete, addr= 33154000 len=2a800
rx_data, req->buf: 33154000
usb_rx_data_complete, addr= 33155000 len=29800
rx_data, req->buf: 33155000
usb_rx_data_complete, addr= 33156000 len=28800
rx_data, req->buf: 33156000
usb_rx_data_complete, addr= 33157000 len=27800
rx_data, req->buf: 33157000
usb_rx_data_complete, addr= 33158000 len=26800
rx_data, req->buf: 33158000
usb_rx_data_complete, addr= 33159000 len=25800
rx_data, req->buf: 33159000
usb_rx_data_complete, addr= 3315a000 len=24800
rx_data, req->buf: 3315a000
usb_rx_data_complete, addr= 3315b000 len=23800
rx_data, req->buf: 3315b000
usb_rx_data_complete, addr= 3315c000 len=22800
rx_data, req->buf: 3315c000
usb_rx_data_complete, addr= 3315d000 len=21800
rx_data, req->buf: 3315d000
usb_rx_data_complete, addr= 3315e000 len=20800
rx_data, req->buf: 3315e000
usb_rx_data_complete, addr= 3315f000 len=1f800
rx_data, req->buf: 3315f000
usb_rx_data_complete, addr= 33160000 len=1e800
rx_data, req->buf: 33160000
usb_rx_data_complete, addr= 33161000 len=1d800
rx_data, req->buf: 33161000
usb_rx_data_complete, addr= 33162000 len=1c800
rx_data, req->buf: 33162000
usb_rx_data_complete, addr= 33163000 len=1b800
rx_data, req->buf: 33163000
usb_rx_data_complete, addr= 33164000 len=1a800
rx_data, req->buf: 33164000
usb_rx_data_complete, addr= 33165000 len=19800
rx_data, req->buf: 33165000
usb_rx_data_complete, addr= 33166000 len=18800
rx_data, req->buf: 33166000
usb_rx_data_complete, addr= 33167000 len=17800
rx_data, req->buf: 33167000
usb_rx_data_complete, addr= 33168000 len=16800
rx_data, req->buf: 33168000
usb_rx_data_complete, addr= 33169000 len=15800
rx_data, req->buf: 33169000
usb_rx_data_complete, addr= 3316a000 len=14800
rx_data, req->buf: 3316a000
usb_rx_data_complete, addr= 3316b000 len=13800
rx_data, req->buf: 3316b000
usb_rx_data_complete, addr= 3316c000 len=12800
rx_data, req->buf: 3316c000
usb_rx_data_complete, addr= 3316d000 len=11800
rx_data, req->buf: 3316d000
usb_rx_data_complete, addr= 3316e000 len=10800
rx_data, req->buf: 3316e000
usb_rx_data_complete, addr= 3316f000 len=f800
rx_data, req->buf: 3316f000
usb_rx_data_complete, addr= 33170000 len=e800
rx_data, req->buf: 33170000
usb_rx_data_complete, addr= 33171000 len=d800
rx_data, req->buf: 33171000
usb_rx_data_complete, addr= 33172000 len=c800
rx_data, req->buf: 33172000
usb_rx_data_complete, addr= 33173000 len=b800
rx_data, req->buf: 33173000
usb_rx_data_complete, addr= 33174000 len=a800
rx_data, req->buf: 33174000
usb_rx_data_complete, addr= 33175000 len=9800
rx_data, req->buf: 33175000
usb_rx_data_complete, addr= 33176000 len=8800
rx_data, req->buf: 33176000
usb_rx_data_complete, addr= 33177000 len=7800
rx_data, req->buf: 33177000
usb_rx_data_complete, addr= 33178000 len=6800
rx_data, req->buf: 33178000
usb_rx_data_complete, addr= 33179000 len=5800
rx_data, req->buf: 33179000
usb_rx_data_complete, addr= 3317a000 len=4800
rx_data, req->buf: 3317a000
usb_rx_data_complete, addr= 3317b000 len=3800
rx_data, req->buf: 3317b000
usb_rx_data_complete, addr= 3317c000 len=2800
rx_data, req->buf: 3317c000
usb_rx_data_complete, addr= 3317d000 len=1800
rx_data, req->buf: 3317d000
usb_rx_data_complete, addr= 3317e000 len=800
booting linux at 0x33000800 ...
   Image Name:   Linux-2.6.29
   Created:      2010-01-31   7:21:28 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1562816 Bytes = 1.5 MiB
   Load Address: 30008000
   Entry Point:  30008000
   Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!

Signed-off-by: Fudong Bai <fudongbai@gmail.com>
gadget: fastboot: fix data overwritten issue

fastboot boot uImage works now:

SMDK2440 # recv data: addr=33000000 size=17e800
done: 3317e000, cmdbuf: 33f617c0
booting linux at 0x33000800 ...
   Image Name:   Linux-2.6.29
   Created:      2010-01-31   7:21:28 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1562816 Bytes = 1.5 MiB
   Load Address: 30008000
   Entry Point:  30008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux..................................................................................................... done, booting the kernel.
Linux version 2.6.29 (rrr@localhost.localdomain) (gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) ) #4 Sun Jan 31 15:21:16 CST 2010
CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177
CPU: VIVT data cache, VIVT instruction cache
Machine: MINI2440
Memory policy: ECC disabled, Data cache writeback
CPU S3C2440A (id 0x32440001)
S3C24XX Clocks, (c) 2004 Simtec Electronics
S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz
CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
Kernel command line: root=/dev/ram0 rdinit=linuxrc console=ttySAC0
irq: clearing pending status 02000000
irq: clearing subpending status 00000003
irq: clearing subpending status 00000002
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
console [ttySAC0] enabled
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 61504KB available (2860K code, 383K data, 120K init)
SLUB: Genslabs=12, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Calibrating delay loop... 201.93 BogoMIPS (lpj=504832)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 672 bytes
NET: Registered protocol family 16
S3C2440: Initialising architecture
S3C2440: IRQ Support
S3C24XX DMA Driver, (c) 2003-2004,2006 Simtec Electronics
DMA channel 0 at c4808000, irq 33
DMA channel 1 at c4808040, irq 34
DMA channel 2 at c4808080, irq 35
DMA channel 3 at c48080c0, irq 36
S3C244X: Clock Support, DVS off
bio: create slab <bio-0> at 0
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
NET: Registered protocol family 1
msgmni has been set to 120
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler deadline registered
io scheduler cfq registered
s3c2440-uart.0: s3c2410_serial0 at MMIO 0x50000000 (irq = 70) is a S3C2440
s3c2440-uart.1: s3c2410_serial1 at MMIO 0x50004000 (irq = 73) is a S3C2440
s3c2440-uart.2: s3c2410_serial2 at MMIO 0x50008000 (irq = 76) is a S3C2440
brd: module loaded
dm9000 Ethernet Driver, V1.31
dm9000 dm9000: eth%d: Invalid ethernet MAC address. Please set using ifconfig
eth0 (dm9000): not using net_device_ops yet
eth0: dm9000e at c4818300,c481c304 IRQ 51 MAC: 00:00:00:00:00:00 (chip)
S3C24XX NAND Driver, (c) 2004 Simtec Electronics
s3c2440-nand s3c2440-nand: Tacls=1, 9ns Twrph0=3 29ns, Twrph1=2 19ns
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 780 at 0x000006180000
Bad eraseblock 988 at 0x000007b80000
Bad eraseblock 1034 at 0x000008140000
Bad eraseblock 1336 at 0x00000a700000
Bad eraseblock 1832 at 0x00000e500000
Bad eraseblock 1851 at 0x00000e760000
Creating 4 MTD partitions on "NAND 256MiB 3,3V 8-bit":
0x000000000000-0x000000040000 : "u-boot"
uncorrectable error : <5>0x000000040000-0x000000060000 : "u-boot-env"
ftl_cs: FTL header not found.
0x000000060000-0x000000560000 : "kernel"
ftl_cs: FTL header not found.
0x000000560000-0x000010000000 : "root"
ftl_cs: FTL header not found.
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
s3c2410-ohci s3c2410-ohci: S3C24XX OHCI
s3c2410-ohci s3c2410-ohci: new USB bus registered, assigned bus number 1
s3c2410-ohci s3c2410-ohci: irq 42, io mem 0x49000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usbcore: registered new interface driver libusual
s3c2440-usbgadget s3c2440-usbgadget: S3C2440: increasing FIFO to 128 bytes
mice: PS/2 mouse device common for all mice
S3C24XX RTC, (c) 2004,2006 Simtec Electronics
s3c2410-rtc s3c2410-rtc: rtc disabled, re-enabling
s3c2410-rtc s3c2410-rtc: rtc core: registered s3c as rtc0
S3C2410 Watchdog Timer, (c) 2004 Simtec Electronics
s3c2410-wdt s3c2410-wdt: watchdog inactive, reset disabled, irq enabled
cpuidle: using governor ladder
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
s3c2410-rtc s3c2410-rtc: setting system clock to 2134-02-14 18:21:13 UTC (884260377)
List of all partitions:
1f00             256 mtdblock0 (driver?)
1f01             128 mtdblock1 (driver?)
1f02            5120 mtdblock2 (driver?)
1f03          256640 mtdblock3 (driver?)
No filesystem could mount root, tried:  cramfs vfat msdos romfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)

Signed-off-by: Fudong Bai <fudongbai@gmail.com>