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, ...
This commit is contained in:
parent
fd151de629
commit
84b6e2fe63
|
@ -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 <stdio.h>
|
||||
|
@ -38,28 +38,44 @@
|
|||
#include <sys/mman.h>
|
||||
#include <bm.h>
|
||||
|
||||
/*
|
||||
* 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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Binary file not shown.
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue