5

I am trying to compile the dts file for beaglebone black. I have cloned the git repository from this location git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git and I get the following errors:

  1. for beaglebone black:

    $ dtc -I dts -O dtb -o am335x-boneblack.dtb am335x-boneblack.dts
    

    Error: am335x-boneblack.dts:10.1-9 syntax error
    FATAL ERROR: Unable to parse input tree

  2. I tried for atmel sam9g20 ek- I get the same error:

    $ dtc -I dts -O dtb -o at91sam9g20ek_2mmc.dtb at91sam9g20ek_2mmc.dts
    

    Error: at91sam9g20ek_2mmc.dts:9.1-9 syntax error
    FATAL ERROR: Unable to parse input tree

But when I use the mainline kernel they compile.

I tried make ARCH=arm dtbs also is an error

Could anybody please point me the mistake I am making?

djikay
  • 10,450
  • 8
  • 41
  • 52
Prajosh Premdas
  • 970
  • 4
  • 17
  • 40
  • I have put a fix to this problem using the command make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- am335x-boneblack.dtb I think the cross compiler is used in some part of dtc compilation. Could anybody explain why this worked? – Prajosh Premdas Jul 11 '14 at 08:31
  • 1
    You probably need **cpp**, the C preprocessor. – sawdust Jul 15 '14 at 07:53
  • I believe I have cpp and C preprocessor for I have been developing a lot of projects with QT in C++ for beaglebone and Atmel sam9g20. If I am wrong how do I check this? – Prajosh Premdas Jul 15 '14 at 19:35
  • Try shell commands `which cpp` or `cpp -dumpmachine` – sawdust Jul 15 '14 at 23:04
  • `which cpp` => `/usr/bin/cpp` and `cpp -dumpmachine` => `i686-linux-gnu` I have posted the output of the commands. – Prajosh Premdas Jul 16 '14 at 13:42
  • Yes even I have faced this error.Can someone tell me if I am building/compiling the dtb for a given driver's dts what steps I have to follow(like pacing the dts in what folder, etc...) – Raulp Jul 25 '16 at 11:59
  • @Raulp Could you please give the hw details and the process you are following to compile – Prajosh Premdas Jul 26 '16 at 12:54
  • Its the beagleboneblack(arm) .and the hardware is a led connected via gpios.you can follow this link for what I have done -> https://groups.google.com/forum/#!category-topic/beagleboard/support/newbies/beaglebone-black/cLDC6Le0Z4A – Raulp Jul 26 '16 at 18:38
  • @PrajoshPremdas: The dts file (or the board file) includes the dtsi file (SOC descriptor file) and also expects a basic device tree structure inclusion (/dts-v1/) which is required for building. Now again the dtsi file ( for the SOC such as one based on ARM arch) contains various properties which will be only relevant to ARM SOC's . So the same is the requirement for setting up the environment before building. – a.saurabh Jan 30 '17 at 13:34

1 Answers1

1

Using the command make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- dtbs this problem has been fixed

CROSS_COMPILE can have the compiler of your choice.

Prajosh Premdas
  • 970
  • 4
  • 17
  • 40