PPTP Client Red Hat 8.0 MPPE Kernel Build HOWTO by James Cameron 21st February 2003
This describes how to rebuild the kernel on Red Hat 8.0 to include MPPE support, for using PPTP. 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 --install kernel-source-2.4.18-14.i386.rpm |
Note: if you have a /usr/src/linux-2.4.18-14 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.4.18-14.orig cd linux-2.4.18-14 tar cf - .|(cd ../linux-2.4.18-14.orig/;tar xf -) |
cd /usr/src wget http://quozl.netrek.org/pptp/ppp-2.4.2_cvs_20021120.tar.gz tar xvfz ppp-2.4.2_cvs_20021120.tar.gz |
This source kit was generated from the PPP CVS at a particular date. You may wish to obtain PPP from CVS directly yourself. See the PPP project.
cd /usr/src/ppp-2.4.2_cvs_20021120/linux/mppe chmod +x mppeinstall.sh ./mppeinstall.sh /usr/src/linux-2.4.18-14 |
cd /usr/src rsync -av --dry-run linux-2.4.18-14/* linux-2.4.18-14.orig/ |
cd /usr/src/ find linux-2.4.18-14 -name "*.orig" -exec rm {} \; rm -f linux-2.4.18-ppp-2.4.2.patch diff --new-file --recursive --unified \ linux-2.4.18-14.orig/drivers/net \ linux-2.4.18-14/drivers/net > \ linux-2.4.18-ppp-2.4.2.patch diff --new-file --recursive --unified \ linux-2.4.18-14.orig/include/linux \ linux-2.4.18-14/include/linux >> \ linux-2.4.18-ppp-2.4.2.patch |
grep +++ linux-2.4.18-ppp-2.4.2.patch more linux-2.4.18-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/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.4.18-14.src.rpm |
cp linux-2.4.18-ppp-2.4.2.patch /usr/src/redhat/SOURCES/ |
cd /usr/src/redhat/SPECS cp kernel-2.4.spec kernel-2.4.spec.orig patch << EOF --- kernel-2.4.spec.orig 2002-11-19 21:57:46.000000000 +1100 +++ kernel-2.4.spec 2002-11-19 22:02:30.000000000 +1100 @@ -27,7 +27,7 @@ # that the kernel isn't the stock RHL kernel, for example by # adding some text to the end of the version number. # -%define release 14 +%define release 14mppe %define sublevel 18 %define kversion 2.4.%{sublevel} # /usr/src/%{kslnk} -> /usr/src/linux-%{KVERREL} @@ -562,6 +562,7 @@ Patch5261: linux-2.4.18-cryptoapi.patch Patch5270: linux-2.4.18-audigy.patch Patch5280: linux-2.4.18-usblcd.patch +Patch5799: linux-2.4.18-ppp-2.4.2.patch # @@ -1494,6 +1495,11 @@ %patch5280 -p1 # +# PPP MPPE support +# +%patch5799 -p1 + +# # debug mmap semaphore recursion deadlocks # by keeping track of who owns what EOF |
Note: this patch also available for errata kernel 2.4.18-24.8.0 thanks to Sean Closson.
|
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.4.18-i586*.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=i586 kernel-2.4.spec |
Note: we've assumed i586 processor type in these instructions. You may need another processor type. Change the references accordingly.
rpm --install /usr/src/redhat/RPMS/i586/kernel-2.4.18-14mppe.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 |
reboot |
modprobe ppp-compress-18 |
The expected output is:
Warning: loading /lib/modules/2.4.18-14mppe/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 | ||
---|---|---|---|
2003-02-21 |
| ||
2003-01-31 |
| ||
2003-01-21 |
Fix the --install to avoid --upgrade. Mention processor type note.
| ||
2003-01-13 |
Warn that kernel source directory must be empty to begin with.
| ||
2002-12-30 |
Explain where to go next after completing the build and install.
| ||
2002-11-29 |
Added process diagram following feedback from people not accustomed to
building from source.
| ||
2002-11-28 |
On kernels on release 18 or later, the SMP config file also needs to
be edited. Minor edits to text, thanks to Jimmy Vance.
| ||
2002-11-22 |
First draft.
|