DisplayLink Android Driver

2,018 views
Skip to first unread message

Brandon Rosenbaum

unread,
Jul 7, 2010, 10:08:58 AM7/7/10
to Android Linux Kernel Development
Hello, I found a driver online that I want to add to my Android phone.
It is a DisplayLink device driver.

magoroku15/DisplayLink-driver-for-android (from github)

The part I am confused about is how to go about adding the driver to
my phone. Do I need to download the Android source code, add the
driver to that, and then build the whole thing? Or is it possible to
just load the driver as a module?

I've searched Google but haven't found anything definitive. I'm not
even sure if I'm using the right terms here, as I haven't ever played
around with adding drivers to anything before.

Any help would be greatly appreciated!

Sven Killig

unread,
Jul 7, 2010, 3:26:55 PM7/7/10
to android...@googlegroups.com
> -----Original Message-----
> From: android...@googlegroups.com [mailto:android-
> ker...@googlegroups.com] On Behalf Of Brandon Rosenbaum
> Sent: Wednesday, July 07, 2010 4:09 PM
> To: Android Linux Kernel Development
> Subject: [android-kernel] DisplayLink Android Driver
>
> The part I am confused about is how to go about adding the driver to
> my phone. Do I need to download the Android source code, add the
> driver to that, and then build the whole thing? Or is it possible to
> just load the driver as a module?

Perhaps
http://sven.killig.de/android/N1/2.2/usb_host
does help you.

Brandon Rosenbaum

unread,
Jul 7, 2010, 4:21:50 PM7/7/10
to Android Linux Kernel Development
I did try to use the Makefile included in magoroku's code to generate
the .ko file, but that didn't work.
So then I modified his Makefile to the following:

obj-m := displaylink.o
displaylink-y := displaylink-main.o displaylink-usb.o displaylink-
blit.o displaylink-fb.o displaylink-ioctl.o

all:
$(MAKE) -C /lib/modules/`uname -r`/build SUBDIRS=$(PWD) modules
clean:
rm -f *.o *.ko *.mod.* .*.cmd Module.symvers
rm -rf .tmp_versions

That worked in the sense that it made a .ko file. So then I copied
that to my Windows system (I'm running Ubuntu in a virtual machine and
I haven't gotten USB devices to work properly yet). Then I used adb
to push the .ko file onto /system/lib/modules.

After that, I tried to insmod the .ko file and it gave me an EXEC
error failure. I'm not sure if it was built wrong or if I need to
rebuild the whole android source, which is what I am trying right now.

NOTE: this is on a rooted Motorola Droid running 2.1

Amar Nath

unread,
Jul 7, 2010, 6:08:43 PM7/7/10
to android...@googlegroups.com
On Wed, Jul 7, 2010 at 10:21 PM, Brandon Rosenbaum
<ows.bro...@gmail.com> wrote:
> I did try to use the Makefile included in magoroku's code to generate
> the .ko file, but that didn't work.
> So then I modified his Makefile to the following:
>
> obj-m := displaylink.o
> displaylink-y := displaylink-main.o displaylink-usb.o displaylink-
> blit.o displaylink-fb.o displaylink-ioctl.o
>
> all:
>        $(MAKE) -C /lib/modules/`uname -r`/build SUBDIRS=$(PWD) modules
> clean:
>        rm -f *.o *.ko *.mod.* .*.cmd Module.symvers
>        rm -rf .tmp_versions
>
> That worked in the sense that it made a .ko file.  So then I copied
> that to my Windows system (I'm running Ubuntu in a virtual machine and
> I haven't gotten USB devices to work properly yet).  Then I used adb
> to push the .ko file onto /system/lib/modules.
>
> After that, I tried to insmod the .ko file and it gave me an EXEC
> error failure.  I'm not sure if it was built wrong or if I need to
> rebuild the whole android source, which is what I am trying right now.
>
Hoping that you cross compiled for ARM, you might probably be ending
up with a kernel verison mismatch.
Are you sure you built your .ko module against your phone's kernel version?
May be doing a dmesg after trying insmod might help....

> NOTE:  this is on a rooted Motorola Droid running 2.1
>
>
> On Jul 7, 2:26 pm, "Sven Killig" <s...@killig.de> wrote:
>> > -----Original Message-----
>> > From: android...@googlegroups.com [mailto:android-
>> > ker...@googlegroups.com] On Behalf Of Brandon Rosenbaum
>> > Sent: Wednesday, July 07, 2010 4:09 PM
>> > To: Android Linux Kernel Development
>> > Subject: [android-kernel] DisplayLink Android Driver
>>
>> > The part I am confused about is how to go about adding the driver to
>> > my phone. Do I need to download the Android source code, add the
>> > driver to that, and then build the whole thing? Or is it possible to
>> > just load the driver as a module?
>>
>> Perhapshttp://sven.killig.de/android/N1/2.2/usb_host
>> does help you.
>

> --
> unsubscribe: android-kerne...@googlegroups.com
> website: http://groups.google.com/group/android-kernel

Brandon Rosenbaum

unread,
Jul 7, 2010, 6:33:57 PM7/7/10
to android...@googlegroups.com
I'll end up googling this, but I'm going to go ahead and ask anyway.

How do you cross compile for ARM?  How can I be sure I am building against my phone's kernel version?

I didn't see anything really helpful by doing dmesg.... except that I get the message:

PVR_K:(Warning): PVRSRVFreeDeviceMemBW: mappings are open in other processes, deferring free! [571, drviers/gpu/pvr/bridged_pvr_bridge.c]

It still kept displaying even after turning phone on and off.

magoroku15

unread,
Jul 7, 2010, 10:55:24 PM7/7/10
to Android Linux Kernel Development
Hi Lists

This is magoroku15. I am glad to touch my code. But my effort is
mention to build my own embedded device with beagleboard.
Therefore you can't aplly for ordinally celler phone, because these
phone don't have useb host.

If you have interest in my effort, please refer following page,
http://sites.google.com/site/voyageofbeagleboard/Home

Thank you

Brandon Rosenbaum

unread,
Jul 8, 2010, 2:08:27 PM7/8/10
to Android Linux Kernel Development
Thank you for getting in touch with me! You are the person I would
most like to talk to. The reason I want to use your code is because
there is a way to put the Motorola Droid into USB Host mode. Please
see the following -

http://www.tombom.co.uk/blog/?p=124

I have successfully put my Moto Droid into USB Host Mode and hooked up
a keyboard to it. Now I am hoping to use your code to be able to put
the DisplayLink driver onto my Android system. Would you be able to
work with me to be able to make this happen? Please feel free to
email me directly if you wish.

mizmit1222

unread,
Jul 8, 2010, 10:16:30 PM7/8/10
to Android Linux Kernel Development
Hi,

As far as I know, Display Link Driver works only if you kill SoC's
primary frame buffer, which means Droid LCD will black out.

Reagrds,

magoroku15

unread,
Jul 13, 2010, 10:32:19 AM7/13/10
to Android Linux Kernel Development
Hi Brandon

I see, you has enable USB host mode, attaced keyboard with your phone,
It's great sounds.

I will recommend to you step by step for displaylink following as:
1. You should check and write down your kernel version.
2. Look for the kernel source tree or helper package for kernel module
compiling.
3. Make ko modules, and insert it.

If you has no problems in these steps, you almost get it.

Next, you Check frame buffer device node in you phone. Android system
can only open
the first screen device. Therefor if you put it in your ko, you can't
see any change in you screens.
For new displaylin device, you must turn to second device in any way.
In my case, is its easy ,
because I had all of source code for beagleboard, I can disable native
display, at kernel compile time.

In your case, you must need litter more consideration.
a) In init.rc, delete device nodes for native display, and wait for
display link device appear.
b) Apply the binary path to your Android middle ware in you phone.
Search your native device name
in you Android binary and change it. I know some native frame
buffer device node is /dev/graphics/fb0.


