IRC log for #maemo-ssu on 20130329

01:00.18*** join/#maemo-ssu sunny_s (~sunny_s@business-092-079-020-027.static.arcor-ip.net)
01:17.05*** join/#maemo-ssu Estel_ (~Estel@d56-215.icpnet.pl)
01:17.09*** join/#maemo-ssu Estel_ (~Estel@Maemo/community/contributor/Estel-)
02:12.11*** join/#maemo-ssu LaoLang_cool (~LaoLang_c@120.85.133.181)
02:12.29*** join/#maemo-ssu kolp_ (~quassel@212.255.224.9)
02:58.41*** join/#maemo-ssu futpib (~futpib@89.106.197.110)
03:34.47*** join/#maemo-ssu unclouded (~neil@2001:4428:200:80fc:e973:61cd:733:b07b)
03:37.00*** join/#maemo-ssu amiconn_ (amiconn@rockbox/developer/amiconn)
04:03.58*** join/#maemo-ssu DocScrutinizer05 (~HaleBopp@openmoko/engineers/joerg)
04:08.08*** join/#maemo-ssu Milhouse (~Milhouse@Maemo/community/contributor/Milhouse)
04:38.26*** join/#maemo-ssu discopig (~discopig@2001:5c0:1000:a::7f3)
04:38.26*** join/#maemo-ssu discopig (~discopig@unaffiliated/discopig)
04:49.18*** join/#maemo-ssu M13 (~MirandaLS@170.133-224-87.telenet.ru)
06:06.52*** join/#maemo-ssu discopig (~discopig@2001:5c0:1000:a::7f3)
06:06.52*** join/#maemo-ssu discopig (~discopig@unaffiliated/discopig)
06:38.49*** join/#maemo-ssu Pali (~pali@Maemo/community/contributor/Pali)
07:24.17*** join/#maemo-ssu freemangordon (~freemango@130-204-50-168.2074221835.ddns.cablebg.net)
08:19.25*** join/#maemo-ssu Martix_ (~martix@static-84-242-103-180.net.upcbroadband.cz)
08:50.20*** join/#maemo-ssu LauRoman (~LauRoman@5-14-92-176.residential.rdsnet.ro)
08:58.25*** join/#maemo-ssu Martix_ (~martix@static-84-242-103-180.net.upcbroadband.cz)
09:51.38kerioDocScrutinizer05: i'm not sure why i'm wasting time with this, but do you think that i should keep the raw registers somewhere, and store the converted data somewhere else?
10:01.16kerioShadowJK: why is the conversion of ILMD done with 913920 instead of 914000?
10:14.31keriooh i see, it's not really 914uVh, it's the high byte of 3.57uVh
10:18.31*** join/#maemo-ssu jon_y (~enforcer@175.145.83.27)
10:21.17*** join/#maemo-ssu futpib (~futpib@89.106.197.40)
10:45.12*** join/#maemo-ssu NIN101 (~NIN@p5DD28CE6.dip0.t-ipconnect.de)
10:57.04*** join/#maemo-ssu futpib_ (~futpib@89.106.197.40)
11:05.26kerioah what the hell, "°" isn't ascii?
11:05.46DocScrutinizer05man ascii
11:07.50DocScrutinizer05man iso_8859-1
11:07.59DocScrutinizer05260   176   B0     °     DEGREE SIGN
11:08.52kerioso... it's not ascii :P
11:09.03kerioanyway, i'm parsing EEPROM too now
11:09.37keriois TAPER 102.8mA realistic?
11:14.23DocScrutinizer05http://privatepaste.com/b9d424a14d
11:16.20DocScrutinizer05haha, I been lazy and haven't decoded TAPER/AEE
11:16.30kerioyeah >:c
11:16.33keriois it called AEE?
11:16.58kerioit doesn't have a shorthand in the datasheet
11:18.45kerioi also don't know what to do with MODE and CTRL
11:20.13DocScrutinizer05mode and ctrl are really status registers only needed for writing to chip
11:21.05DocScrutinizer05you could e.g. reset the chip via those registers
11:22.03DocScrutinizer05but we have simpler methods for that ;-P
11:23.50keriothere's WRTNAC that seems useful
11:24.22DocScrutinizer05you'll have to study the datasheet to learn about the last secrets of bq27200 ;-)
11:25.03DocScrutinizer05yeah, WRTNAC could be very useful
11:25.35DocScrutinizer05dunno why I never investigated it. ShadowJK iirc said it doesn't work, I don't believe that
11:26.16DocScrutinizer05of course you need to stop bme before you do anything like that
11:27.07DocScrutinizer05because of conflicting I2C access and the commands to write to bq27200 mustn't get interrupted by bme reading from chip
11:31.59*** join/#maemo-ssu arcean (~arcean@aaes60.neoplus.adsl.tpnet.pl)
11:53.54DocScrutinizer05kerio: btw RBI is bq27200's "backup-battery", my early-morning math says: current <1nA, buffer C: 100nF => buffer time >>100s during which bq27200 holds register content when battery removed
12:06.44DocScrutinizer05(programming bq27k EEPROM) you need 20..22V for that, applied for 10..100ms to pin10. Current needed: 15mA :-o
12:08.20DocScrutinizer05attention! EEPROM can get programmed only TEN times!
12:09.13DocScrutinizer05so a hw mod to integrate a prommer is probably a rather nonsensicel execise ;-)
12:12.57kerioShadowJK: why doesn't WRTNAC work?
12:28.23ShadowJKwrtnac?
12:28.53kerioin bq27k MODE
12:29.10keriolike, write new NAC to AR, set WRTNAC bit in MODE, set CTRL to magic number
12:29.58ShadowJKyeah, I've done that
12:30.01keriodoes it work?
12:31.00ShadowJKya
12:31.30ShadowJKnac gets the value from ar, rsoc/csoc is set to 100 and vdq goes high
12:33.49kerio"high"?
12:34.14ShadowJK1
12:34.29kerioso it's basically something that you do right once you finish charging?
12:34.35kerioor... no, actually not
12:34.42kerioyou can do it wherever
12:34.55keriojust do a calib cycle right afterwards
12:37.45ShadowJKyes
12:42.41DocScrutinizer05curses insane ILMD - if they had chosen 100 instead 2000mAh, it could have learned-up to correct value during a single learning cycle. Restriction to 1/8 change is only for learn-down
12:44.07DocScrutinizer05that's what you get if you buy surplus chips left over from a really huge customer
12:44.10keriohaha
12:44.19keriowell, the easiest way to fix that is to make a 2Ah bl-5j
12:44.22kerio:P
12:44.28DocScrutinizer05:-D
12:44.36keriois there no restriction on learn-up?
12:44.52DocScrutinizer05according to datasheet, there's none
12:45.09keriowhy do people always have problems when calibrating those dual batteries?
12:45.11DocScrutinizer05which makes sense
12:45.25DocScrutinizer05nfc
12:45.32DocScrutinizer05do they?
12:46.01DocScrutinizer05I guess that's about bme "calibration"
12:48.24kerioShadowJK: could you confirm or deny?
12:48.39DocScrutinizer05stskeeps once told me he had a look at bme sourcecode and it made his eyes bleed and he felt an urge to kill himself. IIRC he also said Nokia has no inhouse competence regarding bme which would mean they outsourced it
12:50.11DocScrutinizer05bme evidently accessing register #48 of the 6 registers ob bq is another indication about quality of bme code X-P  (numbers made up)
12:50.23kerio#48?
12:50.28DocScrutinizer05yeah
12:50.32keriowhat's 48?
12:50.42DocScrutinizer05nonexistent XP
12:50.45keriobetter question, what's 48 in hex?
12:51.03DocScrutinizer05meh, maybe it been 0x48
12:51.19DocScrutinizer05numbers made up, see?
12:51.20keriostill RESERVED
12:51.32DocScrutinizer05no, this been of bq24150
12:51.39kerioi see
12:51.46DocScrutinizer05which actually has only 6 or 8 registers
12:51.59kerionice
12:52.01DocScrutinizer05iirc they wrap around
12:52.18DocScrutinizer05incomplete addr decoder
12:52.47DocScrutinizer05but that's probably no guaranteed property of the chip
12:54.19DocScrutinizer05usually with 6 registers, you have 0x0 .. 0x5 defined, 0x6 and 0x7 undefined, and 0x8 == 0x0 a.s.o
12:55.35DocScrutinizer05anyway with a patched i2c.ko we traced all bq24150 access, and bme accessed a register way out of the existing addr range
12:58.15DocScrutinizer05Nokia trusting this crap more than community driven efforts to do a bme replacement is pretty embarrassing
12:58.31DocScrutinizer05for Nokia, for us it's an insult
13:00.16DocScrutinizer05maybe they got a contract with a subcontractor that includes full liability for any mass recall and killed users, so I'd maybe forgive them for not wanting to touch it
13:09.25keriohmm, will setting NAC also set LMD?
13:11.26DocScrutinizer05most likely not
13:11.45keriobut is NAC used when calibrating?
13:11.55DocScrutinizer05which is what relativates the usefulness
13:12.04keriootherwise, that WRTNAC is kinda useless
13:12.10kerioeven from a manifacturer's point of view
13:13.03DocScrutinizer05I guess it's meant to get used for batteries with multicells with balanced charging, or sth like that
13:13.50DocScrutinizer05you could adjust the N900 bq27200 to match the real current capacity of a newly inserted battery
13:14.24DocScrutinizer05given you know what capacity this battery is at right at this moment
13:15.38DocScrutinizer05look, you got a spare battery with you that you know is 100% charged. Swapping batteries would leave your bq27200 at 10% or 0% or whatever your depelted battery been at
13:15.47keriooic
13:15.51DocScrutinizer05s/with/which/
13:15.58DocScrutinizer05meh, no
13:18.09DocScrutinizer05wait, what did ShadowJK say?
13:18.33DocScrutinizer05<ShadowJK> nac gets the value from ar, rsoc/csoc is set to 100 and vdq goes high
13:19.41DocScrutinizer05means you set a certain NAC as 100% and start a valid learning cycle. Depleting your swappend in battery to EDV1 would learn the capacity of that new battery
13:20.21keriobut will it use the NAC you set as a starting point?
13:20.58DocScrutinizer05yes, starting point of rsoc/csoc to calculate TTE and %
13:21.38DocScrutinizer05after reaching EDV1 it will adjust due to measured coloumb that the battery delivered
13:23.11DocScrutinizer05so e.g setting NAC to 100mAh will make your battery display drop to 0% rather rapidly, then it stays there for a long while til EDV1 is reached, and at that point LMD will get set to actual measured total capacity during last discharge aiui
13:24.25DocScrutinizer05while setting NAC to 3000mAh will cause your device shutdown at capacity-display=60%
13:25.28DocScrutinizer05or rather, it first will jump from 60% to 0% at reaching EDV1, then it completes learning cycle, then it may shut down
13:26.05DocScrutinizer05kerio: all roger?
13:26.30kerioyeah
13:26.47DocScrutinizer05fine
13:26.48kerioit's still unclear to me if that can be used to get around the learn-down limits
13:26.59DocScrutinizer05no it can't
13:28.29DocScrutinizer05learn-down linitation is during storing new LMD to LMD-register. It checks for old content and if that's way higher than new content, it will adjust new content to 7/8 of old content, then store it to LMD-register
13:29.14DocScrutinizer05at least that's my take on it
13:29.53DocScrutinizer05iirc there is NO way to store a new arbitrary value to LMD
13:30.14DocScrutinizer05except copy ILMD from EEPROM to register
13:30.31keriobut you can only program the EEPROM 10 times :(
13:30.42DocScrutinizer05yep
13:31.26DocScrutinizer05the bq27x00 are meant for integration into battery pack. Nokia abused them
13:32.18DocScrutinizer05and if their EE were alert, they had programmed ILMD to 100
13:32.54DocScrutinizer05but probably they simply didn't care since the whole thing been meant to read out voltage and current-now only
13:33.39DocScrutinizer05they simply thought the rest of data was useless in that particular circuit anyway
13:34.47DocScrutinizer05but then they could've saved the buffer capacitor at BRI X-P
13:36.58DocScrutinizer05well, even Nokia EE are not inerrant
13:42.34ShadowJKor then they really meant to use a bigger battery
13:44.16ShadowJKor set it high enough that NAC would never reach 0, so that they could read nac once a minute to derive current now instead of reading AI every 5s
13:45.21keriohow about just using the chip for what it was, instead? :s
13:47.31DocScrutinizer05that would have required an alternative battery to the BL-5J
13:47.55DocScrutinizer05with bq27000 integrated
13:48.13DocScrutinizer05see openmoko gta02 smartbattery
13:48.38DocScrutinizer05*we* (openmoko) were able to pull that off
13:49.03DocScrutinizer05Nokia obviously been reluctant
13:49.51keriomaybe it was a good thing, though
13:50.03kerioBL-5Js are used in quite a lot of nokia phones
13:50.17keriothe 5800 is quite popular
13:57.36DocScrutinizer05http://maemo.cloud-7.de/share-service/20130329_001.jpg   DAMN!
13:58.08keriohaha
13:58.11DocScrutinizer05btw it's fully compatible to bp-5c
13:58.17kerioyou trolly you
13:58.28kerioalso, 1200mAh?
13:58.30DocScrutinizer05Nokia could've done same for BL-4J
13:58.35kerioit's... smaller than bl-5j, isn't it
13:58.37DocScrutinizer05err BL-5J
13:59.02DocScrutinizer05way smaller, that's why I uttered "DAMN"
13:59.16kerioi meant capacity-wise
13:59.23keriothe current bl-5js are 1400
13:59.35DocScrutinizer051200mAh, bq27000 integrated, mechanically compatible to Nokia BP-5C
14:00.14*** join/#maemo-ssu jon_y (~enforcer@2002:af91:531b::af91:531b)
14:00.29DocScrutinizer05well, that GTA02 battery is like 5 years old
14:01.09DocScrutinizer05and it actually had ~1200mAh, according to LMD
14:02.55ShadowJKbl-5c started out as 800mAh, iirc, and technolgy improvements have taken it further since :)
14:04.08*** join/#maemo-ssu kolp (~quassel@212.255.224.9)
14:06.14DocScrutinizer05http://wiki.openmoko.org/wiki/Battery_Questions_and_Answers#Do_other_BL-5.2F6C_compatible_batteries_fit.3F
14:09.05kerioi have no good way of doing two's complement in python :(
14:09.12kerioi need a 3-bit-wide datatype
14:11.10DocScrutinizer05huh?
14:11.19kerioto parse BOFF
14:11.31kerio(in python)
14:11.45DocScrutinizer05how about basic integer math and boolean?
14:12.15kerio...i know how to do that, i didn't /want/ to if there was a better way
14:12.24DocScrutinizer05hehe
14:12.50DocScrutinizer05sure there is (dunno if in python though): enum
14:12.51kerioi don't think there's a good way that lets you avoid checking the sign bit
14:13.34DocScrutinizer05you just need to normalize/mask the relevant bits out of your original 8/16bit value
14:14.46DocScrutinizer05If python can't do boolean AND / OR, you're probably in a pinch
14:15.05keriodon't be silly
14:15.06kerioit's not lua
14:15.12DocScrutinizer05you have to do integer math then, which becomes nasty
14:15.46kerio[0, 1, 2, 3, -4, -3, -2, -1][(bq27k["PKCFG"] & 0b00011100) >> 2]
14:15.46kerio:D
14:15.55DocScrutinizer05lua? meh! don't know lua to make sense of what you said
14:16.07keriolua has a single "number" type
14:16.16kerioand it's float
14:16.24DocScrutinizer05great
14:16.26kerio"In the interest of simplicity"
14:16.32DocScrutinizer05idiots
14:17.00DocScrutinizer05well, maybe they have a byte or word type then
14:17.27kerionope
14:18.01DocScrutinizer05ypur codeline above is puzzling
14:18.34kerioaccess the ((bq27k["PKCFG"] & 0b00011100) >> 2)th element of the [0, 1, 2, 3, -4, -3, -2, -1] list
14:18.36DocScrutinizer05I gather that's some special list operation stuff in python?
14:18.46keriolist access is hardly special
14:18.48DocScrutinizer05yeah
14:19.30DocScrutinizer05well, the only lists I ever use are linked lists ;-D
14:19.59DocScrutinizer05single or double linked
14:20.01keriofun fact: "list" in python is, internally, an auto-resizing array
14:20.07DocScrutinizer05yeah
14:20.14DocScrutinizer05think I heard about that
14:20.29keriothe only linked list i can think of in python is collections.deque
14:22.44DocScrutinizer05I seem to recall lists in python perform like my ass with obstipation
14:22.51keriowhen doing what?
14:23.23DocScrutinizer05when doing usual list operations like instantiate, append, insert, delete
14:23.40kerioinsert and delete aren't usual array operations
14:25.45DocScrutinizer05whatever, I seem to recall performance optimizations by factor 1000 over the whole program, by simply an experienced coder replacing some list crap in some newbie's python code by basic datatypes
14:26.45keriowrong datatypes tend to do that, yeah
14:27.13kerioalso, when you have dict, everything *does* look like a hashmap
14:28.20DocScrutinizer05but anyway, for this particular project it doesn't matter I guess
14:32.28DocScrutinizer05>> EDV detection has a dynamically adjusted delay of up to 21.5 s with RSOC ≥ 6% an ddown to 3 s when RSOC = 0%.<<
14:34.19*** join/#maemo-ssu _rd (~rd@p57B4916E.dip0.t-ipconnect.de)
14:35.41DocScrutinizer05kerio: ^^^ is a scheme that's probably adoptable to bme-replacement shutdown-threshold-detection as well
14:36.44DocScrutinizer05at very least it gives a hind about minimum guard time to be used for that detection in bme-repl
14:36.49DocScrutinizer05hint*
14:37.24DocScrutinizer05minimum guard time is 30s
14:40.49DocScrutinizer05kerio: FYI: >>measured LMD value (for a learning cycle) is determined by *measuring* the *capacity* *delivered* from the battery from NAC = LMD (aka "full") until VOLT = EDV1, plus LMD/16 to account for the 6.25% capacity remaining below the EDV1 threshold.<<
14:41.58*** join/#maemo-ssu arcean_ (~arcean@aael75.neoplus.adsl.tpnet.pl)
14:47.59*** join/#maemo-ssu futpib_ (~futpib@89.106.197.119)
14:49.03DocScrutinizer05kerio: actually LMD gets not calculated from NAC at all, there's obviously a dedicated computation register called Learning Count Register (LRC) for that
14:50.38DocScrutinizer05see "figure 4"
14:57.31keriohrmpf, how should i store DCOFF?
15:09.14DocScrutinizer05what's DCOFF?
15:09.35DocScrutinizer05nm
15:18.25DocScrutinizer05what do you mean by "how to store"?
15:18.39kerioit's a value that can be 0, C/2, C/4, C/8
15:18.45DocScrutinizer05yes
15:18.59kerioi decided that i'm lazy and i'm actually storing it as 0, 1, 2, or 3
15:19.58DocScrutinizer05I'd store it as 0, 0.5, 0.25, 0.125
15:20.25DocScrutinizer05or at very least as 1,2,3,8
15:21.09DocScrutinizer05err
15:21.16DocScrutinizer05pretty inconvenient
15:21.45DocScrutinizer05let's put this straight: it's the current above which CAC starts to differ from NAC
15:22.37DocScrutinizer05it's calculated as percent of LMD, in ampere
15:23.48DocScrutinizer05there are the possible values 0%, 12.5%, 25%, 50%
15:25.41kerioclearly it's a job for fractions.Fraction
15:26.19keriobut actually no, floats represent binary fractions exactly :)
15:28.00kerioThe equation for programming the value is:
15:28.00kerioTOFF[3:0] = Design Temp Compensation Offset (°K) – 273
15:28.01keriodafuq
15:28.11kerioso... Design Temp Compensation Offset (°C) then
15:28.33DocScrutinizer05so for AI > LMD * ^^^DCOFF%, the compensated AI gets calculated as CAI = AI + ((AI - (AI * DCOFF%)) * (0.39% * DCGN))
15:29.04kerioit's 0 for the n900, isn't it?
15:29.26DocScrutinizer05for me DCOFF is 6
15:29.55DocScrutinizer05and DCGN is 25
15:30.03keriooh
15:30.33DocScrutinizer05sorry
15:30.44DocScrutinizer05DCOF is 2
15:31.32DocScrutinizer05and my formula above seems also not quite correct
15:32.32DocScrutinizer05so for AI > LMD * ^^^DCOFF%, the compensated AI gets calculated as CAI = AI + ((AI - (LMD * DCOFF%)) * (0.39% * DCGN))
15:33.45DocScrutinizer05the term AI - (LMD * DCOFF%) never must be negative
15:34.47DocScrutinizer05this is guaranteed by applying the compensation only when AI > LMD * ^^^DCOFF%
15:39.42kerioDCOFF 0.25, DCGN 6.25%
15:39.57DocScrutinizer05if [ ${AI} -ge $(( LMD * DCOFF_IN_permille / 1000 )) ]; then CAI = ...
15:39.59DocScrutinizer05yes
15:40.21DocScrutinizer05so I'd store it like 250 to DCOFF_IN_permille
15:40.43kerionope, 0.25 is perfectly fine :)
15:40.54kerioor maybe percentage, like everything else
15:41.41DocScrutinizer05err btw why 6.25% DCGN?
15:41.59DocScrutinizer05~66/4
15:41.59infobot16.5
15:41.59kerioDCGN[5:0] = 2.56 * Design discharge compensation gain %
15:42.05kerio~66/2.56
15:42.05infobot25.78125
15:42.09keriowat
15:42.26kerio~25/2.56
15:42.26infobot9.765625
15:42.33kerioi don't know why 6.25% DCGN
15:42.35DocScrutinizer05ummm
15:43.23DocScrutinizer0566=0b01100110
15:43.28DocScrutinizer05>>2
15:43.45DocScrutinizer050b00011001
15:44.09DocScrutinizer059+16=25
15:44.21DocScrutinizer05~25*0.39
15:44.22infobot9.75
15:45.35DocScrutinizer05<PROTECTED>
15:45.58keriothat's split in two
15:46.31DocScrutinizer05BIT 7 BIT 6 BIT 5 BIT 4 BIT 3 BIT 2 BIT 1 BIT  0
15:46.32DocScrutinizer05NAME DCGN[5] DCGN[4] DCGN[3] DCGN[2] DCGN[1] DCGN[0] DCOFF[1] DCOFF[0]
15:46.41DocScrutinizer05thus >>2
15:47.23DocScrutinizer05DCGN[5:0]=0b00011001
15:47.53DocScrutinizer05=0x19=25
15:48.10kerio66 == 0b01000010
15:48.21DocScrutinizer05WUT?
15:48.32DocScrutinizer05dang!!
15:48.44DocScrutinizer05I need more coffee
15:49.07DocScrutinizer05of course you're right
15:49.19kerio~kerio
15:49.20infobotit has been said that kerio is <DocScrutinizer05> kerio is right
15:51.34DocScrutinizer05~19*0.39
15:51.34infobot7.41
15:53.46DocScrutinizer05I really need more coffee
15:54.25DocScrutinizer05and a better calculator, kcalc is da crap
15:57.14DocScrutinizer05so finally 0x7e:66 means DCGN=16dez
15:57.27DocScrutinizer05~16*0.39
15:57.27infobot6.24
15:59.37DocScrutinizer05so finally 0x7e:66 means DCOFF=1dez which maps to C/2 aka 50%
16:00.07kerioDCOFF = 2 which maps to C/4
16:00.37DocScrutinizer05yes, again
16:01.02DocScrutinizer05a pair value can't have LSB=1
16:01.18DocScrutinizer05seems I should go back to my bed
16:02.29keriohm, i'm missing the energy stuff in the output
16:02.59DocScrutinizer05*shrug*
16:03.12DocScrutinizer05it's a simple multiplication I'd guess
16:03.25keriothey're stored in separate registers though
16:03.27kerioSAE and AP
16:03.35DocScrutinizer05yeah sure
16:04.06keriobut yeah, it's a multiplication
16:04.08DocScrutinizer05~1245 mAh / 4
16:04.14DocScrutinizer05~1245  / 4
16:04.14infobot311.25
16:04.16kerio"The host system has read-only access to this register pair."
16:04.21kerioif only
16:04.57kerioi2cset a trillion joules
16:05.06kerioand solve the energy crisis
16:06.14keriook, let's check for joergthon compatibility
16:06.17kerioDocScrutinizer05: http://pastebin.mozilla.org/2256926
16:06.56*** join/#maemo-ssu _rd (~rd@p57B4916E.dip0.t-ipconnect.de)
16:07.10DocScrutinizer05kerio: moeoeoep :o) 0x7C:        67 PKCFG Pack Configuration Values
16:07.44DocScrutinizer05DCFIX Fixed discharge compensation  == 1
16:09.00DocScrutinizer05>>If this bit is set to 1, the device assumes a fixed value of 0x42 for DCOMP, giving a discharge rate compensation gain of 6.25% with a compensation threshold of C/4. <<
16:09.34kerioalso, my PKCFG is 67, not 66
16:10.09DocScrutinizer050x7E:        66 DCOMP Discharge Rate Compensation Constants,
16:10.12keriowhat the hell, why is my TCFIX set
16:10.19DocScrutinizer050x7C:        67 PKCFG Pack Configuration Values
16:10.47keriooic
16:11.14kerioyeah but don't get distracted, check for SyntaxComplicated
16:17.29DocScrutinizer05well, your bq27k["DCOFF"] will probably fail for 0%
16:18.46DocScrutinizer05well, maybe not
16:19.51*** join/#maemo-ssu M13 (~MirandaLS@170.133-224-87.telenet.ru)
16:23.24DocScrutinizer05anyway DCFIX = 1 means 0x7e is an identification byte only, which makes me start to wonder what ID "66" means
16:29.50DocScrutinizer05kerio: s/ # registers for us/ # registers for us, which actually is a rather nonsensical thing but done anyway/
16:31.29DocScrutinizer05kerio: otherwise, this code makes me love python
16:32.48DocScrutinizer05I'd actually be temped to do what I always do: "steal" it and hack in my nasty little tweaks
16:33.21DocScrutinizer05but then, it's based on sysfs nodes so basically useless for my purposes
16:39.19DocScrutinizer05W*T*F?!!
16:39.47DocScrutinizer05> >CYCT is the cycle count since a full reset. A full reset clears this register. Each count indicates a cumulativ edischarge equal to the Design Capacity (256 * ILMD). The host system has read-only access to this register pair.<<   ILMD!!! Design capacity!
16:41.16DocScrutinizer05so we need to compensate this by  CCYCT = CYCT / LMD * ILMD
16:41.27keriono we don't
16:41.50keriowhile a cycle counter might be cute to have, bq27k will still use the real CYCL
16:42.17DocScrutinizer05for a meaningful value to display to user we do, for sysfs nodes exposing raw register values we obviously don't since there's no CCYCT register anyway
17:09.59DocScrutinizer05WAAAAIIIT
17:12.10DocScrutinizer05reading thru "Programming the EEPROM" section, it occurs to me that you *can* overwrite values in EEPROM (like ILMD) with a new value. It needs the programming voltage pulse only for flashing that to EEPROM to make it persistent across chip resets
17:13.27ShadowJKoh?
17:13.29DocScrutinizer05maybe I hope for too much, but it *might* work to write a new value to e.g. ILMD just like to any other RAM register, and it *might* stay on that value until next chip reset
17:13.35ShadowJKcan we change edv1 :)
17:13.43kerio:O
17:13.46*** join/#maemo-ssu M13 (~MirandaLS@170.133-224-87.telenet.ru)
17:14.08kerioDocScrutinizer05: chip reset, or full reset?
17:14.18ShadowJKYou mean you hope it's got sram, and copies eeprom to sram on start?
17:14.49ShadowJKinstead of always reading from eeprom
17:15.09DocScrutinizer05the recommended procedure to flashh EEPROM: "enable, write data to X, *read data from X*, apply flash pulse" suggests to me that the data is sticky in that location at least for one read
17:16.04DocScrutinizer05if it works for one read, why should it fail for 2nd read?
17:16.18DocScrutinizer05ShadowJK: exactly
17:16.19keriowhy "read data from X"?
17:16.33DocScrutinizer05because it's written in datasheet
17:17.01keriojust read it once? or read and check that it's the written one?
17:17.23kerioanyway, /me will not risk his only n900
17:17.28DocScrutinizer05see p.23 "Programming the EEPROM"
17:17.32kerioDocScrutinizer05: use your 74th n900 maybe
17:18.18DocScrutinizer05DANG!!
17:18.34DocScrutinizer05chip does POR on leaving programming mode
17:20.26DocScrutinizer05it's neither defined in DS what happens when writing to the EEPROM locations without enabling programming mode, nor is there any warning that programming mode MUST get exited by > >Write data 0x00 t oaddress 0x6E<< or otherwise chip wouldn't work
17:21.59*** join/#maemo-ssu futpib__ (~futpib@89.106.197.102)
17:23.36DocScrutinizer05so we can test 2 possible scenarios: try writing to ILMD without enabling prog mode by > >Write data 0xDD to address 0x6E<< and see if that changes anything. And second: > >Write data 0xDD to address 0x6E<< then write new value to ILMD or EDV1 and see how chip behaves when we do NOT > >Write data 0x00 t oaddress 0x6E<< after that
17:25.39DocScrutinizer05btw there's a huge range of "RESERVED" register addr that might (and actually do) hold valuable data and might even be writable
17:26.13kerioDocScrutinizer05: well, nothing *can* go wrong, right?
17:26.22kerioat worst you unplug the battery and wait some time
17:28.18DocScrutinizer05yes, that's what I think, unless you write to RESERVED registers and something terrible goes wrong inside chip (extremely unlikely, like "I would bet my life on it, when I could win a 1000$")
17:29.11DocScrutinizer05nevertheless, act on own peril, no warranties
17:31.24DocScrutinizer05if an aborted "programming" sequence, even without VPP applied, could go awry, the datasheet for sure should have a HUGE warning about that. And a pointer to the scientific report explaining that miracle
17:32.17kerioDocScrutinizer05: was your idea to change eeprom parameters and then do a full reset?
17:32.48DocScrutinizer05no
17:33.04keriohow is the chip supposed to "reload" the parameters then?
17:33.31DocScrutinizer05a full reset restores EEPROM parameters to ram, and we can't change EEPROM values without applying VPP
17:34.11DocScrutinizer05while normal operation would most likely use the ram register copies of the values
17:34.25keriohm
17:34.32DocScrutinizer05for ILMD that's rather useless anyway
17:34.35kerioi was hoping that the ram copies would persist until a power off
17:34.55DocScrutinizer05since ILMD gets used only when doing a full reset
17:35.05DocScrutinizer05AAAAND for cycle calculation ;-D
17:35.41DocScrutinizer05kerio: power off *is* the usual cause for a full reset
17:35.55keriothere is a real full reset
17:36.02keriowrite the appropriate bits to MODE and CTRL
17:36.10DocScrutinizer05yeah, but what for??
17:36.30keriobecause we could hope it's less full than removing power to the chip :)
17:36.39DocScrutinizer05meh, it isn't
17:36.55DocScrutinizer05why the heck do you want to reset anyway?
17:37.13keriobecause you just "wrote" a new ILMD, maybe :D
17:38.02DocScrutinizer05heck!!! ILMD is only useful for full reset aka power-off. We don't need it for anything else (except cycle calculation)
17:38.27DocScrutinizer05and for cycle calculation I guess we don't need any reset to make a change in ILMD get effective
17:38.41keriobattery swapping?
17:38.41DocScrutinizer05shakes head
17:39.14DocScrutinizer05WHAT?? why? what are you trying to get done?
17:39.18ShadowJKi thought cycles were counted against lmd
17:39.29DocScrutinizer05no, ILMD :-S
17:39.47kerioDocScrutinizer05: write known LMD and NAC right after you inserted the new battery
17:40.08DocScrutinizer05[2013-03-29 17:39:46] <DocScrutinizer05> > >CYCT is the cycle count since a full reset. A full reset clears this register. Each count indicates a cumulativ edischarge equal to the Design Capacity (256 * ILMD). The host system has read-only access to this register pair.<<   ILMD!!! Design capacity!
17:40.12kerio"live" battery swap with correct-ish capacity measurement
17:40.55DocScrutinizer05why bother about LMD when swapping battery?
17:41.50DocScrutinizer05and how's that related to ILMD?
17:42.02DocScrutinizer05which evidently we can't change for battery swap
17:44.26DocScrutinizer05> >The POR status bit is set to 1 by the bqJUNIOR following a Power on Reset. This is a flag to th ehost that VCC was less than V(POR) and caused a reset. The bit is cleared to 0 by the bqJUNIO Rwhen a full charge condition is reached or it may be cleared by the host. The bit is also cleared to  0after exiting from EEPROM programming or ship. The host may set this bit, but it has no effect o nthe bqJUNIOR operation. The user should
17:44.27DocScrutinizer05keep this bit set or cleared as desired when other bits i nthis register are set.<<
17:44.48DocScrutinizer05^^^ useless (for this purpose)
17:45.25DocScrutinizer05(but actually I think chip does no full reset on exiting prog mode. I confused stuff here)
17:45.43keriowhere's that status bit? MODE?
17:46.19DocScrutinizer05> >Full reset. This command bit requests a full reset. A full reset reinitializes all RAM registers ,including the NAC, LMD, and FLAGS registers. This command is intended for manufacturing use.<<
17:46.48DocScrutinizer05^^^ most probably including reading back EEPROM values to RAM
17:48.49DocScrutinizer05if you want to write new values to LMD (not ILMD) I bet you have to write to one of the RESERVED registers. If they are not write protected
17:49.53DocScrutinizer05I bet those are the complete memory of that microcontroller mapped to I2C addresses
17:50.25DocScrutinizer05incl timer, auxiliary registers, PC, SP, stack and all
17:51.24keriowhy would they be i2c-writable?
17:52.37DocScrutinizer05because nobody bothered to make them r/o, if we're lucky
17:54.08DocScrutinizer05read-only just might mean that on next internal program cycle those registers are refreshed to a calculated/derived value and nobody cares about what you write to them
17:56.16DocScrutinizer05hey, this is I2C, drivers are supposed to act according to DS specs. Why would a chip manuf bother to spend work, chip real estate, money, yield, on implementing a write protection for registers marked "RESERVED"?
18:00.34ShadowJKprobably temporary storage for calculations and stuff
18:05.28kerioclearly we should port uClinux to the bq27200
18:22.19*** join/#maemo-ssu Pali (~pali@Maemo/community/contributor/Pali)
18:43.52*** join/#maemo-ssu kolp (~quassel@212.255.224.9)
19:02.00*** join/#maemo-ssu andre__ (~andre@wikimedia/aklapper)
19:07.56*** join/#maemo-ssu M4rtinK (~M4rtinK@mail.melf.eu)
19:22.38*** join/#maemo-ssu Estel^ (~Estel@d56-215.icpnet.pl)
19:22.38*** join/#maemo-ssu Estel^ (~Estel@Maemo/community/contributor/Estel-)
19:22.55Estel^ShadowJK, kerio, DocScrutinizer05, there is a limit for capacity-up learning
19:23.06*** join/#maemo-ssu Vlad_on_the_road (~Vlad_on_t@ip-66.net-82-216-1.versailles2.rev.numericable.fr)
19:23.21Estel^if, for example, you would have ilmd as 100 mA, after 100 mA used capacity and vdq=1 would stay for some time/mAh spent...
19:23.37Estel^and, after certain ammount of Mah spent or time in 6%, vdq got spoiled to 0
19:23.52Estel^thats why people calibrating for dual batteries need to go by steps
19:24.28Estel^from my experience, capacity gain of 800 mAh is about ok for single cycle, duinno if it depends on LMD (so % of last discharge)
19:24.40Estel^from ~1300, one may jump to ~2300 max
19:25.01Estel^er, in fact it might have been 1300->1800->2300, so 500 mA gain
19:25.36Estel^haven't done it for some time, usually I'm jumping from 2048 mAh to ~3400 mAh in 2 or 3 cycles
19:26.00Estel^well, two, as it's definitelly possible to go from 2000 mAh to 2800 mAh
19:26.37Estel^so it may be % related - 1300 allow only ~650 mAh gain, 2000 doesn't have problem with 1000 probably, I suspect (assumption) max 50% gain in caapcity, since vdq get spoiled
19:26.47Estel^definitelly iot's higher than learn-down limit, but it's there too, for 100%
19:27.23Estel^best wishes to some responsible chanop, that keeps my main registered nick (Estel_) at +q state, btw. Kudos.
19:27.56Estel^waves and goes for some pleasant RL
19:53.32*** join/#maemo-ssu nox- (noident@freebsd/developer/nox)
20:11.18*** join/#maemo-ssu sunny_s (~sunny_s@business-092-079-020-027.static.arcor-ip.net)
20:14.44*** mode/#maemo-ssu [+o DocScrutinizer05] by ChanServ
20:15.01*** mode/#maemo-ssu [-b Estel_!*@*] by DocScrutinizer05
20:15.31*** mode/#maemo-ssu [-q Estel_!*@*] by DocScrutinizer05
20:15.38*** mode/#maemo-ssu [-o DocScrutinizer05] by ChanServ
20:49.46*** join/#maemo-ssu unclouded (~neil@2001:4428:200:80fc:e973:61cd:733:b07b)
20:51.08Estel^<#maemo-ssu> [21:15] DocScrutinizer05 (~HaleBopp@openmoko/engineers/joerg) changed mode: -b Estel_!*@*
20:51.12Estel^<#maemo-ssu> [21:15] DocScrutinizer05 (~HaleBopp@openmoko/engineers/joerg) changed mode: -q Estel_!*@*
20:51.24Estel^how funny. you're luycky, that I have sense of humour and self-distance ;)
20:51.30Estel^lucky, even
20:52.37Estel^kerio, following our conversation about u-boot - I'm all reeady for it, got rid of multiboot, ensured that /sbin/preinit is default one (well, with Mentalist's Traceur's recovery shell, but that's irrelevant here), got flash-ask installed, u-boot-tools, u-boot bootimage, ignore u-boot flasher
20:53.36Estel^wanting to go the way you've described - only u-boot in nand, reading kernels. Now, i've been through documentation, but it's a mess, it speaks about writing own scripts for u-boot bootmenu, then, few lines later, warnj to nbot write own scripts...
20:53.41DocScrutinizer05listen buddy, if you got something to complain no matter what I'm doing, then i happily will revert everything
20:54.08DocScrutinizer05pathetic troll
20:54.13Estel^DocScrutinizer05, sorry, in my mind -b was +b
20:54.25Estel^so i took it for -q +b, which would be quite funny
20:54.27Estel^apologies.
20:55.37Estel^doesn't need to call names, really *gives DocScrutinizer05 some sweet pink flowers with Satan inside*
20:55.47*** join/#maemo-ssu zogg_ (~zoggrules@bzq-79-179-170-78.red.bezeqint.net)
20:57.03Estel^going back to u-boot case - simple question, how to properly generate scripts for u-boot menu, that will make it boot my kp52 as default one without u-boot menu, and display u-boot menu only if <something> is done
20:57.08Estel^to call for it
20:57.35DocScrutinizer05ever wondered how often you suffer from similar distortions of your reality and nobody helps you out on it?
20:57.39Estel^as for u-boot image flashed to nand, I'll do it either from device or from desktop flasher, that part is clear
20:58.11Estel^DocScrutinizer05, all perceived reality is a disortion of our brain ;)
20:58.56Estel^thats why we get along with some people very well, and some (me & you) just don't transmit on same frequency, no matter how hard trying. Keeping ZEN is only solution ;)
20:59.16Estel^people mean well, pink flowers, etc.
21:00.32Estel^I/m pretty sure that we would be in much better terms on IRc if you wouldn't have chanop to (ab)use, but that's different thing
21:01.00kerioEstel^: if you don't mind the "boot from attached kernel" entry that doesn't work in the menu, it's just a matter of doing ln -s /etc/bootmenu.d/*power* /etc/default/bootmenu.item
21:01.04kerioand then u-boot-update-bootmenu
21:01.23Estel^thanks, sounds simple enough. And if I mind it?
21:01.42keriothen your best bet is to edit away the part that adds the attachboot entry in /ust/bin/u-boot-update-bootmenu
21:02.15Estel^ok, device will boot normally, and show u-boot menu only when what? keyboard slided-out?
21:02.24DocScrutinizer05or edit the original file, instead of patching the editor
21:02.26DocScrutinizer05;-P
21:02.38Estel^resulting file, you mean? After editor creates it?
21:03.24Estel^it was hiogh enough time to get rid of multiboot. My only excuse for wqaiting so long was that In fact, I have never ever used it to boot anything else than kernel already flashed in nand :P
21:03.38Estel^=never used it, in reality
21:03.45DocScrutinizer05honestly, feels like I'm supposed to write bund of sed scripts to create my letter, and if the result isn't like it should, then edit sed itself to fix that
21:03.59DocScrutinizer05bunch even
21:04.14Estel^well, used it to get into backupmenu, but that doesn't count, as it doesn't flash nand
21:04.19Estel^ough
21:04.40DocScrutinizer05~trout kerio
21:04.40infobotACTION slaps kerio around a bit with a large trout!
21:05.20kerioDocScrutinizer05: it's not my fault pali hasn't upstreamed my patch yet
21:05.23Estel^kerio, so, summing it up, u-boot menu is triggered by (what?) and otherwise device boots default thing which is (what?)? I need to keep that default thing - kp52 in (what directory)?
21:05.28DocScrutinizer05hehehe
21:05.29Estel^kerio, I agree
21:05.34Estel^btw
21:05.59Estel^hey, maybe I shgould just use your patched u-boot-update-bootmenu
21:06.10kerionah, it's awful
21:06.13Estel^christ, my typos. *should
21:06.20Estel^what's is so awful about it?:P
21:06.21kerioit needs a better way to detect if there's actually an attached kernel
21:06.44Estel^whatever, gimme it to me *gollum's face*
21:06.51kerionope
21:06.53Estel^gimme it, even
21:07.19Estel^gimme it, or I will dig up the link that you've posted some weeks ago, which contain exactly thaT :p
21:07.28keriothat would involve 0 effort on my part
21:07.31kerioi'm ok with that
21:07.34Estel^hehe
21:07.58*** join/#maemo-ssu Vlad_on_the_road (~Vlad_on_t@ip-66.net-82-216-1.versailles2.rev.numericable.fr)
21:08.30Estel^pastebin /usr/bin/u-boot-update-bootmenu is slightly low effort... Think about it, We will save more Co2 if you do that simple command, instead of me waking up google advanced search to find it
21:08.46Estel^sustainable economy, etc
21:09.13Estel^ok, but I still don't get how u-boot menu is triggered. It appears always, or when keyboard is slided out, or bysome configurable thing, or?...
21:09.30keriothe menu appears when the keyboard is open as you boot
21:09.46Estel^doesn't like idea of having some timeout menu on every boot, would rather like device to boot default kernel image, and show u-boot only, when requested 'somehow'
21:09.51Estel^OK
21:10.32Estel^ah, so if I want exercise for sake of exercise, I may practice sliding keyboard out just after kernel gets loaded, to get backupmenu from bootmenu, but without getting u-boot menu
21:10.32Estel^likes the idea
21:10.46kerioi hope you realize that you can just leave the kbd slider open
21:10.55Estel^sure
21:11.02Estel^that's why I've said ''exercise for sake of exercise''
21:11.17Estel^+10 k20 coolnes of using N900 when you slide out just in time
21:11.28Estel^egoboost
21:12.36Estel^I hope you realize ammount of irony here :P anyway, now the ultimate question - when I decide to have possibility of running somwthing like arch linux or whatever, how to prepare "thing" and trigger u-boot-update-bootmenu to make it available from u-boot menu?
21:12.45Estel^how it will know what is default and what isn't?
21:13.01Estel^I suppose ln -s /etc/bootmenu.d/*power* /etc/default/bootmenu.item is default
21:13.16Estel^s/is default/define default thing/
21:13.36Estel^so how about non-default one, that should get available from u-boot menu?
21:13.46kerioyeah, the non-default ones will be available from the uboot menu
21:13.52kerioas will the default one
21:14.03Estel^so /etc/bootmenu.d/ things are considered by u-boot-update-menu?
21:14.03kerioif there's no default, the default is the first one
21:14.13kerioif you leave the attachboot entry in, that's the first one
21:14.24keriootherwise, it's the first in alphabetical order of the uboot entries in /etc/bootmenu.d
21:14.42Estel^...which wouldn't work, as I won't attach kernel to it, due to it having no sense, so surely, i'll kick attached from u-boot menu
21:15.32Estel^so using u-boot is as simple as having proper things in /etc/bootmenu.d and matching images in approriate place, then, running u-boot-update-menu?
21:15.42Estel^mkimage and such things can go screw themselves?
21:16.34Estel^... Whoa, shitload of things in my /etc/bootmenu.d/, that are nto actual
21:16.45Estel^not*
21:16.55Estel^including backupmenu, which shouldn't sit there, methinks?
21:17.52kerioEstel^: that's right, as a user you shouldn't be aware of the existance of mkimage
21:18.04kerioand that directory is shared by fanoush's bootmenu
21:18.26Estel^oh, great, so how to have famoush bootmenu things like backupmenu, and u-boot without broken entries, at the same time?
21:20.40Estel^"fire, fire, carrier under fire" - first of all, I got styrangte problems after uninstalling bootmenu, and while using backupmenu (which implies using bootmenu). When booting with keyboard slided out, my arrows works only for split second, then, I can't select anything in bootmenu (which is visible, though), and thing like "cannot open /dev/fbd0" spams my fbcon
21:20.47Estel^wtf?
21:21.57Estel^now when it boots, "Warning: Unable to open initial console"
21:22.14Estel^Console: Switching to colour frame buffer device 100x30
21:22.26Estel^Kernel panic - not syncing: Attempted to kill init
21:22.38Estel^then shutdown. heh
21:22.38kerioidk
21:23.11Estel^fun fact, if i bash "return" to use that split second when bootmenu works, device boots normally
21:23.23kerioso you have a bootmenu problem
21:23.26Estel^yep.
21:23.57kerioapt-get install --reinstall getbootstate
21:24.05Estel^I would say some multiboot remnants fucked it up, but i vaguely remember smth like that happening one on device, where multiboot wasn't present at any point in time, just bootmenuy instalkled on vanilla system
21:24.07kerioapt-get install --reinstall bootmenu-n900
21:24.12kerioer, sorry, bootmenu
21:24.27Estel^iirc, when i managed to boot ok, all future boots will work OK. Strange things. If not, i'll try reinstalling, indeed
21:29.51Estel^kerio, me wonders why u-boot bootimage adds file 30-U-Boot-2012.12-rc3-1.item to /etc/bootmenu.d/
21:30.09DocScrutinizer05((<kerio> and that directory is shared by fanoush's bootmenu)) which is the great design mistake in that whole thing
21:30.16keriobecause the bootimage is not what you want, really
21:30.33Estel^kerio, I wanted bootimage to extraxt u-boot zimage from it and flash it to nand
21:30.40keriowhy didn't you download the deb somewhere else
21:30.49Estel^btw, what is potential use case to have u-boot item in bootmenu.d?
21:30.55keriomultiboot, probably
21:31.06Estel^because I haven't expected it to do irrational things
21:31.09Estel^lol
21:31.23Estel^u-boot .item for multiboot sounds... fun. Just fun.
21:31.56Estel^like using bicycle dynamo to power initial ignition of 2012 hybrid car
21:32.31Estel^kerio, DocScrutinizer05, I agree that sharing directory with fanoush bootmenu sounds like basic design mistake
21:32.49kerioit's for backwards-compatibility with multiboot
21:33.03keriowhich uses /etc/bootmenu.d and /etc/multiboot.d
21:33.07Estel^anyway, any ideas how to have working backupmenu from fanoush's bootmenu (after kernel is loaded) and u-boot menu without broken entries, considering, that backupmenu.item sits in bootmenu.d ?
21:33.20kerioEstel^: just ignore the errors u-boot-update-bootmenu gives you
21:33.25kerio(another design mistake)
21:33.34Estel^ah, it will give errors? I thought it will make fubar entries to u-boot menu
21:33.41keriono, no
21:33.50kerioit's kinda easy to distinguish between what has a kernel entry and what doesn't :)
21:34.03Estel^3th. why won't anyone fill a bug against that design mistakes to Pali?
21:34.08Estel^yea
21:34.28DocScrutinizer05I'd honestly patch u-boot-update-bootmenu to use *its* *own* directory, like /etc/uboot.d
21:34.36Estel^well, I guewss I;'ll extract u-boot zimage, then aplt-get purge u-boot-bootmenu
21:34.37kerioDocScrutinizer05: and symlink the shit out of every -bootimg?
21:34.48DocScrutinizer05then just _maybe_ copy etc/bootmenu to etc/uboot.d
21:35.01kerioand by symlink i mean dpkg-divert
21:35.32Estel^hehe, I feel another kerio's fork is going to appear. Pali will just lvoe you ;-)
21:35.37Estel^s/lvoe/love/
21:35.39Estel^ffs
21:36.36Estel^this whole u-boot thing confused me enough, to try installing it without doing backup
21:36.41Estel^*desperado mode on*
21:36.49Estel^what can go wrong, in desperado mode, we're immortal ;)
21:37.35Estel^erm, what was that thing, that need to sit on MyDocs, or something in u-boot won't work as it should?
21:37.45keriobootmenu.src and bootmenu.d
21:38.01keriothey're the script and the directory that contains the uimages
21:38.07Estel^w-what? bootmenu.d wasn't on /etc/bootmenu.d/?!
21:38.19keriopay attention, this is MyDocs/bootmenu.d
21:38.21Estel^or is it created by u-boot-update-menu automagically on mydocs?
21:38.43keriowhich contains the automatically-created and automatically-converted uboot images of every kernel and initrd referenced by the .item files
21:39.17Estel^wonderful, I don't even want to ask what would happen, if I wouldn't have mydocs as /dev/mmcblk0p1, and would want to boot from sd, for example
21:39.28kerioif uboot doesn't know what to do, it gives you a console
21:39.32Estel^would need to enter u-boot console and do all shit manually to boot from sd, eh?
21:39.36Estel^hehe
21:39.42Estel^see? desperado mode gives +100 to intuition
21:39.48kerioi'm not sure if anything is loaded automatically from the sd
21:39.50DocScrutinizer05select bootimage_to_add in /boot/*-bootimg*; do install-uboot-entry $(basename $bootimage_to_add) $bootimage_to_add; done
21:40.19kerioDocScrutinizer05: 50% of the times, it works 100% of the times
21:40.46Estel^my super-zipper-you-'re-not-a-david-bowie intution tells me, that u-boot console isn't full-fledged termijnal, just itnernal u-boot tool?
21:41.00Estel^internal/iternal/s/ or smth loike that
21:41.03kerioconsidering that linux hasn't even entered the picture at that point...
21:41.34Estel^right. Well, rationale doesn't enter picture at point of intuitional feeling ;_P
21:47.07*** join/#maemo-ssu wmarone__ (~wmarone@c-67-174-151-253.hsd1.ca.comcast.net)
21:47.20Estel^now, we only need to convince good'old'lennart to write poette-boot, and push it to be used as one and only (tm) thing by every board manufacturers, that will contain whole linux substitute bundled in u-boot (poette-boot)...
21:47.32Estel^...so we will have proper terminal instead of u-boot console and unified enviromnent (tm)
21:47.41Estel^;)
21:52.25DocScrutinizer05kerio: find /boot /mnt/mmc/boot -iname "*bootimg*" -exec "echo 'install uboot entry for' {} ' ? (^C for no, enter for this name, or enter an alternative text for menu entry):' read -i {} && install-uboot-entry $REPLY" ;
21:52.53kerioeven then, it actually doesn't work
21:53.07DocScrutinizer05meh!
21:53.08kerioto boot a kernel you need 1) a kernel, and 2) a cmdline
21:53.17DocScrutinizer05then use asm! ;-P
21:53.19kerioand sometimes 3) an initrd
21:53.58DocScrutinizer05an initrd?
21:54.12kerioan initrd!
21:54.16DocScrutinizer05what for? filesystem not available in the kernel?
21:54.49kerio*coff coff rescueos coff coff*
21:55.10DocScrutinizer05cofcoff not meant to ever get installed coffcoff
21:55.16kerio"meant" my ass
21:55.19kerioit works perfectly
21:55.32DocScrutinizer05actually that's the only reason why it needs an initrd
21:55.47kerioand it's probably indistinguishable from when you boot it from flasher
21:56.54DocScrutinizer05anyway nothing that couldn't get handled inside install-uboot-entry
22:00.14kerioalso, it's quite untrivial to do something like that
22:00.24keriobecause the uboot menu is a single monolithic uboot script
22:03.30DocScrutinizer05*shrug* doesn't do update-bootmenu-foo exactly the same?
22:04.15DocScrutinizer05just that it parses files in alien directories
22:05.12DocScrutinizer05instead of using find and read to find out about actually installed bootimages and get input from user interactively
22:09.17Estel^kerio, could you give me ls of your /lib/modules/current ?
22:09.47Estel^in my case it contains only modules.alias modules.ccwmap and simillar things, which seems like source of my problems wikth bootmenu
22:10.31kerio/lib/modules/current points to the kp52 directory
22:10.31Estel^as vanilla /sbin/preinit have Modules_path=/lib/modules/current, and later, things load watchdogs things by modprobe $module_path/twl_blabla
22:10.40Estel^well, not here
22:11.09Estel^her eit points to omap1
22:11.26Estel^/lib/modules/current -> 2.6.28-omap1
22:11.46Estel^considering that 2.6.28-omap1 doesn't exist here, troubles are clear :P
22:11.50keriohm, reinstall kernel-power-modules i guess
22:12.11Estel^funny, did it yesterday, due to Pali.s fiasco with changing things without boosting version number
22:12.21Estel^will try it again
22:12.40kerioone of the kernel-power packages adds the fix to preinit that makes it use `uname -a` instead of current
22:13.28Estel^ah
22:13.36Estel^love binary file replacements
22:13.49kerioit's not a binary file
22:13.49Estel^having kp installed, then removing multiboot, result in /sbin/preinit being reverted to vanilla
22:13.57Estel^result in kp fix going into /dev/null
22:14.02Estel^you know what i mean
22:14.08Estel^divert should be used,. or smth like that
22:14.11kerioand yeah, it should be a getbootstate fix
22:14.13keriowhich it probably is
22:14.17Estel^if you remove multiboot, or smth like that, it just silently breaks
22:14.31keriothen clearly multiboot has to be purged from the repos
22:14.52Estel^i'm not sure if kp postinst sed things into /sbin/preinit is right thing to do
22:15.01Estel^shitload of circumstances may break it
22:15.03Estel^silently
22:15.09Estel^with suer scratching his head about wtf
22:15.16Estel^user, even
22:15.35Estel^Pali, ^
22:16.05Estel^and yes, kernel-power-modules does that sed into preinit
22:16.13Estel^and symlink of current to kp52
22:16.23Estel^while the latter souns like OK, the sed leaves bad taste
22:16.30Estel^we have fckin divert for a purpose, don't we?
22:16.56Estel^DocScrutinizer05, any comment here? I may be talking bullshit, but i think sed'ing into crucial boot scripts during postinst script is fubar
22:17.19Estel^too many ways to silently break it by other packages, or even worse, by removing other packages. Or shitload of other ways
22:18.02Estel^now i wonder if any other kernel-power package does simillar thing and I should be reinstalling them, too?
22:18.29Estel^or smth else may be silently broken and in 2-3 weeks i'll be scratching my head about why something is fubar
22:19.56Estel^from a different barrel - anyone ahve idea what sh: can't access tty: job control turned off
22:20.00Estel^may mean in practice"?
22:20.05Estel^(and/or how to fix it)
22:20.24Estel^it happens in recovery shell bundled manually into /sbin/preinit . doesn't seem to affect anything, but...
22:22.39*** join/#maemo-ssu arcean (~arcean@aael75.neoplus.adsl.tpnet.pl)
22:39.21*** join/#maemo-ssu Martix_ (~martix@4.177.broadband3.iol.cz)
22:56.32Estel^you know what? I feel like writing CLI re-iplementing backupmenu's function into normal console, to make use of fbcon...
22:56.38Estel^without that pesky text2screen thingie
22:56.53Estel^and without bootmenu requiment
22:57.44Estel^just a recovery shell from /sbin/preinit, with whole backupmenu started by invoking simple script (that runs cli interface)
22:57.55kerioaka pali's recovery console
22:58.13Estel^MentalistTraceur's recovery console > Pali's recovery console (sorry, Pali)
22:58.30keriorescueOS > MT's recovery console
22:58.32Estel^sure, everythingh can be done by manuyal commands, but reintroducing it as CLi make it a) faster for casual execution
22:58.38Estel^RescueOs is different beast
22:59.18Estel^...b) more friendly for noobs, and I *do* want noobs to make backups early and often
23:00.02Estel^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 os
23:00.25Estel^rescue os is super, but it's different use-case
23:00.41keriowhy?
23:01.13Estel^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 all
23:01.30Estel^well, how woulds you run rescue-os on device without multiboot, that doesn't, well, boot?
23:01.32Estel^at all?
23:01.38Estel^due to borked root or whatever?
23:01.44Estel^no bootmenu, no anything?
23:01.58Estel^and without external device to run it from flasher?
23:01.59kerioi wouldn't touch multiboot with a 10-foot pole
23:02.09Estel^s/without multiboot/without u-boot/
23:02.15keriowhy would i be without u-boot?
23:02.24kerioalso, how will you run MT's recovery shell?
23:02.27Estel^*rolleyes* cause you wouldn't have it installed?
23:02.33Estel^from /sbin/preinit
23:02.42keriono, the rootfs is borked, remember
23:02.47Estel^borked = files there messed
23:02.57kerioso rescueOS is fine
23:03.00Estel^not whoile filesystem, the latter is quite impossible to achieve on ubifs ;)
23:03.10Estel^well, for really borked rootfs, you would need rescueos
23:03.12Estel^or better
23:03.14Estel^reflash ;P
23:03.31Estel^or rescueOs and backup restore
23:04.23Estel^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/whatever
23:04.49keriooh fucking hell no
23:04.52Estel^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)
23:04.54keriothat's incredibly far from being the earliest possible stage
23:05.26Estel^well, you know what I mean- earliest as first thing sourced (preinit)
23:05.38Estel^I don't attack rescueOs, it's absolutely superb tool
23:06.06*** join/#maemo-ssu RST38h (marat@wsip-184-180-40-182.ri.ri.cox.net)
23:06.07keriothis reminds me, i should put rescueOS on the uSD
23:06.12Estel^it's just that it's overkill to run it for 99% of simple fixes, that are achievable by 12 lines MT's recovery shell
23:06.30Estel^and trust me, as soon as I'll install u-boot, I'll customzie and put rescueOs on uSD
23:06.32Estel^;)
23:06.47kerioi'm not entirely sure why rescueOS is "excessive", considering that it's pretty much the same amount of effort to use it
23:06.52Estel^now, motivate Pali to make 0xFFFF run-able from device
23:07.05kerioboot with slider open, select rescueOS with arrows, push enter
23:07.18Estel^well, you're probably right, as soon as you have rescueOs setup ;)
23:07.37Estel^Mt's things is easier to install for noobs, properly, that's why I would bundle CLI backupmenu there
23:08.02Estel^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 time
23:08.33Estel^just package diverting sbin/preinit to contain MT's recovery shell, and putting some scripts (backupmenu-cli) into proper places
23:08.55Estel^so people can get recovery shell and backupmenu cli by installing it, and hitting any key during device early boot stage
23:09.06Estel^then, if one use u-boot (everyone should), rescueOs is a must
23:10.03Estel^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 it
23:10.11Estel^brb, changing irc device
23:25.25*** join/#maemo-ssu sunny_s (~sunny_s@business-092-079-020-027.static.arcor-ip.net)

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.