找回密码
 注册
查看: 739|回复: 1

another method about compiling

[复制链接]
发表于 2003-4-12 04:15:22 | 显示全部楼层 |阅读模式
i c&p this.
----
  3.3.  Howto Install Just A Single Module ?

  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'
  ______________________________________________________________________
发表于 2003-4-15 23:36:34 | 显示全部楼层
hoho
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2025-2-11 10:36 , Processed in 0.019322 second(s), 16 queries .

© 2001-2025 Discuz! Team. Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表