| 11 Nov 2025 |
Tristan Ross | Great, 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 | Tristan Ross: https://github.com/torvalds/linux/commit/44382b3ed6b2787710c8ade06c0e97f5970a47c8 | 06:50:36 |
dramforever | probably | 06:50:40 |
Tristan 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 | according to https://lore.kernel.org/lkml/ZlSuIu1aFLzAiH_1@krava/ | 06:51:14 |
| oak 🏳️🌈♥️ changed their profile picture. | 19:18:58 |
Tristan Ross | If I pass things from bootstrap-tools into qemu-riscv64 on the device, it runs fine in the usermode emulator. | 20:38:28 |
Tristan Ross | Interesting, only coreutils works from bootstrap-tools. Anything outside of it will fail. | 21:14:32 |
Tristan Ross |
failed to map segment from shared object
I'm so stuck on why this is happening
| 21:25:01 |
Tristan Ross | Updating bootstrap-tools fixed it | 21:58:28 |
Tristan Ross | I guess we should make a new bootstrap-tools for riscv64-linux.... It has been a year since we did it last. | 21:59:33 |
Tristan Ross | Oh, updating bootstrap-tools fixes it enough that the bootstrap-tools derivation builds but GCC is still broken | 22:21:16 |
| 12 Nov 2025 |
Tristan 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 |
Tristan 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 |
Mic92 | @rosscomputerguy:matrix.org: is your ld.so broken potentially? | 05:49:44 |
Tristan Ross | Idk | 05:49:56 |
Tristan Ross | It would mean bootstrap-tools's is broken, right? | 05:50:17 |
Tristan 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 |
Tristan 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 |
Tristan Ross | I get the same error if I try using Ubuntu's ld.so on GCC. | 05:52:22 |
Mic92 | Try LD_DEBUG=all | 05:53:35 |
Tristan Ross | I get 1 extra line:
6557: file=/nix/store/kg61gdq4svvph0c4pcsf867r8nkbiqs7-bootstrap-tools/bin/gcc [0]; generating link map
| 05:54:01 |
Mic92 | Strace on your ld.so? | 05:54:44 |
Mic92 | I think there might be something your gcc tries to map to an fixed address space adress that the kernel even before staring ld.so outrightly refuses | 05:55:56 |
Mic92 | * I think there might be something your gcc tries to map to an fixed address space adress that the kernel even before starting ld.so outrightly refuses | 05:56:15 |
Tristan Ross | roma@mu-gundam:~/nixpkgs$ strace -E LD_DEBUG=all /nix/store/kg61gdq4svvph0c4pcsf867r8nkbiqs7-bootstrap-tools/lib/ld-linux-riscv64-lp64d.so.1 /nix/store/kg61gdq4svvph0c4pcsf867rc
execve("/nix/store/kg61gdq4svvph0c4pcsf867r8nkbiqs7-bootstrap-tools/lib/ld-linux-riscv64-lp64d.so.1", ["/nix/store/kg61gdq4svvph0c4pcsf8"..., "/nix/store/kg61gdq4svvph0c4pcsf8"0
brk(NULL) = 0x7fff84224000
openat(AT_FDCWD, "/nix/store/kg61gdq4svvph0c4pcsf867r8nkbiqs7-bootstrap-tools/bin/gcc", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\2\0\363\0\1\0\0\0\230\312\2\0\0\0\0\0"..., 832) = 832
getpid() = 6665
writev(2, [{iov_base=" 6665:\t", iov_len=12}, {iov_base="file=", iov_len=5}, {iov_base="/nix/store/kg61gdq4svvph0c4pcsf8"..., iov_len=67}, {iov_base=" [", iov_len=2}, {iovp
) = 111
mmap(0xf000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = -1 EPERM (Operation not permitted)
close(3) = 0
writev(2, [{iov_base="/nix/store/kg61gdq4svvph0c4pcsf8"..., iov_len=67}, {iov_base=": ", iov_len=2}, {iov_base="error while loading shared libra"..., iov_len=36}, {iov_base=": t
) = 217
exit_group(127) = ?
+++ exited with 127 +++
| 05:56:34 |
Tristan Ross | Best I can get out of the UART atm | 05:56:46 |
Mic92 |
mmap(0xf000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = -1 EPERM (Operation not permitted) | 05:57:53 |
Mic92 | Now do readelf and look for suspicious addresses. | 05:58:18 |
Mic92 | 0xf000 | 05:58:33 |