Ubuntu driver development environment-general Linux technology-Linux programming and kernel information. The following is a detailed description. The version I used is ubuntu8.04, and the kernel tree has been created.
The/usr/src directory has the following version directories:
Linux-headers-2.6.24-19
Linux-headers-2.6.24-19-generic, if not, need to go online to download.
Clean:
Rm-rf *. o *~ Core. depend. *. cmd *. ko *. mod. c. tmp_versions
Save the file and compile it. If
Sysu @ sysu-desktop :~ /Driver $ make
Makefile: 10: *** the Delimiter is missing (you mean to use TAB to replace 8 spaces ?). Stop. Or
Root @ sysu-desktop :~ /Driver # make
Make: nothing can be done as 'all '.
The error is because the Makefile format is incorrect. The spaces in front of $ (MAKE) and rm-rf *. o * are completed by a TAB key.
Root @ sysu-desktop :~ /Driver # make
Make-C/lib/modules/2.6.24-19-generic/build M =/home/sysu/driver
Make [1]: Entering directory '/usr/src/linux-headers-2.6.24-19-generic'
LD/home/sysu/driver/built-in.o
CC [M]/home/sysu/driver/hello. o
Building modules, stage 2.
MODPOST 1 modules
CC/home/sysu/driver/hello. mod. o
LD [M]/home/sysu/driver/hello. ko
Make [1]: Leaving directory '/usr/src/linux-headers-2.6.24-19-generic'
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.