git: 0139633fd311 - main - sysutils/u-boot: Bring back usb patch

From: Emmanuel Vadot <manu_at_FreeBSD.org>
Date: Tue, 03 May 2022 16:14:32 UTC
The branch main has been updated by manu:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0139633fd311e7690f42ac9f4ac9c3e87e9d7e2e

commit 0139633fd311e7690f42ac9f4ac9c3e87e9d7e2e
Author:     Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2022-05-03 16:12:59 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2022-05-03 16:14:21 +0000

    sysutils/u-boot: Bring back usb patch
    
    The patch is still needed at least on rockchip platform where
    we probably don't do everything correctly for usb bring up.
    This is also needed is the next boot stage is usb.
    
    Reported by:    kevans
---
 sysutils/u-boot-master/Makefile                  |  1 +
 sysutils/u-boot-master/files/patch-boot__bootm.c | 31 ++++++++++++++++++++++++
 2 files changed, 32 insertions(+)

diff --git a/sysutils/u-boot-master/Makefile b/sysutils/u-boot-master/Makefile
index 88464f01295c..aca7c0d03b6b 100644
--- a/sysutils/u-boot-master/Makefile
+++ b/sysutils/u-boot-master/Makefile
@@ -4,6 +4,7 @@
 
 PORTNAME=	u-boot
 PORTVERSION=	${UBOOT_VERSION}
+PORTREVISION=	1
 CATEGORIES=	sysutils
 PKGNAMESUFFIX?=	-${MODEL}
 MASTER_SITES=	https://ftp.denx.de/pub/u-boot/ \
diff --git a/sysutils/u-boot-master/files/patch-boot__bootm.c b/sysutils/u-boot-master/files/patch-boot__bootm.c
new file mode 100644
index 000000000000..364ac0822593
--- /dev/null
+++ b/sysutils/u-boot-master/files/patch-boot__bootm.c
@@ -0,0 +1,31 @@
+From 7d25c0b01248fbfbbcdf668cc1c080fe0b54978f Mon Sep 17 00:00:00 2001
+From: Emmanuel Vadot <manu@FreeBSD.org>
+Date: Sat, 7 Nov 2020 19:42:31 +0100
+Subject: [PATCH 2/2] Add FreeBSD hack that does not disable usb when
+ efi_exit_boot_service is called
+Content-Type: text/plain; charset=UTF-8
+
+---
+ common/bootm.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/common/bootm.c b/common/bootm.c
+index b3377490b3..22476fc7c9 100644
+--- boot/bootm.c
++++ boot/bootm.c
+@@ -458,7 +458,12 @@ ulong bootm_disable_interrupts(void)
+ 	 * updated every 1 ms within the HCCA structure in SDRAM! For more
+ 	 * details see the OpenHCI specification.
+ 	 */
++	/*
++	 * FreeBSD Hack, on some board this cause efi_exit_bootservice to hang
++	 * for some yet unknown reason.
++	 * This only does this when doing netboot ???
+ 	usb_stop();
++	*/
+ #endif
+ 	return iflag;
+ }
+-- 
+2.28.0
+