My Custom Nvidia Jeson Nano AI project
Categories:
List of dependencies i need for creatiing my project.
Material i used
- Jetson Nano Developer Kit 4GB
- Wall power supply
- Samsung Class 10 MicroSD 32GB
- 120GB SSD
- Sata to USB 3 cable
- Noctua NF-A4x20-PWM
- Xbox Kinect v1
Before Begin
nano
: Save and close Nano withCtrl
+X
and thenY
thenEnter
Download jetson nano
- Download the Jetson Nano Developer Kit SD Card Image, and note where it was saved on the computer.
- Write the image to your microSD card with Etcher.
Install Ubuntu
- Select
I accept the terms of the licenses
and continue - Select a language
- Select keyboard layout
- Select time zone
- Choose
computer name
,username
,create password
and then keep theRequire my password to login
- Select the max size of the usb as the MicroSD is temporary use
- Select the
MAXN - (Default)
and click continue to start install - After install login with new created account as steps above
- After first login it will pop a annoying
Keyboard Shortcuts
window…. Close this - And close the other welcome window…
Updating Your Nvidia Jetson Nano
Keep your Nvidia Jetson Nano up-to-date by following these simple steps.
Update Package Lists
- Open a terminal window.
- Run the following command to update the package lists:
sudo apt update
Upgrade Packages
- Continue in the terminal.
- Upgrade the installed packages to their latest versions:
sudo apt upgrade -y
- After the upgrade is complete, reboot your device:
sudo reboot now
Clean Up
- Once your device is back online and you’ve logged in, open the terminal again.
- Clean up unnecessary packages and free up space:
sudo apt autoremove -y && sudo apt clean
Extra: Passwordless Sudo
For added convenience, you can configure your user account to use sudo
without entering a password.
- Install the
nano
text editor if not already installed:sudo apt install nano
- Open the sudoers file using the
visudo
command:sudo visudo
- Add the following line, replacing
your_username
with your actual username:your_username ALL=(ALL) NOPASSWD:ALL
- Save and exit
nano
by pressingCtrl
+X
, confirming withY
, and then pressingEnter
.
Wipe SSD and Moving MicroSD to SSD
Mount the SSD in your Jetson Nano
Open
Disks
Select the SSD Disk and Press
Ctrl
+F
Erase
:Don't overwrite existing data (Quick)
orOverwrite existing data with zeroes (slow)
Partitioning
:Compatitble with modern systems and hard disks > 2TB (GPT)
Click
Format...
Again click on
Format
and wait….. Depends on what u selected (Quick) or (Slow)Now Click on the
+
Create PatrtitionI have set the Partition size to 110GB for SWAP (We will use this later this page)
Click Next
Volume Name
: Create oneType
:Internal disk for use with Linux systems only (Ext4)
Click on
Create
Finnaly mount the SSD
After the SSD is mounted open
Terminal
again as we neednano
for later use.sudo apt install nano
Now we download the repository
bootFromUSB
from JetsonHacksgit clone https://github.com/jetsonhacks/bootFromUSB
Enter the bootFromUSB folder
cd bootFromUSB
We need to have the SSD UUID so
./partUUID.sh
This will output ssomething like this
PARTUUID of Partition: /dev/sda1 a40b6c71-ca35-79d3-8an0-d6v66749e060 Sample snippet for /boot/extlinux/extlinux.conf entry: APPEND ${cbootargs} root=PARTUUID=a40b6c71-ca35-79d3-8an0-d6v66749e060 rootwait rootfstype=ext4
We only need to remember this part
root=PARTUUID=a40b6c71-ca35-79d3-8an0-d6v66749e060Now let’s move the files from MicroSD to SSD
./copyRootToUSB.sh -p /dev/sda1
Now we need to change one part in our SSD
cd /media
When we use the command
ls
will see a our current user for me is itsyslogine
ls
syslogine
So we enter the folder
cd syslogine
again when we do the
ls
command we can see our new created SSD for me it ismyproject
ls
myproject
So we enter the folder
cd myproject
After were in the right SSD folder go to
cd boot/extlinux
edit
extlinux.conf
sudo nano extlinux.conf
Replace
root=/dev/mmcblk0p1
with your SSD one, the one we early noted some where or still have that terminal open
root=PARTUUID=a40b6c71-ca35-79d3-8an0-d6v66749e060
Finnaly… Lets shutdown Jetson Nano
sudo poweroff
After your Jetson Nano is powered off remove the MicroSD card and power on the device again now it should be powering up with the SSD instead of the MicroSD
you can also just watch this video from JetonHacks
Install Jetson stats
- Install
pip3
because this is not installed by defaultsudo apt-get install python3-pip -y
- Now we can install jetson stats with the
pip3
sudo -H pip3 install -U jetson-stats
- best way is to restart your jetson nano
sudo reboot now
- After restart and logged in run jetson stats
jtop
Make fan start at boot
We need to make the fan start at boot because why not…..This will help to cool your jetson nano allot with compiling and installing packages we need.
Now we will edit
rc.local
with nanosudo nano /etc/rc.local
Then add this to the
rc.local
file#!/bin/bash sleep 10 sudo /usr/bin/jetson_clocks sudo sh -c 'echo 255 > /sys/devices/pwm-fan/target_pwm' exit 0
Note
You can change the 255 to another value (0~255) to change the speed of fan.Then add execute permission to
rc.local
file.sudo chmod u+x /etc/rc.local
Again we reboot our jetson nano to see if this works
sudo reboot now
After 10 seconds when jetson nano is start the jetson clocks should start running
Installation of libusb
First install Deps
sudo apt install libudev-dev
Lets create a fodler and enter it before be continue
mkdir project && cd project
Get the latest version of
libusb
wget https://github.com/libusb/libusb/releases/download/v1.0.26/libusb-1.0.26.tar.bz2
Now we need to extract it..
tar -xvjf libusb-1.0.26.tar.bz2
And i love to work with folder with smaller names so rename it
mv libusb-1.0.26 libusb
Now we enter the folder we renamed
cd libusb
Let’s create the package or something.
./configure --prefix=/usr --disable-static && make
Thats the install
sudo make install
after
make install
was succesful we can remove the .tar.bz2cd .. && rm libusb-1.0.26.tar.bz2