summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-09-04 15:40:26 +0000
committerJeremy Katz <katzj@redhat.com>2003-09-04 15:40:26 +0000
commit3670d962a6f7da0f8b9d6f5cb22e7c2a001a48c5 (patch)
tree8cdfdf80b163f1f8b4e2cd05b4daea09a58e2c76
parent41f557934752e40408cb890e2e9fd0b6ee24633a (diff)
downloadanaconda-3670d962a6f7da0f8b9d6f5cb22e7c2a001a48c5.tar.gz
anaconda-3670d962a6f7da0f8b9d6f5cb22e7c2a001a48c5.tar.xz
anaconda-3670d962a6f7da0f8b9d6f5cb22e7c2a001a48c5.zip
some changes for macppc from jlaska. tweaked pseries images to end up in
images/pseries/, just continue if a kernel arch doesn't exist. for mac to work, still need to be able to create the boot.iso (which are hybrid hfs cds I think)
-rwxr-xr-xscripts/mk-images9
-rw-r--r--scripts/mk-images.ppc37
2 files changed, 34 insertions, 12 deletions
diff --git a/scripts/mk-images b/scripts/mk-images
index d9bcada4e..8c9558d74 100755
--- a/scripts/mk-images
+++ b/scripts/mk-images
@@ -874,7 +874,7 @@ fi
# Find the kernel, unpack it, and verify it
vertag="BOOT"
if [ "$BUILDARCH" = "ppc" -o "$BUILDARCH" = "ppc64" ]; then
- arches="ppc64pseries ppc64iseries"
+ arches="ppc64pseries ppc64iseries ppc"
elif [ "$BUILDARCH" = "i386" ]; then
arches="i386 i586"
else
@@ -886,11 +886,16 @@ for KERNELARCH in $arches; do
kpackage=$($LATEST $KERNELPATH kernel-$kernelvers)
mkdir -p $KERNELROOT/lib/modules/misc
if [ ! -f "$kpackage" ]; then
- echo "kernel-$kernelvers does not exist -- using kernel package"
+ echo "kernel-$kernelvers does not exist for $KERNELARCH -- using kernel package"
kpackage=$($LATEST $KERNELPATH kernel)
kernelvers=""
fi
+ if [ ! -f "$kpackage" ]; then
+ echo "kernel doesn't exist for $KERNELARCH. skipping arch"
+ continue
+ fi
+
ppackage=$($LATEST $KERNELPATH hwdata)
if [ ! -f "$ppackage" ]; then
ppackage=""
diff --git a/scripts/mk-images.ppc b/scripts/mk-images.ppc
index c24a9a76d..4cff5e640 100644
--- a/scripts/mk-images.ppc
+++ b/scripts/mk-images.ppc
@@ -37,7 +37,7 @@ makeBootImages() {
pushd $TOPDESTPATH/ppc/chrp
cp $IMGPATH/usr/share/ppc64-utils/zImage.lds $TOPDESTPATH/ppc/chrp/zImage.lds
- $IMGPATH/usr/bin/mkzimage $KERNELROOT/boot/vmlinuz-partial* $TOPDESTPATH/images/netboot.img $TOPDESTPATH/ppc/chrp/ramdisk.image.gz
+ $IMGPATH/usr/bin/mkzimage $KERNELROOT/boot/vmlinuz-partial* $TOPDESTPATH/images/pseries/netboot.img $TOPDESTPATH/ppc/chrp/ramdisk.image.gz
rm -f $TOPDESTPATH/ppc/chrp/zImage.lds
popd
@@ -49,10 +49,10 @@ makeBootImages() {
# FIXME: this assumes the file gets there by magic
cp $TOPDESTPATH/boot_image $TOPDESTPATH/isopath/boot_image
- mkisofs -generic-boot $TOPDESTPATH/isopath/boot_image -A "$PRODUCT $VERSION" -V "PBOOT" -J -R -T -allow-multidot -l -o $TOPDESTPATH/images/boot.iso $TOPDESTPATH/isopath
+ mkisofs -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/README <<EOF
+ 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
@@ -76,14 +76,31 @@ EOF
$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
rm -f $TOPDESTPATH/ppc/iSeries/vmlinux.sm
+ elif [ "$KERNELARCH" = "ppc" ]; then
+ echo "Building ppc initrd"
+ makeinitrd --initrdto $TOPDESTPATH/images/ppcmac/ramdisk.image.gz \
+ --initrdsize 8192 \
+ --loaderbin loader \
+ --modules "$COMMONMODULES $NETMODULES $SCSIMODULES $SCSIMODS $IDEMODS $ISOMODULES"
+
+ # FIXME: this will overwrite some of the pseries stuff
+ mkdir -p $TOPDESTPATH/etc $TOPDESTPATH/ppc
+ cp $KERNELROOT/boot/vmlinux-* $TOPDESTPATH/ppc/vmlinux
+ cp $BOOTDISKDIR/yaboot.conf $TOPDESTPATH/etc/yaboot.conf
+ cp $BOOTDISKDIR/bootinfo.txt $TOPDESTPATH/ppc/bootinfo.txt
+ cp $IMGPATH/usr/lib/yaboot/yaboot $TOPDESTPATH/ppc
+ $IMGPATH/usr/lib/yaboot/addnote $TOPDESTPATH/ppc/yaboot
+
+ # we also want to make a boot.iso here
+ mkdir -p $TOPDESTPATH/isopath/ppc $TOPDESTPATH/isopath/etc
+ cp $TOPDESTPATH/etc/* $TOPDESTPATH/isopath/etc/
+ cp $TOPDESTPATH/ppc/* $TOPDESTPATH/isopath/ppc/
+
+ # need a proper mkisofs command for mac
+# mkisofs -generic-boot $TOPDESTPATH/isopath/boot_image -A "$PRODUCT $VERSION" -V "PBOOT" -J -R -T -allow-multidot -l -o $TOPDESTPATH/images/boot.iso $TOPDESTPATH/isopath
+ rm -rf $TOPDESTPATH/isopath/
else
- echo "Unknown kernel arch: $KERNELARCH"
- # mac?
- # echo "Building Mac initrd"
- # makeinitrd --initrdto $TOPDESTPATH/images/ramdisk.image.gz \
- # --initrdsize 8192 \
- # --loaderbin loader \
- # --modules "nfs fat vfat cramfs $NETMODULES $SCSIMODULES $IDEMODS $ISOMODULES"
+ echo "Unknown kernel arch: $KERNELARCH"
fi
}