view @ 126:f4b9df875c0e

Added tag 0.2.0 for changeset 2dd9f480ff4e
author Rob Landley <>
date Tue, 06 Mar 2007 15:09:18 -0500
parents d9dae1196ea7
children fec886bc24b9
line wrap: on
line source


# Create an ext2 root filesystem image


#echo -n "Creating tools.sqf"
#("${WORK}/mksquashfs" "${NATIVE}/tools" "${WORK}/tools.sqf" \
#  -noappend -all-root -info || dienow) | dotprogress

# A 256 meg sparse image
rm -f "$IMAGE"
dd if=/dev/zero of="$IMAGE" bs=1024 seek=$[256*1024-1] count=1 &&
/sbin/mke2fs -b 1024 -F "$IMAGE" &&

# User User Mode Linux to package this, until toybox mke2fs is ready.

# Write out a script to control user mode linux
cat > "${WORK}/" << EOF &&
mount -n -t ramfs /dev /dev
mknod /dev/loop1 b 7 1
# Jump to build dir
echo copying files...
cd "$BUILD"
losetup /dev/loop1 "$IMAGE"
mount -n -t ext2 /dev/loop1 "$WORK"
tar cC "$NATIVE" tools | tar xC "$WORK"
mkdir "$WORK"/dev
mknod "$WORK"/dev/console c 5 1
umount "$WORK"
losetup -d /dev/loop1
umount /dev
chmod +x ${WORK}/ &&
linux rootfstype=hostfs rw quiet ARCH=${ARCH} PATH=${PATH} init="${HOSTTOOLS}/oneit -p ${WORK}/"