Compilng Modules


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Compilng Modules
# 1  
Old 06-23-2003
Question Compilng Modules

Hi all

Can anyone tell me if it is possible to compile modules individually without having to recompile the whole kernel?

I have recently compiled a new kernel but forgot to compile in lp.o which would allow me to print. I can see lp.c in /usr/src/linux/kernel/drivers/char sometimes in these .c files there is a line telling u the syntax to compile it on the command line but not so here. Does anyone know what flags i shoud pass to the compile or if this is even possible...or am i just going to have to recompile the whole thing!

many thanks
# 2  
Old 06-24-2003
I was eventually able to do this.

1. Copy the makefile in /usr/src/linux

2. Edit the copied makefile , comment out/edit the line starting SUBDIRS so that only the directories for the modules you want are quoted. Usually looks something ike this

SUBDIRS =kernel drivers mm fs net ipc lib grsecurity crypto

I changed it to look like this

SUBDIRS =drivers/char

I also added a line in the DRIVERS section of the copied makefile like this (there are many that look like this)

DRIVERS-$(CONFIG_PRINTER) += drivers/char/lp.o




3 I added a line in /usr/src/linux/.config to reflect the printer module (CONFIG_PRINTER=m)

4. issued command

make -f mycopiedmakefile modules

I ended up with module lp.o which i was then able to slot into the running kernel

hope this of use to someone Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

Security modules in Samba

Did anyone ever find the LAM module. Or did you have to get samba working with the provided pam module? edit by bakunin: please create your own thread for your own question. We have no shortage on threads and we try not to mix up different problems. Thank you. (0 Replies)
Discussion started by: whipped
0 Replies

2. Shell Programming and Scripting

How to get result from both of these modules?

Hallo All unix Guru's I have written a small (static) pl/sql function which is inserting data into database. It is as follows: sqlplus $CONNECT <<-EOF DECLARE Counter integer :=1; BEGIN WHILE Counter <= ${no_of_files} LOOP INSERT INTO... (1 Reply)
Discussion started by: bluemind2005
1 Replies

3. Shell Programming and Scripting

how to create custom modules in perl and how to import all modules with single command?

I have some custom functions which i want to use in perl Scripting all time. i want to How to create modules in perl and how to import them. Also if i create 15 modules and i want to > import all at once then how can i import? (0 Replies)
Discussion started by: Navrattan Bansa
0 Replies

4. Emergency UNIX and Linux Support

Python script and modules.

I am running a python script as follows from a shell script and getting an error as the following. Can anybody help to sort it out. ++ ORACLE_HOME=/opt/oracle ++ JAVA_HOME=/usr/local/jdk1.5 ++ LD_LIBRARY_PATH=/usr/lib:/lib:/usr/ucblib:/opt/oracle/lib32:/usr/local/lib:/vobs/gtx1/libsolaris... (2 Replies)
Discussion started by: Tuxidow
2 Replies

5. Linux

Which modules get installed with modules_install

I'm trying to build a 2.6.18 kernel for XEN (level 0), and I need to make an initrd image that will utilize our HP's raid/scsi driver (cciss.o). The driver is being built and I can see it in drivers/block/cciss.o. But when I do "make modules_install", this module is not copied into the... (2 Replies)
Discussion started by: otheus
2 Replies

6. UNIX for Dummies Questions & Answers

installing perl modules

I resulted to using /usr/sfw/bin/gmake to install my perl modules until i ran into a problem installing perl/Tk Tk-804.028 gmake: Entering directory `/export/home/Tk-804.028/pod' Sorry no HTML building yet gmake: Leaving directory `/export/home/Tk-804.028/pod' I dont unstand what the error... (2 Replies)
Discussion started by: jameskay
2 Replies

7. Shell Programming and Scripting

extracting used perl modules

Hi, I am trying to extract the includes from all the perl programs in my application space;ie. i want the list of all used modules in my application. First i did a grep like 'grep -r "^use.*;$" * > ~dileepp/search.txt' which gives me the output in the form "filename:line containing use"... (0 Replies)
Discussion started by: DILEEP410
0 Replies

8. UNIX for Dummies Questions & Answers

modules under bsd

Hello I know that I can load or unload kernel modules (/sbin/modload or /sbin/modunload) but how can I check what of modules are now loaded to my kernel? I heard that I can do it by /sbin/modstat but I haven't file like this in my system... Please help me. Have a nice day (2 Replies)
Discussion started by: pgas
2 Replies

9. UNIX for Dummies Questions & Answers

/etc/modules/conf

RedHat 7.1 I get /etc/modules.conf is more recent than /lib/modules/2.4.2-2/modules.dep This is currently running on a Dell Latitude CPi Laptop. (2 Replies)
Discussion started by: jblank1234
2 Replies
Login or Register to Ask a Question