IRC log of #maemo for Saturday, 2016-03-26

*** xorly has quit IRC00:02
*** louis__ has quit IRC00:10
*** louis__ has joined #maemo00:13
fishbulbum00:14
fishbulbflashing instructions please?00:15
fishbulbplug it in then execute scripts?00:15
fishbulbcan I dual boot00:18
fishbulbis there another useful operating system to run with an n90000:18
*** futpib has quit IRC00:21
*** louis__ has quit IRC00:24
DocScrutinizer05fishbulb: execute the script, see the instructions00:33
fishbulbI'm flashing the whole thing00:33
DocScrutinizer05fishbulb: if you get a strenage error from flasher (sth like "file not found" or sth), you need libusb0.1.4 32bit iirc00:38
fishbulbjust got that error00:38
fishbulbwhere do I find it?00:39
*** louis__ has joined #maemo00:39
DocScrutinizer05your distro's package manager00:39
fishbulbit's not in there00:40
DocScrutinizer05I couldn't automate that in the scipt since it's different for each distro00:40
fishbulbI have to downgrade00:40
DocScrutinizer05ohnoes00:40
fishbulbnot even sure how to00:40
DocScrutinizer05arch?00:40
fishbulbyes00:40
fishbulbwell antergos00:40
fishbulbkernel module collision problem00:42
fishbulbI got that too00:42
fishbulbfixing flasher-3.5 cdc_phonet kernel module collision problem00:42
DocScrutinizer05https://bbs.archlinux.org/viewtopic.php?id=19480800:43
*** pagurus has quit IRC00:43
DocScrutinizer05https://bbs.archlinux.org/viewtopic.php?id=18613000:45
fishbulbthat doesn't really help00:45
DocScrutinizer05the latter should00:46
DocScrutinizer05OK, found the libaries:00:46
DocScrutinizer05$ yaourt -S lib32-libusb lib32-libusb-compat00:46
DocScrutinizer05Works now.00:46
*** louis__ has quit IRC00:46
*** Smily has quit IRC00:47
*** vakkov has quit IRC00:48
fishbulbI got the image that contains backupmenu00:49
fishbulbwhere do I put it?00:49
DocScrutinizer05on a uSD?00:50
DocScrutinizer05errr wait. what?00:51
DocScrutinizer05you got the BM-enhanced fiasco image?00:51
fishbulbHere's a rootfs image from my N900 with BackupMenu 0.50-3 installed: flashable_rootfs_v0.56-1-20101109.img. This image can be flashed with the Nokia flasher, significantly reducing restore time if you have a "bricked" system.00:51
DocScrutinizer05yes, you prolly rather flash it manually00:52
fishbulbhow many steps is that00:52
DocScrutinizer05one?00:52
fishbulbflash what manually?00:52
DocScrutinizer05flasher-3.5 -f -F <path-to-image>00:53
fishbulbthen run the script?00:53
DocScrutinizer05no, first run the script, err, instead of running the script00:53
fishbulbso just run flasher 3.5 and it'll do the whole thing?00:54
DocScrutinizer05flasher-3.5 -f -F <path-to-image>00:54
DocScrutinizer05or somesuch00:54
DocScrutinizer05maybe -F -f00:55
fishbulbwhat?00:55
DocScrutinizer05flasher-3.5 -f -F flashable_rootfs_v0.56-1-20101109.img00:55
fishbulbwhat will that flash00:56
fishbulbI want to do the whole phone00:56
DocScrutinizer05please read complete page http://wiki.maemo.org/Updating_the_tablet_firmware00:56
fishbulbIf you are using the .tar.gz package, use:00:58
fishbulbsudo ./flasher-3.5 -F <firmware-image> -f00:58
fishbulbthat?00:58
fishbulbdo I do that01:02
fishbulbit's not working.01:08
fishbulbyou wrote this script and you don't know how to flash the phone with the backupmenu image?01:09
*** pagurus has joined #maemo01:10
PaliDocScrutinizer05: http://wstaw.org/m/2016/03/25/plasma-desktopiO2219.png --> so backup battery is never charged?01:21
*** vakkov has joined #maemo01:21
Palifreemangordon: ok, are you going to fix it? or what are next plans with tidspbridge?01:21
*** vakkov has quit IRC01:29
*** Smily has joined #maemo01:32
*** Pali has quit IRC01:35
*** HRH_H_Crab has quit IRC01:35
*** HRH_H_Crab has joined #maemo01:36
DocScrutinizer05pagurus: depends on what kernel does01:37
DocScrutinizer05pali:01:37
DocScrutinizer05sorry, ETAB01:38
*** HRH_H_Crab has quit IRC01:46
*** HRH_H_Crab has joined #maemo01:51
fishbulbthe flash it all script didn't erase everything on the phone01:53
fishbulbit's all still there01:53
fishbulball the call history and texts and stuff01:54
*** HRH_H_Crab has quit IRC01:59
*** HRH_H_Crab has joined #maemo02:00
*** HRH_H_Crab has quit IRC02:02
*** HRH_H_Crab has joined #maemo02:04
fishbulbI'd like to report a bug on that flashitall script02:24
fishbulbin that it doesn't work02:24
*** LauRoman has quit IRC02:25
fishbulball calls, all texts, all contacts, all calendar appointments, and I don't know what else yet, are all still there02:27
DocScrutinizer05you need to enter 'YES'02:28
fishbulbI did02:28
DocScrutinizer05obviously not02:28
DocScrutinizer05the script is tested02:28
DocScrutinizer05afaik02:28
DocScrutinizer05well, I tested it before I published it02:29
fishbulbI'll try it again02:29
fishbulbhas anyone else tested it?02:29
DocScrutinizer05I'm pretty sure several people used it already02:29
fishbulbI'll do it again02:30
*** krnlyng has quit IRC02:31
*** alien2003 has joined #maemo02:33
DocScrutinizer05see http://maemo.cloud-7.de/maemo5/patches_n_tools/maemo-my-private-workdir_flash-it-all.sh.LOG02:33
alien2003Hi. Can you help me with U-Boot pls? After I select the kernel it says "Unsupported filesystem"... I tried to fsck and to switch between FAT32 and ext3 filesystem... On FAT it even doesn't show my kernels02:34
DocScrutinizer05fishbulb: you also can use flash-it-all.sh to flash your backupmenu image. however you need move the image to the my-private-workdir and do a   'md5sum flashable_rootfs_v0.56-1-20101109.img >>md5sums.txt'   first02:40
DocScrutinizer05after that call 'sudo ./flash-it-all.sh flashable_rootfs_v0.56-1-20101109.img'02:41
fishbulbInvalid FIASCO file header02:45
fishbulbsorry, flashing flashable_rootfs_v0.56-1-20101109.img (NOLO, rootfs, modem-fw) failed with errorcode 002:45
DocScrutinizer05then the file is not correct02:46
fishbulbI got it off the backupmenu post02:46
DocScrutinizer05I never used that flashable_rootfs_v0.56-1-20101109.img02:46
fishbulbwell it's fucked02:47
DocScrutinizer05seems so. Did you check that you downloaded it without errors?`02:47
fishbulbyes02:47
DocScrutinizer05alien2003: wait for Pali02:48
DocScrutinizer05I noticed a tiny error in flasher file, it shouldn't say "failed with errorcode 0"02:51
DocScrutinizer05irrelevant for that issue here02:52
fishbulba tiny error?02:52
DocScrutinizer05yes02:52
DocScrutinizer05it should read "failed with errorcode 5" or whatever02:53
fishbulbok, it didn't02:53
DocScrutinizer05yes, I see. That's why I say "I noticed a tiny irrelevant error"02:53
*** krnlyng has joined #maemo02:54
fishbulbyeah, the process still didn't work02:55
fishbulbI flashed it a second time and it did erase the stuff though02:56
DocScrutinizer05sure02:56
fishbulbthe first time it said it was doing that and it didn't02:56
DocScrutinizer05o.O02:56
fishbulbwhere are the repos?02:57
DocScrutinizer05~repos02:57
infoboti guess repos is "deb http://maemo.muarf.org/apt-mirror/mirror/downloads.maemo.nokia.com/fremantle/ssu/apps/ ./ ;; deb http://maemo.muarf.org/apt-mirror/mirror/downloads.maemo.nokia.com/fremantle/ssu/mr0/ ./", or see http://wiki.maemo.org/Repository#List_of_Maemo_repositories02:57
DocScrutinizer05~jrrepos02:58
infobotjrrepos is, like, http://maemo.cloud-7.de/maemo5/et_al/HAM-catalogs/02:58
DocScrutinizer05one-click-install02:58
fishbulbI put that in the browser?03:00
DocScrutinizer05yes03:07
DocScrutinizer05on N90003:07
DocScrutinizer05actually http://maemo.cloud-7.de/maemo5/et_al/HAM-catalogs/recommended.install03:08
fishbulbif I install all the repos will it spaz out03:08
DocScrutinizer05yes03:09
DocScrutinizer05you only need http://maemo.cloud-7.de/maemo5/et_al/HAM-catalogs/recommended.install03:09
fishbulbdon't you need devel for backup menu, cssu and power kernel03:10
DocScrutinizer05that's unrelated03:10
DocScrutinizer05well, use http://maemo.cloud-7.de/maemo5/et_al/HAM-catalogs/muarf_devel_tools.install03:11
DocScrutinizer05INSTEAD OF recommended03:12
fishbulbok well luckily you said that last03:12
DocScrutinizer05worst case you need to delete catalogs in ham which are duplicate03:13
fishbulbI don't know which ones are03:14
DocScrutinizer05you'll see by their names03:14
fishbulbthere doesn't seem to be extras or extras-devel03:15
DocScrutinizer05extras is on by default03:16
DocScrutinizer05extras-devel is in http://maemo.cloud-7.de/maemo5/et_al/HAM-catalogs/muarf_devel_tools.install03:16
DocScrutinizer05[extras-devel]03:17
DocScrutinizer05name = Maemo Extras-DEVEL catalogue (read WARNING!)03:17
DocScrutinizer05uri = http://repository.maemo.org/extras-devel03:17
DocScrutinizer05dist = fremantle03:17
DocScrutinizer05components = free non-free03:17
fishbulbthat still works?03:17
DocScrutinizer05sure, why not?03:17
fishbulbthe linenoise ones are 40403:22
fishbulbok I can't seem to find cssu or anything else03:24
fishbulbmaybe those repos are no good03:24
fishbulbthey might have a tiny error making them unusable03:25
fishbulbI have to try later, cheers03:27
*** fishbulb has quit IRC03:27
*** flo_lap has joined #maemo03:33
*** florian has quit IRC03:36
*** louis__ has joined #maemo03:47
*** alien2003 has quit IRC04:14
*** eMHa__ has joined #maemo04:34
*** eMHa_ has quit IRC04:37
*** vakkov has joined #maemo04:41
*** M4rtinK has quit IRC04:42
*** louis__ has quit IRC04:51
*** pagurus has quit IRC05:19
*** peetah has quit IRC05:32
*** peetah has joined #maemo05:33
*** lxp1 has joined #maemo06:01
*** lxp has quit IRC06:04
*** vahe has joined #maemo06:20
*** DocScrutinizer05 has quit IRC06:21
*** DocScrutinizer05 has joined #maemo06:21
*** vahe has quit IRC07:02
*** vahe has joined #maemo07:04
*** LauRoman has joined #maemo08:53
*** futpib has joined #maemo09:01
*** Guest5653 has quit IRC09:20
*** juiceme has joined #maemo09:21
*** juiceme is now known as Guest8851809:21
*** vakkov has quit IRC09:40
*** jonwil has joined #maemo09:59
*** vahe has quit IRC10:00
*** Guest88518 has quit IRC10:37
*** juiceme has joined #maemo10:37
*** juiceme is now known as Guest9616010:37
*** sig has quit IRC10:38
*** mickname has quit IRC10:38
*** sig has joined #maemo10:48
*** mickname has joined #maemo10:48
*** xorly has joined #maemo10:48
*** sig has quit IRC10:49
*** Guest96160 has quit IRC10:49
*** juiceme_ has joined #maemo10:55
*** sig has joined #maemo10:56
*** mickname has quit IRC10:59
*** sig has quit IRC11:00
*** sig has joined #maemo11:01
*** mickname has joined #maemo11:02
*** sig has quit IRC11:05
*** ceene has quit IRC11:07
*** sig has joined #maemo11:07
*** ceene has joined #maemo11:07
*** mickname has quit IRC11:11
*** ceene has quit IRC11:11
*** sig has quit IRC11:11
*** ceene has joined #maemo11:11
*** sig has joined #maemo11:12
*** mickname has joined #maemo11:14
*** ceene has quit IRC11:18
*** juiceme_ has quit IRC11:18
*** juiceme has joined #maemo11:18
*** ceene has joined #maemo11:18
*** flo_lap has quit IRC11:19
*** juiceme is now known as Guest9598711:19
*** sig has quit IRC11:22
*** sig has joined #maemo11:22
*** Guest95987 has quit IRC11:23
*** juiceme_ has joined #maemo11:24
*** juiceme_ has quit IRC11:37
*** sig has quit IRC11:37
*** ceene has quit IRC11:37
*** mickname has quit IRC11:37
jonwilhi11:38
freemangordonjonwil: hi! how's lego train going?11:39
jonwilMy LEGO stuff is going great11:39
freemangordon:)11:39
jonwilNext thing I need to build is a couple more sideshow games then I need to add people to my golf course and sideshow games11:41
jonwilI have quite a few vehicles already11:42
jonwilI have a police car, a taxi, a van for my SWAT team, a petrol tanker, a Ute, 4 different buses and 3 lamborghinis11:44
jonwilI still need to build a prisoner transport and a police helicopter11:44
jonwilplus a bunch of 2-wheel vehicles for my police (motorbikes and bicycles)11:45
jonwilmy petrol station looks great, I even built a custom signboard for it (with actual petrol prices taken from a local petrol station on the day I was making the sign)11:47
*** mickname has joined #maemo11:47
*** sig has joined #maemo11:47
*** ceene has joined #maemo11:47
*** juiceme_ has joined #maemo11:47
jonwilIn other news, it was my birthday on Thursday :)11:47
jonwilGoing out to a nice steakhouse for dinner to celebrate tomorrow :)11:48
*** fuz_ has quit IRC11:50
*** mickname has quit IRC11:52
*** sig has quit IRC11:52
*** juiceme_ has quit IRC11:52
*** juiceme has joined #maemo11:52
*** sig has joined #maemo11:54
*** ceene has quit IRC11:54
*** ceene has joined #maemo11:54
*** L29Ah has left #maemo11:55
*** juiceme is now known as Guest7771111:55
*** Pali has joined #maemo11:57
*** Guest77711 has quit IRC11:57
freemangordonPali: summan anna said they will send some patches related to IVA2, I am waiting to see what will be send and will decide what to do next after that12:01
Paliok12:01
freemangordonPali: in the meanwhile did you see that gadget oops I sent on the ML?12:02
Palinow looking at it12:02
freemangordonok12:02
*** juiceme_ has joined #maemo12:03
*** sig has quit IRC12:03
*** mickname has joined #maemo12:03
*** sig has joined #maemo12:03
*** ceene has quit IRC12:04
*** mickname has quit IRC12:04
PaliI see just your twl patches12:05
Palinot gadget oops12:05
*** fuz_ has joined #maemo12:05
*** L29Ah has joined #maemo12:09
*** sig has quit IRC12:10
*** juiceme_ has quit IRC12:10
*** juiceme_ has joined #maemo12:11
*** ceene has joined #maemo12:11
*** sig has joined #maemo12:11
*** mickname has joined #maemo12:12
*** mickname has quit IRC12:17
freemangordonPali: "Re: USB gadgets with configfs hang reboot"12:17
PaliI'm not using configfs12:18
freemangordonPali: the same bug prevents reboot on n90012:19
freemangordonreboot and poweroff12:19
Palihm...12:19
Palionenand corruption12:19
freemangordonPali: if g_nokia is not used, the device reboots just fine, with it it hangs12:20
*** sig has quit IRC12:20
*** mickname has joined #maemo12:20
*** juiceme_ has quit IRC12:20
*** juiceme_ has joined #maemo12:20
freemangordonPali: do you have "ARM: OMAP2+: Fix onenand initialization to avoid filesystem corruption" ?12:20
PaliI think yes12:21
Paliin linux-n900 tree12:21
Paliyes, there is12:21
freemangordonwell, your onenand seem to be corrupted before that patch12:22
*** pagurus has joined #maemo12:26
*** mickname has quit IRC12:31
*** ceene has quit IRC12:31
*** ceene has joined #maemo12:31
*** sig has joined #maemo12:31
*** mickname has joined #maemo12:31
*** mickname has quit IRC12:31
*** sig has quit IRC12:31
*** ceene has quit IRC12:31
*** juiceme_ has quit IRC12:31
freemangordonPali: no much options but a reflash :(12:34
*** mickname has joined #maemo12:37
*** sig has joined #maemo12:37
*** ceene has joined #maemo12:37
*** juiceme_ has joined #maemo12:37
*** sig has quit IRC12:38
*** sig has joined #maemo12:38
*** sig has quit IRC12:43
*** sig has joined #maemo12:43
*** sig has quit IRC12:48
*** ceene has quit IRC12:48
*** ceene has joined #maemo12:48
*** sig has joined #maemo12:48
*** sig has quit IRC12:53
*** sig has joined #maemo12:54
*** mickname has quit IRC12:58
*** mickname has joined #maemo12:58
*** ceene has quit IRC13:05
*** ceene has joined #maemo13:05
*** mickname has quit IRC13:08
*** juiceme_ has quit IRC13:14
*** juiceme has joined #maemo13:14
*** sig has quit IRC13:14
*** ceene has quit IRC13:14
*** mickname has joined #maemo13:14
*** ceene has joined #maemo13:15
*** juiceme is now known as Guest8066113:16
*** ceene has quit IRC13:19
*** ceene has joined #maemo13:19
*** sig has joined #maemo13:20
*** mickname has quit IRC13:22
*** mickname has joined #maemo13:22
*** ceene has quit IRC13:24
*** ceene has joined #maemo13:24
*** Guest80661 has quit IRC13:24
*** vahe has joined #maemo13:25
*** juiceme_ has joined #maemo13:26
*** louis__ has joined #maemo13:29
*** jonwil has quit IRC13:39
*** louis__ has quit IRC14:07
*** louis__ has joined #maemo14:22
*** krnlyng has quit IRC14:25
*** krnlyng has joined #maemo14:27
*** vectis3 has quit IRC14:42
*** vectis3 has joined #maemo14:56
*** M4rtinK has joined #maemo14:57
*** Kabouik has joined #maemo15:09
*** Kabouik_ has quit IRC15:12
*** futpib_ has joined #maemo15:15
*** mickname has quit IRC15:16
*** mickname has joined #maemo15:16
*** futpib has quit IRC15:16
*** SpeedEvil has quit IRC15:21
*** SpeedEvil has joined #maemo15:22
*** futpib_ has quit IRC15:23
*** futpib_ has joined #maemo15:23
*** chfoo has quit IRC15:50
*** zGrr has quit IRC16:25
*** L29Ah has left #maemo16:39
*** L29Ah has joined #maemo16:40
*** zGrr has joined #maemo16:41
*** Elleo has quit IRC16:56
*** Elleo has joined #maemo16:57
*** Elleo has quit IRC16:57
*** Elleo has joined #maemo16:57
*** mickname has quit IRC17:00
*** mickname has joined #maemo17:00
*** arossdotme-planb is now known as notsonegativearo17:06
*** notsonegativearo is now known as arossdotme17:06
*** zGrr has quit IRC17:07
*** arossdotme is now known as arossdotme-planb17:07
*** zGrr has joined #maemo17:28
*** chfoo has joined #maemo17:42
*** vakkov has joined #maemo18:07
*** M4rtinK has quit IRC18:27
*** vahe has quit IRC18:40
*** zGrr has quit IRC18:52
DocScrutinizer05Pali: I dunno how many hours it took, but finally http://projects.goldelico.com/p/gta04-kernel/source/tree/master/ loaded and rendered19:20
Palipassword protected19:20
DocScrutinizer05yeah, you need to register first, lightweight process19:20
*** sunshavi has joined #maemo19:21
DocScrutinizer05anyway I *really* wonder ehat the heck this server is doing, takes literally hours to generate and send content19:25
DocScrutinizer05projects.goldelico.com/p/gta04-kernel/source/tree/gta04-next-upstream-twl4030-madc/ is not a tad faster19:26
DocScrutinizer05neither is projects.goldelico.com/p/gta04-kernel/source/tree/master/GTA0419:27
DocScrutinizer05the wonders of webgit?19:27
*** vakkov has quit IRC19:29
DocScrutinizer05still loading - weird enough it gets no server timeout19:40
DocScrutinizer05Pali: you said there's a generic MADS interface in /sys/?19:41
DocScrutinizer05MADC actually19:41
*** vakkov has joined #maemo19:42
DocScrutinizer05or in /dev/ ?19:42
DocScrutinizer05if yes, you could check bupbat voltage in MADCIN919:43
DocScrutinizer05if charging is actually enabled, it should be significantly >0 even when bupbat broken19:44
*** futpib has joined #maemo19:54
*** futpib_ has quit IRC19:57
*** futpib_ has joined #maemo20:00
*** futpib has quit IRC20:04
KotCzarnykeep in mind it might have been disabled for some reason20:06
*** sunshavi has quit IRC20:10
PaliDocScrutinizer05: maemo kernel has /dev/madc* device and you can ask for value for any adcin channel20:12
Paliin upstream kernel is madc hwmon device (/sys/class/hwmon) but doing some conversion and does not return "raw" value20:13
*** L29Ah has left #maemo20:43
*** L29Ah has joined #maemo20:43
DocScrutinizer05Pali: (ask for value) how?20:45
DocScrutinizer05IroN900:/dev# echo 9 >twl4030-adc20:46
DocScrutinizer05bash: echo: write error: Invalid argument20:46
DocScrutinizer05IroN900:/dev# cat twl4030-adc20:46
DocScrutinizer05cat: twl4030-adc: Invalid argument20:46
DocScrutinizer05some nasty ioctl?20:48
DocScrutinizer05WOW, bot URLs loaded20:51
DocScrutinizer05both*20:51
Paliyes, ioct20:53
Pali*ioctl20:53
PaliDocScrutinizer05: see: https://github.com/community-ssu/getbootstate/blob/master/bsi-read.c20:53
DocScrutinizer05ta20:53
Palithis will read channel 4 (line 54: "par.channel = 4;")20:53
Paliand also channel 12 (line 63)20:54
Palioutput is in "par.result"20:54
DocScrutinizer05yes, I see. I wish I had a working scratchbox env to make a simple knockoff that does "par.channel = argv[1]"20:56
DocScrutinizer05err20:56
DocScrutinizer05"par.channel = str2i(argv[1])"20:57
DocScrutinizer05strtol?21:00
*** ceene has quit IRC21:01
*** ceene has joined #maemo21:02
*** mickname has quit IRC21:04
*** mickname has joined #maemo21:04
DocScrutinizer05strtol(argv[1], 0, 0)21:05
DocScrutinizer05of course I could try binary patching the original executable, but... meh!21:09
PaliDocScrutinizer05: argc == 2 && (channel = strtol(argv[1], &endptr, 10), *endptr == 0) && channel >= 0 && channel <= 1021:11
DocScrutinizer05<=14?21:11
Paliyou need to check if argv is really number21:12
Palimaybe 14, do not know21:12
DocScrutinizer05don't bother, it simply will segfault ;-)21:12
Paliit will not segfault, strtol will return 021:12
DocScrutinizer05even better, yes21:13
DocScrutinizer05it will segfault when argv[1] doesn't exist I guess21:13
Paliargv[1] should always exists :-) argv is terminated by NULL21:14
Paliand when argv[0] exists, then argv[1] must be NULL21:14
Palibut strtol does not check for NULL...21:14
DocScrutinizer05that's no problem, it returns 0 then21:15
DocScrutinizer05anyway this is completely fine behavior for my purpose21:15
DocScrutinizer05you get what you asked for21:15
DocScrutinizer05maemo-madc 555  --> segfault21:16
DocScrutinizer05100% ok21:16
DocScrutinizer05Pali: btw maybe argv[1] is a string at some address with argv[1][0] = NULL, but maybe argv[1] itself is NULL, I.E. the address pointer points to 0x000021:21
DocScrutinizer05I'm not that much into c programming anymore21:22
kerioDocScrutinizer05: one of the two things is impossible21:22
DocScrutinizer05man strtol doesn't tell what happens when &nptr == 021:22
kerioare we talking about argv as in the second argument to main()?21:22
DocScrutinizer05yes21:22
kerioargv[1][0] can't be equal to NULL21:23
keriowithout some pretty creative casting21:23
DocScrutinizer05why?21:23
Paliit can be 021:23
DocScrutinizer05echo ""21:23
kerioit can be 0 yes21:23
Palitypeof argv[1][0] is char21:23
kerioif argv is a char**, argv[1][0] is char21:23
Palinot char*21:23
DocScrutinizer05sure, sorry21:23
DocScrutinizer05GOD c makes me dizzy21:24
keriook actually21:25
kerioi'm not at all sure that a comparison between a char and a void* should return a warning21:25
keriothe thing is, though21:25
DocScrutinizer05argv is a list of address pointers to strings, and that list is stored in memory, starting at the address value of argv. No?21:26
kerioif argv[1][0] is anything but 0, i don't think it makes sense to consider it in a pointer context21:26
keriobut NULL is quite literally just something that's a null pointer in pointer context21:26
DocScrutinizer05kerio: yes, a string is null-terminated21:27
kerio`#define NULL 0` is a thing21:27
DocScrutinizer05means it has 0x00 as termination char21:27
kerioeven though it typically is something like ((void *)0)21:27
DocScrutinizer05yes21:27
DocScrutinizer05s/list/array/21:28
kerioDocScrutinizer05: yes, argv is a pointer to a NULL-terminated array of pointers to C strings21:28
PaliNULL is (void *)021:28
kerioPali: you're assuming that the c standard makes sense21:28
kerio:>21:28
DocScrutinizer05oooh, the array is open and NULL terminated? so if no argv[1] exists, accessing argv[1] reads form address 0x00000000 ---> segfault21:29
kerioDocScrutinizer05: argv[1] always exists21:29
DocScrutinizer05how so?21:30
keriounless you're in a freestanding environment, posix requires argv[0] to be the program name21:30
DocScrutinizer05yes21:30
keriowhich means that argv always has at least one string21:30
DocScrutinizer05yes21:30
kerioso argv[1] is always a constructible and dereferentiable pointer21:30
kerioer21:31
kerio&argv[1]21:31
DocScrutinizer05huh?21:31
kerioso argv[1] exists21:31
DocScrutinizer05yes, it points to 0x0000000021:31
kerioDocScrutinizer05: don't say stuff like that21:31
Palikerio: C11 says that: The macros are NULL which expands to an implementation-defined null pointer constant21:31
kerioyou can't know the bit-by-bit of a null pointer21:31
Palisection 7.1921:31
keriobut yes, it could be NULL21:31
kerioPali: yes, but 0 is a valid null pointer constant21:32
DocScrutinizer05reading from a NULL pointer is a segfault by definitionem, no?21:32
kerioreading from a null pointer, yes21:32
kerioi said that argv[1] exists21:32
Palipointer type is e.g. void*21:32
kerionot that *argv[1] exists21:32
kerioPali: lmao21:32
DocScrutinizer05so what?21:32
Luke-Jrcouldn't the virtual memory at address 0 be allocated?21:32
DocScrutinizer05the array is open and NULL terminated? so if no argv[1] exists, accessing argv[1] reads form address 0x00000000 ---> segfault21:32
Luke-JrIIRC it used to be allowed to mmap at NULL21:33
kerioLuke-Jr: compiler don't care, compiler don't give a fuck21:33
kerioor rather21:33
kerioC standard don't give a fuck21:33
DocScrutinizer05Luke-Jr: try cat /proc/kmem21:33
kerioif you have implementation-defined tricks to actually read from something with a physical or logical address of 0, that's your problem21:33
PaliDocScrutinizer05: yes, dereferncing argv[1] (if is NULL) cause segfault21:33
DocScrutinizer05what I say21:33
Luke-Jrkerio: doesn't the C spec allow the compiler to do literally anything in such circumstances?21:33
Palibut you can write: if (argv[1]) ... and this will not segfault21:34
kerioLuke-Jr: dereferencing a null pointer is undefined behaviour, yes21:34
DocScrutinizer05hmm, prolly21:34
keriobut like i tried to say to DocScrutinizer05, null pointer mustn't be all-bits-zero21:34
kerioall-bits-zero is a null pointer21:34
keriobut talking about the bits of pointers is kinda weird anyway21:34
DocScrutinizer05I don't care if it's all zeroes or your birthday or full of gremlins21:35
keriothey're not guaranteed to be inspectionable like that21:35
DocScrutinizer05I don't inspect them, I pondered what happens when you feed NULL pointer for &nptr to strtol()21:36
kerioIf endptr is not NULL, strtol() stores the address of the first invalid character in *endptr.21:37
DocScrutinizer05that's why I hate c. You can't write half a line of code without getting into arguments about what it really does21:37
keriowhy are you even passing argv[1] to strtol21:37
DocScrutinizer05HUHH?21:37
Luke-Jrit's not possible to feed into &nptr21:38
DocScrutinizer05what else would you pass to it?21:38
kerionot as the end pointer21:38
Luke-Jrnptr is in a register, it has no address21:38
DocScrutinizer05who says ENDpointer???21:38
keriohold on what's nptr21:38
keriooh, str21:38
Luke-Jrkerio: the first arg21:38
Palilooks like when nptr is NULL, then behaviour is undefined21:38
PaliC11 does not say anything about it21:38
kerioye if it's not specified then it's definetely UB21:39
Pali(section 7.22.1.4)21:39
DocScrutinizer05have fun discussing c, guys21:39
DocScrutinizer05I'm afk21:39
Luke-Jrif you specify NULL for nptr, you get baby kittens21:39
kerio:321:39
Palifrom your CD-rom drive jump cat and eat your usb mouse :-)21:40
DocScrutinizer055 bucks on segfault21:40
Luke-JrDocScrutinizer05: segfault is not guaranteed21:41
DocScrutinizer05which is totally fine with me for this particular purpose21:41
Paliit is not defined what happen...21:41
DocScrutinizer05Luke-Jr: if it was, I had risked a 100021:41
PaliDocScrutinizer05: do you know if backup battery is charning on n900?21:43
DocScrutinizer05no, that's why I would like to read out MADC921:43
Paliyou send that screen where is written that in some condition charning is turned off...21:43
Palishould I provide some armel binary which will read madc9?21:43
DocScrutinizer05...and that kernel needs to turn it on, yes21:43
PaliI have arm cross compilers21:43
DocScrutinizer05yes, pretty please21:43
DocScrutinizer05that's how this mad discussion started ;-)21:44
DocScrutinizer05I'd even prefer a binary that allows argv[1] to tell the channel21:45
DocScrutinizer05without any fancy tests21:45
DocScrutinizer05and if you really wanna go fancy, allow argv[2] for numebr of average samples21:46
DocScrutinizer05if argv2 isn't present, should default to 121:51
DocScrutinizer05if argv1 isn't present, I'm happy with any (non defined) behavior21:51
Paliprogram ready :-) going to check if on my n90021:52
DocScrutinizer05if you want to do excessive tests, spit out usage on argv1 missing and check argv1 for range 0<=argv<25621:52
DocScrutinizer05:-)21:53
kerioalso add --version and --help like GNU says21:53
DocScrutinizer05bwahaha21:54
keriodid you know that /bin/true from GNU coreutils can return nonzero?21:54
DocScrutinizer05and interactive mode ;-P21:54
DocScrutinizer05kerio: prolly when invoked with incorrect parameters?21:54
keriono, true is supposed to ignore parameters21:54
keriousing it as a throwaway command in makefiles and stuff like that is a common unix idiom21:55
DocScrutinizer05then how could it return non-true?21:55
keriobecause they actually parse the commands and react to --version21:55
kerioand --version needs to allocate some memory21:55
keriowhich can fail21:55
DocScrutinizer05hahahaha21:55
kerioor something like that21:55
DocScrutinizer05rotfl21:55
keriooh wait, even easier21:55
kerio--help and --version output things21:55
DocScrutinizer05ohmy21:56
keriowhich means that you'll get an error if stdout is closed or full21:56
kerio/bin/true --version >/dev/full21:56
DocScrutinizer05bash is sane ;-)   true --help ==> NO help21:56
kerioyeah that's the builtin21:57
kerio"This version of true is implemented as a C program, and is thus more secure and faster than a shell script implementation, and may safely be used as a dummy shell for the purpose of disabling accounts."21:57
kerioL21:57
kerioM21:57
kerioAYY21:57
kerioO21:57
Palihttps://atrey.karlin.mff.cuni.cz/~pali/files/madc.tar.gz21:57
DocScrutinizer05/bin/true --help|wc -l21:57
DocScrutinizer051821:57
Palihave fun!21:57
DocScrutinizer05\o/21:57
DocScrutinizer05many rhanks!21:57
kerio"Note also the claim that there is no warranty, which in this case presumably means that if the program actually does something, you can't sue them."21:58
keriofrom http://trillian.mit.edu/~jc/humor/ATT_Copyright_true.html21:58
Palisource + armel binary (for linux kernel 2.6.8+)21:58
PaliDocScrutinizer05: please check if backup battery is charging and if not, try to write some patch or something to enable it...22:00
DocScrutinizer05sure thing :-)22:01
keriofreebsd doesn't even have a /bin/true22:01
DocScrutinizer05I prolly won't write a patch (my c foo is way too weak) but I'll check what such patch needs to do and when22:01
kerioapparently you don't need it to boot, so it's in /usr/bin instead22:01
DocScrutinizer05LOL22:02
keriohttps://svnweb.freebsd.org/base/head/usr.bin/true/true.c?view=markup22:02
keriobigass copyrights22:02
kerioand then just a return 0, like it should be22:03
DocScrutinizer05IroN900:/dev# madc 922:05
DocScrutinizer05Channel 9: 70922:05
kerioDocScrutinizer05: hold on why didn't you use python for this22:06
DocScrutinizer05http://maemo.cloud-7.de/maemo5/usr/local/sbin/madc22:06
DocScrutinizer05because my python actually sucks more than my c22:07
ecc3g/usr/bin/true22:08
DocScrutinizer05any other volunteers for madc 9 ?22:08
ecc3gwhy is it in /usr/bin...22:09
keriowhy not22:09
PaliChannel 9: 70622:09
DocScrutinizer05so it seems it's charging22:09
DocScrutinizer05otherwise your value should differ significantly from mine22:10
ecc3ggranted one would hope nobody would be writing boot scripts that depend on true/false but they may well be.22:10
kerioecc3g: yeah but22:10
kerioif they're scripts22:10
keriothen true and false are going to be the builtins22:10
DocScrutinizer05unless braindamaged shell22:10
ecc3gthat's true for bash.  but the original bourne shell, no22:11
ecc3gor rather, false22:11
DocScrutinizer05well, bsd may have quite different definitions for what we at linux call FHS22:12
PaliDocScrutinizer05: is there way to check capacity of that backup battery?22:12
DocScrutinizer05errr, yes. check how long it takes after battery removal until RTC loses time22:12
keriowe should totally rebase fremantle onto freebsd22:13
DocScrutinizer05or probe voltage with a meter22:13
kerioso we can use zfs22:13
kerioand have negative ram at boot time22:13
DocScrutinizer05Pali: another way would be to completely deplete battery (several days without main battery, with good bupbat even several months) and then check how fast it charges22:14
DocScrutinizer05Pali: charging of bupbat also is CC/CV controlled and not instantly, so from speed of voltage rise at / after bootup from 'no main battery' you can tell the capacity22:16
*** louis__ has quit IRC22:17
DocScrutinizer05even when bupbat not completely empty, the delta-volt/time will be the higher the less total capacity the bupbat has22:17
DocScrutinizer05please see http://www.ti.com/lit/an/swca025/swca025.pdf - it's only a humbe 8 pages of very good info22:19
*** louis__ has joined #maemo22:24
*** louis__ has quit IRC22:28
DocScrutinizer05anyway for more specific investigation of the whole issue, we need to readout and possibly even set the BB_CFG resgister in TWL403022:30
DocScrutinizer05http://wstaw.org/m/2016/03/26/plasma-desktopHq2219.png  http://www.ti.com/product/tps65950?qgpn=tps6595022:34
Palihttps://www.mail-archive.com/linux-omap@vger.kernel.org/msg45338.html22:34
Palihttp://lists.infradead.org/pipermail/linux-arm-kernel/2015-March/327115.html22:35
Palialso look at this log: https://support.logicpd.com/Portals/0/Users/049/05/305/20150427 - Ethernet over USBOTG as Host.log.txt22:37
Paliuboot print this line: "Enable battery backup charger (BB_CFG = 0x1c)"22:37
DocScrutinizer05:-D22:39
Paligoing to investigate if upstream kernel set bb_cfg register or not22:39
DocScrutinizer05let's see what that means in detail22:39
PaliDocScrutinizer05: can you via i2c-get read bb_cfg register?22:40
Paliand check if charger is enabled or not?22:40
DocScrutinizer05NFC, prolly I could if I knew which address it is22:40
DocScrutinizer05unless some nasty module has the I2C bus exclusively opened22:41
Paliuse --force22:41
DocScrutinizer05seems I need to check the OMAP3530 TRM to find out about registers in TWL403022:41
Palihttp://lxr.free-electrons.com/source/drivers/power/twl4030_charger.c?v=3.14#L23822:44
DocScrutinizer05aaah SWCU050G22:46
DocScrutinizer05or your sourcecode, yes22:47
*** fuz_ has quit IRC22:50
*** LauRoman has quit IRC22:51
DocScrutinizer05anyway you'll '*love*' that: swcu050g.pdf on page 89 has RTC registers **for secure mode** and for **unsecure mode**22:51
Palilooks like conversion formula for madc channel 9 (backup battery voltage is): (raw * BK_VOLT_STEP_SIZE) / BK_VOLT_PSR_R;22:53
Pali#define BK_VOLT_STEP_SIZE44122:54
Pali#define BK_VOLT_PSR_R10022:54
Palifile twl4030_bci_battery.c in nokia kernl22:54
Palithat one provides http://projects.goldelico.com/p/gta04-kernel/page/Power/22:54
Palibut because it is hardwired into twl4030_bci_battery.c driver (for twl4030 charger), bk_battery part cannot be used alone22:55
*** fuz_ has joined #maemo22:55
DocScrutinizer05http://wstaw.org/m/2016/03/26/plasma-desktopyJ2219.png22:58
Palihttps://github.com/pali/linux-n900/blob/v2.6.28-nokia/drivers/power/twl4030_bci_battery.c23:00
Palisearch for twl4030backupbatt_voltage_setup23:01
DocScrutinizer05PSR is PreScalerResistor or sth like that23:01
Paliit set BBCHEN bit in BB_CFG register23:01
PaliDocScrutinizer05: if BBCHEN bit is not set, then charging is disabled?23:02
DocScrutinizer05err yes, aiui23:02
Paliare you able to read that bit from userspace?23:02
DocScrutinizer05if I can find out which I2C register that is, then yes23:02
Paliok, I will try to find it from kernel sources23:03
DocScrutinizer05Address Offset  0x12-0x12 in 0x17 byte increments23:04
DocScrutinizer05Physical Address  0x0000 006D-0x0000 006D23:04
DocScrutinizer05http://wstaw.org/m/2016/03/26/plasma-desktopyJ2219.png23:05
*** futpib_ has quit IRC23:07
DocScrutinizer05http://wstaw.org/m/2016/03/26/plasma-desktopKY2219.png23:09
*** troulouliou_div2 has joined #maemo23:11
DocScrutinizer05http://wstaw.org/m/2016/03/26/plasma-desktopar2219.png23:12
Palii2c bus: 0; i2c address: 0x4b (TWL_MODULE_PM_RECEIVER); register: 0x12 (BB_CFG); value 0x10 (BBCHEN)23:13
Palithis is calling kernel driver twl4030_bci_battery.c (if I decoded it correctly)23:13
DocScrutinizer05makes sense23:14
DocScrutinizer05BBCHEN is bit4 in BB_CFG23:15
Paliso call? $ sudo i2cget -f -y 1 0x4b 0x12 b23:18
DocScrutinizer05if 0x14 from uboot is correct, it sets BBCHEN= 1, BBSEL= 0 1 = 3.0V, BBISEL = 0 0 = 25µA23:18
DocScrutinizer05yes, that should work23:18
Paliit is safe to call it?23:19
DocScrutinizer05prolly yes23:19
Paliare you going to call that command? :-)23:19
DocScrutinizer05yes, will do23:19
DocScrutinizer05IroN900:/dev# i2cget -f -y 1 0x4b 0x12 b23:19
DocScrutinizer050x0023:19
DocScrutinizer05:-(23:19
Palihm...23:19
DocScrutinizer05secure mode?23:20
Pali$ sudo i2cget -f -y 1 0x4b 0x12 b23:20
Pali0x0023:20
Palido you mean omap HS mode?23:20
Paliif HS mode stop your command, you would see SIGBUS signal23:21
Paliand pagefault message in dmesg23:21
DocScrutinizer05no, seems twl4030 has some write protection, however registers should be readable any case23:21
Palimaybe it is correct output, just charging is disabled23:22
DocScrutinizer05yes23:22
Palii2cset and enable it :-)23:22
Palibut which value for bbsel and bbisel?23:22
Palitwl4030_bci_battery.c in twl4030backupbatt_voltage_setup() set 0x1023:23
DocScrutinizer05are you sure about I2Cbus 1?23:23
Paliyes, 100%23:23
DocScrutinizer05already tried i2cset ;-)23:23
Palilook at /sys/bus/i2c/drivers/twl4030/23:23
PaliI have there 1-004823:23
Paliwhich means bus 123:24
Palialso look at /sys/bus/i2c/devices/23:24
Palithey are in format "busnum-address"23:24
DocScrutinizer05IroN900:/dev# i2cset -f -y 1 0x4b 0x12 0x10 b23:24
DocScrutinizer05IroN900:/dev# i2cget -f -y 1 0x4b 0x12 b23:24
DocScrutinizer050x1023:24
Palimaybe your backup battery starts working? o?23:25
DocScrutinizer05no idea23:25
Paliso 0x10 is 2.5V and 25uA23:25
DocScrutinizer05IroN900:/dev# madc 923:25
DocScrutinizer05Channel 9: 70823:25
DocScrutinizer05yes23:25
Paligoing to recheck if address/register is correct23:27
DocScrutinizer05IroN900:/dev# i2cset -f -y 1 0x4b 0x12 0x1b b23:27
DocScrutinizer05IroN900:/dev# i2cget -f -y 1 0x4b 0x12 b23:27
DocScrutinizer050x1b23:27
DocScrutinizer05IroN900:/dev# madc 923:27
DocScrutinizer05Channel 9: 71023:27
Palido you know how long can work rtc in your n900 without main battery?23:28
DocScrutinizer05.oO(???)23:28
DocScrutinizer05no, not realy tested yet, not long23:29
Palitry to let it enabled for a longer time23:29
Palimy rtc loose time in few minutes without backup battery23:30
PaliI can do this test to see if it increase time...23:30
Paliif charging of backup battery was totally disabled it is really stupid from nokia...23:30
DocScrutinizer05http://paste.opensuse.org/8029615723:32
DocScrutinizer05--> no visible effect23:32
*** shentey has joined #maemo23:32
*** ceene has quit IRC23:35
*** ceene has joined #maemo23:35
DocScrutinizer05http://paste.opensuse.org/3747865923:36
WizzupPali: my rtc dies pretty much instantly23:37
Wizzupswapping battery is enough to reset the clock23:37
Wizzupmaybe I need more context.23:37
PaliWizzup: are you going to try it? :D23:37
* Wizzup reads up23:37
DocScrutinizer05Wizzup: http://maemo.cloud-7.de/maemo5/usr/local/sbin/madc23:38
PaliDocScrutinizer05: if it is truth that backup battery was never charged, and n900 just totally discharged it... it is possible to charge such "fully discharged battery"?23:39
Palido you know what type of battery is it?23:39
Palior discharging that battery makes it permanent damage and dead?23:39
DocScrutinizer05it's most probably a LiMn23:40
DocScrutinizer05it should be immune against deep discharge, somewhat23:40
DocScrutinizer05but those cells are notorious for blowing chunks after max 12 to 18 months, seen exactly same with Freerunner23:41
DocScrutinizer05however that the voltage as seen by madc 9 doesn't change _at all_ no matter what voltage I set and if BBCHEN = 1 or 0....   verrrrry suspicious23:42
DocScrutinizer05battemp is ADCIN4, right?23:43
Palino23:43
PaliADCIN0 is temperature23:43
PaliADCIN4 is BSI23:43
*** ceene has quit IRC23:44
DocScrutinizer05right23:44
*** ceene has joined #maemo23:44
DocScrutinizer05what's your madc 0, madc 4 ?23:44
DocScrutinizer05Channel 0: 62   Channel 4: 46923:44
*** florian has joined #maemo23:45
Palichannel0=55 channel4=46523:45
Palicurrently charging my n900 via wallcharger23:45
DocScrutinizer05your room temperature a tad to the low side?23:45
DocScrutinizer05aaah wait, it's inverted, right?23:45
Paliyes23:45
*** troulouliou_div2 has quit IRC23:45
Palisomewhere I have formula23:45
DocScrutinizer05so yes, makes perfect sense23:45
DocScrutinizer05nevermind formula23:46
PaliTEMP = (1/(t1 + 1/298) - 273.15)23:46
PaliWhere t1 = (1/B) * ln((RAW_ADC_U * 2.5)/(R * I * 255))23:46
PaliR = 100, B = 3380, I = 0.0067123:46
Paliso right it is inverted23:47
DocScrutinizer05http://paste.opensuse.org/3719503123:47
DocScrutinizer05afk23:48
DocScrutinizer05holler if you can think of another way to nuke my device via cmdline ;-)23:48
*** vectis3 has quit IRC23:49
PaliI let charging enabled... will see what happen...23:51
DocScrutinizer05zilch will happen, I've set it to 1mA and notching changed23:51
DocScrutinizer05anyway, I'll set it to 3V 1mA again23:52
DocScrutinizer05meh, I set it to 3V3 1mA23:53
DocScrutinizer05recheck if 0x4b 0x12 is actually the right address23:55
DocScrutinizer05please23:55
Palialready did it23:55
DocScrutinizer05compare to some register with well known content23:55
Palithat uboot doing this: val |= 0x10; twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, val, TWL4030_PM_RECEIVER_BB_CFG)23:56
Pali#define TWL4030_CHIP_PM_RECEIVER                      0x4b23:56
Pali#define TWL4030_PM_RECEIVER_BB_CFG                    0x6D23:56
Palihmmm BB_CFG is 0x6D why?23:57
Palilinux kernel define BB_CFG as 0x1223:57
Palihere is that uboot patch: http://repository.timesys.com/buildsources/u/u-boot/u-boot-2011.06/u-boot-2011.06-omap3logic-BSP-2.2-0-01-201210241030.patch23:58
Palisearch for function twl4030_enable_bb_charging23:58
Palistatic inline int twl4030_i2c_write_u8(u8 chip_no, u8 val, u8 reg) { return i2c_write(chip_no, reg, 1, &val, 1); }23:59

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