Modify device tree in Debian image

Forums Reference, Evaluation, and Development Boards OSD32MP1-RED Modify device tree in Debian image

Viewing 4 reply threads
  • Author
    Posts
    • #12292
      Ángel Molinaamolina
      Participant

        Hi, I am using the OSD32MP1-RED platform with the Debian image provided. I am using the SPI port to communicate with the PN532 RFID module, but I don’t achieve that the communication works. I have the doubt about if I can modify the device tree that include the Debian image to test other SPI ports and configurations, and how do this?

        Thanks in advance.

      • #12304
        Neeraj Dantu
        Moderator

          amolina,

          https://github.com/octavosystems/osd32mp1-build-tools/tree/master/patches directory in the Debian SDK contains all the patches applied to TF-A, U-Boot and Kernel for OSD32MP1-BRK and OSD32MP1-RED boards. The patches mainly contain device tree files additions. The following procedure should help you modify the device tree on the RED board:

          1. Download TF-A, U-Boot and kernel source code from ST’s github repos(https://github.com/STMicroelectronics). Make sure you switch to the kernel version that is listed in the Debian SDK

          2. Apply the patches from the build-tools directory linked above. This will add the device trees for BRK and RED board to the repositories.

          3. Modify the device trees as per your application needs. For SPI, please take a look at ST’s guide to SPI device tree here: https://wiki.st.com/stm32mpu/wiki/SPI_device_tree_configuration

          4. Generate the patches for the additional modifications you made for the device tree

          5. Add those patches to the patches directory under the build-tools directory of the Debian SDK

          6. Build the Linux image as described in the README for the Debian SDK.

          Best,
          Neeraj

        • #12328
          Ángel Molinaamolina
          Participant

            Hi,

            I haven’t achieved that the modifications works. Could you detailed more the instrucctions? Is neccesary that I execute the instructions the commands indicated here https://github.com/octavosystems/osd32mp1-build-tools? How do I compile the modifications?

            Thanks in advance.

          • #12329
            Ángel Molinaamolina
            Participant

              I have seen that after modify the device tree I unable to generate the .dtb file with the device tree modifications, How can I generate this .dtb file with the modifications in the device tree?

            • #12347
              Neeraj Dantu
              Moderator

                amolina,

                https://github.com/octavosystems/osd32mp1-build-tools/blob/master/Makefile#L42 shows the sequence of steps that get executed once you invoke the “make all” command.

                Can you post the error you are getting when the SDK doesn’t build the device trees?

                Another thing you can do to make things easier is that after first build, you can remove “patch_” task from each of the build tasks(fsbl, ssbl and kernel) and modify the source code for TF-A, U-boot and kernel directly. Note that you should not run “make clean” as this resets all the local repos and changes will be lost.

                Best,
                Neeraj

            Viewing 4 reply threads
            • You must be logged in to reply to this topic.