Experimental/alternative alpine image for the duo 64m

hi *,

i have extended my little image builder framework which i use to build images for quite a few arm chromebooks, sbcs and other systems to also support simple alpine images and the milk-v duo 64m and created a first experimental image with it.

in case you want to have a look at it, it can be found here: Release 240526-01 - experimental tiny alpine image for the milk v duo 64mb riscv64 sbc · hexdump0815/imagebuilder · GitHub

it is based on the risc64 port of alpine edge and is rather simple … as it is that simple, it can be easily and normally updated to the lastest state via apk like any alpine system, only the kernel is hand compiled and will not be updated that way.

some notes/features:

  • based on alpine edge riscv64 port
  • the v5.10.4 kernel used is based on the legacy milk-v kernel tree plus some more drivers enabled and was compiled outside of the buildroot env (with some notes about that linked in the repo)
  • the bootloader (fsbl, opensbi and u-boot) is still taken from the other alpine image as is, but i plan to replace those with self compiled versions as well in the future (plus adding notes about compiling them outside of the buildroot sdk)
  • by default rndis networking and ssh are enabled to have some simple networking over the usb-c port if used without the io-board or some connected eth port
  • if used with the io-board ethernet works on that to connect
  • username/password is as usual linux/changeme
  • some build tools are installed by default as on this small system its much faster to delete them if not needed than to install them - for such tasks there are a few scripts in the /scripts dir
  • see the readme files in the repo for more details

i plan to improve it slowly over time - this is just a spare time project, so i’ll work on it whenever i have some time and feel like it - maybe it fits the use case of someone here … it is most probably not perfect, but it might be a good starting point for own experiments and moving on from there, playing around with it or building own software on it etc. …

in theory it would even be technically possible to compile a kernel on it, but it is not recommended due to the limited memory - i tried it as an experiment and it took over 24 hours (it ran into some preprocessor error short before the end, so did not finish completely) using a a1 sd card and due to swapping (around 30mb on average over the time with 20mb always in and out) it wrote over 200gb in total to the sd card during that time - so doing anything oversized memorywise on those little systems is the best way to kill an sd card i guess. compiling small stuff should be no problem though.

maybe i’ll do such alpine images for the other duo versions as well one day, but for those i would rather recommend the debian images from fishwaldo instead. debian on the duo 64m is possible, but does not make much sense due to the limited memory.

in case you have other riscv64 devices around as well: if you look next to that image you’ll also find debian sid images for the starfive visionfive v2 and the bananapi f3 as well as another experimental alpine image for the sipeed m1s dock (which should work on the pine64 ox64 as well if the proper entry is choosen on boot) in other releases of that repo.

best wishes and good luck - hexdump


I like the huge amount of images you have already released !

Why you chose Debian SID and not Debian Bookworm ?

Hi there @hexdump0815 ,

Thanks for sharing.
Are there kernel modules and corresponding userspace media SDK components in your image ? I mean those ones allowing for camera capture, ISP, H264 encoding etc.

I also base my Debian images on sid and not bookworm. At the time it was the only Debian release supporting the RISC-V architecture.

q: why debian sid? - according to my experiments it seems to be the only one which works with normal style apt source.list entries for riscv64 currently … i assume that trixie will be supported next when the real test cycles start for it and bookworm will never get regular riscv64 support

best wishes - hexdump

the images are just very simple for now, so no special stuff is included to speak to special hardware like camera, isp, h264 etc. …

best wishes - hexdump

Thanks for the great image - I’ve got it running on my duo.

I’m looking to add ppp to the kernel and I’ve found you linux-cvitek-cv18xx-kernel GitHub repo and followed the instructions - what gcc compiler are you using to compile the kernel?

I’m failing at the ‘make’ step with error unrecognised argument in option ‘-mabi=lp64’

i’m compiling the riscv64 stuff on a starfive visionfive2 running debian sid … compiling a kernel on the duo itself is not a good idea as mentioned above, but what actually works is compiling a kernel on a duo-s running debian sid (for instance the very good fishwaldo debian images) as the duo-s has 512mb ram which is kind of ok for that - it took around 8 hours when i tested it :slight_smile:

one important point regarding my kernel compilation notes: they are always assuming native compilation, i.e. compiling riscv64 on a riscv64 system and they do not have cross compiling on some x86 system in mind … one option to make it somehow (slowly) work on x86 might be some qemu based riscv64 debian sid docker image

good luck and best wishes - hexdump

1 Like

Thanks for the advice, I booted a risc64 image with qemu and was able to compile the kernel and the modules I need. Took about 4hrs.

While some of the modules are loading unfortunately I’m getting an Oops for ppp_generic so not all working yet!

Thanks again