!xmLtiCaAJxfhURjrXl:matrix.org

NixOS RISC-V

237 Members
NixOS on RISC-V https://wiki.nixos.org/wiki/RISC-V https://pad.lassul.us/NixOS-riscv64-linux 70 Servers

Load older messages


SenderMessageTime
15 Apr 2026
@blokyk:matrix.orgzoë (she/her)Redacted or Malformed Event10:50:43
@blokyk:matrix.orgzoë (she/her) *

ok so i wasn't going crazy: trying it out with just nix-shell and hard-coded pkgsCross.riscv32. in front of everything works, but for some reason callPackage/splicing doesn't work :(

# shell.nix
{
  llvmPackages_latest,
  mkShell
}:
let mkLLVMShell = mkShell.override { inherit (llvmPackages_latest) stdenv; }
in
mkLLVMShell { }
10:50:51
@blokyk:matrix.orgzoë (she/her) *

ok so i wasn't going crazy: trying it out with just nix-shell and hard-coded pkgsCross.riscv32. in front of everything works, but for some reason callPackage/splicing doesn't work :(

# shell.nix
{
  llvmPackages_latest,
  mkShell
}:
let mkLLVMShell = mkShell.override { inherit (llvmPackages_latest) stdenv; }
in
mkLLVMShell { }
$ nix-shell -E '(import <nixpkgs> {}).pkgsCross.riscv64.callPackage ./shell.nix {}'
[nix-shell:~] $ $CC --version
clang version 22.1.2
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /nix/store/nqrpsik93243zfbysab689b4598x0srw-clang-22.1.2/bin

:(

10:53:55
@blokyk:matrix.orgzoë (she/her) *

ok so i wasn't going crazy: trying it out with just nix-shell and hard-coded pkgsCross.riscv32. in front of everything works, but for some reason callPackage/splicing doesn't work :(

# shell.nix
{
  llvmPackages_latest,
  mkShell
}:
let mkLLVMShell = mkShell.override { inherit (llvmPackages_latest) stdenv; }
in
mkLLVMShell { }
$ nix-shell -E '(import <nixpkgs> {}).pkgsCross.riscv64.callPackage ./shell.nix {}'

[nix-shell:~]$ $CC --version
clang version 22.1.2
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /nix/store/nqrpsik93243zfbysab689b4598x0srw-clang-22.1.2/bin

:(

10:54:23
@blokyk:matrix.orgzoë (she/her) *

ok so i wasn't going crazy: trying it out with just nix-shell and hard-coded pkgsCross.riscv32. in front of everything works, but for some reason callPackage/splicing doesn't work :(

# shell.nix
{
  llvmPackages_latest,
  mkShell
}:
let mkLLVMShell = mkShell.override { inherit (llvmPackages_latest) stdenv; };
in
mkLLVMShell { }
$ nix-shell -E '(import <nixpkgs> {}).pkgsCross.riscv64.callPackage ./shell.nix {}'

[nix-shell:~]$ $CC --version
clang version 22.1.2
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /nix/store/nqrpsik93243zfbysab689b4598x0srw-clang-22.1.2/bin

:(

10:55:24
@dramforever:matrix.orgdramforever stdenv.cc is the toolchain 13:01:19
@dramforever:matrix.orgdramforeverbut otherwise yeah pkgsCross.riscv32.mkShell should get you what you want13:03:23
@blokyk:matrix.orgzoë (she/her)yeah idk what i did, i was just confused13:03:49
@blokyk:matrix.orgzoë (she/her)my actual code was more complicated than just an empty mkShell, but working my way back up to it rather than trying to force the existing code into cross-compilation worked better13:05:02
@blokyk:matrix.orgzoë (she/her)* my actual nix code was more complicated than just an empty mkShell, but working my way back up to it rather than trying to force the existing nnix code into cross-compilation worked better13:06:44
@alex:tunstall.xyzAlex

cc is never a cross compiler in Nixpkgs. That cc probably comes from pkgsBuildBuild and exists so that builds can compile build tools that they can then use later in the build.

Yes, anything that hardcodes cc (or worse gcc) needs to be patched to support cross.

13:09:08
@rasmata:matrix.org@rasmata:matrix.org joined the room.21:44:25
@rasmata:matrix.org@rasmata:matrix.org left the room.21:44:28
18 Apr 2026
@mlyx:matrix.orgmlyx joined the room.12:39:21
18 Aug 2023
@shados:nixos.devShados joined the room.05:42:58
@misuzu:matrix.orgmisuzu
% cat /proc/mtd                            
dev:    size   erasesize  name
mtd0: 00080000 00001000 "spl"
mtd1: 00010000 00001000 "uboot-env"
mtd2: 00400000 00001000 "uboot"
mtd3: 00a00000 00001000 "reserved-data"

Looks like the visionfive2_fw_payload.img should be flashed to /dev/mtd2 instead of /dev/mtd1

08:29:39
20 Aug 2023
@erremilia:matrix.orgerremilia joined the room.17:53:34
@claesatwork:matrix.orgClaes joined the room.19:27:07
24 Aug 2023
@erremilia:matrix.orgerremilia1000004363.jpg
Download 1000004363.jpg
19:36:55
@erremilia:matrix.orgerremiliaThis should be fun to play with19:37:02
@hive:the-apothecary.clubtauoooh nice19:38:17
@hive:the-apothecary.clubtausame chip as starfive v2 iirc so it should be somewhat easy to use19:38:37
@erremilia:matrix.orgerremiliaSounds good! Me and my SO mostly got it to play with and just see some Risc-V stuff but it'd be awesome if it turns out to be useful.19:39:52
@raitobezarius:matrix.orgraitobezariuslet us know how it goes19:40:12
@raitobezarius:matrix.orgraitobezariusI ragequit my riscv stuff currently because I will go in vacations soon and had higher priority, but still interested into getting in a place where we can start having remote builders all together19:40:34
25 Aug 2023
@fgaz:matrix.orgfgaz
In reply to @erremilia:matrix.org
sent an image.
Nice, the number of star64+nixos users just doubled!
07:12:19
@fgaz:matrix.orgfgaz By late next month we'll be over a billion 07:12:51
@fgaz:matrix.orgfgaz erremilia: I have a native NixOS image here https://sr.ht/~fgaz/nixos-star64/ 07:13:29
30 Aug 2023
@erremilia:matrix.orgerremiliaCould you compile a 8GB image for me? I haven't been able to get it to compile properly and on your 4GB image it never seems to connect to the internet or anything and haven't had the time to try and hook it up to serial.03:13:48
@fgaz:matrix.orgfgaz erremilia: sure. I'm actually updating the image right now, so I think it'll be ready tomorrow or the day after 13:52:39

Show newer messages


Back to Room ListRoom Version: 10