]> arthur.barton.de Git - netatalk.git/blob - doc/README.platforms
Forward-Ports from the stabilizing branch.
[netatalk.git] / doc / README.platforms
1 This is a README for the major platforms where Netatalk is in use. 
2
3 Platforms Covered:
4 A.   Linux
5 B.   Tru64
6 C.   Solaris
7 D.I  OpenBSD
8 D.II Other BSDs
9 E.   SunOS
10 F.   Generic
11
12 ----------------------------------------------------------------
13
14 A. Linux
15
16 We no longer include linux kernel code with netatalk, since Linux now
17 includes AppleTalk support.
18
19 1.  MAKE CONFIG.  Configure your kernel with "make config".  Answer yes
20     to "AppleTalk DDP" support.
21
22 2.  INSTALL KERNEL.  Make and install your kernel.  Be sure to update
23     your boot blocks!
24
25 3.  Linux 2.2.x provides the sendfile() call. This reduces overhead
26     when sending/copying files. This option will be autoconfigured on
27     compile. NOTE: you might run into problems if you have this option
28     compiled in and you switch to a machine running an os < 2.2.x.
29
30
31 Netatalk supplies two different types of Appletalk servers and both
32 can run at the same time. Classic Appletalk requires afpd and
33 atalkd. Appletalk over IP only requires afpd.
34
35 Classic Appletalk on GNU/Linux requires that CONFIG_ATALK is compiled
36 into the kernel or as a kernel module. To check to see if the kernel
37 has Appletalk installed:
38
39 $> dmesg | grep Apple
40 This just parses the boot messages for any line containing
41 'Apple'.
42
43 To see all the  loaded modules (as root):
44 $> lsmod
45
46 If you don't find it, you may have to compile a kernel and turn on
47 Appletalk in Networking options -> Appletalk DDP. You have an option
48 to install as a module or directly into the kernel.
49
50 Some default distribution kernels have already compiled Appletalk DDP
51 as a module, you may have to edit your /etc/modules.conf to include:
52 "alias net-pf-5 appletalk ".
53
54 Note: check your distribution documentation about editing
55 /etc/modules.conf.
56
57 For more complete information about the Linux kernel see the
58 Kernel-HOWTO:
59 http://www.linuxdoc.org/HOWTO/Kernel-HOWTO.html
60
61 ----------------------------------------------------------------
62
63 B. TRU64
64
65 This is the Tru64 README file for netatalk.
66
67 1.  Unfortunately, AppleTalk is not available for Digital Unix or Tru64.
68     The reason for this is the kernel patches which Netatalk requires
69     cannot be ported to Tru64. If anyone has the kernel source of Tru64
70     they are welcomed to port the AppleTalk modules themselves.
71
72     As a result, only AppleShare over IP (ASIP) works with Tru64. That
73     is, the program afpd. papd and atalkd compile, but doesn't really
74     work. Anything that requires AppleTalk doesn't work.
75
76 2.  Netatalk compiles on Tru64 V4.0D or higher using either the built-in
77     DEC C compiler or GCC V2.95.3. Also, either the Tru64 make command or
78     GNU make can be used. Netatalk supports Tru64's Security Integration
79     Architecture (SIA) and runs on machines configured for Base (BSD) or
80     Enhanced (OSFC2) Security without recompilation.
81
82 3.  A peculiar bug in Netatalk has been noticed on a single Tru64
83     machine. However, because other Tru64 machines have not affected, a
84     patch will not be forthcoming until the circumstances where the bug
85     hits is isolated and a more elegant and appropriate patch can be
86     found. In the meantime, there is a description of the bug below. Any
87     users affected can attempt the workarounds provided. The user is
88     urged to report this to the mailing list so that this bug can be
89     isolated and removed.
90
91     HAVE_GCC_MEMCPY_BUG
92     Description -
93        It appears that memcpy() under Tru64 can fail under some
94     circumstances. This maybe due to the fact that Netatalk is compiled
95     with gcc, but since only gcc can compile Netatalk, this is a mute
96     point.
97
98     Symptoms -
99        The symptoms of this bug is that a 18432 byte file uploaded to
100     the server would upload correctly, but a 18433 byte file would
101     result in a sparse file many megabytes big (16MB+). However, due to
102     the low-level nature of memcpy(), there is no reason why other
103     symptoms could not occur.
104
105     Workarounds -
106        There are two known workarounds at this stage.
107     - The first is to #define the macro HAVE_GCC_MEMCPY_BUG. This forces
108     netatalk to use bcopy() in a few (but not all) cases within the code
109     and is enough to stop the bug from occurring. This is the easiest
110     workaround and would merely alter the standard compilation steps to
111
112     ./configure --with-cflags="-DHAVE_GCC_MEMCPY_BUG"
113     make
114     make install
115
116     - The second workaround is to manually remove the optimisation flag
117     "-O2" from within configure and/or configure.in. Although, this
118     isn't the preferred workaround, it shows that the compiler is
119     (at least) partially at fault.
120
121 ----------------------------------------------------------------
122
123 C. SOLARIS
124
125 1.  SELECT COMPILER.  This distribution is configured to build with
126     gcc.  It should also work with cc. At the present time only cc
127     v5.0 and above can build the 64-bit kernel module.
128
129 1a. SELECT KERNEL TYPE.  Edit sys/solaris/Makefile.kernel and set KCFLAGS
130      to include sparcv9 support if you run a 64-bit kernel, or leave it
131      commented out for a 32-bit kernel. Only UltraSPARC systems
132      running Solaris 7 and above support a 64-bit kernel. If you're
133      not sure what kernel you use, run "isainfo -v". You're running a
134      64-bit kernel if the result includes 64-bit (sparcv9), otherwize
135      it's 32-bit.
136
137      NOTE: If you want both the 32-bit and 64-bit kernel modules to be
138      installed, first compile and install the version appropriate to
139      the kernel that you're currently running, then make clean,
140      compile and install the other version.
141
142 2.  EDIT NETCONFIG.  Add the following line to /etc/netconfig:
143
144         ddp tpi_clts - appletalk ddp /dev/ddp -
145
146     This makes the socket library aware of the AppleTalk protocol
147     family.
148
149 3.  INSTALL DRIVER.  Since the STREAMS ddp driver must be installed as
150     root, we've separated that portion of the build.  Type
151
152         make -f Makefile.kernel kinstall
153
154     to install the driver.  This copies the driver and its config file
155     into /usr/kernel/drv and /usr/kernel/strmod, runs "add_drv ddp" to
156     make the kernel aware of the new driver, and adds an rc file to
157     /etc/rc?.d. Watch out for error messages after it runs  add_drv.
158     If you see something like
159       devfsadm: driver failed to attach: ddp
160       Warning: Driver (ddp) successfully added to system but failed to attach
161     then recheck sys/solaris/Makefile.kernel and/or try a different
162     compiler.
163
164 4.  ATALKD.CONF.  Under Solaris, you must create atalkd.conf, since
165     Solaris provides no method for determining the names of the
166     available interfaces.  It is sufficent to name the available
167     interfaces in atalkd.conf, one per line.  E.g.
168
169         le0
170
171     on a line by itself on many Suns. hme0 on Ultras.  See atalkd(8).
172
173 5.  PRINTING.  Netatalk can use any postscript printer that has been set
174     up for use by Solaris. If you haven't already set up a printer,
175     type admintool then select Browse --> Printers, and then Edit --> Add
176     and fill in the form for either a local or remote printer. If adding
177     a local printer, set the Printer Type to PostScript. Then find a
178     postscript file and test your printer from the command line. For
179     example if you created a printer called "fred" your print command
180     would be something like:  lp -d fred some_file.ps
181
182     Once you have a printer that works under Solaris, you need to create
183     a papd.conf file. For example
184
185       MacLaserjet:\
186           :pr=|/usr/bin/lp -d fred:\
187           :op=nobody:\
188           :pd=/usr/local/etc/HPLJ_4M.PPD:
189
190     See doc/CONFIGURE for more information on papd.conf.
191     Once you have this set up, and assuming netatalk starts up after
192       /etc/rc2.d/S79atalk start
193     you should be able to see the printer from the Macintosh Chooser.
194
195 ----------------------------------------------------------------
196
197 D.I OpenBSD
198
199 1.  KERNEL SUPPORT. Note that kernel support for netatalk appears in
200     OpenBSD 2.2,  or openbsd-current dated after Aug 1, 1997. But the
201     'comment out' character must be removed and the kernel must be
202     recompiled.
203
204     The kernel file that needs to be edited is usually located in:
205     /usr/src/sys/conf
206
207     Remove the first comment (#) from this line:
208     # option          NETATALK        # AppleTalk
209
210     Generally this is the GENERIC kernal. If you decide to rename 
211     the kernel, don't forget to go to 
212     /usr/src/sys/arch/<your arch>/conf/NEWNAME, and change the 
213     ../../../conf/GENERIC line to your NEWNAME. See 
214     http://www.openbsd.org/faq/faq5.html for more information on 
215     compiling a new kernel.
216
217 2.  STARTING NETATALK. The rc scripts that come with openbsd to
218     start netatalk are specific to an older version of netatalk.
219     So, if you use the initscript provided in a current netatalk's
220     distrib/initscripts directory, you must either add the lines
221     from rc.atalk.bsd by hand into /etc/rc.local (or wherever you
222     want to launch the daemons from) or modify your /etc/rc.local
223     file to read: 
224
225     (currently says)
226
227     # Netatalk stuff
228     if [ -f /etc/netatalk/rc.atalk ]; then
229             . /etc/netatlk/rc.atalk
230     fi
231
232     (change to) 
233
234     # Netatalk stuff
235     if [ -f /etc/rc.atalk ]; then
236             . /etc/rc.atalk
237     fi
238
239     and copy netatalk/distrib/initscripts/rc.atalk.bsd to /etc/rc.atalk.
240
241 D.II Other BSDs
242
243 1.  KERNEL SUPPORT. Note that kernel support for netatalk appears in
244     FreeBSD 2.2-current dated after 12 September 1996.
245
246     Add the line
247
248         options NETATALK
249
250     to the config file for your kernel.  Rebuild and install your
251     kernel.  Reboot.
252
253 ----------------------------------------------------------------
254
255 E. SunOS
256
257 1.  KERNEL MODULE. This version of netatalk requires that your kernel
258     be configured with
259
260         options VDDRV
261
262     The loadable kernel module is made and installed during the normal
263     make and make install.  NOTE:  Unloading the kernel module may not
264     work correctly and may cause your kernel to panic, hang, or do
265     other nasty things.
266
267 ----------------------------------------------------------------
268
269 F. Generic
270
271 (It's unknown how applicable this is compared to the current codebase)
272
273     The generic system profile is for use on systems that don't have native
274     appletalk support. For those systems, it should still be possible to get
275     the AFP/tcp portion of netatalk to still work.
276     
277     To do that, you will need the following information:
278
279         1) Endian order: If your machine does not specify the
280            byte-order in netinet/in.h, you may need to modify
281            netatalk/endian.h.
282
283         2) Integer sizes: If your machine does not define intX_t and
284            u_intX_t, you will need to define them in
285            netatalk/endian.h. To ease matters, you can specify
286            _ISOC9X_SOURCE if you have inttypes.h, HAVE_64BIT_LONGS for
287            64 bit machines, or HAVE_32BIT_LONGS for 32 bit
288            machines. NOTE: you should only use HAVE_32/64BIT_LONGS on
289            machines that don't have a header file somewhere with the
290            integer sizes. If you have a file with all the relevant
291            bits, modify netatalk/endian.h to include it.
292
293         3) Quota/statfs information: You may be able to get away with
294            either BSD4_4 or __svr4__, but that's unlikely if your os
295            is some bizarre hybrid. If you don't have quota support,
296            just specify NO_QUOTA_SUPPORT. In addition, if you'll need
297            to specify the include file that gets statfs() (usually
298            either USE_VFS_H or USE_STATFS_H although BSD4_4 and
299            __svr4__ bring in a set of include files for that). Look at
300            etc/afpd/quota.c, unix.c, and unix.h for more information.
301            Finally, if you have a really old version of rquota, you
302            can define USE_OLD_RQUOTA as well.
303
304         4) path information for lock/spool/printer files. you'll need
305            to specify -D_PATH_LOCKDIR if include/atalk/paths.h doesn't
306            have the correct paths specified for printer info and lock
307            files. 
308
309     Beyond that, you should make sure that your operating system looks and
310     smells like a Un*x POSIXy operating system. The only operating systems
311     that netatalk supports that don't quite fit that description are
312     sunos 4 and ultrix. If your operating system is peculiar, you may need
313     to add in compatibility routines (libatalk/compat,
314     include/atalk/compat.h) to make it look more like the others. 
315     
316     If you would like native AppleTalk support, you will need kernel support 
317     for your operating system. Look at the Solaris STREAMS module if your
318     operating system supports that framework. Otherwise, look at the ddp
319     code in FreeBSD, NetBSD, or OpenBSD if your operating system is BSDish
320     in nature. If your operating system looks different than these two
321     cases, you'll have to roll your own implementation.