Create my own image on sdcard with console application not ubuntu

hi all,
I would like to create an Linux console application without Ubuntu on Jetson nano.

  1. Can you send how to do it ?
  2. Is it possible to take Ubuntu image and reduce Ubuntu and work it as console only ?

Hi @yossii

For reducing the Ubuntu image, I suggest you can create a Yocto Image using the meta-tegra layer. Yocto is a project that lets you create a custom Linux distribution only with the things you need on it.

For example for the Jetson Nano, you can follow these steps to create the image:

And then use the following ones to flash the board with that created image.

===================================================

Another option, if what you only want is to disable the GUI from Ubuntu, it works like this:
For this you might need to check the system boot target.

Basically the system will boot according to the target at which the following symbolic link is pointing to: /lib/systemd/system/default.target

  1. To have a GUI, it should point to /lib/systemd/system/graphical.target
  2. To boot without GUI (text mode) it should point to /lib/systemd/system/multi-user.target

This setting can be overwritten by the existence of the /etc/systemd/system/default.target symbolik link. which has a higher priority than the one on /lib/.

This /etc/ file is created by using the systemctl commands to change the default target, these are explained here

In summary:
To disable GUI run: sudo systemctl set-default multi-user.target
To enable GUI run: sudo systemctl set-default graphical.target

Then reboot.

Regards,
Roberto Gutierrez,
Embedded SW Engineer at RidgeRun
Contact us: support@ridgerun.com
Developers wiki: https://developer.ridgerun.com/

hi Roberto,
I have configured the Yocto and get th following error:

yitach@yitach-lt:~/fibernet/kvm_over_ip/yocto-tegra$ bitbake core-image-sato-dev
WARNING: Host distribution “ubuntu-22.04” has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
ERROR: OE-core’s config sanity checker detected a potential misconfiguration.
Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
Following is the list of potential problems / advisories:

MACHINE=jetson-nano-devkit is invalid. Please set a valid MACHINE in your local.conf, environment or other configuration file.

Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

The local.conf has:
MACHINE ?= “jetson-nano-devkit”

DISTRO_FEATURES = “x11 opengl”

IMAGE_CLASSES += “image_types_tegra”
IMAGE_FSTYPES = “tegraflash”

SSTATE_DIR ?= “/home/yitach/fibernet/kvm_over_ip/yocto_state_dir/”
DL_DIR ?= “/home/yitach/fibernet/kvm_over_ip/yocto_downloads/”

Thx,
Yossi

hi Roberto,
I follow the instructions and got the errors:

yitach@yitach-lt:~/fibernet/kvm_over_ip/yocto-tegra$ bitbake core-image-sato-dev
WARNING: Host distribution “ubuntu-22.04” has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
ERROR: OE-core’s config sanity checker detected a potential misconfiguration.
Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
Following is the list of potential problems / advisories:

MACHINE=jetson-nano-devkit is invalid. Please set a valid MACHINE in your local.conf, environment or other configuration file.

Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
yitach@yitach-lt:~/fibernet/kvm_over_ip/yocto-tegra$

Yossi

Hi @yossii

It could be that the current meta-tegra branch has been updated for JetPack 5 and it doesn’t support Nano anymore.

So can you please tell me which version of meta-tegra do you have?

Go into the meta-tegra folder and please let me know the output of

git branch

To be more clear, this is the master branch of the meta-tegra layer: Now with JetPack 5 it doesn’t support Jetson Nano: meta-tegra/conf/machine at master · OE4T/meta-tegra · GitHub

The dunfell one, in this case does support it because it is a little bit older: meta-tegra/conf/machine at dunfell · OE4T/meta-tegra · GitHub

There you can see the jetson-nano-devkit.conf file (only on dunfell), I want to know if that file exists, if not, then you might need to checkout to the dunfell branch.

Regards,
Roberto

hi Roberto,

yit@yi-lt:~/fibernet/kvm_over_ip/yocto-tegra/poky$ git branch

  • dunfell
    yit@yi-lt:~/fibernet/kvm_over_ip/yocto-tegra/poky$

Any update Roberot, see the git branch is dunfell …
y@y-lt:~/kvm_over_ip/yocto-tegra/meta-tegra$ git branch

  • dunfell
    y@y-lt:~/kvm_over_ip/yocto-tegra/meta-tegra$

Hi @yossii,

Can you share with me your build/local.conf and the build/bblayers.conf files? To see if we are working properly with the meta-tegra layer. Also, can you plese provide the output of

ls ~/kvm_over_ip/yocto-tegra/meta-tegra/conf/machine/

Regards,
Roberto

Hi Roberto,
Attached is the file.

Roberto addtional question:

  1. Does Jesson Nano can run video 4K 30 FPS ?
  2. Is there Nvidia driver for it? We be able to run 1080p but not 4K 30 fps.

conf.tar.xz (4.9 KB)

machine.tar.xz (3.9 KB)

Hi,

I see you are missing the bblayers.conf step from this subsection:

The one where you add the meta-tegra layer to the bblayers.conf file.

Please double check if there is any other step missing from there.

===========================================================

The imx477 can provide 4k@30fps, before jetpack 4.6 we used these patches to add it to the kernel: Raspberry Pi HQ camera IMX477 Driver | Linux driver for Jetson | RidgeRun - RidgeRun Developer Connection

I think from 4.6 onwards, it is already integrated into the source code and it should be a matter of enabling it on the config and device tree. The Jetson Nano should be able to handle it.

Regards,
Roberto

See the file

POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf

changes incompatibly

POKY_BBLAYERS_CONF_VERSION = “2”

BBPATH = “${TOPDIR}”
BBFILES ?= “”

BBLAYERS ?= "
/home/yitach/fibernet/kvm_over_ip/yocto-tegra/poky/meta
/home/yitach/fibernet/kvm_over_ip/yocto-tegra/poky/meta-poky
/home/yitach/fibernet/kvm_over_ip/yocto-tegra/poky/meta-yocto-bsp
"
bblayers.conf (385 Bytes)

I follow all step by step and got the errors …

What else is missing ?

Hi @yossii

It should look like this, according to the bblayers.conf section:

BBLAYERS ?= " \
/home/${USER}/yocto-tegra/meta-tegra \
/home/${USER}/yocto-tegra/poky/meta \
/home/${USER}/yocto-tegra/poky/meta-poky \
/home/${USER}/yocto-tegra/poky/meta-yocto-bsp \
"

You see there is a meta-tegra layer added there, which you should have alongside the other layers

Regards,
Roberto

It seems it work

Hi Roberto,
The compilation is ended OK.
Can you guide me when I could see the:

  1. The bootloader SRC and bins.
  2. The kernel SRC and uimage.
  3. The rootfs SRC and tars files.

Thx

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.