如果我从 shell 加载我自己的设备树覆盖,它加载正常,但如果我尝试在启动时加载它,它不会这样做。我错过了什么?
这是我使用 bone-debian-7.4-2014-04-23-2gb.img.xz
Linux beaglebone 3.8.13-bone47 #1 SMP Fri Apr 11 01:36:09 UTC 2014 armv7l GNU设置的 debian BeagleBone Black /Linux
这是我对 /boot/uboot/uEnv.txt 所做的更改:
optargs=capemgr.enable_partno=BB-FOO-GPIO
这是dmesg |的输出 grep 骨capemgr:
底板:'A335BNLT,00A5,4049BBBK7400'
compatible-baseboard=ti,beaglebone-black
slot #0: No cape found
slot #1: No Cape found
slot #2: No Cape found
slot #3: No Cape found
slot #4:特定覆盖
骨骼:在插槽 4 处使用覆盖 eeprom 数据
插槽 #4:'Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G'
插槽 #5:特定覆盖
骨骼:在插槽 4 处使用覆盖 eeprom 数据插槽 5
插槽 #5:'Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI'
插槽 #6:特定覆盖
骨骼:在插槽 6 上使用覆盖 eeprom 数据
插槽 #6:'Bone-Black-HDMIN, 00A0,德州仪器,BB-BONELT-HDMIN'
enabled_partno part_number 'BB-FOO-GPIO', version 'N/A', prio '0'
slot #7: generic override
bone: Using override eeprom data at slot 7
slot #7: 'Override Board Name,00A0,Override Manuf, BB-FOO-GPIO'
加载器:在 slot-4 之前 BB-BONE-EMMC-2G:00A0 (prio 1)
加载器:检查 slot-4 BB-BONE-EMMC-2G:00A0 (prio 1)
加载器:在 slot-5 之前BB-BONELT-HDMI:00A0 (prio 1)
loader: 检查 slot-5 BB-BONELT-HDMI:00A0 (prio 1)
loader: 在 slot-6 之前 BB-BONELT-HDMIN:00A0 (prio 2)
loader: 检查 slot- 6 BB-BONELT-HDMIN:00A0 (prio 2)
初始化正常。
加载程序:检查插槽 4 BB-BONE-EMMC-2G:00A0 (prio 1)
加载程序:检查插槽 5 BB-BONELT-HDMI:00A0 (prio 1)
加载程序:检查 slot-6 BB-BONELT-HDMIN:00A0 (prio 2)
加载程序:在 slot-7 之前 BB-FOO-GPIO:00A0 (prio 0)
加载程序:检查 slot-7 BB-FOO-GPIO:00A0 (prio 0 ) )
loader: 在 slot-7 BB-FOO-GPIO:00A0 (prio 0)
slot #7: Requesting part number/version based 'BB-FOO-GPIO-00A0.dtbo
slot #7: 请求固件 'BB-FOO-GPIO -00A0.dtbo' for board-name 'Override Board Name', version '00A0'
failed to load firmware 'BB-FOO-GPIO-00A0.dtbo'
loader: failed to load slot-7 BB-FOO-GPIO:00A0 ( prio 0)
loader: 检查 slot-6 BB-BONELT-HDMIN:00A0 (prio 2)
loader: 检查 slot-5 BB-BONELT-HDMI:00A0 (prio 1)
loader: 在 slot-5 BB-BONELT-HDMI:00A0 之后(优先 1)
插槽#5:为板名'Bone-Black-HDMI',版本'00A0'请求固件'cape-boneblack-hdmi-00A0.dtbo'
插槽#5:加载dtbo'cape-boneblack-hdmi-00A0.dtbo' ; 转换为活树
槽 #5:#4 覆盖
加载器:检查 slot-4 BB-BONE-EMMC-2G:00A0 (prio 1)
加载器:在 slot-4 BB-BONE-EMMC-2G:00A0 (prio 1)
槽之后#4:为板名“Bone-LT-eMMC-2G”、版本“00A0”
插槽请求固件“cape-bone-2g-emmc1.dtbo”#4:dtbo“cape-bone-2g-emmc1.dtbo”已加载;转换为活树
插槽#4:#2 覆盖
插槽#4:应用#2 覆盖。
加载器:完成 slot-4 BB-BONE-EMMC-2G:00A0 (prio 1)
加载器:检查 slot-6 BB-BONELT-HDMIN:
加载程序:完成 slot-5 BB-BONELT-HDMI:00A0 (prio 1)
加载程序:检查 slot-6 BB-BONELT-HDMIN:00A0 (prio 2)
加载程序:在 slot-6 之后 BB-BONELT-HDMIN:00A0 (prio 2 ) )
插槽 #6:请求固件 'cape-boneblack-hdmin-00A0.dtbo' 板名'Bone-Black-HDMIN',版本 '00A0'
插槽 #6: dtbo 'cape-boneblack-hdmin-00A0.dtbo'已加载;转换为 live tree
插槽 #6:BB-BONELT-HDMIN 冲突 P8.45 (#5:BB-BONELT-HDMI)
插槽 #6:验证
加载程序失败:无法加载 slot-6 BB-BONELT-HDMIN:00A0 (prio 2)
这是我的设备树覆盖的源文件:
/dts-v1/;
/plugin/;
/ {
compatible = "ti,beaglebone", "ti,beaglebone-black";
/* Identification */
part-number = "BB-FOO-GPIO";
version = "00A0";
/* Resources required */
exclusive-use =
"P9.27", /* XXX */
"P9.23", /* XXX */
"gpio3_19", /* XXX */
"gpio1_17"; /* XXX */
fragment@0 {
target = <&am33xx_pinmux>;
__overlay__ {
foo_gpio_pins: pinmux_gpio_helper_pins {
pinctrl-single,pins = <
0x1a4 0x0f /* P9.27 GPIO3_19: MODE7 - OUTPUT */
0x044 0x2f /* P9.23 GPIO1_17: MODE7 - INPUT */
>;
};
};
};
fragment@1 {
target = <&ocp>; /* On-chip Peripherals */
__overlay__ {
foo_gpio_helper {
compatible = "gpio-of-helper";
pinctrl-names = "default";
pinctrl-0 = <&foo_gpio_pins>;
status = "okay";
foo_test_output {
gpio-name = "foo_test_output";
gpio = <&gpio4 19 0x00>; /* gpio4 => GPIO-3 */
output;
init-high;
};
foo_test_input {
gpio-name = "foo_test_input";
gpio = <&gpio2 17 0x00>; /* gpio2 => GPIO-1 */
input;
count-rising-edge;
count-falling-edge;
};
};
};
};
};
~
(我是这样编译的:dtc -O dtb -o BB-FOO-GPIO-00A0.dtbo -b 0 -@ BB-FOO-GPIO-00A0.dts }
现在使用echo BB-FOO-GPIO > $SLOTS"手动加载它加载正常..
dmesg -c给我:
bone-capemgr bone_capemgr.9:part_number 'BB-FOO-GPIO',版本 'N/A'
bone-capemgr bone_capemgr.9:插槽 #8:通用覆盖
bone-capemgr bone_capemgr.9:骨骼:在插槽中使用覆盖 eeprom 数据8
bone-capemgr bone_capemgr.9:插槽 #8:'覆盖板名称,00A0,覆盖 Manuf,BB-FOO-GPIO'
bone-capemgr bone_capemgr.9:插槽 #8:请求基于部件号/版本的 'BB-FOO- GPIO-00A0.dtbo
bone-capemgr bone_capemgr.9:插槽 #8:请求固件“BB-FOO-GPIO-00A0.dtbo”以获取板名“覆盖板名”,版本“00A0”
bone-capemgr bone_capemgr.9:插槽#8:加载了 dtbo 'BB-FOO-GPIO-00A0.dtbo';转换为活树
bone-capemgr bone_capemgr.9: slot #8:
gpio-of-helper foo_gpio_helper.15:分配的 GPIO id=0
of_get_named_gpio_flags 以状态 115 退出
gpio-of-helper foo_gpio_helper.15:分配的 GPIO id=1
gpio-of-helper foo_gpio_helper.15:准备好
bone-capemgr bone_capemgr.9:插槽#8:应用#2 覆盖。
cat /sys/devices/bone_capemgr.9/slots给了我我想要的东西:
0: 54:PF---
1: 55:PF---
2: 56:PF---
3: 57:PF---
4: ff:POL Bone-LT-eMMC-2G,00A0,Texas Instrument, BB-BONE-EMMC-2G
5: ff:POL Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
8: ff:POL Override Board Name,00A0,Override Manuf,BB-FOO-GPIO
那么,我错过了什么?为什么它不会在启动时加载,但它会从 shell 加载?该问题似乎与未加载固件有关...我不明白。