In order to hack SLOF client applications, the sec-client target must be built in the clients/net-snk subdirectory of the SLOF source tree. Before this can succeed, the CPUARCH environment variable must be set, like this:
$ export CPUARCH=ppc970
$ export CPUARCH=ppc970
$ cd /usr/local/texlive/2007/texmf-dist $ sudo unzip komascript.tds.zip $ sudo texconfig rehash
$ export TARGET=powerpc $ export TARGET_ARCH=powerpc $ make kernel-toolchain $ make buildkernelAddendum: Unfortunately, this procedure works only on architectures already supported by FreeBSD and its build system. Therefore, it doesn't work for me. So here's the full story on how I got FreeBSD to at least compile.
$ export LD_LIBRARY_PATH=$PREFIX/lib
$ export MACHINE=powerpc64 $ export MACHINE_ARCH=powerpc64 $ export CC=${PREFIX}/${TARGET_PREFIX}-gcc $ export NM=${PREFIX}/${TARGET_PREFIX}-nm $ export LD=${PREFIX}/${TARGET_PREFIX}-ld $ export SYSTEM_LD=${LD} $ export OBJCOPY=${PREFIX}/${TARGET_PREFIX}-objcopy $ cd /usr/src/sys/powerpc64/conf $ config KERNCONF $ cd ../compile/KERNCONF $ make cleandepend && make depend $ make kernelOh, of course this doesn't work with the stock FreeBSD sources. Instead, my FreeBSD 64-Bit PowerPC Mercurial repository needs to be used. Note that for convenience reasons, that tree includes a crossenv script which, when sourced, sets up the required environment variables.
$ sudo modprobe tun $ MACADDR=`genmac` $ sudo qemu-system-x86_64 -hda freebsd-7.0.img \ -net nic,macaddr=$MACADDR -net tap,script=qemu-ifupNote that the genmac and qemu-ifup scripts are the examples from the KVM documentation.
# echo 1 > /proc/sys/net/ipv4/ip_forward # iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # iptables -A FORWARD -i eth0 -o tap0 -m state \ --state RELATED,ESTABLISHED -j ACCEPT # iptables -A FORWARD -i tap0 -o eth0 -j ACCEPTAlso, make sure the tap0 interface has an IP address:
$ sudo ifconfig tap0 192.168.0.1/24
$ export CC=ppu-gcc $ makeThis will create the dtc and ftdump tools which can then be copied to the target machine.