Is RISC-V the future of computing? I sure hope so. So I tracked down one of the cheapest Linux-capable SBCs that supports this architecture, the Milk-V Duo. For a retail price of $9, this little guy offers a RV64 Linux environment complete with busybox, Ethernet, and a wide assortment of IO rivaling some microcontrollers. Today I’m going to steup the board and start learning about RISC-V computing!

Fundamentally, the RISC-V architecture is a document which describes the binary machine lanuage of a 32, 64, or 128 bit processor with integer and optional floating point support, but it’s also symbolic of the shift to open computing for the future, and as a computer engineer I’m excited to learn more about it.



Video Thumbnail

Test Code

I compiled 3 test programs in 5 different 64-bit architectures (AMD, ARM, RISC-V, PowerPC, and MIPS). You can find the code and the resulting assembly here.

IPv6-enabled SD Card Image

If you’d like to use my IPv6-enabled SD Card image, I’ve released it on my github here. I’ve also submitted a pull request which you can check the status of here, so you can go back to their releases once it’s merged.

No-IOM (GPU) SD Card Image

I also have a build with both IPv6 and the IOM (which does graphics processing) disabled, if you need more memory and don’t need the camera features. It’s also on my github. No PR for this one, but you can look at the no-iom branch in my repo to see the changes.

Memory before:

              total        used        free      shared  buff/cache   available
Mem:          29236       14172        8336          80        6728       12260
Swap:             0           0           0

Memory after:

              total        used        free      shared  buff/cache   available
Mem:          56680       14132       35844          80        6704       38668
Swap:             0           0           0

Swap on SD Card

The default SD card image has a 256M space allocated for swap, but it’s not formatted/mounted. You can do that fairly easily:

mkswap /dev/mmcblk0p3
swapon /dev/mmcblk0p3

In the future you just need to run the swapon command to enable the partition that’s already formatted. Looking at free, we get swap now:

              total        used        free      shared  buff/cache   available
Mem:          56680       14216       35264          80        7200       38596
Swap:        262140           0      262140

Now you should have enough memory for some real work! It’s just super slow SD card memory lol.