ryantrinkle has joined #nixos-aarch64
pbb has joined #nixos-aarch64
orivej has quit [Ping timeout: 245 seconds]
Ultrasauce has quit [*.net *.split]
srk has quit [*.net *.split]
Ultrasauce has joined #nixos-aarch64
srk has joined #nixos-aarch64
<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
lovesegfault has quit [Ping timeout: 245 seconds]
cptchaos83 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
cptchaos83 has joined #nixos-aarch64
<clever> samueldr: can you drop that onto the fat32 of a card (renamed to recovery.bin), and then boot a pi4 with a 115200 uart hooked up?
<samueldr> will look into it in a bit
<clever> kk
orivej has joined #nixos-aarch64
* samueldr forages for a serial cable
<samueldr> I moved my office space today, but didn't finish entirely
<samueldr> clever: nothing on serial, 3 short 1 long pulse on the green LED
<clever> samueldr: my code doesnt blink the led's, so that implies it didnt even find it
<samueldr> yep
<clever> samueldr: its named recovery.bin and is on a fat32 partition in the SD?
<samueldr> just tested, same as no SD
<samueldr> verifying
<clever> partition type code in MBR?
<samueldr> looks like I ejected the sd card reader
<samueldr> which is not a removable piece of my computer
<samueldr> so now I need to find a usb reader
<clever> ack!
<clever> i'm not sure exactly how it works on my laptop, but the mmcblk0 device only appears when i insert an SD card
<clever> and it vanishes when i eject the card physically
<samueldr> suspended the computer
<clever> i never bother with the eject command
<samueldr> easier than finding the usb reader under that mess for tomorrow
<samueldr> I don't bother with eject with it because of that isssue
<samueldr> but I forgot about it
<clever> ive found that umount will sync before it returns
<samueldr> yeah
<clever> so i just umount and yank
<samueldr> or when paranoid I sync
<samueldr> but it's so dumb
<samueldr> same with my laptop's reader!
<samueldr> I can eject it
<samueldr> and it stops working
<samueldr> /Volumes/FIRMWARE $ sha256sum recovery.bin
<samueldr> 1bf5cdb67e128832912a507e2749c530bfaa441ad37e0cb0b03554a4a569886d recovery.bin
<samueldr> Master Boot Record
<samueldr> and it's a FAT filesystem that came from a working nixos image
<samueldr> (emptied)
<clever> samueldr: fdisk -l?
<samueldr> what do you want to know about it?
<clever> [root@system76:~]# fdisk -l /dev/mmcblk0
<samueldr> it's known to boot on the raspi
<clever> Device Boot Start End Sectors Size Id Type
<clever> /dev/mmcblk0p1 2048 31116287 31114240 14.9G b W95 FAT32
<samueldr> /dev/mmcblk0p1 2048 65535 63488 31M c W95 FAT32 (LBA)
<samueldr> Disklabel type: dos
<clever> not sure whats up then, i'll have to test more on my pi, when it arrives
<clever> damn 1-4 week shipping, lol
<DigitalKiwi> samueldr: did you see it
<samueldr> the glittery nixos logos?
<DigitalKiwi> yus
<DigitalKiwi> i have glittery haskell ones too
<samueldr> I'm sorry, you're now terminally glittered
<DigitalKiwi> "https://www.dropbox.com/s/7mrxij6fehbbued/2019-12-17%2018.02.43.jpg?dl=0 my latest haskell art. it sparkles!"
<clever> do you know what ive heard people say before about glitter?
<samueldr> that it's like herpes of the craft world?
<clever> exactly
<lordcirth_> samueldr, hey, how is pinebook support coming?
<samueldr> haven't touched it since the last time you asked, sorry :)
<samueldr> (well, pinebook pro)
<samueldr> (I did touch and fixup my pinebook a64)
<lordcirth_> right, pbp
<samueldr> it was in anticipation of something I didn't do with it though, related to Mobile NixOS
<DigitalKiwi> i used to work in a place where there was lots of glitter but not much in the way of crafts...or clothes maybe some herpes though :|
<clever> ive seen a hotel review before, about how there was glitter in the bed
<clever> so the person writing the review, had to attend a funeral, while covered in glittr
<DigitalKiwi> oh no
<DigitalKiwi> i expect this glitter is going to cover everything i own
<DigitalKiwi> it's 10-60 microns
<DigitalKiwi> is actually pigment
<clever> ive heard of something even worse, from a co-worker
<DigitalKiwi> what's that
<clever> he used to work at a lab, that happened to be making pheremones for a moth, to check their population
<clever> just being in the same building as the production, got some on him
<clever> the moths would flock to him, for the next 2-3 years
<DigitalKiwi> i'm sorry for your co-worker but i'm elated
<DigitalKiwi> that's hilarious
<DigitalKiwi> (and i'm sure horrifying) but also hilarious
<DigitalKiwi> have you heard about the smell that's so bad it makes people instantly vomit and if it's spilled it clears city blocks?
<DigitalKiwi> like tiny amounts spilled
<lordcirth_> I have
<DigitalKiwi> do you know the name because i don't
<lordcirth_> The funny part is that the person affected doesn't smell it much, because it instantly overwhelms their nostrils
<DigitalKiwi> yeah
<clever> DigitalKiwi: i feel like that was mentioned in a book called "ignition", about rockets
<clever> samueldr: one other thing you could try, https://github.com/raspberrypi/rpi-eeprom/tree/master/firmware/beta
<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
<samueldr> I put everything away :/
<clever> not that important
<DigitalKiwi> do you like the nixos ones
<DigitalKiwi> should i do more sparkle ones
<DigitalKiwi> though, let's be honest, everything i do for a while is going to have glitter now intentionally or not. it's all over my desk ;_;
<clever> samueldr: found the blink status table, 3 short 1 long is .... not listed! lol
<samueldr> clever: link to the table
<clever> samueldr: 4 short is start.elf missing
<samueldr> it might be 3 short only
<samueldr> or uh
<samueldr> yeah
<samueldr> 3 short, and solid for a while
<samueldr> which I interpreted as one long
<samueldr> but might be generic failure to boot
<clever> there are uart flags you can enable within the spi flash
<clever> which will make it be more verbose about not finding the start.elf
<clever> but, if recovery.bin is doing its job, the spi flash should be ignored!
<clever> time to do some assembly diving...
<clever> 8000030e: 06 e8 00 20 00 7e mov r6,0x7e002000
<clever> common/broadcom/bcm2708_chip/intctrl0.h:#define IC0_BASE 0x7e002000
<clever> 8000030c: 08 60 mov r8,0x0
<clever> 80000314: 68 34 st r8,(r6+0x10)
<clever> that will put a 0 into r8, then write r8 to IC0_BASE + 0x10
<clever> which i think is an irq mask control
<clever> 80000328: 68 3b st r8,(r6+0x2c)
<clever> and it repeats for all 8 IC0_MASKn registers
<clever> 8000032a: 28 e6 10 08 00 30 st r8,(r6+2064)
<clever> common/broadcom/bcm2708_chip/txp.h:#define TXP_BASE 0x7e004000
<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> digging for it
<vika_nezrimaya> I'm so used to unstable, I'm even running production systems on it
<vika_nezrimaya> Unstable is so stable for me
<samueldr> oops
<samueldr> under the links tab, "Latest successful build from a finished evaluation"
<sphalerite> vika_nezrimaya: you could also put your ssh key in .ssh/authorized_keys from a different machine by sticking the SD card in.
<sphalerite> that leaves only systemctl start sshd
<samueldr> yep
<vika_nezrimaya> samueldr: I worked with Hydra before, don't worry :3
<samueldr> but with UART everything is trivial
<samueldr> vika_nezrimaya: you *may* need to tweak console= in the raspberry pi config.txt
<samueldr> I'm not sure it's right
<samueldr> I never checked I think
<tilpner> vika_nezrimaya: I've seen that too :(
<vika_nezrimaya> Oh, fresh out of the oven! Latest build is 1h old
<vika_nezrimaya> samueldr: if it's /dev/ttyAMA0,115200 it should work with my UART
<tilpner> (The reading dir: cannot allocate memory part)
<vika_nezrimaya> I'll double check it though
<vika_nezrimaya> tilpner: I think it's a QEMU bug
<samueldr> vika_nezrimaya: I was just saying in case :)
<tilpner> Could also be a bug in the module
<tilpner> (The module was worse than clevers a while ago)
<vika_nezrimaya> Oh, hey, there's a link to the latest, hottest unstable, no matter when you use it! https://hydra.nixos.org/job/nixos/trunk-combined/nixos.sd_image_raspberrypi4.aarch64-linux/latest/download-by-type/file/sd-image
<samueldr> I prefer letting the user see the generations and use the link :)
<samueldr> if it failed for like the last 20 builds, you'd be better informed
<vika_nezrimaya> I"m usually updating my unstable branch once in a month or two
<vika_nezrimaya> running off a git checkout
<samueldr> there's also the issue that downloading through hydra is not ideal; hydra may need to fetch the image, to serve it to you slowly
<vika_nezrimaya> yeah, it's fairly slow
<vika_nezrimaya> any ways to speed it up? are there mirrors?
<samueldr> you could nix-store --realise it
<samueldr> that's the only way I know
<vika_nezrimaya> nix-store whaaat wait-wait-wait where's the nix file for it?
<vika_nezrimaya> I kinda understand what you're talking about, but not sure if I think about the same file
<samueldr> click on details
<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
<samueldr> nix-store --realise /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]
vika_nezrimaya has joined #nixos-aarch64