按照sitara-linuxsdk-sdg-05.04.01.00.pdf AMSDK u-boot User\'s Guide 编译MLO u-boot.img,启动时出现如下错误:[code]Uncompressing Linux... done, booting the kernel.
[ 0.068275] _omap_mux_get_by_name: Could not find signal uart1_cts.uart1_cts
[ 0.068294] omap_hwmod_mux_init: Could not allocate device mux entry
[ 0.068448] _omap_mux_get_by_name: Could not find signal uart2_cts.uart2_cts
[ 0.068466] omap_hwmod_mux_init: Could not allocate device mux entry
[ 0.068623] _omap_mux_get_by_name: Could not find signal uart3_cts_rctx.uart3_cts_rctx
[ 0.068642] omap_hwmod_mux_init: Could not allocate device mux entry
[ 0.106262] cpuidle-am33xx cpuidle-am33xx.0: failed to register driver
[ 0.261045] _omap_mux_get_by_name: Could not find signal leds-gpio
[ 0.651859] omap2_set_init_voltage: unable to get clk dpll1_ck
[ 0.658045] omap2_set_init_voltage: unable to set vdd_mpu_iva
[ 0.664063] omap2_set_init_voltage: unable to get clk l3_ick
[ 0.670000] omap2_set_init_voltage: unable to set vdd_core
[ 0.897931] EXT3-fs (mmcblk0p2): error: couldn\'t mount because of unsupported optional features (40)
[ 0.907766] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)[/code]
很明显,SD卡的mmcblk0p2这个分区是EXT4文件系统,而u-boot中并未支出EXT4,所以需要修改相关文件:
u-boot源码下的include/configs/am335x_evm.h[code]/* HSMMC support */
#ifdef CONFIG_MMC
#define CONFIG_GENERIC_MMC
#define CONFIG_OMAP_HSMMC
#define CONFIG_CMD_MMC
#define CONFIG_DOS_PARTITION
#define CONFIG_CMD_FAT
#define CONFIG_CMD_EXT2
#define CONFIG_CMD_EXT4/*2013-12-12*/[/code]添加
#define CONFIG_CMD_EXT4[code]#define CONFIG_EXTRA_ENV_SETTINGS \\
\"bootfile=uImage\\0\" \\
\"loadaddr=0x82000000\\0\" \\
\"kloadaddr=0x80007fc0\\0\" \\
\"script_addr=0x81900000\\0\" \\
\"console=ttyO0,115200n8\\0\" \\
\"mmc_dev=0\\0\" \\
\"mmc_root=/dev/mmcblk0p2 rw\\0\" \\
\"nand_root=ubi0:rootfs rw ubi.mtd=7,2048\\0\" \\
\"spi_root=/dev/mtdblock4 rw\\0\" \\
\"nor_root=/dev/mtdblock3 rw\\0\" \\
\"mmc_root_fs_type=ext4 rootwait\\0\" \\
\"nand_root_fs_type=ubifs rootwait=1\\0\" \\
\"spi_root_fs_type=jffs2\\0\" \\
\"nor_root_fs_type=jffs2\\0\" \\
\"nand_src_addr=0x280000\\0\" \\
\"spi_src_addr=0x62000\\0\" \\
\"nor_src_addr=0x08080000\\0\" \\
\"nand_img_siz=0x500000\\0\" \\
\"spi_img_siz=0x380000\\0\" \\
\"nor_img_siz=0x280000\\0\" \\
\"spi_bus_no=0\\0\" \\
\"rootpath=/export/rootfs\\0\" \\
\"nfsopts=nolock\\0\" \\
\"static_ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}\" \\
\"::off\\0\" \\
\"ip_method=none\\0\" \\
\"bootenv=uEnv.txt\\0\" \\
\"loadbootenv=fatload mmc ${mmc_dev} ${loadaddr} ${bootenv}\\0\" \\
\"importbootenv=echo Importing environment from mmc ...; \" \\
\"env import -t $loadaddr $filesize\\0\" \\
\"mmc_load_uimage=fatload mmc ${mmc_dev} ${kloadaddr} ${bootfile}\\0\" \\
\"optargs=\\0\" \\
\"bootargs_defaults=setenv bootargs \" \\
\"console=${console} \" \\
\"${optargs}\\0\" \\
\"mmc_args=run bootargs_defaults;\" \\
\"setenv bootargs ${bootargs} \" \\
\"root=${mmc_root} \" \\
\"rootfstype=${mmc_root_fs_type} ip=${ip_method}\\0\" \\
\"nand_args=run bootargs_defaults;\" \\
\"setenv bootargs ${bootargs} \" \\
\"root=${nand_root} noinitrd \" \\
\"rootfstype=${nand_root_fs_type} ip=${ip_method}\\0\" \\
\"spi_args=run bootargs_defaults;\" \\
\"setenv bootargs ${bootargs} \" \\
\"root=${spi_root} \" \\
\"rootfstype=${spi_root_fs_type} ip=${ip_method}\\0\" \\
\"nor_args=run bootargs_defaults;\" \\
\"setenv bootargs ${bootargs} \" \\
\"root={nor_root} \" \\
\"rootfstype=${nor_root_fs_type} ip=${ip_method}\\0\" \\
\"net_args=run bootargs_defaults;\" \\
\"setenv bootargs ${bootargs} \" \\
\"root=/dev/nfs \" \\
\"nfsroot=${serverip}:${rootpath},${nfsopts} rw \" \\
\"ip=dhcp\\0\" \\
\"mmc_boot=run mmc_args; \" \\
\"run mmc_load_uimage; \" \\
\"bootm ${kloadaddr}\\0\" \\
\"nand_boot=echo Booting from nand ...; \" \\
\"run nand_args; \" \\
\"nandecc hw 2; \" \\
\"nand read.i ${kloadaddr} ${nand_src_addr} ${nand_img_siz}; \" \\
\"bootm ${kloadaddr}\\0\" \\
\"spi_boot=echo Booting from spi ...; \" \\
\"run spi_args; \" \\
\"sf probe ${spi_bus_no}:0; \" \\
\"sf read ${kloadaddr} ${spi_src_addr} ${spi_img_siz}; \" \\
\"bootm ${kloadaddr}\\0\" \\
\"nor_boot=echo Booting from NOR ...; \" \\
\"run nor_args; \" \\
\"cp.b ${0x08080000} ${kloadaddr} ${nor_img_siz}; \" \\
\"bootm ${kloadaddr}\\0\" \\
\"net_boot=echo Booting from network ...; \" \\
\"setenv autoload no; \" \\
\"dhcp; \" \\
\"tftp ${kloadaddr} ${bootfile}; \" \\
\"run net_args; \" \\
\"bootm ${kloadaddr}\\0\" \\[/code]
\"mmc_root_fs_type=ext3 rootwait\\0\" \\ 改为
\"mmc_root_fs_type=ext4 rootwait\\0\" \\
大功告成!成功启动。
本文来自论坛,点击查看完整帖子内容。