From owner-svn-src-all@FreeBSD.ORG Wed Jan 25 03:37:40 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BAD6106564A; Wed, 25 Jan 2012 03:37:40 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F17FC8FC0A; Wed, 25 Jan 2012 03:37:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q0P3bdgr005257; Wed, 25 Jan 2012 03:37:39 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q0P3bdZ6005252; Wed, 25 Jan 2012 03:37:39 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201201250337.q0P3bdZ6005252@svn.freebsd.org> From: Nathan Whitehorn Date: Wed, 25 Jan 2012 03:37:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r230522 - in head: sys/boot/powerpc/boot1.chrp sys/geom/part sys/sys usr.sbin/bsdinstall/partedit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 25 Jan 2012 03:37:40 -0000 Author: nwhitehorn Date: Wed Jan 25 03:37:39 2012 New Revision: 230522 URL: http://svn.freebsd.org/changeset/base/230522 Log: Experimental support for booting CHRP-type PowerPC systems from hard disks. Modified: head/sys/boot/powerpc/boot1.chrp/Makefile head/sys/geom/part/g_part_mbr.c head/sys/sys/diskmbr.h head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c Modified: head/sys/boot/powerpc/boot1.chrp/Makefile ============================================================================== --- head/sys/boot/powerpc/boot1.chrp/Makefile Wed Jan 25 02:22:16 2012 (r230521) +++ head/sys/boot/powerpc/boot1.chrp/Makefile Wed Jan 25 03:37:39 2012 (r230522) @@ -10,7 +10,6 @@ INSTALLFLAGS= -b FILES= boot1.hfs SRCS= boot1.c ashldi3.c -INTERNALPROG= NO_MAN= CFLAGS= -ffreestanding -msoft-float -Os \ Modified: head/sys/geom/part/g_part_mbr.c ============================================================================== --- head/sys/geom/part/g_part_mbr.c Wed Jan 25 02:22:16 2012 (r230521) +++ head/sys/geom/part/g_part_mbr.c Wed Jan 25 03:37:39 2012 (r230522) @@ -123,6 +123,7 @@ static struct g_part_mbr_alias { { DOSPTYP_LINUX, G_PART_ALIAS_LINUX_DATA }, { DOSPTYP_LINLVM, G_PART_ALIAS_LINUX_LVM }, { DOSPTYP_LINRAID, G_PART_ALIAS_LINUX_RAID }, + { DOSPTYP_PPCBOOT, G_PART_ALIAS_FREEBSD_BOOT }, }; static int Modified: head/sys/sys/diskmbr.h ============================================================================== --- head/sys/sys/diskmbr.h Wed Jan 25 02:22:16 2012 (r230521) +++ head/sys/sys/diskmbr.h Wed Jan 25 03:37:39 2012 (r230522) @@ -48,6 +48,7 @@ #define DOSPTYP_NTFS 0x07 /* NTFS partition */ #define DOSPTYP_FAT32 0x0b /* FAT32 partition */ #define DOSPTYP_EXTLBA 0x0f /* DOS extended partition */ +#define DOSPTYP_PPCBOOT 0x41 /* PReP/CHRP boot partition */ #define DOSPTYP_386BSD 0xa5 /* 386BSD partition type */ #define DOSPTYP_LINSWP 0x82 /* Linux swap partition */ #define DOSPTYP_LINUX 0x83 /* Linux partition */ Modified: head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c ============================================================================== --- head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c Wed Jan 25 02:22:16 2012 (r230521) +++ head/usr.sbin/bsdinstall/partedit/partedit_powerpc.c Wed Jan 25 03:37:39 2012 (r230522) @@ -67,7 +67,7 @@ is_scheme_bootable(const char *part_type size_t bootpart_size(const char *part_type) { - if (strcmp(part_type, "APM") == 0) + if (strcmp(part_type, "APM") == 0 || strcmp(part_type, "MBR") == 0) return (800*1024); return (0); } @@ -81,6 +81,8 @@ const char * partcode_path(const char *part_type) { if (strcmp(part_type, "APM") == 0) return ("/boot/boot1.hfs"); + if (strcmp(part_type, "MBR") == 0) + return ("/boot/boot1.elf"); return (NULL); }