svn commit: r320007 - in head/usr.sbin/bsdinstall: partedit scripts
Ed Maste
emaste at FreeBSD.org
Fri Jun 16 18:58:50 UTC 2017
Author: emaste
Date: Fri Jun 16 18:58:48 2017
New Revision: 320007
URL: https://svnweb.freebsd.org/changeset/base/320007
Log:
bsdinstall: use consistent EFI configuration across platforms
- increase arm64 EFI partition to 200M, as x86
- use EFI_BOOTPART_SIZE and EFI_BOOTPART_PATH macros on x86
- increase ZFS EFI partition to 200M
PR: 201898
Reviewed by: allanjude, manu
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D11239
Modified:
head/usr.sbin/bsdinstall/partedit/partedit_arm64.c
head/usr.sbin/bsdinstall/partedit/partedit_x86.c
head/usr.sbin/bsdinstall/scripts/zfsboot
Modified: head/usr.sbin/bsdinstall/partedit/partedit_arm64.c
==============================================================================
--- head/usr.sbin/bsdinstall/partedit/partedit_arm64.c Fri Jun 16 17:31:56 2017 (r320006)
+++ head/usr.sbin/bsdinstall/partedit/partedit_arm64.c Fri Jun 16 18:58:48 2017 (r320007)
@@ -35,7 +35,7 @@
#include "partedit.h"
/* EFI partition size in KB */
-#define EFI_BOOTPART_SIZE (50 * 1024)
+#define EFI_BOOTPART_SIZE (200 * 1024 * 1024)
#define EFI_BOOTPART_PATH "/boot/boot1.efifat"
const char *
@@ -73,7 +73,7 @@ bootpart_size(const char *scheme)
if (strcmp(scheme, "GPT") != 0)
return (0);
- return ((EFI_BOOTPART_SIZE) * 1024);
+ return (EFI_BOOTPART_SIZE);
}
const char *
Modified: head/usr.sbin/bsdinstall/partedit/partedit_x86.c
==============================================================================
--- head/usr.sbin/bsdinstall/partedit/partedit_x86.c Fri Jun 16 17:31:56 2017 (r320006)
+++ head/usr.sbin/bsdinstall/partedit/partedit_x86.c Fri Jun 16 18:58:48 2017 (r320007)
@@ -32,6 +32,10 @@
#include "partedit.h"
+/* EFI partition size in bytes */
+#define EFI_BOOTPART_SIZE (200 * 1024 * 1024)
+#define EFI_BOOTPART_PATH "/boot/boot1.efifat"
+
static const char *
x86_bootmethod(void)
{
@@ -99,7 +103,7 @@ bootpart_size(const char *scheme)
if (strcmp(x86_bootmethod(), "BIOS") == 0)
return (512*1024);
else
- return (200*1024*1024);
+ return (EFI_BOOTPART_SIZE);
return (0);
}
@@ -137,7 +141,7 @@ partcode_path(const char *part_type, const char *fs_ty
if (strcmp(part_type, "GPT") == 0) {
if (strcmp(x86_bootmethod(), "UEFI") == 0)
- return ("/boot/boot1.efifat");
+ return (EFI_BOOTPART_PATH);
else if (strcmp(fs_type, "zfs") == 0)
return ("/boot/gptzfsboot");
else
Modified: head/usr.sbin/bsdinstall/scripts/zfsboot
==============================================================================
--- head/usr.sbin/bsdinstall/scripts/zfsboot Fri Jun 16 17:31:56 2017 (r320006)
+++ head/usr.sbin/bsdinstall/scripts/zfsboot Fri Jun 16 18:58:48 2017 (r320007)
@@ -848,7 +848,7 @@ zfs_create_diskpart()
f_eval_catch $funcname gpart \
"$GPART_ADD_ALIGN_LABEL_WITH_SIZE" \
- "$align_small" efiboot$index efi 800k $disk ||
+ "$align_small" efiboot$index efi 200M $disk ||
return $FAILURE
f_eval_catch $funcname gpart "$GPART_BOOTCODE_PARTONLY" \
/boot/boot1.efifat 1 $disk ||
More information about the svn-src-all
mailing list