Capemgr finding .dtbo files that don't exist!

Okay, I'm really confused. 4.1.4-ti-r9 is finding non-existent .dtbo files. I've searched the entire filesystem for the file, deleted all traces of it, but I can still do this:

    echo BB-ENABLE-PRU > $SLOTS

And it not only finds something to load, it loads an old version of it! It seems to have cached it somewhere, but where?

Sep 25 03:59:42 beaglebone kernel: [ 7759.936788] bone_capemgr bone_capemgr: part_number 'BB-ENABLE-PRU', version 'N/A'
Sep 25 03:59:42 beaglebone kernel: [ 7759.936833] bone_capemgr bone_capemgr: slot #29: override
Sep 25 03:59:42 beaglebone kernel: [ 7759.936851] bone_capemgr bone_capemgr: Using override eeprom data at slot 29
Sep 25 03:59:42 beaglebone kernel: [ 7759.936869] bone_capemgr bone_capemgr: slot #29: 'Override Board Name,00A0,Override Manuf,BB-ENABLE-PRU'
Sep 25 03:59:42 beaglebone kernel: [ 7759.937000] bone_capemgr: bone_capemgr bone_capemgr: slot #29: Requesting part number/version based 'BB-ENABLE-PRU-00A0.dtbo
Sep 25 03:59:42 beaglebone kernel: [ 7759.937020] bone_capemgr: bone_capemgr bone_capemgr: slot #29: Requesting firmware 'BB-ENABLE-PRU-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
Sep 25 03:59:42 beaglebone kernel: [ 7759.937043] bone_capemgr: bone_capemgr bone_capemgr: slot #29: dtbo 'BB-ENABLE-PRU-00A0.dtbo' loaded; converting to live tree
Sep 25 03:59:42 beaglebone kernel: [ 7759.950037] gpiolib_of: of_get_named_gpiod_flags: can't parse 'gpio-reset' property of node '/ocp/i2c@4819c000/tlv320aic3104@18[0]'
Sep 25 03:59:42 beaglebone kernel: [ 7759.950084] core: tlv320aic3x-codec 2-0018: Looking up IOVDD-supply from device tree
Sep 25 03:59:42 beaglebone kernel: [ 7759.955301] core: tlv320aic3x-codec 2-0018: Looking up DVDD-supply from device tree
Sep 25 03:59:42 beaglebone kernel: [ 7759.955728] core: tlv320aic3x-codec 2-0018: Looking up AVDD-supply from device tree
Sep 25 03:59:42 beaglebone kernel: [ 7759.956022] core: tlv320aic3x-codec 2-0018: Looking up DRVDD-supply from device tree
Sep 25 03:59:42 beaglebone kernel: [ 7759.956300] snd_soc_core: tlv320aic3x-codec 2-0018: codec register 2-0018
Sep 25 03:59:42 beaglebone kernel: [ 7759.956339] snd_soc_core: tlv320aic3x-codec 2-0018: ASoC: dai register 2-0018 #1
Sep 25 03:59:42 beaglebone kernel: [ 7759.956354] snd_soc_core: tlv320aic3x-codec 2-0018: ASoC: Registered DAI 'tlv320aic3x-hifi'
Sep 25 03:59:42 beaglebone kernel: [ 7759.956371] snd_soc_core: tlv320aic3x-codec 2-0018: ASoC: Registered codec 'tlv320aic3x-codec.2-0018'
Sep 25 03:59:42 beaglebone kernel: [ 7759.956384] ------------[ cut here ]------------
Sep 25 03:59:42 beaglebone kernel: [ 7759.956412] WARNING: CPU: 0 PID: 564 at lib/list_debug.c:29 __list_add+0x7c/0xe0()
Sep 25 03:59:42 beaglebone kernel: [ 7759.956422] list_add corruption. next->prev should be prev (bf230198), but was ddbbe618. (next=ddbbe618).
Sep 25 03:59:42 beaglebone kernel: [ 7759.956431] Modules linked in: binfmt_misc ti_am335x_adc kfifo_buf industrialio ti_am335x_tsc snd_soc_davinci_mcasp snd_soc_edma ti_am335x_tscadc snd_soc_tlv320aic3x usb_f_ecm g_ether usb_f_rndis u_ether libcomposite arc4 rtl8192cu rtl_usb rtl8192c_common rtlwifi mac80211 cfg80211 rfkill omap_rng rng_core uio_pdrv_genirq uio_pruss uio
Sep 25 03:59:42 beaglebone kernel: [ 7759.956553] CPU: 0 PID: 564 Comm: bash Tainted: G W 4.1.4-ti-r9 #1
Sep 25 03:59:42 beaglebone kernel: [ 7759.956562] Hardware name: Generic AM33XX (Flattened Device Tree)
Sep 25 03:59:42 beaglebone kernel: [ 7759.956604] [<c001a5b0>] (unwind_backtrace) from [<c0014b38>] (show_stack+0x20/0x24)
Sep 25 03:59:42 beaglebone kernel: [ 7759.956634] [<c0014b38>] (show_stack) from [<c09aede4>] (dump_stack+0x8c/0xcc)
Sep 25 03:59:42 beaglebone kernel: [ 7759.956661] [<c09aede4>] (dump_stack) from [<c00476f4>] (warn_slowpath_common+0x98/0xc8)
Sep 25 03:59:42 beaglebone kernel: [ 7759.956678] [<c00476f4>] (warn_slowpath_common) from [<c0047764>] (warn_slowpath_fmt+0x40/0x48)
Sep 25 03:59:42 beaglebone kernel: [ 7759.956693] [<c0047764>] (warn_slowpath_fmt) from [<c052c834>] (__list_add+0x7c/0xe0)
Sep 25 03:59:42 beaglebone kernel: [ 7759.956735] [<c052c834>] (__list_add) from [<bf22a1d0>] (aic3x_i2c_probe+0x1f0/0x328 [snd_soc_tlv320aic3x])
Sep 25 03:59:42 beaglebone kernel: [ 7759.956764] [<bf22a1d0>] (aic3x_i2c_probe [snd_soc_tlv320aic3x]) from [<c079554c>] (i2c_device_probe+0x11c/0x184)
Sep 25 03:59:42 beaglebone kernel: [ 7759.956786] [<c079554c>] (i2c_device_probe) from [<c0651934>] (driver_probe_device+0x20c/0x438)
Sep 25 03:59:42 beaglebone kernel: [ 7759.956803] [<c0651934>] (driver_probe_device) from [<c0651bb0>] (__device_attach+0x50/0x54)
Sep 25 03:59:42 beaglebone kernel: [ 7759.956817] [<c0651bb0>] (__device_attach) from [<c064f904>] (bus_for_each_drv+0x74/0xa8)
Sep 25 03:59:42 beaglebone kernel: [ 7759.956832] [<c064f904>] (bus_for_each_drv) from [<c06516b0>] (device_attach+0x84/0x98)
Sep 25 03:59:42 beaglebone kernel: [ 7759.956845] [<c06516b0>] (device_attach) from [<c0650b18>] (bus_probe_device+0x94/0xb8)
Sep 25 03:59:42 beaglebone kernel: [ 7759.956870] [<c0650b18>] (bus_probe_device) from [<c064e8f4>] (device_add+0x44c/0x5e4)
Sep 25 03:59:42 beaglebone kernel: [ 7759.956885] [<c064e8f4>] (device_add) from [<c064eab0>] (device_register+0x24/0x28)
Sep 25 03:59:42 beaglebone kernel: [ 7759.956902] [<c064eab0>] (device_register) from [<c0797be0>] (i2c_new_device+0x14c/0x1e0)
Sep 25 03:59:42 beaglebone kernel: [ 7759.956918] [<c0797be0>] (i2c_new_device) from [<c0798120>] (of_i2c_register_device+0x120/0x1d8)
Sep 25 03:59:42 beaglebone kernel: [ 7759.956933] [<c0798120>] (of_i2c_register_device) from [<c0798288>] (of_i2c_notify+0xb0/0x104)
Sep 25 03:59:42 beaglebone kernel: [ 7759.956951] [<c0798288>] (of_i2c_notify) from [<c006656c>] (notifier_call_chain+0x54/0x94)
Sep 25 03:59:42 beaglebone kernel: [ 7759.956968] [<c006656c>] (notifier_call_chain) from [<c00669ec>] (__blocking_notifier_call_chain+0x58/0x70)
Sep 25 03:59:42 beaglebone kernel: [ 7759.956984] [<c00669ec>] (__blocking_notifier_call_chain) from [<c0066a2c>] (blocking_notifier_call_chain+0x28/0x30)
Sep 25 03:59:42 beaglebone kernel: [ 7759.957011] [<c0066a2c>] (blocking_notifier_call_chain) from [<c07f9cc0>] (__of_changeset_entry_notify+0x94/0xf0)
Sep 25 03:59:42 beaglebone kernel: [ 7759.957029] [<c07f9cc0>] (__of_changeset_entry_notify) from [<c07fa63c>] (of_changeset_apply+0x88/0x150)
Sep 25 03:59:42 beaglebone kernel: [ 7759.957050] [<c07fa63c>] (of_changeset_apply) from [<c080063c>] (__of_overlay_create+0x31c/0x4dc)
Sep 25 03:59:42 beaglebone kernel: [ 7759.957066] [<c080063c>] (__of_overlay_create) from [<c080081c>] (of_overlay_create+0x20/0x24)
Sep 25 03:59:42 beaglebone kernel: [ 7759.957084] [<c080081c>] (of_overlay_create) from [<c0673d64>] (capemgr_load_slot+0x3c4/0x5b0)
Sep 25 03:59:42 beaglebone kernel: [ 7759.957100] [<c0673d64>] (capemgr_load_slot) from [<c06746c0>] (slots_store+0x138/0x308)
Sep 25 03:59:42 beaglebone kernel: [ 7759.957116] [<c06746c0>] (slots_store) from [<c064c83c>] (dev_attr_store+0x28/0x34)
Sep 25 03:59:42 beaglebone kernel: [ 7759.957141] [<c064c83c>] (dev_attr_store) from [<c0212958>] (sysfs_kf_write+0x54/0x58)
Sep 25 03:59:42 beaglebone kernel: [ 7759.957158] [<c0212958>] (sysfs_kf_write) from [<c0211d28>] (kernfs_fop_write+0xc8/0x1ac)
Sep 25 03:59:42 beaglebone kernel: [ 7759.957181] [<c0211d28>] (kernfs_fop_write) from [<c019f890>] (__vfs_write+0x34/0xe8)
Sep 25 03:59:42 beaglebone kernel: [ 7759.957198] [<c019f890>] (__vfs_write) from [<c01a01a8>] (vfs_write+0xa0/0x1a8)
Sep 25 03:59:42 beaglebone kernel: [ 7759.957213] [<c01a01a8>] (vfs_write) from [<c01a0b18>] (SyS_write+0x54/0xb0)
Sep 25 03:59:42 beaglebone kernel: [ 7759.957236] [<c01a0b18>] (SyS_write) from [<c00109c0>] (ret_fast_syscall+0x0/0x3c)
Sep 25 03:59:42 beaglebone kernel: [ 7759.957248] ---[ end trace 33445276d56cbfd2 ]---
Sep 25 03:59:42 beaglebone kernel: [ 7759.958562] core: pinctrl core: add 1 pinmux maps
Sep 25 03:59:42 beaglebone kernel: [ 7759.958631] core: pinctrl-single 44e10800.pinmux: found group selector 17 for pinmux_podtique_audio_pins
Sep 25 03:59:42 beaglebone kernel: [ 7759.958655] pinmux: pinctrl-single 44e10800.pinmux: request pin 107 (44e109ac.0) for 48038000.mcasp
Sep 25 03:59:42 beaglebone kernel: [ 7759.958670] pinmux: pinctrl-single 44e10800.pinmux: request pin 103 (44e1099c.0) for 48038000.mcasp
Sep 25 03:59:42 beaglebone kernel: [ 7759.958682] pinmux: pinctrl-single 44e10800.pinmux: request pin 101 (44e10994.0) for 48038000.mcasp
Sep 25 03:59:42 beaglebone kernel: [ 7759.958695] pinmux: pinctrl-single 44e10800.pinmux: request pin 100 (44e10990.0) for 48038000.mcasp
Sep 25 03:59:42 beaglebone kernel: [ 7759.958708] pinmux: pinctrl-single 44e10800.pinmux: request pin 102 (44e10998.0) for 48038000.mcasp
Sep 25 03:59:42 beaglebone kernel: [ 7759.958722] pinctrl_single: pinctrl-single 44e10800.pinmux: enabling pinmux_podtique_audio_pins function17
Sep 25 03:59:42 beaglebone kernel: [ 7759.973617] snd_soc_core: davinci-mcasp 48038000.mcasp: ASoC: dai register 48038000.mcasp #1
Sep 25 03:59:42 beaglebone kernel: [ 7759.973653] snd_soc_core: davinci-mcasp 48038000.mcasp: ASoC: Registered DAI '48038000.mcasp'
Sep 25 03:59:42 beaglebone kernel: [ 7759.973814] snd_soc_core: davinci-mcasp 48038000.mcasp: ASoC: Registered platform '48038000.mcasp'
Sep 25 03:59:42 beaglebone kernel: [ 7759.976062] pruss_uio 4a300000.pruss: pins are not configured from the driver
Sep 25 03:59:42 beaglebone kernel: [ 7759.993807] bone_capemgr bone_capemgr: slot #29: dtbo 'BB-ENABLE-PRU-00A0.dtbo' loaded; overlay id #4

