//---tiny6410由SD卡開機 不怕把NAND try到掛
使用2G SD卡,超過2G, SD卡的uboot位址不一樣.
s3c6410的uboot,是放在卡的最後段
//---查SD卡容量
查使用的sd卡的total sector.
筆者的SD卡是3842048
dd if=/dev/zero of=/dev/sdb bs=512 count=2
fdisk /dev/sdb
[p]
//---倒入uboot
bl1 addr = total sector - 18 = 3842048 - 18 = 3842030
bl2 addr = total sector - 768 = 3842048 - 786 = 3841262
dd if=u-boot.sd.bin of=/dev/sdb seek=3842030 bs=512 count=16
dd if=u-boot.sd.bin of=/dev/sdb seek=3841262 bs=512
//---倒入zImage
zImage =total sector - 12306 = 3829742
dd if=zImage_n43 of=/dev/sdb seek=3829742 bs=512
sd卡設ext3 file system, range is 62 ~ 3829700
fdisk /dev/sdb
[n]
[p]
62
3829700
[w]
[q]
mkfs.ext3 /dev/sdb
//---copy file system
將/dev/sdb mount在./sd_pt
將rootfs image mount在./rootfs
mkdir sd_pt
mount -t ext3 /dev/sdb1 ./sd_pt
mkdir rootfs
mount -t ext3 -o loop -t ext3 rootfs_qtopia_qt4.ext3 ./rootfs
cd rootfs
cp -rpa * ../sd_pt && sync %% sync
//---setting uboot env
[q]
movi init 3842048 0
setenv bootargs "root=/dev/mmcblk0p1 rootfstype=ext3 init=/linuxrc console=ttySAC0,115200"
setenv bootcmd "movi init 3842048 0;movi read zImage c0008000;bootm c0008000"
setenv bootdelay 5
savee
res