hormel09
Posts: 9
Joined: Tue May 12, 2015 8:00 pm

Installing Driver Modules with Source Code and Makefile

Sat Jan 23, 2016 4:13 pm

I have an ethernet dongle and I'm trying to install the driver for it. I have the source code and a makefile provided by the manufacturer. There doesn't appear to be a Kernel Headers Package for Raspbian Jesse with which to build the kernel module. Instead, I can compile the the Raspbian source code and all its modules and that will eliminate the need for the kernel headers package. I've been looking at a few guides (couldn't figure out hyperlinking in this text editor):
viewtopic.php?t=39096&p=393810
https://www.grendelman.net/wp/compiling ... pberry-pi/
http://www.cyberciti.biz/tips/compiling ... odule.html

Some questions unanswered by the guides.
  • Where do I get the Raspbian source code? I see the guides point to the GitHub repository, but the only thing I can find there is a zip file -- not tars.
  • How do I compile the source code of Raspbian? All I see in online guides are uncompressing the source tar ball.
  • Where do I put/what do I do with the compiled source code?
I know that's a lot. If anyone could answer even part of my post, I'd greatly appreciate it.

fruitoftheloom
Posts: 23337
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Installing Driver Modules with Source Code and Makefile

Sat Jan 23, 2016 4:24 pm

hormel09 wrote:I have an ethernet dongle and I'm trying to install the driver for it. I have the source code and a makefile provided by the manufacturer. There doesn't appear to be a Kernel Headers Package for Raspbian Jesse with which to build the kernel module. Instead, I can compile the the Raspbian source code and all its modules and that will eliminate the need for the kernel headers package. I've been looking at a few guides (couldn't figure out hyperlinking in this text editor):
viewtopic.php?t=39096&p=393810
https://www.grendelman.net/wp/compiling ... pberry-pi/
http://www.cyberciti.biz/tips/compiling ... odule.html

Some questions unanswered by the guides.
  • Where do I get the Raspbian source code? I see the guides point to the GitHub repository, but the only thing I can find there is a zip file -- not tars.
  • How do I compile the source code of Raspbian? All I see in online guides are uncompressing the source tar ball.
  • Where do I put/what do I do with the compiled source code?
I know that's a lot. If anyone could answer even part of my post, I'd greatly appreciate it.
Could you plug in the USB Ethernet Adaptor and post output of lsusb :?:
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

User avatar
rpdom
Posts: 17172
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Installing Driver Modules with Source Code and Makefile

Sat Jan 23, 2016 8:41 pm

fruitoftheloom wrote:Could you plug in the USB Ethernet Adaptor and post output of lsusb :?:
This is good advice. There may already be a driver built for your adaptor.

fruitoftheloom
Posts: 23337
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Installing Driver Modules with Source Code and Makefile

Sat Jan 23, 2016 8:56 pm

rpdom wrote:
fruitoftheloom wrote:Could you plug in the USB Ethernet Adaptor and post output of lsusb :?:
This is good advice. There may already be a driver built for your adaptor.
...quite so, apart from the DM9601 most are supported AOK
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

User avatar
rpdom
Posts: 17172
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Installing Driver Modules with Source Code and Makefile

Sat Jan 23, 2016 9:00 pm

fruitoftheloom wrote:
rpdom wrote:
fruitoftheloom wrote:Could you plug in the USB Ethernet Adaptor and post output of lsusb :?:
This is good advice. There may already be a driver built for your adaptor.
...quite so, apart from the DM9601 most are supported AOK
Yes, which is a silly bug in the driver. Although the DM9601 chipset is not worth using even if the driver did work.

fruitoftheloom
Posts: 23337
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Installing Driver Modules with Source Code and Makefile

Sat Jan 23, 2016 9:08 pm

rpdom wrote: Yes, which is a silly bug in the driver. Although the DM9601 chipset is not worth using even if the driver did work.
Yes USB1.1 compliant :D
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

User avatar
rpdom
Posts: 17172
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Installing Driver Modules with Source Code and Makefile

Sat Jan 23, 2016 9:13 pm

fruitoftheloom wrote:
rpdom wrote: Yes, which is a silly bug in the driver. Although the DM9601 chipset is not worth using even if the driver did work.
Yes USB1.1 compliant :D
Stupid thing is that it is sold as USB2.0 compatible, which it is, technically. :(

hormel09
Posts: 9
Joined: Tue May 12, 2015 8:00 pm

Re: Installing Driver Modules with Source Code and Makefile

Sun Jan 24, 2016 8:07 am

fruitoftheloom wrote:
hormel09 wrote:I have an ethernet dongle and I'm trying to install the driver for it. I have the source code and a makefile provided by the manufacturer. There doesn't appear to be a Kernel Headers Package for Raspbian Jesse with which to build the kernel module. Instead, I can compile the the Raspbian source code and all its modules and that will eliminate the need for the kernel headers package. I've been looking at a few guides (couldn't figure out hyperlinking in this text editor):
viewtopic.php?t=39096&p=393810
https://www.grendelman.net/wp/compiling ... pberry-pi/
http://www.cyberciti.biz/tips/compiling ... odule.html

