RISC-V is a new Instruction Set Architecture originated at UC Berkeley. I’ve always been interested in RISC-V development thanks to its open nature. However, apart from its usage as a MCU (such as Longan Nano or PineCone) or an FPGA board (such as VexRiscv), there is not much consumer-oriented hardware capable of running Linux.1 That was until SiFive announced HiFive Unmatched.2
I ordered HiFive Unmatched on Mouser Japan on November 12, 2020. After few delays due to changes in board components and silicon shortages.3 The board finally arrived on May 28, 2021.
Assembling the RISC-V PC
HiFive Unmatched is not a System on a Chip in the same manner as Raspberry Pi or other ARM boards. HiFive Unmatched is a Micro-ITX board and requires external components such as a GPU (via PCIe 3.0 x8), a power supply, and a CR1220 battery. However, the board also comes with a USB serial console (using FTDI FT2232HL), allowing its serial console to be accessed by plugging in a USB-to-Micro-USB cable between a computer and the board.
I chose the following components for building the board:
Buying these components ballooned the price quite a bit. But it’s okay. For science.
Despite SiFive’s recommendation of using Radeon RX 500 series (“Polaris”) graphics cards, I decided to try out Radeon RX 5700 XT (“Navi”) instead as I have a couple of them lying around. They were a leftover from when I was still doing VFIO. Newer Radeon cards have their drivers included in the Linux kernel tree (amdgpu
) and are supposed to support even the latest cards, so I thought it might work.
However, even though the kernel was able to detect the GPU and initialize the driver, the card failed to output anything meaningful. After some inspection, it appears the card is stuck in PCIe 3.0 x16 bandwidth despite the board only having PCIe 3.0 x8. The fact that HiFive Unmatched is using PCIe 3.0 x8 with a PCIe 3.0 x16 slot might be one of the reasons.
Unable to solve the issue with the RX 5700 XT card, I decided to balloon the budget even further by purchasing the Radeon RX 560 4 GB from a second-hand market. The price was reasonable, and the shipment was fast. I received the Radeon RX 560 4 GB the following day, and the board now has proper video output!
Fixing the Fan
The first thing I noticed after assembling the board was the loud noise from the fan. HiFive Unmatched shipped with a 25×10 mm 3.5 CFM fan on a 25 mm heatsink. The measured noise on the system in a case was 45 dB, which was too high given the plan was to leave the machine running 24×7 next to my bed.4
It was not until u/a4lg’s post on Reddit about their experience in replacing the fan with a 40 mm variant which inspired me to do the same. I ordered Noctua NF-A4×10 FLX and began inspecting how to mount the fan. To my surprise, the fan on the CPU was held by a screw in the gap between the heatsink fins, which doesn’t seem too secure.
I proceeded to design a 3D printed mount for the fan, with the goal of not requiring any screws as there’s no place to mount them on the heatsink. The first design was a loft which directed the air from the 40 mm fan into the 25 mm heatsink:
This design doesn’t really work: it pushed the fan too far from the heatsink to work efficiently. The temperature quickly rises about what I would consider comfortable leaving the machine running overnight. The second version of the design was a simple slab to put a 40 mm fan on top of the heatsink:
The resulting temperature was not as good as the stock 3.5 CFM fan, but the noise level is now around 30 dB. Adding Noctua NF-A12×25 PWM to the case as an intake5 helped reduce the temperature even further while staying at a similar noise level. My HiFive Unmatched is now ready for running overnight next to my bed.
I posted the HiFive Unmatched 40 mm Fan Heatsink Mount STL file on Thingiverse, hoping it would help others with a similar problem. I plan to improve the design in the future.
Next Action
Now I’ve got the machine capable of running 24×7, it’s time to try to port my favorite Linux distro, Void Linux into running on this board. As of this writing, I’ve got the basic system running based on an existing PR and a lot of help from the #voidlinux IRC channel. I hope to write about the porting process in the future!
Changes
- Rev 1.1 (Dec 14, 2024)
- Typo and grammar fixes
RISC-V as an ISA comes with a Base Instruction Set (I, E) and several extensions. This ISA is denoted by its naming suffix, e.g. “RV64IMAFDC” stands for RISC-V 64-bit Base Instruction (I) with MAFDC extensions. The The RISC-V Foundation defines a baseline of Linux-capable RISC-V as RV64GC, where G stands for IMAFD. Most MCU RISC-V boards are usually RV32IMAC.↩︎
Technically, there is HiFive Unleashed plus a Microsemi PolarFire FPGA, but the price for both boards was beyond the reach of many people. The board was discontinued in the middle of 2020.↩︎
The board was initially planned to come with 8 GB of RAM but later changed to 16 GB. As a result of this, the shipping date changed from Q4 2020 to mid-Q1 2021. Silicon shortage caused the shipping date to slip again to March 2021, then again to June 2021.↩︎
Apartment space in Tokyo is small. I do not have a dedicated space for my computers: everything including the computer used to write this article is sitting under a loft bed, and I like my room to be silent.↩︎
I also have Noctua NF-A9×14 PWM as an exhaust, but it didn’t change much in terms of temperature. The reason for choosing the 14 mm variant over the 25 mm variant was because I was in a bit of a hurry and ordered the wrong one. Oops, but okay.↩︎