I am working on a custom device tree overlay. I have done these for years on BBB but when trying to do it on a Raspberry Pi I am running into some trouble.
I use Buildroot packages to do this so it is nicely contained.
Either way I cannot get fwup to find the file with an error like: fwup: can’t open path ‘$(NERVES_SYSTEM)/images/rpi-firmware/overlays/sv-gateway-01.dtbo’ in file-resource ‘sv-gateway-01.dtbo’
Anyone created custom overlays for Pi systems willing to let me in on the correct incantation?
It appears the issue may be that the package is not compiling…
I am doing everything the same as when adding a custom package to a BBB system. Since there are no custom Buildroot packages already in a Pi system is there an extra step?
I created: package directory
added source “$NERVES_DEFCONFIG_DIR/package/extra-leds-dts/Config.in” to Config.in
I even added package to package_files/0 in the mix.exs file to make sure it was used in the hash
I am using the same package layout as I am on the BBB just changing the dts file to be Pi specific
I am seeing the package appear in the menuconfig and selecting it is adding it to nerves_defconfig but when conducting the compile I don’t see it in the list with all the legal info gathering like I do in the BBB system.
Without seeing the code, it’s hard to say for sure, but my bet is that there’s a typo in the extra-leds-dts.mk file since I do that frequently. Maybe run make extra-leds-dts-rebuild to see or look for the build directory.
Having said that, I have a couple things:
If you want the dtbo to be in the images directory, check out the Buildroot docs for $(BINARIES_DIR), but I’d copy to a different directory from the rpi-firmware package’s output directory. I’d probably just put it in the root images directory if it’s only one file.
If you want the Raspberry Pi bootloader to load the dtbo, you’ll need to update the config.txt as well. That seems to be the path you’re going down.
If your extra LEDs can wait to be initialized at runtime, I’d load the overlay at runtime using the dtoverlay program. I’d also compile your overlay as part of your Elixir project and put the .dtbo in a priv directory so there’s nothing you need to do with Buildroot or Nerves Systems at all.