Howto Install Just A Single Module
来源:互联网 发布:绘制网络拓扑图软件 编辑:程序博客网 时间:2024/06/15 09:56
Let us assume that you already did 'make modules' and 'make modules_install'. And later you did 'make clean' to free up disk space. And now, you want to change a "C" file in one of the modules and want to rebuild just that module and copy the module file to /lib/modules. How do you do it?
You can compile just a single module file (say like foo.o) and install it. For this simply edit the Makefile and change the SUBDIRS to add only those directories you are interested.
For an example, if I am interested in installing only fs/autofs module, then I do the following :
cd /usr/src/linux
cp Makefile Makefile.my
vi Makefile.my
# And comment out the line having 'SUBDIRS' and add the
# directory you are interested, for example like fs/autofs as below :
#SUBDIRS=kernel drivers mm fs net ipc lib abi crypto
SUBDIRS=fs/autofs
# Save the file Makefile.my and give -
make -f Makefile.my modules
# This will create module autofs.o
# Now, copy the module object file to destination /lib/modules
make -f Makefile.my modules_install
# And this will do 'cp autofs.o /lib/modules/2.4.18-19.8.0/kernel/fs/autofs'
Learn more about Makefile and make. See the manual for GNU make at
"http://www.gnu.org/manual/make" .
University of Utah Makefile "http://www.math.utah.edu/docs/info/make-stds_toc.html"
University of Hawaii Makefile "http://www.eng.hawaii.edu/Tutor/Make"
In Linux - man make
In Linux - info make
Get familiar with the Makefile which makes the modules. The Makefile has module line like
modules: $(patsubst %, _mod_%, $(SUBDIRS))
The patsubst function has the syntax $(patsubst pattern,replacement,text). It uses the percent symbol ([percnt]) the same way pattern rules do - as a string which matches in both the pattern and the replacement text. It searches the text for whitespace-separated words that match the pattern and substitutes the replacement for them.
This makefile includes shell functions as well as standard make functions. The syntax for a shell function is $(shell command). This returns the output of the shell function (stripping new lines).
- Howto Install Just A Single Module
- Build and Install a PERL module
- FreeRadius install howto
- How to install a PHP PECL extension/module on Ubuntu
- ADT Bundle – Just a single step to setup android development environment
- Howto: Ubuntu install From USB
- Howto install matlab on Ubuntu
- HOWTO - Install Nginx + uWSGI + Django
- how to compile a single kerel module to ko in android
- python-multiprocessing module install
- drupal install module
- mac python install module
- [hadoop]How To Install Apache Hadoop Pseudo Distributed Mode on a Single Node
- Howto Install Windows XP / Vista on Xen
- HOWTO: Install gcc-3.4 in ubuntu 10.04
- HowTo Install Redmine in Ubuntu - Redmine
- HowTo install Redmine on CentOS 5
- Howto: install phplua extension for PHP
- 启动oracle10监听器错误:本地计算机上的OracleOraDb10g_home1TNSListener服务启动后又停止了
- FlashBuilder_4_Plugin_LS10.exe 安装出错的问题
- Shader Debug
- redhat 安装 yum
- [技术讨论]建模工具的使用到客观评价
- Howto Install Just A Single Module
- linux安装mysql(详细)
- 纯 Java 实现播放 mp3 音乐
- 4月1号收物品了。
- 压缩与解压缩
- s3c2410 MMU(存储器管理单元)讲解
- 关于字符数组的初始化
- 常见的mysql的错误代码
- Criteria与DetachedCriteria的区别