]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
1.0.23 release v1.0.23
authorlongpanda <admin@ventoy.net>
Fri, 16 Oct 2020 12:26:24 +0000 (20:26 +0800)
committerlongpanda <admin@ventoy.net>
Fri, 16 Oct 2020 12:26:24 +0000 (20:26 +0800)
13 files changed:
GRUB2/MOD_SRC/grub-2.04/grub-core/normal/menu.c
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_plugin.c
IMG/cpio/ventoy/hook/debian/puppy-disk.sh
IMG/cpio/ventoy/hook/debian/puppy-hook.sh
INSTALL/EFI/BOOT/grubx64_real.efi
INSTALL/Ventoy2Disk.sh
INSTALL/grub/grub.cfg
INSTALL/grub/i386-pc/core.img
INSTALL/grub/x86_64-efi/normal.mod
INSTALL/ventoy/ventoy.cpio
INSTALL/ventoy/vtloopex.cpio
LANGUAGES/languages.ini

index 8d73c3c06699f2459f1c889e0cb45e94fc7aa4b3..393f2752465e097a2ae3547855ae4dc54a289b10 100644 (file)
@@ -969,19 +969,28 @@ static struct grub_menu_execute_callback execution_callback =
 static grub_err_t
 show_menu (grub_menu_t menu, int nested, int autobooted)
 {
 static grub_err_t
 show_menu (grub_menu_t menu, int nested, int autobooted)
 {
+    const char *def;    
+    def = grub_env_get("VTOY_DEFAULT_IMAGE");
+    
   while (1)
     {
       int boot_entry;
       grub_menu_entry_t e;
       int auto_boot;
   while (1)
     {
       int boot_entry;
       grub_menu_entry_t e;
       int auto_boot;
-
+      
       boot_entry = run_menu (menu, nested, &auto_boot);
       if (boot_entry < 0)
        break;
 
       boot_entry = run_menu (menu, nested, &auto_boot);
       if (boot_entry < 0)
        break;
 
-      g_ventoy_last_entry = boot_entry;
-      if (g_ventoy_menu_esc)
-          break;
+      if (auto_boot && def && grub_strcmp(def, "VTOY_EXIT") == 0) {
+          grub_exit();
+      }
+
+      if (autobooted == 0 && auto_boot == 0) {
+          g_ventoy_last_entry = boot_entry;
+          if (g_ventoy_menu_esc)
+              break;          
+      }
 
       e = grub_menu_get_entry (menu, boot_entry);
       if (! e)
 
       e = grub_menu_get_entry (menu, boot_entry);
       if (! e)
index b7fb52d304cf6684f56c1668273dc76e667a4770..23f108493d8c5c124dc06b097932937f36606e6f 100644 (file)
@@ -57,6 +57,7 @@ int g_valid_initrd_count = 0;
 int g_default_menu_mode = 0;
 int g_filt_dot_underscore_file = 0;
 int g_sort_case_sensitive = 0;
 int g_default_menu_mode = 0;
 int g_filt_dot_underscore_file = 0;
 int g_sort_case_sensitive = 0;
+int g_tree_view_menu_style = 0;
 static grub_file_t g_old_file;
 static int g_ventoy_last_entry_back;
 
 static grub_file_t g_old_file;
 static int g_ventoy_last_entry_back;
 
@@ -991,7 +992,7 @@ static grub_err_t ventoy_cmd_check_compatible(grub_extcmd_context_t ctxt, int ar
         grub_disk_close(disk);
         
         g_img_swap_tmp_buf[703] = 0;
         grub_disk_close(disk);
         
         g_img_swap_tmp_buf[703] = 0;
-        for (i = 319; i < 703; i++)
+        for (i = 318; i < 703; i++)
         {
             if (g_img_swap_tmp_buf[i] == 'V' &&
                 0 == grub_strncmp(g_img_swap_tmp_buf + i, VENTOY_COMPATIBLE_STR, VENTOY_COMPATIBLE_STR_LEN))
         {
             if (g_img_swap_tmp_buf[i] == 'V' &&
                 0 == grub_strncmp(g_img_swap_tmp_buf + i, VENTOY_COMPATIBLE_STR, VENTOY_COMPATIBLE_STR_LEN))
@@ -1471,10 +1472,20 @@ static int ventoy_dynamic_tree_menu(img_iterator_node *node)
     {
         if (g_default_menu_mode == 0)
         {
     {
         if (g_default_menu_mode == 0)
         {
-            vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos, 
-                          "menuentry \"%-10s [Return to ListView]\" --class=\"vtoyret\" VTOY_RET {\n  "
-                          "  echo 'return ...' \n"
-                          "}\n", "<--");
+            if (g_tree_view_menu_style == 0)
+            {
+                vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos, 
+                              "menuentry \"%-10s [Return to ListView]\" --class=\"vtoyret\" VTOY_RET {\n  "
+                              "  echo 'return ...' \n"
+                              "}\n", "<--");
+            }
+            else
+            {
+                vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos, 
+                              "menuentry \"[Return to ListView]\" --class=\"vtoyret\" VTOY_RET {\n  "
+                              "  echo '%s ...' \n"
+                              "}\n", "return");
+            }
         }
     }
     else
         }
     }
     else
@@ -1488,22 +1499,52 @@ static int ventoy_dynamic_tree_menu(img_iterator_node *node)
 
         dir_alias = ventoy_plugin_get_menu_alias(vtoy_alias_directory, node->dir);
         if (dir_alias)
 
         dir_alias = ventoy_plugin_get_menu_alias(vtoy_alias_directory, node->dir);
         if (dir_alias)
+        {
+            if (g_tree_view_menu_style == 0)
+            {
+                vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos, 
+                              "submenu \"%-10s %s\" --class=\"%s\" --id=\"DIR_%s\" {\n", 
+                              "DIR", dir_alias, dir_class, node->dir + offset);
+            }
+            else
+            {
+                vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos, 
+                              "submenu \"%s\" --class=\"%s\" --id=\"DIR_%s\" {\n", 
+                              dir_alias, dir_class, node->dir + offset);
+            }
+        }
+        else
+        {
+            dir_alias = node->dir + offset;
+
+            if (g_tree_view_menu_style == 0)
+            {
+                vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos, 
+                              "submenu \"%-10s [%s]\" --class=\"%s\" --id=\"DIR_%s\" {\n", 
+                              "DIR", dir_alias, dir_class, node->dir + offset);
+            }
+            else
+            {
+                vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos, 
+                              "submenu \"[%s]\" --class=\"%s\" --id=\"DIR_%s\" {\n", 
+                              dir_alias, dir_class, node->dir + offset);
+            }
+        }
+
+        if (g_tree_view_menu_style == 0)
         {
             vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos, 
         {
             vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos, 
-                          "submenu \"%-10s %s\" --class=\"%s\" {\n", 
-                          "DIR", dir_alias, dir_class);
+                          "menuentry \"%-10s [../]\" --class=\"vtoyret\" VTOY_RET {\n  "
+                          "  echo 'return ...' \n"
+                          "}\n", "<--");
         }
         else
         {
             vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos, 
         }
         else
         {
             vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos, 
-                          "submenu \"%-10s [%s]\" --class=\"%s\" {\n", 
-                          "DIR", node->dir + offset, dir_class);
+                          "menuentry \"[../]\" --class=\"vtoyret\" VTOY_RET {\n  "
+                          "  echo '%s ...' \n"
+                          "}\n", "return");
         }
         }
