[LINUX] Jetson Nano is being installed (Yocto ver.)

There is no article on how-two to introduce yocto on jetson nano, so I wrote it.

Until bitbake

download source

Download these two and bsp from nvidia developper. Without this, bitbake is sorry for the error.

Environmental setting


  /home/ubuntu/xxx/yocto/poky/meta \
  /home/ubuntu/xxx/yocto/poky/meta-poky \
  /home/ubuntu/xxx/yocto/poky/meta-yocto-bsp \
  /home/ubuntu/xxx/yocto/poky/meta-linaro/meta-linaro-toolchain \
  /home/ubuntu/xxx/yocto/poky/meta-tegra \

Here, tegra and linaro are added in addition to the one specified by poky. I added linaro based on article here and built with gcc7.x To do. https://github.com/madisongh/meta-tegra/wiki/Using-linaro-gcc7-for-CUDA-support


Finally, add the following

MACHINE = "jetson-nano"
GCCVERSION = "linaro-7.%"
NVIDIA_DEVNET_MIRROR = "file:///home/ubuntu/xxx/nvidia/downloads"

PACKAGE_EXCLUDE += " packagegroup-core-ssh-dropbear " <-- core-image-Needed to avoid conflict between dropbear and openssh in sato

IMAGE_CLASSES += " image_types_tegra "
IMAGE_FSTYPES = "tegraflash"

In NVIDIA_DEVNET_MIRROR, specify the folder containing the set (full of deb) downloaded from nvidia using sdkmanager. I dropped my environment to nvidia / downloads, so I specified that.

** Explanation **

** TEGRAFLASH_SDCARD_SIZE **: The default is 16G. Enter a large number if you want to increase it, and a small number if you want to decrease it. If the size becomes large, there will be harmful effects such as taking dd time. ** IMAGE_ROOTFS_SIZE **: The textbook says that it controls the file size, but it seems that TEGRAFLASH_SDCARD_SIZE has priority. Therefore, do not specify. ** IMAGE_OVERHEAD_FACTOR **: Specify free space. ** MACHINE **: Set the machine name of (machine name) .conf under meta-tegra / conf / machine. If the file name is different from the one here, the sanity check will reject it with an error.


If there is fmacro-prefix-map, the build will not pass, so delete it.


# GCC 7 doesn't support fmacro-prefix-map, results in "error: cannot compute suffix of object files: cannot compile"
# Change the value from bitbake.conf DEBUG_PREFIX_MAP to remove -fmacro-prefix-map
DEBUG_PREFIX_MAP = "-fdebug-prefix-map=${WORKDIR}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
                    -fdebug-prefix-map=${STAGING_DIR_HOST}= \
                    -fdebug-prefix-map=${STAGING_DIR_NATIVE}= \

during bitbake

$ source poky/oe-init-build-env nano-build
$ bitbake core-image-minimal

According to the textbook. source, bitbake.

Redo procedure

$ bitbake -c cleanall core-image-minimal
$ rm -Rf tmp/*
$ bitbake core-image-minimal

Let's try it !!

Deployment to SD Card

It's the usual magic. It is an image file with the extension ".sdcard" while there are many gzip formats. DD without any work.

$ sudo dd if=core-image-minimal-jetson-nano.sdcard of=/dev/sdx bs=4M conv=fsync status=progress

By default, it has 17GB, so you need a 32G micro SD card. Since the above setting is 2G, it is OK with an SD card of an appropriate size.


Attach the SD Card to the Jetson Nano and start it. ID: root, PW: None

[email protected]:~# cat /proc/version
Linux version 4.9.140-l4t-r32.2.1+g7467bde43b5d ([email protected]) (gcc version 7.2.1 20171011 (Linaro GCC 7.2-2017.11) ) #1 SMP PREEMPT xxx Oct xx xx:xx:xx UTC 2019
[email protected]:~# df
Filesystem     1K-blocks   Used Available Use% Mounted on
none             1782740      0   1782740   0% /dev
/dev/mmcblk0p1   1887056 166920   1601352  10% /
tmpfs            2025568    216   2025352   1% /run
tmpfs            2025568    156   2025412   1% /var/volatile

Start part2

I also made core-image-sato, so I started it. In addition, TEGRAFLASH_SDCARD_SIZE? = "2G" does not start. Even with 4G, the usage rate was 92%.

Startup screen image.png

Menu screen image.png

The end

Recommended Posts

Jetson Nano is being installed (Yocto ver.)
jetson nano setup