| 16 Jul 2025 |
no-mood | Hi all, is there any chance that the RISC-V toolchain will be packaged for Nix?
https://github.com/NixOS/nixpkgs/issues/376165 | 10:53:36 |
Alex | In reply to @no-mood:matrix.org Hi all, is there any chance that the RISC-V toolchain will be packaged for Nix? https://github.com/NixOS/nixpkgs/issues/376165 What for? | 10:58:19 |
no-mood | In reply to @alex:tunstall.xyz What for? I'm working on a LKM on (simulated) risc-v, and without the toolchain I'm kind of stuck.
I've tried to do it manully without success (first step of https://gem5.googlesource.com/public/gem5-resources/+/HEAD/src/riscv-fs/README.md) | 11:00:19 |
no-mood | Now I'm working on a debian container (where the first step is not needed since it is packaged there) but I'm having some problems getting the compile_commands.json to work | 11:01:29 |
Alex | In reply to @no-mood:matrix.org I'm working on a LKM on (simulated) risc-v, and without the toolchain I'm kind of stuck.
I've tried to do it manully without success (first step of https://gem5.googlesource.com/public/gem5-resources/+/HEAD/src/riscv-fs/README.md) Have you tried using GCC or clang? They support cross-compiling for freestanding environments too. | 11:02:07 |
no-mood | In reply to @alex:tunstall.xyz Have you tried using GCC or clang? They support cross-compiling for freestanding environments too. I've just read that debian ships with gcc-14-riscv64-linux-gnu, but I can't find the package for nix (?) | 11:04:49 |
Alex | In reply to @no-mood:matrix.org I've just read that debian ships with gcc-14-riscv64-linux-gnu, but I can't find the package for nix (?) pkgsCross can do pretty much anything imaginable, as long as it builds (most do). | 11:05:40 |
Alex | There is for example pkgsCross.riscv64.stdenv, which IIRC provides everything you need for C and assembly. | 11:06:54 |
no-mood | Oh good! Any flake you recommend? | 11:07:34 |
Alex | In reply to @no-mood:matrix.org Oh good! Any flake you recommend? For?
The above is in nixpkgs. | 11:07:55 |
no-mood | Sorry, this is my first time cross-compiling in NixOS :)
I'm missing how to use it | 11:14:08 |
Alex | In reply to @no-mood:matrix.org Sorry, this is my first time cross-compiling in NixOS :) I'm missing how to use it I can't go into much detail right now, but there is a NixOS wiki page that does.
You could also try checking the Nixpkgs manual. It should have a section about cross. | 11:16:23 |
no-mood | Okay I'll check it, thank you! | 11:20:43 |
dramforever | get the pkgsCross.riscv64.stdenv.cc package | 12:01:11 |
dramforever | riscv64-unknown-linux-gnu-gcc will be right there | 12:01:21 |
dramforever | the newlib one is in pkgsCross.riscv64-embedded.stdenv.cc | 12:01:34 |
| @winston:milli.ng left the room. | 13:37:05 |
| 17 Jul 2025 |
no-mood | In reply to @dramforever:matrix.org get the pkgsCross.riscv64.stdenv.cc package This is what I needed. I'm still confused as to why it doesn't show up in the Nix package search, given that it's a package | 10:49:03 |
no-mood | In reply to @dramforever:matrix.org get the pkgsCross.riscv64.stdenv.cc package * | 10:49:13 |
dramforever | under pkgsCross.* is every single package, so for example pkgsCross.riscv64.nano is nano cross compiled to riscv64. if these all showed up in package search you'd never see the second package on package search | 10:57:15 |
dramforever | and, to be honest, pkgsCross isn't well documented. it's more of a hack for convenience than how you set up cross for nixpkgs | 10:58:50 |
dramforever | see http://nixos.org/manual/nixpkgs/stable/#sec-cross-usage and my old flake doing cross (OLD! do not use directly) https://github.com/dramforever/nixos-visionfive/blob/907b553bb5ac405f2fa746e7958d634a2b6eb4be/flake.nix#L25 | 11:07:39 |
dramforever | * see http://nixos.org/manual/nixpkgs/stable/#sec-cross-usage and for example my old flake doing cross (OLD! do not use directly) https://github.com/dramforever/nixos-visionfive/blob/907b553bb5ac405f2fa746e7958d634a2b6eb4be/flake.nix#L25 | 11:07:45 |
| Cathal joined the room. | 14:12:21 |
| 21 Jul 2025 |
zimward | has anyone run a xianshan nanhu processor? apparently it was taped out in 2023 but i can't find anything that uses it (and can be bought rn) | 11:08:26 |
| 23 Jul 2025 |
| @lotte:chir.rs changed their profile picture. | 10:18:20 |
| implr set a profile picture. | 10:57:49 |
| implr changed their profile picture. | 11:21:57 |
| 24 Jul 2025 |
[0x4A6F] | New Milk-V Titan announced. | 19:38:58 |
zimward | Compliant with RVA23* (Excluding "V" Extension) lol, so just with hypervisor support | 19:49:17 |