From c7427a548fd48b99c0a5b86c80f2810d8933ba46 Mon Sep 17 00:00:00 2001 From: visa Date: Thu, 3 Feb 2022 13:24:04 +0000 Subject: [PATCH] fdisk(8): Make -A preserve BIOS boot partition On PolarFire SoC, the HSS firmware loads HSS payload from BIOS boot partition. Typically the payload carries second-stage low-level boot code, such as U-Boot. If the payload is missing, the SoC is not able to boot normally. Hence automatic disk formatting should not delete the partition. OK krw@ --- sbin/fdisk/fdisk.8 | 5 +++-- sbin/fdisk/part.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/sbin/fdisk/fdisk.8 b/sbin/fdisk/fdisk.8 index c5067e107e9..b3ca9c5ec01 100644 --- a/sbin/fdisk/fdisk.8 +++ b/sbin/fdisk/fdisk.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: fdisk.8,v 1.108 2021/11/26 03:31:38 jsg Exp $ +.\" $OpenBSD: fdisk.8,v 1.109 2022/02/03 13:24:04 visa Exp $ .\" .\" .\" Copyright (c) 1997 Tobias Weingartner @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: November 26 2021 $ +.Dd $Mdocdate: February 3 2022 $ .Dt FDISK 8 .Os .Sh NAME @@ -65,6 +65,7 @@ all existing partitions except the boot partitions .Sq APFS ISC , .Sq APFS , .Sq APFS Recovry , +.Sq BIOS Boot , .Sq HiFive FSBL and .Sq HiFive BBL . diff --git a/sbin/fdisk/part.c b/sbin/fdisk/part.c index b02b6a62ed6..b95a6e76a80 100644 --- a/sbin/fdisk/part.c +++ b/sbin/fdisk/part.c @@ -1,4 +1,4 @@ -/* $OpenBSD: part.c,v 1.113 2022/01/27 16:26:32 krw Exp $ */ +/* $OpenBSD: part.c,v 1.114 2022/02/03 13:24:04 visa Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -152,7 +152,7 @@ const struct gpt_type gpt_types[] = { { 0x07, 0, "NTFS ", "ebd0a0a2-b9e5-4433-87c0-68b6b72699c7" }, { 0x0B, 0, "FAT32 ", "ebd0a0a2-b9e5-4433-87c0-68b6b72699c7" }, { 0x0C, 0, "FAT32L ", "ebd0a0a2-b9e5-4433-87c0-68b6b72699c7" }, - { 0x0D, 0, "BIOS Boot ", "21686148-6449-6e6f-744e-656564454649" }, + { 0x0D, 1, "BIOS Boot ", "21686148-6449-6e6f-744e-656564454649" }, { 0x0E, 0, "FAT16L ", "ebd0a0a2-b9e5-4433-87c0-68b6b72699c7" }, { 0x11, 0, "OS/2 hidden ", "ebd0a0a2-b9e5-4433-87c0-68b6b72699c7" }, { 0x14, 0, "OS/2 hidden ", "ebd0a0a2-b9e5-4433-87c0-68b6b72699c7" }, -- 2.20.1