Xavier NX can not change kernel Image with which compiled by myself

Dear ,

I get a Xavier NX board recent. The board is with emmc(not with sd card version).

I want to change the kernel Image with which compiled by myself. But I can not change it successfully. I add a line printf information in kernel source file, then I change the kernel Image, but I can not see printf information when system bootup. What I have done as follows.

I make the linux system as follows:

I download the SDK version 32.4.2 form the web.

Tegra186_Linux_R32.5.1_aarch64.tbz2 :drivers packet

Tegra_Linux_Sample-Root-Filesystem_R32.5.1_aarch64.tbz2 : filesystem

public_sources.tbz2 :kernel src files.

(2)I install the project in ubuntu16.04 via vmware.

I put the above 3 files into ubuntu16.04. I unpack the file in nx.
image

tar –xvf Tegra186_Linux_R32.5.1_aarch64.tbz2

cd Linux_for_Tegra/rootfs

tar –xvpf …/…/ Tegra_Linux_Sample-Root-Filesystem_R32.5.1_aarch64.tbz2

(3)cd Linux_for_Tegra

./apply_binaries.sh

This command execute success.

(4)I connect the board between pc with usb line, then I make the board in “force recovery” mode. After powerup the board. I burn the system with command in Ubuntu as follow.

./flash.sh p3449-0000+p3668-0001-qspi-emmc mmcblk0p1

This command execute success,and the debug uart display as follows with default kernel Image.

image

(5) In nx file folder, I unpack the kernel src file into public file folder.
I make changes in public/kernel/nvidia/drivers/media/i2c/imx219.c as follows:

image

Compile the kernel source file with commands as follows:

cd kernel/kernel-4.9

config command:

make ARCH=arm64 CROSS_COMPILE=/home/ubuntu/nx/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- O=/home/ubuntu/nx/public/kernel-out tegra_defconfig

make command:

make ARCH=arm64 CROSS_COMPILE=/home/ubuntu/nx/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- O=/home/ubuntu/nx/public/kernel-out -j8

The commands above execute success.

Then I copy the kernel-out/arch/arm64/boot/Image file to Linux_for_Tegra/kernel file folder.

(6)Change the kernel with follow command in force recovery mode:

cd Linux_for_Tegra

sudo ./flash.sh -r -k kernel jetson-xavier-nx-devkit-emmc mmcblk0p1

This command executes success.

But when system bootup I can not see the uart printf information “============= IMX219 INIT ==============".

I saw someone says the right command should as this: ./flash.sh -r -k kernel jetson-xavier mmcblk0p1.

But when I execute this command , it can not execute success.

I copy the Image to board filesystem /boot/ file folder when system bootup, and then reboot the system, but the system can not boot up.

I have change the sdk version as 32.5.1, 32.6.1, but it can not have any changes.

Can you tell me how to change kernel Image .

Hello,

This topic will be better supported in the Jetson Xavier NX forum. I will move it over for you.

Cheers,
Tom K

By default, kernel is read from rootfs but not partition.

So just replacing this to /boot/Image and it should take effect.

Thank you for your replay.

Thank you for your replay.
In sdk verison 32.4.2 , just replacing Image to /boot/Image, it can not make system bootup failed.
I make another change as follows:
image
image
and then bootup system, I can see the information which I add.


But the information I add above not printf just the same as before.

I this there is something wrong that I overlook. I will test after.
Thanks again for your help.

Because you are using uart to dump the log… and by default we set the verbose level to only print error on uart kernel log.

If you use dmesg to dump full log, you shall see your printk…

Thank you very much .
Your replay really help me. The problem just the same as what you say.
Thanks again for your help.

Dear WayneWWW,
I have to make corrections to the burn our own kernel Image.
There are 2 steps:
(1)Use the command : sudo ./flash.sh -r -k kernel jetson-xavier-nx-devkit-emmc mmcblk0p1
(2)Copy the Image to /boot/ to replace the /boot/Image .
Thank you.

The second step should be sufficient. No actually need the first one.

Suggestion: Save the original “/boot/Image” and add yours with a new name (e.g., Image-new) and have a new extlinux.conf entry for the new name. Then you can revert by a simple serial console choice if something goes wrong.

Thank you for your replay.
Your suggestion is really important. It can make me bootup the system if something is wrong with the kernel which I change.
I make changes as follows: