Hidden device tree location

So, I'm running the latest RCN Machinekit distribution that according to the docs includes the ValentFX Logibone device-tree as part of the kernel. By some magic that I don't yet understand it magically appears in the slots file /sys/devices/bone_capemgr.9/slots after boot. That's cool.


But, I need to change it. Trouble is, I can't find it. It's not in /lib/firmware where all good device trees are supposed to reside.

If I try to unload it ( BB-LOGIBONE-BB) by typing echo -0 > $SLOTS see Malloy pg 225, all hell breaks loose, the kernel crashes, it's not pretty. So I've no choice, got to go to the source and load a different device-tree. Is it perchance on the boards EEPROM? In fact having done a search of the whole file system it certainly doesn't show up as a file, at least with a very generic search term.

Curious, actually I'm well past that, more like frustrated to blindness.




Comments

  • OK So I've found my way to Jonathan's patch file within the RCN kernel build directory.

    I'm left with a set of choices each with pros and cons --

    The most desirable would simply to unload the existing .dtb  and reload the device tree I propose to use, test it, and then when I'm happy with it modify the kernel code so that I've got the convenience of having a complete kernel I can load when needed. Trouble is, unloading the device-tree that was loaded at boot crashes the system. Is there a trick?

    OR I could just load, say an Android distribution, prove out the new device-tree, then go back to the release I want to use "Machinekit". However, I really like the machinekit distro.

    OR Disable the automatic loading of the Logibone device-tree at boot. Does anyone know which init.d?

    Any advice?


  • Hi,

    to get auto loading of the device-tree overlay for a given beaglebone cape, the device-tree must reside in the kernel itself and not in lib/firmware. This is why the device-tree configuration does not appear in lib/firmware. To change the deveice-tree configuration, you must re-compile the kernel with your patch deice-tree configuration and then just update the kernel file (uImage) on your distribution filesystem.

    A way is to disable auto-loading of the cape by wiping clear the identification eeprom of the cape and then load you own device-tree configuration (dtb) manually. To do this you can take the init_eeprom script from logi-tools (https://github.com/fpga-logi/logi-tools/blob/master/init_logibone/init_eeprom.sh) and replace :

    cat data.eeprom > /sys/bus/i2c/drivers/at24/1-0054/eeprom

    with

    dd if=/dev/zero of=/sys/bus/i2c/drivers/at24/1-0054/eeprom bs=1 count=256


    This should zero the eeprom and allow you to load your device tree overlay manually. When you have a working overlay i advise to recompile the kernel with it and restore the eeprom content.

    Regards,

    Jonathan Piat
    cybin
Sign In or Register to comment.