**** BEGIN LOGGING AT Sat Dec 15 02:59:58 2012 Dec 15 14:27:27 GNUtoo, hello, I have a problem, one of my friend want to camera in his mobile, it is supported in kernel, but does he need to do some thing in android? Dec 15 14:27:45 hi Dec 15 14:27:49 can you refrase? Dec 15 14:28:05 basically what doesn't work? Dec 15 14:28:11 what's the error message? Dec 15 14:28:14 and what's the use case? Dec 15 14:28:56 what is "refrase", he doesn't get the camera now, but the people sell this has tried that, it failed Dec 15 14:30:16 the orignal camera only support 2M, but the new one is 5M, as the seller said, if you want to get a picture more than 2M, you only get screen mess Dec 15 14:30:57 what phone? Dec 15 14:31:07 refrase means re-explain with better terms Dec 15 14:31:36 I want to know most of android kernel use v4l2 or sensor way to driver camer? I will call my friend to here Dec 15 14:31:48 ah ok Dec 15 14:31:57 not all android devices uses v4l2 Dec 15 14:32:09 but thoses who do, often do it in a non-standard way Dec 15 14:32:28 for instance running mplayer on it will probably not work Dec 15 14:32:43 the easiest way is probably to look at the camera source code for your android device Dec 15 14:32:49 and figure out how it works Dec 15 14:33:07 and maybe create a gst-plugin for that camera interface Dec 15 14:33:17 and then use gstreamer Dec 15 14:33:44 in the best case scenario the gst-plugin is a modified v4l2src Dec 15 14:34:06 so you take v4l2src and you modify it, for instance to change the order in which things are done Dec 15 14:34:39 his mobile is made by ZTE, but I forget the model Dec 15 14:35:29 we can use gstreamer in android ? I know there is a port, but I am not sure it can works Dec 15 14:35:45 yep, it work Dec 15 14:35:54 GNUtoo, zte n880e Dec 15 14:37:45 ayaka, since I didn't understand well what you said I assumed you wanted that in GNU/Linux Dec 15 14:37:48 that beeing the camera Dec 15 14:37:56 and that it already worked in android Dec 15 14:38:01 so try to re-explain better Dec 15 14:38:58 GNUtoo, sorry, he want it in android Dec 15 14:39:24 so why doens't it work in android already? Dec 15 14:39:35 usually it works when you buy it or if you install cyanogenmod Dec 15 14:39:46 does he want replicant on his phone? Dec 15 14:43:41 1. he has a ZTE n880E mobile 2. the orignal camera is 2M pixel 3. the new camera is 5M pixel Dec 15 14:45:28 The person sell the new camera has tried it with cyanogenmod, it can only take picture under 2M pixel Dec 15 14:45:47 I think he is glad to use replicant Dec 15 14:49:39 I saw #include in driver Dec 15 14:54:18 GNUtoo, but one thing I don't know, the config from kernel build in two camera driver, but you have teached me that arm can't detect hardware, how does kernel which camera is connected? Dec 15 14:56:00 ayaka, so he bought a new camera for putting in his phone, like unscrewing his phone, putting the camera etc... Dec 15 14:56:11 ? Dec 15 14:56:30 GNUtoo, it is Guest45699, my friend. Yes, it is Dec 15 14:56:49 he needs to change the driver to use a new sensor Dec 15 14:57:04 basically like most embedded stuff you have a CPU/SOC interface Dec 15 14:57:19 and you have sensors Dec 15 14:57:28 (audio is mostly similar) Dec 15 14:57:40 so you should have a machine driver for your camera Dec 15 14:57:46 just make it use the other sensor Dec 15 14:57:52 I think the kernel has supported, so you may need some works in android Dec 15 14:58:07 Guest45699, follow us talking Dec 15 14:58:09 read again what I said Dec 15 14:58:16 you need to modify the kernel Dec 15 14:58:21 not android Dec 15 14:58:39 there is a .c file that ties the CPU/SOC interface to a sensor Dec 15 14:58:40 i have driver in kernel Dec 15 14:58:50 yes but you need to modify that .c file Dec 15 14:58:59 to tell the kernel that you have another sensor Dec 15 14:59:17 let me look Dec 15 14:59:17 GNUtoo, the new camera is ov7670.c, it has been in kernel source Dec 15 14:59:24 yes I know Dec 15 14:59:41 what I mean is that the detection is not automatic Dec 15 14:59:47 no, is ov5640 Dec 15 15:00:07 ok, not in kernel source Dec 15 15:00:18 config SOC_CAMERA Dec 15 15:00:24 look at that Dec 15 15:00:42 if your device is standard it probably uses something like that Dec 15 15:00:56 I mean that ov5640 is not in kernel source Dec 15 15:01:18 "SoC Camera is a common API to several cameras, not connecting over a bus like PCI or USB. For example some i2c camera connected directly to the data bus of an SoC." Dec 15 15:01:26 ah ok Dec 15 15:01:29 then add it Dec 15 15:02:37 ayaka,ov5640 is in kernel source Dec 15 15:03:18 the kernel image have compile it Dec 15 15:03:59 but how to use it in user space Dec 15 15:04:44 GNUtoo, sorry, it has been in kernel Dec 15 15:05:23 but it seems that it doesn't use v4l2 Dec 15 15:06:59 ok Dec 15 15:07:09 so what's the interface between android and the kernel? Dec 15 15:07:39 i2c Dec 15 15:08:48 not i2c, GNUtoo doesn't mean that Dec 15 15:08:57 ah Dec 15 15:09:54 msm_camera.c in kernel source? Dec 15 15:10:22 ah it's msm_camera Dec 15 15:10:33 yeah Dec 15 15:10:35 ok Dec 15 15:10:46 msm_7627a cpu Dec 15 15:10:50 ok Dec 15 15:11:14 then try to look if they forked the SOC_CAMERA and how to tell it to use the sensor that you have Dec 15 15:11:26 if I remember well you have to interrface the sensor with msm_camera Dec 15 15:12:10 let me have a look Dec 15 15:19:17 msm_camera in driver directory? Dec 15 15:23:04 where's your kernel sources? Dec 15 15:23:35 in my computer Dec 15 15:24:08 how can I download the same sources than you have? Dec 15 15:24:09 I think there is in ZTE website Dec 15 15:24:32 Guest45699, is your phone supported by cyanogenmod and do you use cyanogenmod? Dec 15 15:24:50 but you need a little modify, ZTE's source is much worse than htc Dec 15 15:25:13 i'm not sure Dec 15 15:25:22 GNUtoo, of source not, cyanogenmod haven't never support ZTE I think Dec 15 15:26:37 it does for some phones if I remember well, let me check Dec 15 15:26:47 i have heard that andoid source should have vendor directory,is it right? Dec 15 15:27:06 zte blade Dec 15 15:27:09 zte v9 Dec 15 15:27:18 GNUtoo, sorry, cyanogenmod support zte, but not his one Dec 15 15:27:27 yeah Dec 15 15:27:33 zte n880e Dec 15 15:27:35 ok Dec 15 15:27:52 can you point me to a link of the source (I'm doing 3 things at once) Dec 15 15:28:55 GNUtoo, can I say some chinese to him? Dec 15 15:29:15 http://support.zte.com.cn/support/%28S%28bz4ygrz4n5lfn53konayuy2z%29%29/news/NewsDetail.aspx?newsId=1002102 Dec 15 15:30:14 i download it for this Dec 15 15:31:11 can you visit it? Dec 15 15:34:31 let me look Dec 15 15:34:41 ok Dec 15 15:36:50 dowloading.... Dec 15 15:38:58 thinks Dec 15 15:40:03 thanks Dec 15 15:42:39 ok downloaded Dec 15 15:42:45 how can I join the zips now Dec 15 15:43:28 GNUtoo, you are using android? Dec 15 15:44:33 yes Dec 15 15:44:38 replicant Dec 15 15:44:40 and also SHR Dec 15 15:44:45 I switch phones often Dec 15 15:45:37 then AndroidZIP Dec 15 15:46:17 ? Dec 15 15:46:42 as you don't use suffix, I don't detetive which device your are using. AndroidZip is program name Dec 15 15:46:53 sorry, AndroZip Dec 15 15:49:22 ok I found out how to do it without that program Dec 15 15:49:37 how to? busybox? Dec 15 15:50:25 R.E? Dec 15 15:50:46 unzip P740A_Kernel.7z.001.zip Dec 15 15:50:51 with all zip in the same dir Dec 15 15:51:12 ah wait a minute Dec 15 15:51:14 that failed Dec 15 15:51:23 anyway it's possible Dec 15 15:51:26 with unzip Dec 15 15:51:34 since there is a program to split stuff Dec 15 15:52:34 (zipsplit) Dec 15 15:53:19 but how can you unpack 7z? Dec 15 15:53:39 zhuang, in linux or android? Dec 15 15:53:51 7zr Dec 15 15:53:55 android Dec 15 16:00:33 ok I have it now Dec 15 16:00:54 I did that: Dec 15 16:00:55 cat *.zip > out/out.zip Dec 15 16:01:00 zip -FF out/out.zip Dec 15 16:01:16 oops Dec 15 16:01:17 zip -FF out/out.zip --out out/fixed.zip Dec 15 16:01:27 cd out; unzip fixed.zip Dec 15 16:01:34 7zr x P740A_Kernel.7z.001 Dec 15 16:01:43 and then I unziped the resulting file Dec 15 16:02:12 ok Dec 15 16:02:14 I wonder why ZTE pack in such way Dec 15 16:03:37 config MSM_CAMERA_SENSOR Dec 15 16:03:45 just add your sensor in that dir: Dec 15 16:04:27 media/video/msm Dec 15 16:04:27 and make the msm camera work with it Dec 15 16:07:04 let me look Dec 15 16:11:48 i pull config.gz from my phone and find it have complied ov5640 Dec 15 16:12:49 my camera in my phone is mt9d115,it also have complied Dec 15 16:17:15 yes but compiled for what framework? Dec 15 16:17:19 the msm_camera ? Dec 15 16:17:30 or other camera systems such as the standard SOC_CAMERA? Dec 15 16:17:48 because you need to add your sensor to msm_camera if I understand well Dec 15 16:18:59 in which dir? Dec 15 16:20:17 drivers/media/video/msm Dec 15 16:20:31 look if it's there Dec 15 16:20:35 compile it in if so Dec 15 16:22:08 serach its name in that file? Dec 15 16:22:32 boht mt9d115 and ov5640 use msm_camera framework Dec 15 16:23:38 yes so compile them both inside Dec 15 16:25:45 yes, they have been built in Dec 15 16:26:04 ok Dec 15 16:26:06 let me look Dec 15 16:26:14 it seem that you need pdata or something like that Dec 15 16:26:24 let me look Dec 15 16:27:06 what's your board name? Dec 15 16:27:10 cat /proc/cpuinfo Dec 15 16:27:11 the mt9d115 is only 200Mpix and ov5640 is 500Mpix,when i use ov5640,it works only in 200Mpix Dec 15 16:27:14 look for Hardware Dec 15 16:27:46 ok Dec 15 16:27:59 static struct platform_device *camera_devices_msm[] __initdata = { Dec 15 16:28:12 board-msm7627a-camera-zte.c Dec 15 16:28:16 in arch/arm/mach-msm Dec 15 16:29:40 atlas40 Dec 15 16:29:47 do you have CONFIG_OV5640 in your .config? Dec 15 16:29:54 yes Dec 15 16:29:58 ok Dec 15 16:30:00 zhuang, don't forget to use a site like http://pastie.org/ to paste a long thing Dec 15 16:30:50 ok Dec 15 16:32:17 also I need a dmesg Dec 15 16:33:10 zhuang, dmesg > a_file, then pull it Dec 15 16:34:30 let me try Dec 15 16:36:44 it says:sh: cannot create log: Read-only file system Dec 15 16:36:51 and how can i do Dec 15 16:37:00 adb shell dmesg > dmesg Dec 15 16:37:23 GNUtoo, I can ssh him, let me do it Dec 15 16:38:01 my ip is 210.34.146.27 Dec 15 16:38:10 zhuang, if don't know how to do that, connect your mobile to the computer I can ssh Dec 15 16:38:27 zhuang, ok I will Dec 15 16:38:28 ok,tmux Dec 15 16:39:34 can you attach? Dec 15 16:39:38 zhuang, no Dec 15 16:40:04 zhuang, do you install openssh-server on that one? Dec 15 16:40:24 ah,i forget it Dec 15 16:40:33 sorry,ayaka Dec 15 16:41:13 I notice you don't receive my private message, as I can't speak chinese here Dec 15 16:44:27 GNUtoo, http://paste.debian.net/216438/ Dec 15 16:45:09 can you do it right after boot Dec 15 16:45:17 because here there is not the camera messages Dec 15 16:46:01 ssh is ok Dec 15 16:46:05 zhuang, I will reboot your mobile, can I? Dec 15 16:46:35 ok Dec 15 16:48:31 GNUtoo, http://paste.debian.net/216440/ Dec 15 16:50:57 <3>[01-01 00:00:02.581] [1: swapper]--CAMERA-- ov5640_probe_readID ok , device id error, should be 0x5640 Dec 15 16:51:25 GNUtoo, he is using mt9d115 now Dec 15 16:51:38 ah? Dec 15 16:51:46 yeah Dec 15 16:51:48 can he try with the sensor he wants to use? Dec 15 16:52:10 GNUtoo, no he doesn't get it now, it is only the way Dec 15 16:52:28 ? Dec 15 16:52:59 he just buy it online, he will get it tomorrow Dec 15 16:53:51 then how does he knows in advance that it doesn't work? Dec 15 16:54:08 because it could work out of the box Dec 15 16:54:11 or not.... Dec 15 16:54:18 he cannot know before Dec 15 16:54:27 he cannot even make it work without the hardware Dec 15 16:54:38 GNUtoo, the person who sell camera has tested it Dec 15 16:54:42 ok Dec 15 16:54:47 and it didn't work? Dec 15 16:54:56 yes Dec 15 16:55:02 ok Dec 15 16:55:08 then he'll have to make it work Dec 15 16:55:28 as he said, it can only works in 2Mpielx mode, higher will get a mess Dec 15 16:55:43 no idea Dec 15 16:55:47 I don't have that hardware Dec 15 16:55:50 so I don't know Dec 15 16:55:58 I'm even out of the loop with msm stuff Dec 15 16:56:07 I know work with more clean stuff Dec 15 16:57:14 GNUtoo, maybe the camera program in user mode can't solve the picture more than 2Mpielx? Dec 15 16:57:23 no idea Dec 15 16:57:32 just wait for the hardware Dec 15 16:57:40 and once you get the hardware try it Dec 15 16:57:52 ok Dec 15 16:57:54 GNUtoo, ok, I will let him come here tomorrow Dec 15 16:58:44 but one thing, android's hal doesn't do any thing specail for hardware init? Dec 15 16:59:11 the camera libs do Dec 15 16:59:25 but as far as I know no one wrote free libs for msm cameras Dec 15 16:59:39 we however have some infos on how it works Dec 15 16:59:51 because someone sent that to mainline Dec 15 17:00:03 I mean he tried to get the msm_camera driver integrated Dec 15 17:00:07 of course it was refused Dec 15 17:00:11 not because it was dirty Dec 15 17:00:22 but because of the dependency on non-free libs Dec 15 17:00:31 and the driver design Dec 15 17:00:53 GNUtoo, ok, if even kernel part works fine but camera lib doesn't support it, camera doesn't work either? Dec 15 17:02:09 maybe it does Dec 15 17:02:10 which mainline? the kernel or SHR ? Dec 15 17:02:29 the linus torvalds version Dec 15 17:07:08 I see, but I confuseļ¼Œ msm_camera framework has been in kernel doesn't it? Dec 15 17:07:51 in your kernel yes Dec 15 17:08:01 but not in linus torvalds version Dec 15 17:08:11 the one from kernel.org doesn't have much about msm Dec 15 17:08:31 basically the one you have for the zte is a fork Dec 15 17:08:48 android kernel is a fork of the linus torvalds one Dec 15 17:09:01 and the zte one is a fork of the android one probably Dec 15 17:09:08 or maybe a fork of a code aurora one Dec 15 17:09:14 that is a fork of the android one Dec 15 17:09:36 GNUtoo, but Code Aurora has it Dec 15 17:09:43 ok Dec 15 17:09:48 but it's not in kenrel.org Dec 15 17:09:54 kernel.org is the official one Dec 15 17:10:00 GNUtoo, I knew Dec 15 17:10:05 ok Dec 15 17:10:37 https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=tree;f=arch/arm/mach-msm;h=6d43322d62685eb1a7f882293b7ee9293465c2b6;hb=HEAD Dec 15 17:10:43 that's all there is in 3.7 Dec 15 17:10:43 but the even Code Aurora's kernel depends on non-free libs, doesn't it? Dec 15 17:10:51 for camera yes Dec 15 17:12:38 GNUtoo, do you where is the location of lib ? does it on Code Aurora's kerne source ? Dec 15 17:12:59 on your device Dec 15 17:13:03 like inside your phone Dec 15 17:13:06 without the source code Dec 15 17:13:38 probably named libcamera* Dec 15 17:17:51 GNUtoo, I confuse, the msm_camera in kenrel part that is clear, but we don't know how user part use the data which is exported by kernel? Dec 15 17:34:09 yes Dec 15 17:39:03 GNUtoo, I see, thank you Dec 15 17:40:36 Samsung use OMAP, but if you want flash it, it need to entire a mode where android is diging Dec 15 17:40:58 can we install u-boot in it, and use u-boot to flash it ? Dec 15 17:56:00 ayaka, samsung uses many SOC Dec 15 17:56:29 and yes you can install uboot on some samsung devies but it's very dangerous Dec 15 17:56:48 why? Dec 15 17:57:22 because recoverying is hard Dec 15 17:58:02 else just put uboot instead of the kenrel Dec 15 17:58:06 and there is no risks Dec 15 18:02:08 I also confuse about it parttitation tables, if you want to flash kernel , recovey or getting root, you both using Odin flash the boot parttitation Dec 15 18:03:35 don't use odin Dec 15 18:03:45 it's dangerous, non-free, leaked etc... Dec 15 18:03:52 use heimdall instead Dec 15 18:05:10 https://github.com/Benjamin-Dobell/Heimdall.git Dec 15 18:05:44 http://www.glassechidna.com.au/products/heimdall/ Dec 15 18:09:31 GNUtoo: hi Dec 15 18:09:37 hi Dec 15 18:10:25 GNUtoo: The new image it's able to boot but I can't click on any option on the keyboard layout selection screen Dec 15 18:10:42 ah? Dec 15 18:11:04 can you ssh inside? Dec 15 18:11:18 because probably the /dev/input/ nodes changes Dec 15 18:11:20 *changed Dec 15 18:11:30 GNUtoo: not at the moment I don't have a terminal Dec 15 18:11:34 to enable usbnet Dec 15 18:11:53 ok Dec 15 18:11:58 you have serial? Dec 15 18:11:59 GNUtoo: It shouldn't, at least on the old image Dec 15 18:12:08 you changed kernel? Dec 15 18:12:17 GNUtoo: no, it's the same kernel Dec 15 18:12:25 because the thing that you could do is hook the systemd scripts Dec 15 18:12:29 and add code in it Dec 15 18:12:35 so you would debug it that way Dec 15 18:12:44 for instancou would run: Dec 15 18:12:47 dmesg > dmesg Dec 15 18:13:07 GNUtoo: uhmmm, can I run echo 1 > /sys/class/usb_composite/rndis/enable Dec 15 18:13:10 ? Dec 15 18:13:20 in some script, for example on the sshd script? Dec 15 18:14:18 or in the usbnet script Dec 15 18:14:39 I have to look at the crespo recipe for it Dec 15 18:14:44 didn't you do a script for usbnet? Dec 15 18:15:02 GNUtoo: nope, the last time I enabled usbnet on the ramdisk Dec 15 18:15:10 ok Dec 15 18:15:15 then do one Dec 15 18:15:18 GNUtoo: now it's running without a ramdisk so I have to fix it Dec 15 18:15:52 GNUtoo: also I tried booting with the generated boot.img and it doesn't work Dec 15 18:16:22 GNUtoo: I have to manually generate a boot.img with mkbootimg from replicant and the empty ramdisk Dec 15 18:19:41 vquicksilver, ok Dec 15 18:19:50 vquicksilver, get the right args from replicant Dec 15 18:19:57 and put them in the kernel recipe Dec 15 18:20:06 they are available in 2 locations: Dec 15 18:20:13 or on the build logs Dec 15 18:20:20 mkbootimg --args Dec 15 18:20:31 or trough the board files Dec 15 18:20:44 like device/?/geeksphoneone Dec 15 18:21:06 let me find it for crespo Dec 15 18:23:32 GNUtoo: uhm ... it's not a problem with args Dec 15 18:23:48 ah? Dec 15 18:24:01 you mean with the initramfs itself? Dec 15 18:24:05 GNUtoo: it's a problem with some tool, or the compiler, or the mkbootimg I use the same args in both cases Dec 15 18:24:12 or the bootloader Dec 15 18:24:15 ok Dec 15 18:24:20 I have to do more test Dec 15 18:24:31 note that mkbootimg takes different arguments Dec 15 18:24:36 in the case of fso and android Dec 15 18:24:42 one take an argument in hex Dec 15 18:24:44 GNUtoo, thabk you, but I just confuse with partation Dec 15 18:24:46 and the other in int Dec 15 18:24:53 GNUtoo: ? Dec 15 18:24:56 vquicksilver, yes Dec 15 18:25:03 it's strange but that prevent boot Dec 15 18:25:04 GNUtoo: I didn't know that, for the base parameter? Dec 15 18:25:11 yes something like taht Dec 15 18:25:13 let me check Dec 15 18:26:04 it also takes a huge time to create the boot.img in shr in that case Dec 15 18:26:34 GNUtoo: ok Dec 15 18:26:43 pagesize I think Dec 15 18:27:03 GNUtoo: then I think it's not the problem, cause here it's running fast, and the image seems to be right in size etc... Dec 15 18:27:09 ok Dec 15 18:28:04 also If I unpack it all the parameters seems to be ok Dec 15 18:28:10 ok Dec 15 18:28:15 so it's a very strange problem Dec 15 18:28:19 yes Dec 15 18:29:32 anyway I have to go now, I'll try to enable usbnet tomorrow Dec 15 18:31:23 ok **** ENDING LOGGING AT Sun Dec 16 02:59:58 2012