So, I'm definitely seeing that for a given overlay name echoed to $SLOTS, once loaded, capemgr won't load it again if it changes. It pretends to, but the device tree it creates is identical to what it did before. I have to reboot to be able to see changes.

I don't know if this is expected behavior or not, or if I'm doing something wrong somewhere, but I've made more progress since starting to reboot for every change than I have in the two days before.

Needless to say, having to reboot kinda takes the fun out of capemgr.

Any ideas? 4.1.4-ti-r9.

Your actually fighting the initramfs..

https://github.com/beagleboard/bb.org-overlays/blob/master/install.sh#L51-L57

Once you run the ./install.sh all built *.dtbo's get copied into the
initramfs. So your fighting the older version.

Regards,

Huh. I don't think I ran that script (I just copied the resulting .dtbos to /lib/firmware). But, is that somehow getting my own .dtbo into initramfs transparently? I build it with my own commands, and copy it from my build dir to /lib/firmware with cp…

Your actually fighting the initramfs..

bb.org-overlays/install.sh at master · beagleboard/bb.org-overlays · GitHub

Once you run the ./install.sh all built *.dtbo's get copied into the
initramfs. So your fighting the older version.

Huh. I don't think I ran that script (I just copied the resulting .dtbos to /lib/firmware). But, is that somehow getting my own .dtbo into initramfs transparently? I build it with my own commands, and copy it from my build dir to /lib/firmware with cp…

