LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 05-27-2005, 01:20 AM   #1
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,604

Rep: Reputation: 47
tinkering with dkms: make error no targets. Makefile issue?


Hello,

Made a modification to sata_sil.c and trying to build module on its own, using dkms. I do not understand what is missing during the make process.
Please see session transcript below.

[edit having read http://www.linuxjournal.com/article/6896
and dkms-ols2004.pdf
I will had MODULE_NAME="sata_sil.o" in the dkms.conf ]

I use mandy 10.1 CE, gcc and kernel source 2.6.8.1-10mdk installed.

Managed to add my module to the tree, no problem
# dkms status
sata_sil, 2: added

This my homemade dkms.conf
Code:
PACKAGE_NAME=sata_sil
PACKAGE_VERSION=2

DEST_MODULE_LOCATION[0]=/kernel/drivers/scsi
BUILT_MODULE_NAME[0]=sata_sil
MAKE[0]="make KERNEL_PATH=${kernel_source_dir}"

AUTOINSTALL=yes

Code:
 
# dkms build -m sata_sil -v 2

Preparing kernel 2.6.8.1-10mdk for module build:
(This is not compiling a kernel, only just preparing kernel symbols)
Storing current .config to be restored when complete
Running Mandrakelinux style preparation routine
make clean....
using /lib/modules/2.6.8.1-10mdk/source/arch/i386/defconfig
make oldconfig....
running dkms_mkkerneldoth....

Building module:
cleaning build area...(bad exit status: 2)
make KERNELRELEASE=2.6.8.1-10mdk KERNEL_PATH=/lib/modules/2.6.8.1-10mdk/source...(bad exit status: 2)

Error! Bad return status for module build on kernel: 2.6.8.1-10mdk (i686)
Consult the make.log in the build directory
/var/lib/dkms/sata_sil/2/build/ for more information.
# cat /var/lib/dkms/sata_sil/2/build/make.log
DKMS make.log for sata_sil-2 for kernel 2.6.8.1-10mdk (i686)
Thu May 26 22:06:52 BST 2005
I have this error
Makefile:6: *** missing separator. Stop
or this
make: *** No targets. Stop
depeding on my makefile. The most often and relevant error is "No target"

My makefile is a cut down version of the scsi makefile.
I really do not know what to have in it.
All the uncommented lines are things I tried (not all)
#
# Makefile for linux/drivers/scsi
#
#obj-$(CONFIG_SCSI_SATA_SIL) += libata.o sata_sil.o
#obj mysata += libata.o sata_sil.o
# libata.o sata_sil.o
#make -C /lib/modules/2.6.8.1-10mdk/build


[root@localhost sata_sil-2]# ls -l
-rwxr-xr-x 1 root root 181 May 26 21:30 dkms.conf*
-rw-r--r-- 1 root root 180 May 26 21:26 dkms.conf~
-rw-r--r-- 1 root root 84385 Sep 8 2004 libata-core.c
-rw-r--r-- 1 root root 3503 Sep 8 2004 libata.h
-rw-r--r-- 1 root root 39284 Sep 8 2004 libata-scsi.c
-rw-r--r-- 1 root root 132 May 26 22:09 Makefile
-rw-r--r-- 1 root root 131 May 26 22:06 Makefile~
-rw-r--r-- 1 root root 13087 May 26 20:46 sata_sil.c

Thanks for any help

Last edited by Emmanuel_uk; 06-01-2005 at 07:43 AM.
 
Old 06-03-2005, 01:26 AM   #2
Emmanuel_uk
Senior Member
 
Registered: Nov 2004
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,604

Original Poster
Rep: Reputation: 47
MODPOST stage 3 to 5 some errors maybe Module.symvers

Did some reading, not enough to guide a newbee.
So being analytical, I removed MAKE[0]="make KERNEL_PATH=${kernel_source_dir}"
from dkms.conf
Now the process is going much further but bang in the wall again

Code:
[root@localhost sata_sil-2]# dkms build -m sata_sil -v 2 -k 2.6.8.1-10mdk
Preparing kernel 2.6.8.1-10mdk for module build:
(This is not compiling a kernel, only just preparing kernel symbols)
Storing current .config to be restored when complete
Running Generic preparation routine
make mrproper....
using /lib/modules/2.6.8.1-10mdk/source/arch/i386/defconfig
make oldconfig....
make prepare-all.....

Building module:
cleaning build area....
make KERNELRELEASE=2.6.8.1-10mdk -C /lib/modules/2.6.8.1-10mdk/source M=/var/lib/dkms/sata_sil/2/build....

