Flash fails after modifying kernel version via menuconfig

Hi,
I modified kernel configuration via menuconfig and added version string prefix.
Now my flash fails (JP 5.1.3)

log:
flash.log (17.1 KB)

flash script needs to retrieve the version using this command

BASE_KERNEL_VERSION="$(strings "${base_l4t_dir}/kernel/Image" | grep -oE "Linux version [0-9a-zA-Z\.\-]+[+]* " | cut -d\  -f 3)"

If you can modify the kernel so that the above command work then it would be ok.

Hi,
Thank you for your answer.

  1. Where this variable is defined? can I modify the command to match my needs?

  2. I edit the version by simply adding a. so now the version is:

Linux version 5.10.192a-tegra

The problem is that now the boot fails. If I flash again without adding the ‘a’ char, the boot succeeds.

boot log:
failed_boot.log (123.5 KB)

It’s located in Linux_for_Tegra/tools/ota_tools/version_upgrade/ota_make_recovery_img_dtb.sh.

Then what’s the issue now?
I don’t think something like 5.10.192a-tegra is allowed. It is causing the regular expression mentioned earlier to fail.
You can only add your custom suffix after the hyphen.

if i add only ‘a’ the strings command succeeds:

bsp@bsp-host:~/Desktop/Workspace_5_1_3/Linux_for_Tegra/kernel$ echo "$(strings “./Image” | grep -oE “Linux version [0-9a-zA-Z.-]+[+]* " )”
Linux version 5.10.192a-tegra

The problem is that if I flash the target it won’t boot (I attached the log)

P.S
If I add custom string after the hypen, strings command don’t find the version.

bsp@bsp-host:~/Desktop/Workspace_5_1_3/Linux_for_Tegra/kernel$ echo "$(strings “./Image” | grep -oE “Linux version [0-9a-zA-Z.-]+[+]* " )”

bsp@bsp-host:~/Desktop/Workspace_5_1_3/Linux_for_Tegra/kernel$

even though it exists:

bsp@bsp-host:~/Desktop/Workspace_5_1_3/Linux_for_Tegra/kernel$ echo “$(strings “./Image” )” | grep custom
Linux version 5.10.192-custom_string-tegra (root@bsp-host) (aarch64-buildroot-linux-gnu-gcc.br_real (Buildroot 2020.08) 9.3.0, GNU ld (GNU Binutils) 2.33.1) #4 SMP PREEMPT Wed Mar 27 11:07:22 IST 2024
5.10.192-custom_string-tegra SMP preempt mod_unload modversions aarch64
5.10.192-custom_string-tegra

Anyway, it’s just a warning and you can turn off it.
It the new kernel is able to boot up then it’s fine.

its not booting up

I don’t think it’s a Jetson problem.
Like you can try the same thing on an x86 VM.

you say that on a VM, if i modify the kernel sting (add local version) via menuconfig, it won’t boot as well? like a common problem in Linux kernel itself? (sounds unlikely)

YES, you can do some experiments like that.

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