0. Install MacOS 9.1 over 9.04 1. I had to shrink MacOS X partition to fit in the first 8GB. ---> It didn't boot at all:-( 2. Software updater automatically updated itself 3. Reinvoke software updater from System Preference then you get MacOS X 10.0.01 update. 4. Invoke Netinfo Manager in Applications/Utilities Select Domain:Security:Authentication Select Domain:Security:Activate Root Account --> You need to supply root passwd 5. Now check if I can move around mach_kernel Yep. The kernel has been updated but rebooted OK. 6. Install Developer kit Just double-click the package icon. That's it. 7. Temporary Setting of SSH # vi /etc/hostconfig ..... SSHSERVER=-YES- ..... # vi /etc/sshd_config ..... Protocol 2,1 ..... # vi /etc/ssh_config ..... Hosts * ForwardX11 yes ..... 8. Temporary Installation of bash # tar -zxvf bash-2.03-bin.tar.gz -C / # mv /usr/local/bin/bash /bin/ Then make /bin/bash as my default shell for Terminal. 9. Temporary Installation of rpm # tar -zxvf rpm-4.0.2-bin.tar.gz -C / # rpm --initdb 10. Rebuild bash # cd /usr/local/src/apple/SPECS # rpm -i /bash-2.03-1.src.rpm # vi bash.spec .... Release: 1a .... # rpm -ba bash.spec # rpm -ivh ../RPMS/ppc/bash-2.03-1a.ppc.rpm 11. Preparation for RPM 11.5 Csu is needed to allow -static for rpm building Building of Csu requires cctools's indr, and cctools requires Libstreams's streams/streams.h and Libc's architecture/ppc/processor_facilities.h and libc.a but cctools needs ctr0.o contained in Csu:-( cctools also requires libm_static and libcc.a:-( 11.5a Libstream: Get src tarball from ADC's Darwin 1.3.1 site # cd /usr/local/src/apple/SPECS # rpm -ba libstreams.spec # rpm -ivh ../RPMS/ppc/Libstreams-22-1a.ppc.rpm 11.5a' Get src tarball from ADC's Darwin 1.3.1 site # rpm -ba libm.spec # rpm -ivh ../RPMS/ppc/Libm-devel-18-1a.ppc.rpm 11.5b Libc: Get src tarball from ADC's Darwin 1.3.1 site # cd Libc-167 # make install DSTROOT=`pwd`/tmp # cd tmp # mkdir -p tmp/usr # cd tmp # cp -pPR ../usr/local usr/ # cp -pPR ../System . # ln -s B System/Library/Frameworks/System.framework/Versions/Current # ln -s Versions/Current/PrivateHeaders System/Library/Frameworks/System.framework/. # cd .. # tar -zcvf ../../../../tgz/Libc-167-1-bin.tar.gz . # tar -zxvf ../../../../tgz/Libc-167-1-bin.tar.gz -C / # cd ../.. 11.5c indr in cctools Get src tarball from ADC's Darwin 1.3.1 site # bash # cd cctools-7 # export RC_ARCHS=ppc # export RC_CFLAGS='-arch ppc' # export RC_OS='macos' # export TARGETS=ppc # export HOSTS=ppc # export SRCROOT=`pwd` # export OBJROOT=$SRCROOT/BUILD/obj # export SYMROOT=$SRCROOT/BUILD/sym # export DSTROOT=$SRCROOT/BUILD/dst # mkdir -p BUILD/{obj,sym,dst} # make install # cp -P BUILD/dst/usr/local/bin/indr /usr/local/bin # exit 11.5d Csu Get src tarball from ADC's Darwin 1.3.1 site # pushd /usr/local/src/apple/SPECS # rpm -ba libstreams.spec # rpm -ivh ../RPMS/ppc/Libstreams-22-1a.ppc.rpm # popd 11.5e Back to cctools # bash # cd cctools-7 # export RC_ARCHS=ppc # export RC_CFLAGS='-arch ppc' # export RC_OS='macos' # export TARGETS=ppc # export HOSTS=ppc # export SRCROOT=`pwd` # export OBJROOT=$SRCROOT/BUILD/obj # export SYMROOT=$SRCROOT/BUILD/sym # export DSTROOT=$SRCROOT/BUILD/dst # mkdir -p BUILD/{obj,sym,dst} # make install ... /usr/bin/ld: can't locate file for: -lcc Gave up for now. I shall return to this after installing gcc-with-g77 which has libcc.a:-( ---> OK, it worked after putting libcc.a # tar -zcvf ../../../tgz/cctools-353-7-local.tar.gz -C BUILD/dst usr/local # tar -zxvf ../../../tgz/cctools-353-7-local.tar.gz -C / 12. g77 Get src tarball from ADC's Darwin 1.3.1 site $ tar -zxvf gcc-926-3.tar.gz $ mv gcc-3 gcc-2.95.2-g77 $ tar -zxvf patches/gcc-2.95.2-g77.tar.gz $ cd gcc-2.95.2-g77/ $ patch -p1 -s < ../patches/gcc-2.95.2-macosx-rel.patch $ export RC_ARCHS=ppc $ export RC_CFLAGS='-arch ppc' $ export RC_OS='macos' $ export TARGETS=ppc $ export HOSTS=ppc $ export SRCROOT=`pwd` $ make >& make.log & $ make install >& install.log & $ cp libio/stream.h libio/stdiostream.h dst/usr/include/gcc/darwin/2.95.2/g++/ $ patch -p1 -s < ../patches/gcc-2.95.2-libg2c.patch $ cd gcc $ for i in ../obj/cc-ppc-on-ppc/*.h; do ln -s $i .; done $ cd .. $ mkdir obj/ppc/libf2c $ pushd obj/ppc/libf2c $ CFLAGS='-traditional-cpp' $SRCROOT/libf2c/configure --srcdir=$SRCROOT/libf2c --host=ppc --target=ppc $ make $ cp -pP libg2c.a ../../../dst/usr/lib/gcc/darwin/2.95.2/ $ popd $ patch -p1 -s < ../patches/gcc-2.95.2-libg2c-static.patch $ pushd obj/ppc/libf2c $ make distclean $ CFLAGS='-traditional-cpp' $SRCROOT/libf2c/configure --srcdir=$SRCROOT/libf2c --host=ppc --target=ppc $ make $ cp -pP libg2c.a ../../../dst/usr/lib/gcc/darwin/2.95.2/libg2c_static.a $ cp g2c.h ../../../dst/usr/include/gcc/darwin/2.95.2/ $ ln -s gcc/darwin/2.95.2/g2c.h ../../../dst/usr/include/. $ ln -s gcc/darwin/default/libg2c.a ../../../dst/usr/lib/libg2c.a $ ln -s gcc/darwin/default/libg2c_static.a ../../../dst/usr/lib/libg2c_static.a $ cd ../../cc-ppc-on-ppc/ $ cp g77 ../../dst/usr/bin/f77 $ cp f771 ../../dst/usr/libexec/gcc/darwin/ppc/2.95.2/ $ su # cd ../../dst # chown -R root:wheel usr # pushd usr/bin # ln -s c++ g++ # ln -s cc gcc # ln -s f77 g77 # popd # gnutar -zcvf /gcc-cvs20010413-with-g77-bin.tar.gz usr/ 13. Rebuild rpm What kind of flags do we need to create dylib? For compiling, try cc -arch "ppc" -fsigned-char -O2 -fno-common -c xxx.c For linking, try cc -arch "ppc" -dynamiclib -undefined suppress \ -install_name xxx.dylib -o xxx.dyliB 13.0) List up dylib in /usr/lib # ls /usr/lib/lib*.dylib > dylib.list 13.1) gettext # rpm -i /gettext-0.10.35-1.src.rpm # vi gettext.spec .... Release: 1a .... %ifos darwin CFLAGS="-traditional -D__GNUC__ ..." %else .. %endif # rpm -ba gettext.spec # rpm -ivh ../RPMS/ppc/gettext-0.10.35-1a.ppc.rpm 13.2) db3 Added ltconfig patch to allow dylib creation # rpm -ba db3.spec # rpm -ivh ../RPMS/ppc/db3*-3.2.9-1a.ppc.rpm 13.3) rpm Fix /etc/mnttab problem lib/fs.c MOUNTED=/etc/mnttab getmntinfo? chown symlink problem lib/cpio.c gawk problem /usr/lib/lib*.dylib handling 14. Libcompat Added ltconfig patch to allow dylib creation # rpm -ba libcompat.spec # rpm -ivh ../RPMS/ppc/libcompat-14.1-1a.ppc.rpm