<matthewcroughan> samueldr: that turned out to be the case
<matthewcroughan> U-Boot SPL 2021.01 (Jan 01 1980 - 00:00:00 +0000)
<matthewcroughan> > Newer SoCs (tested on H2+, A64, H5, H6) can also load the SPL from sector 256 (128KB) of an SD card or eMMC, if no valid eGON/TOC0 signature is found at 8KB (BROM boot order). The U-Boot proper offset needs to be adjusted accordingly in this case. U-boot patch more details
<{^_^}> error: syntax error, unexpected ',', at (string):471:26
<matthewcroughan> Mic92:
<samueldr> that's an additional offset
<samueldr> it should _also_ work at 8KB
<matthewcroughan> samueldr: it just boots from mmc0 in that case
<matthewcroughan> it does not work otherwise
jumper149 has quit [Quit: WeeChat 3.0]
<matthewcroughan> if I do as the allwinner wiki pages would suggest, the board doesn't detect u-boot from the sd card and moves on to built in emmc
<samueldr> check armbian's image at those offset
<samueldr> both bs=1024 seek=128 and bs=1024 seek=8
<samueldr> using xxd you should see the eGON signature
<samueldr> right, dd if=armbian.img of=... bs=1024 seek=... count=1
<matthewcroughan> samueldr: does the nixos-sd-image have slack sp;ace for u-boot?
<samueldr> yes
<samueldr> and anyway u-boot would work anyway
<samueldr> it'd break the data found at that location
<samueldr> but u-boot would work
<samueldr> since you write the sd image, then write u-boot on top
<matthewcroughan> uboot just gets stuck at "Trying to boot from MMC1"
<matthewcroughan> but at least it's booting MY uboot!
<matthewcroughan> samueldr: what do you think "if no valid eGON/TOC0 signature is found at 8KB (BROM boot order). The U-Boot proper offset needs to be adjusted accordingly in this case." means?
claudiii has quit [Read error: Connection reset by peer]
claudiii has joined #nixos-aarch64
jackdk has quit [Read error: Connection reset by peer]
<samueldr> SoC first looks at sector 16 (16*512KiB == 8*1024KiB), if it doesn't find the magic numbers, it then checks at sector 256
jackdk has joined #nixos-aarch64
<samueldr> the magic numbers are lterally the ascii characters "eGON" and "TOC0"
<matthewcroughan> well I guess my uboot doesn't have the magic numbers
<samueldr> no it does
<samueldr> [19:13:02] <matthewcroughan> uboot just gets stuck at "Trying to boot from MMC1"
<samueldr> I *believe* that's the u-boot SPL
<samueldr> common/spl/spl.c
<samueldr> printf("Trying to boot from %s\n", loader->name);
Acou_Bass has quit [Read error: Connection reset by peer]
<samueldr> so at that point, as far as handing off to "a" firmware, the SoC succeeded
<matthewcroughan> yeah, but it doesn't yet boot nixos :P
<samueldr> it seems so
Acou_Bass has joined #nixos-aarch64
<samueldr> you're skipping steps anyway, before booting NixOS, you need to have u-boot working
<matthewcroughan> samueldr: why `count=1`?
<samueldr> and I have no way to help more with that, except than hazardous guesses, I don't have the hardware
<matthewcroughan> the bootloader is 631K
<samueldr> matthewcroughan: if you wanted to check the the magic number from armbian's image
<samueldr> you only need the first four bytes
<samueldr> count=1 limits to 1024 bytes here
<samueldr> oh right
<samueldr> you had that "Trying to boot from MMC1" error
<samueldr> that was when u-boot was flashed at the secondary location? (128KB in)?
<samueldr> if so, that's normal
<samueldr> the SPL jumps to a hardcoded value
<samueldr> u-boot is assuming that it's being written at 8KB in (sector 16) by default
<matthewcroughan> samueldr: https://pastebin.com/raw/vmXQc46H
<samueldr> [for allwinner]
<samueldr> your two dumps seem eerily similar
<matthewcroughan> samueldr: I assure you that the seek was changedl
<matthewcroughan> they are identical, for some reason
<samueldr> and of different sizes?
<matthewcroughan> one is likely a sparse file, says a friend here
<samueldr> uh?
<samueldr> they should be 1KB
<matthewcroughan> the filesize is not indicative of the actual file size
<samueldr> since count=1 and bs=1024
<samueldr> dd doesn't produce sparse files hapazardly
Acou_Bass has quit [Quit: ZNC 1.8.2 - https://znc.in]
<matthewcroughan> > Sparse files have different apparent file sizes (the maximum size to which they may expand) and actual file sizes (how much space is allocated for data on disk). To check the file's apparent size, just run:
<{^_^}> error: syntax error, unexpected ',', expecting ')', at (string):471:196
<samueldr> sure, but that doesn't make sense in the context
<matthewcroughan> sure it does, there's a direct example with dd in that archwiki article
<matthewcroughan> fallocate fake_file -l 10GiB, you'll get a file that claims to be 10GiB
<matthewcroughan> IDK why it's like this.
<samueldr> oh, seek instead of skip
<samueldr> it should have been skip
<samueldr> but still, your hexdump output should have shown the eGON or TOC0 signature I figure
Acou_Bass has joined #nixos-aarch64
<matthewcroughan> samueldr: maybe I should grep for it
<matthewcroughan> samueldr: https://pastebin.com/raw/PYAYCea3
<samueldr> >> 0x2004 / 1024 -> 8
<samueldr> so they do `dd` it at that offset
<matthewcroughan> yeah, crap
<matthewcroughan> so I guess my u-boot just doesn't work
<samueldr> since you had the SPL going at the alternative location, I suspect your u-boot build is good
<samueldr> and something else was at play
<matthewcroughan> samueldr: https://pastebin.com/raw/x4ft9krM
<matthewcroughan> that's the difference between the uboot I've compiled, and what's provided in Armbian
<samueldr> I uh, was wrong, but still right
<samueldr> 0x2000 / 1024.0 -> 8.0 (I forgot about integer division)
<samueldr> and eGON is not supposed to be AT this location, but just after like you see there
<samueldr> as you see
<samueldr> it agrees
<matthewcroughan> samueldr: no, I'm just grepping the binary in this case
<samueldr> uh?
<matthewcroughan> when I dd it to the drive, this will be at 0002000
<samueldr> yes
<samueldr> so it'll be fine
<matthewcroughan> so, what do you think is going wrong at this point?
<samueldr> I don't know
<samueldr> defective SD card
<samueldr> wrong writing to the SD card
<matthewcroughan> no way, it boots armbian fine :D
<samueldr> cosmic rays
<matthewcroughan> I sync after every dd
<matthewcroughan> Oh god I love this and hate it at the very same time.
<matthewcroughan> Lots of fun figuring this stuff out when you have such a great mentor as samueldr
<matthewcroughan> samueldr: woah, when I `dd` the thing, it doesn't end up on the disk
<matthewcroughan> weird
<matthewcroughan> ah no, it's there and in the right place
<matthewcroughan> welp, gonna give it a go.
<matthewcroughan> Okay! It seems that it *does* work at 8K. But it still gets stuck at "Trying to boot from MMC1"
<samueldr> it may be that ATF (arm trusted firmware) needs to be updated
<samueldr> but since you have (seemingly) u-boot's SPL trying to continue it's good sign
<matthewcroughan> when you say it needs to be updated, what do you mean exactly?
<samueldr> sphalerite: did you have audio working on gru bob?
<samueldr> matthewcroughan: to a newer release
<matthewcroughan> currently, this is in use. `BL31 = "${armTrustedFirmwareAllwinner}/bl31.bin";`
<matthewcroughan> so is a newer release available? Or are you suggesting that we need to modify nixpkgs upstream?
<samueldr> doesn't look like there's been any releases since 2.4 though
<samueldr> so I guess not
Acou_Bass has quit [Quit: ZNC 1.8.2 - https://znc.in]
<matthewcroughan> samueldr: you'd usually get LoadTrustBL error: -1 if that was the case
<matthewcroughan> so it's probably not that?
<samueldr> yeah
<samueldr> that was me grasping at straw
<samueldr> since AFAIK the next thing the SPL does is going through ATF
<matthewcroughan> do you think it boots it properly?
<matthewcroughan> and I just don't know because of a lack of serial?
<samueldr> hm?
<samueldr> I don't know
<samueldr> but if you're following on serial and it hangs there, chances are slim that it works
<matthewcroughan> yeah it does indeed
rajivr has joined #nixos-aarch64
Acou_Bass has joined #nixos-aarch64
<matthewcroughan> samueldr: oh, the device does not have a partition table
<matthewcroughan> my disk, after flashing the nixos install media, does not have a partition table
<samueldr> more and more it sounds like your disk is unreliable
tilpner_ has joined #nixos-aarch64
Acou_Bass has quit [Quit: ZNC 1.8.2 - https://znc.in]
tilpner has quit [Ping timeout: 272 seconds]
tilpner_ is now known as tilpner
<matthewcroughan> samueldr: OH SHIT you were so right.
<matthewcroughan> wait.. did I really just flash armbian by accident? FUUUU
<matthewcroughan> maybe my kernel module is just busted ffs
<matthewcroughan> yknow the mmc one?
<matthewcroughan> sorry for language btw :D
Acou_Bass has joined #nixos-aarch64
<matthewcroughan> lol, I sincerely think both of these sd cards are dead. FML.
justanotheruser has joined #nixos-aarch64
<matthewcroughan> what is going on on my system?
<matthewcroughan> OMG, samueldr, when I dd to the drive the activity LED for the device doesn't even blink, I have an sd reader with activity now
veleiro` has quit [Ping timeout: 265 seconds]
<matthewcroughan> I've never had anything like this. But my laptop just wasn't buffering data to the disk.
<matthewcroughan> reboot has fixed it, but dding things just wouldn't work anymore lol
<matthewcroughan> Seemed to produce the same hanging.
<matthewcroughan> Yup, tried with a known working, perfectly good sd card and a reboot, it's fudged.
<matthewcroughan> Ah well screw it. I tried. I tried very very hard.
<matthewcroughan> samueldr: Actually, I'm trying one last thing. I'm trying Armbian's u-boot.
<matthewcroughan> whoops
Acou_Bass has quit [Read error: Connection reset by peer]
Acou_Bass has joined #nixos-aarch64
h0m1 has quit [Ping timeout: 264 seconds]
h0m1 has joined #nixos-aarch64
Acou_Bass has quit [Quit: ZNC 1.8.2 - https://znc.in]
Acou_Bass has joined #nixos-aarch64
Acou_Bass has quit [Ping timeout: 240 seconds]
Acou_Bass has joined #nixos-aarch64
<matthewcroughan> samueldr: u-boot from armbian's patches doesn't work either lol
<matthewcroughan> interesting, huh?
orivej_ has quit [Ping timeout: 246 seconds]
<matthewcroughan> samueldr: Mic92: final conclusion then, I've tried it with and without the arm trusted firmware, on both v2021.01 with the patches from patchwork, and v2020.07 with the armbian patches. None of them work, they all hang with `Trying to boot from MMC1`. Absolutely nothing more, nothing less.
cptchaos83 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
Acou_Bass has quit [Ping timeout: 264 seconds]
Acou_Bass has joined #nixos-aarch64
orivej has joined #nixos-aarch64
Bla[m] has joined #nixos-aarch64
cole-h has quit [Ping timeout: 246 seconds]
alex_giusi_tiri has quit [Quit: Leaving.]
<sphalerite> samueldr: sort of.
dustinm has quit [Quit: Leaving]
dustinm has joined #nixos-aarch64
zupo has joined #nixos-aarch64
alpernebbi has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Acou_Bass has quit [Quit: ZNC 1.8.2 - https://znc.in]
globin has quit [Ping timeout: 260 seconds]
dstzd has quit [Ping timeout: 246 seconds]
globin has joined #nixos-aarch64
zupo has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
monk has left #nixos-aarch64 ["Error from remote client"]
Darkmatter66 has joined #nixos-aarch64
monk has joined #nixos-aarch64
dstzd has joined #nixos-aarch64
edcragg0 has joined #nixos-aarch64
edcragg has quit [Quit: Ping timeout (120 seconds)]
edcragg0 is now known as edcragg
qyliss has quit [Quit: bye]
qyliss has joined #nixos-aarch64
zupo has joined #nixos-aarch64
Acou_Bass has joined #nixos-aarch64
h0m1 has quit [Quit: WeeChat 3.0]
h0m1 has joined #nixos-aarch64
Darkmatter66 has quit [Ping timeout: 260 seconds]
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
alpernebbi has quit [Quit: alpernebbi]
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
Darkmatter66 has joined #nixos-aarch64
tilpner_ is now known as tilpner
monk has left #nixos-aarch64 ["Error from remote client"]
monk has joined #nixos-aarch64
rajivr has quit [Quit: Connection closed for inactivity]
Darkmatter66 has quit [Quit: ZNC 1.7.5 - https://znc.in]
nicoo has quit [*.net *.split]
srk has quit [*.net *.split]
zupo has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cole-h has joined #nixos-aarch64
<veleiro> What's the easiest arm64 sbc to work with nixos?
<veleiro> am considering a rpi4 upgrade finally but i dont want to deal with compiling issues or non existing caches
<LinuxHackerman> I'd say probably something rk3399-based
<LinuxHackerman> depends a little on the features you want as well
<veleiro> yeah gpu support is the only real one i'd be concerned for
<LinuxHackerman> rk3399 or rk3328 is a good choice then, panfrost is pretty mature by now AFAIK
<LinuxHackerman> don't go for a nanopi m4 if you want analog audio though :p
<veleiro> i havent considered the pine64 boards but i run PBP, so maybe
<LinuxHackerman> some pine64 device is probably your best bet, I think
<LinuxHackerman> though I haven't owned that many SBCs so YMMV
<LinuxHackerman> this is mostly based on what I've seen in here :)
<veleiro> ya, ive seen it too i suppose
srk has joined #nixos-aarch64
nicoo has joined #nixos-aarch64
zupo has joined #nixos-aarch64
zupo has quit [Quit: Textual IRC Client: www.textualapp.com]
zupo has joined #nixos-aarch64
monk has left #nixos-aarch64 ["Error from remote client"]
monk has joined #nixos-aarch64
orivej has quit [Ping timeout: 265 seconds]
orivej has joined #nixos-aarch64
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #nixos-aarch64
jumper149 has joined #nixos-aarch64
abbe has quit [Ping timeout: 260 seconds]
taktoa[c] has quit [Ping timeout: 260 seconds]
jackdk has quit [Ping timeout: 240 seconds]
taktoa[c] has joined #nixos-aarch64
jackdk has joined #nixos-aarch64
abbe has joined #nixos-aarch64
<samueldr> anyone flakesy want to review or look at the changes here? https://github.com/NixOS/mobile-nixos/pull/238
<{^_^}> mobile-nixos#238 (by eamsden, 10 weeks ago, open): Make the package set a parameter instead of using `<nixpkgs>` everywhere
<samueldr> while the PR was opened by eamsden, I have rewritten parts of it
orivej has quit [Ping timeout: 256 seconds]
<samueldr> at worst I'll merge it and it's subtly broken rather than outright broken, but I'd prefer if someone could take a look
<colemickens> samueldr: you pushed your changes to the PR?
<samueldr> yes
<samueldr> btw it's not really about _testing_ against flakes, but really more about code quality
<colemickens> if I wanted to test this quickly to sanity check it, what do I do?
<colemickens> I want to test a change on top of what you've got and then discuss it if it works out
<samueldr> I'm not actually sure
<samueldr> I tested using `env -i` to clear the env and nix path
<colemickens> I never really built from mobile-nixos. I'd managed to pull the nixos module in per the docs I think. I guess I can see if that still builds after this change.
<samueldr> my main concern (and the PR's original intent) was about removing the stray <nixpkgs> references still floating around
<samueldr> yeah, any method you used previously
<samueldr> as long as you know <nixpkgs> cannot work
<colemickens> I just want to exercise evalConfig mostly right now
<colemickens> maybe I can make it just eval a random device for me
<samueldr> nix-instantiate --argstr device [...] -A build.default
<samueldr> where e.g. pine64-pinephone, asus-z00t, etc
<samueldr> release.nix also exercises it a bunch
<colemickens> yeah, well my only idea was a bust so idk. The need for the nixos module just seems odd, but I get inf recursion if I try to remove it
<colemickens> the extra _mobile-nixos thing, that is.
<samueldr> ah
<samueldr> yeah
<samueldr> I had trouble removing that requirement
<samueldr> BUT
<samueldr> I also need it for external reference
<colemickens> It almost looks like flakes too, but not really because it shouldn't be necessary to access self...
<samueldr> I still want to support the use case of out-of-tree devices
<colemickens> but also, I was wondering about that, yeah.
<samueldr> I have a tablet which I know full well that it currently requires per-device specifics
<samueldr> so I'm not adding that to mobile nixos
<colemickens> Is there an advantage to building from mobile-nixos instead of including the module myself and reaching into the outputs?
<samueldr> what do you mean?
<samueldr> using nix-build to go throuhg default.nix or any of the examples?
<samueldr> there shouldn't be any difference
<samueldr> otherwise it's a bug
<samueldr> it's all about producing a nice-to-use porcelain
chr0ma[m] has joined #nixos-aarch64
<colemickens> hm
<samueldr> did I get your question right?
<colemickens> I think so.
<samueldr> btw, share your concerns or issues
<samueldr> I definitely can have forgotten about something
<colemickens> nope, no issues. Just thinking about the UX of it all a bit.
<samueldr> yeah, right now I'm doing a 1:1 change without changing the UX at all
<samueldr> same commands work as they did
<samueldr> but I'm also open to reviewing some of it
<samueldr> e.g. I want to remove the environment variable thing (that I never used)
<samueldr> and I wouldn't be against fresh ideas for how to use into your own configuration
<colemickens> I think what you have for the module is fine, it feels very nixosy
<samueldr> you mean for evaluating from an /etc/nixos/configuration.nix thing?
<samueldr> `(import <mobile-nixos/lib/configuration.nix> { device = "xxx-yyy"; })` ?
<colemickens> yeah
<samueldr> oh no!
<samueldr> a typo!
<samueldr> for months, if not over a year, in the docs!
<samueldr> >> It is recommender to copy and
<samueldr> recommender -_-
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zarel has quit [Ping timeout: 244 seconds]