summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--autopart.py14
-rw-r--r--bootdisk/ppc/ofboot.b2
-rw-r--r--fsset.py2
-rw-r--r--installclass.py7
-rw-r--r--partedUtils.py3
-rw-r--r--partitions.py24
-rw-r--r--scripts/mk-images.ppc19
7 files changed, 62 insertions, 9 deletions
diff --git a/autopart.py b/autopart.py
index 712e1ed71..0e301e12e 100644
--- a/autopart.py
+++ b/autopart.py
@@ -303,6 +303,8 @@ def fitSized(diskset, requests, primOnly = 0, newParts = None):
# FIXME: this is a hack to make sure prep boot is even more first
if request.fstype == fsset.fileSystemTypeGet("PPC PReP Boot"):
numDrives = -1
+ if request.fstype == fsset.fileSystemTypeGet("Apple Bootstrap"):
+ numDrives = -1
else:
drives = getDriveList(request, diskset)
numDrives = len(drives)
@@ -1017,7 +1019,7 @@ def doPartitioning(diskset, requests, doRefresh = 1):
ret = bootRequestCheck(requests, diskset)
if ret == BOOTALPHA_NOT_BSD:
- raise PartitioningWarning, _("Boot partition %s doesn't belong to a BSD disk label. SRM won't be able to boot from this paritition. Use a partition belonging to a BSD disk label or change this device disk label to BSD.") %(requests.getBootableRequest()[0].mountpoint,)
+ raise PartitioningWarning, _("Boot partition %s doesn't belong to a BSD disk label. SRM won't be able to boot from this partition. Use a partition belonging to a BSD disk label or change this device disk label to BSD.") %(requests.getBootableRequest()[0].mountpoint,)
elif ret == BOOTALPHA_NO_RESERVED_SPACE:
raise PartitioningWarning, _("Boot partition %s doesn't belong to a disk with enough free space at its beginning for the bootloader to live on. Make sure that there's at least 5MB of free space at the beginning of the disk that contains /boot") %(requests.getBootableRequest()[0].mountpoint,)
elif ret == BOOTEFI_NOT_VFAT:
@@ -1091,7 +1093,8 @@ def doClearPartAction(partitions, diskset):
disk = diskset.disks[drive]
part = disk.next_partition()
while part:
- if not part.is_active() or (part.type == parted.PARTITION_EXTENDED):
+ if (not part.is_active() or (part.type == parted.PARTITION_EXTENDED) or
+ (part.disk.type.name == "mac" and part.num == 1 and part.get_name() == "Apple")):
part = disk.next_partition(part)
continue
if part.fs_type:
@@ -1487,7 +1490,7 @@ def autoCreatePartitionRequests(autoreq):
"""
requests = []
- for (mntpt, fstype, minsize, maxsize, grow, format) in autoreq:
+ for (mntpt, fstype, minsize, maxsize, grow, format, asvol) in autoreq:
if fstype:
ptype = fsset.fileSystemTypeGet(fstype)
else:
@@ -1575,9 +1578,8 @@ def getAutopartitionBoot():
return [ (None, "PPC PReP Boot", 16, None, 0, 1, 0) ]
elif (iutil.getPPCMachine() == "iSeries") and iutil.hasiSeriesNativeStorage():
return []
- elif (iutil.getPPCMachine() == "PMac") and iutil.getPPCMacGen == "NewWorld":
- return [ ( None, "Apple Bootstrap", 1, 1, 0, 1, 0) ,
- ("/boot", None, 100, None, 0, 1, 0) ]
+ elif (iutil.getPPCMachine() == "PMac") and iutil.getPPCMacGen() == "NewWorld":
+ return [ ( None, "Apple Bootstrap", 1, 1, 0, 1, 0) ]
else:
return [ ("/boot", None, 100, None, 0, 1, 0) ]
diff --git a/bootdisk/ppc/ofboot.b b/bootdisk/ppc/ofboot.b
index 7dc24a136..c593052d4 100644
--- a/bootdisk/ppc/ofboot.b
+++ b/bootdisk/ppc/ofboot.b
@@ -1,6 +1,6 @@
<CHRP-BOOT>
<COMPATIBLE>
-MacRISC MacRISC3
+MacRISC MacRISC3 MacRISC4
</COMPATIBLE>
<DESCRIPTION>
diff --git a/fsset.py b/fsset.py
index 0f4b98118..3957f5cc7 100644
--- a/fsset.py
+++ b/fsset.py
@@ -818,8 +818,10 @@ class applebootstrapFileSystem(hfsFileSystem):
self.maxSizeMB = 1
self.name = "Apple Bootstrap"
if iutil.getPPCMacGen() == "NewWorld":
+ self.linuxnativefs = 1
self.supported = 1
else:
+ self.linuxnativefs = 0
self.supported = 0
fileSystemTypeRegister(applebootstrapFileSystem())
diff --git a/installclass.py b/installclass.py
index 72c14c007..8fc78a08c 100644
--- a/installclass.py
+++ b/installclass.py
@@ -551,7 +551,12 @@ class BaseInstallClass:
if doClear:
partitions.autoClearPartType = clear
partitions.autoClearPartDrives = []
- partitions.autoPartitionRequests = autoCreateLVMPartitionRequests(autorequests)
+
+ if (iutil.getPPCMachine() == "PMac"):
+ # No LVM on a Mac partition table
+ partitions.autoPartitionRequests = autoCreatePartitionRequests(autorequests)
+ else:
+ partitions.autoPartitionRequests = autoCreateLVMPartitionRequests(autorequests)
def setInstallData(self, id, intf = None):
diff --git a/partedUtils.py b/partedUtils.py
index cccd46bd3..658eb96ee 100644
--- a/partedUtils.py
+++ b/partedUtils.py
@@ -137,6 +137,9 @@ def get_partition_file_system_type(part):
"""
if part.fs_type is None and part.native_type == 0x41:
ptype = fsset.fileSystemTypeGet("PPC PReP Boot")
+ elif (part.get_flag(parted.PARTITION_BOOT) == 1 and
+ getPartSizeMB(part) <= 1 and part.fs_type.name == "hfs"):
+ ptype = fsset.fileSystemTypeGet("Apple Bootstrap")
elif part.fs_type == None:
return None
elif part.fs_type.name == "linux-swap":
diff --git a/partitions.py b/partitions.py
index 84906951d..1f0a7576d 100644
--- a/partitions.py
+++ b/partitions.py
@@ -616,6 +616,11 @@ class Partitions:
return [ bootreq ]
else:
return None
+ elif iutil.getPPCMachine() == "PMac":
+ for req in self.requests:
+ if req.fstype == fsset.fileSystemTypeGet("Apple Bootstrap"):
+ return [ req ]
+ return None
elif iutil.getPPCMachine() == "iSeries":
for req in self.requests:
if req.fstype == fsset.fileSystemTypeGet("PPC PReP Boot"):
@@ -797,6 +802,25 @@ class Partitions:
errors.append(_("You must create a /boot/efi partition of "
"type FAT and a size of 50 megabytes."))
+ if iutil.getPPCMacGen() == "NewWorld":
+ reqs = self.getBootableRequest()
+ found = 0
+
+ bestreq = None
+ if reqs:
+ for req in reqs:
+ if req.fstype == fsset.fileSystemTypeGet("Apple Bootstrap"):
+ found = 1
+ # the best one is either the first or the first
+ # newly formatted one
+ if ((bestreq is None) or ((bestreq.format == 0) and
+ (req.format == 1))):
+ bestreq = req
+ break
+
+ if not found:
+ errors.append(_("You must create an Apple Bootstrap partition."))
+
if (iutil.getPPCMachine() == "pSeries" or
iutil.getPPCMachine() == "iSeries"):
reqs = self.getBootableRequest()
diff --git a/scripts/mk-images.ppc b/scripts/mk-images.ppc
index 8cede8bdd..1d62482e4 100644
--- a/scripts/mk-images.ppc
+++ b/scripts/mk-images.ppc
@@ -32,7 +32,7 @@ makeBootImages() {
--loaderbin loader \
--modules "$COMMONMODULES $NETMODULES $SCSIMODULES $SCSIMODS $IDEMODS $ISOMODULES $USBMODS =scsi =net"
- mkdir -p $TOPDESTPATH/etc $TOPDESTPATH/ppc/chrp $TOPDESTPATH/images/pseries
+ 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
@@ -67,6 +67,23 @@ 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