From 84b6e2fe63db5bd8706c63d476da2d41480e5389 Mon Sep 17 00:00:00 2001 From: phil Date: Tue, 3 Oct 1995 22:30:59 +0000 Subject: [PATCH] Minor updates to the distribution, things like new files in instbin, new directories, comments to a program , deleting a binary that managed to get checked in, ... --- distrib/pc532/floppies/inst-common/inject.c | 28 +++++++++++++++++- .../pc532/floppies/inst-common/instbin.conf | 14 +++++---- distrib/pc532/floppies/inst-common/list | 5 +++- distrib/pc532/floppies/inst-common/memory_map | 2 +- distrib/pc532/floppies/inst-common/mtree.conf | 7 ++++- distrib/pc532/floppies/inst/cloak | Bin 8930 -> 0 bytes distrib/pc532/floppies/inst/install.sh | 10 +++---- 7 files changed, 51 insertions(+), 15 deletions(-) delete mode 100644 distrib/pc532/floppies/inst/cloak diff --git a/distrib/pc532/floppies/inst-common/inject.c b/distrib/pc532/floppies/inst-common/inject.c index a296440c651d..9ed36078a74f 100644 --- a/distrib/pc532/floppies/inst-common/inject.c +++ b/distrib/pc532/floppies/inst-common/inject.c @@ -27,7 +27,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: inject.c,v 1.1 1995/09/26 21:25:07 phil Exp $ + * $Id: inject.c,v 1.2 1995/10/03 22:31:03 phil Exp $ */ #include @@ -38,28 +38,44 @@ #include #include +/* + * Map a file + */ + void *map(char *file, int mode, int *len) { int fd; struct stat sb; void *p; + /* Open the file we'd like map */ fd = open(file, mode); if (fd < 0) { perror(file); exit(1); } + + /* Get the length of the file */ if (fstat(fd, &sb) < 0) { perror("fstat"); exit(1); } + + /* Return the length of file in len */ *len = sb.st_size; + + /* Now map the file */ p = mmap(NULL, *len, PROT_READ | (mode == O_RDWR ? PROT_WRITE : 0), MAP_SHARED, fd, 0); if (p == NULL) { perror("mmap"); exit(1); } + + /* + * We will access this mostly sequential. + * So let's tell it to the vm system. + */ madvise(p, *len, MADV_SEQUENTIAL); close(fd); return(p); @@ -77,20 +93,30 @@ main(int argc, char **argv) exit(1); } + /* Map the kernel image read/write */ kern = map(argv[1], O_RDWR, &kernlen); + + /* Map the filesystem image read only */ filesys = map(argv[2], O_RDONLY, &filesyslen); + /* Search the kernel image for the ramdisk signature */ bm = bm_comp(pattern, sizeof(pattern), NULL); ramdisk = bm_exec(bm, kern, kernlen); if (!ramdisk) { fprintf(stderr, "Origin of ramdisk not found in kernel\n"); exit(1); } + + /* Does the filesystem image fit into the kernel image? */ if ((kernlen - (ramdisk - kern)) < filesyslen) { fprintf(stderr, "Kernel image to small\n"); exit(1); } + + /* Copy the filesystem image into the kernel image */ memcpy(ramdisk, filesys, filesyslen); + + /* Sync vm/fs and unmap the images */ msync(kern, kernlen); munmap(kern, kernlen); munmap(filesys, filesyslen); diff --git a/distrib/pc532/floppies/inst-common/instbin.conf b/distrib/pc532/floppies/inst-common/instbin.conf index e3fbc3756930..498e80c4965f 100644 --- a/distrib/pc532/floppies/inst-common/instbin.conf +++ b/distrib/pc532/floppies/inst-common/instbin.conf @@ -1,15 +1,15 @@ # # kcbin.conf - unified binary for the kc floppy -# $Id: instbin.conf,v 1.3 1995/09/29 03:55:36 phil Exp $ +# $Id: instbin.conf,v 1.4 1995/10/03 22:31:04 phil Exp $ # srcdirs bin sbin usr.bin usr.sbin gnu/usr.bin games progs bc bim cat chat chmod chown chroot cp dd df disklabel dump expr factor -progs find fsck ftp gawk gzip hexdump ifconfig init ln ls mkdir mknod more -progs mount mount_cd9660 mount_ffs mount_msdos mount_nfs mt mv newfs -progs pax ping pppd pppstats pwd rcp reboot restore rm rmdir route -progs sed sh shutdown slattach strings stty sync tar test tip traceroute +progs find fsck ftp gawk gzip hexdump ifconfig init kvm_mkdb ln ls mkdir mknod more +progs mount mount_cd9660 mount_ffs mount_msdos mount_nfs mt mv netstat newfs +progs pax ping pppd pppstats ps pwd rcp reboot restore rm rmdir route +progs sed sh shutdown slattach strings stty sync test tip traceroute progs umount update vi special chat srcdir /usr/src/usr.sbin/pppd/chat @@ -25,8 +25,10 @@ ln mount_cd9660 cd9660 ln mount_ffs ffs ln mount_msdos msdos ln mount_nfs nfs +ln pax tar +ln pax cpio ln vi ex ln vi view ln reboot halt -libs -ledit -lcurses -lutil -ltermcap -lcrypt -ll -lm +libs -lkvm -ledit -lcurses -lutil -ltermcap -lcrypt -ll -lm diff --git a/distrib/pc532/floppies/inst-common/list b/distrib/pc532/floppies/inst-common/list index b0b5db9922c4..6f7acfb1db94 100644 --- a/distrib/pc532/floppies/inst-common/list +++ b/distrib/pc532/floppies/inst-common/list @@ -1,4 +1,4 @@ -# $Id: list,v 1.3 1995/09/29 03:55:37 phil Exp $ +# $Id: list,v 1.4 1995/10/03 22:31:05 phil Exp $ # copy the MAKEDEV script and make some devices COPY ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV @@ -33,6 +33,7 @@ LINK instbin bin/mkdir LINK instbin bin/mt LINK instbin bin/mv LINK instbin bin/pax +LINK instbin bin/ps LINK instbin bin/pwd LINK instbin bin/rcp LINK instbin bin/rm @@ -65,6 +66,7 @@ LINK instbin sbin/slattach LINK instbin sbin/umount SYMLINK /instbin usr/bin/awk SYMLINK /instbin usr/bin/chgrp +SYMLINK /instbin usr/bin/cpio SYMLINK /instbin usr/bin/hexdump SYMLINK /instbin usr/bin/ex SYMLINK /instbin usr/bin/find @@ -84,6 +86,7 @@ SYMLINK /instbin usr/games/factor SYMLINK /instbin usr/sbin/chat SYMLINK /instbin usr/sbin/chown SYMLINK /instbin usr/sbin/chroot +SYMLINK /instbin usr/sbin/kvm_mkdb SYMLINK /instbin usr/sbin/pppd SYMLINK /instbin usr/sbin/pppstats SYMLINK /instbin usr/sbin/traceroute diff --git a/distrib/pc532/floppies/inst-common/memory_map b/distrib/pc532/floppies/inst-common/memory_map index 23f2068e91d8..2017799dfd71 100644 --- a/distrib/pc532/floppies/inst-common/memory_map +++ b/distrib/pc532/floppies/inst-common/memory_map @@ -1,5 +1,5 @@ 0x400000 Top of physical RAM for 4mb machine -0x3E6800 Start of boot code +0x3EB800 Start of boot code 0x288000 Start of ramdisk when booting from rd0 0x240000 Start of netbsd image (may overflow into rd0 image) 0x002000 Start of kernel (may overflow into netbsd image) diff --git a/distrib/pc532/floppies/inst-common/mtree.conf b/distrib/pc532/floppies/inst-common/mtree.conf index 9c4020fdd748..c9fa43b80117 100644 --- a/distrib/pc532/floppies/inst-common/mtree.conf +++ b/distrib/pc532/floppies/inst-common/mtree.conf @@ -1,4 +1,4 @@ -# $Id: mtree.conf,v 1.2 1995/09/26 21:25:12 phil Exp $ +# $Id: mtree.conf,v 1.3 1995/10/03 22:31:08 phil Exp $ /set type=dir uname=root gname=wheel mode=0755 # . @@ -53,6 +53,11 @@ run # ./var/run .. +# ,/var/db +db +# ./var/db +.. + # ./var/tmp tmp diff --git a/distrib/pc532/floppies/inst/cloak b/distrib/pc532/floppies/inst/cloak deleted file mode 100644 index b09b25516e1b9004487d1e961b295b7df0a25c3c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8930 zcmeHNeQZpn>uMX$w)*WhJ1bN;9;E!PKyau^*|0zhpZQ z+Dv#+Ta~E@gs8R()?{uI#MVyzXI%&+F;YYRDd`_w_b7w9+d6{0Y0EUUNfm1LJNI1& zlG2Yqk>(5MosWCYx#ymH-@VUANgTEmlY@w%%SDv15UI?|Hn1_j=R$tX1;v@l?{p4X zXRq(hPf^oKBc-@2?A0@uhwF?g>kDb4Fh!12)8lS(*^O18k7bmjmw{ib`6xxDul74r z{NGLXWwX~HIATqlbdMS!H_aH;Mv$y2vQ-)dK&4lc$>i~s<+NkeIchBXb5nlWcIc-> zb-l4@UBJIb@6)|?0bgw_Or2p>5O&(?@dtXNx*F9zK7XhuD}K!5Q-hu!zqctX+3X30 z!f^;AS&8tV?u7&0XXj}TR3ut4KW$VSoxL{sQhLlfdB9odJ2X5$KR-8UbFIRx?dW-4 zJFB7Zsq|=i)H>NE`fs35ot>IIZ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o_qC4pC%ZI!ylUF!#q4bZZ`L3Z4fljRL7if8 zPc%+iM0$_KqmtSiiTXqFy)uHuF-CRBgL*Kg!&K8^TS?OqB^W)l-yaQQN*?fj2>1sT z#L;Ld3?xKBj~@zwn6B^RdBqL}(PQ3PdI-vzCNwC3b>{Uc5hnqW*Ib6&^B&3opVbbP zXbs@2TDN>}cSF|)xQh2;9S+fT@&ILD>u`A1NnLj)T{Lm zH#KZ%YTTekp7saSEqxL7LGvZg9>g41uH`b2%RnvzxeVkokjp?W1Gx<3GLXwaE(5s? z(8TZhg<@u%lyf0-qolcr*&=B!V75z|iE7ZbS4G#3oBbR%dk zfZS5eN;%UjR}*cK@b%i-eQntMyN-A;Qs?#7uYYJ`{e}hzd%WKDnl~Jb@Ly%ra!s)()Vmi^JaGd diff --git a/distrib/pc532/floppies/inst/install.sh b/distrib/pc532/floppies/inst/install.sh index f74879c9a775..9af54f6f9211 100644 --- a/distrib/pc532/floppies/inst/install.sh +++ b/distrib/pc532/floppies/inst/install.sh @@ -27,7 +27,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -# $Id: install.sh,v 1.2 1995/09/26 21:24:58 phil Exp $ +# $Id: install.sh,v 1.3 1995/10/03 22:31:01 phil Exp $ # NetBSD installation script. # In a perfect world, this would be a nice C program, with a reasonable @@ -402,28 +402,28 @@ fi echo "Initializing root filesystem, and mounting..." $DONTDOIT newfs /dev/r${drivename}a $name $DONTDOIT mount -v /dev/${drivename}a /mnt -if [ "$dname" != "" ]; then +if [ "$dname" != "" -a "$dname" != "NO" ]; then echo "" echo "Initializing $dname filesystem, and mounting..." $DONTDOIT newfs /dev/r${drivename}d $name $DONTDOIT mkdir -p /mnt/$dname $DONTDOIT mount -v /dev/${drivename}d /mnt/$dname fi -if [ "$ename" != "" ]; then +if [ "$ename" != "" -a "$ename" != "NO" ]; then echo "" echo "Initializing $ename filesystem, and mounting..." $DONTDOIT newfs /dev/r${drivename}e $name $DONTDOIT mkdir -p /mnt/$ename $DONTDOIT mount -v /dev/${drivename}e /mnt/$ename fi -if [ "$fname" != "" ]; then +if [ "$fname" != "" -a "$fname" != "NO" ]; then echo "" echo "Initializing $fname filesystem, and mounting..." $DONTDOIT newfs /dev/r${drivename}f $name $DONTDOIT mkdir -p /mnt/$fname $DONTDOIT mount -v /dev/${drivename}f /mnt/$fname fi -if [ "$gname" != "" ]; then +if [ "$gname" != "" -a "$gname" != "NO" ]; then echo "" echo "Initializing $gname filesystem, and mounting..." $DONTDOIT newfs /dev/r${drivename}g $name