diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2012-01-25 03:37:39 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2012-01-25 03:37:39 +0000 |
commit | b41629d499619c40b79db969272fa8a6aa78486d (patch) | |
tree | f839113829e2f473705130c93d8ec8810b0867bf | |
parent | 1d1e035e4aa915966b05721e452d90fe7cef70db (diff) | |
download | FreeBSD-src-b41629d499619c40b79db969272fa8a6aa78486d.zip FreeBSD-src-b41629d499619c40b79db969272fa8a6aa78486d.tar.gz |
Experimental support for booting CHRP-type PowerPC systems from hard disks.
-rw-r--r-- | sys/boot/powerpc/boot1.chrp/Makefile | 1 | ||||
-rw-r--r-- | sys/geom/part/g_part_mbr.c | 1 | ||||
-rw-r--r-- | sys/sys/diskmbr.h | 1 | ||||
-rw-r--r-- | usr.sbin/bsdinstall/partedit/partedit_powerpc.c | 4 |
4 files changed, 5 insertions, 2 deletions
diff --git a/sys/boot/powerpc/boot1.chrp/Makefile b/sys/boot/powerpc/boot1.chrp/Makefile index f3f7e4d..71d0ce6 100644 --- a/sys/boot/powerpc/boot1.chrp/Makefile +++ b/sys/boot/powerpc/boot1.chrp/Makefile @@ -10,7 +10,6 @@ INSTALLFLAGS= -b FILES= boot1.hfs SRCS= boot1.c ashldi3.c -INTERNALPROG= NO_MAN= CFLAGS= -ffreestanding -msoft-float -Os \ diff --git a/sys/geom/part/g_part_mbr.c b/sys/geom/part/g_part_mbr.c index 5e73ee0..126210b 100644 --- a/sys/geom/part/g_part_mbr.c +++ b/sys/geom/part/g_part_mbr.c @@ -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 diff --git a/sys/sys/diskmbr.h b/sys/sys/diskmbr.h index 5b62e64..0caf0d7 100644 --- a/sys/sys/diskmbr.h +++ b/sys/sys/diskmbr.h @@ -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 */ diff --git a/usr.sbin/bsdinstall/partedit/partedit_powerpc.c b/usr.sbin/bsdinstall/partedit/partedit_powerpc.c index 13d2536..ef23eb6 100644 --- a/usr.sbin/bsdinstall/partedit/partedit_powerpc.c +++ b/usr.sbin/bsdinstall/partedit/partedit_powerpc.c @@ -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); } |