!xmLtiCaAJxfhURjrXl:matrix.org

NixOS RISC-V

223 Members
NixOS on RISC-V https://wiki.nixos.org/wiki/RISC-V https://pad.lassul.us/NixOS-riscv64-linux https://github.com/orgs/NixOS/teams/risc-v65 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
12 Nov 2025
@vixea:matrix.orgvixea * Or at least that's what I'm guessing it's what it is, maybe it's the 6 wide version either way you won't know till it's out anyway 07:28:56
@vixea:matrix.orgvixeaOh heh reread the slides it's Ascalon-X07:30:20
@alex:tunstall.xyzAlex
In reply to @joerg:thalheim.io
What's allowed on RISC-V?
I haven't done anything outside of M mode, but it seems like the manuals (vol 2 - privileged, chapters 4.3, 4.4, and 4.5) state that pages must be aligned to the page boundary, which is 4 KiB at the smallest level of pages.
0xf000 is appropriately aligned, so I see no reason for the ISA to disallow it.
AFAICT there are no ISA-level restrictions on what virtual addresses can be used.
10:43:09
@dramforever:matrix.orgdramforeverfwiw it's basically the same as you would on x86-64, one of 39 bits sign extended / 48 bits sign extended / 57 bits sign extended depending on hw13:07:40
@dramforever:matrix.orgdramforeverwell you don't have 39 on x86-64 but it's fairly easy to extend that down13:07:52
@dramforever:matrix.orgdramforever* fwiw it's basically the same as you would have on x86-64, one of 39 bits sign extended / 48 bits sign extended / 57 bits sign extended depending on hw13:08:00
@dramforever:matrix.orgdramforeverand for linux, "positive" address for user, "negative" for kernel13:08:23
@rosscomputerguy:matrix.orgTristan Ross

Oh yay, stdenv is built.

$ time nix build .#stdenv
real    565m12.113s
user    3m55.911s
sys     0m32.432s
17:29:14
13 Nov 2025
@dramforever:matrix.orgdramforeveryou have a patience that's beyond my imagination04:12:30
14 Nov 2025
@no-mood:matrix.orgno-mood

Hi all, I have a few questions on RISC-V cross-compilation in Nix

I need a bare-metal RISC-V toolchain (riscv32-none-elf with newlib, not Linux).
I'm using pkgs.pkgsCross.riscv32-embedded.buildPackages.gcc which provides the correct riscv32-none-elf-gcc.
Now:

  1. Is pkgsCross just syntactic sugar over crossSystem, or are there functional differences?
  2. For bare-metal embedded: should I use pkgsCross.riscv32-embedded.buildPackages.gcc
    or is there a better package?

For context, I'm writing a SpinalHDL/Verilog project, with RISC-V firmware for an FPGA (no OS, pure embedded)

11:49:45

Show newer messages


Back to Room ListRoom Version: 10