Flash over Netowrk Interface

I am working on Jetson Orin Nano with a custom carrier board, which does not have DisplayPort, force recovery, or USB port. I need to use a debug board to work with force recovery and USB connection to host. Additionally, I am working on parallel versions of r34.5.1 and r36.4.0.

Now I would like to reflash the image over the network interface. Did not find any step-by-step procedure in the Guideline. I have followed this

But it always failed. I have also seen below document but can not use keyboard without debug board.

Modified L4TConfiguration.dtbo file and added “pxev4” - IPv4 PXE boot as DefaultBootPriority but not working. I

Thanks in advance.

*** Please note that this reply is generated by LLM automatically ***

It appears that you are working with a custom carrier board for the Jetson Orin Nano, which lacks a DisplayPort for force recovery and a USB port for connection to a host. To overcome these limitations, you are considering using a debug board to enable force recovery and USB connectivity. Additionally, you are working on parallel versions of r3451 and r3640 and wish to reflash the image over the network interface.

You have consulted the NVIDIA Jetson Linux Developer Guide, specifically the “Flashing Support” section, but were unable to find a step-by-step procedure for reflashing the image over the network interface. You have also attempted to modify the L4TConfiguration.dtbo file by adding pxev4 (IPv4 PXE boot) as the DefaultBootPriority, but this approach has not been successful.

To address your issue, I will provide a comprehensive overview of the available options and compare them where necessary.

Debugging Tools:

  1. Program Trace Macrocell (PTM): A tool for debugging and tracing on Jetson platforms. While it may not directly help with reflashing the image, it can be useful for debugging purposes.
  2. Jetson Debugger: A tool for debugging on Jetson platforms. This tool may provide more comprehensive debugging capabilities, but its relevance to reflashing the image is unclear.
  3. Debug Board: As you mentioned, using a debug board can provide a means to access the device and perform force recovery or USB connections.

Reflashing the Image:

  1. NVIDIA Jetson Linux Developer Guide: The guide you consulted provides general information on flashing support, but it may not cover your specific use case.
  2. PXE Boot: You have attempted to modify the L4TConfiguration.dtbo file to enable PXE boot, but this approach has not been successful. PXE boot can be a viable option for reflashing the image over the network interface, but it may require additional configuration and setup.
  3. Network Interface: Reflashing the image over the network interface can be achieved using tools like nvboot or nvtboot. However, these tools may require specific setup and configuration, which is not clearly outlined in the provided documentation.

Comparison of Options:

  • Using a debug board provides a more direct means of accessing the device and performing force recovery or USB connections. However, it may not be the most convenient or efficient solution, especially if you need to reflash the image frequently.
  • Modifying the L4TConfiguration.dtbo file to enable PXE boot is a more automated approach, but it requires specific knowledge of the device tree configuration and may not be straightforward to set up.
  • Reflashing the image over the network interface using tools like nvboot or nvtboot can be a more efficient and automated solution, but it requires specific setup and configuration, which may not be well-documented.

Recommendations:

  1. Consult Additional Resources: Look for additional resources, such as forums, documentation, or community support, that may provide more detailed information on reflashing the image over the network interface.
  2. Contact NVIDIA Support: Reach out to NVIDIA support for more specific guidance on reflashing the image and configuring the device tree.
  3. Explore Alternative Debugging Tools: Consider using alternative debugging tools, such as the Jetson Debugger, to gain more insight into the device’s behavior and potentially identify issues with the reflashing process.

In summary, while there are various options available for reflashing the image and debugging the Jetson Orin Nano, the most suitable approach will depend on your specific requirements and constraints. I recommend consulting additional resources, contacting NVIDIA support, and exploring alternative debugging tools to find the best solution for your use case.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

Jetsons do not have an actual hardware BIOS (the equivalent is in software, and a normal flash is also essentially a BIOS flash on top of everything else). When in recovery mode they are a custom USB device, and in that mode they require a custom USB driver. There isn’t any kind of ability to flash over any other interface. It is possible to flash the Jetson on another carrier board and then move it, but otherwise this sounds like a very difficult situation.

I suppose if you could get this working with a PXE boot on a dev kit carrier board, then you might be on the right track to try to also PXE boot from your custom carrier board. I could easily see getting the device tree as a file and then substituting that on the PXE export host (probably also the initrd) after transfer to a different carrier board.

Yes thats I do sometimes as the custom carrier board does not able to connect internet.

In BIOS I saw pxe and https, so in documentation they explain little bit, I would like understand then what is this for. Also I saw there is a tool in L4T called ota. Yesterday I have tried this my host pc get crushed.

I’m the wrong person to give any details on this. Note that R34.x is a test release, and that R35.x is the actual release which R34.x evolved into. You won’t find much help on R34.x, but R35.x is still a current release. R36.x is a newer release and switched to mainline kernel. The other difference with R36.x versus R35.x, aside from an NVIDIA modified kernel in R35.x and mainline of R36.x, is the boot code itself.

