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