h0m1 has quit [Quit: WeeChat 2.8]
h0m1 has joined #nixos-aarch64
Darkmatter66 has joined #nixos-aarch64
Darkmatter66_ has quit [Read error: Connection reset by peer]
<hexa-> rpi4 with ssd attached online
<hexa-> just moved the /nix store from the sd card, updated filesystems and nixos magic
<hexa-> awesome!
h0m1 has quit [Ping timeout: 260 seconds]
h0m1 has joined #nixos-aarch64
<julm> :)
<hexa-> aaaand I borked it resizing/recreating the boot partition
<hexa-> sigh
<hexa-> I wonder where I went wrong
<hexa-> used fdisk to delete all partitions, recreated the boot partition from sector 16k, but larger
<hexa-> wipefs'd the partition and mkfs.vfat -F 32 -n FIRMWARE /dev/mmcblk0p1
<hexa-> mounted, rebuilt, rebooted
<hexa-> doesn't boot
<samueldr> you still have an sd card in the pi4, right?
<hexa-> yep
<samueldr> AFAIK it still can't boot from usb alone
<hexa-> it carries /boot
<samueldr> good
<samueldr> just checking :)
<hexa-> but the green light won't turn on at boot :)
<hexa-> so I messed something up
<samueldr> since you made a new fs, did you verify it added all the things required for the pi4?
<clever> nixos doesnt manage a lot of the firmware in the firmware fs
<hexa-> looked pretty good to me
<samueldr> clever: it's a bit more complicated, by default it doesn't but there are ways to make it do so
<samueldr> oh, you copied files
<samueldr> (which is good)
<hexa-> I backed up /boot to /boot.bak
<hexa-> and recreated /boot's content by rebuilding
<samueldr> I really don't know though :/
<hexa-> rpi4, still a shitty platform to debug in 2020
<samueldr> did you look at the sd card on another device?
<samueldr> like your computer
<hexa-> omw
<clever> hexa-: do you have a uart adapter?
<hexa-> i do
<clever> hexa-: do you know how to operate rpi-eeprom-config?
<hexa-> i've never heard of that
<clever> hexa-: the rpi4 has firmware on an SPI chip, that manages loading start4.elf from the SD card (and other tasks)
<clever> hexa-: the .bin files in here, are the SPI firmware
<clever> hexa-: and rpi-eeprom-config is a python script to extract bootconf.txt from a bin, and re-embed it back into the bin
<hexa-> ok
taktoa[c] has joined #nixos-aarch64
orivej has quit [Ping timeout: 260 seconds]
<clever> hexa-: if you then copy that .bin to `pieeprom.bin`, put a sha256sum into pieeprom.sig, and include recovery.bin, all on an SD card
<clever> then it will "unbrick" itself, by flashing that new bin file
<hexa-> uh ok, what part of it will unbrick itself?
orivej has joined #nixos-aarch64
<clever> and if you edit the bootconf.txt, to say `BOOT_UART=1`, then the SPI firmware will print logs to the uart while it boots
<hexa-> oh that is neat
<clever> hexa-: recovery.bin is a VC6 program to re-flash the SPI chip
<clever> it reads pieeprom.bin, and expects a sha256 in pieeprom.sig
<hexa-> ok
<clever> once you enable that first layer of debug, you can see any problems loading start4.elf
<hexa-> that's neat
<hexa-> thanks
<clever> start4.elf then has its own debug, uart_2ndstage=1 in config.txt
<hexa-> man, you should write that down /o\
<clever> most of that is in the official docs
<hexa-> fair
<clever> whats not in the docs, is that recovery.bin, and parts of pieeprom.bin are signed with hmac-sha1
<hexa-> ok
<hexa-> oh neat, it dumps the eeprom to stdout :)
<clever> yeah, its rough around the edges :P
<clever> ive reverse engineered the eeprom format, and made a haskell decoder for it
<clever> but havent made an encoder yet, to re-assemble it
<samueldr> danielrf[m] I can't figure out what was done to fix delta_generator not finding libprocessgroup.so in robotnix
<hexa-> hm, nothing on the uart :)
<hexa-> so it probably can't make sense of the vfat
<clever> hexa-: what does `fdisk -l /dev/something` say?
<hexa-> /dev/sda1 16384 1064959 1048576 512M 83 Linux
<hexa-> oh
<hexa-> derp
<samueldr> ah
<hexa-> now I see it.
<samueldr> you got 83 problems, and a partition type id is one
<samueldr> (I guess)
<danielrf[m]> samueldr: I actually can't recall either
<hexa-> yep, that was it
<hexa-> thanks clever, thanks samueldr
<clever> hexa-: once the SPI has been flashed with BOOT_UART=1, it should be capable of reporting that error over the uart
<samueldr> and looking at what you did, I don't see a fix, danielrf[m], but it works for LineageOS! while here for carbonrom it really doesn't, and `find` in otaToolsQuick makes me think it's not built?
<clever> samueldr: ive also confirmed that the rpi4 mask rom, can load firmware from an ESP on a GPT SD card
<hexa-> that is very helpful
<hexa-> wonder why that is not default
<clever> samueldr: but recovery.bin and the SPI firmware cant load the next stage in such a setup
<clever> hexa-: it will mess with things you put on the uart, like an arduino
<samueldr> ah, clever, so it's fixable to load on GPT with an update?
<hexa-> oh right
<danielrf[m]> and originally you had the problem with lineageos, not carbonrom?
<samueldr> danielrf[m]: yep
<clever> samueldr: yep
<samueldr> I wouldn't have slily tested with the wrong setup :)
<clever> samueldr: i was reading the mask rom and found the string "EFI PART", which is from the gpt headers
<clever> samueldr: further digging, and i found the uuid type-codes for ESP and microsoft basic data
<clever> samueldr: if you put a fat32 on either of those, the firmware can read it
<danielrf[m]> oh, but you did it against lineage-17.0 first right?
<danielrf[m]> maybe it was fixed in lineage-17.1?
<samueldr> oh, right
<samueldr> good catch
<samueldr> so you probably never fixed "that", good
* samueldr digs
<danielrf[m]> haha yeah I don't recall ever encountering the problem myself
<samueldr> I should have asked sooner
<samueldr> I can probably find a fix somewhere in lineageos' tree
<samueldr> now I only have to figure out what project in the... bajillions :)
<hexa-> hmm, i derped
rasmusm has quit [Ping timeout: 260 seconds]
* samueldr thinks...
<hexa-> i missed renaming the vl805.bin, it wrote the eeprom, and now it tells me it's missing vl805.bin
<samueldr> or use the lineageos otaTools in some way
<danielrf[m]> So, just guessing, but maybe check what tools get copied into otatools.zip in `build/make` repo
<clever> hexa-: vl805.bin is optional
<clever> hexa-: thats the usb3.0 controller firmware
<hexa-> the root fs is on an usb drive
<clever> hexa-: recovery.bin just gets both, so it fixes usb incase it was also bricked
<danielrf[m]> core/Makefile has the otatools target
<danielrf[m]> sorry, `build/make/core/Makefile`
<samueldr> found it anyway, it was clear enough with the path split in two thoughts
<samueldr> whew, that's a thick makefile
<danielrf[m]> yeah it's a mess
<danielrf[m]> haha
<danielrf[m]> their newer stuff uses `soong` and is quite a bit more readable
<hexa-> clever: not sure what that fatal error is telling me then
<clever> hexa-: what did it print on the uart?
<hexa-> 04:06 <hexa-> https://bpa.st/UVHA
<hexa-> │·······································································································································
<clever> hexa-: the eeprom is already flashed, so you can now delete recovery.bin from the card
<hexa-> oh ok
<hexa-> so much to learn
<hexa-> looks good, thanks
<clever> hexa-: if you boot it again, (even without an SD), what does it now say on the uart?
<hexa-> https://bpa.st/JADA with sdcard
<clever> hexa-: yep, the fat32 typecode is now correct, and its loading start4.elf
<hexa-> thanks again
<hexa-> clever++
<{^_^}> clever's karma got increased to 416
<samueldr> danielrf[m]++ that pointed me to the right file, and while I have a new missing dep, libprocessgroup was found
<{^_^}> danielrf[m]'s karma got increased to 3
<danielrf[m]> :)
Darkmatter66_ has joined #nixos-aarch64
Darkmatter66 has quit [Ping timeout: 256 seconds]
Darkmatter66 has joined #nixos-aarch64
Darkmatter66_ has quit [Ping timeout: 256 seconds]
vika_nezrimaya has joined #nixos-aarch64
vika_nezrimaya has quit [Ping timeout: 246 seconds]
alp has joined #nixos-aarch64
alp has quit [Ping timeout: 272 seconds]
alp has joined #nixos-aarch64
alp has quit [Remote host closed the connection]
alp has joined #nixos-aarch64
orivej_ has joined #nixos-aarch64
orivej has quit [Ping timeout: 272 seconds]
Acou_Bass has quit [Ping timeout: 258 seconds]
zupo has joined #nixos-aarch64
Acou_Bass has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alp has quit [Ping timeout: 252 seconds]
zupo has joined #nixos-aarch64
alp has joined #nixos-aarch64
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rasmusm has joined #nixos-aarch64
zupo has joined #nixos-aarch64
rasmusm has quit [Quit: Lost terminal]
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zupo has joined #nixos-aarch64
h0m1 has quit [Ping timeout: 244 seconds]
h0m1 has joined #nixos-aarch64
alp has quit [Remote host closed the connection]
dan_b` has joined #nixos-aarch64
<dan_b`> well, I think I have the beginnings of a port to moto g6 plus (potter)
<dan_b`> but am wondering if it should be possible to put the rootfs on the external microsd card so I don't have to flash anything
<dan_b`> https://github.com/NixOS/mobile-nixos/compare/master...telent:potter?expand=1 is a copy of the motorola-addison directory and then random(ish) kernel config changes until usb networking started working
<dan_b`> (not proposing it for merge, strictly experimental)
<dan_b`> damn typo, I meant *g5* plus, not g6
<dan_b`> naming fault and off-by-one error, computer science is hard
alp 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]
Darkmatter66_ has joined #nixos-aarch64
Darkmatter66 has quit [Ping timeout: 240 seconds]
nschoe has joined #nixos-aarch64
nschoe has quit [Remote host closed the connection]
zupo has joined #nixos-aarch64
nschoe has joined #nixos-aarch64
dongcarl has quit [Quit: Ping timeout (120 seconds)]
dongcarl has joined #nixos-aarch64
ornxka has quit [Quit: No Ping reply in 180 seconds.]
ornxka has joined #nixos-aarch64
alp has quit [Ping timeout: 244 seconds]
alp 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]
vika_nezrimaya has joined #nixos-aarch64
orivej_ has quit [Ping timeout: 256 seconds]
orivej has joined #nixos-aarch64
<samueldr> dan_b`: the rootfs is searched using its partlabel
<samueldr> dan_b`: so it should work as long as the kernel detects it in the stage-1
<samueldr> dan_b`: other options than SD card could be via a USB drive on an OTG adapter, or simply Type-C if your device has a type-C connector
<samueldr> oh, duh, dan_b` is telent lol until you corrected for g5 I was thinking “I should get telent to know about that port”
<hexa-> hm, the wifi on the rpi4 is somewhat flaky
<hexa-> i configured hostapd but sometimes … more often than not … i don't see the ssid being broadcasted
<hexa-> the ap is not hidden … rip
<samueldr> if you're using hdmi at the same time, it may be better to use a usb wi-fi adapter or ethernet
<samueldr> they could be interfering
<hexa-> nope, headless
<samueldr> or if you're using bluetooth at the same time, too
<hexa-> nope
<samueldr> then it could be as bad as some say it is :/
<hexa-> meh :<
orivej_ has joined #nixos-aarch64
orivej has quit [Ping timeout: 256 seconds]
<samueldr> dan_b`: don't be shy, and open a Draft PR for your device, as soon as it is verified to boot, and some nitpicks taken care of (if any) it can be merged
alp has quit [Ping timeout: 272 seconds]
orivej_ has quit [Ping timeout: 246 seconds]
alp has joined #nixos-aarch64
Gaelan has joined #nixos-aarch64
pbb has quit [Remote host closed the connection]
nschoe has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
pbb has joined #nixos-aarch64
alp has quit [Ping timeout: 244 seconds]
zupo has joined #nixos-aarch64
zupo_ has joined #nixos-aarch64
zupo has quit [Ping timeout: 246 seconds]
zupo_ has quit [Client Quit]
pbb has quit [Ping timeout: 256 seconds]
pbb has joined #nixos-aarch64
pbb has quit [Ping timeout: 265 seconds]
pbb has joined #nixos-aarch64
alp has joined #nixos-aarch64
alp has quit [Ping timeout: 265 seconds]
alp has joined #nixos-aarch64