changeset 391:2a31ea4d91c7

Move User Mode Linux build to package-mini-native.sh, since that's the only thing that uses it. (This does mean that ./forkbomb.sh might wind up doing a little extra work during the packaging stages, but since each UML build is done in the $ARCH-temp directory and the install is an atomic mv of a single file, it should still be SMP safe.)
author Rob Landley <rob@landley.net>
date Mon, 25 Aug 2008 12:22:39 -0500
parents a9a9eee9e620
children 996b3bfb4d60
files host-tools.sh package-mini-native.sh
diffstat 2 files changed, 27 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/host-tools.sh	Sun Aug 24 19:29:20 2008 -0500
+++ b/host-tools.sh	Mon Aug 25 12:22:39 2008 -0500
@@ -155,30 +155,6 @@
   cleanup distcc
 fi
 
-# As a temporary measure, build User Mode Linux and use _that_ to package
-# the ext2 image to boot qemu with.  (Replace this with toybox gene2fs.)
-
-if [ ! -f "${HOSTTOOLS}/linux" ]
-then
-  setupfor linux &&
-  cat > mini.conf << EOF &&
-CONFIG_BINFMT_ELF=y
-CONFIG_HOSTFS=y
-CONFIG_LBD=y
-CONFIG_BLK_DEV=y
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_STDERR_CONSOLE=y
-CONFIG_UNIX98_PTYS=y
-CONFIG_EXT2_FS=y
-EOF
-  make ARCH=um allnoconfig KCONFIG_ALLCONFIG=mini.conf &&
-  make -j "$CPUS" ARCH=um &&
-  cp linux "${HOSTTOOLS}" &&
-  cd ..
-
-  cleanup linux
-fi
-
 # Everything after here is stuff we _could_ build, but currently don't.
 
 # Build squashfs
--- a/package-mini-native.sh	Sun Aug 24 19:29:20 2008 -0500
+++ b/package-mini-native.sh	Mon Aug 25 12:22:39 2008 -0500
@@ -5,10 +5,37 @@
 
 source include.sh
 
+# We used to do this, but updating the squashfs patch for each new kernel
+# was just too much work.  If it gets merged someday, we may care again...
+
 #echo -n "Creating tools.sqf"
 #("${WORK}/mksquashfs" "${NATIVE}/tools" "${WORK}/tools.sqf" \
 #  -noappend -all-root -info || dienow) | dotprogress
 
+# To avoid the need for root access to run this script, build User Mode Linux
+# and use _that_ to package the ext2 image to boot qemu with.
+
+if [ ! -f "${HOSTTOOLS}/linux" ]
+then
+  setupfor linux &&
+  cat > mini.conf << EOF &&
+CONFIG_BINFMT_ELF=y
+CONFIG_HOSTFS=y
+CONFIG_LBD=y
+CONFIG_BLK_DEV=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_STDERR_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_EXT2_FS=y
+EOF
+  make ARCH=um allnoconfig KCONFIG_ALLCONFIG=mini.conf &&
+  make -j "$CPUS" ARCH=um &&
+  cp linux "${HOSTTOOLS}" &&
+  cd ..
+
+  cleanup linux
+fi
+
 IMAGE="${WORK}/image-${ARCH}.ext2"
 
 # A 64 meg sparse image