From 534b42b0f9b6f4cf67419bd9d6e2a42c49f08b49 Mon Sep 17 00:00:00 2001 From: Nicholas Sherlock Date: Mon, 19 Oct 2020 23:33:59 +1300 Subject: [PATCH] Fix inability to boot Catalina by reverting VBoxHFS commit https://github.com/nms42/VBoxFsDxe/commit/28e274940491a2f5cb9fc951123dde6910ad28c5 --- Makefile | 1 + src/0001-vboxhfs.patch | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 src/0001-vboxhfs.patch diff --git a/Makefile b/Makefile index a80357d..0271498 100644 --- a/Makefile +++ b/Makefile @@ -136,6 +136,7 @@ $(OPENCORE_UDK_BUILD_DIR)/Bootstrap.efi $(OPENCORE_UDK_BUILD_DIR)/Shell.efi \ $(OPENCORE_UDK_BUILD_DIR)/ResetSystem.efi $(OPENCORE_UDK_BUILD_DIR)/OpenCanopy.efi \ $(OPENCORE_UDK_BUILD_DIR)/VBoxHfs.efi \ : + cd src/OpenCorePkg && patch -p1 --forward < ../0001-vboxhfs.patch || true cd src/OpenCorePkg && ARCHS=X64 ./build_oc.tool --skip-package $(OPENCORE_MODE) # Tools diff --git a/src/0001-vboxhfs.patch b/src/0001-vboxhfs.patch new file mode 100644 index 0000000..fc5fc30 --- /dev/null +++ b/src/0001-vboxhfs.patch @@ -0,0 +1,27 @@ +diff --git a/Staging/VBoxHfs/fsw_hfs.c b/Staging/VBoxHfs/fsw_hfs.c +index a5b3565d..9ca3d0f1 100644 +--- a/Staging/VBoxHfs/fsw_hfs.c ++++ b/Staging/VBoxHfs/fsw_hfs.c +@@ -1042,20 +1042,20 @@ fsw_hfs_cmpf_catkey (BTreeKey *btkey1, BTreeKey *btkey2) + + for (ac = 0; ac == 0 && apos < ckey1nlen; apos++) { + ac = be16_to_cpu (p1[apos]); +- ac = fsw_to_lower (ac); ++ ac = ac ? fsw_to_lower (ac) : 0xFFFF; + } + + /* get next valid character from ckey2 */ + + for (bc = 0; bc == 0 && bpos < ckey2nlen; bpos++) { + bc = p2[bpos]; +- bc = fsw_to_lower (bc); ++ bc = bc ? fsw_to_lower (bc) : 0xFFFF; + } + + if (ac != bc) + break; + +- if (ac == 0) ++ if (bpos == ckey1nlen) + return 0; + }