ChanServ changed the topic of #robotnix to: Robotnix: https://github.com/danielfullmer/robotnix || Channel logs: https://logs.nix.samueldr.com/robotnix
ajs124 has quit [Quit: Bridge terminating on SIGTERM]
ajs124 has joined #robotnix
henri has joined #robotnix
<henri> danielrf[m]: I think you haven't pushed the latest chromium webview to cachix.
<danielrf[m]> Thanks for the reminder. Let me do that now
<danielrf[m]> Ok, should be up on cachix
<henri> Great, thanks!
henri has quit [Quit: ERC (IRC client for Emacs 27.1)]
Miyu-saki has joined #robotnix
<Miyu-saki> Hi! \o
<danielrf[m]> hello!
<Miyu-saki> Hmmm
<Miyu-saki> I'm the one helping debug https://github.com/danielfullmer/robotnix/issues/92
<Miyu-saki> (Well, I think that's pretty much fixed now, the build.)
<Miyu-saki> the build process*
<danielrf[m]> Tjat
<danielrf[m]> *That's good to hear!
<Miyu-saki> Though, it still doesn't fully boot, because of the modem. I have a feeling that bringup's broken because of missing firmware.
<Miyu-saki> 03-01 13:36:47.972 0 0 W : [20210301_13:36:47.943220]@1 mhi 0002:01:00.0: Falling back to syfs fallback for: sdx55m/sbl1.mbn
<Miyu-saki> 03-01 13:36:47.972 0 0 E : [20210301_13:36:47.952950]@1 [E][mhi_fw_load_handler] Error loading fw, ret:-11
<Miyu-saki> (There are lines between there that I redacted)
<Miyu-saki> Oh, this one too actually.
<Miyu-saki> 03-01 13:36:47.972 0 0 E [20210301_13:36:47.952548]@1 ueventd: firmware: could not find firmware for sdx55m/sbl1.mbn
<Miyu-saki> I checked LineageOS's repos, and this doesn't seem to exist. My guess then is that this is written into ROM, and presented to Linux by some other device.
<danielrf[m]> but I don't see those
<Miyu-saki> Okay, I'm pretty sure this is the offending line.
<Miyu-saki> 03-01 13:38:30.034 0 0 E [20210301_13:38:30.033908]@1 ueventd: firmware: attempted /vendor/firmware_mnt/image/sdx55m/sbl1.mbn, open failed: No such file or directory
<Miyu-saki> And the way to get access to that is
<Miyu-saki> mount /dev/block/by-name/modem $root/system/vendor/firmware_mnt
<Miyu-saki> Welps, this is even more debugging then. I need to figure out why MHI(?) is not workign from the start.
<danielrf[m]> I could be wrong, but I didn't think lineageos tried to handle updates to the modem partition at all
<Miyu-saki> Yep
<danielrf[m]> and that they suppose that the user does that themselves
<Miyu-saki> Oh wait, I actually have a question.
<Miyu-saki> Is `modem` writable?
<Miyu-saki> Or is it burnt?
<samueldr> it may be part of the vendor partition, or a modem partition, depending on the "SoC family" setup and how it's setup
<samueldr> and generally it's installed through a ROM update
<samueldr> I know on xiaomi family devices there are flashable zips made from the official roms specifically to update those kind of partitions
<Miyu-saki> Oh okay. Are there device-unique blobs there or nay?
<samueldr> (bootloader, vendor, etc)
<samueldr> model-specific, yes, device-unique, maybe, but not sure where they are
<samueldr> device-unique I mean your specific unit
<samueldr> e.g. your IMEI
<Miyu-saki> Right, thanks. I'll have to check why that isn't being mounted.
<samueldr> /dev/block/bootdevice/by-name/modem /vendor/firmware_mnt vfat ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait,slotselect
<samueldr> that's what the stock rom uses
<samueldr> and I can kind of confirm that indeed the modem partition should have that file in it
<samueldr> so I expect that this partition has to be mounted for lineageos
<samueldr> (it won't ever be on themuppets AFAIUI)
<Miyu-saki> Hmm. I'll go ask him why that's not being mounted.
<samueldr> btw, I don't actually know much about the android build process, all my knowledge comes from running non-Android things ;)
<danielrf[m]> Haha, I feel like I only know about the android build process, but very little about any non-pixel devices
<samueldr> like, I don't know what to do from that knowledge
<samueldr> danielrf[m]: AFAIUI oneplus devices try to follow the AOSP ways of doing things quite closely
<samueldr> AFAIK they were the second OEM to ship fastbootd
<Miyu-saki> Neither do I. :D I'm just really winging it as much as I can.
<danielrf[m]> that's nice to hear
<samueldr> Miyu-saki: look and see if the modem partition has an A/B scheme
<samueldr> it might be that the device never had an update that filled the "B" slot
<Miyu-saki> Thanks for the help. Right now, he's offline though.
<samueldr> and thus an empty partition?
<samueldr> (motorola devices can be soft bricked because of that)
<Miyu-saki> How do I figure out if it has an A/B scheme?
<samueldr> the device is A/B that's for sure
<samueldr> I think `fastboot getvar all` will list each partitions in some ways
<samueldr> (I always have to check that)
<samueldr> or else in a booted system listing the partitions by name
<Miyu-saki> Thanks. This sadly results in a kernel panic. Though, I wonder what'd happen if we disable this particular driver.
<samueldr> for some devices you need the appropriate firmware for the driver in use, and in turn, these drivers can be updated with the major android version in use
<samueldr> >> Make sure you're on a recent version of OxygenOS.
<samueldr> my best guess is that this is to ensure the modem partition is up to date or something along the line
<Miyu-saki> Thanks. I'm pretty sure this is where the majority of the problem is at.
<samueldr> (I'm actually relatively concerned about what will happen when I'm at this stage in Mobile NixOS)
<samueldr> it won't be fun!
<danielrf[m]> which part?
<danielrf[m]> lots of these questions about lineageos I feel very underqualified to provide support for :)
<samueldr> danielrf[m]: firmware files!
<samueldr> how to get the right ones for the kernel trees in use
<samueldr> but actually how to identify we are using the right ones or not
<danielrf[m]> for google-marlin I grab them from the upstream image: https://github.com/NixOS/mobile-nixos/blob/master/devices/google-marlin/firmware/default.nix
<danielrf[m]> but yeah, either having the user provide their own firmware to the nix build, or just using vendor or modem partitions seems likely to break
<samueldr> yeah, I was thinking in a more general way, are we even sure those are the right ones for the kernel tree
<samueldr> the kernel is from the android stable project
<danielrf[m]> only speaking about google-marlin for now since that's all I know
<samueldr> yeah
<danielrf[m]> the android stable kernel for marlin is based on the sources from google
<danielrf[m]> and the kernel source from google should match the factory image zip
<danielrf[m]> dunno about whether anything guarantees like that can be had for other devices
<samueldr> ah, I see that the merge commit was tagged with the version https://github.com/android-linux-stable/marlin/commit/b69581b25fa7273424ef78aa82c3fd1dc05db0a9
<samueldr> not tagged, but includes*