summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul Nasrat <pnasrat@redhat.com>2005-09-21 17:16:17 +0000
committerPaul Nasrat <pnasrat@redhat.com>2005-09-21 17:16:17 +0000
commitb1cc5c81dcd30686426ad3a852cd4f4881070f85 (patch)
tree8b529de102f9b933ffa449e62be08dccf26f48c6 /scripts
parentfe14162ffa9b4abda30975237cb2a25edd3ac433 (diff)
downloadanaconda-b1cc5c81dcd30686426ad3a852cd4f4881070f85.tar.gz
anaconda-b1cc5c81dcd30686426ad3a852cd4f4881070f85.tar.xz
anaconda-b1cc5c81dcd30686426ad3a852cd4f4881070f85.zip
Single ppc boot image (#166625)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mk-images.ppc148
-rwxr-xr-xscripts/upd-instroot2
2 files changed, 82 insertions, 68 deletions
diff --git a/scripts/mk-images.ppc b/scripts/mk-images.ppc
index 51053671d..e557ed077 100644
--- a/scripts/mk-images.ppc
+++ b/scripts/mk-images.ppc
@@ -17,75 +17,40 @@ ISERIESMODULES="iseries_veth veth viodasd viocd ipr"
ISOMODULES="ehci-hcd ieee1394 ohci1394 sbp2"
prepareBootImage() {
- mkdir -p $TOPDESTPATH/ppc/chrp
mkdir -p $TOPDESTPATH/images
+ mkdir -p $TOPDESTPATH/isopath
}
makeBootImages() {
echo "Building boot images for kernel $kernelvers"
FAKEARCH=""
- if [ "$KERNELARCH" = "ppc64pseries" -o "$KERNELARCH" = "ppc64" ]; then
+ if [ "$KERNELARCH" = "ppc64" ]; then
+ mkdir -p $TOPDESTPATH/ppc/ppc64
echo "Building $KERNELARCH initrd"
- makeinitrd --initrdto $TOPDESTPATH/ppc/chrp/ramdisk.image.gz \
+ makeinitrd --initrdto $TOPDESTPATH/ppc/ppc64/ramdisk.image.gz \
--initrdsize 8192 \
--loaderbin loader \
--modules "$COMMONMODULES $NETMODULES $SCSIMODULES $SCSIMODS $IDEMODS $ISOMODULES $USBMODS =scsi =net"
- mkdir -p $TOPDESTPATH/etc $TOPDESTPATH/ppc/chrp $TOPDESTPATH/images/pseries $TOPDESTPATH/images/mac64
- cp $KERNELROOT/boot/vmlinuz-* $TOPDESTPATH/ppc/chrp/vmlinuz
- cp $BOOTDISKDIR/yaboot.conf.pseries $TOPDESTPATH/etc/yaboot.conf
- cp $BOOTDISKDIR/bootinfo.txt $TOPDESTPATH/ppc/bootinfo.txt
- cp $IMGPATH/usr/lib/yaboot/yaboot $TOPDESTPATH/ppc/chrp
- $IMGPATH/usr/lib/yaboot/addnote $TOPDESTPATH/ppc/chrp/yaboot
-
- if [ -x $IMGPATH/usr/bin/mkzimage ]; then
- pushd $TOPDESTPATH/ppc/chrp
- cp $IMGPATH/usr/share/ppc64-utils/zImage.lds $TOPDESTPATH/ppc/chrp/zImage.lds
- $IMGPATH/usr/bin/mkzimage $TOPDESTPATH/ppc/chrp/vmlinuz no no $TOPDESTPATH/ppc/chrp/ramdisk.image.gz $KERNELROOT/boot/zImage.stub-* $TOPDESTPATH/images/pseries/netboot.img
- rm -f $TOPDESTPATH/ppc/chrp/zImage.lds
+ cp $KERNELROOT/boot/vmlinuz-* $TOPDESTPATH/ppc/ppc64/vmlinuz
+ sed -e "s/%BITS%/64/" -e "s/%PRODUCT%/$PRODUCT/" -e "s/%VERSION%/$VERSION/" \
+ $BOOTDISKDIR/yaboot.conf.in > $TOPDESTPATH/ppc/ppc64/yaboot.conf
+
+ if [ -x $IMGPATH/usr/bin/mkzimage -a -r $IMGPATH/usr/share/ppc64-utils/zImage.stub ]; then
+ mkdir -p $TOPDESTPATH/images/netboot
+ pushd $TOPDESTPATH/ppc/ppc64
+ cp $IMGPATH/usr/share/ppc64-utils/zImage.lds $TOPDESTPATH/ppc/ppc64/zImage.lds
+ $IMGPATH/usr/bin/mkzimage $TOPDESTPATH/ppc/ppc64/vmlinuz no no $TOPDESTPATH/ppc/ppc64/ramdisk.image.gz $IMGPATH/usr/share/ppc64-utils/zImage.stub $TOPDESTPATH/images/netboot/ppc64.img
+ rmdir $TOPDESTPATH/images/netboot || :
+ rm -f $TOPDESTPATH/ppc/ppc64/zImage.lds
popd
fi
- # we also want to make a boot.iso here
- mkdir -p $TOPDESTPATH/isopath/ppc/chrp $TOPDESTPATH/isopath/etc
- cp $TOPDESTPATH/etc/* $TOPDESTPATH/isopath/etc/
- cp $TOPDESTPATH/ppc/chrp/* $TOPDESTPATH/isopath/ppc/chrp
- cp $TOPDESTPATH/ppc/bootinfo.txt $TOPDESTPATH/isopath/ppc/bootinfo.txt
-
- # FIXME: this assumes the file gets there by magic
- cp $TOPDESTPATH/boot_image $TOPDESTPATH/isopath/boot_image
- mkisofs -quiet -generic-boot $TOPDESTPATH/isopath/boot_image -A "$PRODUCT $VERSION" -V "PBOOT" -J -R -T -allow-multidot -l -o $TOPDESTPATH/images/pseries/boot.iso $TOPDESTPATH/isopath
- rm -rf $TOPDESTPATH/isopath/
-
- cat > $TOPDESTPATH/images/pseries/README <<EOF
-The files in this directory are for use in booting a pSeries
-machine. They are as follows:
-boot.iso - A bootable CD-ROM image for starting an installation on pSeries
-netboot.img - A network boot image for starting an installation on pSeries
-
-Images for installing on an iSeries machine can be found in the ppc/iSeries
-directory.
-EOF
-
- # Create the Mac G5 boot.iso
- mkdir -p $TOPDESTPATH/ppc/mac64
- cp $TOPDESTPATH/ppc/chrp/ramdisk.image.gz $TOPDESTPATH/ppc/mac64/
- cp $KERNELROOT/boot/vmlinuz-* $TOPDESTPATH/ppc/mac64/vmlinuz
- cp $BOOTDISKDIR/yaboot.conf.mac64 $TOPDESTPATH/ppc/mac64/yaboot.conf
- cp $BOOTDISKDIR/ofboot.b $TOPDESTPATH/ppc/mac64/ofboot.b
- cp $IMGPATH/usr/lib/yaboot/yaboot $TOPDESTPATH/ppc/mac64/
-
- # we also want to make a boot.iso here
- mkdir -p $TOPDESTPATH/isopath/ppc/mac64
- cp $TOPDESTPATH/ppc/mac64/* $TOPDESTPATH/isopath/ppc/mac64/
-
- # Create the boot.iso
- mkisofs -quiet -o $TOPDESTPATH/images/mac64/boot.iso -part -hfs -T -r -l -J -A "$PRODUCT $VERSION" -sysid PPC -V "PBOOT" -volset "$VERSION" -volset-size 1 -volset-seqno 1 -hfs-volid "$VERSION" -hfs-bless "$TOPDESTPATH/isopath/ppc/mac64" -map $BOOTDISKDIR/mapping -magic $BOOTDISKDIR/magic -no-desktop -allow-multidot $TOPDESTPATH/isopath
- rm -rf $TOPDESTPATH/isopath/
elif [ "$KERNELARCH" = "ppc64iseries" ]; then
mkdir -p $TOPDESTPATH/ppc/iSeries
+ mkdir -p $TOPDESTPATH/images/iSeries
echo "Building iSeries initrd"
makeinitrd --initrdto $TOPDESTPATH/ppc/iSeries/ramdisk.image.gz \
@@ -97,38 +62,87 @@ EOF
cp $KERNELROOT/boot/System.map-* $TOPDESTPATH/ppc/iSeries/System.map
$IMGPATH/usr/sbin/addSystemMap $TOPDESTPATH/ppc/iSeries/System.map $TOPDESTPATH/ppc/iSeries/vmlinux $TOPDESTPATH/ppc/iSeries/vmlinux.sm
- $IMGPATH/usr/sbin/addRamDisk $TOPDESTPATH/ppc/iSeries/ramdisk.image.gz $TOPDESTPATH/ppc/iSeries/System.map $TOPDESTPATH/ppc/iSeries/vmlinux.sm $TOPDESTPATH/ppc/iSeries/boot.img
+ $IMGPATH/usr/sbin/addRamDisk $TOPDESTPATH/ppc/iSeries/ramdisk.image.gz $TOPDESTPATH/ppc/iSeries/System.map $TOPDESTPATH/ppc/iSeries/vmlinux.sm $TOPDESTPATH/images/iSeries/boot.img
rm -f $TOPDESTPATH/ppc/iSeries/vmlinux.sm
+
elif [ "$KERNELARCH" = "ppc" ]; then
FAKEARCH="ppc"
- mkdir -p $TOPDESTPATH/ppc/mac $TOPDESTPATH/images/mac
+ mkdir -p $TOPDESTPATH/ppc/ppc32
echo "Building ppc initrd"
- makeinitrd --initrdto $TOPDESTPATH/ppc/mac/ramdisk.image.gz \
+ makeinitrd --initrdto $TOPDESTPATH/ppc/ppc32/ramdisk.image.gz \
--initrdsize 8192 \
--loaderbin loader \
--modules "$COMMONMODULES $NETMODULES $SCSIMODULES $SCSIMODS $IDEMODS $ISOMODULES $USBMODS =scsi =net"
- mkdir -p $TOPDESTPATH/ppc/mac
- cp $KERNELROOT/boot/vmlinuz-* $TOPDESTPATH/ppc/mac/vmlinuz
- cp $BOOTDISKDIR/yaboot.conf.mac $TOPDESTPATH/ppc/mac/yaboot.conf
- cp $BOOTDISKDIR/ofboot.b.auto $TOPDESTPATH/ppc/ofboot.b
- cp $BOOTDISKDIR/ofboot.b $TOPDESTPATH/ppc/mac/ofboot.b
- cp $IMGPATH/usr/lib/yaboot/yaboot $TOPDESTPATH/ppc/mac/
-
- # we also want to make a boot.iso here
- mkdir -p $TOPDESTPATH/isopath/ppc/mac
- cp $TOPDESTPATH/ppc/mac/* $TOPDESTPATH/isopath/ppc/mac/
+ cp $KERNELROOT/boot/vmlinuz-* $TOPDESTPATH/ppc/ppc32/vmlinuz
+ sed -e "s/%BITS%/32/" -e "s/%PRODUCT%/$PRODUCT/" -e "s/%VERSION%/$VERSION/" \
+ $BOOTDISKDIR/yaboot.conf.in > $TOPDESTPATH/ppc/ppc32/yaboot.conf
+
+ if [ -x $IMGPATH/usr/bin/mkzimage -a -r $IMGPATH/usr/share/ppc64-utils/zImage.stub ]; then
+ mkdir -p $TOPDESTPATH/images/netboot
+ pushd $TOPDESTPATH/ppc/ppc32
+ cp $IMGPATH/usr/share/ppc64-utils/zImage.lds $TOPDESTPATH/ppc/ppc64/zImage.lds
+ $IMGPATH/usr/bin/mkzimage $TOPDESTPATH/ppc/ppc32/vmlinuz no no $TOPDESTPATH/ppc/ppc32/ramdisk.image.gz $IMGPATH/usr/share/ppc64-utils/zImage.stub $TOPDESTPATH/images/netboot/ppc32.img
+ rmdir $TOPDESTPATH/images/netboot || :
+ rm -f $TOPDESTPATH/ppc/ppc64/zImage.lds
+ popd
+ fi
- # Create the boot.iso
- mkisofs -quiet -o $TOPDESTPATH/images/mac/boot.iso -part -hfs -T -r -l -J -A "$PRODUCT $VERSION" -sysid PPC -V "PBOOT" -volset "$VERSION" -volset-size 1 -volset-seqno 1 -hfs-volid "$VERSION" -hfs-bless "$TOPDESTPATH/isopath/ppc/mac" -map $BOOTDISKDIR/mapping -magic $BOOTDISKDIR/magic -no-desktop -allow-multidot $TOPDESTPATH/isopath
- rm -rf $TOPDESTPATH/isopath/
else
echo "Unknown kernel arch: $KERNELARCH"
fi
}
makeSecondStage() {
+ # Create boot.iso here instead of above, so we can include it all
+
+ mkdir -p $TOPDESTPATH/ppc/chrp
+ mkdir -p $TOPDESTPATH/ppc/mac
+ mkdir -p $TOPDESTPATH/etc
+
+ # Create ofboot.b and bootinfo.txt files, and yaboot binaries for Mac and CHRP
+ cp $BOOTDISKDIR/bootinfo.txt $TOPDESTPATH/ppc/bootinfo.txt
+ cp $BOOTDISKDIR/ofboot.b $TOPDESTPATH/ppc/mac/ofboot.b
+ cp $IMGPATH/usr/lib/yaboot/yaboot $TOPDESTPATH/ppc/mac/yaboot
+ cp $IMGPATH/usr/lib/yaboot/yaboot $TOPDESTPATH/ppc/chrp/yaboot
+ $IMGPATH/usr/lib/yaboot/addnote $TOPDESTPATH/ppc/chrp/yaboot
+
+ # IBM firmware can't handle boot scripts properly, so for biarch installs
+ # we use a yaboot.conf which asks the user to select 32-bit or 64-bit kernel.
+
+ if [ -r $TOPDESTPATH/ppc/ppc32/yaboot.conf -a -r $TOPDESTPATH/ppc/ppc64/yaboot.conf ]; then
+ # Both kernels exist. Copy the biarch yaboot.conf into place.
+ sed -e "s/%BITS%/32/" -e "s/%PRODUCT%/$PRODUCT/" -e "s/%VERSION%/$VERSION/" \
+ $BOOTDISKDIR/yaboot.conf.3264 > $TOPDESTPATH/etc/yaboot.conf
+ else
+ # Copy the one that exists, assuming one does exist
+ cp $TOPDESTPATH/ppc/ppc??/yaboot.conf $TOPDESTPATH/etc
+ fi
+
+ # Copy it all into the isopath for the boot CD
+ mkdir -p $TOPDESTPATH/isopath
+ cp -r $TOPDESTPATH/{ppc,etc} $TOPDESTPATH/isopath
+
+ # We want the netboot images in the boot.iso too.
+ if [ -d $TOPDESTPATH/images/netboot ]; then
+ mkdir -p $TOPDESTPATH/isopath/images
+ cp -r $TOPDESTPATH/images/netboot $TOPDESTPATH/isopath/images
+ fi
+
+ if [ -r $TOPDESTPATH/isopath/images/netboot/ppc32.img ]; then
+ PREPBOOT="-prep-boot images/netboot/ppc32.img"
+ fi
+
+ # Create the boot.iso
+ mkisofs -o $TOPDESTPATH/images/boot.iso -chrp-boot -U $PREPBOOT \
+ -part -hfs -T -r -l -J -A "$PRODUCT $VERSION" -sysid PPC \
+ -V "PBOOT" -volset "$VERSION" -volset-size 1 -volset-seqno 1 \
+ -hfs-volid "$VERSION" -hfs-bless "$TOPDESTPATH/isopath/ppc/mac" \
+ -map $BOOTDISKDIR/mapping -magic $BOOTDISKDIR/magic \
+ -no-desktop -allow-multidot $TOPDESTPATH/isopath
+ rm -rf $TOPDESTPATH/isopath
+
makeinstimage "netstg" "$SECSTAGE $SCSIMODULES $IDEMODS =scsi"
makeinstimage "hdstg" "$SECSTAGE $NETMODULES $IDEMODS =net"
makemainmodules "$SECSTAGE $NETMODULES $SCSIMODULES $IDEMODS =scsi =net"
diff --git a/scripts/upd-instroot b/scripts/upd-instroot
index d6c805f02..479afdaa8 100755
--- a/scripts/upd-instroot
+++ b/scripts/upd-instroot
@@ -701,7 +701,7 @@ usr/share/pixmaps/gnome-question.png
usr/share/pixmaps/gnome-warning.png
usr/share/pixmaps/no.xpm
usr/share/pixmaps/yes.xpm
-usr/share/ppc64-utils/zImage.lds
+usr/share/ppc64-utils/*
usr/share/system-config-keyboard/*
usr/share/terminfo/l/linux
usr/share/terminfo/x/xterm