Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/i386/floppies If the PAD variable is defined, pad th...



details:   https://anonhg.NetBSD.org/src/rev/60a62944240c
branches:  trunk
changeset: 494616:60a62944240c
user:      fvdl <fvdl%NetBSD.org@localhost>
date:      Sun Jul 09 12:09:01 2000 +0000

description:
If the PAD variable is defined, pad the floppy image to its maximum size.
Use this in bootfloppy-big. mkisofs likes to have images fullsize nowadays.
Also, insert a file called "USTAR.volsize.<blocksize_in_octal>" if the
size of the ustar image is not the 1.44M default. This stops bootfloppy-big
from asking for a second diskette.

diffstat:

 distrib/i386/floppies/bootfloppy-big/Makefile        |   4 ++-
 distrib/i386/floppies/bootfloppy-common/Makefile.inc |  22 +++++++++++++++----
 2 files changed, 20 insertions(+), 6 deletions(-)

diffs (63 lines):

diff -r 9495b5e5b31a -r 60a62944240c distrib/i386/floppies/bootfloppy-big/Makefile
--- a/distrib/i386/floppies/bootfloppy-big/Makefile     Sun Jul 09 10:35:11 2000 +0000
+++ b/distrib/i386/floppies/bootfloppy-big/Makefile     Sun Jul 09 12:09:01 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.7 2000/05/05 21:35:51 mycroft Exp $
+#      $NetBSD: Makefile,v 1.8 2000/07/09 12:09:01 fvdl Exp $
 
 TOP=   ${.CURDIR}/..
 
@@ -25,6 +25,8 @@
 
 DISKTYPE=      floppy288
 DISKSIZE=      5760
+METAFILE!=     printf "USTAR.volsize.%o" ${DISKSIZE}
 BLOCK8K=       359
+PAD=yes
 
 .include "${TOP}/bootfloppy-common/Makefile.inc"
diff -r 9495b5e5b31a -r 60a62944240c distrib/i386/floppies/bootfloppy-common/Makefile.inc
--- a/distrib/i386/floppies/bootfloppy-common/Makefile.inc      Sun Jul 09 10:35:11 2000 +0000
+++ b/distrib/i386/floppies/bootfloppy-common/Makefile.inc      Sun Jul 09 12:09:01 2000 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.27 2000/07/06 18:16:35 jhawk Exp $
+#      $NetBSD: Makefile.inc,v 1.28 2000/07/09 12:09:02 fvdl Exp $
 
 # TOP is assumed to be defined by Makefile including this one.
 
@@ -18,10 +18,13 @@
 DISKSIZE?=     2880
 BLOCK8K?=      179
 
-CLEANFILES+=   netbsd boot ustar.tmp
+CLEANFILES+=   netbsd boot ustar.tmp ${METAFILE}
 
 realall:       netbsd boot
-       tar cvf ${FSTMP} boot netbsd
+       if test "${METAFILE}" != ""; then \
+               touch ${METAFILE}; \
+       fi
+       tar cvf ${FSTMP} boot ${METAFILE} netbsd
        @echo
        @echo Making disk number one
        rm -f ${IMAGE}.tmp
@@ -46,8 +49,17 @@
                fi; \
                echo; \
                 bytes=$$(($$dksize * $$disks - $$size));    \
-                echo "There are $$bytes ($$(($$bytes / 1024))K) bytes free\
-                        on disk $$disks."; \
+               if test "${PAD}" = "yes"; then \
+                       bytes=$$(($$bytes + 8 * 1024)); \
+                       echo "Padding image with $$bytes bytes"; \
+                       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}
 



Home | Main Index | Thread Index | Old Index