• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Compiling Linux Driver From Source

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

zzzzzzzzzz

Member
Joined
Apr 7, 2009
I have an ARM device running the Android 5.1.1 Linux distribution. I am trying o install the Ethernet adapter driver.

The Ethernet adapter device is an ASIX AX88179 USB 3.0 to Gigabit Ethernet adapter and has the "Android 1.x/2.x/3.x/4.x/5.x, Linux kernel 2.6.25 and later" driver source code available from the ODM:
http://www.asix.com.tw/FrootAttach/driver/AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE.tar.gz
The driver archive has also been attached to this post.

I have tried to compile the driver on my ARM device using the information from the driver archive readme file, but have been unsuccessful. Presumably, the "make" command or tool must be installed.

How can I compile the driver for use on my ARM device?
Must the driver be compiled on the same device it is intended for use?
 

Attachments

  • AX88179_178A_LINUX_DRIVER_v1.14.2_SOURCE.tar.gz
    16 KB · Views: 30
So I looked at the driver. Its a standard compile instruction set.

As to your question you dont HAVE to compile it on the intended device. However you will need to cross compile for ARM. You will need to know which version of ARM you are compiling for if you don't do the compilation on the device itself.

The make command is usually provided by "gcc" which is the GNU C Compiler.

Here is an example of cross compiling for Arm
 
As to your question you dont HAVE to compile it on the intended device. However you will need to cross compile for ARM.
Is there a benefit, perhaps in terms of the output, to compiling directly on the ARM device?

You will need to know which version of ARM you are compiling for if you don't do the compilation on the device itself.
Should the exact kernel version be matched? For example, if using kernel version 3.4.107, can the kernel sources of a similar version such as 3.4.110 be used? Should the driver be recompiled for the minor version kernel updates?

The make command is usually provided by "gcc" which is the GNU C Compiler.
Understood.

Here is an example of cross compiling for Arm
I shall examine it.
 
Kernel versions only matter if you are creating a kernel mod.

So basically there is no great advantage to compiling on the device itself except that it is much simpler. It may be slower but the system knows what version to compile for.

Lots of people use a more powerful device to cross compile from
 
The make command is usually provided by "gcc" which is the GNU C Compiler.

GNU Make and GNU Compiler Collection are two distinct things that are NOT packaged together. Either one can be used independently. You could set CC=Clang in a Makefile or use GCC via direction execution, Ninja, or QMake. There are several projects that use Makefiles that don't even have any compiled code - Make just runs a set of instruction in order, and those could be echo, cat, sed, etc.
 
Last edited:
A quick update: This thread has not been forgotten; I plan to update in a few days.
 
Back