Hum, how odd... it must be caching it..???

Regards,

I don't even have an initramfs that I can see, but I don't understand how it works (is it a mounted filesystem like any other?). However, examining the /boot/initrd.* images, I see evidence of my dtbos in there. Decompiling one shows a very old version.

Here's where it gets weird. The overlay that gets loaded is always the first one that's in /lib/firmware after boot. After that, any updates I make to the dtbo in /lib/firmware is ignored, but the file must be present. But no changes to the file are applied unless I reboot first. That is, it always reloads the same device tree as the first one it loaded after boot.

Anyway, that's how it was working last night. Today it's very different.

Now if I load my overlay after boot, it's okay. I also seem to be able to unload it. But if I try to load it again, the echo operation hangs, I get a little bit written to kern.log, and then the system has to be rebooted.

In other words, I don't seem to be unload and reload my overlay.

FWIW, here's kern.log:

Sep 25 22:31:32 beaglebone kernel: [ 81.807032] bone_capemgr bone_capemgr: part_number 'BB-ENABLE-PRU', version 'N/A'
Sep 25 22:31:32 beaglebone kernel: [ 81.807075] bone_capemgr bone_capemgr: slot #4: override
Sep 25 22:31:32 beaglebone kernel: [ 81.807093] bone_capemgr bone_capemgr: Using override eeprom data at slot 4
Sep 25 22:31:32 beaglebone kernel: [ 81.807111] bone_capemgr bone_capemgr: slot #4: 'Override Board Name,00A0,Override Manuf,BB-ENABLE-PRU'
Sep 25 22:31:32 beaglebone kernel: [ 81.807243] bone_capemgr: bone_capemgr bone_capemgr: slot #4: Requesting part number/version based 'BB-ENABLE-PRU-00A0.dtbo
Sep 25 22:31:32 beaglebone kernel: [ 81.807262] bone_capemgr: bone_capemgr bone_capemgr: slot #4: Requesting firmware 'BB-ENABLE-PRU-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
Sep 25 22:31:32 beaglebone kernel: [ 81.808388] bone_capemgr: bone_capemgr bone_capemgr: slot #4: dtbo 'BB-ENABLE-PRU-00A0.dtbo' loaded; converting to live tree
Sep 25 22:31:32 beaglebone kernel: [ 81.823270] gpio-of-helper ocp:gpio_helper: ready
Sep 25 22:31:32 beaglebone kernel: [ 81.823968] gpiolib_of: of_get_named_gpiod_flags: parsed 'gpio' property of node '//fixedregulator@1[0]' - status (0)
Sep 25 22:31:32 beaglebone kernel: [ 81.824255] core: lz-codec-reg: no parameters
Sep 25 22:31:32 beaglebone kernel: [ 81.824359] fixed: reg-fixed-voltage fixedregulator@1: lz-codec-reg supplying 0uV
Sep 25 22:31:32 beaglebone kernel: [ 81.828165] pruss_uio 4a300000.pruss: pins are not configured from the driver
Sep 25 22:31:32 beaglebone kernel: [ 81.843539] bone_capemgr bone_capemgr: slot #4: dtbo 'BB-ENABLE-PRU-00A0.dtbo' loaded; overlay id #0
Sep 25 22:31:32 beaglebone kernel: [ 81.887501] gpiolib_of: of_get_named_gpiod_flags: parsed 'gpio-reset' property of node '/ocp/i2c@4819c000/tlv320aic3104@0[0]' - status (0)
Sep 25 22:31:32 beaglebone kernel: [ 81.887563] core: tlv320aic3x-codec 2-0018: Looking up IOVDD-supply from device tree
Sep 25 22:31:32 beaglebone kernel: [ 81.887649] core: tlv320aic3x-codec 2-0018: Looking up DVDD-supply from device tree
Sep 25 22:31:32 beaglebone kernel: [ 81.887723] core: tlv320aic3x-codec 2-0018: Looking up AVDD-supply from device tree
Sep 25 22:31:32 beaglebone kernel: [ 81.887799] core: tlv320aic3x-codec 2-0018: Looking up DRVDD-supply from device tree
Sep 25 22:31:32 beaglebone kernel: [ 81.887859] snd_soc_core: tlv320aic3x-codec 2-0018: codec register 2-0018
Sep 25 22:31:32 beaglebone kernel: [ 81.887893] snd_soc_core: tlv320aic3x-codec 2-0018: ASoC: dai register 2-0018 #1
Sep 25 22:31:32 beaglebone kernel: [ 81.887907] snd_soc_core: tlv320aic3x-codec 2-0018: ASoC: Registered DAI 'tlv320aic3x-hifi'
Sep 25 22:31:32 beaglebone kernel: [ 81.887924] snd_soc_core: tlv320aic3x-codec 2-0018: ASoC: Registered codec 'tlv320aic3x-codec.2-0018'
Sep 25 22:31:32 beaglebone kernel: [ 81.913081] snd_soc_core: davinci-mcasp 48038000.mcasp: ASoC: dai register 48038000.mcasp #1
Sep 25 22:31:32 beaglebone kernel: [ 81.913116] snd_soc_core: davinci-mcasp 48038000.mcasp: ASoC: Registered DAI '48038000.mcasp'
Sep 25 22:31:32 beaglebone kernel: [ 81.913272] snd_soc_core: davinci-mcasp 48038000.mcasp: ASoC: Registered platform '48038000.mcasp'
Sep 25 22:31:58 beaglebone kernel: [ 107.714782] snd_soc_core: davinci-mcasp 48038000.mcasp: ASoC: Unregistered platform '48038000.mcasp'
Sep 25 22:31:58 beaglebone kernel: [ 107.714841] snd_soc_core: davinci-mcasp 48038000.mcasp: ASoC: Unregistered DAI '48038000.mcasp'
Sep 25 22:31:58 beaglebone kernel: [ 107.715468] snd_soc_core: tlv320aic3x-codec 2-0018: ASoC: Unregistered codec 'tlv320aic3x-codec.2-0018'
Sep 25 22:31:58 beaglebone kernel: [ 107.715492] snd_soc_core: tlv320aic3x-codec 2-0018: ASoC: Unregistered DAI 'tlv320aic3x-hifi'
Sep 25 22:31:58 beaglebone kernel: [ 107.715506] snd_soc_core: tlv320aic3x-codec 2-0018: ASoC: Destroying cache for tlv320aic3x-codec.2-0018 codec
Sep 25 22:31:58 beaglebone kernel: [ 107.716446] gpio-of-helper ocp:gpio_helper: removing
Sep 25 22:31:58 beaglebone kernel: [ 107.716716] bone_capemgr bone_capemgr: Removed slot #4

