无法启动openwrt for beagle bone black(BB-black)

时间:2015-06-16 11:51:44

标签: porting beagleboneblack openwrt beagleboard u-boot

我正在尝试将openwrt移植到BBB。如标题所示,我无法在BeagleBone Black上启动openwrt。 如果有人试图在BeagleBone Black(BBB)上做某事,你必须知道其闪存或SD卡中有两个分区。 第一个分区是FAT32作为启动分区,第二个分区是Ext4作为linux根文件系统。

当我使用原始文件和Angstrom的BIN进行BBB时,我可以启动系统。 我的工作与http://wiki.openwrt.org/toh/beaglebone/black#installation

有关

我做了很多实验:

  1. 在OPENWRT的snapshot上使用BIN和其他文件,rootfs等替换所有原始文件。当我打开BBB电源时,我看不到来自UART的任何日志。我认为快照上的 MLO 文件错误

  2. 我只修改了uEvn.txt。我可以看到如下所示的日志。

    gpio:引脚53(gpio 53)值为1
    mmc0是当前设备
    微SD卡发现
    mmc0是当前设备
    gpio:引脚54(gpio 54)值为1
    在设备0上找到SD / MMC 阅读uEnv.txt
    以3 ms(142.6 KiB / s)读取438个字节 来自uEnv.txt的加载环境
    从mmc导入环境...
    运行uenvcmd ...
    阅读zImage
    在238毫秒内读取2051400字节(8.2 MiB / s)
    阅读am335x-boneblack.dtb
    **无法读取文件am335x-boneblack.dtb **
    错误:未找到cmdline Flattened Device Tree
    找不到有效的设备树
    gpio:引脚55(gpio 55)的值为1
    **找不到文件/ boot / uImage **

  3. 我只将快照上的zImage替换为我的flash。 来自UART的日志显示,启动流程停止在

    启动内核......

  4. 日志显示如下。

    U-Boot SPL 2014.01-rc1-00172-ge7e17b0 (Dec 12 2013 - 15:20:09)
    reading args
    spl: error reading image args, err - -1
    reading u-boot.img
    reading u-boot.img
    
    
    U-Boot 2014.01-rc1-00172-ge7e17b0 (Dec 12 2013 - 15:20:09)
    
    I2C:   ready
    DRAM:  512 MiB
    WARNING: Caches not enabled
    NAND:  0 MiB
    MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
    *** Warning - readenv() failed, using default environment
    
    Net:   <ethaddr> not set. Validating first E-fuse MAC
    cpsw, usb_ether
    Hit any key to stop autoboot:  0
    mmc0 is current device
    SD/MMC found on device 0
    reading uEnv.txt
    494 bytes read in 5 ms (95.7 KiB/s)
    Loaded environment from uEnv.txt
    Importing environment from mmc ...
    Running uenvcmd ...
    reading zImage
    2187584 bytes read in 214 ms (9.7 MiB/s)
    reading am335x-boneblack.dtb
    25172 bytes read in 11 ms (2.2 MiB/s)
    Kernel image @ 0x80200000 [ 0x000000 - 0x216140 ]
    
    Starting kernel ...
    

    在此步骤中,我发现snapshot上的文件可能不适合BBB。 之后,我为BBB编译了自己的openwrt版本。并替换zImage。启动内核时问题仍然存在。

    那么有没有人有一些将openwrt移植到BBB的经验? 你能告诉我我应该怎么做移植。或者我做错了什么?

    如果有人为BBB编译了您自己的openwrt版本,请将您的配置文件分享给我?

    非常感谢。

    首先发布我的uEvn.txtx:

    cat /mnt/p1/uEnv.txt 
    kernel_file=zImage
    fdtfile=am335x-boneblack.dtb
    
    loadzimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${kernel_file}
    loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdtaddr} ${fdtfile}
    
    console=ttyO0,115200n8
    mmcroot=/dev/mmcblk0p2 ro
    mmcrootfstype=ext4 rootwait
    
    mmcargs=setenv bootargs console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs}
    
    uenvcmd=run loadzimage; run loadfdt; run mmcargs; bootz ${loadaddr} - ${fdtaddr}
    
    optargs="debug init=/etc/preinit"
    

    来自printenv的输出:

    arch=arm
    baudrate=115200
    board=am335x
    board_name=A335BNLT
    board_rev=00A5
    boot_fdt=try
    bootcmd=i2c mw 0x24 1 0x3e; run findfdt; run mmcboot;setenv mmcdev 1; setenv bootpart 1:2; run mmcboot;run nandboot;
    bootcount=1
    bootdelay=1
    bootdir=/boot
    bootenv=uEnv.txt
    bootfile=zImage
    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-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_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;u-boot-spl-os part 0 6;kernel part 0 8;rootfs part 0 9
    dfu_alt_info_ram=kernel ram 0x80200000 0xD80000;fdt ram 0x80F80000 0x80000;ramdisk ram 0x81000000 0x4000000
    ethact=cpsw
    ethaddr=7c:66:9d:53:6f:07
    fdt_high=0xffffffff
    fdtaddr=0x80F80000
    fdtfile=am335x-boneblack.dtb
    filesize=1f8
    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 $board_name = A33515BB; then setenv fdtfile am335x-evm.dtb; fi; if test $board_name = A335X_SK; then setenv fdtfile am335x-evmsk.dtb; fi; if test $fdtfile = undefined; then echo WARNING: Could not determine device tree to use; fi;
    importbootenv=echo Importing environment from mmc ...; env import -t $loadaddr $filesize
    kernel_file=zImage
    loadaddr=0x80200000
    loadbootenv=load mmc ${mmcdev} ${loadaddr} ${bootenv}
    loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdtaddr} ${fdtfile}
    loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}
    loadramdisk=load mmc ${mmcdev} ${rdaddr} ramdisk.gz
    loadzimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${kernel_file}
    mmcargs=setenv bootargs console=${console} root=${mmcroot}
    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;fi;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;if run loadimage; then run mmcloados;fi;fi;
    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; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi;
    mmcroot=/dev/mmcblk0p2 ro
    mmcrootfstype=ext4 rootwait
    mtdids=nand0=omap2-nand.0
    mtdparts=mtdparts=omap2-nand.0:128k(SPL),128k(SPL.backup1),128k(SPL.backup2),128k(SPL.backup3),1792k(u-boot),128k(u-boot-spl-os),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 ${fdtaddr} u-boot-spl-os; nand read ${loadaddr} kernel; bootz ${loadaddr} - ${fdtaddr}
    nandroot=ubi0:rootfs rw ubi.mtd=7,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}
    nfsopts=nolock
    optargs="debug init=/etc/preinit"
    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
    rootfstype=${mmcrootfstype} ${optargs}
    rootpath=/export/rootfs
    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
    uenvcmd=printenv; run loadzimage; run loadfdt; run mmcargs; bootz ${loadaddr} -
    usbnet_devaddr=7c:66:9d:53:6f:07
    vendor=ti
    ver=U-Boot 2014.01-rc1-00172-ge7e17b0 (Dec 12 2013 - 15:20:09)
    
    Environment size: 4451/131068 bytes
    

1 个答案:

答案 0 :(得分:0)

您的输出清楚地表明uBoot无法读取设备树二进制文件(am335x-boneblack.dtb)。确保您的FAT分区的根目录中也有该文件。它可以在构建输出中找到:openwrt / bin / omap / dtbs在创建OpenWRT之后。