svn commit: r334745 - head/usr.sbin/bsdinstall/partedit
Justin Hibbits
jhibbits at FreeBSD.org
Thu Jun 7 00:24:11 UTC 2018
Author: jhibbits
Date: Thu Jun 7 00:24:10 2018
New Revision: 334745
URL: https://svnweb.freebsd.org/changeset/base/334745
Log:
Add partition scheme for mpc85xx devices
Some mpc85xx devices with u-boot need MBR partitioning with a FAT boot
partition. Since the infrastructure is already in place to have a dedicated
boot partition, this adds the necessary bits to use that infrastructure with
mpc85xx boards.
Reviewed By: nwhitehorn
Differential Revision: https://reviews.freebsd.org/D15664
Modified:
head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c
Modified: head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c
==============================================================================
--- head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c Wed Jun 6 23:12:35 2018 (r334744)
+++ head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c Thu Jun 7 00:24:10 2018 (r334745)
@@ -44,7 +44,8 @@ default_scheme(void) {
if (strcmp(platform, "powermac") == 0)
return ("APM");
- if (strcmp(platform, "chrp") == 0 || strcmp(platform, "ps3") == 0)
+ if (strcmp(platform, "chrp") == 0 || strcmp(platform, "ps3") == 0 ||
+ strcmp(platform, "mpc85xx") == 0)
return ("MBR");
/* Pick GPT as a generic default */
@@ -65,6 +66,8 @@ is_scheme_bootable(const char *part_type) {
(strcmp(part_type, "MBR") == 0 || strcmp(part_type, "BSD") == 0 ||
strcmp(part_type, "GPT") == 0))
return (1);
+ if (strcmp(platform, "mpc85xx") == 0 && strcmp(part_type, "MBR") == 0)
+ return (1);
return (0);
}
@@ -91,7 +94,8 @@ bootpart_size(const char *part_type)
return (0);
if (strcmp(platform, "chrp") == 0)
return (800*1024);
- if (strcmp(platform, "ps3") == 0 || strcmp(platform, "powernv") == 0)
+ if (strcmp(platform, "ps3") == 0 || strcmp(platform, "powernv") == 0 ||
+ strcmp(platform, "mpc85xx") == 0)
return (512*1024*1024);
return (0);
}
@@ -107,7 +111,8 @@ bootpart_type(const char *scheme, const char **mountpo
return ("prep-boot");
if (strcmp(platform, "powermac") == 0)
return ("apple-boot");
- if (strcmp(platform, "powernv") == 0 || strcmp(platform, "ps3") == 0) {
+ if (strcmp(platform, "powernv") == 0 || strcmp(platform, "ps3") == 0 ||
+ strcmp(platform, "mpc85xx") == 0) {
*mountpoint = "/boot";
if (strcmp(scheme, "GPT") == 0)
return ("ms-basic-data");
More information about the svn-src-head
mailing list