NixOS on RISCV/VisionFive 2: Difference between revisions

m Fix support status
m Mention u-boot in status
Line 31: Line 31:


== Status ==
== Status ==
NixOS runs well on the Visionfive 2 with the current nixos-hardware module https://github.com/NixOS/nixos-hardware/tree/master/starfive/visionfive/v2 (used in the example below); this module bundles an older StarFive custom Linux kernel https://github.com/starfive-tech/linux and its custom firmware for the time being.  
NixOS runs well on the Visionfive 2 with the current <code>nixos-hardware</code> module https://github.com/NixOS/nixos-hardware/tree/master/starfive/visionfive/v2 (used in the example below); this module bundles an older StarFive custom Linux kernel https://github.com/starfive-tech/linux and its custom firmware for the time being.  


However, this setup needs to be '''updated, build and tested separately''' from the other NixOS Linux kernel variations, '''which is a large, unmaintainable burden for the NixOS community''' when the VisionFive 2 board is not the only supported SoC; so we don't want that.
However, this setup needs to be '''updated, build and tested separately''' from the other NixOS Linux kernel variations, '''which is a large, unmaintainable burden for the NixOS community''' when the VisionFive 2 board is not the only supported SoC; so we don't want that.
Line 37: Line 37:
Instead '''we just want to maintain the generic, mainline "upstream" Linux kernel''' for all RISCV baords.
Instead '''we just want to maintain the generic, mainline "upstream" Linux kernel''' for all RISCV baords.


Luckily, the Visionfive 2 developers have pushed their Linux kernel patches quite early to the upstream mainline kernel and have gotten almost all merged already.
Luckily, the Visionfive 2 developers have pushed their Linux kernel patches quite early to the upstream mainline kernel and have gotten almost all merged already.  


'''See  https://rvspace.org/en/project/JH7110_Upstream_Plan for an overview of what device is supported in which Linux kernel version.'''
'''See  https://rvspace.org/en/project/JH7110_Upstream_Plan for an overview of what device is supported in which Linux kernel version.'''


NixOS (more precisely nixpkgs) already has the generic '''Linux kernel 6.9 available, which supports almost everything you need out of the box''' (for a server as HDMI display patches haven't been merged into 6.9). This means NixOS should be able to run without a custom kernel once https://github.com/NixOS/nixos-hardware/pull/958 is merged.
NixOS (more precisely nixpkgs) already has the generic '''Linux kernel 6.9 available, which supports almost everything you need out of the box''' (for a server as HDMI display patches haven't been merged into 6.9). This means NixOS should be able to run without a custom kernel once https://github.com/NixOS/nixos-hardware/pull/958 is merged.
Also the NixOS version of the popular boot-loader [https://github.com/u-boot/u-boot U-Boot], used by this board, has already received all required patches to fully support this board out-of-the-box.


= Building a SD-card image =
= Building a SD-card image =