1998-02-12 22:56:25 +03:00
|
|
|
# $NetBSD: Makefile,v 1.5 1998/02/12 19:56:25 gwr Exp $
|
1995-10-09 02:07:44 +03:00
|
|
|
|
|
|
|
TOP= ${.CURDIR}/..
|
|
|
|
|
|
|
|
# This include just sets REV=XX
|
|
|
|
.include "${TOP}/Makefile.inc"
|
|
|
|
|
|
|
|
IMAGE= ramdisk
|
|
|
|
CBIN= rd_bin
|
|
|
|
|
|
|
|
TREE= ${TOP}/common/${IMAGE}.tree
|
|
|
|
|
|
|
|
LISTS= ${TOP}/common/${CBIN}.list \
|
|
|
|
${TOP}/common/${IMAGE}.list
|
|
|
|
|
1998-02-12 22:56:25 +03:00
|
|
|
KERNEL3 = ${SRCSYSDIR}/arch/sun3/compile/RAMDISK/netbsd
|
|
|
|
KERNEL3X= ${SRCSYSDIR}/arch/sun3/compile/RAMDISK3X/netbsd
|
1995-11-22 00:18:48 +03:00
|
|
|
|
1995-10-09 02:07:44 +03:00
|
|
|
MOUNT_POINT= /mnt
|
1997-12-12 06:46:59 +03:00
|
|
|
#BDEV= /dev/md0
|
|
|
|
#CDEV= /dev/md0
|
|
|
|
BDEV= /dev/sd1b
|
|
|
|
CDEV= /dev/rsd1b
|
1995-10-09 02:07:44 +03:00
|
|
|
|
|
|
|
# These are all the parameters for the root fs: (256K)
|
1995-11-22 00:18:48 +03:00
|
|
|
DISKTYPE= rdroot
|
1995-10-09 02:07:44 +03:00
|
|
|
NBLKS= 512
|
1995-11-22 00:18:48 +03:00
|
|
|
# old format, minfree, opt, b/i trks, sects, cpg
|
1995-10-09 02:07:44 +03:00
|
|
|
NEWFSARGS= -O -m 0 -o space -i 2048 -t 2 -u 16 -c 16
|
|
|
|
|
1998-02-12 22:56:25 +03:00
|
|
|
CLEANFILES= netbsd-rd.sun3 netbsd-rd.sun3x rdsetroot ${IMAGE}.fs
|
1995-10-09 02:07:44 +03:00
|
|
|
|
1998-02-12 22:56:25 +03:00
|
|
|
all: netbsd-rd.sun3 netbsd-rd.sun3x
|
|
|
|
|
|
|
|
netbsd-rd.sun3 : rdsetroot ${IMAGE}.fs
|
|
|
|
cp ${KERNEL3} netbsd-tmp
|
|
|
|
./rdsetroot netbsd-tmp < ${IMAGE}.fs
|
|
|
|
-mv -f netbsd-tmp $@
|
|
|
|
|
|
|
|
netbsd-rd.sun3x : rdsetroot ${IMAGE}.fs
|
|
|
|
cp ${KERNEL3X} netbsd-tmp
|
1995-10-09 02:07:44 +03:00
|
|
|
./rdsetroot netbsd-tmp < ${IMAGE}.fs
|
|
|
|
-mv -f netbsd-tmp $@
|
|
|
|
|
|
|
|
rdsetroot: ${TOP}/common/rdsetroot.c
|
|
|
|
$(CC) -o $@ -DDEBUG ${TOP}/common/rdsetroot.c
|
|
|
|
|
1995-11-22 00:18:48 +03:00
|
|
|
${IMAGE}.fs: ${TREE} ${LISTS} ${CBIN}
|
|
|
|
-newfs ${NEWFSARGS} -s ${NBLKS} ${CDEV} ${DISKTYPE}
|
|
|
|
mount ${BDEV} ${MOUNT_POINT}
|
|
|
|
mtree -def ${TREE} -p ${MOUNT_POINT}/ -u
|
|
|
|
TOPDIR=${TOP} CURDIR=${.CURDIR} \
|
|
|
|
OBJDIR=${.OBJDIR} TARGDIR=${MOUNT_POINT} \
|
|
|
|
sh ${TOP}/common/RunList.sh ${LISTS}
|
|
|
|
sync
|
|
|
|
@echo ""
|
|
|
|
@df -i ${MOUNT_POINT}
|
|
|
|
@echo ""
|
|
|
|
-umount ${MOUNT_POINT}
|
1997-12-12 06:46:59 +03:00
|
|
|
dd if=${CDEV} of=$@ bs=16b \
|
|
|
|
count=`expr ${NBLKS} / 16`
|
1995-10-09 02:07:44 +03:00
|
|
|
|
1995-10-13 19:51:28 +03:00
|
|
|
# Do not delete this if I change my mind and kill make...
|
|
|
|
.PRECIOUS: ${IMAGE}.fs
|
|
|
|
|
1995-10-09 02:07:44 +03:00
|
|
|
# Rules for making ${CBIN} ...
|
|
|
|
.include "${TOP}/common/Make.crunch"
|
|
|
|
|
1995-11-22 00:18:48 +03:00
|
|
|
# This is listed in rd_bin.conf but is built here.
|
1995-10-09 02:07:44 +03:00
|
|
|
${CBIN} : libhack.o
|
|
|
|
|
|
|
|
# Use stubs to eliminate some large stuff from libc
|
|
|
|
HACKSRC=${TOP}/../utils/libhack
|
|
|
|
.include "${HACKSRC}/Makefile.inc"
|
|
|
|
|
|
|
|
clean cleandir:
|
1995-10-13 19:51:28 +03:00
|
|
|
-rm -f a.out core *.core *.o
|
|
|
|
-rm -f ${CLEANFILES}
|
1995-10-09 02:07:44 +03:00
|
|
|
|
|
|
|
# Standard rules needed by the above...
|
|
|
|
.include <bsd.obj.mk>
|