Hi All, Any body succed MTP Support in android dev,
On Jul 24, 12:50 pm, Ashutosh <as...@techmahindra.com> wrote: > Hi Mike, > > I have been able to compile kernel 2.6.29 with configuration (USB > function is disabled)-- > > CONFIG_USB_GADGET=y > CONFIG_USB_GADGET_VBUS_DRAW=500 > CONFIG_USB_GADGET_SELECTED=y > CONFIG_USB_GADGET_MSM_72K=y > CONFIG_USB_MSM_72K=y > CONFIG_USB_GADGET_DUALSPEED=y > CONFIG_USB_ANDROID=y > > I am able to get adb shell. > > I also compiledgadgetfsas module and gotgadgetfs.ko. I inserted it > in kernel but when I try to mount on it (mount -t gadget path /dev/ > gadget) I get error "mount: No such device". > > I debugged it and found that it fails in usb_gadget_register_driver() > at point -- > > if (ui->driver) > return -EBUSY; > > I am getting this error because msm72k_udc is busy and held by android > gadget (USB_ANDROID). > > I tried to compile CONFIG_USB_ANDROID as module (CONFIG_USB_ANDROID=m) > and modified system/core/rootdir/init.rc to insert g_android.ko > (insmod /system/lib/modules/g_android.ko). > > This is not working as I am not able to get adb shell. > > Would you please let me know, if it is possible to compile g_android > as module and get inserted in kernel at bootup? > > Thanks > Ashutosh > > On Jul 13, 4:35 pm, Mike Lockwood <lockw...@android.com> wrote: > > > Hi Ashutosh, > > > I think the problem is that the gadgetsupportis broken in our 2.6.27 > > kernel. However, I do know it is working in 2.6.29. I believe if you > > do the following: > > > - backport the latest drivers/usb/gadget/android.c from 2.6.29 back to > > 2.6.27 > > > - backport the following commit from 2.6.29 to to 2.6.27: > > > commit f9335f6d0cfa5b8fc2a10c2a63ebcd42efbf99cb > > Author: Mike Lockwood <lockw...@android.com> > > Date: Fri Feb 20 15:56:06 2009 -0500 > > > [ARM] msm: htc: Clean up USBsupportin trout and sapphire board files > > > Signed-off-by: Mike Lockwood <lockw...@android.com> > > > - Finally, configure your kernel with the USB functionsupport > > disabled and the following gadget features enabled: > > > CONFIG_USB_GADGET=y > > CONFIG_USB_GADGET_VBUS_DRAW=500 > > CONFIG_USB_GADGET_SELECTED=y > > CONFIG_USB_GADGET_MSM_72K=y > > CONFIG_USB_MSM_72K=y > > CONFIG_USB_GADGET_DUALSPEED=y > > CONFIG_USB_ANDROID=y > > > I'm not sure how easy this will be to do the backporting, but it > > should be possible. > > > Mike > > > On Mon, Jul 13, 2009 at 7:02 AM, Ashutosh<as...@techmahindra.com> wrote: > > > > (especially to Mike Lockwood) > > > > If I want to havegadgetfssupportat ADP1 and have adb working, how > > > do I need to to configure kernel and compile? > > > > I have tried many things including using 'CONFIG_USB_ANDROID=y' and > > > 'CONFIG_USB_FUNCTION is not set' but nothing worked. To compile this > > > configuration I had to make some modification in some of the files. > > > List is as below -- > > > > 1) In arch/arm/mach-msm/include/mach/board_htc.h (Reason: Type of > > > t_usb_status_notifier was not visible) > > > > 58 //#if defined(CONFIG_USB_FUNCTION_MSM_HSUSB) > > > > 68 //#endif > > > > 2) In arch/arm/mach-msm/htc_battery.c (Reason: Definition of > > > usb_register_notifier() was not known. Its defintion is in drivers/usb/ > > > function/msm_hsusb.c) > > > > 793 // usb_register_notifier(&usb_status_notifier); > > > > I am able to boot this image on ADP1 but when I connect it to my PC > > > via USB it reboots. > > > > On Jul 10, 7:05 pm, Ashutosh <as...@techmahindra.com> wrote: > > >> Hello Everybody, > > > >> I wanted to putsupportforgadgetfssupporton ADP1. > > > >> I have downloaded android-1.5r2. > > > >> My local_manifest.xml is -- > > > >> <?xml version="1.0" encoding="UTF-8"?> > > >> <manifest> > > >> <remove-project name="kernel/common"/> > > >> <project path="kernel" name="kernel/msm" revision="refs/heads/ > > >> android-msm-2.6.27"/> > > >> <project path="vendor/htc/dream" name="platform/vendor/htc/dream" > > >> revision="cupcake"/> > > >> <project path="hardware/msm7k" name="platform/hardware/msm7k" > > >> revision="refs/heads/master"/> > > >> </manifest> > > > >> I have copied arch/arm/configs/msm_defconfig as .config in mydroid/ > > >> kernel. > > > >> I made changes in .config tosupportgadgetfs. > > > >> As Mike has suggested > > >> athttp://groups.google.com/group/android-platform/browse_thread/thread/... > > >> , I have disabled CONFIG_USB_FUNCTION and enabled CONFIG_USB_GADGET > > >> and CONFIG_USB_GADGET_MSM_72K. > > > >> After configuring kernel, GADGET and USB_FUNCTION configuration looks > > >> like below -- > > > >> CONFIG_USB_GADGET=y > > >> CONFIG_USB_GADGET_SELECTED=y > > >> CONFIG_USB_GADGET_MSM_72K=y > > >> CONFIG_USB_MSM_72K=y > > >> CONFIG_USB_GADGET_DUALSPEED=y > > >> CONFIG_USB_GADGETFS=y > > > >> # > > >> # USB FunctionSupport > > >> # > > >> # CONFIG_USB_FUNCTION is not set > > > >> Now I try to compile kernel and get below error -- > > > >> arch/arm/mach-msm/htc_battery.c:187: error: variable > > >> 'usb_status_notifier' has initializer but incomplete type > > >> arch/arm/mach-msm/htc_battery.c:188: error: unknown field 'name' > > >> specified in initializer > > >> arch/arm/mach-msm/htc_battery.c:188: warning: excess elements in > > >> struct initializer > > >> arch/arm/mach-msm/htc_battery.c:188: warning: (near initialization for > > >> 'usb_status_notifier') > > >> arch/arm/mach-msm/htc_battery.c:189: error: unknown field 'func' > > >> specified in initializer > > >> arch/arm/mach-msm/htc_battery.c:189: warning: excess elements in > > >> struct initializer > > >> arch/arm/mach-msm/htc_battery.c:189: warning: (near initialization for > > >> 'usb_status_notifier') > > >> arch/arm/mach-msm/htc_battery.c: In function 'htc_battery_init': > > >> arch/arm/mach-msm/htc_battery.c:793: error: implicit declaration of > > >> function 'usb_register_notifier' > > > >> I looked for declaration of t_usb_status_notifier and found it in arch/ > > >> arm/mach-msm/include/mach/board_htc.h, but this will be visible only > > >> when CONFIG_USB_FUNCTION_MSM_HSUSB is defined. Since we have disabled > > >> CONFIG_USB_FUNCTION, none of the CONFIG_USB_FUNCTION* are set. > > > >> I have tried enabling CONFIG_USB_FUNCTION and > > >> CONFIG_USB_FUNCTION_MSM_HSUSB but that gave many multiple definition > > >> error. > > > >> Please suggest how do I go about it? > > > >> Thanks > > > -- > > Mike Lockwood > > Google android team --~--~---------~--~----~------------~-------~--~----~ unsubscribe: android-kernel+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-kernel -~----------~----~----~----~------~----~------~--~---