samueldr changed the topic of #nixos-dev to: #nixos-dev NixOS Development (#nixos for questions) | NixOS 19.09 is released! | | | 19.09 RMs: disasm, sphalerite |
drakonis has quit [Quit: WeeChat 2.6]
drakonis has joined #nixos-dev
drakonis_ has quit [Ping timeout: 265 seconds]
v0|d has joined #nixos-dev
<v0|d> dtz: sorry to interrupt, need a little bit of help if you don't mind.
jonringer has joined #nixos-dev
orivej has quit [Ping timeout: 240 seconds]
feepo has joined #nixos-dev
<ivan> lxd -> sqlite-replication is failing to build in release-19.09
<ivan> trying to apply the CVE patch to an older release and failing
ris has quit [Ping timeout: 258 seconds]
drakonis1 has joined #nixos-dev
mjsir911 has joined #nixos-dev
aminechikhaoui has quit [Quit: The Lounge -]
aminechikhaoui has joined #nixos-dev
greizgh has quit [Quit: greizgh]
greizgh has joined #nixos-dev
andi- has quit [Remote host closed the connection]
andi- has joined #nixos-dev
Scriptkiddi has quit [Remote host closed the connection]
das_j has quit [Remote host closed the connection]
das_j has joined #nixos-dev
Scriptkiddi has joined #nixos-dev
drakonis1 has quit [Quit: WeeChat 2.6]
drakonis_ has joined #nixos-dev
drakonis has quit [Ping timeout: 276 seconds]
orivej has joined #nixos-dev
etu has quit [Quit: WeeChat 2.4]
etu has joined #nixos-dev
etu has quit [Quit: WeeChat 2.6]
etu has joined #nixos-dev
tilpner has joined #nixos-dev
jonringer has quit [Ping timeout: 240 seconds]
jonringer has joined #nixos-dev
drakonis_ has quit [Remote host closed the connection]
<MichaelRaskin> Ericson2314: I think in practice you can use the emails of all the shepherds in Git log, no?
__monty__ has joined #nixos-dev
jonringer has quit [Ping timeout: 276 seconds]
orivej has quit [Ping timeout: 240 seconds]
page has joined #nixos-dev
ris has joined #nixos-dev
ajs124 has quit [Quit: Gateway shutdown]
ajs124 has joined #nixos-dev
pie_ has quit [Ping timeout: 268 seconds]
<Ericson2314> MichaelRaskin: makes sense
<gchristensen> this new evaluator seems to evaluate in 4min less
<infinisil> gchristensen: New evaluator?
<gchristensen> I got a new machine for evaluating PRs
<gchristensen> AMD Ryzen 7 PRO 1700X, 2x SSD SATA 512 GB in mirror, 4x RAM 16384 MB DDR4.
<infinisil> Ah neat, what was it previously?
<infinisil> Ohh a Ryzen, nice
<gchristensen> some hetzner VMs
<gchristensen> back in a while, lunch
<infinisil> gchristensen: And the previous time?
genesis has quit [Quit: Leaving]
emily has quit [Remote host closed the connection]
emily has joined #nixos-dev
<clever> Ericson2314: you got time to help with adding a new cross-compile target to nixpkgs?
<clever> Ericson2314: is what ive got so far
<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> is what i wrote before integrating it properly into nixpkgs
<Ericson2314> Clever will look and ping you once there wth laptop open (this is my phone)
<Ericson2314> Happy to help!
<clever> Ericson2314: sure
drakonis has joined #nixos-dev
<manveru> seems like recently qemu has networking issues...
<clever> what kind of issues?
<manveru> on startup, tried building the graphical install cd and running it in qemu, but systemd doesn't get past waiting for networkmanager...
<manveru> during the hackday, even setting `networking.hostName` would prevent a startup as well :P
<clever> manveru: what -net and -nic flags are passed to qemu?
<manveru> i'm using `build-vm`
<manveru> `-net nic,netdev=user.0,model=virtio -netdev user,id=user.0${QEMU_NET_OPTS:+,$QEMU_NET_OPTS}`
<manveru> don't have that env var set
<clever> in that mode, it will create a virtio NIC within the guest, and then qemu will simulate a dhcp+dns server and NAT
<gchristensen> a few other minor changes to ofborg are going out today
<clever> qemu will parse all udp/tcp packets going out, then open matching sockets on the host
<manveru> yeah, i got a bunch of virtual networks...
<clever> manveru: let me find another useful flag...
<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?
<manveru> don't think so
<clever> this records the X11 screen inside a nixos test
<manveru> oh that's neat :)
orivej has quit [Ping timeout: 240 seconds]
jonringer has joined #nixos-dev
<Ericson2314> clever: so it fails in nixpkgs or with your old version?
<clever> [clever@amd-nixos:~/apps/nixpkgs-vc4]$ nix-build -A vc4-gcc-stage1 --option builders ''
<clever> checking for gcc... no
<clever> configure: error: no acceptable C compiler found in $PATH
<Ericson2314> I think @matthewbauer made newlib work for avr or something
<clever> the version in nixpkgs fails to find a gcc, when building a stage-1 gcc (libc-less)
<clever> the version in the gist (outside of nixpkgs) was able to build stage2 and newlib, but then failed at link time
<Ericson2314> want to push what you did in nixpkgs to branch?
<Ericson2314> I would basically take the normal derivations and selectively pick a different source
<clever> 2019-11-02 12:49:12 < clever> Ericson2314: is what ive got so far
<Ericson2314> oops, sorry
<clever> i also notice, gcc-stage1 is in stdenvNoCC, how did i think that would work?
<Ericson2314> ok looking more
<Ericson2314> clever: so ghcc-stage1 is because it's just a library port, not a compiler backend port?
<Ericson2314> *gcc-stage1
<Ericson2314> oops
<Ericson2314> :)
<clever> gcc-stage1 is a libc-less gcc, that is used to compile newlib
<clever> and then gcc-stage2 is made using that newlib
<clever> Ericson2314: all of my exprs are based on
<Ericson2314> clever: so I would ignore the details and try to adapt the existing derivations
<Ericson2314> so just swap out the sources and then see what breaks
<Ericson2314> make sense?
<clever> yeah
<Ericson2314> clever: also we have LLVM cross if llvm supports that
<Ericson2314> even if you need to enable the experimental target
<clever> i think itszor had to patch binutils and gcc to support vc4
<Ericson2314> the debug cycle is better because you aren't needlessly rebuilding the compiler itself after building newlib
<Ericson2314> clever: that's fine you can conditionally swap the bintuils sources too
<clever> /nix/store/y9bc7ga8zj6y60n143294g6pbx52nclz-gcc-vc4-stage1
<clever> Ericson2314: ok, stage-1 now compiles...
<Ericson2314> clever: that is...?
<Ericson2314> oh nice
<Ericson2314> what did you fix?
<clever> i changed it from stdenvNoCC to stdenv
<clever> i dont know why it was like that, lol
<clever> i had no cc to build gcc with!
<Ericson2314> clever: there at leas was a stdenvNoLibc you might have gotten confused with
<clever> i think i was just optimizing, and removing gcc from everything
<clever> and went a little too far
<Ericson2314> +1
<clever> newlib is building...
<Ericson2314> well just make sure you switch to the sources-swapping thing if you want to upstream!
<clever> /nix/store/p8m0aq6kdq8lkz3ssf5dhdf8qrd3cw5x-newlib-vc4
<clever> ok, progress!
<Ericson2314> clever: :)
<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
<clever> pkgs/development/tools/misc/binutils/default.nix
<clever> there
<Ericson2314> and so src = if stdenv.targetPlatform.isVc4 then ... else ....;
<clever> 28 # HACK to ensure that we preserve source from bootstrap binutils to not rebuild LLVM
<clever> 29 src = stdenv.__bootPackages.binutils-unwrapped.src or (fetchurl {
<Ericson2314> that would be in the else branch
<clever> yep, its just getting a bit hairy with several conditions
<Ericson2314> yeah i probbably wrote that llvm thing but I alredy forget:)
<clever> building '/nix/store/3sc125z19jbjz0irz4018ix5ijigsh08-vc4-elf-binutils-2.31.1.drv'...
<clever> unpacking sources
<clever> unpacking source archive /nix/store/sw35yd3p9943m9yzbwc233ib2xrg6kj6-source
<clever> applying patch /nix/store/fbqjjd9g3csmpj6dnxw0s06y9zl3ryxv-gold-symbol-visibility.patch
<clever> Ericson2314: the patches fail to apply to this fork of binutils
<clever> can't find file to patch at input line 13
<clever> 12 +++ b/gold/ChangeLog-2017
<clever> heh, its failing to patch the changelog, lol
<Ericson2314> clever: just diable the path then
<Ericson2314> hahahaha
<Ericson2314> you could use the patchutils thing to remove that file from the patch, if you are feeling like an over-achievere :D
<Ericson2314> but yeah fine to just skip that for now
<clever> its likely the wrong version of binutils and the entire patch wont apply
<Ericson2314> sure, that's fine
<Ericson2314> so just ` ...] ++ stdenv.lib.optional .. ... ++ [ ..`
<clever> uh oh
<clever> i cant just move it to the end of the binutils list and make it optional
<clever> because any change to the list, causes the entire host toolchain to rebuild
<Ericson2314> clever: yeah gotta nasty up the code to do it in place
<Ericson2314> hense my double `] ++ ... ++ [` above
<Ericson2314> *double ++ in that
<Ericson2314> yeah this part is annoying but will be worth it :)
<clever> yeah
<clever> applying patch /nix/store/zn2h0kln2b02x4x6jqxymd4sg9cwvdsx-0001-x86-Add-a-GNU_PROPERTY_X86_ISA_1_USED-note-if-needed.patch
<clever> can't find file to patch at input line 82
<clever> 69 # un-break features so linking against musl doesn't produce crash-only binaries
<clever> i'm not musl, so i dont care! :D
<clever> configure is doing something...!
<Ericson2314> ;D
<clever> config.status: executing default commands
<clever> make[1]: Leaving directory '/build/source'
<clever> make: *** [Makefile:826: all] Error 2
<clever> make[1]: *** Waiting for unfinished jobs....
<clever> checking for suffix of executables... WARNING: `makeinfo' is missing on your system. You should only need it if
<clever> i did have to include texinfo when building binutils before
<clever> /nix/store/jy6zl5dkw5rcjczm1arjqxz95l9d40i7-binutils-2.31.1/bin/ld: /build/source/ld/./ldfile.c:248: undefined reference to `yylex'
<clever> Ericson2314: hmmm.....
<clever> /nix/store/jy6zl5dkw5rcjczm1arjqxz95l9d40i7-binutils-2.31.1/bin/ld: ldmain.o: in function `main':
<clever> /build/source/ld/./ldmain.c:191: multiple definition of `main'; ldlex-wrapper.o:/build/source/ld/./ldlex.c:1: first defined here
<Ericson2314> clever: oh shiiiit
<Ericson2314> i remember hitting this
<clever> Ericson2314: i think adding flex to nativeBuildInputs fixed it, now gcc is failing because it doesnt understand vc4
<Ericson2314> clever: ahhh so it wasn't a tarball so you didn't have autoconf and flex already run
<Ericson2314> changed the gcc source too?
<Ericson2314> error message?
<clever> fetchFromGitHub
<clever> checking target system type... Invalid configuration `vc4-elf': machine `vc4' not recognized
<clever> havent found the .nix for gcc yet
<Ericson2314> pkgs/development/compiler/gcc/.....
<clever> and then which ne within there, maybe 8/default
<clever> unpacking source archive /nix/store/zf1irnvz5ld3lacb8zd4907z83v6x48r-source
<clever> make: *** [Makefile:874: all] Error 2
<clever> g++: error: gengtype-lex.c: No such file or directory
<clever> Ericson2314: flex again?
<Ericson2314> clever: yeah
<Ericson2314> and maybe yacc too if you get one of those
<clever> 11 nativeBuildInputs = [ flex vc4-binutils ];
<clever> 12 buildInputs = [ gmp mpfr libmpc ];
<clever> the old drv didnt need any yacc shaving
<Ericson2314> hahaha
<clever> checking how to run the C preprocessor... /lib/cpp
<clever> configure: error: in `/build/build/vc4-elf/libgcc':
<clever> configure: error: C preprocessor "/lib/cpp" fails sanity check
<clever> Ericson2314: something borked gcc
<Ericson2314> which package?
<clever> builder for '/nix/store/fc3i34kp0zcfvi6g44m4kjihhsklbd5g-gcc-debug-8.3.0-vc4-elf-stage-final.drv' failed with exit code 2
<Ericson2314> it odes that when $CC fails
<Ericson2314> $CC -E sorry
<Ericson2314> oh nice you built sage static and stuff?
<clever> looks like it?
<clever> though i dont see that as an input to stage-final
<Ericson2314> it would be indirect vs newlib
<clever> i havent patched newlib's src yet
<Ericson2314> ah hmm
<Ericson2314> so look att libcCrossChooser
<clever> 11097 libcCrossChooser = name:
<clever> 11105 else if name == "newlib" && stdenv.targetPlatform.isVc4 then vc4-newlib
<Ericson2314> ok cool
michaelpj has quit [Quit: ZNC 1.7.4 -]
<Ericson2314> so try building
<Ericson2314> or whatever
<clever> [clever@amd-nixos:~/apps/nixpkgs-vc4]$ nix-build test.nix -A libcCross --option builders ''
<clever> this is what had failed
michaelpj has joined #nixos-dev
<clever> test.nix sets crossSystem
<Ericson2314> libcCross is kinda sketch
<Ericson2314> I forget if it works from there
<clever> [clever@amd-nixos:~/apps/nixpkgs-vc4]$ nix-build test.nix -A --option builders ''
<clever> /nix/store/p8m0aq6kdq8lkz3ssf5dhdf8qrd3cw5x-newlib-vc4
<clever> insta-pass
<Ericson2314> is -A buildPackages.libcCross the same derivation?
<Ericson2314> nice
<clever> [clever@amd-nixos:~/apps/nixpkgs-vc4]$ nix-build test.nix -A buildPackages.libcCross --option builders ''
<clever> /nix/store/p8m0aq6kdq8lkz3ssf5dhdf8qrd3cw5x-newlib-vc4
<clever> yep
<Ericson2314> ok cool
<Ericson2314> so you are really close :)
<Ericson2314> can you do keep failed when building ?
<Ericson2314> then when we get /lib/cpp
<Ericson2314> we can look at the failing configure test
<clever> [clever@amd-nixos:~/apps/nixpkgs-vc4]$ nix-shell -E 'with import ./test.nix; stdenv.mkDerivation { name = "foo"; }' --keep-failed
<clever> these derivations will be built:
<clever> /nix/store/fc3i34kp0zcfvi6g44m4kjihhsklbd5g-gcc-debug-8.3.0-vc4-elf-stage-final.drv
<clever> /nix/store/48wz40is2b29gfwhgrw7s5zn9qmm9wd5-vc4-elf-gcc-debug-wrapper-8.3.0-vc4-elf-stage-final.drv
<clever> configure: error: C preprocessor "/lib/cpp" fails sanity check
<clever> make[1]: *** [Makefile:11034: configure-target-libgcc] Error 1
<clever> See `config.log' for more details.
<clever> note: keeping build directory '/tmp/nix-build-gcc-debug-8.3.0-vc4-elf-stage-final.drv-0'
<clever> [root@amd-nixos:/tmp/nix-build-gcc-debug-8.3.0-vc4-elf-stage-final.drv-0]# find -name 'config.log' -print0 | xargs -0 ls -ltrh
<clever> -rw-r--r-- 1 nixbld1 nixbld 37K Nov 2 16:07 ./build/libcc1/config.log
<clever> -rw-r--r-- 1 nixbld1 nixbld 47K Nov 2 16:12 ./build/vc4-elf/libgcc/config.log
<clever> 745 /build/source/libgcc/configure: line 1474: /lib/cpp: No such file or directory
<clever> Ericson2314:
<Ericson2314> looking
Cale has quit [Ping timeout: 245 seconds]
<clever> /build/build/gcc/include-fixed/limits.h:168:61: error: no include path in which to search for limits.h
<clever> #include_next <limits.h> /* recurse down to the real one */
<clever> Ericson2314: i think its failing to find limits.h, and then tries the "next" cpp?
<clever> /nix/store/p8m0aq6kdq8lkz3ssf5dhdf8qrd3cw5x-newlib-vc4/vc4-elf/include/limits.h
<clever> might the non-standard prefix be why?
<Ericson2314> ahh also familiar
<clever> -idirafter /nix/store/p8m0aq6kdq8lkz3ssf5dhdf8qrd3cw5x-newlib-vc4/include
<clever> it does look like include path problems
gchristensen has quit [Quit: WeeChat 2.4]
{^_^} 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@'...
<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> [nix-shell:~/apps/nixpkgs-vc4]$ vc4-elf-ar -d libc.a lib_a-_Exit.o
<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
<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 ${}/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...
<clever> the simulator forces -lgloss -lc -lsim, and says that ram begins at 0
<clever> sram mode also does -lgloss -lc -lsim, ram at 0, but the ram is much much shorter (L1 sram cache)
<clever> and i think .text begins at 0x200 rather then 0
<clever> likely because the boot rom is using 0x000-0x1ff as internal state, as it reads bootcode.bin into the L1 cache
<clever> i think this will work, i just dont know the baud rate it will use...
<clever> Ericson2314: i think my next goal, is to get resim to build, so i can emulate the blobs
<clever> [clever@amd-nixos:~/apps/rpi/firmware/boot]$ /nix/store/rr7860kh97077r72mvrdlp8yp5yj7vnr-vc4-elf-binutils-2.31.1/bin/vc4-elf-objdump -b binary -D bootcode.bin -m vc4 | less
<clever> Ericson2314: and this generates assembly that looks right at a glance
<clever> i cant really tell what its doing, but i see addresses that look similar to physical mmio stuff
<Ericson2314> Great!!
<clever> i can also disassemble the hello.bin and hello.elf, and things are similar
<clever> obviously, one has symbol information
<clever> [clever@amd-nixos:~/apps/nixpkgs-vc4]$ ./resim/bin/vc4emul hello-sim/hello.bin 0 0
<clever> Hello world!
<clever> Ericson2314: and i can emulate the sim based blob!
<clever> [clever@amd-nixos:~/apps/nixpkgs-vc4]$ ./resim/bin/vc4emul -log hello-sram/hello.bin 0 512
<clever> Hello world!
<clever> Ericson2314: the linker script also reveals, that _start is at 0x200 when running on the real rpi, so i can also run the sram blob
<clever> which just gets stuck in an infinite loop, if using the official bootcode.bin
<clever> i think it was in a busy loop
<clever> 66b6: 21 a5 00 1f st r1,(r3++)
<clever> 66ba: f4 81 fe c0 addcmpbne r4,-1,0x0,0x66b6
<clever> Ericson2314: and now comes a fun game of guess that opcode!
<clever> where did i leave the scope lead...
<clever> scope confirms, 115200
<clever> with the official bootcode.bin, i get this upon powerup
<clever> Raspberry Pi Bootcode
<clever> Found SD card, config.txt = 0, start.elf = 0, recovery.elf = 0, timeout = 0
<clever> Ericson2314: it then enters an endless loop, trying to get ethernet online
<clever> sadly, no hello world on reset
pie_ has joined #nixos-dev
<clever> Ericson2314: aha, baud rate
<Ericson2314> :)
<infinisil> aanderse: Hey, got a minute regarding
<{^_^}> #67664 (by Infinisil, 9 weeks ago, open): Invidious: init
<clever> Ericson2314: i think the clock needs to be calibrated, it appears to be transmiting at 9000 baud
<aanderse> infinisil: sure
<infinisil> aanderse: So allow both unix auth and password auth is possible, but for password auth the user needs to set a password
<infinisil> And I don't want users to have to set a password if they only want to use the service/database locally
<infinisil> Ideal scenario is to just be able to set `services.invidious.enable = true` and it works
<Ericson2314> Clever this does make my windows cross seem not so bad :D
<infinisil> aanderse: Users should only need to set a db password if they need to access it from a non-local service
<infinisil> Does that make sense?
<aanderse> infinisil: yeah, i get it
<aanderse> seems reasonable
<infinisil> Do the options in also sound reasonable?
<clever> Ericson2314: currently, i cant decode what is coming out of the serial port, because my ftdi only goes to 4800 or 9600
<aanderse> so to be clear
<aanderse> insidious runs a backend server, but also a frontend server, the two being separate?
<infinisil> It's only a frontend server, which needs to connect to a postgres database
<infinisil> Erm
<infinisil> Well it's a web server thing, which serves a html frontend, but it runs a crystal backend
<infinisil> (which serves the html)
<infinisil> And the crystal part connects to the database
<aanderse> yeah, in my comment i said something about just provisioning remote users separately from the module
<aanderse> have users do that imperatively
<infinisil> The remote database?
<aanderse> then remote (with respect to the database) insidious instances can just fill out database.passwordFile,, etc...
<aanderse> ok, sec...
<infinisil> Not sure how that would work
<aanderse> that was what i was sorta thinking
<infinisil> Hmm, not really a fan of having to run imperative commands for that when it could be done declaratively
<aanderse> infinisil: in that case please review and comment :)
<{^_^}> #68353 (by Scriptkiddi, 7 weeks ago, open): nixos/mysql: add authentication option
<infinisil> Hm..
<gchristensen> blah
orivej has joined #nixos-dev
<gchristensen> tough nut
<Ericson2314> gchristensen I'll email everyone soon but you seen ?
<gchristensen> I hadn't
<gchristensen> hmm this is a tricky one
<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
<gchristensen> Ericson2314: thanks!
tilpner has quit [Quit: tilpner]
jonringer has quit [Ping timeout: 252 seconds]