changeset 508:909a4921273d

Move genext2fs build to host-tools, remove dead code, add comments.
author Rob Landley <rob@landley.net>
date Sun, 30 Nov 2008 06:20:35 -0600
parents 58e9523a775d
children b4025af91d59
files host-tools.sh package-mini-native.sh
diffstat 2 files changed, 16 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/host-tools.sh	Sun Nov 30 06:18:43 2008 -0600
+++ b/host-tools.sh	Sun Nov 30 06:20:35 2008 -0600
@@ -147,6 +147,20 @@
   fi
 fi
 
+# If the host system hasn't got genext2fs, build it.  We use it to build the
+# ext2 image to boot qemu with in package-mini-native.sh.
+
+if [ -z "$(which genext2fs)" ]
+then
+  setupfor genext2fs &&
+  ./configure &&
+  make -j $CPUS &&
+  cp genext2fs "${HOSTTOOLS}" &&
+  cd ..
+
+  cleanup genext2fs
+fi
+
 # Everything after here is stuff we _could_ build, but currently don't.
 
 # Build squashfs
--- a/package-mini-native.sh	Sun Nov 30 06:18:43 2008 -0600
+++ b/package-mini-native.sh	Sun Nov 30 06:20:35 2008 -0600
@@ -10,29 +10,13 @@
 SYSIMAGE="${BUILD}/system-image-${ARCH}"
 IMAGE="${SYSIMAGE}/image-${ARCH}.ext2"
 
-# If the host system hasn't got genext2fs, build it.  We use it to build the
-# ext2 image to boot qemu with.
-
-if [ -z "$(which genext2fs)" ]
-then
-  setupfor genext2fs &&
-  ./configure &&
-  make -j $CPUS &&
-  cp genext2fs "${HOSTTOOLS}" &&
-  cd ..
-
-  cleanup genext2fs
-fi
-
 # Flush old system-image directory
 
 rm -rf "${SYSIMAGE}"
 mkdir -p "${SYSIMAGE}" &&
 
-# Create a 64 meg sparse image
-
-#dd if=/dev/zero of="$IMAGE" bs=1024 seek=$[64*1024-1] count=1 &&
-#/sbin/mke2fs -b 1024 -F "$IMAGE" &&
+# Generate a 64 megabyte filesystem image from the $NATIVE directory, with a
+# temporary file defining the /dev nodes for the new ext2 filesystem.
 
 cat > "$WORK/devlist" << EOF &&
 /dev d 755 0 0 - - - - -