-
-        vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos, 
-                      "menuentry \"%-10s [../]\" --class=\"vtoyret\" VTOY_RET {\n  "
-                      "  echo 'return ...' \n"
-                      "}\n", "<--");
     }
 
     while ((child = ventoy_get_min_child(node)) != NULL)
     }
 
     while ((child = ventoy_get_min_child(node)) != NULL)
@@ -1513,15 +1554,29 @@ static int ventoy_dynamic_tree_menu(img_iterator_node *node)
 
     while ((img = ventoy_get_min_iso(node)) != NULL)
     {
 
     while ((img = ventoy_get_min_iso(node)) != NULL)
     {
-        vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos, 
-                      "menuentry \"%-10s %s%s\" --class=\"%s\" --id=\"VID_%d\" {\n"
-                      "  %s_%s \n" 
-                      "}\n", 
-                      grub_get_human_size(img->size, GRUB_HUMAN_SIZE_SHORT), 
-                      img->unsupport ? "[***********] " : "", 
-                      img->alias ? img->alias : img->name, img->class, img->id,
-                      img->menu_prefix,
-                      img->unsupport ? "unsupport_menuentry" : "common_menuentry");
+        if (g_tree_view_menu_style == 0)
+        {
+            vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos, 
+                          "menuentry \"%-10s %s%s\" --class=\"%s\" --id=\"VID_%d\" {\n"
+                          "  %s_%s \n" 
+                          "}\n", 
+                          grub_get_human_size(img->size, GRUB_HUMAN_SIZE_SHORT), 
+                          img->unsupport ? "[***********] " : "", 
+                          img->alias ? img->alias : img->name, img->class, img->id,
+                          img->menu_prefix,
+                          img->unsupport ? "unsupport_menuentry" : "common_menuentry");
+        }
+        else
+        {
+            vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos, 
+                          "menuentry \"%s%s\" --class=\"%s\" --id=\"VID_%d\" {\n"
+                          "  %s_%s \n" 
+                          "}\n", 
+                          img->unsupport ? "[***********] " : "", 
+                          img->alias ? img->alias : img->name, img->class, img->id,
+                          img->menu_prefix,
+                          img->unsupport ? "unsupport_menuentry" : "common_menuentry");
+        }
     }
 
     if (node != &g_img_iterator_head)
     }
 
     if (node != &g_img_iterator_head)
