LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   About "make install" and "insmod" (https://www.linuxquestions.org/questions/linux-newbie-8/about-make-install-and-insmod-72620/)

captainstorm 07-14-2003 11:36 AM

About "make install" and "insmod"
 
I could not find information on these and would somebody help me here?

1.
I have installed a driver for USB-Serial converter under linux. That is a tar.gz file and I used first "make" and then "make inst"(at root). After rebooting the computer, I am able to use this device.

2.
However, I want to install another driver for my modem. From the instruction, I should first use "make" to build the .o file and then "insmod" to insert the module. Besides, I still need to add some lines to /etc/modules.conf, like "alias char-major-62 ptserial", where ptserial is for "ptserial.o" and after that, I need to invoke the command "modprobe ptserial". This way would allow the computer to load the ptserial.o every time it boots.

I am a little bit confused here. Why I have such a difference between these two installation? The first method is already able to let the kernel load the driver when booting up :confused: (I was supposing they are similar)

Besides, is "make inst" identical to "make install"?

Thank you for any post here:)

tcaptain 07-14-2003 11:44 AM

well basically its all about source code and makefiles.

A makefile is kind of like a config file that has instructions on how to compile source code...

when you type 'make' then it follows the instructions in the makefile (default)

when you type 'make install' it follows the instructions under the category 'install' in the makefile (usually its just a bunch of copy statements..but it could be more complext).

so when you type 'make inst' you are essentially telling make to follow the instructions for the category 'inst' inside the makefile made by the source-code's author(s).

So 'make inst' and 'make install' COULD be the same thing...it all depends on what the programmer(s) put in the makefile.

In fact, from program to program 'make install' could be different, even tho its the same command.

captainstorm 07-14-2003 11:52 AM

Ah, thank you very much tcaptain:) I understand the trick behind the "make install".

While would you please see if my understanding on "make install" and "insmod" is correct?:

1. the "make install" command already does the jobs like adding the lines in /etc/modules.conf
2. the "insmod" is a command to insert the module in the "running kernel". (it will take effect right then).
3. So, if I want the module installed after rebooting, "make install" is enough?

Thanks again.

tcaptain 07-14-2003 11:58 AM

1. not necessarily (and usually it doesn't)...as I said, it depends on what the programmers put in there...and usually they don't do stuff like modify modules.conf
2. yes that's correct (I think)
3. no, 'make install' is part of the compiling process, ie: what takes a bunch of source code and turns in into executables that your PC can run...most drivers will come with instructions on what you need to do to have them work when you reboot (like what to add to your modules.conf and such)...at that point, if you have problems...well that's what LQ is for :D


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