summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-09-13 16:08:45 +0000
committerJeremy Katz <katzj@redhat.com>2002-09-13 16:08:45 +0000
commit69d59b2909850cb05f3127263007c8f7f2335024 (patch)
treefaef3da8eb82bd42c02052698310a00735c8b5f7 /scripts
parent94c8fb2fd8f9844e42641028d74ca9da63378ddb (diff)
downloadanaconda-69d59b2909850cb05f3127263007c8f7f2335024.tar.gz
anaconda-69d59b2909850cb05f3127263007c8f7f2335024.tar.xz
anaconda-69d59b2909850cb05f3127263007c8f7f2335024.zip
add a mk-images.x86_64 and bootdisk msg files and syslinux.cfg based off of
the i386 bits
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mk-images.x86_64120
1 files changed, 120 insertions, 0 deletions
diff --git a/scripts/mk-images.x86_64 b/scripts/mk-images.x86_64
new file mode 100644
index 000000000..bb6c13273
--- /dev/null
+++ b/scripts/mk-images.x86_64
@@ -0,0 +1,120 @@
+SYSLINUX=$IMGPATH/usr/bin/syslinux
+
+if [ ! -f $SYSLINUX ]; then
+ echo "$SYSLINUX doesn't exist"
+ exit 1
+fi
+
+# prepare a directory with the kernel, initrd, and various message files
+# used to populate a boot image
+prepareBootTree() {
+ (cd $BOOTDISKDIR; find . ! -name "*.msg" -maxdepth 1 ! -type d | cpio --quiet -p $MBD_BOOTTREE)
+
+ cp $MBD_FSIMAGE $MBD_BOOTTREE/initrd.img
+ cp $KERNELROOT/boot/vmlinuz-* $MBD_BOOTTREE/vmlinuz
+ pngtopnm $BOOTDISKDIR/syslinux-splash.png | ppmtolss16 \#000000=0 \#c4c7ce=7 \#c60000=2 \#ffffff=15 \#7790c2=9 > $BOOTDISKDIR/splash.lss
+ cp $BOOTDISKDIR/splash.lss $MBD_BOOTTREE/splash.lss
+ for file in $BOOTDISKDIR/*.msg; do
+ filename=`basename $file`
+ sed -e "s/@VERSION@/$VERSION/g" $file > $MBD_BOOTTREE/$filename
+ done
+ if [ $? != 0 ]; then
+ echo $0: Failed to copy messages from $BOOTDISKDIR to $MBD_BOOTTREE.
+ umount $MBD_BOOTTREE
+ rm -rf $MBD_BOOTTREE $MBD_TMPIMAGE
+ exit 1
+ fi
+}
+
+
+# LATEUSBMODS go in the second stage.
+# FIXME: bleah, have to include sd_mod for usb-storage
+USBMODS="usb-ohci usb-uhci hid keybdev usb-storage sd_mod"
+# usb-storage goes on both so we can reload it. *sigh*
+LATEUSBMODS="mousedev usb-storage"
+IDEMODS=""
+SCSIMODS="sd_mod sr_mod"
+
+FSMODS="msdos vfat ext3 reiserfs"
+SECSTAGE="agpgart raid0 raid1 raid5 lvm-mod $FSMODS $IDEMODS $SCSIMODS $LATEUSBMODS st parport_pc parport"
+
+COMMONMODULES="vfat $USBMODS"
+LOCALMODULES="$COMMONMODULES aic7xxx megaraid ncr53c8xx
+ sym53c8xx $IDEMODS $SCSIMODS"
+NETWORKMODULES="$COMMONMODULES nfs 3c59x
+ eepro100 tulip pcnet32 8139too"
+# sis900 e100 hp100 natsemi"
+
+PCMCIAMAINMODULES="$COMMONMODULES nfs $IDEMODS $SCSIMODS"
+
+# images we only want on the CD (usually for space reasons)
+ISOLINUXMODULES="ehci-hcd ieee1394 ohci1394 sbp2"
+
+mkdir -p $TOPDESTPATH/images/pxeboot
+
+# XXX hack hack
+PCMCIAMODULES_EXCLUDED="
+ apa1480_cb
+ iflash2+_mtd
+ iflash2_mtd
+ memory_cb
+ memory_cs
+ parport_cs
+ parport_pc
+ parport
+ serial_cs
+ serial_cb
+ sram_mtd
+ aironet4500_cs
+ orinoco_cs
+ orinoco
+ orinoco_old_cs
+ wavelan_cs
+ wvlan_cs
+"
+PCMCIAMODULES_EXCLUDED_SED="sed"
+for m in $PCMCIAMODULES_EXCLUDED
+do
+ PCMCIAMODULES_EXCLUDED_SED="$PCMCIAMODULES_EXCLUDED_SED -e 's/$m//g'"
+done
+PCMCIAMODULES=`echo $PCMCIAMODULES | eval "$PCMCIAMODULES_EXCLUDED_SED"`
+
+mkdir -p $TOPDESTPATH/images/pxeboot
+
+echo "Building initrd-everything.img"
+makeinitrd --initrdto $TOPDESTPATH/images/pxeboot/initrd-everything.img \
+ --pcmcia \
+ --initrdsize 5000 \
+ --loaderbin loader-pcmcia \
+ --modules "$LOCALMODULES $NETWORKMODULES $PCMCIAMAINMODULES $PCMCIAMODULES $ISOLINUXMODULES =scsi =net"
+[ $? = 0 ] || exit 1
+
+if [ -f $IMGPATH/usr/lib/syslinux/isolinux.bin ]; then
+ echo "Building isolinux directory"
+ MBD_BOOTTREE=$TOPDESTPATH/isolinux
+ MBD_FSIMAGE=$TOPDESTPATH/images/pxeboot/initrd-everything.img
+ mkdir $MBD_BOOTTREE
+ cp $IMGPATH/usr/lib/syslinux/isolinux.bin $MBD_BOOTTREE/isolinux.bin
+
+ prepareBootTree
+
+ # isolinux needs the config file to be isolinux.cfg
+ mv $MBD_BOOTTREE/syslinux.cfg $MBD_BOOTTREE/isolinux.cfg
+else
+ echo "No isolinux binaries. Skipping isolinux creation"
+fi
+
+echo "Building main moduleball"
+makemainmodules "=scsi =net $SECSTAGE"
+[ $? = 0 ] || exit 1
+
+echo "Building netstg.img"
+makeinstimage "netstg" "=scsi $SECSTAGE"
+[ $? = 0 ] || exit 1
+echo "Building hdstg.img"
+makeinstimage "hdstg" "=net $SECSTAGE"
+[ $? = 0 ] || exit 1
+echo "Building stage2.img"
+makemainimage "stage2" "cramfs"
+[ $? = 0 ] || exit 1
+