!xmLtiCaAJxfhURjrXl:matrix.org

NixOS RISC-V

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

Load older messages


SenderMessageTime
9 Nov 2025
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Yeah no idea. Do they happen to have a somewhat representative qemu-system setup to debug this without hardware?22:53:10
@rosscomputerguy:matrix.orgTristan RossI don't have a VM set up22:56:50
10 Nov 2025
@alex:tunstall.xyzAlex
In reply to @rosscomputerguy:matrix.org
I have a system with an ESWIN EIC770X CPU in it. Tried building hello and got an error about bootstrap-tools segfaulting. Seems like patchelf and all of the bootstrap tools don't want to execute.
I haven't seen it mentioned yet so worth a try: have you looked at the kernel log for hints?
16:39:34
@rosscomputerguy:matrix.orgTristan Ross
In reply to @alex:tunstall.xyz
I haven't seen it mentioned yet so worth a try: have you looked at the kernel log for hints?
I looked and the only thing I saw was EDID logging
16:45:43
@rosscomputerguy:matrix.orgTristan Ross
 LD vmlinux
 BTFIDS vmlinux
FAILED elf_update(WRITE): no error
make[2]: *** [../scripts/Makefile.vmlinux:37: vmlinux] Error 255
make[2]: *** Deleting file 'vmlinux'
make[1]: *** [/build/source/Makefile:1165: vmlinux] Error 2
make: *** [../Makefile:234: __sub-make] Error 2

Wtf is this error? I'm trying to build the kernel for this system.

21:45:42
@rosscomputerguy:matrix.orgTristan Ross
boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.buildLinux rec {
    version = "6.6.18";
    modDirVersion = version;
    src = pkgs.fetchFromGitHub {
      owner = "DC-DeepComputing";
      repo = "fml13v03_linux";
      rev = "7842fe7eb2ccc33fc7002dd2a04e575831b921c3";
      hash = "sha256-/ysRPYqIW1CJ0Itp1cVkQk5d3mzqqXYI4rleCIDY6yE=";
    };
    defconfig = "fml13v03_defconfig";
    kernelPatches = [
      {
        name = "fix-eswin-ai-dsp";
        patch = ./linux-fix-eswin-ai-dsp.patch;
      }
      {
        name = "fix-eswin-media-ext";
        patch = ./linux-fix-eswin-media-ext.patch;
      }
      {
        name = "fix-ap12275";
        patch = ./linux-fix-ap12275.patch;
      }
      {
        name = "fix-eswin-mem";
        patch = ./linux-fix-eswin-mem.patch;
      }
      {
        name = "fix-eswin-headers";
        patch = ./linux-fix-eswin-headers.patch;
      }
      {
        name = "fix-eswin-dev-buff";
        patch = ./linux-fix-eswin-dev-buff.patch;
      }
      {
        name = "fix-eswin-codec-conflict";
        patch = ./linux-fix-eswin-codec-conflict.patch;
      }
      {
        name = "fix-eswin-sysfs";
        patch = ./linux-fix-eswin-sysfs.patch;
      }
    ];
    structuredExtraConfig = with lib.kernel; {
      DWC_MIPI_TC_DPHY_GEN3 = no;
    };
  });

Patches come from https://github.com/DC-DeepComputing/fml13v03_linux/pull/3 & https://github.com/DC-DeepComputing/fml13v03_linux/pull/2

21:47:06
11 Nov 2025
@rosscomputerguy:matrix.orgTristan Ross Hmm, if I override it so CONFIG_DEBUG_INFO_BTF=n is set then it builds 03:58:23
@rosscomputerguy:matrix.orgTristan RossGreat, I think I have all of the binaries I need. I have the kernel, secboot-fw, nsign, and u-boot. Now I need to figure out partitioning and I should be able to boot this.05:48:33
@dramforever:matrix.orgdramforever Tristan Ross: https://github.com/torvalds/linux/commit/44382b3ed6b2787710c8ade06c0e97f5970a47c8 06:50:36
@dramforever:matrix.orgdramforeverprobably06:50:40
@rosscomputerguy:matrix.orgTristan Ross
In reply to @dramforever:matrix.org
Tristan Ross: https://github.com/torvalds/linux/commit/44382b3ed6b2787710c8ade06c0e97f5970a47c8
Yes, that unfortunately looks like it
06:51:11
@dramforever:matrix.orgdramforeveraccording to https://lore.kernel.org/lkml/ZlSuIu1aFLzAiH_1@krava/06:51:14
@oak:universumi.fioak changed their profile picture.19:18:58
@rosscomputerguy:matrix.orgTristan RossIf I pass things from bootstrap-tools into qemu-riscv64 on the device, it runs fine in the usermode emulator.20:38:28
@rosscomputerguy:matrix.orgTristan RossInteresting, only coreutils works from bootstrap-tools. Anything outside of it will fail.21:14:32
@rosscomputerguy:matrix.orgTristan Ross

