c8099b4072
requirement to build as root on a system with vnconfig. Use ${KERNSRCDIR} and ${_SRC_TOP_} where appropriate Remove now-obsolete: list2sh.awk runlist.sh bootfloppy-common/list Bootfloppy-*/Makefile: don't need to set DISKTYPE or BLOCK8K any more Rename bootfloppy-common/Makefile.inc to common/Makefile.bootfloppy and fdset-common/Makefile.inc to common/Makefile.fdset This uses makefs instead of vnconfig and disklabel, thus removing the need for root privileges to build these floppies.. Add common/Makefile.ramdisk, to simplify ramdisk-*/Makefile. Uses shared ${_SRC_TOP_}/distrib/common/Makefile.crunch and ${_SRC_TOP_}/distrib/common/Makefile.image to even further simply things. Migrate ramdisk-*/dot.profile to a shared common/dot.profile, which detects whether it's an install or rescue profile based on the existance of /sysinst. Remove /dev generation code as init(8) now does that for us. Migrate common parts of */list to a shared common/list.ramdisk. Convert ramdisk-*/list to new format used by distrib/common/parselist.awk Don't bother running pwd_mkdb now that libhack's getpwent parses /etc/master.passwd instead of /etc/passwd. Migrate ramdisk-*/mtree.conf to a shared common/mtree.conf, which is now a new full-path-style specfile. Remove ramdisk-*/ramdiskbin.conf as it's now automatically generated from ramdisk-*/list by parselist.awk. Migrate ramdisk-*/termcap.mini to a shared common/termcap.mini. Remove unused ramdisk-{small,tiny}/disktab.preinstall. Use .for loops in kernel-*/Makefile to simply defining mostly-duplicated targets. ramdisk-*/Makefile: convert to using common/Makefile.ramdisk Remove unused ramdisk-*/dot.hdprofile.
95 lines
2.8 KiB
Makefile
95 lines
2.8 KiB
Makefile
# $NetBSD: Makefile.fdset,v 1.1 2002/02/03 16:22:22 lukem Exp $
|
|
|
|
# TOP is assumed to be defined by Makefile including this one.
|
|
|
|
BASENAME?= boot
|
|
IMAGE1?= ${BASENAME}1.fs
|
|
FSTMP= ustar.tmp
|
|
MDEC= ${DESTDIR}/usr/mdec
|
|
BOOTCODE?= ${MDEC}/biosboot.sym
|
|
#BOOTCODE= ${MDEC}/biosboot_com0.sym # Serial output
|
|
|
|
DISKSIZE?= 2880
|
|
|
|
CLEANFILES+= netbsd boot ustar.tmp
|
|
|
|
realall: netbsd boot
|
|
${PAX} -wvf ${FSTMP} boot netbsd
|
|
@echo
|
|
@echo Making disk number one
|
|
rm -rf empty
|
|
mkdir -m 755 empty
|
|
${MAKEFS} -s ${DISKSIZE}b ${IMAGE1}.tmp empty
|
|
dd bs=8k seek=1 count=$$((${DISKSIZE} / 16 - 1)) \
|
|
if=${FSTMP} of=${IMAGE1}.tmp
|
|
@echo "installing new bootblocks"
|
|
${MDEC}/installboot -b 17 -v -f ${BOOTCODE} ${IMAGE1}.tmp
|
|
@ls -l ${FSTMP} | (read mode links uid gid size junk; \
|
|
dksize=$$((${DISKSIZE} * 512 - 8 * 1024)); \
|
|
disks=$$(($$size / $$dksize + 1)); \
|
|
if test $$size -gt $$dksize; then \
|
|
d=2; \
|
|
while test $$d -le $$disks; do \
|
|
echo; \
|
|
echo Making disk number $$d.; \
|
|
IMAGE=${BASENAME}$${d}.fs; \
|
|
echo USTARFS $$d > $${IMAGE}; \
|
|
skip=$$((($$d - 1) * (${DISKSIZE} / 16 - 1))); \
|
|
if test $$d -eq $$disks; then \
|
|
dd bs=8k seek=1 skip=$${skip} \
|
|
conv=sync \
|
|
if=${FSTMP} of=$${IMAGE}; \
|
|
else \
|
|
dd bs=8k seek=1 skip=$${skip} \
|
|
conv=sync \
|
|
count=$$((${DISKSIZE} / 16 - 1)) \
|
|
if=${FSTMP} of=$${IMAGE}; \
|
|
fi; \
|
|
d=$$(($$d + 1)); \
|
|
done; \
|
|
else \
|
|
dd seek=$$(($${size} / 512 + 15)) count=1 \
|
|
if=/dev/zero of=${IMAGE1}; \
|
|
fi; \
|
|
echo; \
|
|
bytes=$$(($$dksize * $$disks - $$size)); \
|
|
echo "There are $$bytes ($$(($$bytes / 1024))K) bytes free\
|
|
on disk $$disks."; \
|
|
)
|
|
mv -f ${IMAGE1}.tmp ${IMAGE1}
|
|
|
|
# Let the kernel on the diskette be called "netbsd" although
|
|
# it is compressed. This is because the boot code will search
|
|
# for "netbsd" first, and calling it "netbsd" instead of "netbsd.gz"
|
|
# we avoid scanning all the diskettes before reading the file.
|
|
|
|
netbsd: ${KERN}
|
|
rm -f netbsd
|
|
cp ${KERN} netbsd
|
|
|
|
# This is "cheating", just so that we have the available
|
|
# space at the start of the tar file. Installboot will overwrite
|
|
# the start of the bootcode with the tail end of the "real", aligned
|
|
# second-stage boot loader when it is run (which is quite a bit shorter
|
|
# than the entire ${BOOTCODE} file, even when symbols are removed.
|
|
# (the first 15*512 bytes are put into the first 8K filesystem block,
|
|
# around the disklabel)
|
|
|
|
boot: ${BOOTCODE}
|
|
rm -f boot
|
|
cp ${BOOTCODE} boot
|
|
${STRIP} boot
|
|
|
|
release:
|
|
-mkdir -p ${RELEASEDIR}/installation/floppy
|
|
cp -p ${BASENAME}?.fs ${RELEASEDIR}/installation/floppy
|
|
|
|
clean cleandir distclean:
|
|
rm -f *.core ${CLEANFILES} ${BASENAME}?.fs ${IMAGE1}.tmp
|
|
rm -rf empty
|
|
|
|
.include <bsd.own.mk>
|
|
.include <bsd.obj.mk>
|
|
.include <bsd.subdir.mk>
|
|
|