Small addendum:
If you cant the hell figure out what the uImage offset is (like i did because i use the foonas non-standard flash partition scheme of davy-gravy's armel-lenny-images and thus couldn't use any of the default numbers in any of the howtos) you can use the following procedure to write the kernel image to flash and know the starting adress afterwards.
Base article:
http://wiki.davincidsp.com/index.php?ti ... NAND_FlashYou need:
- serial device (for uboot access)
- tftp server (for kernel image uploading)
In our case:
Code:
tftpboot
gives something like
Code:
TFTP from server <tftp server ip address>; our IP address is <dvevm ip address>
Filename 'uImage'
Load address: 0x80700000
Loading:
######################################################################################
######################################################################################
.
.
.
######################################################################################
#######################################################
done
Bytes transferred = 1397368 (155278 hex)
Note the load adress and Byte count (the hex number).
Code:
nand info
shows us
Code:
Device 0: Samsung K9K1208Q0C at 0x2000000 (256 MB, 128 kB sector)
Important here is the sector size. Its 0x20000 in hex on a Kuropro.
Now for the actual math:
Code:
Kernel size = 0x225000
Number of sectors = 0x225000/0x20000 = 0x11
Rounded size = <number of sectors> * <sector size> = 0x11 * 0x20000 = 0x220000
As you can notice this would trim our image by some bytes, so we have to round up to the next sector, i.e. use the rounded kernel size = 0x240000.
Now we write it to flash, note that this ignores (and overwrites) any filesystem and data whatsoever on that specific place in flash, so backup any data you might need beforehand:
Code:
nand erase offset rounded-kernel-size
Note that the offset can be virtually any address allowed on your flash, but better place the kernel image on the first sectors.
in our example:
Code:
nand erase 0x60000 0x240000
You should see output like the following:
Code:
NAND erase: device 0 offset 393216, size 1397760 ... OK
and finally write the image to flash
Code:
nand write Load-Adress offset rounded-kernel-size
in our example:
Code:
nand write 0x400000 0x60000 0x240000
should give:
Code:
NAND write: device 0 offset 393216, size 1397760 ... 1397760
bytes written: OK
Now the image is written.
Finally set the bootcmd to our shiny new kernel and boot.
Code:
setenv bootcmd 'nboot 0x400000 0 0x60000;bootm'
which should boot your kernel from flash.
P.S.: Some numbers are still from the original article as im writing this from work. I will update the post in the evening with the correct Kuropro numbers (its only the first kernel size and nand info which is wrong though, the actual kernel-rounded-size and the erase and write commands are correct.)