Configuring kernel on jetson xavier agx

Hi,

I have manually downloaded kernel sources for jetson through link https://developer.nvidia.com/embedded/l4t/r32_release_v6.1/sources/t186/public_sources.tbz2
I have create defaultconfig in .config file. Now I am trying to change configuration
but I am unable to run make menuconfig.
Getting the following error:

Please suggest any ressolution for this?

Hi hc_0302,

Please follow below steps to building the kernel:

$ export TEGRA_KERNEL_OUT=<outdir>
$ export CROSS_COMPILE=<toolchain_install_path>/bin/aarch64-linux-gnu-
$ export LOCALVERSION=-tegra
$ cd <kernel_source>
$ make ARCH=arm64 O=$TEGRA_KERNEL_OUT tegra_defconfig
$ make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j<n>

Please check detail steps from Developer Guide.
ToolChain download link: http://releases.linaro.org/components/toolchain/binaries/7.3-2018.05/aarch64-linux-gnu/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz

1 Like

Also β€œsudo apt-get install libncurses5-dev”.

1 Like

Thankyou for the support. I have successfully configured and build the kernel.
Can anyone please guide me how can I install image into my target nvidia jetson xavier agx and boot it ?

Hi hc_0302,

You can replace /boot/Image on your Xavier board directly.

Hi @carolyuu

I was following this link to know the flashing process Flashing Support β€” Jetson Linux<br/>Developer Guide 34.1 documentation
There i can see that we need to run certain scripts to flash the image into target and also need a linux host pc for that.

Now as per your comment, I want to confirm that instead of following this steps , I can directly replace the currect image in /boot folder with the new image and reboot the target.
Is my understanding correct?

If yes , I have one more concern that what if i fail in rebooting ,Is there any way to boot with old image then?

Hi hc_0302,

Please replace the same bsp kernel Image.
If your Xavier image is r32.7.1, please building kernel with r32.7.1 sources and replace this kernel Image.

You can add one more line in /boot/extlinux/extlinux.conf for backup.
example:

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      FDT /boot/dtb/kernel_tegra194-p2888-0001-p2822-0000.dtb
      INITRD /boot/initrd
      APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype=ext4 sdhci_tegra.en_boot_part_access=1 nv-auto-config 

LABEL primary
      MENU LABEL backup kernel
      LINUX /boot/Image-backup
      FDT /boot/dtb/kernel_tegra194-p2888-0001-p2822-0000.dtb
      INITRD /boot/initrd
      APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype=ext4 sdhci_tegra.en_boot_part_access=1 nv-auto-config 

If boot fail with replace one, you can select backup one to boot from uart.

Hi,

With respect to above steps I have one thing to ask that is there any way to check the version of the current original image in the target?
Like to know that whether it is r32.7.1 or some other. So that I can build new image also with right kernel source version.

In the above you would want to replace β€œLABEL primary” of the second entry to be β€œLABEL backup”.

FYI, I don’t think there is a direct way to tell which L4T release a kernel is from. The β€œsignature” would be the combination of the output of β€œuname -r” and the configuration (which is β€œ/proc/config.gz”).

Hi hc_0302,

You can run below command to check your image version:
$ cat /etc/nv_tegra_release

Hello,

I did all the above steps and replaced Image in /boot/ folder. Then I rebooted using command
β€œsudo shutdown -r now” but it took only 2 mins to reboot and my config changes are also not reflecting in zcat /proc/config.gz.
I think the image is not flashed and I am not able to get where is the mistake.

Sorry for the late response, have you managed to get issue resolved or still need the support? Thanks

Hello,

No my issue is not ressolved yet. As told by me in the last comment, I have got the image , then I tried to reboot my target after placing this image inside /boot/ folder on target but the image is not flashed it rebooted as normal, it just took 2 mins to reboot and everthing was same as before and my config changes also not reflecting. It seems that the new image is not flashed.

There is a known issue with your version r32.7.1. You need to patch the cboot in order for it to read extlinux.conf
Search this forum for details.

I can’t verify it, but what @user100090 says makes sense. If you replaced the Image file in β€œ/boot”, and if extlinux.conf names that file in the β€œLINUX” key/value pair, then your kernel should have booted. It is indeed possible that the conf file itself was not read, and in that case the kernel would have been read only from a partition. A full serial console boot log should verify where the kernel was read from.

Hi,
My kernel sources version is r32.6.1. Do you mean to say that it is booting from cboot thatsy it is unable to read Image from /boot/ folder ?

If yes, then please let me know how can i enable uboot on my target?

If your whole BSP firmware is not rel-32.7.2, then you won’t hit the extlinux.conf.

The problem here is if you really know what jetpack version your system is using.

And you may just use dmesg log to tell whether your kernel image is being updated.

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