Site icon JetsonHacks

First Boot: Jetson Orin Setup with Script + LLM Help

After hundreds of articles and videos on JetsonHacks, I want to share one of the tricks the pros use for initial setup: shell setup scripts. Looky here:

Background

At first glance, setting up a Jetson system after flashing it doesn’t seem like much work. But that empty desktop hides a few issues beneath the surface.

One of the main hidden issues is that the system needs to update its APT repositories. And since it’s a fresh machine, you usually do an apt upgrade to bring in all the goodness that’s been cooking since the Jetson software was released.

Then there are some essential tools that are nice to have around. One of these is jtop, a Jetson task manager that shows vital system information in real time. That requires installing the Python pip package manager so you can install the jetson-stats package, which includes jtop.

There are other tools too. I like using Visual Studio Code, so I usually install that. Depending on the task, there may be multiple code repositories, packages, and other utilities to grab and put on the Jetson.

Motivation

Here’s the deal. When I write one of these articles or film a video, I usually end up flashing a new system from scratch several times — once to start development, another for testing, and at least one more for the final video.

It usually takes about 20 minutes to set up the Jetson after flashing, and it’s all busywork. Plus, there are always little quirks to take care of, like setting the font size in the terminal to make it easier to see in the video.

I also pin some tools to the Jetson Linux dock as a quick visual shortcut to launch an application. I’ll also change the power setting so the monitor doesn’t turn off — I’ve found that makes for less-than-interesting videos.

The script changes with each project. For simple system work, it might be short. For more complex projects — like those using jetson-containers — the script can be more involved. It’s nice to be able to load models for the first time without needing to supervise it.

Running the script for setup is not only more convenient — it ensures I haven’t missed any steps for a video demo. It’s more than a little frustrating to get an hour into recording and realize I forgot to install a package, or some configuration is off.

Base Script

I’m sharing a basic starter script so you have something to build from. More importantly, I want to point out that scripting setup is an important skill — and not one that’s immediately obvious when you’re first starting out.

On an embedded system, you should be able to regenerate the system’s current state from scratch at any time. This is a form of self-protection every engineer understands: you never know what can go wrong, or when. But you know the pain train is coming. Sure, having your code on GitHub is great. But remember:

A computer system is the sum of its parts — not just the code you write.

If you can’t replicate the system, it’s not really a system. It needs more work.

You can grab and run the script like this:

$ git clone https://github.com/jetsonhacks/jetson-orin-setup

$ cd jetson-orin-setup

$ ./setup_jetson.sh

But Here’s the Deal

Sure, you can use that script. But that’s not the full story.

In the last couple of years, powerful tools have become readily available to help you write your own personalized scripts. In the video, we used Gemini from Google — mostly because it’s free, and I’ve had good luck with it writing code. But there are other strong options out there too: Grok, ChatGPT from OpenAI, Claude, and more. I use several, usually asking for the opposing opinions from the different players.

Working with a large language model (LLM) is a new skill most developers and makers will need going forward. Shell scripts are a great playground for this — they’re close to the operating system, relatively easy to read, and quick to test.

It’s a little different working with code and LLMs versus just chatting. Visual Studio Code, for example, has a built-in assistant LLM called CodePilot that you might find helpful. But make no mistake — this is the way forward.

Be careful, though — LLMs can hallucinate and lie. Don’t blindly trust anything they output, even if it sounds right. I’ve found they’re great at outlining ideas, but they can get lost in the details. Still, when it works, it’s pretty close to magic.

Notes

In the video, I’m using a Jetson Orin Nano running JetPack 6.2. The script should work on any JetPack 5 device, such as Jetson Xavier, though I haven’t tested them directly. Visual Studio Code is the main sticking point — it can be problematic with JetPack 4.

The point isn’t to use my exact script — it’s to write one that works for your project. So have a go at it!

Exit mobile version
Skip to toolbar