Mercurial > hg > aboriginal
diff host-tools.sh @ 642:c92dc77da038
Since gene2fs can't produce large images in a reasonable amount of time, make a 64 meg image and resize it if necessary. (This means the minimum image size is 64 megs, because gene2fs won't run unless you specify a size, but it knows right away if the size you gave it wasn't big enough. I don't understand this either.)
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 21 Mar 2009 22:56:15 -0500 |
parents | 065e1a0f6697 |
children | a72f7f70c003 |
line wrap: on
line diff
--- a/host-tools.sh Fri Mar 20 21:52:26 2009 -0500 +++ b/host-tools.sh Sat Mar 21 22:56:15 2009 -0500 @@ -78,7 +78,6 @@ do [ ! -f "${HOSTTOOLS}/$i" ] && (ln -s `PATH="$OLDPATH" which $i` "${HOSTTOOLS}/$i" || dienow) - done # Build toybox @@ -162,6 +161,32 @@ cleanup genext2fs fi +# Build e2fsprogs. + +# Busybox used to provide ext2 utilities (back around 1.2.2), but the +# implementation was horrible and got removed. Someday the new Lua +# toybox should provide these. + +# This mostly isn't used creating a system image, which uses genext2fs instead. +# If SYSIMAGE_HDA_MEGS is > 64, it'll resize2fs because genext2fs is +# unreasonably slow at creating large files. + +# The hdb.img of run-emulator.sh and run-from-build.sh uses e2fsprogs' +# fsck.ext2 and tune2fs. These are installed by default in most distros +# (which genext2fs isn't), and genext2fs doesn't have ext3 support anyway. + +if [ -z "$(which mke2fs)" ] +then + setupfor e2fsprogs && + ./configure && + make -j "$CPUS" && + cp misc/{mke2fs,tune2fs} resize/resize2fs "${HOSTTOOLS}" && + cp e2fsck/e2fsck "$HOSTTOOLS"/fsck.ext2 && + cd .. + + cleanup e2fsprogs +fi + # Squashfs is an alternate packaging option. #if [ ! -f "${HOSTTOOLS}"/mksquashfs ]