Kernel,uboot,dtb and rootfs upgrade in jetson TX2

i want to upgrade kernel,uboot,rootfs and dtb in jetson TX2.

how we can do above upgrade any script or code is avilable

Normally you would flash the entire Jetson while it is in recovery mode. This would wipe out anything currently on the Jetson, but you can clone first to keep a copy of the rootfs if you need a reference copy.

There is a strong dependency between a rootfs and the other partitions (the boot content), and so you cannot restore an older clone into a newer release, but loopback mounting of the clone from a PC implies you could use the clone to update non-boot parts of your rootfs into the new rootfs.

The front end to flashing (far more convenient than manual setup and downloading) is SDK Manager (once upon a time referred to as JetPack…the JetPack content is still there, but SDKM added some networking conveniences). You can find the JetPack/SDKM download pages here (you’d use the most recent one unless you have a very good reason to use an older release):
https://developer.nvidia.com/embedded/jetpack-archive

You install the “.deb” file on the Ubuntu 18.04 host PC. Then, as a regular user, you run “sdkmanager”. Assuming the Jetson is in recovery mode and the TX2 is connected to the host via the micro-B USB cable, you’ll be prompted by SDKM to install or flash various components.

Do be aware that although the app does not make it obvious you can deselect components to install, that you can uncheck those items. For example, you can deselect installing items to the host PC. You can also select to only flash the Jetson without installing extra components (extra components step requires flash to complete and have the first boot account setup completed). You can then run SDKM again at a later date and deselect flash, but choose to install components to the host PC, or install optional extras to the fully booted Jetson on another day.

You probably do want to be sure to have a monitor/keyboard attached to the Jetson for first boot setup since no user account will exist prior to that, and the account must exist for the optional components to be added.

My question is that suppose i have compiled my image with my own rootfs,Image and dtb and uboot files and device is in the field and now i have done some changes in rootfs,image and dtb and want to update this file in existing device…how i can do that?

Updating an entire partition image (rootfs) has no particularly safe way to do this outside of being local and using recovery mode.

The kernel itself can be installed as a file in “/boot”, and then the extlinux.conf file updated (perhaps leaving the old kernel in, but making the new kernel the default). The same is true for the device tree if used as a file under “/boot” and named in extlinux.conf.

When it comes time to reboot after such a change, then if it fails, you are kind of out of luck if you are not locally present. Serial console can easily pick different entries and change to a known working kernel, but this is local only (unless you have a modem with a serial UART and a phone line to it).

There are also ways to work with a backup partition, and this might be want, but I’ve never worked with this. Setting up such a configuration would mandate doing so in recovery mode anyway, and so if this is in the field prior to setting up some sort of recovery partition, then you are once again relegated to physically getting to the Jetson.

There may be something you have not considered. You could actually create “.deb” files, your own repository (or network copy to the Jetson), and install with apt or dpkg. This cannot deal with everything, but what it would do is allow you to test on a local Jetson which is currently in the same configuration of the remote Jetson. You could also use your own .deb which has no other purpose than to guarantee other packages which might break your options won’t change. Your packages could be aware of NVIDIA packages needed for proper boot. That would be a lot of effort, but for the person who actually installs, it would simplify life.

Anyone with a URL to teach a backup partition install might want to add that.

you may check developer guide, there’s Over-the-Air (OTA) Update for software update service.

we dont need OTA feature.

we want to use a script to upgrade rootfs,dtb and uboot.

in Tx1 we were using BCT table now what is changed in TX2 for BCT.

we have a rootfs which we want to upgrade with recovery partion,how we can
do that?

how we are mapping flash.xml entry to emmc partitions.

any reference will be helpful

hello anupam.kumar,

may I know what’s your use-case, it’s not suggest to upgrade binaries individually.

for fiield issues we need that the same thing we have done in Tx1.

we are upgrading rootfs,image,dtb and bootloader with three option

  1. upgrade rootfs only
  2. upgrade bootloader,kernel and dts
  3. combined both 1 and 2

That we are doing in Tx1 using script,same i want to do in Tx2 also.

so i am not able to find dtb,kernel and rootfs partition of primary image.

can you suggest on this.

hello anupam.kumar,

you may check the partition label with the following command.
i.e. $ ls -al /dev/disk/by-partlabel

