Sunday, 2024-11-24

rinigus@b100dian: I started looking into lineage porting. use xperia 1v and 1iii as a base for the device repos and look into aosp as well. for kernel, as first step, will try to use binary packaging. couldn't make it compile yet09:46
riniguswill continue today - bit of a learning curve09:47
T42<b100dian> Isn't the hardest problem still the finding of a kernel?10:38
rinigus@b100dian: don't think so. if we move to lineage, it seems that they have it relatively under control.10:41
riniguskernels for sonys are usually organized as kernel repo + modules repo + devicetree repo. see https://github.com/LineageOS?q=kernel+sony&type=all&language=&sort=10:42
rinigusobviously, sm8450 is absent. they have kernel for qcom sm8450, but not specific device.10:43
rinigusexample device kernels for sm8450 can be obtained from https://github.com/cupid-development10:43
rinigusmy plan is to get some kind of lineageos up and ask for help if I get stuck somewhere. when I get to kernel then ask for help from lineage on how to get sm8450 kernel up10:45
malwhat was the problem with sony kernel?10:46
rinigusmaybe we can even use aosp kernels, don't know.10:46
rinigusbut it seems like there are some extra checks for kernel when trying to boot stock with something else. I get some corrupt device messages when trying to do so. even when trying to combine kernel itself with stock ramdisk10:46
rinigusbut maybe aosp kernel would work with lineage. even if it is based on stock10:47
rinigus@b100dian: ^10:49
T42<b100dian> You mean something in first stage init will block based on sone criteria in the boot image, and the Lineage init woukd be more allowing?10:51
T42<b100dian> Hmm.. Wonder if I just package the gki into hybris-boot + ext4 /data and rootfs..:)10:52
malhow does the device behave now? does it complain about corrupt kernel or what?10:52
T42<b100dian> I am bit behind where you were at this week beginninf, tryibg a gki from 2024-01, the second to last (r16  IIRC) has my exact build signature of stock10:53
rinigusmal: my device is back on stock and I am mainly working on lineage right now. with gki I stopped - got mainly discouraged by gki results so far and wanted to go a way that seems to me the best for our port10:55
rinigus@b100dian: it is hard to pinpoint what was going wrong with such kernel swap. vbmeta was disabled, but that didn't help10:56
rinigusbut as we know that lineage works for all other xperias, it should be possible to boot if I mimic their approach10:57
rinigus@b100dian: if you pull off gki trick, I'd be happy to switch to that :)10:58
rinigus@b100dian: I've pushed scripts that simplify running unsin on stock rom and allow you to mount extracted images on PC in a way that is similar to that on the device14:11
rinigusreadme has been updated as well at wiki/extracting data from stock14:11
T42<b100dian> 👍14:46
T42<b100dian> rinigus: question, for build.fingerprint when packaging aosp's gki, what did you use?15:46
T42<b100dian> I see the stock vendor.img and boot.img use "$xyz..:user/release-keys", is it possible that it is required for them to match?15:47
rinigus@b100dian: as far as I understood, aosp kernel is not gki one. it has no modules and supports the hardware by itself. so no need for vendor modules16:02
rinigusfor keys, I think I varied. not sure its important, as I think it booted google's gki with varying fingerprints16:03
rinigusbut don't remember for sure though16:03
T42<b100dian> Ok, I've tried building this one https://source.android.com/docs/core/architecture/kernel/gki-android12-5_10-deprecated-builds#android12-5.10-2024-01 r16, and was trying to package it. Looks gki in the name and probably config, didn't check config16:06
rinigus@b100dian: should be good, unless you had newer stock16:08
rinigus@b100dian: I had a script for packing, not sure I pushed it anywhere16:09
rinigus@b100dian: script: https://paste.mozilla.org/J5SLgvjV/raw16:12
rinigusjust replace PATH with location of your android sources16:12
rinigusand check your patch level + fingerprint16:13
rinigusand if you need, one for processing gki boot.img files to repack them in a way that would allow them to boot16:14
rinigusI'll add the scripts to the main repo in few minutes16:14
T42<b100dian> I picked that one because it matches exactly the sha of my stock 5.10.198-android12-9-00043-g4d382310f0e9 in the build log https://ci.android.com/builds/submitted/12017590/kernel_aarch64/latest/view/logs%2Fbuild.log16:15
T42<b100dian> Yes, I saw the kernel_su fingerprint, but I don't understand how that works. I am not starting from having a boot image already, but from having a Image.lz416:16
T42<b100dian> actually nevermind, even without avb signing, it booted into lineage. So I am where you were a couple of days ago, without hybris kernel changes16:20
rinigus@b100dian: you should use Image not Image.lz416:20
T42<b100dian> Yeah, I unpacked that, sorry for misguiding16:20
rinigus@b100dian: I've added 2 scripts to main. one allows you to pack boot.img from google gki to the boot.img that should boot on our devices. the second one allows you to pack kernel+ramdisk into boot.img16:28
rinigusits basically along the lines described at the end of https://github.com/sailfishos-sony-nagara/main/wiki/Extracting-data-from-stock-ROM16:28

Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!