5217f98
diff -up anaconda-11.4.0.83/bootdisk/sparc/silo.conf.spot anaconda-11.4.0.83/bootdisk/sparc/silo.conf
95874e1
--- anaconda-11.4.0.83/bootdisk/sparc/silo.conf.spot	2008-10-01 21:32:11.000000000 -0400
95874e1
+++ anaconda-11.4.0.83/bootdisk/sparc/silo.conf	2008-10-05 12:09:12.000000000 -0400
95874e1
@@ -2,31 +2,31 @@ partition=1
5217f98
 default=linux
5217f98
 read-write
5217f98
 timeout=100
5217f98
-message=/etc/boot.msg
5217f98
-image="cat /etc/boot.msg"
5217f98
+message=/boot/boot.msg
5217f98
+image="cat /boot/boot.msg"
5217f98
         label=1
5217f98
         single-key
5217f98
-image="cat /etc/options.msg"
5217f98
+image="cat /boot/options.msg"
5217f98
         label=2
5217f98
         single-key
5217f98
-image="cat /etc/general.msg"
5217f98
+image="cat /boot/general.msg"
5217f98
         label=3
5217f98
         single-key
5217f98
-image="cat /etc/param.msg"
5217f98
+image="cat /boot/param.msg"
5217f98
         label=4
5217f98
         single-key
5217f98
-image="cat /etc/rescue.msg"
5217f98
+image="cat /boot/rescue.msg"
5217f98
         label=5
5217f98
         single-key
95874e1
-image[sun4u]=/boot/vmlinux
95874e1
+image[sun4u]=/boot/vmlinuz
95874e1
         label=linux
95874e1
         alias=install
95874e1
         initrd=/boot/initrd.img
95874e1
-image[sun4u]=/boot/vmlinux
95874e1
+image[sun4u]=/boot/vmlinuz
95874e1
         label=text
95874e1
         append=text
95874e1
         initrd=/boot/initrd.img
95874e1
-image[sun4u]=/boot/vmlinux
95874e1
+image[sun4u]=/boot/vmlinuz
95874e1
         label=ks
95874e1
         append=ks
95874e1
         initrd=/boot/initrd.img
