libera/#maemo-leste/ Tuesday, 2023-09-12

maxwelldyeah i broke d4 battery once, its cable got disconnected from the battery, and it was my best battery.00:06
maxwelldand i dont like when u cannot have a spare battery with u and u need a screwdriver to change the battery.00:10
maxwelldanother reason to want to use d3.00:10
maxwelldit has normal battery.00:10
maxwelldand n900's battery was hotswappable. if u did it fast enough u could change the battery without shutting down the phone.00:10
dsc_lol00:11
Juestmaxwelld: what's the timing for hotswapping without power off?00:12
sicelowith mainline kernel, there's no timing ... as long as your charger can supply enough current to keep the device powered. you can even run it off the charger the entire time00:14
sicelowith fremantle's bme, it was a very few seconds. 1 to 2, i'd say00:17
freemangordontmlind: is it ok to call  hrtimer_start() with zero timeout?08:04
tmlindfreemangordon: hmm don't know what happens then08:11
freemangordonwell, my idea was to avoid initialization delays. but maybe it does not make sense08:18
tmlindit might be ok, i don't know08:33
uvos__i think the "non removeable" battery in d4 is a blessing in desguise10:53
uvos__since it allowed motorola used screw terminals for power. which now makes it easy for us to wire in any battery10:54
uvos__which is a good thing given the last eb41 rolled off the assembly line in 2014 or so10:54
Wizzuparno11: so you wanted me to build these for extras right?11:29
Wizzuparno11: can you make some wiki entries for it?11:29
arno11Wizzup: yeah, i tried to build deb packages locally but failed because of makefile/rules errors i'm not familiar with. Otherwise binaries works perfectly, no particular errors.11:54
arno11and for wiki, no probs i already posted things on TMO so just copy paste needed11:55
Wizzupah, ok12:02
arno11i mean i need your help to fix makefile/rules stuff and to be sure it doesn't try to install old maemo gui libs we can't find/replace anymore. the generic menu (picodrive or pcsx) are ok and usable.12:04
arno11sorry i'm doing too much things at the same time: for picodrive there is just a makefile error, no troubles with maemo stuff (not based on old maemo picodrive)12:21
freemangordonuvos__: this commit https://github.com/maemo-leste/droid4-linux/commit/4af467160d52cc169bb5c27cab2a062bb4f14bea is broken12:26
freemangordonwhy was it pushed at all? I just provided it for testing12:26
freemangordonat the end it turned out the only missing thing was a call to init_waitqueue_head12:27
uvos__sicelo requested it12:27
freemangordonok, but now the kernel doe not even build :)12:27
uvos__i had no idea it was your patch12:27
uvos__i know it failed12:27
freemangordonok12:28
freemangordonshall I revert it?12:28
freemangordonor could you do it?12:28
uvos__sure, but i have to add some mdm fixes12:28
uvos__so dont build it yet12:28
freemangordonok, then you do it12:28
freemangordon(revert 4af467160d52cc169bb5c27cab2a062bb4f14bea)12:28
uvos__right12:28
freemangordonthanks12:29
uvos__so call to init_waitqueue_head12:29
uvos__where is this?12:29
uvos__(patch)12:29
freemangordonhttps://github.com/maemo-leste/droid4-linux/commit/4af467160d52cc169bb5c27cab2a062bb4f14bea#diff-7ea64515dff442a6a9d926f9cd9d151420588a6fbfbe8d0cd51ebab05ef83b12R24412:29
uvos__ok12:29
freemangordonbut it should be init_waitqueue_head(&ir_rx51.wqueue); as original code uses static global struct12:29
freemangordonanyway, I don;t think we shall waste time on that12:30
uvos__why not (i really have no idea what this is about)12:30
freemangordonI think I have a patch for ir_pwm that will make it work properly on n90012:30
uvos__different driver, ok12:30
freemangordonthis is IR TX12:30
uvos__ok12:31
freemangordonyes, and the driver we're trying to fix is marked for removal anyways12:31
uvos__i presume ir_pwm can use any pwm device and this one is omap3/n900 specific12:31
uvos__ok12:31
freemangordonyes12:31
uvos__ill just revert then12:31
freemangordonsee "media: rc: remove ir-rx51 in favour of generic pwm-ir-tx"12:32
freemangordonright12:32
Wizzuparno11: check12:32
freemangordonuvos__: actually there is nothing omap/n900 specific in ir-rx5112:32
Wizzupjust trying to have a  canonical point for this stuff in the wiki12:33
Wizzupfreemangordon: other than the name :D12:33
freemangordonboth drivers are very similar, besides ir-rx51 works on n900 while pwm-ir-tx does not12:33
freemangordonWizzup: not really12:33
freemangordon ir-rx51 uses hrtimer expicitly, while pwm-ir-tx  uses usleep_range()12:33
freemangordonand that's what I think breaks it on n90012:34
freemangordonI have a patch that fixes that, hopefully12:34
freemangordonwill ask sicelo and/or arno11 ti test it later on12:34
Wizzupokay cool12:41
Wizzupfreemangordon: the name was mostly a joke since it is called rx5112:41
freemangordonsicelo: arno11: please test https://pastebin.com/bS7Q43Mg12:41
freemangordononce we have it working, I'll send a proper patch to lkml12:42
freemangordonWizzup: right :)12:42
uvos__presumably pwm-ir-tx would not exist if the author of ir-rx51 had more foresight with the name12:47
freemangordonheh12:48
sicelofreemangordon: thanks. arno, i don't have my leste sd card handy again. let me know which kernel you're on, and i can build you the module so you test with Pierogi13:14
Daanct12in case if anyone wasnt aware of it already, u-boot just dropped the n900 upstream13:21
Daanct12end of an era i guess :\13:22
siceloDaanct12: https://libera.irclog.whitequark.org/maemo-leste/2023-09-05#34872479;13:24
siceloanyway, the existing uboot will still work, and someone might pick it up again in future (I would like to, but seems that's a tad too low-level for me)13:25
Daanct12yeah, the 2013 u-boot still works13:25
siceloor the unfortunate fallout gets resolved too (because it's not really dropped for technical reasons ...)13:26
Daanct12the commit log says it was mostly because of the usb code being legacy13:26
arno11sicelo: ok cool, i'm under 6.1.48 :)16:59
sicelo arno11: https://phoseka.com/pwm-ir-tx.ko   ...20:33
sicelosha512sum: b0c6de105eceb228859e5e1162e55ada6c4e3924c54d679f275a284d56f4c0dd49f1fb0753cb47ac668b5042048b967f4e696c9f2451143d793624fd68d96f0420:33
arno11thx i'll be ready to test in 1 hour20:39
freemangordonsicelo: arno11: if it works, I want you to test another (much simpler) patch, ok?20:42
arno11ok20:42
arno11freemangordon: sicelo: i tried the patch: works well when you press one key then when you try again it causes a kernel oops.21:40
freemangordon:(21:42
arno11indeed :(21:42
freemangordonok, seems I'll have to bring my dev n900 back to life21:43
freemangordonnot now though21:43
arno11maybe the problem is not the patch but dts config ?21:44
freemangordonshould not cause oops21:44
arno11ok21:45
freemangordoncan you somehow get the oops?21:46
arno11if it's the same kind of oops i think only Wizzup and is serial could help21:48
siceloarno11: you can use mtdoops, but it's a bit unreliable sometimes. works well when it wants to :-)21:52
freemangordonyeah, mtdoops should work21:52
siceloreboot the device, then select to use the uboot console. there you can type the following ... it's doable even on our tiny keyboard:21:53
arno11ok i can't this night but i can definitely try tomorrow21:53
sicelo`setenv bootargs console=tty0 debug mtdoops.mtddev=log mtdoops.record_size=8192 rootwait root=/dev/mmcblk0p2`21:53
arno11ok21:53
freemangordonsicelo: how do you build the module to be compatible with zImage from the .deb?21:55
sicelothen you can boot. you can confirm this cmdline worked by `cat /proc/cmdline` in the running system. if it worked, then you can do the test, and on next boot, you can do `cat /dev/mtd2ro | less` to hopefully get the oops21:55
arno11ok21:55
sicelofreemangordon: i built the whole kernel, but didn't make deb :-)21:55
freemangordonok, but you provided only pwm-ir-tx.ko to arno1121:56
freemangordonso, what is your workflow?21:56
freemangordonofc you build the whole kernel, the question is how to replace only that .ko21:56
siceloi check out leste's kernel, build the whole thing, and send him the ko, because i think it doesn't depend on others21:57
freemangordonok, but what about module symbo versions?21:57
freemangordonalso, how do you build it?21:57
siceloi'm guessing all that matches, since it's still technically same kernel?21:57
freemangordonmake ARCH=arm -j4 INSTALL_MOD_STRIP=1 modules21:57
freemangordonnot really21:57
freemangordon?21:57
sicelo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=${mod_dir} INSTALL_MOD_STRIP=1 modules_install21:58
freemangordonhmm21:58
arno11sicelo's process works with your ir-rx51 patch21:58
freemangordonok, lemme try21:58
freemangordonsicelo: so, you first build zImage and then apply th epatch?21:59
sicelono.22:00
sicelobuild the kernel first, then zimage22:00
freemangordonwhat is "kernel first"?22:00
freemangordonnot uImage ;)22:00
siceloum, :p22:00
sicelook my script has `systemd-inhibit make -j $(($(nproc) + 1)) O=${output_dir} zImage modules omap3-n900.dtb`22:00
sicelowith ARCH/CROSS_COMPILE already exported22:01
freemangordonsame here22:01
siceloso it's fine.22:01
freemangordonso, where are your modules installed?22:01
siceloin .output/modules_dir ... i customized that with the 0=${outpt_dir}22:02
freemangordonfull path please22:02
freemangordonI mean:22:02
freemangordonmodules are installed in kernel version directory22:03
freemangordonwhat is the kernel version directory your modules are installed in?22:03
sicelohere's the script https://paste.debian.net/1291768/22:04
sicelo.output/modules_dir/lib/modules/6.1.48/22:04
freemangordonno way :)22:06
sicelo:p22:06
sicelowhy not, heh?22:06
freemangordonif you have modified code, it shoudl change the kernel version22:06
freemangordon../modules/lib/modules/6.1.48-41200-g5319954d333d-dirty/22:06
freemangordonfor example22:06
sicelothat happens if you didn't commit the code, iirc22:06
freemangordonright, but even if you commit, it still changes the kernel version22:07
sicelono idea. it doesn't happen in my case, and i build lots of N900 kernels (for my pmOS maintenance work)22:07
freemangordonsicelo: right, but there must be something else22:08
freemangordonsome env var or something22:08
sicelomaybe kernel config option22:08
freemangordonhmm22:08
sicelothis is the only script i use, nothing else :-)22:08
freemangordonok, lemme try22:08
siceloi just (un)comment the appropriate parts at a given moment22:09
siceloi should (someday) fix it up properly22:09
freemangordonsicelo: what does scripts/setlocalversion prints?22:12
freemangordon*print22:12
sicelo~/Git/linux-kernel$  scripts/setlocalversion22:13
siceloError: kernelrelease not valid - run 'make prepare' to update it22:13
freemangordonugh22:13
freemangordonhow's that?22:13
freemangordonthere is no include/config/auto.conf it seems22:14
freemangordonhmm, maybe because of your output dir, lemme try22:14
freemangordonsicelo: still installing to ../modules/lib/modules/6.1.48-41200-g5319954d333d-dirty22:37
sicelointeresting22:37
freemangordonmhm22:37
sicelomaybe give arno11 the ko file generated in yours. may actually just work fine ootb :-)22:39
freemangordonno way22:39
sicelo...22:40
freemangordonBTW, how is that new .ko loaded without proper dtb?22:40
siceloi think he did adjust dtb to use pwm-ir-tx22:43
freemangordonok22:43
freemangordonsicelo: so, CONFIG_LOCALVERSION_AUTO=y in your config?22:44
arno11yep, using a custom uImage22:44
freemangordonand modules dir is still 6.1.48?22:45
sicelo grep CONFIG_LOCALVERSION_AUTO Git/linux-kernel/.output/.config22:46
siceloCONFIG_LOCALVERSION_AUTO=y22:46
freemangordondo you have .scmversion file by chance?22:47
siceloyes, it's empty though22:49
freemangordonwell...22:50
freemangordonthat's why you don't get version changed22:50
freemangordonok, I'll do the same22:50
siceloah. i can't even recall when i set it, but now that you mention, i do vaguely remember something of that sort22:51
freemangordonheh :)22:51
freemangordonarno11: may I have your dts changes in regards to pwm-ir-tx?22:53
siceloyou just replace the part that says ir-rx51 with pwm-ir-tx :-)22:53
freemangordonok22:54
freemangordonalso, where to get pierogi from?22:54
arno11yep i just replaced "nokia,n900-ir" by "pwm-ir-tx"22:54
freemangordonmaybe just provide the binary22:55
sicelofreemangordon: may i just pick your brain ... it's really small, i promise.22:55
sicelohttps://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/src/core/devices/wwan/nm-modem-ofono.c#L1278-L128022:55
arno11https://github.com/arno1103/pierogi22:55
siceloi want to replace that `goto out` with   s = "0.0.0.0";22:56
siceloany obvious gotchas? e.g. pointer problems?22:56
siceloarno11: maybe you can save the deb for him somewhere if you can?22:57
freemangordonarno11: yeah, if you have deb around it will be easier for me22:58
freemangordonsicelo: not at a glance (obvious issues)22:58
sicelocool. thanks22:59
arno11ok but not easy from my n900 (and again the baby...)22:59
freemangordonok, I'll build it22:59
siceloarno11: let me see if i have the one you sent me22:59
arno11sicelo: i think i sent you the deb file iirc22:59
arno11cool thx22:59
sicelofreemangordon: https://phoseka.com/pierogi_1.1.41_armhf.deb23:01
sicelothis is my friend's domain and vps ... i'm abusing  ... /me hides23:01
arno11:)23:02
freemangordonHTTP request sent, awaiting response... 403 Forbidden23:02
freemangordon:)23:02
freemangordoncheck file permissions23:02
sicelotry now23:03
freemangordonnow it is ok23:04
uvoshttps://uvos.xyz/llama270b.txt <--- lol 70b llama2 knows about leste, is a bit out of date however23:31
uvospretty interesting how mutch information on niche topics its able to absorb23:31
uvosin just some 40 gb of wights (quantized)23:32
freemangordonarno11: does not crash here23:37
freemangordonwhat profile do you use?23:37
freemangordonand I am able to control my toshiba TV23:40
freemangordonhmm, ok, it oopsed :)23:41
arno11:)23:42

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