Hi all,
My cross development base is a virtual Ubuntu 9.1. To be honest I dont
even know if it is possible to get to that machine from the host
network. Since I had to get a serial link up to be able to fiddle
around with uboot I searched for other options to get the kernel in.
There are several serial transfer protocols included in uboot. I
picked ymodem for its simplicity.
I will include my particular kernel in this example to highlight the
importance of size.
When the Ready signal is given I start the ymodem transfer of the
uImage file (I think it HAS to be named uImage)
--------------
hawkboard.org > loady 0xc0700000 115200
## Ready for binary (ymodem) download to 0xC0700000 at 115200 bps...
CCCCCCCxyzModem - CRC mode, 2(SOH)/2396(STX)/0(CAN) packets, 9 retries
## Total Size = 0x00256de4 = 2452964 Bytes
--------------
As you can see above the size is given both in hex and dec, very nice!
--------------
hawkboard.org > nand info
Device 0: NAND 128MiB 1,8V 8-bit, sector size 128 KiB
hawkboard.org > nand erase 0x200000 0x256de4
NAND erase: device 0 offset 0x200000, size 0x256de4
Erasing at 0x440000 -- 101% complete.
OK
hawkboard.org > nand erase 0x200000 0x260000
NAND erase: device 0 offset 0x200000, size 0x260000
Erasing at 0x440000 -- 100% complete.
OK
--------------
Some of these messages above confuse me, but no errors so lets
continue
--------------
hawkboard.org > nand write.e 0xc0700000 0x200000 0x256de4
NAND write: device 0 offset 0x200000, size 0x256de4
Attempt to write non page aligned data
2452964 bytes written: ERROR
--------------
ERROR, that doesn't sound good, lets try a bit longer section
--------------
hawkboard.org > nand write.e 0xc0700000 0x200000 0x260000
NAND write: device 0 offset 0x200000, size 0x260000
2490368 bytes written: OK
--------------
Now that seems quite ok, so now we have the uImage flashed to NAND at
0x200000 and the length is 0x256de4
I dont use ramdisk so I'll leave that for you to figure out.
I use a sdram with two partitions, first for uImage (not used, but
soon(tm) we hope for a new uboot).
Second is my rootfs, so I continue to set some bootargs and bootcmd in
uboot
-------------
hawkboard.org > setenv bootargs "mem=80M console=ttyS2,115200n8 root=/
dev/mmcblk0p2 rootwait rw init=/sbin/init ip=dhcp"
hawkboard.org > setenv bootcmd "setenv $bootargs;nand read.e
0xc0900000 0x200000 0x256DE4;bootm 0xC0900000"
hawkboard.org > saveenv
Saving Environment to NAND...
Erasing Nand...
Erasing at 0x0 -- 100% complete.
Writing to Nand... done
hawkboard.org >
-------------
This part above have more or less copied from another post here and it
has a typo in it, just ignore the error message on the "mem=80M"
stuff.
mem=80M (or something smaller than 128M at least) needs to be passed
to the kernel in order to get DSPLink to work.
For completeness this is the endresult of my uboot-environment
------------
hawkboard.org > printenv
bootdelay=3
baudrate=115200
bootfile="uImage"
ethaddr=0a:c1:a8:12:fa:c0
filesize=256DE4
bootargs=mem=80M console=ttyS2,115200n8 root=/dev/mmcblk0p2 rootwait
rw init=/sbin/init ip=dhcp
bootcmd=setenv mem=80M console=ttyS2,115200n8 root=/dev/mmcblk0p2
rootwait rw init=/sbin/init ip=dhcp;nand read.e 0xc090
0000 0x200000 0x256DE4;bootm 0xC0900000
stdin=serial
stdout=serial
stderr=serial
ver=U-Boot 2009.01-dirty (Nov 18 2009 - 23:30:48)
Environment size: 435/131068 bytes
hawkboard.org >
------------
I hope this inspired someone out there!