Easier way to flash Xavier B?

Hello,

We develop Real-Time OS called RedHawk which we are currently trying to port over to DRIVE AGX. During this process, the Xavier(s) need to be flashed regularly with updated kernel or bug-fixed kernel.

On Xavier A, we run below command on the host system to flash the kernel partition:

sudo ./bootburn.sh -b e3550b03-t194a -u A_1_kernel A_1_kernel-dtb A_1_ramdisk -x /dev/ttyUSB3

However, running the same command to flash the kernel partition on Xavier B, it didn’t update the kernel. I have tried setting Guess OS part from 1 to 6 without any success. So, currently I am running below command which takes more time to flash Xavier B.

sudo ./bootburn.sh -b e3550b03-t194b -s -x /dev/ttyUSB3

Is there a better and faster way to flash Xavier B?

The DRIVE AGX has been flashed with DRIVE Software 10.0. Also, I can’t use Xavier A for the kernel testing as it doesn’t have real-time features set.

Hello AnishAney,

can you please specify the command you use to flash the kernel partition?
also, can you share the log when executing the command?

Hello ShayNV,

I ran the same command as I have for Xavier A, with variables changed from “A” to “B” and also board updated to “b”.

sudo ./bootburn.sh -b e3550b03-t194b -u B_1_kernel B_1_kernel-dtb B_1_ramdisk -x /dev/ttyUSB3

The “out” directory’s entry shows imagepath has been changed to “/home/aaney/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/drive-t186ref-linux/kernel-rt_patches/Image”, which was previously “#imagepath=/tmp/Image-4.14.102-rt53-r5.1.6.1-tegra-RedHawk-8.0-trace”.

aaney@anish-ihawk:~/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/drive-t186ref-foundation/tools/host/flashtools/bootburn_t19x$ fgrep "imagepath" ../../../../out/e3550b03-t194b/linux_storage_emmc.cfg 
imagepath=/home/aaney/nvidia/nvidia_sdk/DRIVE_Software_10.0_Linux_OS_E3550/DRIVEOS/drive-t186ref-linux/kernel-rt_patches/Image
#imagepath=/tmp/Image-4.14.102-rt53-r5.1.6.1-tegra-RedHawk-8.0-trace
#imagepath=/tmp/Image-4.14.102-rt53-r5.1.6.1-tegra-RedHawk-8.0-trace-static
#imagepath=/tmp/pegasus_trace_Image
aaney@anish-ihawk:

The kernel version of the Guest OS on Xavier B didn’t change.

root@tegra-ubuntu:~# echo $(cat /proc/device-tree/model)
-bash: warning: command substitution: ignored null byte in input
e3550_t194b
root@tegra-ubuntu:~# 
root@tegra-ubuntu:~# uname -a
Linux tegra-ubuntu 4.14.102-rt53-r5.1.6.1-tegra-RedHawk-8.0-trace #1 SMP PREEMPT Thu Mar 5 19:43:17 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux
root@tegra-ubuntu:~#

I have also tried substituting Guest OS number in the command with 2,3… but nothing worked.

Attaching log file after posting.
xavier-B-kernel-partition.log (17.6 KB)

Hi AnishAney.
The -u option will be deprecated in the future.
you could speed things up in a couple of ways:
1.) Use the -d option for replacing the dtb. See documentation :
https://docs.nvidia.com/drive/drive_os_5.1.6.1L/nvvib_docs/index.html#page/DRIVE_OS_Linux_SDK_Development_Guide/Flashing%20Customization/flashing_bootburn.html#
2.) Don’t flash the rootfs and use fast flash.
./bootburn.sh -b e3550b03-t194a -s -o -O --no_firmware_update
3.) If working on a linux driver than no need to flash the entire kernel just use rmmod and insmod

Hello shayNV,

1.) Will this option update the dtb partition for the Guest OS on Xavier B? Also, I have to mention other two partitions (kernel and ramdisk) along with kernel-dtb, otherwise “authentication group” failure error message occurs, and vice-versa.

2.) I tried to run the above command, but bootburn complained about “-O” and “–no_firmware_update” being not recognized as valid options.

3.) We usually need to flash only the kernel partition. But it’s good to know for future references.

If ‘-u’ option is deprecated in the future, will there be another option added which will flash a single partition only?

Also, currently, ‘-u’ option works perfectly while flashing Xavier A’s kernel partition, but doesn’t work with Xavier B.

Hi AnishAney,

yes for both questions.

right, sorry for that, this option will be available in future releases.

option 1 will replace it.

checking that in parallel.
in the meantime, please try option 1 and update if this works for you.

Hi shayNV,

Is there an option to update the kernel? We don’t need to update kernel-dtb and looking at the documentation, ‘-d’ option only updates only the kernel-dtb file.

Hi AnishAney,

Can you go into the linux_storage_emmc.cfg and comment out or delete the following lines
From:
authentication_group=1

to:
#authentication_group=1

Then reflash the whole image and then try the updated partitions. This should turn off authentication groups

Yes, I can give this a try, but since it doesn’t take much time to flash other partitions, it won’t make much difference. However, anything to get Xavier B’s kernel partition to be flashed quickly will be great!

@AnishAney @shayNV
How did you solve it, I have the same proble.
we run below command to update dtb:

sudo ./bootburn.sh -b e3550b03-t194a -u B_1_kernel B_1_kernel-dtb B_1_ramdisk -x /dev/ttyUSB3

script return success,but xavier B still uses the old dtb.
thanks

Hi @qichen.ou1,

Please create a new topic linked to this one. Thanks.

Thanks, here is the topic:How to update kernel-dtb on xavier B?