]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
update
authorlongpanda <admin@ventoy.net>
Tue, 5 Jan 2021 23:50:23 +0000 (07:50 +0800)
committerlongpanda <admin@ventoy.net>
Tue, 5 Jan 2021 23:50:23 +0000 (07:50 +0800)
25 files changed:
GRUB2/MOD_SRC/grub-2.04/grub-core/Makefile.core.def
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_def.h
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_unix.c
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_vhd.c
GRUB2/MOD_SRC/grub-2.04/include/grub/ventoy.h
IMG/cpio/ventoy/hook/wifislax/ventoy-hook.sh
INSTALL/EFI/BOOT/BOOTAA64.EFI
INSTALL/EFI/BOOT/grubia32_real.efi
INSTALL/EFI/BOOT/grubx64_real.efi
INSTALL/Ventoy2Disk.sh
INSTALL/grub/arm64-efi/moddep.lst
INSTALL/grub/grub.cfg
INSTALL/grub/i386-efi/moddep.lst
INSTALL/grub/i386-pc/core.img
INSTALL/grub/i386-pc/moddep.lst
INSTALL/grub/x86_64-efi/moddep.lst
INSTALL/ventoy/ventoy.cpio
INSTALL/ventoy/vtloopex.cpio
License/license-mini_gzip.txt [new file with mode: 0644]
README.md
VtoyTool/vtoydump.c
VtoyTool/vtoytool/00/vtoytool_32
VtoyTool/vtoytool/00/vtoytool_64
VtoyTool/vtoytool/00/vtoytool_aa64

