beaglebone black开机禁止加载HDMI cape

一般情况下,beaglebone black自带系统Angstrom默认启动两个cape:
1、BB-BONE-EMMC-2G
2、BB-BONELT-HDMI

我们可以通过编辑uEnv.txt的文件来决定是否启动HDMI,步骤如下
1、加载启动分区:

mkdir /mnt/sdcard
mount /dev/mmcblk0p1  /mnt/card

2、编辑uEnv.txt

vim /mnt/card/uEnv.txt

文件内容如下

##These are needed to be compliant with Angstrom's 2013.06.20 u-boot.
loadaddr=0x82000000
fdtaddr=0x88000000
rdaddr=0x88080000

initrd_high=0xffffffff
fdt_high=0xffffffff

##These are needed to be compliant with Debian 2014-05-14 u-boot.

loadximage=load mmc 0:2 ${loadaddr} /boot/vmlinuz-${uname_r}
loadxfdt=load mmc 0:2 ${fdtaddr} /boot/dtbs/${uname_r}/${fdtfile}
loadxrd=load mmc 0:2 ${rdaddr} /boot/initrd.img-${uname_r}; setenv rdsize ${filesize}
loaduEnvtxt=load mmc 0:2 ${loadaddr} /boot/uEnv.txt ; env import -t ${loadaddr} ${filesize};
check_dtb=if test -n ${dtb}; then setenv fdtfile ${dtb};fi;
loadall=run loaduEnvtxt; run check_dtb; run loadximage; run loadxrd; run loadxfdt;

mmcargs=setenv bootargs console=tty0 console=${console} ${optargs} ${cape_disable} ${cape_enable} root=/dev/
mmcblk0p2 rootfstype=${mmcrootfstype} ${cmdline}

uenvcmd=run loadall; run mmcargs; bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr};

在”mmcargs=setenv…”一行插入以下语句

optargs=quiet capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN

保存,退出

3、重启

shutdown -r now

4、开机查看slots已经变成了这样:

root@beaglebone:~# cat $SLOTS 
 0: 54:PF--- 
 1: 55:PF--- 
 2: 56:PF--- 
 3: 57:PF--- 
 4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
 5: ff:P-O-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
 6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN
 7: ff:P-O-L Override Board Name,00A0,Override Manuf,bone_pwm_P8_45
 8: ff:P-O-L Override Board Name,00A0,Override Manuf,bone_pwm_P8_46
root@beaglebone:~# 

我的SLOTS为

root@beaglebone:~# echo $SLOTS 
/sys/devices/bone_capemgr.9/slots

5、结束

你可能感兴趣的:(开源硬件,嵌入式软件,嵌入式操作系统)