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
The post Develop on SSD – NVIDIA Jetson TX1 and Jetson TX2 appeared first on JetsonHacks.