First cut at ramdisk build infrastructure for arc with NDWO.

This commit is contained in:
tsutsui 2002-04-06 18:40:32 +00:00
parent dcdba279be
commit 7eaee407f7
4 changed files with 280 additions and 0 deletions

View File

@ -0,0 +1,38 @@
# $NetBSD: Makefile,v 1.1 2002/04/06 18:40:32 tsutsui Exp $
.include "${.CURDIR}/../../Makefile.inc"
.include <bsd.own.mk>
IMAGE= ramdisk.fs
IMAGESIZE= 2048k
MAKEFS_FLAGS= -f 15
WARNS= 1
DBG= -Os
CRUNCHBIN= ramdiskbin
LISTS= ${.CURDIR}/list # ${DISTRIBDIR}/common/list.sysinst
MTREECONF= ${DISTRIBDIR}/common/mtree.common
IMAGEENDIAN= le
MAKEDEVTARGETS= minimal
IMAGEDEPENDS= ${CRUNCHBIN} \
dot.profile termcap.mini \
${_SRC_TOP_}/etc/group ${_SRC_TOP_}/etc/master.passwd \
${_SRC_TOP_}/etc/netconfig ${_SRC_TOP_}/etc/protocols \
${_SRC_TOP_}/etc/services
# Use stubs to eliminate some large stuff from libc
HACKSRC= ${DISTRIBDIR}/utils/libhack
.include "${HACKSRC}/Makefile.inc"
${CRUNCHBIN}: libhack.o
realall: ${IMAGE}
release:
.include "${DISTRIBDIR}/common/Makefile.crunch"
.include "${DISTRIBDIR}/common/Makefile.makedev"
.include "${DISTRIBDIR}/common/Makefile.image"
.include <bsd.prog.mk>

View File

@ -0,0 +1,92 @@
# $NetBSD: dot.profile,v 1.1 2002/04/06 18:40:33 tsutsui Exp $
#
# Copyright (c) 1995 Jason R. Thorpe
# 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
if [ "X${DONEPROFILE}" = "X" ]; then
DONEPROFILE=YES
# set up some sane defaults
echo 'erase ^H, werase ^W, kill ^U, intr ^C, status ^T'
stty newcrt werase ^W intr ^C kill ^U erase ^H status ^T 9600
# mount root read-write
mount -u /dev/md0a /
# mount /tmp on mfs, to avoid filling the md
mount -t mfs swap /tmp
# get the terminal type
_forceloop=""
while [ "X${_forceloop}" = X"" ]; do
eval `tset -s -m ":?$TERM"`
if [ "X${TERM}" != X"unknown" ]; then
_forceloop="done"
fi
done
# Installing or upgrading?
_forceloop=""
while [ "X${_forceloop}" = X"" ]; do
echo -n '(I)nstall, (S)hell or (H)alt ? '
read _forceloop
case "$_forceloop" in
i*|I*)
# /sysinst
echo 'Sorry, sysinst is not ready on this port.'
/bin/sh
;;
s*|S*)
/bin/sh
;;
h*|H*)
/sbin/halt
;;
*)
_forceloop=""
;;
esac
done
fi

89
distrib/arc/ramdisk/list Normal file
View File

