From 43aa10d331f547862d98bb2f15662b485c1e6670 Mon Sep 17 00:00:00 2001
From: hoewweken <44616757+hoewweken@users.noreply.github.com>
Date: Sat, 10 Feb 2024 16:39:03 +0100
Subject: [PATCH] bhyve-fw-2023-08-01

---
 components/openindiana/bhyve-fw/Makefile            |   11 +++++++----
 components/openindiana/bhyve-fw/patches/pushq.patch |   24 ++++++++++++++++++++++++
 components/openindiana/bhyve-fw/pkg5                |    6 ++----
 3 files changed, 33 insertions(+), 8 deletions(-)

diff --git a/components/openindiana/bhyve-fw/Makefile b/components/openindiana/bhyve-fw/Makefile
index a393d89..03b4189 100644
--- a/components/openindiana/bhyve-fw/Makefile
+++ b/components/openindiana/bhyve-fw/Makefile
@@ -16,8 +16,8 @@
 include ../../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		uefi-edk2
-COMPONENT_VERSION=	20210201
-COMPONENT_REVISION=	2
+COMPONENT_VERSION=	20230801
+#COMPONENT_REVISION=	0
 COMPONENT_FMRI=		system/bhyve/firmware
 COMPONENT_CLASSIFICATION=System/Core
 COMPONENT_SUMMARY=	UEFI-EDK2(+CSM) firmware for bhyve
@@ -30,11 +30,11 @@
 COMPONENT_ARCHIVE_URL= \
 	https://github.com/illumos/$(COMPONENT_NAME)/releases/download/$(COMPONENT_TAG)/$(COMPONENT_ARCHIVE)
 
-COMPONENT_TAG_1=	il-edk2-stable202102-1
+COMPONENT_TAG_1=	il-edk2-stable202308-1
 COMPONENT_SRC_1=	$(COMPONENT_NAME)-$(COMPONENT_TAG_1)
 COMPONENT_ARCHIVE_1=	$(COMPONENT_NAME)-$(COMPONENT_TAG_1).tar.xz
 COMPONENT_ARCHIVE_HASH_1= \
-	sha256:ca26699ec8f8f7e45e01f2d5a23649997d33f0b8437405ca731f6e301d6a71a8
+	sha256:8aaacf4b7c6a875c78492ad74856802abcbce89ee8cf980efbd12c74946b3b79
 COMPONENT_ARCHIVE_URL_1= \
 	https://github.com/illumos/$(COMPONENT_NAME)/releases/download/$(COMPONENT_TAG_1)/$(COMPONENT_ARCHIVE_1)
 
@@ -76,10 +76,12 @@
 $(BUILD_DIR)/DEBUG/.built: COMPONENT_BUILD_TARGETS = DEBUG
 
 $(BUILD_DIR)/RELEASE.csm/.built: COMPONENT_BUILD_ENV += GCCPATH=/opt/gcc/4.4.4
+$(BUILD_DIR)/RELEASE.csm/.built: COMPONENT_BUILD_ENV += PYTHON=/usr/bin/amd64/python2.7
 $(BUILD_DIR)/RELEASE.csm/.built: COMPONENT_BUILD_ARGS = -csm
 $(BUILD_DIR)/RELEASE.csm/.built: COMPONENT_BUILD_TARGETS = RELEASE
 
 $(BUILD_DIR)/DEBUG.csm/.built: COMPONENT_BUILD_ENV += GCCPATH=/opt/gcc/4.4.4
+$(BUILD_DIR)/DEBUG.csm/.built: COMPONENT_BUILD_ENV += PYTHON=/usr/bin/amd64/python2.7
 $(BUILD_DIR)/DEBUG.csm/.built: COMPONENT_BUILD_ARGS = -csm
 $(BUILD_DIR)/DEBUG.csm/.built: COMPONENT_BUILD_TARGETS = DEBUG
 
@@ -125,5 +127,6 @@
 # Build dependencies
 REQUIRED_PACKAGES += developer/acpi
 REQUIRED_PACKAGES += developer/illumos-gcc
+REQUIRED_PACKAGES += runtime/python-27
 
 # Auto-generated dependencies
diff --git a/components/openindiana/bhyve-fw/patches/pushq.patch b/components/openindiana/bhyve-fw/patches/pushq.patch
new file mode 100644
index 0000000..fb0eeef
--- /dev/null
+++ b/components/openindiana/bhyve-fw/patches/pushq.patch
@@ -0,0 +1,24 @@
+
+Binutils 2.41 reports: Error: operand size mismatch for `push'
+
+diff -wpruN --no-dereference '--exclude=*.orig' a~/BhyvePkg/Csm/BhyveCsm16/BhyveCsm16Asm.S a/BhyvePkg/Csm/BhyveCsm16/BhyveCsm16Asm.S
+--- a~/BhyvePkg/Csm/BhyveCsm16/BhyveCsm16Asm.S	1970-01-01 00:00:00
++++ a/BhyvePkg/Csm/BhyveCsm16/BhyveCsm16Asm.S	1970-01-01 00:00:00
+@@ -461,7 +461,7 @@ CsmEntry:
+         lgdt    (GDT.Pointer64)
+         /* Load CS with 16 bit segment and flush the instruction cache. */
+         push    $CODE16_SEL
+-        push    $(2f - 0xf0000)
++        pushq   $(2f - 0xf0000)
+         retfq
+ 
+         .code16
+@@ -700,7 +700,7 @@ LongToReal:
+ 
+         /* Load CS with 16 bit segment and flush the instruction cache. */
+         push    $CODE16_SEL
+-        push    $(2f - 0xf0000)
++        pushq   $(2f - 0xf0000)
+         retfq
+ 
+         .code16
diff --git a/components/openindiana/bhyve-fw/pkg5 b/components/openindiana/bhyve-fw/pkg5
index ccf1c68..f520014 100644
--- a/components/openindiana/bhyve-fw/pkg5
+++ b/components/openindiana/bhyve-fw/pkg5
@@ -1,13 +1,11 @@
 {
     "dependencies": [
-        "SUNWcs",
         "developer/acpi",
         "developer/illumos-gcc",
-        "shell/ksh93",
-        "system/library"
+        "runtime/python-27"
     ],
     "fmris": [
         "system/bhyve/firmware"
     ],
     "name": "uefi-edk2"
-}
\ No newline at end of file
+}

--
Gitblit v1.9.3