Some questions unanswered by the guides.
  • Where do I get the Raspbian source code? I see the guides point to the GitHub repository, but the only thing I can find there is a zip file -- not tars.
  • How do I compile the source code of Raspbian? All I see in online guides are uncompressing the source tar ball.
  • Where do I put/what do I do with the compiled source code?
I know that's a lot. If anyone could answer even part of my post, I'd greatly appreciate it.
Could you plug in the USB Ethernet Adaptor and post output of lsusb :?:
I guess the Pi does see it. It's device 004.

Code: Select all

pi@raspberrypi:~ $ sudo lsusb
Bus 001 Device 004: ID 0b95:1790 ASIX Electronics Corp.
Bus 001 Device 005: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA Adapter
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast              Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
But I can't SSH into the Pi with that adapter. It just times out. The status lights on the adapter are solid green and amber.

fruitoftheloom
Posts: 23337
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Installing Driver Modules with Source Code and Makefile

Sun Jan 24, 2016 8:46 am

The 0b95:1790 ASIX Electronics Corp. AX88179 should be natively supported, but the driver / firmware can be downloaded from:

http://www.asix.com.tw/download.php?sub ... ItemID=131
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

hormel09
Posts: 9
Joined: Tue May 12, 2015 8:00 pm

Re: Installing Driver Modules with Source Code and Makefile

Sun Jan 24, 2016 10:21 am

fruitoftheloom wrote:The 0b95:1790 ASIX Electronics Corp. AX88179 should be natively supported, but the driver / firmware can be downloaded from:

http://www.asix.com.tw/download.php?sub ... ItemID=131
Yeah, that's where I got the driver and makefile. It's source code though and I don't know how to install it without kernel headers package. The adapter is also in the output of ip link show. It shows up as eth1. If it is being recognized, does that mean the driver is installed?

For fun, I hooked up the adapter to my Windows machine. Worked like a charm.

fruitoftheloom
Posts: 23337
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Installing Driver Modules with Source Code and Makefile

Sun Jan 24, 2016 10:49 am

hormel09 wrote:
fruitoftheloom wrote:The 0b95:1790 ASIX Electronics Corp. AX88179 should be natively supported, but the driver / firmware can be downloaded from:

http://www.asix.com.tw/download.php?sub ... ItemID=131
Yeah, that's where I got the driver and makefile. It's source code though and I don't know how to install it without kernel headers package. The adapter is also in the output of ip link show. It shows up as eth1. If it is being recognized, does that mean the driver is installed?

For fun, I hooked up the adapter to my Windows machine. Worked like a charm.

If it is shown in ifconfig as eth1 then yes it is installed and woking..

Do you do have a decent power supply 5V2A ?
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

User avatar
GTR2Fan
Posts: 1601
Joined: Sun Feb 23, 2014 9:20 pm
Location: South East UK

Re: Installing Driver Modules with Source Code and Makefile

Sun Jan 24, 2016 11:00 am

If you have a 1.5A or higher PSU and it's a Pi B+ or Pi2B, it's probably worth adding...

Code: Select all

max_usb_current=1
...to your config.txt file.
Pi2B Mini-PC/Media Centre: ARM=1GHz (+3), Core=500MHz, v3d=500MHz, h264=333MHz, RAM=DDR2-1200 (+6/+4/+4+schmoo). Sandisk Ultra HC-I 32GB microSD card on '50=100' OCed slot (42MB/s read) running Raspbian/KODI16, Seagate 3.5" 1.5TB HDD mass storage.

hormel09
Posts: 9
Joined: Tue May 12, 2015 8:00 pm

Re: Installing Driver Modules with Source Code and Makefile

Sun Jan 24, 2016 11:41 am

I figured out what the issue is. My router can reserve addresses based on a Mac. I didn't realize that using a different network adapter would cause the router to see a different Mac. After changing the IP address, I could ssh in. Man, I feel silly :oops:

Just out of curiosity, fruitoftheloom, how did you know that the chipset in my adapter is natively supported?

Thanks for all your input guys!

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Installing Driver Modules with Source Code and Makefile

Sun Jan 24, 2016 9:54 pm

The way you do it is to start with 0b95:1790 and feed that into Google or search the kernel source tree at http://github.com/raspberrypi/linux for that vendorid / productid.

https://www.google.co.uk/search?q=0b95:1790+Linux
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “Advanced users”