summaryrefslogtreecommitdiff
path: root/release/floppies
diff options
context:
space:
mode:
Diffstat (limited to 'release/floppies')
-rw-r--r--release/floppies/bin/Makefile7
-rw-r--r--release/floppies/bin/doFS.sh71
-rw-r--r--release/floppies/bin/dumpnlist/Makefile8
-rw-r--r--release/floppies/bin/dumpnlist/dumpnlist.c44
-rw-r--r--release/floppies/bin/write_mfs_in_kernel/Makefile8
-rw-r--r--release/floppies/bin/write_mfs_in_kernel/write_mfs_in_kernel.c70
-rw-r--r--release/floppies/mk/crunch_fs.mk108
-rw-r--r--release/floppies/mk/makecrunch.mk25
8 files changed, 0 insertions, 341 deletions
diff --git a/release/floppies/bin/Makefile b/release/floppies/bin/Makefile
deleted file mode 100644
index 15f5ebff4c19..000000000000
--- a/release/floppies/bin/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-# $Id: Makefile,v 1.1 1997/07/16 12:24:18 julian Exp $
-#
-SUBDIR= write_mfs_in_kernel dumpnlist
-
-.include <bsd.subdir.mk>
-
-
diff --git a/release/floppies/bin/doFS.sh b/release/floppies/bin/doFS.sh
deleted file mode 100644
index f0c2f2b189a3..000000000000
--- a/release/floppies/bin/doFS.sh
+++ /dev/null
@@ -1,71 +0,0 @@
-:
-#set -ex
-
-VNDEVICE=vn0
-export BLOCKSIZE=512
-
-BOOTBLKDIR=$1 ; shift
-MNT=$1 ; shift
-FSSIZE=$1 ; shift
-FSPROTO=$1 ; shift
-FSINODE=$1 ; shift
-FSLABEL=$1 ; shift
-
-deadlock=20
-
-while true
-do
- rm -f fs-image
-
- if [ ! -b /dev/${VNDEVICE} -o ! -c /dev/r${VNDEVICE} ] ; then
- ( cd /dev && sh MAKEDEV ${VNDEVICE} )
- fi
-
- umount /dev/${VNDEVICE} 2>/dev/null || true
-
- umount ${MNT} 2>/dev/null || true
-
- vnconfig -u /dev/r${VNDEVICE} 2>/dev/null || true
-
- dd of=fs-image if=/dev/zero count=${FSSIZE} bs=1k 2>/dev/null
- # this suppresses the `invalid primary partition table: no magic'
- awk 'BEGIN {printf "%c%c", 85, 170}' |\
- dd of=fs-image obs=1 seek=510 conv=notrunc 2>/dev/null
-
- vnconfig -s labels -c /dev/r${VNDEVICE} fs-image
-
- disklabel -Brw \
- -b ${BOOTBLKDIR}/boot1 \
- -s ${BOOTBLKDIR}/boot2 \
- /dev/r${VNDEVICE} minimum
-
- TPC=1
- CPD=1
- SPT=$(( 2 * $FSSIZE / 2))
- newfs -u ${SPT} -t ${TPC} -s $(( ${FSSIZE} * 2 )) -i ${FSINODE} -m 0 -o space /dev/r${VNDEVICE}c
-
- mount /dev/${VNDEVICE}c ${MNT}
-
- ( set -e && cd ${FSPROTO} && find . -print | cpio -dump ${MNT} )
-
- df -ki /mnt
-
- set `df -ki /mnt | tail -1`
-
- umount ${MNT}
-
- fsck -p /dev/r${VNDEVICE}c < /dev/null
-
- vnconfig -u /dev/r${VNDEVICE} 2>/dev/null || true
-
- if [ $FSLABEL != "minimum" ] ; then
- echo ${FSSIZE} > fs-image.size
- break
- fi
-
- echo ">>> Filesystem is ${FSSIZE} K, $4 left"
- echo ">>> ${FSINODE} bytes/inode, $7 left"
- echo ">>> `expr ${FSSIZE} \* 1024 / ${FSINODE}`"
- echo ${FSSIZE} > fs-image.size
- break;
-done
diff --git a/release/floppies/bin/dumpnlist/Makefile b/release/floppies/bin/dumpnlist/Makefile
deleted file mode 100644
index 1149cadbbeb6..000000000000
--- a/release/floppies/bin/dumpnlist/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# $Id: Makefile,v 1.1 1997/07/16 12:24:19 julian Exp $
-#
-PROG=dumpnlist
-NOMAN=yes
-
-.include <bsd.prog.mk>
-
-
diff --git a/release/floppies/bin/dumpnlist/dumpnlist.c b/release/floppies/bin/dumpnlist/dumpnlist.c
deleted file mode 100644
index 31f25c15879b..000000000000
--- a/release/floppies/bin/dumpnlist/dumpnlist.c
+++ /dev/null
@@ -1,44 +0,0 @@
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <nlist.h>
-#include <stdio.h>
-
-struct nlist nl[] = {
- {"_isa_devtab_bio"},
- {"_isa_devtab_tty"},
- {"_isa_devtab_net"},
- {"_isa_devtab_null"},
- {"_isa_biotab_wdc"},
- {"_isa_biotab_fdc"},
- {"_eisadriver_set"},
- {"_eisa_dev_list"},
- {"_pcidevice_set"},
- {"_device_list"},
- {"_scbusses"},
- {"_scsi_cinit"},
- {"_scsi_dinit"},
- {"_scsi_tinit"},
- {""},
-};
-
-int
-main(int ac, char **av)
-{
- int i;
-
- i = nlist(av[1], nl);
- if (i == -1) {
- fprintf(stderr, "nlist returns error for %s\n", av[1]);
- perror("nlist");
- return 1;
- }
- printf("%d\n", sizeof(nl) / sizeof(struct nlist));
- for (i = 0; nl[i].n_name; i++) {
- printf("%s\n", nl[i].n_name);
- printf("%d %d %d %ld\n",
- nl[i].n_type, nl[i].n_other, nl[i].n_desc, nl[i].n_value);
- }
- return 0;
-}
diff --git a/release/floppies/bin/write_mfs_in_kernel/Makefile b/release/floppies/bin/write_mfs_in_kernel/Makefile
deleted file mode 100644
index cd65a8e75249..000000000000
--- a/release/floppies/bin/write_mfs_in_kernel/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# $Id: Makefile,v 1.1 1997/07/16 12:24:20 julian Exp $
-#
-PROG=write_mfs_in_kernel
-NOMAN=yes
-
-.include <bsd.prog.mk>
-
-
diff --git a/release/floppies/bin/write_mfs_in_kernel/write_mfs_in_kernel.c b/release/floppies/bin/write_mfs_in_kernel/write_mfs_in_kernel.c
deleted file mode 100644
index b624ed6387d4..000000000000
--- a/release/floppies/bin/write_mfs_in_kernel/write_mfs_in_kernel.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * ----------------------------------------------------------------------------
- * "THE BEER-WARE LICENSE" (Revision 42):
- * <phk@login.dknet.dk> wrote this file. As long as you retain this notice you
- * can do whatever you want with this stuff. If we meet some day, and you think
- * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
- * ----------------------------------------------------------------------------
- *
- * $Id: write_mfs_in_kernel.c,v 1.1 1997/07/16 12:24:21 julian Exp $
- *
- * This program patches a filesystem into a kernel made with MFS_ROOT
- * option.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/param.h>
-#include <sys/stat.h>
-#include <ufs/ffs/fs.h>
-
-main(int argc, char **argv)
-{
- unsigned char *buf_kernel, *buf_fs, *p,*q;
- int fd_kernel, fd_fs;
- struct stat st_kernel, st_fs;
- u_long l;
-
- if (argc < 3) {
- fprintf(stderr,"Usage:\n\t%s kernel fs\n");
- exit(2);
- }
- fd_kernel = open(argv[1],O_RDWR);
- if (fd_kernel < 0) { perror(argv[1]); exit(2); }
- fstat(fd_kernel,&st_kernel);
- fd_fs = open(argv[2],O_RDONLY);
- if (fd_fs < 0) { perror(argv[2]); exit(2); }
- fstat(fd_fs,&st_fs);
- buf_kernel = malloc(st_kernel.st_size);
- if (!buf_kernel) { perror("malloc"); exit(2); }
- buf_fs = malloc(st_fs.st_size);
- if (!buf_fs) { perror("malloc"); exit(2); }
- if (st_kernel.st_size != read(fd_kernel,buf_kernel,st_kernel.st_size))
- { perror(argv[1]); exit(2); }
- if (st_fs.st_size != read(fd_fs,buf_fs,st_fs.st_size))
- { perror(argv[2]); exit(2); }
- for(l=0,p=buf_kernel; l < st_kernel.st_size - st_fs.st_size ; l++,p++ )
- if(*p == 'M' && !strcmp(p,"MFS Filesystem goes here"))
- goto found;
- fprintf(stderr,"MFS filesystem signature not found in %s\n",argv[1]);
- exit(1);
- found:
- for(l=0,q= p + SBOFF; l < st_fs.st_size - SBOFF ; l++,q++ )
- if (*q)
- goto fail;
- memcpy(p+SBOFF,buf_fs+SBOFF,st_fs.st_size-SBOFF);
- lseek(fd_kernel,0L,SEEK_SET);
- if (st_kernel.st_size != write(fd_kernel,buf_kernel,st_kernel.st_size))
- { perror(argv[1]); exit(2); }
- exit(0);
- fail:
- l += SBOFF;
- fprintf(stderr,"Obstruction in kernel after %ld bytes (%ld Kbyte)\n",
- l, l/1024);
- fprintf(stderr,"Filesystem is %ld bytes (%ld Kbyte)\n",
- (u_long)st_fs.st_size, (u_long)st_fs.st_size/1024);
- exit(1);
-}
diff --git a/release/floppies/mk/crunch_fs.mk b/release/floppies/mk/crunch_fs.mk
deleted file mode 100644
index c6d51d19bf8e..000000000000
--- a/release/floppies/mk/crunch_fs.mk
+++ /dev/null
@@ -1,108 +0,0 @@
-###
-# $Id: crunch_fs.mk,v 1.1 1997/07/16 12:24:29 julian Exp $
-#
-# This is included to make a floppy that includes a crunch file
-#
-# Variables that control this mk include file.
-# TOP specifies where the top of the FreeBSD source tree is.. (*)
-# FS_DIRS directories to make on the fs (*)
-# STANDLINKS added symlinks to /stand on the fs
-# VERBATIM a directory that contains tree to be copied to the fs
-# FSSIZE defaults to 1440
-# FSLABEL defaults to fd1440
-# FSINODE defaults to 4000
-# FS_DEVICES devices to make on the fs (using MAKEDEV) (default = all)
-# ZIP decides if the installed cruch will also be gzip'd(def=true)
-# (*) = Mandatory
-###
-
-# If we weren't told, default to nothing
-.if ! defined( TOP )
-# define TOP!
-xxx
-.endif
-
-# mountpoint for filesystems.
-MNT= /mnt
-
-# other floppy parameters.
-FSSIZE?= 1440
-FSLABEL?= fd1440
-FSINODE?= 2000
-FS_DEVICES?= all
-ZIP?=true
-
-# Things which will get you into trouble if you change them
-TREE= tree
-LABELDIR= ${OBJTOP}/sys/i386/boot/biosboot
-
-clean:
- rm -rf tree fs-image fs-image.size step[0-9]
-
-.include <bsd.prog.mk>
-
-
-#
-# --==## Create a filesystem image ##==--
-#
-
-fs_image: ${TREE} step2 step3 step4 fs-image
-
-${TREE}: ${.CURDIR}/Makefile
- rm -rf ${TREE}
- mkdir -p ${TREE}
- cd ${TREE} && mkdir ${FS_DIRS}
- cd ${TREE} ; for i in ${STANDLINKS} ; \
- do \
- ln -s /stand $${i} ; \
- done
-
-step2: ${.CURDIR}/${CRUNCHDIRS} ${.CURDIR}/Makefile
-.if defined(CRUNCHDIRS)
- @cd ${.CURDIR} && $(MAKE) installCRUNCH DIR=${TREE}/stand ZIP=${ZIP}
-.endif
- touch step2
-
-step3: step2
-.if defined (FS_DEVICES)
- ( cd tree/dev && \
- cp ${TOP}/etc/etc.i386/MAKEDEV . && sh MAKEDEV ${FS_DEVICES} )
-.endif
- touch step3
-
-step4: step3
-.if defined(VERBATIM)
- A=`pwd`;cd ${.CURDIR}/${VERBATIM}; \
- find . \! \( -name CVS -and -prune \) -print |cpio -pdmuv $$A/tree
-.endif
- true || cp ${TOP}/etc/spwd.db tree/etc
- touch step4
-
-fs-image: step4
- sh -e ${SCRIPTDIR}/doFS.sh ${LABELDIR} ${MNT} ${FSSIZE} tree \
- ${FSINODE} ${FSLABEL}
- cp fs-image.size ${.CURDIR}
-
-
-.if defined(CRUNCHDIRS)
-installCRUNCH:
-.if !defined(DIR)
- @echo "DIR undefined in installCRUNCH" && exit 1
-.endif
-.if !defined(ZIP)
- @echo "ZIP undefined in installCRUNCH" && exit 1
-.endif
-.for CRUNCHDIR in ${CRUNCHDIRS}
- if ${ZIP} ; then \
- gzip -9 < ${CRUNCHDIR}/crunch > ${DIR}/.crunch ; \
- else \
- ln -f ${CRUNCHDIR}/crunch ${DIR}/.crunch ; \
- fi
- chmod 555 ${DIR}/.crunch
- for i in `crunchgen -l ${.CURDIR}/${CRUNCHDIR}/crunch.conf` ; do \
- ln -f ${DIR}/.crunch ${DIR}/$$i ; \
- done
- rm -f ${DIR}/.crunch
-.endfor
-.endif
-
diff --git a/release/floppies/mk/makecrunch.mk b/release/floppies/mk/makecrunch.mk
deleted file mode 100644
index 8f2d3e70afe1..000000000000
--- a/release/floppies/mk/makecrunch.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-SYSINSTALL= ${OBJTOP}/release/sysinstall/sysinstall
-
-NOCRYPT?= yes
-
-all: crunch
-
-crunch:
- -crunchgen ${.CURDIR}/crunch.conf
- ${MAKE} -f crunch.mk all NOCRYP=${NOCRYPT} \
- "CFLAGS=${CFLAGS} -DCRUNCHED_BINARY"
-
-clean:
- rm -f *.o *.stub *.lo *_stub.c *.mk \
- crunch.cache \
- crunch.mk \
- crunch.c \
- crunch \
- .tmp_*
-
-install:
- @echo " No idea what to do to install yet"
-
-.include <bsd.prog.mk>