summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>2001-02-06 20:50:01 +0000
committerErik Troan <ewt@redhat.com>2001-02-06 20:50:01 +0000
commite72f83bde8f5d6236979c2b9fa89680a3c87f7f6 (patch)
treeaf7bb4ccc64b3127912539204889fd280fd26aeb /scripts
parent6cad332d81b7e468da1af15e3ee47d77e6457361 (diff)
downloadanaconda-e72f83bde8f5d6236979c2b9fa89680a3c87f7f6.tar.gz
anaconda-e72f83bde8f5d6236979c2b9fa89680a3c87f7f6.tar.xz
anaconda-e72f83bde8f5d6236979c2b9fa89680a3c87f7f6.zip
pad driver disks to 1440k
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mk-images30
-rw-r--r--scripts/mk-images.i3864
2 files changed, 29 insertions, 5 deletions
diff --git a/scripts/mk-images b/scripts/mk-images
index 17d698b70..aeb1a2116 100755
--- a/scripts/mk-images
+++ b/scripts/mk-images
@@ -165,6 +165,15 @@ getmoddeps () {
egrep $(echo $what | sed 's/\.o */|^/g;s/\.o$//') $MODDEPS > $final
}
+padfile () {
+ PS_FILE=$1
+ PS_SIZE=$2
+
+ size=`cat $PS_FILE | wc -c`
+ filler=`expr $PS_SIZE "*" 1024 - $size`
+ dd if=/dev/zero bs=$filler count=1 >> $PS_FILE 2> /dev/null
+}
+
intcopymodules () {
dir=$2
@@ -495,9 +504,7 @@ EOF
rm -rf $MBD_TMPIMAGE $MBD_BOOTTREE
if [ -n "$PADSIZE" ]; then
- size=`cat $MBD_FSIMAGE | wc -c`
- filler=`expr $PADSIZE "*" 1024 - $size`
- dd if=/dev/zero bs=$filler count=1 >> $MBD_FSIMAGE 2> /dev/null
+ padfile $MBD_FSIMAGE $PADSIZE"
fi
if [ -n "$EXTRAINITRDPATH" ]; then
@@ -689,6 +696,19 @@ makemainimage () {
}
makedriverdisk () {
+ PADSIZE=""
+
+ while [ x$(echo $1 | cut -c1-2) = x"--" ]; do
+ if [ $1 = "--padsize" ]; then
+ PADSIZE=$2
+ shift; shift
+ continue
+ fi
+
+ echo "Unknown option passed to makedriverdisk"
+ exit 1
+ done
+
modlabel=$1
diskname=$2
modlist=$(expandModuleSet "$3")
@@ -734,6 +754,10 @@ makedriverdisk () {
size=$(expr $size / 1024)
echo "Wrote $IMAGEPATH/${diskname}.img (${size}k)"
+
+ if [ -n "$PADSIZE" ]; then
+ padfile $IMAGEPATH/${diskname}.img $PADSIZE
+ fi
}
# Find the kernel, unpack it, and verify it
diff --git a/scripts/mk-images.i386 b/scripts/mk-images.i386
index d0b2690fa..f4420d91f 100644
--- a/scripts/mk-images.i386
+++ b/scripts/mk-images.i386
@@ -150,9 +150,9 @@ makebootdisk --imagename ja/pcmcia.img \
--loaderbin loader-pcmcia-kon \
--modules "nfs vfat"'
-makedriverdisk "Supplemental Drivers" "drivers" "parport_pc parport +scsi +net +cdrom"
+makedriverdisk --padsize 1440 "Supplemental Drivers" "drivers" "parport_pc parport +scsi +net +cdrom"
-makedriverdisk "rhpcmcia" "pcmciadd" "$PCMCIAMODULES"
+makedriverdisk --padsize 1440 "rhpcmcia" "pcmciadd" "$PCMCIAMODULES"
unset BOOTLANG
unset BOOTDIR