Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jan 2012 03:37:39 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r230522 - in head: sys/boot/powerpc/boot1.chrp sys/geom/part sys/sys usr.sbin/bsdinstall/partedit
Message-ID:  <201201250337.q0P3bdZ6005252@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201250337.q0P3bdZ6005252>