problems loading custom overlay and disabling BB-UART1.

I wanted to enable two custom overlays BB-UART1-RS485, BB-UART2-RS485 at boot.

To enable BB-UART1-RS485, I need to disable BB-UART1, to I added these lines to /boot/uEnv.txt

cape_disable=bone_capemgr.disable_partno=BB-UART1
cape_enable=bone_capemgr.enable_partno=BB-UART1-RS485,BB-UART2-RS485

When I reboot, there are attempts to load BB-UART1-RS485 and BB-UART2-RS485, but
only the attempt to load BB-UART1-RS485 fails.

[ 2.284859] bone_capemgr bone_capemgr: Baseboard: ‘A335BNLT,00C0,2716BBBK1C19’
[ 2.284916] bone_capemgr bone_capemgr: compatible-baseboard=ti,beaglebone-black - #slots=4
[ 2.324923] bone_capemgr bone_capemgr: Invalid signature ‘ffffffff’ at slot 0
[ 2.332414] bone_capemgr bone_capemgr: slot #0: No cape found
[ 2.376837] bone_capemgr bone_capemgr: slot #1: No cape found
[ 2.420834] bone_capemgr bone_capemgr: slot #2: No cape found
[ 2.464833] bone_capemgr bone_capemgr: slot #3: No cape found
[ 2.470895] bone_capemgr bone_capemgr: enabled_partno PARTNO ‘BB-UART1-RS485’ VER ‘N/A’ PR ‘0’
[ 2.470907] bone_capemgr bone_capemgr: slot #4: override
[ 2.470920] bone_capemgr bone_capemgr: Using override eeprom data at slot 4
[ 2.470935] bone_capemgr bone_capemgr: slot #4: ‘Override Board Name,00A0,Override Manuf,BB-UART1-RS485’
[ 2.471034] bone_capemgr bone_capemgr: enabled_partno PARTNO ‘BB-UART2-RS485’ VER ‘N/A’ PR ‘0’
[ 2.471045] bone_capemgr bone_capemgr: slot #5: override
[ 2.471056] bone_capemgr bone_capemgr: Using override eeprom data at slot 5
[ 2.471069] bone_capemgr bone_capemgr: slot #5: ‘Override Board Name,00A0,Override Manuf,BB-UART2-RS485’
[ 2.471443] bone_capemgr bone_capemgr: initialized OK.
[ 2.473391] PM: bootloader does not support rtc-only!
[ 2.474234] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:37:50 UTC (946687070)
[ 2.474261] of_cfs_init
[ 2.474364] of_cfs_init: OK
[ 2.482626] omap_uart 48024000.serial: no wakeirq for uart2
[ 2.485050] 48024000.serial: ttyO2 at MMIO 0x48024000 (irq = 187, base_baud = 3000000) is a OMAP UART2
[ 2.485624] bone_capemgr bone_capemgr: slot #5: dtbo ‘BB-UART2-RS485-00A0.dtbo’ loaded; overlay id #0
[ 2.486405] PM: Hibernation image not present or could not be loaded.
[ 3.489130] bone_capemgr bone_capemgr: loader: failed to load slot-4 BB-UART1-RS485:00A0 (prio 0)
[ 5.589966] EXT4-fs (mmcblk1p1): mounted filesystem with ordered data mode. Opts: (null)

… at some time later, something (not me) tries to load BB-UART1

[ 9.330248] bone_capemgr bone_capemgr: part_number ‘BB-UART1’, version ‘N/A’
[ 9.330280] bone_capemgr bone_capemgr: slot #6: override
[ 9.330296] bone_capemgr bone_capemgr: Using override eeprom data at slot 6
[ 9.330312] bone_capemgr bone_capemgr: slot #6: ‘Override Board Name,00A0,Override Manuf,BB-UART1’
[ 9.348185] omap_uart 48022000.serial: no wakeirq for uart1
[ 9.363130] 48022000.serial: ttyO1 at MMIO 0x48022000 (irq = 188, base_baud = 3000000) is a OMAP UART1
[ 9.366396] bone_capemgr bone_capemgr: slot #6: dtbo ‘BB-UART1-00A0.dtbo’ loaded; overlay id #1

… I tried to load BB-UART1-RS485 while BB-UART1 was loaded, to check the symptoms

[ 319.949361] bone_capemgr bone_capemgr: part_number ‘BB-UART1-RS485’, version ‘N/A’
[ 319.949397] bone_capemgr bone_capemgr: slot #7: override
[ 319.949413] bone_capemgr bone_capemgr: Using override eeprom data at slot 7
[ 319.949429] bone_capemgr bone_capemgr: slot #7: ‘Override Board Name,00A0,Override Manuf,BB-UART1-RS485’
[ 319.951146] bone_capemgr bone_capemgr: slot #7: BB-UART1-RS485 conflict P9.24 (#6:BB-UART1)
[ 319.960040] bone_capemgr bone_capemgr: slot #7: Failed verification

… I then removed BB-UART1

[ 343.829338] bone_capemgr bone_capemgr: Removed slot #6

… And tried to load BB-UART1-RS485, which succeeded

[ 345.580484] bone_capemgr bone_capemgr: part_number ‘BB-UART1-RS485’, version ‘N/A’
[ 345.580518] bone_capemgr bone_capemgr: slot #8: override
[ 345.580534] bone_capemgr bone_capemgr: Using override eeprom data at slot 8
[ 345.580550] bone_capemgr bone_capemgr: slot #8: ‘Override Board Name,00A0,Override Manuf,BB-UART1-RS485’
[ 345.589660] omap_uart 48022000.serial: no wakeirq for uart1
[ 345.593608] 48022000.serial: ttyO1 at MMIO 0x48022000 (irq = 188, base_baud = 3000000) is a OMAP UART1
[ 345.594399] bone_capemgr bone_capemgr: slot #8: dtbo ‘BB-UART1-RS485-00A0.dtbo’ loaded; overlay id #1

Questions:

  • what could be causing BB-UART1-RS485 to fail during boot, but succeed later on when I manually load it?
  • what system component might be causing BB-UART1 to load “by itself”? how do I prevent this happening?

jon.

Partially answering my own questions…

  • what could be causing BB-UART1-RS485 to fail during boot, but succeed later on when I manually load it?

This question is still open.

  • what system component might be causing BB-UART1 to load “by itself”? how do I prevent this happening?

The configuration in /etc/default/capemgr was causing BB-UART1 to be loaded. If I changed that to CAPE=BB-UART1-RS485, then the 2nd attempt to load BB-UART1-RS485 succeeds. This probably provides me with the workaround I need, but I am still curious to understand why the overlay fails to load when I specify it as a boot argument, but loads later on.

jon.