Making your own Cape Overlay for BeagleBone Black

I have been trying for WEEKS to create my own custom cape overlay based on BB-BONE-AUDI-02-00A0.dtbo.
I’ve only tested this on Bone Debian 8.7 lxgt, not the latest (I think is 9.5). I had an issue getting the cape to be loaded by bone_capemgr. Even rebuilding using the “make” in /opt/source/ I’m sure further digging in the forum would have given me the answer eventually. Here’s the steps REQUIRED, and I’ll explain the piece I was missing:

  1. Connect to your Beaglebone Black (Obviously).
  2. Create your .dts file and put it at /opt/source/ {Phew, long path. I know}
  3. Change directory:
    $ cd /opt/source/
  4. Run the following in Terminal:
    $ sudo make -d src/arm/.dtbo
    IF you get clock skew, run: $ sudo touch src/arm/* Redo the make.
    $ ./ (THIS IS THE PART I MISSED FOR WEEKS, it is required as it adds all the capes .dtbo to: /boot/initrd.img4.4.54-ti-r93, that have to match the cape being used at boot by the bone_capemgr)
  5. Make changes in /boot/uEnv.txt, specifically cape_enable=bone_capemgr.enable_partno=<your cape name here w/no .dtbo> example: BB-BONE-AUDI-02 Full file name is: BB-BONE-AUDI-02-00A0.dtbo
  6. Reboot and see if changes are implemented. Here’s some helpers:
    $ dmesg (shows bootup with overlay info and any issues)
    $ i2cdetect -r (shows all addresses on that bus. i2c bus = 0, 1, or 2)
    $ i2cdetect -l (Shows all i2c busses loaded)
    $ ls /dev/ (will show all devices and comms like SPI, I2C, USB that are active)
    $ sudo /opt/scripts/tools/ (shows overlays and capes active with additional info)

I’m going to try and perform the same thing on Bone Debian 9.5 and see if I can get it working. I may have to update the script to change 4.4.54 to 4.14.xx.
Please feel free to chime in or ask any questions. I just wanted to share my findings so far.