<samueldr> so, yes, we can go with the usual u-boot without special configuration
cidkid has joined #nixos-aarch64
<mvnetbiz_> It makes sense to do it outside of nixpkgs I think but it seems like the module/configuratoin could be more in line with boot.loader.raspberryPi
<samueldr> boot.loader.raspberryPi is not used by our universal images
<mvnetbiz_> I guess you need to rewrite a significant amount of stage1 to do the boot selection with androids limits
<samueldr> in fact boot.loader.raspberryPi.uboot stuff is probably extremely confusing and should probably be dropped
<clever> samueldr: had a chance to look at my boot.loader.openpi.enable yet?
<samueldr> no
<samueldr> was I informed?
<clever> probably not
<clever> its open to improvements, right now its just enough to boot, with no rollbacks
cidkid1 has joined #nixos-aarch64
cidkid has quit [Ping timeout: 265 seconds]
cidkid1 has quit [Client Quit]
ryantrinkle has joined #nixos-aarch64
cidkid has joined #nixos-aarch64
cidkid has quit [Client Quit]
thefloweringash has joined #nixos-aarch64
<thefloweringash> Am I correct in understanding that we effectively lost armv7 native builds after the glibc bump due to the lack of sufficiently new bootstrap tools?
<samueldr> I don't know?
<samueldr> what makes you think that?
<samueldr> and what can be done to help?
<thefloweringash> I was trying to test an unrelated PR that touched bootstrap and my glibc-2.30 failed due to `These critical programs are missing or too old: compiler`
<thefloweringash> also comment on the thread: "Repeated note: 32-bit ARMs are quite certainly broken by this PR"
<samueldr> hmm
<samueldr> >> Regenerating bootstrap tools
<samueldr> I figure that's the solution
<thefloweringash> IIUC the requirement is for someone trusted to `nix-build pkgs/top-level/release.nix -Q -A stdenvBootstrapTools.${system}.dist` and put that on the tarball server
<samueldr> as a native build on the target arch, right?
<clever> i think both native and cross are valid, though i think native is prefered
<samueldr> so I imagine since we can boot a 19.09 native system we can do it
<mvnetbiz_> I wish there was i3wm on Windows
<thefloweringash> I can produce the tarball on my vm, or even on actual armv7 hardware (I found an unloved 8 core machine!), but I don't really want to inject myself into the trust chain if I can avoid it
<gchristensen> don't worry, you won't :P
<mvnetbiz_> lol
<samueldr> at the very worst, I figure clear instructions to reproduce your work would do
<gchristensen> +1
<clever> it could also be of use for several people to do the same steps, and then compare the hash of the product
<samueldr> (and be helpful for the next time)
<clever> then you can confirm its reproducible, and form trust without trust
<thefloweringash> I don't think the instructions can be much clearer than https://github.com/NixOS/nixpkgs/pull/66528#issuecomment-582351637
<thefloweringash> though release.nix doesn't list armv7l-linux as a supported system
<thefloweringash> I would be interested to learn how reproducible the bootstrap tarballs are
<clever> *** Can't find default configuration "arch/arm/configs/bcmrpi3_defconfig"!
<clever> weird, pkgs.linux_rpi3 doesnt build on this end
<clever> rpi2 still builds though
<thefloweringash> I made my tarball and set my hydra to build some packages. let's see how it goes
<thefloweringash> https://hydra.barbara.cons.org.nz/eval/2252 for those following along at home
<samueldr> I guess it doesn't serve ipv4
<mvnetbiz_> yeah
<mvnetbiz_> :( same
<samueldr> (spot the north americans)
<thefloweringash> yeah, ipv6 only sorry
<samueldr> my telco can't provide ipv6 on the telco lines they lease, since that bigger telco will use any non-competitive measures to make the smaller incumbents look bad :(
<thefloweringash> I've tried using cloudflare as a protocol converter but it immediately errors out with some certificate error that I didn't dig into
mvnetbiz_ has quit [Read error: Connection reset by peer]
<samueldr> last time I tried using an ipv6 tunnel from HE, it worked, but CDN services took a big hit
<samueldr> I'm no network nut, I guess an "ipv6 only if v4 can't work" would help, but I have no idea how to even approach this
<gchristensen> I'm not sure that is doable
<gchristensen> systems prefer ipv6 if ipv6 is available
<thefloweringash> there's a possible trick for that that I haven't tried yet
mvnetbiz_ has joined #nixos-aarch64
<thefloweringash> The Happy Eyeballs system is supposed to connect to ipv4 and ipv6 at once, and use whichever connects first. You could maybe use some packet mangling to delay ipv6 packets by a decent amount (~1s? ~200ms?) so that the ipv4 will always complete first, unless it never completes.
<gchristensen> wow :)
<mvnetbiz_> I had a 6to4 proxy before but I switched from OpenWrt to NixOS and haven't set it back up
<thefloweringash> oh uh, you'd probably only want to delay the connection handshake packets
<clever> [ 0.000000] Linux version 4.19.75 (nixbld@localhost) (gcc version 9.2.0 (GCC)) #1-NixOS SMP Thu Jan 1 00:00:01 UTC 1970
<clever> samueldr: the nix built kernel can start to boot!
<clever> it hangs, but thats still progress
<clever> [ 0.000000] cma: Reserved 8 MiB at 0x2f800000
<clever> ah, ive seen a hang here before
<mvnetbiz_> Are you testing that open firmware right now?
<clever> mvnetbiz_: yep
<clever> cma_declare_contiguous() is what prints that msg, and then it `return 0`'s, so whatever follows is to blame
<clever> kernel/dma/contiguous.c: ret = cma_declare_contiguous(base, size, limit, 0, 0, fixed,
<clever> dma_contiguous_early_fixup maybe?
<samueldr> weird, wondering what heuristic they use, use your own judgement :)
lordcirth_ has joined #nixos-aarch64
<mvnetbiz_> The hydra image from unstable doesn't boot.
<samueldr> on what?
<mvnetbiz_> raspberry pi 3
<samueldr> 3B or 3B+?
<samueldr> I think the 3B+ requires the new_kernel variant, not entirely positive
<samueldr> then, "doesn't boot" is a bit vague, what are you observing? what are you expecting? do you have serial?
lordcirth has quit [Ping timeout: 272 seconds]
<mvnetbiz_> I could get serial but I dont't have female jumper cablse
<mvnetbiz_> It gets the red power light but never blinks green, and no hdmi
<mvnetbiz_> I have another one that has some old nix on it but I can't remember the password or ssh key. anyways i'll figure it out.
<clever> mvnetbiz_: that sounds like the firmware isnt being found
<clever> mvnetbiz_: what does `fdisk -l /dev/sdX` report for that SD card?
<samueldr> >> The hydra image from unstable
<samueldr> just checking, you realized it's compressed? compared to 19.09
<mvnetbiz_> yeah # bunzip2.exe < ./nixos-sd-image-20.03pre212208.8130f3c1c2b-aarch64-linux.img.bz2 | dd of=/dev/sdc bs=1M
<mvnetbiz_> Is it my internet or is hydra being weird, when I click the download it doesn't start for a whole minute, but the download speed is fine
<mvnetbiz_> I think msys2 broke it i'll just do it again on linux
<clever> mvnetbiz_: that sounds normal for hydra, it may pre-download the entire thing to the hydra box, before sending you a copy
<lopsided98> The current armv5tel, armv6l and armv7l bootstrap tools are cross-compiled: https://github.com/NixOS/nixpkgs/commit/28f87e414186e2f16a094ac354dfe079965e8fe5
<mvnetbiz_> ls: reading directory '/run/media/matt/2178-694E/': Input/output error
<mvnetbiz_> total 9.5G
<mvnetbiz_> drwxr-xr-x 19459 matt users 4.0M Feb 15 2072 é░└
<mvnetbiz_> -r--r--r-- 1 matt users 227M Aug 3 2064 'ç.#á'$'\001'
<mvnetbiz_> drwxr-x---+ 4 root root 80 Feb 10 18:00 ..
<mvnetbiz_> drwxr-xr-x 82 matt users 16K Dec 31 1969 .
<mvnetbiz_> -r--r--r-- 1 matt users 2.7G Jan 2 2095 '╨'$'\020''é░└.'$'\026\027''ç'
<mvnetbiz_> -rw-r--r-- 1 matt users 36M Feb 15 2072 ''$'\004''⌐î'
<mvnetbiz_> -r--r--r-- 1 matt users 385M Dec 31 2100 ' µ.påa'
<mvnetbiz_> -rw-r--r-- 1 matt users 3.9G Dec 31 2105 'L▀2n.├'$'\030''r'
<mvnetbiz_> drwxr-xr-x 2 matt users 2.0K Feb 10 09:52 'System Volume Information'
<mvnetbiz_> -rw-r--r-- 1 matt users 2.4G Jan 5 2076 'P'$'\177''Bb'$'\022''jÆ'$'\036''.ä|ñ'
<mvnetbiz_> -rw-r--r-- 1 matt users 33M Jan 2 2028 σje└å-eΘ
<mvnetbiz_> oh shit
<mvnetbiz_> sorry!
<clever> mvnetbiz_: did you umount the disk before running dd?
h0m1 has quit [Ping timeout: 240 seconds]
h0m1 has joined #nixos-aarch64
lordcirth_ has quit [Remote host closed the connection]
<samueldr> lopsided98: good sleuthing, that helps
<lopsided98> The bootstrapTools job has been broken for more than a year (for example: https://hydra.nixos.org/job/nixpkgs/cross-trunk/bootstrapTools.armv7l.bootstrapTools)
<thefloweringash> the most recent failure is trying to run armv5 busybox?
<thefloweringash> oh, no, not armv5, just EABI5
<lopsided98> Actually that might be the wrong job, this looks like the right one: https://hydra.nixos.org/job/nixpkgs/cross-trunk/bootstrapTools.armv7l.bootstrapFiles.bootstrapTools
<lopsided98> The exec format error is because the x86_64 builder is trying to run the cross-compiled busybox, but that job doesn't really matter for our purposes
<thefloweringash> hmm, it's failing pretty early on building expand-response-params, "ld: cannot find -lssp_nonshared" and "cannot find -lssp"
* thefloweringash checks cross on master
cidkid has joined #nixos-aarch64
lopsided98 has quit [Quit: Disconnected]
lopsided98 has joined #nixos-aarch64
cidkid has quit [Quit: Leaving.]
cidkid has joined #nixos-aarch64
cidkid has quit [Client Quit]
cidkid has joined #nixos-aarch64
cidkid has quit [Client Quit]
cidkid has joined #nixos-aarch64
cidkid has quit [Client Quit]
cidkid has joined #nixos-aarch64
cidkid has quit [Client Quit]
cidkid has joined #nixos-aarch64
cidkid has quit [Client Quit]
<lopsided98> thefloweringash: are you using native or cross bootstrap tools?
<thefloweringash> I took the cross ones from hydra
<thefloweringash> the native ones I built seemed to work, but that's not easily upstreamable
<thefloweringash> if I can point someone at hydra and say "copy this to tarballs and update the pointer" then it's a lot more convenient
auchter has joined #nixos-aarch64
<lopsided98> I created a draft PR: https://github.com/NixOS/nixpkgs/pull/79793
<{^_^}> #79793 (by lopsided98, 1 minute ago, open): stdenv: update ARM bootstrap tarballs
orivej has quit [Ping timeout: 268 seconds]
orivej has joined #nixos-aarch64
orivej has quit [Ping timeout: 268 seconds]
lovesegfault has joined #nixos-aarch64
zupo has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zupo has joined #nixos-aarch64
makefu has quit [Quit: WeeChat 2.6]
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lopsided98 has quit [Quit: No Ping reply in 180 seconds.]
lopsided98 has joined #nixos-aarch64
<thefloweringash> oh wow, 5.6 will have support for the solidrun honeycomb / clearfog!
<thefloweringash> samueldr: I found an old android device! well, a friend wasn't using it and volunteered it for the cause
orivej has joined #nixos-aarch64
makefu has joined #nixos-aarch64
FRidh2 has joined #nixos-aarch64
replikvlt has joined #nixos-aarch64
<replikvlt> hello
<replikvlt> i'm trying to install nixos on raspberry pi 3B and have faced such confusion
<replikvlt> the page about Nixos on ARM is telling that upon boot, i would have to be faced with a root prompt, but instead i was met with a nixos user prompt `nixos@nixos $:`
<srk> hi
<srk> that was the case before, now even in normal installer you need su - / sudo su -
<replikvlt> su -?
<srk> yes that's the command that will give you root prompt
<replikvlt> it asks for a password
<simpson> srk, replikvlt: Probably $(sudo -i) instead.
<replikvlt> oh, umm the second one worked `sudo su -`
<replikvlt> thanks
tilpner_ is now known as tilpner
replikvlt has quit [Remote host closed the connection]
ryantrinkle has quit [Ping timeout: 240 seconds]
wavirc22 has quit [Ping timeout: 272 seconds]
wavirc22 has joined #nixos-aarch64
zupo has joined #nixos-aarch64
ryantrinkle has joined #nixos-aarch64
wavirc22 has quit [Ping timeout: 246 seconds]
samrose has quit [Quit: Konversation terminated!]
DigitalKiwi has quit [Quit: quite.]
wavirc22 has joined #nixos-aarch64
DigitalKiwi has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zupo has joined #nixos-aarch64
wavirc22 has quit [Ping timeout: 265 seconds]
wavirc22 has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<srk> clever: if you need to inspect rpi registers you can try https://github.com/distrap/hgdb with svd from https://github.com/sorki/bcm2svd
<srk> haven't tested myself but it should work unless there's some endiannes bug
<srk> need to setup jtag. I only have one pi2, guess I'll use it as openocd host and pi0 or pi1 as a target
<clever> srk: ive got openocd working with a pi4 as the adapter, and pi2/pi3 as the target
<srk> yeah, I only have one pi2 on hand atm
<clever> srk: i have just been mmaping /dev/mem or /dev/vc-mem to peek at the registers
<clever> but for an unknown reason, that fails on my custom firmware
<clever> the DT or firmware drives must be doing something weird, to map things into ram
<srk> I see, I thought that you can do something like gdb /dev/mem but that doesn't seem to be the case
<clever> /dev/mem is the raw physical memory, your thinking of /dev/kcore which dynamically generates a coredump containing all ram, which gdb can then open
<srk> might implement some stub acting as gdb target so at least x works with /dev/mem
<srk> that kcore would be huuge :D
<srk> but good to know
<clever> kcore is generated dynamically
<clever> based on the offset you try to read, it either uses a static struct, or reads the right page of ram
<srk> ah, good
<srk> that should work with hgdb as well then
<srk> hm but what you use as gdb image in that case?
<clever> normally, the vmlinux elf file
<srk> would that include bcm registers as well?
<clever> not in the vmlinux itself
<clever> not sure if kcore would include that or not
<srk> right
<srk> lemme check how to hook up jtag between these two
<clever> 7 the following gpio must be in alt4 mode
<clever> 11 26 TDI
<clever> 10 25 TCK
<clever> 9 24 TDO
<clever> 8 22 TRST
<clever> 12 27 TMS
<clever> srk: thats for the target side, line-number(ignore), bcm pin number, function
<clever> 45 2020-02-04 17:59:44 <@clever_> sysfsgpio_jtag_nums 11 25 10 9
<clever> 46 2020-02-04 17:59:44 <@clever_> sysfsgpio_trst_num 7
<clever> 48 2020-02-04 18:02:15 <@clever_> tck=11, tms=25, tdi=10, tdo=9, trst=7
<clever> and thats for the sysfsgpio config for the openocd adapter
<clever> 1 `enable_jtag_gpio=1` in `config.txt` configures the stock firmware to allow arm jtag
<srk> thanks!
<clever> srk: ive mostly just been writing custom utils, to decode all registers, but it also does stuff like pll math
<srk> it would be better for now if I could use pi0 as openocd host and pi2 as target but not sure if I can get recent openocd for pi0 which now runs Dezgeg old image
<srk> maybe crosscompiling with correct nixpkgs vers
<clever> the openocd in nixpkgs is too old, you need master
<clever> and it failed to cross-compile for me
<srk> right, will be fun with pi0 as a target anyway, no need to reproduce your work with pi2 I guess
<srk> until I get one more pi2/pi3
<samueldr> thefloweringash: how old? and nice!
<samueldr> if you need help, tips, do ask
lovesegfault has quit [Quit: WeeChat 2.7]
wavirc22 has quit [Ping timeout: 272 seconds]
ryantrinkle has quit [Ping timeout: 260 seconds]
zupo has joined #nixos-aarch64
replikvlt has joined #nixos-aarch64
<replikvlt> hello i'm here again, i'm sorry for bothering, but my raspberry pi 3B refuses to connect to the ethernet, not even lights on port light up
<replikvlt> i used mostly config from the page, but added: enabled openssh service, networking.useDHCP = false, and for eth0 as well as wlan0 useDHCP = true;
<replikvlt> could this be because of enabling wireless? i also trid to replicate my desktop and add networkmanager but nixos-rebuild said that networkmanager can't be enabled in combination with wireless
<srk> how old image is that? which kernel?
<replikvlt> image flashed today, nixos-rebuild installed 4.19 kernel ,but for some reason after rebuild during boot is showed that iirc 5.4 was used
<replikvlt> sorry i just don't know if this is the right place to ask also
<replikvlt> maybe i should use other more related room
<srk> not sure either, I've heard similar reports with older images but if you have recent kernel and firmware you should be good
<replikvlt> yes i did enableRedistributableFirmware as the NixOS on ARM/Raspberry Pi page suggested
<srk> I think that's something different, rpi uses first partition with firmware files
<srk> so, how old is the image? :)
<samueldr> enableRedistributableFirmware is unrelated to the "firmware" partition
<samueldr> the firmware partition holds what I would describe as the "bios and bootloader pair"
<samueldr> redistributable firmware is for things like wireless blobs that needs to be uploaded to the misc. devices for them to work
<srk> yup
<srk> guess there's no easy way to do that automatically
<srk> yet
<samueldr> it shouldn't matter for this issue, unless I'm mistaken
<samueldr> I think u-boot is pretty stable and even an older one on a 3B (non-plus) would work fine to load any kernels 4.9+
<replikvlt> srk i used the one from here, which says 1d ago https://hydra.nixos.org/job/nixos/release-19.09/nixos.sd_image.aarch64-linux
<srk> ah, ok, nvm
<samueldr> replikvlt: do you have HDMI+keyboard or serial access?
<replikvlt> nope
<samueldr> if so, can you tell if the interface is present?
<samueldr> ah, that makes it harder to debug stuff :(
<srk> or even paste dmesg
<srk> /o\
<replikvlt> i mean i could unplug it from the "rack" but then i wouldn't have wired internet
<samueldr> >> networking.useDHCP = false, and for eth0 as well as wlan0 useDHCP = true;
<samueldr> wouldn't that make it so it won't ask for an address on wired?
<samueldr> hm, might be misreading
<samueldr> eth0 is useDHCP true or false?
<samueldr> also, is it eth0 or does it have another name?
<samueldr> (I don't know)
<replikvlt> eth0 is the name and it is true
<replikvlt> i set it so because i were running quite a while back and forth, because i were hoping ssh works out of box and that i could edit configuration. nix and install it through ssh but that wwas not the case so i had to get it unplugged and use kbd screen and mobile internet (mobile as modem) to build first nixos
<replikvlt> and i hoped it would work (i stole it from my current llaptop nixos install)
<replikvlt> like, i thought it was not given ip by the router, because it's ip didn't show up in luci (openwrt router)
<replikvlt> so i enabled dhcp just to be sure
<srk> dhcp works by default
<replikvlt> okay, i will try to somehow got the setup both connected to keyboard/screen and with ethernet plugged in and test
<replikvlt> thanks for help
replikvlt has quit [Remote host closed the connection]
FRidh2 has quit [Quit: Konversation terminated!]
zupo has quit [Ping timeout: 240 seconds]
zupo has joined #nixos-aarch64
ryantrinkle has joined #nixos-aarch64
<gchristensen> ,stty
<{^_^}> echo "stty rows $(tput lines) cols $(tput cols)"
<gchristensen> <3 samueldr
<{^_^}> samueldr's karma got increased to 164
<samueldr> is it wrong that I dislike writing C so much that I prefer yak shaving my way into a tooling that can safely generate the C code for me?
<gchristensen> nice
<samueldr> (the answer is: no)
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tilpner has quit [Read error: Connection reset by peer]
tilpner_ has joined #nixos-aarch64