The boot code of R35.x (and thus its preview R34.x) was a partial UEFI implementation. Some of the options, such as boot to PXE were being changed and made more standard. In theory the R36.x should do PXE boot the same as a desktop PC (but it isn’t a BIOS doing this, it is just code acting like a BIOS from eMMC partitions).

The OTA is “over the air”, and is an update mechanism which works if it has already been installed and set up. OTA needs a running system and cannot flash a system which has not had OTA previously set up.

I’m not sure about the host PC issue (I’m assuming you mean “crashed” and that “crushed” is a language translation side-effect). The host PC performing a flash or network export would normally not fail in any way during a flash. What was the host PC doing at the time? Was it performing an export of filesystem at the time? If you try this again I suggest you (in a terminal) “dmesg 2>&1 | tee log_dmesg.txt”; this should get some dmesg log before the system fails. I am curious about what happened on the host PC, and if it had sufficient RAM and disk space.

Sorry for my typing mistake: Its R35.4.1 not R34.X.Y.

I actually succeeded in doing PXE boot on R35.4.1 but it seems it flashed very minimum rootfs , not even a standard rootfs. I have followed this instruction.

After doing some digging, it seems the normal initrd may not contain the all flash script. Is there any chance PXE I can flash a standard rootfs or a full image ?

I also figured out I need to build an image with OTA so that it’s my host Linux; I don’t know why. I will look into it later as soon as I have a decision on PXE boot.

Before continuing, can we verify that the Orin Nano on custom carrier board is a commercial module with eMMC and no SD card slot on the module itself?

If it is a PXE boot, then unless you are somehow also flashing via that, then you would have been using the image on the host PC, and that image is not created by the JetPack/SDK Manager flash. It could be used, but you’d have to go through a bit of a learning curve and some effort. PXE boots, it doesn’t flash. PXE just provides a substitute boot image. If the image is a minimal image, then that is what it boots; if you put a full Jetson release image there, then that is what it boots. In no case that I know of would it actually alter the content on the Jetson itself.

The OTA is interesting with PXE, and I don’t know what the outcome would be. Normally one has only a single rootfs, but if you manage to use the A/B dual rootfs scheme, and if one of those images is PXE while the other is on eMMC, then OTA would update both partitions. PXE boot though would not create an A/B scheme so far as I know, and may not work with it at all.

PXE will get the system running with the image on a master controller unit. This is not flash. Is the PXE because you want it to run on a remote system as the master node? If not, this is probably the wrong method. It could be an interesting “rescue” tool, because it would give you a fully booted Jetson capable of interacting with the eMMC to do things like disk repair.

This custom carrier board is not commercial Module, but it is with eMMC and no SD card slot in the module.

I think now I understand what to do. Beacuse as per instruction I copied the initrd and Image but I think initrd does not have necessary script as well as the Image is not full JP image.

I am not sure what you mean by master mode. Basically, would like to use PXE either as image flashing or rootfs flashig.

Any module which is sold by itself and not with a developer’s kit carrier board is called a “commercial” module. Such modules have an improved warranty, and require an added carrier board. All of the small form factor development kit modules do not have eMMC, and do have SD card slots. Having eMMC instead of SD card slot on the module itself means it is a commercial module, and it also means flashing and firmware are different than a dev kit. This is the reason why I’m trying to to nail this down as commercial or developer module. If you are looking at software and instructions, then consider this a commercial module.

I mentioned earlier that Jetsons do not have a hardware BIOS. If this were developer’s kit, then this would be in the QSPI memory of the module. As a commercial Orin Nano with eMMC, then that content is instead flashed into signed partitions of the eMMC. For eMMC models the default signature is a NULL key, but they are still signed, and if not signed, those partitions are rejected. Some of the content can be retrieved from “/boot”, e.g., the kernel Image file and device tree for cases where they are named in the “/boot/extlinux/extlinux.conf” file. If security fuses are burned (which SD card model of Orin Nano does not have), then much of the “/boot” content is ignored and is only allowed from a signed partition.

I mention this because booting can use either the “/boot” content or the binary content in the signed partitions. If the “/boot” content is named in extlinux.conf, but not found, or simply not named, then the content comes from the partition content. When you flash the Image and device tree are added to partitions even if present in “/boot”. Update via OTA I think understands this mechanism. The A/B backup rootfs partition scheme should understand this as well (I’ve not actually worked on that so I don’t know details, someone from NVIDIA would have to comment). In essence, for a commercial module, OTA must sign any of the partition content and then update those non-rootfs partitions (using the correct key; NULL for default case). In the case of an A/B backup rootfs partition scheme, then it also has to update that content (if any boot content changes) on both partitions. I’m not sure how A/B switchover works in combination with a PXE boot, but it is likely you are not using the A/B scheme.

Are you merely using PXE boot, or are you also using an A/B rootfs partition backup scheme? Can we confirm there is no other external boot device involved, including USB or NVMe boot devices once you no longer use the PXE? My assumption is that you do not normally run on PXE, and that this is only intended to update the module for non-PXE boot while skipping having the Jetson in recovery mode.

