Xubuntu 20.04 Focal Fossa L4T R32.3.1 - Custom Image for the Jetson Nano

Hello All,

I have created another custom image for the Jetson nano which is now based on Xubuntu 20.04 and includes a few improvements and features over my last image.

In this release I was able to integrate Ubuntu’s Ubiquity installer which allows for initial user setup and language selection prior to first boot. ( just like a normal Ubuntu release and the image Nvidia provides for the nano ) .

Once the initial user setup is complete the nano will reboot and enter the desktop ready to go with your newly created username and password.

This image includes all the packages and drivers that are included in the Jetson nano BSP version 32.3.1. additional drivers and tools can be installed via the jetson nano apt repository (for example the L4T multimedia API )

As an additional option I have included my modified kernel that has support for KVM ( kernel virtual machine) which allows you to run fully hardware accelerated Arm64/Armhf virtual machines on the nano.

The default kernel in use is the original that was releases with R32.3.1, to use my version you must edit the extlinux.conf file located in /boot/extlinux/extlinux.conf . On the second line change “Default primary” to “Default kvm” and reboot. after which you will now be running my modified kernel.

Please let me know if you have any question or need assistance with anything regarding the image, I’m pleased to assist where I can.



Download Link: Xubuntu-20.04-l4t-32.3.1.tar.tbz2

19 Likes

Great job, I like this!

1 Like

Nice job mr.chrismitchells
If it is a lot of annoyance how have you created the image you are using some script for add nvidia drivers?
and what options used for kvm support in the kernel?
Thank you

Hi Diablo ,

I use debootstrap to build the rootfs image while referencing the package manifest from the xubuntu 20.04 x86 release to get it as close as possible to the official release. ( The package manifest I used is actually located in the rootfs of the image I released here ).

In regards to integrating the Jetson nano board support package /drivers, I use the apply_binaries.sh script that is included in every BSP released by nvidia with some slight modifications that allow it to apply cleanly to my rootfs. The modifications are mainly just replacing references to gdm and unity in the script with whichever display manager you plan on using, in this case lightdm. but it could be sddm or whatever the default is for the version of ubuntu you using.

For this release additional modifications needed to be made to a few of the .deb packages that are included in the BSP. I had to unpack them then change a few dependencies that conflicted with the ones included in 20.04 and repack the .deb files. most of the conflicts were related to the newer python version 20.04 ships with as the .deb’s were created for installation on 18.04.

For the modification I made to the kernel to allow kvm to work, you can take a look at this post for reference. Jetson_nano_kvm

I do plan on uploading my kernel source to github I just havnt had the time to fully learn how to use github for tracking changes to the source.

Regards,
Chris

3 Likes

Thanks it looks promise good KVM support can help to load accelerated android and others S.O with qemu.
It’s useful in some cases.

and when I have time will study the scripts because I want to add mean some packages in the image for example a distribution related to gaming (Retroarch) and retro with Attract or Retrofe with Retro Arena we are working on this but no how create minimal image with minimal base apps .

1 Like

There is already a retropie installation script for the nano I saw on one of the githubs I tested it out and it seemed to work well, although I did have to modify it slightly when I was testing it on ubuntu 19.10.

Do a Google search for retropie Jetson nano and it should come up

1 Like

Yeah i’m same autor here and i’m working on the RetroArena team we already have everything working even with things that have not been released some scripts yet NO ETA for now
Before launching we were studying to see options alternatives.
if we can reduce the base of the original image and that it occupies the least possible
And reduces ram consumption ~1GB or the least possible consumption reduce the high overhead CPU consume.
If everything goes well it would be planned for summer 2020.

1 Like

That’s sounds interesting , do you plan on including a desktop environment or will it be limited to a user interface like retropie or Kodi ?

I just wanted to add a couple notes here that I should have included in my original post.

  1. In this image I am using Compton as the default display compositor, I find that it performs better than most other compositors on the nano and as such the composition function that is built into xfwm ( xubuntu’s default window manager) is disabled. Enabling Xubuntu’s built in compositor on top of Compton will cause a decrease in performance so if you wish to switch to it please make sure you disable the auto start for Compton in the “Session Start up” settings.

  2. For those who aren’t familiar with this new version of Ubuntu please note that Ubuntu has started to focus heavily on Snaps in this release, for example Ubuntu’s software store application will now default to downloading the snap version of most applications that you search for if available and at this point in time Snap support on the jetson nano is not fully functional. any snap application that requires access to the nano’s opengl drivers or just GPU access in general will not function correctly. I believe there is some development in this area but support is a work in progress and I have not been following the progress. If possible please stick to using the apt-get method from a terminal to install new software.

  3. This version of Ubuntu ships with Firefox as the default browser and the only official version of Chromium available is a snap version unfortunately. I have setup firefox with full opengl composition and it is working quite well for web video playback and all other browser related functions. However if you must install Chromium you will need to add the following ppa repository to your /etc/apt/sources.list “deb Index of /chromium-team/beta/ubuntu bionic” do an apt-get update and you should be able to install the latest official beta release of chromium as you normally would.

