mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-01-27 14:43:25 -05:00
Optimization for booting openwrt
This commit is contained in:
parent
90ae07d227
commit
07d4140cf4
@ -1631,11 +1631,13 @@ function ventoy_img_openwrt {
|
|||||||
vt_fs_enum_1st_dir (vtimghd,2) /lib/modules/ vt_dir_name
|
vt_fs_enum_1st_dir (vtimghd,2) /lib/modules/ vt_dir_name
|
||||||
|
|
||||||
if [ -f (vtimghd,2)/lib/modules/$vt_dir_name/dm-mod.ko ]; then
|
if [ -f (vtimghd,2)/lib/modules/$vt_dir_name/dm-mod.ko ]; then
|
||||||
|
set openwrt_plugin_need=0
|
||||||
vt_img_extra_initrd_append (vtimghd,2)/lib/modules/$vt_dir_name/dm-mod.ko
|
vt_img_extra_initrd_append (vtimghd,2)/lib/modules/$vt_dir_name/dm-mod.ko
|
||||||
if [ -f (vtimghd,2)/lib/modules/$vt_dir_name/dax.ko ]; then
|
if [ -f (vtimghd,2)/lib/modules/$vt_dir_name/dax.ko ]; then
|
||||||
vt_img_extra_initrd_append (vtimghd,2)/lib/modules/$vt_dir_name/dax.ko
|
vt_img_extra_initrd_append (vtimghd,2)/lib/modules/$vt_dir_name/dax.ko
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
set openwrt_plugin_need=1
|
||||||
if [ ! -f ${vtoy_iso_part}/ventoy/ventoy_openwrt.xz ]; then
|
if [ ! -f ${vtoy_iso_part}/ventoy/ventoy_openwrt.xz ]; then
|
||||||
ventoy_gui_console
|
ventoy_gui_console
|
||||||
echo -e "\n ventoy_openwrt.xz not found. Please refer https://www.ventoy.net/en/doc_openwrt.html.\n"
|
echo -e "\n ventoy_openwrt.xz not found. Please refer https://www.ventoy.net/en/doc_openwrt.html.\n"
|
||||||
@ -1659,12 +1661,14 @@ function ventoy_img_openwrt {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
vt_load_cpio $vtoy_path "${vt_chosen_path}" ${vtoy_iso_part} "busybox=$ventoy_busybox_ver"
|
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
|
vt_trailer_cpio ${vtoy_iso_part} "${vt_chosen_path}" noinit
|
||||||
|
|
||||||
|
if [ $openwrt_plugin_need -eq 1 ]; then
|
||||||
|
if [ -f ${vtoy_iso_part}/ventoy/ventoy_openwrt.xz ]; then
|
||||||
vt_img_extra_initrd_append ${vtoy_iso_part}/ventoy/ventoy_openwrt.xz
|
vt_img_extra_initrd_append ${vtoy_iso_part}/ventoy/ventoy_openwrt.xz
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
#boot image file
|
#boot image file
|
||||||
vt_set_boot_opt rdinit=/vtoy/vtoy ventoyos=openwrt
|
vt_set_boot_opt rdinit=/vtoy/vtoy ventoyos=openwrt
|
||||||
|
Loading…
x
Reference in New Issue
Block a user