# --- T2-COPYRIGHT-BEGIN --- # t2/package/*/grub2/hotfix-i386-ieee1275.patch # Copyright (C) 2025 The T2 SDE Project # SPDX-License-Identifier: GPL-2.0 or patched project license # --- T2-COPYRIGHT-END --- grub2-install: error: /usr/lib64/grub/i386-ieee1275/modinfo.sh doesn't exist. Please specify --target or --directory. --- grub-2.12/grub-core/osdep/linux/platform.c.vanilla 2025-02-09 13:17:33.892296212 +0100 +++ grub-2.12/grub-core/osdep/linux/platform.c 2025-02-09 13:28:18.521007752 +0100 @@ -24,10 +24,20 @@ #include #include #include +#include #include static int +is_file (const char *file) +{ + struct stat st; + if (stat (file, &st) == 0) + return 1; + return 0; +} + +static int is_not_empty_directory (const char *dir) { DIR *d; @@ -144,8 +154,8 @@ return "i386-efi"; } - grub_util_info ("Looking for /proc/device-tree .."); - if (is_not_empty_directory ("/proc/device-tree")) + grub_util_info ("Looking for /proc/device-tree/model .."); + if (is_file ("/proc/device-tree/model")) { grub_util_info ("...found"); return "i386-ieee1275";