Hi guys,
I'm using AM437x SK. I'm able to boot (Linux system created with Yotco; 2 partitions: 1st - FAT with MLO, u-boot.img, ..; 2nd EXT with roofs, kernel, ...) from SD Card. And now I would like to boot it from onboard QSPI-NOR flash.
I ran into U-Boot 2015.07 (from SD Card) and wanted to use these commands (from http://processors.wiki.ti.com/index.php/AMSDK_u-boot_User's_Guide ) to load MLO, u-boot.img to QSPI Flash.
U-Boot # mmc rescan U-Boot # sf probe 0 U-Boot # sf erase 0 +80000 U-Boot # fatload mmc 0 ${loadaddr} MLO.byteswap U-Boot # sf write ${loadaddr} 0 ${filesize} U-Boot # fatload mmc 0 ${loadaddr} u-boot.img U-Boot # sf write ${loadaddr} 0x20000 ${filesize}
I succesfully loaded it into the SPI flash and then I rebooted the board (without SD card). Nothing happened. Am I doing it right way? Am I missing some configuration? (Is there any tutorial, wiki how to boot from (AM437x SK) SPI flash I didn't find?)
U-Boot# printenv arch=arm args_mmc=run finduuid;setenv bootargs console=${console} ${optargs} root=PARTUUID=${uuid} rw rootfstype=${mmcrootfstype} baudrate=115200 board=am43xx board_name=AM43__SK board_rev=1.1A board_serial=11144P420878 bootcmd=run findfdt; run envboot;run mmcboot;run usbboot;run nandboot; bootdelay=1 bootdir=/boot bootenvfile=uEnv.txt bootfile=zImage bootm_size=0x10000000 bootpart=0:2 bootscript=echo Running bootscript from mmc${mmcdev} ...; source ${loadaddr} console=ttyO0,115200n8 cpu=armv7 dfu_alt_info_emmc=MLO raw 0x100 0x100 mmcpart 0;u-boot.img raw 0x300 0x1000 mmcpart 0 dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;spl-os-args fat 0 1;spl-os-image fat 0 1;u-boot.img fat 0 1;uEnv.txt fat 0 1 dfu_alt_info_qspi=u-boot.bin raw 0x0 0x080000;u-boot.backup raw 0x080000 0x080000;u-boot-spl-os raw 0x100000 0x010000;u-boot-env raw 0x110000 0x010000;u-boot-env.backup raw 0x120000 0x010000;kernel raw 0x130000 0x800000 dfu_alt_info_ram=kernel ram 0x80200000 0x4000000;fdt ram 0x80f80000 0x80000;ramdisk ram 0x81000000 0x4000000 dfu_bufsiz=0x10000 envboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootscript; then run bootscript;else if run loadbootenv; then echo Loaded env from ${bootenvfile};run importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;fi;fi; eth1addr=c4:be:84:cc:b9:7b ethact=cpsw ethaddr=c4:be:84:cc:b9:79 fdt_addr_r=0x88000000 fdtaddr=0x88000000 fdtfile=undefined findfdt=if test $board_name = AM43EPOS; then setenv fdtfile am43x-epos-evm.dtb; fi; if test $board_name = AM43__GP; then setenv fdtfile am437x-gp-evm.dtb; fi; if test $board_name = AM43__SK; then setenv fdtfile am437x-sk-evm.dtb; fi; if test $board_name = AM43_IDK; then setenv fdtfile am437x-idk-evm.dtb; fi; if test $fdtfile = undefined; then echo WARNING: Could not determine device tree; fi; finduuid=part uuid mmc 0:2 uuid importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t ${loadaddr} ${filesize} kernel_addr_r=0x82000000 loadaddr=0x82000000 loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile} loadbootscript=load mmc ${mmcdev} ${loadaddr} boot.scr loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile} loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile} loadramdisk=load ${devtype} ${devnum} ${rdaddr} ramdisk.gz mmcboot=mmc dev ${mmcdev}; setenv devnum ${mmcdev}; setenv devtype mmc; if mmc rescan; then echo SD/MMC found on device ${devnum};if run loadimage; then run loadfdt; echo Booting from mmc${mmcdev} ...; run args_mmc; bootz ${loadaddr} - ${fdtaddr}; fi;fi; mmcdev=0 mmcrootfstype=ext4 rootwait mtdids=nand0=nand.0 mtdparts=mtdparts=nand.0:256k(NAND.SPL),256k(NAND.SPL.backup1),256k(NAND.SPL.backup2),256k(NAND.SPL.backup3),512k(NAND.u-boot-spl-os),1m(NAND.u-boot),256k(NAND.u-boot-env),256k(NAND.u-boot-env.backup1),7m(NAND.kernel),-(NAND.file-system) nandargs=setenv bootargs console=${console} ${optargs} root=${nandroot} rootfstype=${nandrootfstype} nandboot=echo Booting from nand ...; run nandargs; nand read ${fdtaddr} NAND.u-boot-spl-os; nand read ${loadaddr} NAND.kernel; bootz ${loadaddr} - ${fdtaddr} nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,4096 nandrootfstype=ubifs rootwait=1 netargs=setenv bootargs console=${console} ${optargs} root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp netboot=echo Booting from network ...; setenv autoload no; dhcp; run netloadimage; run netloadfdt; run netargs; bootz ${loadaddr} - ${fdtaddr} netloadfdt=tftp ${fdtaddr} ${fdtfile} netloadimage=tftp ${loadaddr} ${bootfile} nfsopts=nolock partitions=uuid_disk=${uuid_gpt_disk};name=rootfs,start=2MiB,size=-,uuid=${uuid_gpt_rootfs} ramargs=setenv bootargs console=${console} ${optargs} root=${ramroot} rootfstype=${ramrootfstype} ramdisk_addr_r=0x88080000 ramroot=/dev/ram0 rw ramrootfstype=ext2 rdaddr=0x88080000 rootpath=/export/rootfs soc=am33xx static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off stderr=serial stdin=serial stdout=serial usbargs=setenv bootargs console=${console} ${optargs} root=${usbroot} rootfstype=${usbrootfstype} usbboot=setenv devnum ${usbdev}; setenv devtype usb; usb start ${usbdev}; if usb dev ${usbdev}; then if run loadbootenv; then echo Loaded environment from ${bootenv};run importbootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;if run loadimage; then run loadfdt; echo Booting from usb ${usbdev}...; run usbargs;bootz ${loadaddr} - ${fdtaddr}; fi;fi usbdev=0 usbnet_devaddr=c4:be:84:cc:b9:7b usbroot=/dev/sda2 rw usbrootfstype=ext4 rootwait vendor=ti ver=U-Boot 2015.07 (Dec 17 2015 - 06:53:08 +0100)