Preload Device Tree Overlays?

Hi @drewcovi,

I was curious about the device type you use(RPi, Beaglebone etc.).

Assuming you are using a RPi the steps to include the dtbo in your image would be the following:

  1. Download an RPi image from the dashboard

  2. Extract the image archive

  3. Create a loop device from your image
    sudo losetup -fP balena-name-image.img

  4. Mount the boot partition of your image
    mkdir tmp-mount
    sudo mount /dev/loop0p1 tmp-mount

  5. Copy the dtbo in the boot partition
    cp hyperpixel4.dtbo tmp-mount/overlays

  6. Edit the config.txt file from the tmp-mount/ folder as you wish

  7. Unmount the boot partition
    sudo umount tmp-mount

  8. Remove the loop device partitions
    sudo losetup -D

Now the extracted image contains your modifications on the boot partition. You can flash it.

2 Likes