Sep 25 22:32:04 beaglebone kernel: [ 113.611744] bone_capemgr bone_capemgr: part_number 'BB-ENABLE-PRU', version 'N/A'
Sep 25 22:32:04 beaglebone kernel: [ 113.611786] bone_capemgr bone_capemgr: slot #5: override
Sep 25 22:32:04 beaglebone kernel: [ 113.611804] bone_capemgr bone_capemgr: Using override eeprom data at slot 5
Sep 25 22:32:04 beaglebone kernel: [ 113.611821] bone_capemgr bone_capemgr: slot #5: 'Override Board Name,00A0,Override Manuf,BB-ENABLE-PRU'
Sep 25 22:32:04 beaglebone kernel: [ 113.611954] bone_capemgr: bone_capemgr bone_capemgr: slot #5: Requesting part number/version based 'BB-ENABLE-PRU-00A0.dtbo
Sep 25 22:32:04 beaglebone kernel: [ 113.611973] bone_capemgr: bone_capemgr bone_capemgr: slot #5: Requesting firmware 'BB-ENABLE-PRU-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
Sep 25 22:32:04 beaglebone kernel: [ 113.611995] bone_capemgr: bone_capemgr bone_capemgr: slot #5: dtbo 'BB-ENABLE-PRU-00A0.dtbo' loaded; converting to live tree
Sep 25 22:32:04 beaglebone kernel: [ 113.630195] gpio-of-helper ocp:gpio_helper: ready
Sep 25 22:32:04 beaglebone kernel: [ 113.630869] gpiolib_of: of_get_named_gpiod_flags: parsed 'gpio' property of node '//fixedregulator@1[0]' - status (0)
Sep 25 22:32:04 beaglebone kernel: [ 113.631139] core: lz-codec-reg: no parameters
Sep 25 22:32:04 beaglebone kernel: [ 113.631244] fixed: reg-fixed-voltage fixedregulator@1: lz-codec-reg supplying 0uV
Sep 25 22:32:04 beaglebone kernel: [ 113.631926] gpiolib_of: of_get_named_gpiod_flags: parsed 'gpio-reset' property of node '/ocp/i2c@4819c000/tlv320aic3104@0[0]' - status (0)