index acd62b225145fb3165b68a98392513ba76439396..b9d87071187c63ef4a289e105bdee346a734a1bd 100644 (file)
@@ -1597,6 +1597,7 @@ module = {
   common = ventoy/lzx.c;
   common = ventoy/xpress.c;
   common = ventoy/huffman.c;
+  common = ventoy/miniz.c;
 };
 
 module = {
index 5dd57e484951ff3b3a13cab51266058f3bd9d903..6b4ee0133b245b8a2d78cdd5ff9d9b1778320563 100644 (file)
 #include <grub/acpi.h>
 #include <grub/charset.h>
 #include <grub/crypto.h>
+#include <grub/lib/crc.h>
 #include <grub/ventoy.h>
 #include "ventoy_def.h"
+#include "miniz.h"
 
 GRUB_MOD_LICENSE ("GPLv3+");
 
@@ -105,6 +107,7 @@ int g_conf_replace_new_len = 0;
 int g_conf_replace_new_len_align = 0;
 
 ventoy_gpt_info *g_ventoy_part_info = NULL;
+grub_uint64_t g_ventoy_disk_size = 0;
 
 static char *g_tree_script_buf = NULL;
 static int g_tree_script_pos = 0;
@@ -3437,6 +3440,22 @@ static grub_err_t ventoy_cmd_pop_last_entry(grub_extcmd_context_t ctxt, int argc
     return 0;
 }
 
+grub_uint64_t ventoy_get_part1_size(ventoy_gpt_info *gpt)
+{
+    grub_uint64_t sectors;
+    
+    if (grub_strncmp(gpt->Head.Signature, "EFI PART", 8) == 0)
+    {
+        sectors = gpt->PartTbl[0].LastLBA + 1 - gpt->PartTbl[0].StartLBA;
+    }
+    else
+    {
+        sectors = gpt->MBR.PartTbl[0].SectorCount;
+    }
+
+    return sectors * 512;
+}
+
 static int ventoy_lib_module_callback(const char *filename, const struct grub_dirhook_info *info, void *data)
 {
     const char *pos = filename + 1;
@@ -3539,6 +3558,8 @@ static grub_err_t ventoy_cmd_load_part_table(grub_extcmd_context_t ctxt, int arg
         return 1;
     }
 
+    g_ventoy_disk_size = disk->total_sectors * (1U << disk->log_sector_size);
+
     grub_disk_read(disk, 0, 0, sizeof(ventoy_gpt_info), g_ventoy_part_info);
     grub_disk_close(disk);
 
@@ -3926,6 +3947,47 @@ int ventoy_is_dir_exist(const char *fmt, ...)
     return 0;
 }
 
+int ventoy_gzip_compress(void *mem_in, int mem_in_len, void *mem_out, int mem_out_len)
+{
+       mz_stream s;
+    grub_uint8_t *outbuf;
+    grub_uint8_t gzHdr[10] = 
+    {
+               0x1F, 0x8B,     /* magic */
+               8,                  /* z method */
+               0,                  /* flags */
+               0,0,0,0,        /* mtime */
+               4,                  /* xfl */
+               3,                  /* OS */
+       };
+
+       grub_memset(&s, 0, sizeof(mz_stream));
+
+    mz_deflateInit2(&s, 1, MZ_DEFLATED, -MZ_DEFAULT_WINDOW_BITS, 6, MZ_DEFAULT_STRATEGY);
+    
+    outbuf = (grub_uint8_t *)mem_out;
+
+    mem_out_len -= sizeof(gzHdr) + 8;
+    grub_memcpy(outbuf, gzHdr, sizeof(gzHdr));
+    outbuf += sizeof(gzHdr);
+
+    s.avail_in = mem_in_len;
+    s.next_in = mem_in;
+
+    s.avail_out = mem_out_len;
+    s.next_out = outbuf;
+
+    mz_deflate(&s, MZ_FINISH);
+
+    mz_deflateEnd(&s);
+
+    outbuf += s.total_out;
+    *(grub_uint32_t *)outbuf = grub_getcrc32c(0, outbuf, s.total_out);
+    *(grub_uint32_t *)(outbuf + 4) = (grub_uint32_t)(s.total_out);
+
+    return s.total_out + sizeof(gzHdr) + 8;    
+}
+
 static int ventoy_env_init(void)
 {
     char buf[64];
@@ -4055,6 +4117,8 @@ static cmd_para ventoy_cmds[] =
     { "vt_unix_reset", ventoy_cmd_unix_reset, 0, NULL, "", "", NULL },
     { "vt_unix_replace_conf", ventoy_cmd_unix_replace_conf, 0, NULL, "", "", NULL },
     { "vt_unix_replace_ko", ventoy_cmd_unix_replace_ko, 0, NULL, "", "", NULL },
+    { "vt_unix_fill_image_desc", ventoy_cmd_unix_fill_image_desc, 0, NULL, "", "", NULL },
+    { "vt_unix_gzip_new_ko", ventoy_cmd_unix_gzip_newko, 0, NULL, "", "", NULL },
     { "vt_unix_chain_data", ventoy_cmd_unix_chain_data, 0, NULL, "", "", NULL },
 
     { "vt_img_hook_root", ventoy_cmd_img_hook_root, 0, NULL, "", "", NULL },
index 2a79d4e861864a0f73712adc7807cc9348035f17..856cde3373b347941496538f16d386b789a6a057 100644 (file)
@@ -875,6 +875,7 @@ extern conf_replace *g_conf_replace_node;
 extern grub_uint8_t *g_conf_replace_new_buf;
 extern int g_conf_replace_new_len;
 extern int g_conf_replace_new_len_align;
+extern grub_uint64_t g_ventoy_disk_size;
 
 #define ventoy_unix_fill_virt(new_data, new_len) \
 { \
@@ -924,6 +925,8 @@ int ventoy_get_disk_guid(const char *filename, grub_uint8_t *guid, grub_uint8_t
 grub_err_t ventoy_cmd_unix_reset(grub_extcmd_context_t ctxt, int argc, char **args);
 grub_err_t ventoy_cmd_unix_replace_conf(grub_extcmd_context_t ctxt, int argc, char **args);
 grub_err_t ventoy_cmd_unix_replace_ko(grub_extcmd_context_t ctxt, int argc, char **args);
+grub_err_t ventoy_cmd_unix_fill_image_desc(grub_extcmd_context_t ctxt, int argc, char **args);
+grub_err_t ventoy_cmd_unix_gzip_newko(grub_extcmd_context_t ctxt, int argc, char **args);
 grub_err_t ventoy_cmd_unix_freebsd_ver(grub_extcmd_context_t ctxt, int argc, char **args);
 grub_err_t ventoy_cmd_parse_freenas_ver(grub_extcmd_context_t ctxt, int argc, char **args);
 int ventoy_check_device_result(int ret);
@@ -934,6 +937,8 @@ grub_err_t ventoy_cmd_patch_vhdboot(grub_extcmd_context_t ctxt, int argc, char *
 grub_err_t ventoy_cmd_raw_chain_data(grub_extcmd_context_t ctxt, int argc, char **args);
 grub_err_t ventoy_cmd_get_vtoy_type(grub_extcmd_context_t ctxt, int argc, char **args);
 int ventoy_check_password(const vtoy_password *pwd, int retry);
+int ventoy_gzip_compress(void *mem_in, int mem_in_len, void *mem_out, int mem_out_len);
+grub_uint64_t ventoy_get_part1_size(ventoy_gpt_info *gpt);
 
 #endif /* __VENTOY_DEF_H__ */
 
index e38597ff5176e6c20c993f4c263b39d999758c2a..626517a036e29171f5bf8431010c35c652164189 100644 (file)
@@ -235,6 +235,21 @@ static int ventoy_freebsd_append_conf(char *buf, const char *isopath)
     return pos;
 }
 
+static int ventoy_dragonfly_append_conf(char *buf, const char *isopath)
+{
+    int pos = 0;
+
+    debug("ventoy_dragonfly_append_conf %s\n", isopath);
+
+    vtoy_ssprintf(buf, pos, "tmpfs_load=\"%s\"\n", "YES");
+    vtoy_ssprintf(buf, pos, "dm_target_linear_load=\"%s\"\n", "YES");
+    vtoy_ssprintf(buf, pos, "initrd.img_load=\"%s\"\n", "YES");
+    vtoy_ssprintf(buf, pos, "initrd.img_type=\"%s\"\n", "md_image");
+    vtoy_ssprintf(buf, pos, "vfs.root.mountfrom=\"%s\"\n", "ufs:md0s0");
+
+    return pos;
+}
+
 grub_err_t ventoy_cmd_unix_reset(grub_extcmd_context_t ctxt, int argc, char **args)
 {
     (void)ctxt;
@@ -431,6 +446,10 @@ grub_err_t ventoy_cmd_unix_replace_conf(grub_extcmd_context_t ctxt, int argc, ch
     {
         g_conf_new_len += ventoy_freebsd_append_conf(data + file->size, args[1]);
     }
+    else if (grub_strcmp(args[0], "DragonFly") == 0)
+    {
+        g_conf_new_len += ventoy_dragonfly_append_conf(data + file->size, args[1]);
+    }
     
     VENTOY_CMD_RETURN(GRUB_ERR_NONE);
 }
@@ -474,6 +493,7 @@ grub_err_t ventoy_cmd_unix_replace_ko(grub_extcmd_context_t ctxt, int argc, char
     data = grub_malloc(file->size);
     if (!data)
     {
+        debug("Failed to alloc memory for new ko %d\n", (int)file->size);
         grub_file_close(file);    
         return 1;
     }
@@ -487,6 +507,105 @@ grub_err_t ventoy_cmd_unix_replace_ko(grub_extcmd_context_t ctxt, int argc, char
     VENTOY_CMD_RETURN(GRUB_ERR_NONE);
 }
 
+grub_err_t ventoy_cmd_unix_fill_image_desc(grub_extcmd_context_t ctxt, int argc, char **args)
+{
+    int i;
+    grub_uint8_t *byte;
+    grub_uint32_t memsize;
+    ventoy_image_desc *desc;
+    grub_uint8_t flag[32] = {
+        0xFF, 0xEE, 0xDD, 0xCC, 0xBB, 0xAA, 0x99, 0x88, 0x77, 0x66, 0x55, 0x44, 0x33, 0x22, 0x11, 0x00,
+        0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF
+    };
+
+    (void)ctxt;
+    (void)argc;
+    (void)args;
+
+    debug("ventoy_cmd_unix_fill_image_desc %p\n", g_mod_new_data);
+
+    if (!g_mod_new_data)
+    {
+        goto end;
+    }
+
+    byte = (grub_uint8_t *)g_mod_new_data;
+    for (i = 0; i < g_mod_new_len - 32; i += 16)
+    {
+        if (byte[i] == 0xFF && byte[i + 1] == 0xEE)
+        {
+            if (grub_memcmp(flag, byte + i, 32) == 0)
+            {
+                debug("Find position flag at %d(0x%x)\n", i, i);
+                break;                
+            }
+        }
+    }
+
+    if (i >= g_mod_new_len - 32)
+    {
+        debug("Failed to find position flag %d\n", i);
+        goto end;
+    }
+
+    desc = (ventoy_image_desc *)(byte + i);
+    desc->disk_size = g_ventoy_disk_size;
+    desc->part1_size = ventoy_get_part1_size(g_ventoy_part_info);
+    grub_memcpy(desc->disk_uuid, g_ventoy_part_info->MBR.BootCode + 0x180, 16);
+    grub_memcpy(desc->disk_signature, g_ventoy_part_info->MBR.BootCode + 0x1B8, 4);
+
+    desc->img_chunk_count = g_img_chunk_list.cur_chunk;
+    memsize = g_img_chunk_list.cur_chunk * sizeof(ventoy_img_chunk);
+
+    debug("image chunk count:%u  memsize:%u\n", desc->img_chunk_count, memsize);
+
+    if (memsize >= VTOY_SIZE_1MB * 8)
+    {
+        grub_printf("image chunk count:%u  memsize:%u too big\n", desc->img_chunk_count, memsize);
+        goto end;
+    }
+
+    grub_memcpy(desc + 1, g_img_chunk_list.chunk, memsize);
+
+end:
+    VENTOY_CMD_RETURN(GRUB_ERR_NONE);
+}
+
+grub_err_t ventoy_cmd_unix_gzip_newko(grub_extcmd_context_t ctxt, int argc, char **args)
+{
+    int newlen;
+    grub_uint8_t *buf;
+
+    (void)ctxt;
+    (void)argc;
+    (void)args;
+
+    debug("ventoy_cmd_unix_gzip_newko %p\n", g_mod_new_data);
+
+    if (!g_mod_new_data)
+    {
+        goto end;
+    }
+
+    buf = grub_malloc(g_mod_new_len);
+    if (!buf)
+    {
+        goto end;
+    }
+
+    newlen = ventoy_gzip_compress(g_mod_new_data, g_mod_new_len, buf, g_mod_new_len);
+
+    grub_free(g_mod_new_data);
+
+    debug("gzip org len:%d  newlen:%d\n", g_mod_new_len, newlen);
+
+    g_mod_new_data = (char *)buf;
+    g_mod_new_len = newlen;
+
+end:
+    VENTOY_CMD_RETURN(GRUB_ERR_NONE);
+}
+
 grub_err_t ventoy_cmd_unix_chain_data(grub_extcmd_context_t ctxt, int argc, char **args)
 {
     int ventoy_compatible = 0;
index 5d64b5b2fd0096816599f1c2b6aeda6a8764ba56..0b8b00f52dcf96797d8e475a4b797f40a9927474 100644 (file)
@@ -342,8 +342,10 @@ static int ventoy_raw_trim_head(grub_uint64_t offset)
 grub_err_t ventoy_cmd_get_vtoy_type(grub_extcmd_context_t ctxt, int argc, char **args)
 {
     int i;
+    int altboot = 0;
     int offset = -1;
     grub_file_t file;
+    grub_uint8_t data = 0;
     vhd_footer_t vhdfoot;
     VDIPREHEADER vdihdr;
     char type[16] = {0};
@@ -427,6 +429,7 @@ grub_err_t ventoy_cmd_get_vtoy_type(grub_extcmd_context_t ctxt, int argc, char *
                     if (grub_memcmp(gpt->PartTbl[i].PartType, "Hah!IdontNeedEFI", 16) == 0)
                     {
                         debug("part %d is grub_bios part\n", i);
+                        altboot = 1;
                         grub_env_set(args[3], "1");
                         break;
                     }
@@ -436,6 +439,20 @@ grub_err_t ventoy_cmd_get_vtoy_type(grub_extcmd_context_t ctxt, int argc, char *
                     }
                 }
             }
+
+            if (!altboot)
+            {
+                if (gpt->MBR.BootCode[92] == 0x22)
+                {
+                    grub_file_seek(file, offset + 17908);
+                    grub_file_read(file, &data, 1);
+                    if (data == 0x23)
+                    {
+                        altboot = 1;
+                        grub_env_set(args[3], "1");                        
+                    }
+                }
+            }
         }
         else
         {
@@ -447,6 +464,7 @@ grub_err_t ventoy_cmd_get_vtoy_type(grub_extcmd_context_t ctxt, int argc, char *
                 if (gpt->MBR.PartTbl[i].FsFlag == 0xEF)
                 {
                     debug("part %d is esp part in MBR mode\n", i);
+                    altboot = 1;
                     grub_env_set(args[3], "1");
                     break;
                 }
index d9aa22908b6b23bfd9b48b9a72afd8cc5e527d2f..56f357db471b15ce8dbc52abdbaf778e7e956e79 100644 (file)
@@ -149,8 +149,6 @@ typedef struct ventoy_secure_data
     grub_uint8_t magic2[16];     /* VENTOY_GUID */
 }ventoy_secure_data;
 
-
-
 #pragma pack()
 
 // compile assert check : sizeof(ventoy_os_param) must be 512
@@ -188,6 +186,18 @@ typedef struct ventoy_chain_head
     grub_uint32_t virt_chunk_num;
 }ventoy_chain_head;
 
+typedef struct ventoy_image_desc
+{
+    grub_uint64_t disk_size;
+    grub_uint64_t part1_size;
+    grub_uint8_t  disk_uuid[16];
+    grub_uint8_t  disk_signature[4];
+    grub_uint32_t img_chunk_count;
+    /* ventoy_img_chunk list */
+}ventoy_image_desc;
+
+
+
 typedef struct ventoy_img_chunk
 {
     grub_uint32_t img_start_sector; // sector size: 2KB
index f2073b9acc9f422c230c4a2397ff5047fafbd6bd..cc0be88933d7ebc75013547bc409ec094d3b553c 100644 (file)
 
 . $VTOY_PATH/hook/ventoy-os-lib.sh
 
-$SED "/mount.*devtmpfs/a $BUSYBOX_PATH/sh $VTOY_PATH/hook/wifislax/disk_hook.sh" -i /linuxrc
+if [ -e /linuxrc ]; then
+    INITFILE=/linuxrc
+elif [ -e /init ]; then
+    INITFILE=/init
+fi
+
+$SED "/mount.*devtmpfs/a $BUSYBOX_PATH/sh $VTOY_PATH/hook/wifislax/disk_hook.sh" -i $INITFILE
 
 #replace original blkid
 $BUSYBOX_PATH/rm -f /usr/bin/blkid
index 12bbd7a90226018df445b4533fb03a49fd28d9b3..55e062e57b9d1abe07368a2cce3c0a92419c052f 100644 (file)
Binary files a/INSTALL/EFI/BOOT/BOOTAA64.EFI and b/INSTALL/EFI/BOOT/BOOTAA64.EFI differ
index 23755733dcb152f23a6483638d48d0e6b5a79604..08c91727cc1e8ef6245893efce69a030f21fc71e 100644 (file)
Binary files a/INSTALL/EFI/BOOT/grubia32_real.efi and b/INSTALL/EFI/BOOT/grubia32_real.efi differ
index cfe495bfa6014b5d1dfbad6c8c7e496413b9813c..d61e53636d91725f89bad82dd38339c30de374de 100644 (file)
Binary files a/INSTALL/EFI/BOOT/grubx64_real.efi and b/INSTALL/EFI/BOOT/grubx64_real.efi differ
index f45bec82e262de977de77844f872da68b704ab31..a283423d6e792369430b86b793b29bb71198c05a 100644 (file)
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+OLDDIR=$(pwd)
+
 if ! [ -f ./tool/ventoy_lib.sh ]; then
     if [ -f ${0%Ventoy2Disk.sh}/tool/ventoy_lib.sh ]; then
         cd ${0%Ventoy2Disk.sh}    
@@ -10,8 +12,6 @@ if [ -f ./ventoy/version ]; then
     curver=$(cat ./ventoy/version) 
 fi
 
-OLDDIR=$(pwd)
-
 if uname -a | egrep -q 'aarch64|arm64'; then
     export TOOLDIR=aarch64
 elif uname -a | egrep -q 'x86_64|amd64'; then
@@ -53,9 +53,10 @@ else
     
     for file in $(ls *.xz); do
         xzcat $file > ${file%.xz}
+        [ -f ./${file%.xz} ] && chmod +x ./${file%.xz}
         [ -f ./$file ] && rm -f ./$file
     done
-    cd $OLDDIR
+    cd ../../
     
     chmod +x -R ./tool/$TOOLDIR
 fi
@@ -67,7 +68,8 @@ else
 fi
 
 if [ -n "$OLDDIR" ]; then 
-    cd $OLDDIR
+    CURDIR=$(pwd)
+    if [ "$CURDIR" != "$OLDDIR" ]; then
+        cd "$OLDDIR"
+    fi
 fi
-
-
index 7816acfdc552322c1165554b9dec53031060f4a2..00683f972c79a66599e1cea02e070137a546bf8d 100644 (file)
@@ -92,7 +92,7 @@ terminal:
 div:
 crypto:
 part_bsd: part_msdos
-ventoy: ext2 fshelp font crypto gcry_md5 exfat udf extcmd normal video gcry_sha1 iso9660
+ventoy: ext2 fshelp btrfs font crypto gcry_md5 exfat udf extcmd normal video gcry_sha1 iso9660
 gcry_sha512: crypto
 password: crypto normal
 fshelp:
index 3e1528f2699d3d32b2cdced38f5de364ca2e83e9..0be3f0895f44fcedde5058c4f5408f7b6b71ac56 100644 (file)
@@ -92,6 +92,9 @@ function get_os_type {
         elif [ -e (loop)/bin/freebsd-version ]; then
             set vtoy_os=Unix
             set vt_unix_type=FreeBSD
+        elif vt_str_begin "$vt_system_id" "DragonFly"; then
+            set vtoy_os=Unix
+            set vt_unix_type=DragonFly
             
             
         elif [ -e (loop)/boot/kernel/kernel ]; then            
@@ -426,6 +429,22 @@ function ventoy_freebsd_proc {
     vt_unix_replace_conf FreeBSD "${1}${chosen_path}"
 }
 
+function ventoy_dragonfly_proc {
+
+    unset vt_unix_mod_path
+    for file in "/boot/kernel/initrd.img.gz"; do
+        if [ -e (loop)${file} ]; then                    
+            set vt_unix_mod_path=${file}
+            break
+        fi
+    done
+
+    vt_unix_replace_ko $vt_unix_mod_path ${vtoy_path}/dragonfly.mfs.xz
+    vt_unix_fill_image_desc
+    vt_unix_gzip_new_ko
+    vt_unix_replace_conf DragonFly "${1}${chosen_path}"
+}
+
 function ventoy_unix_comm_proc {
     vt_unix_reset
     
@@ -434,11 +453,12 @@ function ventoy_unix_comm_proc {
         
         if [ "$vt_unix_type" = "FreeBSD" ]; then
             ventoy_freebsd_proc "$1" "${chosen_path}"
+        elif [ "$vt_unix_type" = "DragonFly" ]; then
+            ventoy_dragonfly_proc "$1" "${chosen_path}"        
         elif [ "$vt_unix_type" = "NetBSD" ]; then
             echo "NetBSD not supported"
             
             
-            
         else
             if [ -n "${vtdebug_flag}" ]; then
                 echo "Unknown unix type"
index 157a53d8675bfc06716d95155cbafc3afe4136ec..91501d7cfc0ee2438c68b031e75a37f012632fcf 100644 (file)
@@ -119,7 +119,7 @@ ehci: cs5536 usb boot
 crypto:
 part_bsd: part_msdos
 cs5536:
-ventoy: ext2 fshelp font crypto gcry_md5 exfat udf extcmd normal video gcry_sha1 iso9660
+ventoy: ext2 fshelp btrfs font crypto gcry_md5 exfat udf extcmd normal video gcry_sha1 iso9660
 gcry_sha512: crypto
 password: crypto normal
 fshelp:
index 0a448a34d75dee966a25e252da6081197dff1755..e5adec4030a82e4ff7aa4c8936fa7984b35b69df 100644 (file)
Binary files a/INSTALL/grub/i386-pc/core.img and b/INSTALL/grub/i386-pc/core.img differ
index a7a263c7fd472136bd6dedf6388b15b43cf79e81..92444c3ba744ccf618fbfd6fcf6bfc76c5824d82 100644 (file)
@@ -122,7 +122,7 @@ crypto:
 part_bsd: part_msdos
 cs5536: pci
 biosdisk:
-ventoy: ext2 fshelp font crypto gcry_md5 exfat udf extcmd normal video gcry_sha1 iso9660 acpi
+ventoy: ext2 fshelp btrfs font crypto gcry_md5 exfat udf extcmd normal video gcry_sha1 iso9660 acpi
 lsapm:
 gcry_sha512: crypto
 password: crypto normal
index ddff8c42c7ea9baa3c38c109f6b619a6f0c4d9b9..6c76a7ab96747a0ac8f61b7c811e4c15be1f683f 100644 (file)
@@ -119,7 +119,7 @@ ehci: cs5536 usb boot
 crypto:
 part_bsd: part_msdos
 cs5536:
-ventoy: ext2 fshelp font crypto gcry_md5 exfat udf extcmd normal video gcry_sha1 iso9660
+ventoy: ext2 fshelp btrfs font crypto gcry_md5 exfat udf extcmd normal video gcry_sha1 iso9660
 gcry_sha512: crypto
 password: crypto normal
 fshelp:
index 29d155a7f9f6de70b725498949b3ea603f8e5400..ec4f6f365a6e6dbb05209c8a8db4f22c19cddfd2 100644 (file)
Binary files a/INSTALL/ventoy/ventoy.cpio and b/INSTALL/ventoy/ventoy.cpio differ
index 7f96a4cca5c41dc7fe863a44368b672ff85c4178..393759d68bbcabdffa86d123ae52059f7d30afee 100644 (file)
Binary files a/INSTALL/ventoy/vtloopex.cpio and b/INSTALL/ventoy/vtloopex.cpio differ
diff --git a/License/license-mini_gzip.txt b/License/license-mini_gzip.txt
new file mode 100644 (file)
index 0000000..296be62
--- /dev/null
@@ -0,0 +1,13 @@
+\r
+https://github.com/wkoszek/mini_gzip\r
+\r
+Ventoy modify its source code, these code modified by Ventoy follow the same license as mini_gzip.\r
+\r
+=====================================License=================================================\r
+Copyright (c) 2015, Wojciech Adam Koszek wojciech@koszek.com All rights reserved.\r
+\r
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\r
+\r
+Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\r
+Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\r
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
index b6b36e6dbbb5424b9ae2a212d344082cd448b96c..9f494e3863bf0ba8e45c0ef1acc404b59c3cca00 100644 (file)
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@ You can copy many image files at a time and ventoy will give you a boot menu to
 x86 Legacy BIOS, IA32 UEFI, x86_64 UEFI and ARM64 UEFI are supported in the same way.<br/>
 Both MBR and GPT partition style are supported in the same way.<br/>
 Most type of OS supported(Windows/WinPE/Linux/Unix/Vmware/Xen...) <br/>
-580+ ISO files are tested. 90%+ distros in distrowatch.com supported. <br/>
+600+ ISO files are tested. 90%+ distros in distrowatch.com supported. <br/>
 </h4>
 
 # Features
@@ -34,7 +34,7 @@ Most type of OS supported(Windows/WinPE/Linux/Unix/Vmware/Xen...) <br/>
 * FAT32/exFAT/NTFS/UDF/XFS/Ext2(3)(4) supported for main partition
 * ISO files larger than 4GB supported
 * Native boot menu style for Legacy & UEFI
-* Most type of OS supported, 580+ iso files tested
+* Most type of OS supported, 600+ iso files tested
 * Linux vDisk boot supported
 * Not only boot but also complete installation process
 * Menu dynamically switchable between List/TreeView mode
index ff3a4d260f4234a337bc3e2a819e66ccd05fc3aa..21da911ceb62a706869978bf5260380bd70e7485 100644 (file)
@@ -484,8 +484,7 @@ static int vtoy_check_device(ventoy_os_param *param, const char *device)
     debug("param->vtoy_disk_size=%llu size=%llu\n", 
         (unsigned long long)param->vtoy_disk_size, (unsigned long long)size);
 
-    if ((param->vtoy_disk_size == size || param->vtoy_disk_size == size + 512) && 
-        memcmp(vtguid, param->vtoy_disk_guid, 16) == 0 &&
+    if (memcmp(vtguid, param->vtoy_disk_guid, 16) == 0 &&
         memcmp(vtsig, param->vtoy_disk_signature, 4) == 0)
     {
         debug("<%s> is right ventoy disk\n", device);
@@ -563,8 +562,20 @@ int vtoydump_main(int argc, char **argv)
     rc = vtoy_os_param_from_file(filename, param);
     if (rc)
     {
-        debug("ventoy os param not found %d\n", rc);
-        goto end;
+        debug("ventoy os param not found %d %d\n", rc, ENOENT);
+        if (ENOENT == rc)
+        {
+            debug("now try with file %s\n", "/ventoy/ventoy_os_param");
+            rc = vtoy_os_param_from_file("/ventoy/ventoy_os_param", param);
+            if (rc)
+            {
+                goto end;
+            }
+        }
+        else
+        {
+            goto end;            
+        }        
     }
 
     if (verbose)
index cfed7c8713119d30123cbd8c9983602c1e4e62a6..621262f28e1baf39bb6040bc2379514ad1e34378 100644 (file)
Binary files a/VtoyTool/vtoytool/00/vtoytool_32 and b/VtoyTool/vtoytool/00/vtoytool_32 differ
index 08b73dee5752942370779c849702700abced9ecb..e9bd188ff7f0d8d62359f41bb9bf1fe54bbeaba5 100644 (file)
Binary files a/VtoyTool/vtoytool/00/vtoytool_64 and b/VtoyTool/vtoytool/00/vtoytool_64 differ
index 4208a561302c7adae8d796f10a25fb203d3d3fcd..0799f3cb2f1ce09a061c865113277be8b357f517 100644 (file)
Binary files a/VtoyTool/vtoytool/00/vtoytool_aa64 and b/VtoyTool/vtoytool/00/vtoytool_aa64 differ