Hi,
I just created two little patches which will build the kernel modules for
the enterprise kernels.
The first patch is against src/libafs/MakefileProto.LINUX.in from the
current CVS tree. The second one is against openafs-1.1.1.spec from
openafs-1.1.1-24.4.src.rpm.
Hope you will find it useful,
Thomas.
--
-------------------------------------------------------------------------
Thomas Mueller, TU Chemnitz, Universitaetsrechenzentrum, D-09107 Chemnitz
-------------------------------------------------------------------------
diff -Naurw openafs-1.1.1.orig/src/libafs/MakefileProto.LINUX.in
openafs-1.1.1/src/libafs/MakefileProto.LINUX.in
--- openafs-1.1.1.orig/src/libafs/MakefileProto.LINUX.in Mon Aug 20 15:36:55
2001
+++ openafs-1.1.1/src/libafs/MakefileProto.LINUX.in Mon Aug 20 15:45:30 2001
@@ -100,7 +100,7 @@
ln -fs ../Makefile.common $${KDIR}/Makefile.common; \
done
-# Compile SP and MP clients as requested
+# Compile SP, MP and EP clients as requested
${COMPDIRS}:
rm -f h
@@ -137,6 +137,9 @@
if [ "$$m" = "MP" ] ; then \
SMP_DEF="-DAFS_SMP @RHCONFIG_MP@ ${LOCAL_SMP_DEF}" ; \
TARG="libafs.mp" ; \
+ elif [ "$$m" = "EP" ] ; then \
+ SMP_DEF="-DAFS_SMP @RHCONFIG_MP@ ${LOCAL_SMP_DEF}" ; \
+ TARG="libafs.ep" ; \
else \
SMP_DEF="@RHCONFIG_SP@ ${LOCAL_SMP_DEF}" ; \
TARG=libafs ; \
@@ -151,9 +154,11 @@
# For Linux there is no kernel NFS server.
LIBAFS = libafs-${CLIENT}.o
LIBAFS_MP = libafs-${CLIENT}.mp.o
+LIBAFS_EP = libafs-${CLIENT}.ep.o
DEST_LIBAFS = ${DESTDIR}/root.client/usr/vice/etc/modload/${LIBAFS}
DEST_LIBAFS_MP = ${DESTDIR}/root.client/usr/vice/etc/modload/${LIBAFS_MP}
+DEST_LIBAFS_EP = ${DESTDIR}/root.client/usr/vice/etc/modload/${LIBAFS_EP}
libafs: $(DEST_LIBAFS)
@@ -162,17 +167,27 @@
libafs.mp: $(DEST_LIBAFS_MP)
echo MP Build Complete
+libafs.ep: $(DEST_LIBAFS_EP)
+ echo MP Build Complete
+
$(DEST_LIBAFS): $(LIBAFS)
${INSTALL} -f $? $@
$(DEST_LIBAFS_MP): $(LIBAFS_MP)
${INSTALL} -f $? $@
+$(DEST_LIBAFS_EP): $(LIBAFS_EP)
+ ${INSTALL} -f $? $@
+
${LIBAFS}: $(AFSAOBJS) $(AFSNONFSOBJS)
$(RM) -f $@
$(LD) -r -o $@ $(AFSAOBJS) $(AFSNONFSOBJS)
${LIBAFS_MP}: $(AFSAOBJS) $(AFSNONFSOBJS)
+ $(RM) -f $@
+ $(LD) -r -o $@ $(AFSAOBJS) $(AFSNONFSOBJS)
+
+${LIBAFS_EP}: $(AFSAOBJS) $(AFSNONFSOBJS)
$(RM) -f $@
$(LD) -r -o $@ $(AFSAOBJS) $(AFSNONFSOBJS)
diff -Naurw SPECS.orig/openafs-1.1.1.spec SPECS/openafs-1.1.1.spec
--- SPECS.orig/openafs-1.1.1.spec Mon Aug 20 15:53:20 2001
+++ SPECS/openafs-1.1.1.spec Mon Aug 20 16:11:27 2001
@@ -23,6 +23,12 @@
# not remove the installed tree as part of the %clean operation
#define debugspec 1
+# Set 'enterprisekernelsupport' to 1 if you want to build the
+# kernel module for the enterprise kernel
+# Note: This will only work for kernvers == 24
+
+%define enterprisekernelsupport 1
+
#######################################################################
# You probably don't need to change anything beyond this line
@@ -287,26 +293,43 @@
./configure --enable-redhat-buildsys --with-afs-sysname=${sysname} \
--with-linux-kernel-headers=%{kbase}$vers%{kend}
- # Now build both SP and MP versions...
- for mp in SP MP ; do
+%if %{enterprisekernelsupport}
+ # Now build SP, MP and EP versions...
+ if grep -q -r __BOOT_KERNEL_ENTERPRISE %{kbase}$vers%{kend}/include
+ then
+ KTL="SP MP EP"
+ else
+ KTL="SP MP"
+ fi
+%else
+ KTL="SP MP"
+%endif
+ for mp in $KTL; do
# ... for all appropriate 'architectures'...
if [ %{kernvers} = 22 ]; then
# For 2.2 kernels, just do SMP and UP kernels for this version
+ if [ $mp != EP ]; then
+
PrintRedhatKernelFix ${sysbase} $mp src/config/redhat-fix.h
make only_libafs LOCAL_SMP_DEF=-DREDHAT_FIX MPS=$mp
+ fi
elif [ %{kernvers} = 24 ]; then
# For 2.4 kernels, need to build modules for each architecture!
for arch in $archlist ; do
+ if [ \( $mp != EP \) -o \( $mp = EP -a $arch = i686 \) ]; then
+
PrintRedhatKernelFix $arch $mp src/config/redhat-fix.h
make only_libafs LOCAL_SMP_DEF=-DREDHAT_FIX \
LINUX_MODULE_NAME="-$arch" MPS=$mp
+ fi
+
done
else