Skip to content

Overlay

Friedemann Stoffregen edited this page Aug 7, 2018 · 1 revision

DTO (Device Tree Overlays)

General Info

Device Tree Overlays are used for the configuration of BeagleBone's pins. There are several predefined Overlays for different purposes. The BeagleBoom has one single Overlay for both the Inputs and the ADC / PRU.

You can find a great explanation to the structure and usage of DTOs at Adafruit or in Derek Molloy's great book "Exploring BeagleBone: Tools and Techniques for Building with Embedded Linux".

Compiling DTOs

The BeagleBone distributions (we assume Debian in this project) already is shipped with the needed DTO-Compiler. To recompile the .dts-file, simply run:

dtc -O dtb -o SAMPLER-GPIO-00A0.dtbo -b 0 -@ SAMPLER-GPIO.dts
  • -O dtb defines the output format. In this case __d__evice __t__ree __b__inaries.
  • -o is the output filename.
  • -b 0 is used for the CPU selection
  • -@ is needed for the dynamic loading of the device tree.

After the compiler finishes, you should copy the .dtbo-file to the correct directory:

cp SAMPLER-GPIO-00A0.dtbo /lib/firmware

(Or simply run the pru/overlay/build.sh script )

Activating DTOs

We assume that you are using a current Debian image for the BeagleBone. Thus, loading the overlays as Kernel Overlays is not supported. You should load the overlay using the U-Boot infrastructure (you can skip this, if you used our BeagleBoom ready-to-go installation Script):

Edit the following lines in /boot/uEnv.txt:

enable_uboot_overlays=1
[...]
dtb_overlay=/lib/firmware/SAMPLER-GPIO-00A0.dtbo
# disable these capes, we don't need them
disable_uboot_overlay_emmc=1
disable_uboot_overlay_video=1
disable_uboot_overlay_audio=1
disable_uboot_overlay_wireless=1
disable_uboot_overlay_adc=1

After rebooting the BeagleBone, the overlay shall be loaded.

Clone this wiki locally