Skip to contentSkip to conversation

install module on 2.6

PATCH New Ling 2 participants 2 messages Apr 1, 2004 – Apr 2, 2004

Subsystems (2)
lore
Share & tools
lore

Ling

#0 lore raw

PATCH 1/1 install module on 2.6

It seems on 2.6 kernel, "make install" does not work. A simple patch to fix it

Makefile +6 -0
Index: src/Makefile
===================================================================
@@ -239,7 +239,13 @@
 
 all:
 	$(MAKE) -C $(KDIR) SUBDIRS=$(CURDIR) modules
+install:install-ocfs
 
+install-ocfs: ocfs2.ko
+	$(TOPDIR)/mkinstalldirs $(DESTDIR)$(MODULEDIR)/ocfs
+	$(INSTALL_DATA) ocfs2.ko $(DESTDIR)$(MODULEDIR)/ocfs/ocfs2.ko
+	depmod -a
+
 endif # OCFS_KERNEL_2_6
 
 include $(TOPDIR)/Postamble.make

-------------------
Xiaofeng
[email protected]

#1 lore raw

PATCH 1/1 install module on 2.6

Quoted 2 lines · Xiaofeng

It seems on 2.6 kernel, "make install" does not work. A simple patch to fix it

Committed a modifed version.

Makefile line 242

Quoted 10 lines

Index: src/Makefile
===================================================================

Makefile +1 -0
@@ -239,7 +239,13 @@
 
 all:
 	$(MAKE) -C $(KDIR) SUBDIRS=$(CURDIR) modules
+install:install-ocfs

With makebo, use INSTALL_RULES to hook into the install rule, instead of overriding it. Should've also done it for all, and now we do.

Makefile line 249

Quoted 6 lines
Makefile +5 -0
+install-ocfs: ocfs2.ko
+	$(TOPDIR)/mkinstalldirs $(DESTDIR)$(MODULEDIR)/ocfs
+	$(INSTALL_DATA) ocfs2.ko $(DESTDIR)$(MODULEDIR)/ocfs/ocfs2.ko
+	depmod -a
+
 endif # OCFS_KERNEL_2_6

I've made this shared with 2.4 now.

-Manish