]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
misc update
authorlongpanda <admin@ventoy.net>
Wed, 18 Aug 2021 15:00:11 +0000 (23:00 +0800)
committerlongpanda <admin@ventoy.net>
Wed, 18 Aug 2021 15:00:11 +0000 (23:00 +0800)
EDK2/edk2_mod/edk2-edk2-stable201911/MdeModulePkg/Application/Ventoy/VentoyProtocol.c
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_linux.c
GRUB2/MOD_SRC/grub-2.04/install.sh
INSTALL/grub/grub.cfg
INSTALL/tool/ventoy_lib.sh
INSTALL/ventoy_pack.sh

index 0a24cd9a48e4853bd18d73a1ea41a480832b1af0..9c8fc0e741b529d6c004feef594c30ca4f69c9c7 100644 (file)
@@ -1138,14 +1138,15 @@ EFI_STATUS EFIAPI ventoy_install_blockio(IN EFI_HANDLE ImageHandle, IN UINT64 Im
     {
         gBlockData.Media.BlockSize = 512;
         gBlockData.Media.LastBlock = ImgSize / 512 - 1;
+        gBlockData.Media.ReadOnly = FALSE;
     }
     else
     {
         gBlockData.Media.BlockSize = 2048;
         gBlockData.Media.LastBlock = ImgSize / 2048 - 1;        
+        gBlockData.Media.ReadOnly = TRUE;
     }
     
-    gBlockData.Media.ReadOnly = TRUE;
     gBlockData.Media.MediaPresent = 1;
     gBlockData.Media.LogicalBlocksPerPhysicalBlock = 1;
 
index c09b56160d1c9de72f6f7f1782654857d6b00a65..2ff731f1c92af4e654f9e856a0c59f5c50d584f5 100644 (file)
@@ -1501,20 +1501,20 @@ grub_err_t ventoy_cmd_linux_chain_data(grub_extcmd_context_t ctxt, int argc, cha
 
     isosize = file->size;
 
-    boot_catlog = ventoy_get_iso_boot_catlog(file);
-    if (boot_catlog)
+    len = (int)grub_strlen(args[0]);
+    if (len >= 4 && 0 == grub_strcasecmp(args[0] + len - 4, ".img"))
     {
-        if (ventoy_is_efi_os() && (!ventoy_has_efi_eltorito(file, boot_catlog)))
-        {
-            grub_env_set("LoadIsoEfiDriver", "on");
-        }
+        debug("boot catlog %u for img file\n", boot_catlog);
     }
     else
     {
-        len = (int)grub_strlen(args[0]);
-        if (len >= 4 && 0 == grub_strcasecmp(args[0] + len - 4, ".img"))
+        boot_catlog = ventoy_get_iso_boot_catlog(file);
+        if (boot_catlog)
         {
-            debug("boot catlog %u for img file\n", boot_catlog);
+            if (ventoy_is_efi_os() && (!ventoy_has_efi_eltorito(file, boot_catlog)))
+            {
+                grub_env_set("LoadIsoEfiDriver", "on");
+            }
         }
         else
         {
index 59d7d0ba39dcfbe6d96d8b9c725b19cd95bacb67..5b7175b49a84d361ff3283e1c88b6bcaf67391a1 100644 (file)
@@ -97,6 +97,8 @@ elif [ "$1" = "arm64" ]; then
         if ! echo $all_modules | grep -q " ${line%.mod} "; then
             echo "Copy $line ..."
             cp -a $VT_DIR/GRUB2/INSTALL/lib/grub/arm64-efi/$line    $VT_DIR/INSTALL/grub/arm64-efi/
+            xz $VT_DIR/INSTALL/grub/arm64-efi/$line
+            mv $VT_DIR/INSTALL/grub/arm64-efi/${line}.xz $VT_DIR/INSTALL/grub/arm64-efi/${line}
         fi
     done
 elif [ "$1" = "mips64el" ]; then
index dc3f64643543b265ec16a07e7e67758dc0ff73ef..66537063f2a84930537dccc0c894c00c52eb6815 100644 (file)
@@ -1758,6 +1758,7 @@ function legacy_img_memdisk {
 function img_common_menuentry {
     set ventoy_compatible=YES
     set ventoy_busybox_ver=32
+    unset LoadIsoEfiDriver
 
     vt_chosen_img_path vt_chosen_path vt_chosen_size
     
index a394eb14c69f660128cd035fd511c69f78fe5758..709ce2c0e4b430a1dd826c4f90f7ec98f7e3b893 100644 (file)
@@ -320,7 +320,7 @@ EOF
     for i in 0 1 2 3 4 5 6 7 8 9; do
         check_umount_disk "$PART2"
 
-        if mkfs.vfat -F 16 -n VTOYEFI $PART2; then
+        if mkfs.vfat -F 16 -n VTOYEFI -s 1 $PART2; then
             echo 'success'
             break
         else
index d6eedbaf918b7099284a9d11eea11ce7437a4d3b..8d47fe74f8f0959e70f4416601cc04e719484515 100644 (file)
@@ -77,9 +77,13 @@ cp $OPT ./tool/ENROLL_THIS_KEY_IN_MOKMANAGER.cer $tmpmnt/
 
 
 mkdir -p $tmpmnt/tool
-cp $OPT ./tool/i386/mount.exfat-fuse     $tmpmnt/tool/mount.exfat-fuse_i386
-cp $OPT ./tool/x86_64/mount.exfat-fuse   $tmpmnt/tool/mount.exfat-fuse_x86_64
-cp $OPT ./tool/aarch64/mount.exfat-fuse  $tmpmnt/tool/mount.exfat-fuse_aarch64
+# cp $OPT ./tool/i386/mount.exfat-fuse     $tmpmnt/tool/mount.exfat-fuse_i386
+# cp $OPT ./tool/x86_64/mount.exfat-fuse   $tmpmnt/tool/mount.exfat-fuse_x86_64
+# cp $OPT ./tool/aarch64/mount.exfat-fuse  $tmpmnt/tool/mount.exfat-fuse_aarch64
+# to save space
+cp $OPT ./tool/i386/vtoygpt     $tmpmnt/tool/mount.exfat-fuse_i386
+cp $OPT ./tool/x86_64/vtoygpt   $tmpmnt/tool/mount.exfat-fuse_x86_64
+cp $OPT ./tool/aarch64/vtoygpt  $tmpmnt/tool/mount.exfat-fuse_aarch64
 
 
 rm -f $tmpmnt/grub/i386-pc/*.img