please let me know if you have any questions regarding the above.

Chris.

So far it is really nice, compiling qemu 5.0.50 right now on the Nanojet

Cool! Don’t forget to build virglrenderer also if you want accelerated gpu support in your vm, also I found that using sdl on instaid of gtk worked better for opengl support

1 Like

Thanks for the tips, really appreciate your upload, I was scratching my head a lot when I was trying to figure out what is wrong with KVM acceleration and Qemu on the Nanojet …

2 Likes

Hi Crhis,

Im trying to run qemu now with KVM accel option like this (booted your KVM enabled kernel - 4.9.140 #2 SMP PREEMPT Sun Jan 5 22:32:23 EST 2020 aarch64…)

And when running qemu with “-cpu host -M virt,accel=kvm -smp” I get
Initialization of device arm_gic_failed: KVM with user space irqchip only works when the host kernel supports KVM_CAP_ARM_USER_IRQ and it fails

Normally I use this combination on Pinebook/Pinebookpros (aarch64 Linux but with mainline kernel 5.5/5.6)

I have looked in the /boot of your Nanojet image and there is only the Image_kvm and the tegra210-p3558-000-p3449-000-a02-kvm.dtb which seem to be associated with KVM

How are you starting your KVM ?

Thanks

I tried to reproduce your error , ( which happens to be the same error I was getting prior to patching the kernel" but I can’t and my vm boots fine.

Can you confirm that you are compiling qemu master branch from GitHub without any additional patches applied. Someone released a workaround patch for qemu that disabled userspace gic to allow it to boot on kernels that don’t support it. It seems like you might be using that patched version of qemu.

First remove the version of qemu that you compiled and try running the vm with the version available through ubuntu’s apt repo and see if that works.

Also make sure you are enabling the kernel the way that I suggested in my first post.

“sudo nano /boot/extlinux/extlinux.conf”
Then change the second line from “Default primary” to “Default kvm” and save then reboot , that’s all.

It’s important that you are using the modified kernel and the modified .dtb together. If you have modified the extlinux.conf in another way this is most likely the problem.

I usually just compile current qemu from git directly (GitHub - qemu/qemu: Official QEMU mirror. Please see http://wiki.qemu.org/Contribute/SubmitAPatch for how to submit changes to QEMU. Pull Requests are ignored. Please only use release tarballs from the QEMU website.) and yes Im using your kernel … I will apt-get ubuntu qemu-kvm instead and see it that helps

Can you please post your extlinux.conf file.

I got it running now , for some reason extlinux.conf did not load the kvm as default, so I just deleted the default section and let the kvm one … now it loads it

This works for me
user@nanojet:/boot/extlinux$ cat extlinux.conf
TIMEOUT 30
DEFAULT kvm

MENU TITLE L4T boot options

LABEL kvm
MENU LABEL kvm kernel
LINUX /boot/Image_kvm
FDT /boot/tegra210-p3448-0000-p3449-0000-a02-kvm.dtb
INITRD /boot/initrd
APPEND ${cbootargs}

Strange , I’m using the same image and all I need to do to switch kernels is change the default from primary to kvm and it boots correctly. I tested it quite a bit before I released the image so hopefully it’s not a recurring issue.

I’m glad to hear that you got it working though. What kind of kvm are you running by the way? Anything interesting?

I have followed your instructions, but the Nanjet boots only the default kernel for some reason (had the Default kvm) … so I then loaded just the Image_kvm (without loading the additional kvm dtb file) and it did complain abut the KVM_CAP_ARM_USER_IRQ , so after deleting the default section fully and only keeping the KVM part it now loads …

I run a lot of aarch64 virtual stuff on Pinebookpro mainly, but since I also have the Nanojet I struggled to get KVM support on it until you gave us the image :)

I am mostly active on Twitter https://twitter.com/astr0baby

1 Like