powerpc/boot: Move ubldr to /boot/uboot, and make this a separate filesystem

Summary:
Now that mpc85xx can boot via ubldr, move ubldr to a separate
filesystem, mounted on /boot/uboot, so that a fresh install can boot correctly.

Reviewed By: nwhitehorn
Differential Revision: https://reviews.freebsd.org/D18709
This commit is contained in:
jhibbits 2019-02-18 01:57:47 +00:00
parent db228ed3b9
commit 873314cd7b
3 changed files with 11 additions and 4 deletions

View File

@ -26,6 +26,8 @@
.. ..
modules modules
.. ..
uboot
..
zfs zfs
.. ..
.. ..

View File

@ -11,6 +11,7 @@ LOADER_BZIP2_SUPPORT?= no
.include <bsd.init.mk> .include <bsd.init.mk>
BINDIR= /boot/uboot
PROG= ubldr PROG= ubldr
NEWVERSWHAT= "U-Boot loader" ${MACHINE_ARCH} NEWVERSWHAT= "U-Boot loader" ${MACHINE_ARCH}
INSTALLFLAGS= -b INSTALLFLAGS= -b

View File

@ -94,9 +94,10 @@ bootpart_size(const char *part_type)
return (0); return (0);
if (strcmp(platform, "chrp") == 0) if (strcmp(platform, "chrp") == 0)
return (800*1024); 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 (512*1024*1024);
if (strcmp(platform, "mpc85xx") == 0)
return (16*1024*1024);
return (0); return (0);
} }
@ -111,14 +112,17 @@ bootpart_type(const char *scheme, const char **mountpoint)
return ("prep-boot"); return ("prep-boot");
if (strcmp(platform, "powermac") == 0) if (strcmp(platform, "powermac") == 0)
return ("apple-boot"); 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"; *mountpoint = "/boot";
if (strcmp(scheme, "GPT") == 0) if (strcmp(scheme, "GPT") == 0)
return ("ms-basic-data"); return ("ms-basic-data");
else if (strcmp(scheme, "MBR") == 0) else if (strcmp(scheme, "MBR") == 0)
return ("fat32"); return ("fat32");
} }
if (strcmp(platform, "mpc85xx") == 0) {
*mountpoint = "/boot/uboot";
return ("fat16");
}
return ("freebsd-boot"); return ("freebsd-boot");
} }