- Convert to using distrib/common/buildfloppies.sh, which can build both
single and multi-volume floppies in better fashion that the crufty shell commands in the various Makefiles. - Move fdset* -> bootfloppy*, as that's more consistent
This commit is contained in:
parent
bbdbd9ab37
commit
33e7bb62d6
|
@ -1,12 +1,12 @@
|
|||
# $NetBSD: Makefile,v 1.28 2002/04/11 12:17:14 lukem Exp $
|
||||
# $NetBSD: Makefile,v 1.29 2002/04/16 05:23:33 lukem Exp $
|
||||
|
||||
SUBDIR= ramdisk-big ramdisk-small ramdisk-tiny \
|
||||
ramdisk-rescuesmall ramdisk-rescuetiny \
|
||||
.WAIT \
|
||||
kernel-ramdisk kernel-rescue \
|
||||
.WAIT \
|
||||
fdset fdset-com fdset-laptop \
|
||||
bootfloppy-big bootfloppy-ps2 bootfloppy-small bootfloppy-tiny \
|
||||
bootfloppy bootfloppy-big bootfloppy-com bootfloppy-laptop \
|
||||
bootfloppy-ps2 bootfloppy-small bootfloppy-tiny \
|
||||
rescue-small rescue-tiny
|
||||
|
||||
TARGETS+= release
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.16 2002/04/11 12:17:14 lukem Exp $
|
||||
# $NetBSD: Makefile,v 1.17 2002/04/16 05:23:37 lukem Exp $
|
||||
|
||||
# This Makefile builds a boot image on a 2.88M-sized image.
|
||||
#
|
||||
|
@ -14,12 +14,11 @@
|
|||
# This should place the image in i386-cd.img, which can hopefully
|
||||
# be used to burn a CD.
|
||||
|
||||
IMAGE= boot-big.fs
|
||||
KERNELDIR= kernel-ramdisk
|
||||
KERNEL= netbsd.INSTALL.gz
|
||||
DISKSIZE= 5760
|
||||
METAFILE!= printf "USTAR.volsize.%o" ${DISKSIZE}
|
||||
BLOCK8K= 359
|
||||
PAD= yes
|
||||
FLOPPYBASE= boot-big
|
||||
FLOPPYSIZE= 5760
|
||||
FLOPPYPAD= 1
|
||||
FLOPPYKERNDIR= kernel-ramdisk
|
||||
FLOPPYKERNEL= netbsd.INSTALL.gz
|
||||
FLOPPYMETA!= printf "USTAR.volsize.%o" ${FLOPPYSIZE}
|
||||
|
||||
.include "${.CURDIR}/../common/Makefile.bootfloppy"
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
# $NetBSD: Makefile,v 1.1 2002/04/16 05:23:38 lukem Exp $
|
||||
|
||||
FLOPPYBASE= boot-com
|
||||
FLOPPYMAX= 2
|
||||
FLOPPYKERNDIR= kernel-ramdisk
|
||||
FLOPPYKERNEL= netbsd.INSTALL.gz
|
||||
FLOPPYBOOTCODE= ${DESTDIR}/usr/mdec/biosboot_com0.sym # Serial output
|
||||
|
||||
.include "${.CURDIR}/../common/Makefile.bootfloppy"
|
|
@ -0,0 +1,8 @@
|
|||
# $NetBSD: Makefile,v 1.1 2002/04/16 05:23:38 lukem Exp $
|
||||
|
||||
FLOPPYBASE= bootlap
|
||||
FLOPPYMAX= 2
|
||||
FLOPPYKERNDIR= kernel-ramdisk
|
||||
FLOPPYKERNEL= netbsd.INSTALL_LAPTOP.gz
|
||||
|
||||
.include "${.CURDIR}/../common/Makefile.bootfloppy"
|
|
@ -1,8 +1,7 @@
|
|||
# $NetBSD: Makefile,v 1.6 2002/04/11 12:17:14 lukem Exp $
|
||||
# $NetBSD: Makefile,v 1.7 2002/04/16 05:23:39 lukem Exp $
|
||||
|
||||
IMAGE= boot-ps2.fs
|
||||
KERNELDIR= kernel-ramdisk
|
||||
KERNEL= netbsd.INSTALL_PS2.gz
|
||||
DISKSIZE= 2880
|
||||
FLOPPYBASE= boot-ps2
|
||||
FLOPPYKERNDIR= kernel-ramdisk
|
||||
FLOPPYKERNEL= netbsd.INSTALL_PS2.gz
|
||||
|
||||
.include "${.CURDIR}/../common/Makefile.bootfloppy"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# $NetBSD: Makefile,v 1.13 2002/04/11 12:17:15 lukem Exp $
|
||||
# $NetBSD: Makefile,v 1.14 2002/04/16 05:23:39 lukem Exp $
|
||||
|
||||
IMAGE= boot-small.fs
|
||||
KERNELDIR= kernel-ramdisk
|
||||
KERNEL= netbsd.INSTALL_SMALL.gz
|
||||
DISKSIZE= 2400
|
||||
FLOPPYBASE= boot-small
|
||||
FLOPPYSIZE= 2400
|
||||
FLOPPYKERNDIR= kernel-ramdisk
|
||||
FLOPPYKERNEL= netbsd.INSTALL_SMALL.gz
|
||||
|
||||
.include "${.CURDIR}/../common/Makefile.bootfloppy"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# $NetBSD: Makefile,v 1.10 2002/04/11 12:17:15 lukem Exp $
|
||||
# $NetBSD: Makefile,v 1.11 2002/04/16 05:23:40 lukem Exp $
|
||||
|
||||
IMAGE= boot-tiny.fs
|
||||
KERNELDIR= kernel-ramdisk
|
||||
KERNEL= netbsd.INSTALL_TINY.gz
|
||||
DISKSIZE= 2400
|
||||
FLOPPYBASE= boot-tiny
|
||||
FLOPPYSIZE= 2400
|
||||
FLOPPYKERNDIR= kernel-ramdisk
|
||||
FLOPPYKERNEL= netbsd.INSTALL_TINY.gz
|
||||
|
||||
.include "${.CURDIR}/../common/Makefile.bootfloppy"
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
# $NetBSD: Makefile,v 1.8 2002/04/16 05:23:36 lukem Exp $
|
||||
|
||||
FLOPPYBASE= boot
|
||||
FLOPPYMAX= 2
|
||||
FLOPPYKERNDIR= kernel-ramdisk
|
||||
FLOPPYKERNEL= netbsd.INSTALL.gz
|
||||
|
||||
.include "${.CURDIR}/../common/Makefile.bootfloppy"
|
|
@ -1,95 +1,76 @@
|
|||
# $NetBSD: Makefile.bootfloppy,v 1.6 2002/04/11 12:22:58 lukem Exp $
|
||||
# $NetBSD: Makefile.bootfloppy,v 1.7 2002/04/16 05:23:40 lukem Exp $
|
||||
#
|
||||
# Makefile snippet to create a set of USTAR floppies
|
||||
#
|
||||
|
||||
.include <bsd.own.mk>
|
||||
.include "${_SRC_TOP_}/distrib/Makefile.inc"
|
||||
|
||||
# needs the following set:
|
||||
# IMAGE image name
|
||||
# KERNELDIR where kernel is grabbed from
|
||||
# KERNEL kernel name
|
||||
# DISKSIZE size of image in 0.5K blocks
|
||||
#
|
||||
# Required variables:
|
||||
# _SRC_TOP_ Top level of src tree (set by <bsd.own.mk>)
|
||||
# FLOPPYBASE Basename of floppies. Floppy number ${n} will
|
||||
# be generated as ${FLOPPYBASE}${n}.fs
|
||||
# FLOPPYKERNEL Kernel to copy
|
||||
# FLOPPYKERNDIR ${FLOPPYKERNEL} is from ${.CURDIR}/../${FLOPPYKERNDIR}
|
||||
|
||||
FSTMP= ustar.tmp
|
||||
MDEC= ${DESTDIR}/usr/mdec
|
||||
BOOTCODE?= ${MDEC}/biosboot.sym
|
||||
#BOOTCODE= ${MDEC}/biosboot_com0.sym # Serial output
|
||||
#
|
||||
# Optional variables:
|
||||
# FLOPPYSIZE Size of floppy in 512 byte blocks. [2880]
|
||||
# FLOPPYMAX Maximum number of floppies to build. [1]
|
||||
# If 1, final image is installed as ${FLOPPYBASE}.fs
|
||||
# FLOPPYBOOTCODE Boot blocks to use. [${DESTDIR}/usr/mdec/biosboot.sym]
|
||||
# FLOPPYMETA ustar metafile (written between "boot" & "netbsd")
|
||||
# FLOPPYPAD If defined, pad the last floppy to ${FLOPPYSIZE}
|
||||
#
|
||||
|
||||
CLEANFILES+= netbsd boot ustar.tmp ${METAFILE} ${IMAGE} ${IMAGE}.tmp
|
||||
FLOPPYSIZE?= 2880
|
||||
FLOPPYMAX?= 1
|
||||
FLOPPYBOOTCODE?=${DESTDIR}/usr/mdec/biosboot.sym
|
||||
FLOPPYFILES= boot ${FLOPPYMETA} netbsd
|
||||
|
||||
realall: ${IMAGE}
|
||||
FLOPPYKERNOBJ!= cd ${.CURDIR}/../${FLOPPYKERNDIR} && ${PRINTOBJDIR}
|
||||
|
||||
${IMAGE}: netbsd boot
|
||||
if test "${METAFILE}" != ""; then \
|
||||
touch ${METAFILE}; \
|
||||
fi
|
||||
${PAX} -wvf ${FSTMP} boot ${METAFILE} netbsd
|
||||
@echo
|
||||
@echo Making disk number one
|
||||
rm -rf empty
|
||||
mkdir -m 755 empty
|
||||
${MAKEFS} -s ${DISKSIZE}b ${IMAGE}.tmp empty
|
||||
dd bs=8k seek=1 count=$$((${DISKSIZE} / 16 - 1)) \
|
||||
if=${FSTMP} of=${IMAGE}.tmp
|
||||
@echo "installing new bootblocks"
|
||||
${MDEC}/installboot -b 17 -v -f ${BOOTCODE} ${IMAGE}.tmp
|
||||
# XXXDISTRIB
|
||||
@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 \
|
||||
bytes=$$(($$size - $$dksize)); \
|
||||
echo "Image is $$bytes ($$(($$bytes / 1024))K) too big\
|
||||
to fit on one disk."; \
|
||||
exit 1; \
|
||||
else \
|
||||
dd seek=$$(($${size} / 512 + 15)) count=1 \
|
||||
if=/dev/zero of=${IMAGE}.tmp; \
|
||||
fi; \
|
||||
echo; \
|
||||
bytes=$$(($$dksize * $$disks - $$size)); \
|
||||
if test "${PAD}" = "yes"; then \
|
||||
size=$$(($$size + 8 * 1024)); \
|
||||
echo "Padding image with $$bytes bytes from $$size"; \
|
||||
sectors=$$(($$bytes / 512)); \
|
||||
ssize=$$(($$size / 512)); \
|
||||
dd if=/dev/zero bs=512 seek=$${ssize} of=${IMAGE}.tmp \
|
||||
count=$${sectors}; \
|
||||
else \
|
||||
echo "There are $$bytes ($$(($$bytes / 1024))K) bytes\
|
||||
free on disk $$disks."; \
|
||||
fi; \
|
||||
)
|
||||
mv -f ${IMAGE}.tmp ${IMAGE}
|
||||
boot: ${FLOPPYBOOTCODE}
|
||||
@echo "Copying ${FLOPPYBOOTCODE} to boot"
|
||||
@rm -f boot
|
||||
@cp ${FLOPPYBOOTCODE} boot
|
||||
@${STRIP} boot
|
||||
|
||||
# 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: ${FLOPPYKERNOBJ}/${FLOPPYKERNEL}
|
||||
@echo "Copying ${FLOPPYKERNOBJ}/${FLOPPYKERNEL} to netbsd"
|
||||
@rm -f netbsd
|
||||
@cp ${FLOPPYKERNOBJ}/${FLOPPYKERNEL} netbsd
|
||||
|
||||
KERNELOBJDIR!= cd ${.CURDIR}/../${KERNELDIR} && ${PRINTOBJDIR}
|
||||
.if defined(FLOPPYMETA)
|
||||
${FLOPPYMETA}:
|
||||
echo "Creating ${FLOPPYMETA}"
|
||||
@rm -f ${FLOPPYMETA}
|
||||
@touch ${FLOPPYMETA}
|
||||
.endif
|
||||
|
||||
netbsd: ${KERNELOBJDIR}/${KERNEL}
|
||||
rm -f netbsd
|
||||
cp ${KERNELOBJDIR}/${KERNEL} netbsd
|
||||
${FLOPPYBASE}1.fs: ${FLOPPYFILES}
|
||||
@echo "Creating ${FLOPPYBASE}1.fs from ${FLOPPYFILES}
|
||||
# XXXDISTRIB; need MI installboot for i386
|
||||
sh ${DISTRIBDIR}/common/buildfloppies.sh \
|
||||
-i "${DESTDIR}/usr/mdec/installboot -b 17 -f ${FLOPPYBOOTCODE} @IMAGE@" \
|
||||
${FLOPPYMAX:D-m "${FLOPPYMAX}"} ${FLOPPYPAD:D-p} \
|
||||
${FLOPPYBASE} ${FLOPPYSIZE} ${FLOPPYFILES}
|
||||
|
||||
# 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)
|
||||
CLEANFILES+= ${FLOPPYFILES} ${FLOPPYBASE}?.fs
|
||||
|
||||
boot: ${BOOTCODE}
|
||||
rm -f boot
|
||||
cp ${BOOTCODE} boot
|
||||
${STRIP} boot
|
||||
|
||||
release: check_RELEASEDIR
|
||||
realall: ${FLOPPYBASE}1.fs
|
||||
|
||||
release: check_RELEASEDIR .WAIT ${FLOPPYBASE}1.fs
|
||||
-mkdir -p ${RELEASEDIR}/installation/floppy
|
||||
${RELINSTALL} ${IMAGE} ${RELEASEDIR}/installation/floppy
|
||||
if [ -e ${FLOPPYBASE}2.fs ]; then \
|
||||
${RELINSTALL} ${FLOPPYBASE}?.fs \
|
||||
${RELEASEDIR}/installation/floppy; \
|
||||
else \
|
||||
${RELINSTALL} ${FLOPPYBASE}1.fs \
|
||||
${RELEASEDIR}/installation/floppy/${FLOPPYBASE}.fs; \
|
||||
fi
|
||||
|
||||
clean cleandir distclean:
|
||||
rm -rf empty
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
|
|
@ -1,102 +0,0 @@
|
|||
# $NetBSD: Makefile.fdset,v 1.6 2002/04/11 12:22:58 lukem Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
.include "${_SRC_TOP_}/distrib/Makefile.inc"
|
||||
|
||||
# needs the following set:
|
||||
# BASENAME basename of floppy
|
||||
# KERNELDIR where kernel is grabbed from
|
||||
# KERNEL kernel name
|
||||
|
||||
|
||||
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 ${IMAGE1} ${IMAGE1}.tmp
|
||||
|
||||
realall: ${IMAGE1}
|
||||
|
||||
${IMAGE1}: 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
|
||||
# XXXDISTRIB
|
||||
@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.
|
||||
|
||||
KERNELOBJDIR!= cd ${.CURDIR}/../${KERNELDIR} && ${PRINTOBJDIR}
|
||||
|
||||
netbsd: ${KERNELOBJDIR}/${KERNEL}
|
||||
rm -f netbsd
|
||||
cp ${KERNELOBJDIR}/${KERNEL} 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: check_RELEASEDIR
|
||||
-mkdir -p ${RELEASEDIR}/installation/floppy
|
||||
${RELINSTALL} ${BASENAME}?.fs ${RELEASEDIR}/installation/floppy
|
||||
|
||||
clean cleandir distclean:
|
||||
rm -f ${BASENAME}?.fs
|
||||
rm -rf empty
|
||||
|
||||
.include <bsd.prog.mk>
|
|
@ -1,8 +0,0 @@
|
|||
# $NetBSD: Makefile,v 1.6 2002/04/11 12:17:16 lukem Exp $
|
||||
|
||||
BASENAME= boot-com
|
||||
BOOTCODE= ${MDEC}/biosboot_com0.sym # Serial output
|
||||
KERNELDIR= kernel-ramdisk
|
||||
KERNEL= netbsd.INSTALL.gz
|
||||
|
||||
.include "${.CURDIR}/../common/Makefile.fdset"
|
|
@ -1,7 +0,0 @@
|
|||
# $NetBSD: Makefile,v 1.7 2002/04/11 12:17:16 lukem Exp $
|
||||
|
||||
BASENAME= bootlap
|
||||
KERNELDIR= kernel-ramdisk
|
||||
KERNEL= netbsd.INSTALL_LAPTOP.gz
|
||||
|
||||
.include "${.CURDIR}/../common/Makefile.fdset"
|
|
@ -1,7 +0,0 @@
|
|||
# $NetBSD: Makefile,v 1.9 2002/04/11 12:17:15 lukem Exp $
|
||||
|
||||
BASENAME= boot
|
||||
KERNELDIR= kernel-ramdisk
|
||||
KERNEL= netbsd.INSTALL.gz
|
||||
|
||||
.include "${.CURDIR}/../common/Makefile.fdset"
|
|
@ -1,8 +1,8 @@
|
|||
# $NetBSD: Makefile,v 1.8 2002/04/13 00:07:46 lukem Exp $
|
||||
# $NetBSD: Makefile,v 1.9 2002/04/16 05:23:44 lukem Exp $
|
||||
|
||||
IMAGE= rescue-small.fs
|
||||
KERNELDIR= kernel-rescue
|
||||
KERNEL= netbsd.RESCUE_SMALL.gz
|
||||
DISKSIZE= 2400
|
||||
FLOPPYBASE= rescue-small
|
||||
FLOPPYKERNDIR= kernel-rescue
|
||||
FLOPPYKERNEL= netbsd.RESCUE_SMALL.gz
|
||||
FLOPPYSIZE= 2400
|
||||
|
||||
.include "${.CURDIR}/../common/Makefile.bootfloppy"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# $NetBSD: Makefile,v 1.8 2002/04/13 00:07:46 lukem Exp $
|
||||
# $NetBSD: Makefile,v 1.9 2002/04/16 05:23:44 lukem Exp $
|
||||
|
||||
IMAGE= rescue-tiny.fs
|
||||
KERNELDIR= kernel-rescue
|
||||
KERNEL= netbsd.RESCUE_TINY.gz
|
||||
DISKSIZE= 2400
|
||||
FLOPPYBASE= rescue-tiny.fs
|
||||
FLOPPYKERNDIR= kernel-rescue
|
||||
FLOPPYKERNEL= netbsd.RESCUE_TINY.gz
|
||||
FLOPPYSIZE= 2400
|
||||
|
||||
.include "${.CURDIR}/../common/Makefile.bootfloppy"
|
||||
|
|
Loading…
Reference in New Issue