!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

578 Members
129 Servers

Load older messages


SenderMessageTime
15 May 2026
@artturin:matrix.orgArtturin * Have you checked the shell env? 14:44:46
@nadia:nhp.shNadiaDownload flake.nix14:48:56
@nadia:nhp.shNadia trying to build a simple int main() { return 0; } with this will reproduce the problem 14:56:48
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)
In reply to @nadia:nhp.sh
unrelated question, how do I add more flags to gcc in the case class as -march/-mabi/etc?
Which embedded machine are you trying to compile for? It’s pretty doable if you are willing to wrangle with nixpkgs config and have enough compute to build to cross compiler
17:03:32
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)It is a freestanding one with custom linker scripts and no libc/libstdc++ etc?17:04:09
@nadia:nhp.shNadiayeah17:04:58
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)Hm I can dig up some stuff I used for stm32 cross with c/rust17:05:18
@nadia:nhp.shNadiaspecifically, I was trying to use clang to build for the N64 (it has a MIPS64 CPU) just to see how doable that was, but ran into that weird issue17:06:15
@nadia:nhp.shNadiagave up on that, and just went for gcc17:06:44
@nadia:nhp.shNadiawanted to add extra flags to get the libgcc also built with -mfix4300, but maybe it's fine without17:28:57
26 May 2026
@phanirithvij:matrix.orgphanirithvij changed their display name from loudgolem to phanirithvij.11:41:05
29 May 2026
@lassulus:lassul.uslassulus changed their profile picture.07:06:40
@lorne:cons.org.nzlorne joined the room.14:07:25
@lorne:cons.org.nzlorneI see in scrollback some people working on PowerMac G5 support 👋. I recently booted a cross-compiled NixOS installer on a PowerMac11,2 that I recently found at a junk store. Just submitted a quick fix for the cross kernel build.17:50:14
31 May 2026
@stas:mainframe.lvStasMine is having flaky ram slots. Will burn the apple test cd to test it07:31:17
@stas:mainframe.lvStasIt just hangs, but after wiggling the sticks the problem goes away for a while07:32:04
@lorne:cons.org.nzlorneI just returned from the junk shop with a G4 PowerMac3,6. This is probably going to be more interesting to get going.08:24:29
@artturin:matrix.orgArtturin
In reply to @stas:mainframe.lv
Mine is having flaky ram slots. Will burn the apple test cd to test it
Try cleaning the contacts with isopropyl
09:29:28
@artturin:matrix.orgArtturinWiggling the sticks sounds like it's rubbing away corrosion(or similar)09:30:25
@stas:mainframe.lvStasI tried with a more proper contact cleaner, need to retry some day12:35:02
1 Jun 2026
@opna2608:matrix.orgPunaLMK when you get to the point where you'd try to make an installer ISO. I'm interested to know how booting differs on that hardware compared to my G5.14:22:51
@lorne:cons.org.nzlorne For my G5 I've been assembling a symlink tree of: grub image, kernel, vmlinux, squashfs, and just scp-ing it directly to an Apple Partition Map / HFS+ volume on a usb stick and booting over usb with the regular probe-usb boot usb3/disk:3,\grub\grub.img. I was going to try that again once everything builds (libressl is sad). 15:04:37
@lorne:cons.org.nzlorne * For my G5 I've been assembling a symlink tree of: grub image, kernel, initrd, squashfs, and just scp-ing it directly to an Apple Partition Map / HFS+ volume on a usb stick and booting over usb with the regular probe-usb boot usb3/disk:3,\grub\grub.img. I was going to try that again once everything builds (libressl is sad). 15:29:29
@opna2608:matrix.orgPuna https://github.com/NixOS/nixpkgs/pull/486572 and https://github.com/NixOS/nixpkgs/pull/488831 should allow you to build an ISO via nixos module stuff, write it to a USB / burn to a disc, and either boot it from the mac's multiboot menu thingy or via the tbxi entry point in openfirmware 15:56:41
@opna2608:matrix.orgPuna

https://github.com/OPNA2608/nixpkgs/tree/wip/ppc64-installer is a nixpkgs tree where i collect all such fixes/additions that i have submitted, and rebase them on nixos-unstable every once in awhile (after checking that everything still builds and boots). the newworldmac-nixos-installer.nix file in the repo root can be used as the config for the iso. example command (run on the hardware itself):

puna@Yubel ~/D/nixpkgs (wip/ppc64-installer-testing)> env \
                                                          "NIX_PATH=nixpkgs=$PWD:nixos-config=$PWD/newworldmac-nixos-installer.nix" \
                                                          nom-build \
                                                            --option allow-import-from-derivation false \
                                                            --no-out-link \
                                                            --max-jobs 1 --cores 2 \
                                                            ./nixos -A config.system.build.images.iso

YMMV when doing cross

16:01:39
@opna2608:matrix.orgPuna(this mac stuff has come up in #exotic:nixos.org every once in awhile, if you'd like to take a look)16:04:17
2 Jun 2026
@thewholeworldisburning123:rougebordeaux.xyzkiffeuse4life67 changed their display name from missbehaves to kiffeuse4life67.07:45:26
@lorne:cons.org.nzlorneI have grub and the kernel and initrd loading from a usb stick, but no usb so it's not booting and not responding to the keyboard. I guess I'm missing the usb driver.14:20:25
3 Jun 2026
@lorne:cons.org.nzlorneupon closer inspection, udevd and journald are segfaulting11:17:12
@lorne:cons.org.nzlorneturning off systemd in init was enough to boot to all the way to a shell, but I'm no further ahead. keyboard input produces squares, and networking isn't up so I can't ssh in either.16:26:30

Show newer messages


Back to Room ListRoom Version: 6