@ -0,0 +1,89 @@
# $NetBSD: list,v 1.1 2002/04/06 18:40:33 tsutsui Exp $
SRCDIRS bin sbin usr.bin usr.sbin
PROG bin/cat
PROG bin/chmod
PROG bin/cp
PROG bin/dd
PROG bin/df
PROG bin/ed
PROG bin/ln
PROG bin/ls
PROG bin/mkdir
PROG bin/mt
PROG bin/mv
PROG bin/pax usr/bin/tar
PROG bin/pwd
PROG bin/rcmd
PROG bin/rcp
PROG bin/rm
PROG bin/sh
PROG bin/stty
PROG bin/sync
PROG sbin/disklabel
PROG sbin/dmesg
PROG sbin/fdisk
PROG sbin/fsck
PROG sbin/fsck_ffs
PROG sbin/ifconfig
PROG sbin/init
PROG sbin/mbrlabel
PROG sbin/mknod
PROG sbin/mount
PROG sbin/mount_cd9660
PROG sbin/mount_ffs
PROG sbin/mount_msdos
PROG sbin/mount_nfs
PROG sbin/mount_ntfs
PROG sbin/newfs sbin/mount_mfs
PROG sbin/ping
PROG sbin/reboot sbin/halt
PROG sbin/restore sbin/rrestore
PROG sbin/route
PROG sbin/shutdown
PROG sbin/slattach
PROG sbin/swapctl sbin/swapon
PROG sbin/umount
PROG usr/bin/ftp
PROG usr/bin/gzip usr/bin/gzcat usr/bin/gunzip
PROG usr/bin/more
PROG usr/bin/sed
PROG usr/bin/tset
PROG usr/sbin/chown usr/bin/chgrp
PROG usr/sbin/chroot
SPECIAL dmesg srcdir distrib/utils/x_dmesg
SPECIAL ed srcdir distrib/utils/x_ed
SPECIAL ftp srcdir distrib/utils/x_ftp
SPECIAL gzip srcdir distrib/utils/x_gzip
SPECIAL ifconfig srcdir distrib/utils/x_ifconfig
SPECIAL more srcdir distrib/utils/more
SPECIAL mount srcdir distrib/utils/x_mount
SPECIAL ping srcdir distrib/utils/x_ping
SPECIAL route srcdir distrib/utils/x_route
SPECIAL umount srcdir distrib/utils/x_umount
LIBS libhack.o -ledit -lutil -lcurses -ltermcap -lrmt -ll -lm -lz
#COPY ${DESTDIR}/usr/mdec/boot usr/mdec/boot
# init invokes the shell as -sh
ARGVLN sh -sh
# various files that we need in /etc for the install
COPY ${_SRC_TOP_}/etc/group etc/group
COPY ${_SRC_TOP_}/etc/master.passwd etc/master.passwd
COPY ${_SRC_TOP_}/etc/netconfig etc/netconfig
COPY ${_SRC_TOP_}/etc/protocols etc/protocols
COPY ${_SRC_TOP_}/etc/services etc/services
# and the common installation tools
COPY ${CURDIR}/termcap.mini usr/share/misc/termcap
# and the boot script
COPY ${CURDIR}/dot.profile .profile
MTREE ./.profile type=file uname=root gname=wheel mode=0644

View File

@ -0,0 +1,61 @@
# $NetBSD: termcap.mini,v 1.1 2002/04/06 18:40:34 tsutsui Exp $
#
# Copyright (c) 1980, 1985, 1989 The Regents of the University of California.
# 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 by the University of
# California, Berkeley and its contributors.
# 4. Neither the name of the University nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``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 REGENTS OR CONTRIBUTORS 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.
#
# @(#)termcap.src 5.109 (Berkeley) 3/8/93
#
pc3|ibmpc3|IBM PC 386BSD Console:\
:DO=\E[%dB:K1=\E[H:K2=\E[E:K3=\E[I:K4=\E[F:K5=\E[G:LE=\E[%dD:\
:RI=\E[%dC:UP=\E[%dA:am:bl=^G:bs:cb=\E[1K:cd=\E[J:ce=\E[K:cl=\E[H\E[J:\
:cm=\E[%i%d;%dH:co#80:cr=^M:do=^J:ho=\E[H:is=\E[m:k0=\E[V:k1=\E[M:\
:k2=\E[N:k3=\E[O:k4=\E[P:k5=\E[Q:k6=\E[R:k7=\E[S:k8=\E[T:k9=\E[U:\
:kD=\177:kH=\E[F:kN=\E[G:kP=\E[I:kb=\177:kd=\E[B:kh=\E[H:kl=\E[D:\
:kr=\E[C:ku=\E[A:le=^H:li#25:ms:nd=\E[C:rs=\E[m\E[x\E[14r:se=\E[m:\
:sf=\E[S:so=\E[7m:sr=\E[T:ta=^I:te=\E[m:ti=\E[m:up=\E[A:km:pt:\
:AL=\E[%dL:DL=\E[%dM:SF=\E[%dS:SR=\E[%dT:al=\E[L:dl=\E[M:
vt100|vt100-am|dec vt100 (w/advanced video):\
:am:bs:ms:xn:xo:\
:co#80:it#8:li#24:vt#3:\
:@8=\EOM:DO=\E[%dB:K1=\EOq:K2=\EOr:K3=\EOs:K4=\EOp:K5=\EOn:\
:LE=\E[%dD:RA=\E[?7l:RI=\E[%dC:SA=\E[?7h:UP=\E[%dA:\
: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