Recently, Canonical released a version of Ubuntu 20.04.3 Desktop for the Kria KV260 Vision AI Starter Kit along with other Zynq UltraScale+ MPSoC development boards. This is huge because as I learned the hard way a few weeks ago, the kernel drivers and subsequent packages for the MPSoC's Mali GPU are not easy to install into a fresh Ubuntu image after the fact to get the Desktop image running (I'm not too proud to admit that my embedded Linux skills aren't quite to that level yet, but that's what New Year's resolutions are for, right?).
I'll be using the full "ready-for-SD-card image" from Canonical for this project, so no need to bust out Vivado or PetaLinux for this project. I thought it'd be good to walk through prepping the SD and getting some handy things installed in the fresh Ubuntu Desktop image so the Kria KV260 is project ready!
Download Ubuntu SD Card ImageDownload the ready-for-SD-card image here. The green download button on the page is what will give you the ready-for-SD-card image. You'll notice some other source files for the Ubuntu root filesystem tarballs which can be used with custom kernels, device trees, etc. developed with tools such as PetaLinux. I'll save this custom implementation for another project post.
Use a program such as belanaEtcher to flash the SD card with the Ubuntu image:
Insert the SD card in the Kria and boot as normal. The first boot of the freshly imaged SD card took several minutes. But finally when it did boot to the login screen, instead of immediately asking for me to set a new user password, there seemed to already be a default one I found in the getting started wiki from Xilinx here:
- Default username: ubuntu
- Default password: ubuntu
But then as soon as I typed the default password, ubuntu, on this first boot it immediately forced me to change it to set my own password.
But alas, success!
I still need to set the right time, even though it was late at night when I was working on this, it was not 3AM... Anyways, the nice thing about this pre-built image is that many things you'll need such as Python3, make, build-essential, gstreamer, etc. are already installed. However I do have a short list of useful things I'd like to install on this Ubuntu Desktop image to really take advantage of the Kria KV260 hardware.
Install Edge ImpulseI've found Edge Impulse to be quite fun on the Kria, so I went through and with a little tweaking of the Nodejs version, got it working again on this Ubuntu Desktop distribution with the following install sequence:
ubuntu@kria:~$ sudo apt-get install nodejs sox
ubuntu@kria:~$ curl -sL https://deb.nodesource.com/setup_12.x | sudo bash -
ubuntu@kria:~$ sudo apt-get install -y nodejs
ubuntu@kria:~$ npm config set user root && sudo npm install edge-impulse-linux -g --unsafe-perm
Then to run:
ubuntu@kria:~$ edge-impulse-linux
Enter your Edge Impulse Studio login as prompted and select the desired available camera and audio input devices.
From a host PC connected to the same network as the Kria, open Edge Impulse Studio in a browser where the Kria will appear in the Devices tab and data collection from it can be done from the Data acquisition tab:
Use ctrl+c from the command line on the Kria to exit the Edge Impulse application.
The other thing that I think would be great to get installed is Xilinx's platform management utility, xmutil. Which I'm currently working on figuring that out on a Debian-based system, so check back for that! EDIT: I have since found that it is pre-installed in the Ubuntu image after I was pointed to the getting started wiki here. So I'll be covering how to use it in my next Kria project!
Comments