@@ -1634,6 +1689,65 @@ int ventoy_check_device(grub_device_t dev)
     return ventoy_check_device_result(0);
 }
 
     return ventoy_check_device_result(0);
 }
 
+static int ventoy_set_default_menu(void)
+{
+    int img_len = 0;
+    char *pos = NULL;
+    char *end = NULL;
+    char *def = NULL;
+    img_info *cur = NULL;
+    img_info *default_node = NULL;
+    const char *default_image = NULL;
+
+    default_image = ventoy_get_env("VTOY_DEFAULT_IMAGE");        
+    if (default_image && default_image[0] == '/')
+    {
+        img_len = grub_strlen(default_image);
+
+        for (cur = g_ventoy_img_list; cur; cur = cur->next)
+        {
+            if (img_len == cur->pathlen && grub_strcmp(default_image, cur->path) == 0)
+            {
+                default_node = cur;
+                break;
+            }
+        }
+
+        if (!default_node)
+        {
+            return 1;
+        }
+
+        if (0 == g_default_menu_mode)
+        {
+            vtoy_ssprintf(g_list_script_buf, g_list_script_pos, "set default='VID_%d'\n", default_node->id);
+        }
+        else
+        {
+            def = grub_strdup(default_image);
+            if (!def)
+            {
+                return 1;
+            }
+
+            vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos, "set default=%c", '\'');
+
+            pos = def + 1;            
+            while ((end = grub_strchr(pos, '/')) != NULL)
+            {
+                *end = 0;                
+                vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos, "DIR_%s>", pos);
+                pos = end + 1;
+            }
+
+            vtoy_ssprintf(g_tree_script_buf, g_tree_script_pos, "VID_%d'\n", default_node->id);
+            grub_free(def);
+        }
+    }
+
+    return 0;
+}
+
 static grub_err_t ventoy_cmd_list_img(grub_extcmd_context_t ctxt, int argc, char **args)
 {
     int len;
 static grub_err_t ventoy_cmd_list_img(grub_extcmd_context_t ctxt, int argc, char **args)
 {
     int len;
@@ -1641,11 +1755,8 @@ static grub_err_t ventoy_cmd_list_img(grub_extcmd_context_t ctxt, int argc, char
     grub_device_t dev = NULL;
     img_info *cur = NULL;
     img_info *tail = NULL;
     grub_device_t dev = NULL;
     img_info *cur = NULL;
     img_info *tail = NULL;
-    img_info *default_node = NULL;
     const char *strdata = NULL;
     char *device_name = NULL;
     const char *strdata = NULL;
     char *device_name = NULL;
-    const char *default_image = NULL;
-    int img_len = 0;
     char buf[32];
     img_iterator_node *node = NULL;
     img_iterator_node *tmp = NULL;
     char buf[32];
     img_iterator_node *node = NULL;
     img_iterator_node *tmp = NULL;
@@ -1734,6 +1845,14 @@ static grub_err_t ventoy_cmd_list_img(grub_extcmd_context_t ctxt, int argc, char
         fs->fs_dir(dev, node->dir, ventoy_colect_img_files, node);        
     }
 
         fs->fs_dir(dev, node->dir, ventoy_colect_img_files, node);        
     }
 
+    strdata = ventoy_get_env("VTOY_TREE_VIEW_MENU_STYLE");
+    if (strdata && strdata[0] == '1' && strdata[1] == 0)
+    {
+        g_tree_view_menu_style = 1;
+    }
+
+    ventoy_set_default_menu();
+
     for (node = &g_img_iterator_head; node; node = node->next)
     {
         ventoy_dynamic_tree_menu(node);
     for (node = &g_img_iterator_head; node; node = node->next)
     {
         ventoy_dynamic_tree_menu(node);
@@ -1768,15 +1887,6 @@ static grub_err_t ventoy_cmd_list_img(grub_extcmd_context_t ctxt, int argc, char
                       "}\n", "<--");
     }
 
                       "}\n", "<--");
     }
 
-    default_image = ventoy_get_env("VTOY_DEFAULT_IMAGE");        
-    if (g_default_menu_mode == 0)
-    {
-        if (default_image)
-        {
-            img_len = grub_strlen(default_image);
-        }
-    }
-
     for (cur = g_ventoy_img_list; cur; cur = cur->next)
     {
         vtoy_ssprintf(g_list_script_buf, g_list_script_pos,
     for (cur = g_ventoy_img_list; cur; cur = cur->next)
     {
         vtoy_ssprintf(g_list_script_buf, g_list_script_pos,
@@ -1787,21 +1897,9 @@ static grub_err_t ventoy_cmd_list_img(grub_extcmd_context_t ctxt, int argc, char
                   cur->alias ? cur->alias : cur->name, cur->class, cur->id,
                   cur->menu_prefix,
                   cur->unsupport ? "unsupport_menuentry" : "common_menuentry");
                   cur->alias ? cur->alias : cur->name, cur->class, cur->id,
                   cur->menu_prefix,
                   cur->unsupport ? "unsupport_menuentry" : "common_menuentry");
-
-        if (g_default_menu_mode == 0 && default_image && default_node == NULL)
-        {
-            if (img_len == cur->pathlen && grub_strcmp(default_image, cur->path) == 0)
-            {
-                default_node = cur;
-            }
-        }
     }
 
     }
 
-    if (default_node)
-    {
-        vtoy_ssprintf(g_list_script_buf, g_list_script_pos, "set default='VID_%d'\n", default_node->id);
-    }
-    
+    g_tree_script_buf[g_tree_script_pos] = 0;
     g_list_script_buf[g_list_script_pos] = 0;
 
     grub_snprintf(buf, sizeof(buf), "%d", g_ventoy_img_count);
     g_list_script_buf[g_list_script_pos] = 0;
 
     grub_snprintf(buf, sizeof(buf), "%d", g_ventoy_img_count);
index 0bf30cc78e3bd23b272488912815eb1108a164e4..2ebf1ca2e6f4d1fef156a210f7e3052c216f8c30 100644 (file)
@@ -68,7 +68,15 @@ static int ventoy_plugin_control_check(VTOY_JSON *json, const char *isodisk)
             pChild = pNode->pstChild;
             if (pChild->enDataType == JSON_TYPE_STRING)
             {
             pChild = pNode->pstChild;
             if (pChild->enDataType == JSON_TYPE_STRING)
             {
-                grub_printf("%s: %s\n", pChild->pcName, pChild->unData.pcStrVal);
+                if (grub_strcmp(pChild->pcName, "VTOY_DEFAULT_IMAGE") == 0)
+                {                    
+                    grub_printf("%s: %s [%s]\n", pChild->pcName, pChild->unData.pcStrVal,
+                        ventoy_check_file_exist("%s%s", isodisk, pChild->unData.pcStrVal) ? "OK" : "NOT EXIST");
+                }
+                else
+                {
+                    grub_printf("%s: %s\n", pChild->pcName, pChild->unData.pcStrVal);                    
+                }
             }
             else
             {
             }
             else
             {
index 6872f5895afb8d0d337836f6ce1e30d7e476f6c7..7f987223db8107b7ed651655fe14a98f583dd35a 100644 (file)
@@ -42,6 +42,7 @@ if ! [ -e $VTOY_DM_PATH ]; then
     blkdev_num=$($VTOY_PATH/tool/dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1 \2/')
     mknod -m 0666 $VTOY_DM_PATH b $blkdev_num
 fi
     blkdev_num=$($VTOY_PATH/tool/dmsetup ls | grep ventoy | sed 's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1 \2/')
     mknod -m 0666 $VTOY_DM_PATH b $blkdev_num
 fi
+cp -a $VTOY_DM_PATH /dev/ventoy
 
 PATH=$VTPATH_OLD
 
 
 PATH=$VTPATH_OLD
 
index 69e18f3d0ca16a9765505e20e71e340c790e522d..4d9342ac29789239471fa049fc36417d7048e7ae 100644 (file)
@@ -19,4 +19,4 @@
 
 $SED '1 apmedia=usbhd'  -i /init
 $SED "/^ *HAVE_PARTS=/a\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/puppy-disk.sh"  -i /init
 
 $SED '1 apmedia=usbhd'  -i /init
 $SED "/^ *HAVE_PARTS=/a\ $BUSYBOX_PATH/sh $VTOY_PATH/hook/debian/puppy-disk.sh"  -i /init
-$SED "/^ *HAVE_PARTS=/a\ HAVE_PARTS='mapper/ventoy|iso9660'"  -i /init
+$SED "/^ *HAVE_PARTS=/a\ HAVE_PARTS='ventoy|iso9660'"  -i /init
index 7591cde2baabd64a28553da314117b30624b5526..6e3419947da7bad5d44e8c708d5c3f812dc69c25 100644 (file)
Binary files a/INSTALL/EFI/BOOT/grubx64_real.efi and b/INSTALL/EFI/BOOT/grubx64_real.efi differ
index 79473600572732ccdde9a544ee072d88751540a5..7a5415fad37fe70bef53607e2ef8e3cb808f9001 100644 (file)
@@ -1,5 +1,11 @@
 #!/bin/sh
 
 #!/bin/sh
 
+if ! [ -f ./tool/ventoy_lib.sh ]; then
+    if [ -f ${0%Ventoy2Disk.sh}/tool/ventoy_lib.sh ]; then
+        cd ${0%Ventoy2Disk.sh}    
+    fi
+fi
+
 if [ -f ./ventoy/version ]; then
     curver=$(cat ./ventoy/version) 
 fi
 if [ -f ./ventoy/version ]; then
     curver=$(cat ./ventoy/version) 
 fi
@@ -12,13 +18,8 @@ echo "      https://www.ventoy.net"
 echo '**********************************************'
 echo ''
 
 echo '**********************************************'
 echo ''
 
-OLDDIR=$PWD
-
-if ! [ -f ./tool/xzcat ]; then
-    if [ -f ${0%Ventoy2Disk.sh}/tool/xzcat ]; then
-        cd ${0%Ventoy2Disk.sh}    
-    fi
-fi
+OLDDIR=$(pwd)
+PATH=./tool:$PATH
 
 if ! [ -f ./boot/boot.img ]; then
     if [ -d ./grub ]; then
 
 if ! [ -f ./boot/boot.img ]; then
     if [ -d ./grub ]; then
@@ -30,27 +31,30 @@ if ! [ -f ./boot/boot.img ]; then
 fi
 
 echo "############# Ventoy2Disk $* ################" >> ./log.txt
 fi
 
 echo "############# Ventoy2Disk $* ################" >> ./log.txt
+date >> ./log.txt
 
 #decompress tool
 
 #decompress tool
-if ! [ -f ./tool/ash ]; then
+if [ -f ./tool/VentoyWorker.sh ]; then
+    echo "no need to decompress tools" >> ./log.txt
+else
     cd tool
     cd tool
-    chmod +x ./xzcat
+    
+    if [ -f ./xzcat ]; then
+        chmod +x ./xzcat
+    fi
+    
     for file in $(ls *.xz); do
     for file in $(ls *.xz); do
-        ./xzcat $file > ${file%.xz}
+        xzcat $file > ${file%.xz}
         chmod +x ${file%.xz}
     done
     cd ../
         chmod +x ${file%.xz}
     done
     cd ../
-
-    if ! [ -f ./tool/ash ]; then
-        echo 'Failed to decompress tools ...'
-        if [ -n "$OLDDIR" ]; then 
-            cd $OLDDIR
-        fi
-        exit 1
-    fi
 fi
 
 fi
 
-./tool/ash ./tool/VentoyWorker.sh $*
+if [ -f /bin/bash ]; then
+    bash ./tool/VentoyWorker.sh $*
+else
+    ./tool/ash ./tool/VentoyWorker.sh $*
+fi
 
 if [ -n "$OLDDIR" ]; then 
     cd $OLDDIR
 
 if [ -n "$OLDDIR" ]; then 
     cd $OLDDIR
index b9443ece4909e49b1a50530e890c67b41c1efe7d..b6fa42ab5328e63bc6b16be2ffa97b8ac5803a25 100644 (file)
@@ -44,6 +44,12 @@ function ventoy_gui_console {
     fi    
 }
 
     fi    
 }
 
+function ventoy_acpi_param {  
+    if [ "$VTOY_PARAM_NO_ACPI" != "1" ]; then
+        vt_acpi_param $1 $2
+    fi
+}
+
 function ventoy_power {
     configfile $prefix/power.cfg
 }
 function ventoy_power {
     configfile $prefix/power.cfg
 }
@@ -436,6 +442,7 @@ function uefi_windows_menu_func {
     ventoy_debug_pause
     
     if [ -n "$vtoy_chain_mem_addr" ]; then
     ventoy_debug_pause
     
     if [ -n "$vtoy_chain_mem_addr" ]; then
+        ventoy_acpi_param ${vtoy_chain_mem_addr} 2048
         ventoy_cli_console
         chainloader ${vtoy_path}/ventoy_x64.efi  env_param=${env_param} isoefi=${LoadIsoEfiDriver} ${vtdebug_flag} mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}
         boot
         ventoy_cli_console
         chainloader ${vtoy_path}/ventoy_x64.efi  env_param=${env_param} isoefi=${LoadIsoEfiDriver} ${vtdebug_flag} mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}
         boot
@@ -540,6 +547,7 @@ function uefi_linux_menu_func {
     vt_linux_chain_data ${1}${chosen_path}
 
     if [ -n "$vtoy_chain_mem_addr" ]; then
     vt_linux_chain_data ${1}${chosen_path}
 
     if [ -n "$vtoy_chain_mem_addr" ]; then
+        ventoy_acpi_param ${vtoy_chain_mem_addr} 2048
         ventoy_cli_console       
         chainloader ${vtoy_path}/ventoy_x64.efi  env_param=${env_param} isoefi=${LoadIsoEfiDriver} FirstTry=${FirstTryBootFile} ${vtdebug_flag} mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}
         boot
         ventoy_cli_console       
         chainloader ${vtoy_path}/ventoy_x64.efi  env_param=${env_param} isoefi=${LoadIsoEfiDriver} FirstTry=${FirstTryBootFile} ${vtdebug_flag} mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}
         boot
@@ -553,6 +561,7 @@ function uefi_unix_menu_func {
     ventoy_unix_comm_proc $1 ${chosen_path}
     
     if [ -n "$vtoy_chain_mem_addr" ]; then
     ventoy_unix_comm_proc $1 ${chosen_path}
     
     if [ -n "$vtoy_chain_mem_addr" ]; then
+        ventoy_acpi_param ${vtoy_chain_mem_addr} 2048
         ventoy_cli_console
         chainloader ${vtoy_path}/ventoy_x64.efi  env_param=${env_param} isoefi=${LoadIsoEfiDriver} FirstTry=${FirstTryBootFile} ${vtdebug_flag} mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}
         boot
         ventoy_cli_console
         chainloader ${vtoy_path}/ventoy_x64.efi  env_param=${env_param} isoefi=${LoadIsoEfiDriver} FirstTry=${FirstTryBootFile} ${vtdebug_flag} mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}
         boot
@@ -605,7 +614,7 @@ function uefi_iso_menu_func {
     elif vt_check_mode 1; then
         set ventoy_compatible=YES
     else
     elif vt_check_mode 1; then
         set ventoy_compatible=YES
     else
-        vt_check_compatible (loop)
+        vt_check_compatible (loop)        
     fi
     
     vt_img_sector ${1}${chosen_path}
     fi
     
     vt_img_sector ${1}${chosen_path}
@@ -664,6 +673,7 @@ function legacy_windows_menu_func {
     ventoy_debug_pause    
     
     if [ -n "$vtoy_chain_mem_addr" ]; then
     ventoy_debug_pause    
     
     if [ -n "$vtoy_chain_mem_addr" ]; then
+        ventoy_acpi_param ${vtoy_chain_mem_addr} 2048
         linux16   $vtoy_path/ipxe.krn ${vtdebug_flag} ibft mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}        
         boot
     else
         linux16   $vtoy_path/ipxe.krn ${vtdebug_flag} ibft mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}        
         boot
     else
@@ -728,6 +738,7 @@ function legacy_linux_menu_func {
     ventoy_debug_pause
     
     if [ -n "$vtoy_chain_mem_addr" ]; then
     ventoy_debug_pause
     
     if [ -n "$vtoy_chain_mem_addr" ]; then
+        ventoy_acpi_param ${vtoy_chain_mem_addr} 2048
         linux16   $vtoy_path/ipxe.krn ${vtdebug_flag}  mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}
         boot
     else
         linux16   $vtoy_path/ipxe.krn ${vtdebug_flag}  mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}
         boot
     else
