You said you have already downloaded the toolchain, but it seems something in the location or installation is not quite correct.
You might already have this, but for reference, the build thinks you’re missing the tools. The documentation for your specific L4T release (see “head -n 1 /etc/nv_tegra_release”) will have a relevant “Kernel Customization” section naming some tools, e.g, the cross tools and QEMU. Refer to your L4T release here: https://developer.nvidia.com/linux-tegra
If you have your tools installed per any README file in that script location, plus the “Kernel Customization” section of the docs for your L4T release, then it should work.
Hi,
Thank you for your comment. There was a problem with toolchain assigments, I have corrected them. But some errors apperead when I typed ./nvbuild.sh -o /kernel_out command. I have fixed some of them as explained below.
/bin/sh: 1: flex: not found => SOLUTION(sudo apt-get install flex)
/bin/sh: 1: bison: not found => SOLUTION(sudo apt-get install bison)
openssl/opensslv.h: No such file or directory … => SOLUTION(sudo apt-get install libssl-dev)
And the last error during build process is as below.
undefined reference to `__aarch64_ldclr4_acq_rel
I have searched on internet about this error and it is said that this error is related to the libgcc.
This seems to be caused by __aarch64_ldadd4_acq_rel being defined in libgcc, but not libgcc_s, while only libgcc_s is pulled in automatically.
Use the suggestion listed in the error (your host is missing development tools):
sudo apt-get install flex
sudo apt-get install bison
The other errors might go away if you have flex and bison. If not, then they are part of 64-bit ARM environment. You would never require any kind of linker tool for a kernel build, although QEMU or some tool might itself need something. Most likely there was some sort of failure which indirectly lead to the undefined reference, e.g., kernel source configuration or the result of a missing file which itself is a result of a missing tool.
Did you read the official docs “Kernel Customization” section for your release? It gives you the tool install commands for that release. You can find the exact documents and kernel source (which still needs configuration) for a given L4T release here: https://developer.nvidia.com/linux-tegra
Manually Downloading and Expanding Kernel Sources → I did without errors.
sudo apt install build-essential bc → I did without errors.
Exporting CROSS_COMPILE enviroment variables. → I did without errors.
Download Jetson Linux Toolchain. → I did without errors.
mkdir kernel_out → I did without errors. :))
./nvbuild.sh -o $PWD/kernel_out → There are several errors which I mentioned in my previous message.
I think there is a misunderstanding about my previous message, because the solutions given in paranthesis are my comments, I mean, when I get error about flex, I have installed it with the command (sudo apt-get install flex) and also installed bison and libssl-dev.
However at the end, the error given below is arised and I couldn’t find a quick solution.