使用SDK6.0版本自带的文件系统arago-base-tisdk-image-am335x-evm.ubi烧录到am3352的nand上启动不成功
串口烧录:
tftp 0x82000000 arago-base-tisdk-image-am335x-evm.ubi
nand erase 0x780000 0x0f880000 && nand write 0x82000000 0x780000 0x02000000
串口环境变量:
arch=arm
baudrate=115200
board=am335x
board_name=A335BNLT
bootargs=console=ttyO0,115200n8 root=ubi0:rootfs rw ubi.mtd=7,2048 rootfstype=ubifs rootwait=1
bootargs_defaults=setenv bootargs console=${console} ${optargs}
bootcmd=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev};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 loaduimagefat; then run mmcboot;elif run loaduimage; then run mmcboot;else echo Could not find ${bootfile} ;fi;else run nandboot;fi;
bootdelay=1
bootenv=uEnv.txt
bootfile=uImage
console=ttyO0,115200n8
cpu=armv7
dfu_alt_info_emmc=rawemmc mmc 0 3751936
dfu_alt_info_mmc=boot part 0 1;rootfs part 0 2;MLO fat 0 1;MLO.raw mmc 100 100;u-boot.img.raw mmc 300 3C0;u-boot.img fat 0 1;uEnv.txt fat 0 1
dfu_alt_info_nand=SPL part 0 1;SPL.backup1 part 0 2;SPL.backup2 part 0 3;SPL.backup3 part 0 4;u-boot part 0 5;kernel part 0 7;rootfs part 0 8
ethact=cpsw
ethaddr=1c:ba:8c:e6:79:53
fdt_high=0xffffffff
fdtaddr=0x80F80000
findfdt=if test $board_name = A335BONE; then setenv fdtfile am335x-bone.dtb; fi; if test $board_name = A33515BB; then setenv fdtfile am335x-evm.dtb; fi; if test $board_name = A335X_SK; then setenv fdtfile am335x-evmsk.dtb; fi
importbootenv=echo Importing environment from mmc …; env import -t $loadaddr $filesize
ip_method=none
ipaddr=192.168.2.8
kloadaddr=0x80007fc0
loadaddr=0x80200000
loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}
loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz
loaduimage=ext2load mmc ${mmcdev}:2 ${kloadaddr} /boot/${bootfile}
loaduimagefat=fatload mmc ${mmcdev} ${kloadaddr} ${bootfile}
mmcargs=run bootargs_defaults;setenv bootargs ${bootargs} root=${mmcroot} rootfstype=${mmcrootfstype} ip=${ip_method}
mmcboot=echo Booting from mmc …; run mmcargs; bootm ${kloadaddr}
mmcdev=0
mmcroot=/dev/mmcblk0p2 ro
mmcrootfstype=ext3 rootwait
mtdids=nand0=omap2-nand.0
mtdparts=mtdparts=omap2-nand.0:128k(SPL),128k(SPL.backup1),128k(SPL.backup2),128k(SPL.backup3),1920k(u-boot),128k(u-boot-env),5m(kernel),-(rootfs)
nandargs=setenv bootargs console=${console} ${optargs} root=${nandroot} rootfstype=${nandrootfstype}
nandboot=echo Booting from nand …; run nandargs; nand read ${loadaddr} ${nandsrcaddr} ${nandimgsize}; bootm ${loadaddr}
nandimgsize=0x500000
nandroot=ubi0:rootfs rw ubi.mtd=7,2048
nandrootfstype=ubifs rootwait=1
nandsrcaddr=0x280000
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; tftp ${loadaddr} ${bootfile}; run netargs; bootm ${loadaddr}
netmask=255.255.255.0
nfsopts=nolock
ramargs=setenv bootargs console=${console} ${optargs} root=${ramroot} rootfstype=${ramrootfstype}
ramboot=echo Booting from ramdisk …; run ramargs; bootm ${loadaddr}
ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M
ramrootfstype=ext2
rdaddr=0x81000000
rootpath=/export/rootfs
serverip=192.168.2.234
soc=am33xx
spiargs=setenv bootargs console=${console} ${optargs} root=${spiroot} rootfstype=${spirootfstype}
spiboot=echo Booting from spi …; run spiargs; sf probe ${spibusno}:0; sf read ${loadaddr} ${spisrcaddr} ${spiimgsize}; bootm ${loadaddr}
spibusno=0
spiimgsize=0x362000
spiroot=/dev/mtdblock4 rw
spirootfstype=jffs2
spisrcaddr=0xe0000
static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off
stderr=serial
stdin=serial
stdout=serial
usbnet_devaddr=1c:ba:8c:e6:79:53
vendor=ti
ver=U-Boot 2013.01.01 (Mar 16 2015 – 10:52:31)
Environment size: 3743/131068 bytes
内核启动后打印的错误信息:
[ 1.827484] Trying to load am335x-pm-firmware.bin (60 secs timeout)
[ 1.834197] Copied the M3 firmware to UMEM
[ 1.838531] Cortex M3 Firmware Version = 0x181
[ 1.843841] mmc1: error -110 whilst initialising SDIO card
[ 1.849731] create_regulator: DCDC2: Failed to create debugfs directory
[ 1.856994] mmc1: card claims to support voltages below the defined range. These will be ignored.
[ 1.866271] mmc1: SD card claims to support the incompletely defined 'low voltage range'. This will be ignored.
[ 1.877044] smartreflex smartreflex: am33xx_sr_probe: Driver initialized
[ 1.890838] clock: disabling unused clocks to save power
[ 1.898742] mmc1: unrecognised CSD structure version 3
[ 1.904174] mmc1: error -22 whilst initialising SD card
[ 1.917999] Detected MACID=1c:ba:8c:e6:79:53
[ 1.923400] cpsw: Detected MACID = 1c:ba:8c:e6:79:55
[ 1.929412] omap_rtc am33xx-rtc: setting system clock to 2000-01-01 00:00:01UTC (946684801)
[ 1.938598] VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0) //检测不到文件系统
[ 1.946014] Please append a correct "root=" boot option; here are the available partitions:
[ 1.954772] Kernel panic – not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 1.963409] Backtrace:
[ 1.966003] [<c0017dbc>] (dump_backtrace+0x0/0x10c) from [<c0413340>] (dump_stack+0x18/0x1c)
[ 1.974822] r6:00008000 r5:c04f5e80 r4:c063dd48 r3:c05f4acc
[ 1.980773] [<c0413328>] (dump_stack+0x0/0x1c) from [<c041353c>] (panic+0x64/0x194)
[ 1.988769] [<c04134d8>] (panic+0x0/0x194) from [<c0596c88>] (mount_block_root+0x174/0x228)
[ 1.997528] r3:00000000 r2:00000000 r1:df02df68 r0:c04f5e80
[ 2.003448] r7:c05c42e8
[ 2.006103] [<c0596b14>] (mount_block_root+0x0/0x228) from [<c0596fa4>] (prepare_namespace+0x94/0x1c0)
[ 2.015838] [<c0596f10>] (prepare_namespace+0x0/0x1c0) from [<c05968fc>] (kernel_init+0xf4/0x120)
[ 2.025115] r5:c05d05c4 r4:c05d05c4
[ 2.028869] [<c0596808>] (kernel_init+0x0/0x120) from [<c00412b8>] (do_exit+0x0/0x65c)
[ 2.037170] r5:c0596808 r4:00000000
===========分割线============
按照 http://www.deyisupport.com/cfs-file.ashx/__key/telligent-evolution-components-attachments/00-25-00-00-00-05-99-21/Ubifs_8765F64EFB7CDF7E847636525C4F8C542F54A852_.pdf 中的步骤修改了内核的参数,但是uboot因为版本问题没有修改。
这个还需要修改uboot的环境变量还是要继续修改源代码,还是有现成patch直接打补丁修改的吗???
Steven Liu1:
我看你的bootcmd没有修改过啊,在uboot环境下通过下面的方式修改环境变量试试:
setenv bootargs $nandargs
setenv bootcmd $nandboot
boot