1

How can I convert platform specific file to device tree?.

I know theoretically about device tree. Please explain how its works in raspberry pi board or any other boards.

4
  • Learn more about udev Commented Aug 27, 2013 at 10:05
  • 1
    What is platform specific file? You mean the actual kernel platform data specific to each board or a custom vendor-specific file somehow describing your platform? Either you write a script to automate this or you do it manually (which should be faster). We won't explain how it works here... read the device tree usage and learn how it's used in the kernel (API in drivers/of and lots of device trees in arch/arm/boot/dts and arch/powerpc/boot/dts). Commented Aug 27, 2013 at 14:37
  • Maybe if you provide which file your looking to "convert" we can give you some hints. Commented Aug 27, 2013 at 14:50
  • ARM Linux kernels contain a lot of non-enumerable hardware and tend to have a board-file that does this programmatically. Commented Aug 29, 2013 at 13:31

1 Answer 1

6

A device-tree is simply a data structure for describing the hardware present on a system. In the absence of device-tree, systems rely on "board-files". These are C files with plenty of structures, each describing every individual hardware present on the system and also how they are connected.

Porting of code from legacy "board-files" to device-tree dts files is currently an ongoing process across several platforms/devices based on the ARM architecture.

To do this one requires proper understanding of the

  • platform/device hardware.
  • structure of the board-file.
  • structure of the dts file.

This answer should help you get started in preparing a device-tree dts.

Also there is an ongoing effort to migrate the raspberry-pi Linux-kernel to use device-tree. Take a look at the source and booting instructions.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.