<clever>
samueldr: how much longer will you be up tonight? and would you be able to test a recovery.bin on your pi4? it just needs 1 file on the fat32, and a uart cable
<samueldr>
maybe a couple hours
<samueldr>
what does that recovery.bin do?
<clever>
samueldr: the official recovery.bin will re-flash the spi chips, mainly for un-bricking purposes
<clever>
samueldr: but its basically just a bypass, that will execute whatever is in recovery.bin, and ignore the spi flash temporarily
<clever>
samueldr: i'm working on a custom recovery.bin, that just prints hello-world out the uart, and nothing more
<clever>
thats the first step in getting custom firware
h0m1 has quit [Ping timeout: 246 seconds]
h0m1 has joined #nixos-aarch64
<clever>
samueldr: just finished reading the gpio pullup stuff for the old rpi1, and dang its a lot more complicated then i expected
<clever>
basically, put the desired mode into a special register
<clever>
wait 150 clock cycles
<clever>
then write to a special clock register
<clever>
each gpio you clock, will then take on whatever mode was in the 1st register
<clever>
then wait another 150 clock cycles
<clever>
and finally, zero out both control reg's
<clever>
next step, is to read the kernel source, and figure out how the rpi4 differs!
<DigitalKiwi>
samueldr #nixos :D
<clever>
samueldr: ahh, the 2711 is much simpler, just 2 bits per register, and no complicated timing and multi-reg fuss
<clever>
samueldr: if you grab this known-working recovery.bin (but intentionally dont include the .bin files), you will get an error on the uart about the .bin files being missing
<clever>
that would at least confirm the SD card and boot rom are working as they should
<clever>
followed by setting a bunch of TXP reg's to 0 (no idea what TXP does)
<clever>
80000316: 07 e8 40 00 20 7e mov r7,0x7e200040
<clever>
8000035a: 78 36 st r8,(r7+0x18)
<clever>
then it sets GP_EDS0 to a 0, havent seen that register in any docs yet...
<clever>
ah, irq triggers on gpio
<clever>
aha!
<clever>
8000357e: 06 e8 c0 00 20 7e mov r6,0x7e2000c0
<clever>
80003584: 62 29 ld r2,(r6+0x24)
<clever>
80003586: 63 2a ld r3,(r6+0x28)
<clever>
thats 0xe4 and 0xe8, the rpi4 gpio pullup configs, for the first 32 gpio pins
<clever>
80007fb0: 00 e8 c0 00 20 7e mov r0,0x7e2000c0
<clever>
80007fba: 01 34 st r1,(r0+0x10)
<clever>
80007fb8: 11 70 bitset r1,0x1
<clever>
80007fb6: 01 24 ld r1,(r0+0x10)
<clever>
and theres a whole function, just to set a single bit within it, nice
<clever>
oh, thats 0xd0
<clever>
its not in the old docs...
lovesegfault has joined #nixos-aarch64
tilpner has quit [Quit: tilpner]
tilpner 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…]
lovesegfault has quit [Quit: WeeChat 2.7]
zupo has joined #nixos-aarch64
zupo has quit [Ping timeout: 248 seconds]
zupo has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Irenes[m] has quit [Ping timeout: 252 seconds]
craige[m] has quit [Ping timeout: 246 seconds]
atopuzov[m] has quit [Ping timeout: 245 seconds]
balsoft has quit [Ping timeout: 252 seconds]
thequux[m] has quit [Ping timeout: 264 seconds]
worldofpeace has quit [Ping timeout: 246 seconds]
marijan[m] has quit [Ping timeout: 250 seconds]
danielrf[m] has quit [Ping timeout: 245 seconds]
bennofs[m] has quit [Ping timeout: 245 seconds]
cornu has quit [Ping timeout: 245 seconds]
dtz has quit [Ping timeout: 245 seconds]
contrun[m] has quit [Ping timeout: 252 seconds]
marius851000[m] has quit [Ping timeout: 250 seconds]
timokau[m] has quit [Ping timeout: 250 seconds]
Ox4A6F has quit [Ping timeout: 250 seconds]
NickHu has quit [Ping timeout: 246 seconds]
thefloweringash has quit [Ping timeout: 246 seconds]
Ericson2314 has quit [Ping timeout: 246 seconds]
orivej has quit [Ping timeout: 246 seconds]
ryantrinkle has quit [Ping timeout: 265 seconds]
<DigitalKiwi>
what's that mean
* DigitalKiwi
doesn't know any ASM
zupo has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ryantrinkle has joined #nixos-aarch64
zupo has joined #nixos-aarch64
orivej has joined #nixos-aarch64
zupo has quit [Client Quit]
zupo has joined #nixos-aarch64
thefloweringash has joined #nixos-aarch64
craige[m] has joined #nixos-aarch64
balsoft has joined #nixos-aarch64
Irenes[m] has joined #nixos-aarch64
timokau[m] has joined #nixos-aarch64
NickHu has joined #nixos-aarch64
cornu has joined #nixos-aarch64
bennofs[m] has joined #nixos-aarch64
marijan[m] has joined #nixos-aarch64
worldofpeace has joined #nixos-aarch64
dtz has joined #nixos-aarch64
thequux[m] has joined #nixos-aarch64
alienpirate5 has joined #nixos-aarch64
atopuzov[m] has joined #nixos-aarch64
Ox4A6F has joined #nixos-aarch64
danielrf[m] has joined #nixos-aarch64
Ericson2314 has joined #nixos-aarch64
contrun[m] has joined #nixos-aarch64
marius851000[m] has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Irenes[m] has quit [Read error: Connection reset by peer]
craige[m] has quit [Remote host closed the connection]
marius851000[m] has quit [Remote host closed the connection]
NickHu has quit [Read error: Connection reset by peer]
alienpirate5 has quit [Read error: Connection reset by peer]
worldofpeace has quit [Remote host closed the connection]
danielrf[m] has quit [Read error: Connection reset by peer]
Ox4A6F has quit [Read error: Connection reset by peer]
balsoft has quit [Read error: Connection reset by peer]
timokau[m] has quit [Read error: Connection reset by peer]
thequux[m] has quit [Write error: Connection reset by peer]
Ericson2314 has quit [Write error: Connection reset by peer]
contrun[m] has quit [Write error: Connection reset by peer]
thefloweringash has quit [Remote host closed the connection]
marijan[m] has quit [Write error: Connection reset by peer]
atopuzov[m] has quit [Remote host closed the connection]
bennofs[m] has quit [Remote host closed the connection]
dtz has quit [Remote host closed the connection]
cornu has quit [Remote host closed the connection]
zupo has joined #nixos-aarch64
zupo has quit [Client Quit]
zupo has joined #nixos-aarch64
zupo has quit [Client Quit]
vika_nezrimaya has joined #nixos-aarch64
zupo has joined #nixos-aarch64
zupo has quit [Client Quit]
balsoft has joined #nixos-aarch64
marijan[m] has joined #nixos-aarch64
craige[m] has joined #nixos-aarch64
Irenes[m] has joined #nixos-aarch64
timokau[m] has joined #nixos-aarch64
cornu has joined #nixos-aarch64
bennofs[m] has joined #nixos-aarch64
NickHu has joined #nixos-aarch64
worldofpeace has joined #nixos-aarch64
thequux[m] has joined #nixos-aarch64
dtz has joined #nixos-aarch64
Ox4A6F has joined #nixos-aarch64
danielrf[m] has joined #nixos-aarch64
atopuzov[m] has joined #nixos-aarch64
thefloweringash has joined #nixos-aarch64
alienpirate5 has joined #nixos-aarch64
contrun[m] has joined #nixos-aarch64
Ericson2314 has joined #nixos-aarch64
marius851000[m] has joined #nixos-aarch64
<vika_nezrimaya>
will the default SD image for Raspberry Pi 4 update my EEPROM automatically? I've heard there's a new version which reduces power draw and improves thermal performance
<vika_nezrimaya>
or will I need to place recovery.bin manually?
<vika_nezrimaya>
anyway, I'm downloading NixOS for my Raspberry Pi 4 :3
zupo has joined #nixos-aarch64
<samueldr>
I don't think there is intention to do firmware updates automatically with NixOS
<samueldr>
and if it were to be implemented, I think it should be done through userspace with something like LVFS
zupo has quit [Client Quit]
<vika_nezrimaya>
oh well it looks like when I'm building an image with qemu-user, it fails while seemingly copying the image with the error "error while reading directory <nix store path>: cannot allocate memory"
<vika_nezrimaya>
I have binfmt.emulatedSystems set to ["aarch64-linux"] to build natively
<samueldr>
the image building process may be memory hungry
<vika_nezrimaya>
nah I think it's just glitchy
<samueldr>
it has to deal with 2GiB images, and compress them
<vika_nezrimaya>
I have 6 gigabytes of RAM, this isn't a problem for me
<vika_nezrimaya>
or it shouldn't be at least
<samueldr>
is it to build a raspberry pi 4 image?
<samueldr>
hydra should have those built already
<vika_nezrimaya>
Does it have SSH enabled?
<samueldr>
ah, "no"
<vika_nezrimaya>
if it doesn't, I'm screwed since I don't have a suitable HDMI cable and I'm not sure I can perform a blind login
<samueldr>
same config as the other installer images
<vika_nezrimaya>
how about serial?
<vika_nezrimaya>
I had an UART cable somewhere
<samueldr>
serial should work yes
<vika_nezrimaya>
yay!
<samueldr>
a blind login should work, considering it autologs you
<vika_nezrimaya>
should I just type `systemctl start sshd; passwd nixos\n<password>\n<password>\n`?
<vika_nezrimaya>
probably in reverse though
<vika_nezrimaya>
samueldr what's the URL for latest unstable SD image?
<samueldr>
full path: /nix/store/yy7al9zqbdj89ws42ahrjn2n8lfqfn9i-nixos-sd-image-20.03pre205780.d942688fc13-aarch64-linux.img/sd-image/nixos-sd-image-20.03pre205780.d942688fc13-aarch64-linux.img.bz2
<vika_nezrimaya>
I feel some low-level magic going on with that command
<samueldr>
or the output path can be found under the Details tab too
<samueldr>
nah :)
<vika_nezrimaya>
let's see if my battery runs out before or after the download finishes
<samueldr>
that's entirely cromulent and a known way to get a path
<samueldr>
let's say you're facing an issue with GNU hello
<samueldr>
you could tell me the full path to your GNU hello
<samueldr>
and I'd be able to use the same
<vika_nezrimaya>
if it's in the binary cache and it isn't corrupted
<samueldr>
yeah
<vika_nezrimaya>
if I'm serving a binary cache you would be able to get it from me directly though
<samueldr>
I think so, yeha
<vika_nezrimaya>
that could be a nice way to share whole system closures with temporary binary caches
<vika_nezrimaya>
I think Nixops uses something similar
<vika_nezrimaya>
only with direct download
<vika_nezrimaya>
nix-copy-closure
<vika_nezrimaya>
used that manually too
<samueldr>
I think --realise is different enough that the answer is "no"
<vika_nezrimaya>
maybe...
<samueldr>
but the idea behind its use in nixops is close enough not to matter :)
orivej has quit [Ping timeout: 248 seconds]
vika_nezrimaya has quit [Ping timeout: 248 seconds]
<sphalerite>
yeah, I used a binary cache to share a game with a colleague when we were on a train with no internet access. He was able to trust it thanks to the cache.nixos.org signature on it and his own nixpkgs checkout :D
Acou_Bass has quit [Ping timeout: 252 seconds]
Acou_Bass has joined #nixos-aarch64
ryantrinkle has quit [Ping timeout: 252 seconds]
atopuzov[m] has left #nixos-aarch64 ["Kicked by @appservice-irc:matrix.org : User has been idle for 30+ days."]
orivej has joined #nixos-aarch64
ryantrinkle has joined #nixos-aarch64
vika_nezrimaya has joined #nixos-aarch64
timokau[m] has left #nixos-aarch64 ["Kicked by @appservice-irc:matrix.org : User has been idle for 30+ days."]
<vika_nezrimaya>
It booted to the console <3
<vika_nezrimaya>
It's alive!
<vika_nezrimaya>
Now can I use nixops to manage it from an x86_64 laptop?
<vika_nezrimaya>
(it works with i686 machines just fine)
zupo has joined #nixos-aarch64
lovesegfault 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 [Quit: My MacBook has gone to sleep. ZZZzzz…]
vika_nezrimaya has quit [Remote host closed the connection]