orivej has quit [Ping timeout: 276 seconds]
<clever> flokli: this goes into full detail, and links to source in the linux tree that implements it
minicom has quit [Quit: Ping timeout (120 seconds)]
minicom has joined #nixos-aarch64
<flokli> clever: will give that a read, thanks :-)
<lovesegfault> clever: Can you take a quick look at https://github.com/NixOS/nixpkgs/pull/75592
<{^_^}> #75592 (by lovesegfault, 15 hours ago, open): nixos: compress make-ext4-fs with zstd
<lovesegfault> samueldr: reviewed it, but I just want to make sure it's ready to go
<lovesegfault> I need an unstable release to get my thunderbird rewrite
<clever> This could be fixed by adding a compressed ? false param to the builder. the main difference would be that bzip2 invocation is not used, but rather a cp.
<clever>  2
<clever> lovesegfault: that comment, is why i had support for a "cat" compression in make-system-tarball, as far as i remember
<lovesegfault> not sure what that was meant to be
<lovesegfault> damn unicode
<lovesegfault> And yeah, a cat compression would've been nice
<clever> lovesegfault: it renders just as broken here, its the thumbs-up from github
<clever> copied it by mistake
<lovesegfault> Ah :P
<lovesegfault> 👍
<lovesegfault> There ya go
<clever> also broken
<samueldr> hmmm, I don't think it's an issue, but zstd is garbling the log output a bit
<samueldr> (look at nix log to see the rewriting it does)
<clever> its using \r?
<samueldr> ^M
<clever> i think thats another way to render \r's
<samueldr> (so, I think yeah)
<lovesegfault> Yeah
<lovesegfault> let me see the manpage for a dumber output
<clever> |cat might be enough
<lovesegfault> --no-progress
<clever> newer versions of nix create a pty inside the builder
<lovesegfault> changing
<clever> which enables such output
<lovesegfault> Pushed
<samueldr> building again, just to be 100% sure :)
<clever> i have an rpi3 to spare, so i could build the resulting sdimage
<clever> and boot it
<lovesegfault> samueldr: Me too :D
<lovesegfault> clever: That would rock, just to be 100%
<lovesegfault> My RPi is at home
<clever> [clever@system76:~/nixpkgs]$ git fetch origin pull/head/75592
<clever> hmmm, typo somewhere there
<clever> [clever@system76:~/nixpkgs]$ git fetch origin pull/75592/head
<clever> ah, thats the one
<clever> so close!
<clever> [clever@system76:~/nixpkgs]$ git checkout FETCH_HEAD
<clever> github creates special invisible branches for every pr, so you can fetch the tip of a pr, without having to care where it came from
<clever> [clever@system76:~/nixpkgs]$ nix-build nixos/release.nix -A sd_image.aarch64-linux -Q -o aarch64-image
<flokli> clever: nice, feels like Gerrit. Didn't knew, thanks
<clever> samueldr: can that one boot on an rpi?
<samueldr> clever: yes
<clever> perfect
<samueldr> 3
<samueldr> it won't a 4
<clever> thats what sd_image_raspberrypi4 is for
<clever> but my 4 is still in the mail
<samueldr> that's a reason I want to delete sd_image_raspberrypi4 ASAP
<samueldr> it shouldn't be needed :(
<clever> samueldr: why do they differ?
<samueldr> because mainline doesn't support the misc. stuff the rpi foundation did
<clever> samueldr: ah, you need the linux fork again?
<samueldr> yes
<clever> samueldr: one minute
<samueldr> mainline is deciding how to best support the "crap" they did :/
<clever> for the pi 1-3, the linux kernel had to talk to the firmare, and relied on the firmware heavily
<clever> which is messy, and i dont know how that got into mainline
<samueldr> I'm glad I tried the SDL2 stuff outright before starting to use my mruby build harness, since that harness is lacking stuff I didn't know I needed :)
<clever> for the rpi4, they properly added all of the graphics pipeline to the linux kernel, and mostly disabled it in the firmware
<clever> so you need the special kernel, in the default config
<clever> where is that flag...
<samueldr> that's not even the issue AFAIK
<samueldr> the main issue they have right now is the way DMA is done IIRC
<clever> there are ~16 dma engines in the hardware
<clever> the firmware will reserve some for itself
<clever> and then tell linux which ones linux can use, via the cmdline, and also over a mailbox api
<samueldr> I don't have the thread handy, but IIRC there is literally bugs in their implementation with regards to 32 vs 64 bits
<clever> ah yeah
<clever> only some of the dma engines are 64bit capable
<clever> one sec
<samueldr> and those issues are what they need to handle, and somewhat reluctantly fix in kernel
<clever> dma channels 11-14 are newer 40bit capable ones
<clever> the rest are i think are all 32bit
<samueldr> I'm thinking (haven't searched for the kernel mailing list thread) that the issue was that it broke memory over 3GB
<samueldr> or something along the line
<clever> and the vpu itself can only access the lowest 1gig of ram (3d rendering, framebuffers)
<clever> yeah, any memory past the 1gig point, is only accessible to the arm, and the 4 new dma engines
<clever> from what ive learned
<clever> samueldr: there is also a flag somewhere (cant find it), that reverts the behaviour to that of an rpi 1/2/3
<clever> where start.elf handles the gfx pipeline, and linux takes the back seat
<clever> i suspect mainstream lacks the code requires to actually drive the gfx pipeline
<clever> mainline*
<clever> samueldr: there is also a hack, that is a little anti-nixos-ish
<samueldr> we're using them already I think
<samueldr> or if we're not, we'll be for the rpi4
<clever> samueldr: if you just put 2 kernels in /boot/, and add the right entries to config.txt, the bootloader will pick the right one, based on the model
<samueldr> that's how we'll have both u-boots for rpi3 and 4 in there
<clever> ah
<clever> samueldr: there is also another thing...
<{^_^}> raspberrypi/firmware#1291 (by colerd24, 2 weeks ago, open): Add ability to combine conditional filters of the same type in config.txt
<clever> samueldr: you can use gpio pins to control which config.txt block you execute
<samueldr> or the screen
<clever> that issue, is about using multiple pins at once
<samueldr> but those are not really useful to us :)
<clever> this can even change the path to start.elf
<clever> which can then...
<clever> where did that issue go
<{^_^}> raspberrypi/firmware#1076 (by ali1234, 1 year ago, closed): start_file doesn't work inside config.txt filters
<clever> samueldr: there!, this lets you execute msd.elf if you hold a button on a gpio pin
<clever> that results in the pi having an identity crisis, and it will think its a usb stick!
<clever> plug the usb-c of an rpi4 into a pc, and you can then see the entire SD card!
<samueldr> hmmm, wondering if u-boot can trivially detect that it's plugged to a computer
<clever> wont work on the b models from 1-3, since a usb hub is in the way
<samueldr> (for the 4)
<clever> for the rpi4, all you need to do is activate usb gadget mode in the controller
<samueldr> it would be nice to automatically go into msd mode if plugged to a computer, but not into power
<clever> you might also be able to query the otg_id pin
<clever> before you bring the usb block online
<clever> do you have the gpio CLI tool?
<clever> on a pi4
<clever> hmmmm, otg_id isnt present on usb-c?
<clever> but pd_sense is there
<clever> pd_sense is wired directly to an adc pin on the power management ic
<clever> i suspect you need to use i2c to talk to the pmic
<clever> but just spinning up the entire usb core, and shouting for a master to enslave you might be simpler, lol
<clever> secondary problem, is that u-boot cant execute msd.elf, thats too late in the boot process
<clever> so u-boot would have to re-implement the msd gadget
<samueldr> u-boot has its own gadget stuff
<samueldr> already
<clever> ah
<samueldr> it even has a really useful fastboot implementation
<samueldr> so you can e.g. fastboot boot some-image.img
<clever> there is something else ive been looking into
<lovesegfault> clever: So it worked?
<samueldr> and it'll write it to the partition you configured
<clever> lovesegfault: building '/nix/store/12mdm6v1pvl87g0jl91qga8r2jvsjxis-user-units.drv'...
<samueldr> oops fastboot flash
<samueldr> but it does also have fastboot boot
<samueldr> so you can boot a kernel without having it on the device!
<lovesegfault> clever: :rocket:
<clever> samueldr: this is a special serial protocol, meant for use with flashrom, to expose an SPI bus or more generic flash memory
<clever> samueldr: i have plans to write a vc4 binary, that implements the above, and exposes the boot eeprom
<clever> samueldr: but, i could also see value in u-boot's fastboot layer supporting it
<clever> serprog only supports a single chip, because its meant for extenal programmers with a socket or chip-clip
<clever> but the rpi has 2 eeprom's
<clever> samueldr: it seems trivial enough, to configure fastboot to understand "boot-spi" and "vl805" as seperate targets, would you agree?
<lovesegfault> How are trunk-combined builds kicked off? https://hydra.nixos.org/job/nixos/trunk-combined/tested#tabs-constituents
<clever> lovesegfault: check the configuration tab
<lovesegfault> I hope the next one comes after the fix is merged
<samueldr> lovesegfault: timed
<clever> lovesegfault: every 86400 seconds (24 hours) it will query the default branch of nixpkgs, and build whatever nixos/release-combined.nix says to build
<clever> samueldr: https://github.com/raspberrypi/usbboot can be used to push over the serprog firmware i have planned (and its been reported to work on a 4 already)
<clever> my initial plan, is to use usbboot to push over a serprog firmware, that talks over the uart
<clever> but long-term, it should advertise a usb serial gadget
<lovesegfault> samueldr: thanks for the approval :)
<lovesegfault> clever: I see
<lovesegfault> I was amazed by how long the chromium build too
<lovesegfault> *took
<clever> my build hung, restarted it
<clever> ah, it was building a kernel, oops
<lovesegfault> lol
<lovesegfault> clever: Are you using the community box?
<clever> qemu-user-aarch64
<clever> i dont have my builder ssh keys on the community box
<clever> only my personal key, which has a passphrase
<lovesegfault> clever: Oh, I can send you a built img if you want?
<lovesegfault> Or you can get it from the box
<clever> sure, whats the storepath?
<clever> oh, i probably already have it
<lovesegfault> One second
<clever> [clever@system76:~]$ nix-store -q --binding out /nix/store/l61glrhdy6jx310wl41kxnqlqvhk4v4b-nixos-sd-image-20.03pre130979.gfedcba-aarch64-linux.img.drv
<clever> /nix/store/nzh2jnlzdw3ls90hrpwi1q42sa0blsv7-nixos-sd-image-20.03pre130979.gfedcba-aarch64-linux.img
<lovesegfault> /nix/store/4ivccir8ahf0cynb1cky651iryv3j1mn-nixos-sd-image-20.03.git.70c5a78-aarch64-linux.img
<lovesegfault> Oh, mine is different
<clever> out git revs dont agree
<clever> [clever@system76:~/nixpkgs]$ nix-build nixos/release.nix -A sd_image.aarch64-linux -Q -o aarch64-image
<clever> lovesegfault: can you try this cmd?
<clever> Changes not staged for commit:
<clever> modified: pkgs/os-specific/linux/kernel/manual-config.nix
<clever> wait, what?
<clever> my fault, rpi firmware stuff, lol
<lovesegfault> That wasn't me :P
<lovesegfault> Heh
<lovesegfault> I ran your command
<lovesegfault> it's doing stuff
<clever> copying path '/nix/store/p58wc6gjk5zklv6zv1lhawbillv1cf84-linux-4.19.88' from 'http://nas.localnet:8081'...
<clever> thats better
<clever> hydra already built this kernel
<lovesegfault> Awesome
<clever> building '/nix/store/3zgw70kngz0dlgr9b9nh53wlwdndv6js-ext4-fs.img.zst.drv'...
<clever> its now compressing, under qemu-user, lol
<lovesegfault> LOL
<lovesegfault> Mine is copying the zst
<clever> resize2fs temp.img -f 532201
<clever> zstd is using 104% cpu
<lovesegfault> clever: wat
<lovesegfault> Woah
<clever> yes
<lovesegfault> /nix/store/yw9a7zz6j7bc1jxjc65xy5xbvw5kvf61-nixos-sd-image-20.03pre130979.gfedcba-aarch64-linux.img
<lovesegfault> How is that legal
<clever> /nix/store/hiv9jb4dyyz8g53iy5f36yni33n45c2b-nixos-sd-image-20.03pre130979.gfedcba-aarch64-linux.img
<clever> my build also finished
<clever> diff hash, but should be fine
<clever> give me a min to burn it...
<lovesegfault> Wooohoo
<clever> [root@system76:~]# dd if=/nix/store/hiv9jb4dyyz8g53iy5f36yni33n45c2b-nixos-sd-image-20.03pre130979.gfedcba-aarch64-linux.img/sd-image/nixos-sd-image-20.03pre130979.gfedcba-aarch64-linux.img.bz2 of=/dev/mmcblk0 bs=512
<lovesegfault> Nice
lovesegfault has quit [Quit: WeeChat 2.6]
lovesegfault has joined #nixos-aarch64
<lovesegfault> Damn computer
<clever> 630005966 bytes (630 MB, 601 MiB) copied, 130.834 s, 4.8 MB/s
<clever> *doh*
<clever> i didnt uncompress :P
<clever> [root@system76:~]# cat /nix/store/hiv9jb4dyyz8g53iy5f36yni33n45c2b-nixos-sd-image-20.03pre130979.gfedcba-aarch64-linux.img/sd-image/nixos-sd-image-20.03pre130979.gfedcba-aarch64-linux.img.bz2 | bunzip2 > /dev/mmcblk0
<lovesegfault> Sounds good so far
lovesegfault has quit [Remote host closed the connection]
lovesegfault has joined #nixos-aarch64
lovesegfault has quit [Client Quit]
lovesegfault has joined #nixos-aarch64
<lovesegfault> Goddamn internet
<lovesegfault> clever: Is it booting?
<clever> MMC: mmc@7e202000: 0, sdhci@7e300000: 1
<clever> starting USB...
<clever> Bus usb@7e980000: scanning bus usb@7e980000 for devices... 3 USB Device(s) found
<clever> Retrieving file: /boot/extlinux/../nixos/4bv6fasgpvbzs1r05q86zd2h6zh65myn-initrd-linux-4.19.88-initrd
<clever> Starting kernel ...
<clever> then silence on the uart due to no console=
<clever> i see nixos booting on hdmi
<lovesegfault> YAAAAAS
<{^_^}> #75592 (by lovesegfault, 18 hours ago, open): nixos: compress make-ext4-fs with zstd
<lovesegfault> ship it! :P
<clever> lovesegfault: good news and bad news!
<clever> good news, it boots to a login prompt!
<clever> bad news, i dont have a keyboard or mouse hooked up, and uart console is disabled
<samueldr> it's good then, that's not something that needs to be tested :)
<lovesegfault> if it boots it works :P
<clever> samueldr: i also saw a bunch of nameservice failures from systemd
<lovesegfault> nameservice? That sounds unrelated?
<clever> probably
<clever> cant debug without the uart
<samueldr> that's 100% surely unrelated, though it's been a small while I have booted an sd image
lovesegfault has quit [Ping timeout: 240 seconds]
h0m1 has quit [Ping timeout: 276 seconds]
h0m1 has joined #nixos-aarch64
mla has quit [Remote host closed the connection]
mla has joined #nixos-aarch64
mla has quit [Client Quit]
orivej has joined #nixos-aarch64
exarkun has quit [Excess Flood]
exarkun has joined #nixos-aarch64
mla has joined #nixos-aarch64
lovesegfault has joined #nixos-aarch64
ryantrinkle has joined #nixos-aarch64
DigitalKiwi has quit [Quit: quite.]
wavirc22 has joined #nixos-aarch64
DigitalKiwi has joined #nixos-aarch64
wavirc22 has quit [Quit: wavirc22]
DigitalKiwi has quit [Quit: quite.]
DigitalKiwi has joined #nixos-aarch64
wavirc22 has joined #nixos-aarch64
orivej has quit [Ping timeout: 268 seconds]
wavirc22 has quit [Quit: wavirc22]
wavirc22 has joined #nixos-aarch64
wavirc22 has quit [Quit: wavirc22]
wavirc22 has joined #nixos-aarch64
wavirc22 has quit [Quit: wavirc22]
wavirc22 has joined #nixos-aarch64
tilpner has joined #nixos-aarch64
tilpner has quit [Remote host closed the connection]
tilpner has joined #nixos-aarch64
orivej has joined #nixos-aarch64
wavirc22 has quit [Read error: Connection reset by peer]
orivej has quit [Ping timeout: 252 seconds]
orivej has joined #nixos-aarch64
orivej has quit [Ping timeout: 250 seconds]
orivej has joined #nixos-aarch64
orivej has quit [Ping timeout: 240 seconds]
lovesegfault has quit [Ping timeout: 246 seconds]
orivej has joined #nixos-aarch64
betaboon has joined #nixos-aarch64
ToxicFrog has quit [Ping timeout: 265 seconds]
ToxicFrog has joined #nixos-aarch64
ryantrinkle has quit [Ping timeout: 268 seconds]
ryantrinkle has joined #nixos-aarch64
lordcirth has joined #nixos-aarch64
lordcirth has quit [Client Quit]
lordcirth_ has joined #nixos-aarch64
zarel has quit [Quit: ZNC 1.7.4 - https://znc.in]
zarel 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
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zupo has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zupo has joined #nixos-aarch64
zupo has quit [Client Quit]
zupo has joined #nixos-aarch64
zupo has quit [Ping timeout: 240 seconds]
zupo has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zupo has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zupo has joined #nixos-aarch64
lovesegfault has joined #nixos-aarch64
lovesegfault has quit [Ping timeout: 276 seconds]
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zupo has joined #nixos-aarch64
<ryantrinkle> does anyone know how to cross-compile a nixos system for aarch64 from an x86? specifically pine64's a64-lts (allwinner A64)
<ryantrinkle> but if i'm reading that correctly, it's all non-cross-based
<samueldr> using 19.09 should work
<samueldr> you'll still need to burn u-boot to it
<samueldr> though, is there a reason you want to cross-compile?
<samueldr> it should be pretty well supported using the existing sd image
<samueldr> meanwhile cross-compilation is uh... not trivial
<ryantrinkle> samueldr: mostly i want to fish out the bugs in cross-compilation :)
<samueldr> good idea then :)
<samueldr> in my experience there is no need to target a specific board when they're well supported enough with mainline and u-boot
<ryantrinkle> Ericson2314 wrote a lot of that stuff for my company (Obsidian) so we could ship iOS and Android apps written in Haskell
<ryantrinkle> it would be very cool to expand that to other areas
<samueldr> I sure would like it if there were fewer issues with some of the deeper nixpkgs stuff :D
<samueldr> I'm currently working on static+cross for mobile nixos stuff
<ryantrinkle> samueldr: that makes sense; i'm very new to this kind of stuff myself
<ryantrinkle> samueldr: nice :) are you thinking about the pinephone?
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<samueldr> I have the devkit, but I have shifted priorities around for more android-based hardware stuff before since external contributors already are coming in
<samueldr> I would have liked to cross-compile rust stuff, but faced issues out of my league for now
<ryantrinkle> ah, i see
<samueldr> I have to implement software for stage-1, and don't want to write C/C++ things
<samueldr> ash (busybox) is not really a solution either
<ryantrinkle> ah yeah; i did some stuff a while back to try to kerberize the NFS network boot in stage-1
<ryantrinkle> i got it working, but it was very painful
<samueldr> ah, mobile nixos's stage-1
<samueldr> which is different from nixos's stage-1
<ryantrinkle> oh, i see
<ryantrinkle> lower-level, i guess?
<samueldr> not really
<samueldr> the main difference really is you're more constrained, and that there's a goal that stage-1 for mobile nixos MUST cross-compile
<samueldr> stage-1 in mobile nixos is just like in nixos, an initramfs started from the kernel
<ryantrinkle> ahhh yeah, that makes sense
<ryantrinkle> one of the reasons for cross-compiling is that i'd really like to not (as a general rule) build stuff on phones and other small devices
<ryantrinkle> and so it'd be nice to have hydra or some other CI sitting there making sure stuff is prebuilt
<samueldr> the main issue in that situation is that you won't be able to make use of the cache :/
<ryantrinkle> yeah, because the caches are different?
<ryantrinkle> er,
<ryantrinkle> hashse
<samueldr> different inputs, so yeah
<ryantrinkle> yeah, that makes sense - although i could perhaps have an x86 build remote, and then just tell the phone it's cross-compiling, couldn't i?
<samueldr> that's why I don't aim to have stage-2 cross-compiled
<samueldr> you could yes
<samueldr> btw, not saying it's not a good idea, but stating the drawbacks :)
<ryantrinkle> perhaps someday we'll have bit-identical cross-compiles and then we can make the builder system an impure input ;)
<samueldr> that would be the dream
<ryantrinkle> yeah, much appreciated! i've just started looking at this stuff, so i'm really trying to come up to speed more than anything else
<samueldr> I *think* CAS would be used in that case
<samueldr> and I'm not an expert with cross-compilation, I mostly manage to do most things
<ryantrinkle> CAS = content-addressable store?
<samueldr> yeah
<ryantrinkle> yeah, that would help a lot with this sort of stuff
<samueldr> I think that, with a CAS, and a binary identical output, the leaves that are all using the same CAS inputs would be the same, whether cross-compiled or not
<ryantrinkle> so you're working on android support? is there a specific goal you're working towards based on that?
<samueldr> not android support, linux glibc standard support
<samueldr> but running on android-based hardware
<ryantrinkle> ahhh, interesting! i didn't realize android-based hardware could even plausibly run nixos
<samueldr> it can!
<samueldr> stage-2 for mobile nixos is a bog standard stage-2 (with few hacks that are not really android-based hardware specific)
<ryantrinkle> woah, that's awesome
<ryantrinkle> would it be helpful to your efforts if I got one of these and tried to use it as my daily driver?
<ryantrinkle> (don't worry, i won't blame you if it fucks up :P)
<samueldr> when usable, sure, it's always helpful
<samueldr> heck, I want it to be used by every nixos users out here :)
<ryantrinkle> yeah, me too! i'm interested in privacy/security/etc. but one of the most exciting aspects from my perspective is just being able to manage it the same way I manage all my other machines
<ryantrinkle> which device is the closest to working, currently?
<samueldr> all android-based devices listed on that page have the same support
<ryantrinkle> oh ok, cool
<samueldr> and there's still an unknown about interfacing with the RIL
<samueldr> (for phone calls, sms and data through cellular)
<samueldr> wi-fi support will differ depending on the "vintage" of the hardware
<samueldr> but AFAICT it's all doable, it just needs to be done
<ryantrinkle> right; i wonder if any of the work Manjaro and the other folks are doing on the pinephone will be carry over
<ryantrinkle> are there any installation instructions available yet?
<samueldr> they produce images that can be burned
<samueldr> and the pinephone is way different from the android-based devices
<samueldr> that's not really an unknown for cellular
<samueldr> as long as one of those linux distros get it working, it's going to work for us
<ryantrinkle> ahh, ok
orivej has quit [Ping timeout: 240 seconds]
lovesegfault has joined #nixos-aarch64
<lovesegfault> samueldr: Looks like that fix did it :)
<mla> does anyone know if the rockpro64 will boot with the aarch64 images produced by hydra (default kernel) these days? i know i need to overlay uboot, but is setup just download aarch64, dd the image, then dd uboot?
<samueldr> not sure, I know some work has happened recently so that upstream mainline u-boot is built
<mla> i see so potentially wiki is out of date, rockpro64 page says it uses upstream uboot and you need to dd it
<samueldr> >> Note: Prior to NixOS 20.03, a downstream version of U-Boot 2017.09 was packaged, which placed U-Boot in a single idbloader.img file. If that version is used, simply disregard the second command above.