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.

Linux/AM3358: Pinmux DTSI to Processor SDK workflow?

Part Number: AM3358

Tool/software: Linux

With Device Trees, there seems to be a thousand different references to modify and edit them, but I'm struggling trying to get the toolchains lined up. Is there any documentation which shows a workflow to allow: 

Pinmux .dtsi generation >> Merge into a 'generic' DTS file >> Processor SDK compilation >> Processor SDK installation (Yocto custom layer)

Failing the joined-up approach, can you point to any specific references on building the DTS within the processor SDK (the kernel pages reference it, but I tihnk they're from an old version as the function calls don't match the latest release)?

Can anyone help?

Mat

  • Hi Mathew,

    For building AM335x DTS file, please refer to the below user guide:

    software-dl.ti.com/.../Foundational_Components_Kernel_Users_Guide.html

    Compiling the Device Tree Binaries

    Installing the Kernel Image and Device Tree Binaries


    Regards,
    Pavel
  • Thanks Pavel,

    I agree this page is the 'holy grail' for kernels and DTBs, but unless I'm going mad,  none of the make examples work on the latest SDK (05.03.00.07). Having checked the Makefile, all the targets have changed and it doesn't seem to allow me to build individual dtbs anymore.  Can you confirm this at your end (to prove I'm not going mad)?

    Mat

  • Mathew,

    I tried to build DTB file for AM335x TI EVM and the process is successful. I have some warnings, but the result is am335x-evm.dtb file.

    I follow the instructions and execute below commands:

    host:{PSDK}/board-support/linux-4.14.79+gitAUTOINC+e669d52447-ge669d52447$ export PATH={PSDK}/linux-devkit/sysroots/x86_64-arago-linux/usr/bin:$PATH
    host:{PSDK}/board-support/linux-4.14.79+gitAUTOINC+e669d52447-ge669d52447$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- distclean
    host:{PSDK}/board-support/linux-4.14.79+gitAUTOINC+e669d52447-ge669d52447$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- tisdk_am335x-evm_defconfig
    host:{PSDK}/board-support/linux-4.14.79+gitAUTOINC+e669d52447-ge669d52447$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage
    host:{PSDK}/board-support/linux-4.14.79+gitAUTOINC+e669d52447-ge669d52447$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x-evm.dtb

    I have below messages when building DTS fille:

    CHK scripts/mod/devicetable-offsets.h
    DTC arch/arm/boot/dts/am335x-evm.dtb
    arch/arm/boot/dts/am335x-evm.dtb: Warning (phys_property): Missing property '#phy-cells' in node /ocp/usb@47400000/usb-phy@47401300 or bad phandle (referred from /ocp/usb@47400000/usb@47401000:phys[0])
    arch/arm/boot/dts/am335x-evm.dtb: Warning (phys_property): Missing property '#phy-cells' in node /ocp/usb@47400000/usb-phy@47401b00 or bad phandle (referred from /ocp/usb@47400000/usb@47401800:phys[0])

    As a result I have the DTB file in below folder:

    {PSDK}/board-support/linux-4.14.79+gitAUTOINC+e669d52447-ge669d52447/arch/arm/boot/dts/am335x-evm.dtb


    Another approach you can try is to build DTS file through the top-level makefile:

    {PSDK}/Makefile

    See below user guide:

    software-dl.ti.com/.../Overview_Getting_Started_Guide.html

    Regards,
    Pavel
  • Thanks Pavel, I see where I was going wrong:

    I was calling make from the top-level SDK directory, not board-supprt/linux[...]

    As a result, I can now build my .dtb file.

    Onto the next stage of the workflow, however...

    After building the .dtb I'm trying to install it on my target image. To do this, I've created the dtb, loaded it into the rootfs/boot directory, then inserted a uEnv.txt entry:

    fdtfile=<my device tree file.dtb>

    This has led to two further questions.
    1. Is this correct, or would it be subject to the non-uEnv.txt entries overriding it later in the boot? (I ask because it doesn't currently work: but haven't fully investigated yet)

    2. Is there any easy way to build/install the dtb file using the Yocto build (meta-custom layer)? This would have a better chance of integration vs my current method of building the FS using Yocto, jumping over to SDK for the DTB, installing on target device, then manually copying over the uEnv and DTB files.