NewsCrawler.org

NixOS bring-up on an Alibaba RISC-V board

A210 block diagram
NixOS my beloved
Image: feyor.sh

The author got a Zhihe Computing A210 board by chance while looking for a cheap Versal devkit on Alibaba, and decided to turn it into a NixOS[1] build server. The baseboard exposes a large number of IO ports, and the 8 cores at 1.9 GHz are a good result for a RISC-V[2] CPU. The goal was to test RISC-V support in NixOS and to practice Linux bring-up.

Cross compiling from an x86_64-linux machine worked: building pkgs.hello produced a RISC-V executable, and over a thousand packages needed only two fixes, neither specific to RISC-V. Some heavy packages, such as Clang and GFortran, ran out of memory, with more than 9 GB used per linking process, so the author built them overnight with reduced parallelism. The planned boot chain was U-Boot[3] FSBL, OpenSBI[4], U-Boot SSBL, Linux, and then NixOS userspace, based on the vendor's Buildroot scripts.

Fastboot flashing failed on a MacBook, because macOS did not detect the board, but another computer detected it. The serial console stayed silent until the author found that a floating vRef pin on the BMP probe was the cause. The next panic came from an illegal vector instruction in OpenSBI. The author found that OpenSBI was compiled with -march=rv64gv while the vector context was not enabled, and a backported patch setting -march=generic fixed it.

Website NixOS nixos.org

NixOS is a Linux distribution built on the Nix package manager, configured declaratively so systems can be reproduced and deployed reliably.

Read the original feyor.shDiscussion

Discussion

One commenter quoted the article's description of the GPU as "dinky" and noted that imaginationtech.com advertises the IMG B-Series with 64 FP32 FLOPs/Clock, which is double the GE8300 in the MediaTek MT8167.

Sources

Published: First seen: Читать по-русски

Open as a page