Add support for easyOS easy-4.4.2-amd64.img. (#1926)

This commit is contained in:
longpanda
2022-10-22 15:28:16 +08:00
parent 3f09fb9a23
commit 4a42bdfce7
6 changed files with 198 additions and 0 deletions

View File

@@ -1847,6 +1847,41 @@ function ventoy_img_easyos {
loopback -d easysfs
}
function ventoy_img_easyos2 {
vt_load_cpio $vtoy_path "${vt_chosen_path}" ${vtoy_iso_part} "busybox=$ventoy_busybox_ver"
vt_trailer_cpio ${vtoy_iso_part} "${vt_chosen_path}" noinit
if [ -e (vtimghd,2)/easyos/easy.sfs ]; then
loopback easysfs (vtimghd,2)/easyos/easy.sfs
elif [ -d (vtimghd,2)/easyos/releases ]; then
vt_fs_enum_1st_dir (vtimghd,2) /easyos/releases/ vt_dir_name
loopback easysfs (vtimghd,2)/easyos/releases/$vt_dir_name/easy.sfs
fi
vt_get_lib_module_ver (easysfs) /lib/modules/ vt_module_ver
if [ -n "$vt_module_ver" ]; then
for mod in "kernel/drivers/md/dm-mod.ko" "kernel/drivers/dax/dax.ko"; do
if [ -e (easysfs)/lib/modules/$vt_module_ver/$mod ]; then
vt_img_extra_initrd_append (easysfs)/lib/modules/$vt_module_ver/$mod
fi
done
fi
ventoy_debug_pause
#boot image file
vt_set_boot_opt rdinit=/vtoy/vtoy
vt_img_hook_root
vt_limine_menu (vtimghd,1)/limine.cfg vt_sys_menu_mem
configfile "mem:${vt_sys_menu_mem_addr}:size:${vt_sys_menu_mem_size}"
vt_img_unhook_root
vt_unset_boot_opt
loopback -d easysfs
}
function ventoy_img_volumio {
vt_load_cpio $vtoy_path "${vt_chosen_path}" ${vtoy_iso_part} "busybox=$ventoy_busybox_ver"
vt_trailer_cpio ${vtoy_iso_part} "${vt_chosen_path}" noinit
@@ -2262,6 +2297,8 @@ function img_common_menuentry {
ventoy_img_esysrescue
elif [ -e (vtimghd,1)/easy.sfs ]; then
ventoy_img_easyos
elif [ -d (vtimghd,2)/easyos ]; then
ventoy_img_easyos2
elif [ -e (vtimghd,1)/volumio.initrd ]; then
ventoy_img_volumio
elif [ -f (vtimghd,2)/loader/entries/ubos.conf ]; then