evbsh3's ramdisk dirs to make ROM image.
This is example.
This commit is contained in:
parent
ca5dbcecd4
commit
d41a8befab
8
distrib/evbsh3/rom/Makefile.inc
Normal file
8
distrib/evbsh3/rom/Makefile.inc
Normal file
@ -0,0 +1,8 @@
|
||||
# $NetBSD: Makefile.inc,v 1.1 2000/09/18 07:21:01 msaitoh Exp $
|
||||
|
||||
.include "../../../Makefile.inc"
|
||||
|
||||
# REV is revision without dots, as in "12C"
|
||||
# VER is revision with dots, as in "1.2C"
|
||||
REV!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh -s
|
||||
VER!=sh ${BSDSRCDIR}/sys/conf/osrelease.sh
|
55
distrib/evbsh3/rom/list2sh.awk
Normal file
55
distrib/evbsh3/rom/list2sh.awk
Normal file
@ -0,0 +1,55 @@
|
||||
# $NetBSD: list2sh.awk,v 1.1 2000/09/18 07:21:01 msaitoh Exp $
|
||||
|
||||
BEGIN {
|
||||
printf("cd ${CURDIR}\n");
|
||||
printf("\n");
|
||||
}
|
||||
/^$/ || /^#/ {
|
||||
print $0;
|
||||
next;
|
||||
}
|
||||
$1 == "COPY" {
|
||||
printf("echo '%s'\n", $0);
|
||||
printf("rm -f ${TARGDIR}/%s\n", $3);
|
||||
printf("cp %s ${TARGDIR}/%s\n", $2, $3);
|
||||
next;
|
||||
}
|
||||
$1 == "LINK" {
|
||||
printf("echo '%s'\n", $0);
|
||||
printf("rm -f ${TARGDIR}/%s\n", $3);
|
||||
printf("(cd ${TARGDIR}; ln %s %s)\n", $2, $3);
|
||||
next;
|
||||
}
|
||||
$1 == "SYMLINK" {
|
||||
printf("echo '%s'\n", $0);
|
||||
printf("rm -f ${TARGDIR}/%s\n", $3);
|
||||
printf("(cd ${TARGDIR}; ln -s %s %s)\n", $2, $3);
|
||||
next;
|
||||
}
|
||||
$1 == "COPYDIR" {
|
||||
printf("echo '%s'\n", $0);
|
||||
printf("(cd ${TARGDIR}/%s && find . ! -name . | xargs /bin/rm -rf)\n",
|
||||
$3);
|
||||
printf("(cd %s && find . ! -name . | cpio -pdamu ${TARGDIR}/%s)\n", $2,
|
||||
$3);
|
||||
next;
|
||||
}
|
||||
$1 == "SPECIAL" {
|
||||
printf("echo '%s'\n", $0);
|
||||
printf("(cd ${TARGDIR};");
|
||||
for (i = 2; i <= NF; i++)
|
||||
printf(" %s", $i);
|
||||
printf(")\n");
|
||||
next;
|
||||
}
|
||||
{
|
||||
printf("echo '%s'\n", $0);
|
||||
printf("echo 'Unknown keyword \"%s\" at line %d of input.'\n", $1, NR);
|
||||
printf("exit 1\n");
|
||||
exit 1;
|
||||
}
|
||||
END {
|
||||
printf("\n");
|
||||
printf("exit 0\n");
|
||||
exit 0;
|
||||
}
|
135
distrib/evbsh3/rom/ramdiskcommon/list
Normal file
135
distrib/evbsh3/rom/ramdiskcommon/list
Normal file
@ -0,0 +1,135 @@
|
||||
# $NetBSD: list,v 1.1 2000/09/18 07:21:02 msaitoh Exp $
|
||||
|
||||
# various files that we need in /etc for the install
|
||||
COPY ${CURDIR}/../../../../etc/master.passwd etc/master.passwd
|
||||
#COPY ${CURDIR}/../../../../etc/etc.evbsh3/rc etc/rc
|
||||
COPY ${CURDIR}/../../../../etc/group etc/group
|
||||
COPY ${CURDIR}/../../../../etc/protocols etc/protocols
|
||||
COPY ${CURDIR}/../../../../etc/services etc/services
|
||||
COPY ${CURDIR}/../../../../etc/gettytab etc/gettytab
|
||||
#COPY ${CURDIR}/localtime etc/localtime
|
||||
COPY ${CURDIR}/../../../../etc/hosts etc/hosts
|
||||
COPY ${CURDIR}/../../../../etc/etc.evbsh3/ttys etc/ttys
|
||||
COPY ${CURDIR}/../ramdiskcommon/shells etc/shells
|
||||
#COPY ${CURDIR}/dot.profile etc/.profile
|
||||
#COPY ${CURDIR}/termcap.mini usr/share/misc/termcap
|
||||
#COPY ${CURDIR}/kvm.db var/db/kvm.db
|
||||
|
||||
#SPECIAL pwd_mkdb -p -d ./ etc/master.passwd
|
||||
#SPECIAL /bin/mv etc/master.passwd boot.evbsh3/master.passwd
|
||||
#SPECIAL /bin/mv etc/passwd boot.evbsh3/passwd
|
||||
#SPECIAL /bin/rm etc/spwd.db
|
||||
#SPECIAL /bin/rm etc/pwd.db
|
||||
#SPECIAL /bin/rm etc/master.passwd
|
||||
#SPECIAL /bin/rm -r etc
|
||||
|
||||
#SYMLINK /mfs/home home
|
||||
|
||||
#SPECIAL ( cd ${CURDIR}/../../../evbsh3/ucd-snmp/mibs/ ; tar --exclude CVS -cf - *.txt ) | ( cd usr/share/snmp/mibs/ ; tar xf - )
|
||||
|
||||
# copy the MAKEDEV script and make some devices
|
||||
COPY ${CURDIR}/../../../../etc/etc.evbsh3/MAKEDEV dev/MAKEDEV
|
||||
SPECIAL cd dev; sh MAKEDEV ramdisk
|
||||
SPECIAL /bin/rm dev/MAKEDEV
|
||||
|
||||
#COPY ${CURDIR}/../../../../etc/etc.evbsh3/ipf_supfail.conf boot.evbsh3/ipf_supfail.conf
|
||||
#COPY ${CURDIR}/../../../../etc/etc.evbsh3/syslog.conf boot.evbsh3/syslog.conf
|
||||
|
||||
#SPECIAL chmod 755 etc/rc
|
||||
|
||||
# copy the crunched binary, link to it, and kill it
|
||||
COPY ${OBJDIR}/ramdiskbin ramdiskbin
|
||||
SPECIAL chown 0:0 ramdiskbin
|
||||
#SPECIAL chmod 4755 ramdiskbin
|
||||
LINK ramdiskbin bin/cat
|
||||
LINK ramdiskbin bin/chmod
|
||||
LINK ramdiskbin bin/cp
|
||||
LINK ramdiskbin bin/date
|
||||
LINK ramdiskbin bin/dd
|
||||
LINK ramdiskbin bin/df
|
||||
LINK ramdiskbin bin/echo
|
||||
LINK ramdiskbin bin/ed
|
||||
LINK ramdiskbin bin/expr
|
||||
LINK ramdiskbin bin/hostname
|
||||
LINK ramdiskbin bin/kill
|
||||
LINK ramdiskbin bin/ln
|
||||
LINK ramdiskbin bin/ls
|
||||
LINK ramdiskbin bin/mkdir
|
||||
LINK ramdiskbin bin/mv
|
||||
LINK ramdiskbin bin/ps
|
||||
LINK ramdiskbin bin/rm
|
||||
LINK ramdiskbin bin/rmdir
|
||||
LINK ramdiskbin bin/pwd
|
||||
LINK ramdiskbin bin/sh
|
||||
LINK ramdiskbin bin/sleep
|
||||
LINK ramdiskbin bin/stty
|
||||
LINK ramdiskbin bin/sync
|
||||
LINK ramdiskbin bin/test
|
||||
LINK ramdiskbin bin/[
|
||||
LINK ramdiskbin sbin/dmesg
|
||||
LINK ramdiskbin sbin/ifconfig
|
||||
LINK ramdiskbin sbin/halt
|
||||
LINK ramdiskbin sbin/init
|
||||
LINK ramdiskbin sbin/ping
|
||||
LINK ramdiskbin sbin/reboot
|
||||
LINK ramdiskbin sbin/route
|
||||
LINK ramdiskbin sbin/mknod
|
||||
LINK ramdiskbin sbin/mount
|
||||
LINK ramdiskbin sbin/mount_ffs
|
||||
LINK ramdiskbin sbin/mount_mfs
|
||||
#LINK ramdiskbin sbin/mount_nfs
|
||||
LINK ramdiskbin sbin/mount_kernfs
|
||||
LINK ramdiskbin sbin/mount_procfs
|
||||
LINK ramdiskbin sbin/shutdown
|
||||
LINK ramdiskbin sbin/ttyflags
|
||||
LINK ramdiskbin sbin/umount
|
||||
|
||||
LINK ramdiskbin usr/libexec/comsat
|
||||
LINK ramdiskbin usr/libexec/fingerd
|
||||
LINK ramdiskbin usr/libexec/ftpd
|
||||
LINK ramdiskbin usr/libexec/getNAME
|
||||
LINK ramdiskbin usr/libexec/getty
|
||||
LINK ramdiskbin usr/libexec/identd
|
||||
|
||||
LINK ramdiskbin usr/bin/atrun
|
||||
LINK ramdiskbin usr/bin/login
|
||||
LINK ramdiskbin usr/bin/su
|
||||
LINK ramdiskbin bin/netstat
|
||||
|
||||
#LINK ramdiskbin usr/bin/tftp
|
||||
LINK ramdiskbin usr/bin/chgrp
|
||||
LINK ramdiskbin usr/bin/fstat
|
||||
LINK ramdiskbin usr/bin/ftp
|
||||
LINK ramdiskbin usr/bin/hexdump
|
||||
LINK ramdiskbin usr/bin/kdump
|
||||
LINK ramdiskbin usr/bin/ktrace
|
||||
LINK ramdiskbin usr/bin/telnet
|
||||
LINK ramdiskbin usr/bin/time
|
||||
LINK ramdiskbin bin/less
|
||||
LINK ramdiskbin bin/more
|
||||
LINK ramdiskbin bin/sort
|
||||
LINK ramdiskbin usr/bin/vmstat
|
||||
LINK ramdiskbin usr/bin/head
|
||||
LINK ramdiskbin usr/bin/tail
|
||||
|
||||
LINK ramdiskbin sbin/arp
|
||||
LINK ramdiskbin sbin/dev_mkdb
|
||||
LINK ramdiskbin sbin/traceroute
|
||||
|
||||
LINK ramdiskbin usr/sbin/chown
|
||||
LINK ramdiskbin usr/sbin/iostat
|
||||
LINK ramdiskbin usr/sbin/pstat
|
||||
#LINK ramdiskbin usr/sbin/rdate
|
||||
LINK ramdiskbin usr/sbin/sysctl
|
||||
LINK ramdiskbin usr/sbin/tcpdump
|
||||
|
||||
#LINK ramdiskbin bin/morse
|
||||
#LINK ramdiskbin sbin/spppd
|
||||
LINK ramdiskbin sbin/syslogd
|
||||
LINK ramdiskbin sbin/telnetd
|
||||
#LINK ramdiskbin sbin/flashwrite
|
||||
#LINK ramdiskbin sbin/wdogctl
|
||||
#LINK ramdiskbin sbin/ipl_getenv
|
||||
#LINK ramdiskbin sbin/ipl_setenv
|
||||
|
||||
#SPECIAL /bin/rm ramdiskbin
|
104
distrib/evbsh3/rom/ramdiskcommon/mtree.conf
Normal file
104
distrib/evbsh3/rom/ramdiskcommon/mtree.conf
Normal file
@ -0,0 +1,104 @@
|
||||
# $NetBSD: mtree.conf,v 1.1 2000/09/18 07:21:02 msaitoh Exp $
|
||||
|
||||
/set type=dir uname=root gname=wheel mode=0755
|
||||
# .
|
||||
.
|
||||
|
||||
# ./bin
|
||||
bin
|
||||
# ./bin
|
||||
..
|
||||
|
||||
# ./dev
|
||||
dev
|
||||
# ./dev
|
||||
..
|
||||
|
||||
# ./etc
|
||||
etc
|
||||
# ./etc
|
||||
..
|
||||
|
||||
# ./mnt
|
||||
mnt
|
||||
# ./mnt
|
||||
..
|
||||
|
||||
# ./kern
|
||||
kern
|
||||
# ./kern
|
||||
..
|
||||
|
||||
# ./proc
|
||||
proc
|
||||
# ./proc
|
||||
..
|
||||
|
||||
# ./root
|
||||
root
|
||||
# ./root
|
||||
..
|
||||
|
||||
# ./sbin
|
||||
sbin
|
||||
# ./sbin
|
||||
..
|
||||
|
||||
# ./tmp
|
||||
#tmp mode=01777
|
||||
# ./tmp
|
||||
#..
|
||||
|
||||
# ./usr
|
||||
usr
|
||||
|
||||
# ./usr/bin
|
||||
bin
|
||||
# ./usr/bin
|
||||
..
|
||||
|
||||
# ./usr/sbin
|
||||
sbin
|
||||
# ./usr/sbin
|
||||
..
|
||||
|
||||
# ./usr/libexec
|
||||
libexec
|
||||
# ./usr/libexec
|
||||
..
|
||||
|
||||
# ./usr/share
|
||||
share
|
||||
|
||||
# ./usr/share/misc
|
||||
misc
|
||||
# ./usr/share/misc
|
||||
..
|
||||
|
||||
# ./usr/share
|
||||
..
|
||||
|
||||
# ./usr
|
||||
..
|
||||
|
||||
# ./var
|
||||
var
|
||||
|
||||
# ./var/db
|
||||
db
|
||||
..
|
||||
|
||||
# ./var/log
|
||||
#log
|
||||
#..
|
||||
|
||||
# ./var/run
|
||||
#run
|
||||
#..
|
||||
|
||||
# ./var/tmp
|
||||
#tmp mode=01777
|
||||
#..
|
||||
|
||||
# ./var
|
||||
..
|
95
distrib/evbsh3/rom/ramdiskcommon/ramdiskbin.conf
Normal file
95
distrib/evbsh3/rom/ramdiskcommon/ramdiskbin.conf
Normal file
@ -0,0 +1,95 @@
|
||||
# $NetBSD: ramdiskbin.conf,v 1.1 2000/09/18 07:21:02 msaitoh Exp $
|
||||
|
||||
srcdirs bin sbin libexec usr.bin usr.sbin gnu/usr.bin
|
||||
|
||||
# /stone
|
||||
#progs syslogd telnetd
|
||||
#progs morse flashwrite
|
||||
#progs wdogctl ipl_getenv
|
||||
|
||||
#special flashwrite srcdir stone/hash/flashwrite
|
||||
#special ipl_getenv srcdir stone/getenv
|
||||
#ln ipl_getenv ipl_setenv
|
||||
|
||||
# /bin
|
||||
progs cat chmod cp date dd df echo ed expr hostname kill ln ls mkdir mv
|
||||
progs pax ps pwd rm rmdir sh sleep stty sync test
|
||||
#progs chio csh domainname ksh mt mv pcmd rcp
|
||||
special dd srcdir distrib/utils/x_dd
|
||||
#special sh srcdir distrib/utils/x_sh
|
||||
|
||||
# /sbin
|
||||
progs dmesg ifconfig init mknod mount mount_ffs mount_kernfs mount_procfs newfs
|
||||
progs ping ping6 rcorder reboot route shutdown swapctl ttyflags umount
|
||||
#progs atactl badsect bim ccdconfig clri disklabel dump dump_lfs edlabel
|
||||
#progs fastboot fsck fsck_ext3fs fsck_ffs fsck_lfs fsck_msdos fsdb
|
||||
#progs fsirand ldconfig lmcctl modload modunload mount_cd9660 mount_ext2fs
|
||||
#progs mount_fdesc mount_filecore mount_lfs mount_msdos
|
||||
#progs mount_nfs mount_ntfs mount_nullfs mount_overlay mount_portal
|
||||
#progs mount_umap mount_union newbtconf newfs_lfs newfs_msdos
|
||||
#progs nologin raidctl restore rndctl routed rtsold savecore scsictl setkey
|
||||
#progs slattach tunefs wsconsctl
|
||||
special dmesg srcdir distrib/utils/x_dmesg
|
||||
#special ifconfig srcdir distrib/utils/x_ifconfig
|
||||
#special ping srcdir distrib/utils/x_ping
|
||||
special route srcdir distrib/utils/x_route
|
||||
#progs sysctl
|
||||
#special sysctl srcdir distrib/utils/x_sysctl
|
||||
|
||||
# libexec
|
||||
progs atrun comsat fingerd ftpd getNAME getty identd makekey makewhatis
|
||||
progs tftpd
|
||||
#progs telnetd
|
||||
|
||||
# /usr/bin
|
||||
progs apply apropos asa at banner basename biff bzip2 bzip2recover cal
|
||||
progs calendar cap_mkdb chflags chpass cksum cmp col colcrt colrm column comm
|
||||
progs compress crontab ctags cut dirname du env file find finger from fsplit
|
||||
progs fstat ftp gencat getopt head hexdump id
|
||||
progs indent ipcrm ipcs join jot kdump ktrace lam last lastcomm leave less
|
||||
progs lex lock logger login logname look m4 mail man menuc mesg mkdep
|
||||
progs mkfifo mkstr mktemp msgc msgs netgroup netstat newsyslog nfsstat
|
||||
progs nice nl nohup paste patch pr printenv printf quota renice rev rpcgen
|
||||
progs rpcinfo rs sed showmount shuffle skey skeyinfo skeyinit soelim
|
||||
progs su systat tail tee tftp time touch tset tsort tty uname
|
||||
progs uniq users vmstat w wc who xargs yes
|
||||
#progs telnet
|
||||
#progs audio bdes cdplay checknr compile_et
|
||||
#progs crunch eject elf2aout elf2ecoff
|
||||
#progs telnet
|
||||
#progs tftp
|
||||
special less srcdir usr.bin/less/less
|
||||
special netstat srcdir distrib/utils/x_netstat
|
||||
ln cksum sum
|
||||
ln cksum md5
|
||||
ln less more
|
||||
ln compress uncompress
|
||||
ln hexdump od
|
||||
ln id groups
|
||||
ln id whoami
|
||||
ln systat sysstat
|
||||
ln tset reset
|
||||
ln w uptime
|
||||
#progs false machine pagesize true which
|
||||
|
||||
# /usr/sbin
|
||||
progs chown dev_mkdb iostat kvm_mkdb
|
||||
progs mtree pstat pwd_mkdb syslogd traceroute
|
||||
# progs inetd rpcbind tcpdump
|
||||
# progs arp
|
||||
ln chown chgrp
|
||||
|
||||
# gnu/usr.bin
|
||||
progs sort
|
||||
|
||||
ln sh -sh
|
||||
ln test [
|
||||
ln newfs mount_mfs
|
||||
ln reboot halt
|
||||
ln swapctl swapon
|
||||
|
||||
libs -lbz2 -ledit -lutil -lcurses -ltermcap -lpcap -ll -lcrypt -lutil -lkvm -lm -lskey -lipsec -lrpcsvc -lz
|
||||
# -l telnet
|
||||
# -ldes -lkrb5
|
||||
# -lkrb5 -lasn1 -lkrb -lcrypto -lroken -lcom_err
|
||||
# libhack -lwrap
|
1
distrib/evbsh3/rom/ramdiskcommon/shells
Normal file
1
distrib/evbsh3/rom/ramdiskcommon/shells
Normal file
@ -0,0 +1 @@
|
||||
/bin/sh
|
91
distrib/evbsh3/rom/ramdiskeb/Makefile
Normal file
91
distrib/evbsh3/rom/ramdiskeb/Makefile
Normal file
@ -0,0 +1,91 @@
|
||||
# $NetBSD: Makefile,v 1.1 2000/09/18 07:21:02 msaitoh Exp $
|
||||
|
||||
TOP= ${.CURDIR}/..
|
||||
WARNS=1
|
||||
|
||||
.include "${TOP}/Makefile.inc"
|
||||
IMAGE= ramdisk.fs
|
||||
|
||||
CBIN= ramdiskbin
|
||||
|
||||
MOUNT_POINT?= /mnt
|
||||
# DEV/RDEV file system device, CDEV/RDEV vnconfig device
|
||||
VND?= vnd0
|
||||
VND_DEV= /dev/${VND}a
|
||||
VND_RDEV= /dev/r${VND}a
|
||||
VND_CDEV= /dev/${VND}d
|
||||
VND_CRDEV= /dev/r${VND}d
|
||||
IMAGE?= xxx.fs
|
||||
MDEC= ${DESTDIR}/usr/mdec
|
||||
|
||||
SUDO= sudo
|
||||
CRUNCHGEN= /usr/local/bin/sh-crunchgen
|
||||
DISKLABEL= ${SUDO} disklabel
|
||||
MOUNT= ${SUDO} mount
|
||||
MTREE= ${SUDO} mtree
|
||||
NEWFS= ${SUDO} newfs
|
||||
UMOUNT= ${SUDO} umount
|
||||
VNCONFIG= ${SUDO} vnconfig
|
||||
|
||||
LISTS= ../ramdiskcommon/list
|
||||
CRUNCHCONF= ../ramdiskcommon/${CBIN}.conf
|
||||
MTREECONF= ../ramdiskcommon/mtree.conf
|
||||
|
||||
RAMDISKSPC= 128
|
||||
RAMDISKCYLS= 54
|
||||
RAMDISKSIZE!= expr ${RAMDISKSPC} \* ${RAMDISKCYLS}
|
||||
|
||||
realall: ${IMAGE}
|
||||
|
||||
${IMAGE}: ${CBIN} ${MTREECONF} ${LISTS}
|
||||
rm -f ${IMAGE}.tmp
|
||||
dd if=/dev/zero of=${IMAGE}.tmp count=${RAMDISKSIZE}
|
||||
${VNCONFIG} -v -c ${VND_CDEV} ${IMAGE}.tmp \
|
||||
512/${RAMDISKSPC}/1/${RAMDISKCYLS}
|
||||
-${DISKLABEL} ${VND_CDEV} >tmplabel
|
||||
${DISKLABEL} -r -R ${VND_CDEV} tmplabel
|
||||
${NEWFS} -B be -m 0 -o space ${VND_RDEV}
|
||||
${MOUNT} ${VND_DEV} ${MOUNT_POINT}
|
||||
${MTREE} -def ${.CURDIR}/${MTREECONF} -p ${MOUNT_POINT}/ -U
|
||||
TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
|
||||
TARGDIR=${MOUNT_POINT} ${SUDO} sh ${TOP}/runlist.sh \
|
||||
${.CURDIR}/${LISTS}
|
||||
@echo ""
|
||||
@df -i ${MOUNT_POINT}
|
||||
@echo ""
|
||||
${UMOUNT} ${MOUNT_POINT}
|
||||
${VNCONFIG} -u ${VND_CDEV}
|
||||
mv -f ${IMAGE}.tmp ${IMAGE}
|
||||
|
||||
unconfig:
|
||||
-${UMOUNT} -f ${MOUNT_POINT}
|
||||
-${VNCONFIG} -u ${VND_DEV}
|
||||
-/bin/rm -f ${IMAGE}.tmp
|
||||
|
||||
${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
|
||||
${CRUNCHGEN} -D ${TOP}/../../.. -L ${.CURDIR} ${.ALLSRC}
|
||||
|
||||
${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
|
||||
PATH=/usr/local/sh-evbsh3112-netbsdcoff/bin:${PATH} \
|
||||
make -f ${CBIN}.mk all
|
||||
|
||||
# This is listed in stonebin.conf but is built here.
|
||||
#${CBIN}: libhack.o
|
||||
|
||||
# Use stubs to eliminate some large stuff from libc
|
||||
HACKSRC=${TOP}/../../utils/libhack
|
||||
.include "${HACKSRC}/Makefile.inc"
|
||||
|
||||
mount:
|
||||
${VNCONFIG} -v -c ${VND_CDEV} ${IMAGE} \
|
||||
512/${RAMDISKSPC}/1/${RAMDISKCYLS}
|
||||
${MOUNT} ${VND_DEV} ${MOUNT_POINT}
|
||||
|
||||
clean cleandir distclean:
|
||||
/bin/rm -f ${AUXCLEAN} *.core ${IMAGE} ${IMAGE}.tmp ${CBIN} \
|
||||
${CBIN}.mk ${CBIN}.cache *.o *.cro *.c tmplabel
|
||||
|
||||
.include <bsd.own.mk>
|
||||
.include <bsd.obj.mk>
|
||||
.include <bsd.subdir.mk>
|
||||
.include <bsd.sys.mk>
|
91
distrib/evbsh3/rom/ramdiskel/Makefile
Normal file
91
distrib/evbsh3/rom/ramdiskel/Makefile
Normal file
@ -0,0 +1,91 @@
|
||||
# $NetBSD: Makefile,v 1.1 2000/09/18 07:21:02 msaitoh Exp $
|
||||
|
||||
TOP= ${.CURDIR}/..
|
||||
WARNS=1
|
||||
|
||||
.include "${TOP}/Makefile.inc"
|
||||
IMAGE= ramdisk.fs
|
||||
|
||||
CBIN= ramdiskbin
|
||||
|
||||
MOUNT_POINT?= /mnt
|
||||
# DEV/RDEV file system device, CDEV/RDEV vnconfig device
|
||||
VND?= vnd0
|
||||
VND_DEV= /dev/${VND}a
|
||||
VND_RDEV= /dev/r${VND}a
|
||||
VND_CDEV= /dev/${VND}d
|
||||
VND_CRDEV= /dev/r${VND}d
|
||||
IMAGE?= xxx.fs
|
||||
MDEC= ${DESTDIR}/usr/mdec
|
||||
|
||||
SUDO= sudo
|
||||
CRUNCHGEN= /usr/local/bin/sh-crunchgen
|
||||
DISKLABEL= ${SUDO} disklabel
|
||||
MOUNT= ${SUDO} mount
|
||||
MTREE= ${SUDO} mtree
|
||||
NEWFS= ${SUDO} newfs
|
||||
UMOUNT= ${SUDO} umount
|
||||
VNCONFIG= ${SUDO} vnconfig
|
||||
|
||||
LISTS= ../ramdiskcommon/list
|
||||
CRUNCHCONF= ../ramdiskcommon/${CBIN}.conf
|
||||
MTREECONF= ../ramdiskcommon/mtree.conf
|
||||
|
||||
RAMDISKSPC= 128
|
||||
RAMDISKCYLS= 54
|
||||
RAMDISKSIZE!= expr ${RAMDISKSPC} \* ${RAMDISKCYLS}
|
||||
|
||||
realall: ${IMAGE}
|
||||
|
||||
${IMAGE}: ${CBIN} ${MTREECONF} ${LISTS}
|
||||
rm -f ${IMAGE}.tmp
|
||||
dd if=/dev/zero of=${IMAGE}.tmp count=${RAMDISKSIZE}
|
||||
${VNCONFIG} -v -c ${VND_CDEV} ${IMAGE}.tmp \
|
||||
512/${RAMDISKSPC}/1/${RAMDISKCYLS}
|
||||
-${DISKLABEL} ${VND_CDEV} >tmplabel
|
||||
${DISKLABEL} -r -R ${VND_CDEV} tmplabel
|
||||
${NEWFS} -B le -m 0 -o space ${VND_RDEV}
|
||||
${MOUNT} ${VND_DEV} ${MOUNT_POINT}
|
||||
${MTREE} -def ${.CURDIR}/${MTREECONF} -p ${MOUNT_POINT}/ -U
|
||||
TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
|
||||
TARGDIR=${MOUNT_POINT} ${SUDO} sh ${TOP}/runlist.sh \
|
||||
${.CURDIR}/${LISTS}
|
||||
@echo ""
|
||||
@df -i ${MOUNT_POINT}
|
||||
@echo ""
|
||||
${UMOUNT} ${MOUNT_POINT}
|
||||
${VNCONFIG} -u ${VND_CDEV}
|
||||
mv -f ${IMAGE}.tmp ${IMAGE}
|
||||
|
||||
unconfig:
|
||||
-${UMOUNT} -f ${MOUNT_POINT}
|
||||
-${VNCONFIG} -u ${VND_DEV}
|
||||
-/bin/rm -f ${IMAGE}.tmp
|
||||
|
||||
${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
|
||||
${CRUNCHGEN} -D ${TOP}/../../.. -L ${.CURDIR} ${.ALLSRC}
|
||||
|
||||
${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
|
||||
PATH=/usr/local/shel-evbsh3112-netbsdcoff/bin:${PATH} \
|
||||
make -f ${CBIN}.mk all
|
||||
|
||||
# This is listed in stonebin.conf but is built here.
|
||||
#${CBIN}: libhack.o
|
||||
|
||||
# Use stubs to eliminate some large stuff from libc
|
||||
HACKSRC=${TOP}/../../utils/libhack
|
||||
.include "${HACKSRC}/Makefile.inc"
|
||||
|
||||
mount:
|
||||
${VNCONFIG} -v -c ${VND_CDEV} ${IMAGE} \
|
||||
512/${RAMDISKSPC}/1/${RAMDISKCYLS}
|
||||
${MOUNT} ${VND_DEV} ${MOUNT_POINT}
|
||||
|
||||
clean cleandir distclean:
|
||||
/bin/rm -f ${AUXCLEAN} *.core ${IMAGE} ${IMAGE}.tmp ${CBIN} \
|
||||
${CBIN}.mk ${CBIN}.cache *.o *.cro *.c tmplabel
|
||||
|
||||
.include <bsd.own.mk>
|
||||
.include <bsd.obj.mk>
|
||||
.include <bsd.subdir.mk>
|
||||
.include <bsd.sys.mk>
|
13
distrib/evbsh3/rom/runlist.sh
Normal file
13
distrib/evbsh3/rom/runlist.sh
Normal file
@ -0,0 +1,13 @@
|
||||
# $NetBSD: runlist.sh,v 1.1 2000/09/18 07:21:02 msaitoh Exp $
|
||||
|
||||
if [ "X$1" = "X-d" ]; then
|
||||
SHELLCMD=cat
|
||||
shift
|
||||
else
|
||||
SHELLCMD="sh -e"
|
||||
fi
|
||||
|
||||
( while [ "X$1" != "X" ]; do
|
||||
cat $1
|
||||
shift
|
||||
done ) | awk -f ${TOPDIR}/list2sh.awk | ${SHELLCMD}
|
Loading…
Reference in New Issue
Block a user