========================================================= 1. Flash Layout 4Mbytes +-----------------------+ <----0x00000000 | | | MTD1 | | (64K) | +-----------------------+ <----0x00010000 | | | MTD2 | | (64K) | +-----------------------+ <----0x00020000 | | | Ramdisk | | (3015K) | +-----------------------+ <----0x00300000 | | | U-Boot(Loader) | | (64K) | +-----------------------+ <----0x00310000 | | | Linux Kernel | | (983K) | +-----------------------+ <----0x00400000 ============================================================ 2. Modules compilation 1). Building uClibc toolchain tar zxvf uclibc-toolchain-src-20040609.tar.gz cd uclibc-toolchain-src-20040609 cd gcc-3.3.x cd make vi kernel-headers.mk change ==> LINUX_SOURCE:=kernel-headers-2.4.21.tar.bz2 --> LINUX_SOURCE:=kernel-headers-2.4.25.tar.bz2 qw --> save the change and leave vi cd .. make Note: some file may have updated to more new version, if you have any problem to build the toolchain, please try to change the download file version as we do above 2). Building at-3.1.8 tar zxvf at-3.1.8.tar.gz cd at-3.1.8 make clean;make 3). Building bridge-utils-0.9.6 tar zxvf bridge-utils-0.9.6.tar.gz cd bridge-utils make 4) Building busybox-1.00-pre1 tar zxvf busybox-1.00-pre1.tar.gz cd busybox-1.00-pre1 make clean; make 5). Building confuse tar zxvf confuse.tar.gz cd confuse_ppc/ Please refer to the MYREADME.txt file under the confuse_ppc directory,this file teach you how to compile confuse lib. 6). Building dosfstools-2.10 tar zxvf dosfstools-2.10.tar.gz cd dosfstools-2.10 make 7). Building e2fsprogs-1.32 tar zxvf e2fsprogs-1.32.tar.gz cd e2fsprogs-1.32 make clean; make 8). Building goahead tar zxvf goahead.tar.gz cd LINUX/ make 9). Building ImgConvert tar zxvf imgconvert.tar.gz cd imgconvert make clean make 10). Buliding mac-fdisk-0.1.org tar zxvf mac-fdisk-0.1.org.tar.gz cd mac-fdisk-0.1.org make clean; make 11). Building ppclinux tar zxvf ppclinux.tar.gz cd ppclinux ./cv.sh make menuconfig select exit select yes make clean;make dep make pImage 12). Building samba-2.2.8a tar zxvf samba-2.2.8a.tar.gz cd source if want to build share library *************************************************************** * build share library start * *************************************************************** 1.build file Note:--> $RPATH is current work directory cd lib ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC charcnv.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC charset.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC debug.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC fault.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC getsmbpass.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC interface.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC kanji.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC md4.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC interfaces.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC pidfile.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC replace.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC signal.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC system.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC sendfile.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC time.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC ufc.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC genrand.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC username.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC util_getent.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC access.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC smbrun.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC bitmap.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC crc32.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC snprintf.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC wins_srv.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC util_str.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC util_sid.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC util_unistr.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC util_file.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC util.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC util_sock.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC util_sec.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC talloc.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC hash.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC substitute.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC fsusage.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC ms_fnmatch.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC select.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC error.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC messages.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC pam_errors.c cd ../smbd ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC ssl.c cd ../nsswitch ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC wb_client.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC wb_common.c cd ../tdb ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC tdb.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC spinlock.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC tdbutil.c cd ../ubiqx ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC ubi_BinTree.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC ubi_Cache.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC ubi_SplayTree.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC ubi_dLinkList.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC ubi_sLinkList.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC debugparse.c cd ../passdb ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC passdb.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC secrets.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC pass_check.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC smbpassfile.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC machine_sid.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC pdb_smbpasswd.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC pampass.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC pdb_tdb.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC pdb_ldap.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC pdb_nisplus.c cd ../libsmb ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC clientgen.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC cliconnect.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC clifile.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC clirap.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC clierror.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC climessage.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC clireadwrite.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC clilist.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC cliprint.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC clitrans.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC clisecdesc.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC clidgram.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC namequery.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC nmblib.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC clistr.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC nterr.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC smbdes.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC smbencrypt.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC smberr.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC credentials.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC pwd_cache.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC clioplock.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC errormap.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC doserr.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC passchange.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC unexpected.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC namecache.c cd ../rpc_parse ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC parse_prs.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC parse_sec.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC parse_misc.c cd ../param ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC loadparm.c ../libtool --mode=compile $CC -I../popt -I../ -I../include -I../ubiqx -I../smbwrapper -O -c -fPIC -DPIC params.c cd .. ./libtool --mode=link $CC -O -o liblib.la lib/charcnv.lo lib/charset.lo lib/debug.lo lib/fault.lo \ lib/getsmbpass.lo lib/interface.lo lib/kanji.lo lib/md4.lo \ lib/interfaces.lo lib/pidfile.lo lib/replace.lo \ lib/signal.lo lib/system.lo lib/sendfile.lo lib/time.lo \ lib/ufc.lo lib/genrand.lo lib/username.lo lib/util_getent.lo lib/access.lo lib/smbrun.lo \ lib/bitmap.lo lib/crc32.lo lib/snprintf.lo lib/wins_srv.lo \ lib/util_str.lo lib/util_sid.lo \ lib/util_unistr.lo lib/util_file.lo \ lib/util.lo lib/util_sock.lo lib/util_sec.lo smbd/ssl.lo \ lib/talloc.lo lib/hash.lo lib/substitute.lo lib/fsusage.lo \ lib/ms_fnmatch.lo lib/select.lo lib/error.lo lib/messages.lo \ lib/pam_errors.lo nsswitch/wb_client.lo nsswitch/wb_common.lo \ tdb/tdb.lo tdb/spinlock.lo tdb/tdbutil.lo -rpath $RPATH -lm ./libtool --mode=link $CC -O -o libubiqx.la ubiqx/ubi_BinTree.lo ubiqx/ubi_Cache.lo ubiqx/ubi_SplayTree.lo \ ubiqx/ubi_dLinkList.lo ubiqx/ubi_sLinkList.lo ubiqx/debugparse.lo -rpath $RPATH -lm ./libtool --mode=link $CC -O -o libpassdb.la passdb/passdb.lo passdb/secrets.lo \ passdb/pass_check.lo passdb/smbpassfile.lo \ passdb/machine_sid.lo passdb/pdb_smbpasswd.lo \ passdb/pampass.lo passdb/pdb_tdb.lo passdb/pdb_ldap.lo \ passdb/pdb_nisplus.lo -rpath $RPATH -lm ./libtool --mode=link $CC -O -o libsmb.la libsmb/clientgen.lo libsmb/cliconnect.lo libsmb/clifile.lo \ libsmb/clirap.lo libsmb/clierror.lo libsmb/climessage.lo \ libsmb/clireadwrite.lo libsmb/clilist.lo libsmb/cliprint.lo \ libsmb/clitrans.lo libsmb/clisecdesc.lo libsmb/clidgram.lo \ libsmb/namequery.lo libsmb/nmblib.lo libsmb/clistr.lo \ libsmb/nterr.lo libsmb/smbdes.lo libsmb/smbencrypt.lo \ libsmb/smberr.lo libsmb/credentials.lo libsmb/pwd_cache.lo \ libsmb/clioplock.lo libsmb/errormap.lo libsmb/doserr.lo \ libsmb/passchange.lo libsmb/unexpected.lo \ rpc_parse/parse_prs.lo rpc_parse/parse_sec.lo rpc_parse/parse_misc.lo \ libsmb/namecache.lo -rpath $RPATH -lm ./libtool --mode=link $CC -O -o libparam.la param/loadparm.lo param/params.lo -rpath $RPATH -lm 2.copy share library to toolchain library folder powerpc-linux-uclibc ./libs/liblib.so.0.0.0 , libubiqx.so.0.0.0 , libpassdb.so.0.0.0 , libsmb.so.0.0.0 , libparam.so.0.0.0 to 3.go to toolchain library folder powerpc-linux-uclibc/lib do share library link , link -s liblib.so.0.0.0 liblib.so.0 link -s liblib.so.0.0.0 liblib.so link -s libubiqx.so.0.0.0 libubiqx.so.0 link -s libubiqx.so.0.0.0 libubiqx.so link -s libpassdb.so.0.0.0 libpassdb.so.0 link -s libpassdb.so.0.0.0 libpassdb.so link -s libsmb.so.0.0.0 libsmb.so.0 link -s libsmb.so.0.0.0 libsmb.so link -s libparam.so.0.0.0 libparam.so.0 link -s libparam.so.0.0.0 libparam.so *************************************************************** * build share library end * *************************************************************** make clean;make 13). Building tinylogin-1.4 tar zxvf tinylogin-.1.4.tar.gz cd tinylogin-.1.4 make clean;make 14). Building u-boot tar zxvf u-boot.tar.gz chmod -R a+w u-boot cd u-boot ./douboot 15). Building util-linux-2.12pre tar zxvf util-linux-2.12pre.tar.gz cd util-linux-2.12pre make 16). Building wget-LFS tar zxvf wget-LFS.tar.gz cd wget-LFS make clean;make 17). Building wu-ftpd-2.6.2 tar zxvf wu-ftpd.2.6.2.tar.gz cd wu-ftpd-2.6.2 make clean;make 18). Building util-linux-2.12r tar zxvf util-linux-2.12r.tar.gz cd util-linux-2.12r make