Hello,
I am trying to build my own kernel with the additional USB driver. As a first step, I wanted to build the Image and modules without any changes in make menuconfig except adding custom LOCALVERSION.
I can successfully run the build process, but I get stuck at boot process. When I was testing just the Image, without new modules, my Jetson was booting up. Once I added the custom-compiled modules, it fails to boot.
The build process I follow:
#1. Create output directories for kernel compilation
mkdir /home/bartosz/nvidia/Linux_for_Tegra/source/kernel_out
export WORK=/home/bartosz/nvidia/Linux_for_Tegra/source/kernel_out
mkdir -p $WORK/rootfs/boot
mkdir -p $WORK/rootfs/lib
#2. Create custom .config file
cd ~/nvidia/Linux_for_Tegra/source/kernel/kernel-jammy-src/
make ARCH=arm64 menuconfig
#LOAD DEFAULT CONFIG FROM ./arch/arm64/configs/defconfig
#CHANGE LOCALVERSION
#SAVE AS ./arch/arm64/configs/gadget.config
export KBUILD_DEFCONFIG=gadget.config
#3 Build the kernel
cd ~/nvidia/Linux_for_Tegra/source
./nvbuild.sh -o $WORK
INSTALL_MOD_PATH=$WORK/rootfs ./nvbuild.sh -i
Do I miss any step? The official instruction is quite confusing I must say, It mentiones some script files like apply_binaries.sh without telling where to find them.
The error I get during boot process:
[ 5.166601] hid-generic 0003:1A2C:0E24.0001: input,hidraw0: USB HID v1.10 Keyboard [SEM USB Keyboard] on usb-3610000.usb-2.2/input0
[ 5.171386] input: SEM USB Keyboard Consumer Control as /devices/platform/bus@0/3610000.usb/usb1/1-2/1-2.2/1-2.2:1.1/0003:1A2C:0E24.0002/input/input2
[ 5.230224] input: SEM USB Keyboard System Control as /devices/platform/bus@0/3610000.usb/usb1/1-2/1-2.2/1-2.2:1.1/0003:1A2C:0E24.0002/input/input3
[ 5.231414] hid-generic 0003:1A2C:0E24.0002: input,hidraw1: USB HID v1.10 Device [SEM USB Keyboard] on usb-3610000.usb-2.2/input1
[ 14.826548] ERROR: mounting PARTUUID=612e65bc-ce31-4b79-a95c-3bf422789357 as /mnt fail...
[ 14.828381] ERROR: PARTUUID=612e65bc-ce31-4b79-a95c-3bf422789357 mount fail...
[ 14.829785] ttyTCU0: Press [ENTER] to start bash in 30 seconds...
[ 17.830232] ttyTCU0: Press [ENTER] to start bash in 27 seconds...
[ 20.830594] ttyTCU0: Press [ENTER] to start bash in 24 seconds...
[ 23.830955] ttyTCU0: Press [ENTER] to start bash in 21 seconds...
The kernel .config I used differs from the original .config I took from SDK only in few places:
bartosz@bartosz:~/nvidia/Linux_for_Tegra/source/kernel_out/kernel/kernel-jammy-src/arch/arm64/configs$ diff config_sdk gadget.config
5c5
< CONFIG_CC_VERSION_TEXT="gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
---
> CONFIG_CC_VERSION_TEXT="aarch64-buildroot-linux-gnu-gcc.br_real (Buildroot 2022.08) 11.3.0"
7c7
< CONFIG_GCC_VERSION=110400
---
> CONFIG_GCC_VERSION=110300
32c32
< CONFIG_LOCALVERSION=""
---
> CONFIG_LOCALVERSION="-gadget"
790a791,793
> CONFIG_GCC_PLUGINS=y
> # CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set
> # CONFIG_GCC_PLUGIN_RANDSTRUCT is not set
8984a8988,8991
> # CONFIG_GCC_PLUGIN_STRUCTLEAK_USER is not set
> # CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF is not set
> # CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL is not set
> # CONFIG_GCC_PLUGIN_STACKLEAK is not set
I tried to edit the tegra-defconfig as well, effect is similar. Do you have any ideas what could cause the issue?
I use Jetson Orin with eMMC drive, I don’t know if this might be the issue…