@@ -137,11 +137,13 @@ build_legend() {
137137 local has_issues=" n"
138138 if [ -r " /tmp/kexec_initrd_compat.txt" ] && grep -qF ' [!]' /tmp/kexec_initrd_compat.txt 2> /dev/null; then
139139 has_issues=" y"
140+ elif [ -r " /tmp/kexec_fb_compat.txt" ] && grep -qF ' [!]' /tmp/kexec_fb_compat.txt 2> /dev/null; then
141+ has_issues=" y"
140142 fi
141143 if [ " $has_issues " = " y" ]; then
142- printf ' \033[0;32m[OK]\033[0m=ready \033[1;33m[!]\033[0m=may fail after kexec (blank)=could not check'
144+ printf ' \033[0;32m[OK]\033[0m=ready (USB+display) \033[1;33m[!]\033[0m=may fail (blank)=unable to check'
143145 else
144- printf ' \033[0;32m[OK]\033[0m=ready (blank)=could not check'
146+ printf ' \033[0;32m[OK]\033[0m=ready (USB+display) (blank)=unable to check'
145147 fi
146148}
147149
@@ -293,30 +295,39 @@ parse_option() {
293295 LOG " parse_option: name='$name ' kernel='$kernel ' initrd='$initrd ' params='${params: 0: 80} ...'"
294296}
295297
296- # Return the initrd compat marker for the current entry's initrd.
297- # Reads /tmp/kexec_initrd_compat.txt (written by Layer 1) for USB
298- # filesystem support. Framebuffer support is handled as a separate
299- # warning before the menu — efifb/bochs are often built into the
300- # kernel image and can't be reliably detected from the initrd alone.
298+ # Return the combined compat marker for the current entry's initrd.
299+ # Reads two Layer 1 compat files:
300+ # /tmp/kexec_initrd_compat.txt — USB filesystem support
301+ # /tmp/kexec_fb_compat.txt — DRM/KMS display driver (i915, etc.)
301302#
302- # Compat file format :
303- # initrd/relative/path [OK]
304- # other/initrd/path [!]
305- # (absent entries = zero modules, can't verify )
303+ # Combined result :
304+ # [OK] — BOTH filesystem AND display driver confirmed present
305+ # [!] — EITHER filesystem or display driver confirmed missing
306+ # (blank) — cannot verify (no modules in initrd )
306307#
307- # Three states:
308- # [OK] — USB filesystem module confirmed
309- # [!] — initrd has modules but not the USB filesystem one
310- # (blank) — zero modules, can't verify (likely built into kernel)
308+ # When the fb compat file has no entry for this initrd (no modules),
309+ # the fs marker is returned alone.
311310#
312311# In CLI mode adds ANSI colors: green [OK], yellow [!].
313312boot_marker () {
314- local m=" " grn=" " ylw=" " rst=" "
313+ local m=" " fb= " " grn=" " ylw=" " rst=" "
315314 [ " $gui_menu " != " y" ] && { grn=$' \033 [0;32m' ; ylw=$' \033 [1;33m' ; rst=$' \033 [0m' ; }
316315 if [ -n " $initrd " ] && [ -r " /tmp/kexec_initrd_compat.txt" ]; then
317316 local ip=$( echo " $initrd " | sed ' s|^/*||' )
318317 m=$( grep " ^$ip " /tmp/kexec_initrd_compat.txt 2> /dev/null | head -1 | cut -d' ' -f2)
319- [ -n " $m " ] && LOG " boot_marker: initrd=$ip marker=$m " || LOG " boot_marker: initrd=$ip no compat entry"
318+ [ -n " $m " ] && LOG " boot_marker: initrd=$ip fs=$m " || LOG " boot_marker: initrd=$ip no fs entry"
319+ if [ -r " /tmp/kexec_fb_compat.txt" ]; then
320+ fb=$( grep " ^$ip " /tmp/kexec_fb_compat.txt 2> /dev/null | head -1 | cut -d' ' -f2)
321+ [ -n " $fb " ] && LOG " boot_marker: initrd=$ip fb=$fb " || LOG " boot_marker: initrd=$ip no fb entry"
322+ # Combine both
323+ if [ " $m " = " [OK]" ] && [ " $fb " = " [OK]" ]; then
324+ : # both OK
325+ elif [ " $m " = " [!]" ] || [ " $fb " = " [!]" ]; then
326+ m=" [!]" # either missing
327+ else
328+ m=" " # can't verify
329+ fi
330+ fi
320331 [ " $m " = " [OK]" ] && m=" ${grn} [OK]${rst} "
321332 [ " $m " = " [!]" ] && m=" ${ylw} [!]${rst} "
322333 fi
0 commit comments