Cross compile: tegra210-porg-pinmux-p3448-0000-a02.dtsi:22.1-2 syntax error

Hey,
I have a camera, which I connect to Jetson nano through FPD Link 3.
For that I must cross compile the driver with the public source public_sources_32_5.tbz2
Firstly I cross compiled the public source, everything is fine. Then I cross compile the driver code with the kernel source code to make a debian install package.
So I get the error output because of tegra210-porg-pinmux-p3448-0000-a02.dtsi:22.1-2 syntax error
FATAL ERROR: Unable to parse input tree

The original file was a dos file, I have converted it in a unix file with dos2unix, it still does not work.
Could you please help me? thanks!
details see below*
sudo make deb
make -C doc html
make[1]: Entering directory ‘/home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/doc’
Running Sphinx v1.6.7
loading pickled environment… done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 0 source files that are out of date
updating environment: 0 added, 0 changed, 0 removed
looking for now-outdated files… none found
no targets are out of date.
build succeeded.

Build finished. The HTML pages are in build/html.
make[1]: Leaving directory ‘/home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/doc’
for r in r32.5; do
rm -rf debian;
mkdir -p debian;
cp -r DEBIAN debian/;
mv debian/DEBIAN/control_"$r" debian/DEBIAN/control;
rm debian/DEBIAN/control_;
make L4T_RELEASE=$r DTC=/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/output/build/scripts/dtc/dtc DTBDIR=/home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/debian/opt/theimagingsource/dtb DESTDIR=/home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/debian -j install;
make_ret=$?;
test “$make_ret” == “0” || exit $make_ret;
mkdir -p debian/opt/theimagingsource/doc/theimagingsource-drivers/;
cp doc/build/html/
debian/opt/theimagingsource/doc/theimagingsource-drivers/;
mkdir -p debian/opt/theimagingsource/doc/theimagingsource-drivers/_static/;
cp doc/build/html/_static/* debian/opt/theimagingsource/doc/theimagingsource-drivers/static/;
mkdir -p debian/opt/theimagingsource/include/theimagingsource-drivers/;
cp include/* debian/opt/theimagingsource/include/theimagingsource-drivers/;
rm debian/lib/modules//modules. ;
dpkg-deb --build debian;
echo $r;
mv debian.deb theimagingsource-drivers
"$r"_2.1.6-2.deb;
done
make[1]: Entering directory ‘/home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234’
make -C interfaces KDIR=/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/output/build TIS_DRIVERS_VERSION=$(head -n1 DEBIAN/changelog | cut -d ’ ’ -f 2 | sed ‘s/[()]//g’)
make -C sensors KDIR=/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/output/build TIS_DRIVERS_VERSION=$(head -n1 DEBIAN/changelog | cut -d ’ ’ -f 2 | sed ‘s/[()]//g’)
make -C kernel-dts DESTDIR=/home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/debian/opt/theimagingsource/dtb SRCDTS=/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia DTC=/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/output/build/scripts/dtc/dtc L4T_RELEASE=r32.5
make[2]: Entering directory ‘/home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/kernel-dts’
make -C t210/porg DESTDIR=/home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/debian/opt/theimagingsource/dtb SRCDTS=/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia DTC=/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/output/build/scripts/dtc/dtc
make[2]: Entering directory ‘/home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/interfaces’
make -C /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/output/build CROSS_COMPILE=/home/nian/Documents/Jetson/TIS/toolchain/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- LOCALVERSION=-tegra ARCH=arm64 M=$PWD
make[2]: Entering directory ‘/home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/sensors’
make -C /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/output/build CROSS_COMPILE=/home/nian/Documents/Jetson/TIS/toolchain/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- LOCALVERSION=-tegra ARCH=arm64 M=$PWD
make[3]: Entering directory ‘/home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/kernel-dts/t210/porg’
make[3]: Entering directory ‘/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/output/build’
mkdir -p /home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/debian/opt/theimagingsource/dtb/jetson-nano
make[3]: Entering directory ‘/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/output/build’
cc -E -x assembler-with-cpp -Wp,-MD,.pre.tmp -nostdinc -I/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/soc/tegra/kernel-include -I/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/tegra/common/kernel-dts -DLINUX_VERSION=409 -I/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/soc/t210/kernel-dts -I/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210/common/kernel-dts -I/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210b01/common/kernel-dts -I/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210/porg/kernel-dts -DLINUX_VERSION=409 -o /tmp/tmp.8eLnTNfXdV.dts -include tegra210-porg-p3448-common-modified-r32.5.dtsi nano-devkit-1fpdlink-imx390.dts
mkdir -p /home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/debian/opt/theimagingsource/dtb/jetson-nano
cc -E -x assembler-with-cpp -Wp,-MD,.pre.tmp -nostdinc -I/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/soc/tegra/kernel-include -I/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/tegra/common/kernel-dts -DLINUX_VERSION=409 -I/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/soc/t210/kernel-dts -I/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210/common/kernel-dts -I/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210b01/common/kernel-dts -I/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210/porg/kernel-dts -DLINUX_VERSION=409 -o /tmp/tmp.Q5xjcf0FPp.dts -include tegra210-porg-p3448-common-modified-r32.5.dtsi nano-devkit-1fpdlink-imx335.dts
mkdir -p /home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/debian/opt/theimagingsource/dtb/jetson-nano
/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/output/build/scripts/dtc/dtc -i /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/soc/tegra/kernel-include -i /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/tegra/common/kernel-dts -i /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/soc/t210/kernel-dts -i /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210/common/kernel-dts -i /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210b01/common/kernel-dts -i /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210/porg/kernel-dts -Wno-unit_address_vs_reg -O dtb -o /home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/debian/opt/theimagingsource/dtb/jetson-nano/nano-devkit-1fpdlink-imx390.dtb /tmp/tmp.8eLnTNfXdV.dts
cc -E -x assembler-with-cpp -Wp,-MD,.pre.tmp -nostdinc -I/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/soc/tegra/kernel-include -I/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/tegra/common/kernel-dts -DLINUX_VERSION=409 -I/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/soc/t210/kernel-dts -I/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210/common/kernel-dts -I/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210b01/common/kernel-dts -I/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210/porg/kernel-dts -DLINUX_VERSION=409 -o /tmp/tmp.9k6mjZHkGH.dts -include tegra210-porg-p3448-common-modified-r32.5.dtsi nano-devkit-1fpdlink-imx297.dts
mkdir -p /home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/debian/opt/theimagingsource/dtb/jetson-nano
Error: /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pinmux-p3448-0000-a02.dtsi:22.1-2 syntax error
FATAL ERROR: Unable to parse input tree
Makefile:86: recipe for target ‘/home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/debian/opt/theimagingsource/dtb/jetson-nano/nano-devkit-1fpdlink-imx390.dtb’ failed
make[3]: *** [/home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/debian/opt/theimagingsource/dtb/jetson-nano/nano-devkit-1fpdlink-imx390.dtb] Error 1
make[3]: *** Waiting for unfinished jobs…
cc -E -x assembler-with-cpp -Wp,-MD,.pre.tmp -nostdinc -I/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/soc/tegra/kernel-include -I/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/tegra/common/kernel-dts -DLINUX_VERSION=409 -I/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/soc/t210/kernel-dts -I/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210/common/kernel-dts -I/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210b01/common/kernel-dts -I/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210/porg/kernel-dts -DLINUX_VERSION=409 -o /tmp/tmp.DVMwM8IIYl.dts -include tegra210-porg-p3448-common-modified-r32.5.dtsi nano-devkit-1fpdlink-imx296.dts
/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/output/build/scripts/dtc/dtc -i /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/soc/tegra/kernel-include -i /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/tegra/common/kernel-dts -i /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/soc/t210/kernel-dts -i /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210/common/kernel-dts -i /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210b01/common/kernel-dts -i /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210/porg/kernel-dts -Wno-unit_address_vs_reg -O dtb -o /home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/debian/opt/theimagingsource/dtb/jetson-nano/nano-devkit-1fpdlink-imx296.dtb /tmp/tmp.DVMwM8IIYl.dts
/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/output/build/scripts/dtc/dtc -i /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/soc/tegra/kernel-include -i /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/tegra/common/kernel-dts -i /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/soc/t210/kernel-dts -i /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210/common/kernel-dts -i /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210b01/common/kernel-dts -i /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210/porg/kernel-dts -Wno-unit_address_vs_reg -O dtb -o /home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/debian/opt/theimagingsource/dtb/jetson-nano/nano-devkit-1fpdlink-imx335.dtb /tmp/tmp.Q5xjcf0FPp.dts
/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/output/build/scripts/dtc/dtc -i /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/soc/tegra/kernel-include -i /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/tegra/common/kernel-dts -i /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/soc/t210/kernel-dts -i /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210/common/kernel-dts -i /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210b01/common/kernel-dts -i /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210/porg/kernel-dts -Wno-unit_address_vs_reg -O dtb -o /home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/debian/opt/theimagingsource/dtb/jetson-nano/nano-devkit-1fpdlink-imx297.dtb /tmp/tmp.9k6mjZHkGH.dts
Error: /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pinmux-p3448-0000-a02.dtsi:22.1-2 syntax error
FATAL ERROR: Unable to parse input tree
Makefile:86: recipe for target ‘/home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/debian/opt/theimagingsource/dtb/jetson-nano/nano-devkit-1fpdlink-imx296.dtb’ failed
make[3]: *** [/home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/debian/opt/theimagingsource/dtb/jetson-nano/nano-devkit-1fpdlink-imx296.dtb] Error 1
Error: /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pinmux-p3448-0000-a02.dtsi:22.1-2 syntax error
FATAL ERROR: Unable to parse input tree
Error: /home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/source/public/hardware/nvidia/platform/t210/porg/kernel-dts/porg-platforms/tegra210-porg-pinmux-p3448-0000-a02.dtsi:22.1-2 syntax error
FATAL ERROR: Unable to parse input tree
Makefile:86: recipe for target ‘/home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/debian/opt/theimagingsource/dtb/jetson-nano/nano-devkit-1fpdlink-imx335.dtb’ failed
make[3]: *** [/home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/debian/opt/theimagingsource/dtb/jetson-nano/nano-devkit-1fpdlink-imx335.dtb] Error 1
Makefile:86: recipe for target ‘/home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/debian/opt/theimagingsource/dtb/jetson-nano/nano-devkit-1fpdlink-imx297.dtb’ failed
make[3]: *** [/home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/debian/opt/theimagingsource/dtb/jetson-nano/nano-devkit-1fpdlink-imx297.dtb] Error 1
make[3]: *** wait: No child processes. Stop.
Makefile:9: recipe for target ‘t210/porg’ failed
make[2]: *** [t210/porg] Error 2
make[2]: Leaving directory ‘/home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/kernel-dts’
Makefile:29: recipe for target ‘dtbs’ failed
make[1]: *** [dtbs] Error 2
make[1]: *** Waiting for unfinished jobs…
Building modules, stage 2.
MODPOST 2 modules
Building modules, stage 2.
MODPOST 2 modules
make[3]: Leaving directory ‘/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/output/build’
make[2]: Leaving directory ‘/home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/interfaces’
make[3]: Leaving directory ‘/home/nian/Documents/Jetson/TIS/l4t/Linux_for_Tegra_r32.5/output/build’
make[2]: Leaving directory ‘/home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234/sensors’
make[1]: Leaving directory ‘/home/nian/Documents/Jetson/TIS/theimagingsource-drivers_2.1.6-2-ar0234’
Makefile:54: recipe for target ‘deb’ failed
make: *** [deb] Error 2

Could you share the files tegra210-porg-pinmux-p3448-0000-a02.dtsi

tegra210-porg-pinmux-p3448-0000-a02.dtsi (36.9 KB)

The problem start in other file, where you lost a bracket or parenthesis or something similar. We had this kind of problem in the past with the files where you define the camera configuration.

I was looking the file and when in the log said the problem occurs in the first line of the file in this case line: 22. Then the problem started in other file. In my opinion other file that you modified. May be if you can do a zip with all the files that you modified in your compilation is possible to find the problem.

the line 22 was with a dos ending(CRLN), which I have corrected.
which other file you mean? I can check…

Did you have any modification? Could you check the original source code if can build without problem.

The public source code I can correctly cross compile, without any problem.
But cross compiling together with my camera driver code, I get this error

No, I do not change anything in the source code