experimental support for chromium os (fydeos/cloudready)

This commit is contained in:
longpanda 2021-08-26 14:17:44 +08:00
parent 05e208ea2a
commit c5af17e04e
6 changed files with 800 additions and 12 deletions

View file

@ -1499,6 +1499,12 @@ function vtoy_unsupport_menuentry {
#============================================================#
#
function only_uefi_tip {
echo -e "\n This IMG file is only supported in UEFI mode. \n"
echo -e " 此 IMG 文件只支持在 UEFI 模式下启动。\n"
echo -e "\npress ENTER to exit (请按 回车 键返回) ..."
read vtInputKey
}
function ventoy_img_easyos {
vt_load_cpio $vtoy_path "${vt_chosen_path}" ${vtoy_iso_part} "busybox=$ventoy_busybox_ver"
@ -1742,6 +1748,74 @@ function ventoy_img_tails {
vt_unset_boot_opt
}
function ventoy_img_fydeos {
if [ "$grub_platform" = "pc" ]; then
only_uefi_tip
return
fi
vt_load_cpio $vtoy_path "${vt_chosen_path}" ${vtoy_iso_part} "busybox=64"
vt_trailer_cpio ${vtoy_iso_part} "${vt_chosen_path}" noinit
ventoy_debug_pause
#boot image file
vt_set_boot_opt rdinit=/vtoy/vtoy ventoyos=fydeos
vt_img_hook_root
set grubdisk=vtimghd
set grubpartA=(vtimghd,3)
set grubpartB=(vtimghd,5)
set linuxpartA=(sda,3)
set linuxpartB=(sda,5)
set root=(vtimghd,12)
configfile (vtimghd,12)/efi/boot/grub.cfg
vt_img_unhook_root
vt_unset_boot_opt
unset grubdisk
unset grubpartA
unset grubpartB
unset linuxpartA
unset linuxpartB
}
function ventoy_img_cloudready {
if [ "$grub_platform" = "pc" ]; then
only_uefi_tip
return
fi
vt_load_cpio $vtoy_path "${vt_chosen_path}" ${vtoy_iso_part} "busybox=64"
vt_trailer_cpio ${vtoy_iso_part} "${vt_chosen_path}" noinit
ventoy_debug_pause
#boot image file
vt_set_boot_opt rdinit=/vtoy/vtoy ventoyos=cloudready
vt_img_hook_root
set grubdisk=vtimghd
set grubpartA=(vtimghd,3)
set grubpartB=(vtimghd,5)
set linuxpartA=(sda,3)
set linuxpartB=(sda,5)
set root=(vtimghd,12)
configfile (vtimghd,12)/efi/boot/grub.cfg
vt_img_unhook_root
vt_unset_boot_opt
unset grubdisk
unset grubpartA
unset grubpartB
unset linuxpartA
unset linuxpartB
}
function ventoy_img_memtest86 {
chainloader (vtimghd,1)/efi/boot/BOOTX64.efi
boot
@ -1800,19 +1874,26 @@ function img_common_menuentry {
vt_get_fs_label (vtimghd,1) vtImgHd1Label
if [ -d (vtimghd,2)/lib ]; then
if [ "$vtImgHd1Label" = "STATE" ]; then
vt_get_fs_label (vtimghd,3) vtImgHd3Label
elif [ -d (vtimghd,2)/lib ]; then
vt_get_fs_label (vtimghd,2) vtImgHd2Label
fi
if [ -e (vtimghd,1)/etc/hostname ]; then
vt_1st_line (vtimghd,1)/etc/hostname vtImgHostname
fi
if [ -e (vtimghd,1)/easy.sfs ]; then
ventoy_img_easyos
elif [ -e (vtimghd,1)/volumio.initrd ]; then
ventoy_img_volumio
if vt_str_begin "$vtImgHd3Label" "ROOT-"; then
if [ -f (vtimghd,3)/etc/os-release.d/ID ]; then
vt_1st_line (vtimghd,3)/etc/os-release.d/ID vt_release_line1
if [ vt_str_begin "$vt_release_line1" "FydeOS" ]; then
ventoy_img_fydeos
fi
elif [ -f (vtimghd,3)/etc/cloudready-release ]; then
ventoy_img_cloudready
fi
elif vt_str_begin "$vtImgHd1Label" "LAKKA"; then
ventoy_img_openelec lakka
elif vt_str_begin "$vtImgHd1Label" "LIBREELEC"; then
@ -1827,6 +1908,10 @@ function img_common_menuentry {
ventoy_img_tails
elif [ "$vtImgHd2Label" = "RECALBOX" ]; then
ventoy_img_recalbox
elif [ -e (vtimghd,1)/easy.sfs ]; then
ventoy_img_easyos
elif [ -e (vtimghd,1)/volumio.initrd ]; then
ventoy_img_volumio
elif [ -f (vtimghd,2)/loader/entries/ubos.conf ]; then
ventoy_img_ubos
elif [ -f (vtimghd,2)/etc/openwrt_version ]; then
@ -1836,7 +1921,7 @@ function img_common_menuentry {
img_unsupport_tip
else
ventoy_img_memtest86
fi
fi
else
vt_linux_chain_data "${vtoy_iso_part}${vt_chosen_path}"
ventoy_acpi_param ${vtoy_chain_mem_addr} 512
@ -1870,7 +1955,7 @@ function img_unsupport_menuentry {
#############################################################
#############################################################
set VENTOY_VERSION="1.0.50"
set VENTOY_VERSION="1.0.51"
#ACPI not compatible with Window7/8, so disable by default
set VTOY_PARAM_NO_ACPI=1