This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM335X: Compile DTB without kernel modules

Part Number: PROCESSOR-SDK-AM335X

Hi,

I am using AM335X SDK version 6.0.0.3 on the Beaglebone Black. I have two slightly related questions:

1. I am finding that whenever I have to make a small change to the DTS (and then compiling into DTB), I have to recompile the kernel AND kernel modules. Is this necessary? Am I doing something incorrect? For example, I will first add a output gpio pin into the am335x-boneblack.DTS, and then compile into DTB, then the DTB in the rootfs/boot/ folder of the SD card. However, I won't see that output turn on until I have recompiled the kernel, DTB, and kernel modules. It feels very awkward to have go through ~40 minutes of waiting for everything to build just for a gpio change in the DTS.

2. Is there any way to view the device tree from user-space to confirm that the gpio change has been made? I've simply been using a multimeter/LED to view the output state change. 

Thanks,

Sabeeh

  • Hello Sabeeh,

    You should not need to recompile your kernel and kernel modules every time you make a minor dts change. Are you doing a make clean (which would delete the built kernel) before you make the devicetree files? Or are you leaving the kernel outputs alone, and just running a make on the devicetree files?

    The devicetree settings at boot time can be viewed with
    cat /proc/device-tree/path

    e.g., to see if SPI1 was enabled or disabled at boot time,
    cat /proc/device-tree/ocp/spi\@48030000/status

    Note that if you change settings during runtime, they will not be reflected in /proc/device-tree.

    You can also view which devicetree file was used during boot with 
    cat /proc/device-tree/model

    Regards,

    Nick

  • Hey Nick,

    I'm just running a make on the device tree files, as is followed in the SDK kernel user's guide:

    ```make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabihf- am335x-boneblack.dtb```

    I'll experiment further to see what I may doing wrong, I've had to do this for a few months now.