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

I suppose that you are using the xubuntu 20.04 focal fossa L4T R32.3.1. I’m using ubuntu 18.04 because it is supported by nvidia,ubuntu 20.04 it’s not supported yet and I can’t upgrade the jetpack if I use it. So,I’m forced to use 18.04 and configure qemu + kvm from scratch. The same thing did by the creator of the xubuntu 20.04 focal fossa L4T R32.3.1

with the xubuntu 20.04 can you upgrade the jetpack to the latest version ? I haven’t been able.

No. But NVIDIA should provide it soon.

nice. for the moment I have written the xubuntu image on another sd card and I’ve ran this command :

qemu-system-aarch64 -M virt,virtualization=true,gic_version=3 -smp 2 -m 2048 -device qemu-xhci -device usb-kbd -device usb-tablet -drive file=/home/zioma/Desktop/Work/win10arm/win10arm.qcow2,if=virtio -drive file="$isoname",media=cdrom,if=none,id=cdrom -device usb-storage,drive=cdrom -drive file="$virtio",media=cdrom,if=none,id=drivers -device usb-storage,drive=drivers -bios /home/zioma/Desktop/Work/I9/KVM-nano-Virtio-GPU/win10-kvm/QEMU_EFI.fd -device ramfb

it says :

could not open option rom 'vgabios-ramfb.bin" : so such file or directory.

you may get it vice versa
first flash JP45
then upgrade to 20.04
but it is not supported officially

what I’m trying to do is to configure qemu / kvm from source code,leaving intact my ubuntu to version 18.04. Anyway the error that u see above “could not open option rom 'vgabios-ramfb.bin” : so such file or directory" happens when I use the xubuntu 20.04

@rreddy78 : I’ve been able to boot the nano with the image kvm and the file “tegra210-p3448-0000-p3449-0000-b01-kvm.dtb” but now,when the nano is fully loaded,it says that kvm does not exists. how do u enable it usually ? give a look here :

root@zioma-desktop:/home/zioma/Desktop/Work/I9/KVM-nano-Virtio-GPU/win10-kvm# kvm-ok
INFO: /dev/kvm does not exist
HINT: sudo modprobe kvm
modprobe: FATAL: Module msr not found in directory /lib/modules/4.9.140-tegra

now this is my extlinux.conf file :

TIMEOUT 30
DEFAULT kvm

MENU TITLE L4T boot options

LABEL primary
MENU LABEL primary kernel
LINUX /boot/Image
INITRD /boot/initrd
APPEND ${cbootargs}

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

I comment out one option when I have to use the other. According to this thread both together do not work for some reason (it boots to primary). So I commented it out as follows:

 #      MENU LABEL primary kernel
 #      LINUX /boot/Image
 #      INITRD /boot/initrd
 #      APPEND ${cbootargs}
 #      FDT /boot/tegra210-p3448-0000-p3449-0000-b00.dtb

DTB and board version compatibility can be seen with output of this command

cat /sys/firmware/devicetree/base/compatible
I get: nvidia,p3449-0000-b00+p3448-0000-b00nvidia,jetson-nanonvidia,tegra210

You need to have this file vgabios-ramfb.bin in /usr/share/qemu. The standard installation seems to be missing this or is in some additonal package. Since I had the qemu sources, I copied it from those folders.

sudo cp /pc-bios/vgabios-ramfb.bin /usr/share/qemu

can u attach here the file “tegra210-p3448-0000-p3449-0000-b00.dtb” and the file “vgabios-ramfb.bin” that you are using please ? thanks. it seemed to work,but after having commented out the primary section,it does not work anymore here. it stucks on the nvidia logo. which version of qemu are u using ?

actually this is my conf file :

TIMEOUT 30
DEFAULT primary

MENU TITLE L4T boot options

#LABEL primary
#MENU LABEL primary kernel
#LINUX /boot/Image
#INITRD /boot/initrd
#APPEND ${cbootargs}

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

it does not work.

Finally I found the configuration that works for me :

TIMEOUT 30
DEFAULT primary

MENU TITLE L4T boot options

#LABEL primary
#MENU LABEL primary kernel
#LINUX /boot/Image
#INITRD /boot/initrd
#APPEND ${cbootargs}

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

basically the file which works for me is for the a02 version. but my nano is b01. why ?

root@zioma-desktop:/home/zioma# kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used

PS : it worked one time only.

I think the B01 DTB file is not there in the image provided. Its is B00. I am not sure if you are using 20.04 image or18.04 whihc might have it so I am not sure what the problem is.

