Hi,
Please make sure you link to this toolchain for building source code:
https://developer.nvidia.com/embedded/linux-tegra-r3261
GCC 7.3.1 for 64 bit BSP and Kernel
Seems like you probably link to gcc of Ubuntu 22.04
Hi,
Please make sure you link to this toolchain for building source code:
https://developer.nvidia.com/embedded/linux-tegra-r3261
GCC 7.3.1 for 64 bit BSP and Kernel
Seems like you probably link to gcc of Ubuntu 22.04
OK. will check this. BTW,
How to clean the kernel and compile fresh one.
This command “sudo ./nvbuild.sh -o $PWD/kernel_out” i am using for compile
Hi DaneLL
I did not see the previous errors. But I see the below error. Could you check?
IHEX firmware/3com/typhoon.bin
IHEX firmware/kaweth/trigger_code.bin
IHEX firmware/kaweth/new_code_fix.bin
IHEX firmware/kaweth/trigger_code_fix.bin
IHEX firmware/cpia2/stv0672_vp4.bin
HOSTCC firmware/ihex2fw
IHEX2FW firmware/emi26/loader.fw
IHEX2FW firmware/emi62/loader.fw
IHEX2FW firmware/emi26/firmware.fw
IHEX2FW firmware/emi62/spdif.fw
IHEX2FW firmware/emi62/midi.fw
IHEX2FW firmware/emi26/bitstream.fw
IHEX2FW firmware/emi62/bitstream.fw
Error: Missing kernel image /home/ayyappan/nvidia/kernel_source/Linux_for_Tegra/source/public/kernel_out/arch/arm64/boot/Image
Hi,
Please try the manual steps in
https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3261/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/kernel_custom.html#wwpID0E0WD0HA
See if it works by executing the commands step by step.
Hi,
Sorry if there were any misunderstandings, but I just saw that the post helped you so I’m jumping here again.
For the other errors, here is another post that might help:
Change nvbuild.sh on line 86:
from
O_OPT=(-O “${KERNEL_OUT_DIR}”)
to
O_OPT=(O=“${KERNEL_OUT_DIR}”)
Regards
I tried this and it did not help for me.
Regarding the above error, that file is generated from a “make Image
” command (adjusted for path and tools, e.g., the “O=/some/where/temporary
” would change the $TOP
for output of content during a build). I don’t know about the particular firmware build command you used, but if it requires the Image
file, then perhaps it is as simple as building the Image
target (configured correctly) and then firmware might build.
I am getting this error “gcc: error: unrecognized command-line option ‘-mlittle-endian’” While trying the manual steps. Could you check?
NVIDIA team,
Can someone please help to build the kernel build?? I am really struggling to build this kernel for R-32.7.3.
I do not want any suggestions (all are not working). someone please try from your end and let me know
I am using ubuntu 18.04 image.
Your documentations are not working as expected.
Hi,
We have verified the steps on host PC in Ubuntu 18.04 and 16.04, so if you have host PC in same OS version, it is supposed to work. For the previous post, it looks like you use Ubuntu 22.04 and this may be the deviation triggering the failure.
Or you may try to build it directly on Xavier NX developer kit. See if this works at your end.
I removed the VMware and using the HOST-PC Ubuntu 18.04 version.
I do not want to use the kit. Since all the developer will use this ubuntu.
The problem is nothing is copied into “kernel_out” directory
Hi DaneLLL
Any updates??
Hi,
Please try the manual steps in developer guide
Share my PATH setup for reference:
$ export TEGRA_KERNEL_OUT=/home/danel/temp/jetp/jp463/Linux_for_Tegra/source/public/kernel_out/
$ export CROSS_COMPILE=/home/danel/gcc_tools/jp4/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
$ export LOCALVERSION=-tegra
My <kernel_source> is /home/danel/temp/jetp/jp463/Linux_for_Tegra/source/public/kernel/kernel-4.9
I compared the 35.2 and 32.7 release nvbuild.sh files and moved the diff. Now its compiling.
Linux_for_Tegra/rootfs/usr/lib/modules/$(uname -r)/kernel/drivers/gpu/nvgpu/nvgpu.ko
with a copy of this file:$kernel_out/arch/arm64/boot/dts/nvidia/
I do not see “nvidia” folder in my kernel build. Is the path correct or do I need to do anything?
I see dtb files are in this path only: ./kernel_out/arch/arm64/boot/dts/
There is no folder under this dir.
Hi,
It looks like the build script does not work properly on Jetpack 4 release. Please try the manual steps.
Hi DaneLL,
I followed the steps from the document. Facing the below errors in compilation. Could you check?
“gcc: error: unrecognized command-line option ‘-mlittle-endian’”
Compilation-Logs:
ayyappan@ayyappan-ubuntu:~/nvidia/kernel_source/Linux_for_Tegra/source/public/kernel/kernel-4.9$ export CROSS_COMPILE=/home/ayyappan/nvidia/kernel_source/Linux_for_Tegra/source/public/kernel/kernel-4.9/tool-chain/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
ayyappan@ayyappan-ubuntu:~/nvidia/kernel_source/Linux_for_Tegra/source/public/kernel/kernel-4.9$ export LOCALVERSION=-tegra
ayyappan@ayyappan-ubuntu:~/nvidia/kernel_source/Linux_for_Tegra/source/public/kernel/kernel-4.9$ sudo mkdir -p $TEGRA_KERNEL_OUT
ayyappan@ayyappan-ubuntu:~/nvidia/kernel_source/Linux_for_Tegra/source/public/kernel/kernel-4.9$ sudo make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig
make[1]: Entering directory ‘/home/ayyappan/nvidia/kernel_source/Linux_for_Tegra/source/public/kernel_out’
HOSTCC scripts/basic/fixdep
GEN ./Makefile
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
make[1]: Leaving directory ‘/home/ayyappan/nvidia/kernel_source/Linux_for_Tegra/source/public/kernel_out’
ayyappan@ayyappan-ubuntu:~/nvidia/kernel_source/Linux_for_Tegra/source/public/kernel/kernel-4.9$ sudo make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j4
make[1]: Entering directory ‘/home/ayyappan/nvidia/kernel_source/Linux_for_Tegra/source/public/kernel_out’
GEN ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
arch/arm64/Makefile:49: LSE atomics not supported by binutils
CHK include/config/kernel.release
GEN ./Makefile
WRAP arch/arm64/include/generated/asm/bugs.h
WRAP arch/arm64/include/generated/asm/clkdev.h
WRAP arch/arm64/include/generated/asm/cputime.h
WRAP arch/arm64/include/generated/asm/delay.h
WRAP arch/arm64/include/generated/asm/div64.h
WRAP arch/arm64/include/generated/asm/dma.h
WRAP arch/arm64/include/generated/asm/dma-contiguous.h
WRAP arch/arm64/include/generated/asm/early_ioremap.h
CHK include/generated/uapi/linux/version.h
WRAP arch/arm64/include/generated/asm/emergency-restart.h
WRAP arch/arm64/include/generated/asm/errno.h
UPD include/generated/uapi/linux/version.h
UPD include/config/kernel.release
WRAP arch/arm64/include/generated/asm/hw_irq.h
WRAP arch/arm64/include/generated/asm/ioctl.h
WRAP arch/arm64/include/generated/asm/ioctls.h
WRAP arch/arm64/include/generated/asm/ipcbuf.h
WRAP arch/arm64/include/generated/asm/irq_regs.h
WRAP arch/arm64/include/generated/asm/kdebug.h
WRAP arch/arm64/include/generated/asm/kmap_types.h
WRAP arch/arm64/include/generated/asm/kvm_para.h
WRAP arch/arm64/include/generated/asm/local.h
WRAP arch/arm64/include/generated/asm/local64.h
WRAP arch/arm64/include/generated/asm/mcs_spinlock.h
WRAP arch/arm64/include/generated/asm/mm-arch-hooks.h
WRAP arch/arm64/include/generated/asm/mman.h
WRAP arch/arm64/include/generated/asm/msgbuf.h
WRAP arch/arm64/include/generated/asm/msi.h
WRAP arch/arm64/include/generated/asm/mutex.h
WRAP arch/arm64/include/generated/asm/poll.h
WRAP arch/arm64/include/generated/asm/preempt.h
WRAP arch/arm64/include/generated/asm/resource.h
WRAP arch/arm64/include/generated/asm/rwsem.h
WRAP arch/arm64/include/generated/asm/segment.h
WRAP arch/arm64/include/generated/asm/sembuf.h
WRAP arch/arm64/include/generated/asm/serial.h
WRAP arch/arm64/include/generated/asm/shmbuf.h
WRAP arch/arm64/include/generated/asm/simd.h
WRAP arch/arm64/include/generated/asm/sizes.h
WRAP arch/arm64/include/generated/asm/socket.h
WRAP arch/arm64/include/generated/asm/sockios.h
HOSTCC scripts/basic/fixdep
WRAP arch/arm64/include/generated/asm/swab.h
WRAP arch/arm64/include/generated/asm/switch_to.h
WRAP arch/arm64/include/generated/asm/termbits.h
WRAP arch/arm64/include/generated/asm/termios.h
WRAP arch/arm64/include/generated/asm/trace_clock.h
WRAP arch/arm64/include/generated/asm/types.h
WRAP arch/arm64/include/generated/asm/unaligned.h
WRAP arch/arm64/include/generated/asm/user.h
WRAP arch/arm64/include/generated/asm/vga.h
WRAP arch/arm64/include/generated/asm/xor.h
WRAP arch/arm64/include/generated/uapi/asm/kvm_para.h
HOSTCC scripts/basic/bin2c
Using /home/ayyappan/nvidia/kernel_source/Linux_for_Tegra/source/public/kernel/kernel-4.9 as source for kernel
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
HOSTCC scripts/dtc/dtc.o
HOSTCC scripts/dtc/flattree.o
HOSTCC scripts/dtc/fstree.o
HOSTCC scripts/dtc/data.o
CC kernel/bounds.s
gcc: error: unrecognized command-line option ‘-mlittle-endian’
make[2]: *** [/home/ayyappan/nvidia/kernel_source/Linux_for_Tegra/source/public/kernel/kernel-4.9/./Kbuild:21: kernel/bounds.s] Error 1
make[1]: *** [/home/ayyappan/nvidia/kernel_source/Linux_for_Tegra/source/public/kernel/kernel-4.9/Makefile:1167: prepare0] Error 2
make[1]: *** Waiting for unfinished jobs…
HOSTCC scripts/dtc/livetree.o
HOSTCC scripts/dtc/treesource.o
HOSTCC scripts/genksyms/genksyms.o
HOSTCC scripts/dtc/srcpos.o
CC scripts/mod/empty.o
gcc: error: unrecognized command-line option ‘-mlittle-endian’
make[3]: *** [/home/ayyappan/nvidia/kernel_source/Linux_for_Tegra/source/public/kernel/kernel-4.9/scripts/Makefile.build:339: scripts/mod/empty.o] Error 1
make[2]: *** [/home/ayyappan/nvidia/kernel_source/Linux_for_Tegra/source/public/kernel/kernel-4.9/scripts/Makefile.build:652: scripts/mod] Error 2
make[2]: *** Waiting for unfinished jobs…
SHIPPED scripts/genksyms/parse.tab.c
SHIPPED scripts/genksyms/lex.lex.c
SHIPPED scripts/genksyms/keywords.hash.c
HOSTCC scripts/dtc/checks.o
SHIPPED scripts/genksyms/parse.tab.h
HOSTCC scripts/genksyms/parse.tab.o
HOSTCC scripts/genksyms/lex.lex.o
HOSTCC scripts/dtc/util.o
SHIPPED scripts/dtc/dtc-lexer.lex.c
SHIPPED scripts/dtc/dtc-parser.tab.h
SHIPPED scripts/dtc/dtc-parser.tab.c
HOSTCC scripts/dtc/dtc-lexer.lex.o
HOSTCC scripts/dtc/dtc-parser.tab.o
HOSTLD scripts/genksyms/genksyms
HOSTLD scripts/dtc/dtc
make[1]: *** [/home/ayyappan/nvidia/kernel_source/Linux_for_Tegra/source/public/kernel/kernel-4.9/Makefile:589: scripts] Error 2
make[1]: Leaving directory ‘/home/ayyappan/nvidia/kernel_source/Linux_for_Tegra/source/public/kernel_out’
make: *** [Makefile:171: sub-make] Error 2
Hi,
Do you install the packages:
$ sudo apt install build-essential bc
yes. Installed.
I copied these env into kernel/Makefile. Now I am able to compile
export TEGRA_KERNEL_OUT=/home/ayyappan/nvidia/kernel_source/Linux_for_Tegra/source/public/kernel_out | |
---|---|
export CROSS_COMPILE=/home/ayyappan/nvidia/kernel_source/Linux_for_Tegra/source/public/kernel/kernel-4.9/tool-chain/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- | |
export LOCALVERSION=-tegra | |
But, I did not see the nvidia folder inside kernel_out/arch/arm64/boot/dts/nvidia/
where Can I find the dtsi files for this build?
Hi,
dtsi files are built into dtb. You should see dtb files in
/home/danel/temp/jetp/jp463/Linux_for_Tegra/source/public/kernel_out/arch/arm64/boot/dts
Yes. its there. this is the right path?