lrwxrwxrwx 1 root root 16 Jan 28 15:58 adsp-fw → …/…/mmcblk0p11
lrwxrwxrwx 1 root root 16 Jan 28 15:58 adsp-fw_b → …/…/mmcblk0p12
lrwxrwxrwx 1 root root 15 Jan 28 15:58 APP → …/…/mmcblk0p1
lrwxrwxrwx 1 root root 16 Jan 28 15:58 BMP → …/…/mmcblk0p22
lrwxrwxrwx 1 root root 16 Jan 28 15:58 BMP_b → …/…/mmcblk0p23
lrwxrwxrwx 1 root root 15 Jan 28 15:58 bootloader-dtb → …/…/mmcblk0p6
lrwxrwxrwx 1 root root 15 Jan 28 15:58 bootloader-dtb_b → …/…/mmcblk0p7
lrwxrwxrwx 1 root root 16 Jan 28 15:58 bpmp-fw → …/…/mmcblk0p13
lrwxrwxrwx 1 root root 16 Jan 28 15:58 bpmp-fw_b → …/…/mmcblk0p14
lrwxrwxrwx 1 root root 16 Jan 28 15:58 bpmp-fw-dtb → …/…/mmcblk0p15
lrwxrwxrwx 1 root root 16 Jan 28 15:58 bpmp-fw-dtb_b → …/…/mmcblk0p16
lrwxrwxrwx 1 root root 15 Jan 28 15:58 cpu-bootloader → …/…/mmcblk0p4
lrwxrwxrwx 1 root root 15 Jan 28 15:58 cpu-bootloader_b → …/…/mmcblk0p5
lrwxrwxrwx 1 root root 16 Jan 28 15:58 DATA_APP → …/…/mmcblk0p34
lrwxrwxrwx 1 root root 16 Jan 28 15:58 eks → …/…/mmcblk0p10
lrwxrwxrwx 1 root root 16 Jan 28 15:58 FBNAME → …/…/mmcblk0p21
lrwxrwxrwx 1 root root 16 Jan 28 15:58 FRU → …/…/mmcblk0p32
lrwxrwxrwx 1 root root 16 Jan 28 15:58 kernel → …/…/mmcblk0p28
lrwxrwxrwx 1 root root 16 Jan 28 15:58 kernel_b → …/…/mmcblk0p29
lrwxrwxrwx 1 root root 16 Jan 28 15:58 kernel-bootctrl → …/…/mmcblk0p26
lrwxrwxrwx 1 root root 16 Jan 28 15:58 kernel-bootctrl_b → …/…/mmcblk0p27
lrwxrwxrwx 1 root root 16 Jan 28 15:58 kernel-dtb → …/…/mmcblk0p30
lrwxrwxrwx 1 root root 16 Jan 28 15:58 kernel-dtb_b → …/…/mmcblk0p31
lrwxrwxrwx 1 root root 15 Jan 28 15:58 mts-bootpack → …/…/mmcblk0p2
lrwxrwxrwx 1 root root 15 Jan 28 15:58 mts-bootpack_b → …/…/mmcblk0p3
lrwxrwxrwx 1 root root 16 Jan 28 15:58 recovery → …/…/mmcblk0p24
lrwxrwxrwx 1 root root 16 Jan 28 15:58 RECOVERY_APP → …/…/mmcblk0p33
lrwxrwxrwx 1 root root 16 Jan 28 15:58 recovery-dtb → …/…/mmcblk0p25
lrwxrwxrwx 1 root root 16 Jan 28 15:58 sc7 → …/…/mmcblk0p19
lrwxrwxrwx 1 root root 16 Jan 28 15:58 sc7_b → …/…/mmcblk0p20
lrwxrwxrwx 1 root root 16 Jan 28 15:58 sce-fw → …/…/mmcblk0p17
lrwxrwxrwx 1 root root 16 Jan 28 15:58 sce-fw_b → …/…/mmcblk0p18
lrwxrwxrwx 1 root root 15 Jan 28 15:58 secure-os → …/…/mmcblk0p8
lrwxrwxrwx 1 root root 15 Jan 28 15:58 secure-os_b → …/…/mmcblk0p9

This is my emmc configuraion.

so how i will identify dtb,uboot and kernel file from this label.

can you please help me in this.

cpu-bootloader — it is uboot,right?

what is label name of BCT,kernel and dtb file

hello anupam.kumar,

may I also know the JetPack release version you’re working with?
you should also note that there’re signed and encrypted for bootloader binaries.

also,
you may able to update kernel and device tree blobs, but you should perform a flash process to update board configuration files.
thanks

I am using SDK32.4.3…can you please tell if i am updating the kernel and device tree i must update the board configuration file,right? for for board configuration file i need to perform flashing process…in Tx1 i was using sdk28.2,where we dont need to perform flash operation to update board configuration file…have things changed now?

hello anupam.kumar,

No, you’re able to upgrade kernel image and device tree blob just ensure they’re based-on the same board configuration.


just for confirmation, were you asking for uboot update or something else?

Thi is my requiremnt

3 type of upgrade we want with below upgrade option

  1. Rootfs only
  2. uboot, kernel and dts only
  3. Both 1 and 2 combined

so i need to know each of these file name(uboot,kernel,device tree) and partition number to update it with new files.

hello anupam.kumar,

it’s APP partition for your root file system.
uboot were actually working with kernel image and it flashed to kernel partition,
there’s kernel-dtb partition for device tree blob.

so you are saying kernel and uboot will be in kernel partion?

what is the file name of uboot and kernel which is flash to this partitions?

it’s u-boot.bin and boot.img.

i dont see uboot.bin file in flashing process of Tx2 device.

so i want to know uboot file name which is used during flashing ,same i want to know for dtb,i see file with encrpyt name.

i have other question…if we are upgrading uboot,device tree and kernel then do we need to update the board configuration table also?what is the file name of board configuration table