Excerpt from my previous post:

#FDT /boot/tegra210-p3448-0000-p3449-0000- b00 .dtb

LABEL kvm
MENU LABEL kvm kernel
LINUX /boot/Image_kvm
FDT /boot/tegra210-p3448-0000-p3449-0000- b00-kvm .dtb

For the qemu you can simply get it from github and use what you need

  git clone --recurse-submodules  https://github.com/qemu/qemu

man,refresh the page…I’ve added a comment before your lastest one.

Mission accomplished : (ubuntu 18.04 + qemu-kvm and qemu-system updated to ubuntu 20.04 + kernel kvm enabled and everything is compatible with the nvidia stuff. windows 10 arm64 runs fast enough.

Good to know that. Could you please share your qemu command line. Are you using VNC by chance ?

Btw, it also works when QEMU is built from sources and I could get a higher display resolution (1024x768) with ramfb following the instructions in the previous link. According to this link only ramfb and virtio gpu works for arm/

https://www.kraxel.org/blog/2019/09/display-devices-in-qemu/

I used this configuration for building qemu:

./configure --prefix=/usr/local --target-list=aarch64-softmmu,arm-softmmu --enable-guest-agent --enable-vnc --enable-vnc-jpeg --enable-vnc-png --enable-kvm --enable-spice --enable-sdl --enable-gtk --enable-virglrenderer --enable-opengl

I plan to check out Rasbpian OS (aarch32) and AOSP performance when possible.

check at this : (im not using VNC)

isoname1=19041.804.210128-1115.VB_RELEASE_SVC_PROD1_CLIENTMULTICOMBINED_UUP_A64FRE_NETFX_IT-IT.ISO

virtio=virtio-win-0.1.185.iso

qemu-system-aarch64 -M virt-2.12 -enable-kvm -cpu host -smp 2 -m 2048 -device qemu-xhci -device usb-kbd -device usb-mouse -drive file=/root/Scrivania/Work/win10arm/win10arm.qcow2,if=virtio -device usb-storage,drive=install -device usb-storage,drive=drivers -drive file="$isoname1",if=none,id=install,media=cdrom,readonly=on -drive file="$virtio",if=none,media=cdrom,readonly=on,id=drivers -bios /root/Scrivania/Work/I9/win10arm/QEMU_EFI.fd -device ramfb

ramfb_fw_cfg_write: 800x600 @ 0xbbd00000

further improvements : how to increase the resolution of ramfb. it says 800x600 and its low. and how to add a network virtual card directly on the command line.

instructions : (on ubuntu 18.04)

apt remove qemu-kvm qemu-system

gedit /etc/apt/sources.list —> (change bionic with focal)

apt install qemu-kvm qemu-system

gedit /etc/apt/sources.list —> (change focal with bionic)

git clone https://github.com/OE4T/linux-tegra-4.9.git

cd linux-tegra-4.9

git checkout oe4t-patches-l4t-r32.5

cp /proc/config.gz .

gunzip config.gz

mv config .config

make menuconfig —> (enable kvm)

apt update

apt install gcc

make menuconfig

make -j4

make -j4 modules_install

make -j4 Image

mv /boot/Image-kvm Image2-kvm

cp arch/arm64/boot/Image /boot/Image-kvm

reboot

I don’t have access to an ethernet connection, does this Xubuntu 20.04 setup work with a wireless internet connection? I’m not seeing anything about wlan.

I used the Xubuntu from the post here since I wanted to use KVM enabled kernel.
But now @marietto2008 has shown that it possible to use the default installation and get the required qemu and kvm kernel.

In case you want Xubuntu check this post. Everything is available and work with this except JetPack

its not a good idea to use xubuntu 20.04 until nvidia officially support this version. there is no need to upgrade the qemu / kvm system files of ubuntu 18.04 with the versions of ubuntu 20.04. win 10 arm works with the latest version of qemu compiled from source and with the oe4t-patches-l4t-r32.5 kernel patches.

Yes. Xubuntu 20.04 custom is not a good idea. I only used it because I was not aware of the OE4T link.

The latest qemu I built from source because it possible to get higher resolution and i wanted to build custom build qemu for android.

"As of writing QEMU’s ramfb has its resolution locked to 800x600, which even breaks EDK2’s menu (press F2 or Esc during boot).

Fortunately, this has already been fixed in master 7 and will be in qemu 5.1.0. You can compile [5.1.0-rc3]"