summaryrefslogtreecommitdiff
path: root/release
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1997-06-24 21:15:49 +0000
committerMiles Bader <miles@gnu.org>1997-06-24 21:15:49 +0000
commit806e3eefdcef50ce8131878b6308f16c78a1b90a (patch)
tree4ee9901059977932b98b2d493cfe648ed568e74d /release
parent3300bd484965e9a0ad133721f7b0c7efff1ee3d4 (diff)
Initial checkin
Diffstat (limited to 'release')
-rw-r--r--release/bfloppy-special.copy1
-rw-r--r--release/bfloppy.boot14
-rw-r--r--release/bfloppy.copy12
-rw-r--r--release/mkfsimage.sh330
-rw-r--r--release/rfloppy.copy169
5 files changed, 526 insertions, 0 deletions
diff --git a/release/bfloppy-special.copy b/release/bfloppy-special.copy
new file mode 100644
index 00000000..69ae66d7
--- /dev/null
+++ b/release/bfloppy-special.copy
@@ -0,0 +1 @@
+rename boot/servers.boot copy bfloppy.boot
diff --git a/release/bfloppy.boot b/release/bfloppy.boot
new file mode 100644
index 00000000..3766920b
--- /dev/null
+++ b/release/bfloppy.boot
@@ -0,0 +1,14 @@
+# Boot script file for booting GNU Hurd from a boot floppy. Each line
+# specifies a file to be loaded by the boot loader (the first word), and
+# actions to be done with it.
+
+# First, the bootstrap filesystem. It needs several ports as arguments,
+# as well as the user flags from the boot loader.
+/hurd/ufs.static.gz --bootflags=${boot-args} --host-priv-port=${host-port} --device-master-port=${device-port} --exec-server-task=${exec-task} -Tgunzip:device ${root-device} $(task-create) $(prompt-task-resume)
+
+# Now the exec server; to load the dynamically-linked exec server program,
+# we have the boot loader in fact load and run ld.so, which in turn
+# loads and runs /hurd/exec. This task is created, and its task port saved
+# in ${exec-task} to be passed to the fs above, but it is left suspended;
+# the fs will resume the exec task once it is ready.
+/lib/ld.so.1.gz /hurd/exec $(exec-task=task-create)
diff --git a/release/bfloppy.copy b/release/bfloppy.copy
new file mode 100644
index 00000000..8b7fefa7
--- /dev/null
+++ b/release/bfloppy.copy
@@ -0,0 +1,12 @@
+mkdir boot
+mkdir hurd
+mkdir lib
+mkdir boot/grub
+gzip objcopy boot/gnumach
+gzip objcopy boot/serverboot
+gzip objcopy lib/ld.so.1
+gzip objcopy hurd/ext2fs.static
+copy boot/grub/menu.lst
+copy boot/grub/stage1
+copy boot/grub/stage2
+copy boot/grub/ffs_stage1_5
diff --git a/release/mkfsimage.sh b/release/mkfsimage.sh
new file mode 100644
index 00000000..688d39c5
--- /dev/null
+++ b/release/mkfsimage.sh
@@ -0,0 +1,330 @@
+#!/bin/sh
+# Make a filesystem image
+#
+# Copyright (C) 1997 Free Software Foundation, Inc.
+# Written by Miles Bader <miles@gnu.ai.mit.edu>
+# This file is part of the GNU Hurd.
+#
+# The GNU Hurd is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2, or (at
+# your option) any later version.
+#
+# The GNU Hurd is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+#
+
+USAGE="\
+Usage: $0 [OPTION...] IMAGE-FILE SRC..."
+TRY="Try "\`"$0 --help' for more information"
+
+MAX_SIZE=1440 # size of floppy
+MIN_SIZE=500 # avoid lossage for compressed filesystems
+
+unset IMAGE SRCS COMPRESS SCRIPTS QUIET
+declare -a SRCS SCRIPTS
+
+NUM_SRCS=0
+NUM_SCRIPTS=0
+
+while :; do
+ case "$1" in
+ --compress) COMPRESS=yes; shift 1;;
+ --fstype=*) FSTYPE="`echo "$1" | sed 's/^--fstype=//'`"; shift 1;;
+ --fstype) FSTYPE="$2"; shift 2;;
+ --mkfs=*) MKFS="`echo "$1" | sed 's/^--mkfs=//'`"; shift 1;;
+ --mkfs) MKFS="$2"; shift 2;;
+ --fstrans=*) FSTRANS="`echo "$1" | sed 's/^--fstrans=//'`"; shift 1;;
+ --fstrans) FSTRANS="$2"; shift 2;;
+ --max-size=*) MAX_SIZE="`echo "$1" | sed 's/^--max-size=//'`"; shift 1;;
+ --max-size) MAX_SIZE="$2"; shift 2;;
+ --quiet|-q|-s) QUIET=yes; shift 1;;
+ --copy=*|--copy-rules=*) SCRIPTS[NUM_SCRIPTS]="`echo "$1" | sed 's/^--[-a-z]*=//'`"; let NUM_SCRIPTS+=1; shift 1;;
+ --copy|--copy-rules) SCRIPTS[NUM_SCRIPTS]="$2"; let NUM_SCRIPTS+=1; shift 2;;
+
+ --version)
+ echo "STANDARD_HURD_VERSION_mkfsimage_"; exit 0;;
+ --help)
+ echo "$USAGE"
+ echo "Make a file-system image IMAGE-FILE from the files in SRC..."
+ echo ''
+ echo "\
+ --copy-rules=FILE Copy files in a manner described by FILE
+
+ --compress Compress the final image
+ --max-size=KBYTES Maximum size of final image (default $MAX_SIZE)
+
+ --fstype=TYPE Type of filesystem (TYPE may be "\`"ext2' or "\`"ufs')
+ --mkfs=PROGRAM Program to make an empty filesystem image
+ --fstrans=PROGRAM File system translator program
+
+ --help Display this help and exit
+ --version Output version information and exit
+
+If multiple SRCs are specified, then each occurance of --files pertains only to
+the corresponding SRC.
+
+Each FILE named in a --copy-rules option contains lines of the form:
+
+ [gzip] [rename TARGET] COPY-OP NAME
+
+and says to copy NAME from the source tree to the destination, using the
+method specified by COPY-OP. A preceeding "\`"rename TARGET"\'" says to give
+NAME a different name in the target tree, and a preceeding "\`"gzip"\'" says
+to compress the result (appending .gz to the name). COPY-OP may be one of the
+following:
+
+ copy -- A plain copy, preserving symlinks
+ objcopy -- Copy using objcopy to strip any unneeded symbols
+ settrans -- Copy a translator
+ touch -- Create an empty file in the destination, ignoring the source
+ mkdir -- Create an empty directory in the destination, ignoring the source
+ makedev -- Create the given device in the destination, ignoring the source
+
+If both --mkfs and --fstrans are specified, no filesystem type need be given.
+If --fstype is not specified, an attempt is made to guess it based on the
+extension of IMAGE-FILE."
+ exit 0;;
+ -*)
+ echo 1>&2 "$0: $1: Unknown option"
+ echo 1>&2 "$TRY"
+ exit 64;;
+ '')
+ break;;
+ *)
+ case "${IMAGE+set}" in
+ set) SRCS[NUM_SRCS]="$1"; let 'NUM_SRCS += 1';;
+ *) IMAGE="$1";;
+ esac
+ shift
+ esac
+done
+
+case "${IMAGE+set}${SRCS[*]+set}" in
+ setset) ;;
+ *)
+ echo 1>&2 "$USAGE"
+ echo 1>&2 "$TRY"
+ exit 64;
+esac
+
+# Choose format
+if [ "${MKFS+set}" != set -o "${MKFS+set}" != set ]; then
+ if [ "${FSTYPE+set}" != set ]; then
+ case "$IMAGE" in
+ *.ext2|*.ext2.gz) FSTYPE=ext2;;
+ *.ufs|*.ext2.gz) FSTYPE=ufs;;
+ *) echo 1>&2 "$0: $IMAGE: Unknown filesystem type"; exit 1;;
+ esac
+ fi
+
+ case "$FSTYPE" in
+ ext2) MKFS="/sbin/mkfs.ext2 -ohurd"; MKFS_Q="-q"; FSTRANS=/hurd/ext2fs;;
+ ufs) MKFS="/sbin/mkfs.ufs --tracks=1 --sectors=80"; FSTRANS=/hurd/ufs;;
+ *) echo 1>&2 "$0: $IMAGE: Unknown filesystem type"; exit 1;;
+ esac
+fi
+
+case "$QUIET" in
+ yes) MKFS_Q="${MKFS_Q} >/dev/null"; ECHO=:;;
+ *) MKFS_Q=''; ECHO=echo;;
+esac
+export ECHO MKFS_Q
+
+case "$IMAGE" in *.gz) COMPRESS=yes;; esac
+
+IMAGE_TMP="${IMAGE}.new"
+IMAGE_GZIP_TMP="${IMAGE}.new.gz"
+MNT="/tmp/,mkfsimage-$$.mnt"
+ERROUT="/tmp/,mkfsimage-$$.errout"
+STAGE="/tmp/,mkfsimage-$$.stage"
+TRANS_LIST="/tmp/,mkfsimage-$$.trans"
+
+# Extra blocks that will be used by translators
+TRANS_BLOCKS=0
+
+trap "settrans 2>/dev/null -a $MNT; rm -rf $MNT $IMAGE_TMP $IMAGE_GZIP_TMP $ERROUT $STAGE $TRANS_LIST" 0 1 2 3 15
+
+if [ ${#SRCS[@]} = 1 -a ${#SCRIPTS[@]} = 0 ]; then
+ # No staging directory
+ TREE="$1"
+else
+ # Multiple source trees, or selective copying -- copy using a staging directory.
+ # We record any translators in a file ($TRANS_LIST) for later, since we copy
+ # the staging dir to the final dir using tar, and it can't handle translators.
+
+ mkdir $STAGE || exit $?
+
+ SRC_NUM=0
+ while [ $SRC_NUM -lt ${#SRCS[@]} ]; do
+ SRC="${SRCS[SRC_NUM]}"
+ SCRIPT="${SCRIPTS[SRC_NUM]}"
+ let SRC_NUM+=1
+
+ if [ ! -d "$SRC" ]; then
+ echo 1>&2 "$0: $SRC: No such directory"
+ exit 24
+ fi
+ case "$SRC" in
+ /) PFX="/";;
+ *) PFX="$SRC/";;
+ esac
+
+ eval $ECHO "'# Copying files from $SRC into staging directory $STAGE...'"
+ if [ x"${SCRIPT}" != x ]; then
+ eval $ECHO "'# Using copy script $SCRIPT'"
+ (
+ if [ x"$SCRIPT" != x- ]; then
+ if [ ! -r "$SCRIPT" ]; then
+ echo 1>&2 "$0: $SCRIPT: No such file"
+ exit 25
+ fi
+ exec <"$SCRIPT"
+ fi
+
+ while read -a args; do
+ case $args in
+ gzip) gzip=yes; unset args[0]; args=(${args[@]});;
+ *) gzip=no;;
+ esac
+ case $args in
+ rename) dst="${args[1]}"; unset args[0] args[1]; args=(${args[@]});;
+ *) unset dst;;
+ esac
+
+ op="${args[0]}"; unset args[0]; args=(${args[@]})
+
+ if echo "${args[0]}" | grep -q "[?*[]"; then
+ # If $src contains a wildcard, use the most recent file matching that pattern
+ args[0]="`ls -t1 ${PFX}$args | head -1`"
+ fi
+
+ src="${args[0]}"
+ case ${dst+set} in
+ set) ;;
+ *) dst="$src";;
+ esac
+
+ case $op in
+ copy)
+ eval $ECHO "'cp -d ${PFX}$src $STAGE/$dst'"
+ cp -d ${PFX}$src $STAGE/$dst
+ ;;
+ objcopy)
+ eval $ECHO "'objcopy --strip-unneeded ${PFX}$src $STAGE/$dst'"
+ objcopy --strip-unneeded "${PFX}$src" "$STAGE/$dst"
+ ;;
+ mkdir)
+ eval $ECHO "'mkdir $STAGE/$dst'"
+ mkdir "$STAGE/$dst"
+ ;;
+ touch)
+ eval $ECHO "'touch $STAGE/$dst'"
+ touch "$STAGE/$dst"
+ ;;
+ makedev|settrans)
+ # delay translators until later.
+ touch "$STAGE/$dst"
+ TRANS_BLOCKS=$(($TRANS_BLOCKS + 1))
+ shift
+ echo "$op $src $dst" >> $TRANS_LIST
+ ;;
+ ''|'#')
+ ;;
+ *)
+ echo 1>&2 "$0: $op: Unknown operation"
+ ;;
+ esac
+
+ case $gzip in yes)
+ eval $ECHO "'gzip -v9 $STAGE/$dst'"
+ gzip -v9 "$STAGE/$dst";;
+ esac
+ done
+ ) || exit $?
+ else
+ eval $ECHO "'# Copying all files using tar'"
+ (cd $SRC; tar cf - .) | (cd $STAGE; tar xf -)
+ fi
+ done
+ TREE="$STAGE"
+fi
+
+# Size of source tree, plus 5% for overhead
+TREE_SIZE=$((($TRANS_BLOCKS + `du -s "$TREE" | sed 's/^\([0-9]*\).*/\1/'`) * 105 / 100))
+
+if [ "${COMPRESS-no}" = yes ]; then
+ # Add 10% to the filesystem size to leave some breathing room.
+ # Since unused filesystem space compresses very well, this shouldn't add
+ # much to the final size.
+ SIZE=$(($TREE_SIZE * 110 / 100))
+ test $SIZE -lt $MIN_SIZE && SIZE=$MIN_SIZE
+else
+ SIZE=$MAX_SIZE
+ if [ $TREE_SIZE -gt $SIZE ]; then
+ echo 1>&2 "$0: $TREE: Too big (${TREE_SIZE}k) to fit in ${MAX_SIZE}k"
+ exit 10
+ fi
+fi
+
+eval $ECHO "'# Zeroing disk image...'"
+rm -f $IMAGE_TMP
+if ! dd if=/dev/zero of=$IMAGE_TMP bs=${SIZE}k count=1 2>$ERROUT; then
+ sed -n "s@^dd:@$0@p" < $ERROUT 1>&2
+ exit 11
+fi
+
+eval $ECHO "'# Making filesystem...'"
+eval "$MKFS $MKFS_Q '$IMAGE_TMP'" || exit 12
+settrans -ac $MNT $FSTRANS $IMAGE_TMP || exit 13
+
+eval $ECHO "'# Copying $TREE into filesystem...'"
+(cd $TREE; tar cf - .) | (cd $MNT; tar xf -)
+
+if [ -r "$TRANS_LIST" ]; then
+ # create any delayed translators
+ eval $ECHO "'# Creating translators...'"
+ cat "$TRANS_LIST" |
+ while read op src dst; do
+ case $op in
+ settrans)
+ tr="`showtrans "${PFX}$src"`"
+ eval $ECHO "'settrans $MNT/$dst $tr'"
+ settrans "$MNT/$dst" $tr
+ ;;
+ makedev)
+ dd="/`dirname $dst`"
+ eval $ECHO "'/sbin/MAKEDEV --devdir=$dd $MNT/$dst'"
+ /sbin/MAKEDEV --devdir=$dd "$MNT/$dst"
+ ;;
+ esac
+ done
+fi
+
+settrans -a $MNT
+
+case "$COMPRESS" in
+ yes)
+ case "$QUIET" in
+ yes)
+ gzip -9 $IMAGE_TMP
+ ;;
+ *)
+ eval $ECHO "'# Compressing disk image...'"
+ gzip -v9 $IMAGE_TMP 2>&1 | sed "s@$IMAGE_TMP\.gz@$IMAGE@g"
+ ;;
+ esac
+ mv $IMAGE_GZIP_TMP $IMAGE
+ ;;
+ *)
+ mv $IMAGE_TMP $IMAGE
+ ;;
+esac
+
+exit 0
diff --git a/release/rfloppy.copy b/release/rfloppy.copy
new file mode 100644
index 00000000..273b3353
--- /dev/null
+++ b/release/rfloppy.copy
@@ -0,0 +1,169 @@
+# Files on the hurd boot floppy root disk
+
+mkdir bin
+mkdir boot
+mkdir dev
+mkdir etc
+mkdir hurd
+mkdir lib
+mkdir sbin
+mkdir servers
+mkdir tmp
+
+objcopy bin/bash
+objcopy bin/cat
+objcopy bin/chmod
+objcopy bin/chown
+objcopy bin/cp
+objcopy bin/dd
+objcopy bin/ftp
+objcopy bin/gzip
+objcopy bin/ln
+objcopy bin/ls
+objcopy bin/mv
+objcopy bin/ps
+objcopy bin/settrans
+objcopy bin/showtrans
+objcopy bin/sync
+copy bin/sh
+objcopy bin/tar
+
+copy dev/MAKEDEV
+makedev dev/std
+makedev dev/fd0
+makedev dev/hd0
+makedev dev/hd0a
+makedev dev/hd0b
+makedev dev/hd0c
+makedev dev/hd0d
+makedev dev/hd0e
+makedev dev/hd0f
+makedev dev/hd0g
+makedev dev/hd0s1
+makedev dev/hd0s2
+makedev dev/hd0s3
+makedev dev/hd0s4
+makedev dev/hd0s5
+makedev dev/hd0s6
+makedev dev/hd1
+makedev dev/hd1a
+makedev dev/hd1b
+makedev dev/hd1c
+makedev dev/hd1d
+makedev dev/hd1e
+makedev dev/hd1f
+makedev dev/hd1g
+makedev dev/hd1s1
+makedev dev/hd1s2
+makedev dev/hd1s3
+makedev dev/hd1s4
+makedev dev/hd1s5
+makedev dev/hd1s6
+makedev dev/sd0
+makedev dev/sd0a
+makedev dev/sd0b
+makedev dev/sd0c
+makedev dev/sd0d
+makedev dev/sd0e
+makedev dev/sd0f
+makedev dev/sd0g
+makedev dev/sd0s1
+makedev dev/sd0s2
+makedev dev/sd0s3
+makedev dev/sd0s4
+makedev dev/sd0s5
+makedev dev/sd0s6
+makedev dev/sd1
+makedev dev/sd1a
+makedev dev/sd1b
+makedev dev/sd1c
+makedev dev/sd1d
+makedev dev/sd1e
+makedev dev/sd1f
+makedev dev/sd1g
+makedev dev/sd1s1
+makedev dev/sd1s2
+makedev dev/sd1s3
+makedev dev/sd1s4
+makedev dev/sd1s5
+makedev dev/sd1s6
+
+objcopy hurd/auth
+objcopy hurd/exec
+objcopy hurd/init
+objcopy hurd/nfs
+objcopy hurd/pfinet
+objcopy hurd/proc
+objcopy hurd/term
+objcopy hurd/devport
+objcopy hurd/ext2fs
+objcopy hurd/magic
+objcopy hurd/null
+objcopy hurd/pflocal
+objcopy hurd/storeio
+objcopy hurd/ufs
+
+copy lib/ld.so
+objcopy lib/ld.so.1
+objcopy lib/libc-*.so
+copy lib/libc.so
+copy lib/libc.so.*
+copy lib/libcrypt.so
+copy lib/libcrypt.so.*
+objcopy lib/libcrypt-*.so
+copy lib/libdb.so
+copy lib/libdb.so.*
+objcopy lib/libdb-*.so
+copy lib/libdl.so
+copy lib/libdl.so.*
+objcopy lib/libdl-*.so
+objcopy lib/libdiskfs.so
+objcopy lib/libfshelp.so
+objcopy lib/libhurdbugaddr.so
+copy lib/libhurduser.so
+copy lib/libhurduser.so.*
+objcopy lib/libhurduser-*.so
+objcopy lib/libihash.so
+objcopy lib/libiohelp.so
+copy lib/libm.so
+copy lib/libm.so.*
+objcopy lib/libm-*.so
+copy lib/libmachuser.so
+copy lib/libmachuser.so.*
+objcopy lib/libmachuser-*.so
+objcopy lib/libnetfs.so
+copy lib/libnss_db.so
+copy lib/libnss_db.so.*
+objcopy lib/libnss_db-*.so
+copy lib/libnss_dns.so
+copy lib/libnss_dns.so.*
+objcopy lib/libnss_dns-*.so
+copy lib/libnss_files.so
+copy lib/libnss_files.so.*
+objcopy lib/libnss_files-*.so
+objcopy lib/libpager.so
+objcopy lib/libpipe.so
+objcopy lib/libports.so
+objcopy lib/libps.so
+copy lib/libresolv.so
+copy lib/libresolv.so.*
+objcopy lib/libresolv-*.so
+objcopy lib/libshouldbeinlibc.so
+objcopy lib/libstore.so
+objcopy lib/libthreads.so
+objcopy lib/libtrivfs.so
+copy lib/libutil.so
+copy lib/libutil.so.*
+objcopy lib/libutil-*.so
+
+copy sbin/MAKEDEV
+objcopy sbin/fsck.ufs
+objcopy sbin/halt
+objcopy sbin/mkfs.ext2
+objcopy sbin/mkfs.ufs
+objcopy sbin/reboot
+
+touch servers/exec
+mkdir servers/socket
+settrans servers/socket/1
+touch servers/socket/2