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/AM3352: Device tree syntax error

Part Number: AM3352

Tool/software: Linux

Hi everywhere,

I try to apply the SDK_Kernel_Configuration from Linux Kernel Users Guide,AM3352-SOM-EVB.
My product is the AM3352-SOM-EVB described by this both wiki:

And my toolchain and SDK are downloaded from AM335x Linux SDK Individual Components § PROCESSOR-SDK-LINUX-AM335X Product downloads:

My issue is that I try to compile am335x-evm.dtb into am335x-evm.dts, but this error append:

$ dtc -I dts -O dtb -o am335x-evm.dtb am335x-evm.dts              
Error: am335x-evm.dts:10.1-9 syntax error
FATAL ERROR: Unable to parse input tree

How to solve this?

The dtc version used is 1.4.6.

My procedure is:

# [Linux Kernel Users Guide](processors.wiki.ti.com/.../Linux_Kernel_Users_Guide)

## 2 Getting the Kernel Source Code
AM335x Linux SDK Individual Components; [PROCESSOR-SDK-LINUX-AM335X  04_03_00_05](software-dl.ti.com/.../index_FDS.html)
* [Standalone Linaro Toolchain - Linaro GCC 6.2.1 2016.11 hard-float toolchain](releases.linaro.org/.../gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf.tar.xz)
* [AM335x Linux SDK BSP Source Code](software-dl.ti.com/.../am335x-evm-linux-sdk-src-04.03.00.05.tar.xz)
```bash
curl -OL releases.linaro.org/.../gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf.tar.xz 
curl -OL software-dl.ti.com/.../am335x-evm-linux-sdk-src-04.03.00.05.tar.xz
tar xvf gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf.tar.xz
tar xvf am335x-evm-linux-sdk-src-04.03.00.05.tar.xz
rm -v gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf.tar.xz am335x-evm-linux-sdk-src-04.03.00.05.tar.xz
```

## 4 Compiler
```bash
export PATH=$(pwd)/gcc-linaro-6.2.1-2016.11-x86_64_arm-linux-gnueabihf/bin:$PATH
```

## 5 Cleaning the Kernel Sources
```bash
cd board-support/linux-4.9.69+gitAUTOINC+9ce43c71ae-g9ce43c71ae
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- distclean
```

## 6 Configuring the Kernel
### SDK Kernel Configuration
```bash
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- tisdk_am335x-evm_defconfig
```
```bash
ti_config_fragments/defconfig_builder.sh -t ti_sdk_am3x_release
export ARCH=arm
make ti_sdk_am3x_release_defconfig
mv .config arch/arm/configs/tisdk_am3x-evm_defconfig
```
## 7 Customizing the Configuration
```bash
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- ti_sdk_am3x_release_defconfig
#make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
```

### Compiling the Kernel
```bash
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage
```

### Compiling the Device Tree Binaries
```bash
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am335x-evm.dtb
cp arch/arm/boot/dts/am335x-evm.dtb ..
cd -
```
  • Hello adjivas,

    You can compile your dts through these steps.

    Best regards,
    Kemal

  • Thank you, according to your link, that solved with this lines:

    export IDE=am335x-evm
    
    export SRC=$IDE.dts
    export TMP=$IDE.tmp.dts
    export DST=$IDE.dtb
    
    cd arch/arm/boot/dts
    cpp -nostdinc -I include -undef -x assembler-with-cpp $SRC > $TMP
    dtc -O dtb -b 0 -o $DST $TMP
    rm $TMP

    The output is:

    am335x-evm.dtb: Warning (unit_address_vs_reg): Node /opp_table0/opp50@300000000 has a unit name, but no reg property
    am335x-evm.dtb: Warning (unit_address_vs_reg): Node /opp_table0/opp100@275000000 has a unit name, but no reg property
    am335x-evm.dtb: Warning (unit_address_vs_reg): Node /opp_table0/opp100@300000000 has a unit name, but no reg property
    am335x-evm.dtb: Warning (unit_address_vs_reg): Node /opp_table0/opp100@500000000 has a unit name, but no reg property
    am335x-evm.dtb: Warning (unit_address_vs_reg): Node /opp_table0/opp100@600000000 has a unit name, but no reg property
    am335x-evm.dtb: Warning (unit_address_vs_reg): Node /opp_table0/opp120@600000000 has a unit name, but no reg property
    am335x-evm.dtb: Warning (unit_address_vs_reg): Node /opp_table0/opp120@720000000 has a unit name, but no reg property
    am335x-evm.dtb: Warning (unit_address_vs_reg): Node /opp_table0/oppturbo@720000000 has a unit name, but no reg property
    am335x-evm.dtb: Warning (unit_address_vs_reg): Node /opp_table0/oppturbo@800000000 has a unit name, but no reg property
    am335x-evm.dtb: Warning (unit_address_vs_reg): Node /opp_table0/oppnitro@1000000000 has a unit name, but no reg property
    am335x-evm.dtb: Warning (unit_address_vs_reg): Node /ocp/ethernet@4a100000/slave@4a100200 has a unit name, but no reg property
    am335x-evm.dtb: Warning (unit_address_vs_reg): Node /ocp/ethernet@4a100000/slave@4a100300 has a unit name, but no reg property
    am335x-evm.dtb: Warning (avoid_unnecessary_addr_size): unnecessary #address-cells/#size-cells without "ranges" or child "reg" property in /ocp/l4_wkup@44c00000/scm@210000/pinmux@800
    am335x-evm.dtb: Warning (avoid_unnecessary_addr_size): unnecessary #address-cells/#size-cells without "ranges" or child "reg" property in /volume_keys0
    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])
    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])
    am335x-evm.dtb: Warning (alias_paths): aliases property name 'd_can0' is not valid
    am335x-evm.dtb: Warning (alias_paths): aliases property name 'd_can1' is not valid