Update kernel image without full flash

Hello,

I am trying to update kernel image without full flash due to customer request.
We need to update kernel image to fix some issue happens on customer’s device.
And I already check issue can be fixed with full flash.
(We are using JetPack 4.6.4.)

I’ve tried below commands as Jetson-tx2, Change kernel without full flash, but it doesn’t work. (issue still happens.)

My steps to update kernel image are:

  1. Replace /boot/Image and /boot/dtb with new kernel image and device tree
  2. Reboot device with force recovery mode
  3. Flash kernel & kernel-dtb with below commands
    $ sudo ./flash.sh -r -k kernel jetson-tx2 mmcblk0p1
    $ sudo ./flash.sh -r -k kernel-dtb jetson-tx2 mmcblk0p1
  4. Reboot device and check dmesg log

After check dmesg log, I can confirm device tree is replaced to my new device tree.
But I still observe issue happens.
It seems not replace kernel image correctly.

How can I update kernel correctly without full flash ???
Thank you.

Hi emma.sy.lin,

Your steps seem correct for me to update kernel image and dtb.
Could you share the /boot/extlinux/extlinux.conf from your board for further check?

How did you check if the kernel is updated?
Could you run uname -v to check the build time?
What’s your modification in kernel?

Dear Kevin,

I only can verify kernel image with issue reproduce steps.
If kernel image is updated correctly, issue should be fixed, right ???

Please refer to 0001-display-Get-back-time-delay-to-wait-DSI-stable-for-r.patch for our modification.
We adjust timing of DSI bridge IC power sequence and it is a built-in driver.

Please check source code patch and extlinux.conf in device with extlinux_and_patch.zip

The output of “uname -v” shows correct build time of new kernel image.


extlinux_and_patch.zip (1.6 KB)

If it shows the build time of new kernel image, then I think the kernel has been updated correctly.

Do you build the driver into kernel image or as kernel module?
If you build it as kernel module, you have to transfer the .ko into the device (/lib/modules/..) and run sudo modprobe XXX to load it manually.

Dear Kevin,

We build the driver as built-in driver in kernel defconfig.
( We set CONFIG_TEGRA_DSI2LVDS_SN65DSI85=y in kernel defconfig.)
So, I think this driver should be included in kernel image, right ???

Since you have added CONFIG_TEGRA_DSI2LVDS_SN65DSI85 as an integrated feature (the =y) it implies you probably need to also install all modules and change the CONFIG_LOCALVERSION (default is “-tegra”, you could rename it as something like “-sn65dsi85” or “-dsi2lvds”). If you had matched your kernel config for all integrated features, and then added purely as a module, then you could copy in just the one module. As is you have a lot more work to do, and it is riskier. If you use an initrd, then you would also have to update the initrd with the new modules. Adding modules not used for boot don’t require an initrd change, but you have probably invalidated all of the existing modules and will need a new initrd (if you have an initrd, which many people don’t use except for external boot devices).

Not all features can be a module, and not all features can be integrated, but most can be either. Is there a reason you need this device as integrated? Every time the driver updates you’ll have to go through the complete install of kernel and all modules. With a module it is just one file copy (followed by “sudo depmod -a” to tell the kernel to scan for changes in modules).