KEMBAR78
Development Environment: 2.1. Compilation Tool and Kernel Sources | PDF
0% found this document useful (0 votes)
44 views1 page

Development Environment: 2.1. Compilation Tool and Kernel Sources

The document provides instructions for compiling a driver on an Ubuntu 14.04.1 system with a 3.16.0-30-generic kernel. It recommends using gcc version 4.8.2 to compile the driver according to the system specifications. The steps include installing the gcc compiler if needed, checking kernel sources and parameters in the makefile, then compiling and installing the driver into the appropriate kernel modules directory.

Uploaded by

Jorge luis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views1 page

Development Environment: 2.1. Compilation Tool and Kernel Sources

The document provides instructions for compiling a driver on an Ubuntu 14.04.1 system with a 3.16.0-30-generic kernel. It recommends using gcc version 4.8.2 to compile the driver according to the system specifications. The steps include installing the gcc compiler if needed, checking kernel sources and parameters in the makefile, then compiling and installing the driver into the appropriate kernel modules directory.

Uploaded by

Jorge luis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

1.

Development Environment
System version: Ubuntu 14.04.1
Kernel version: 3.16.0-30-generic
Gcc version:4.8.2
2. Compile the Driver
2.1. Compilation tool and kernel sources
Before you compile the driver, please make sure you have the correct compile tool and kernel
sources.
We can install compile tool gcc by command “apt-get install gcc”
Note : We recommend you use a suitable compile tool to compile our driver.
For example:
According to the command “cat /proc/version”, we could see your linux system is compiled by
gcc4.8.2. So we recommend you use gcc4.8.2 to compile our driver if possible.
2.2. Compile and install the Driver
1. Access the directory of driver.
2. Before compile, make sure the parameters in “makefile.c” is suitable for your compile
environment of your Linux system.
ifeq ($(CONFIG_PLATFORM_I386_PC), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/)
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?=
KVER := $(shell uname -r)
KSRC := /lib/modules/$(KVER)/build
MODDESTDIR :=
/lib/modules/$(KVER)/kernel/drivers/net/wireless/
INSTALL_PREFIX :=
endif

You might also like