@@ -741,6 +752,7 @@ function legacy_unix_menu_func {
     ventoy_unix_comm_proc $1 ${chosen_path}
     
     if [ -n "$vtoy_chain_mem_addr" ]; then
     ventoy_unix_comm_proc $1 ${chosen_path}
     
     if [ -n "$vtoy_chain_mem_addr" ]; then
+        #ventoy_acpi_param ${vtoy_chain_mem_addr} 2048
         linux16   $vtoy_path/ipxe.krn ${vtdebug_flag}  mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}
         boot
     else
         linux16   $vtoy_path/ipxe.krn ${vtdebug_flag}  mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}
         boot
     else
@@ -1031,9 +1043,10 @@ function vtoyboot_common_func {
 
         ventoy_debug_pause
         
 
         ventoy_debug_pause
         
-        if [ -n "$vtoy_chain_mem_addr" ]; then        
+        if [ -n "$vtoy_chain_mem_addr" ]; then  
+            ventoy_acpi_param ${vtoy_chain_mem_addr} 512
+            
             if [ "$grub_platform" = "pc" ]; then                    
             if [ "$grub_platform" = "pc" ]; then                    
-                vt_acpi_param ${vtoy_chain_mem_addr} 512
                 linux16 $vtoy_path/ipxe.krn ${vtdebug_flag}  sector512  mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}   
                 boot
             else
                 linux16 $vtoy_path/ipxe.krn ${vtdebug_flag}  sector512  mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}   
                 boot
             else
