{
  "id": 21148464,
  "title": "NixOS bring-up on an Alibaba RISC-V board",
  "url": "https://urgent.news/2026/11/22/nixos-bring-up-on-an-alibaba-risc-v-board",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-22T00:30:07.000Z",
  "source": {
    "name": "Lobsters",
    "slug": "lobsters",
    "url": "https://feyor.sh/blog/nixos-bringup-on-an-alibaba-riscv-board/"
  },
  "original_language": null,
  "account": "In the process of searching for an affordable Versal devkit on Alibaba, the author unexpectedly acquired a Zhihe Computing A210 RISC-V System on Chip (SoC). This board boasts an impressive number of exposed input/output interfaces and eight cores operating at 1.9 GHz. While the author is hesitant to recommend purchasing any RISC-V SoC at present, they decided to repurpose the board as a NixOS build server to explore RISC-V support within NixOS and gain hands-on experience with Linux bringup.\n\nThe author's complete A210 NixOS configuration can be accessed, and they confirmed functionality of sound, HDMI, Bluetooth/Wi-Fi, Ethernet, and the GPU. Building packages with Nix is straightforward, as the command nix build nixpkgs#pkgsCross.riscv64.hello generates a genuine RISC-V executable without needing a Nix file. However, some cross-compilation challenges were encountered, such as rust-bindgen utilizing an incorrect version of clang and ministream failing to configure correctly for cross compilation. These issues were surmounted by temporarily reducing the build parallelism and running the problematic builds overnight.\n\nThe author also faced some peculiar out-of-memory (OOM) problems during compilation, particularly when compiling from x86_64-linux. To alleviate this, they reduced the build parallelism significantly and executed the offending builds during off-peak hours. Despite the cross-compilation being somewhat tricky with Nix flakes, as they require encoding the buildPlatform in the output schema and nixosConfigurations not supporting nesting, the author devised a workaround. They exposed the essential build artifacts of the NixOS configuration (ISO and flashing script) under packages.${system} by creating a \"wrapper\" NixOS configuration for each buildPlatform that extends nixosConfigurations.a210. This allowed NixOS to be agnostic to the buildPlatform, resulting in a seamless cross-compilation process when running nix build .#image on an x86_64-linux machine.\n\nThe ultimate goal was to boot the board using U-Boot FSBL - OpenSBI - U-Boot SSBL - Linux - NixOS userspace, by referencing the vendor's Buildroot scripts. The vendor's U-Boot, Linux, and OpenSBI were easily integrated by overriding the source and applying a few patches to address compiler warnings that had transformed into errors in recent versions of GCC/Clang in nixpkgs. Once the bootloader and NixOS image were in place, the A210 was connected to the author's MacBook, which initially failed to recognize the device due to macOS not supporting Fastboot. The author examined the datasheet for alternative boot methods and attempted to use PD resistors to initiate QSPI boot from NORbert, a substitute for a real QSPI device, which ultimately led to booting Linux from eMMC. However, the UART remained silent, and the author suspected an issue with the serial connection.",
  "summary": null,
  "summary_source": "publisher",
  "key_points": [
    "Author repurposes Alibaba RISC-V board for NixOS build server",
    "Confirms sound, HDMI, Bluetooth/Wi-Fi, Ethernet, GPU functionality",
    "Overcomes cross-compilation challenges with Nix flakes and U-Boot integration"
  ],
  "editors_take": "Successfully porting NixOS to the A210 SoC demonstrates how Nix's cross-compilation capabilities can overcome hardware-specific hurdles to expand the ecosystem for emerging RISC-V architectures.",
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}