LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-04-2005, 11:51 PM   #1
iansoundz
Member
 
Registered: Jul 2005
Location: Arlington, VA
Distribution: CentOS 4.1 Kernel 2.6.9-11.EL
Posts: 77

Rep: Reputation: 15
Make not working? Please help!


I got the following files sent to me with instructions as shown below:

Makefile (All it says in it is this : obj-m := sgi_hostid.o)
I also got the other two files as shown below:

sgi_hostid.c
license.lic

************************************************************
Below are the instructions I recieved with it:


Only written for 2.6.x linux kernel and
will not work on any other kernel version

written by examples from
http://www.diku.dk/hjemmesider/stude...tml/node3.html

make with: make -C /usr/src/linux-'uname -r` SUBDIRS=`pwd` modules

mimics SGI's hostid proc file entry /proc/sgi_sn/licenseID `

After compiling:

insmod ./sgi_hostid.ko

echo HOSTID >/proc/sgi_sn/licenseID

Where HOSTID is the host id defined in the flex license file.

************************************************************
Below is my problem:

I type this at BASH prompt: make -C /usr/src/linux-'uname -r` SUBDIRS=`pwd` modules

and this is all I get in return:

">"

That's it! I was expecting tons of output to flash by for a while and then return me to my prompt. Anyone have an idea why this is happening?

But then again how can I expect anything? Shouldn't there have ben a configure script? And how can i "insmod ./sgi_hostid.ko"??? The file that was sent to me is "sgi_hostid.c"

Do I obviously have some stuff missing or am I just ignorant?

BTW, I am tring to install and run a license server and these were the requirements for doing so.

Any help is greatly appreciated!

Last edited by iansoundz; 07-05-2005 at 12:27 AM.
 
Old 07-05-2005, 12:40 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
make -C /usr/src/linux-'uname -r` SUBDIRS=`pwd`

should be:

make -C /usr/src/linux-`uname -r` SUBDIRS=`pwd`

uname -r expands into your kernel version and writes this to stdout. To put it into a command you must inclose it in backquotes.
 
Old 07-05-2005, 12:57 AM   #3
iansoundz
Member
 
Registered: Jul 2005
Location: Arlington, VA
Distribution: CentOS 4.1 Kernel 2.6.9-11.EL
Posts: 77

Original Poster
Rep: Reputation: 15
You're right but I get this now:

CC (M) /root/sgi_hostid.o
Building modules stage, 2
Modpost

***Warning: "preempt_schedule" [root/sgi_hostid.ko] undefined!

CC sgi_hostid.mod.o
LD sgi_hostid.ko

Make: Leaving directory `/usr/src/linux-2.6.8.1'

Is this a serious error? What should have I seen?
When I ls my /root directory I see both these files and a couple others. But according to the directions, wasn't it suppose to create the directory /proc/sgi_sn/licenseID ? It isn't there.

Perhaps my newbieness is shining through! ;-)

Last edited by iansoundz; 07-05-2005 at 01:03 AM.
 
Old 07-05-2005, 03:46 AM   #4
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 33
/proc is a directory which shows live info from your running kernel - the dir /proc/sgi_sn/licenseID will most likely appear once you insmod or modproge the modules you just built.
the make warning you got on your screen does not seem to be anything trivial. if it was a serious error it would exit with an error: message...
 
Old 07-05-2005, 04:23 AM   #5
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
"warning" messages are usually fine. These come from gcc and tend not to get "fixed" because the compiler is actually quite picky and programmers need sleep sometimes too (like when the coffee runs out...)

It is telling you that the variable "preempt_schedule" is not defined in the module source. You can sometimes get away without defining variables right away. If it couldn't find a file it would return an "error: <filename> does not exist" ior similar message.

The acid test is to modpropbe the module as per instructions and see what happens.
 
Old 07-05-2005, 08:18 AM   #6
iansoundz
Member
 
Registered: Jul 2005
Location: Arlington, VA
Distribution: CentOS 4.1 Kernel 2.6.9-11.EL
Posts: 77

Original Poster
Rep: Reputation: 15
Simon and Nathanael,

Thanks both. I may be green now....but who knows....maybe someday I'll be answering some of your questions!!!
 
Old 07-05-2005, 08:32 AM   #7
iansoundz
Member
 
Registered: Jul 2005
Location: Arlington, VA
Distribution: CentOS 4.1 Kernel 2.6.9-11.EL
Posts: 77

Original Poster
Rep: Reputation: 15
Hmmm...geesh...insmod ./sgi_hostid.ko didn't work.

I get error inserting 'sgi_hostid.ko': Invalid module format!

Could this be because insmod expects sgi_hostid.o instead?

help!?
 
Old 07-06-2005, 04:12 AM   #8
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
modprobe sgi_hostid

I think. You leave off the ending.
You left insmod looking for sgi_hostid.ko.o or variations.

Read the man pages for insmod and modprobe - they are amongst the simplest man pages there are so they are good for practising reading the technical documentation anyway.

if it still don't go - check with the instructions again - exactly what is the module name supposed to be?

modprobe -nv sgi_hostid

may supply info
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Make file not working bschneider Linux - Software 9 06-06-2005 09:04 PM
how to make my cd-rw working correctly kira Linux - Hardware 8 05-16-2005 09:27 PM
make test not working dr_zayus69 Linux - Software 2 12-02-2004 03:17 PM
Make not working eggoz Linux - Software 2 09-26-2004 06:33 PM
make install not working> SheldonPlankton Programming 4 08-14-2004 12:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:27 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration