D3Engineering / d3-jetson-bsp

Board support package for Nvidia Jetson products.
14 stars 12 forks source link

FATAL ERROR: Unable to parse input tree #5

Closed Ihor-sii closed 4 years ago

Ihor-sii commented 4 years ago

Hello. I'm trying to build from source. I execute commands according to README.md.

./bootstrap
./configure
make linux-defconfig
make -j4

After a while I get an error:

DTC     arch/arm64/boot/dts/_ddot_/_ddot_/_ddot_/_ddot_/_ddot_/_ddot_/hardware/d3/d3-tx2-rsp-fpdlink.dtb
Error: arch/arm64/boot/dts/../../../../../../hardware/d3/d3-tx2-rsp-fpdlink.dts:40.27-29 syntax error
FATAL ERROR: Unable to parse input tree
/home/svl/d3-jetson-bsp-3.0.1/d3-jetson-bsp-src-3.0.1/l4t-submodules/kernel/kernel-4.9/arch/arm64/boot/dts/Makefile:135: recipe for target 'arch/arm64/boot/dts/_ddot_/_ddot_/_ddot_/_ddot_/_ddot_/_ddot_/hardware/d3/d3-tx2-rsp-fpdlink.dtb' failed
make[4]: *** [arch/arm64/boot/dts/_ddot_/_ddot_/_ddot_/_ddot_/_ddot_/_ddot_/hardware/d3/d3-tx2-rsp-fpdlink.dtb] Error 1
arch/arm64/Makefile:154: recipe for target 'dtbs' failed
make[3]: *** [dtbs] Error 2

here is the output of show-config it is correct, L4T Directory is true.

Makefile:666: ---------------- Build ID is 43ee5fef-37d2-44a7-89eb-6fd68b710ed6
        -D3 Configuration-
   Version          : 3.0.1
   System Type      : tx2
   Target Host      : 192.168.55.1
   Kernel config    : <default>
   DTB File         : /home/svl/d3-jetson-bsp-3.0.1/d3-jetson-bsp-src-3.0.1/build/deploy/boot/d3-tx2-cic.dtb
   L4T Directory    : /home/svl/nvidia/nvidia_sdk/JetPack_4.3_Linux_P3310/Linux_for_Tegra
   Build ID of most recent build: 95a3d690-5315-4b50-ac77-89f594e4f3f5

Can someone help me and point out where I'm wrong? Thanks.

cxw42 commented 4 years ago

Sorry you're having trouble!

Thanks!

Ihor-sii commented 4 years ago

I used an archive with release 3.0.1. I ran e661941 it didn't affect the result, I was getting the same error. I executed the following commands:

git clone https://github.com/D3Engineering/d3-jetson-bsp.git
git checkout nvidia/r32.2.1
git submodule update --init
git submodule update
./bootstrap
./configure --with-system-type=tx2 --with-dtb='/home/svl/d3_2/d3-jetson-bsp/build/deploy/boot/d3-tx2-cic.dtb' --with-l4t='/home/svl/nvidia/nvidia_sdk/JetPack_4.3_Linux_P3310/Linux_for_Tegra'
make linux-defconfig
make -j4

This solved the problem. Output of dtc --version Version: DTC 1.4.5 Thank you.

Ihor-sii commented 4 years ago

Now I get an error when trying to make make sync

   SIGN      /home/svl/d3_2/d3-jetson-bsp/build/kernel/arch/arm64/boot/dts//d3-tx2-cic.dtb
Welcome to Tegra Flash
version 1.0.0
Type ? or help for help and q or quit to exit
Use ! to execute system commands

