I just cross-compiled a whole #NixOS installation with zero build errors. That's wild.

Also, it's running on an old #Ouya console. 🔥

My #NixOS cross-compilation adventure ended with Qt. 🙈

Sad that Apple Silicon doesn't do 32-bit ARM. But the build is now churning away on a Hetzner ARM box that can do 32-bit natively. 😁

@kosinus It's magical, isn't it? 😀 Did you use the pkgsCross thing or boot.binfmt.emulatedSystems?
@nobodyinperson I set nixpkgs.hostPlatform in the configuration, which I assume is the same as pkgsCross.
@kosinus Oh wow and I automatically cross-compiles, then? 🤨 Now I wonder why I was jumping through more hoops...
@nobodyinperson You also have to set nixpkgs.buildPlatform = builtins.currentSystem, but with those two, it should cross compile, yes. (buildPlatform defaults to hostPlatform.)
@kosinus I wonder if there's a performance difference between cross compilation and emulation of the target system for compilation. 🤔

@nobodyinperson During the build or at runtime?

It's a large build as it is, so I expect running the compiler emulated will take ages more. I believe some paths are hardware optimized, like translating x86_64 -> aarch64 on Apple hardware using Rosetta 2, and that could work reasonably well. But otherwise, I expect it to be very slow.

But I assume runtime is fine?

@kosinus i did the same some days ago and crosscompiled nix to s390x mainframe. Worked like a charm 🥳🤩.
@kosinus holy moly, I'd love to know more details!
@zstg The NixOS part or the Ouya part? The NixOS part is basically just setting nixpkgs.buildPlatform and nixpkgs.hostPlatform. The Ouya part was probably more tricky. 😅 But I plan to publish the config somewhere when it is finished.
@kosinus I meant the NixOS part 😅
@kosinus I'd like to hear about the #ouya part.

@cweiske Here's the basic system: https://github.com/stephank/nixos-ouya 🙂

Maybe the most magic part is the extra bootloader I'm sticking inbetween. I boot from Ouya Bootmenu into a mainline Linux, then I can use regular kexec to start NixOS.

GitHub - stephank/nixos-ouya: NixOS configuration for Ouya

NixOS configuration for Ouya. Contribute to stephank/nixos-ouya development by creating an account on GitHub.

GitHub

@kosinus Awesome! had this idea floating for a while but havent done yet...

We got a telegram group with Tegra device owners focused on postmarketos/uboot/mainline if you wish to join (other distros welcomed)

@cat Thanks for the invite, but I'm not on Telegram unfortunately!

I tried PostmarketOS first but wasn't very successful with it, though mostly because it's alien to me.

Just discovered, Mesa support for Tegra starts at K1. That's a big bummer. Was hoping to do graphical stuff. 😕

@cat Oh wait, THIS is where grate-driver comes in. I've come across that a bunch. 😁

@kosinus forgot to mention we got matrix bridge too!

pmos is based on alpine and once you generated image to flash and follow install instructions in wiki for device it becomes easier

and as about the driver, there is very barebones 2d accel but yea the gpu being some watered down old nvidia VLIW arch isnt really helping...

@cat Sure, I'll join on Matrix!

Pmos was a bit of a fight, because it requires hacks on Apple hardware, and it just hung on the splash, and I couldn't easily disable the splash, and ssh access wasn't working, and and and... 😅

But on the NixOS end, I'm also not having much luck with Mesa so far. 😬