The Crocodile project aims to cross-compile Debian from scratch by using Scratchbox. These build scripts work with Debian Sarge packages and require darcs version of Scratchbox (or Scratchbox 1.0.2). "lib" directory contains new, improved build scripts (that are still work in progress and don't work). See the Python scripts for documentation. "unplanned-build.sh" is the current, iterative build script, that doesn't attempt to sort build depencies - it just keeps trying compiling sources until there is two rounds where no new source has succeeded to compile, or everything has been compiled. This approach has the main advantage of being a lot more simple than tha full build dependency analysis. And you really can't do proper build dependency analysis, since the dependencies generated when compiling might be different than the ones that have been analyzed. Usage: Create a new target in sbox with debian,doctools and perl devkit. put sarge in /etc/apt/sources.list deb-src http://ftp.debian.org/debian sarge main Download all the sources you want to build into a selected direcotry. For example to emulate the old "build essential" plan: apt-get source -d acl attr base-files base-passwd bash bc bzip2 chrpath coreutils cpio cracklib2 db1-compat db3 db4.2 debianutils diffutils dpkg e2fsprogs findutils fribidi gdbm grep gzip hostname libcap libselinux libsepol makedev mawk modutils ncurses netbase pam perl procps readline4 sed shadow slang sysvinit tar tcl8.3 tcl8.4 util-linux zlib Glibc and gcc package will come from the toolchain, so you can remove them if some dependency pulled them. next create Sources.gz (this might output a warning, ignore it) dpkg-scansources . /dev/null|gzip>Sources.gz unplanned-build.sh will build all sources found in deb-src repos, so only put repos you actually want to build into crocodile/etc/sources.list . For the basic usecase, it is enough to to have *only* the following in crocodile/etc/sources.list deb-src file:/home/xxxx/yyyy ./ where xxxx is user account and yyyyy the directory where you downloaded packages. go to the crocodile directory, and run ./unplanned-build.sh --clean And wait =) work/build directory will be filled with freshly crosscompiled bas distro. After this works, you can put the sources you actually need for your project to the sources directory. If it doesn't work, see the output.log and build.log