ADC/SPI/PRU on BeagleBone Green (Black)

Hi All,
I’m playing with BeagleBone Green (based on BeagleBone Black) and trying to figure out how to use PRU and other hardware functions. However, I got a bit stuck.

What have I done so far?

For example, I tried loading the ADC overlay (the command returned 0):
cmd("fw_setenv uboot_overlay_addr4 /lib/firmware/BB-ADC-00A0.dtbo")

But the directory /sys/bus/iio/devices/ remained empty.

The same thing with SPI and PRU.

I also tried adding the lines to livebook/config/provisioning.conf, for example:
uboot_setenv(uboot-env, "uboot_overlay_addr4", "/lib/firmware/BB-ADC-00A0.dtbo")

And then I called mix deps.get and mix firmware (and burn), but that didn’t change anything.

Any ideas what I might be doing wrong?
Thanks

Update:

I tried adding all uboot_setenv(...) directly to the livebook/config/provisioning.conf:

uboot_setenv(uboot-env, "enable_uboot_overlays", "1")

uboot_setenv(uboot-env, "uboot_overlay_addr4", "/lib/firmware/BB-ADC-00A0.dtbo")
uboot_setenv(uboot-env, "uboot_overlay_addr5", "/lib/firmware/BB-SPIDEV0-00A0.dtbo")
uboot_setenv(uboot-env, "uboot_overlay_pru", "/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo")

uboot_setenv(uboot-env, "enable_uboot_cape_universal", "1")

But this breaks everything. The application doesn’t seem to start up.
The only line that doesn’t break it is uboot_setenv(uboot-env, "enable_uboot_overlays", "1"), but it also doesn’t help

Alright, I think I got it.

First, I was wrong about enable_uboot_overlays. It actually does something!
After calling the command

cmd("fw_setenv enable_uboot_overlays 1")

and rebooting; PWM, SPI, and an additional I2C interface appeared under devices.

However, PRU dtb versions 4.14, 4.19, and UIO would still break the system.
After a bit of digging, it appears that it might be related to the kernel version. 4.14/19 is the Linux kernel version with which the corresponding PRU dtb works. However, the latest kernel is 5.xx (?).

I haven’t tested it yet, but I probably have to use uio_pruss_enable-00A0