Compare commits

..

3 Commits

View File

@@ -745,7 +745,6 @@ menuentry "EASY-BEE -- no GUI / no X11" {
initrd ${initrd}
}
if [ "\${grub_platform}" = "efi" ]; then
menuentry "Memory Test (memtest86+)" {
chainloader /boot/memtest86+x64.efi
@@ -852,60 +851,6 @@ enforce_live_build_bootloader_assets() {
echo "bootloader sync: WARNING: could not extract live entry from $isolinux_cfg" >&2
fi
fi
sync_efi_grub_theme_assets "$lb_dir"
}
fat_image_has_file() {
img="$1"
path="$2"
mtype -i "$img" "$path" >/dev/null 2>&1
}
is_efi_grub_fat_image() {
img="$1"
fat_image_has_file "$img" "::/EFI/boot/grubx64.efi" || return 1
fat_image_has_file "$img" "::/boot/grub/grub.cfg" || return 1
return 0
}
copy_file_to_fat_image() {
img="$1"
src="$2"
dst="$3"
mcopy -o -i "$img" "$src" "$dst" >/dev/null
}
sync_efi_grub_theme_assets() {
lb_dir="$1"
found=0
for img in $(find "$lb_dir" -type f \( -name '*.img' -o -name '*.ima' -o -name '*.fat' \) 2>/dev/null); do
if ! is_efi_grub_fat_image "$img"; then
continue
fi
found=1
echo "bootloader sync: patching EFI GRUB image $img"
mmd -i "$img" "::/boot" >/dev/null 2>&1 || true
mmd -i "$img" "::/boot/grub" >/dev/null 2>&1 || true
copy_file_to_fat_image "$img" "${BUILDER_DIR}/config/bootloaders/grub-efi/config.cfg" "::/boot/grub/config.cfg"
copy_file_to_fat_image "$img" "${BUILDER_DIR}/config/bootloaders/grub-efi/theme.cfg" "::/boot/grub/theme.cfg"
fat_image_has_file "$img" "::/boot/grub/config.cfg" || {
echo "ERROR: EFI GRUB image missing /boot/grub/config.cfg after sync: $img" >&2
exit 1
}
fat_image_has_file "$img" "::/boot/grub/theme.cfg" || {
echo "ERROR: EFI GRUB image missing /boot/grub/theme.cfg after sync: $img" >&2
exit 1
}
done
if [ "$found" != "1" ]; then
echo "ERROR: no EFI GRUB FAT image found in live-build workdir; cannot sync theme assets" >&2
exit 1
fi
}
copy_memtest_from_deb() {