After building Kernel, the default value in make menuconfig disappears

Jetson Linux: 36.3、JetPack: 6.0
I currently have needs for Build Kernel and DTBs. I referred to the official steps and procedures.
https://docs.nvidia.com/jetson/archives/r36.3/DeveloperGuide/SD/Kernel/KernelCustomization.html

The following is the instruction flow I executed:

CURRENT_DIR=$PWD
cd JP6/Linux_for_Tegra/source
./generic_rt_build.sh "disable"
export CROSS_COMPILE=$HOME/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-
make -C kernel
export INSTALL_MOD_PATH=$CURRENT_DIR/JP6/Linux_for_Tegra/rootfs/
sudo -E make install -C kernel
cp kernel/kernel-jammy-src/arch/arm64/boot/Image $CURRENT_DIR/JP6/Linux_for_Tegra/kernel/Image


cd JP6/Linux_for_Tegra/source
export IGNORE_PREEMPT_RT_PRESENCE=1
export CROSS_COMPILE=$HOME/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-
export KERNEL_HEADERS=$PWD/kernel/kernel-jammy-src
make modules
sudo -E make modules_install
cd ..
sudo ./tools/l4t_update_initrd.sh

cd JP6/Linux_for_Tegra/source
export CROSS_COMPILE=$HOME/l4t-gcc/aarch64--glibc--stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-
export KERNEL_HEADERS=$PWD/kernel/kernel-jammy-src
make dtbs
cp nvidia-oot/device-tree/platform/generic-dts/dtbs/* $CURRENT_DIR/JP6/Linux_for_Tegra/kernel/dtb/

The construction was successful, but when I executed make menuconfig in source/kernel/kernel-jammy-src again, many default values ​​were cancelled.
Why does this problem occur?
How to fix or restore default values

You need make savedefconfig:

So I need to execute make savedefconfig before make -C kernel,
After all steps are completed,
Execute cp defconfig arch/arm/configs/my_cool_defconfig again?

Like this:

make menuconfig
make savedefconfig
cp defconfig arch/arm/configs/defconfig

make -C kernel
...
...
...
make -C kernel
...
...
...

But if you execute it like this, it will interrupt with Error when make -C kernel.

Attached are the log files during execution.
BuildKernel_Error.log (29.0 KB)

這跟你執行的順序沒關係吧
問題是這一行

make[2]: *** No rule to make target 'debian/canonical-certs.pem', needed by 'certs/x509_certificate_list'.  Stop.
make[2]: *** Waiting for unfinished jobs....

還有你的config檔看起來問題很多

.config:5093:warning: symbol value 'm' invalid for GPIO_TPS68470
.config:6287:warning: symbol value 'm' invalid for RADIO_ADAPTERS
.config:6911:warning: symbol value 'm' invalid for DRM_GEM_SHMEM_HELPER
.config:7634:warning: symbol value 'm' invalid for SND_SOC_SOF_DEBUG_PROBES
.config:7677:warning: symbol value 'm' invalid for SND_SOC_SOF_HDA_PROBES
.config:10916:warning: override: SQUASHFS_DECOMP_MULTI changes choice state
.config:10917:warning: override: SQUASHFS_DECOMP_MULTI_PERCPU changes choice state

I modified the following two lines in defconfig

CONFIG_SYSTEM_TRUSTED_KEYS=""
CONFIG_SYSTEM_REVOCATION_KEYS=""

Then cp defconfig arch/arm64/configs/defconfig
After performing other steps of Build Kernel and DTBs, no errors occurred.
Thanks for the help!

In addition, my .config file contains the NV default value, which I have not modified, so I don’t know why these warnings occurred.

Hello @DaveYYY ,
Currently it becomes stuck during Flash (TimeOut)
Attached below the log file
flash_1-10_0_20240718-092030.log (9.7 KB)

Linux_for_Tegra\bootloader\generic\BCT\tegra234-mb2-bct-misc-p3767-0000.dts has been modified
tegra234-mb2-bct-misc-p3767-0000.txt (313 Bytes)

Please provide assistance, Thanks!

請抓serial console log

Flash_Timeout.log (291.1 KB)

我是說這個

Sorry, I’m using custom board
no Serial Console on it.

那你至少要把serial console接出來才能debug…
只要沒開進USB device mode 不管任何原因 host上都只會顯示time out

Hi @DaveYYY
I did not use make savedefconfig
Just add a few new additions to arch/arm64/configs/defconfig

No errors occurred in Build Kernel, DTBs, and Flash.
It’s because there are more than 5,000 defconfig projects generated by make savedefconfig
The default is only 1330

所以現在修好了?

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