JetPack6.1 Kernel build error

hi,我使用NV的JetPack6.2 的 kernel代码,无任何修改,编译时出现问题。
编译方法如下

1、工程搭建

mkdir Kernel_src
sudo tar -I lbzip2 -C Kernel_src -xf kernel_src.tbz2
sudo tar -I lbzip2 -C Kernel_src -xf kernel_oot_modules_src.tbz2
sudo tar -I lbzip2 -C Kernel_src -xf nvidia_kernel_display_driver_source.tbz2

2、编译脚本如下

ROOT_PATH=$(pwd)

echo "-------------------- kernel ---------------------"
# compile kernel
echo $ROOT_PATH
export CROSS_COMPILE=/opt/l4t-gcc/bin/aarch64-buildroot-linux-gnu-
export CROSS_COMPILE_AARCH64_PATH=/opt/l4t-gcc
TEGRA_KERNEL_OUT=$ROOT_PATH/Kernel_src/src_out
rm -rf $TEGRA_KERNEL_OUT
mkdir -p $TEGRA_KERNEL_OUT
echo $TEGRA_KERNEL_OUT
# define kernel version
export MOGO_VERSION="mogo version: "$3
export LOCALVERSION=-tegra

cd $ROOT_PATH/Kernel_src/
./nvbuild.sh -o $TEGRA_KERNEL_OUT

3、执行编译脚本的log日志文件如下
log.log (558.0 KB)

Hi,
If the device cannot be flashed/booted, please refer to the page to get uart log from the device:
Jetson/General debug - eLinux.org
And get logs of host PC and Jetson device for reference. If you are using custom board, you can compare uart log of developer kit and custom board to get more information.
Also please check FAQs:
Jetson AGX Orin FAQ
If possible, we would suggest follow quick start in developer guide to re-flash the system:
Quick Start — NVIDIA Jetson Linux Developer Guide 1 documentation
And see if the issue still persists on a clean-flashed system.
Thanks!

What’s the error message?

@ShaneCCC 在这里,谢谢

Hi,

Is this on jp6.1 or jp6.2? or both versions? I did cross compile on jp6.1 just few days ago without any issue.

JetPack6.2,我也很奇怪,您现在试试是否可以编译呢,或者是说我的编译方法哪里有问题?

What version of cross compiler are you using?

gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu

Hi,

Could you try to do manual flash instead of nvbuild and see if you still see this error?

https://docs.nvidia.com/jetson/archives/r36.4.3/DeveloperGuide/SD/Kernel/KernelCustomization.html#building-the-jetson-linux-kernel

The build option of “-mno-outline-atomics” is still there for both rel-36.3 and rel-36.4.

aarch64-buildroot-linux-gnu-gcc.br_real: error: unrecognized command line option ‘-mno-outline-atomics’; did you mean ‘-fno-inline-atomics’?

I don’t see any issue while building kernel and modules.

please refer to developer guide, Building the Jetson Linux Kernel.
you may double check you’ve download public release sources via NVIDIA Jetson Linux 36.4.3.

I’m build on x86 host machine, it’s ubuntu-20.04.
here’re some steps I’ve tested locally for your reference.
I’ve download the r36.4.3 public release sources.

$ axel -n 10 https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v4.3/sources/public_sources.tbz2                                                    
$ tar xvpf public_sources.tbz2                                                                  
$ mkdir kernel_src                                                                                                                                               
$ cd kernel_src/                                                                                                                                                 
$ tar xvpf ../kernel_src.tbz2                                                                                                                                    
$ tar xvpf ../kernel_oot_modules_src.tbz2                                                                                                                        
$ tar xvpf ../nvidia_kernel_display_driver_source.tbz2         

environment setups, and build commands.

$ export KERNEL_HEADERS=~/Downloads/public_sources/r36.4.3/Linux_for_Tegra/source/kernel_src/kernel/kernel-jammy-src
$ export CROSS_COMPILE=~/L4T/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-
$ make -C kernel
$ make modules

here’re installation path, and commands to install kernel modules.

$  export INSTALL_MOD_PATH=./out
$  sudo -E make modules_install
$  cd kernel/kernel-jammy-src/out/lib/modules/

应该是和编译环境有关系,我用的6.2,我用的docker环境编译,目前可以正常编译了,thanks

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