c1562c1
diff -up anaconda-11.4.0.83/scripts/mk-images.sparc.spot anaconda-11.4.0.83/scripts/mk-images.sparc
c1562c1
--- anaconda-11.4.0.83/scripts/mk-images.sparc.spot	2008-10-01 21:32:11.000000000 -0400
95874e1
+++ anaconda-11.4.0.83/scripts/mk-images.sparc	2008-10-05 12:08:50.000000000 -0400
5217f98
@@ -44,6 +44,8 @@ maketftp() {
5217f98
        exit 1
5217f98
     done
5217f98
 
5217f98
+    echo "Making a $KERNELARCH tftp image: $TFTPIMAGE"
5217f98
+
5217f98
     elftoaout $TFTPKERNEL -o $TFTPIMAGE
5217f98
     if [ "$KERNELARCH" = "sparc" ]; then
5217f98
        piggyback $TFTPIMAGE $TFTPSYSMAP $TFTPINITRD
5217f98
@@ -52,51 +54,41 @@ maketftp() {
c1562c1
     fi
c1562c1
 }
c1562c1
 
c1562c1
-prepareBootImage() {
c1562c1
-	echo "sparc: prepareBootImage() is called"
c1562c1
+prepareBootTree() {
c1562c1
+	echo "sparc: prepareBootTree() is called"
5217f98
+	(cd $BOOTDISKDIR; find . -maxdepth 1 ! -type d | cpio --quiet -p $MBD_BOOTTREE)
5217f98
+
5217f98
+	cp $MBD_FSIMAGE $MBD_BOOTTREE/initrd.img
5217f98
+	cp $KERNELROOT/boot/vmlinuz-* $MBD_BOOTTREE/vmlinuz
5217f98
+	cp $KERNELROOT/boot/System.map-* $MBD_BOOTTREE/System.map
c1562c1
 
c1562c1
-        dd if=/dev/zero of=$MBD_TMPIMAGE bs=1k count=$BOOTDISKSIZE 2>/dev/null
c1562c1
-        echo y | /sbin/mke2fs -b 1024 -r 0 -O none $MBD_TMPIMAGE  > /dev/null 2>/dev/null
c1562c1
-	LODEV=`findloopdevice $MBD_TMPIMAGE`
c1562c1
-	mount $LODEV -t ext2 $MBD_BOOTTREE
c1562c1
-	cp $BOOTDISKDIR/fd.b $MBD_BOOTTREE
c1562c1
-	cp $BOOTDISKDIR/second.b $MBD_BOOTTREE
c1562c1
-	cp $BOOTDISKDIR/*.msg $stagedir
c1562c1
-        mkdir -p $MBD_BOOTTREE/etc
c1562c1
-	cp $BOOTDISKDIR/silo.conf $MBD_BOOTTREE/etc
c1562c1
-	zcat $KERNELROOT/boot/vmlinuz-* | gzip -9 > $MBD_BOOTTREE/vmlinux.gz
c1562c1
-	umount $LODEV
c1562c1
-	losetup -d $LODEV
c1562c1
-	mount -o loop -t ext2 $MBD_TMPIMAGE $MBD_BOOTTREE
c1562c1
-	$SILO -r $MBD_BOOTTREE -i /fd.b -b /second.b -C /etc/silo.conf -F
c1562c1
 }
c1562c1
 
c1562c1
 makeBootImages() {
c1562c1
     echo "Building boot images for kernel $kernelvers.$KERNELARCH"
c1562c1
 
c1562c1
-    mkdir -p $TOPDESTPATH/boot
c1562c1
-    cp $BOOTDISKDIR/isofs.b $TOPDESTPATH/boot
c1562c1
-    cp $BOOTDISKDIR/second.b $TOPDESTPATH/boot
c1562c1
-    cp $BOOTDISKDIR/etc/silo.conf $TOPDESTPATH/boot    
c1562c1
-
c1562c1
-    mkdir -p $TOPDESTPATH/etc
c1562c1
-    cp $BOOTDISKDIR/*.msg $TOPDESTPATH/etc
c1562c1
-
c1562c1
-    mkdir -p $TOPDESTPATH/kernels
c1562c1
-    cp $KERNELROOT/boot/vmlinuz-* $TOPDESTPATH/kernels/vmlinux
c1562c1
-    cp $KERNELROOT/boot/System.map-* $TOPDESTPATH/boot/System.map
5217f98
-
5217f98
-    echo "List of init modules: $INITRDMODS $SPARCMODS"
5217f98
-
c1562c1
-    makeinitrd --initrdto $TOPDESTPATH/boot/initrd.img \
5217f98
+    echo "Building initrd.img"
5217f98
+    makeinitrd --initrdto $TOPDESTPATH/images/initrd.img \
c1562c1
 	--initrdsize 8192 \
c1562c1
 	--loaderbin loader \
c1562c1
 	--modules "$INITRDMODS $SPARCMODS"
5217f98
-
5217f98
-    maketftp --kernel $TOPDESTPATH/boot/vmlinux \
5217f98
-	--imagename $TOPDESTPATH/images/tftp.img \
c1562c1
-	--initrdfrom $TOPDESTPATH/boot/initrd.img \
5217f98
-	--systemmap $TOPDESTPATH/boot/System.map
5217f98
+    [ $? = 0 ] || exit 1
5217f98
+    if [ -f $IMGPATH/usr/lib/anaconda-runtime/boot/second.b ]; then
5217f98
+	echo "Building boot dir for silo"
5217f98
+	MBD_BOOTTREE=$TOPDESTPATH/boot
5217f98
+	MBD_FSIMAGE=$TOPDESTPATH/images/initrd.img
5217f98
+	mkdir $MBD_BOOTTREE
5217f98
+	cp $IMGPATH/usr/lib/anaconda-runtime/boot/*.b $MBD_BOOTTREE/
5217f98
+	
5217f98
+	prepareBootTree
c1562c1
+
5217f98
+	maketftp --kernel $MBD_BOOTTREE/vmlinuz \
5217f98
+		 --imagename $TOPDESTPATH/images/tftp.img \
5217f98
+		 --systemmap $MBD_BOOTTREE/System.map
5217f98
+    else
5217f98
+	echo "I can't find SILO in $IMGPATH/usr/lib/anaconda-runtime/boot ?!?"
5217f98
+	exit 1
5217f98
+    fi
5217f98
 
c1562c1
 }
c1562c1
 
5217f98
@@ -110,6 +102,8 @@ doPostImages() {
c1562c1
 			-r -V "PBOOT" -A "$PRODUCT $VERSION" \
c1562c1
 			-x Fedora \
c1562c1
 			-x repodata \
c1562c1
-			-sparc-label "$PRODUCT $VERSION Boot Disc" -o $TOPDESTPATH/images/$BOOTISO $TOPDESTPATH
c1562c1
+			-sparc-label "$PRODUCT $VERSION Boot Disc" \
c1562c1
+			-o $TOPDESTPATH/images/$BOOTISO -graft-points \
c1562c1
+			boot=$TOPDESTPATH/boot images/stage2.img=$TOPDESTPATH/images/stage2.img
c1562c1
 	fi
c1562c1
 }
c1562c1
diff -up anaconda-11.4.0.83/scripts/mk-images.spot anaconda-11.4.0.83/scripts/mk-images
c1562c1
--- anaconda-11.4.0.83/scripts/mk-images.spot	2008-10-01 21:32:11.000000000 -0400
95874e1
+++ anaconda-11.4.0.83/scripts/mk-images	2008-10-05 12:08:50.000000000 -0400
c1562c1
@@ -128,7 +128,7 @@ INITRDMODS="$USBMODS $FIREWIREMODS $IDEM
c1562c1
 	KERNELDIR="/boot"
c1562c1
     fi
c3ee786
     
c1562c1
-    if [ "$BUILDARCH" = "sparc64" ]; then
c1562c1
+    if [ "$BUILDARCH" = "sparc64" -o "$BUILDARCH" = "sparcv9" ]; then
c3ee786
 	BASEARCH=sparc
c3ee786
     else
c3ee786
 	BASEARCH=$BUILDARCH
c1562c1
@@ -136,7 +136,7 @@ INITRDMODS="$USBMODS $FIREWIREMODS $IDEM
c1562c1
 
c1562c1
     # explicit block size setting for some arches (FIXME: we compose 
c1562c1
     # ppc64-ish trees as ppc, so we have to set the "wrong" block size)
c1562c1
-    if [ "$BUILDARCH" = "sparc64" ]; then
c1562c1
+    if [ "$BUILDARCH" = "sparc64" -o "$BUILDARCH" = "sparcv9" ]; then
c1562c1
 	CRAMBS="--blocksize 8192"
c1562c1
     elif [ "$BUILDARCH" = "sparc" ]; then
c1562c1
 	CRAMBS="--blocksize 4096"
a904294
@@ -198,9 +198,9 @@ INITRDMODS="$USBMODS $FIREWIREMODS $IDEM
a904294
 
a904294
     if [ "$BUILDARCH" != "s390" -a "$BUILDARCH" != "s390x" ]; then
a904294
        # go ahead and create the keymaps so we only have to do it once
a904294
-       if [ -f $IMGPATH/usr/lib/anaconda-runtime/keymaps-override-$BUILDARCH ]; then
a904294
+       if [ -f $IMGPATH/usr/lib/anaconda-runtime/keymaps-override-$BASEARCH ]; then
a904294
 	   echo "Found keymap override, using it"
a904294
-	   cp $IMGPATH/usr/lib/anaconda-runtime/keymaps-override-$BUILDARCH $KEYMAPS
a904294
+	   cp $IMGPATH/usr/lib/anaconda-runtime/keymaps-override-$BASEARCH $KEYMAPS
a904294
        else
a904294
 	   echo "Running: $GETKEYMAPS $BUILDARCH $KEYMAPS $IMGPATH"
a904294
 	   $GETKEYMAPS $BUILDARCH $KEYMAPS $IMGPATH
c1562c1
@@ -734,6 +734,8 @@ elif [ ${BUILDARCH} = ppc64 ]; then
c3ee786
 elif [ ${BUILDARCH} = "x86_64" -o ${BUILDARCH} = "i386" ]; then
c3ee786
     source $TOPDIR/mk-images.x86
c3ee786
     source $TOPDIR/mk-images.efi
c1562c1
+elif [ ${BUILDARCH} = "sparc64" -o ${BUILDARCH} = "sparcv9" ]; then
c3ee786
+    source $TOPDIR/mk-images.sparc
c3ee786
 else
c3ee786
     source $TOPDIR/mk-images.${BUILDARCH}
c3ee786
 fi
c1562c1
@@ -754,6 +756,8 @@ elif [ "$BUILDARCH" = "x86_64" ]; then
c3ee786
 elif [ "$BUILDARCH" = "ia64" ]; then
c3ee786
     kerneltags="kernel kernel-xen"
c3ee786
     efiarch="ia64"
a904294
+elif [ "$BUILDARCH" = "sparcv9" -o "$BUILDARCH" = "sparc64" ]; then
c1562c1
+    arches="sparc64"
c3ee786
 fi
c3ee786
 
c3ee786
 foundakernel=""
c62ffb4
diff -up anaconda-11.4.0.83/scripts/pkgorder.spot anaconda-11.4.0.83/scripts/pkgorder
95874e1
--- anaconda-11.4.0.83/scripts/pkgorder.spot	2008-10-01 21:32:11.000000000 -0400
95874e1
+++ anaconda-11.4.0.83/scripts/pkgorder	2008-10-05 12:08:50.000000000 -0400
c62ffb4
@@ -71,7 +71,7 @@ class PackageOrderer(yum.YumBase):
c62ffb4
         self.doRepoSetup()
c62ffb4
 
c62ffb4
 # We have to hack this in here, otherwise, we won't get sparc64v, sparcv9v
c62ffb4
-        if arch.startswith("sparc64"):
c62ffb4
+        if arch.startswith("sparc64") or arch.startswith("sparcv9"):
c62ffb4
             self.arch = "sparc64v" 
c62ffb4
         self.doSackSetup(rpmUtils.arch.getArchList(self.arch))
c62ffb4
         self.doTsSetup()
b0ed869
diff -up anaconda-11.4.0.83/scripts/upd-instroot.spot anaconda-11.4.0.83/scripts/upd-instroot
a904294
--- anaconda-11.4.0.83/scripts/upd-instroot.spot	2008-10-01 21:32:11.000000000 -0400
95874e1
+++ anaconda-11.4.0.83/scripts/upd-instroot	2008-10-05 12:08:50.000000000 -0400
b0ed869
@@ -198,7 +198,7 @@ if [ $ARCH = ppc -o $ARCH = ppc64 ]; the
b0ed869
     PACKAGES="$PACKAGES pcmciautils pdisk yaboot hfsutils"
b0ed869
 fi
b0ed869
 
b0ed869
-if [ $ARCH = sparc -o $ARCH = sparc64 ]; then
b0ed869
+if [ $ARCH = sparc -o $ARCH = sparcv9 -o $ARCH = sparc64 ]; then
b0ed869
     PACKAGES="$PACKAGES silo"
b0ed869
 fi
b0ed869
 
b0ed869
@@ -266,7 +266,7 @@ fi
b0ed869
 #
b0ed869
 # add bootloader for particular arch
b0ed869
 #
b0ed869
-if [ $ARCH = sparc ]; then
b0ed869
+if [ $ARCH = sparc -o $ARCH = sparcv9 -o $ARCH = sparc64 ]; then
b0ed869
     PACKAGESGR="$PACKAGESGR tilo silo"
b0ed869
 fi
b0ed869
 
a904294
@@ -312,6 +312,7 @@ KEEPFILE=${TMPDIR:-/tmp}/keepfile.$$
a904294
 cat > $KEEPFILE <
a904294
 boot/efi/EFI/redhat/elilo.efi
a904294
 boot/efi/EFI/redhat/grub.efi
a904294
+boot/*.b
a904294
 bin/bash
a904294
 bin/dbus-daemon
a904294
 bin/fdisk*
a904294
@@ -1050,11 +1051,10 @@ for p in $DEST $DESTGR; do
b0ed869
 	done
b0ed869
 
b0ed869
 	# copy bootloader files for sparc
b0ed869
-	if [ $ARCH = sparc -a $p = $DESTGR ]; then
a904294
+	if [ $ARCH = sparc -o $ARCH = sparcv9 -o $ARCH = sparc64 ]; then
a904294
 	    mkdir -p $p/usr/lib/anaconda-runtime/boot
b0ed869
-	    [ -d $p/boot ] || die "ERROR: directory missing: $p/boot"
b0ed869
-	    (cd $p/boot; find -name "*.b") | (cd $p/boot; /bin/cpio --quiet -pdmu $p/usr/lib/anaconda-runtime/boot)
a904294
-        fi
a904294
+	    cp -af $p/boot/*.b $p/usr/lib/anaconda-runtime/boot
a904294
+	fi
b0ed869
 
b0ed869
 	# copy bootloader file for ppc
a904294
 	if [ $ARCH = ppc -o $ARCH = ppc64 ]; then