The previous check only looked for specific boot code in the MBR.
The previous check is still kept as a fallback path.

Signed-off-by: Jonas Lochmann <[email protected]>
---
 .../linux/x86/base-files/lib/upgrade/platform.sh | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/target/linux/x86/base-files/lib/upgrade/platform.sh 
b/target/linux/x86/base-files/lib/upgrade/platform.sh
index 5dad7a538a..719ab49963 100644
--- a/target/linux/x86/base-files/lib/upgrade/platform.sh
+++ b/target/linux/x86/base-files/lib/upgrade/platform.sh
@@ -4,13 +4,15 @@ platform_check_image() {
        local diskdev partdev diff
        [ "$#" -gt 1 ] && return 1
 
-       case "$(get_magic_word "$1")" in
-               eb48|eb63) ;;
-               *)
-                       v "Invalid image type"
-                       return 1
-               ;;
-       esac
+       part_magic_efi "$1" || {
+               case "$(get_magic_word "$1")" in
+                       eb48|eb63) ;;
+                       *)
+                               v "Invalid image type"
+                               return 1
+                       ;;
+               esac
+       }
 
        export_bootdevice && export_partdevice diskdev 0 || {
                v "Unable to determine upgrade device"
-- 
2.47.3


_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to