libera/#maemo-leste/ Tuesday, 2021-07-20

uvosWizzup: yes00:28
uvosWizzup: and yes00:28
uvosyou might want to build the kernel by running make localmodconfig and changing every =m to =y00:35
uvosthats how the bionic bootloader kernel is built00:36
uvosand allows you to see whats going on if, for instance, the kernel fails to find the rootfs becuase the d3's sdcard slot is connected to a different mmc port or whatever00:37
uvosmake localmodconfig run on some other mapphone ofc00:37
Wizzupok00:51
Wizzupuvos: so the mkbootimage output is what I give to safestrap?11:04
uvosif safestrap where a normal android bootloader yes11:04
uvosbut there was some detail i am forgetting11:05
uvosi think you need something on /system as well11:05
uvosmaby look at a old maemo image11:05
uvosthey used to use safestrap11:05
WizzupI think we used to use safestrap for the d4 on leste, we could maybe dig that up11:05
uvosyeah11:05
uvosor unpack a los image11:06
uvosand look at what it dose11:06
uvosor just skip safe strap and kexec from android11:06
uvosby unpacking safestrap and using the kexec.ko and uart.ko and its kexec binary directly11:07
uvosand use it via adb shell11:07
uvosthat should also work11:07
Wizzupoh, kexec from adb shell in safestrap you mean?11:07
uvosthat might also work11:07
uvosbut i ment from normal android11:07
Wizzupoh, ok11:07
uvosjust adb shell into normal android and load the .ko and then kexec your image11:08
uvosthis works on los d411:08
uvos(but pvr ends up broken)11:08
uvosif you do it form safestrap pvr might even work11:09
uvosidk at what stage the boot process is at that point11:09
uvosandroid calling psvrinit breaks it11:09
uvossafestrap starts itself by hijaking the andoid userspace boot pretty early11:10
Wizzupparazyd: ping11:14
Wizzupuvos: btw you said this:11:15
Wizzup21:11 < uvos> you can just lift the modules from the safestrap apk11:15
Wizzup21:11 < uvos> they are in there11:15
Wizzup21:11 < uvos> and its just a zip11:15
uvosyes11:15
Wizzupbut I don't see them I think11:15
Wizzupoh they are in another zip..11:16
Wizzupok11:16
uvosinstall-files.zip yeah11:16
uvosi think we can just use those for clown boot too, i dont remember why i build the bionic ones myself maybe to activate some debugging11:17
uvosthen you dont have to build ainchent gcc11:17
Wizzup(or just install ancient debian :p )11:17
uvosyeah11:17
Wizzupok, let me grab my bionic sd card, I think I build a dtb as well11:18
Wizzuphttps://dpaste.com/D5HBUV2JW11:19
Wizzuphang on11:19
Wizzuphttps://dpaste.com/9FCAPVKLG this is what I meant to paste11:19
uvosyou will want to keep the bionic compatible for now11:20
uvosthere is a check in the cpcap driver that activates a path for older cpcap regulator setup11:20
Wizzupgood to know11:20
Wizzuphttps://dpaste.com/CYHWPLTD9 ?11:21
uvoslooks sane11:21
uvosWizzup: you need to add solana/d3 to the if at line 248 in arch/arm/mach-omap2/pmic-cpcap.c11:26
Wizzupah, ok, then I'll need to build a new kernel as well11:28
WizzupI was planning to re-use the bionic one11:28
uvosor just use the bionic compatible11:28
uvosto test11:28
Wizzupok, yeah, I reverted to that11:28
Wizzupok, I misunderstood11:28
Wizzupyeah the latest paste I shared is what I want to try first11:28
Wizzupupgrading the bionic first11:29
Wizzup(the sd card)11:29
Wizzupuvos: maybe logwrapper was the thing?11:47
uvoswhat thing?11:47
uvosthats the script it hijacs11:48
Wizzupthat you  tried to remember or something11:48
Wizzupoh, ok11:48
uvossafestraps injects itself there11:48
uvosso dose clownboot11:48
Wizzupuvos: hm...12:00
Wizzup~ # insmod /sdcard/bootattempt/uart.ko12:00
Wizzupinsmod: can't insert '/sdcard/bootattempt/uart.ko': invalid module format12:00
uvoshmmm12:01
uvosstrange12:01
Wizzup<3>[  310.889282] board_mapphone_emu_uart: version magic '2.6.35.7 SMP preempt mod_unload ARMv7 ' should be '3.0.31+ SMP preempt mod_unload modversions ARMv7 '12:02
Wizzupyeah ok so safestrap has a newer kernel12:02
uvosthats the wron safestrap then12:02
uvosthats for android 412:02
uvosyou need a older one12:02
WizzupI mean, the safestrap works just fine12:02
Wizzupso you're saying I need 2.x, not 3.x ?12:03
uvosno12:03
uvosit shows the menu just fine12:03
uvosif you try and kexec from it it wont work either12:03
uvosonly the stock slot will work12:03
uvosbecause thats pivot_root12:03
Wizzupwhy do they recommend this on all the docs then12:03
uvosno idea12:03
WizzupI don't think it would make sense if it was pivot_root, since this is kernel 3.x12:03
Wizzupandroid is 2..6.3512:03
Wizzuphow would that even work12:03
uvoshmm?12:03
Wizzup12:03 < uvos> only the stock slot will work12:04
Wizzup12:03 < uvos> because thats pivot_root12:04
uvossafestrap (the menu) just runs under whatever kernel is installed in boot12:04
uvosand it also runs the stock slot with this kernel12:04
Wizzupok, I see, I think12:04
uvosso that works12:04
uvosbut if you try and boot los now12:04
uvosit will fail12:04
Wizzupok, so what's next, I can downgrade safestrap (ugh) or go for clown boot12:04
uvosbecause that will try an kexec 3.012:04
WizzupI kinda wanted to see it boot at least one12:04
Wizzupmaube I'll try to do the kexec from android first12:04
uvosWizzup: just unpack older safestrap12:05
uvosand kexec from android with it12:05
uvoswould be what i would do next12:05
Wizzupok12:05
Wizzupuvos: why do I need to unpack older safestrap?12:06
WizzupI think the kexec stuff from safestrap 3.x (the one I have now) should be ok12:06
Wizzupsince it manages to kexec to 3.x12:06
Wizzup(kernel 3.x)12:06
uvosoh12:06
uvosi thought it dident12:06
uvos<3>[  310.889282] board_mapphone_emu_uart: version magic '2.6.35.7 SMP preempt mod_unload ARMv7 ' should be '3.0.31+ SMP preempt mod_unload modversions ARMv712:06
Wizzupno, so what happens is I booted to safestrap12:06
Wizzupwhich made it kexec from android to its menu12:07
uvosoh ok12:07
Wizzupand then from the menu I tried to do kexec with the android-kexec modules12:07
Wizzupiirc12:07
Wizzup which didn't work12:07
uvosthose are the wrong modules :P12:07
uvosalso in the menu the modules are loaded allready irc12:07
Wizzupno, since it kexecs to linux 3.0 with no modules12:07
uvosok12:07
Wizzupoh, you mean it has kexec as built in12:08
Wizzuppossible but I don't think so, because I got this when I tried kexec:12:08
uvosi gues this might be special on the d3 since it dosent run 3.0 natively12:08
Wizzupkexec_load failed: Function not implemented12:08
uvosso they kexec to it first12:08
uvosfor safestrap12:08
uvosthere must be modules for kernel 3.0 somewhere then12:08
uvosinside ramdisk-recovery.img12:10
uvosso i would suspect they are in the filesystem mounted at / while in safestrap menu12:10
mighty17[m]uvos: https://github.com/IMbackK/mesa/tree/mesa-pvr-meamo this branch for mesa right? or the master?12:11
Wizzupheh, I did insmod uart.ko from android and it kicked me out of adb shell (over usb)12:11
Wizzup... obviously12:11
uvosyeah12:11
uvosyou need to write a script that dose everything in one go12:11
mighty17[m]im trying to hack it into pmos, ie only this mesa instead of the one that pmos has12:11
uvos(and dosent get killed when the shell dies)12:11
mighty17[m]uvos: i may be wrong but if i just build it in pmos (and use jonathan bakker's other stuff ie ddk1.17) it should work right? plus i'd be doing it on a live device :P12:13
uvosmighty17[m]: right but pmos has this thing int its repos this is just jonathan bakkers mesa packaged for maemo leste12:13
Wizzupuvos: what do you mean, doesn't get killed when the shell dies?12:14
uvosWizzup: if you have a script running and adb disconnects the shell dies and the script exits12:14
uvosyou need to deamonize it is what i was saying12:14
mighty17[m]exactly, pmos has his mesa in the repos, but i will remove that mesa and use yours instead12:14
Wizzupuvos: so 'nohup'12:14
uvosWizzup: right12:14
uvosmighty17[m]: jonathan bakkers mesa is what pmos uses by default12:15
uvosthere is no reason for you to use that repo12:15
uvosyou might want to use the pvr+pvr setup if chomeos/jonathan bakker mesa pvr setup is giveing you trouble12:16
uvosor is to slow12:16
Wizzupuvos: maybe this is not fatal? https://dpaste.com/DGP26BR7R12:16
uvosalso  pvr+pvr setup is hard/impossible on pmos12:16
Wizzup(just trying to see if that function not implemented is hthe problem or not)12:16
uvosas it dosent use glibc12:16
mighty17[m]yes it is too slow :(12:16
uvoswell pmos uses musl so the blobs dont help you that mutch12:17
mighty17[m]but what im thinking is to replace his/chromium mesa with yours12:17
uvosmine is just chromium mesa packaged for leste12:17
uvosthere is no code difference12:17
mighty17[m]oh okay12:17
Wizzupuvos: yeah ok looks like it doesn't work: # ./kexec -e12:18
Wizzupkexec failed: Invalid argument12:18
uvosyeah12:18
uvosWizzup: thats reacting like kexec.ko is no loaded12:18
uvos*not12:18
Wizzupyeah12:18
uvosare you using the right binary12:18
uvos?12:18
Wizzupso, this is me booting to safestrap 3.x menu again, with kernel 3.x12:18
WizzupLinux localhost 3.0.31+ #1 SMP PREEMPT Mon Oct 15 16:58:30 PDT 2012 armv7l GNU/Linux12:18
Wizzupso see if what you said, that there might be .ko's for kexec somewhere in safestrap, would be true12:19
uvosthey (hashcode) had some hacky kexec binary12:19
Wizzupor if it was loaded at all12:19
uvosthat did.. something to make it work we just use that12:19
WizzupI am using the safestrap kexec binary12:19
Wizzupthat is: ./assets/install-files/etc/safestrap/kexec/kexec12:19
uvosthere might be one version for kernel 2 and one for kernel 312:19
uvosin safestrap12:19
uvosthats the one for kernel 212:19
Wizzupnot in the .apk at least12:19
uvosWizzup: its in the ramdisk12:19
uvosWizzup: i would suspect12:19
Wizzupfind / | grep kexec didn't yield much12:20
uvossince they only need inside of safestrap12:20
uvosok12:20
uvosno idea then12:20
WizzupI could try to install the older safestrap if you think it makes sense (2.x)12:20
WizzupI had trouble doing the kexec from android since it's so weird and locked down12:20
uvosok12:21
Wizzupmost places you cannot make files executable12:21
Wizzupothers are not writable12:21
Wizzupit's a bit awkward12:21
uvosno not really12:21
uvosolder safestrap12:21
Wizzup'no not really' was at what?12:21
uvos"I could try to install the older safestrap if you think it makes sense (2.x)"12:21
Wizzupok12:21
uvoscan you post a tree of the files in the ramdisk?12:22
Wizzupuvos: all of the files?12:24
Wizzupok12:24
Wizzupuvos: https://wizzup.org/out.txt12:26
uvosthis is in safestrap?12:27
Wizzupuvos: yes12:30
uvoswierd12:33
uvosi have no idea how safestrap works then on d312:33
uvoshttps://github.com/IMbackK/bionic-clown-boot/blob/master/scripts/kexebootstart.sh12:33
uvosmaybe try what this script dose12:33
uvosfrom android12:33
uvoswith the modules you have for kern 2.x12:33
uvosthe reason why i copy everything into / (a ramdisk on andorid)12:34
uvosis to avoid the permissions problems12:34
uvosah maybe you where just missing arm_kexec.ko?12:36
Wizzuphm?12:37
uvos$BBX insmod /arm_kexec.ko <-12:37
Wizzupwell neither of those load remember12:37
Wizzupin 3.x12:37
uvosoh right12:37
Wizzupok so the options are12:37
Wizzup1. try from android (but pvr won't work)12:38
Wizzup2. try older safestrap and hope the modules just load or are loaded12:38
Wizzup3. try clownboot straight away12:38
uvosWizzup: well if it boots from android with no pvr12:38
uvosWizzup: then clownboot will work12:38
Wizzupyeah, but just as an initial attempt12:38
uvos3. clownboot right away is a bad idea, as installing it breaks android leaving you with no way to recover except12:39
uvosto reinstal everything12:39
uvosso i would do 112:39
uvosand if that works you can be very sure clownboot will work on the first go12:39
Wizzupok12:40
uvosalso option 412:41
uvostry los first and see how the safestrap setup works exactly12:41
Wizzupwould rather skip that, but yeah12:42
uvosalso option 5 since safestrap on d3 kexecs kern 3.012:43
uvosit sounds likely that this is the same kernel tree as is stock on bionic12:43
uvosso the bionic modules might load12:43
uvoshttps://github.com/IMbackK/bionic-clown-boot/tree/master/kexecboot12:43
Wizzup/dev/mmc* doesn't exist in android, did they give it all different names?12:47
Wizzupoh, it's /dev/block12:47
bencoh:)12:49
Wizzupuvos: so 'chmod -x foo' doesn't work on android, is that some messed up chmod as well?12:49
Wizzupit says 'Bad mode'12:50
WizzupI guess I can do 755 or something12:50
uvosno idea, every sane person just instalas busybox on android :P12:50
Wizzupyeah ok12:50
Wizzuproot@cdma_solana:/# /system/xbin/busybox sh12:50
bencohoh, I think I didn't :]12:50
bencohbut that sounds like a decent idea, yeah12:51
Wizzupuvos: ok, trying to load the kexec modules on android gives me this:12:53
Wizzupfirst of all insmod sas 'No such file or directory', which is not true12:53
Wizzupand then dmesg says:12:53
Wizzup<4>[  646.709564] kexec: Unknown symbol machine_shutdown (err 0)12:53
Wizzup<4>[  646.710540] kexec: Unknown symbol printascii (err 0)12:53
Wizzup<4>[  646.711578] kexec: Unknown symbol machine_kexec_prepare (err 0)12:53
Wizzup<4>[  646.714630] kexec: Unknown symbol machine_kexec (err 0)12:53
Wizzup<4>[  646.715637] kexec: Unknown symbol machine_kexec_cleanup (err 0)12:53
uvostrying what where exactly12:53
Wizzupin android, with the files copied to an sdcard, I am trying to load the kexec kernel modules12:54
Wizzup/mnt/sdcard-ext/bootattempt # uname -a12:54
WizzupLinux localhost 2.6.35.7-g5fa4155 #1 SMP PREEMPT Fri Feb 24 22:09:47 CST 2012 armv7l GNU/Linux12:54
Wizzupso basically (1) as above12:54
WizzupI didn't load uart.ko yet, but truly that can't be the problem12:55
uvosyou have to load them in the order proscribed by kexebootstart.sh12:55
Wizzupdo you mean as logwrapper has them?12:55
uvossame thing yeah12:55
uvosits finiky i would do exactly this by hand https://github.com/IMbackK/bionic-clown-boot/blob/master/scripts/kexebootstart.sh12:56
uvosor rather by script12:56
Wizzupwell I managed to make it do something, not sure if it paniced or tried to load but failed12:58
uvosok thats good12:58
Wizzupa script like that cannot work since / is read only12:59
uvosmount -o remount,rw rootfs12:59
uvosshould make it rw12:59
WizzupI think I tried that and it didn't work12:59
Wizzuplet me try it again I guess12:59
uvosok12:59
uvosi guess android 2.3 might be different12:59
Wizzupcould just be not being busybox mount12:59
uvosits not here either12:59
uvosits android mount12:59
Wizzuproot@cdma_solana:/# mount -o remount,rw rootfs13:00
WizzupUsage: mount [-r] [-w] [-o options] [-t type] device directory13:00
bencohyeah, remount doesn't work iirc13:00
Wizzupit does not13:00
bencohbut I think you can just mount -o rw rootfs /13:00
uvosi mean it works on bionic13:01
bencohor something similar13:01
Wizzupuvos: what is that init=/preinit.sh13:01
uvosin logwrapper?13:01
Wizzupin your script13:01
uvosoh in the cmdline13:01
uvosthats just kexecboot13:01
Wizzupk13:02
uvosits a script that determines some stuff about the device and then starts kexecboot proper?13:02
uvoss/?/.13:02
Wizzupwell at least on serial I can 'see' that safestrap manages to kexec to 3.x ok13:09
Wizzupit's such a weird feeling to have a device where you can't just tell it what to boot, and that you have to jump through all these hoops13:10
uvosthe sad reality of most consumer devices....13:10
uvosyeah locked bootloaders suck13:10
Wizzupgoing to take a break from this stuff again for a bit13:17
uvosMotorola 1:0 Wizzup13:38
Wizzup:-p13:42
Wizzupit helps for me to take a break every few hours to think about what makes sense otherwise I just keep trying things that don't work13:42
bencoh:)13:45
alex1216Hello everyone. Have obtained a N900 with a hope of putting Leste/pmOS onto it and using it with usual (up-to-date) apps (don't care about surfing the modern Web full of HTML5 etc.). But, of course, felt more comfortable with Fremantle+CSSU as it has all the h/w support while I was able to barely boot modern distributions (I can guess why, but for now it's an another question because now I haven't a21:02
alex1216spare μSD to just DD over it). TBH, from the very begining my plan was to bring Fremantle drivers to Leste (and stick with "power user kernel" for Fremantle), to somehow update userspace of Fremantle further than CSSU using Leste's resources or to run Leste/pmOS userland in an chroot. Are these ideas are "new", or there are already some developments in this way which I can learn about?21:02
uvosalex1216: not impossible but you will run into loooots of issues21:04
uvosalex1216: like for starters modern glibc dosent even support kernels that old21:04
Wizzupalex1216: there is little reason to use old fremantle kernel21:04
Wizzupn900 kernel is in really good shape, the userspace is what needs more work21:05
uvosneeding 3.2 at least21:05
Wizzupbut yeah, running old userspace in chroot wont work since kernel interfaces are different21:05
alex1216I'd meant running new userspace in a Fremantle's chroot.21:05
Wizzupbbiab21:06
uvosalex1216: right as i said almost impossible due to modern software requirent more modern kernels21:06
alex1216Actually, my main "bottleneck" for now is lack of TLS1.2, so even a proxy-only chroot would be enough.21:06
alex1216...So, what are other major issues?21:12
alex1216And what can be done about h/w support without downgrading the kernel?21:13
uvosall hardware, except the cameras (and even those can be patched to work),  are supported by recent (ish) kernels on n90021:13
uvosthe kernel is not the problem21:14
uvosidk what issues more major than "all these apps use kernel interfaces that dont exist on 2.6.x" you are expecting21:15
uvosits pretty damning21:15
uvosi mean you could get some stuff runing by using musl chroot and selecting applications judicially21:16
alex1216Simply speaking, I'm trying to combine full hardware support and up-to-date applications... :)21:16
uvosyou allso run into the issue that n900 really dosent have any resources to spare for sutch an endeavour...21:17
uvosalex1216: well if "full hardware support" means fremantle to you then prepare to be disapointed or at least reduce your expectaions to the occasional app running in chroot21:18
alex1216Well, I take many photos every day (including, for example, college timetable patches) and get to the college by the subway, so to use N900 as a daily driver, I need both camera support and a modern browser which can barely handle TLS1.2 and modern JS to sign in to subway's hotspot)...21:20
uvosreally if you want to run linux apps on a phone that otherwise works and is usable as a daly driver21:20
uvosa chroot on a mondern android phone is a much better idea21:20
alex1216uvos: It is an option too. Is it a good idea to port Leste userland to some Android container agregator (like Linux Deploy)?21:21
uvossomeone has done that21:21
alex1216oh, really?21:21
uvosyeah21:22
uvosi forget his name21:22
uvosits not something we support21:22
uvosbut its possible21:22
uvosbut really the only good long term soultion is helping us21:22
uvosfinish leste21:22
uvosso its usable as a daly driver21:22
uvosthe droid 4 is pretty close21:22
alex1216Yeah, I noticed it, but it appeared that N900 is easier to find at Russian aftermarket, and I also thought that the N900 is more hackable as it had made GNU/Linux in-mind. :)21:25
uvosat this point the n900 is just old(er)21:25
alex1216Of course, the Droid 4 was also more attractable as it appeared to be more powerful, but not hack-friendly.21:26
uvosnot sure what hack-frendly means in this context they both run mainline linux (pinephone too) aprox equally well, with the d4 being maybe in slightly better shape.21:28
uvosanyhow the pont is moot you have a n900.21:28
siceloalex1216: "need both camera support and a modern browser which can barely handle TLS1.2 and modern JS to sign in to subway's hotspot" ---> Fremantle easy debian chroot, using the last/latest Jessie image, and install Midori21:28
uvosidk if a javascript browser running on jessie is a good idea21:29
uvosthats asking for it on public wifi21:29
uvosid would try compiling something more modern against musl21:30
uvosjust a minimal buildroot21:30
uvosand midory or browser of choice on that21:30
alex1216sicelo: 1) Can it run Fennec too? 2) Are there still images somewhere on the Net?21:30
sicelofennec has the TLS1.2 issues you want to get around21:31
uvosno way in hell the n900 ever gona run modern fennec21:31
uvossicelo: i assume he means current fennec in chroot21:31
alex1216Of course, I mean the last Fennec from Fremantle repos. :)21:32
uvosthen what sicelo says applies21:32
alex1216Okay, lemme check something.21:33
siceloalex1216: maybe discuss Fremantle issues in #maemo, not here :)21:34
alex1216sicelo: joining now21:35
alex1216Thanks everyone. It's very good that there are developments going on to make mobile GNU/Linux great again. Because GNU/Linux is more lightweight than Android, and GNU/Linux feels really good at the desktop...21:57
alex1216uvos: ...But the truth is that GNU/Linux feels good at mobiles too, but as devices like N900 or pinephone are harder to obtain and either difficult to bring up all the h/w, IMHO it would be a good idea to finish the userland to be able to run it in an Android'chroot at least. :)22:00
uvosalex1216: sure we could use your help with that22:00
uvosbut no chroot in android is not a real solution imo22:01
sicelo--> halium :'(22:01
uvoshttp://wiki.postmarketos.org/wiki/Devices has lots of devices22:01
uvosproting real linux to android devices is imo the way forward long term22:02
uvosat least until/ if we get some traction22:02
uvosi would recommend any of the "main" or "Community" pmos devices or a droid4/ droid bionic if you want to mess around.22:03
alex1216uvos: Hope the answer is yes. Despite I'm definitely going to work on this, I'm also going to graduate next year, so it can be uneasy, and then things can get either hard because it's Russia.22:04
uvosalex1216: if you want and can help us im sure Wizzup would be happy to give you a device22:05
alex1216uvos: I certainly do, but also I want to get a good job and need to work on some medical documentation in order not to run into mandatory military service. :)22:06
uvosok22:07
uvosthats life :|22:07
alex1216And now I'm unsure a bit as participating in WSR this year has made me barely finish the course paper and reach end of the term with a line of As...22:10
alex1216Nevermind, hope for the best. Good night (it's 1am herre).22:11
alex1216here*22:11

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