I am using the Texas Instruments official Yocto SDK to build a complete BSP for the Beaglebone X-15 ( TI AM5728 Processor ).
The entire SDK builds great for the MACHINE=am57xx-evm type from the SDK. Later SDKs include the MACHINE=beagle-x15, but I need this older version with Linux kernel 4.4.
The Linux kernel 4.4 in this SDK does have beagle-x15 device tree fragments included, but the machine configuration for the beagle x15 was not present, so I included the 1 conf file for the new machine from a later SDK.
The problem is that the Device Tree fails to compile – there is a syntax issue as shown in this traceback:
| Error: /home/user/tisdk/build/arago-tmp-external-linaro-toolchain/work-shared/beagle-x15/kernel-source/arch/arm/boot/dts/beagle-x15-cmem.dtsi:1.1-2 syntax error | FATAL ERROR: Unable to parse input tree | scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/am57xx-beagle-x15-revc.dtb' failed | make[3]: *** [arch/arm/boot/dts/am57xx-beagle-x15-revc.dtb] Error 1 | arch/arm/Makefile:333: recipe for target 'am57xx-beagle-x15-revc.dtb' failed | make[2]: *** [am57xx-beagle-x15-revc.dtb] Error 2 | Makefile:150: recipe for target 'sub-make' failed | make[1]: *** [sub-make] Error 2 | Makefile:24: recipe for target '__sub-make' failed | make: *** [__sub-make] Error 2 | WARNING: /home/user/tisdk/build/arago-tmp-external-linaro-toolchain/work/beagle_x15-linux-gnueabi/linux-ti-staging/4.4.41+gitAUTOINC+f9f6f0db2d-r7a.arago5.tisdk60/temp/run.do_compile.121513:1 exit 1 from 'exit 1' | ERROR: oe_runmake failed | ERROR: Function failed: do_compile (log file is located at /home/user/tisdk/build/arago-tmp-external-linaro-toolchain/work/beagle_x15-linux-gnueabi/linux-ti-staging/4.4.41+gitAUTOINC+f9f6f0db2d-r7a.arago5.tisdk60/temp/log.do_compile.121513)
Here is the entire DTSI file that fails to compile:
/ { reserved-memory { #address-cells = <2>; #size-cells = <2>; ranges; cmem_block_mem_0: cmem_block_mem@a0000000 { reg = <0x0 0xa0000000 0x0 0x0c000000>; no-map; status = "okay"; }; cmem_block_mem_1_ocmc3: cmem_block_mem@40500000 { reg = <0x0 0x40500000 0x0 0x100000>; no-map; status = "okay"; }; }; cmem { compatible = "ti,cmem"; #address-cells = <1>; #size-cells = <0>; #pool-size-cells = <2>; status = "okay"; cmem_block_0: cmem_block@0 { reg = <0>; memory-region = <&cmem_block_mem_0>; cmem-buf-pools = <1 0x0 0x0c000000>; }; cmem_block_1: cmem_block@1 { reg = <1>; memory-region = <&cmem_block_mem_1_ocmc3>; }; }; };
Here is the beagle-x15.conf file:
#@TYPE: Machine #@NAME: BeagleBoard X15 #@DESCRIPTION: Machine configuration for the BeagleBoard X15 require conf/machine/include/dra7xx.inc KERNEL_DEVICETREE = "am57xx-beagle-x15.dtb am57xx-beagle-x15-revb1.dtb am57xx-beagle-x15-revc.dtb" MACHINE_GUI_CLASS = "bigscreen" SERIAL_CONSOLE = "115200 ttyS2" UBOOT_MACHINE = "am57xx_evm_config" WKS_FILE = "sdimage-bootpart.wks" IMAGE_BOOT_FILES = "MLO u-boot.img" IMAGE_FSTYPES += "tar.xz wic.xz" do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot" # UBI information. Note that this is board and kernel specific. Changes # in your kernel port may require changes in these variables. For more # details about this board please see # http://processors.wiki.ti.com/index.php/UBIFS_Support # do ubiattach /dev/ubi_ctrl -m 7 -O 2048 # From dmesg: # UBI: smallest flash I/O unit: 2048 # UBI: logical eraseblock size: 126976 bytes # from ubiattach stdout: # UBI device number 0, total 1988 LEBs MKUBIFS_ARGS = "-F -m 2048 -e 126976 -c 8192" # do ubiattach /dev/ubi_ctrl -m 7 -O 2048 # from dmesg: # UBI: smallest flash I/O unit: 2048 # UBI: physical eraseblock size: 131072 bytes (128 KiB) # UBI: sub-page size: 512 # UBI: VID header offset: 2048 (aligned 2048) UBINIZE_ARGS = "-m 2048 -p 128KiB -s 512 -O 2048"
How can I get this DTSI file to compile? Thanks.
UPDATE: It turns out the Ubuntu DTC compiler also fails ( Version 1.4 ):
dtc -O dtb -o /home/user/Desktop/test.dtb /home/user/tisdk/build/arago-tmp-external-linaro-toolchain/work-shared/beagle-x15/kernel-source/arch/arm/boot/dts/beagle-x15-cmem.dtsi Error: /home/user/tisdk/build/arago-tmp-external-linaro-toolchain/work-shared/beagle-x15/kernel-source/arch/arm/boot/dts/beagle-x15-cmem.dtsi:1.1-2 syntax error FATAL ERROR: Unable to parse input tree
Advertisement
Answer
dtc compiler by default treats the Device Tree version as 0 if no version is specified. Syntax for version 0 is different from version 1. So you need to add,
/dts-v1/;
as your fist line of device tree file.
Apart from this, usually you need to compile .dts
file, not the .dtsi
(which is include) directly. So you need to define according device tree file with .dts
extension including .dtsi
files.