What I suspect you need to do is to completely set up your PXE boot, and to have partitions in the eMMC. The non-rootfs content would always be in the eMMC for the Orin Nano commercial module (QSPI for the dev kit module which does not have eMMC). I’m going to explain a bit about the switch_root and pivot_root commands in order to explain what might or might not work for update over PXE such that it updates the Jetson instead of the master node which PXE would refer to. If this works you are going to have to do a lot of testing and experimentation and it is by no means guaranteed, but the idea is similar to how an initrd image works (so I’ll describe more on initrd).

If you have pivot_root and/or switch_root, then you should be able to see their descriptions via:

  • man pivot_root
  • man switch_root

In the earliest of days of Linux there were no kernel modules. Any filesystem type support mandated this be integrated directly into the kernel, and every kernel change mandated reboot to test. There was no initial ramdisk, and it wasn’t needed. The only filesystem types supported back then were minix and ext2. The boot chain understood those types natively (there was no GRUB or GRUB2 either). As soon as modules were introduced it became possible to require a filesystem to read the kernel and modules from which itself contained the information needed to read that filesystem…it was the proverbial “Catch 22” dilemma. The initrd was invented to act as an adapter; this super simple filesystem type could always be understood, and it could contain any modules required to read that filesystem type. The boot chain no longer needed to read the filesystem which the kernel itself reads, and so new filesystem types did not need to be added to the boot chain itself.

If you are going to use PXE mounts to perform updates, then you’re going to need to run something similar to how the initrd was used. Booting to the initrd, loading modules needed, and then pivoting the rootfs to the real filesystem is how you will need to work as well. Along with the initrd the pivot_root function was added (and now there is also a switch_root). See if your environment has them:

  • which switch_root
  • which pivot_root
  • Or look in “/usr/sbin/” since your path might not include that, and “ls *_root”.
  • If you have man pages for development (“sudo apt-get install manpages-dev” if you have the repository but not the man pages), then “man -a pivot_root” and “man -a switch_root”. You can do a Google search for for “man page” and “pivot_root”.

For the case of the filesystem being in a RAM disk (the initrd is init on a RAM disk) the init script is run, and when modules are loaded (it doesn’t have to be modules loading, this is where you customize), then once the environment is set up to perform whatever equivalent to flash you want, then you’ll need to have a way to perform the OTA not to the existing PXE mount, but instead to the eMMC partitions (presumably there will be some version of the o/s there already; if not, then your init will do something like rsync that content into the eMMC instead of the PXE content). Then the existing root of the filesystem (directory “/”) will need to pivot or switch from the PXE content to the eMMC content (if you have an A/B scheme this is more complicated because then your eMMC will have both “A” and “B” partitions), and at that point perform any additional updates you might need. The pivot_root and switch_root programs are for this purpose: They swap out the existing disk device behind “/” and can install the eMMC partition to instead be the “/”.

At the point of switching from PXE “/” to eMMC “/” (the rootfs switchover) the init process of the new filesystem begins to run. Thus I’ll provide some details about init which will probably bore you to sleep!

When the kernel itself runs it is the user “root” who owns this, and the process ID is zero. The kernel runs one and only one process, init, and that is PID 1. Everything else which runs is a result of actions taken within init. In the early days init was nothing but a bash script. This is still true within an initrd, it is basically just a bash script which loads kernel modules and then performs a pivot or switch root to go to the real filesystem. The original init script goes away (it ends) and the filesystem on the new rootfs begins, and so this is still PID 1 (kernel is PID 0). Nowadays the init of the real filesystem is systemd instead of being a bash script, and it has services and such…it is a fancier bash script with a different organization. If you run the command “ls -l /usr/sbin/init”, then you will see this is just a symbolic link to systemd.

The reason this becomes important is that you have to create your own custom init script within the init of the PXE boot environment. This has to put content into the eMMC partition (or partitions if A/B scheme), set up the environment (maybe if there is also an OTA script and not just a flash of a previously empty Jetson, in which case setup is different), followed by a pivot_root or switch_root to the actual eMMC partition. If the script adds or edits any content in a non-rootfs partition, then it has to be able to sign with the correct key (and a NULL key is default, but it is still signed).

If you plan to try this, then the place to start is to boot from PXE, and then begin customizing the init script on the master host PC serving the PXE content of the “/” partition. You have to make a simple script (you don’t need systemd, you can instead use a bash script; the bash program itself might or might not need to be simplified to something like busybox, but since you have the space of a real disk on the host PC this shouldn’t be required) to basically install the rootfs from the correct source to the eMMC partition. When done, it needs to pivot or switch to eMMC and continue boot. The part on eMMC is just purely unmodified Jetson content. The part which differs is (A) getting it to boot to PXE to start with, and (B) a modified init in the PXE content to correctly copy content to eMMC.

It’s quite a lot of work to understand, but in reality, the idea is probably simple. You just have to get past all of the understanding required for customizing an initrd which will instead be a PXE filesystem rather than an initial RAM disk.

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