new file mode 100644
@@ -0,0 +1,31 @@
+From 6e85adb6ac0dbab5e1aefe8e262c8260f60b2cd3 Mon Sep 17 00:00:00 2001
+From: kmicki <1463619+kmicki@users.noreply.github.com>
+Date: Tue, 15 Nov 2022 14:37:25 +0100
+Subject: [PATCH] Update efibootmgr.c
+
+get_entry: return entry if it was found before reaching the end of the list
+
+Upstream-Status: Backport [https://github.com/rhboot/efibootmgr/commit/3eac27c5fccf93d2d6e634d6fe2a76d06708ec6e]
+
+Signed-off-by: kmicki <1463619+kmicki@users.noreply.github.com>
+(cherry picked from commit 3eac27c5fccf93d2d6e634d6fe2a76d06708ec6e)
+Signed-off-by: Hugo SIMELIERE (Schneider Electric) <hsimeliere.opensource@witekio.com>
+---
+ src/efibootmgr.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/efibootmgr.c b/src/efibootmgr.c
+index b980bcd..4b15d6d 100644
+--- a/src/efibootmgr.c
++++ b/src/efibootmgr.c
+@@ -1192,6 +1192,7 @@ get_entry(list_t *entries, uint16_t num)
+ entry = NULL;
+ continue;
+ }
++ return entry;
+ }
+
+ return entry;
+--
+2.56.1
+
@@ -10,7 +10,9 @@ DEPENDS = "efivar popt"
COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux"
-SRC_URI = "git://github.com/rhinstaller/efibootmgr.git;protocol=https;branch=main;tag=${PV}"
+SRC_URI = "git://github.com/rhinstaller/efibootmgr.git;protocol=https;branch=main;tag=${PV} \
+ file://0001-Update-efibootmgr.c.patch \
+ "
SRCREV = "c3f9f0534e32158f62c43564036878b93b9e0fd6"
inherit pkgconfig