大家好!
我成功地用tf卡把emmc移植上了系统,也可以从emmc正常启动系统了。现在有这么一个问题:从emmc启动系统可以正常工作,但是下次设备没有插入tf卡的话,系统就无法进入到文件系统中,下面是没有tf卡的启动信息:
U-Boot SPL 2014.04-00014-g47880f5 (Apr 22 2014 – 13:23:54)
reading args
spl_load_image_fat_os: error reading image args, err – -1
reading u-boot.img
reading u-boot.img
U-Boot 2014.04-00014-g47880f5 (Apr 22 2014 – 13:23:54)
I2C: ready
DRAM: 512 MiB
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: 0gpio: pin 53 (gpio 53) value is 1
Card did not respond to voltage select!
mmc0(part 0) is current device
Card did not respond to voltage select!
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
mmc1(part 0) is current device
gpio: pin 54 (gpio 54) value is 1
SD/MMC found on device 1
reading uEnv.txt
1698 bytes read in 7 ms (236.3 KiB/s)
gpio: pin 55 (gpio 55) value is 1
Loaded environment from uEnv.txt
Importing environment from mmc …
Checking if uenvcmd is set …
gpio: pin 56 (gpio 56) value is 1
Running uenvcmd …
reading zImage
4382704 bytes read in 253 ms (16.5 MiB/s)
reading initrd.img
2957458 bytes read in 171 ms (16.5 MiB/s)
reading /dtbs/am335x-boneblack.dtb
25130 bytes read in 9 ms (2.7 MiB/s)
Kernel image @ 0x82000000 [ 0x000000 – 0x42dff0 ]
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
Using Device Tree in place at 88000000, end 88009229
Starting kernel …
Uncompressing Linux… done, booting the kernel.
[ 0.355834] omap2_mbox_probe: platform not supported
[ 0.362420] tps65217-bl tps65217-bl: no platform data provided
[ 0.426610] bone-capemgr bone_capemgr.9: slot #0: No cape found
[ 0.463719] bone-capemgr bone_capemgr.9: slot #1: No cape found
[ 0.500827] bone-capemgr bone_capemgr.9: slot #2: No cape found
[ 0.537936] bone-capemgr bone_capemgr.9: slot #3: No cape found
[ 0.556723] omap_hsmmc mmc.5: of_parse_phandle_with_args of 'reset' failed
[ 0.618254] pinctrl-single 44e10800.pinmux: pin 44e10854 already requested by 44e10800.pinmux; cannot claim for gpio-leds.8
[ 0.629962] pinctrl-single 44e10800.pinmux: pin-21 (gpio-leds.8) status -22
[ 0.637245] pinctrl-single 44e10800.pinmux: could not request pin 21 on device pinctrl-single
Loading, please wait…
modprobe: chdir(3.8.13): No such file or directory
Gave up waiting for root device. Common problems:
– Boot args (cat /proc/cmdline)
– Check rootdelay= (did the system wait long enough?)
– Check root= (did the system wait for the right device?)
– Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/mmcblk1p2 does not exist. Dropping to a shell!
modprobe: chdir(3.8.13): No such file or directory
modprobe: chdir(3.8.13): Žo such file or directory
modprobe: chdir(3.8.13): No such file or directory
modprobe: chdir(3.8.13): No such file or directory
modprobe: chdir(3.8.13): No such file or directory
modprobe: chdir(3.8.13): No such file or directory
BusyBox v1.20.2 (Debian 1:1.20.0-7) built-in shell (ash)
Enter 'help' for a list of built-in commands.
/bin/sh: can't access tty; job control turned off
(initramfs)
后来发现是环境变量的问题:板子的环境变量uEnv.txt中
“mmcroot=/dev/mmcblk1p2 ro”
进入系统后,将它改为
“mmcroot=/dev/mmcblk0p2 ro”,这样拔掉sd卡后就可以从emmc正常启动系统了。
但是,我想问的是:怎么能够让emmc默认是/dev/mmcblk0p2呢,不管加了什么其他的mmc设备都不会影响从emmc中正常的启动系统。
望赐教!!!
Jian Zhou:
这个需要修改内部MMC驱动,已经在另外的帖子里回复你了。
user4088306:
回复 Jian Zhou:
你好,请问是哪个帖子,请贴出链接,我也有这方面的需求,多谢~~~
Jian Zhou:
回复 user4088306:
MMC驱动会根据初始化顺序确定MMC驱动设备编号,如果要改动的话,需要修改MMC驱动。
Pippin Else:
回复 Jian Zhou:
您好我也需要这个链接