]> git.ozlabs.org Git - ppp.git/blob - README.bsd
*** empty log message ***
[ppp.git] / README.bsd
1 Installation instructions for installing ppp-2.2 on FreeBSD and
2 NetBSD systems.
3
4 This package supports NetBSD-1.0 and FreeBSD-2.0.  It should work
5 on later systems (it works on NetBSD-current as of this writing).
6 Modloading is not yet supported.
7
8 I have code which should work on earlier systems (386BSD, NetBSD-0.9,
9 FreeBSD-1.1.5.1, etc.), but it is not included in this package because
10 I have no way to test or support it.  If you are committed to one of
11 these earlier versions and you are willing to try out some code
12 without needing major hand-holding, contact me (paulus@cs.anu.edu.au).
13
14 To install PPP, you need to rebuild your kernel to include the latest
15 version of the PPP driver, as well as compiling and installing the
16 user-level applications: pppd, pppstats and chat.  The user-level
17 applications can be compiled and installed either before or after you
18 reboot with the new kernel (you'll have to reboot with the new kernel
19 before you can run them, of course).
20
21 The following commands should compile and install the user-level
22 applications (in the ppp-2.2 directory):
23
24         ./configure
25         make
26         make install            (you need to be root for this)
27
28 The process of updating the kernel source files is now largely
29 automated.  In the ppp-2.2 directory, issue the command:
30
31         make kernel
32
33 (you probably need to be root for this).  This will copy new versions
34 of several files into /sys, patch other files, and finally give you
35 instructions about modifying your kernel configuration file (if
36 necessary), rebuilding the kernel and rebooting.
37
38 If you want to do the process by hand, read on...
39
40
41 Updating the kernel ppp code.
42 -----------------------------
43
44 You need to update several files in the /sys/net directory, and patch
45 some other files under /sys.
46
47 For NetBSD-1.0, copy the following files to /sys/net:
48
49         net/if_ppp.h
50         net/ppp-comp.h
51         net/ppp_defs.h
52         netbsd/bsd-comp.c
53         netbsd/if_ppp.c
54         netbsd/if_pppvar.h
55         netbsd/netisr.h
56         netbsd/ppp_tty.c
57         netbsd/slcompress.c
58         netbsd/slcompress.h
59
60 You then need to patch /sys/conf/files and /sys/conf/files.newconf
61 using the commands:
62
63         patch -p -N -d /sys/conf <netbsd/files.patch
64         patch -p -N -d /sys/conf <netbsd/files.newconf.patch
65
66 The next step is to patch the file containing the code which
67 dispatches software interrupts.  Unfortunately, this code is in the
68 architecture-dependent files, so the file to patch depends on which
69 NetBSD port you are using:
70
71 Port    File to patch                      Patch file
72 ----    -------------                      ----------
73 amiga   /sys/arch/amiga/amiga/machdep.c    netbsd/arch/amiga/machdep.c.patch
74 hp300   /sys/arch/hp300/hp300/machdep.c    netbsd/arch/hp300/machdep.c.patch
75 i386    /sys/arch/i386/isa/icu.s           netbsd/arch/i386/icu.s.patch
76 mac68k  /sys/arch/mac68k/mac68k/machdep.c  netbsd/arch/mac68k/machdep.c.patch
77 pc532   /sys/arch/pc532/pc532/locore.s     netbsd/arch/pc532/locore.s.patch
78 pmax    /sys/arch/pmax/pmax/trap.c         netbsd/arch/pmax/trap.c.patch
79 sparc   /sys/arch/sparc/sparc/intr.c       netbsd/arch/sparc/intr.c.patch
80 sun3    /sys/arch/sun3/sun3/isr.c          netbsd/arch/sun3/isr.c.patch
81
82 To do the patch, you would use a command something like this:
83
84         patch -p -d /sys/arch/i386/isa <netbsd/arch/i386/icu.s.patch
85
86
87 For FreeBSD-2.0, copy the following files to /sys/net:
88
89         net/if_ppp.h
90         net/ppp-comp.h
91         net/ppp_defs.h
92         freebsd-2.0/bsd-comp.c
93         freebsd-2.0/if_ppp.c
94         freebsd-2.0/if_pppvar.h
95         freebsd-2.0/ppp_tty.c
96         freebsd-2.0/pppcompress.c
97         freebsd-2.0/pppcompress.h
98
99 You then need to patch /sys/conf/files using the command:
100
101         patch -p -N -d /sys/conf <freebsd-2.0/files.patch
102
103
104 Configuring and making the new kernel.
105 --------------------------------------
106
107 First, make sure that the configuration file you are using includes a
108 line something like
109
110         pseudo-device ppp 2
111
112 If it doesn't, add one.  The `2' is the number of ppp interfaces to
113 configure, that is, the maximum number of simultaneous ppp connections
114 you will be able to have; change it as required.
115
116 Next, run config or config.new in the directory containing the
117 configuration file, giving the configuration file name as an argument.
118 Then cd to the compilation directory and make the kernel.  For the
119 i386 port of NetBSD, with a configuration file called CONF, this
120 involves the following commands:
121
122         cd /sys/arch/i386/conf
123         /usr/sbin/config CONF
124         cd ../compile/CONF
125         make
126
127 For FreeBSD, the commands are similar except for different
128 directories:
129
130         cd /sys/i386/conf
131         /usr/sbin/config CONF
132         cd ../../compile/CONF
133         make
134
135 The result should be a new kernel image (usually called `netbsd' under
136 NetBSD, `kernel' under FreeBSD).  Save a copy of the kernel image
137 you're currently using, copy the new kernel image file to /, and
138 reboot.