On 7月9日, 午前3:08, Brandon Rosenbaum <ows.brosenb...@gmail.com> wrote:

Brandon Rosenbaum

unread,
Jul 19, 2010, 1:00:19 PM7/19/10
to Android Linux Kernel Development
Okay... I'm going to go through what you said just to make sure I
fully understand.

On Jul 13, 9:32 am, magoroku15 <magorok...@gmail.com> wrote:
> Hi Brandon
>
> I see, you has enable USB host mode, attaced keyboard with your phone,
> It's great sounds.
>
> I will recommend to you step by step for displaylink  following as:
> 1. You should check and write down  your kernel version.
> 2. Look for the kernel source tree or helper package for kernel module
> compiling.
> 3. Make ko modules, and insert it.

I'm working on this part, making the ko module and inserting it sounds
pretty staightforward, though.

>
> If you has no problems in these steps, you almost get it.
>
> Next, you Check frame buffer device node in you phone. Android system
> can only open
> the first screen device. Therefor if you put it in your ko, you can't
> see any change in you  screens.

So you're saying that my phone's screen will black out? That is
fine... I just want to display what is normally on the screen on a
monitor or something similar.

> For new displaylin device, you must turn to second device in any way.
> In my case, is its easy ,
> because I had all of source code for beagleboard, I can disable native
> display, at kernel  compile time.

I'm not sure what you mean by "turn to second device in any way". Are
you saying I need to point to the second device, instead of the first
device (the phone's screen)?

>
> In your case, you must need litter more consideration.
> a) In init.rc, delete device nodes for native display, and wait for
> display link device appear.
> b) Apply the binary path to your Android middle ware in you phone.
> Search your native device name
>    in you Android binary and change it. I know some native frame
> buffer device node is  /dev/graphics/fb0.

What do you mean by "binary path to your Android middle ware"?

tknv

unread,
Aug 10, 2010, 6:07:33 AM8/10/10
to Android Linux Kernel Development
Hello,

I also try it out, But still not success.
I compiled displaylink.ko and insmod it, then maybe my droid phone usb
port was host-mode by http://www.tombom.co.uk/blog/?p=124.
I checked just plug USB to PC and PC not recognize phone,and also
phone did not show debug mode.

When I plug USB-LCD(displaylink chip) and I hope /dev/graphics/fb1,
But not.
When I plug USB-LCD(same as above) at my VM-linux show /dev/fb1.

Still something lack.
I would like to know which /dev appear it,when success and how.
Thanks

--
tknv/

On 7月20日, 午前2:00, Brandon Rosenbaum <ows.brosenb...@gmail.com> wrote:
> Okay... I'm going to go through what you said just to make sure I
> fully understand.
>
> On Jul 13, 9:32 am, magoroku15 <magorok...@gmail.com> wrote:
>
> > Hi Brandon
>
> > I see, you has enable USB host mode, attaced keyboard with your phone,
> > It's great sounds.
>
> > I will recommend to you step by step fordisplaylink following as:
> > > theDisplayLinkdriver onto my Android system.  Would you be able to

JuanKa Wilcox

unread,
Jan 31, 2014, 4:57:20 PM1/31/14
to android...@googlegroups.com
Mw too, I would like to know if anyonw finaly get to made an app for this driver (DisplayLink monitor drivers)? Or how did finished this? Or any link to an easy solution that doesn't involving a hole compile of a ROM with Kernels settings and inyection of libs? Thanks in Advance. I have a HP u160 Displaylink monitor.

Reply all
Reply to author
Forward
0 new messages