IRC log of #maemo-ssu for Saturday, 2013-03-30

kerioalso, it's quite untrivial to do something like that00:00
keriobecause the uboot menu is a single monolithic uboot script00:00
DocScrutinizer05*shrug* doesn't do update-bootmenu-foo exactly the same?00:03
DocScrutinizer05just that it parses files in alien directories00:04
DocScrutinizer05instead of using find and read to find out about actually installed bootimages and get input from user interactively00:05
Estel^kerio, could you give me ls of your /lib/modules/current ?00:09
Estel^in my case it contains only modules.alias modules.ccwmap and simillar things, which seems like source of my problems wikth bootmenu00:09
kerio/lib/modules/current points to the kp52 directory00:10
Estel^as vanilla /sbin/preinit have Modules_path=/lib/modules/current, and later, things load watchdogs things by modprobe $module_path/twl_blabla00:10
Estel^well, not here00:10
Estel^her eit points to omap100:11
Estel^/lib/modules/current -> 2.6.28-omap100:11
Estel^considering that 2.6.28-omap1 doesn't exist here, troubles are clear :P00:11
keriohm, reinstall kernel-power-modules i guess00:11
Estel^funny, did it yesterday, due to Pali.s fiasco with changing things without boosting version number00:12
Estel^will try it again00:12
kerioone of the kernel-power packages adds the fix to preinit that makes it use `uname -a` instead of current00:12
Estel^ah00:13
Estel^love binary file replacements00:13
kerioit's not a binary file00:13
Estel^having kp installed, then removing multiboot, result in /sbin/preinit being reverted to vanilla00:13
Estel^result in kp fix going into /dev/null00:13
Estel^you know what i mean00:14
Estel^divert should be used,. or smth like that00:14
kerioand yeah, it should be a getbootstate fix00:14
keriowhich it probably is00:14
Estel^if you remove multiboot, or smth like that, it just silently breaks00:14
keriothen clearly multiboot has to be purged from the repos00:14
Estel^i'm not sure if kp postinst sed things into /sbin/preinit is right thing to do00:14
Estel^shitload of circumstances may break it00:15
Estel^silently00:15
Estel^with suer scratching his head about wtf00:15
Estel^user, even00:15
Estel^Pali, ^00:15
Estel^and yes, kernel-power-modules does that sed into preinit00:16
Estel^and symlink of current to kp5200:16
Estel^while the latter souns like OK, the sed leaves bad taste00:16
Estel^we have fckin divert for a purpose, don't we?00:16
Estel^DocScrutinizer05, any comment here? I may be talking bullshit, but i think sed'ing into crucial boot scripts during postinst script is fubar00:16
Estel^too many ways to silently break it by other packages, or even worse, by removing other packages. Or shitload of other ways00:17
Estel^now i wonder if any other kernel-power package does simillar thing and I should be reinstalling them, too?00:18
Estel^or smth else may be silently broken and in 2-3 weeks i'll be scratching my head about why something is fubar00:18
Estel^from a different barrel - anyone ahve idea what sh: can't access tty: job control turned off00:19
Estel^may mean in practice"?00:19
Estel^(and/or how to fix it)00:20
Estel^it happens in recovery shell bundled manually into /sbin/preinit . doesn't seem to affect anything, but...00:20
*** arcean has quit IRC00:22
*** arcean has joined #maemo-ssu00:22
*** Martix_ has joined #maemo-ssu00:39
Estel^you know what? I feel like writing CLI re-iplementing backupmenu's function into normal console, to make use of fbcon...00:56
Estel^without that pesky text2screen thingie00:56
Estel^and without bootmenu requiment00:56
Estel^just a recovery shell from /sbin/preinit, with whole backupmenu started by invoking simple script (that runs cli interface)00:57
kerioaka pali's recovery console00:57
Estel^MentalistTraceur's recovery console > Pali's recovery console (sorry, Pali)00:58
keriorescueOS > MT's recovery console00:58
Estel^sure, everythingh can be done by manuyal commands, but reintroducing it as CLi make it a) faster for casual execution00:58
Estel^RescueOs is different beast00:58
Estel^...b) more friendly for noobs, and I *do* want noobs to make backups early and often00:59
Estel^after all, MT's recovery console can be run from preinit on-device itself, while for restoring borked device (without u-boot), you need external device with flasher for rescue os01:00
Estel^rescue os is super, but it's different use-case01:00
keriowhy?01:00
Estel^ant MT's recovery shell > Pali's recovery shell, due to Pali's recovery shell being pesky about requiments and excluding some, see bootmenu, multiboot, etc. MT"s one doesn't care about that at all01:01
Estel^well, how woulds you run rescue-os on device without multiboot, that doesn't, well, boot?01:01
Estel^at all?01:01
Estel^due to borked root or whatever?01:01
Estel^no bootmenu, no anything?01:01
Estel^and without external device to run it from flasher?01:01
kerioi wouldn't touch multiboot with a 10-foot pole01:01
*** NIN101 has quit IRC01:02
Estel^s/without multiboot/without u-boot/01:02
keriowhy would i be without u-boot?01:02
kerioalso, how will you run MT's recovery shell?01:02
Estel^*rolleyes* cause you wouldn't have it installed?01:02
Estel^from /sbin/preinit01:02
keriono, the rootfs is borked, remember01:02
Estel^borked = files there messed01:02
kerioso rescueOS is fine01:02
Estel^not whoile filesystem, the latter is quite impossible to achieve on ubifs ;)01:03
Estel^well, for really borked rootfs, you would need rescueos01:03
Estel^or better01:03
Estel^reflash ;P01:03
Estel^or rescueOs and backup restore01:03
Estel^for real life cases, thought, when borked package or typo or whjatever user error makes your device unbootable, MT's /sbin/preinit is enough to restore device - it loads at earliest possible stage, and doesn't require 2nd device/u-boot/bootmenu/whatever01:04
keriooh fucking hell no01:04
Estel^if one have u-boot, I would implement both MT's recovery shell (for quick access) and rescueOs on sd (for really fuckek up situations)01:04
keriothat's incredibly far from being the earliest possible stage01:04
Estel^well, you know what I mean- earliest as first thing sourced (preinit)01:05
Estel^I don't attack rescueOs, it's absolutely superb tool01:05
*** RST38h has joined #maemo-ssu01:06
keriothis reminds me, i should put rescueOS on the uSD01:06
Estel^it's just that it's overkill to run it for 99% of simple fixes, that are achievable by 12 lines MT's recovery shell01:06
Estel^and trust me, as soon as I'll install u-boot, I'll customzie and put rescueOs on uSD01:06
Estel^;)01:06
kerioi'm not entirely sure why rescueOS is "excessive", considering that it's pretty much the same amount of effort to use it01:06
Estel^now, motivate Pali to make 0xFFFF run-able from device01:06
kerioboot with slider open, select rescueOS with arrows, push enter01:07
Estel^well, you're probably right, as soon as you have rescueOs setup ;)01:07
Estel^Mt's things is easier to install for noobs, properly, that's why I would bundle CLI backupmenu there01:07
Estel^I don't want to expect people to properly install u-boot before being able to do backups, and being independent of 2nd device at the same time01:08
Estel^just package diverting sbin/preinit to contain MT's recovery shell, and putting some scripts (backupmenu-cli) into proper places01:08
Estel^so people can get recovery shell and backupmenu cli by installing it, and hitting any key during device early boot stage01:08
Estel^then, if one use u-boot (everyone should), rescueOs is a must01:09
Estel^it's just that u-boot thing is for sure overhelming for noobs, so if I want to give them backupmenu-like experience from CLI, I would bundle it into Mt's console. Hell, it can be replicated inside rescueOs too, if anyone want it01:10
Estel^brb, changing irc device01:10
*** sunny_s has joined #maemo-ssu01:25
*** Martix_ has quit IRC02:11
*** M4rtinK has quit IRC02:16
Estel^kerio,  I have everything set-up for u-boot. What was that 2 teerminal trick to flash thing from on-device?02:52
Estel^(i got u-boot.bon file)02:52
Estel^s/.bon/.bin/02:52
infobotEstel^ meant: (i got u-boot.bin file)02:52
Estel^I know I could look at postinst script for any flasher package, I just don't get that 2 terminals thingie02:53
*** kolp has quit IRC03:36
*** nox- has quit IRC03:40
Estel^hm, no idea how to flash u-bootlbin from on-device. Will flash it from desktop flasher3.5 tomorrow.03:41
Estel^nvm, found out that you need to:04:20
Estel^softupd -vv -s --local04:20
Estel^in one terminal as root, and04:20
Estel^flasher -k u-boot.bin -f04:20
Estel^in another04:20
Estel^it *seemed* to flash ok, but after reboot, device wasn't able to boot. Did the same thing (flasher3.5 -k u-boot.bin -f) from desktop, and it worked like charm, u-boot greeted me after reboot04:21
Estel^*shrug*04:21
*** arcean has quit IRC04:21
Estel^works like charm, although noticed werido - if, instad from entries or default, I enter u-boot console, doing - as advertised - run emmcboot result in shitload of errors and no booting04:22
Estel^same for run sdboot, even if proper .src and bootmenu.img.d/ are on sd card04:22
Estel^will need to investigate how to boot from sd, really04:22
*** discopig has quit IRC04:27
*** discopig has joined #maemo-ssu04:28
*** discopig has quit IRC04:29
*** discopig has joined #maemo-ssu04:32
*** discopig has quit IRC04:33
*** discopig has joined #maemo-ssu04:34
*** discopig has joined #maemo-ssu04:34
*** LauRoman has joined #maemo-ssu04:39
*** wmarone_ has joined #maemo-ssu04:46
*** wmarone__ has quit IRC04:55
*** PaulFertser has quit IRC04:55
*** PaulFertser has joined #maemo-ssu05:00
*** Pali has quit IRC05:01
*** amiconn_ has joined #maemo-ssu05:36
*** amiconn has quit IRC05:36
*** amiconn_ is now known as amiconn05:36
*** LauRoman has quit IRC05:43
*** DocScrutinizer05 has quit IRC06:03
*** DocScrutinizer05 has joined #maemo-ssu06:03
*** LaoLang_cool has joined #maemo-ssu06:48
*** LaoLang_cool has quit IRC06:50
*** M13 has joined #maemo-ssu07:11
*** futpib has joined #maemo-ssu08:07
*** jon_y has quit IRC08:41
*** jon_y has joined #maemo-ssu08:41
*** MohammadAG has quit IRC08:58
*** MohammadAG has joined #maemo-ssu08:58
*** LaoLang_cool has joined #maemo-ssu09:08
*** LaoLang_cool has quit IRC09:14
*** Vlad_on_the_road has joined #maemo-ssu10:02
*** Martix has joined #maemo-ssu10:44
*** futpib has quit IRC10:53
*** futpib has joined #maemo-ssu10:54
*** NIN101 has joined #maemo-ssu11:10
*** M4rtinK has joined #maemo-ssu12:17
*** unclouded has quit IRC12:37
*** MohammadAG_ has joined #maemo-ssu13:13
*** MohammadAG has quit IRC13:13
*** MohammadAG_ is now known as MohammadAG13:13
*** kolp has joined #maemo-ssu13:15
*** nox- has joined #maemo-ssu13:32
*** kolp has quit IRC13:44
*** kolp has joined #maemo-ssu13:45
*** sunny_s has quit IRC13:53
*** arcean has joined #maemo-ssu15:18
*** tg has quit IRC15:35
*** LauRoman has joined #maemo-ssu16:23
*** NIN101 has quit IRC16:23
*** arcean_ has joined #maemo-ssu16:39
*** arcean has quit IRC16:39
*** arcean_ is now known as arcean16:39
*** lartza_ has quit IRC16:53
*** Estel^ has quit IRC16:53
*** Estel_ has joined #maemo-ssu16:54
*** Estel_ has quit IRC16:54
*** Estel_ has joined #maemo-ssu16:54
*** lartza_ has joined #maemo-ssu16:54
Estel_Pali, wtf is with u-boot rc3-1 in maaemo repos being unable to voot 3.* kernels, and u-boot rc3-1 (same version) from your page having no problem with it?16:59
Estel_again that freaking habit of changing shitte without bumping version number?16:59
Estel_don't take it as disrespectful, I really appreciate your work, but it is 3th time I run into things from you that have 5467654567 different variants with *same*version number, that also, cause me to enter bootloop17:00
Estel_it's getting on my nerves, and I really don't see any reasonable rationale for not bumping version number when changing things, so pretty please, cease and desist :P doing it this way17:01
Estel_+/3th time/3th time in 2 days/17:01
*** NIN101 has joined #maemo-ssu17:16
*** tg has joined #maemo-ssu17:25
*** aap has quit IRC18:03
*** aap has joined #maemo-ssu18:18
*** futpib has quit IRC19:06
*** futpib has joined #maemo-ssu19:06
DocScrutinizer05I guess Nokia's versioning scheme of <year>-<week-of-year>-<build-in-this-week> (*-2010-36-198) got invented for a reason, isn't unique to Nokia, and most probably got implemented by some automatism that always creates correct numbering/versioning and ovoids any two builds "sharing" same version20:24
Estel_agreed, and I just can't get why Pali repeatedly change things, releasing here and there same versions/name things, different internally20:30
kerioEstel_: hm, the .bin from the -bootimg in extras-devel and the -bootimg from his site have different md5s20:31
keriobut it could be because of the different build environments20:31
Estel_last time it was kp52 with crucial change to rx51 module (despite resulting in bootloop, when bme-replacement was installed over "older" kp52), now it's u-boot that can't boot 3.*kernel is ine version, and doesn't have problems in another, same version...20:31
Estel_kerio, I know it have different md5s, because there freaking different. -devel version breaks when booting any 3.*linux kernel20:32
Estel_silently breaks, too20:32
Estel_version from his site works flawlessly20:32
Estel_another thing that would confuse me like hell and make into spending hours debugging perfectly fine bootmenu.src, if not for a spark of intuition. Later, I discovered that arch linux guys spent hours doing exactly that - debugging perfectly fine things...20:33
kerioDocScrutinizer05: what's the bq27k GPIO connected to?20:33
DocScrutinizer05zilch20:33
Estel_just to notice, at the end, that u-boot with same version in Pali's site works OK ;)20:34
keriowell, it's enabled20:34
Estel_it was month ago, but, apparently, wasn't important enough to bump version number20:34
Estel_ /rant over20:34
*** Estel_ is now known as sdhyfdes20:35
*** sdhyfdes is now known as Estel_20:35
keriohm, i need a better name for convert_registers_units20:38
kerioalright, parse_registers20:39
Estel_what are you cooking?20:46
*** M13 is now known as Guest7704620:47
*** Guest77046 has quit IRC20:59
*** M13 has joined #maemo-ssu20:59
*** unclouded has joined #maemo-ssu21:01
kerioEstel_: some sort of python library to get data from bq27k21:02
*** M13 has quit IRC21:04
DocScrutinizer05.ko21:14
kerioDocScrutinizer05: actually, the important part is parse_registers21:15
kerioand as long as you provide a registers dict, it'll work fine21:15
*** BCMM has joined #maemo-ssu21:15
kerioregardless of where it comes from21:15
kerio"Parse a dict of raw bq27k registers (with registers that are split into high/low already merged)"21:16
DocScrutinizer05yeah, :-/ for the latter21:18
DocScrutinizer05relies on a priori knowledge not supposed to be found on that level21:19
keriofwiw, it relies on a priori knowledge already21:20
keriobecause the dict you're supposed to pass has the cute names that come from the datasheet21:20
kerioand meh, i could change it and require "ARL" and "ARH" to be passed instead of "AR", but what's the point?21:21
DocScrutinizer05the point is to at least _try_ and enable fixing this borked register dump that's not really a clean register dump to become one eventually - so nobody could argue "yeah, maybe it's not correct this way, but look, other apps already depend on it"21:29
DocScrutinizer05the knowledge about meaning and semantics and properties of registers are meant to be *inside* your code, not included in the dump21:30
DocScrutinizer05*all* properties, even such nonsense like "pairing" that's actually non-existent on a i2c register dump level21:31
kerioDocScrutinizer05: should i keep the names SEDVF and SEDV1 or change them to EDVFT and EDV1T (for Threshold)?21:32
DocScrutinizer05I'd suggest you stick to the names in datasheet as close as possible21:33
keriobut S is for Scaled, and i'm unscaling them21:33
keriobut i can't call them EDVF and EDV1 because those are the flags21:33
DocScrutinizer05are the flags named exactly identical to the threshold integers?21:34
kerioyep21:34
DocScrutinizer05then that's shit, and I'd rather change the flags' names to flag-EDVF and flag-EDV! or sth like that#21:34
DocScrutinizer05s/!/1/21:35
infobotDocScrutinizer05 meant: then that's shit, and I'd rather change the flags' names to flag-EDVF and flag-EDV1 or sth like that#21:35
kerioyou're going to use the flags a lot more than the thresholds21:35
kerioalso, there's GPIEN both in MODE and in PKCFG, i renamed the PKCFG one to GPIENP21:35
kerio(everything is well-commented, of course)21:35
DocScrutinizer05since when we're chosing name length based on usage frequency?21:35
keriofor for_loop_index in range(27):21:36
kerioDocScrutinizer05: anyway, the "correct" way would be to rename /both/21:37
kerioEDV*F and EDV*T21:37
DocScrutinizer05sure, go ahead21:38
kerio...meh, i'll just leave them as SEDVF/SEDV1, which is the official name21:38
DocScrutinizer05yes, since that's what DS does. I never seen a datasheet using ambiguous names for similar things21:43
DocScrutinizer05there's only one EDV1 and that's the flag. There's a SEDV1 that's upper half of EDV1-threshold21:44
DocScrutinizer05it's probably fair to keep this name for the normalized value21:44
kerioDocScrutinizer05: GPIEN is ambiguous :)21:45
DocScrutinizer05how so?21:46
kerioit's a bit in FLAGS and in PKCFG21:46
DocScrutinizer05ugh, right21:46
kerioer, a bit in MODE and PKCFG21:46
DocScrutinizer05yeah, then it's fair to use a prefix for the read-only derived value, like PKCFG:GPIEN21:47
DocScrutinizer05it's basically a constant here21:50
DocScrutinizer05since you can't change it by any reasonable procedure21:50
DocScrutinizer05and you usually don't even need to read it, since it's mostly irrelevant for anything you ever would want to code21:51
DocScrutinizer05anyway, if you need to use a prefix for one bit in a word, then you should use same prefix for all bits in same word, and maybe you even should use similar prefixes for all bits in similar class of words (EEPROM)21:54
DocScrutinizer05or actually use prefix "EEPROM" for all values in EEPROM21:56
kerioooh, (v + 4) % 8 - 4 is how you do two's complement if v is a 3-bit value21:59
kerioDocScrutinizer05: meh, i'm already making up "AEE" as a name22:00
DocScrutinizer05but then a value like EEPROM_SEDV1 would be 8bit mandatory. In that case better use EDV1_threshold for the normalized (*2^8) value22:00
kerioit's always TAPER[7]22:00
DocScrutinizer05oops, SEDV1 = designed EDV1_threshold/8 - 25622:14
DocScrutinizer05not designed EDV1_threshold/2^822:14
kerioyeah, yeah :)22:18
DocScrutinizer05yeah, I guessed/assumed ;-)22:18
kerioso EDV1_thr = 0b1-SEDV1--00022:19
DocScrutinizer05anyway I also guess, you want to export the normalized EDV1_threshold, not the raw register value? then you should use a different name than SEDV122:19
kerioDocScrutinizer05: yeah, i'm normalizing, converting and unpacking everything i can22:20
DocScrutinizer05:nod:, sth like that (though I haven't evaluated your formula)22:20
kerioit's not a formula22:20
kerio0b1[SEDV1, 8 bits]00022:21
DocScrutinizer05ooh22:22
DocScrutinizer05i see22:22
DocScrutinizer05well, since you're exporting *only* normalized values, you're probably safe to use SEDV1, since nobody expects to see a non-normalized value in that var22:23
DocScrutinizer05doesn't matter how complex the normalization is, if it's just a factor like *3.57/20, or something like *8 + 25622:25
kerioi'm afraid i've strayed from joergthon in this version :<22:25
DocScrutinizer05err *8 + (258*8)22:25
DocScrutinizer05btw making up names is a pretty poor idea. Devels should always have something to refer to, that they already know from the stuff they had to learn about in DS22:33
kerioDocScrutinizer05: why the hell is there an offset that goes in units of 2.45uV?22:53
kerioisn't that small beyond recognition?22:53
kerioevery other voltage is bigger by at least 3 orders of magnitude22:54
DocScrutinizer05kerio: where?22:59
kerioBOFF22:59
DocScrutinizer05I'm absolutely sure you misinterpreted sth22:59
keriomaybe it's some specific sensor23:00
DocScrutinizer05meh, offset-calibration23:00
DocScrutinizer05that's for adjusting the ADC to 0.00000023:00
DocScrutinizer05it's not supposed to have an offset error of 50% of max range23:01
DocScrutinizer05if the value range for that sensor is 0 .. 100, then the offset calibration is in the range of 0.0001 or sth23:02
keriowhat i don't get is why 0.0001 would matter23:02
DocScrutinizer05because it introduces an accumulating error23:03
DocScrutinizer05it's like a constant small current flowing in or out of cell23:03
DocScrutinizer05this would NAC make drift despite cell is not even connected to anything23:04
kerioi see23:04
kerioso you *really* want it to be 0 when it should be23:04
DocScrutinizer05kerio: we got RS=20mOhm, a current of 1mA creates a voltage across RS of 20µV23:11
DocScrutinizer05I'm actually amazed that the offset calibration granularity is that huge, I'd rather had expected sth like 0.0245µV23:12
DocScrutinizer05btw that's most probably 2.54, not 2.4523:13
keriowhy?23:15
DocScrutinizer05well, 0.1mA error seems a lot23:15
kerioah yes, it is23:15
keriono, i meant the 2.4523:15
DocScrutinizer05lol, because I feel that23:16
keriono, wait, 4.9 *is* 2.45*223:16
*** futpib has quit IRC23:16
kerioyou feel wrong23:16
* DocScrutinizer05 has closed the DS 10min ago :-S23:16
DocScrutinizer05btw BOFF has 8 discrete values, I'd not bother 2s complement, rather use your beloved lists for that, here it seems quite right ;-)23:19
DocScrutinizer05and yes, it's 2.4523:19
kerioo rly23:19
keriothanks, i would've never guessed that, /while reading the DS/23:20
DocScrutinizer05pfff ;-P23:20
*** LauRoman has quit IRC23:20
kerioDocScrutinizer05: is it "right" to correct the datasheet?23:24
kerio914 is clearly just 3.57 << 823:24
kerioeven though it's 913.9223:25
kerioand of course by 3.57 << 8 i mean 3.57 * (1 << 8)23:28
*** Vlad_on_the_road has quit IRC23:32
kerio3.57 << 8 would be 18511595908343686758400.023:34
keriohttp://pastebin.mozilla.org/226057923:35
kerioit's getting more and more ridiculous as time passes23:35
DocScrutinizer05what makes you think 3.57 is more exact/autoritative than 914?23:35
keriomaybe 914 is authoritative23:37
keriothen it would have to be 3.570323:37
kerio3.57 is just so much cuter :323:38
kerioanyway, it clearly states that ILMD is actually the high byte of ILMD, and if we go by that, it's silly to use 3.5703125 as the unit of the full ILMD when you use 3.57 everywhere else23:39
DocScrutinizer05btw forget about my explanation regarding accumulative error and BOFF, the chip goes into "idle" mode when a certain minimum threshold on current in/out is not reached23:39
kerioDocScrutinizer05: do you understand the above code?23:48
DocScrutinizer05> >The Digital Magnitude Filter (DMF) threshold can be set in EEPROM to indicate a threshold below which an ycharge or discharge accumulation is ignored. This allows setting a threshold above the maximum DSCC offse texpected from the IC and PCB combination, so that when no charge or discharge current is present, th emeasured capacity change by the bqJUNIOR is zero.<<23:48
DocScrutinizer05kerio: I only looked cursory across it23:48
DocScrutinizer05looks good to me23:48
kerio:D23:49
keriocomments are truly amazing23:49
kerioand i quite like the repeated divmod, more than the bit manipulation23:49
DocScrutinizer05I've seen two divmod with identical parameter#2 of 1<<123:50
DocScrutinizer05I suspect the 2nd to be a typo23:50
DocScrutinizer05or rather c&p error23:51
kerionope23:51
kerioread more closely23:51
kerio:)23:51
DocScrutinizer05maybe it's exactly what you wanted though23:51
kerioboth tcfix and dcfix are 1b23:51
*** NIN101 has quit IRC23:53
DocScrutinizer05int i = getsubbits(byte/int/word composedword, const int LSB, const int numofbits)23:58

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!