From owner-svn-src-all@freebsd.org Thu Jun 7 00:24:11 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65A26FE8F3C; Thu, 7 Jun 2018 00:24:11 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1BA2273561; Thu, 7 Jun 2018 00:24:11 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D88CA18ABE; Thu, 7 Jun 2018 00:24:10 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w570OAId042998; Thu, 7 Jun 2018 00:24:10 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w570OAoi042997; Thu, 7 Jun 2018 00:24:10 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201806070024.w570OAoi042997@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 7 Jun 2018 00:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334745 - head/usr.sbin/bsdinstall/partedit X-SVN-Group: head X-SVN-Commit-Author: jhibbits X-SVN-Commit-Paths: head/usr.sbin/bsdinstall/partedit X-SVN-Commit-Revision: 334745 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2018 00:24:11 -0000 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");