failed to map segment from shared object

I'm so stuck on why this is happening

21:25:01
@rosscomputerguy:matrix.orgTristan RossUpdating bootstrap-tools fixed it21:58:28
@rosscomputerguy:matrix.orgTristan RossI guess we should make a new bootstrap-tools for riscv64-linux.... It has been a year since we did it last.21:59:33
@rosscomputerguy:matrix.orgTristan RossOh, updating bootstrap-tools fixes it enough that the bootstrap-tools derivation builds but GCC is still broken22:21:16
12 Nov 2025
@rosscomputerguy:matrix.orgTristan Ross
roma@mu-gundam:~/nixpkgs$ strace /nix/store/95y6xmfgcvgxjmba9xm6ccxxnf6i61pw-bootstrap-tools/bin
execve("/nix/store/95y6xmfgcvgxjmba9xm6ccxxnf6i61pw-bootstrap-tools/bin", ["/nix/store/95y6xmfgcvgxjmba9xm6c"...], 0x7fffe5cec8b0 /* 30 vars */) = -1 EACCES (Permission denied)
strace: exec: Permission denied
+++ exited with 1 +++

So confusing...

05:46:18
@rosscomputerguy:matrix.orgTristan Ross *
roma@mu-gundam:~/nixpkgs$ strace /nix/store/95y6xmfgcvgxjmba9xm6ccxxnf6i61pw-bootstrap-tools/bin/gcc
execve("/nix/store/95y6xmfgcvgxjmba9xm6ccxxnf6i61pw-bootstrap-tools/bin/gcc", ["/nix/store/95y6xmfgcvgxjmba9xm6c"...], 0x7fffe09ae8a0 /* 30 vars */) = -1 EPERM (Operation not p)
+++ killed by SIGSEGV +++
Segmentation fault (core dumped)

So confusing...

05:46:55
@joerg:thalheim.ioMic92 @rosscomputerguy:matrix.org: is your ld.so broken potentially? 05:49:44
@rosscomputerguy:matrix.orgTristan RossIdk05:49:56
@rosscomputerguy:matrix.orgTristan RossIt would mean bootstrap-tools's is broken, right?05:50:17
@rosscomputerguy:matrix.orgTristan Ross
roma@mu-gundam:~/nixpkgs$ /nix/store/kg61gdq4svvph0c4pcsf867r8nkbiqs7-bootstrap-tools/lib/ld-linux-riscv64-lp64d.so.1 /nix/store/kg61gdq4svvph0c4pcsf867r8nkbiqs7-bootstrap-toolc/gcc
/nix/store/kg61gdq4svvph0c4pcsf867r8nkbiqs7-bootstrap-tools/bin/gcc: error while loading shared libraries: /nix/store/kg61gdq4svvph0c4pcsf867r8nkbiqs7-bootstrap-tools/bin/gcc: failed to map segment from shared object
05:50:54
@rosscomputerguy:matrix.orgTristan Ross *
roma@mu-gundam:~/nixpkgs$ /nix/store/kg61gdq4svvph0c4pcsf867r8nkbiqs7-bootstrap-tools/lib/ld-linux-riscv64-lp64d.so.1 /nix/store/kg61gdq4svvph0c4pcsf867r8nkbiqs7-bootstrap-toolc/bin/gcc
/nix/store/kg61gdq4svvph0c4pcsf867r8nkbiqs7-bootstrap-tools/bin/gcc: error while loading shared libraries: /nix/store/kg61gdq4svvph0c4pcsf867r8nkbiqs7-bootstrap-tools/bin/gcc: failed to map segment from shared object
05:51:04
@rosscomputerguy:matrix.orgTristan RossI get the same error if I try using Ubuntu's ld.so on GCC.05:52:22
@joerg:thalheim.ioMic92Try LD_DEBUG=all05:53:35
@rosscomputerguy:matrix.orgTristan Ross

I get 1 extra line:

      6557:     file=/nix/store/kg61gdq4svvph0c4pcsf867r8nkbiqs7-bootstrap-tools/bin/gcc [0];  generating link map
05:54:01
@joerg:thalheim.ioMic92Strace on your ld.so? 05:54:44

Show newer messages


Back to Room ListRoom Version: 10