Problem about compiling orin nano kernel

I’m trying to compile orin nano kernel following “Kernel — Jetson Linux
Developer Guide 34.1 documentation (nvidia.com)
”,but some error happened.

My source code is R35.1.0(without modification), Cross-compilation tool is gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.
image

Enter command “sudo vi ~/.bashrc” to set CROSS_COMPILE_AARCH64_PATH,

but I can’t build the kernel after entering “./nvbuild.sh -o $PWD/kernel_out”.

Did any of the steps go wrong?

Hi,

you have to run

source ~/.bashrc

, or changes in .bashrc won’t take effect.

I tried,and failed

I think the error message is already clear enough…
nvbuild.sh is located under Linux_for_Tegra/source/public, but you ran the command from Linux_for_Tegra

There is another error entering command in public.

lyzk@ubuntu:~/Documents/Linux_for_Tegra/source/public$ source ~/.bashrc
lyzk@ubuntu:~/Documents/Linux_for_Tegra/source/public$ ./nvbuild.sh -o $/kernel_out/Documents/Linux_for_Tegra/source/public/kernel/kernel-5.10/kernel/kernel_out
Error: Path /home/lyzk/Documents/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-buildroot-linux-gnu-gcc does not exist.
lyzk@ubuntu:~/Documents/Linux_for_Tegra/source/public$

And there is no aarch64-buildroot-linux-gnu-gcc existing exactly in bin.

Hi,

please use the cross compiler we suggest on the L4T release page.

Before compile, what do you see from:
echo $CROSS_COMPILE_AARCH64_PATH

If you don’t see this set, what happens if you use this command instead:

sudo -s
CROSS_COMPILE_AARCH64_PATH=...your /home/...path...adjust for your case... ./nvbuild.sh ...your arguments...

So basically, avoiding writing long lines from screenshots, combine the CROSS_COMPILE_AARCH64_PATH=...content... in front of the nvbuild.sh with a space between them; combine them into a single line which no longer depends on .bashrc.

Incidentally, screenshots are hard to work with (copy and paste isn’t so good with that). Any command line that you want a log file of to attach is simple. Example:
echo "just testing" 2>&1 | tee log_testing.txt
(the result of the echo, and any errors, are then recorded in log_testing.txt and you can simply attach it to the forum; this extends to all commands on command lines, just append " 2>&1 | tee log_something.txt")

Now if an environment variable you’ve set is not pointing to correct content, then it might also give a similar error to having not set the variable. This includes the location of the environment variable if that location is expected to already exist.

Thank you for your reply.And I have another question,what is the command of Orin nano L4T flashing?
I can see someone using “sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml -p “-c bootloader/t186ref/cfg/flash_t234_qspi.xml” --showlogs --network usb0 jetson-orin-nano-devkit internal” from a forum. Is it one command or two?
Can I use “sudo ./apply_binaries.sh” and “sudo ./flashsh ietson-agx-orin-devkit as nano8gb mmcblk0p1” to flash?

This is one single command.

No, this is used on AGX Orin to emulate the performance of Orin Nano, whereas you are using real Orin Nano.

Please check our developer guide and choose the right flashing command according to the storage device you are using:
https://docs.nvidia.com/jetson/archives/r35.3.1/DeveloperGuide/text/IN/QuickStart.html

I follow the guide,but there is always an error.

tar xf ${L4T_RELEASE_PACKAGE}
sudo tar xpf ${SAMPLE_FS_PACKAGE} -C Linux_for_Tegra/rootfs/
cd Linux_for_Tegra/
sudo ./apply_binaries.sh
sudo ./tools/l4t_flash_prerequisites.sh

install_error.txt (6.3 KB)

It is no use after I give it permission with “lyzk@ubuntu:~/Documents/Linux_for_Tegra$ sudo chown lyzk rootfs/ -R”.

Hi,

應該是因為你的檔案路徑裡有中文,把BSP移到全英文的路徑再試試看:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.