SYSLINUX=$IMGPATH/usr/bin/syslinux if [ ! -f $SYSLINUX ]; then echo "$SYSLINUX doesn't exist" exit 1 fi prepareBootImage() { dd if=/dev/zero bs=1k count=$BOOTDISKSIZE of=/$MBD_TMPIMAGE 2>/dev/null mkdosfs -C $MBD_TMPIMAGE $BOOTDISKSIZE >/dev/null $SYSLINUX $MBD_TMPIMAGE mount -o loop -t msdos $MBD_TMPIMAGE $MBD_BOOTTREE (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 if [ -d $BOOTDISKDIR/$BOOTLANG ]; then # fb console and kon don't get along... if [ "$BOOTLANG" = "ja_JP" ]; then sed -e "s/ vga=.*//g" < $MBD_BOOTTREE/syslinux.cfg > $MBD_BOOTTREE/syslinux.cf2 mv -f $MBD_BOOTTREE/syslinux.cf2 $MBD_BOOTTREE/syslinux.cfg fi if [ -n $BOOTDIR ]; then sed -e "s/initrd.img/initrd.img lang=$BOOTDIR/g" < $MBD_BOOTTREE/syslinux.cfg > $MBD_BOOTTREE/syslinux.cf2 mv -f $MBD_BOOTTREE/syslinux.cf2 $MBD_BOOTTREE/syslinux.cfg fi for file in $BOOTDISKDIR/$BOOTLANG/*.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/$BOOTLANG to $MBD_BOOTTREE. umount $MBD_BOOTTREE rm -rf $MBD_BOOTTREE $MBD_TMPIMAGE exit 1 fi else 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 fi } # LATEUSBMODS go in the second stage USBMODS="usb-ohci usb-uhci hid keybdev" LATEUSBMODS="mousedev" IDEMODS="" SCSIMODS="sd_mod sr_mod" SECSTAGE="msdos vfat raid0 raid1 raid5 ext3 reiserfs $IDEMODS $SCSIMODS $LATEUSBMODS" COMMONMODULES="vfat $USBMODS agpgart" LOCALMODULES="$COMMONMODULES BusLogic aic7xxx megaraid ncr53c8xx sym53c8xx $IDEMODS $SCSIMODS" NETWORKMODULES="$COMMONMODULES nfs 3c59x ne2k-pci eepro100 e100 tulip pcnet32 hp100" # sis900 " PCMCIAMAINMODULES="$COMMONMODULES nfs $IDEMODS $SCSIMODS" makeinitrd --initrdto $TOPDESTPATH/dosutils/autoboot/initrd.img \ --initrdsize 2250 \ --loaderbin loader-local \ --modules "$LOCALMODULES" makeinitrd --initrdto $TOPDESTPATH/images/pxeboot/initrd.img \ --initrdsize 2250 \ --loaderbin loader-network \ --modules "$NETWORKMODULES" # 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 " 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"` makeinitrd --initrdto $TOPDESTPATH/images/initrd-pcmcia.img \ --pcmcia \ --initrdsize 2350 \ --loaderbin loader-pcmcia \ --modules "$PCMCIAMAINMODULES" #for I in $BOOTDISKDIR; do for I in `find $BOOTDISKDIR -type d`; do BOOTLANG=`basename $I` BOOTDIR=`basename $I | cut -d'_' -f1` if [ $BOOTLANG = "boot" ]; then BOOTLANG="" BOOTDIR="" elif [ $BOOTLANG = "ja_JP" ]; then # this is handled below. continue fi makebootdisk --kernelto $TOPDESTPATH/dosutils/autoboot/vmlinuz \ --bootdisksize 1440 \ --imagename $BOOTDIR/boot.img \ --initrd $TOPDESTPATH/dosutils/autoboot/initrd.img makebootdisk --kernelto $TOPDESTPATH/images/pxeboot/vmlinuz \ --bootdisksize 1440 \ --imagename $BOOTDIR/bootnet.img \ --initrd $TOPDESTPATH/images/pxeboot/initrd.img makebootdisk --imagename $BOOTDIR/pcmcia.img \ --bootdisksize 1440 \ --initrd $TOPDESTPATH/images/initrd-pcmcia.img done rm -f $TOPDESTPATH/images/initrd-pcmcia.img # --- Japanese BOOTLANG="ja_JP" BOOTDIR="ja" makebootdisk --bootdisksize 1440 \ --imagename ja/boot.img \ --initrdflags '--japanese --initrdsize 2950 \ --loaderbin loader-local-kon \ --modules "$LOCALMODULES"' makebootdisk --bootdisksize 1440 \ --imagename ja/bootnet.img \ --initrdflags '--japanese --initrdsize 2950 \ --loaderbin loader-network-kon \ --modules "$NETWORKMODULES"' makebootdisk --imagename ja/pcmcia.img \ --bootdisksize 1440 \ --initrdflags '--japanese --pcmcia \ --initrdsize 3232 \ --loaderbin loader-pcmcia-kon \ --modules "$PCMCIAMAINMODULES"' makedriverdisk --padsize 1440 "Supplemental Drivers" "drivers" "+scsi +net" makedriverdisk --padsize 1440 "Supplemental CDROM controllers" "oldcdrom" "parport_pc parport +cdrom" makedriverdisk --padsize 1440 "rhpcmcia" "pcmciadd" "$PCMCIAMODULES" unset BOOTLANG unset BOOTDIR makeinitrd --initrdto $TOPDESTPATH/dosutils/autoboot/initrd.img \ --initrdsize 4100 \ --pcmcia \ --loaderbin loader-pcmcia \ --modules "$COMMONMODULES $PCMCIAMODULES nfs =scsi $IDEMODS $SCSIMODS" makebootdisk --kernelto $TOPDESTPATH/dosutils/autoboot/vmlinuz \ --bootdisksize 2880 \ --imagename ../dosutils/autoboot/cdboot.img \ --initrd $TOPDESTPATH/dosutils/autoboot/initrd.img makeinitrd --initrdto $TOPDESTPATH/dosutils/autoboot/initrd-ja.img \ --initrdsize 4100 \ --japanese \ --loaderbin loader-pcmcia-kon \ --pcmcia \ --modules "$COMMONMODULES $PCMCIAMODULES nfs =scsi $IDEMODS $SCSIMODS" makebootdisk --kernelto $TOPDESTPATH/dosutils/autoboot/vmlinuz \ --bootdisksize 2880 \ --imagename ../dosutils/autoboot/cdboot-ja.img \ --initrd $TOPDESTPATH/dosutils/autoboot/initrd-ja.img makemainmodules "=scsi =net $SECSTAGE" makeinstimage "netstg" "=scsi $SECSTAGE" makeinstimage "hdstg" "=net $SECSTAGE" makemainimage "stage2" "cramfs"