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