Hello, @DaneLLL ! I’ve followed these steps already:
mkdir ~/kernel
cd ~/kernel
export TEGRA_KERNEL_OUT=`pwd`
mkdir ~/modules
cd ~/modules
export TEGRA_MODULES_OUT=`pwd`
export TOP=/usr/src/linux-headers-5.10.120-tegra-ubuntu20.04_aarch64/kernel-5.10
cd ~
vim source_sync.sh
chmod +x source_sync.sh
./source_sync.sh -h
./source_sync.sh -k -t jetson_35.4.1
sudo cp -r ~/sources/kernel/* /usr/src/linux-headers-5.10.120-tegra-ubuntu20.04_aarch64
cd $TOP
make O=$TEGRA_KERNEL_OUT tegra_defconfig
make O=$TEGRA_KERNEL_OUT nconfig
make O=$TEGRA_KERNEL_OUT -j 8 Image
make O=$TEGRA_KERNEL_OUT -j 8 modules
make O=$TEGRA_KERNEL_OUT INSTALL_MOD_PATH=$TEGRA_MODULES_OUT modules_install
That finished successfully.
I need to… replace the kernel at this point? I don’t see anything in the documentation that you’ve linked that captures that step. I’ve never done anything like this, so if you have an ELI5, I’d really appreciate it.
I’m trying something new, but also a bit more aligned with the official docs it would seem. They recommend using nvbuild.sh, so I modified that script to call nconfig and pass a suffix!
cd ~
./source_sync.sh -k -t jetson_35.4.1
cp nvbuild.sh nvcommon_build.sh sources
cd sources
./nvbuild.sh -o $TEGRA_KERNEL_OUT -s cilium
This seems to have done the trick building the image, but I can’t seem to test it. I discovered kexec when asking for help back on the turing pi discord. This just hangs, though:
Am I missing a step? Is there something else that needs to be passed to kexec to test out this Image? Or did I miss something on the Image build itself??
Hi,
Please follow the steps in document and not to execute additional steps.The steps are validated and if you execute it one by one, it is supposed to work fine.
The steps mention swapping out files in Linux_for_Tegra. That’s what I did when flashing originally. I don’t want to flash the entire system…
I’m currently trying to modify the kernel in-place, essentially. Sorry if I seem dense, but unless the only solution is to re-flash the Orin, the docs you linked don’t answer my question.
Hello, Wayne! I’ve rebuilt the Image with new flags using =y and =m. I have a directory with the new bits, but I’d like to test them before bricking my system 😕. Any suggestions?
Basically if you changed anything to “=m” in kernel config, it means you want to build it as kernel modules. In that case, if you don’t want to reflash the rootfs, you have to manually copy the new modules + dependencies file to your /lib/modules/<uname -r> directory on your jetson.
And jetson by default is using extlinux to boot. Which means there is a /boot/extlinux/extlinux.conf file. You can read the info there first.
It will tell where the kernel gets loaded. And if you want to recover from your new kernel which gets crashed easily, you can add a backup option in that file. After you add that, you can select which kernel to boot during boot by using UART serial console to interrupt UEFI bootloader.