diff options
author | Justin Hibbits <jhibbits@FreeBSD.org> | 2018-06-07 00:24:10 +0000 |
---|---|---|
committer | Justin Hibbits <jhibbits@FreeBSD.org> | 2018-06-07 00:24:10 +0000 |
commit | 60f18ad0b47af6cf88e6412237e58e3e3f9feb28 (patch) | |
tree | 852f74c7f3dd5b6f5108e218a7c46c4b79f191b8 /usr.sbin/bsdinstall/partedit | |
parent | 30dc95029e879a2ca9be652999284f7728d99f70 (diff) |
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
Notes
Notes:
svn path=/head/; revision=334745
Diffstat (limited to 'usr.sbin/bsdinstall/partedit')
-rw-r--r-- | usr.sbin/bsdinstall/partedit/partedit_powerpc.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.sbin/bsdinstall/partedit/partedit_powerpc.c b/usr.sbin/bsdinstall/partedit/partedit_powerpc.c index 403ef70a874f..d18f2b77857d 100644 --- a/usr.sbin/bsdinstall/partedit/partedit_powerpc.c +++ b/usr.sbin/bsdinstall/partedit/partedit_powerpc.c @@ -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 **mountpoint) 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"); |