Building Orin Nano kernel and SD image

I am attempting to add some networking features to my Orin Nano Developer Kit kernel. I am following the steps below. When trying to boot the SD card, the hardware is dumping me into an EFI shell, implying that it cannot find the requirements for a bootable SD card. Am I missing as step or something? The build host is an x86 Linux computer.

### On my laptop:
docker run -d -it -shm-size="4096m" --privileged=true --name ubuntu_20.04 ubuntu:20.04 /bin/bash

## See below where I got these
docker cp sdkmanager_*deb ubuntu_20.04:/tmp/
docker cp ubuntu_20.04:/tmp/
docker cp ubuntu_20.04:/tmp/
docker cp NVJETSON.config ubuntu_20.04:/tmp/
docker cp aarch64--glibc--stable-final.tar.gz ubuntu_20.04:/tmp/

docker exec -it ubuntu_20.04 /bin/bash

### Inside the docker container
mount -o remount,size=10G /dev
mkdir /opt/l4t-gcc/
pushd /opt/l4t-gcc/
tar xf /tmp/aarch64--glibc--stable-final.tar.gz

apt-get update
apt-get install vim sudo build-essential bc git kmod iputils-ping libncurses5 libncurses5-dev flex bison gdisk libssl-dev /tmp/sdk*deb

useradd noc -m -s /bin/bash
# add "noc ALL=(ALL) NOPASSWD: ALL" towards bottom

su -l noc

sdkmanager --cli --query interactive
# log in with web browser
# select Jetson, Target Hardware, Jetson Orin Nano modules, Linux, JetPack 5.1.2, no detailed, no flash

sdkmanager --cli install  --logintype devzone --product Jetson --host --targetos Linux --version 5.1.2 --target JETSON_ORIN_NANO_TARGETS --flash skip
# Accept the EULAs, wait for download to complete. Select Skip once its done.

cd ~/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra

# look at the actual running platform's /etc/nv_tegra_release file, you can see it is R35, REVISION: 3.1, so we want tag jetson_35.3.1
./ -k jetson_35.3.1 -o jetson_35.3.1
cd sources
mv /tmp/nv*sh ./

export KERNEL_OUT=/home/noc/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/kernel_out
export kernel_out=$KERNEL_OUT
export CROSS_COMPILE_AARCH64_PATH=/opt/l4t-gcc
export CROSS_COMPILE_AARCH64=/opt/l4t-gcc/bin/aarch64-buildroot-linux-gnu-
mkdir $kernel_out

./ -o $kernel_out

# make a backup of the default Kconfig
cp ./kernel/kernel-5.10/arch/arm64/configs/tegra_defconfig{,.orig}
cat /tmp/NVJETSON.config > ./kernel/kernel-5.10/arch/arm64/configs/tegra_defconfig

vi ./kernel/kernel-5.10/arch/arm64/configs/tegra_defconfig
# set the following:

./ -o $kernel_out

cd ../rootfs/
cat $kernel_out/drivers/gpu/nvgpu/nvgpu.ko | sudo tee ./usr/lib/modules/5.10.120-tegra/kernel/drivers/gpu/nvgpu/nvgpu.ko > /dev/null

cd ../kernel/dtb/
rsync -av $kernel_out/arch/arm64/boot/dts/nvidia/ ./
cd ..
cat $kernel_out/arch/arm64/boot/Image > Image

cd ../sources/kernel/kernel-5.10
sudo make ARCH=arm64 O=$kernel_out modules_install INSTALL_MOD_PATH=/home/noc/nvidia/nvidia_sdk/JetPack_5.1.2_Linux_JETSON_ORIN_NANO_TARGETS/Linux_for_Tegra/rootfs

cd $kernel_out/../
sudo ./ -r rootfs
sudo ./tools/ -o sdcard.img -b jetson-orin-nano-devkit -d sd

# now we have file ./sdcard.img

The downloaded files’ sources are described below:

# aarch64--glibc--stable-final.tar.gz
Then go to Bootlin Toolchain gcc 9.3

# NVJETSON.config
From a running system's /proc/config.gz file

Then go to Driver Package (BSP) Sources
Then it is buried in public_sources.tbz2 -> kernel_src.tbz2

# sdkmanager_1.9.3-10904_amd64.deb

Hi ghb,

Are you using the devkit for Orin Nano?

Could your board boot up w/o issue before you add your custom network features?

Do you have standalone Ubuntu 18.04 or 20.04 as your host PC instead of using docker for SDKM?

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