Thursday, 2024-11-14

T42<b100dian> ok, I think I needed to make it real, not just boot /boot, but /dev/block/bootdevice/by-name/boot /boot. Thanks!00:04
T42<b100dian> maybe hybris-boot.img works too now :P00:04
T42<b100dian> before, I got "Skipping build of hybris-updater-script since HYBRIS_BOOT_PART is not specified"00:05
T42<b100dian> but now I don't get that and still no output, let me debug it further00:05
T42<b100dian> hmm make hybris-common ? is that expected to be needed? that generates the file00:07
ecrnProgram terminated with signal SIGSEGV, Segmentation fault.02:39
ecrn#0  0x0000007f704a1eb0 in import_exynos_ion_handles(private_handle_t*) () from /android/vendor/lib64/hw/android.hardware.graphics.mapper@4.0-impl.so02:39
ecrnhttps://pastebin.k4be.pl/view/raw/d60b00fb any ideas?04:20
ecrnthe ubuntu touch port I consider a warmup before trying to port SFOS on the device04:20
ecrnbecause there are no android/lineage sources yet04:21
ecrnbut the problem above probably is generic04:22
ecrnhttps://pastebin.k4be.pl/view/raw/8154a65a04:23
ecrnfaulting instruction is => 0x0000007f70121eb0 <+120>:     ldr     w0, [x20]04:24
ecrnand x20 is 004:24
ecrnand well, probably can't be anything else since there is no explicit write to the register between    0x0000007f70121e58 <+32>:      mov     x20, x0 and the faulting instruction04:25
ecrnoh wait, it is x0 not 0, so it is the function argument that is passed as NULL04:26
ecrnbut now it doesnt make any sense05:54
ecrnboth x0 and x20 on the faulting instruction are 0/NULL, and the function that calls the import_exynos_ion_handles is almost exactly like https://android.googlesource.com/device/amlogic/yukawa/+/f26afff/gralloc/mali_gralloc_reference.cpp#3705:56
ecrnwith the same validation05:57
ecrnhttps://pastebin.k4be.pl/view/raw/2f8f7da706:05
ecrni can't see how that would end up passing NULL to import_exynos_ion_handles06:11
ecrneven if called with invalid arguments06:12
T42<elros34> @b100dian just make hybris-updater-script but that is not a problem.Go bac to basics ff you still dont have init.log and 60s reboot then clearly you are in initramfs with failing /data mount or something missing in defconfig and without corrrect usb initialization.06:56
T42<elros34> Mind that hybris-recovery is same script, just one variable is different.06:58
ecrnwhere does android_log_printf output go on libhybris-loaded libraries?07:06
mallogcat07:08
malI think07:08
rinigus@elros34: something is off and, indeed, we have to go back to basics. although, after adding sleep 1 (instead of usleep), it does boot to sfos in terms of mounting /data and so on. but making telnet and init with debug2 as outlined last night would help.07:48
T42<b100dian> Yes, it is weird that hybris-boot doesnt have telnet and hybris-recovery does, abd boots. One thing I hoped would differ was the overhaul of mountpoints, which I didnt have locally for some days, I only had boot and userdata when I thought I made this work08:29
T42<b100dian> Theoretically I can continue edit and boot the build I had from OBS but I thought to also build locally and I am failibg at that:D So - I can boot, with rinigus's build, but cannot yet build. And rinigus builds but cannot boot:) Until yesterday IIUC08:31
rinigus@b100dian: yes, that's correct. now I can boot after switching to ext4 as userdata. but no telnet yet and that would require some troubleshooting tonight08:35
rinigusas for local builds, its mainly to build hal - rest we can push to OBS and be with it doing a job for us08:35
ecrnhttps://pastebin.k4be.pl/view/raw/0afc215909:07
ecrnif 3 is error code then it is ESRCH (No such process)09:10
ecrnis there some service for the "system environment" or what they could mean there?09:11
ecrnapparently that should not be the issue10:37
ecrnfunny thing, the host os booted normally and the lxc container booted in charger mode12:37
ecrndisplays charging animation12:38
*** amccarthy is now known as Guest941517:16
*** amccarthy_ is now known as amccarthy17:16
ecrnI have a feeling that something is broken with the libraries or linking19:07
rinigus@b100dian: I have telnet as well. that's with sleep 119:10
T42<b100dian> In hyris-recovery or boot?19:10
rinigusalso added init_enter_debug2 and can access it better19:10
riniguswith hybris-boot19:10
rinigusalthough, it sometimes disconnects and I have to restore connection on pc side (ip addr add...)19:11
rinigusfew observations from init: rndis_bam.rndis: No such file or directory19:12
T42<b100dian> great - then we just have to fix the OBS broken vendor_boot error and get to GUI 😄19:13
rinigusalso, as /etc/udhcpd.conf is symlink to /run, all attempts to write to it lead to nonexistent directory19:13
T42<b100dian> Yeah, also noticed the bam error but preferred minimal changes to hybris-boot errors so I left it there. I don't know about udhcpd.conf errors' source and I don't use dhcp for some time..19:14
riniguswell, works as it is for now.19:15
T42<b100dian> ah, maybe some /run is present in rootfs though19:15
rinigusits link to /run/usb-moded/udhcpd.conf19:15
rinigusso, to make it work, /run/usb-moded has to be created. but let's keep it as it is for now19:16
riniguswhat was vendor_boot issue?19:16
rinigusactually, I should check whether hybris-boot via rpm also works. not from out/...19:16
rinigusin addition, found how to get kernel config from boot image. wrote it down at https://github.com/sailfishos-sony-nagara/main/wiki/Extracting-data-from-stock-ROM#extracting-kernel-config19:17
T42<b100dian> oh, nice19:18
T42<b100dian> rinigus: nothing provides droid-hal-pdx223-kernel-modules-vendor_boot is one example error in OBS19:21
rinigus@b100dian: forgot to tell you, sorry! those are not needed - those packages are required for lvm root case. we right now have all images in droid-hal19:22
rinigusI have kept those just so it is easy for us to go back to lvm if we want19:23
rinigusso, mic should already work from OBS19:23
rinigus@b100dian: would be nice to replace get_ks with your xmllint approach - I think its better and probably works well from platform sdk too19:24
T42<b100dian> oh, good think I asked19:24
rinigus:)19:25
T42<elros34> rinigus rndis_bam is not really an error, it's there for compability with devices which uses different driver19:25
T42<b100dian> rinigus: xmllint has a small problem - too much standard compliance, meaning that if you have namespaces in your xml some queries fail, that's why there's a sed beforet hat step19:26
T42<b100dian> Elros: that's what I assumed too19:26
rinigusOK, I will test now with boot/dtbo/vendor_boot images we get from RPMs. hopefully this works too19:26
T42<b100dian> are images built on OBS? and are they from our hybris-boot? or you've built them locally and updated them with drioid-hal rpms?19:28
rinigus@b100dian: current images are built locally and I push them to obs19:30
rinigushttps://build.sailfishos.org/package/show/nemo:devel:hw:sony:nagara/droid-hal-nagara19:31
rinigusand they boot the same way as the ones from out/...19:31
rinigusjust their md5sum was different from out/...19:31
rinigusalthough, I may have regenerated images later with the same kernel/config as a part of make hybris hal19:32
rinigusso, telnet works with them too as long as you have init_enter_debug2 and sleep 1 in init script19:33
rinigusI suspect that these "Skipping ..." lines are a problem: https://paste.mozilla.org/wixNndGa/raw19:38
rinigusprobably need to adjust /usr/bin/droid/dmsetup.sh script19:38
rinigusalthough, it does go to stderr. so, maybe not19:40
T42<b100dian> not sure if those are a problem19:41
T42<Mister_Magister> @b100dian zenfone 8 port dead?19:43
T42<Mister_Magister> killed for good?19:43
T42<b100dian> @Mister_Magister it has one user 😉19:46
T42<b100dian> half from the old days19:46
T42<Mister_Magister> good, f asoos19:46
T42<Mister_Magister> i flashed stock onto it and flashed sfos onto fxtec prototype19:46
T42<Mister_Magister> now its degraded to being dedicated for android crap19:46
T42<b100dian> you know you have a bootloader unlocked zenfone 8, maybe somebody else wants a small device with sfos19:47
T42<b100dian> Although me fixing the wifi bug is probably 0 chance19:47
T42<Mister_Magister> somebody else would have to buy device thats unlockable19:47
T42<Mister_Magister> and not absolute garbage19:47
T42<Mister_Magister> that dumps ram on production19:48
rinigus@b100dian: I am pretty sure that dmsetup fails. but not because of Skipped lines. right now, after disabling usb-moded I could check available devices19:58
rinigusand we have only dynpart-odm_a and dynpart-product_a19:59
rinigusif I manually add text to dmsetup for system_a (see my paste) which consists of multiple parts - it fails20:00
rinigusfor dynpart-system_ext_a works20:01
T42<b100dian> Hmm.. I've only analyzed super img from unsin/stock20:01
T42<b100dian> but I thought the structure and partition names are kept when you flash aosp in fastbootd mode20:02
rinigus@b100dian: they probably are. note that system_a is the only one with multiple linear components20:05
rinigusthat's easier to see if I split the string by ; as here: https://paste.mozilla.org/OpaY9ubx/raw20:05
T42<b100dian> actually I now see that you used sda93 so that is the same structure apparently20:05
T42<b100dian> god20:06
T42<b100dian> I see what you mean20:07
ecrnis 93 partitions crazy yet?20:07
rinigus93 is not the last one :)20:08
T42<b100dian> it's from '9320:08
T42<K31j0> Couldn't we just format something to ext4 and call it /20:10
T42<Mister_Magister> noo u dumb?20:10
T42<Mister_Magister> how would that function20:10
T42<Mister_Magister> you need separate partition for every directory no matter that btrfs subvolumes would achieve the same thing20:10
T42<Mister_Magister> GPT can have up to 128 partitions so i'm going to use all of them goddamnit!20:11
rinigusre formatting: not our call20:13
riniguswhere are the sources of device-mapper spec?20:13
T42<elros34> soon they will invent something to save space like dynamic partitions v2 -> directories20:13
rinigushttps://github.com/sailfishos/device-mapper is archived20:14
rinigusfound it - lvm220:14
T42<Mister_Magister> they gonna put everything on one partition and partition it in lvm so that they can have even more partitions (re @elros34: soon they will inven...)20:14
T42<Mister_Magister> separate lvm disk for each slot so 128 partitions per slot!20:15
T42<elros34> so you wan to put partition in partition to have more partitions?:)20:15
riniguslovely. lvm2 is from 6 years ago20:16
T42<Mister_Magister> there's nothing up-to-date in sfos :) and there wasn't for years20:16
T42<Mister_Magister> exactly @elros3420:16
T42<b100dian> rinigus: but system.. we can package that back into rootfs, that would be compatible even with lineageos build20:17
T42<b100dian> only system is at problem?20:18
T42<Mister_Magister> you can any time you want, jolla is doing that20:18
rinigus@b100dian: in principle, yes. so far only system20:18
T42<Mister_Magister> we did that on fxtec20:18
T42<K31j0> I will (re @Mister_Magister: noo u dumb?)20:18
T42<Mister_Magister> tbh if you figured out which partitions does xbl use you could probably remove some20:18
T42<K31j0> Time to enable zfs20:18
T42<Mister_Magister> and once in sfos you can just mount images and android would be non the wiser20:19
T42<K31j0> raid0 deez20:19
rinigusI'll check the sources and see if there was a fix for it20:19
T42<b100dian> there must be a way to un-super-ize the device, but that would put a high barrier on installing20:19
T42<Mister_Magister> naah if you made nice installation script there should be no issue20:20
T42<Mister_Magister> i remember resizing partitions on my old htc explorer20:20
T42<Mister_Magister> just remove partition by partition until it no longer boots fastboot20:21
T42<b100dian> yeah, but there's always that guy that pastes from word^H^H and everything blows up20:21
T42<Mister_Magister> ah classic, i was helping guy once who couldn't copy paste20:22
rinigus@b100dian: as we probably will want to base the port on stock after this aosp exercise . so, would be good to fix it on dmsetup / parse-android-dynparts level20:22
T42<b100dian> what's team Verdandi working on now? OP6/T?20:22
T42<Mister_Magister> op6(t) is semi-done20:22
T42<b100dian> yes, but that system also has sources20:22
T42<Mister_Magister> i'm planning jolla tablet v220:22
T42<Mister_Magister> nobody ported tablet in a while20:22
T42<Mister_Magister> op6 needs rebasing to android 11 but first apps need work20:23
T42<Mister_Magister> i had guy complain that he can't open 50 apps because oom kicks in but tbh he also complained he has to follow instructions to get it to work20:25
T42<Mister_Magister> but other than that more and more people are buying it and i hear little complaints20:25
rinigus@b100dian: looking at dmsetup source it seems all to be OK. should support multiple elements as well20:26
rinigusthe error message is actually "device-mapper: reload ioctl on dynpart-system_a  failed: Invalid argument"20:29
rinigusalso, we have wait_for_keymaster[1630]: [gbinder] ERROR: Can't open /dev/hwbinder: No such file or directory20:30
rinigusbut that /dev/hwbinder is listed in ls -l20:31
T42<b100dian> I just booted with fresh mic and old hybris-recovery. I have /dev/binderfs/hwbinder though, not /dev/ one20:36
T42<b100dian> I see that only two partitions are mounted on dmsetup as you mentioned20:36
rinigus@b100dian: my mistake, /dev/hwbinder is missing indeed20:38
T42<b100dian> Maybe we can link it from droid hal pre init. But lets focus on dyn parts for now20:39
rinigusagreed20:42
T42<b100dian> dmsetup sh in dmesg20:43
T42<b100dian> device-mapper: table: 253:2: linear: Invalid argument count20:43
T42<b100dian> device-mapper: ioctl: error adding target to table20:43
riniguscan't find these messages in lvm2 sources. in kernel?20:50
riniguslooks to be from kernel/drivers/md/dm-linear.c20:53
T42<b100dian> yes, they're in kernel/drivers/md/dm-ioctl.c 2192 and 139620:53
T42<b100dian> and dm-linear.c yes20:53
T42<b100dian> hopefully there's some config that would unlock the support20:55
rinigusLet's hope so. Would have to read the sources and maybe see how android is mounting it.21:02
T42<b100dian> looks as if parse-android-dynparts adapts android C code21:04
rinigus@b100dian: I'll continue tomorrow, let's see what you will find21:11
T42<b100dian> ringus: still an updated dmsetup / device-mapper package sounds like a fun project.21:17
T42<b100dian> https://gitlab.com/lvmteam/lvm2/-/blob/main/WHATS_NEW_DM didn't find anything that jumps out21:17
ecrnis android libraries abi stable within given android version?21:30
ecrnbecause if not, that could explain the sigsegv I'm getting21:37
ecrnsomething is overwriting class members21:37
ecrnin the counstructor, mind you21:38
T42<b100dian> ecrn: you mean like an inline initializer that steps on virtual methods? or, what type of members, data?21:57
T42<b100dian> mal: do we have aio / as in https://gitlab.com/lvmteam/lvm2/-/blob/main/lib/device/bcache.c?blame=1#L29 ?22:12
T42<b100dian> at least my host dmsetup works with the wonky super.img https://paste.mozilla.org/RafuTi9i/raw22:15
ecrndata members22:19
ecrnthe method tables possibly too, but unproven22:20

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