Error!  Build of sata_sil.ko failed for: 2.6.8.1-10mdk (i686)
Consult the make.log in the build directory
/var/lib/dkms/sata_sil/2/build/ for more information.

[root@localhost sata_sil-2]# cat /var/lib/dkms/sata_sil/2/build/make.log
DKMS make.log for sata_sil-2 for kernel 2.6.8.1-10mdk (i686)
Thu Jun  2 23:01:46 BST 2005
make: Entering directory `/usr/src/linux-2.6.8.1-10mdk'
  Building modules, stage 2.
  MODPOST
make: Leaving directory `/usr/src/linux-2.6.8.1-10mdk'
So I decided to verbose the last command.
No idea what is wrong maybe something with Module.symvers

Code:
[root@localhost sata_sil-2]# make V=1  KERNELRELEASE=2.6.8.1-10mdk -C /lib/modules/2.6.8.1-10mdk/source M=/var/lib/dkms/sata_sil/2/build
make: Entering directory `/usr/src/linux-2.6.8.1-10mdk'
mkdir -p /var/lib/dkms/sata_sil/2/build/.tmp_versions
make -f scripts/Makefile.build obj=/var/lib/dkms/sata_sil/2/build
  Building modules, stage 2. 
make -rR -f /usr/src/linux-2.6.8.1-10mdk/scripts/Makefile.modpost
  scripts/mod/modpost -i /usr/src/linux-2.6.8.1-10mdk/Module.symvers
make: Leaving directory `/usr/src/linux-2.6.8.1-10mdk'
Code:
[root@localhost linux-2.6.8.1-10mdk]# ls -l
total 408
drwxr-xr-x  33 root root  4096 May 26 20:41 3rdparty/
drwxr-xr-x   8 root root  4096 Sep  8  2004 arch/
-rw-r--r--   1 root root 18691 Aug 14  2004 COPYING
-rw-r--r--   1 root root 86757 Sep  8  2004 CREDITS
drwxr-xr-x   2 root root  4096 Jun  2 21:46 crypto/
drwxr-xr-x  46 root root  4096 May 26 20:41 Documentation/
drwxr-xr-x  45 root root  4096 May 26 20:42 drivers/
drwxr-xr-x  54 root root  4096 Jun  2 21:46 fs/
drwxr-xr-x  23 root root  4096 Jun  2 23:01 include/
drwxr-xr-x   2 root root  4096 May 26 20:42 init/
drwxr-xr-x   2 root root  4096 May 26 20:42 ipc/
drwxr-xr-x   3 root root  4096 May 26 20:42 kdb/
drwxr-xr-x   3 root root  4096 May 26 20:42 kernel/
drwxr-xr-x   4 root root  4096 May 26 20:42 lib/
lrwxrwxrwx   1 root root    28 May 26 20:42 linux-2.6.8.1-10mdk -> /usr/src/linux-2.6.8.1-10mdk/
-rw-r--r--   1 root root 53432 Sep  8  2004 MAINTAINERS
-rw-r--r--   1 root root 38185 Jun  2 22:34 Makefile
-rw-r--r--   1 root root 38181 Jun  2 22:32 Makefile~
-rw-r--r--   1 root root  3357 Jun  2 22:35 Makefile.modpost
drwxr-xr-x   2 root root  4096 May 26 20:42 mm/
drwxr-xr-x  33 root root  4096 May 26 20:42 net/
-rw-r--r--   1 root root 13970 Aug 14  2004 README
-rw-r--r--   1 root root  2815 Aug 14  2004 REPORTING-BUGS
drwxr-xr-x   5 root root  4096 May 26 20:42 rsbac/
-rw-r--r--   1 root root 13087 Jun  2 22:02 sata_sil.c
drwxr-xr-x   9 root root  4096 Jun  2 23:01 scripts/
drwxr-xr-x   3 root root  4096 Jun  2 21:46 security/
drwxr-xr-x  16 root root  4096 Jun  2 21:46 sound/
drwxr-xr-x   2 root root  4096 May 26 20:42 usr/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
makefile targets dand Programming 1 07-11-2005 03:28 PM
Adding more targets to Make oulevon Programming 6 02-09-2005 05:11 PM
"no targets specified and no makefile found" liljhand Linux - Software 9 01-01-2005 12:54 PM
[makefile] Do header files need to be set targets? chuanyung Programming 2 03-11-2004 09:22 PM
make with multiple targets eskimo22 Programming 1 02-26-2004 11:42 AM


All times are GMT -5. The time now is 01:42 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration