<gchristensen>
fyi: ofborg logs will be kept 30d instead of 7d
<Ericson2314>
clever in few I will yes
<Ericson2314>
Going to Haskell "co hack" but I can multi task a little perhaps
<clever>
Ericson2314: i was able to get the binutils, gcc, newlib, then gcc+newlib building, outside of the cross-compile framework (just plain stdenv derivations), but ran into issues linking with newlib and finding the right crt0
<clever>
Ericson2314: but that was enough of a proof of concept, so i moved on to making it a proper cross-compile target
<Ericson2314>
Which platform?
<clever>
Ericson2314: VC4, the "gpu firmware" half of the raspberry pi
<Ericson2314>
Oh coool
<clever>
Ericson2314: its a dual-core cpu, with no mmu, that normally runs threadx (a real time os)
<clever>
and the firmware on the VC4 deals with managing all of the hw accel in the rpi
<clever>
opengl, hw encode/decode, software encode/decode, camera/display control
<clever>
the VC4 and ARM cores also share a mailbox (32bit wide fifo) so they can RPC each-other
<clever>
and thats how linux does RPC calls into the rpi firmware
<clever>
this flag causes qemu to add a 3rd virtual device to that NIC, which dumps all packets to a pcap file
<manveru>
ah, that's cool :)
<clever>
i had configured this test to spin up a set of core nodes, and packet capture each of them seperately, and provide the capture files for download
<clever>
then discovered aws has no kvm support, so the clocks drift enough to cause 100% test failure
<clever>
but they have since gained baremetal, and packet has come about, so that test could be revived
orivej has joined #nixos-dev
<manveru>
i think i'll have the first full working graphical nixos installer today :)
<gchristensen>
!
<manveru>
not yet using the graphical iso builder, because of the network issue, but who wants kde anyway :P
<clever>
manveru: oh, have you seen my ffmpeg stuff?
<clever>
[clever@amd-nixos:~/apps/nixpkgs-vc4]$ nix-build test.nix -A libcCross --option builders ''
<clever>
error: Package ‘newlib-vc4’ in /home/clever/apps/nixpkgs-vc4/pkgs/development/misc/vc4/newlib.nix:4 is not supported on ‘vc4-none’, refusing to evaluate.
<clever>
Ericson2314: but now how do i deal with this?
<clever>
my current newlib drv is an "x86" drv that produces vc4 libraries
<Ericson2314>
clever: go to doubles.nix in the lib and add some
<Ericson2314>
sigh, this used to be more automatic then then became more manual
<clever>
looks like i want vc4 to be part of isNone?
<clever>
adding "vc4-none" to the all= made it get further
<clever>
its building the toolchain again
<clever>
checking target system type... Invalid configuration `vc4-elf': machine `vc4' not recognized
<clever>
builder for '/nix/store/qn8iq96ah85ds0pac903zh0rlblnkicw-vc4-elf-binutils-2.31.1.drv' failed with exit code 1
<clever>
thats the wrong drv, mine is called binutils-vc4...
<Ericson2314>
you will probably need to change gnu-config
<clever>
Ericson2314: i think nixpkgs is auto-generating a binutils drv for this target?
<clever>
hmmm, maybe i need to edit something near the inputs of gccCrossStageStatic ...
janneke_ has joined #nixos-dev
<Ericson2314>
there's no magic autogenerated drv?
<Ericson2314>
i am not sure what you mean
<Ericson2314>
there's all sorts of brittle shit thre because the build system of gcc is so bad
<clever>
where did vc4-elf-binutils-2.31.1 come from, when my binutils package is called binutils-vc4 ?
<Ericson2314>
I will really be able to help you better with the conditional sources thing
janneke has quit [Ping timeout: 276 seconds]
<Ericson2314>
it will be more complex
<Ericson2314>
but relatively less complex as it is closer to the other cross targets
<clever>
where should i start with that?
<Ericson2314>
just go to the bintuils and gcc derivations
{^_^} has quit [Remote host closed the connection]
gchristensen has joined #nixos-dev
{^_^} has joined #nixos-dev
Cale has joined #nixos-dev
<clever>
Ericson2314: the nix-shell opened.....
<Ericson2314>
clever: sorry i was talking to someone here
<clever>
building '/nix/store/p66rg5xd1hjrdb1l6x4prlfqxvr91daq-helloworld-vc4-elf.drv' on 'ssh://builder@192.168.2.32'...
<clever>
Ericson2314: i think its working, just need to test it on an example...
<Ericson2314>
:)
<clever>
Ericson2314: /nix/store/rr7860kh97077r72mvrdlp8yp5yj7vnr-vc4-elf-binutils-2.31.1/bin/vc4-elf-ld: skipping incompatible /nix/store/smq015y7krp7hqxfcan28pn5bk3dl8jq-newlib-vc4/lib/libc.a when searching for -lc
<clever>
had the same problem before, when working with the gist version
<clever>
Ericson2314: how does ld know when a library is compatible?
<clever>
lib_a-_Exit.o: file format elf32-little
<clever>
lib_a-__adjust.o: file format elf32-vc4
<clever>
if i run objdump -x against libc.a
janneke_ is now known as janneke
<Ericson2314>
clever: I am not sure, but non non-vc4 stuff should be on the -L path
<clever>
lib_a-__adjust.o: file format elf32-little
<clever>
ok, thats just weird
<clever>
Ericson2314: Exit.o was elf32-little, so i just did a little ar -d, to delete it from the libc.a
<clever>
Ericson2314: now, __adjust.o has changed from elf32-vc4, to elf32-little!??
<Ericson2314>
huh weird
<aanderse>
gchristensen: where did you run into phpfpm issue?
<clever>
its like the .a file is broken, and showing the wrong arch for the first .o within it
<Ericson2314>
wat
<clever>
the first .o within the .a is always elf32-little
<clever>
if i delete the "first" entry, that problem persists, and the new "first" entry has it
<clever>
Ericson2314: but if i manually delete ie in a nix-shell, its not broken
<clever>
Ericson2314: i suspect something nixpkgs did after postInstall, borked it
<Ericson2314>
stripping maybe?
<clever>
possibly
<Ericson2314>
I've seen that fuck shit up
<clever>
i'm not using the vc4 stdenv to make newlib
<clever>
19 dontStrip = true;
* clever
hits go!
<clever>
stripping (with command strip and flags -S) in /nix/store/smq015y7krp7hqxfcan28pn5bk3dl8jq-newlib-vc4/lib
<clever>
Ericson2314: yeah, logs do say it tried to strip things
<Ericson2314>
mmm gotcha
<Ericson2314>
fingers crossed!
<clever>
after another round of gcc, we will know what happened
* Ericson2314
grimmaces
<Ericson2314>
clever: can you just build newlib and look at those archives?
<clever>
model name : AMD FX(tm)-8350 Eight-Core Processor
<Ericson2314>
stdenv.cc.libc?
<clever>
it already finished newlib, so i could check that while it churns
<clever>
lib_a-__adjust.o: file format elf32-vc4
<clever>
Ericson2314: 1: the 1st is now vc4, 2: i forgot to not-delete Exit!
<Ericson2314>
hmm?
<Ericson2314>
confused as to 1 and 2, sorry
<clever>
1: dontStrip=true; fixed things
<clever>
2: i forgot the hacked attempt at fixing, so Exit.o is missing from libc
<clever>
/build/source/vc4-elf/newlib/libc/reent/../../../.././newlib/libc/reent/fstatr.c:62: undefined reference to `fstat'
<clever>
Ericson2314: progress!!
<Ericson2314>
ahhh
<Ericson2314>
riht
<Ericson2314>
haha nice!
<clever>
/nix/store/hsy72n0caycw2w8ycvlznb137cfxbk63-newlib-vc4/lib/crt0.o: In function `_start':
<clever>
(.text+0x0): undefined reference to `_fstack'
<clever>
one min
<clever>
the directions said to use a linker script with -T
<clever>
-T ${pkgs.stdenv.cc.libc}/lib/vc4-sim.ld
<clever>
Ericson2314: it didnt error!!
<clever>
[clever@amd-nixos:~/apps/nixpkgs-vc4]$ ls -ltrh result/
<clever>
-r-xr-xr-x 1 root root 188K Dec 31 1969 hello
<clever>
-r-xr-xr-x 1 root root 11K Dec 31 1969 hello.bin
<clever>
total 85K
<Ericson2314>
:)
<Ericson2314>
nice!!
<Ericson2314>
upstream it!
<clever>
Ericson2314: i now have a 11kb bin file, that might do something if dropped at bootcode.bin on an SD card
<Ericson2314>
wooo!
<clever>
except, i used vc4-sim.ld, which only works in the simulator
<clever>
vc4-sram.ld should be used, if i want the code to run in the L1 cache
<clever>
that also compiles
<clever>
now, what did this example even do? lol
<clever>
all it does is print hello world with printf
<clever>
Ericson2314: next thing, how would i go about making 2 vc4 cross targets, one where the ld-wrapper uses vc4-sim.ld, and another where it uses vc4-sram.ld ?
<clever>
they can share the gcc/newlib/binutils
<Ericson2314>
those are two different linkers?
<clever>
different linker scripts
<Ericson2314>
oh hmm
<Ericson2314>
does the linker script matter when building libraries?
<Ericson2314>
i suppose SOs but you aren't doing those!
<clever>
let me gist them and see how they differ...
<Ericson2314>
I made a post in the rfc thread, at least no one spammed it yet!
<Ericson2314>
I can make more days if it helps
<aanderse>
gchristensen: i still remail extremely on the fence about that PR... both sides have good points. :)
<gchristensen>
I cross a bunch of TZs here :)
<Ericson2314>
Hehehe
<gchristensen>
aanderse: when on the fence, I prefer to go for the more-nixos-ey, less-untracked-state option even if it is a bit annoying
<gchristensen>
and am still traveling
<Ericson2314>
gchristensen ok with daylight savings I can do 10 tomorrow haha
<aanderse>
gchristensen: yeah, that makes sense too
<Ericson2314>
*fall back
<gchristensen>
gosh
<Ericson2314>
9:30 too
__monty__ has quit [Quit: leaving]
orivej has quit [Ping timeout: 264 seconds]
kreisys has quit [Ping timeout: 240 seconds]
<infinisil>
aanderse: Regarding invidious, something I haven't mentioned yet but very relevant: the invidious wiki recommends cleaning the database every so often because it ends up with a lot of data over time that's not strictly needed
<infinisil>
And this could be implemented when `database.enable = true`
<infinisil>
s/implemented/done
<Ericson2314>
ryantm matthewbauer MichaelRaskin gchristensen gchristensen ok 14:30 UTC this Monday works for everyone (but me but I'll fix that) so let's do that. When I'm not on m y phone I'll dredge up your emails and send an invite
<Ericson2314>
And yes I just misread that before and confused Saturday with Sunday :O