mirror of
https://github.com/ventoy/Ventoy.git
synced 2024-12-25 06:35:59 -05:00
Auto memdisk plugin support some IMA/IMG files.
This commit is contained in:
parent
40c4825aac
commit
f222f8cac9
@ -2079,6 +2079,13 @@ static int ventoy_collect_img_files(const char *filename, const struct grub_dirh
|
||||
img->menu_prefix = "miso";
|
||||
}
|
||||
}
|
||||
else if (img_type_img == type)
|
||||
{
|
||||
if (ventoy_plugin_check_memdisk(img->path))
|
||||
{
|
||||
img->menu_prefix = "mimg";
|
||||
}
|
||||
}
|
||||
|
||||
debug("Add %s%s to list %d\n", node->dir, filename, g_ventoy_img_count);
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ make install
|
||||
PATH=$VT_DIR/GRUB2/INSTALL/bin/:$VT_DIR/GRUB2/INSTALL/sbin/:$PATH
|
||||
|
||||
net_modules_legacy="net tftp http"
|
||||
all_modules_legacy="file setkey date drivemap blocklist regexp newc vga_text ntldr search at_keyboard usb_keyboard gcry_md5 hashsum gzio xzio lzopio lspci pci ext2 xfs ventoy chain read halt iso9660 linux16 test true sleep reboot echo videotest videoinfo videotest_checksum video_colors video_cirrus video_bochs vga vbe video_fb font video gettext extcmd terminal linux minicmd help configfile tr trig boot biosdisk disk ls tar squash4 password_pbkdf2 all_video png jpeg part_gpt part_msdos fat exfat ntfs loopback gzio normal udf gfxmenu gfxterm gfxterm_background gfxterm_menu smbios zfs"
|
||||
all_modules_legacy="file date drivemap blocklist newc vga_text ntldr search at_keyboard usb_keyboard gcry_md5 hashsum gzio xzio lzopio lspci pci ext2 xfs ventoy chain read halt iso9660 linux16 test true sleep reboot echo videotest videoinfo videotest_checksum video_colors video_cirrus video_bochs vga vbe font video gettext extcmd terminal linux minicmd help configfile tr trig boot biosdisk disk ls tar squash4 password_pbkdf2 all_video png jpeg part_gpt part_msdos fat exfat ntfs loopback gzio normal udf gfxmenu gfxterm gfxterm_background gfxterm_menu smbios"
|
||||
|
||||
net_modules_uefi="efinet net tftp http"
|
||||
all_modules_uefi="file setkey blocklist ventoy test true regexp newc search at_keyboard usb_keyboard gcry_md5 hashsum gzio xzio lzopio ext2 xfs read halt sleep serial terminfo png password_pbkdf2 gcry_sha512 pbkdf2 part_gpt part_msdos ls tar squash4 loopback part_apple minicmd diskfilter linux relocator jpeg iso9660 udf hfsplus halt acpi mmap gfxmenu video_colors trig bitmap_scale gfxterm bitmap font fat exfat ntfs fshelp efifwsetup reboot echo configfile normal terminal gettext chain priority_queue bufio datetime cat extcmd crypto gzio boot all_video efi_gop efi_uga video_bochs video_cirrus video video_fb gfxterm_background gfxterm_menu mouse fwload smbios zfs"
|
||||
|
@ -16,6 +16,12 @@
|
||||
#
|
||||
#************************************************************************************
|
||||
|
||||
if [ "$grub_platform" = "pc" ]; then
|
||||
insmod setkey
|
||||
insmod regexp
|
||||
insmod video_fb
|
||||
fi
|
||||
|
||||
function ventoy_pause {
|
||||
echo "press Enter to continue ......"
|
||||
read vtTmpPause
|
||||
@ -2346,6 +2352,28 @@ function img_unsupport_menuentry {
|
||||
common_unsupport_menuentry
|
||||
}
|
||||
|
||||
function mimg_common_menuentry {
|
||||
vt_chosen_img_path vt_chosen_path vt_chosen_size vt_chosen_name
|
||||
|
||||
if vt_check_password "${vt_chosen_path}"; then
|
||||
return
|
||||
fi
|
||||
|
||||
echo "memdisk mode boot for $vt_chosen_path"
|
||||
echo ""
|
||||
ventoy_debug_pause
|
||||
|
||||
if [ "$grub_platform" = "pc" ]; then
|
||||
legacy_img_memdisk $vtoy_iso_part "$vt_chosen_path"
|
||||
else
|
||||
vt_load_img_memdisk "$vtoy_iso_part$vt_chosen_path" vtoy_img_buf
|
||||
ventoy_cli_console
|
||||
chainloader ${vtoy_path}/ventoy_${VTOY_EFI_ARCH}.efi memdisk env_param=${env_param} isoefi=${LoadIsoEfiDriver} ${vtdebug_flag} mem:${vtoy_img_buf_addr}:size:${vtoy_img_buf_size}
|
||||
boot
|
||||
ventoy_gui_console
|
||||
fi
|
||||
}
|
||||
|
||||
#############################################################
|
||||
#############################################################
|
||||
#############################################################
|
||||
|
Loading…
Reference in New Issue
Block a user