Need help for flashing custom Images on Jetson AGX ORIN

Hello Team,

I am new to flashing Nvidia Jetson AGX Orin board I need to understand regarding ./flash.sh script
To start with i have tried manual flashing using below commad
sudo ./flash.sh jetson-agx-orin-devkit mmcblk0p1

and I am able to flash the board
Now I need to flash our custom image i.e., device-tree.dtb so how to flash it as there are so many dtb files in boot/dtb folder

So how I need to flash above dtb using ./flash.sh command

and also how to flash kernel.bin.gz and rootfs-initramfs.cpio.gz?

Hi,

I’m not quite sure about what you want to do.
Are you using a custom board, or you just want to disable some hardware functionality on our DevKit?

Either case, put your device tree files in Linux_for_Tegra/kernel/dtb, and change the DTB_FILE and TBCDTB_FILE entries in jetson-agx-orin-devkit.conf.

You may just swap out kernel image and initrd in Linux_for_Tegra/rootfs/boot.

Hello,

I am not using custom board we just want to flash custom images which are relevant to our application
So I want to flash on Jetson AGX Orin

I tried using this command sudo ./flash.sh -d /home/faurecia/Documents/yocto-orin-build/device-tree.dtb -k kernel-dtb jetson-agx-orin-devkit mmcblk0p1

home/faurecia/Documents/yocto-orin-build/device-tree.dtb - Path to my custom dtb
I am following correct command or we need to replace the custom file as you suggested.

and Also can you explain how this command works?

BR,
Hetal

Hi,

if you are using our DevKit, then what’s the purpose of using different device tree files? What modifications did you make to the device tree?
Like, what exactly do you want to do?

Hello,
we have created binaries with YOCTO and we just want to flash those binaries so that we can use yocto and flash the binaries which are only needed for our application.

Hi,

then you may just follow it here:
https://docs.nvidia.com/jetson/archives/r35.3.1/DeveloperGuide/text/SD/FlashingSupport.html

Swapping the default files or manually specifying them through flashing parameters should both work.
Use -d for specifying path to kernel dtb, -I for initrd, and -K for bootloader.

I tried with below command

sudo ./flash.sh -d /home/faurecia/Documents/yocto-orin-build/device-tree.dtb -k kernel-dtb jetson-agx-orin-devkit mmcblk0p1

But I am not able to flash I am getting below error :
[ 11.2718 ] MB2 version 01.00.0000
[ 11.5054 ] Erasing partition
[ 11.5067 ] tegradevflash_v2 --erase kernel-dtb
[ 11.5074 ] Bootloader version 01.00.0000
[ 11.7494 ] 000000004d4d090d: E> NV3P_SERVER: Failed to open partition kernel-dtb.
[ 11.7613 ]
[ 11.7613 ] [Failed]
[ 11.7613 ]
Error: Return value 13
Command tegradevflash_v2 --erase kernel-dtb
Failed to flash/read t186ref.

So wanted to confirm the command which I used is it correct?

Hi,

so looks like you already have a running system, but want to flash again to update the kernel dtb?
Then actually you don’t need to do that, just copy the kernel dtb file into your device, and specify it in the FDT entry inside /boot/extlinux/extlinux.conf.

Also, it should be A_kernel-dtb instead of kernel-dtb.

Hi,

Can you please explain how this command works as I am new to it

and yes I am flashing custom binaries first time but I have flashed the board using
command sudo ./flash.sh jetson-agx-orin-devkit mmcblk0p1

Hi,

you’ll find following contents inside /boot/extlinux/extlinux.conf

TIMEOUT 30
DEFAULT primary

MENU TITLE L4T boot options

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      FDT /boot/dtb/kernel_tegra234-p3701-0000-p3737-0000.dtb
      INITRD /boot/initrd
      APPEND ${cbootargs} earlycon=tegra_comb_uart,mmio32,0x0c168000

If you already have a running system, then there is no need to flash it again no matter you want to update kernel image/initrd, or kernel dtb, just copy them into your device, and specify the path to them in this config.

Hi,

So If I have flashed default binaries previously then I don’t need to flash it using command

and to flash custom binaries then I need to give my custom binary file inside /boot/extlinux/extlinux.conf
and then I need to use ./flash.sh script again to flash custom binary ?

is my understanding correct ?

BR

Is My usnfd

Hi,

there is no need to play with flash.sh anymore, because even if you flash your custom kernel images/kernel dtb, they are still by default read from rootfs as specified in the config file, instead of some other dedicated partitions, like A_kernel-dtb.

YES

YES with the first sentence, but NO with the second sentence.
Just use any method you can come up with to copy your custom binaries into your device.

Hi,

Just use any method you can come up with to copy your custom binaries into your device.

→ What other method we can use to flash custom binaries?
Can you suggest one

Well, can you understand what I’m saying here?

Even if you flash them, it’s not going to take effect, because kernel stuff are read from APP partition instead of other things like A_kernel or A_kernel-dtb.
You don’t flash them, you just copy them into your device, with help of anything like scp or maybe USB drive, and specify them in extlinux.conf.

Yes I understood that we need to copy custom Binaries but could you please explain that if I use USB drive to copy but at what location i need to placed those binaries
Sorry but I am new to this and it is confusing for me as well.

Hi,

you can put them wherever you want, and just to make sure corresponding changes are made in extlinux.conf, but typical solutions will still be under /boot/.

Hi,
and also I have rootfs-initramfs.cpio and kernel.bin so to replace those we need to follow the same step?

Yes, and also remember to make changes in extlinux.conf.

Hello,

For copying custom binaries, can we use SD card to do that?
I mean does SD card flashing supports in Jetson AGX Orin?

No, AGX Orin does not support booting from SD cards.