Ubuntu on the milk-v duo

I run run a local qemu-virt-riscv64 for development

then fetch required deb packages using “sudo apt-get download htop” and copy the deb files over and install with dpkg


sudo apt-get download libcurl4-gnutls-dev \
liborcania2.2 \
libevent-2.1-7 \
liborcania-dev \
libgmp-dev \
libp11-kit-dev \
libgmpxx4ldbl \
libsystemd-dev \
libgnutls28-dev \
libtasn1-6-dev \
libgnutls-dane0 \
libulfius2.7 \
libgnutls-openssl27 \
libulfius-dev \
libgnutlsxx28 \
libunbound8 \
libidn2-dev \
libyder2.0 \
libjansson-dev \
libyder-dev \
libjs-jquery \
nettle-dev \
libmicrohttpd12 \
zlib1g-dev \

Hey there! Great thanks to @Spiritdude for contributing the initial Ubuntu image.

Just a comment on the slow apt, this is not a “problem”, it is what it is: apt implementation is not optimized for small memory footprint, so it will not work quick on 64MBytes of RAM.

Using directly .deb files and dpkg is an alternative. For me, installing everything on a PC with linux / docker and copying from it to the SD card memory works good. It takes around 6 minutes to copy everything, like

cp -dpR /my/folder/to/root/ubuntu/fs /media/sdcard;sync

For that to work, you need to setup the emulated environment from the duo-buildroot-sdk guide and then:

mount --bind /dev /my/folder/to/root/ubuntu/fs/dev
mount --bind /dev/pts /my/folder/to/root/ubuntu/fs/dev/pts
mount --bind /sys /my/folder/to/root/ubuntu/fs/sys
mount --bind /proc /my/folder/to/root/ubuntu/fs/proc
chroot /my/folder/to/root/ubuntu/fs
# use apt here... exit and umount everything

That’s great.
Worked perfectly on x86, preparing the image for the milkv duo.
The same method also worked for preparing focal(20.04-riscv).

Do you have any idea how to run the camera on RISCV Ubuntu? Apart from enabling the ION memory, what should I do next?