lopsided98_ has quit [Remote host closed the connection]
lopsided98_ has joined #nixos-aarch64
lopsided98_ has quit [Remote host closed the connection]
orivej has quit [Ping timeout: 240 seconds]
Piece_Maker has joined #nixos-aarch64
Acou_Bass has quit [Ping timeout: 260 seconds]
Piece_Maker is now known as Acou_Bass
Sonarpulse has quit [Ping timeout: 240 seconds]
orivej has joined #nixos-aarch64
vcunat has joined #nixos-aarch64
shad has quit [Quit: No Ping reply in 180 seconds.]
shad has joined #nixos-aarch64
boomshroom has joined #nixos-aarch64
<boomshroom> Hello!
* clever waves
<boomshroom> How can I get an aarch64 linux toolchain on my x86_64 NixOS installation?
<clever> boomshroom: do you want a cross-compiler, or a native aarch64->aarch64 compiler?, my qemu-user stuff can be used to make the native compiler work
<boomshroom> clever: Cross-compiler.
<boomshroom> I want to test the official instructions before I set up everything with Nix.
<clever> i think you do something like import <nixpkgs> { crossSystem = { system = "aarch64-linux"; }; } and then it will automatically use a cross-compiler in every derivation
<boomshroom> clever: Part of the problem is I also want arm-linux-gnueabi in the same environment.
<clever> mixing the 2 might be difficult, can you just switch to a different nix-shell when you get to that step?
<boomshroom> clever: I'll try that.
<boomshroom> I tried 'nix-shell -E '(import <nixpkgs> { crossSystem = { system = "arm-linux"; }; }).hello'' and got back 'error: attribute 'kernelArch' missing'
<clever> let me check my logs...
<clever> 2018-01-25 18:33:38 < LnL> infinisil: nix-build '<nixpkgs>' --arg crossSystem '(import <nixpkgs/lib>).systems.examples.aarch64-multiplatform' -A hello
<clever> boomshroom: this is what i think i tested last
<clever> it does appear to eval on my laptop
<boomshroom> clever: Of course, I'd want to use nix-shell instead, but it's basically the same. I just need to find which 32 bit arm to use.
<LnL> you can also use the cross system from a regular system = ... evaluation
<boomshroom> Let's see if the multiplatform includes arm32
<clever> the nix-build i pasted above has sucessfully built on my laptop, the gcc was in a binary cache
<boomshroom> One small problem: The makefile expects arm-linux-gnueabi-gcc. That builds arm-unknown-linux-gnueabihf-gcc.
<boomshroom> `common.h:60:1: sorry, unimplemented: Thumb-1 hard-float VFP ABI` What?
<boomshroom> static inline u32 read32(uintptr_t addr) {
<clever> [clever@system76:~]$ result/bin/hello
<clever> Hello, world!
<clever> boomshroom: after doing qemu-user.aarch64 = true; and nixos-rebuild switch, my laptop can now run aarch64 binaries
<boomshroom> clever: Has that been upstreamed, or is it still your patch?
<clever> still in my repo
<boomshroom> Looking at lib/systems/platforms.nix, it shouldn't be too hard to add a switch platform to the list. Is it possible to set kernel patches or a kernel derivation for a platform?
<boomshroom> Lovely. I'm using a non-standard platform so it has to compile GCC from scratch.
<clever> boomshroom: look into linuxPackages_rpi
<boomshroom> clever: I see it.
vcunat has quit [Ping timeout: 256 seconds]