启动内核时遇到问题。我用am335x-evm_defconfing编译了我的内核。在编译之前我添加了initramfs,并且我展示了自己的rootfs。当编译结束时,我将zImage转移到NFS文件夹。我重新启动了NFS恶魔,并打开了Sitara。在主菜单中,u-Boot执行了此命令。
setenv bootfile zImage
setenv fdtfile am335x.dtb
setenv serverip <serverip>
dhcp
在此命令之后,整个图像被转移。
tftp ${fdtaddr} ${fdtfile};
bootz ${loadaddr} - ${fdtaddr};
在此命令之后,我看到了这个控制台行
#### Flattened Device Tree blob at 80f80000
Booting using the fdt blob at 0x80f80000
Loading Device Tree to 8f321000, end 8f32c4e6 ... OK
Starting kernel ...
在这个阶段,过程悬而未决。有关它的任何建议。?也许我做错了什么。
对于append,我从u-Boot环境粘贴我的变量。
arch=arm
baudrate=115200
board=am335x
board_name=FLogicSi
board_rev=B.01
boot_fdt=try
boot_targets= mmc0 nand
bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done
bootcmd_mmc0=setenv devnum 0; setenv rootpart 2; run mmc_boot;
bootcmd_nand=run nandboot;
bootcmd_usb=setenv devnum 0; run usb_boot;
bootdelay=3
bootdir=/boot
bootenv=uEnv.txt
bootfile=kernelDM
bootpart=0:2
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 400;spl-os-args.raw mmc 80 80;spl-os-image.raw mmc 900 2000;spl-o1
dfu_alt_info_nand=NAND.SPL part 0 1;NAND.SPL.backup1 part 0 2;NAND.SPL.backup2 part 0 3;NAND.SPL.backup3 part 0 4;NAND.u-boot-spl-os part 0 5;NAND.u-boot part 0 6;NAND0
dfu_alt_info_ram=kernel ram 0x80200000 0xD80000;fdt ram 0x80F80000 0x80000;ramdisk ram 0x81000000 0x4000000
dnsip=10.0.0.1
eth1addr=d0:ff:50:b3:58:2e
ethact=cpsw
ethaddr=d0:ff:50:b3:58:2c
fdt_high=0xa0000000
fdtaddr=0x80F80000
fdtfile=am335x-flsi-usb.dtb
fileaddr=80f80000
filesize=84e7
findfdt=if test $board_name = A335BONE; then setenv fdtfile am335x-bone.dtb; fi; if test $board_name = A335BNLT; then setenv fdtfile am335x-boneblack.dtb; fi; if test
gatewayip=10.0.0.1
importbootenv=echo Importing environment from mmc ...; env import -t $loadaddr $filesize
ipaddr=10.0.0.32
loadaddr=0x80200000
loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}
loadfdt=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile}
loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz
mmc_boot=setenv devtype mmc; if mmc dev ${devnum}; then run mmcargs;run scan_boot; run mmcboot;setenv mmcdev 1; setenv bootpart 1:2; run mmcboot;fi
mmcargs=setenv bootargs console=${console} ${optargs} root=${mmcroot} rootfstype=${mmcrootfstype}
mmcboot=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;
mmcdev=0
mmcloados=run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdtaddr}; else if test ${boot_fdt} = try; t;
mmcroot=/dev/mmcblk0p2 ro
mmcrootfstype=ext4 rootwait
mtdids=nand0=nand.0
mtdparts=mtdparts=nand.0:128k(NAND.SPL),128k(NAND.SPL.backup1),128k(NAND.SPL.backup2),128k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),1m(NAND.u-boot),128k(NAND.u-boot-)
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,2048
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; tftp ${loadaddr} ${bootfile}; tftp ${fdtaddr} ${fdtfile}; run netargs; bootz ${loadaddr} - ${fdtaddr}
netmask=255.0.0.0
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}
ramboot=echo Booting from ramdisk ...; run ramargs; bootz ${loadaddr} ${rdaddr} ${fdtaddr}
ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M
ramrootfstype=ext2
rdaddr=0x81000000
rootpart=2
rootpath=/export/rootfs
scan_boot=echo Scanning ${devtype} ${devnum}...; for prefix in ${bootdir}; do for script in ${bootfile}; do run script_boot; done; done;
script_boot=if load ${devtype} ${devnum}:${rootpart} ${loadaddr} ${bootdir}/${bootfile}; then run findfdt; load ${devtype} ${devnum}:${rootpart} ${fdtaddr} ${bootdir}/;
serverip=10.0.0.10
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}; bootz ${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
usb_boot=setenv devtype usb; run usb_init; if usb dev 0; then run usbargs;run scan_boot; bootz ${loadaddr} - ${fdtaddr}; fi
usb_init=usb start 0;
usbargs=setenv bootargs console=${console} ${optargs} root=${usbroot} rootfstype=${usbrootfstype}
usbnet_devaddr=d0:ff:50:b3:58:2e
usbroot=/dev/sda2 rw
usbrootfstype=ext4 rootwait
vendor=ti
ver=U-Boot 2013.10-00189-g78d8ebd-dirty (Oct 15 2014 - 17:35:33)
Environment size: 5565/131067 bytes
这是printenv的输出。我认为变量控制台是正确的。
在内核的menuconfig中我有这个值:
root=/dev/mmcblk0p2 rootwait console=ttyO0,115200
BR
丹尼尔
ADDENDUM - 控制台日志传输
U-Boot# setenv bootfile kernelDM
U-Boot# setenv fdtfile am335x-flsi-usb.dtb
U-Boot# setenv serverip 10.0.0.10
U-Boot# dhcp
link up on port 0, speed 1000, full duplex
BOOTP broadcast 1
DHCP client bound to address 10.0.0.32
Using cpsw device TFTP from server 10.0.0.10; our IP address is 10.0.0.32
Filename 'kernelDM'.
Load address: 0x80200000
Loading: ################# ... ### 2.4 MiB/s
done
Bytes transferred = 29544136 (1c2cec8 hex)