Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/x68k/floppies Rewrite with MI distrib. based on Mino...
details: https://anonhg.NetBSD.org/src/rev/11ae776de363
branches: trunk
changeset: 526659:11ae776de363
user: isaki <isaki%NetBSD.org@localhost>
date: Tue May 07 14:08:30 2002 +0000
description:
Rewrite with MI distrib. based on Minoura-san's work.
it makes x68k port cross buildable.
diffstat:
distrib/x68k/floppies/Makefile | 4 +-
distrib/x68k/floppies/Makefile.inc | 3 -
distrib/x68k/floppies/bootfloppy.generic/Makefile | 15 +-
distrib/x68k/floppies/bootfloppy.sysinst/Makefile | 8 +-
distrib/x68k/floppies/common/Makefile.bootfloppy | 24 +--
distrib/x68k/floppies/common/Makefile.instkernel | 16 +-
distrib/x68k/floppies/common/Makefile.ramdisk | 66 +-------
distrib/x68k/floppies/inst/Makefile | 20 +-
distrib/x68k/floppies/instkernel.sysinst/Makefile | 7 +-
distrib/x68k/floppies/ramdisk.sysinst/Makefile | 49 +++---
distrib/x68k/floppies/ramdisk.sysinst/list | 163 ++++++++++-----------
distrib/x68k/floppies/ramdisk.sysinst/mtree.conf | 77 +----------
distrib/x68k/floppies/ramdisk.sysinst/services | 59 +++++++
13 files changed, 208 insertions(+), 303 deletions(-)
diffs (truncated from 716 to 300 lines):
diff -r e61e606c8c2e -r 11ae776de363 distrib/x68k/floppies/Makefile
--- a/distrib/x68k/floppies/Makefile Tue May 07 13:55:40 2002 +0000
+++ b/distrib/x68k/floppies/Makefile Tue May 07 14:08:30 2002 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.8 2001/12/07 06:57:49 minoura Exp $
+# $NetBSD: Makefile,v 1.9 2002/05/07 14:08:30 isaki Exp $
SUBDIR= ramdisk.sysinst instkernel.sysinst bootfloppy.sysinst
-#SUBDIR+= bootfloppy.generic inst
+SUBDIR+= bootfloppy.generic inst
.PHONY: release
diff -r e61e606c8c2e -r 11ae776de363 distrib/x68k/floppies/Makefile.inc
--- a/distrib/x68k/floppies/Makefile.inc Tue May 07 13:55:40 2002 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-# $NetBSD: Makefile.inc,v 1.9 2002/03/06 12:27:09 lukem Exp $
-
-.include "../../../Makefile.inc"
diff -r e61e606c8c2e -r 11ae776de363 distrib/x68k/floppies/bootfloppy.generic/Makefile
--- a/distrib/x68k/floppies/bootfloppy.generic/Makefile Tue May 07 13:55:40 2002 +0000
+++ b/distrib/x68k/floppies/bootfloppy.generic/Makefile Tue May 07 14:08:30 2002 +0000
@@ -1,18 +1,9 @@
-# $NetBSD: Makefile,v 1.2 2001/12/07 06:57:49 minoura Exp $
+# $NetBSD: Makefile,v 1.3 2002/05/07 14:08:31 isaki Exp $
TOP= ${.CURDIR}/..
-.include "${TOP}/Makefile.inc"
-.include <bsd.kernobj.mk>
-.include <bsd.own.mk>
-
BASENAME= kern
IMAGE1= ${BASENAME}.fs
-INSTKERNEL= ${.OBJDIR}/netbsd.tmp
-
-netbsd: ${INSTKERNEL}
+INSTKERNEL= ${KERNOBJDIR}/GENERIC/netbsd
-${INSTKERNEL}:
- gzip -9vc ${KERNOBJDIR}/GENERIC/netbsd > netbsd.tmp
-
-.include "${TOP}/bootfloppy-common/Makefile.inc"
+.include "${TOP}/common/Makefile.bootfloppy"
diff -r e61e606c8c2e -r 11ae776de363 distrib/x68k/floppies/bootfloppy.sysinst/Makefile
--- a/distrib/x68k/floppies/bootfloppy.sysinst/Makefile Tue May 07 13:55:40 2002 +0000
+++ b/distrib/x68k/floppies/bootfloppy.sysinst/Makefile Tue May 07 14:08:30 2002 +0000
@@ -1,14 +1,10 @@
-# $NetBSD: Makefile,v 1.7 2001/12/07 06:57:50 minoura Exp $
+# $NetBSD: Makefile,v 1.8 2002/05/07 14:08:32 isaki Exp $
TOP= ${.CURDIR}/..
-.include "${TOP}/Makefile.inc"
-.include <bsd.kernobj.mk>
-.include <bsd.own.mk>
-
BASENAME= sysinst
IMAGE1= ${BASENAME}.fs
INSTKERNDIR= ${TOP}/instkernel.sysinst
INSTKERNNAME= netbsd.INSTALL.gz
-.include "${TOP}/bootfloppy-common/Makefile.inc"
+.include "${TOP}/common/Makefile.bootfloppy"
diff -r e61e606c8c2e -r 11ae776de363 distrib/x68k/floppies/common/Makefile.bootfloppy
--- a/distrib/x68k/floppies/common/Makefile.bootfloppy Tue May 07 13:55:40 2002 +0000
+++ b/distrib/x68k/floppies/common/Makefile.bootfloppy Tue May 07 14:08:30 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.bootfloppy,v 1.1 2002/05/07 13:55:41 isaki Exp $
+# $NetBSD: Makefile.bootfloppy,v 1.2 2002/05/07 14:08:32 isaki Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -7,7 +7,7 @@
# TOP is assumed to be defined by Makefile including this one.
-COMMONDIR= ${TOP}/bootfloppy-common
+COMMONDIR= ${TOP}/common
IMAGE?= xxx-${DISTRIBREV}.fs
@@ -20,13 +20,9 @@
BASENAME?= boot
IMAGE1?= ${BASENAME}1.fs
-VND?= vnd0
-VND_DEV= /dev/${VND}a
-VND_RDEV= /dev/r${VND}a
MDEC= ${DESTDIR}/usr/mdec
FSTMP= ustar.fs
-DISKTYPE?= floppy5
DISKSIZE?= 2400
BLOCK8K?= 149
@@ -38,13 +34,8 @@
@echo
@echo Making disk number one
-mv -f ${IMAGE1} ${IMAGE1}.tmp
- dd if=/dev/zero of=${IMAGE1}.tmp count=${DISKSIZE}
- vnconfig -t ${DISKTYPE} -v -c ${VND} ${IMAGE1}.tmp
- disklabel -rw ${VND} ${DISKTYPE}
- dd bs=8k seek=1 count=${BLOCK8K} if=${FSTMP} of=${VND_RDEV}
- @echo "installing new bootblocks"
- ${MDEC}/installboot.new -v ${MDEC}/fdboot_ustar ${VND_RDEV}
- vnconfig -u ${VND}
+ cat ${MDEC}/fdboot_ustar /dev/zero | dd of=${IMAGE1}.tmp bs=1k count=8
+ dd bs=8k seek=1 count=${BLOCK8K} if=${FSTMP} of=${IMAGE1}.tmp
@ls -l ${FSTMP} | (read mode links uid gid size junk; \
dksize=$$((${DISKSIZE} * 512 - 8 * 1024)); \
disks=$$(($$size / $$dksize + 1)); \
@@ -78,9 +69,6 @@
)
mv -f ${IMAGE1}.tmp ${IMAGE1}
-unconfig:
- -vnconfig -u ${VND}
-
${BOOTNAME}:
cp -fp ${MDEC}/boot ${BOOTNAME}
@@ -91,9 +79,9 @@
${RELEASE_INSTALL} ${BASENAME}*.fs ${RELEASEDIR}/installation/floppy
# XXX: do we want this?
for f in ${RELEASEDIR}/installation/floppy/${BASENAME}*.fs; do \
- gzip <$$f >$$f.gz; \
+ gzip -9v <$$f >$$f.gz; \
done
-CLEANFILES+= ${IMAGE1}.tmp ${BASENAME}?.fs
+CLEANFILES+= ${IMAGE1} ${IMAGE1}.tmp ${BASENAME}?.fs
.include <bsd.prog.mk>
diff -r e61e606c8c2e -r 11ae776de363 distrib/x68k/floppies/common/Makefile.instkernel
--- a/distrib/x68k/floppies/common/Makefile.instkernel Tue May 07 13:55:40 2002 +0000
+++ b/distrib/x68k/floppies/common/Makefile.instkernel Tue May 07 14:08:30 2002 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile.instkernel,v 1.1 2002/05/07 13:55:41 isaki Exp $
+# $NetBSD: Makefile.instkernel,v 1.2 2002/05/07 14:08:32 isaki Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
.include <bsd.kernobj.mk>
-RAMDISKDIR?= $(.CURDIR)/../ramdisk/
+RAMDISKDIR?= ${.CURDIR}/../ramdisk/
KERN?= netbsd-xxx
KERNNAME?= netbsd.xxx
GZNAME?= ${KERNNAME}.gz
@@ -20,24 +20,22 @@
realall: ${GZNAME}
.if defined(RAMDISK)
-${KERNNAME}: ${KERN} ${RAMDISK}
+${GZNAME}: ${KERN} ${RAMDISK}
-/bin/rm -f netbsd.tmp*
cp ${KERN} netbsd.tmp
${MDSETIMAGE} -v netbsd.tmp ${RAMDISK}
- mv -f netbsd.tmp ${.TARGET}
+ mv -f netbsd.tmp ${KERNNAME}
.else
${KERNNAME}: ${KERN}
cp ${KERN} ${.TARGET}
.endif
-
-${GZNAME}: ${KERNNAME}
- gzip -cv9 ${KERNNAME} > ${.TARGET}
+ gzip -v9 ${KERNNAME}
depend:
-release: check_RELEASEDIR .WAIT ${KERNNAME} ${GZNAME}
+release: check_RELEASEDIR .WAIT ${GZNAME}
.ifndef NOKERNCOPY
- ${RELEASE_INSTALL} ${KERNNAME} ${GZNAME} ${RELEASEDIR}/binary/kernel
+ ${RELEASE_INSTALL} ${GZNAME} ${RELEASEDIR}/binary/kernel
.endif
diff -r e61e606c8c2e -r 11ae776de363 distrib/x68k/floppies/common/Makefile.ramdisk
--- a/distrib/x68k/floppies/common/Makefile.ramdisk Tue May 07 13:55:40 2002 +0000
+++ b/distrib/x68k/floppies/common/Makefile.ramdisk Tue May 07 14:08:30 2002 +0000
@@ -1,70 +1,30 @@
-# $NetBSD: Makefile.ramdisk,v 1.1 2002/05/07 13:55:42 isaki Exp $
-
-.include "${TOP}/Makefile.inc"
+# $NetBSD: Makefile.ramdisk,v 1.2 2002/05/07 14:08:32 isaki Exp $
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
-IMAGE?= xxx.fs
-MDEC= ${DESTDIR}/usr/mdec
-
-LISTS= list
-CRUNCHCONF= ${CBIN}.conf
-MTREECONF= mtree.conf
-
-CRUNCHGEN?= crunchgen
-MTREE?= mtree
+CRUNCHBIN?= ramdiskbin
+IMAGEENDIAN= be
+IMAGEDEPENDS+= ${CRUNCHBIN} ${AUXDEPENDS}
+POPULATEENV+= COMMONDIR=${COMMONDIR:Q}
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} ${IMAGE} ${RAMDISKGEOM}
- -disklabel ${VND} >tmplabel
- disklabel -r -R ${VND} tmplabel
- 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}
-
-unconfig:
- -umount -f ${MOUNT_POINT}
- -vnconfig -u ${VND}
- -/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.
+${CRUNCHBIN}: libhack.o
# Use stubs to eliminate some large stuff from libc
-HACKSRC= ${_SRC_TOP_}/distrib/utils/libhack
+HACKSRC= ${DISTRIBDIR}/utils/libhack
.include "${HACKSRC}/Makefile.inc"
-${CBIN}: libhack.o
+#${CBIN}: libhack.o
# Used in building bootfloppy
echoimage:
@echo ${.OBJDIR}/${IMAGE}
-depend:
+.include "${DISTRIBDIR}/common/Makefile.crunch"
+.include "${DISTRIBDIR}/common/Makefile.makedev"
+.include "${DISTRIBDIR}/common/Makefile.image"
release:
-clean cleandir distclean:
- if [ -f ${CBIN}.mk ]; then ${MAKE} -f ${CBIN}.mk clean; fi
- /bin/rm -f ${AUXCLEAN} *.core ${IMAGE} ${CBIN} ${CBIN}.mk ${CBIN}.cache *.o *.cro *.c tmplabel
+.include <bsd.prog.mk>
diff -r e61e606c8c2e -r 11ae776de363 distrib/x68k/floppies/inst/Makefile
--- a/distrib/x68k/floppies/inst/Makefile Tue May 07 13:55:40 2002 +0000
+++ b/distrib/x68k/floppies/inst/Makefile Tue May 07 14:08:30 2002 +0000
@@ -1,24 +1,22 @@
-# $NetBSD: Makefile,v 1.11 2002/05/02 18:03:02 lukem Exp $
+# $NetBSD: Makefile,v 1.12 2002/05/07 14:08:33 isaki Exp $
.include <bsd.own.mk>
.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
-realall: inst.fs.gz
-
-RAMDISKDIR!= cd ${.CURDIR}/../ramdisk.sysinst && ${PRINTOBJDIR}
+realall: inst.fs
-inst.fs.gz: inst.fs
- gzip -9vc inst.fs > ${.TARGET}
-CLEANFILES+= inst.fs.gz
+RAMDISKDIR!= cd ${.CURDIR}/../ramdisk.sysinst && ${MAKE} print-objdir
inst.fs: ${RAMDISKDIR}/ramdisk.fs
- cp ${RAMDISKDIR}/ramdisk.fs ${.TARGET}
-CLEANFILES+= inst.fs
+ cp ${RAMDISKDIR}/ramdisk.fs inst.fs
+
+CLEANFILES+= inst.fs inst.fs.gz
${RAMDISKDIR}/ramdisk.fs:
cd ${.CURDIR}/../ramdisk.sysinst ; ${MAKE}
-release: check_RELEASEDIR .WAIT inst.fs inst.fs.gz
Home |
Main Index |
Thread Index |
Old Index