<samueldr>
I'm not sure that's the issue, but it's something I have in the back of my mind
ris has quit [Ping timeout: 245 seconds]
vika_nezrimaya has quit [Ping timeout: 246 seconds]
orivej has joined #nixos-aarch64
orivej has quit [Ping timeout: 244 seconds]
THFKA4 has quit [Ping timeout: 250 seconds]
THFKA4 has joined #nixos-aarch64
FRidh has joined #nixos-aarch64
Thra11 has joined #nixos-aarch64
tilpner has quit [Quit: WeeChat 2.4]
Thra11 has quit [Ping timeout: 246 seconds]
tilpner has joined #nixos-aarch64
ryantrinkle has joined #nixos-aarch64
orivej has joined #nixos-aarch64
wildtrees has joined #nixos-aarch64
wildtrees has quit [Remote host closed the connection]
wildtrees has joined #nixos-aarch64
orivej has quit [Ping timeout: 268 seconds]
Thra11 has joined #nixos-aarch64
orivej has joined #nixos-aarch64
orivej has quit [Ping timeout: 272 seconds]
clever has quit [Ping timeout: 272 seconds]
clever has joined #nixos-aarch64
orivej has joined #nixos-aarch64
vika_nezrimaya has joined #nixos-aarch64
<vika_nezrimaya>
So. RPi2, want to use GPIO. Can't find modules exposing it. Which kernel package do I need to use to get Raspberry Pi Foundation's kernel? Is it even packaged?
<vika_nezrimaya>
or maybe I'm not looking in the right direction?
<vika_nezrimaya>
or maybe NixOS doesn't support it at all yet?
<vika_nezrimaya>
(i could make an Arduino sketch to drive pins controlled by serial I/O, but... then I'll have to buy 5V leds :3)
<vika_nezrimaya>
aaaand I'll lose my UART
<samueldr>
vika_nezrimaya: linuxPackages_rpi
<samueldr>
though you're in uncharted (by me) territories with those kind of things
<vika_nezrimaya>
means no one used it in production yet?
<vika_nezrimaya>
well I'll just have to be the first one!
<samueldr>
I meant that _I_ haven't had experience with those bits :)
<gchristensen>
our productions must just be different :)
<samueldr>
I think that some other users are using the _rpi kernels with the 3B and misc. hardware accessories
<vika_nezrimaya>
What about RPi 4?
<vika_nezrimaya>
does anyone here have it?
<vika_nezrimaya>
does it work with NixOS?
<samueldr>
its aarch64 support isn't quite there yet
<samueldr>
the foundation only supports 32 bit stuff
<gchristensen>
eh?
<gchristensen>
oh
<gchristensen>
rpi foundation
<samueldr>
though yesterday some users have had a breakthrough in making it all work
<samueldr>
yes, sorry, a bunch of foundations around lol
<gchristensen>
:D
<vika_nezrimaya>
Because 32-bit GPU stuff isn't easy to drive from 64-bit userland
<samueldr>
I don't think that's it
<samueldr>
it's mostly because they can ship one image that supports 2 through 4
<samueldr>
and the software written continues working
<vika_nezrimaya>
mostly, yeah, but also the 32-bit vs. 64-bit too IIRC
<samueldr>
which, in a way, it's what they sell: the ecosystem
<samueldr>
in what way is it "32 bit vs. 64 bit"?
<vika_nezrimaya>
Something-something the Videocore GPU is 32-bit, I don't remember where I read it but I think that's one of the barriers to getting fully 64-bit userland to be production-ready
<vika_nezrimaya>
I need to find it
<samueldr>
could be, though I haven't seen anything like that
<clever>
vika_nezrimaya: the problem is that the structures for passing messages to/from the gpu, have 32bit fields for pointers to userland resources
<samueldr>
what I know happens is that by shipping 32 bit images for all boards, compatibility with existing stuff is maximized
<clever>
so when you get a reply from the gpu, you can find the userland resource that wanted the reply
<clever>
and it would take a major rewrite of the gpu firmware, to support 64bit stuff in that field
<vika_nezrimaya>
clever: you mentioned firmware, means that we'll have to wait for Raspberry Pi foundation to do something for GPUs to work in aarch64 userland?
<clever>
vika_nezrimaya: there is a userland work-around for it
<vika_nezrimaya>
Is it usable on NixOS? :3 can I try it once I lay my hands on an RPi4?
<samueldr>
vika_nezrimaya: the GPU work with aarch64 userland... with the mainline kernels
<vika_nezrimaya>
>.<
<samueldr>
the 3B and 3B+ work
<vika_nezrimaya>
but 4 has true gigabit ethernet and 2 usb 3.0 ports...
<samueldr>
though it's an entirely different implementation for the driver, compared to the rpi foundation one
<samueldr>
and as far as rpi 4 support
<samueldr>
it'll come
<vika_nezrimaya>
so it's either GPU or GPIO for RPi 4
<samueldr>
though with all the same caveats for using the mainline kernel vs. the rpi foundation kernel
<vika_nezrimaya>
unless I manage to make a frankenstein monster out of two
<{^_^}>
raspberrypi/firmware#550 (by grigorig, 3 years ago, open): AArch64 support
<clever>
found it
<clever>
i could swear i commented on this issue.....
<samueldr>
you did
<clever>
ah, 24 hidden comments!
<samueldr>
github helpfully hides comments
<samueldr>
because who would go and read those?
<clever>
there it is, the x86-only MAP_32BIT flag for mmap
<clever>
this forces the linux kernel to allocate something in the 1st 4gig of the address space
<vika_nezrimaya>
RPi 4 only has 4G RAM. Hm
<clever>
that lets you safely truncate the 64bit poiner to 32bits, and shove into the "32bit only" fields for the GPU api
<clever>
vika_nezrimaya: virtual address space
<clever>
with a minor change to the userland drivers for the rpi (and a major? change to the linux kernel), full 3d accel can work
<vika_nezrimaya>
I'm using it headless anyway
<vika_nezrimaya>
but I do plan on getting one as a workstation one day
<clever>
if your headless, you can just ignore the gpu problems, and run a 64bit os
<vika_nezrimaya>
yay
<samueldr>
clever: I don't really understand all that; is it that the mainline vc4 driver doesn't do some of the GPU things that it doesn't seem to have issues?
<samueldr>
(searching for anything mainline and raspberry pi is just so hard)
<clever>
samueldr: last time i looked into the problem (3 years ago), the api between the linux driver and the firmware in the gpu, involved strucutres that have a 32bit opaque field in them
<clever>
and the userland libraries then put pointers to things on the heap in that field
<clever>
so when it gets a message back from the gpu side, it can find the thing on the heap that has context on what it was doing
<clever>
but once you have a 64bit userland, your pointers dont fit anymore