[   0.0190 ] Generating signature
[   0.0456 ] tegrasign_v2 --key None --getmode mode.txt
[   0.0473 ] Assuming zero filled SBK key
[   0.1222 ] 
Traceback (most recent call last):
  File "/home/svl/nvidia/nvidia_sdk/JetPack_4.3_Linux_P3310/Linux_for_Tegra/bootloader/tegraflash.py", line 1280, in <module>
    tegraflash_run_commands()
  File "/home/svl/nvidia/nvidia_sdk/JetPack_4.3_Linux_P3310/Linux_for_Tegra/bootloader/tegraflash.py", line 1149, in tegraflash_run_commands
    interpreter.onecmd(command)
  File "/usr/lib/python2.7/cmd.py", line 221, in onecmd
    return func(arg)
  File "/home/svl/nvidia/nvidia_sdk/JetPack_4.3_Linux_P3310/Linux_for_Tegra/bootloader/tegraflash.py", line 665, in do_sign
    tegraflash_sign_binary(exports, args)
  File "/home/svl/nvidia/nvidia_sdk/JetPack_4.3_Linux_P3310/Linux_for_Tegra/bootloader/tegraflash_internal.py", line 743, in tegraflash_sign_binary
    if not _is_header_present(file_path):
  File "/home/svl/nvidia/nvidia_sdk/JetPack_4.3_Linux_P3310/Linux_for_Tegra/bootloader/tegraflash_internal.py", line 70, in _is_header_present
    file_size = os.path.getsize(file_path)
  File "/usr/lib/python2.7/genericpath.py", line 57, in getsize
    return os.stat(filename).st_size
OSError: [Errno 2] No such file or directory: '/home/svl/d3_2/d3-jetson-bsp/build/kernel/arch/arm64/boot/dts/d3-tx2-cic.dtb'
Makefile:721: recipe for target '/home/svl/d3_2/d3-jetson-bsp/build/deploy/boot/d3-tx2-cic_sigheader.dtb.encrypt' failed
make: *** [/home/svl/d3_2/d3-jetson-bsp/build/deploy/boot/d3-tx2-cic_sigheader.dtb.encrypt] Error 1

I understand that now the d3-tx2-cic.dtb file is missing, this explains why the build went smoothly, what do I need to do to fix this error?

Ihor-sii commented 4 years ago

I tried the following commands:

git clone https://github.com/D3Engineering/d3-jetson-bsp.git
git checkout d3/3.0.1
git submodule update --init
git submodule update
./bootstrap
./configure
make linux-defconfig

I received the following errors:

/bin/bash: /home/svl/d3_3/d3-jetson-bsp/l4t-submodules/kernel/kernel-4.9/scripts/config: No such file or directory
/bin/bash: line 0: [: ==: unary operator was expected
/bin/bash: /home/svl/d3_3/d3-jetson-bsp/l4t-submodules/kernel/kernel-4.9/scripts/config: No such file or directory
/bin/bash: line 0: [: ==: unary operator was expected
Makefile:666: ---------------- Build ID is 6fc98869-7d42-4815-81c4-244a81286ba4
make[1]: *** There are no rules for creating the "d3_defconfig" target. Stop.
Makefile:786: recipe for target 'linux-defconfig' failed
make: *** [linux-defconfig] Error 2

The folder ...d3-jetson-bsp/l4t-submodules/kernel/kernel-4.9 is empty. How can I fix these errors?

cxw42 commented 4 years ago

Try:

git clone https://github.com/D3Engineering/d3-jetson-bsp.git
cd d3-jetson-bsp
git checkout d3/3.0.1
git submodule update --init --recursive
                          # ^^^^^^^^^^^ this will take care of the empty .../kernel-4.9
#git submodule update  # don't need this
./bootstrap
./configure --with-system-type=tx2 --with-dtb='/home/svl/d3_2/d3-jetson-bsp/build/kernel/arch/arm64/boot/dts/d3-tx2-cic.dtb' --with-l4t='/home/svl/nvidia/nvidia_sdk/JetPack_4.3_Linux_P3310/Linux_for_Tegra'
          # ^ you do need to specify the parameters to configure
                                                                               #  ^^^ I use the build/kernel/... DTB path when I build
make linux-defconfig && make -j4 && make sync && make reboot

Also, the fact that your L4T directory is ...P3310/... means you are not running the latest version of sdkmanager. I suggest updating to the latest, under which your L4T directory will be ...JETSON_TX2/....

I have opened an issue in our internal system to improve the README. Thanks for your patience and feedback!

Ihor-sii commented 4 years ago

This solved the problem. Thank you.