Using a SSD as the root directory for development on a Jetson Development Kit provides many advantages, including faster disk times and much more storage. It’s easy to do! Looky here:
Background
With the advent of L4T 28.1, both the Jetson TX1 and the Jetson TX2 both run the same 64-bit 4.4.38 version kernel. Hopefully there will be few differences (if any) between the base development environments. One thing that does help development is more disk space, and faster disks. For those of us who develop onboard the Jetson, adding a SSD makes the development environment much more enjoyable.
Installation
The process is the same for both the Jetson TX1 and the Jetson TX2. Refer to the video for specifics.
The process is simple. Install a SSD on a Jetson (make sure the Jetson is powered down). Note: The physical installation is not shown in the video, the first part of this video is an example. Flash the Jetson with JetPack. Format the new SSD disk, setup a partition (it should show up as /dev/sda1). Then simply copy the contents of the eMMC over to the disk, and modify the /boot/extlinux/extlinux.conf file accordingly, so that the root directory points at /dev/sda1. After rebooting the machine, the SSD is now the root directory. There should be plenty of room for developing applications.
In case you need some extra modules or make changes to the kernel, the video above also shows how to build the kernel. Make sure to select the correct repository, i.e. buildJetsonKernelTX1 for the Jetson TX1, buildJetsonKernelTX2 for the Jetson TX2. There are scripts to download the kernel sources, help configure the kernel, build and copy the Image file. Note that the Image is copied to /boot/Image on the current device, which is the SSD. The Jetson does not boot from this location, so we need to copy it to the place where the Jetson looks to boot.
We’ve never really discussed this, so here goes. When U-Boot boots the Jetson, in stock configuration it boots from the internal eMMC using the file indicated in the /boot/extlinux/extlinux.conf file located on the eMMC. Typically this is /boot/Image. You can also set the root directory in this file, that’s how we are using the SSD as the root directory. Note that /dev/sda1 is not mounted this early in the boot cycle, so the Image file on the SSD isn’t much help here.
The issue here is that the real boot directory is located on the eMMC, so the simplest way is to copy the Image that we just created on the SSD to the boot directory of eMMC as shown in the video. We’re clever, so of course we give it a different name than ‘Image’ (like ImageSSD) so that we can use both the stock eMMC Image and the new SSD Image. By having multiple entries in the extlinux.conf file, we can then select between booting different configurations using the serial console. This makes it easier to debug changes later on.
This is the most flexible way of running systems side by side. It is possible to boot directly from SSD and so on, but the flexibility of having the stock kernel available on the eMMC for development is invaluable.
Conclusion
We’ve relied on the video more than most articles here. Mostly this is because we use a GUI for configuration. It should be a straightforward process to gain more speed and space in your development environment.
Notes: Installation in the video was show directly after flashing using JetPack 3.1
6 Responses
Hi, thanks for the update.
How to copy the jetson TX2 to another new TX2?
the current TX2 has kernel modified (just to add driver and didn’t alter the kernel name) and runs on external SSD.
Is there a way to just copy the eMMC and SSD to the new device and get it boot from there?
any suggestion is welcomed!
This is a pretty involved subject. A lot depends on how your machine is configured. The best place to ask this question is on the Jetson TX2 forum: https://devtalk.nvidia.com/default/board/188/jetson-tx2/ where a larger group of people (and more proficient in Linux than I am) can give advice.
If there hasn’t been many changes to the eMMC, the best bet is to either clone the disk image (making sure that you set the machine to boot from the eMMC first) or just to a simple flash with JetPack.
There are a variety of options for duplicating the SSD. Some people duplicate them by plugging them into a PC and copying them. Others use USB based duplicators (relatively inexpensive). Another alternative is to boot the new TX2, SSH into the old TX2 and then copy the files over. These are standard Linux things.
If the only thing that you did was to compile a module or two (and that’s all you care about), you can simply grab the modules on a SD card or USB thumb drive, setup the SSD as you did previously, and then place the modules in the correct spot in the modules hierarchy.
Does this method works for usb external drive as well. I tried this on my flash drive. I think for L4T 28.1, simply copy the root folder to a external drive and editing the extlinux.conf exactly as described in the video won’t work.
On reboot, the start up screen shows cannot find firmware.
It doesn’t work on Jetpack 4.2.2. Any update?
First, thanks for ALL yours tutorials & videos
Can it works also for a Jetson Xavier?
This technique does not work for recent version of Xavier. Thanks for reading!