Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/riscv/ramdisk Ramdisk for INSTALL kernel



details:   https://anonhg.NetBSD.org/src/rev/1123d9f2dacf
branches:  trunk
changeset: 336953:1123d9f2dacf
user:      matt <matt%NetBSD.org@localhost>
date:      Sat Mar 28 12:54:06 2015 +0000

description:
Ramdisk for INSTALL kernel

diffstat:

 distrib/riscv/ramdisk/Makefile    |  38 ++++++++++++++++++
 distrib/riscv/ramdisk/dot.profile |  66 +++++++++++++++++++++++++++++++
 distrib/riscv/ramdisk/list        |  81 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 185 insertions(+), 0 deletions(-)

diffs (197 lines):

diff -r 24516cd1f0de -r 1123d9f2dacf distrib/riscv/ramdisk/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/riscv/ramdisk/Makefile    Sat Mar 28 12:54:06 2015 +0000
@@ -0,0 +1,38 @@
+#      $NetBSD: Makefile,v 1.1 2015/03/28 12:54:06 matt Exp $
+
+.include <bsd.own.mk>
+.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
+
+IMAGE=         ramdisk.fs
+IMAGESIZE=     4096k
+MAKEFS_FLAGS=  -f 15
+
+WARNS=         1
+DBG=           -Os
+
+CRUNCHBIN=     ramdiskbin
+LISTS=         ${.CURDIR}/list
+#LISTS+=               ${DISTRIBDIR}/common/list.sysinst
+MTREECONF=     ${DISTRIBDIR}/common/mtree.common
+IMAGEENDIAN=   le
+MAKEDEVTARGETS=        ramdisk
+IMAGEDEPENDS=  ${CRUNCHBIN} \
+               dot.profile \
+               ${NETBSDSRCDIR}/etc/group ${NETBSDSRCDIR}/etc/master.passwd \
+               ${NETBSDSRCDIR}/etc/netconfig ${DISTRIBDIR}/common/protocols \
+               ${DISTRIBDIR}/common/services
+
+MAKEDEVTARGETS= std md0 wd0 wd1 wd2 wd3 cd0 cd1 sd0 sd1 sd2 sd3 st0 ipty
+
+# Use stubs to eliminate some large stuff from libc
+HACKSRC=       ${DISTRIBDIR}/utils/libhack
+.include       "${HACKSRC}/Makefile.inc"
+${CRUNCHBIN}:  libhack.o
+
+.include "${DISTRIBDIR}/common/Makefile.crunch"
+.include "${DISTRIBDIR}/common/Makefile.makedev"
+.include "${DISTRIBDIR}/common/Makefile.image"
+
+release:
+
+.include <bsd.prog.mk>
diff -r 24516cd1f0de -r 1123d9f2dacf distrib/riscv/ramdisk/dot.profile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/riscv/ramdisk/dot.profile Sat Mar 28 12:54:06 2015 +0000
@@ -0,0 +1,66 @@
+# $NetBSD: dot.profile,v 1.1 2015/03/28 12:54:06 matt Exp $
+#
+# Copyright (c) 1997 Perry E. Metzger
+# Copyright (c) 1994 Christopher G. Demetriou
+# All rights reserved.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. All advertising materials mentioning features or use of this software
+#    must display the following acknowledgement:
+#          This product includes software developed for the
+#          NetBSD Project.  See http://www.NetBSD.org/ for
+#          information about NetBSD.
+# 4. The name of the author may not be used to endorse or promote products
+#    derived from this software without specific prior written permission.
+# 
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (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: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
+export PATH
+TERM=vt100
+export TERM
+HOME=/
+export HOME
+
+umask 022
+
+ROOTDEV=/dev/md0a
+
+if [ "X${DONEPROFILE}" = "X" ]; then
+       DONEPROFILE=YES
+       export DONEPROFILE
+
+       # set up some sane defaults
+       echo 'erase ^?, werase ^W, kill ^U, intr ^C'
+       stty newcrt werase ^W intr ^C kill ^U erase ^?
+       echo ''
+
+       # mount the ramdisk read write
+       mount -u $ROOTDEV /
+
+       # mount the kern_fs so that we can examine the dmesg state
+       mount -t kernfs /kern /kern
+
+       # run the installation or upgrade script.
+       if [ -f sysinst ]; then
+               sysinst
+       fi
+fi
diff -r 24516cd1f0de -r 1123d9f2dacf distrib/riscv/ramdisk/list
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/distrib/riscv/ramdisk/list        Sat Mar 28 12:54:06 2015 +0000
@@ -0,0 +1,81 @@
+#      $NetBSD: list,v 1.1 2015/03/28 12:54:06 matt Exp $
+
+SRCDIRS        bin sbin external/bsd/less/bin usr.bin usr.sbin
+
+PROG   bin/cat
+PROG   bin/chmod
+PROG   bin/cp
+PROG   bin/date
+PROG   bin/dd
+PROG   bin/df
+PROG   bin/ed
+PROG   bin/ln
+PROG   bin/ls
+PROG   bin/mkdir
+PROG   bin/mv
+PROG   bin/pax         usr/bin/tar
+PROG   bin/ps
+PROG   bin/pwd
+PROG   bin/rm
+PROG   bin/rmdir
+PROG   bin/sh
+PROG   bin/stty
+PROG   bin/sync
+
+PROG   sbin/disklabel
+PROG   sbin/drvctl
+PROG   sbin/fdisk
+PROG   sbin/fsck
+PROG   sbin/fsck_ext2fs
+PROG   sbin/fsck_ffs
+PROG   sbin/fsck_msdos
+PROG   sbin/ifconfig
+PROG   sbin/init
+PROG   sbin/mknod
+PROG   sbin/mount
+PROG   sbin/mount_cd9660
+PROG   sbin/mount_ext2fs
+PROG   sbin/mount_ffs
+PROG   sbin/mount_kernfs
+PROG   sbin/mount_msdos
+PROG   sbin/mount_nfs
+PROG   sbin/mount_tmpfs
+PROG   sbin/newfs      sbin/mount_mfs
+PROG   sbin/newfs_ext2fs
+PROG   sbin/newfs_msdos
+PROG   sbin/ping
+PROG   sbin/reboot     sbin/halt
+PROG   sbin/restore    sbin/rrestore
+PROG   sbin/route
+PROG   sbin/shutdown
+PROG   sbin/swapctl
+PROG   sbin/sysctl
+PROG   sbin/umount
+
+PROG   usr/bin/chown   usr/sbin/chgrp
+PROG   usr/bin/ftp
+PROG   usr/bin/gzip    usr/bin/gzcat usr/bin/gunzip
+PROG   usr/bin/less    usr/bin/more
+PROG   usr/bin/sed
+PROG   usr/bin/tset
+PROG   usr/bin/vmstat
+
+PROG   usr/sbin/chroot
+#PROG  usr/sbin/flashctl
+
+SPECIAL        ping    srcdir  distrib/utils/x_ping
+
+LIBS   libhack.o -ledit -lutil -lcurses -lterminfo -lkvm -lrmt -lcrypt -ll -lm -llzma -lbz2 -lz -lprop
+
+# init invokes the shell as -sh
+ARGVLN sh -sh
+
+# various files that we need in /etc for the install
+COPY   ${NETBSDSRCDIR}/etc/group               etc/group
+COPY   ${NETBSDSRCDIR}/etc/master.passwd       etc/master.passwd
+COPY   ${NETBSDSRCDIR}/etc/netconfig           etc/netconfig
+COPY   ${DISTRIBDIR}/common/protocols          etc/protocols
+COPY   ${DISTRIBDIR}/common/services           etc/services
+
+# and the installation tools
+COPY   ${CURDIR}/dot.profile                   .profile



Home | Main Index | Thread Index | Old Index