Ceci est une ancienne révision du document !
Liens de références :
http://projects.doozan.com/uboot/build_uboot.htm
http://forum.doozan.com/read.php?3,1561
Après avoir installé une carte SD sur le DockStar, il faut réussir à démarrer dessus.
Pour se faire, il faut modifier U-Boot avec une prise en charge de la carte SD.
Je suis parti d'une version 2010.09 de U-Boot.
ftp://ftp.denx.de/pub/u-boot/u-boot-2010.09.tar.bz2
Après de multiples modifications et de patch divers et variés, j'ai réussi à démarrer sur un U-Boot.
Le patch à appliquer sur la version 2010.09 est celui-ci.
L'environnement par défaut a été modifié comme suit :
arcNumber=2998 mainlineLinux=yes console=ttyS0,115200 mtdparts=mtdparts=orion_nand:1M(u-boot),4M@1M(uImage),10M@5M(rootfs),-(rootfs_data) mtdids=nand0=orion_nand partition=nand0,2 mmc_device=0:1 mmc_root=/dev/mmcblk0p1 mmc_test=if ext2load mmc $mmc_device 0x800000 /boot/uImage 1; then echo "Found bootable drive on SDCard"; fi; done mmc_init=mmc init; run mmc_test mmc_rootdelay=10 mmc_rootfstype=ext2 mmc_set_bootargs=setenv bootargs console=$console root=$mmc_root rootdelay=$mmc_rootdelay rootfstype=$mmc_rootfstype $mtdparts mmc_boot=mw 0x800000 0 1;ext2load mmc $mmc_device 0x800000 /boot/uImage; if ext2load mmc $mmc_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi mmc_bootcmd=run mmc_init; run mmc_set_bootargs; run mmc_boot usb_scan_list=1 2 3 4 usb_scan_1=usb=0:1 dev=sda1 usb_scan_2=usb=1:1 dev=sdb1 usb_scan_3=usb=2:1 dev=sdc1 usb_scan_4=usb=3:1 dev=sdd1 usb_device=0:1 usb_root=/dev/sda1 usb_scan=usb_scan_done=0; for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done usb_init=usb start; run usb_scan usb_rootdelay=10 usb_rootfstype=ext2 usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot openwrt_root=/dev/mtdblock2 ro openwrt_rootfstype=jffs2 openwrt_set_bootargs=setenv bootargs console=$console root=$openwrt_root rootfstype=$openwrt_rootfstype $mtdparts openwrt_boot=nand read.e 0x6400000 0x100000 0x400000; bootm 0x6400000 openwrt_bootcmd=run openwrt_set_bootargs; run openwrt_boot led_init=green blinking led_exit=green off led_error=orange blinking
J'ai appliqué la suite de commande suivante dans une console pour modifier l'environnement de démarrage USB.
setenv mmc_device 0:1 setenv mmc_root /dev/mmcblk0p1 setenv mmc_test if ext2load mmc \$mmc_device 0x800000 /boot/uImage 1\; then echo "Found bootable drive on SDCard"\; fi\; done setenv mmc_init mmc init\; run mmc_test setenv mmc_rootdelay 10 setenv mmc_rootfstype ext2 setenv mmc_set_bootargs setenv bootargs console=\$console root=\$mmc_root rootdelay=\$mmc_rootdelay rootfstype=\$mmc_rootfstype \$mtdparts setenv mmc_boot "mw 0x800000 0 1\; ext2load mmc \$mmc_device 0x800000 /boot/uImage\; if ext2load mmc \$mmc_device 0x1100000 /boot/uInitrd\; then bootm 0x800000 0x1100000\; else bootm 0x800000\; fi" setenv mmc_bootcmd run mmc_init\; run mmc_set_bootargs\; run mmc_boot setenv usb_init usb start\; run usb_scan setenv usb_bootcmd run usb_init\; run usb_set_bootargs\; run usb_boot setenv bootcmd run mmc_bootcmd\; run usb_bootcmd\; usb stop\; run openwrt_bootcmd\; reset
Je commence par tester le chargeur :
usb start ext2load usb 0:1 0x800000 uboot.mtd0.kwb go 0x800200
Si l'application se lance, je l'installe :
usb start ext2load usb 0:1 0x800000 uboot.mtd0.kwb nand erase 0x0 0x80000 nand write.e 0x800000 0x0 0x80000
Le log de démarrage :
U-Boot 2010.09 (Jul 07 2012 - 19:34:12) Marvell-Dockstar - MMC/SD SoC: Kirkwood 88F6281_A0 DRAM: 128 MiB NAND: 256 MiB In: serial Out: serial Err: serial Net: egiga0 88E1116 Initialized on egiga0 Hit any key to stop autoboot: 0 Marvell>>
J'ai bien les outils liés à la carte SD mais j'ai un petit soucis avec je ne sais quelle partie du pilote.
J'ai le message suivant :
A voir mais la version debug du chargeur ne veut pas démarrer.