Experimental support for booting CHRP-type PowerPC systems from hard disks.
This commit is contained in:
parent
3129859c92
commit
090dd24636
@ -10,7 +10,6 @@ INSTALLFLAGS= -b
|
||||
FILES= boot1.hfs
|
||||
SRCS= boot1.c ashldi3.c
|
||||
|
||||
INTERNALPROG=
|
||||
NO_MAN=
|
||||
|
||||
CFLAGS= -ffreestanding -msoft-float -Os \
|
||||
|
@ -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
|
||||
|
@ -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 */
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user