|
|
|---|
PPTP Client Fedora Core 2 MPPE Kernel Build HOWTO by James Cameron and John BouAntoun 30th May 2004
This describes how to rebuild the kernel on Fedora Core 2 to include MPPE support, for using PPTP. These instructions were taken from the Redhat 8 MPPE enabled kernel howto. It was tested on a system installed from CD-ROM, without updates. You will need software engineering build skills or lots of patience. Strategy
Process Diagram This diagram shows the process that is to be followed. The numbers in the yellow boxes correspond to steps in these instructions, but not all the steps are shown. Flat boxes are files or directories. Lines show the flow of data. The colours have been chosen to indicate various attributes:
![]()
|
Process Steps
| rpm -ivh kernel-source-2.6.5-1.358.i386.rpm |
Note: if you have a /usr/src/linux-2.6.5-1.358 directory already from a previous kernel build on this system, remove it or change the name. These instructions depend on the directory being created from the source RPM without any previous changes.
| cd /usr/src mkdir linux-2.6.5-1.358.orig cd linux-2.6.5-1.358 tar cf - .|(cd ../linux-2.6.5-1.358.orig/;tar xf -) |
| cd /usr/src cvs -d :pserver:cvs@pserver.samba.org:/cvsroot co ppp/linux/mppe |
| cd /usr/src/ppp/linux/mppe chmod +x mppeinstall.sh ./mppeinstall.sh /usr/src/linux-2.6.5-1.358 |
| cd /usr/src rsync -av --dry-run linux-2.6.5-1.358/* linux-2.6.5-1.358.orig/ |
| cd /usr/src/ find linux-2.6.5-1.358 -name "*.orig" -exec rm {} \; rm -f linux-2.6.5-ppp-2.4.2.patch diff --new-file --recursive --unified \ linux-2.6.5-1.358.orig/drivers/net \ linux-2.6.5-1.358/drivers/net > \ linux-2.6.5-ppp-2.4.2.patch diff --new-file --recursive --unified \ linux-2.6.5-1.358.orig/include/linux \ linux-2.6.5-1.358/include/linux >> \ linux-2.6.5-ppp-2.4.2.patch |
| grep +++ linux-2.6.5-ppp-2.4.2.patch more linux-2.6.5-ppp-2.4.2.patch |
The patch affects the files listed below.
| drivers/net/arcfour.c drivers/net/arcfour.h drivers/net/Config.in drivers/net/Kconfig drivers/net/Makefile drivers/net/ppp_generic.c drivers/net/ppp_mppe_compress.c drivers/net/sha1.c drivers/net/sha1.h include/linux/ppp-comp.h |
The file ppp-comp.h is included by other kernel modules, but the patch only adds new text used by the other files patched. It may be possible to distribute the kernel modules only. Advice from others is welcome!
| rpm -i kernel-2.6.5-1.358.src.rpm |
| cp linux-2.6.5-ppp-2.4.2.patch /usr/src/redhat/SOURCES/ |
cd /usr/src/redhat/SPECS
cp kernel-2.6.spec kernel-2.6.spec.orig
patch << EOF
--- kernel-2.6.spec.orig 2004-05-08 22:34:31.000000000 +1000
+++ kernel-2.6.spec 2004-05-27 16:06:26.000000000 +1000
@@ -20,7 +20,8 @@
%define kversion 2.6.%{sublevel}
%define rpmversion 2.6.%{sublevel}
%define rhbsys %([ -r /etc/beehive-root ] && echo || echo .`whoami`)
-%define release %(R="$Revision: 1.358 $"; RR="${R##: }"; echo ${RR%%?})%{rhbsys}
+%define release %(R="$Revision: 1.358 $"; RR="${R##: }"; echo ${RR%%?})mppe
%define KVERREL %{PACKAGE_VERSION}-%{PACKAGE_RELEASE}
@@ -258,6 +260,8 @@
Patch10000: linux-2.6.0-compile.patch
# Patch10010: linux-2.6.0-module-license.patch
+# added by jba for ppp mppe patch
+Patch10100: linux-2.6.5-ppp-2.4.2.patch
# END OF PATCH DEFINITIONS
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -529,11 +533,17 @@
#
%patch10000 -p1
+
#
# Add MODULE_LICENSE() where it's missing
#
# %patch10010 -p1
+#
+# PPP MPPE support
+#
+%patch10100 -p1
+
# END OF PATCH APPLICATIONS
@@ -660,7 +670,8 @@
# detect missing or incorrect license tags
for i in `find $RPM_BUILD_ROOT/lib/modules/$KernelVer -name "*.ko" ` ; do echo -n "$i " ; /sbin/modinfo -l $i >> modinfo ; done
- cat modinfo | grep -v "^GPL" | grep -v "^Dual BSD/GPL" | grep -v "^Dual MPL/GPL" | grep -v "^GPL and additional rights" | grep -v "^GPL v2" && exit 1
+ # added "BSD without advertisement clause" to licenses allowed
+ cat modinfo | grep -v "^GPL" | grep -v "^Dual BSD/GPL" | grep -v "^Dual MPL/GPL" | grep -v "^GPL and additional rights" | grep -v "^GPL v2" | grep -v "BSD without advertisement clause" && exit 1
rm -f modinfo
# remove files that will be auto generated by depmod at rpm -i time
rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/modules.*
EOF
|
Packaging issue, can't figure out how to patch for config change that adds CONFIG_PPP_MPPE.
cd /usr/src/redhat/SOURCES for kcfg in kernel-2.6.5-i686*.config do patch << EOF --- $kcfg.orig +++ $kcfg @@ -674,6 +674,7 @@ CONFIG_PPP_ASYNC=m CONFIG_PPP_SYNC_TTY=m CONFIG_PPP_DEFLATE=m +CONFIG_PPP_MPPE=m # CONFIG_PPP_BSDCOMP is not set # CONFIG_PPPOE is not set CONFIG_SLIP=m EOF done |
| cd /usr/src/redhat/SPECS time \ rpmbuild -ba --target=i686 kernel-2.6.spec |
Note: we've assumed i686 processor type in these instructions. You may need another processor type. Change the references accordingly.
| rpm -ivh /usr/src/redhat/RPMS/i586/kernel-2.6.5-1.358mppe.i586.rpm |
| alias ppp-compress-18 ppp_mppe alias ppp-compress-21 bsd_comp alias ppp-compress-24 ppp_deflate alias ppp-compress-26 ppp_deflate alias char-major-108 ppp_generic |
Note: we are not aware of anything that actually needs to be in the modules.conf file. The association between ppp-compress-18 and the ppp_mppe module is already integrated into the kernel module utilities. There are many old web sites that don't take this into account.
| reboot |
| modprobe ppp-compress-18 |
The expected output is:
| Warning: loading /lib/modules/2.6.5-1.358mppe/kernel/drivers/net/ppp_mppe.o will taint the kernel: non-GPL license - BSD without advertisement clause See http://www.tux.org/lkml/#export-tainted for information about tainted modules Module ppp_mppe loaded, with warnings |
Notes:
| Date | Change |
|---|---|
| 2004-10-27 |
Better explain the non-requirement to edit the modules.conf file,
reported by Eric V. Smith.
|
| 2004-09-24 |
Fix link typo reported by Eric V. Smith.
|
| 2004-05-30 |
First draft taken from Red Hat 8 kernel build howto.
|