a05e3fce0a
- Use new boot system. Bootfloppies now use ustarfs. - Split instkernel.* directory from bootfloppy.*. - Adjust ramdisk size. - others. 2-floppy installation system cannot be compiled due to size bloat. Disabled temporarily (?).
75 lines
1.9 KiB
Makefile
75 lines
1.9 KiB
Makefile
# $NetBSD: Makefile.inc,v 1.5 2001/12/07 06:57:50 minoura Exp $
|
|
|
|
.include "${TOP}/Makefile.inc"
|
|
|
|
WARNS=1
|
|
|
|
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}c
|
|
VND_CRDEV= /dev/r${VND}c
|
|
IMAGE?= xxx.fs
|
|
MDEC= ${DESTDIR}/usr/mdec
|
|
|
|
LISTS= list
|
|
CRUNCHCONF= ${CBIN}.conf
|
|
MTREECONF= mtree.conf
|
|
|
|
CRUNCHGEN?= crunchgen
|
|
MTREE?= mtree
|
|
|
|
realall: ${IMAGE}
|
|
|
|
RAMDISKSIZE!= expr ${RAMDISKSPT} \* ${RAMDISKCYLS} \* ${RAMDISKHEADS}
|
|
RAMDISKGEOM= 512/${RAMDISKSPT}/${RAMDISKHEADS}/${RAMDISKCYLS}
|
|
|
|
${IMAGE}: ${CBIN} ${AUXDEPENDS} ${MTREECONF} ${LISTS}
|
|
dd if=/dev/zero of=${IMAGE} count=${RAMDISKSIZE}
|
|
vnconfig -v -c ${VND_CRDEV} ${IMAGE} ${RAMDISKGEOM}
|
|
newfs -B be -m 0 -o space -i ${RAMDISKBPI} -c ${RAMDISKCPG} ${VND_RDEV}
|
|
mount ${VND_DEV} ${MOUNT_POINT}
|
|
${MTREE} -def ${.CURDIR}/${MTREECONF} -p ${MOUNT_POINT}/ -U
|
|
TOPDIR=${TOP} CURDIR=${.CURDIR} OBJDIR=${.OBJDIR} \
|
|
KERNOBJDIR=${KERNOBJDIR} COMMONDIR=${TOP}/ramdisk-common \
|
|
TARGDIR=${MOUNT_POINT} sh ${TOP}/runlist.sh ${.CURDIR}/${LISTS}
|
|
@echo ""
|
|
@df -i ${MOUNT_POINT}
|
|
@echo ""
|
|
umount ${MOUNT_POINT}
|
|
vnconfig -u ${VND_CRDEV}
|
|
|
|
unconfig:
|
|
-umount -f ${MOUNT_POINT}
|
|
-vnconfig -u ${VND_RDEV}
|
|
-/bin/rm -f ${IMAGE}
|
|
|
|
${CBIN}.mk ${CBIN}.cache ${CBIN}.c: ${CRUNCHCONF}
|
|
${CRUNCHGEN} -D ${TOP}/../../.. -L ${DESTDIR}/usr/lib ${.ALLSRC}
|
|
|
|
${CBIN}: ${CBIN}.mk ${CBIN}.cache ${CBIN}.c
|
|
${MAKE} -f ${CBIN}.mk all
|
|
|
|
# Use size-reduced libhack.
|
|
${CBIN}: libhack.o
|
|
|
|
HACKSRC=${TOP}/../../utils/libhack
|
|
.include "${HACKSRC}/Makefile.inc"
|
|
|
|
# turn off small gethostby* temporarily
|
|
HACKOBJS:= getcap.o getgrent.o getnet.o getnetgr.o getpwent.o localeconv.o perror.o setlocale.o strerror.o strsignal.o utmp.o yplib.o
|
|
DBG= -Os
|
|
|
|
# Used in building bootfloppy
|
|
echoimage:
|
|
@echo ${.OBJDIR}/${IMAGE}
|
|
|
|
depend:
|
|
|
|
release:
|
|
|
|
clean cleandir distclean:
|
|
/bin/rm -f ${AUXCLEAN} *.core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache *.o *.cro *.c
|