@@ -1303,6 +1316,7 @@ function img_common_menuentry {
         fi
     else
         vt_linux_chain_data ${vtoy_iso_part}${vt_chosen_path}
         fi
     else
         vt_linux_chain_data ${vtoy_iso_part}${vt_chosen_path}
+        ventoy_acpi_param ${vtoy_chain_mem_addr} 512
         if [ "$grub_platform" = "pc" ]; then 
             linux16 $vtoy_path/ipxe.krn ${vtdebug_flag}  sector512  mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}   
             boot
         if [ "$grub_platform" = "pc" ]; then 
             linux16 $vtoy_path/ipxe.krn ${vtdebug_flag}  sector512  mem:${vtoy_chain_mem_addr}:size:${vtoy_chain_mem_size}   
             boot
@@ -1330,7 +1344,7 @@ function img_unsupport_menuentry {
 #############################################################
 #############################################################
 
 #############################################################
 #############################################################
 
-set VENTOY_VERSION="1.0.22"
+set VENTOY_VERSION="1.0.23"
 
 # Default menu display mode, you can change it as you want.
 #    0: List mode   
 
 # Default menu display mode, you can change it as you want.
 #    0: List mode   
@@ -1426,7 +1440,7 @@ if [ -n "$vtoy_gfxmode" ]; then
     set gfxmode=$vtoy_gfxmode
     set gfxpayload=keep
 else
     set gfxmode=$vtoy_gfxmode
     set gfxpayload=keep
 else
-    set gfxmode=1920x1080,1366x768,1024x768,800x600,auto    
+    set gfxmode=1024x768
     set gfxpayload=keep
 fi
 
     set gfxpayload=keep
 fi
 
@@ -1457,6 +1471,7 @@ fi
 #export necessary variable
 export theme
 export gfxmode
 #export necessary variable
 export theme
 export gfxmode
+export gfxpayload
 export vtoydev
 export vtoy_path
 export vtdebug_flag
 export vtoydev
 export vtoy_path
 export vtdebug_flag
index e8412fd5ae15f03b65752ddeb83a610c10f1a646..a60c821006481607a9566236fb20ac6231441be6 100644 (file)
Binary files a/INSTALL/grub/i386-pc/core.img and b/INSTALL/grub/i386-pc/core.img differ
index 310236f736ef82373bc72b11ce6996adb7daf851..760654542d9deb0e87f3f8f7022319e12512324c 100644 (file)
Binary files a/INSTALL/grub/x86_64-efi/normal.mod and b/INSTALL/grub/x86_64-efi/normal.mod differ
index 27eeef26a00b8127266472ae177514763ede1ad7..f44108f8aff7216b663aed9960b8f9dcec9cf80b 100644 (file)
Binary files a/INSTALL/ventoy/ventoy.cpio and b/INSTALL/ventoy/ventoy.cpio differ
index af6dc30c79829d1d8a432fe0315d0d3a5847b97e..9f66913c1ce7aa67036eacbc9c922008c3810daa 100644 (file)
Binary files a/INSTALL/ventoy/vtloopex.cpio and b/INSTALL/ventoy/vtloopex.cpio differ
index 955da87aa98a7f90e1839a9a3465d6fda7747eba..a28c233039d58092df2d528dff37e2694d35d14b 100644 (file)
Binary files a/LANGUAGES/languages.ini and b/LANGUAGES/languages.ini differ