To start with, navigate into /lib/firmware to view all of the device tree overlays available by default.
root@beaglebone:~# cd /lib/firmware root@beaglebone:/lib/firmware# ls -ltr total 888 ...
Open any of the source files to view their contents. The overlays themselves are fairly descriptive, and well commented.
Let's use the BB-UART1-00A0.dts that we walked through on the previous page.
We could view the .dts file, but we already know what it contains. Let's take advantage of the fact that there's already a compiled .dtbo file available to us. We'll build and compile one of our own in a future section.
Ok, let's next navigate to where we can view which overlays are enabled by the bone cape manager:
root@beaglebone:/lib/firmware# cd /sys/devices/bone_capemgr.*
Next up, cat the contents of the slots file:
root@beaglebone:/sys/devices/bone_capemgr.8# 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-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
If you were to now export another overlay, such as our favorite UART1 overlay, you would see a new option listed as number 6. Let's try that by exporting the UART1 dtbo file:
root@beaglebone:/sys/devices/bone_capemgr.8# echo BB-UART1 > slots
root@beaglebone:/sys/devices/bone_capemgr.8# 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-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI 6: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-UART1
You can export it by executing the following command:
root@beaglebone:/sys/devices/bone_capemgr.8# echo -6 > slots
One thing to note. As of the 6-20-2013 release of Angstrom, unloading various overlays can cause a kernel panic, and cause you to lose your ssh session, along with making the capemgr unpredictable. It's recommended to just restart your system to unload overlays until that issue is resolved.
Now that we know that restarting the system will cause the overlays to unload, how do we have them loaded when the system boots up?
This is fairly simple to do. All you need to do is reference them in the uEnv.txt in the small FAT partition on your BeagleBone Black.
The following steps illustrate how to do this for the UART1 overlay:
mkdir /mnt/boot mount /dev/mmcblk0p1 /mnt/boot nano /mnt/boot/uEnv.txt #append this to the end of the single line of uEnv.txt (not on a new line): capemgr.enable_partno=BB-UART1