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