DHT instructions on building Samba for the walnut platform. Samba uses the autoconf set of tools. However, we must specify the cross-compiler and the PPC processor to configure such that it will cross-compile. This is a bit tricker since Samba uses more advanced features of the autoconf tools. 1) start a clean shell. (make sure it does not have LD_LIBRARY_PATH or other shell variables which might affect the build) 2) Unpack the samba tarball if necessary. 3) move the directory it created to xxx-walnut. This will aid in the integration of this to the build hierarchy. (for example: mv samba-version samba-version-walnut) 4) run the configure command with cross-compiling options $ ./configure --target=ppc \ --includedir=/opt/hardhat/devkit/ppc/4xx/powerpc-hardhat-linux/include 4a) The include directory above can of course be altered to point to the headers for the walnut platform, wherever they may reside. 5) cd to the "source" directory 6) alter the Makefile to use ppc_4xx-gcc in the Monta Vista directories 6a) find the line "CC = gcc" 6b) change it to "CC = /opt/hardhat/devkit/ppc/4xx/bin/ppc_4xx-gcc" 6c) (optional) alter the CFLAGS to do better optimization 7) type "make" in the source subdir The trouble I had with Samba was I tried to configure it for a cross compile with the configure script. This worked ok except that the configure scripts build test programs and run them on your machine to see how things work. When I specified the cross compile, many options were set to "cross". Especially damaging where the sizeof() long, int, short, etc, which were left undefined in the resulting configuration. It would probably be better to allow the cross configure to occur and then fill in these values. However, Samba seems to be one of the more stable things we have right now (Thu Jul 26 10:17:30 PDT 2001) so I will leave it at that... ;-)