unable to find overlay

I’m building the balena os to include my custom layer. I’m building and placing the dtbo in /boot/overlays/ and then writing the path in uEnv.txt_internal hower on boot I get an error that the overlay is not found. When I ssh into the device the overlays are present so I’m guessing the reference in the uEnv.txt_internal is wrong. What is the correct syntax to use?

mmc1(part 0) is current device
SD/MMC found on device 1
1303 bytes read in 1 ms (1.2 MiB/s)
Loaded env from uEnv.txt
Importing environment from …
switch to partitions #0, OK
mmc1(part 0) is current device
] …: [enable_uboot_overlays=1
] …: [enable_uboot_cape_universal=1
debug: [uboot_base_dtb_univ=am335x-bonegreen-wireless-uboot-univ.dtb] …
uboot_overlays: [uboot_base_dtb=am335x-bonegreen-wireless-uboot-univ.dtb] …
debug: unable to find [am335x-bonegreen-wireless-uboot-univ.dtb] using [am335x-boneblack-uboot.dtb] instead …
debug: [uboot_base_dtb_univ=am335x-boneblack-uboot.dtb] …
uboot_overlays: [uboot_base_dtb=am335x-boneblack-uboot.dtb] …
uboot_overlays: Switching too: dtb=am335x-boneblack-uboot.dtb …
loading /boot/am335x-boneblack-uboot.dtb …
91852 bytes read in 45 ms (1.9 MiB/s)
uboot_overlays: [fdt_buffer=0x60000] …
]…t_overlays: unable to find [mmc 1:2 /boot/overlays/customoverlay.dtbo
]…t_overlays: unable to find [mmc 1:2 /boot/overlays/BB-CAN0-00A0.dtbo
]…t_overlays: unable to find [mmc 1:2 /boot/overlays/BB-CAN1-00A0.dtbo
uboot_overlays: loading /boot/overlays/BB-BONE-eMMC1-01-00A0.dtbo …
1584 bytes read in 165 ms (8.8 KiB/s)
uboot_overlays: loading /boot/overlays/BB-BBGW-WL1835-00A0.dtbo …
4785 bytes read in 173 ms (26.4 KiB/s)
uboot_overlays: loading /boot/overlays/BB-ADC-00A0.dtbo …
867 bytes read in 164 ms (4.9 KiB/s)
uboot_overlays: unable to find [mmc 1:2 /boot/overlays/univ-bbgw-EW-00A0.dtbo]…
SD/MMC found on device 1

The uEnv.txt_internal should look something like:

enable_uboot_overlays=1
uboot_overlay_addr0=/boot/overlays/your_dtbo.dtbo

From the logs you pasted I can see BB-CAN0-00A0 can’t be found either, but eMMC1-01-00A0 and WL1835 are found and loaded, so check on your board if the overlays you added are present on the board in /boot/overlays/your_custom.dtbo, also in /mnt/sysroot/active/current/boot/

Yes, this is my uEnv.txt_internal

enable_uboot_overlays=1

uboot_overlay_addr0=/boot/overlays/customoverlay.dtbo
uboot_overlay_addr1=/boot/overlays/BB-CAN0-00A0.dtbo
uboot_overlay_addr2=/boot/overlays/BB-CAN1-00A0.dtbo

disable_uboot_overlay_video=1
disable_uboot_overlay_audio=1

###Cape Universal Enable
enable_uboot_cape_universal=1

and from ssh I can see that all 3 overlays are present in /boot/overlays/ also in /mnt/sysroot/active/current/boot/overlays (symbolic link)

Are you able to stop in u-boot cmdline and check with

ls mmc 1:2 boot/
ls mmc 1:2 boot/overlays/

if the overlays you need are there, or at least which ones are present? I recall checking CAN overlays on 2.56.0 and 2.58 and they were loading properly, wonder if your additional yocto layer could have anything to do with this.

I tried a 2.58.3+rev1 build from the dashboard, with your configuration but without the custom overlay:

enable_uboot_overlays=1

uboot_overlay_addr0=/boot/overlays/BB-CAN0-00A0.dtbo
uboot_overlay_addr1=/boot/overlays/BB-CAN1-00A0.dtbo

disable_uboot_overlay_video=1
disable_uboot_overlay_audio=1
enable_uboot_cape_universal=1

And these overlays are found and loaded:

uboot_overlays: Switching too: dtb=am335x-boneblack-uboot.dtb ...
loading /boot/am335x-boneblack-uboot.dtb ...
91617 bytes read in 49 ms (1.8 MiB/s)
uboot_overlays: [fdt_buffer=0x60000] ...
uboot_overlays: loading /boot/overlays/M-BB-BBG-00A0.dtbo ...
423 bytes read in 52 ms (7.8 KiB/s)
uboot_overlays: loading /boot/overlays/BB-CAN0-00A0.dtbo ...
1198 bytes read in 66 ms (17.6 KiB/s)
uboot_overlays: loading /boot/overlays/BB-CAN1-00A0.dtbo ...
1198 bytes read in 245 ms (3.9 KiB/s)
uboot_overlays: loading /boot/overlays/BB-BONE-eMMC1-01-00A0.dtbo ...
1584 bytes read in 209 ms (6.8 KiB/s)
uboot_overlays: loading /boot/overlays/BB-ADC-00A0.dtbo ...
867 bytes read in 67 ms (11.7 KiB/s)

This makes me think there might be a problem with your rootfs, so checking what u-boot finds in that location should reveal if that’s a problem.

To stop in u-boot cmdline you need to set OS_DEV_UBOOT_DELAY=1 in your local.conf or layer.conf before building the image. It is used here.

1 Like

overlays seem to be present. … :confused:

U-Boot 2018.11-dirty (Nov 27 2020 - 15:31:42 +0000)

CPU : AM335X-GP rev 2.1
I2C: ready
DRAM: 512 MiB
No match for driver ‘omap_hsmmc’
No match for driver ‘omap_hsmmc’
Some drivers were not found
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: External.
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4… Card did not respond to voltage select!
Board: BeagleBone Black
not set. Validating first E-fuse MAC
BeagleBone Black:
Model: SeeedStudio BeagleBone Green Wireless:
Timed out in wait_for_event: status=0000
Check if pads/pull-ups of bus are properly configured
BeagleBone: cape eeprom: i2c_probe: 0x54:
Timed out in wait_for_event: status=0000
Check if pads/pull-ups of bus are properly configured
BeagleBone: cape eeprom: i2c_probe: 0x55:
Timed out in wait_for_event: status=0000
Check if pads/pull-ups of bus are properly configured
BeagleBone: cape eeprom: i2c_probe: 0x56:
Timed out in wait_for_event: status=0000
Check if pads/pull-ups of bus are properly configured
BeagleBone: cape eeprom: i2c_probe: 0x57:
Net: eth0: MII MODE
Could not get PHY for cpsw: addr 0
cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
=> ls mmc 1:2 boot/

1024 . 1024 .. 13578752 zImage 8192 overlays 94091 am335x-bonegreen-wireless.dtb 91816 am335x-bone.dtb 91852 am335x-boneblack-uboot.dtb 92143 am335x-bonegreen.dtb 94128 am335x-boneblack.dtb 87874 am335x-boneblue.dtb 95950 am335x-boneblack-wireless.dtb 10088196 init 9 storage-driver => ls mmc 1:2 boot/overlays 8192 . 1024 .. 2106 PB-SPI1-OLEDB-CLICK.dtbo 7027 BB-BONE-LCD7-01-00A2.dtbo 1611 BB-I2C1-RTC-PCF8563.dtbo 528 PB-I2C2-ACCEL-TECHLAB-CAPE.dtbo 1573 PB-SPI0-MICROSD-CLICK.dtbo 2481 BBORG_LOAD-00A2.dtbo 4806 BB-BONE-4D7N-01-00A1.dtbo 2694 BB-BONE-REACH-00B0.dtbo 479 AM335X-I2C1-400-00A0.dtbo 1300 BB-I2C2-FAST-00A0.dtbo 2011 BB-mBC3-RTC-5-CLICK.dtbo 3929 BBAI_BB-BONE-FACE-8CH-00A0.dtbo 1211 BB-UART1-00A0.dtbo 537 AM335X-20-00A0.dtbo 3522 bb-justboom-dac-00A0.dtbo 934 BB-mBC4-RTC-6-CLICK.dtbo 1023 BB-UART2-00A1.dtbo 896 BBBLUE-MPU9250-00A0.dtbo 5978 BB-BONE-4D4R-01-00A1.dtbo 2121 cape-bone-mrf24j40-00A0.dtbo 1222 BB-BONE-SERL-03-00A1.dtbo 759 BB-BONE-WTHR-01-00B0.dtbo 2289 BB-mBC4-ETH-WIZ-CLICK.dtbo 2179 BBAI_BBORG_COMMS-00A2.dtbo 3801 AM335X-PRU-RPROC-4-19-TI-00A0.dtbo 1950 BB-RELAY-4PORT-00A0.dtbo 5966 BB-BONE-4D7C-01-00A1.dtbo 1301 BBAI_TEMPLATE.dtbo 1489 BB-SPI0-MCP3008-00A0.dtbo 7045 BB-BONE-LCD4-01-00A1.dtbo 541 uio_pruss_enable-00A0.dtbo 3068 NL-AB-BBBC-00D0.dtbo 994 PB-PWM-TIMER-P1.20.dtbo 598 OSD3358-00A0.dtbo 1939 BBORG_RELAY-00A2.dtbo 4268 GHI-TH-NH7C-00A0.dtbo 4598 BB-BBGW-WL1835-1BIT-00A0.dtbo 1594 BB-mBC4-UART4-TESEO-LIV3F.dtbo 1245 BB-W1-P9.12-00A0.dtbo 1573 PB-SPI1-MICROSD-CLICK.dtbo 1931 M-BB-BBGG-00A0.dtbo 1509 BB-UART4-RS485-00A0.dtbo 1198 PB-CAN1-00A0.dtbo 5258 DLPDLCR2000-00A0.dtbo 4806 BB-BONE-4D5N-01-00A1.dtbo 3964 BB-BBBMINI-00A0.dtbo 1528 BB-PWM1-00A0.dtbo 994 PB-PWM-TIMER-P1.26.dtbo 1198 BB-CAN1-00A0.dtbo 934 BB-mBC3-RTC-6-CLICK.dtbo 5305 AM335X-PRU-RPROC-4-14-TI-PRUCAPE-00A0.dtbo 780 PB-I2C2-RTC-CLICK.dtbo 5978 BB-BONE-4D5R-01-00A1.dtbo 3522 bb-justboom-amp-00A0.dtbo 4543 BW-ICE40Cape-00A0.dtbo 527 PB-I2C1-WEATHER-CLICK.dtbo 688 BB-I2C2-BME280.dtbo 2292 BB-mBC4-ETH-CLICK.dtbo 2085 BB-mBC3-ETH-CLICK.dtbo 541 EEPROM.dtbo 994 PB-PWM-TIMER-P1.28.dtbo 479 AM335X-I2C2-400-00A0.dtbo 7330 BB-VIEW-LCD4-01-00A0.dtbo 3906 cape-bone-ibb-00A0.dtbo 7673 BB-BONE-REPLICAP-0A4A.dtbo 2001 PB-SPI1-RTC-5-CLICK.dtbo 2274 BB-mBC2-RTC-5-CLICK.dtbo 9830 BBORG_GAMEPUP-00A2.dtbo 1650 BB-mBC2-UART1-TESEO-LIV3F.dtbo 2210 MCP2515-SPI0.dtbo 5447 BB-BONE-WL1837-00A0.dtbo 4860 DVK530-LCD4-01-00A0.dtbo 1211 BB-UART4-00A0.dtbo 2245 cape-CBB-Serial-r01.dtbo 698 BB-I2C2-VL53L0X.dtbo 4915 BB-HDMI-TDA998x-00A0.dtbo 694 BB-I2C2-SHT3X.dtbo 5563 BB-BONE-NH7C-01-A0.dtbo 785 BB-I2C2-RTC-DS1338.dtbo 4221 BBORG_TECHLAB-00A2.dtbo 4323 BW-ICE40CapeV2-00A0.dtbo 7834 RoboticsCape-00A0.dtbo 4273 GHI-TH-NH43C-00A0.dtbo 1226 PB-UART4-GNSS-5-CLICK.dtbo 2289 BB-mBC1-ETH-WIZ-CLICK.dtbo 782 PB-I2C1-RTC-PCF8523.dtbo 1275 BBBLUE-GP0-SPI-00A0.dtbo 955 BB-GPIO-P9813.dtbo 2230 GHI-LCD-00A0.dtbo 1287 BB-I2C2-00A0.dtbo 3331 seeed-4mic-voicecard-00A0.dtbo 3671 GHI-TH-NH43R-00A0.dtbo 5492 BB-GREEN-HDMI-00A0.dtbo 1213 PB-I2C1-MPU-9DOF-CLICK.dtbo 1613 bone_eqep1-00A0.dtbo 2218 BB-mBC1-RTC-5-CLICK.dtbo 982 BB-mBC2-RTC-6-CLICK.dtbo 2304 BB-I2C1-PCA9685-00A0.dtbo 1346 BB-UART2-RTSCTS-00A0.dtbo 1721 BB-SPI0-MCP23S08-00A0.dtbo 4806 BB-BONE-4D4N-01-00A1.dtbo 3503 BB-BONE-DVID-01-00A3.dtbo 8361 ACME-revB.dtbo 370 BB-I2C2N-00A0.dtbo 994 PB-PWM-TIMER-P2.27.dtbo 3322 BBAI_BBORG_MOTOR-00A2.dtbo 1597 bone_eqep0-00A0.dtbo 4784 PB-MIKROBUS-1.dtbo 3169 BBORG_SERVO-00A2.dtbo 7000 BB-BONE-LCD3-01-00A2.dtbo 2878 BB-NHDMI-TDA998x-00A0.dtbo 3645 AM335X-PRU-RPROC-4-14-TI-00A0.dtbo 2505 BBORG_PROTO-00A2.dtbo 1261 BB-UART1-RTSCTS-00A0.dtbo 2106 PB-SPI0-OLEDB-CLICK.dtbo 2345 BB-mBC2-ETH-WIZ-CLICK.dtbo 2348 BB-mBC2-ETH-CLICK.dtbo 2001 PB-SPI0-RTC-5-CLICK.dtbo 1211 BB-UART5-00A0.dtbo 1510 BB-SPI0-ADS8688-0A00.dtbo 1589 PB-UART4-TESEO-LIV3F.dtbo 6038 BB-GATEWAY-WL1837-00A0.dtbo 867 BB-ADC-00A0.dtbo 1584 BB-BONE-eMMC1-01-00A0.dtbo 688 BB-I2C1-BME280.dtbo 2387 BBAI_BBORG_RELAY-00A2.dtbo 791 BB-I2C2-RTC-MCP7940X.dtbo 5227 BB-CAPE-DISP-CT4-00A0.dtbo 1145 BB-PWM-TIMER-P8.10.dtbo 1145 BB-PWM-TIMER-P8.09.dtbo 4785 BB-BBGW-WL1835-00A0.dtbo 1614 bone_eqep2b-00A0.dtbo 5823 GHI-DB-NH5C-00A0.dtbo 2591 bb-justboom-digi-00A0.dtbo 2472 SDS-CAPE-00A0.dtbo 1261 BB-UART4-RTSCTS-00A0.dtbo 6001 BB-BONE-4D5C-01-00A1.dtbo 1147 BB-UART3-00A0.dtbo 2292 BB-mBC1-ETH-CLICK.dtbo 780 PB-I2C1-RTC-CLICK.dtbo 2216 BB-RTC-01-00A0.dtbo 2508 PB-SPI0-OLEDC-CLICK.dtbo 1600 BB-I2C2-PCF8523-00A0.dtbo 2075 PB-SPI1-ETH-CLICK.dtbo 1365 am33xx_pwm-00A0.dtbo 255 PB-USB1-PERIPHERAL.dtbo 951 M-BB-OSD3358-SM-RED-00A0.dtbo 790 PB-I2C2-RTC-6-CLICK.dtbo 1145 BB-PWM-TIMER-P8.07.dtbo 5791 BB-BONE-LCD5-01-00A1.dtbo 2181 BBBLUE-UDA1334-00A0.dtbo 5053 BB-CTAG-SW-8CH-00A0.dtbo 2061 PB-SPI1-ETH-WIZ-CLICK.dtbo 1213 PB-I2C2-MPU-9DOF-CLICK.dtbo 3064 BB-BONE-REACH-00A0.dtbo 423 M-BB-BBG-00A0.dtbo 1702 BBORG_COMMS-00A2.dtbo 790 PB-I2C1-RTC-6-CLICK.dtbo 710 BB-I2C2-LIS331DLH.dtbo 3504 BB-BBGG-WL1835-00A0.dtbo 1198 BB-CAN0-00A0.dtbo 698 BB-I2C2-ADXL34X.dtbo 247 PB-USB1-OTG.dtbo 2939 BBORG_MOTOR-00A2.dtbo 1408 BB-GPIO-GROVE-BUTTON.dtbo 527 PB-I2C2-WEATHER-CLICK.dtbo 3470 BB-BONE-BACONE-00A0.dtbo 5508 BBAI_BB-BONE-LCD7-01-00A2.dtbo 3820 BB-CTAG-SW-16CH-00A0.dtbo 8519 BEAGLEBOY-0013.dtbo 1890 PB-SPI1-THUNDER-CLICK.dtbo 1300 BB-I2C1-FAST-00A0.dtbo 1709 BB-SPIDEV1-00A0.dtbo 962 BB-GPIO-HCSR04.dtbo 8031 BB-BONE-REPLICAP-00B1.dtbo 1287 BB-I2C1-00A0.dtbo 1198 PB-CAN0-00A0.dtbo 884 beaglelogic-00A0.dtbo 7330 BB-VIEW-LCD7-01-00A0.dtbo 8011 BB-BONE-REPLICAP-00B2.dtbo 917 PB-PWM-RGB-TECHLAB-CAPE.dtbo 1613 bone_eqep2-00A0.dtbo 6213 BBAI_BB-BONE-LCD4-01-00A1.dtbo 949 BB-I2C2-RTC-DS3231.dtbo 785 BB-I2C2-RTC-DS1307.dtbo 1685 BB-SPIDEV0-00A0.dtbo 7673 BB-BONE-REPLICAP-00A4.dtbo 1538 customoverlay.dtbo 8101 BB-BONE-REPLICAP-0B3A.dtbo 2082 BB-mBC3-ETH-WIZ-CLICK.dtbo 2075 PB-SPI0-ETH-CLICK.dtbo 688 BB-I2C2-MPR121.dtbo 1261 BB-UART5-RTSCTS-00A0.dtbo 5737 BB-BONE-LCD7-01-00A1.dtbo 5453 AM335X-PRU-RPROC-4-19-TI-PRUCAPE-00A0.dtbo 5516 BBAI_BB-BONE-LCD7-01-00A3.dtbo 5330 BB-HDMI-CEC-TDA998x-00A0.dtbo 4091 NL-AB-BBCL-00B0.dtbo 5966 BB-BONE-4D4C-01-00A1.dtbo 994 PB-PWM-TIMER-P2.31.dtbo 934 BB-mBC1-RTC-6-CLICK.dtbo 13484 BBIM-00A0.dtbo 2835 PB-I2C1-TLV320AIC3104.dtbo 782 PB-I2C2-RTC-PCF8523.dtbo 3346 PB-MCP2515-SPI1.dtbo 3558 BBORG_DISPLAY18-00A2.dtbo 3435 PB-SPI1-7SEG-TECHLAB-CAPE.dtbo 9102 BB-BELA-B2.dtbo 702 BB-I2C1-JHD1802.dtbo 1528 BB-PWM2-00A0.dtbo 1552 BB-UART4-E-INK.dtbo 251 PB-USB0-HOST.dtbo 1039 BB-GPIO-GROVE-LED.dtbo 1528 BB-PWM0-00A0.dtbo 1145 BB-PWM-TIMER-P8.08.dtbo 820 PB-UART4-GNSS-4-CLICK.dtbo 2508 PB-SPI1-OLEDC-CLICK.dtbo 2198 BB-SPI0-AT86RF233-00A0.dtbo 1142 BB-P9_27-LED-00A0.dtbo 5978 BB-BONE-4D7R-01-00A1.dtbo 2231 BB-I2C1-MCP7940X-00A0.dtbo 1211 BB-UART2-00A0.dtbo 1188 dev-USB-PWR-CTL-00A1.dtbo 3595 BB-LCD-ADAFRUIT-18-SPI1-00A0.dtbo 1890 PB-SPI0-THUNDER-CLICK.dtbo 5574 BBORG_DISPLAY70-00A2.dtbo 7045 BB-BONE-LCD7-01-00A3.dtbo 4714 PB-MIKROBUS-0.dtbo 2061 PB-SPI0-ETH-WIZ-CLICK.dtbo 3614 BB-BONE-AUDI-02-00A0.dtbo 8011 BB-BONE-REPLICAP-00B3.dtbo 1594 BB-mBC3-UART1-TESEO-LIV3F.dtbo 1752 PB-eqep2.dtbo 1013 AM335X-PRU-UIO-00A0.dtbo 4156 BB-BBBW-WL1835-00A0.dtbo 1829 BB-BONE-CRYPTO-00A0.dtbo

I assume the dtb was added in your build and was not copied manually. If so, you can share a github with your repository and we can try do a custom build like you do. Also specify what yocto machine you are using.

yes the dtb and uEnv.txt_internal where added during the build.
You can see the code here: https://github.com/fencer/balena-beaglebone (i’ve also included the bblayers.conf and local.conf).
I’m building for beaglebone-green-wifi

Ok, we’ll try build that repo and let you know.

Hi,

I suspect you started a build with aufs and then switched the storage to overlay2 for the beagle green wifi, and the resulting build got corrupt. I commented out the balena_storage you switched in your local.conf and did a build from scratch, and can see your overlays get loaded:

uboot_overlays: [fdt_buffer=0x60000] ...
uboot_overlays: loading /boot/overlays/wetpits-00A0.dtbo ...
1532 bytes read in 172 ms (7.8 KiB/s)
uboot_overlays: loading /boot/overlays/BB-CAN0-00A0.dtbo ...
1198 bytes read in 288 ms (3.9 KiB/s)
uboot_overlays: loading /boot/overlays/BB-CAN1-00A0.dtbo ...
1198 bytes read in 293 ms (3.9 KiB/s)
uboot_overlays: loading /boot/overlays/BB-BONE-eMMC1-01-00A0.dtbo ...
1584 bytes read in 149 ms (9.8 KiB/s)
uboot_overlays: loading /boot/overlays/BB-BBGW-WL1835-00A0.dtbo ...
4785 bytes read in 81 ms (57.6 KiB/s)
uboot_overlays: loading /boot/overlays/BB-ADC-00A0.dtbo ...
867 bytes read in 186 ms (3.9 KiB/s)
867 bytes read in 186 ms (3.9 KiB/s)
uboot_overlays: cape universal disabled, external cape enabled or detected...
SD/MMC found on device 1
13672960 bytes read in 902 ms (14.5 MiB/s)
## Flattened Device Tree blob at 88000000
Booting using the fdt blob at 0x88000000
reserving fdt memory region: addr=88000000 size=78000
Loading Device Tree to 8ff85000, end 8fffffff ... OK

I switched to overlay2 because it isn’t supported on the latest docker. I will try to downgrade.

Looks like that did the trick! Still need to do some further testing but at least I do not get the error that it cannot find the overlay :smiley: