edk_ has joined #nixos-aarch64
alp has quit [Ping timeout: 272 seconds]
cole-h has quit [Ping timeout: 272 seconds]
rajivr has joined #nixos-aarch64
h0m1 has quit [Ping timeout: 272 seconds]
h0m1 has joined #nixos-aarch64
rasmusm has quit [Remote host closed the connection]
patagonicus has quit [Quit: The Lounge - https://thelounge.chat]
patagonicus has joined #nixos-aarch64
Darkmatter66_ has joined #nixos-aarch64
Darkmatter66 has quit [Ping timeout: 260 seconds]
orivej has quit [Ping timeout: 240 seconds]
justanotheruser has quit [Ping timeout: 260 seconds]
cole-h has joined #nixos-aarch64
hmpffff has joined #nixos-aarch64
alp has joined #nixos-aarch64
orivej has joined #nixos-aarch64
lovesegfault has quit [Ping timeout: 260 seconds]
lovesegfault has joined #nixos-aarch64
alpernebbi has joined #nixos-aarch64
zupo has joined #nixos-aarch64
cole-h has quit [Ping timeout: 240 seconds]
<sphalerite> clever: is not-os still great for building 32-bit pi images? I have a pi 2 that I want to use, with a fairly minimal use case (play back sound coming in from the network)
zupo has quit [Ping timeout: 240 seconds]
zupo has joined #nixos-aarch64
edk_ is now known as deadk
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ib07 has joined #nixos-aarch64
monk has left #nixos-aarch64 ["Error from remote client"]
monk has joined #nixos-aarch64
<clever> sphalerite: last i checked, it can still boot, but only because ive pinned it to an ancient nixpkgs rev
<sphalerite> clever: hm ok, so no :D
<clever> i forget why it had problems, was likely during build
orivej has quit [Ping timeout: 265 seconds]
monk has left #nixos-aarch64 ["Error from remote client"]
monk has joined #nixos-aarch64
monk has left #nixos-aarch64 ["Error from remote client"]
monk has joined #nixos-aarch64
njha has quit [Ping timeout: 244 seconds]
monk has left #nixos-aarch64 ["Error from remote client"]
alp has quit [Remote host closed the connection]
alp has joined #nixos-aarch64
monk has joined #nixos-aarch64
hmpffff has quit [Ping timeout: 272 seconds]
hmpffff has joined #nixos-aarch64
njha has joined #nixos-aarch64
alp has quit [Ping timeout: 272 seconds]
zarel_ has quit [Ping timeout: 265 seconds]
zarel has joined #nixos-aarch64
zupo has joined #nixos-aarch64
cptchaos83 has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<patagonicus> On that note, is there any good way of finding a revision of nixpkgs that builds for armv7? I was considering bisecting between currently-running-version and master before, but that also doesn't sound great (as there can be different problems in the range and you also wouldn't necessarily end up with the newest non-breaking version). The
<patagonicus> alternative would be starting at master and going back one commit every time it fails, but that means at least rebuilding one package for each revision.
<patagonicus> Currently for master it fails for coreutils and rebuilding that every time sounds a bit cumbersome.
<patagonicus> I'm currently thinking of using nix-bisect to help a bit, but that also not quite what I want (it'll tell me when that specific package broke, but I don't really care about that).
Darkmatter66 has joined #nixos-aarch64
Darkmatter66_ has quit [Ping timeout: 256 seconds]
justanotheruser has joined #nixos-aarch64
alp has joined #nixos-aarch64
<thefloweringash> I’d suggest looking at my hydra, but I haven’t found time to tend to it recently and it seems like something broke
<thefloweringash> Though I haven’t seen a problem with coreutils recently: https://hydra.cons.org.nz/job/thefloweringash-armv7/nixpkgs-unstable/coreutils
<patagonicus> I have two tests failing in coreutils, but I haven't investigated why/what commit made them fail.
<patagonicus> Ah. It breaks after 2020-10-07 and the latest build on your hydra seems to be 2020-09-28. :)
<patagonicus> Maybe I should just finally set up my own hydra, was thinking about it. Doesn't look that complicated.
cole-h has joined #nixos-aarch64
<thefloweringash> I do only build the channels. I figured it would mean the packages had passed some level of checking. The build on my hydra should be the latest from nixpkgs-unstable, which seems blocked at the moment.
<thefloweringash> I’ll need to try and sort out whatever my hydra is doing wrong. Maybe I need to give up and just give it an s3 bucket to fill up.
<patagonicus> I just went with master since the channels aren't really checked for armv7 as far as I understand, but maybe it makes more sense to go with unstable. Not sure.
<thefloweringash> The channels aren’t checked for armv7, but I figure if the commit wasn’t good enough for the main architectures I don’t want to try building it for something more obscure.
<sphalerite> danielrf[m]: I'm trying to build robotnix for my new pixel 4a (sunfish), but Webviewchromium is failing with /build/.attr-0: line 9: /nix/store/p4m87k5mbpjfxnay9v0m98gggba1lsgi-android-sdk-env/share/android-sdk/build-tools/30.0.2/aapt2: No such file or directory
<sphalerite> any ideas?
<danielrf[m]> maybe I broke something :( I was working on this recently
<danielrf[m]> which derivation is failing?
<danielrf[m]> Is the name of the derivation "prebuilt_Webviewchromium" ?
<clever> samueldr: a recent rpi github issue, pointed me towards an initrd based "distro", that used the MSD gadget to expose the rootdisk, for reflashing
<clever> samueldr: does that sound like something useful for mobile-nixos, as an alternative to adb?
<sphalerite> danielrf[m]: argh, yes, I missed that part of the name
<danielrf[m]> So, it seems to be working on my machine. Does /nix/store/p4m87k5mbpjfxnay9v0m98gggba1lsgi-android-sdk-env/share/android-sdk/build-tools/30.0.2/aapt2 somehow not actually exist on your machine?
<danielrf[m]> For reference, this particular derivation can be built using:
<samueldr> clever: it's already been done
<danielrf[m]> nix-build --arg configuration '{device="sunfish"; flavor="vanilla";}' -A source.dirs."robotnix/prebuilt/Webviewchromium".src
<danielrf[m]> And I think it's failing for you at line 175 of modules/apps/prebuilt.nix
<{^_^}> mobile-nixos#110 (by samueldr, 29 weeks ago, open): [WIP] Add "jumpdrive" example system
<clever> samueldr: ah!
<clever> samueldr: i'm currently writing one for the pi, but the 89mb initrd crashed chrome
<samueldr> huge!
<samueldr> mine is under 16MiB
<clever> probably needs a static busybox
<samueldr> whenever the proper "installer" is conceived, I'll most likely add a method to do so at the end so a user can add files to their install
<clever> oh god, the /lib/modules along is 110mb before compression, lol
<clever> let me prune that first
<clever> 10mb initrd if i omit all modules
<sphalerite> danielrf[m]: aaaah, the whole path doesn't exist
<sphalerite> danielrf[m]: is this maybe IFD?
<sphalerite> wait no, that doesn't make sense
<danielrf[m]> Yeah, I'm confused here too then
<danielrf[m]> So, the `build-tools` used on that line uses things from `androidPkgs`, which I add in an overlay in pkgs/default.nix
alp has quit [Ping timeout: 272 seconds]
<danielrf[m]> which is originally from https://github.com/tadfisher/android-nixpkgs
<sphalerite> I'll try building it locally
<danielrf[m]> but I don't believe there should be IFD anywhere in that chain
<clever> libbb/time.c:260:14: error: '__NR_clock_gettime' undeclared (first use in this function); did you mean 'clock_gettime'? 260 | if (syscall(__NR_clock_gettime, CLOCK_MONOTONIC, ts))
<clever> samueldr: pkgsCross.armv7l-hf-multiplatform.pkgsStatic.busybox fails to build, have you seen anything like that before?
<samueldr> nope
<clever> 2 , enableStatic ? false
<samueldr> been a while since I dropped static stuff
<sphalerite> clever: that feels horribly familiar to me
<clever> though .override looks better
<samueldr> (in the end I saved space by not going with static binaries)
<clever> yeah, once you have multiple binaries, dynamic starts to save space
<sphalerite> clever: yep, I got it while trying to cross-build busybox for mips. Not sure if that's at all relevant for you.
<clever> but ive just got only busybox at the moment
<clever> sphalerite: i am cross-compiling to arm32 with static
<sphalerite> clever: I never found a working solution, so if you work out what it takes I'd be very glad to hear it
<sphalerite> I tried sed -i $'13a#define __NR_clock_gettime 113\n' include/libbb.h
<sphalerite> but that then failed at runtime
<sphalerite> danielrf[m]: hrm, I'm building from the repo now rather than using the exact example command (with s/crosshatch/sunfish/) and it seems to be Working™
<clever> 13 #!${pkgs.pkgsCross.armv7l-hf-multiplatform.busybox.override { enableStatic=true; }}/bin/ash
<clever> sphalerite: this compiled....
<sphalerite> danielrf[m]: oh wait, not even. This is just on a different machine. Wtf?
<clever> yet it still depends on glibc, lol
<danielrf[m]> oh, were you using the URL ? maybe it was cached at a bad version?
<sphalerite> danielrf[m]: my very first attempt at building was today, so I don't think so…
<danielrf[m]> weird then :)
<clever> nuke-references time!
<sphalerite> err never mind, this is on a different machine _and_ from the git repo
<sphalerite> clever: is it not maybe via libgcc?
<sphalerite> oh wait no enableStatic should take care of that
<clever> /nix/store/y0q75qvlq8wgkkbkvcyp8nr1kwlwgpxl-glibc-2.31-armv7l-unknown-linux-gnueabihf/lib/locale/locale-archive
<clever> sphalerite: it is static, but it depends on error msg translations
<clever> shrank it, now 2mb and zero deps
<clever> -r--r--r-- 1 clever clever 1.1M Dec 31 1969 result/initrd
<sphalerite> danielrf[m]: what sort of machine do you use for building? It's quite heavy building the whole thing in one derivation :')
<clever> [ 2.708340] Run /init as init process
<clever> [ 2.714267] Failed to execute /init (error -13)
<danielrf[m]> sphalerite: I actually have a 32-core threadripper 3970X, 64GB ram, plus a couple TB of SSD
<clever> oh, +x, *doh*
<danielrf[m]> I upgraded earlier this year, from originally an Intel 3770 quad-core CPU and 16GB ram
<danielrf[m]> IIRC, It used to take like 8-10 hours to build android on that old machine
<danielrf[m]> which basically would mean I could only do 1-2 tries per day :)
<sphalerite> danielrf[m]: hah, ok
<sphalerite> danielrf[m]: hmm, the earlier machine sounds like a hetzner server I used to have :D
<sphalerite> error: unexpected end-of-file
<sphalerite> :'(
<sphalerite> after 220min
zupo has joined #nixos-aarch64
alp has joined #nixos-aarch64
<clever> Disk /dev/sde: 1 MiB, 1048576 bytes, 2048 sectors
<clever> Disk model: File-Stor Gadget
<clever> samueldr: wooo!
<samueldr> kind of unsurprising :)
<clever> now to iron out the kinks in it...
<samueldr> have you dug around for the meanings of the sysfs twiddlind you did?
<samueldr> twiddling*
<samueldr> because there's pretty much 99% cargo-culting around
<clever> nofua is the most interesting one
<samueldr> the more generic parts of gadgetfs I was thinking about
<clever> i found that the official msd/start4.elf firmware, gets ~10mbyte/sec
<clever> but the sd card itself can do 40mbyte/sec under linux (both on pi4, and a laptop)
<clever> and upstream claims its the 500mhz dual-core vpu, vs 1.5ghz quadcore arm
<clever> makeModulesClosure should also help in shrinking things...
alp has quit [Ping timeout: 272 seconds]
<clever> before: -r--r--r-- 1 clever clever 20M Dec 31 1969 result/initrd
<clever> after: -r--r--r-- 1 clever clever 1.3M Dec 31 1969 result/initrd
<clever> now i just need to solve the missing /dev/
<clever> ah, was just blind, found devtmpfs
rajivr has quit [Quit: Connection closed for inactivity]
alp has joined #nixos-aarch64
WilliButz has joined #nixos-aarch64
WilliButz has quit [Client Quit]
WilliButz has joined #nixos-aarch64
<clever> samueldr: it doesnt have modules up the wazoo, but how does this look?
<samueldr> uh
<samueldr> TIL you can do gadget without gadgetfs
<clever> i think this is the deprecated api, lol
<samueldr> that you are using? I would guess so too
<clever> i just point webusbboot (same repo), to that directory, and it boots up perfectly
<clever> (the dir from -A rootDir)
<samueldr> if that works, then awesome to distill it down as much as possible :)
<samueldr> I definitely had to think about making sure things were as abstract as possible to support different schemes
pinkieval has joined #nixos-aarch64
pinkieval has quit [Client Quit]
pinkieval has joined #nixos-aarch64
<clever> samueldr: about the only thing i can think of to adjust for other devices, is the dwc2 module, and the blockdev to share
<samueldr> for that scheme, that sounds likely
<samueldr> with android devices there is a special android usb gadget for older kernels
<clever> the kernel is also a bit bloated (5.9mb), since its the official rpi build
<samueldr> and for newer devices we simply use gadgetfs
<clever> i have a serial console too, so i can play with gadgetfs too
<samueldr> with gadgetfs you'd have the same two things to tweak
<samueldr> but even then, the dwc2 thing is kinda handled for you
<samueldr> as long as the module has been loaded
<clever> it doesnt seem to auto-load right, because its not linked in when the dtb gets parsed
<samueldr> so really you only have the block device configuration
<clever> udev probably handles that, under normal conditions
<clever> firmware/modules/5.4.72-v7+/kernel/drivers/usb/gadget/legacy/g_mass_storage.ko
<clever> yeah, definitely the legacy api
<clever> firmware/modules/5.4.72-v7+/kernel/drivers/usb/gadget/function/usb_f_mass_storage.ko
<clever> and the replacement
<clever> the real fun part though, is that i'm pushing this initrd over usb, via the usb-device boot channel
<sphalerite> Where is this heading? I can't really tell but it does sound interesting
<clever> so i dont have to flash the device to be able to flash the device
<clever> sphalerite: the official msd/start4.elf firmware, only gets ~10mbyte/sec in MSD mode, while linux MSD can do 32mb/sec, and direct SD is 43mb/sec
<samueldr> sphalerite: which part? webusb or gadget?
<sphalerite> I think I'm missing some context
<sphalerite> what's the big picture here?
<sphalerite> Or even the medium picture
<clever> sphalerite: my rpi4 is configured to boot in usb-device mode, then i use webusb, to push rpi firmware files over to it
<clever> the star4.elf firmware then continues usb-device mode, and accepts a kernel.img + initrd file, and boots it
<clever> all pushed from the browser, with no need to compile special apps
<clever> then linux boots, goes into MSD mode, and the pi4 shows up as a normal usb drive
<clever> samueldr: oh, that gives me a crazy idea, a webusb based adb/fastboot, to forcibly install mobile-nixos from a browser
<samueldr> clever: we can probably already use what google made
<samueldr> it's *already* possible to fastboot install stuff from your browser
<sphalerite> first robotnix build is flashing now :D
<clever> and for extra fun points, i confirmed that webusb works from chrome on android
<samueldr> sphalerite: at what rate?
<samueldr> 60hz? 30hz?
<clever> samueldr: so you could pull up a magic webpage on one phone, then use it to flash a second phone!
<samueldr> yeah
<sphalerite> do I hear mobile-nixos-as-a-virus?
<clever> sphalerite: :D
<samueldr> that would be kind of neat
<sphalerite> danielrf[m]: it booooteeeeeed!! I'm so excited :D :D :D
<samueldr> danielrf[m]++ sphalerite++
<{^_^}> danielrf[m]'s karma got decreased to 3
<{^_^}> Wait no, it got *increased* to 5
<{^_^}> sphalerite's karma got increased to 113
justan0theruser has joined #nixos-aarch64
justanotheruser has quit [Ping timeout: 260 seconds]
<danielrf[m]> sphalerite: Nice! It's it great that nix makes builds just work! :)
<sphalerite> unfortunately it's the very sparse plain-vanilla build which isn't _really_ what I wanted. But hey, it built in 2 hours, it's survivable
<samueldr> I remember how with sony-pioneer on LineageOS, on that sketchy branch I got instant success with robotnix, while I didn't with the official toolchain
<danielrf[m]> :D
<sphalerite> danielrf[m]: hm, if I try to use the example configuration, it complains about an auditor.x509.pem file not existing, even though I've disabled signing… is there something else I need to disable?
<danielrf[m]> yeah, I'd disable the auditor/attestation thing entirely for now. It requires the hash of the signing key to be built into the auditor apk
<danielrf[m]> It'd also be better to enable just the things you'd like instead of using example.nix directly.
<danielrf[m]> Things like the `apps.fdroid.additionalRepos` in `example.nix` are really just for my setup
<sphalerite> hm ok
v0|d has joined #nixos-aarch64
<clever> samueldr: something that would help greatly, is if extraUtils = pkgs.runCommandCC "extra-utils" was refactored out of nixos, and was reusable
<samueldr> yes
Darkmatter66 has quit [Quit: ZNC 1.7.5 - https://znc.in]
<clever> samueldr: i'm also seeing varying ways of exposing a function in pkgs
<clever> 413 makeModulesClosure = { kernel, firmware, rootModules, allowMissing ? false }:
<clever> 414 callPackage ../build-support/kernel/modules-closure.nix {
<clever> 415 inherit kernel firmware rootModules allowMissing;
<clever> this one defines a module inline, then passes the args onward
<clever> 408 makeInitrd = callPackage ../build-support/kernel/make-initrd.nix; # Args intentionally left out
<clever> while this one just omits the args entirely, so your supplying the overrides to callPackage
<clever> makeInitrd feels cleaner, you can just stuff that default allowMissing inside the modules-closure.nix
<samueldr> btw, I was linking the Mobile NixOS one so you could see what changes may be helpful in making it more generi
<samueldr> generic*
<samueldr> as IIRC there are things hardcoded for NixOS
<clever> it has a lot of binaries it will copy by default
<clever> but we just want the copy logic itself, and no binaries
<samueldr> yeah
<clever> filename: /lib/modules/5.4.72-v7l+/kernel/drivers/usb/gadget/legacy/g_mass_storage.ko
<clever> depends: usb_f_mass_storage,libcomposite
<clever> ah, that other one was a dep, its not the "new" one
tilpner has quit [Remote host closed the connection]
tilpner has joined #nixos-aarch64
ky0ko has quit [Ping timeout: 265 seconds]
ky0ko has joined #nixos-aarch64
<clever> samueldr: yeah, i see how gadgetfs is a lot more complex, but gives so much more power
<samueldr> yep
<clever> any moment now, i should have both usb serial and msd
v0|d has quit [Remote host closed the connection]
<clever> and now i can control it without a usb serial adapter!
<samueldr> I'll need to check into the ADB gadgetfs gadget
<samueldr> something makes it not work right
<samueldr> but ADB is quite convenient to have around
<samueldr> I figure it's the adb server I'm using that'S too old
<clever> this also makes mention of userland gadgets
<samueldr> see
<samueldr> "mkdir strings/0x409"
<samueldr> that's totally not thoroughly explained
<samueldr> and almost nowhere they actually list why it's "English language strings"
<samueldr> even in the USB spec!
<samueldr> it's from microsoft!!
<samueldr> language identifiers from microsoft leaked into the USB spec!
<clever> oh, that i noticed in wireshark, one sec
<clever> [root@amd-nixos:~]# modprobe usbmon ; wireshark &
<clever> [root@amd-nixos:~]# lsusb -d 0000:0000
<clever> Bus 006 Device 123: ID 0000:0000
<clever> then begin to capture on usbmon6
<clever> samueldr: when you get a usb interface descriptor, it refers to the strings by index
<clever> device descriptor*
<clever> for example, the manufacturer name is index 1, product is index 2, and serial# is index 1 again
<clever> samueldr: there is then a seperate usb packet, to get the string at index 2, for language 0x409 (english us)
<clever> and if you know the other language codes, you can define translated versions of the strings
<clever> and the OS will fetch the right one for the user
<samueldr> yeah, but nowhere is it explained where those strings come from!
<samueldr> even in the USB spec!
<samueldr> where the identifier*
<clever> 53 mkdir configs/c.1/strings/0x409
<clever> 54 echo "dummy config" > configs/c.1/strings/0x409/configuration
<samueldr> I had to dig quite deeply to find that the usb spec implicitly uses the identifiers from microsoft
Darkmatter66 has joined #nixos-aarch64
<samueldr> and this list lacks a lot of cultures!
<samueldr> no fr-CA!
<samueldr> no en-CA either for you!
<samueldr> no soup for you!
<clever> just wait, youll find the recipe in a random piece of furniture you buy :P
<samueldr> (that was a seinfeld reference)
<clever> so was what i said
<clever> at the end of the ep, they found the recipe, in a wardrobe they had bought
<samueldr> yeah, that was for others :)
<clever> ah
<clever> to make us look a little less insane :P
<clever> ive also been comparing wireshark's usb capture, to the rpi rom, and have found interesting things
<clever> the full usb descriptors exist in the rom, as plain blobs that just get shoved out the usb port
<clever> but, there is an if statement, to decide on which descriptor to send, and the alternative includes MSD
<clever> and i cant see any obvious way to enable it
<clever> 70 getty 0 /dev/ttyGS0 &
<clever> and i can also login over usb as well
hmpffff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Darkmatter66 has quit [Ping timeout: 272 seconds]
Darkmatter66 has joined #nixos-aarch64
Darkmatter66 has quit [Ping timeout: 264 seconds]
Darkmatter66 has joined #nixos-aarch64
orivej has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
* colemickens loves the Robotnix talk.
ib07 has quit [Ping timeout: 240 seconds]
alpernebbi has quit [Quit: alpernebbi]
<danielrf[m]> colemickens: thanks!