mirror of
https://github.com/ventoy/Ventoy.git
synced 2026-06-29 06:28:13 +00:00
Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f66a309e4 | ||
|
|
aa75cdac7d | ||
|
|
ccf4f7234a | ||
|
|
c1cad99584 | ||
|
|
d9cab1cb33 | ||
|
|
18f4c8afcc | ||
|
|
aeb46cd3c8 | ||
|
|
475de1dada | ||
|
|
31648a0d4b | ||
|
|
d51e76daa9 | ||
|
|
f677d72e8d | ||
|
|
6418c2a09f | ||
|
|
c2a3f181c0 | ||
|
|
90e4f9db63 | ||
|
|
255e84dbab | ||
|
|
213ce02985 | ||
|
|
8c2a3b44da | ||
|
|
536545cd39 | ||
|
|
0f59e92a01 | ||
|
|
4b1e5ce89c | ||
|
|
1ed7bc9596 | ||
|
|
71ac855b36 | ||
|
|
4302854b8d | ||
|
|
036f7234ad | ||
|
|
26a394ce84 | ||
|
|
25369d5884 | ||
|
|
12387fff81 | ||
|
|
b54a7fe93b |
190
BLOB_List.md
190
BLOB_List.md
@@ -46,132 +46,132 @@
|
||||
<tr> <td>./IMG/cpio_x86/ventoy/tool/zstdcat</td> <td>build</td> <td>Same with ./ZSTD/zstdcat<br/>Check the file hash to confirm</td> </tr>
|
||||
<tr> <td>./IMG/cpio_x86/ventoy/tool/zstdcat64</td> <td>build</td> <td>Same with ./ZSTD/zstdcat64<br/>Check the file hash to confirm</td> </tr>
|
||||
<tr> <td>./INSTALL/EFI/BOOT/BOOTAA64.EFI</td> <td rowspan=4>build</td> <td rowspan=4>Build Instructions:<br/> ./DOC/BuildVentoyFromSource.txt 4.1-Build grub2</td> </tr>
|
||||
<tr> <td>./INSTALL/EFI/BOOT/BOOTMIPS.EFI</td>
|
||||
<tr> <td>./INSTALL/EFI/BOOT/grubia32_real.efi</td>
|
||||
<tr> <td>./INSTALL/EFI/BOOT/grubx64_real.efi</td>
|
||||
<tr> <td>./INSTALL/EFI/BOOT/grub.efi</td> <td rowspan=6>upstream</td> <td rowspan=6>https://github.com/ValdikSS/Super-UEFIinSecureBoot-Disk </td> </tr>
|
||||
<tr> <td>./INSTALL/EFI/BOOT/BOOTIA32.EFI</td>
|
||||
<tr> <td>./INSTALL/EFI/BOOT/BOOTX64.EFI</td>
|
||||
<tr> <td>./INSTALL/EFI/BOOT/grubia32.efi</td>
|
||||
<tr> <td>./INSTALL/EFI/BOOT/mmia32.efi</td>
|
||||
<tr> <td>./INSTALL/EFI/BOOT/MokManager.efi</td>
|
||||
<tr> <td>./INSTALL/EFI/BOOT/BOOTMIPS.EFI</td> </tr>
|
||||
<tr> <td>./INSTALL/EFI/BOOT/grubia32_real.efi</td></tr>
|
||||
<tr> <td>./INSTALL/EFI/BOOT/grubx64_real.efi</td></tr>
|
||||
<tr> <td>./INSTALL/EFI/BOOT/BOOTIA32.EFI</td> <td rowspan=3>upstream</td> <td rowspan=3>https://github.com/ValdikSS/Super-UEFIinSecureBoot-Disk </td> </tr>
|
||||
<tr> <td>./INSTALL/EFI/BOOT/grubia32.efi</td></tr>
|
||||
<tr> <td>./INSTALL/EFI/BOOT/mmia32.efi</td></tr>
|
||||
<tr> <td>./INSTALL/EFI/BOOT/BOOTX64.EFI</td> <td rowspan=2>upstream</td> <td rowspan=2>From Rocky Linux 9.8 x86_64 ISO file<br/>Check the file hash to confirm </td> </tr>
|
||||
<tr> <td>./INSTALL/EFI/BOOT/mmx64.efi</td></tr>
|
||||
<tr> <td>./INSTALL/tool/aarch64/ash</td> <td rowspan=12>build</td> <td rowspan=12>Build Instructions:<br/>./DOC/BUSYBOX/build.txt</td> </tr>
|
||||
<tr> <td>./INSTALL/tool/aarch64/hexdump</td>
|
||||
<tr> <td>./INSTALL/tool/aarch64/xzcat</td>
|
||||
<tr> <td>./INSTALL/tool/i386/ash</td>
|
||||
<tr> <td>./INSTALL/tool/i386/hexdump</td>
|
||||
<tr> <td>./INSTALL/tool/i386/xzcat</td>
|
||||
<tr> <td>./INSTALL/tool/mips64el/ash</td>
|
||||
<tr> <td>./INSTALL/tool/mips64el/hexdump</td>
|
||||
<tr> <td>./INSTALL/tool/mips64el/xzcat</td>
|
||||
<tr> <td>./INSTALL/tool/x86_64/ash</td>
|
||||
<tr> <td>./INSTALL/tool/x86_64/hexdump</td>
|
||||
<tr> <td>./INSTALL/tool/x86_64/xzcat</td>
|
||||
<tr> <td>./INSTALL/tool/aarch64/hexdump</td></tr>
|
||||
<tr> <td>./INSTALL/tool/aarch64/xzcat</td></tr>
|
||||
<tr> <td>./INSTALL/tool/i386/ash</td></tr>
|
||||
<tr> <td>./INSTALL/tool/i386/hexdump</td></tr>
|
||||
<tr> <td>./INSTALL/tool/i386/xzcat</td></tr>
|
||||
<tr> <td>./INSTALL/tool/mips64el/ash</td></tr>
|
||||
<tr> <td>./INSTALL/tool/mips64el/hexdump</td></tr>
|
||||
<tr> <td>./INSTALL/tool/mips64el/xzcat</td></tr>
|
||||
<tr> <td>./INSTALL/tool/x86_64/ash</td></tr>
|
||||
<tr> <td>./INSTALL/tool/x86_64/hexdump</td></tr>
|
||||
<tr> <td>./INSTALL/tool/x86_64/xzcat</td></tr>
|
||||
<tr> <td>./INSTALL/tool/aarch64/Ventoy2Disk.gtk3</td> <td rowspan=6>build</td> <td rowspan=6>Build Instructions:<br/>./LinuxGUI/build_gtk.sh</td> </tr>
|
||||
<tr> <td>./INSTALL/tool/i386/Ventoy2Disk.gtk3</td>
|
||||
<tr> <td>./INSTALL/tool/i386/Ventoy2Disk.gtk2</td>
|
||||
<tr> <td>./INSTALL/tool/mips64el/Ventoy2Disk.gtk3</td>
|
||||
<tr> <td>./INSTALL/tool/x86_64/Ventoy2Disk.gtk3</td>
|
||||
<tr> <td>./INSTALL/tool/x86_64/Ventoy2Disk.gtk2</td>
|
||||
<tr> <td>./INSTALL/tool/i386/Ventoy2Disk.gtk3</td></tr>
|
||||
<tr> <td>./INSTALL/tool/i386/Ventoy2Disk.gtk2</td></tr>
|
||||
<tr> <td>./INSTALL/tool/mips64el/Ventoy2Disk.gtk3</td></tr>
|
||||
<tr> <td>./INSTALL/tool/x86_64/Ventoy2Disk.gtk3</td></tr>
|
||||
<tr> <td>./INSTALL/tool/x86_64/Ventoy2Disk.gtk2</td></tr>
|
||||
<tr> <td>./INSTALL/tool/aarch64/Ventoy2Disk.qt5</td> <td rowspan=4>build</td> <td rowspan=4>Build Instructions:<br/>./LinuxGUI/build_qt.sh</td> </tr>
|
||||
<tr> <td>./INSTALL/tool/i386/Ventoy2Disk.qt5</td>
|
||||
<tr> <td>./INSTALL/tool/mips64el/Ventoy2Disk.qt5</td>
|
||||
<tr> <td>./INSTALL/tool/x86_64/Ventoy2Disk.qt5</td>
|
||||
<tr> <td>./INSTALL/tool/i386/Ventoy2Disk.qt5</td></tr>
|
||||
<tr> <td>./INSTALL/tool/mips64el/Ventoy2Disk.qt5</td></tr>
|
||||
<tr> <td>./INSTALL/tool/x86_64/Ventoy2Disk.qt5</td></tr>
|
||||
<tr> <td>./INSTALL/tool/aarch64/Plugson</td> <td rowspan=4>build</td> <td rowspan=4>Build Instructions:<br/>./Plugson/build.sh</td> </tr>
|
||||
<tr> <td>./INSTALL/tool/i386/Plugson</td>
|
||||
<tr> <td>./INSTALL/tool/mips64el/Plugson</td>
|
||||
<tr> <td>./INSTALL/tool/x86_64/Plugson</td>
|
||||
<tr> <td>./INSTALL/tool/i386/Plugson</td></tr>
|
||||
<tr> <td>./INSTALL/tool/mips64el/Plugson</td></tr>
|
||||
<tr> <td>./INSTALL/tool/x86_64/Plugson</td></tr>
|
||||
<tr> <td>./INSTALL/tool/aarch64/V2DServer</td> <td rowspan=4>build</td> <td rowspan=4>Build Instructions:<br/>./LinuxGUI/build.sh</td> </tr>
|
||||
<tr> <td>./INSTALL/tool/i386/V2DServer</td>
|
||||
<tr> <td>./INSTALL/tool/mips64el/V2DServer</td>
|
||||
<tr> <td>./INSTALL/tool/x86_64/V2DServer</td>
|
||||
<tr> <td>./INSTALL/tool/i386/V2DServer</td></tr>
|
||||
<tr> <td>./INSTALL/tool/mips64el/V2DServer</td></tr>
|
||||
<tr> <td>./INSTALL/tool/x86_64/V2DServer</td></tr>
|
||||
<tr> <td>./INSTALL/tool/aarch64/mkexfatfs</td> <td rowspan=9>build</td> <td rowspan=8>Build Instructions:<br/>./DOC/BuildVentoyFromSource.txt 4.9<br/>./ExFAT/buidexfat.sh<br/>./ExFAT/buidexfat_aarch64.sh<br/>./ExFAT/buidlibfuse.sh<br/>./ExFAT/buidlibfuse_aarch64.sh<br/></td> </tr>
|
||||
<tr> <td>./INSTALL/tool/aarch64/mount.exfat-fuse</td>
|
||||
<tr> <td>./INSTALL/tool/i386/mkexfatfs</td>
|
||||
<tr> <td>./INSTALL/tool/i386/mount.exfat-fuse</td>
|
||||
<tr> <td>./INSTALL/tool/mips64el/mkexfatfs</td>
|
||||
<tr> <td>./INSTALL/tool/mips64el/mount.exfat-fuse</td>
|
||||
<tr> <td>./INSTALL/tool/x86_64/mkexfatfs</td>
|
||||
<tr> <td>./INSTALL/tool/x86_64/mkexfatfs_static</td>
|
||||
<tr> <td>./INSTALL/tool/x86_64/mount.exfat-fuse</td>
|
||||
<tr> <td>./INSTALL/tool/aarch64/mount.exfat-fuse</td></tr>
|
||||
<tr> <td>./INSTALL/tool/i386/mkexfatfs</td></tr>
|
||||
<tr> <td>./INSTALL/tool/i386/mount.exfat-fuse</td></tr>
|
||||
<tr> <td>./INSTALL/tool/mips64el/mkexfatfs</td></tr>
|
||||
<tr> <td>./INSTALL/tool/mips64el/mount.exfat-fuse</td></tr>
|
||||
<tr> <td>./INSTALL/tool/x86_64/mkexfatfs</td></tr>
|
||||
<tr> <td>./INSTALL/tool/x86_64/mkexfatfs_static</td></tr>
|
||||
<tr> <td>./INSTALL/tool/x86_64/mount.exfat-fuse</td> </tr>
|
||||
<tr> <td>./INSTALL/tool/aarch64/vlnk</td> <td rowspan=4>build</td> <td rowspan=4>Build Instructions:<br/>./Vlnk/build.sh</td> </tr>
|
||||
<tr> <td>./INSTALL/tool/i386/vlnk</td>
|
||||
<tr> <td>./INSTALL/tool/mips64el/vlnk</td>
|
||||
<tr> <td>./INSTALL/tool/x86_64/vlnk</td>
|
||||
<tr> <td>./INSTALL/tool/i386/vlnk</td></tr>
|
||||
<tr> <td>./INSTALL/tool/mips64el/vlnk</td></tr>
|
||||
<tr> <td>./INSTALL/tool/x86_64/vlnk</td></tr>
|
||||
<tr> <td>./INSTALL/tool/aarch64/vtoycli</td> <td rowspan=4>build</td> <td rowspan=4>Build Instructions:<br/>./vtoycli/build.sh</td> </tr>
|
||||
<tr> <td>./INSTALL/tool/i386/vtoycli</td>
|
||||
<tr> <td>./INSTALL/tool/mips64el/vtoycli</td>
|
||||
<tr> <td>./INSTALL/tool/x86_64/vtoycli</td>
|
||||
<tr> <td>./INSTALL/tool/i386/vtoycli</td></tr>
|
||||
<tr> <td>./INSTALL/tool/mips64el/vtoycli</td></tr>
|
||||
<tr> <td>./INSTALL/tool/x86_64/vtoycli</td></tr>
|
||||
<tr> <td>./INSTALL/ventoy/imdisk/32/imdisk.cpl</td> <td rowspan=6>upstream</td> <td rowspan=6>Download from imdisk project.<br/>URL & File Hash documented in<br/> ./DOC/BuildVentoyFromSource.txt 5.8</td> </tr>
|
||||
<tr> <td>./INSTALL/ventoy/imdisk/32/imdisk.exe</td>
|
||||
<tr> <td>./INSTALL/ventoy/imdisk/32/imdisk.sys</td>
|
||||
<tr> <td>./INSTALL/ventoy/imdisk/64/imdisk.cpl</td>
|
||||
<tr> <td>./INSTALL/ventoy/imdisk/64/imdisk.exe</td>
|
||||
<tr> <td>./INSTALL/ventoy/imdisk/64/imdisk.sys</td>
|
||||
<tr> <td>./INSTALL/ventoy/imdisk/32/imdisk.exe</td></tr>
|
||||
<tr> <td>./INSTALL/ventoy/imdisk/32/imdisk.sys</td></tr>
|
||||
<tr> <td>./INSTALL/ventoy/imdisk/64/imdisk.cpl</td></tr>
|
||||
<tr> <td>./INSTALL/ventoy/imdisk/64/imdisk.exe</td></tr>
|
||||
<tr> <td>./INSTALL/ventoy/imdisk/64/imdisk.sys</td></tr>
|
||||
<tr> <td>./INSTALL/ventoy/iso9660_aa64.efi</td> <td rowspan=6>build</td> <td rowspan=6>Build Instructions:<br/>./DOC/BuildVentoyFromSource.txt 4.17</td> </tr>
|
||||
<tr> <td>./INSTALL/ventoy/udf_aa64.efi</td>
|
||||
<tr> <td>./INSTALL/ventoy/iso9660_ia32.efi</td>
|
||||
<tr> <td>./INSTALL/ventoy/udf_ia32.efi</td>
|
||||
<tr> <td>./INSTALL/ventoy/iso9660_x64.efi</td>
|
||||
<tr> <td>./INSTALL/ventoy/udf_x64.efi</td>
|
||||
<tr> <td>./INSTALL/ventoy/udf_aa64.efi</td></tr>
|
||||
<tr> <td>./INSTALL/ventoy/iso9660_ia32.efi</td></tr>
|
||||
<tr> <td>./INSTALL/ventoy/udf_ia32.efi</td></tr>
|
||||
<tr> <td>./INSTALL/ventoy/iso9660_x64.efi</td></tr>
|
||||
<tr> <td>./INSTALL/ventoy/udf_x64.efi</td></tr>
|
||||
<tr> <td>./INSTALL/VentoyGUI.aarch64</td> <td rowspan=4>build</td> <td rowspan=4>Build Instructions:<br/>./LinuxGUI/build_gtk.sh</td> </tr>
|
||||
<tr> <td>./INSTALL/VentoyGUI.i386</td>
|
||||
<tr> <td>./INSTALL/VentoyGUI.mips64el</td>
|
||||
<tr> <td>./INSTALL/VentoyGUI.x86_64</td>
|
||||
<tr> <td>./INSTALL/VentoyGUI.i386</td></tr>
|
||||
<tr> <td>./INSTALL/VentoyGUI.mips64el</td></tr>
|
||||
<tr> <td>./INSTALL/VentoyGUI.x86_64</td></tr>
|
||||
<tr> <td>./INSTALL/Ventoy2Disk.exe</td> <td rowspan=4>build</td> <td rowspan=4>Build Instructions:<br/>./Ventoy2Disk/Ventoy2Disk.sln</td> </tr>
|
||||
<tr> <td>./INSTALL/Ventoy2Disk_ARM.exe</td>
|
||||
<tr> <td>./INSTALL/Ventoy2Disk_ARM64.exe</td>
|
||||
<tr> <td>./INSTALL/Ventoy2Disk_X64.exe</td>
|
||||
<tr> <td>./INSTALL/Ventoy2Disk_ARM.exe</td></tr>
|
||||
<tr> <td>./INSTALL/Ventoy2Disk_ARM64.exe</td></tr>
|
||||
<tr> <td>./INSTALL/Ventoy2Disk_X64.exe</td></tr>
|
||||
<tr> <td>./INSTALL/ventoy/vtoyjump32.exe</td> <td rowspan=2>build</td> <td rowspan=2>Build Instructions:<br/>./vtoyjump/vtoyjump.sln</td> </tr>
|
||||
<tr> <td>./INSTALL/ventoy/vtoyjump64.exe</td>
|
||||
<tr> <td>./INSTALL/ventoy/ventoy_aa64.efi</td> <td rowspan=6>build</td> <td rowspan=6>Build Instructions:<br/>./EDK2/buildedk.sh</td> </tr>
|
||||
<tr> <td>./INSTALL/ventoy/ventoy_ia32.efi</td>
|
||||
<tr> <td>./INSTALL/ventoy/ventoy_x64.efi</td>
|
||||
<tr> <td>./INSTALL/ventoy/vtoyutil_aa64.efi</td>
|
||||
<tr> <td>./INSTALL/ventoy/vtoyutil_ia32.efi</td>
|
||||
<tr> <td>./INSTALL/ventoy/vtoyutil_x64.efi</td>
|
||||
<tr> <td>./INSTALL/ventoy/vtoyjump64.exe</td></tr>
|
||||
<tr> <td>./INSTALL/ventoy/ventoy_aa64.efi</td> <td rowspan=7>build</td> <td rowspan=7>Build Instructions:<br/>./EDK2/buildedk.sh</td> </tr>
|
||||
<tr> <td>./INSTALL/ventoy/ventoy_ia32.efi</td></tr>
|
||||
<tr> <td>./INSTALL/ventoy/ventoy_x64.efi</td></tr>
|
||||
<tr> <td>./INSTALL/ventoy/vtoyutil_aa64.efi</td></tr>
|
||||
<tr> <td>./INSTALL/ventoy/vtoyutil_ia32.efi</td></tr>
|
||||
<tr> <td>./INSTALL/ventoy/vtoyutil_x64.efi</td></tr>
|
||||
<tr> <td>./INSTALL/EFI/BOOT/fbx64.efi</td></tr>
|
||||
<tr> <td>./INSTALL/ventoy/ipxe.krn</td> <td>build</td> <td>Build Instructions:<br/>./IPXE/buildipxe.sh</td> </tr>
|
||||
<tr> <td>./INSTALL/ventoy/memdisk</td> <td>upstream</td> <td>Download from syslinux project.<br/>URL & File Hash documented in<br/> ./DOC/BuildVentoyFromSource.txt 5.9</td> </tr>
|
||||
<tr> <td>./LiveCD/ISO/EFI/boot/vmlinuz64</td> <td>upstream</td> <td>Download from TinyLinux website.<br/>URL & File Hash documented in<br/> ./DOC/BuildVentoyFromSource.txt 5.14</td> </tr>
|
||||
<tr> <td>./LiveCDGUI/EXT/busybox-x86_64</td> <td>build</td> <td>Same with ./IMG/cpio_x86/ventoy/busybox/busybox64<br/>Check the file hash to confirm</td> </tr>
|
||||
<tr> <td>./LiveCDGUI/GRUB/bootx64.efi</td> <td rowspan=2>build</td> <td rowspan=2>./DOC/BuildVentoyFromSource.txt 4.1-Build grub2</td> </tr>
|
||||
<tr> <td>./LiveCD/GRUB/bootx64.efi</td>
|
||||
<tr> <td>./LiveCD/GRUB/bootx64.efi</td></tr>
|
||||
<tr> <td>./LZIP/lunzip32</td> <td rowspan=3>build</td> <td rowspan=3>Build Instructions:<br/>./DOC/BuildVentoyFromSource.txt 4.19</td> </tr>
|
||||
<tr> <td>./LZIP/lunzip64</td>
|
||||
<tr> <td>./LZIP/lunzipaa64</td>
|
||||
<tr> <td>./LZIP/lunzip64</td></tr>
|
||||
<tr> <td>./LZIP/lunzipaa64</td></tr>
|
||||
<tr> <td>./LZIP/lz4cat64</td> <td rowspan=3>build</td> <td rowspan=3>Build Instructions:<br/>./LZIP/buildlz4.txt</td> </tr>
|
||||
<tr> <td>./LZIP/lz4cataa64</td>
|
||||
<tr> <td>./LZIP/lz4catm64e</td>
|
||||
<tr> <td>./LZIP/lz4cataa64</td></tr>
|
||||
<tr> <td>./LZIP/lz4catm64e</td></tr>
|
||||
<tr> <td>./Plugson/vs/VentoyPlugson/Release/VentoyPlugson.exe</td> <td rowspan=2>build</td> <td rowspan=2>Build Instructions:<br/>./Plugson/vs/VentoyPlugson/VentoyPlugson.sln</td> </tr>
|
||||
<tr> <td>./Plugson/vs/VentoyPlugson/x64/Release/VentoyPlugson_X64.exe</td>
|
||||
<tr> <td>./Plugson/vs/VentoyPlugson/x64/Release/VentoyPlugson_X64.exe</td></tr>
|
||||
<tr> <td>./SQUASHFS/unsquashfs_32</td> <td rowspan=3>build</td> <td rowspan=3>Build Instructions:<br/>./SQUASHFS/build.sh</td> </tr>
|
||||
<tr> <td>./SQUASHFS/unsquashfs_64</td>
|
||||
<tr> <td>./SQUASHFS/unsquashfs_aa64</td>
|
||||
<tr> <td>./SQUASHFS/unsquashfs_64</td></tr>
|
||||
<tr> <td>./SQUASHFS/unsquashfs_aa64</td></tr>
|
||||
<tr> <td>./Unix/ventoy_unix/DragonFly/sbin/dmsetup</td> <td>upstream</td> <td>Get from DragonFly ISO.<br/>URL & File Hash documented in<br/> ./DOC/BuildVentoyFromSource.txt 5.13</td> </tr>
|
||||
<tr> <td>./Unix/ventoy_unix/DragonFly/sbin/init</td> <td>build</td> <td>Build Instructions:<br/>./Unix/ventoy_unix_src/DragonFly/build.sh</td> </tr>
|
||||
<tr> <td>./VBLADE/vblade-master/vblade_32</td> <td rowspan=3>build</td> <td rowspan=3>Build Instructions:<br/>./VBLADE/vblade-master/build.sh</td> </tr>
|
||||
<tr> <td>./VBLADE/vblade-master/vblade_64</td>
|
||||
<tr> <td>./VBLADE/vblade-master/vblade_aa64</td>
|
||||
<tr> <td>./VBLADE/vblade-master/vblade_64</td></tr>
|
||||
<tr> <td>./VBLADE/vblade-master/vblade_aa64</td></tr>
|
||||
<tr> <td>./Vlnk/vs/VentoyVlnk/Release/VentoyVlnk.exe</td> <td>build</td> <td>Build Instructions:<br/>./Vlnk/vs/VentoyVlnk/VentoyVlnk.sln</td> </tr>
|
||||
<tr> <td>./VtoyTool/vtoytool/00/vtoytool_32</td> <td rowspan=6>build</td> <td rowspan=6>Build Instructions:<br/>./VtoyTool/build.sh</td> </tr>
|
||||
<tr> <td>./VtoyTool/vtoytool/00/vtoytool_64</td>
|
||||
<tr> <td>./VtoyTool/vtoytool/00/vtoytool_aa64</td>
|
||||
<tr> <td>./VtoyTool/vtoytool/00/vtoytool_m64e</td>
|
||||
<tr> <td>./VtoyTool/vtoytool/01/vtoytool_64</td>
|
||||
<tr> <td>./VtoyTool/vtoytool/02/vtoytool_64</td>
|
||||
<tr> <td>./VtoyTool/vtoytool/00/vtoytool_64</td></tr>
|
||||
<tr> <td>./VtoyTool/vtoytool/00/vtoytool_aa64</td></tr>
|
||||
<tr> <td>./VtoyTool/vtoytool/00/vtoytool_m64e</td></tr>
|
||||
<tr> <td>./VtoyTool/vtoytool/01/vtoytool_64</td></tr>
|
||||
<tr> <td>./VtoyTool/vtoytool/02/vtoytool_64</td></tr>
|
||||
<tr> <td>./ZSTD/zstdcat</td> <td rowspan=3>build</td> <td rowspan=3>Build Instructions:<br/>./ZSTD/build.txt</td> </tr>
|
||||
<tr> <td>./ZSTD/zstdcat64</td>
|
||||
<tr> <td>./ZSTD/zstdcataa64</td>
|
||||
<tr> <td>./ZSTD/zstdcat64</td></tr>
|
||||
<tr> <td>./ZSTD/zstdcataa64</td></tr>
|
||||
<tr> <td>./IMG/cpio_x86/ventoy/busybox/busybox32</td> <td rowspan=6>build</td> <td rowspan=6>Build Instructions:<br/>./BUSYBOX/build.txt full busybox</td> </tr>
|
||||
<tr> <td>./IMG/cpio_x86/ventoy/busybox/busybox64</td>
|
||||
<tr> <td>./IMG/cpio_x86/ventoy/busybox/xzcat32_musl</td>
|
||||
<tr> <td>./IMG/cpio_x86/ventoy/busybox/xzcat64_musl</td>
|
||||
<tr> <td>./IMG/cpio_arm64/ventoy/busybox/busyboxaa64</td>
|
||||
<tr> <td>./IMG/cpio_mips64/ventoy/busybox/busyboxm64e</td>
|
||||
<tr> <td>./IMG/cpio_x86/ventoy/busybox/busybox64</td></tr>
|
||||
<tr> <td>./IMG/cpio_x86/ventoy/busybox/xzcat32_musl</td></tr>
|
||||
<tr> <td>./IMG/cpio_x86/ventoy/busybox/xzcat64_musl</td></tr>
|
||||
<tr> <td>./IMG/cpio_arm64/ventoy/busybox/busyboxaa64</td></tr>
|
||||
<tr> <td>./IMG/cpio_mips64/ventoy/busybox/busyboxm64e</td> </tr>
|
||||
<tr> <td>ISNTALL/ventoy/7z/64/7za.exe</td> <td rowspan=2>upstream</td> <td>Download from 7z project.<br/>URL & File Hash documented in<br/> ./DOC/BuildVentoyFromSource.txt 5.12</td> </tr>
|
||||
<tr> <td>ISNTALL/ventoy/7z/32/7za.exe</td>
|
||||
<tr> <td>ISNTALL/ventoy/7z/32/7za.exe</td></tr>
|
||||
<tr> <td>./INSTALL/ventoy/wimboot.i386.efi</td> <td rowspan=2>build</td> <td rowspan=2>Build Instructions:<br/>./wimboot/build.sh</td> </tr>
|
||||
<tr> <td>./INSTALL/ventoy/wimboot.x86_64</td>
|
||||
<tr> <td>./INSTALL/ventoy/wimboot.x86_64</td></tr>
|
||||
<tr> <td> ./Unix/ventoy_unix/ClonOS/geom_ventoy_ko/13.x/64/geom_ventoy.ko</td> <td rowspan=18>build</td> <td rowspan=18>Build Instructions:<br/>./Unix/BuildUnixKmod.txt</td> </tr>
|
||||
<tr> <td> ./Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/10.x/32/geom_ventoy.ko</td></tr>
|
||||
<tr> <td> ./Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/10.x/64/geom_ventoy.ko</td></tr>
|
||||
|
||||
113
EDK2/build_shim.sh
Normal file
113
EDK2/build_shim.sh
Normal file
@@ -0,0 +1,113 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
EDKARCH=X64
|
||||
postfix=x64
|
||||
elif [ "$1" = "ia32" ]; then
|
||||
EDKARCH=IA32
|
||||
postfix=ia32
|
||||
shift
|
||||
elif [ "$1" = "aa64" ]; then
|
||||
EDKARCH=AARCH64
|
||||
postfix=aa64
|
||||
shift
|
||||
fi
|
||||
|
||||
cd edk2-edk2-stable201911
|
||||
|
||||
rm -rf ./Conf/.cache
|
||||
rm -f ./Conf/.AutoGenIdFile.txt
|
||||
|
||||
VTEFI_PATH=Build/MdeModule/RELEASE_GCC48/$EDKARCH/MdeModulePkg/Application/VtoyShim/VtoyShim/OUTPUT/VtoyShim.efi
|
||||
DST_PATH=../../INSTALL/EFI/BOOT/fb${postfix}.efi
|
||||
|
||||
|
||||
rm -f $VTEFI_PATH
|
||||
rm -f $DST_PATH
|
||||
|
||||
unset WORKSPACE
|
||||
source ./edksetup.sh
|
||||
|
||||
if [ "$EDKARCH" = "AARCH64" ]; then
|
||||
PATH=$PATH:/opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin \
|
||||
GCC48_AARCH64_PREFIX=aarch64-linux-gnu- \
|
||||
build -p MdeModulePkg/MdeModulePkg.dsc -a $EDKARCH -b RELEASE -t GCC48 -m MdeModulePkg/Application/VtoyShim/VtoyShim.inf
|
||||
else
|
||||
build -p MdeModulePkg/MdeModulePkg.dsc -a $EDKARCH -b RELEASE -t GCC48 -m MdeModulePkg/Application/VtoyShim/VtoyShim.inf
|
||||
fi
|
||||
|
||||
if [ -e $VTEFI_PATH ]; then
|
||||
|
||||
objdump -h "$VTEFI_PATH"
|
||||
echo ""
|
||||
|
||||
objcopy \
|
||||
--add-section .sbat="MdeModulePkg/Application/VtoyShim/sbat.csv" \
|
||||
--set-section-flags .sbat=alloc,load,readonly,data \
|
||||
"$VTEFI_PATH" "$DST_PATH"
|
||||
|
||||
#find the right sbat section VMA
|
||||
tmpfile=$(mktemp)
|
||||
|
||||
cnt1=$(objdump -h "$DST_PATH" | grep -P '^\s*[0-9][0-9]* \.' | wc -l)
|
||||
cnt2=$(objdump -h "$DST_PATH" | grep -P 'ALLOC' | wc -l)
|
||||
|
||||
if [ $cnt1 -ne $cnt2 ]; then
|
||||
echo "Section count mismatch $cnt1 $cnt2"
|
||||
objdump -h "$DST_PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
objdump -h "$DST_PATH" | grep -P '^\s*[0-9][0-9]* \.' > $tmpfile
|
||||
sbat_size=$(stat -c '%s' MdeModulePkg/Application/VtoyShim/sbat.csv)
|
||||
sbat_size_hex=$(printf '0x%08x' $sbat_size)
|
||||
|
||||
lmax='0000000000000000'
|
||||
lsize='0000000000000000'
|
||||
while read line; do
|
||||
echo $line
|
||||
lbase=$(echo $line | awk '{print $4}')
|
||||
if expr "$lmax" \< "$lbase" > /dev/null; then
|
||||
lmax=$lbase
|
||||
lsize=$(echo $line | awk '{print $3}')
|
||||
fi
|
||||
echo "max=$lmax size=$lsize"
|
||||
done < $tmpfile
|
||||
rm -f $tmpfile
|
||||
|
||||
|
||||
lvma=$((0x${lsize}+0x${lmax}))
|
||||
lvma_align=`printf '0x%08x' $(( (lvma + 4095) / 4096 * 4096 ))`
|
||||
echo "sbat section lvma_align=$lvma_align"
|
||||
|
||||
objcopy --adjust-section-vma .sbat=$lvma_align "$DST_PATH"
|
||||
|
||||
img_base=$(objdump -p "$DST_PATH" | grep ImageBase | awk '{print $2}')
|
||||
size_img=0x$(objdump -p "$DST_PATH" | grep SizeOfImage | awk '{print $2}')
|
||||
sbat_end=`printf '0x%08x' $(($lvma_align+$sbat_size_hex))`
|
||||
|
||||
if [ "$img_base" != "0000000000000000" ]; then
|
||||
echo "#### ImageBase is not 0 $img_base"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "size_img=$size_img sbat_size=$sbat_size_hex sbat_range $lvma_align - $sbat_end"
|
||||
|
||||
if expr "$size_img" \< "$sbat_end" > /dev/null; then
|
||||
echo "SizeOfImage $size_img less than sbat section addr $sbat_end"
|
||||
exit 1
|
||||
else
|
||||
echo "SizeOfImage $size_img >= $sbat_end is OK"
|
||||
fi
|
||||
|
||||
objdump -h "$DST_PATH"
|
||||
|
||||
echo -e '\n\n====================== SUCCESS ========================\n\n'
|
||||
|
||||
cd ..
|
||||
else
|
||||
echo -e '\n\n====================== FAILED ========================\n\n'
|
||||
cd ..
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -19,3 +19,7 @@ sh ./build.sh aa64 || exit 1
|
||||
echo '======== build EDK2 for x86_64-efi ==============='
|
||||
sh ./build.sh || exit 1
|
||||
|
||||
|
||||
echo '======== build EDK2 for x86_64-efi ==============='
|
||||
sh ./build_shim.sh || exit 1
|
||||
|
||||
|
||||
@@ -1231,6 +1231,65 @@ EFI_STATUS EFIAPI ventoy_boot(IN EFI_HANDLE ImageHandle)
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
#if defined (MDE_CPU_X64)
|
||||
|
||||
STATIC BOOLEAN EFIAPI IsSecureBootEnabled(VOID)
|
||||
{
|
||||
UINT8 SecureBoot = 0;
|
||||
UINTN DataSize;
|
||||
EFI_STATUS Status;
|
||||
|
||||
DataSize = sizeof(SecureBoot);
|
||||
Status = gST->RuntimeServices->GetVariable(L"SecureBoot", &gEfiGlobalVariableGuid, NULL,
|
||||
&DataSize, &SecureBoot);
|
||||
if (EFI_ERROR(Status))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return SecureBoot ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
STATIC BOOLEAN EFIAPI IsSetupMode(VOID)
|
||||
{
|
||||
UINT8 SetupMode = 0;
|
||||
UINTN DataSize;
|
||||
EFI_STATUS Status;
|
||||
|
||||
DataSize = sizeof(SetupMode);
|
||||
Status = gST->RuntimeServices->GetVariable(L"SetupMode", &gEfiGlobalVariableGuid, NULL,
|
||||
&DataSize, &SetupMode);
|
||||
if (EFI_ERROR(Status))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return SetupMode ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
STATIC BOOLEAN EFIAPI CheckVtoyShim(VOID)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_GUID Guid = VTOY_SHIM_POLICY_GUID;
|
||||
VOID *Prot = NULL;
|
||||
|
||||
/* If secure boot is not enabled or in SetupMode, nothing needed */
|
||||
if (!IsSecureBootEnabled() || IsSetupMode())
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Status = gBS->LocateProtocol(&Guid, NULL, (VOID**)&Prot);
|
||||
if (EFI_ERROR(Status))
|
||||
{
|
||||
VtoyDebug("Failed to locate Vtoy Shim Protocol %lx\r\n", Status);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
EFI_STATUS EFIAPI VentoyEfiMain
|
||||
(
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
@@ -1240,6 +1299,15 @@ EFI_STATUS EFIAPI VentoyEfiMain
|
||||
EFI_STATUS Status = EFI_SUCCESS;
|
||||
EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *Protocol;
|
||||
|
||||
#if defined (MDE_CPU_X64)
|
||||
/* check that Ventoy Shim must exist */
|
||||
if (!CheckVtoyShim())
|
||||
{
|
||||
sleep(5);
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
#endif
|
||||
|
||||
g_sector_flag_num = 512; /* initial value */
|
||||
|
||||
g_sector_flag = AllocatePool(g_sector_flag_num * sizeof(ventoy_sector_flag));
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
#define COMPILE_ASSERT(expr) extern char __compile_assert[(expr) ? 1 : -1]
|
||||
|
||||
#define VTOY_SHIM_POLICY_GUID {0x90a29d14, 0x3968, 0x48fe, { 0x85, 0x81, 0x6b, 0x7f, 0x7d, 0xc4, 0x70, 0x55 }};
|
||||
|
||||
#define VENTOY_GUID { 0x77772020, 0x2e77, 0x6576, { 0x6e, 0x74, 0x6f, 0x79, 0x2e, 0x6e, 0x65, 0x74 }}
|
||||
|
||||
typedef enum ventoy_chain_type
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
VERSION_STRING = 1.0
|
||||
ENTRY_POINT = VentoyEfiMain
|
||||
|
||||
|
||||
[BuildOptions]
|
||||
# Force standard GNU ld to pack and align ELF segments to 4KB page boundaries
|
||||
GCC:*_*_*_DLINK_FLAGS = -Wl,-z,common-page-size=0x1000 -Wl,-z,max-page-size=0x1000
|
||||
|
||||
[Sources]
|
||||
Ventoy.h
|
||||
|
||||
@@ -0,0 +1,800 @@
|
||||
/******************************************************************************
|
||||
* VtoyShim.c
|
||||
*
|
||||
* Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
* SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
*
|
||||
*/
|
||||
|
||||
#include <Uefi.h>
|
||||
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/PrintLib.h>
|
||||
#include <Library/UefiLib.h>
|
||||
#include <Library/BaseMemoryLib.h>
|
||||
#include <Library/DevicePathLib.h>
|
||||
#include <Library/MemoryAllocationLib.h>
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
#include <Library/UefiRuntimeServicesTableLib.h>
|
||||
#include <Library/UefiApplicationEntryPoint.h>
|
||||
#include <Library/PeCoffLib.h>
|
||||
#include <Protocol/LoadedImage.h>
|
||||
#include <Guid/FileInfo.h>
|
||||
#include <Guid/FileSystemInfo.h>
|
||||
#include <Protocol/BlockIo.h>
|
||||
#include <Protocol/RamDisk.h>
|
||||
#include <Protocol/SimpleFileSystem.h>
|
||||
#include <Protocol/DevicePathToText.h>
|
||||
#include <Protocol/DevicePathFromText.h>
|
||||
#include <Protocol/LoadedImage.h>
|
||||
#include <Protocol/Security.h>
|
||||
#include <Protocol/Security2.h>
|
||||
#include <IndustryStandard/PeImage.h>
|
||||
#include <VtoyShim.h>
|
||||
|
||||
#define CUR_SBAT_VER 1
|
||||
|
||||
STATIC EFI_GUID gVtoySbatGUID = { 0xf755068a, 0xe04f, 0x452b, { 0x9d, 0x6d, 0x7c, 0x55, 0x96, 0xb3, 0xc0, 0x7d }};
|
||||
STATIC EFI_GUID gShimLockGUID = SHIM_LOCK_GUID;
|
||||
STATIC EFI_SECURITY_FILE_AUTHENTICATION_STATE gSysSecFileAuth = NULL;
|
||||
STATIC EFI_SECURITY2_FILE_AUTHENTICATION gSysSec2FileAuth = NULL;
|
||||
STATIC BOOLEAN gVtoyByPassSB = FALSE; /* must be FALSE by default for revoke */
|
||||
STATIC VTOY_SHIM gVtoyShimProtocol;
|
||||
STATIC EFI_HANDLE gVtoyShimProtHandle;
|
||||
STATIC SHIM_LOCK gShimLock;
|
||||
|
||||
STATIC EFI_EXIT_BOOT_SERVICES gSysExitBootServices = NULL;
|
||||
STATIC EFI_GET_VARIABLE gSysGetVariable = NULL;
|
||||
|
||||
STATIC VOID EFIAPI VtoyLog(CONST CHAR16 *Format, ...)
|
||||
{
|
||||
VA_LIST Marker;
|
||||
CHAR16 Buffer[512];
|
||||
UINTN BufLen = 0;
|
||||
|
||||
Buffer[0] = 0;
|
||||
VA_START(Marker, Format);
|
||||
BufLen = UnicodeVSPrint(Buffer, sizeof(Buffer), Format, Marker);
|
||||
VA_END(Marker);
|
||||
|
||||
if (gST->ConOut && gST->ConOut->OutputString)
|
||||
{
|
||||
gST->ConOut->OutputString(gST->ConOut, Buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
STATIC VOID EFIAPI DumpDevicePath(const EFI_DEVICE_PATH_PROTOCOL *DevicePath)
|
||||
{
|
||||
CHAR16 *DPStr = NULL;
|
||||
|
||||
DPStr = ConvertDevicePathToText(DevicePath, TRUE, TRUE);
|
||||
if (DPStr)
|
||||
{
|
||||
vLog(L"%s", DPStr);
|
||||
gBS->FreePool(DPStr);
|
||||
}
|
||||
else
|
||||
{
|
||||
vLog(L"NULL");
|
||||
}
|
||||
}
|
||||
|
||||
STATIC VOID EFIAPI ShowSBWarning(BOOLEAN Reboot, const EFI_DEVICE_PATH_PROTOCOL *DevicePath)
|
||||
{
|
||||
UINTN Index = 0;
|
||||
|
||||
vLog(L"\r\n=======================================================");
|
||||
vLog(L"=======================================================\r\n");
|
||||
|
||||
DumpDevicePath(DevicePath);
|
||||
|
||||
vLog(L"\r\n####### Security Boot Violation ##########\r\n");
|
||||
|
||||
vLog(L"=======================================================");
|
||||
vLog(L"=======================================================");
|
||||
|
||||
if (Reboot)
|
||||
{
|
||||
vLog(L"\r\n###### Press Enter to reboot... ######");
|
||||
if (gST->ConIn)
|
||||
{
|
||||
gST->ConIn->Reset(gST->ConIn, FALSE);
|
||||
gBS->WaitForEvent(1, &gST->ConIn->WaitForKey, &Index);
|
||||
}
|
||||
gRT->ResetSystem(EfiResetWarm, EFI_SECURITY_VIOLATION, 0, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
VtoySleep(5);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
STATIC VOID * EFIAPI FindShimFuncAddr(UINT64 FuncOffset)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
SHIM_IMAGE_LOADER *ImgLoader = NULL;
|
||||
EFI_GUID ShimImgLoaderGuid = SHIM_IMAGE_LOADER_GUID;
|
||||
|
||||
Status = gBS->LocateProtocol(&ShimImgLoaderGuid, NULL, (VOID **)&ImgLoader);
|
||||
if (EFI_ERROR(Status) || !ImgLoader || !ImgLoader->LoadImage)
|
||||
{
|
||||
vLog(L"Failed to locate shim image loader protocol %lx %p", Status, ImgLoader);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (NM_SHIM_LOAD_IMAGE_OFFSET > FuncOffset)
|
||||
{
|
||||
return (UINT8 *)ImgLoader->LoadImage - (NM_SHIM_LOAD_IMAGE_OFFSET - FuncOffset);
|
||||
}
|
||||
else
|
||||
{
|
||||
return (UINT8 *)ImgLoader->LoadImage + (FuncOffset - NM_SHIM_LOAD_IMAGE_OFFSET);
|
||||
}
|
||||
}
|
||||
|
||||
EFI_STATUS EFIAPI LaunchRealGrub(EFI_HANDLE ImageHandle, CONST CHAR16 *FileName)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
UINTN BufferSize = 0;
|
||||
CHAR16 *DevDpStr = NULL;
|
||||
CHAR16 *NewDpStr = NULL;
|
||||
EFI_HANDLE ChildHandle = NULL;
|
||||
EFI_LOADED_IMAGE_PROTOCOL *Li = NULL;
|
||||
EFI_DEVICE_PATH_PROTOCOL *DeviceDP = NULL;
|
||||
EFI_DEVICE_PATH_PROTOCOL *TargetDp = NULL;
|
||||
|
||||
Status = gBS->HandleProtocol(ImageHandle, &gEfiLoadedImageProtocolGuid, (VOID**)&Li);
|
||||
if (EFI_ERROR(Status))
|
||||
{
|
||||
vLog(L"Failed to locate loaded image protocol %lx", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
DeviceDP = DevicePathFromHandle(Li->DeviceHandle);
|
||||
if (!DeviceDP || !IsDevicePathValid(DeviceDP, 0))
|
||||
{
|
||||
vLog(L"Failed to get device path of device handle %p", Li->DeviceHandle);
|
||||
Status = EFI_NOT_FOUND;
|
||||
goto END;
|
||||
}
|
||||
|
||||
DevDpStr = ConvertDevicePathToText(DeviceDP, FALSE, TRUE);
|
||||
if (!DevDpStr)
|
||||
{
|
||||
vLog(L"Failed to convert device path to text");
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto END;
|
||||
}
|
||||
|
||||
BufferSize = (StrLen(DevDpStr) + 64) * sizeof(CHAR16);
|
||||
NewDpStr = (CHAR16 *)AllocatePool(BufferSize);
|
||||
if (!NewDpStr)
|
||||
{
|
||||
vLog(L"Failed to alloc new device path string buffer size:%lu", BufferSize);
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto END;
|
||||
}
|
||||
|
||||
UnicodeSPrint(NewDpStr, BufferSize, L"%s/EFI/BOOT/%s", DevDpStr, FileName);
|
||||
|
||||
TargetDp = ConvertTextToDevicePath(NewDpStr);
|
||||
if (!TargetDp)
|
||||
{
|
||||
vLog(L"Failed to convert new text <%s> to device path", NewDpStr);
|
||||
Status = EFI_NOT_FOUND;
|
||||
goto END;
|
||||
}
|
||||
|
||||
Status = gBS->LoadImage(FALSE, ImageHandle, TargetDp, NULL, 0, &ChildHandle);
|
||||
if (EFI_ERROR(Status))
|
||||
{
|
||||
vLog(L"Failed to LoadImage %lx", Status);
|
||||
goto END;
|
||||
}
|
||||
|
||||
Status = gBS->StartImage(ChildHandle, NULL, NULL);
|
||||
if (EFI_ERROR(Status))
|
||||
{
|
||||
vLog(L"Failed to StartImage %lx", Status);
|
||||
gBS->UnloadImage(ChildHandle);
|
||||
goto END;
|
||||
}
|
||||
|
||||
END:
|
||||
|
||||
CheckFreePool(DevDpStr);
|
||||
CheckFreePool(NewDpStr);
|
||||
CheckFreePool(TargetDp);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
|
||||
STATIC EFI_STATUS EFIAPI ReadAuthFile
|
||||
(
|
||||
const EFI_DEVICE_PATH_PROTOCOL *DevicePathConst,
|
||||
VOID **Buffer,
|
||||
UINT32 *Size
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
UINTN TmpSize = 0;
|
||||
CHAR16 *DpStr = NULL;
|
||||
EFI_HANDLE Handle = NULL;
|
||||
EFI_DEVICE_PATH *DevPath = NULL;
|
||||
EFI_DEVICE_PATH *TmpPath = NULL;
|
||||
EFI_FILE_IO_INTERFACE *FileIO = NULL;
|
||||
EFI_FILE *File = NULL;
|
||||
EFI_FILE *Root = NULL;
|
||||
UINT8 *FileData = NULL;
|
||||
EFI_FILE_INFO *FInfo = NULL;
|
||||
UINT8 Buf[1024];
|
||||
|
||||
DevPath = TmpPath = DuplicateDevicePath(DevicePathConst);
|
||||
if (!DevPath)
|
||||
{
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto END;
|
||||
}
|
||||
|
||||
Status = gBS->LocateDevicePath(&gEfiSimpleFileSystemProtocolGuid, &DevPath, &Handle);
|
||||
if (EFI_ERROR(Status))
|
||||
{
|
||||
vLog(L"Failed to locate simple file protocol %lx", Status);
|
||||
goto END;
|
||||
}
|
||||
|
||||
DpStr = ConvertDevicePathToText(DevPath, FALSE, TRUE);
|
||||
if (!DpStr)
|
||||
{
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto END;
|
||||
}
|
||||
|
||||
Status = gBS->HandleProtocol(Handle, &gEfiSimpleFileSystemProtocolGuid, (VOID **)&FileIO);
|
||||
if (EFI_ERROR(Status))
|
||||
{
|
||||
vLog(L"Failed to handle simple file protocol %lx", Status);
|
||||
goto END;
|
||||
}
|
||||
|
||||
Status = FileIO->OpenVolume(Handle, &Root);
|
||||
if (EFI_ERROR(Status))
|
||||
{
|
||||
vLog(L"Failed to open drive volume (%lx)\n", Status);
|
||||
goto END;
|
||||
}
|
||||
|
||||
Status = Root->Open(Root, &File, DpStr, EFI_FILE_MODE_READ, 0);
|
||||
if (EFI_ERROR(Status))
|
||||
{
|
||||
vLog(L"Failed to open file (%s) (%lx)\n", DpStr, Status);
|
||||
goto END;
|
||||
}
|
||||
|
||||
FInfo = (EFI_FILE_INFO *)Buf;
|
||||
TmpSize = sizeof(Buf);
|
||||
ZeroMem(FInfo, sizeof(EFI_FILE_INFO));
|
||||
|
||||
Status = File->GetInfo(File, &gEfiFileInfoGuid, &TmpSize, FInfo);
|
||||
if (EFI_ERROR(Status) || FInfo->FileSize == 0 || FInfo->FileSize >= 0xFFFFFFFFUL)
|
||||
{
|
||||
vLog(L"Failed to open file (%s) (%lx) Size(%ld)\n", DpStr, Status, (UINTN)FInfo->FileSize);
|
||||
goto END;
|
||||
}
|
||||
|
||||
FileData = AllocatePool(FInfo->FileSize);
|
||||
if (!FileData)
|
||||
{
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
goto END;
|
||||
}
|
||||
|
||||
TmpSize = FInfo->FileSize;
|
||||
Status = File->Read(File, &TmpSize, FileData);
|
||||
if (EFI_ERROR(Status) || TmpSize != (UINTN)FInfo->FileSize)
|
||||
{
|
||||
vLog(L"Failed to read file (%lx) Read:%ld Size:%ld\n", Status, TmpSize, (UINTN)FInfo->FileSize);
|
||||
goto END;
|
||||
}
|
||||
|
||||
|
||||
END:
|
||||
|
||||
if (File)
|
||||
{
|
||||
File->Close(File);
|
||||
}
|
||||
|
||||
if (Root)
|
||||
{
|
||||
Root->Close(Root);
|
||||
}
|
||||
|
||||
CheckFreePool(TmpPath);
|
||||
CheckFreePool(DpStr);
|
||||
|
||||
if (EFI_ERROR(Status))
|
||||
{
|
||||
CheckFreePool(FileData);
|
||||
}
|
||||
else
|
||||
{
|
||||
*Buffer = FileData;
|
||||
*Size = (UINT32)FInfo->FileSize;
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
STATIC BOOLEAN VtoyCheckRevoke(VOID *Buffer, UINTN Size)
|
||||
{
|
||||
UINT32 uiVer = 0;
|
||||
EFI_IMAGE_DOS_HEADER *DosHead = (EFI_IMAGE_DOS_HEADER *)Buffer;
|
||||
|
||||
if (Size > sizeof(EFI_IMAGE_DOS_HEADER) && DosHead->e_magic == 0x5A4D)
|
||||
{
|
||||
if (CompareMem(DosHead->e_res2, &gVtoySbatGUID, 16) == 0)
|
||||
{
|
||||
CopyMem(&uiVer, DosHead->e_res2 + 8, 4);
|
||||
if (uiVer < CUR_SBAT_VER)
|
||||
{
|
||||
vLog(L"Ventoy EFI file revoke (%u < %u)", uiVer, CUR_SBAT_VER);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
STATIC EFI_STATUS EFIAPI SecurityPolicyAuth
|
||||
(
|
||||
const EFI_SECURITY_ARCH_PROTOCOL *This,
|
||||
UINT32 AuthenticationStatus,
|
||||
const EFI_DEVICE_PATH_PROTOCOL *DevicePathConst
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
BOOLEAN bRevokeChkOK = TRUE;
|
||||
UINT32 Size = 0;
|
||||
VOID *Buffer = NULL;
|
||||
|
||||
/* Just return OK if the user choose to bypass SB */
|
||||
if (gVtoyByPassSB)
|
||||
{
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* Step 1:
|
||||
* Use original UEFI firmware auth API.
|
||||
* If it's OK, it may be signed with Microsoft UEFI CA. (e.g. bootmgr/shim/...)
|
||||
*/
|
||||
if (gSysSecFileAuth)
|
||||
{
|
||||
Status = gSysSecFileAuth(This, AuthenticationStatus, DevicePathConst);
|
||||
if (!EFI_ERROR(Status))
|
||||
{
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Step 2:
|
||||
* Use shim verify API.
|
||||
* If it's OK, it may be signed with a MOK key. (e.g. Ventoy EFI files)
|
||||
*/
|
||||
if (gShimLock.Verify)
|
||||
{
|
||||
Status = ReadAuthFile(DevicePathConst, &Buffer, &Size);
|
||||
if (!EFI_ERROR(Status))
|
||||
{
|
||||
Status = gShimLock.Verify(Buffer, Size);
|
||||
if (!EFI_ERROR(Status))
|
||||
{
|
||||
bRevokeChkOK = VtoyCheckRevoke(Buffer, Size);
|
||||
if (bRevokeChkOK)
|
||||
{
|
||||
FreePool(Buffer);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
FreePool(Buffer);
|
||||
}
|
||||
}
|
||||
|
||||
ShowSBWarning(!bRevokeChkOK, DevicePathConst);
|
||||
|
||||
return EFI_SECURITY_VIOLATION;
|
||||
}
|
||||
|
||||
STATIC EFI_STATUS EFIAPI Security2PolicyAuth
|
||||
(
|
||||
const EFI_SECURITY2_ARCH_PROTOCOL *This,
|
||||
const EFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
||||
VOID *FileBuffer,
|
||||
UINTN FileSize,
|
||||
BOOLEAN BootPolicy
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
BOOLEAN bRevokeChkOK = TRUE;
|
||||
|
||||
/* Just return OK if the user choose to bypass SB */
|
||||
if (gVtoyByPassSB)
|
||||
{
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* Step 1:
|
||||
* Use original UEFI firmware auth API.
|
||||
* If it's OK, it may be signed with Microsoft UEFI CA. (e.g. bootmgr/shim/...)
|
||||
*/
|
||||
if (gSysSec2FileAuth)
|
||||
{
|
||||
Status = gSysSec2FileAuth(This, DevicePath, FileBuffer, FileSize, BootPolicy);
|
||||
if (!EFI_ERROR(Status))
|
||||
{
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Step 2:
|
||||
* Use shim verify API.
|
||||
* If it's OK, it may be signed with a MOK key. (e.g. Ventoy EFI files)
|
||||
*/
|
||||
if (gShimLock.Verify)
|
||||
{
|
||||
if (FileBuffer && FileSize > 0 && FileSize < 0xFFFFFFFFUL)
|
||||
{
|
||||
Status = gShimLock.Verify(FileBuffer, (UINT32)FileSize);
|
||||
if (!EFI_ERROR(Status))
|
||||
{
|
||||
bRevokeChkOK = VtoyCheckRevoke(FileBuffer, FileSize);
|
||||
if (bRevokeChkOK)
|
||||
{
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ShowSBWarning(!bRevokeChkOK, DevicePath);
|
||||
|
||||
return EFI_SECURITY_VIOLATION;
|
||||
}
|
||||
|
||||
|
||||
STATIC EFI_STATUS EFIAPI HookSecurityPolicy(VOID)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_STATUS Status2;
|
||||
EFI_SECURITY_ARCH_PROTOCOL *Security = NULL;
|
||||
EFI_SECURITY2_ARCH_PROTOCOL *Security2 = NULL;
|
||||
|
||||
Status = gBS->LocateProtocol(&gEfiSecurityArchProtocolGuid, NULL, (VOID **)&Security);
|
||||
Status2 = gBS->LocateProtocol(&gEfiSecurity2ArchProtocolGuid, NULL, (VOID **)&Security2);
|
||||
if (EFI_ERROR(Status) && EFI_ERROR(Status2))
|
||||
{
|
||||
vLog(L"Failed to locate security or security2 protocol. %lx %lx %p %p",
|
||||
Status, Status2, Security, Security2);
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
if (Security2)
|
||||
{
|
||||
gSysSec2FileAuth = Security2->FileAuthentication;
|
||||
Security2->FileAuthentication = Security2PolicyAuth;
|
||||
}
|
||||
|
||||
if (Security)
|
||||
{
|
||||
gSysSecFileAuth = Security->FileAuthenticationState;
|
||||
Security->FileAuthenticationState = SecurityPolicyAuth;
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
STATIC VOID EFIAPI UnHookSecurityPolicy(VOID)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_STATUS Status2;
|
||||
EFI_SECURITY_ARCH_PROTOCOL *Security = NULL;
|
||||
EFI_SECURITY2_ARCH_PROTOCOL *Security2 = NULL;
|
||||
|
||||
if (!gSysSec2FileAuth && !gSysSecFileAuth)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Status = gBS->LocateProtocol(&gEfiSecurityArchProtocolGuid, NULL, (VOID **)&Security);
|
||||
Status2 = gBS->LocateProtocol(&gEfiSecurity2ArchProtocolGuid, NULL, (VOID **)&Security2);
|
||||
if (EFI_ERROR(Status) && EFI_ERROR(Status2))
|
||||
{
|
||||
vLog(L"Failed to locate security or security2 protocol. %lx %lx %p %p",
|
||||
Status, Status2, Security, Security2);
|
||||
return;
|
||||
}
|
||||
|
||||
if (Security2 && gSysSec2FileAuth && Security2->FileAuthentication == Security2PolicyAuth)
|
||||
{
|
||||
Security2->FileAuthentication = gSysSec2FileAuth;
|
||||
gSysSec2FileAuth = NULL;
|
||||
}
|
||||
|
||||
if (Security && gSysSecFileAuth && Security->FileAuthenticationState == SecurityPolicyAuth)
|
||||
{
|
||||
Security->FileAuthenticationState = gSysSecFileAuth;
|
||||
gSysSecFileAuth = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
STATIC VOID EFIAPI VtoyByPassSB(VOID)
|
||||
{
|
||||
gVtoyByPassSB = TRUE;
|
||||
}
|
||||
|
||||
STATIC VOID EFIAPI VtoyCheckSB(VOID)
|
||||
{
|
||||
gVtoyByPassSB = FALSE;
|
||||
}
|
||||
|
||||
STATIC VOID EFIAPI UnInstallVtoyShimProtocol(VOID)
|
||||
{
|
||||
EFI_GUID Guid = VTOY_SHIM_POLICY_GUID;
|
||||
|
||||
if (gVtoyShimProtHandle)
|
||||
{
|
||||
gBS->UninstallProtocolInterface(gVtoyShimProtHandle, &Guid, &gVtoyShimProtocol);
|
||||
gVtoyShimProtHandle = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
STATIC EFI_STATUS EFIAPI InstallVtoyShimProtocol(VOID)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_GUID Guid = VTOY_SHIM_POLICY_GUID;
|
||||
VTOY_SHIM *Prot = NULL;
|
||||
|
||||
gVtoyShimProtocol.ByPassSB = VtoyByPassSB;
|
||||
gVtoyShimProtocol.CheckSB = VtoyCheckSB;
|
||||
|
||||
Status = gBS->LocateProtocol(&Guid, NULL, (VOID**)&Prot);
|
||||
if (!EFI_ERROR(Status))
|
||||
{
|
||||
vLog(L"Ventoy shim already loaded, cannot be nested.");
|
||||
return EFI_ALREADY_STARTED;
|
||||
}
|
||||
|
||||
Status = gBS->InstallProtocolInterface(&gVtoyShimProtHandle, &Guid,
|
||||
EFI_NATIVE_INTERFACE, &gVtoyShimProtocol);
|
||||
if (EFI_ERROR(Status))
|
||||
{
|
||||
vLog(L"Failed to install protocol %lx", Status);
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
STATIC BOOLEAN EFIAPI IsSecureBootEnabled(VOID)
|
||||
{
|
||||
UINT8 SecureBoot = 0;
|
||||
UINTN DataSize;
|
||||
EFI_STATUS Status;
|
||||
|
||||
DataSize = sizeof(SecureBoot);
|
||||
Status = gST->RuntimeServices->GetVariable(L"SecureBoot", &gEfiGlobalVariableGuid, NULL,
|
||||
&DataSize, &SecureBoot);
|
||||
if (EFI_ERROR(Status))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return SecureBoot ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
STATIC BOOLEAN EFIAPI IsSetupMode(VOID)
|
||||
{
|
||||
UINT8 SetupMode = 0;
|
||||
UINTN DataSize;
|
||||
EFI_STATUS Status;
|
||||
|
||||
DataSize = sizeof(SetupMode);
|
||||
Status = gST->RuntimeServices->GetVariable(L"SetupMode", &gEfiGlobalVariableGuid, NULL,
|
||||
&DataSize, &SetupMode);
|
||||
if (EFI_ERROR(Status))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return SetupMode ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
STATIC EFI_STATUS EFIAPI ShimEfiMain
|
||||
(
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable,
|
||||
IN BOOLEAN IsSecureBoot,
|
||||
IN BOOLEAN IsSetup
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
SHIM_LOCK *ShimLock = NULL;
|
||||
shim_void_func_pf Func1 = NULL;
|
||||
shim_void_func_pf Func2 = NULL;
|
||||
|
||||
/* If secure boot is not enabled or in SetupMode, nothing needed, just launch Ventoy grub */
|
||||
if (!IsSecureBoot || IsSetup)
|
||||
{
|
||||
Status = LaunchRealGrub(ImageHandle, REAL_GRUB_FILE);
|
||||
if (EFI_ERROR(Status))
|
||||
{
|
||||
vErr(L"Failed to launch %s", REAL_GRUB_FILE);
|
||||
}
|
||||
return Status;
|
||||
}
|
||||
|
||||
/* We must be launched by shim */
|
||||
Status = gBS->LocateProtocol(&gShimLockGUID, NULL, (VOID**)&ShimLock);
|
||||
if (EFI_ERROR(Status) || !ShimLock)
|
||||
{
|
||||
vErr(L"Failed to locate SHIM LOCK Protocol %lx", Status);
|
||||
return Status;
|
||||
}
|
||||
|
||||
/* Backup shim Lock because we will remove it later */
|
||||
gShimLock.Verify = ShimLock->Verify;
|
||||
gShimLock.Hash = ShimLock->Hash;
|
||||
gShimLock.Context = ShimLock->Context;
|
||||
|
||||
Status = InstallVtoyShimProtocol();
|
||||
if (EFI_ERROR(Status))
|
||||
{
|
||||
vErr(L"Failed to install ventoy shim protocol");
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* IMPORTANT: All recent shim implementations hook the UEFI Boot Services
|
||||
* (e.g. LoadImage, StartImage) to enforce signature verification.
|
||||
*
|
||||
* We must restore the original system service pointers here. If we fail to do this,
|
||||
* we will be unable to launch Ventoy-signed EFI binaries or any other unsigned
|
||||
* EFI applications later, even when the user has explicitly opted to disable
|
||||
* all Secure Boot validation checks.
|
||||
*
|
||||
* To the best of my knowledge, there is no official way to remove these hooks.
|
||||
* This is a tricky hack that relies on shim's internal implementation details.
|
||||
* It may break in future versions of shim, and a better approach may exist.
|
||||
*
|
||||
*/
|
||||
Func1 = FindShimFuncAddr(NM_UNHOOK_SYSTEM_SERVICES_OFFSET);
|
||||
Func2 = FindShimFuncAddr(NM_UNINSTALL_SHIM_PROTOCOLS_OFFSET);
|
||||
if (!Func1 || !Func2)
|
||||
{
|
||||
vErr(L"Can not find shim func %p %p", Func1, Func2);
|
||||
Status = EFI_NOT_FOUND;
|
||||
goto END;
|
||||
}
|
||||
|
||||
Func1(); /* call shim unhook_system_services() */
|
||||
Func2(); /* call shim uninstall_shim_protocols() */
|
||||
|
||||
|
||||
/* Hook the system security policy */
|
||||
Status = HookSecurityPolicy();
|
||||
if (EFI_ERROR(Status))
|
||||
{
|
||||
vErr(L"Failed to hook system security policy");
|
||||
goto END;
|
||||
}
|
||||
|
||||
/* Finally launch Ventoy grub */
|
||||
Status = LaunchRealGrub(ImageHandle, REAL_GRUB_FILE);
|
||||
if (EFI_ERROR(Status))
|
||||
{
|
||||
vErr(L"Failed to finally launch real grub %s", REAL_GRUB_FILE);
|
||||
goto END;
|
||||
}
|
||||
|
||||
END:
|
||||
|
||||
/* UnHook system security policy */
|
||||
UnHookSecurityPolicy();
|
||||
|
||||
UnInstallVtoyShimProtocol();
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
STATIC EFI_STATUS EFIAPI VtoyExitBootServices
|
||||
(
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN UINTN MapKey
|
||||
)
|
||||
{
|
||||
UnHookSecurityPolicy();
|
||||
UnInstallVtoyShimProtocol();
|
||||
|
||||
gST->RuntimeServices->GetVariable = gSysGetVariable;
|
||||
gBS->ExitBootServices = gSysExitBootServices;
|
||||
|
||||
return gSysExitBootServices(ImageHandle, MapKey);
|
||||
}
|
||||
|
||||
EFI_STATUS EFIAPI VtoyGetVariable
|
||||
(
|
||||
IN CHAR16 *VariableName,
|
||||
IN EFI_GUID *VendorGuid,
|
||||
OUT UINT32 *Attributes, OPTIONAL
|
||||
IN OUT UINTN *DataSize,
|
||||
OUT VOID *Data OPTIONAL
|
||||
)
|
||||
{
|
||||
BOOLEAN bChk = FALSE;
|
||||
EFI_STATUS Status;
|
||||
|
||||
if (gVtoyByPassSB && VariableName && VendorGuid && DataSize && Data && (*DataSize) > 0)
|
||||
{
|
||||
bChk = TRUE;
|
||||
}
|
||||
|
||||
Status = gSysGetVariable(VariableName, VendorGuid, Attributes, DataSize, Data);
|
||||
if (bChk && (!EFI_ERROR(Status)))
|
||||
{
|
||||
if (CompareMem(&gShimLockGUID, VendorGuid, 16) == 0 &&
|
||||
StrCmp(VariableName, L"MokSBState") == 0)
|
||||
{
|
||||
*(UINT8 *)Data = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
EFI_STATUS EFIAPI VtoyShimEfiMain
|
||||
(
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
{
|
||||
BOOLEAN IsSetup = FALSE;
|
||||
BOOLEAN IsSecureBoot = FALSE;
|
||||
EFI_STATUS Status;
|
||||
|
||||
IsSetup = IsSetupMode();
|
||||
IsSecureBoot = IsSecureBootEnabled();
|
||||
|
||||
if (!IsSecureBoot || IsSetup)
|
||||
{
|
||||
Status = ShimEfiMain(ImageHandle, SystemTable, IsSecureBoot, IsSetup);
|
||||
}
|
||||
else
|
||||
{
|
||||
gSysExitBootServices = gBS->ExitBootServices;
|
||||
gBS->ExitBootServices = VtoyExitBootServices;
|
||||
|
||||
gSysGetVariable = gST->RuntimeServices->GetVariable;
|
||||
gST->RuntimeServices->GetVariable = VtoyGetVariable;
|
||||
|
||||
Status = ShimEfiMain(ImageHandle, SystemTable, IsSecureBoot, IsSetup);
|
||||
|
||||
gBS->ExitBootServices = gSysExitBootServices;
|
||||
gST->RuntimeServices->GetVariable = gSysGetVariable;
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
/******************************************************************************
|
||||
* VtoyShim.h
|
||||
*
|
||||
* Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
* SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __VTOYSHIM_H__
|
||||
#define __VTOYSHIM_H__
|
||||
|
||||
#if defined (MDE_CPU_IA32)
|
||||
#define REAL_GRUB_FILE L"grubia32_real.efi"
|
||||
#elif defined (MDE_CPU_X64)
|
||||
#define REAL_GRUB_FILE L"grubx64_real.efi"
|
||||
#elif defined (MDE_CPU_AARCH64)
|
||||
#define REAL_GRUB_FILE L"grubaa64_real.efi"
|
||||
#else
|
||||
#error "Not supported now"
|
||||
#endif
|
||||
|
||||
|
||||
/* The following definations are copied from shim source code */
|
||||
|
||||
#define SHIM_LOCK_GUID {0x605dab50, 0xe046, 0x4300, {0xab, 0xb6, 0x3d, 0xd8, 0x10, 0xdd, 0x8b, 0x23 } };
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(*EFI_SHIM_LOCK_VERIFY) (
|
||||
IN VOID *buffer,
|
||||
IN UINT32 size
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(*EFI_SHIM_LOCK_HASH) (
|
||||
IN char *data,
|
||||
IN int datasize,
|
||||
PE_COFF_LOADER_IMAGE_CONTEXT *context,
|
||||
UINT8 *sha256hash,
|
||||
UINT8 *sha1hash
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(*EFI_SHIM_LOCK_CONTEXT) (
|
||||
IN VOID *data,
|
||||
IN unsigned int datasize,
|
||||
PE_COFF_LOADER_IMAGE_CONTEXT *context
|
||||
);
|
||||
|
||||
typedef struct _SHIM_LOCK {
|
||||
EFI_SHIM_LOCK_VERIFY Verify;
|
||||
EFI_SHIM_LOCK_HASH Hash;
|
||||
EFI_SHIM_LOCK_CONTEXT Context;
|
||||
} SHIM_LOCK;
|
||||
|
||||
|
||||
|
||||
#define SHIM_IMAGE_LOADER_GUID {0x1f492041, 0xfadb, 0x4e59, {0x9e, 0x57, 0x7c, 0xaf, 0xe7, 0x3a, 0x55, 0xab } }
|
||||
|
||||
typedef struct _SHIM_IMAGE_LOADER {
|
||||
EFI_IMAGE_LOAD LoadImage;
|
||||
EFI_IMAGE_START StartImage;
|
||||
EFI_EXIT Exit;
|
||||
EFI_IMAGE_UNLOAD UnloadImage;
|
||||
} SHIM_IMAGE_LOADER;
|
||||
|
||||
typedef VOID (*shim_void_func_pf)(VOID);
|
||||
|
||||
|
||||
/*
|
||||
* The two offset here are extract from the shim file which used in Ventoy.
|
||||
* nm BOOTX64.EFI | grep shim_load_image
|
||||
* nm BOOTX64.EFI | grep unhook_system_services
|
||||
* nm BOOTX64.EFI | grep uninstall_shim_protocols
|
||||
*
|
||||
* It means that they must be updated every time Ventoy update the shim file.
|
||||
*
|
||||
*/
|
||||
#define NM_SHIM_LOAD_IMAGE_OFFSET 0x2dc12
|
||||
#define NM_UNHOOK_SYSTEM_SERVICES_OFFSET 0x2e278
|
||||
#define NM_UNINSTALL_SHIM_PROTOCOLS_OFFSET 0x26264
|
||||
|
||||
|
||||
|
||||
|
||||
#define VtoySleep(sec) gBS->Stall(1000000 * (sec))
|
||||
#define vLog(fmt, ...) VtoyLog(fmt "\r\n", ##__VA_ARGS__)
|
||||
#define vErr(fmt, ...) VtoyLog(fmt "\r\n", ##__VA_ARGS__); VtoySleep(5)
|
||||
|
||||
#define CheckFreePool(p) \
|
||||
do { \
|
||||
if (p) { \
|
||||
FreePool(p); \
|
||||
(p) = NULL; \
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
|
||||
#define VTOY_SHIM_POLICY_GUID {0x90a29d14, 0x3968, 0x48fe, { 0x85, 0x81, 0x6b, 0x7f, 0x7d, 0xc4, 0x70, 0x55 }};
|
||||
|
||||
|
||||
typedef VOID (EFIAPI *VTOY_BYPASS_SB)(VOID);
|
||||
typedef VOID (EFIAPI *VTOY_CHECK_SB)(VOID);
|
||||
typedef struct _VTOY_SHIM{
|
||||
VTOY_BYPASS_SB ByPassSB;
|
||||
VTOY_BYPASS_SB CheckSB;
|
||||
} VTOY_SHIM;
|
||||
|
||||
CONST UINT8 * ventoy_get_der_data(UINT32 *Len);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
#************************************************************************************
|
||||
# Copyright (c) 2026, longpanda <admin@ventoy.net>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation; either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#************************************************************************************
|
||||
|
||||
[Defines]
|
||||
INF_VERSION = 0x00010005
|
||||
BASE_NAME = VtoyShim
|
||||
FILE_GUID = 6d7c7406-b32c-461f-8454-ddaa5243d93d
|
||||
MODULE_TYPE = UEFI_APPLICATION
|
||||
VERSION_STRING = 1.0
|
||||
ENTRY_POINT = VtoyShimEfiMain
|
||||
|
||||
[BuildOptions]
|
||||
# Force standard GNU ld to pack and align ELF segments to 4KB page boundaries
|
||||
GCC:*_*_*_DLINK_FLAGS = -Wl,-z,common-page-size=0x1000 -Wl,-z,max-page-size=0x1000
|
||||
|
||||
[Sources]
|
||||
VtoyShim.h
|
||||
VtoyShim.c
|
||||
|
||||
[Packages]
|
||||
MdePkg/MdePkg.dec
|
||||
MdeModulePkg/MdeModulePkg.dec
|
||||
ShellPkg/ShellPkg.dec
|
||||
|
||||
[LibraryClasses]
|
||||
UefiApplicationEntryPoint
|
||||
UefiLib
|
||||
DevicePathLib
|
||||
DebugLib
|
||||
|
||||
[Guids]
|
||||
gEfiGlobalVariableGuid
|
||||
gShellVariableGuid
|
||||
gEfiVirtualCdGuid
|
||||
gEfiFileInfoGuid
|
||||
|
||||
[Protocols]
|
||||
gEfiSecurityArchProtocolGuid
|
||||
gEfiSecurity2ArchProtocolGuid
|
||||
gEfiLoadedImageProtocolGuid
|
||||
gEfiBlockIoProtocolGuid
|
||||
gEfiDevicePathProtocolGuid
|
||||
gEfiDevicePathToTextProtocolGuid
|
||||
gEfiDevicePathFromTextProtocolGuid
|
||||
gEfiSimpleFileSystemProtocolGuid
|
||||
gEfiRamDiskProtocolGuid
|
||||
gEfiAbsolutePointerProtocolGuid
|
||||
gEfiAcpiTableProtocolGuid
|
||||
gEfiBlockIo2ProtocolGuid
|
||||
gEfiBusSpecificDriverOverrideProtocolGuid
|
||||
gEfiComponentNameProtocolGuid
|
||||
gEfiComponentName2ProtocolGuid
|
||||
gEfiDriverBindingProtocolGuid
|
||||
gEfiDiskIoProtocolGuid
|
||||
gEfiDiskIo2ProtocolGuid
|
||||
gEfiGraphicsOutputProtocolGuid
|
||||
gEfiHiiConfigAccessProtocolGuid
|
||||
gEfiHiiFontProtocolGuid
|
||||
gEfiLoadFileProtocolGuid
|
||||
gEfiLoadFile2ProtocolGuid
|
||||
gEfiLoadedImageProtocolGuid
|
||||
gEfiLoadedImageDevicePathProtocolGuid
|
||||
gEfiPciIoProtocolGuid
|
||||
gEfiSerialIoProtocolGuid
|
||||
gEfiSimpleTextInProtocolGuid
|
||||
gEfiSimpleTextInputExProtocolGuid
|
||||
gEfiSimpleTextOutProtocolGuid
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md
|
||||
ventoy-shim,1,Ventoy,ventoy-shim,1.0,https://www.ventoy.net/
|
||||
|
@@ -7,12 +7,12 @@
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
@@ -41,7 +41,7 @@ STATIC CONST CHAR16 *gCurFeature= NULL;
|
||||
STATIC CHAR16 *gCmdLine = NULL;
|
||||
STATIC grub_env_printf_pf g_env_printf = NULL;
|
||||
|
||||
STATIC VtoyUtilFeature gFeatureList[] =
|
||||
STATIC VtoyUtilFeature gFeatureList[] =
|
||||
{
|
||||
{ L"fix_windows_mmap", FixWindowsMemhole },
|
||||
{ L"show_efi_drivers", ShowEfiDrivers },
|
||||
@@ -93,7 +93,7 @@ VOID EFIAPI VtoyUtilDebug(IN CONST CHAR8 *Format, ...)
|
||||
}
|
||||
|
||||
STATIC EFI_STATUS ParseCmdline(IN EFI_HANDLE ImageHandle)
|
||||
{
|
||||
{
|
||||
CHAR16 *pPos = NULL;
|
||||
CHAR16 *pCmdLine = NULL;
|
||||
EFI_STATUS Status = EFI_SUCCESS;
|
||||
@@ -117,7 +117,7 @@ STATIC EFI_STATUS ParseCmdline(IN EFI_HANDLE ImageHandle)
|
||||
gST->ConOut->OutputString(gST->ConOut, L"\r\n##########################");
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
if (StrStr(pCmdLine, L"debug"))
|
||||
{
|
||||
gVtoyDebugPrint = TRUE;
|
||||
@@ -139,12 +139,72 @@ STATIC EFI_STATUS ParseCmdline(IN EFI_HANDLE ImageHandle)
|
||||
}
|
||||
|
||||
gCurFeature = pPos + StrLen(L"feature=");
|
||||
|
||||
|
||||
gCmdLine = pCmdLine;
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
#if defined (MDE_CPU_X64)
|
||||
|
||||
STATIC BOOLEAN EFIAPI IsSecureBootEnabled(VOID)
|
||||
{
|
||||
UINT8 SecureBoot = 0;
|
||||
UINTN DataSize;
|
||||
EFI_STATUS Status;
|
||||
|
||||
DataSize = sizeof(SecureBoot);
|
||||
Status = gST->RuntimeServices->GetVariable(L"SecureBoot", &gEfiGlobalVariableGuid, NULL,
|
||||
&DataSize, &SecureBoot);
|
||||
if (EFI_ERROR(Status))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return SecureBoot ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
STATIC BOOLEAN EFIAPI IsSetupMode(VOID)
|
||||
{
|
||||
UINT8 SetupMode = 0;
|
||||
UINTN DataSize;
|
||||
EFI_STATUS Status;
|
||||
|
||||
DataSize = sizeof(SetupMode);
|
||||
Status = gST->RuntimeServices->GetVariable(L"SetupMode", &gEfiGlobalVariableGuid, NULL,
|
||||
&DataSize, &SetupMode);
|
||||
if (EFI_ERROR(Status))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return SetupMode ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
|
||||
STATIC BOOLEAN EFIAPI CheckVtoyShim(VOID)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_GUID Guid = VTOY_SHIM_POLICY_GUID;
|
||||
VOID *Prot = NULL;
|
||||
|
||||
/* If secure boot is not enabled or in SetupMode, nothing needed */
|
||||
if (!IsSecureBootEnabled() || IsSetupMode())
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Status = gBS->LocateProtocol(&Guid, NULL, (VOID**)&Prot);
|
||||
if (EFI_ERROR(Status))
|
||||
{
|
||||
gST->ConOut->OutputString(gST->ConOut, L"Can not locate Vtoy Shim\r\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
EFI_STATUS EFIAPI VtoyUtilEfiMain
|
||||
(
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
@@ -153,7 +213,16 @@ EFI_STATUS EFIAPI VtoyUtilEfiMain
|
||||
{
|
||||
UINTN i;
|
||||
UINTN Len;
|
||||
|
||||
|
||||
#if defined (MDE_CPU_X64)
|
||||
/* check that Ventoy Shim must exist */
|
||||
if (!CheckVtoyShim())
|
||||
{
|
||||
gBS->Stall(5 * 1000000);
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
#endif
|
||||
|
||||
ParseCmdline(ImageHandle);
|
||||
|
||||
for (i = 0; gCurFeature && i < ARRAY_SIZE(gFeatureList); i++)
|
||||
@@ -170,7 +239,7 @@ EFI_STATUS EFIAPI VtoyUtilEfiMain
|
||||
if (gCmdLine)
|
||||
{
|
||||
FreePool(gCmdLine);
|
||||
gCmdLine = NULL;
|
||||
gCmdLine = NULL;
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
||||
@@ -7,20 +7,22 @@
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __VTOYUTIL_H__
|
||||
#define __VTOYUTIL_H__
|
||||
|
||||
#define VTOY_SHIM_POLICY_GUID {0x90a29d14, 0x3968, 0x48fe, { 0x85, 0x81, 0x6b, 0x7f, 0x7d, 0xc4, 0x70, 0x55 }};
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
typedef EFI_STATUS (*VTOY_UTIL_PROC_PF)(IN EFI_HANDLE ImageHandle, IN CONST CHAR16 *CmdLine);
|
||||
@@ -44,14 +46,14 @@ typedef struct ventoy_grub_param
|
||||
grub_env_set_pf grub_env_set;
|
||||
ventoy_grub_param_file_replace file_replace;
|
||||
ventoy_grub_param_file_replace img_replace[VTOY_MAX_CONF_REPLACE];
|
||||
grub_env_printf_pf grub_env_printf;
|
||||
grub_env_printf_pf grub_env_printf;
|
||||
}ventoy_grub_param;
|
||||
#pragma pack()
|
||||
|
||||
|
||||
typedef struct VtoyUtilFeature
|
||||
{
|
||||
CONST CHAR16 *Cmd;
|
||||
CONST CHAR16 *Cmd;
|
||||
VTOY_UTIL_PROC_PF MainProc;
|
||||
}VtoyUtilFeature;
|
||||
|
||||
|
||||
@@ -23,7 +23,10 @@
|
||||
MODULE_TYPE = UEFI_APPLICATION
|
||||
VERSION_STRING = 1.0
|
||||
ENTRY_POINT = VtoyUtilEfiMain
|
||||
|
||||
|
||||
[BuildOptions]
|
||||
# Force standard GNU ld to pack and align ELF segments to 4KB page boundaries
|
||||
GCC:*_*_*_DLINK_FLAGS = -Wl,-z,common-page-size=0x1000 -Wl,-z,max-page-size=0x1000
|
||||
|
||||
[Sources]
|
||||
VtoyUtil.h
|
||||
|
||||
@@ -205,6 +205,7 @@
|
||||
[Components]
|
||||
MdeModulePkg/Application/Ventoy/Ventoy.inf
|
||||
MdeModulePkg/Application/VtoyUtil/VtoyUtil.inf
|
||||
MdeModulePkg/Application/VtoyShim/VtoyShim.inf
|
||||
MdeModulePkg/Application/VDiskChain/VDiskChain.inf
|
||||
MdeModulePkg/Application/HelloWorld/HelloWorld.inf
|
||||
MdeModulePkg/Application/DumpDynPcd/DumpDynPcd.inf
|
||||
|
||||
195
GRUB2/MOD_SRC/grub-2.04/grub-core/kern/corecmd.c
Normal file
195
GRUB2/MOD_SRC/grub-2.04/grub-core/kern/corecmd.c
Normal file
@@ -0,0 +1,195 @@
|
||||
/* corecmd.c - critical commands which are registered in kernel */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
*
|
||||
* GRUB is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* GRUB is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <grub/mm.h>
|
||||
#include <grub/dl.h>
|
||||
#include <grub/err.h>
|
||||
#include <grub/env.h>
|
||||
#include <grub/misc.h>
|
||||
#include <grub/term.h>
|
||||
#include <grub/file.h>
|
||||
#include <grub/device.h>
|
||||
#include <grub/command.h>
|
||||
#include <grub/i18n.h>
|
||||
|
||||
/* set ENVVAR=VALUE */
|
||||
static grub_err_t
|
||||
grub_core_cmd_set (struct grub_command *cmd __attribute__ ((unused)),
|
||||
int argc, char *argv[])
|
||||
{
|
||||
char *var;
|
||||
char *val;
|
||||
|
||||
if (argc < 1)
|
||||
{
|
||||
struct grub_env_var *env;
|
||||
FOR_SORTED_ENV (env)
|
||||
grub_printf ("%s=%s\n", env->name, grub_env_get (env->name));
|
||||
return 0;
|
||||
}
|
||||
|
||||
var = argv[0];
|
||||
val = grub_strchr (var, '=');
|
||||
if (! val)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "not an assignment");
|
||||
|
||||
val[0] = 0;
|
||||
grub_env_set (var, val + 1);
|
||||
val[0] = '=';
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_core_cmd_unset (struct grub_command *cmd __attribute__ ((unused)),
|
||||
int argc, char *argv[])
|
||||
{
|
||||
if (argc < 1)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("one argument expected"));
|
||||
|
||||
grub_env_unset (argv[0]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* insmod MODULE */
|
||||
static grub_err_t
|
||||
grub_core_cmd_insmod (struct grub_command *cmd __attribute__ ((unused)),
|
||||
int argc, char *argv[])
|
||||
{
|
||||
grub_dl_t mod;
|
||||
|
||||
if (argc == 0)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("one argument expected"));
|
||||
|
||||
/* For simple, just disable insmod when SecureBoot is enabled. */
|
||||
if (g_sys_sb && g_sb_policy == VTOY_SB_POLICY_CHECK)
|
||||
{
|
||||
return grub_error (GRUB_ERR_BAD_SIGNATURE, "Cannot insmod when SecureBoot is enabled and Policy is check.");
|
||||
}
|
||||
|
||||
if (argv[0][0] == '/' || argv[0][0] == '(' || argv[0][0] == '+')
|
||||
mod = grub_dl_load_file (argv[0]);
|
||||
else
|
||||
mod = grub_dl_load (argv[0]);
|
||||
|
||||
if (mod)
|
||||
grub_dl_ref (mod);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
grub_mini_print_devices (const char *name, void *data __attribute__ ((unused)))
|
||||
{
|
||||
grub_printf ("(%s) ", name);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
grub_mini_print_files (const char *filename,
|
||||
const struct grub_dirhook_info *info,
|
||||
void *data __attribute__ ((unused)))
|
||||
{
|
||||
grub_printf ("%s%s ", filename, info->dir ? "/" : "");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ls [ARG] */
|
||||
static grub_err_t
|
||||
grub_core_cmd_ls (struct grub_command *cmd __attribute__ ((unused)),
|
||||
int argc, char *argv[])
|
||||
{
|
||||
if (argc < 1)
|
||||
{
|
||||
grub_device_iterate (grub_mini_print_devices, NULL);
|
||||
grub_xputs ("\n");
|
||||
grub_refresh ();
|
||||
}
|
||||
else
|
||||
{
|
||||
char *device_name;
|
||||
grub_device_t dev = 0;
|
||||
grub_fs_t fs;
|
||||
char *path;
|
||||
|
||||
device_name = grub_file_get_device_name (argv[0]);
|
||||
if (grub_errno)
|
||||
goto fail;
|
||||
dev = grub_device_open (device_name);
|
||||
if (! dev)
|
||||
goto fail;
|
||||
|
||||
fs = grub_fs_probe (dev);
|
||||
path = grub_strchr (argv[0], ')');
|
||||
if (! path)
|
||||
path = argv[0];
|
||||
else
|
||||
path++;
|
||||
|
||||
if (! *path && ! device_name)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_ARGUMENT, "invalid argument");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (! *path)
|
||||
{
|
||||
if (grub_errno == GRUB_ERR_UNKNOWN_FS)
|
||||
grub_errno = GRUB_ERR_NONE;
|
||||
|
||||
grub_printf ("(%s): Filesystem is %s.\n",
|
||||
device_name, fs ? fs->name : "unknown");
|
||||
}
|
||||
else if (fs)
|
||||
{
|
||||
(fs->fs_dir) (dev, path, grub_mini_print_files, NULL);
|
||||
grub_xputs ("\n");
|
||||
grub_refresh ();
|
||||
}
|
||||
|
||||
fail:
|
||||
if (dev)
|
||||
grub_device_close (dev);
|
||||
|
||||
grub_free (device_name);
|
||||
}
|
||||
|
||||
return grub_errno;
|
||||
}
|
||||
|
||||
void
|
||||
grub_register_core_commands (void)
|
||||
{
|
||||
grub_command_t cmd;
|
||||
cmd = grub_register_command ("set", grub_core_cmd_set,
|
||||
N_("[ENVVAR=VALUE]"),
|
||||
N_("Set an environment variable."));
|
||||
if (cmd)
|
||||
cmd->flags |= GRUB_COMMAND_FLAG_EXTRACTOR;
|
||||
grub_register_command ("unset", grub_core_cmd_unset,
|
||||
N_("ENVVAR"),
|
||||
N_("Remove an environment variable."));
|
||||
grub_register_command ("ls", grub_core_cmd_ls,
|
||||
N_("[ARG]"), N_("List devices or files."));
|
||||
grub_register_command ("insmod", grub_core_cmd_insmod,
|
||||
N_("MODULE"), N_("Insert a module."));
|
||||
}
|
||||
@@ -22,6 +22,9 @@
|
||||
#include <grub/misc.h>
|
||||
#include <grub/mm.h>
|
||||
|
||||
grub_uint8_t g_sys_sb = 0;
|
||||
grub_uint8_t g_sb_policy = VTOY_SB_POLICY_BYPASS;
|
||||
|
||||
/* The initial context. */
|
||||
static struct grub_env_context initial_context;
|
||||
|
||||
@@ -238,12 +241,12 @@ grub_env_export (const char *name)
|
||||
if (! var)
|
||||
{
|
||||
grub_err_t err;
|
||||
|
||||
|
||||
err = grub_env_set (name, "");
|
||||
if (err)
|
||||
return err;
|
||||
var = grub_env_find (name);
|
||||
}
|
||||
}
|
||||
var->global = 1;
|
||||
|
||||
return GRUB_ERR_NONE;
|
||||
|
||||
@@ -35,6 +35,8 @@
|
||||
#include <grub/i18n.h>
|
||||
#include <grub/lib/cmdline.h>
|
||||
#include <grub/linux.h>
|
||||
#include <grub/time.h>
|
||||
#include <grub/env.h>
|
||||
#include <grub/machine/kernel.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
@@ -297,7 +299,7 @@ grub_linux_setup_video (struct linux_kernel_params *params)
|
||||
params->lfb_size >>= 16;
|
||||
params->have_vga = GRUB_VIDEO_LINUX_TYPE_VESA;
|
||||
break;
|
||||
|
||||
|
||||
case GRUB_VIDEO_DRIVER_EFI_UGA:
|
||||
case GRUB_VIDEO_DRIVER_EFI_GOP:
|
||||
params->have_vga = GRUB_VIDEO_LINUX_TYPE_EFIFB;
|
||||
@@ -413,11 +415,11 @@ static void ventoy_debug_pause(void)
|
||||
{
|
||||
char key;
|
||||
|
||||
if (0 == ventoy_debug)
|
||||
if (0 == ventoy_debug)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
grub_printf("press Enter to continue ......\n");
|
||||
while (1)
|
||||
{
|
||||
@@ -426,7 +428,7 @@ static void ventoy_debug_pause(void)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int ventoy_preboot(void)
|
||||
@@ -435,7 +437,7 @@ static int ventoy_preboot(void)
|
||||
const char *file;
|
||||
char buf[128];
|
||||
|
||||
if (ventoy_debug)
|
||||
if (ventoy_debug)
|
||||
{
|
||||
grub_printf("ventoy_preboot %d %d\n", ventoy_linux_argc, ventoy_initrd_called);
|
||||
ventoy_debug_pause();
|
||||
@@ -462,7 +464,7 @@ static int ventoy_preboot(void)
|
||||
ventoy_extra_initrd_list[ventoy_extra_initrd_num++] = grub_strdup(file);
|
||||
}
|
||||
|
||||
if (ventoy_debug)
|
||||
if (ventoy_debug)
|
||||
{
|
||||
grub_printf("========== initrd list ==========\n");
|
||||
for (i = 0; i < ventoy_extra_initrd_num; i++)
|
||||
@@ -470,7 +472,7 @@ static int ventoy_preboot(void)
|
||||
grub_printf("%s\n", ventoy_extra_initrd_list[i]);
|
||||
}
|
||||
grub_printf("=================================\n");
|
||||
|
||||
|
||||
ventoy_debug_pause();
|
||||
}
|
||||
|
||||
@@ -500,7 +502,7 @@ static int ventoy_boot_opt_filter(char *opt)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (grub_strncmp(opt, "init=", 5) == 0)
|
||||
{
|
||||
opt[0] = 'v';
|
||||
@@ -521,12 +523,12 @@ static int ventoy_boot_opt_filter(char *opt)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if (grub_strncmp(opt, "loglevel=", 9) == 0)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if (grub_strcmp(opt, "splash") == 0)
|
||||
{
|
||||
return 1;
|
||||
@@ -573,7 +575,7 @@ static int ventoy_bootopt_hook(int argc, char *argv[])
|
||||
{
|
||||
ventoy_linux_args[count] = ventoy_linux_args[i + (LINUX_MAX_ARGC / 2)];
|
||||
ventoy_linux_args[i + (LINUX_MAX_ARGC / 2)] = NULL;
|
||||
|
||||
|
||||
if (ventoy_linux_args[count][0] == '@')
|
||||
{
|
||||
env = grub_env_get(ventoy_linux_args[count] + 1);
|
||||
@@ -619,7 +621,7 @@ static int ventoy_bootopt_hook(int argc, char *argv[])
|
||||
{
|
||||
if (0 == ventoy_boot_opt_filter(last))
|
||||
{
|
||||
ventoy_linux_args[count++] = grub_strdup(last);
|
||||
ventoy_linux_args[count++] = grub_strdup(last);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -634,7 +636,7 @@ static int ventoy_bootopt_hook(int argc, char *argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
count++;
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -662,10 +664,10 @@ static int ventoy_bootopt_hook(int argc, char *argv[])
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
grub_printf("%s ", ventoy_linux_args[i]);
|
||||
}
|
||||
}
|
||||
grub_printf("\n================================\n");
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -677,7 +679,7 @@ grub_cmd_extra_initrd_append (grub_command_t cmd __attribute__ ((unused)),
|
||||
char *pos = NULL;
|
||||
char *end = NULL;
|
||||
char buf[256] = {0};
|
||||
|
||||
|
||||
if (argc != 1)
|
||||
{
|
||||
return 1;
|
||||
@@ -703,10 +705,10 @@ grub_cmd_extra_initrd_append (grub_command_t cmd __attribute__ ((unused)),
|
||||
{
|
||||
grub_snprintf(buf, sizeof(buf), "newc:%s:%s", end + 1, argv[0]);
|
||||
}
|
||||
|
||||
|
||||
if (ventoy_extra_initrd_num < 256)
|
||||
{
|
||||
ventoy_extra_initrd_list[ventoy_extra_initrd_num++] = grub_strdup(buf);
|
||||
ventoy_extra_initrd_list[ventoy_extra_initrd_num++] = grub_strdup(buf);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -718,7 +720,7 @@ grub_cmd_extra_initrd_reset (grub_command_t cmd __attribute__ ((unused)),
|
||||
int argc, char *argv[])
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
@@ -750,6 +752,16 @@ grub_linux_boot (void)
|
||||
grub_size_t mmap_size;
|
||||
grub_size_t cl_offset;
|
||||
|
||||
/* To be simple, just deny to boot linux kernel when SecureBoot is enabled and Policy is check */
|
||||
if (g_sys_sb && g_sb_policy == VTOY_SB_POLICY_CHECK)
|
||||
{
|
||||
grub_printf("\n\n ######### Can not do linux boot in SecureBoot Policy Check #######\n\n");
|
||||
grub_refresh();
|
||||
grub_sleep(5);
|
||||
grub_errno = GRUB_ERR_BAD_SIGNATURE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
ventoy_preboot();
|
||||
|
||||
#ifdef GRUB_MACHINE_IEEE1275
|
||||
@@ -924,9 +936,9 @@ grub_linux_boot (void)
|
||||
&efi_desc_size, &efi_desc_version);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
||||
/* Note that no boot services are available from here. */
|
||||
efi_mmap_target = ctx.real_mode_target
|
||||
efi_mmap_target = ctx.real_mode_target
|
||||
+ ((grub_uint8_t *) efi_mmap_buf - (grub_uint8_t *) real_mode_mem);
|
||||
/* Pass EFI parameters. */
|
||||
if (grub_le_to_cpu16 (ctx.params->version) >= 0x0208)
|
||||
@@ -1008,7 +1020,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
if (tip)
|
||||
{
|
||||
grub_printf("%s\n", tip);
|
||||
grub_refresh();
|
||||
grub_refresh();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1086,7 +1098,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
align = 0;
|
||||
relocatable = 0;
|
||||
}
|
||||
|
||||
|
||||
if (grub_le_to_cpu16 (lh.version) >= 0x020a)
|
||||
{
|
||||
min_align = lh.min_alignment;
|
||||
@@ -1361,7 +1373,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
||||
- (sizeof (LINUX_IMAGE) - 1),
|
||||
GRUB_VERIFY_KERNEL_CMDLINE);
|
||||
}
|
||||
|
||||
|
||||
if (err)
|
||||
goto fail;
|
||||
}
|
||||
@@ -1495,7 +1507,7 @@ ventoy_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
|
||||
|
||||
if (ventoy_linux_argc == 0)
|
||||
{
|
||||
return grub_cmd_initrd(cmd, argc, argv);
|
||||
return grub_cmd_initrd(cmd, argc, argv);
|
||||
}
|
||||
|
||||
grub_snprintf(buf, sizeof(buf), "mem:%s:size:%s", grub_env_get("ventoy_cpio_addr"), grub_env_get("ventoy_cpio_size"));
|
||||
@@ -1526,7 +1538,7 @@ ventoy_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
|
||||
}
|
||||
grub_printf("=================================\n");
|
||||
}
|
||||
|
||||
|
||||
return grub_cmd_initrd(cmd, ventoy_extra_initrd_num, ventoy_extra_initrd_list);
|
||||
}
|
||||
|
||||
@@ -1537,7 +1549,7 @@ grub_cmd_set_boot_opt (grub_command_t cmd __attribute__ ((unused)),
|
||||
int i;
|
||||
const char *vtdebug;
|
||||
grub_command_t regcmd;
|
||||
|
||||
|
||||
for (i = 0; i < argc; i++)
|
||||
{
|
||||
ventoy_linux_args[ventoy_linux_argc + (LINUX_MAX_ARGC / 2) ] = grub_strdup(argv[i]);
|
||||
@@ -1559,7 +1571,7 @@ grub_cmd_set_boot_opt (grub_command_t cmd __attribute__ ((unused)),
|
||||
ventoy_linux16_func = regcmd->func;
|
||||
regcmd->func = grub_cmd_linux;
|
||||
}
|
||||
|
||||
|
||||
regcmd = grub_command_find("initrd16");
|
||||
if (regcmd)
|
||||
{
|
||||
@@ -1576,7 +1588,7 @@ grub_cmd_unset_boot_opt (grub_command_t cmd __attribute__ ((unused)),
|
||||
{
|
||||
int i;
|
||||
grub_command_t regcmd;
|
||||
|
||||
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
||||
@@ -1612,7 +1624,7 @@ grub_cmd_unset_boot_opt (grub_command_t cmd __attribute__ ((unused)),
|
||||
}
|
||||
ventoy_initrd16_func = NULL;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1633,7 +1645,7 @@ GRUB_MOD_INIT(linux)
|
||||
0, N_("Load initrd."));
|
||||
cmd_set_bootopt = grub_register_command ("vt_set_boot_opt", grub_cmd_set_boot_opt, 0, N_("set ext boot opt"));
|
||||
cmd_unset_bootopt = grub_register_command ("vt_unset_boot_opt", grub_cmd_unset_boot_opt, 0, N_("unset ext boot opt"));
|
||||
|
||||
|
||||
cmd_extra_initrd_append = grub_register_command ("vt_img_extra_initrd_append", grub_cmd_extra_initrd_append, 0, N_(""));
|
||||
cmd_extra_initrd_reset = grub_register_command ("vt_img_extra_initrd_reset", grub_cmd_extra_initrd_reset, 0, N_(""));
|
||||
|
||||
|
||||
@@ -49,6 +49,10 @@ int g_ventoy_debug = 0;
|
||||
static int g_efi_os = 0xFF;
|
||||
grub_uint32_t g_ventoy_plat_data;
|
||||
|
||||
#ifdef GRUB_MACHINE_EFI
|
||||
static VTOY_SHIM *g_vtoy_shim = NULL;
|
||||
#endif
|
||||
|
||||
void ventoy_debug(const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
@@ -298,9 +302,134 @@ void ventoy_memfile_env_set(const char *prefix, const void *buf, unsigned long l
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef GRUB_MACHINE_EFI
|
||||
static void ventoy_get_uefi_version(char *str, grub_size_t len)
|
||||
{
|
||||
grub_efi_uint8_t uefi_minor_1, uefi_minor_2;
|
||||
|
||||
uefi_minor_1 = (grub_efi_system_table->hdr.revision & 0xffff) / 10;
|
||||
uefi_minor_2 = (grub_efi_system_table->hdr.revision & 0xffff) % 10;
|
||||
grub_snprintf(str, len, "%d.%d", (grub_efi_system_table->hdr.revision >> 16), uefi_minor_1);
|
||||
if (uefi_minor_2)
|
||||
grub_snprintf(str, len, "%s.%d", str, uefi_minor_2);
|
||||
}
|
||||
|
||||
int ventoy_set_sb_policy(void)
|
||||
{
|
||||
const char *env = NULL;
|
||||
static int set_once = 0;
|
||||
|
||||
/* no need when SecureBoot is disabled */
|
||||
if (g_sys_sb == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* can only set once */
|
||||
if (set_once > 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
set_once = 1;
|
||||
|
||||
/* VTOY_SECURE_BOOT_POLICY only take affect once during init */
|
||||
env = grub_env_get("VTOY_SECURE_BOOT_POLICY");
|
||||
if (env)
|
||||
{
|
||||
g_sb_policy = (grub_uint8_t)(env[0] - '0');
|
||||
}
|
||||
|
||||
if (g_sb_policy == VTOY_SB_POLICY_BYPASS)
|
||||
{
|
||||
if (g_vtoy_shim && g_vtoy_shim->ByPassSB)
|
||||
{
|
||||
g_vtoy_shim->ByPassSB();
|
||||
}
|
||||
}
|
||||
else if (g_sb_policy == VTOY_SB_POLICY_CHECK)
|
||||
{
|
||||
if (g_vtoy_shim && g_vtoy_shim->CheckSB)
|
||||
{
|
||||
g_vtoy_shim->CheckSB();
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ventoy_get_uefi_sb(void)
|
||||
{
|
||||
grub_uint8_t secure_boot = 0;
|
||||
grub_uint8_t setup_mode = 0;
|
||||
grub_uint8_t *var = NULL;
|
||||
grub_size_t size = 0;
|
||||
grub_efi_guid_t global = GRUB_EFI_GLOBAL_VARIABLE_GUID;
|
||||
|
||||
var = grub_efi_get_variable("SecureBoot", &global, &size);
|
||||
if (var && size == 1 && *var == 1)
|
||||
{
|
||||
secure_boot = 1;
|
||||
}
|
||||
grub_check_free(var);
|
||||
|
||||
size = 0;
|
||||
var = grub_efi_get_variable("SetupMode", &global, &size);
|
||||
if (var && size == 1 && *var == 1)
|
||||
{
|
||||
setup_mode = 1;
|
||||
}
|
||||
|
||||
if (secure_boot == 1 && setup_mode == 0)
|
||||
{
|
||||
g_sys_sb = 1;
|
||||
}
|
||||
|
||||
grub_check_free(var);
|
||||
}
|
||||
|
||||
static int ventoy_secure_boot_init(void)
|
||||
{
|
||||
grub_efi_guid_t ProtGuid = VTOY_SHIM_POLICY_GUID;
|
||||
|
||||
ventoy_get_uefi_sb();
|
||||
|
||||
if (g_sys_sb == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* When SecureBoot enabled, Ventoy grub must be launched by Ventoy Shim.
|
||||
* Currently only x86_64 support this feature.
|
||||
*/
|
||||
if (g_ventoy_plat_data == VTOY_PLAT_X86_64_UEFI)
|
||||
{
|
||||
g_vtoy_shim = grub_efi_locate_protocol(&ProtGuid, NULL);
|
||||
if (g_vtoy_shim == NULL || g_vtoy_shim->ByPassSB == NULL || g_vtoy_shim->CheckSB == NULL)
|
||||
{
|
||||
grub_cls();
|
||||
grub_printf(VTOY_WARNING"\n");
|
||||
grub_printf(VTOY_WARNING"\n");
|
||||
grub_printf(VTOY_WARNING"\n\n\n");
|
||||
|
||||
grub_printf("Ventoy grub is not launched by Ventoy shim.\n\n");
|
||||
grub_refresh();
|
||||
|
||||
ventoy_prompt_end();
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
static int ventoy_arch_mode_init(void)
|
||||
{
|
||||
#ifdef GRUB_MACHINE_EFI
|
||||
|
||||
if (grub_strcmp(GRUB_TARGET_CPU, "i386") == 0)
|
||||
{
|
||||
g_ventoy_plat_data = VTOY_PLAT_I386_UEFI;
|
||||
@@ -329,19 +458,6 @@ static int ventoy_arch_mode_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef GRUB_MACHINE_EFI
|
||||
static void ventoy_get_uefi_version(char *str, grub_size_t len)
|
||||
{
|
||||
grub_efi_uint8_t uefi_minor_1, uefi_minor_2;
|
||||
|
||||
uefi_minor_1 = (grub_efi_system_table->hdr.revision & 0xffff) / 10;
|
||||
uefi_minor_2 = (grub_efi_system_table->hdr.revision & 0xffff) % 10;
|
||||
grub_snprintf(str, len, "%d.%d", (grub_efi_system_table->hdr.revision >> 16), uefi_minor_1);
|
||||
if (uefi_minor_2)
|
||||
grub_snprintf(str, len, "%s.%d", str, uefi_minor_2);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int ventoy_calc_totalmem(grub_uint64_t addr, grub_uint64_t size, grub_memory_type_t type, void *data)
|
||||
{
|
||||
grub_uint64_t *total_mem = (grub_uint64_t *)data;
|
||||
@@ -497,6 +613,11 @@ GRUB_MOD_INIT(ventoy)
|
||||
ventoy_hwinfo_init();
|
||||
ventoy_env_init();
|
||||
ventoy_arch_mode_init();
|
||||
|
||||
#ifdef GRUB_MACHINE_EFI
|
||||
ventoy_secure_boot_init();
|
||||
#endif
|
||||
|
||||
ventoy_register_all_cmd();
|
||||
}
|
||||
|
||||
|
||||
@@ -896,6 +896,36 @@ static grub_err_t ventoy_cmd_strstr(grub_extcmd_context_t ctxt, int argc, char *
|
||||
return (grub_strstr(args[0], args[1])) ? 0 : 1;
|
||||
}
|
||||
|
||||
static grub_err_t ventoy_cmd_istrstr(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
grub_err_t ret = 1;
|
||||
char *s1 = NULL;
|
||||
char *s2 = NULL;
|
||||
|
||||
(void)ctxt;
|
||||
|
||||
if (argc != 2)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
s1 = grub_strdup(args[0]);
|
||||
s2 = grub_strdup(args[1]);
|
||||
if (s1 == NULL || s2 == NULL)
|
||||
{
|
||||
goto end;
|
||||
}
|
||||
|
||||
ventoy_str_toupper(s1);
|
||||
ventoy_str_toupper(s2);
|
||||
ret = (grub_strstr(s1, s2)) ? 0 : 1;
|
||||
|
||||
end:
|
||||
grub_check_free(s1);
|
||||
grub_check_free(s2);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static grub_err_t ventoy_cmd_strbegin(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
char *c0, *c1;
|
||||
@@ -4723,7 +4753,7 @@ static grub_err_t ventoy_cmd_img_unhook_root(grub_extcmd_context_t ctxt, int arg
|
||||
static grub_err_t ventoy_cmd_check_secureboot_var(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
int ret = 1;
|
||||
grub_uint8_t *var;
|
||||
grub_uint8_t *var = NULL;
|
||||
grub_size_t size;
|
||||
grub_efi_guid_t global = GRUB_EFI_GLOBAL_VARIABLE_GUID;
|
||||
|
||||
@@ -4734,6 +4764,7 @@ static grub_err_t ventoy_cmd_check_secureboot_var(grub_extcmd_context_t ctxt, in
|
||||
var = grub_efi_get_variable("SecureBoot", &global, &size);
|
||||
if (var && *var == 1)
|
||||
{
|
||||
grub_free(var);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -5118,7 +5149,7 @@ int ventoy_load_part_table(const char *diskname)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ventoy_prompt_end(void)
|
||||
void ventoy_prompt_end(void)
|
||||
{
|
||||
int op = 0;
|
||||
char c;
|
||||
@@ -6412,6 +6443,52 @@ static grub_err_t ventoy_cmd_load_menu_lang(grub_extcmd_context_t ctxt, int argc
|
||||
VENTOY_CMD_RETURN(0);
|
||||
}
|
||||
|
||||
static grub_err_t ventoy_cmd_update_sb_policy(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
(void)ctxt;
|
||||
(void)argc;
|
||||
(void)args;
|
||||
|
||||
#ifdef GRUB_MACHINE_EFI
|
||||
ventoy_set_sb_policy();
|
||||
#endif
|
||||
|
||||
VENTOY_CMD_RETURN(0);
|
||||
}
|
||||
|
||||
static grub_err_t ventoy_cmd_sb_info(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
{
|
||||
(void)ctxt;
|
||||
(void)argc;
|
||||
(void)args;
|
||||
|
||||
#ifdef GRUB_MACHINE_EFI
|
||||
const char *policy = NULL;
|
||||
|
||||
if (g_sb_policy == VTOY_SB_POLICY_BYPASS)
|
||||
{
|
||||
policy = "ByPass";
|
||||
}
|
||||
else if (g_sb_policy == VTOY_SB_POLICY_CHECK)
|
||||
{
|
||||
policy = "Check";
|
||||
}
|
||||
else
|
||||
{
|
||||
policy = "XXX";
|
||||
}
|
||||
|
||||
grub_printf("UEFI Firmware Secure Boot: %s\n", g_sys_sb ? "Enable" : "Disable");
|
||||
grub_printf("Ventoy Secure Boot Policy: %s\n", policy);
|
||||
#else
|
||||
grub_printf("Non EFI mode!\n");
|
||||
#endif
|
||||
|
||||
grub_refresh();
|
||||
|
||||
VENTOY_CMD_RETURN(0);
|
||||
}
|
||||
|
||||
static int ventoy_chksum_pathcmp(int chktype, char *rlpath, char *rdpath)
|
||||
{
|
||||
char *pos1 = NULL;
|
||||
@@ -6897,6 +6974,7 @@ static cmd_para ventoy_cmds[] =
|
||||
{ "vt_incr", ventoy_cmd_incr, 0, NULL, "{Var} {INT}", "Increase integer variable", NULL },
|
||||
{ "vt_mod", ventoy_cmd_mod, 0, NULL, "{Int} {Int} {Var}", "mod integer variable", NULL },
|
||||
{ "vt_strstr", ventoy_cmd_strstr, 0, NULL, "", "", NULL },
|
||||
{ "vt_istrstr", ventoy_cmd_istrstr, 0, NULL, "", "", NULL },
|
||||
{ "vt_str_begin", ventoy_cmd_strbegin, 0, NULL, "", "", NULL },
|
||||
{ "vt_str_casebegin", ventoy_cmd_strcasebegin, 0, NULL, "", "", NULL },
|
||||
{ "vt_debug", ventoy_cmd_debug, 0, NULL, "{on|off}", "turn debug on/off", NULL },
|
||||
@@ -7060,6 +7138,9 @@ static cmd_para ventoy_cmds[] =
|
||||
{ "vt_pop_menu_lang", ventoy_cmd_pop_menulang, 0, NULL, "", "", NULL },
|
||||
{ "vt_linux_initrd", ventoy_cmd_linux_initrd, 0, NULL, "", "", NULL },
|
||||
|
||||
{ "vt_sbinfo", ventoy_cmd_sb_info, 0, NULL, "", "", NULL },
|
||||
{ "vt_update_sb_policy", ventoy_cmd_update_sb_policy, 0, NULL, "", "", NULL },
|
||||
|
||||
};
|
||||
|
||||
int ventoy_register_all_cmd(void)
|
||||
|
||||
@@ -195,6 +195,16 @@ typedef struct cpio_newc_header
|
||||
#define check_free(p, func) if (p) { func(p); p = NULL; }
|
||||
#define grub_check_free(p) if (p) { grub_free(p); p = NULL; }
|
||||
|
||||
#define VTOY_SHIM_POLICY_GUID {0x90a29d14, 0x3968, 0x48fe, { 0x85, 0x81, 0x6b, 0x7f, 0x7d, 0xc4, 0x70, 0x55 }};
|
||||
|
||||
typedef void (*VTOY_BYPASS_SB)(void);
|
||||
typedef void (*VTOY_CHECK_SB)(void);
|
||||
typedef struct _VTOY_SHIM{
|
||||
VTOY_BYPASS_SB ByPassSB;
|
||||
VTOY_CHECK_SB CheckSB;
|
||||
} VTOY_SHIM;
|
||||
|
||||
|
||||
typedef int (*grub_char_check_func)(int c);
|
||||
#define ventoy_is_decimal(str) ventoy_string_check(str, grub_isdigit)
|
||||
|
||||
@@ -1326,6 +1336,8 @@ int ventoy_ctrl_var_init(void);
|
||||
int ventoy_global_var_init(void);
|
||||
grub_err_t ventoy_cmd_push_menulang(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
grub_err_t ventoy_cmd_pop_menulang(grub_extcmd_context_t ctxt, int argc, char **args);
|
||||
void ventoy_prompt_end(void);
|
||||
int ventoy_set_sb_policy(void);
|
||||
|
||||
#endif /* __VENTOY_DEF_H__ */
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -24,6 +24,11 @@
|
||||
#include <grub/types.h>
|
||||
#include <grub/menu.h>
|
||||
|
||||
#define VTOY_SB_POLICY_BYPASS 0
|
||||
#define VTOY_SB_POLICY_CHECK 1
|
||||
extern grub_uint8_t EXPORT_VAR(g_sys_sb);
|
||||
extern grub_uint8_t EXPORT_VAR(g_sb_policy);
|
||||
|
||||
struct grub_env_var;
|
||||
|
||||
typedef const char *(*grub_env_read_hook_t) (struct grub_env_var *var,
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
INSTALL/EFI/BOOT/mmx64.efi
Normal file
BIN
INSTALL/EFI/BOOT/mmx64.efi
Normal file
Binary file not shown.
@@ -1457,7 +1457,10 @@ function ventoy_iso_busybox_ver {
|
||||
set ventoy_busybox_ver=64
|
||||
elif vt_strstr "$vt_volume_id" "x86_64"; then
|
||||
set ventoy_busybox_ver=64
|
||||
|
||||
elif vt_istrstr "${vt_chosen_path}" "x86_64"; then
|
||||
set ventoy_busybox_ver=64
|
||||
elif vt_istrstr "${vt_chosen_path}" "amd64"; then
|
||||
set ventoy_busybox_ver=64
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@@ -2449,7 +2452,7 @@ function mimg_common_menuentry {
|
||||
#############################################################
|
||||
#############################################################
|
||||
|
||||
set VENTOY_VERSION="1.1.12"
|
||||
set VENTOY_VERSION="1.1.16"
|
||||
|
||||
#ACPI not compatible with Window7/8, so disable by default
|
||||
set VTOY_PARAM_NO_ACPI=1
|
||||
@@ -2551,6 +2554,10 @@ else
|
||||
vt_check_json_path_case $vtoy_iso_part
|
||||
fi
|
||||
|
||||
#Update Secure Boot Policy
|
||||
vt_update_sb_policy
|
||||
|
||||
|
||||
if [ -n "$VTOY_MENU_LANGUAGE" ]; then
|
||||
vt_init_menu_lang "$VTOY_MENU_LANGUAGE"
|
||||
else
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
L - Seleccionar lenguaje
|
||||
L - Seleccionar idioma
|
||||
F1 - Mostrar información de ayuda
|
||||
F2 - Navegar y arranca archivos en el disco local
|
||||
F3 - Cambiar modo de menú entre vista de árbol <-> vista de lista
|
||||
F4 - arrancar Windows/Linux en el disco local
|
||||
F2 - Navegar y arrancar archivos en el disco local
|
||||
F3 - Cambiar modo de menú entre Vista de árbol <-> Vista de lista
|
||||
F4 - Arrancar Windows/Linux en el disco local
|
||||
F5 - Utilidades
|
||||
F6 - Cargar menú de Grub2 personalizado
|
||||
F7 - Cambiar entre modo grafico <-> modo texto
|
||||
F7 - Cambiar entre Modo GUI <-> Modo texto
|
||||
|
||||
m/Ctrl+m - Suma de comprobación de archivos de imagen (md5/sha1/sha256/sha512)
|
||||
d/Ctrl+d - Modo Memdisk (solo para WinPE/LiveCD ISO/IMG pequeños)
|
||||
w/Ctrl+w - Modo WIMBOOT (Solo para archivos Windows/WinPE ISO)
|
||||
r/Ctrl+r - Modo Grub2 (Solo para algunas distribuciones de Linux)
|
||||
i/Ctrl+i - Modo compatible (Solo para depuración)
|
||||
u/Ctrl+u - Cargar controlador ISO EFI (Solo para depuración, no se puede usar oficialmente)
|
||||
d/Ctrl+d - Modo Memdisk (Sólo para WinPE/LiveCD ISO/IMG pequeños)
|
||||
w/Ctrl+w - Modo WIMBOOT (Sólo para archivos Windows/WinPE ISO)
|
||||
r/Ctrl+r - Modo Grub2 (Sólo para algunas distros de Linux)
|
||||
i/Ctrl+i - Modo compatible (Sólo para depuración)
|
||||
u/Ctrl+u - Cargar controlador ISO EFI (Sólo para depuración, uso no oficial)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"VTLANG_LANGUAGE_NAME": "Spanish (Español)",
|
||||
|
||||
"VTLANG_STR_HOTKEY_LIST": "L:Lenguaje F1:Ayuda F2:Navegar F3:Vista de lista F4:Arranque local F5:Herramientas F6:Extensión de menú",
|
||||
"VTLANG_STR_HOTKEY_TREE": "L:Lenguaje F1:Ayuda F2:Navegar F3:Vista de árbol F4:Arranque local F5:Herramientas F6:Extensión de menú",
|
||||
"VTLANG_RETURN_PREVIOUS": "Regresar al menú previo [Esc]",
|
||||
"VTLANG_RETURN_PRV_NOESC": "Regresar al menú previo",
|
||||
"VTLANG_STR_HOTKEY_LIST": "L:Idioma F1:Ayuda F2:Navegar F3:Vista de lista F4:Arranque local F5:Herramientas F6:Menú ext.",
|
||||
"VTLANG_STR_HOTKEY_TREE": "L:Idioma F1:Ayuda F2:Navegar F3:Vista de árbol F4:Arranque local F5:Herramientas F6:Menú ext.",
|
||||
"VTLANG_RETURN_PREVIOUS": "Regresar al menú anterior [Esc]",
|
||||
"VTLANG_RETURN_PRV_NOESC": "Regresar al menú anterior",
|
||||
|
||||
"VTLANG_MENU_LANG": "Selección de idioma del menú",
|
||||
|
||||
@@ -28,13 +28,13 @@
|
||||
"VTLANG_CHKSUM_SHA256_CALC_CHK": "Calcular y comprobar sha256sum",
|
||||
"VTLANG_CHKSUM_SHA512_CALC_CHK": "Calcular y comprobar sha512sum",
|
||||
|
||||
"VTLANG_POWER": "Poder",
|
||||
"VTLANG_POWER": "Energía",
|
||||
"VTLANG_POWER_REBOOT": "Reiniciar",
|
||||
"VTLANG_POWER_HALT": "Detener",
|
||||
"VTLANG_POWER_BOOT_EFIFW": "Reiniciar a configuración EFI",
|
||||
"VTLANG_POWER_HALT": "Apagar",
|
||||
"VTLANG_POWER_BOOT_EFIFW": "Reiniciar a la configuración EFI",
|
||||
|
||||
"VTLANG_KEYBRD_LAYOUT": "Distribuciones de teclado",
|
||||
"VTLANG_HWINFO": "Información de Hardware",
|
||||
"VTLANG_HWINFO": "Información de hardware",
|
||||
|
||||
"VTLANG_RESOLUTION_CFG": "Configuración de resolución",
|
||||
"VTLANG_SCREEN_MODE": "Modo de visualización de pantalla",
|
||||
@@ -45,23 +45,23 @@
|
||||
|
||||
"VTLANG_UEFI_UTIL": "Utilidades UEFI de Ventoy",
|
||||
"VTLANG_UTIL_SHOW_EFI_DRV": "Mostrar controladores EFI",
|
||||
"VTLANG_UTIL_FIX_BLINIT_FAIL": "Reparar la falla de BinitializeLibrary de Windows",
|
||||
"VTLANG_UTIL_FIX_BLINIT_FAIL": "Reparar error BlinitializeLibrary de Windows",
|
||||
|
||||
"VTLANG_JSON_CHK_JSON": "Comprobar configuración de complemento de json (ventoy.json)",
|
||||
"VTLANG_JSON_CHK_CONTROL": "Comprobar configuración de complemento de control global",
|
||||
"VTLANG_JSON_CHK_THEME": "Comprobar configuración de complemento de tema",
|
||||
"VTLANG_JSON_CHK_AUTOINS": "Comprobar configuración de complemento de auto instalación",
|
||||
"VTLANG_JSON_CHK_PERSIST": "Comprobar configuración de complemento de persistencia",
|
||||
"VTLANG_JSON_CHK_MENU_ALIAS": "Comprobar configuración de complemento de alias de menú",
|
||||
"VTLANG_JSON_CHK_MENU_TIP": "Comprobar configuración de complemento de consejo de menú",
|
||||
"VTLANG_JSON_CHK_MENU_CLASS": "Comprobar configuración de complemento de clase de menú",
|
||||
"VTLANG_JSON_CHK_INJECTION": "Comprobar configuración de complemento de inyección",
|
||||
"VTLANG_JSON_CHK_AUTO_MEMDISK": "Comprobar configuración de complemento de auto memdisk",
|
||||
"VTLANG_JSON_CHK_IMG_LIST": "Comprobar configuración de complemento de lista de imágenes",
|
||||
"VTLANG_JSON_CHK_IMG_BLIST": "Comprobar configuración de complemento de lista negra de imágenes",
|
||||
"VTLANG_JSON_CHK_CONF_REPLACE": "Comprobar configuración de complemento de reemplazo de configuración de arranque",
|
||||
"VTLANG_JSON_CHK_DUD": "Comprobar configuración de complemento de dud",
|
||||
"VTLANG_JSON_CHK_PASSWORD": "Comprobar configuración de complemento de contraseñas",
|
||||
"VTLANG_JSON_CHK_JSON": "Comprobar configuración del complemento de json (ventoy.json)",
|
||||
"VTLANG_JSON_CHK_CONTROL": "Comprobar configuración del complemento de control global",
|
||||
"VTLANG_JSON_CHK_THEME": "Comprobar configuración del complemento de tema",
|
||||
"VTLANG_JSON_CHK_AUTOINS": "Comprobar configuración del complemento de autoinstalación",
|
||||
"VTLANG_JSON_CHK_PERSIST": "Comprobar configuración del complemento de persistencia",
|
||||
"VTLANG_JSON_CHK_MENU_ALIAS": "Comprobar configuración del complemento de alias de menú",
|
||||
"VTLANG_JSON_CHK_MENU_TIP": "Comprobar configuración del complemento de consejo de menú",
|
||||
"VTLANG_JSON_CHK_MENU_CLASS": "Comprobar configuración del complemento de clases de menú",
|
||||
"VTLANG_JSON_CHK_INJECTION": "Comprobar configuración del complemento de inyección",
|
||||
"VTLANG_JSON_CHK_AUTO_MEMDISK": "Comprobar configuración del complemento auto memdisk",
|
||||
"VTLANG_JSON_CHK_IMG_LIST": "Comprobar configuración del complemento de lista de imágenes",
|
||||
"VTLANG_JSON_CHK_IMG_BLIST": "Comprobar configuración del complemento de lista negra de imágenes",
|
||||
"VTLANG_JSON_CHK_CONF_REPLACE": "Comprobar configuración del complemento de reemplazo de configuración de arranque",
|
||||
"VTLANG_JSON_CHK_DUD": "Comprobar configuración del complemento dud",
|
||||
"VTLANG_JSON_CHK_PASSWORD": "Comprobar configuración del complemento de contraseñas",
|
||||
|
||||
"VTLANG_NORMAL_MODE": "Arrancar en modo normal",
|
||||
"VTLANG_WIMBOOT_MODE": "Arrancar en modo wimboot",
|
||||
@@ -71,7 +71,7 @@
|
||||
"VTLANG_RET_TO_LISTVIEW": "Regresar a vista de lista",
|
||||
"VTLANG_RET_TO_TREEVIEW": "regresar a vista de árbol",
|
||||
|
||||
"VTLANG_NO_AUTOINS_SCRIPT": "Arrancar sin plantilla de auto instalación",
|
||||
"VTLANG_NO_AUTOINS_SCRIPT": "Arrancar sin plantilla de autoinstalación",
|
||||
"VTLANG_AUTOINS_USE": "Arrancar con",
|
||||
|
||||
"VTLANG_NO_PERSIST": "Arrancar sin persistencia",
|
||||
@@ -79,20 +79,20 @@
|
||||
|
||||
"VTLANG_BROWER_RETURN": "Regresar",
|
||||
|
||||
"VTLANG_ENTER_EXIT": "presiona tecla Entrar para salir",
|
||||
"VTLANG_ENTER_REBOOT": "presiona tecla Entrar para reiniciar",
|
||||
"VTLANG_ENTER_CONTINUE": "presiona tecla Entrar para continuar",
|
||||
"VTLANG_ENTER_EXIT": "Presiona la tecla Entrar para salir",
|
||||
"VTLANG_ENTER_REBOOT": "Presiona la tecla Entrar para reiniciar",
|
||||
"VTLANG_ENTER_CONTINUE": "Presiona la tecla Entrar para continuar",
|
||||
|
||||
"VTLANG_CTRL_TEMP_SET": "Ajustes de control temporales",
|
||||
"VTLANG_WIN11_BYPASS_CHECK": "Saltar comprobación de CPU/TPM/Arranque Seguro al instalar Windows 11",
|
||||
"VTLANG_WIN11_BYPASS_NRO": "Saltar requerimiento de cuenta en linea al instalar Windows 11",
|
||||
"VTLANG_WIN11_BYPASS_CHECK": "Omitir comprobación de CPU/TPM/SecureBoot al instalar Windows 11",
|
||||
"VTLANG_WIN11_BYPASS_NRO": "Omitir requisito de cuenta en línea al instalar Windows 11",
|
||||
"VTLANG_LINUX_REMOUNT": "Montar partición de Ventoy después de arrancar Linux",
|
||||
"VTLANG_SECONDARY_BOOT_MENU": "Mostrar menú de arranque secundario",
|
||||
"VTLANG_WIN_UEFI_RES_LOCK": "Lock the resolution when UEFI boot Windows/WinPE",
|
||||
"VTLANG_UEFI_RES_LOCK_NONE": "None",
|
||||
"VTLANG_UEFI_RES_LOCK_MAX": "Highest",
|
||||
"VTLANG_UEFI_RES_LOCK_1024_768": "Fixed 1024 x 768",
|
||||
"VTLANG_UEFI_RES_LOCK_BE1024_768": "At least 1024 x 768",
|
||||
"VTLANG_WIN_UEFI_RES_LOCK": "Bloquear la resolución al arrancar Windows/WinPE en modo UEFI",
|
||||
"VTLANG_UEFI_RES_LOCK_NONE": "Ninguno",
|
||||
"VTLANG_UEFI_RES_LOCK_MAX": "La más alta",
|
||||
"VTLANG_UEFI_RES_LOCK_1024_768": "Fija 1024 x 768",
|
||||
"VTLANG_UEFI_RES_LOCK_BE1024_768": "Al menos 1024 x 768",
|
||||
|
||||
|
||||
"MENU_STR_XXX": ""
|
||||
|
||||
@@ -88,11 +88,11 @@
|
||||
"VTLANG_WIN11_BYPASS_NRO": "Windows 11 설치 시 온라인 계정 요구 사항 무시",
|
||||
"VTLANG_LINUX_REMOUNT": "Linux 부팅 후 Ventoy 파티션 마운트",
|
||||
"VTLANG_SECONDARY_BOOT_MENU": "보조 부팅 메뉴 표시",
|
||||
"VTLANG_WIN_UEFI_RES_LOCK": "Lock the resolution when UEFI boot Windows/WinPE",
|
||||
"VTLANG_UEFI_RES_LOCK_NONE": "None",
|
||||
"VTLANG_UEFI_RES_LOCK_MAX": "Highest",
|
||||
"VTLANG_UEFI_RES_LOCK_1024_768": "Fixed 1024 x 768",
|
||||
"VTLANG_UEFI_RES_LOCK_BE1024_768": "At least 1024 x 768",
|
||||
"VTLANG_WIN_UEFI_RES_LOCK": "UEFI 부팅 시 Windows/WinPE 해상도 고정",
|
||||
"VTLANG_UEFI_RES_LOCK_NONE": "고정 안 함",
|
||||
"VTLANG_UEFI_RES_LOCK_MAX": "최고 해상도로 고정",
|
||||
"VTLANG_UEFI_RES_LOCK_1024_768": "1024 x 768로 고정",
|
||||
"VTLANG_UEFI_RES_LOCK_BE1024_768": "1024 x 768 이상으로 고정",
|
||||
|
||||
|
||||
"MENU_STR_XXX": ""
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"VTLANG_LANGUAGE_NAME": "Polish (Poland)",
|
||||
|
||||
"VTLANG_STR_HOTKEY_LIST": "L:Język F1:Pomoc F2:Przeglądaj F3:Widok listy F4:Localboot F5:Narzędzia F6:ExMenu",
|
||||
"VTLANG_STR_HOTKEY_TREE": "L:Język F1:Pomoc F2:Przeglądaj F3:Widok drzewa F4:Localboot F5:Narzędzia F6:ExMenu",
|
||||
"VTLANG_STR_HOTKEY_LIST": "L:Język F1:Pomoc F2:Przeglądaj F3:Widok listy F4:Localboot F5:Narzędzia F6:ExMenu",
|
||||
"VTLANG_STR_HOTKEY_TREE": "L:Język F1:Pomoc F2:Przeglądaj F3:Widok drzewa F4:Localboot F5:Narzędzia F6:ExMenu",
|
||||
"VTLANG_RETURN_PREVIOUS": "Powrót do poprzedniego menu [Esc]",
|
||||
"VTLANG_RETURN_PRV_NOESC": "Powrót do poprzedniego menu",
|
||||
|
||||
@@ -28,40 +28,40 @@
|
||||
"VTLANG_CHKSUM_SHA256_CALC_CHK": "Oblicz i sprawdź sumę sha256",
|
||||
"VTLANG_CHKSUM_SHA512_CALC_CHK": "Oblicz i sprawdź sumę sha512",
|
||||
|
||||
"VTLANG_POWER": "Zasilanie",
|
||||
"VTLANG_POWER": "Opcje zasilania",
|
||||
"VTLANG_POWER_REBOOT": "Uruchom ponownie",
|
||||
"VTLANG_POWER_HALT": "Zakończ",
|
||||
"VTLANG_POWER_BOOT_EFIFW": "Uruchom ponownie i przejdź do konfiguracji EFI",
|
||||
|
||||
"VTLANG_KEYBRD_LAYOUT": "Układy klawiatury",
|
||||
"VTLANG_HWINFO": "Informacje o sprzęcie",
|
||||
"VTLANG_HWINFO": "Informacje o konfiguracji sprzętowej",
|
||||
|
||||
"VTLANG_RESOLUTION_CFG": "Konfiguracja rozdzielczości",
|
||||
"VTLANG_SCREEN_MODE": "Tryb wyświetlania ekranu",
|
||||
"VTLANG_SCREEN_TEXT_MODE": "Wymuś tryb tekstowy",
|
||||
"VTLANG_SCREEN_GUI_MODE": "Wymuś tryb graficzny",
|
||||
|
||||
"VTLANG_THEME_SELECT": "Wybór motywu",
|
||||
"VTLANG_THEME_SELECT": "Wybierz motyw",
|
||||
|
||||
"VTLANG_UEFI_UTIL": "Narzędzia UEFI Ventoy",
|
||||
"VTLANG_UEFI_UTIL": "Narzędzia Ventoy UEFI",
|
||||
"VTLANG_UTIL_SHOW_EFI_DRV": "Pokaż sterowniki EFI",
|
||||
"VTLANG_UTIL_FIX_BLINIT_FAIL": "Napraw błąd BlinitializeLibrary systemu Windows",
|
||||
|
||||
"VTLANG_JSON_CHK_JSON": "Sprawdź konfigurację wtyczki json (ventoy.json)",
|
||||
"VTLANG_JSON_CHK_CONTROL": "Sprawdź konfigurację wtyczki globalnej kontroli",
|
||||
"VTLANG_JSON_CHK_THEME": "Sprawdź konfigurację wtyczki motywu",
|
||||
"VTLANG_JSON_CHK_AUTOINS": "Sprawdź konfigurację wtyczki automatycznej instalacji",
|
||||
"VTLANG_JSON_CHK_PERSIST": "Sprawdź konfigurację wtyczki trwałości",
|
||||
"VTLANG_JSON_CHK_MENU_ALIAS": "Sprawdź konfigurację wtyczek aliasów menu",
|
||||
"VTLANG_JSON_CHK_MENU_TIP": "Sprawdź konfigurację wtyczki podpowiedzi menu",
|
||||
"VTLANG_JSON_CHK_MENU_CLASS": "Sprawdź konfigurację wtyczki klasy menu",
|
||||
"VTLANG_JSON_CHK_INJECTION": "Sprawdź konfigurację wtyczki wstrzykiwania",
|
||||
"VTLANG_JSON_CHK_AUTO_MEMDISK": "Sprawdź automatyczną konfigurację wtyczki memdisk",
|
||||
"VTLANG_JSON_CHK_IMG_LIST": "Sprawdź konfigurację wtyczki listy obrazów",
|
||||
"VTLANG_JSON_CHK_IMG_BLIST": "Sprawdź konfigurację wtyczki czarnej listy obrazów",
|
||||
"VTLANG_JSON_CHK_CONF_REPLACE": "Sprawdź konfigurację wtyczki zastępującej konfigurację bootowania",
|
||||
"VTLANG_JSON_CHK_DUD": "Sprawdź konfigurację wtyczki dud",
|
||||
"VTLANG_JSON_CHK_PASSWORD": "Sprawdź konfigurację wtyczki hasła",
|
||||
"VTLANG_JSON_CHK_JSON": "Sprawdź konfigurację pluginu json (ventoy.json)",
|
||||
"VTLANG_JSON_CHK_CONTROL": "Sprawdź konfigurację pluginu Global Control",
|
||||
"VTLANG_JSON_CHK_THEME": "Sprawdź konfigurację pluginu Theme",
|
||||
"VTLANG_JSON_CHK_AUTOINS": "Sprawdź konfigurację pluginu Auto Installation",
|
||||
"VTLANG_JSON_CHK_PERSIST": "Sprawdź konfigurację pluginu Persistence",
|
||||
"VTLANG_JSON_CHK_MENU_ALIAS": "Sprawdź konfigurację pluginu Menu Alias",
|
||||
"VTLANG_JSON_CHK_MENU_TIP": "Sprawdź konfigurację pluginu Menu Tip",
|
||||
"VTLANG_JSON_CHK_MENU_CLASS": "Sprawdź konfigurację pluginu Menu Class",
|
||||
"VTLANG_JSON_CHK_INJECTION": "Sprawdź konfigurację pluginu Injection",
|
||||
"VTLANG_JSON_CHK_AUTO_MEMDISK": "Sprawdź konfigurację pluginu Auto Memdisk",
|
||||
"VTLANG_JSON_CHK_IMG_LIST": "Sprawdź konfigurację pluginu Image List",
|
||||
"VTLANG_JSON_CHK_IMG_BLIST": "Sprawdź konfigurację pluginu Blacklist dla obrazów",
|
||||
"VTLANG_JSON_CHK_CONF_REPLACE": "Sprawdź konfigurację pluginu Boot Conf Replace",
|
||||
"VTLANG_JSON_CHK_DUD": "Sprawdź konfigurację pluginu DUD (Driver Update Disk)",
|
||||
"VTLANG_JSON_CHK_PASSWORD": "Sprawdź konfigurację pluginu Password",
|
||||
|
||||
"VTLANG_NORMAL_MODE": "Uruchom w trybie normalnym",
|
||||
"VTLANG_WIMBOOT_MODE": "Uruchom w trybie Wimboot",
|
||||
@@ -74,7 +74,7 @@
|
||||
"VTLANG_NO_AUTOINS_SCRIPT": "Uruchom bez szablonu automatycznej instalacji",
|
||||
"VTLANG_AUTOINS_USE": "Uruchom z",
|
||||
|
||||
"VTLANG_NO_PERSIST": "Uruchom bez zachowania",
|
||||
"VTLANG_NO_PERSIST": "Uruchom bez persistence (zapisywania ustawień)",
|
||||
"VTLANG_PERSIST_USE": "Uruchom z",
|
||||
|
||||
"VTLANG_BROWER_RETURN": "Powrót",
|
||||
@@ -84,15 +84,15 @@
|
||||
"VTLANG_ENTER_CONTINUE": "naciśnij klawisz Enter, aby kontynuować",
|
||||
|
||||
"VTLANG_CTRL_TEMP_SET": "Tymczasowe ustawienia kontroli",
|
||||
"VTLANG_WIN11_BYPASS_CHECK": "Pominięcie kontroli CPU/TPM/SecureBoot podczas instalacji Windows 11",
|
||||
"VTLANG_WIN11_BYPASS_NRO": "Pominięcie wymogu posiadania konta online podczas instalacji systemu Windows 11",
|
||||
"VTLANG_LINUX_REMOUNT": "Zamontuj partycję Ventoy po starcie Linuksa",
|
||||
"VTLANG_SECONDARY_BOOT_MENU": "Pokaż dodatkowe menu startowe",
|
||||
"VTLANG_WIN_UEFI_RES_LOCK": "Lock the resolution when UEFI boot Windows/WinPE",
|
||||
"VTLANG_UEFI_RES_LOCK_NONE": "None",
|
||||
"VTLANG_UEFI_RES_LOCK_MAX": "Highest",
|
||||
"VTLANG_UEFI_RES_LOCK_1024_768": "Fixed 1024 x 768",
|
||||
"VTLANG_UEFI_RES_LOCK_BE1024_768": "At least 1024 x 768",
|
||||
"VTLANG_WIN11_BYPASS_CHECK": "Pominięcie sprawdzania CPU/TPM/SecureBoot podczas instalacji Windows 11",
|
||||
"VTLANG_WIN11_BYPASS_NRO": "Pominięcie wymogu posiadania konta Microsoft podczas instalacji Windows 11",
|
||||
"VTLANG_LINUX_REMOUNT": "Zamontuj partycję Ventoy po uruchomieniu Linuksa",
|
||||
"VTLANG_SECONDARY_BOOT_MENU": "Pokaż dodatkowe menu rozruchowe (boot menu)",
|
||||
"VTLANG_WIN_UEFI_RES_LOCK": "Zablokuj rozdzielczość podczas bootowania UEFI Windows/WinPE",
|
||||
"VTLANG_UEFI_RES_LOCK_NONE": "Brak",
|
||||
"VTLANG_UEFI_RES_LOCK_MAX": "Najwyższa",
|
||||
"VTLANG_UEFI_RES_LOCK_1024_768": "Stała 1024 x 768",
|
||||
"VTLANG_UEFI_RES_LOCK_BE1024_768": "Co najmniej 1024 x 768",
|
||||
|
||||
|
||||
"MENU_STR_XXX": ""
|
||||
|
||||
19
INSTALL/sign_with_pass.exp
Normal file
19
INSTALL/sign_with_pass.exp
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/expect -f
|
||||
|
||||
set password [lindex $argv 0]
|
||||
set key_file [lindex $argv 1]
|
||||
set cert_file [lindex $argv 2]
|
||||
set input_file [lindex $argv 3]
|
||||
set output_file [lindex $argv 4]
|
||||
|
||||
|
||||
spawn bash -c "sbsign --key '$key_file' --cert '$cert_file' --output '$output_file' '$input_file' 2>&1"
|
||||
expect -nocase -re "Enter PEM pass phrase:"
|
||||
send "$password\r"
|
||||
|
||||
|
||||
expect eof
|
||||
|
||||
|
||||
set ret [wait]
|
||||
exit [lindex $ret 3]
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,64 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$VENTOY_CERT_PASS" = "YES" ]; then
|
||||
read -s -p "Enter cert key passphrase: " KEY_PASS
|
||||
echo
|
||||
|
||||
if openssl pkey -in "$VENTOY_CERT_KEY" -passin pass:"$KEY_PASS" -out /dev/null > /dev/null 2>&1; then
|
||||
echo "Password check OK"
|
||||
else
|
||||
echo "Incorrect password"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
SBAT_VER=1
|
||||
sign_efi() {
|
||||
efi=$1
|
||||
|
||||
if [ ! -f "$efi" ]; then
|
||||
printf "### %-64s non-exist\n" "$efi"
|
||||
return
|
||||
fi
|
||||
|
||||
#Don't sign if VENTOY_CERT_KEY is not defined.
|
||||
if [ -z "$VENTOY_CERT_KEY" -o -z "$VENTOY_CERT_PEM" ]; then
|
||||
printf "### %-64s NO-CA\n" "$efi"
|
||||
return
|
||||
fi
|
||||
|
||||
if echo $efi | grep -q '\.xz$'; then
|
||||
xzcat $efi > ${efi}.unxz
|
||||
mv ${efi}.unxz ${efi}
|
||||
fi
|
||||
|
||||
sbstr=$(printf "%08x" $SBAT_VER)
|
||||
echo -en "\x8a\x06\x55\xf7\x4f\xe0\x2b\x45\x9d\x6d\x7c\x55\x96\xb3\xc0\x7d\x${sbstr:6:2}\x${sbstr:4:2}\x${sbstr:2:2}\x${sbstr:0:2}" | \
|
||||
dd bs=1 count=20 of=${efi} seek=40 conv=notrunc status=none
|
||||
|
||||
rm -f "${efi}.signed"
|
||||
if [ "$VENTOY_CERT_PASS" = "YES" ]; then
|
||||
expect -f ./sign_with_pass.exp "$KEY_PASS" "$VENTOY_CERT_KEY" "$VENTOY_CERT_PEM" "${efi}" "${efi}.signed" >/dev/null 2>&1
|
||||
else
|
||||
sbsign --key "$VENTOY_CERT_KEY" --cert "$VENTOY_CERT_PEM" --output "${efi}.signed" "${efi}" >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [ -f "${efi}.signed" ]; then
|
||||
if echo $efi | grep -q '\.xz$'; then
|
||||
xz --check=crc32 "${efi}.signed"
|
||||
mv "${efi}.signed.xz" "$efi"
|
||||
rm -f "${efi}.signed"
|
||||
else
|
||||
mv "${efi}.signed" "$efi"
|
||||
fi
|
||||
else
|
||||
echo "### %-64s failed\n" "$efi"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf "### %-64s success\n" "$efi"
|
||||
}
|
||||
|
||||
if [ "$1" = "CI" ]; then
|
||||
OPT='-dR'
|
||||
else
|
||||
@@ -132,6 +191,27 @@ cp -a ./tool/create_ventoy_iso_part_dm.sh $tmpmnt/tool/
|
||||
rm -f $tmpmnt/grub/i386-pc/*.img
|
||||
|
||||
|
||||
sign_efi $tmpmnt/EFI/BOOT/fbx64.efi
|
||||
sign_efi $tmpmnt/EFI/BOOT/fbia32.efi
|
||||
sign_efi $tmpmnt/EFI/BOOT/fbaa64.efi
|
||||
sign_efi $tmpmnt/EFI/BOOT/grubx64_real.efi
|
||||
sign_efi $tmpmnt/EFI/BOOT/grubia32_real.efi
|
||||
sign_efi $tmpmnt/ventoy/iso9660_x64.efi
|
||||
sign_efi $tmpmnt/ventoy/iso9660_ia32.efi
|
||||
sign_efi $tmpmnt/ventoy/iso9660_aa64.efi
|
||||
sign_efi $tmpmnt/ventoy/udf_x64.efi
|
||||
sign_efi $tmpmnt/ventoy/udf_ia32.efi
|
||||
sign_efi $tmpmnt/ventoy/udf_aa64.efi
|
||||
sign_efi $tmpmnt/ventoy/ventoy_x64.efi
|
||||
sign_efi $tmpmnt/ventoy/ventoy_ia32.efi
|
||||
sign_efi $tmpmnt/ventoy/ventoy_aa64.efi
|
||||
sign_efi $tmpmnt/ventoy/vtoyutil_x64.efi
|
||||
sign_efi $tmpmnt/ventoy/vtoyutil_ia32.efi
|
||||
sign_efi $tmpmnt/ventoy/vtoyutil_aa64.efi
|
||||
sign_efi $tmpmnt/ventoy/wimboot.i386.efi.xz
|
||||
sign_efi $tmpmnt/ventoy/wimboot.x86_64.xz
|
||||
|
||||
|
||||
umount $tmpmnt && rm -rf $tmpmnt
|
||||
|
||||
|
||||
@@ -271,6 +351,13 @@ cd $CurDir
|
||||
mv ../LiveCDGUI/ventoy*.iso ./
|
||||
|
||||
if [ -e ventoy-${curver}-windows.zip ] && [ -e ventoy-${curver}-linux.tar.gz ]; then
|
||||
|
||||
if [ -z "$VENTOY_CERT_KEY" -o -z "$VENTOY_CERT_PEM" ]; then
|
||||
echo "[warning]: EFI files are not signed and can only boot when Secure Boot is disabled."
|
||||
echo "[warning]: EFI files are not signed and can only boot when Secure Boot is disabled."
|
||||
echo "[warning]: EFI files are not signed and can only boot when Secure Boot is disabled."
|
||||
fi
|
||||
|
||||
echo -e "\n ============= SUCCESS =================\n"
|
||||
else
|
||||
echo -e "\n ============= FAILED =================\n"
|
||||
|
||||
@@ -616,10 +616,10 @@
|
||||
"STR_BTN_CANCEL":"Anuluj",
|
||||
"STR_PRESERVE_SPACE":"Zarezerwuj trochę miejsca na końcu dysku",
|
||||
"STR_SPACE_VAL_INVALID":"Nieprawidłowa wartość dla zarezerwowanego miejsca",
|
||||
"STR_MENU_CLEAR":"Wyczyść Ventoy",
|
||||
"STR_MENU_CLEAR":"Usuń Ventoy z urządzenia",
|
||||
"STR_CLEAR_SUCCESS":"Ventoy został pomyślnie usunięty z urządzenia.",
|
||||
"STR_CLEAR_FAILED":"Wystąpił błąd podczas usuwania Ventoy z dysku. Możesz podłączyć USB i spróbować jeszcze raz. Szczegóły w log.txt.",
|
||||
"STR_MENU_PART_STYLE":"Schemat partycji",
|
||||
"STR_MENU_PART_STYLE":"Schemat partycjonowania",
|
||||
"STR_DISK_2TB_MBR_ERROR":"Wybierz GPT dla dysku powyżej 2TB",
|
||||
"STR_SHOW_ALL_DEV":"Pokaż wszystkie urządzenia",
|
||||
"STR_PART_ALIGN_4KB":"Wyrównaj partycje do 4KB",
|
||||
@@ -633,11 +633,11 @@
|
||||
"STR_VTSI_CREATE_TIP":"Tym razem nie zapisze na urządzeniu, ale tylko wygeneruje plik VTSI#@Kontynuować?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"Pomyślnie wygenerowany plik VTSI!#@Możesz teraz użyć Rufus'a(3.15+) aby zapisać go na urządzeniu by dokończyć instalację Ventoy.",
|
||||
"STR_VTSI_CREATE_FAILED":"Wygenerowanie pliku VTSI nie powiodło się.",
|
||||
"STR_MENU_PART_RESIZE":"Nieniszcząca instalacja",
|
||||
"STR_PART_RESIZE_TIP":"Ventoy spróbuje nieniszczącej instalacji jeśli jest możliwa. #@Kontynuować?",
|
||||
"STR_PART_RESIZE_SUCCESS":"Gratulacje!#@Nieniszcząca instalacja Ventoy zakończyła się pomyślnie.",
|
||||
"STR_PART_RESIZE_FAILED":"Nieniszcząca instalacja nie powiodła się, sprawdź log.txt po szczegóły.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Nieniszcząca instalacja Ventoy została zatrzymana, ponieważ niektóre wymagania nie zostały spełnione. Sprawdź log.txt po szczegóły.",
|
||||
"STR_MENU_PART_RESIZE":"Instalacja bez utraty danych",
|
||||
"STR_PART_RESIZE_TIP":"Jeśli to możliwe, Ventoy spróbuje przeprowadzić instalację bez utraty danych. #@Kontynuować?",
|
||||
"STR_PART_RESIZE_SUCCESS":"Gratulacje! Instalacja bez utraty danych #@Ventoy zakończona pomyślnie.",
|
||||
"STR_PART_RESIZE_FAILED":"Instalacja bez utraty danych zakończyła się niepowodzeniem. Szczegóły znajdziesz w pliku log.txt.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Instalacja bez utraty danych Ventoy została przerwana, ponieważ nie można spełnić niektórych warunków. Szczegóły znajdziesz w pliku log.txt.",
|
||||
"STR_INSTALL_YES_TIP1":"Ostrzeżenie: Dane zostaną utracone!",
|
||||
"STR_INSTALL_YES_TIP2":"Wpisz YES w poniższym polu tekstowym, aby potwierdzić, że naprawdę chcesz przeprowadzić nową instalację zamiast aktualizacji.",
|
||||
"STR_PART_VENTOY_FS":"System plików dla partycji Ventoy",
|
||||
@@ -1172,13 +1172,13 @@
|
||||
"name":"Spanish (Latinoamérica)",
|
||||
"FontFamily":"Courier New",
|
||||
"FontSize":16,
|
||||
"Author":"MELERIX",
|
||||
"Author":"MELERIX, independent-arg",
|
||||
|
||||
"STR_ERROR":"Error",
|
||||
"STR_WARNING":"Advertencia",
|
||||
"STR_INFO":"Información",
|
||||
"STR_INCORRECT_DIR":"¡Por favor, ejecuta bajo el directorio correcto!",
|
||||
"STR_INCORRECT_TREE_DIR":"No me ejecutes aquí, por favor descarga el paquete de instalación lanzado, y ejecútalo allí.",
|
||||
"STR_INCORRECT_DIR":"¡Por favor, ejecuta el programa bajo el directorio correcto!",
|
||||
"STR_INCORRECT_TREE_DIR":"No me ejecutes aquí. Por favor descarga el paquete de instalación oficial y ejecútalo desde allí.",
|
||||
"STR_DEVICE":"Dispositivo",
|
||||
"STR_LOCAL_VER":"Ventoy En Paquete",
|
||||
"STR_DISK_VER":"Ventoy En Dispositivo",
|
||||
@@ -1189,47 +1189,47 @@
|
||||
"STR_INSTALL_TIP":"El dispositivo será formateado y todos los datos se perderán.#@¿Continuar?",
|
||||
"STR_INSTALL_TIP2":"El dispositivo será formateado y todos los datos se perderán.#@¿Continuar? (Doble Comprobación)",
|
||||
"STR_INSTALL_SUCCESS":"¡Felicitaciones!#@Ventoy ha sido instalado exitosamente en el dispositivo.",
|
||||
"STR_INSTALL_FAILED":"Ocurrió un error durante la instalación. Puedes reinsertar el dispositivo USB e intentar de nuevo. Comprueba log.txt para detalles. Si siempre falla, consulta las PF en el sitio web oficial.",
|
||||
"STR_INSTALL_FAILED":"Ocurrió un error durante la instalación. Puedes reinsertar el dispositivo USB e intentar de nuevo. Comprueba log.txt para más detalles. Si siempre falla, consulta las preguntas frecuentes (FAQ) en el sitio web oficial.",
|
||||
"STR_UPDATE_SUCCESS":"¡Felicitaciones!#@Ventoy ha sido actualizado exitosamente en el dispositivo.",
|
||||
"STR_UPDATE_FAILED":"Ocurrió un error durante la actualización. Puedes reinsertar el dispositivo USB e intentar de nuevo. Comprueba log.txt para detalles. Si siempre falla, consulta las PF en el sitio web oficial.",
|
||||
"STR_WAIT_PROCESS":"Un hilo está ejecutándose, por favor espera...",
|
||||
"STR_UPDATE_FAILED":"Ocurrió un error durante la actualización. Puedes reinsertar el dispositivo USB e intentar de nuevo. Comprueba log.txt para más detalles. Si siempre falla, consulta las preguntas frecuentes (FAQ) en el sitio web oficial.",
|
||||
"STR_WAIT_PROCESS":"Un hilo del sistema está ejecutándose, por favor espera...",
|
||||
"STR_MENU_OPTION":"Opción",
|
||||
"STR_MENU_SECURE_BOOT":"Soporte De Arranque Seguro",
|
||||
"STR_MENU_PART_CFG":"Configuración De Partición",
|
||||
"STR_MENU_SECURE_BOOT":"Soporte de arranque seguro",
|
||||
"STR_MENU_PART_CFG":"Configuración de partición",
|
||||
"STR_BTN_OK":"Aceptar",
|
||||
"STR_BTN_CANCEL":"Cancelar",
|
||||
"STR_PRESERVE_SPACE":"Preservar algo de espacio al final del dispositivo",
|
||||
"STR_SPACE_VAL_INVALID":"Valor inválido para espacio reservado",
|
||||
"STR_SPACE_VAL_INVALID":"Valor inválido para el espacio reservado",
|
||||
"STR_MENU_CLEAR":"Limpiar Ventoy",
|
||||
"STR_CLEAR_SUCCESS":"Ventoy ha sido removido exitosamente desde el dispositivo.",
|
||||
"STR_CLEAR_FAILED":"Ocurrió un error al remover Ventoy del dispositivo. Puedes reinsertar el dispositivo USB e intentar de nuevo. Comprueba log.txt para detalles.",
|
||||
"STR_MENU_PART_STYLE":"Estilo De Partición",
|
||||
"STR_DISK_2TB_MBR_ERROR":"Por favor selecciona GPT para dispositivos sobre 2TB",
|
||||
"STR_SHOW_ALL_DEV":"Mostrar Todos Los Dispositivos",
|
||||
"STR_PART_ALIGN_4KB":"Alinear particiones con 4KB",
|
||||
"STR_CLEAR_SUCCESS":"Ventoy ha sido eliminado exitosamente del dispositivo.",
|
||||
"STR_CLEAR_FAILED":"Ocurrió un error al eliminar Ventoy del dispositivo. Puedes reinsertar el dispositivo USB e intentar de nuevo. Comprueba log.txt para más detalles.",
|
||||
"STR_MENU_PART_STYLE":"Estilo de partición",
|
||||
"STR_DISK_2TB_MBR_ERROR":"Por favor selecciona GPT para dispositivos de más de 2TB",
|
||||
"STR_SHOW_ALL_DEV":"Mostrar todos los dispositivos",
|
||||
"STR_PART_ALIGN_4KB":"Alinear particiones a 4KB",
|
||||
"STR_WEB_COMMUNICATION_ERR":"Error de comunicación:",
|
||||
"STR_WEB_REMOTE_ABNORMAL":"Error de comunicación: anormal remoto",
|
||||
"STR_WEB_REQUEST_TIMEOUT":"Error de comunicación: Tiempo de espera agotado",
|
||||
"STR_WEB_SERVICE_UNAVAILABLE":"Error de comunicación: Servicio No Disponible",
|
||||
"STR_WEB_REMOTE_ABNORMAL":"Error de comunicación: anomalía remoto",
|
||||
"STR_WEB_REQUEST_TIMEOUT":"Error de comunicación: tiempo de espera agotado",
|
||||
"STR_WEB_SERVICE_UNAVAILABLE":"Error de comunicación: servicio no disponible",
|
||||
"STR_WEB_TOKEN_MISMATCH":" Estado del daemon actualizado, por favor reintenta más tarde.",
|
||||
"STR_WEB_SERVICE_BUSY":" El servicio está ocupado, por favor reintenta más tarde.",
|
||||
"STR_MENU_VTSI_CREATE":"Generar Archivo VTSI",
|
||||
"STR_VTSI_CREATE_TIP":"Esta vez no se escribirá al dispositivo, pero solo generará un archivo VTSI#@¿Continuar?",
|
||||
"STR_MENU_VTSI_CREATE":"Generar archivo VTSI",
|
||||
"STR_VTSI_CREATE_TIP":"Esta acción no escribirá en el dispositivo, sólo generará un archivo VTSI.#@¿Continuar?",
|
||||
"STR_VTSI_CREATE_SUCCESS":"¡Archivo VTSI creado exitosamente!#@Puedes usar Rufus(3.15+) para escribirlo al dispositivo a fin de completar la instalación de Ventoy.",
|
||||
"STR_VTSI_CREATE_FAILED":"Fallo en el archivo VTSI creado.",
|
||||
"STR_VTSI_CREATE_FAILED":"Error al crear el archivo VTSI.",
|
||||
"STR_MENU_PART_RESIZE":"Instalación no destructiva",
|
||||
"STR_PART_RESIZE_TIP":"Ventoy intentará una instalación no destructiva si es posible. #@¿Continuar?",
|
||||
"STR_PART_RESIZE_SUCCESS":"¡Felicitaciones!#@La instalación no destructiva de Ventoy a finalizado exitosamente.",
|
||||
"STR_PART_RESIZE_FAILED":"Instalación no destructiva fallida, Comprueba log.txt para detalles.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Instalación no destructiva de Ventoy detenida porque algunas condiciones no se pueden cumplir. Comprueba log.txt para detalles.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Instalación no destructiva de Ventoy detenida porque algunas condiciones no se pueden cumplir. Comprueba log.txt para más detalles.",
|
||||
"STR_INSTALL_YES_TIP1":"Advertencia: ¡Los datos se perderán!",
|
||||
"STR_INSTALL_YES_TIP2":"Por favor ingresa YES en el cuadro de texto a continuación para confirmar que realmente quieres realizar una instalación nueva en vez de actualizar.",
|
||||
"STR_PART_VENTOY_FS":"Sistema de archivos para partición de Ventoy",
|
||||
"STR_PART_FS":"Sistema de archivos",
|
||||
"STR_PART_CLUSTER":"Tamaño de cluster",
|
||||
"STR_PART_CLUSTER":"Tamaño del clúster",
|
||||
"STR_PART_CLUSTER_DEFAULT":"Valor predeterminado del sistema",
|
||||
"STR_DONATE":"Donar",
|
||||
"STR_4KN_UNSUPPORTED":"Actualmente Ventoy no soporta dispositivos nativos 4K.",
|
||||
"STR_4KN_UNSUPPORTED":"Actualmente Ventoy no es compatible con dispositivos nativos 4K.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
@@ -3043,14 +3043,14 @@
|
||||
"STR_PART_RESIZE_SUCCESS":"Onnittelut!#@Ventoyn ei-tuhoisa asennus saapui päätökseen onnistuneesti.",
|
||||
"STR_PART_RESIZE_FAILED":"Ei-tuhoisa asennusmuoto epäonnistui, tarkista log.txt nähdäksesi yksityiskohtaiset tiedot.",
|
||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoyn ei-tuhoisa asennus pysähtyi koska jotkut ehdot eivät täyttyneet. Tarkista log.txt nähdäksesi yksityiskohdat.",
|
||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
||||
"STR_PART_FS":"File System",
|
||||
"STR_PART_CLUSTER":"Cluster Size",
|
||||
"STR_PART_CLUSTER_DEFAULT":"System Default Value",
|
||||
"STR_INSTALL_YES_TIP1":"Varoitus: Data menetetään!",
|
||||
"STR_INSTALL_YES_TIP2":"Kirjoita YES alla olevaan tekstikenttään vahvistaaksesi että haluat tehdä uuden asennuksen päivityksen sijaan.",
|
||||
"STR_PART_VENTOY_FS":"Ventoy -osion tiedostojärjestelmä",
|
||||
"STR_PART_FS":"Tiedostojärjestelmä",
|
||||
"STR_PART_CLUSTER":"Klusterin koko",
|
||||
"STR_PART_CLUSTER_DEFAULT":"Järjestelmän oletusarvo",
|
||||
"STR_DONATE":"Lahjoittaa",
|
||||
"STR_4KN_UNSUPPORTED":"Currently Ventoy does not support 4K native devices.",
|
||||
"STR_4KN_UNSUPPORTED":"Tällä hetkellä Ventoy ei tue 4K laitteita.",
|
||||
|
||||
"STRXXX":""
|
||||
},
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,12 +7,12 @@
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
@@ -37,7 +37,7 @@ typedef enum bios_mode
|
||||
bios_ia32,
|
||||
bios_aa64,
|
||||
bios_mips,
|
||||
|
||||
|
||||
bios_max
|
||||
}bios_mode;
|
||||
|
||||
@@ -81,6 +81,8 @@ typedef struct data_control
|
||||
int linux_remount;
|
||||
int secondary_menu;
|
||||
int password_asterisk;
|
||||
int uefi_res_lock;
|
||||
int uefi_sb_policy;
|
||||
char default_search_root[MAX_PATH];
|
||||
char default_image[MAX_PATH];
|
||||
char default_kbd_layout[32];
|
||||
@@ -110,7 +112,7 @@ typedef struct data_theme
|
||||
char ventoy_top[32];
|
||||
char ventoy_color[32];
|
||||
char serial_param[256];
|
||||
|
||||
|
||||
path_node *fontslist;
|
||||
}data_theme;
|
||||
|
||||
@@ -411,6 +413,9 @@ else\
|
||||
#define CONTROL_PARSE_INT_DEF_1(node, val) \
|
||||
if (node->unData.pcStrVal[0] == '0') val = 0
|
||||
|
||||
#define CONTROL_PARSE_INT_DEF_3(node, val) \
|
||||
if (node->unData.pcStrVal[0] >= '0' && node->unData.pcStrVal[0] < '3') val = node->unData.pcStrVal[0] - '0'
|
||||
|
||||
#define VTOY_JSON_INT(key, val) vtoy_json_get_int(json, key, &val)
|
||||
#define VTOY_JSON_STR(key, buf) vtoy_json_get_string(json, key, sizeof(buf), buf)
|
||||
#define VTOY_JSON_STR_EX(key) vtoy_json_get_string_ex(json, key)
|
||||
|
||||
43
Plugson/vs/VentoyPlugson/build.bat
Normal file
43
Plugson/vs/VentoyPlugson/build.bat
Normal file
@@ -0,0 +1,43 @@
|
||||
@echo off
|
||||
echo ==============================================
|
||||
echo VS Build Script
|
||||
echo ==============================================
|
||||
|
||||
set "VS_DEV_CMD=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat"
|
||||
set "SLN_FILE=VentoyPlugson.sln"
|
||||
|
||||
|
||||
echo Init VS environment ...
|
||||
call "%VS_DEV_CMD%" -no_logo
|
||||
if %errorlevel% neq 0 (
|
||||
echo Error: VS environment init failed, please check.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: ============== Build Release Win32 (x86) ==============
|
||||
echo.
|
||||
echo Build: Release Win32
|
||||
MSBuild "%SLN_FILE%" /t:Build /p:Configuration=Release;Platform=Win32 /m
|
||||
if %errorlevel% neq 0 (
|
||||
echo Build Release Win32 Failed!
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
|
||||
:: ============== Build Release x64 ==============
|
||||
echo.
|
||||
echo Build: Release x64
|
||||
MSBuild "%SLN_FILE%" /t:Build /p:Configuration=Release;Platform=x64 /m
|
||||
if %errorlevel% neq 0 (
|
||||
echo Build Release x64 Failed!
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo.
|
||||
echo ==============================================
|
||||
echo Build Success
|
||||
echo ==============================================
|
||||
pause
|
||||
@@ -1 +1 @@
|
||||
20231014 18:52:12
|
||||
20260625 19:36:29
|
||||
@@ -1 +1 @@
|
||||
ar_ARbn_BNcs_CZde_DEel_GRen_USes_ESfr_FRhi_HIhr_HRhu_HUid_IDit_ITja_JPka_GEko_KRpl_PLpt_BRpt_PTru_RUsr_RSta_INtr_TRuk_UAzh_CNzh_TW
|
||||
ar_ARbn_BNcs_CZde_DEel_GRen_USes_ESfa_IRfr_FRhi_HIhr_HRhu_HUid_IDit_ITja_JPka_GEko_KRlg_UGpl_PLpt_BRpt_PTru_RUsl_SIsr_RSta_INtr_TRuk_UAvi_VNzh_CNzh_TW
|
||||
@@ -2,10 +2,10 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<!-- HTTP 1.1 -->
|
||||
<meta http-equiv="pragma" content="no-cache">
|
||||
<!-- HTTP 1.0 -->
|
||||
<meta http-equiv="cache-control" content="no-cache">
|
||||
<!-- HTTP 1.1 -->
|
||||
<meta http-equiv="pragma" content="no-cache">
|
||||
<!-- HTTP 1.0 -->
|
||||
<meta http-equiv="cache-control" content="no-cache">
|
||||
<title>Ventoy Plugson</title>
|
||||
<!-- Tell the browser to be responsive to screen width -->
|
||||
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
|
||||
@@ -22,7 +22,7 @@
|
||||
<link rel="stylesheet" href="static/AdminLTE/css/skins/skin-blue.min.css">
|
||||
<link rel="stylesheet" href="static/datatables/dataTables.bootstrap.css">
|
||||
<link rel="stylesheet" href="static/css/vtoy.css">
|
||||
|
||||
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
@@ -39,6 +39,9 @@
|
||||
.treeview-menu a {
|
||||
margin-left: 20px;
|
||||
}
|
||||
.label-rt {
|
||||
margin-left: 20px !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
@@ -48,13 +51,13 @@
|
||||
<header class="main-header" style="position: fixed; right: 0; left: 0;">
|
||||
<!-- Logo -->
|
||||
<a href="." class="logo">
|
||||
<!-- logo for regular state and mobile devices -->
|
||||
<!-- logo for regular state and mobile devices -->
|
||||
<span class="logo-lg" > <img src="/static/img/logo_32.png" > Ventoy Plugson</span>
|
||||
</a>
|
||||
<!-- Header Navbar: style can be found in header.less -->
|
||||
<nav class="navbar navbar-static-top" role="navigation">
|
||||
<!-- Navbar Right Menu -->
|
||||
|
||||
|
||||
<div class="navbar-custom-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="dropdown user user-menu">
|
||||
@@ -62,22 +65,22 @@
|
||||
<span class="fa fa-file-code-o"></span>
|
||||
<span id="id_span_preview" class="hidden-xs">Preview</span>
|
||||
<span class="hidden-xs"> </span>
|
||||
</a>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="dropdown user user-menu">
|
||||
<a href="javascript:void(0)" id="id_a_language">
|
||||
<span class="fa fa-language"></span>
|
||||
<span id="id_span_language" class="hidden-xs">English</span>
|
||||
<span class="hidden-xs"> </span>
|
||||
</a>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="dropdown user user-menu">
|
||||
<a id="id_top_donation" href="#plugson_donation" data-href="#plugson_donation">
|
||||
<span class="fa fa-paypal"></span>
|
||||
<span id="id_span_donation" class="hidden-xs">捐助</span>
|
||||
</a>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<!-- User Account: style can be found in dropdown.less -->
|
||||
@@ -85,12 +88,12 @@
|
||||
<a href="https://www.ventoy.net" target="_blank" >
|
||||
<span class="fa fa-link"></span>
|
||||
<span class="hidden-xs">Ventoy</span>
|
||||
</a>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</nav>
|
||||
</header>
|
||||
<!-- Left side column. contains the logo and sidebar -->
|
||||
@@ -108,7 +111,7 @@
|
||||
<a href="#plugson_control" data-href="#plugson_control">
|
||||
<i class="fa fa-wrench"></i> <span id="id_span_menu_control">全局控制插件</span>
|
||||
</a>
|
||||
</li>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#plugson_theme" data-href="#plugson_theme">
|
||||
<i class="fa fa-file-image-o"></i> <span id="id_span_menu_theme">主题插件</span>
|
||||
@@ -154,13 +157,13 @@
|
||||
<i class="glyphicon glyphicon-lock"></i> <span id="id_span_menu_password">密码插件</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<a href="#plugson_image_list" data-href="#plugson_image_list">
|
||||
<i class="fa fa-list-alt"></i> <span id="id_span_menu_imagelist">文件列表插件</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
<li>
|
||||
<a href="#plugson_auto_memdisk" data-href="#plugson_auto_memdisk">
|
||||
<i class="fa fa-floppy-o"></i> <span id="id_span_menu_auto_memdisk">自动 Memdisk 插件</span>
|
||||
@@ -196,13 +199,13 @@
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="PwdPath" name="PwdPath" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" id="id_note_pwdfile_cn">
|
||||
<div class="col-sm-3"></div>
|
||||
<div class="col-sm-9">
|
||||
请输入文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||
请输入文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||
<span id="id_span_pwdfile_tip1" style="color:red;"></span><br/>
|
||||
<span id="id_span_pwdfile_tip2" style="color:red;"></span>
|
||||
</div>
|
||||
@@ -210,7 +213,7 @@
|
||||
<div class="form-group" id="id_note_pwdfile_en">
|
||||
<div class="col-sm-3"></div>
|
||||
<div class="col-sm-9">
|
||||
Please input the full absolute file path. For example:<br/>
|
||||
Please input the full absolute file path. For example:<br/>
|
||||
<span id="id_span_pwdfile_tip1" style="color:red;"></span><br/>
|
||||
<span id="id_span_pwdfile_tip2" style="color:red;"></span><br/>
|
||||
</div>
|
||||
@@ -284,22 +287,22 @@
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="FilePath" name="FilePath" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" id="id_note_setfile_cn">
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-9">
|
||||
请输入文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||
请输入文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||
<span id="id_span_filepath_tip1" style="color:red;"></span><br/>
|
||||
<span id="id_span_filepath_tip2" style="color:red;"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" id="id_note_setfile_en">
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-9">
|
||||
Please input the full absolute file path. For example:<br/>
|
||||
Please input the full absolute file path. For example:<br/>
|
||||
<span id="id_span_filepath_tip1" style="color:red;"></span><br/>
|
||||
<span id="id_span_filepath_tip2" style="color:red;"></span><br/>
|
||||
</div>
|
||||
@@ -317,18 +320,18 @@
|
||||
<div class="form-group" id="id_note_tip3_cn">
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-9">
|
||||
请输入对应文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||
请输入对应文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||
<span id="id_span_filepath_tip3" style="color:red;"></span><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="id_note_tip3_en">
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-9">
|
||||
Please input the full absolute file path. For example:<br/>
|
||||
Please input the full absolute file path. For example:<br/>
|
||||
<span id="id_span_filepath_tip3" style="color:red;"></span><br/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="SetFileForm_lang_3" type="submit" class="btn btn-primary btn-flat">确定</button>
|
||||
@@ -357,22 +360,22 @@
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="FileFilePath1" name="FileFilePath1" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" id="id_note_filefile_cn">
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-9">
|
||||
请输入文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||
请输入文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||
<span id="id_span_filefile_tip1" style="color:red;"></span><br/>
|
||||
<span id="id_span_filefile_tip2" style="color:red;"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" id="id_note_filefile_en">
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-9">
|
||||
Please input the full absolute file path. For example:<br/>
|
||||
Please input the full absolute file path. For example:<br/>
|
||||
<span id="id_span_filefile_tip1" style="color:red;"></span><br/>
|
||||
<span id="id_span_filefile_tip2" style="color:red;"></span><br/>
|
||||
</div>
|
||||
@@ -390,18 +393,18 @@
|
||||
<div class="form-group" id="id_note_filefile_cn">
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-9">
|
||||
请输入对应文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||
请输入对应文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||
<span id="id_span_filefile_tip3" style="color:red;"></span><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="id_note_filefile_en">
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-9">
|
||||
Please input the full absolute file path. For example:<br/>
|
||||
Please input the full absolute file path. For example:<br/>
|
||||
<span id="id_span_filefile_tip3" style="color:red;"></span><br/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="SetFileFileForm_ok" type="submit" class="btn btn-primary btn-flat">确定</button>
|
||||
@@ -430,21 +433,21 @@
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="DirFilePath1" name="DirFilePath1" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" id="id_note_dirfile_cn">
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-9">
|
||||
请输入对应目录在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||
请输入对应目录在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||
<span id="id_span_dirfile_tip1" style="color:red;"></span><br/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" id="id_note_dirfile_en">
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-9">
|
||||
Please input the full absolute directory path. For example:<br/>
|
||||
Please input the full absolute directory path. For example:<br/>
|
||||
<span id="id_span_dirfile_tip1" style="color:red;"></span><br/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -461,18 +464,18 @@
|
||||
<div class="form-group" id="id_note_dirfile_cn">
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-9">
|
||||
请输入对应文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||
请输入对应文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||
<span id="id_span_dirfile_tip2" style="color:red;"></span><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="id_note_dirfile_en">
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-9">
|
||||
Please input the full absolute file path. For example:<br/>
|
||||
Please input the full absolute file path. For example:<br/>
|
||||
<span id="id_span_dirfile_tip2" style="color:red;"></span><br/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="SetDirFileForm_ok" type="submit" class="btn btn-primary btn-flat">确定</button>
|
||||
@@ -502,22 +505,22 @@
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="IsoPath" name="IsoPath" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" id="id_note_conf_cn">
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-9">
|
||||
请输入文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||
请输入文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||
<span id="id_span_conf_tip1" style="color:red;"></span><br/>
|
||||
<span id="id_span_conf_tip2" style="color:red;"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" id="id_note_conf_en">
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-9">
|
||||
Please input the full absolute file path. For example:<br/>
|
||||
Please input the full absolute file path. For example:<br/>
|
||||
<span id="id_span_conf_tip1" style="color:red;"></span><br/>
|
||||
<span id="id_span_conf_tip2" style="color:red;"></span>
|
||||
</div>
|
||||
@@ -529,7 +532,7 @@
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="OrgPath" name="OrgPath" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="id_note_conf_cn">
|
||||
<div class="col-sm-2"></div>
|
||||
@@ -552,19 +555,19 @@
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="NewPath" name="NewPath" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="id_note_conf_cn">
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-9">
|
||||
新文件在当前系统中的全路径(注意是完整的绝对路径)例如:<br/>
|
||||
新文件在当前系统中的全路径(注意是完整的绝对路径)例如:<br/>
|
||||
<span id="id_span_conf_tip3" style="color:red;"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="id_note_conf_en">
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-9">
|
||||
Please input the full absolute file path. For example:<br/>
|
||||
Please input the full absolute file path. For example:<br/>
|
||||
<span id="id_span_conf_tip3" style="color:red;"></span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -579,7 +582,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="modal" id="SetDirModal">
|
||||
<div class="modal-dialog" style="width: 800px;">
|
||||
<div class="modal-content">
|
||||
@@ -597,9 +600,9 @@
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="DirPath" name="DirPath" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" id="id_note_setfile_cn">
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-9">
|
||||
@@ -607,7 +610,7 @@
|
||||
<span id="id_span_dirpath_tip" style="color:red;"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" id="id_note_setfile_en">
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-9">
|
||||
@@ -615,27 +618,27 @@
|
||||
<span id="id_span_dirpath_tip" style="color:red;"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" id="id_div_dir_extra">
|
||||
<div class="col-sm-2">
|
||||
<label id="SetDirForm_extra" class="control-label">xx</label>
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="DirExtra" name="DirExtra" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" id="id_note_tip3_cn">
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-9">
|
||||
请输入对应文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||
请输入对应文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||
<span id="id_span_dirpath_tip3" style="color:red;"></span><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" id="id_note_tip3_en">
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-9">
|
||||
Please input the full absolute file path. For example:<br/>
|
||||
Please input the full absolute file path. For example:<br/>
|
||||
<span id="id_span_dirpath_tip3" style="color:red;"></span><br/>
|
||||
</div>
|
||||
</div>
|
||||
@@ -676,7 +679,7 @@
|
||||
</div>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" id="SetKeyValue" name="SetKeyValue" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
@@ -718,12 +721,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="modal" id="JsonPreviewModal">
|
||||
<div class="modal-dialog" style="width: 80%;">
|
||||
<div class="modal-content">
|
||||
<form id="JsonPeviewForm" class="form-horizontal">
|
||||
<form id="JsonPeviewForm" class="form-horizontal">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
@@ -732,7 +735,7 @@
|
||||
<b id="JsonPreviewForm_lang_1">JSON</b>
|
||||
<button type="button" id="id_btn_json_copy" class="btn btn-primary"><span class="fa fa-copy"> </span><span id="id_span_copy">Copy</span></button>
|
||||
</h4>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<textarea id="pre_json_preview" class="form-control" rows="30" style="font-family:Menlo,Monaco,Consolas,'Courier New',monospace" spellcheck="false"></textarea>
|
||||
@@ -742,7 +745,7 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -757,7 +760,7 @@
|
||||
|
||||
<footer class="main-footer">
|
||||
<div class="pull-right hidden-xs">
|
||||
<b id="plugson_build_date">20231014 18:52:12</b>
|
||||
<b id="plugson_build_date">20260625 19:36:29</b>
|
||||
</div>
|
||||
<strong><a href="https://www.ventoy.net" target="_blank">https://www.ventoy.net</a></strong>
|
||||
</footer>
|
||||
@@ -771,16 +774,16 @@
|
||||
</div>
|
||||
<!-- ./wrapper -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- jQuery 2.1.4 -->
|
||||
<script src="/static/js/jQuery-2.1.4.min.js"></script>
|
||||
<!-- jquery validate -->
|
||||
<script src="/static/js/jquery.validate.min.js"></script>
|
||||
<script src="/static/js/jquery.validate.vtoymethods.js?v=253"></script>
|
||||
<script src="/static/js/jquery.validate.min.js"></script>
|
||||
<script src="/static/js/jquery.validate.vtoymethods.js?v=331"></script>
|
||||
|
||||
<script src="/static/js/jquery.vtoy.alert.js?v=253"></script>
|
||||
<script src="/static/js/vtoy.js?v=253"></script>
|
||||
<script src="/static/js/jquery.vtoy.alert.js?v=331"></script>
|
||||
<script src="/static/js/vtoy.js?v=331"></script>
|
||||
<script src="/static/js/md5.min.js"></script>
|
||||
|
||||
<!-- Bootstrap 3.3.5 -->
|
||||
@@ -788,10 +791,10 @@
|
||||
<!-- AdminLTE App -->
|
||||
<script src="/static/AdminLTE/js/app.min.js"></script>
|
||||
<script src="/static/AdminLTE/plugins/chartjs/Chart.min.js"></script>
|
||||
|
||||
|
||||
<script src="/static/datatables/jquery.dataTables.min.js"></script>
|
||||
<script src="/static/datatables/dataTables.bootstrap.min.js"></script>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function VtoyJsonCopyClick() {
|
||||
@@ -818,15 +821,15 @@
|
||||
}, function(data) {
|
||||
$('#JsonPeviewForm #JsonPreviewForm_lang_1').text(g_vtoy_cur_language.STR_JSON_PREVIEW);
|
||||
$('#JsonPeviewForm #PrewForm_lang_2').text(g_vtoy_cur_language.STR_BTN_OK);
|
||||
|
||||
$('#pre_json_preview').text(VtoyUTF16HexToAscii(data.json));
|
||||
|
||||
$('#pre_json_preview').text(VtoyUTF16HexToAscii(data.json));
|
||||
$("#JsonPreviewModal").modal();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function VtoyLanguageClick() {
|
||||
var defaultPage = window.location.hash;
|
||||
|
||||
|
||||
if (g_current_language === 'cn') {
|
||||
g_current_language = 'en';
|
||||
} else {
|
||||
@@ -851,14 +854,14 @@
|
||||
m_syntax_error = data.syntax_error;
|
||||
m_invalid_config = data.invalid_config;
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
$('#id_btn_json_copy').click(VtoyJsonCopyClick);
|
||||
$('#id_a_preview').click(VtoyPreviewClick);
|
||||
$('#id_a_language').click(VtoyLanguageClick);
|
||||
|
||||
|
||||
$("#plugson-menu a").click(function() {
|
||||
var href = $(this).data("href");
|
||||
if (href && href !== '#') {
|
||||
@@ -872,7 +875,7 @@
|
||||
loadContent(href.substring(1));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
(function openDefaultPage() {
|
||||
var defaultPage = window.location.hash;
|
||||
if (defaultPage) {
|
||||
@@ -881,14 +884,14 @@
|
||||
defaultPage = defaultPage || 'plugson_main';
|
||||
loadContent(defaultPage);
|
||||
})();
|
||||
|
||||
|
||||
|
||||
(function ventoy_handshake() {
|
||||
callVtoyCatchErr({
|
||||
method : 'handshake'
|
||||
},
|
||||
function(data) {
|
||||
|
||||
},
|
||||
function(data) {
|
||||
|
||||
if (m_syntax_error === 1 && typeof(Modal) === 'object') {
|
||||
var title = g_current_language == 'en' ? g_vtoy_cur_language_en.STR_INFO : g_vtoy_cur_language_cn.STR_INFO;
|
||||
var msg = g_current_language == 'en' ? g_vtoy_cur_language_en.STR_SYNTAX_ERROR_TIP : g_vtoy_cur_language_cn.STR_SYNTAX_ERROR_TIP;
|
||||
@@ -896,7 +899,7 @@
|
||||
});
|
||||
m_syntax_error = 0;
|
||||
}
|
||||
|
||||
|
||||
if (m_invalid_config === 1 && typeof(Modal) === 'object') {
|
||||
var title = g_current_language == 'en' ? g_vtoy_cur_language_en.STR_INFO : g_vtoy_cur_language_cn.STR_INFO;
|
||||
var msg = g_current_language == 'en' ? g_vtoy_cur_language_en.STR_INVALID_CONFIG_TIP : g_vtoy_cur_language_cn.STR_INVALID_CONFIG_TIP;
|
||||
@@ -928,7 +931,7 @@
|
||||
}
|
||||
else if(undefined === errorThrown.length)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
else if('' == errorThrown.trim())
|
||||
{
|
||||
|
||||
@@ -1 +1 @@
|
||||
ar_ARbn_BNcs_CZde_DEel_GRen_USes_ESfr_FRhi_HIhr_HRhu_HUid_IDit_ITja_JPka_GEko_KRpl_PLpt_BRpt_PTru_RUsl_sisr_RSta_INtr_TRuk_UAzh_CNzh_TW
|
||||
ar_ARbn_BNcs_CZde_DEel_GRen_USes_ESfa_IRfr_FRhi_HIhr_HRhu_HUid_IDit_ITja_JPka_GEko_KRlg_UGpl_PLpt_BRpt_PTru_RUsl_SIsr_RSta_INtr_TRuk_UAvi_VNzh_CNzh_TW
|
||||
@@ -4,7 +4,7 @@
|
||||
<i class="fa fa-wrench"> </i>
|
||||
<h1 class="box-title" style="font-weight:bold;" id="id_h1_page_title">全局控制插件</h1>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-sm-2" style="padding-top:2px;">
|
||||
<button id="id_btn_collapse" class="btn btn-sm btn-primary"><i style="font-size: 14px;" class="fa fa-minus"></i></button>
|
||||
<button id="id_btn_expand" class="btn btn-sm btn-primary"><i style="font-size: 14px;" class="fa fa-plus"></i></button>
|
||||
@@ -19,7 +19,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<legend></legend>
|
||||
|
||||
|
||||
<div class="box-body">
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs" id="id_tab_control">
|
||||
@@ -47,7 +47,7 @@
|
||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||
<td>
|
||||
<select id="id_ctrl_sel_menu_lang" name="name_ctrl_sel_menu_lang" class="form-control">
|
||||
|
||||
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -60,7 +60,7 @@
|
||||
<tr id="tr_title_desc_en">
|
||||
<td class="td_ctrl_col">Option Description</td>
|
||||
<td>
|
||||
Ventoy menu language. Default is "en_US",
|
||||
Ventoy menu language. Default is "en_US",
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -68,7 +68,7 @@
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="box box-primary box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_DEFAULT_SEARCH_ROOT
|
||||
@@ -78,7 +78,7 @@
|
||||
</div><!-- /.box-tools -->
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<tr style="font-weight:bold;">
|
||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||
<td>
|
||||
@@ -108,8 +108,8 @@
|
||||
<tr id="tr_title_desc_en">
|
||||
<td class="td_ctrl_col">Option Description</td>
|
||||
<td>
|
||||
The root path where to search the image files. By default, Ventoy will search all the directories and subdirectories in the USB. This will be very slow when you have huge number of files in the USB.
|
||||
In this case, you can put all the image files in one subdirectory and use this to specify the search path.
|
||||
The root path where to search the image files. By default, Ventoy will search all the directories and subdirectories in the USB. This will be very slow when you have huge number of files in the USB.
|
||||
In this case, you can put all the image files in one subdirectory and use this to specify the search path.
|
||||
After that Ventoy will only search this directory and its subdirectories for image files.<br/>
|
||||
Note: the path must not be the mountpoint of the first partition, but a subdirectory.
|
||||
</td>
|
||||
@@ -117,7 +117,80 @@
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="box box-primary box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_SECURE_BOOT_POLICY
|
||||
<span id="id_span_desc_cn"> —— UEFI 安全启动策略</span></h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
</div><!-- /.box-tools -->
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<tr style="font-weight:bold;">
|
||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||
<td>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" id="id_ctrl_uefi_sb_policy_radio0" name="id_ctrl_uefi_sb_policy_radio" data-type="0" value="0"/>
|
||||
<span id="id_span_desc_cn">绕过安全启动检查</span>
|
||||
<span id="id_span_desc_en">ByPass Secure Boot</span>
|
||||
</label>
|
||||
<label class="radio-inline label-rt">
|
||||
<input type="radio" id="id_ctrl_uefi_sb_policy_radio1" name="id_ctrl_uefi_sb_policy_radio" data-type="1" value="1"/>
|
||||
<span id="id_span_desc_cn">遵循UEFI安全启动检查规则</span>
|
||||
<span id="id_span_desc_en">Follow UEFI Secure Boot Check</span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="box box-primary box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_WIN_UEFI_RES_LOCK
|
||||
<span id="id_span_desc_cn"> —— UEFI 分辨率锁定</span></h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
</div><!-- /.box-tools -->
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<tr style="font-weight:bold;">
|
||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||
<td>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" id="id_ctrl_uefi_res_lock_radio0" name="id_ctrl_uefi_res_lock_radio" data-type="0" value="0"/>
|
||||
<span id="id_span_desc_cn">不锁定</span>
|
||||
<span id="id_span_desc_en">None</span>
|
||||
</label>
|
||||
<label class="radio-inline label-rt">
|
||||
<input type="radio" id="id_ctrl_uefi_res_lock_radio1" name="id_ctrl_uefi_res_lock_radio" data-type="1" value="1"/>
|
||||
<span id="id_span_desc_cn">锁定最高分辨率</span>
|
||||
<span id="id_span_desc_en">Highest</span>
|
||||
</label>
|
||||
<label class="radio-inline label-rt">
|
||||
<input type="radio" id="id_ctrl_uefi_res_lock_radio2" name="id_ctrl_uefi_res_lock_radio" data-type="1" value="2"/>
|
||||
<span id="id_span_desc_cn">锁定 1024x768</span>
|
||||
<span id="id_span_desc_en">Fixed 1024x768</span>
|
||||
</label>
|
||||
<label class="radio-inline label-rt">
|
||||
<input type="radio" id="id_ctrl_uefi_res_lock_radio3" name="id_ctrl_uefi_res_lock_radio" data-type="1" value="3"/>
|
||||
<span id="id_span_desc_cn">锁定 1024x768及以上</span>
|
||||
<span id="id_span_desc_en">At least 1024x768</span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
<div class="box box-primary box-solid">
|
||||
<div class="box-header with-border">
|
||||
@@ -133,18 +206,20 @@
|
||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||
<td>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" id="id_ctrl_bypass_win11_radio0" name="id_ctrl_bypass_win11_radio" data-type="0" value="0"/> <span style="font-weight:bold;">0</span>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" id="id_ctrl_bypass_win11_radio1" name="id_ctrl_bypass_win11_radio" data-type="1" value="1"/> <span style="font-weight:bold;">1</span>
|
||||
<input type="radio" id="id_ctrl_bypass_win11_radio0" name="id_ctrl_bypass_win11_radio" data-type="0" value="0"/>
|
||||
<span id="id_span_desc_cn">不绕过Windows 11安装时的硬件检查</span>
|
||||
<span id="id_span_desc_en">Do not bypass Windows 11 hardware check</span>
|
||||
</label>
|
||||
<label class="radio-inline label-rt">
|
||||
<input type="radio" id="id_ctrl_bypass_win11_radio1" name="id_ctrl_bypass_win11_radio" data-type="1" value="1"/>
|
||||
<span id="id_span_desc_cn">绕过Windows 11安装时的硬件检查</span>
|
||||
<span id="id_span_desc_en">Bypass Windows 11 hardware check</span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr_title_desc_cn">
|
||||
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
||||
<td>
|
||||
<code style="font-weight: bold;">0</code> 不绕过Windows 11安装时的硬件检查。<br/>
|
||||
<code style="font-weight: bold;">1</code> 绕过Windows 11安装时的硬件检查。<br/><br/>
|
||||
该选项只对标准Windows 11 ISO文件有效,对于其他镜像文件无效。
|
||||
当设置为1时,Ventoy 会在安装时创建以下几个注册表项用来绕过 Windows 11 安装程序的硬件检查。<br/>
|
||||
<code>HKEY_LOCAL_MACHINE\SYSTEM\Setup\LabConfig\BypassRAMCheck</code><br/>
|
||||
@@ -156,8 +231,6 @@
|
||||
<tr id="tr_title_desc_en">
|
||||
<td class="td_ctrl_col" id="td_title_desc">Option Description</td>
|
||||
<td>
|
||||
<code style="font-weight: bold;">0</code> Do not bypass Windows 11 hardware check.<br/>
|
||||
<code style="font-weight: bold;">1</code> Bypass Windows 11 hardware check. <br/><br/>
|
||||
This option only avaliable for standard Windows 11 ISO files.
|
||||
When set to 1, Ventoy will create the following registries to bypass Windows 11 hardware check when install. <br/>
|
||||
<code>HKEY_LOCAL_MACHINE\SYSTEM\Setup\LabConfig\BypassRAMCheck</code><br/>
|
||||
@@ -170,9 +243,9 @@
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="box box-primary box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_WIN11_BYPASS_NRO
|
||||
@@ -187,28 +260,28 @@
|
||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||
<td>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" id="id_ctrl_bypass_nro_radio0" name="id_ctrl_bypass_nro_radio" data-type="0" value="0"/> <span style="font-weight:bold;">0</span>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" id="id_ctrl_bypass_nro_radio1" name="id_ctrl_bypass_nro_radio" data-type="1" value="1"/> <span style="font-weight:bold;">1</span>
|
||||
<input type="radio" id="id_ctrl_bypass_nro_radio0" name="id_ctrl_bypass_nro_radio" data-type="0" value="0"/>
|
||||
<span id="id_span_desc_cn">不绕过Windows 11安装时的在线账户需求</span>
|
||||
<span id="id_span_desc_en">Do not bypass Windows 11 online account requirement</span>
|
||||
</label>
|
||||
<label class="radio-inline label-rt">
|
||||
<input type="radio" id="id_ctrl_bypass_nro_radio1" name="id_ctrl_bypass_nro_radio" data-type="1" value="1"/>
|
||||
<span id="id_span_desc_cn">绕过Windows 11安装时的在线账户需求</span>
|
||||
<span id="id_span_desc_en">Bypass Windows 11 online account requirement</span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr_title_desc_cn">
|
||||
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
||||
<td>
|
||||
<code style="font-weight: bold;">0</code> 不绕过Windows 11安装时的在线账户需求。<br/>
|
||||
<code style="font-weight: bold;">1</code> 绕过Windows 11安装时的在线账户需求。<br/><br/>
|
||||
该选项只对标准Windows 11 ISO文件有效,对于其他镜像文件无效。
|
||||
当设置为1时,Ventoy 会在安装时创建以下注册表项用来绕过 Windows 11 安装时对在线账户的需求。<br/>
|
||||
<code>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE\BypassNRO</code><br/>
|
||||
<code>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE\BypassNRO</code><br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr_title_desc_en">
|
||||
<td class="td_ctrl_col" id="td_title_desc">Option Description</td>
|
||||
<td>
|
||||
<code style="font-weight: bold;">0</code> Do not bypass Windows 11 online account requirement.<br/>
|
||||
<code style="font-weight: bold;">1</code> Bypass Windows 11 online account requirement. <br/><br/>
|
||||
This option only avaliable for standard Windows 11 ISO files.
|
||||
When set to 1, Ventoy will create the following registry to bypass Windows 11 online account requirement when install. <br/>
|
||||
<code>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE\BypassNRO</code>
|
||||
@@ -217,9 +290,9 @@
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -237,25 +310,15 @@
|
||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||
<td>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" id="id_ctrl_radio_menu_mode0" name="id_ctrl_radio_menu_mode" data-type="0" value="0"> <span style="font-weight:bold;">0</span>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" id="id_ctrl_radio_menu_mode1" name="id_ctrl_radio_menu_mode" data-type="1" value="1"> <span style="font-weight:bold;">1</span>
|
||||
<input type="radio" id="id_ctrl_radio_menu_mode0" name="id_ctrl_radio_menu_mode" data-type="0" value="0">
|
||||
<span id="id_span_desc_cn">文件列表模式</span>
|
||||
<span id="id_span_desc_en">ListView Mode</span>
|
||||
</label>
|
||||
<label class="radio-inline label-rt">
|
||||
<input type="radio" id="id_ctrl_radio_menu_mode1" name="id_ctrl_radio_menu_mode" data-type="1" value="1">
|
||||
<span id="id_span_desc_cn">目录树模式</span>
|
||||
<span id="id_span_desc_en">TreeView Mode</span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr_title_desc_cn">
|
||||
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
||||
<td>启动菜单默认显示模式,
|
||||
<code style="font-weight: bold;">0</code> 列表模式
|
||||
<code style="font-weight: bold;">1</code> TreeView(目录树) 模式</td>
|
||||
</tr>
|
||||
<tr id="tr_title_desc_en">
|
||||
<td class="td_ctrl_col">Option Description</td>
|
||||
<td>
|
||||
Default boot menu display mode.
|
||||
<code style="font-weight: bold;">0</code> ListView Mode  
|
||||
<code style="font-weight: bold;">1</code> TreeView Mode
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -267,7 +330,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="box box-primary box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_MENU_TIMEOUT
|
||||
@@ -283,7 +346,7 @@
|
||||
<td>
|
||||
<div class="col-sm-9" style="padding-left:0px;">
|
||||
<input type="text" class="form-control" id="id_ctrl_text_timeout" name="name_ctrl_text_timeout"/>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr_title_desc_cn">
|
||||
@@ -303,9 +366,9 @@
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="box box-primary box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_DEFAULT_IMAGE
|
||||
@@ -352,14 +415,14 @@
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="box box-primary box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_MAX_SEARCH_LEVEL
|
||||
@@ -369,7 +432,7 @@
|
||||
</div><!-- /.box-tools -->
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<tr style="font-weight:bold;">
|
||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||
<td>
|
||||
@@ -392,7 +455,7 @@
|
||||
<tr id="tr_title_desc_cn">
|
||||
<td class="td_ctrl_col">选项说明</td>
|
||||
<td>
|
||||
最大搜索子目录的层数,取值为:<code>max</code> <code>0</code> <code>1</code> <code>2</code> <code>3</code> <code>...</code>
|
||||
最大搜索子目录的层数,取值为:<code>max</code> <code>0</code> <code>1</code> <code>2</code> <code>3</code> <code>...</code>
|
||||
默认值为:<code>max</code><br/>
|
||||
默认Ventoy会递归搜索磁盘上的所有目录和子目录,不管目录结构有多深都会搜索到底。你可以通过这个参数来控制搜索时的路径深度。<br/><br/>
|
||||
<code>max</code> : 最大层数,也就是搜索所有子目录的意思。这也是 Ventoy 的默认值。<br/>
|
||||
@@ -407,7 +470,7 @@
|
||||
<tr id="tr_title_desc_en">
|
||||
<td class="td_ctrl_col">Option Description</td>
|
||||
<td>
|
||||
Max subdirectory level when search for image files. It's value can be: <code>max</code> <code>0</code> <code>1</code> <code>2</code> <code>3</code> <code>...</code>
|
||||
Max subdirectory level when search for image files. It's value can be: <code>max</code> <code>0</code> <code>1</code> <code>2</code> <code>3</code> <code>...</code>
|
||||
default is : <code>max</code><br/>
|
||||
By default, Ventoy will search all the directories and sub directories recursively no matter how deep the directory level is.<br/>
|
||||
You can use this parameter to set a max-depth for the search path.<br/><br/>
|
||||
@@ -423,57 +486,6 @@
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
|
||||
<div class="box box-primary box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_LINUX_REMOUNT
|
||||
<span id="id_span_desc_cn"> —— Linux 启动后继续访问ISO文件所在分区</span></h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
</div><!-- /.box-tools -->
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<tr style="font-weight:bold;">
|
||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||
<td>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" id="id_ctrl_linux_remount_radio0" name="id_ctrl_linux_remount_radio" data-type="0" value="0"/> <span style="font-weight:bold;">0</span>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" id="id_ctrl_linux_remount_radio1" name="id_ctrl_linux_remount_radio" data-type="1" value="1"/> <span style="font-weight:bold;">1</span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr_title_desc_cn">
|
||||
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
||||
<td>
|
||||
<code style="font-weight: bold;">0</code> Linux启动后不需要继续访问ISO文件所在的分区。<br/>
|
||||
<code style="font-weight: bold;">1</code> Linux启动后需要继续访问ISO文件所在的分区。<br/><br/>
|
||||
该选项只对 Linux 系统镜像有效。<br/>
|
||||
默认情况下,受Linux内核相关功能的限制,对于Linux系统,在启动后无法继续访问ISO文件所在的分区。在mount的时候会提示 device busy。<br/>
|
||||
如果这里选择 1,则 Ventoy 会尝试通过一些特殊的手段绕过内核的这个限制,但是这个功能是实验性质的,没有经过大规模和长时间的验证。
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr_title_desc_en">
|
||||
<td class="td_ctrl_col" id="td_title_desc">Option Description</td>
|
||||
<td>
|
||||
<code style="font-weight: bold;">0</code> I don't need to access the image partition after boot.<br/>
|
||||
<code style="font-weight: bold;">1</code> I need to access the image partition after boot. <br/><br/>
|
||||
This option is only avaliable for Linux distro image files. <br/>
|
||||
|
||||
By default, the image partition where the ISO files locate can not be accessed after boot. When you try to mount it you will get device busy error.
|
||||
This is due to linux kernel restriction (device-mapper module).<br/>
|
||||
If you select 1 here, Ventoy will try to bypass the restriction with some special mechanism.<br/>
|
||||
But it should be noted that, this is an experimental feature and is not fully tested.
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
|
||||
@@ -486,38 +498,27 @@
|
||||
</div><!-- /.box-tools -->
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<tr style="font-weight:bold;">
|
||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||
<td>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" id="id_ctrl_secondary_radio0" name="id_ctrl_secondary_radio" data-type="0" value="0"> <span style="font-weight:bold;">0</span>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" id="id_ctrl_secondary_radio1" name="id_ctrl_secondary_radio" data-type="1" value="1"> <span style="font-weight:bold;">1</span>
|
||||
<input type="radio" id="id_ctrl_secondary_radio0" name="id_ctrl_secondary_radio" data-type="0" value="0">
|
||||
<span id="id_span_desc_cn">不显示二级启动菜单</span>
|
||||
<span id="id_span_desc_en">Don't show secondary boot menu</span>
|
||||
</label>
|
||||
<label class="radio-inline label-rt">
|
||||
<input type="radio" id="id_ctrl_secondary_radio1" name="id_ctrl_secondary_radio" data-type="1" value="1">
|
||||
<span id="id_span_desc_cn">显示二级启动菜单</span>
|
||||
<span id="id_span_desc_en">Show show secondary boot menu</span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr_title_desc_cn">
|
||||
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
||||
<td>二级启动菜单控制开关
|
||||
<code style="font-weight: bold;">0</code> 不显示
|
||||
<code style="font-weight: bold;">1</code> 显示
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr_title_desc_en">
|
||||
<td class="td_ctrl_col" id="td_title_desc">Option Description</td>
|
||||
<td>
|
||||
Secondary boot menu display option
|
||||
<code style="font-weight: bold;">0</code> Don't display
|
||||
<code style="font-weight: bold;">1</code> Display
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="box box-primary box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_SHOW_PASSWORD_ASTERISK
|
||||
@@ -527,39 +528,28 @@
|
||||
</div><!-- /.box-tools -->
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<tr style="font-weight:bold;">
|
||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||
<td>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" id="id_ctrl_asterisk_radio0" name="id_ctrl_asterisk_radio" data-type="0" value="0"> <span style="font-weight:bold;">0</span>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" id="id_ctrl_asterisk_radio1" name="id_ctrl_asterisk_radio" data-type="1" value="1"> <span style="font-weight:bold;">1</span>
|
||||
<input type="radio" id="id_ctrl_asterisk_radio0" name="id_ctrl_asterisk_radio" data-type="0" value="0">
|
||||
<span id="id_span_desc_cn">隐藏</span>
|
||||
<span id="id_span_desc_en">Hide</span>
|
||||
</label>
|
||||
<label class="radio-inline label-rt">
|
||||
<input type="radio" id="id_ctrl_asterisk_radio1" name="id_ctrl_asterisk_radio" data-type="1" value="1">
|
||||
<span id="id_span_desc_cn">显示</span>
|
||||
<span id="id_span_desc_en">Show</span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr_title_desc_cn">
|
||||
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
||||
<td>输入密码时是否显示星号
|
||||
<code style="font-weight: bold;">0</code> 不显示
|
||||
<code style="font-weight: bold;">1</code> 显示
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr_title_desc_en">
|
||||
<td class="td_ctrl_col" id="td_title_desc">Option Description</td>
|
||||
<td>
|
||||
Display asterisk when typing password
|
||||
<code style="font-weight: bold;">0</code> Don't display
|
||||
<code style="font-weight: bold;">1</code> Display
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="box box-primary box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_SECONDARY_TIMEOUT
|
||||
@@ -575,7 +565,7 @@
|
||||
<td>
|
||||
<div class="col-sm-9" style="padding-left:0px;">
|
||||
<input type="text" class="form-control" id="id_ctrl_text_secondary_timeout" name="name_ctrl_text_secondary_timeout"/>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr_title_desc_cn">
|
||||
@@ -596,10 +586,10 @@
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="box box-primary box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_DEFAULT_KBD_LAYOUT
|
||||
@@ -609,7 +599,7 @@
|
||||
</div><!-- /.box-tools -->
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<tr style="font-weight:bold;">
|
||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||
<td>
|
||||
@@ -652,10 +642,10 @@
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="box box-primary box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_TREE_VIEW_MENU_STYLE
|
||||
@@ -687,7 +677,7 @@
|
||||
<tr id="tr_title_desc_en">
|
||||
<td class="td_ctrl_col" id="td_title_desc">Option Description</td>
|
||||
<td>
|
||||
Menu style in TreeView mode.
|
||||
Menu style in TreeView mode.
|
||||
<code style="font-weight: bold;">0</code> with DIR and file size prefix
|
||||
<code style="font-weight: bold;">1</code> No DIR and file size. Default is 0.
|
||||
</td>
|
||||
@@ -696,7 +686,7 @@
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
|
||||
<div class="box box-primary box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_FILT_DOT_UNDERSCORE_FILE
|
||||
@@ -706,7 +696,7 @@
|
||||
</div><!-- /.box-tools -->
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<tr style="font-weight:bold;">
|
||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||
<td>
|
||||
@@ -721,14 +711,14 @@
|
||||
<tr id="tr_title_desc_cn">
|
||||
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
||||
<td>过滤以 ._ 开头的文件。当使用苹果系统时,有时拷贝文件会产生一些 ._ 开头的文件,可以通过此选项过滤掉。
|
||||
<code style="font-weight: bold;">0</code> 不过滤
|
||||
<code style="font-weight: bold;">0</code> 不过滤
|
||||
<code style="font-weight: bold;">1</code> 过滤
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr_title_desc_en">
|
||||
<td class="td_ctrl_col" id="td_title_desc">Option Description</td>
|
||||
<td>
|
||||
Filter for files with prefix ._ in name. This will be useful when you use macOS (a lot of ._xxx file generated when you copy files).
|
||||
Filter for files with prefix ._ in name. This will be useful when you use macOS (a lot of ._xxx file generated when you copy files).
|
||||
<code style="font-weight: bold;">0</code> Don't filt
|
||||
<code style="font-weight: bold;">1</code> Filt
|
||||
</td>
|
||||
@@ -736,7 +726,7 @@
|
||||
</table>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="box box-primary box-solid">
|
||||
@@ -769,7 +759,7 @@
|
||||
<tr id="tr_title_desc_en">
|
||||
<td class="td_ctrl_col" id="td_title_desc">Option Description</td>
|
||||
<td>
|
||||
Case sensitive when sort the ISO files or directories.
|
||||
Case sensitive when sort the ISO files or directories.
|
||||
<code style="font-weight: bold;">0</code> case insensitive <code style="font-weight: bold;">1</code> case sensitive
|
||||
</td>
|
||||
</tr>
|
||||
@@ -819,7 +809,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="box box-primary box-solid">
|
||||
@@ -831,7 +821,7 @@
|
||||
</div><!-- /.box-tools -->
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<tr style="font-weight:bold;">
|
||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||
<td>
|
||||
@@ -846,8 +836,8 @@
|
||||
<tr id="tr_title_desc_cn">
|
||||
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
||||
<td>
|
||||
<code style="font-weight: bold;">0</code> 不过滤 .iso 文件
|
||||
<code style="font-weight: bold;">1</code> 过滤掉 .iso 文件。
|
||||
<code style="font-weight: bold;">0</code> 不过滤 .iso 文件
|
||||
<code style="font-weight: bold;">1</code> 过滤掉 .iso 文件。
|
||||
过滤之后 .iso 文件就不会显示在启动菜单中。
|
||||
</td>
|
||||
</tr>
|
||||
@@ -873,7 +863,7 @@
|
||||
</div><!-- /.box-tools -->
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<tr style="font-weight:bold;">
|
||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||
<td>
|
||||
@@ -888,8 +878,8 @@
|
||||
<tr id="tr_title_desc_cn">
|
||||
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
||||
<td>
|
||||
<code style="font-weight: bold;">0</code> 不过滤 .wim 文件
|
||||
<code style="font-weight: bold;">1</code> 过滤掉 .wim 文件。
|
||||
<code style="font-weight: bold;">0</code> 不过滤 .wim 文件
|
||||
<code style="font-weight: bold;">1</code> 过滤掉 .wim 文件。
|
||||
过滤之后 .wim 文件就不会显示在启动菜单中。
|
||||
</td>
|
||||
</tr>
|
||||
@@ -916,7 +906,7 @@
|
||||
</div><!-- /.box-tools -->
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<tr style="font-weight:bold;">
|
||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||
<td>
|
||||
@@ -931,8 +921,8 @@
|
||||
<tr id="tr_title_desc_cn">
|
||||
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
||||
<td>
|
||||
<code style="font-weight: bold;">0</code> 不过滤 .efi 文件
|
||||
<code style="font-weight: bold;">1</code> 过滤掉 .efi 文件。
|
||||
<code style="font-weight: bold;">0</code> 不过滤 .efi 文件
|
||||
<code style="font-weight: bold;">1</code> 过滤掉 .efi 文件。
|
||||
过滤之后 .efi 文件就不会显示在启动菜单中。
|
||||
</td>
|
||||
</tr>
|
||||
@@ -959,7 +949,7 @@
|
||||
</div><!-- /.box-tools -->
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<tr style="font-weight:bold;">
|
||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||
<td>
|
||||
@@ -974,8 +964,8 @@
|
||||
<tr id="tr_title_desc_cn">
|
||||
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
||||
<td>
|
||||
<code style="font-weight: bold;">0</code> 不过滤 .img 文件
|
||||
<code style="font-weight: bold;">1</code> 过滤掉 .img 文件。
|
||||
<code style="font-weight: bold;">0</code> 不过滤 .img 文件
|
||||
<code style="font-weight: bold;">1</code> 过滤掉 .img 文件。
|
||||
过滤之后 .img 文件就不会显示在启动菜单中。
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1002,7 +992,7 @@
|
||||
</div><!-- /.box-tools -->
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<tr style="font-weight:bold;">
|
||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||
<td>
|
||||
@@ -1017,8 +1007,8 @@
|
||||
<tr id="tr_title_desc_cn">
|
||||
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
||||
<td>
|
||||
<code style="font-weight: bold;">0</code> 不过滤 .vhd(x) 文件
|
||||
<code style="font-weight: bold;">1</code> 过滤掉 .vhd(x) 文件。
|
||||
<code style="font-weight: bold;">0</code> 不过滤 .vhd(x) 文件
|
||||
<code style="font-weight: bold;">1</code> 过滤掉 .vhd(x) 文件。
|
||||
过滤之后 .vhd(x) 文件就不会显示在启动菜单中。
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1045,7 +1035,7 @@
|
||||
</div><!-- /.box-tools -->
|
||||
</div><!-- /.box-header -->
|
||||
<div class="box-body no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<table class="table table-bordered no-padding">
|
||||
<tr style="font-weight:bold;">
|
||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||
<td>
|
||||
@@ -1060,8 +1050,8 @@
|
||||
<tr id="tr_title_desc_cn">
|
||||
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
||||
<td>
|
||||
<code style="font-weight: bold;">0</code> 不过滤 .vtoy 文件
|
||||
<code style="font-weight: bold;">1</code> 过滤掉 .vtoy 文件。
|
||||
<code style="font-weight: bold;">0</code> 不过滤 .vtoy 文件
|
||||
<code style="font-weight: bold;">1</code> 过滤掉 .vtoy 文件。
|
||||
过滤之后 .vtoy 文件就不会显示在启动菜单中。
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1077,18 +1067,18 @@
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
function VtoyPageLanguageChange(newlang) {
|
||||
VtoyCommonChangeLanguage(newlang);
|
||||
|
||||
$('h1[id=id_h1_page_title]').text(g_vtoy_cur_language.STR_PLUG_CONTROL);
|
||||
$('#id_ctrl_span_search_root_valid').text(g_vtoy_cur_language.STR_VALID);
|
||||
$('#id_ctrl_span_search_root_valid').text(g_vtoy_cur_language.STR_VALID);
|
||||
$('#id_ctrl_span_search_root_invalid').text(g_vtoy_cur_language.STR_INVALID);
|
||||
$('#id_ctrl_span_img_valid').text(g_vtoy_cur_language.STR_VALID);
|
||||
$('#id_ctrl_span_img_invalid').text(g_vtoy_cur_language.STR_INVALID);
|
||||
@@ -1107,21 +1097,23 @@
|
||||
|
||||
data.win11_bypass_check = parseInt($('input:radio[name=id_ctrl_bypass_win11_radio]:checked').val());
|
||||
data.win11_bypass_nro = parseInt($('input:radio[name=id_ctrl_bypass_nro_radio]:checked').val());
|
||||
data.linux_remount = parseInt($('input:radio[name=id_ctrl_linux_remount_radio]:checked').val());
|
||||
data.linux_remount = 0;
|
||||
data.secondary_menu = parseInt($('input:radio[name=id_ctrl_secondary_radio]:checked').val());
|
||||
data.uefi_res_lock = parseInt($('input:radio[name=id_ctrl_uefi_res_lock_radio]:checked').val());
|
||||
data.uefi_sb_policy = parseInt($('input:radio[name=id_ctrl_uefi_sb_policy_radio]:checked').val());
|
||||
data.password_asterisk = parseInt($('input:radio[name=id_ctrl_asterisk_radio]:checked').val());
|
||||
data.default_search_root = $('input:text[id=id_ctrl_text_search_root]').val();
|
||||
data.menu_timeout = parseInt($('input:text[id=id_ctrl_text_timeout]').val());
|
||||
data.secondary_menu_timeout = parseInt($('input:text[id=id_ctrl_text_secondary_timeout]').val());
|
||||
data.default_image = $('input:text[id=id_ctrl_text_default_img]').val();
|
||||
|
||||
|
||||
level = $('select[id=id_ctrl_sel_max_depth').val();
|
||||
if (level === 'max') {
|
||||
data.max_search_level = -1;
|
||||
} else {
|
||||
data.max_search_level = parseInt(level);
|
||||
}
|
||||
|
||||
|
||||
data.default_kbd_layout = $('select[id=id_ctrl_sel_kbd').val();
|
||||
data.default_menu_mode = parseInt($('input:radio[name=id_ctrl_radio_menu_mode]:checked').val());
|
||||
data.treeview_style = parseInt($('input:radio[name=id_ctrl_radio_treestyle]:checked').val());
|
||||
@@ -1145,8 +1137,9 @@
|
||||
$('input:radio[name=id_ctrl_bypass_win11_radio]')[data.win11_bypass_check].checked = true;
|
||||
//VTOY_WIN11_BYPASS_NRO
|
||||
$('input:radio[name=id_ctrl_bypass_nro_radio]')[data.win11_bypass_nro].checked = true;
|
||||
$('input:radio[name=id_ctrl_linux_remount_radio]')[data.linux_remount].checked = true;
|
||||
$('input:radio[name=id_ctrl_secondary_radio]')[data.secondary_menu].checked = true;
|
||||
$('input:radio[name=id_ctrl_uefi_res_lock_radio]')[data.uefi_res_lock].checked = true;
|
||||
$('input:radio[name=id_ctrl_uefi_sb_policy_radio]')[data.uefi_sb_policy].checked = true;
|
||||
$('input:radio[name=id_ctrl_asterisk_radio]')[data.password_asterisk].checked = true;
|
||||
|
||||
//VTOY_DEFAULT_SEARCH_ROOT
|
||||
@@ -1166,7 +1159,7 @@
|
||||
|
||||
//VTOY_MENU_TIMEOUT
|
||||
$('input:text[id=id_ctrl_text_timeout]').val(data.menu_timeout);
|
||||
|
||||
|
||||
//VTOY_SECONDARY_TIMEOUT
|
||||
$('input:text[id=id_ctrl_text_secondary_timeout]').val(data.secondary_menu_timeout);
|
||||
|
||||
@@ -1253,6 +1246,8 @@
|
||||
win11_bypass_check: data.win11_bypass_check,
|
||||
win11_bypass_nro: data.win11_bypass_nro,
|
||||
linux_remount:data.linux_remount,
|
||||
uefi_res_lock:data.uefi_res_lock,
|
||||
uefi_sb_policy:data.uefi_sb_policy,
|
||||
secondary_menu:data.secondary_menu,
|
||||
password_asterisk:data.password_asterisk,
|
||||
default_search_root: data.default_search_root,
|
||||
@@ -1285,7 +1280,7 @@
|
||||
if (index < 0 || index >= g_vtoy_data_default_index || current_tab_index === index) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
current_tab_index = index;
|
||||
VtoyFillCurrentPageItem(m_data_control[index]);
|
||||
}
|
||||
@@ -1307,7 +1302,7 @@
|
||||
var path = root.substr(g_current_dir.length);
|
||||
$('input:text[id=id_ctrl_text_default_img]').val(path);
|
||||
if (path.length === 0) {
|
||||
$('div[id=id_ctrl_div_img_status]').hide();
|
||||
$('div[id=id_ctrl_div_img_status]').hide();
|
||||
} else {
|
||||
$('div[id=id_ctrl_div_img_status]').show();
|
||||
$('span[id=id_ctrl_span_img_valid]').show();
|
||||
@@ -1323,7 +1318,7 @@
|
||||
callVtoySync({method : 'get_control'}, function(data) {
|
||||
m_data_control = data;
|
||||
});
|
||||
|
||||
|
||||
$('#id_ctrl_btn_sel_root').click(function() {
|
||||
var tip = (g_current_os === 'windows') ? '\\ISO\\Windows' : "/ISO/Linux";
|
||||
var para = {
|
||||
@@ -1335,7 +1330,7 @@
|
||||
};
|
||||
VtoySelectDirPath(OnSelectSearchRoot, para);
|
||||
});
|
||||
|
||||
|
||||
$('#id_ctrl_btn_clr_root').click(function() {
|
||||
var old = $('input:text[id=id_ctrl_text_search_root]').val();
|
||||
if (old.length != 0) {
|
||||
@@ -1344,7 +1339,7 @@
|
||||
VtoySaveCurrentPage();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('#id_ctrl_btn_default_img').click(function() {
|
||||
var tip = (g_current_os === 'windows') ? '\\ISO\\Windows10_en.iso' : "/ISO/Windows10_en.iso";
|
||||
var para = {
|
||||
@@ -1402,13 +1397,13 @@
|
||||
$('#id_tab_control a[href="#tab_3"]').click(OnClickMultiModeTab);
|
||||
$('#id_tab_control a[href="#tab_4"]').click(OnClickMultiModeTab);
|
||||
$('#id_tab_control a[href="#tab_5"]').click(OnClickMultiModeTab);
|
||||
|
||||
|
||||
function UpdateTabTitleIcon(data) {
|
||||
CommonUpdateTabTitleIcon(data.exist_control, '#id_tab_control a[href="#tab_', 'control');
|
||||
}
|
||||
$('#id_btn_reset').click(function() {
|
||||
$('#id_btn_reset').click(function() {
|
||||
Modal.confirm({msg:GetResetTabConfigTipMsg(current_tab_index, 'control')}).on(function(e) {
|
||||
if (e) {
|
||||
if (e) {
|
||||
VtoyFillCurrentPageItem(m_data_control[g_vtoy_data_default_index]);
|
||||
VtoySaveCurrentPage();
|
||||
}
|
||||
|
||||
@@ -1,40 +1,40 @@
|
||||
|
||||
function VtoyUTF16HexToAscii(hex) {
|
||||
var str = "";
|
||||
var str = "";
|
||||
for (var i = 0; i < hex.length; i += 4) {
|
||||
str += String.fromCharCode(parseInt(hex.substring(i, i + 4), 16));
|
||||
}
|
||||
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function ventoy_replace_slash(str) {
|
||||
var str1 = str.replace(/\\/g, '/');
|
||||
var str2 = str1.replace(/\/\//g, '/');
|
||||
|
||||
|
||||
if (str2 && str2.length > 0) {
|
||||
if (str2.substr(-1) === "/") {
|
||||
return str2.substr(0, str2.length - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return str2;
|
||||
}
|
||||
|
||||
|
||||
function ventoy_get_ulen(str) {
|
||||
var c, b = 0, l = str.length;
|
||||
while(l) {
|
||||
c = str.charCodeAt(--l);
|
||||
b += (c < 128) ? 1 : ((c < 2048) ? 2 : ((c < 65536) ? 3 : 4));
|
||||
};
|
||||
return b;
|
||||
function ventoy_get_ulen(str) {
|
||||
var c, b = 0, l = str.length;
|
||||
while(l) {
|
||||
c = str.charCodeAt(--l);
|
||||
b += (c < 128) ? 1 : ((c < 2048) ? 2 : ((c < 65536) ? 3 : 4));
|
||||
};
|
||||
return b;
|
||||
}
|
||||
|
||||
|
||||
function ventoy_common_check_path(path) {
|
||||
var curdir
|
||||
|
||||
|
||||
if (path.indexOf('//') >= 0) {
|
||||
return false;
|
||||
}
|
||||
@@ -43,11 +43,11 @@ function ventoy_common_check_path(path) {
|
||||
return false;
|
||||
}
|
||||
|
||||
curdir = path.substr(0, g_current_dir.length);
|
||||
curdir = path.substr(0, g_current_dir.length);
|
||||
if (curdir.match("^[a-z]:$")) {
|
||||
curdir = curdir.toUpperCase();
|
||||
}
|
||||
|
||||
|
||||
if (curdir != g_current_dir) {
|
||||
return false;
|
||||
}
|
||||
@@ -135,7 +135,7 @@ function callVtoy(p1, p2, p3) {
|
||||
}
|
||||
else if(undefined === errorThrown.length)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
else if('' == errorThrown.trim())
|
||||
{
|
||||
@@ -184,11 +184,11 @@ function callVtoyASyncTimeout(time, data, func) {
|
||||
success: func,
|
||||
error: function(xmlHttpRequest, textStatus, errorThrown) {
|
||||
if(undefined === errorThrown)
|
||||
{
|
||||
{
|
||||
}
|
||||
else if(undefined === errorThrown.length)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
else if('' == errorThrown.trim())
|
||||
{
|
||||
@@ -232,11 +232,11 @@ function callVtoySync(data, func) {
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
data: JSON.stringify(data),
|
||||
success: function VtoyCallFuncWrapper(data) {
|
||||
success: function VtoyCallFuncWrapper(data) {
|
||||
if (data.result === 'busy') {
|
||||
var titlestr = '<span class="fa fa-check-circle" style="color:green; font-weight:bold;"> ' + g_vtoy_cur_language.STR_INFO + '</span>';
|
||||
var msgstr = '<span style="font-size:14px; font-weight:bold;"> ' + g_vtoy_cur_language.STR_WEB_SERVICE_BUSY + '</span>';
|
||||
Modal.alert({title:titlestr, msg:msgstr, btnok:g_vtoy_cur_language.STR_BTN_OK });
|
||||
Modal.alert({title:titlestr, msg:msgstr, btnok:g_vtoy_cur_language.STR_BTN_OK });
|
||||
}else {
|
||||
func(data);
|
||||
}
|
||||
@@ -248,7 +248,7 @@ function callVtoySync(data, func) {
|
||||
}
|
||||
else if(undefined === errorThrown.length)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
else if('' == errorThrown.trim())
|
||||
{
|
||||
@@ -285,16 +285,16 @@ function callVtoySync(data, func) {
|
||||
});
|
||||
}
|
||||
|
||||
var vtoy = {
|
||||
var vtoy = {
|
||||
baseurl : '',
|
||||
status: '',
|
||||
status: '',
|
||||
scan: {
|
||||
time: 3,
|
||||
ret: []
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
String.prototype.endsWith = function(str) {
|
||||
if (str == null || str == "" || this.length == 0 || str.length > this.length)
|
||||
return false;
|
||||
@@ -305,7 +305,7 @@ String.prototype.endsWith = function(str) {
|
||||
}
|
||||
|
||||
|
||||
var g_vtoy_cur_language_en =
|
||||
var g_vtoy_cur_language_en =
|
||||
{
|
||||
"STR_INFO": "Info",
|
||||
"STR_BTN_OK": "OK",
|
||||
@@ -390,8 +390,8 @@ var g_vtoy_cur_language_en =
|
||||
"STR_PATH_TOO_LONG": "The path exceeds the maximum supported length, please check!",
|
||||
"STR_INPUT_TOO_LONG": "The string exceeds the maximum supported length, please check!",
|
||||
"STR_INVALID_FILE_PATH": "Invalid or nonexist full file path, please check!",
|
||||
"STR_INVALID_FILE_PATH1": "The 1st file path is invalid or nonexist!",
|
||||
"STR_INVALID_FILE_PATH2": "The 2nd file path is invalid or nonexist!",
|
||||
"STR_INVALID_FILE_PATH1": "The 1st file path is invalid or nonexist!",
|
||||
"STR_INVALID_FILE_PATH2": "The 2nd file path is invalid or nonexist!",
|
||||
"STR_INVALID_NEW_FILE_PATH": "The full file path of new is invalid or nonexist, please check!",
|
||||
"STR_INVALID_DIR_PATH": "Invalid directory path, please check!",
|
||||
"STR_INVALID_NUMBER": "Please input valid non-negative integer!",
|
||||
@@ -418,7 +418,7 @@ var g_vtoy_cur_language_en =
|
||||
"STR_SET_IMAGE_PWD": "[file] Set Password For A File",
|
||||
"STR_SET_PARENT_PWD": "[parent] Set the same password for all the files under a directory.",
|
||||
|
||||
"STR_SET_SEARCH_ROOT": "Set Search Root",
|
||||
"STR_SET_SEARCH_ROOT": "Set Search Root",
|
||||
"STR_SET_DEFAULT_IMAGE": "Set Default Image",
|
||||
"STR_ADD_THEME": "Add Theme",
|
||||
"STR_ADD_FONT": "Set Font",
|
||||
@@ -426,7 +426,7 @@ var g_vtoy_cur_language_en =
|
||||
"STR_DEFAULT_SELECT": " Default",
|
||||
"STR_AUTO_TEMPLATE": "Auto Install Template",
|
||||
"STR_ADD_AUTO_TEMPLATE": "Add Auto Install Template",
|
||||
|
||||
|
||||
"STR_PERSISTENCE_DAT": "Persistence Dat File",
|
||||
"STR_ADD_PERSISTENCE_DAT": "Add Persistence Dat File",
|
||||
|
||||
@@ -449,7 +449,7 @@ var g_vtoy_cur_language_en =
|
||||
"STR_XXX": "xxx"
|
||||
};
|
||||
|
||||
var g_vtoy_cur_language_cn =
|
||||
var g_vtoy_cur_language_cn =
|
||||
{
|
||||
"STR_INFO": "提醒",
|
||||
"STR_BTN_OK": "确定",
|
||||
@@ -486,7 +486,7 @@ var g_vtoy_cur_language_cn =
|
||||
"STR_DELETE_CONFIRM": "确定要删除吗?",
|
||||
"STR_FILE_PATH": "文件路径",
|
||||
"STR_DIR_PATH": "目录路径",
|
||||
|
||||
|
||||
"STR_SET_ALIAS": "设置菜单别名",
|
||||
"STR_ALIAS": "别名",
|
||||
"STR_SET_TIP": "设置菜单提示",
|
||||
@@ -531,10 +531,10 @@ var g_vtoy_cur_language_cn =
|
||||
|
||||
"STR_PATH_TOO_LONG": "路径超过最大支持长度,请检查!",
|
||||
"STR_INPUT_TOO_LONG": "字符串超过最大支持长度,请检查!",
|
||||
"STR_INVALID_FILE_PATH": "文件路径不合法或不存在,请检查!",
|
||||
"STR_INVALID_FILE_PATH1": "第1个文件路径不合法或不存在,请检查!",
|
||||
"STR_INVALID_FILE_PATH2": "第2个文件路径不合法或不存在,请检查!",
|
||||
"STR_INVALID_NEW_FILE_PATH": "new 文件路径不合法或不存在,请检查!",
|
||||
"STR_INVALID_FILE_PATH": "文件路径不合法或不存在,请检查!",
|
||||
"STR_INVALID_FILE_PATH1": "第1个文件路径不合法或不存在,请检查!",
|
||||
"STR_INVALID_FILE_PATH2": "第2个文件路径不合法或不存在,请检查!",
|
||||
"STR_INVALID_NEW_FILE_PATH": "new 文件路径不合法或不存在,请检查!",
|
||||
"STR_INVALID_DIR_PATH": "文件夹路径不合法,请检查!",
|
||||
"STR_INVALID_NUMBER": "请输入合法的非负整数!",
|
||||
"STR_INVALID_AUTOSEL": "autosel 的值超过了列表实际长度!",
|
||||
@@ -562,7 +562,7 @@ var g_vtoy_cur_language_cn =
|
||||
"STR_SET_PARENT_PWD": "[parent] 为某个目录下的所有文件设置相同的密码",
|
||||
|
||||
|
||||
|
||||
|
||||
"STR_SET_SEARCH_ROOT": "设置搜索目录",
|
||||
"STR_SET_DEFAULT_IMAGE": "设置默认镜像文件",
|
||||
"STR_ADD_THEME": "添加主题",
|
||||
@@ -607,13 +607,13 @@ var g_dir_modal_callback;
|
||||
|
||||
function GetResetTabConfigTipMsg(index, name) {
|
||||
var msgstr;
|
||||
|
||||
|
||||
if (g_current_language === 'en') {
|
||||
msgstr = 'Are you sure to reset all the configurations on the <code>' + name + g_bios_postfix[index] + '</code> tab ?';
|
||||
} else {
|
||||
msgstr = '确认要重置 <code>' + name + g_bios_postfix[index] + '</code> 标签页下的所有配置?';
|
||||
}
|
||||
|
||||
|
||||
return msgstr;
|
||||
}
|
||||
|
||||
@@ -629,7 +629,7 @@ function CommonUpdateTabTitleIcon(exists, id, name) {
|
||||
} else {
|
||||
newhtml = name + g_bios_postfix[i];
|
||||
}
|
||||
|
||||
|
||||
if (newhtml != oldhtml) {
|
||||
$(fid).html(newhtml);
|
||||
}
|
||||
@@ -661,7 +661,7 @@ function ventoy_file_submit(form, extra) {
|
||||
callVtoySync({
|
||||
method : 'check_fuzzy',
|
||||
path: filepath
|
||||
}, function(data) {
|
||||
}, function(data) {
|
||||
if (data.exist != 0) {
|
||||
if (typeof(g_file_modal_callback) === 'function') {
|
||||
g_file_modal_callback(filepath, -1, fileextra);
|
||||
@@ -676,7 +676,7 @@ function ventoy_file_submit(form, extra) {
|
||||
method : 'check_path',
|
||||
dir: 0,
|
||||
path: filepath
|
||||
}, function(data) {
|
||||
}, function(data) {
|
||||
if (data.exist === 1) {
|
||||
if (typeof(g_file_modal_callback) === 'function') {
|
||||
g_file_modal_callback(filepath, 1, fileextra);
|
||||
@@ -691,7 +691,7 @@ function ventoy_file_submit(form, extra) {
|
||||
|
||||
|
||||
var g_filepath_validator = $("#SetFileForm").validate({
|
||||
rules: {
|
||||
rules: {
|
||||
FilePath : {
|
||||
required: true,
|
||||
utfmaxlen: true,
|
||||
@@ -708,7 +708,7 @@ var g_filepath_validator = $("#SetFileForm").validate({
|
||||
});
|
||||
|
||||
var g_dirpath_validator = $("#SetDirForm").validate({
|
||||
rules: {
|
||||
rules: {
|
||||
DirPath : {
|
||||
required: true,
|
||||
utfmaxlen: true,
|
||||
@@ -722,7 +722,7 @@ var g_dirpath_validator = $("#SetDirForm").validate({
|
||||
submitHandler: function(form) {
|
||||
var dirpath = $("#DirPath").val();
|
||||
var dirextra = $("#DirExtra").val();
|
||||
|
||||
|
||||
if (!dirpath) {
|
||||
return;
|
||||
}
|
||||
@@ -747,8 +747,8 @@ var g_dirpath_validator = $("#SetDirForm").validate({
|
||||
callVtoySync({
|
||||
method : 'check_path',
|
||||
dir: 1,
|
||||
path: dirpath
|
||||
}, function(data) {
|
||||
path: dirpath
|
||||
}, function(data) {
|
||||
if (data.exist === 1) {
|
||||
if (typeof(g_dir_modal_callback) === 'function') {
|
||||
g_dir_modal_callback(dirpath, dirextra);
|
||||
@@ -763,7 +763,7 @@ var g_dirpath_validator = $("#SetDirForm").validate({
|
||||
|
||||
function VtoySelectFilePath(cb, para) {
|
||||
g_file_fuzzy_match = para.fuzzy;
|
||||
|
||||
|
||||
if (para.extra) {
|
||||
$('div[id=id_div_file_extra]').show();
|
||||
$('#SetFileForm_extra').text(para.extra_title);
|
||||
@@ -787,7 +787,7 @@ function VtoySelectFilePath(cb, para) {
|
||||
} else {
|
||||
$('#SetFileForm #SetFileForm_lang_1').text(para.title);
|
||||
}
|
||||
|
||||
|
||||
$('#SetFileForm #SetFileForm_lang_2').text("File Path");
|
||||
$('#SetFileForm #SetFileForm_lang_3').text(" OK");
|
||||
$('#SetFileForm #SetFileForm_lang_4').text("Cancel");
|
||||
@@ -823,7 +823,7 @@ function VtoySelectFilePath(cb, para) {
|
||||
g_file_with_extra = para.extra;
|
||||
g_filepath_validator.settings.rules.FileExtra.required = g_file_with_extra;
|
||||
g_filepath_validator.resetForm();
|
||||
$("#SetFileModal").modal();
|
||||
$("#SetFileModal").modal();
|
||||
}
|
||||
|
||||
|
||||
@@ -882,8 +882,8 @@ function VtoySelectDirPath(cb, para) {
|
||||
g_dir_modal_callback = cb;
|
||||
g_dir_with_extra = para.extra;
|
||||
g_dirpath_validator.settings.rules.DirExtra.required = g_dir_with_extra;
|
||||
g_dirpath_validator.resetForm();
|
||||
$("#SetDirModal").modal();
|
||||
g_dirpath_validator.resetForm();
|
||||
$("#SetDirModal").modal();
|
||||
}
|
||||
|
||||
function VtoyCommonChangeLanguage(newlang) {
|
||||
@@ -891,7 +891,7 @@ function VtoyCommonChangeLanguage(newlang) {
|
||||
g_vtoy_cur_language = g_vtoy_cur_language_en;
|
||||
;$.extend($.validator.messages, {
|
||||
required: "This field is required",
|
||||
remote: "Please modify this field",
|
||||
remote: "Please modify this field",
|
||||
maxlength: $.validator.format("You can enter up to {0} characters"),
|
||||
minlength: $.validator.format("Must enter at least {0} characters"),
|
||||
rangelength: $.validator.format("Please input {0} to {1} characters"),
|
||||
@@ -910,23 +910,23 @@ function VtoyCommonChangeLanguage(newlang) {
|
||||
var newlink = oldlink.replace("/cn/", "/en/");
|
||||
$(this).attr('href', newlink);
|
||||
});
|
||||
|
||||
|
||||
$("span[id=id_span_official_doc]").each(function(){
|
||||
$(this).text(" Plugin Official Document");
|
||||
});
|
||||
|
||||
|
||||
$('#id_span_copy').text("Copy");
|
||||
$('#id_span_preview').text("Preview");
|
||||
$('#id_span_language').text("中文");
|
||||
|
||||
|
||||
$("tr[id=tr_title_desc_cn]").each(function(){
|
||||
$(this).hide();
|
||||
});
|
||||
|
||||
|
||||
$("tr[id=tr_title_desc_en]").each(function(){
|
||||
$(this).show();
|
||||
});
|
||||
|
||||
|
||||
$("th[id=id_th_file_path]").each(function(){
|
||||
$(this).text("Full File Path");
|
||||
});
|
||||
@@ -934,12 +934,15 @@ function VtoyCommonChangeLanguage(newlang) {
|
||||
$("span[id=id_span_desc_cn]").each(function(){
|
||||
$(this).hide();
|
||||
});
|
||||
$("span[id=id_span_desc_en]").each(function(){
|
||||
$(this).show();
|
||||
});
|
||||
|
||||
} else {
|
||||
g_vtoy_cur_language = g_vtoy_cur_language_cn;
|
||||
;$.extend($.validator.messages, {
|
||||
required: "这是必填字段",
|
||||
remote: "请修正此字段",
|
||||
remote: "请修正此字段",
|
||||
maxlength: $.validator.format("最多可以输入 {0} 个字符"),
|
||||
minlength: $.validator.format("最少要输入 {0} 个字符"),
|
||||
rangelength: $.validator.format("请输入长度在 {0} 到 {1} 之间的字符串"),
|
||||
@@ -952,29 +955,29 @@ function VtoyCommonChangeLanguage(newlang) {
|
||||
filenamepart:$.validator.format("作为文件名的一部分,不能包含特殊的符号"),
|
||||
printascii: $.validator.format("不能包含中文或其他非 ascii 字符。")
|
||||
});
|
||||
|
||||
|
||||
$("a[id=id_a_official_doc]").each(function(){
|
||||
var oldlink = $(this).attr('href');
|
||||
var newlink = oldlink.replace("/en/", "/cn/");
|
||||
$(this).attr('href', newlink);
|
||||
});
|
||||
|
||||
|
||||
$("span[id=id_span_official_doc]").each(function(){
|
||||
$(this).text(" 插件官网文档");
|
||||
});
|
||||
|
||||
|
||||
$('#id_span_copy').text("复制");
|
||||
$('#id_span_preview').text("预览");
|
||||
$('#id_span_language').text("English");
|
||||
|
||||
|
||||
$("tr[id=tr_title_desc_cn]").each(function(){
|
||||
$(this).show();
|
||||
});
|
||||
|
||||
|
||||
$("tr[id=tr_title_desc_en]").each(function(){
|
||||
$(this).hide();
|
||||
});
|
||||
|
||||
|
||||
$("th[id=id_th_file_path]").each(function(){
|
||||
$(this).text("文件路径");
|
||||
});
|
||||
@@ -982,6 +985,10 @@ function VtoyCommonChangeLanguage(newlang) {
|
||||
$("span[id=id_span_desc_cn]").each(function(){
|
||||
$(this).show();
|
||||
});
|
||||
|
||||
$("span[id=id_span_desc_en]").each(function(){
|
||||
$(this).hide();
|
||||
});
|
||||
}
|
||||
|
||||
$("span[id=id_span_menu_device]").text(g_vtoy_cur_language.STR_PLUG_DEVICE);
|
||||
@@ -1001,7 +1008,7 @@ function VtoyCommonChangeLanguage(newlang) {
|
||||
$('#id_span_save').text(g_vtoy_cur_language.STR_SAVE);
|
||||
$('#id_span_reset').text(g_vtoy_cur_language.STR_RESET);
|
||||
$('#id_span_donation').text(g_vtoy_cur_language.STR_PLUG_DONATION);
|
||||
|
||||
|
||||
$('span[id=id_btn_span_reset]').each(function(){
|
||||
$(this).text(' ' + g_vtoy_cur_language.STR_RESET);
|
||||
});
|
||||
@@ -1033,13 +1040,13 @@ function VtoyCommonChangeLanguage(newlang) {
|
||||
$("td[id=td_title_desc]").each(function(){
|
||||
$(this).text(g_vtoy_cur_language.STR_OPT_DESC);
|
||||
});
|
||||
|
||||
|
||||
$("td[id=td_title_setting]").each(function(){
|
||||
$(this).text(g_vtoy_cur_language.STR_OPT_SETTING);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
function ventoy_get_status_line(dir, exist) {
|
||||
if (dir) {
|
||||
if (exist === 0) {
|
||||
@@ -1062,7 +1069,7 @@ function ventoy_get_status_line(dir, exist) {
|
||||
|
||||
var g_type_select_callback;
|
||||
|
||||
var g_type_select_validator = $("#TypeSelectForm").validate({
|
||||
var g_type_select_validator = $("#TypeSelectForm").validate({
|
||||
submitHandler: function(form) {
|
||||
var sel = parseInt($('input:radio[name=name_select_type_radio]:checked').val());
|
||||
if (typeof(g_type_select_callback) === 'function') {
|
||||
@@ -1076,7 +1083,7 @@ var g_type_select_validator = $("#TypeSelectForm").validate({
|
||||
function VtoySelectType(cb, para) {
|
||||
|
||||
$('#TypeSelectForm #TypeSelForm_lang_1').text(g_vtoy_cur_language.STR_SELECT);
|
||||
|
||||
|
||||
if (g_current_language === 'en') {
|
||||
$('#TypeSelectForm #TypeSelForm_lang_2').text(" OK");
|
||||
$('#TypeSelectForm #TypeSelForm_lang_3').text("Cancel");
|
||||
@@ -1084,7 +1091,7 @@ function VtoySelectType(cb, para) {
|
||||
$('#TypeSelectForm #TypeSelForm_lang_2').text("确定");
|
||||
$('#TypeSelectForm #TypeSelForm_lang_3').text("取消");
|
||||
}
|
||||
|
||||
|
||||
var $tbl = $("#id_type_select_table tbody");
|
||||
$tbl.empty();
|
||||
|
||||
@@ -1101,23 +1108,23 @@ function VtoySelectType(cb, para) {
|
||||
}
|
||||
|
||||
g_type_select_callback = cb;
|
||||
g_type_select_validator.resetForm();
|
||||
$("#TypeSelectModal").modal();
|
||||
g_type_select_validator.resetForm();
|
||||
$("#TypeSelectModal").modal();
|
||||
}
|
||||
|
||||
|
||||
var g_set_key_callback;
|
||||
|
||||
var g_set_key_validator = $("#SetKeyForm").validate({
|
||||
rules: {
|
||||
var g_set_key_validator = $("#SetKeyForm").validate({
|
||||
rules: {
|
||||
SetKeyKey : {
|
||||
required: true,
|
||||
utfmaxlen: true
|
||||
utfmaxlen: true
|
||||
},
|
||||
SetKeyValue : {
|
||||
required: true,
|
||||
utfmaxlen: true,
|
||||
filenamepart: true
|
||||
filenamepart: true
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1151,10 +1158,10 @@ function VtoySetKey(cb, para) {
|
||||
$('#SetKeyForm #SetKeyForm_lang_4').text("确定");
|
||||
$('#SetKeyForm #SetKeyForm_lang_5').text("取消");
|
||||
}
|
||||
|
||||
|
||||
g_set_key_callback = cb;
|
||||
g_set_key_validator.resetForm();
|
||||
$("#SetKeyModal").modal();
|
||||
g_set_key_validator.resetForm();
|
||||
$("#SetKeyModal").modal();
|
||||
}
|
||||
|
||||
var g_valid_color_name = [
|
||||
@@ -1204,7 +1211,7 @@ function ventoy_check_file_path(isopath, fuzzy, cb) {
|
||||
callVtoySync({
|
||||
method : 'check_fuzzy',
|
||||
path: isopath
|
||||
}, function(data) {
|
||||
}, function(data) {
|
||||
if (data.exist != 0) {
|
||||
if (typeof(cb) === 'function') {
|
||||
cb(data.exist);
|
||||
@@ -1218,7 +1225,7 @@ function ventoy_check_file_path(isopath, fuzzy, cb) {
|
||||
method : 'check_path',
|
||||
dir: 0,
|
||||
path: isopath
|
||||
}, function(data) {
|
||||
}, function(data) {
|
||||
if (data.exist === 1) {
|
||||
if (typeof(cb) === 'function') {
|
||||
cb(data.exist);
|
||||
@@ -1230,7 +1237,7 @@ function ventoy_check_file_path(isopath, fuzzy, cb) {
|
||||
}
|
||||
}
|
||||
|
||||
function ventoy_random_string(e) {
|
||||
function ventoy_random_string(e) {
|
||||
var t = "abcdefhijkmnprstwxyz2345678";
|
||||
var a = t.length;
|
||||
var n = "";
|
||||
@@ -1243,15 +1250,15 @@ function ventoy_random_string(e) {
|
||||
|
||||
var g_set_filefile_callback;
|
||||
|
||||
var g_set_filefile_validator = $("#SetFileFileForm").validate({
|
||||
rules: {
|
||||
var g_set_filefile_validator = $("#SetFileFileForm").validate({
|
||||
rules: {
|
||||
FileFilePath1 : {
|
||||
required: true,
|
||||
utfmaxlen: true
|
||||
},
|
||||
FileFilePath2 : {
|
||||
required: true,
|
||||
utfmaxlen: true
|
||||
utfmaxlen: true
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1332,24 +1339,24 @@ function VtoySetFileFile(cb, para) {
|
||||
$('span[id=id_span_filefile_tip3]').each(function(){
|
||||
$(this).text(para.tip3);
|
||||
});
|
||||
|
||||
|
||||
g_set_filefile_callback = cb;
|
||||
g_set_filefile_validator.resetForm();
|
||||
g_set_filefile_validator.resetForm();
|
||||
$("#SetFileFileModal").modal();
|
||||
}
|
||||
|
||||
|
||||
var g_set_dirfile_callback;
|
||||
|
||||
var g_set_dirfile_validator = $("#SetDirFileForm").validate({
|
||||
rules: {
|
||||
var g_set_dirfile_validator = $("#SetDirFileForm").validate({
|
||||
rules: {
|
||||
DirFilePath1 : {
|
||||
required: true,
|
||||
utfmaxlen: true
|
||||
},
|
||||
DirFilePath2 : {
|
||||
required: true,
|
||||
utfmaxlen: true
|
||||
utfmaxlen: true
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1427,9 +1434,9 @@ function VtoySetDirFile(cb, para) {
|
||||
$('span[id=id_span_dirfile_tip2]').each(function(){
|
||||
$(this).text(para.tip2);
|
||||
});
|
||||
|
||||
|
||||
g_set_dirfile_callback = cb;
|
||||
g_set_dirfile_validator.resetForm();
|
||||
g_set_dirfile_validator.resetForm();
|
||||
$("#SetDirFileModal").modal();
|
||||
}
|
||||
|
||||
|
||||
41
SecureBoot.md
Normal file
41
SecureBoot.md
Normal file
@@ -0,0 +1,41 @@
|
||||
|
||||
# Ventoy Secure Boot Policy
|
||||
|
||||
## Why shim
|
||||
Ventoy is based on grub2 which is in GPL license, so it will not directly get signed with UEFI Certificate.
|
||||
Like most Linux distros, Ventoy grub2 must be launched by shim when Secure Boot is enabled.
|
||||
Different is that, Ventoy does not have its own shim and must make use of a third-part shim.
|
||||
When boot Ventoy with Secure Boot enabled, the shim will not directly boot Ventoy grub because Ventoy grub is not signed with the shim embedded Certificate.
|
||||
The shim will open the MokManager and we must enroll Ventoy's Secure Boot Key and reboot, then the shim will accept Ventoy grub and boot it.
|
||||
|
||||
## Which shim
|
||||
I choose a shim file from Rocky Linux because it was signed with both UEFI CA 2011 and UEFI CA 2023.
|
||||
|
||||
## Policy
|
||||
Now you can boot into Ventoy after you enroll Ventoy Secure Boot Key.
|
||||
Ventoy provides two secure boot policies.
|
||||
1. Fully bypass secure boot.
|
||||
This mode will bypass secure boot which means it will boot any EFI files without check.
|
||||
This mode enables all features of Ventoy and is the most convenient to use.
|
||||
However, it also carries certain risks, as the Secure Boot mechanism is effectively bypassed.
|
||||
You must therefore be fully aware of the risks involved and decide whether to use this mode according to your actual circumstances.
|
||||
|
||||
3. Follow UEFI firmware secure boot policy.
|
||||
This mode will use the original UEFI secure boot policy to check every EFI file before boot it.
|
||||
This means you can only boot these EFI files which are signed with UEFI CA (e.g. Windows bootmgr, another shim).
|
||||
In this mode, certain features of Ventoy are disabled (such as grub2boot mode, insmod, etc.), but this mode is the most secure.
|
||||
|
||||
Policy 1 is the default policy by now.
|
||||
|
||||
If you want to use policy 2, you can set `VTOY_SECURE_BOOT_POLICY` to `1` in Ventoy global control plugin as follows:
|
||||
(PS: `VTOY_SECURE_BOOT_POLICY` value `0` and `1` correspond to Policy 1 and Policy 2 respectively)
|
||||
|
||||
```
|
||||
{
|
||||
"control":[
|
||||
{ "VTOY_SECURE_BOOT_POLICY": "1" }
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
58
vtoyjump/build.bat
Normal file
58
vtoyjump/build.bat
Normal file
@@ -0,0 +1,58 @@
|
||||
@echo off
|
||||
chcp 65001
|
||||
echo ==============================================
|
||||
echo VS 命令行双架构编译脚本
|
||||
echo ==============================================
|
||||
|
||||
:: ====================== 【必须改这里】======================
|
||||
:: 1. 你的 VS 版本对应的 VsDevCmd.bat 路径(看下面的路径对照表)
|
||||
set "VS_DEV_CMD=%VS120COMNTOOLS%VsDevCmd.bat"
|
||||
:: 2. 你的 VS 解决方案文件名(.sln)
|
||||
set "SLN_FILE=vtoyjump.sln"
|
||||
:: ==========================================================
|
||||
|
||||
:: 初始化VS编译环境(必须第一步)
|
||||
echo 正在初始化 VS 编译环境...
|
||||
call "%VS_DEV_CMD%" -no_logo
|
||||
if %errorlevel% neq 0 (
|
||||
echo 错误:VS环境初始化失败!检查路径是否正确
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: ============== 编译 Release Win32 (x86) ==============
|
||||
echo.
|
||||
echo 正在编译:Release Win32
|
||||
MSBuild "%SLN_FILE%" /t:Build /p:Configuration=Release;Platform=Win32 /m
|
||||
if %errorlevel% neq 0 (
|
||||
echo 编译 Release Win32 失败!
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
|
||||
:: ============== 编译 Release x64 ==============
|
||||
echo.
|
||||
echo 正在编译:Release x64
|
||||
MSBuild "%SLN_FILE%" /t:Build /p:Configuration=Release;Platform=x64 /m
|
||||
if %errorlevel% neq 0 (
|
||||
echo 编译 Release x64 失败!
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
del ..\INSTALL\ventoy\vtoyjump32.exe
|
||||
del ..\INSTALL\ventoy\vtoyjump64.exe
|
||||
|
||||
copy Release\vtoyjump32.exe ..\INSTALL\ventoy\vtoyjump32.exe
|
||||
copy x64\Release\vtoyjump64.exe ..\INSTALL\ventoy\vtoyjump64.exe
|
||||
|
||||
|
||||
echo.
|
||||
echo ==============================================
|
||||
echo ✅ 2架构编译完成!
|
||||
echo ==============================================
|
||||
echo.
|
||||
pause
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ static void BreakAndLaunchCmd(int line)
|
||||
PROCESS_INFORMATION Pi;
|
||||
|
||||
Log("Break at line:%d", line);
|
||||
|
||||
|
||||
GetStartupInfoA(&Si);
|
||||
Si.dwFlags |= STARTF_USESHOWWINDOW;
|
||||
Si.wShowWindow = SW_NORMAL;
|
||||
@@ -129,7 +129,7 @@ static void TrimString(CHAR *String, BOOL TrimLeft)
|
||||
}
|
||||
|
||||
if (TrimLeft)
|
||||
{
|
||||
{
|
||||
while (*Pos1 == ' ' || *Pos1 == '\t')
|
||||
{
|
||||
Pos1++;
|
||||
@@ -420,7 +420,7 @@ static BOOL CheckOsParam(ventoy_os_param *param)
|
||||
{
|
||||
Sum += *((BYTE *)param + i);
|
||||
}
|
||||
|
||||
|
||||
if (Sum)
|
||||
{
|
||||
return FALSE;
|
||||
@@ -472,7 +472,7 @@ static int IsUTF8Encode(const char *src)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -494,7 +494,7 @@ static int Utf8ToUtf16(const char* src, WCHAR * dst)
|
||||
|
||||
BOOL IsDirExist(const char *Fmt, ...)
|
||||
{
|
||||
va_list Arg;
|
||||
va_list Arg;
|
||||
DWORD Attr;
|
||||
int UTF8 = 0;
|
||||
CHAR FilePathA[MAX_PATH];
|
||||
@@ -515,7 +515,7 @@ BOOL IsDirExist(const char *Fmt, ...)
|
||||
{
|
||||
Attr = GetFileAttributesA(FilePathA);
|
||||
}
|
||||
|
||||
|
||||
if (Attr != INVALID_FILE_ATTRIBUTES && (Attr & FILE_ATTRIBUTE_DIRECTORY))
|
||||
{
|
||||
return TRUE;
|
||||
@@ -564,7 +564,7 @@ BOOL IsFileExist(const char *Fmt, ...)
|
||||
{
|
||||
Attr = GetFileAttributesA(FilePathA);
|
||||
}
|
||||
|
||||
|
||||
if (Attr & FILE_ATTRIBUTE_DIRECTORY)
|
||||
{
|
||||
goto out;
|
||||
@@ -613,7 +613,7 @@ static int GetPhyDiskUUID(const char LogicalDrive, UINT8 *UUID, UINT32 *DiskSig,
|
||||
CloseHandle(Handle);
|
||||
|
||||
memcpy(DiskExtent, DiskExtents.Extents, sizeof(DISK_EXTENT));
|
||||
Log("%C: is in PhysicalDrive%d Offset:%llu", LogicalDrive, DiskExtents.Extents[0].DiskNumber,
|
||||
Log("%C: is in PhysicalDrive%d Offset:%llu", LogicalDrive, DiskExtents.Extents[0].DiskNumber,
|
||||
(ULONGLONG)(DiskExtents.Extents[0].StartingOffset.QuadPart));
|
||||
|
||||
sprintf_s(PhyPath, sizeof(PhyPath), "\\\\.\\PhysicalDrive%d", DiskExtents.Extents[0].DiskNumber);
|
||||
@@ -630,7 +630,7 @@ static int GetPhyDiskUUID(const char LogicalDrive, UINT8 *UUID, UINT32 *DiskSig,
|
||||
CloseHandle(Handle);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
memcpy(UUID, SectorBuf + 0x180, 16);
|
||||
if (DiskSig)
|
||||
{
|
||||
@@ -735,7 +735,7 @@ static int VentoyAttachVirtualDisk(HANDLE Handle, const char *IsoPath)
|
||||
{
|
||||
int DriveYFree;
|
||||
DWORD Drives;
|
||||
|
||||
|
||||
Drives = GetLogicalDrives();
|
||||
if ((1 << 24) & Drives)
|
||||
{
|
||||
@@ -782,7 +782,7 @@ int VentoyMountISOByAPI(const char *IsoPath)
|
||||
|
||||
memset(&StorageType, 0, sizeof(StorageType));
|
||||
memset(&OpenParameters, 0, sizeof(OpenParameters));
|
||||
|
||||
|
||||
OpenParameters.Version = OPEN_VIRTUAL_DISK_VERSION_1;
|
||||
|
||||
for (i = 0; i < 10; i++)
|
||||
@@ -937,7 +937,7 @@ static CHAR GetIMDiskMountLogicalDrive(const char *suffix)
|
||||
|
||||
Drives = GetLogicalDrives();
|
||||
Log("Drives=0x%x", Drives);
|
||||
|
||||
|
||||
while (Mask)
|
||||
{
|
||||
if ((Drives & Mask) == 0)
|
||||
@@ -955,8 +955,8 @@ static CHAR GetIMDiskMountLogicalDrive(const char *suffix)
|
||||
UINT64 GetVentoyEfiPartStartSector(HANDLE hDrive)
|
||||
{
|
||||
BOOL bRet;
|
||||
DWORD dwSize;
|
||||
MBR_HEAD MBR;
|
||||
DWORD dwSize;
|
||||
MBR_HEAD MBR;
|
||||
VTOY_GPT_INFO *pGpt = NULL;
|
||||
UINT64 StartSector = 0;
|
||||
|
||||
@@ -981,7 +981,7 @@ UINT64 GetVentoyEfiPartStartSector(HANDLE hDrive)
|
||||
}
|
||||
|
||||
SetFilePointer(hDrive, 0, NULL, FILE_BEGIN);
|
||||
bRet = ReadFile(hDrive, pGpt, sizeof(VTOY_GPT_INFO), &dwSize, NULL);
|
||||
bRet = ReadFile(hDrive, pGpt, sizeof(VTOY_GPT_INFO), &dwSize, NULL);
|
||||
if ((!bRet) || (dwSize != sizeof(VTOY_GPT_INFO)))
|
||||
{
|
||||
Log("Failed to read gpt info %d %u %d", bRet, dwSize, LASTERR);
|
||||
@@ -1013,7 +1013,7 @@ static int VentoyCopyImdisk(DWORD PhyDrive, CHAR *ImPath)
|
||||
if (IsFileExist("X:\\Windows\\System32\\imdisk.exe"))
|
||||
{
|
||||
Log("imdisk.exe already exist, no need to copy...");
|
||||
strcpy_s(ImPath, MAX_PATH, "imdisk.exe");
|
||||
strcpy_s(ImPath, MAX_PATH, "imdisk.exe");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1065,7 +1065,7 @@ static int VentoyCopyImdisk(DWORD PhyDrive, CHAR *ImPath)
|
||||
strcat_s(PhyPath, sizeof(PhyPath), "\\ventoy\\imdisk.sys");
|
||||
|
||||
if (LoadNtDriver(PhyPath) == 0)
|
||||
{
|
||||
{
|
||||
strcpy_s(ImPath, MAX_PATH, "ventoy\\imdisk.exe");
|
||||
rc = 0;
|
||||
}
|
||||
@@ -1090,7 +1090,7 @@ static int VentoyRunImdisk(const char *suffix, const char *IsoPath, const char *
|
||||
|
||||
Letter = GetIMDiskMountLogicalDrive(suffix);
|
||||
|
||||
sprintf_s(Cmdline, sizeof(Cmdline), "%s -a -o %s -f \"%s\" -m %C:", imdiskexe, opt, IsoPath, Letter);
|
||||
sprintf_s(Cmdline, sizeof(Cmdline), "%s -a -o %s -f \"%s\" -m %C:", imdiskexe, opt, IsoPath, Letter);
|
||||
Log("mount iso to %C: use imdisk cmd <%s>", Letter, Cmdline);
|
||||
|
||||
if (IsUTF8Encode(IsoPath))
|
||||
@@ -1156,7 +1156,7 @@ static int GetIsoId(CONST CHAR *IsoPath, IsoId *ids)
|
||||
|
||||
SetFilePointer(hFile, 2048 * 16 + 8, NULL, FILE_BEGIN);
|
||||
bRet[n++] = ReadFile(hFile, ids->SystemId, 32, &dwSize, NULL);
|
||||
|
||||
|
||||
SetFilePointer(hFile, 2048 * 16 + 40, NULL, FILE_BEGIN);
|
||||
bRet[n++] = ReadFile(hFile, ids->VolumeId, 32, &dwSize, NULL);
|
||||
|
||||
@@ -1183,7 +1183,7 @@ static int GetIsoId(CONST CHAR *IsoPath, IsoId *ids)
|
||||
TrimString(ids->PulisherId, FALSE);
|
||||
TrimString(ids->PreparerId, FALSE);
|
||||
|
||||
Log("ISO ID: System<%s> Volume<%s> Pulisher<%s> Preparer<%s>",
|
||||
Log("ISO ID: System<%s> Volume<%s> Pulisher<%s> Preparer<%s>",
|
||||
ids->SystemId, ids->VolumeId, ids->PulisherId, ids->PreparerId);
|
||||
|
||||
return 0;
|
||||
@@ -1546,7 +1546,7 @@ static int UnattendNeedVarExpand(const char *script)
|
||||
}
|
||||
|
||||
szLine[0] = szLine[4095] = 0;
|
||||
|
||||
|
||||
while (fgets(szLine, sizeof(szLine) - 1, fp))
|
||||
{
|
||||
if (strstr(szLine, "$$VT_"))
|
||||
@@ -1554,10 +1554,10 @@ static int UnattendNeedVarExpand(const char *script)
|
||||
fclose(fp);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
szLine[0] = szLine[4095] = 0;
|
||||
}
|
||||
|
||||
|
||||
fclose(fp);
|
||||
return 0;
|
||||
}
|
||||
@@ -1572,7 +1572,7 @@ static int ExpandSingleVar(VarDiskInfo *pDiskInfo, int DiskNum, const char *var,
|
||||
UINT64 uiMaxDelta = ULLONG_MAX;
|
||||
|
||||
value[0] = 0;
|
||||
|
||||
|
||||
if (strcmp(var, "VT_WINDOWS_DISK_1ST_NONVTOY") == 0)
|
||||
{
|
||||
for (i = 0; i < DiskNum; i++)
|
||||
@@ -1615,14 +1615,14 @@ static int ExpandSingleVar(VarDiskInfo *pDiskInfo, int DiskNum, const char *var,
|
||||
{
|
||||
uiDst = strtoul(var + 24, NULL, 10);
|
||||
uiDst = uiDst * (1024ULL * 1024ULL * 1024ULL);
|
||||
|
||||
|
||||
for (i = 0; i < DiskNum; i++)
|
||||
{
|
||||
if (pDiskInfo[i].Capacity == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (pDiskInfo[i].Capacity > uiDst)
|
||||
{
|
||||
uiDelta = pDiskInfo[i].Capacity - uiDst;
|
||||
@@ -1631,7 +1631,7 @@ static int ExpandSingleVar(VarDiskInfo *pDiskInfo, int DiskNum, const char *var,
|
||||
{
|
||||
uiDelta = uiDst - pDiskInfo[i].Capacity;
|
||||
}
|
||||
|
||||
|
||||
if (uiDelta < uiMaxDelta)
|
||||
{
|
||||
uiMaxDelta = uiDelta;
|
||||
@@ -1678,7 +1678,7 @@ static int ExpandSingleVar(VarDiskInfo *pDiskInfo, int DiskNum, const char *var,
|
||||
Log("Invalid var name <%s>", var);
|
||||
sprintf_s(value, len, "$$%s$$", var);
|
||||
}
|
||||
|
||||
|
||||
if (value[0] == 0)
|
||||
{
|
||||
sprintf_s(value, len, "$$%s$$", var);
|
||||
@@ -1784,12 +1784,12 @@ static int EnumerateAllDisk(VarDiskInfo **ppDiskInfo, int *pDiskNum)
|
||||
DWORD dwBytes;
|
||||
VarDiskInfo *pDiskInfo = NULL;
|
||||
HANDLE Handle = INVALID_HANDLE_VALUE;
|
||||
CHAR PhyDrive[128];
|
||||
CHAR PhyDrive[128];
|
||||
GET_LENGTH_INFORMATION LengthInfo;
|
||||
STORAGE_PROPERTY_QUERY Query;
|
||||
STORAGE_DESCRIPTOR_HEADER DevDescHeader;
|
||||
STORAGE_DEVICE_DESCRIPTOR *pDevDesc;
|
||||
|
||||
|
||||
if (GetRegDwordValue(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Services\\disk\\Enum", "Count", &Value) == 0)
|
||||
{
|
||||
DiskNum = (int)Value;
|
||||
@@ -1819,7 +1819,7 @@ static int EnumerateAllDisk(VarDiskInfo **ppDiskInfo, int *pDiskNum)
|
||||
SAFE_CLOSE_HANDLE(Handle);
|
||||
|
||||
safe_sprintf(PhyDrive, "\\\\.\\PhysicalDrive%d", i);
|
||||
Handle = CreateFileA(PhyDrive, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
|
||||
Handle = CreateFileA(PhyDrive, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
|
||||
Log("Create file Handle:%p %s status:%u", Handle, PhyDrive, LASTERR);
|
||||
|
||||
if (Handle == INVALID_HANDLE_VALUE)
|
||||
@@ -1954,7 +1954,7 @@ static int UnattendVarExpand(const char *script, const char *tmpfile)
|
||||
Log("Failed to EnumerateAllDisk");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
fopen_s(&fp, script, "r");
|
||||
if (!fp)
|
||||
{
|
||||
@@ -1971,7 +1971,7 @@ static int UnattendVarExpand(const char *script, const char *tmpfile)
|
||||
}
|
||||
|
||||
szLine[0] = szLine[4095] = 0;
|
||||
|
||||
|
||||
while (fgets(szLine, sizeof(szLine) - 1, fp))
|
||||
{
|
||||
start = strstr(szLine, "$$VT_");
|
||||
@@ -1988,14 +1988,14 @@ static int UnattendVarExpand(const char *script, const char *tmpfile)
|
||||
*end = 0;
|
||||
ExpandSingleVar(pDiskInfo, DiskNum, start + 2, szValue, sizeof(szValue) - 1);
|
||||
fprintf(fout, "%s", szValue);
|
||||
|
||||
|
||||
fprintf(fout, "%s", end + 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(fout, "%s", szLine);
|
||||
}
|
||||
|
||||
|
||||
szLine[0] = szLine[4095] = 0;
|
||||
}
|
||||
|
||||
@@ -2033,7 +2033,7 @@ static int ProcessUnattendedInstallation(const char *script, DWORD PhyDrive)
|
||||
CHAR ImPath[MAX_PATH];
|
||||
|
||||
Log("Copy unattended XML ...");
|
||||
|
||||
|
||||
GetCurrentDirectory(sizeof(CurDir), CurDir);
|
||||
Letter = CurDir[0];
|
||||
if ((Letter >= 'A' && Letter <= 'Z') || (Letter >= 'a' && Letter <= 'z'))
|
||||
@@ -2055,7 +2055,7 @@ static int ProcessUnattendedInstallation(const char *script, DWORD PhyDrive)
|
||||
{
|
||||
sprintf_s(TmpFile, sizeof(TmpFile), "%C:\\__Autounattend", Letter);
|
||||
UnattendVarExpand(script, TmpFile);
|
||||
|
||||
|
||||
Log("Expand Copy file <%s> --> <%s>", script, CurDir);
|
||||
CopyFileA(TmpFile, CurDir, FALSE);
|
||||
}
|
||||
@@ -2175,7 +2175,7 @@ End:
|
||||
|
||||
static BOOL VentoyIsNeedBypass(const char *isofile, const char MntLetter)
|
||||
{
|
||||
UINT16 Major;
|
||||
UINT16 Major;
|
||||
BOOL bRet = FALSE;
|
||||
CHAR CheckFile[MAX_PATH];
|
||||
|
||||
@@ -2231,7 +2231,7 @@ End:
|
||||
|
||||
static int Windows11Bypass(const char *isofile, const char MntLetter, UINT8 Check, UINT8 NRO)
|
||||
{
|
||||
int Ret = 1;
|
||||
int Ret = 1;
|
||||
HKEY hKey = NULL;
|
||||
HKEY hSubKey = NULL;
|
||||
LSTATUS Status;
|
||||
@@ -2246,7 +2246,7 @@ static int Windows11Bypass(const char *isofile, const char MntLetter, UINT8 Chec
|
||||
}
|
||||
|
||||
//bugfix: change VTOYEFI partition attribute
|
||||
|
||||
|
||||
|
||||
|
||||
//Now we really need to bypass windows 11 check. create registry
|
||||
@@ -2298,13 +2298,13 @@ static int Windows11Bypass(const char *isofile, const char MntLetter, UINT8 Chec
|
||||
|
||||
SetupMonNroStart(isofile);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Ret = 0;
|
||||
|
||||
End:
|
||||
|
||||
return Ret;
|
||||
|
||||
return Ret;
|
||||
}
|
||||
|
||||
static BOOL CheckVentoyDisk(DWORD DiskNum)
|
||||
@@ -2393,7 +2393,7 @@ static BOOL VentoyIsLenovoRecovery(CHAR *IsoPath, CHAR *VTLRIPath)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -2401,9 +2401,9 @@ static int MountVTLRI(CHAR *ImgPath, DWORD PhyDrive)
|
||||
{
|
||||
STARTUPINFOA Si;
|
||||
PROCESS_INFORMATION Pi;
|
||||
CHAR Cmdline[256];
|
||||
CHAR ImDiskPath[256];
|
||||
|
||||
CHAR Cmdline[256];
|
||||
CHAR ImDiskPath[256];
|
||||
|
||||
Log("MountVTLRI <%s> %u", ImgPath, PhyDrive);
|
||||
|
||||
VentoyCopyImdisk(PhyDrive, ImDiskPath);
|
||||
@@ -2545,7 +2545,7 @@ static int VentoyHook(ventoy_os_param *param)
|
||||
}
|
||||
|
||||
Log("Find ISO file <%s>", IsoPath);
|
||||
|
||||
|
||||
//Find VtoyLetter in Vlnk Mode
|
||||
if (g_os_param_reserved[6] == 1)
|
||||
{
|
||||
@@ -2563,7 +2563,7 @@ static int VentoyHook(ventoy_os_param *param)
|
||||
memset(UUID, 0, sizeof(UUID));
|
||||
memset(&VtoyDiskExtent, 0, sizeof(VtoyDiskExtent));
|
||||
DiskSig = 0;
|
||||
|
||||
|
||||
if (GetPhyDiskUUID(VtoyLetter, UUID, &DiskSig, &VtoyDiskExtent) == 0)
|
||||
{
|
||||
Log("[%d] DiskSig=%08X PartStart=%lld", i, DiskSig, VtoyDiskExtent.StartingOffset.QuadPart);
|
||||
@@ -2595,7 +2595,7 @@ static int VentoyHook(ventoy_os_param *param)
|
||||
if (vtoyfind == FALSE) // vlnk mode Ventoy partition has no letter
|
||||
{
|
||||
Log("Warning: Ventoy partition has no drive letter, assume C: and find by sig");
|
||||
VtoyLetter = 'C';
|
||||
VtoyLetter = 'C';
|
||||
vtoyfind = FindVentoyDiskBySig(VtoySig, &VtoyDiskExtent.DiskNumber);
|
||||
}
|
||||
|
||||
@@ -2629,7 +2629,7 @@ static int VentoyHook(ventoy_os_param *param)
|
||||
|
||||
Drives = GetLogicalDrives();
|
||||
Log("Drives before mount: 0x%x", Drives);
|
||||
|
||||
|
||||
if (VentoyIsLenovoRecovery(IsoPath, VTLRIPath))
|
||||
{
|
||||
Log("This is lenovo recovery image, mount VTLRI file.");
|
||||
@@ -2676,7 +2676,7 @@ static int VentoyHook(ventoy_os_param *param)
|
||||
// for protect
|
||||
rc = DeleteVentoyPart2MountPoint(VtoyDiskNum);
|
||||
Log("Delete ventoy mountpoint: %s", rc == 0 ? "SUCCESS" : "NO NEED");
|
||||
|
||||
|
||||
if (g_windows_data.auto_install_script[0])
|
||||
{
|
||||
if (IsFileExist("%s", VTOY_AUTO_FILE))
|
||||
@@ -2771,7 +2771,7 @@ static int ExtractWindowsDataFile(char *databuf)
|
||||
filedata += pdata->auto_install_len;
|
||||
len = pdata->auto_install_len;
|
||||
}
|
||||
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
@@ -2803,7 +2803,7 @@ int VentoyJump(INT argc, CHAR **argv, CHAR *LunchFile)
|
||||
DWORD PeStart;
|
||||
DWORD FileSize;
|
||||
DWORD LockStatus = 0;
|
||||
BYTE *Buffer = NULL;
|
||||
BYTE *Buffer = NULL;
|
||||
CHAR ExeFileName[MAX_PATH];
|
||||
|
||||
sprintf_s(ExeFileName, sizeof(ExeFileName), "%s", argv[0]);
|
||||
@@ -2819,7 +2819,7 @@ int VentoyJump(INT argc, CHAR **argv, CHAR *LunchFile)
|
||||
{
|
||||
goto End;
|
||||
}
|
||||
|
||||
|
||||
Log("VentoyJump %dbit", g_system_bit);
|
||||
|
||||
MUTEX_LOCK(g_vtoyins_mutex);
|
||||
@@ -2833,13 +2833,13 @@ int VentoyJump(INT argc, CHAR **argv, CHAR *LunchFile)
|
||||
|
||||
for (PeStart = 0; PeStart < FileSize; PeStart += 16)
|
||||
{
|
||||
if (CheckOsParam((ventoy_os_param *)(Buffer + PeStart)) &&
|
||||
if (CheckOsParam((ventoy_os_param *)(Buffer + PeStart)) &&
|
||||
CheckPeHead(Buffer, FileSize, PeStart + sizeof(ventoy_os_param)))
|
||||
{
|
||||
Log("Find os pararm at %u", PeStart);
|
||||
|
||||
memcpy(&g_os_param, Buffer + PeStart, sizeof(ventoy_os_param));
|
||||
memcpy(&g_windows_data, Buffer + PeStart + sizeof(ventoy_os_param), sizeof(ventoy_windows_data));
|
||||
memcpy(&g_windows_data, Buffer + PeStart + sizeof(ventoy_os_param), sizeof(ventoy_windows_data));
|
||||
exlen = ExtractWindowsDataFile(Buffer + PeStart + sizeof(ventoy_os_param));
|
||||
memcpy(g_os_param_reserved, g_os_param.vtoy_reserved, sizeof(g_os_param_reserved));
|
||||
|
||||
@@ -2849,7 +2849,7 @@ int VentoyJump(INT argc, CHAR **argv, CHAR *LunchFile)
|
||||
goto End;
|
||||
}
|
||||
|
||||
// convert / to \\
|
||||
// convert '/'
|
||||
for (Pos = 0; Pos < sizeof(g_os_param.vtoy_img_path) && g_os_param.vtoy_img_path[Pos]; Pos++)
|
||||
{
|
||||
if (g_os_param.vtoy_img_path[Pos] == '/')
|
||||
@@ -2902,6 +2902,26 @@ End:
|
||||
return rc;
|
||||
}
|
||||
|
||||
static BOOL is_exe_need_recover(const char *prog_name)
|
||||
{
|
||||
if (_stricmp(g_prog_name, "winpeshl.exe") == 0)
|
||||
{
|
||||
// if setup.exe not exist, it's not a standard Windows ISO, maybe PE.
|
||||
if (!IsFileExist("X:\\setup.exe") && IsFileExist("ventoy\\%s", g_prog_name))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IsFileExist("ventoy\\%s", g_prog_name))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int real_main(int argc, char **argv)
|
||||
{
|
||||
@@ -2936,7 +2956,7 @@ int real_main(int argc, char **argv)
|
||||
|
||||
Log("LunchFile=<%s> CallParam=<%s>", LunchFile, CallParam);
|
||||
|
||||
if (_stricmp(g_prog_name, "winpeshl.exe") != 0 && IsFileExist("ventoy\\%s", g_prog_name))
|
||||
if (is_exe_need_recover(g_prog_name))
|
||||
{
|
||||
sprintf_s(NewFile, sizeof(NewFile), "%s\\VTOYJUMP.EXE", g_prog_dir);
|
||||
MoveFileA(g_prog_full_path, NewFile);
|
||||
@@ -3105,7 +3125,7 @@ int main(int argc, char **argv)
|
||||
|
||||
GetCurrentDirectoryA(sizeof(CurDir), CurDir);
|
||||
Log("Current directory is <%s>", CurDir);
|
||||
|
||||
|
||||
GetModuleFileNameA(NULL, g_prog_full_path, MAX_PATH);
|
||||
split_path_name(g_prog_full_path, g_prog_dir, g_prog_name);
|
||||
|
||||
@@ -3130,7 +3150,7 @@ int main(int argc, char **argv)
|
||||
if (_stricmp(g_prog_name, "WinLogon.exe") == 0)
|
||||
{
|
||||
Log("This time is rejump back ...");
|
||||
|
||||
|
||||
strcpy_s(g_prog_full_path, sizeof(g_prog_full_path), argv[1]);
|
||||
split_path_name(g_prog_full_path, g_prog_dir, g_prog_name);
|
||||
|
||||
@@ -3140,7 +3160,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
strcpy_s(NewArgv0, sizeof(NewArgv0), g_prog_dir);
|
||||
VentoyToUpper(NewArgv0);
|
||||
|
||||
|
||||
if (NULL == strstr(NewArgv0, "SYSTEM32") && IsFileExist(ORG_PECMD_BK_PATH))
|
||||
{
|
||||
Log("Just call original pecmd.exe");
|
||||
@@ -3155,7 +3175,7 @@ int main(int argc, char **argv)
|
||||
|
||||
sprintf_s(CallParam, sizeof(CallParam), "ventoy\\WinLogon.exe %s", g_prog_full_path);
|
||||
}
|
||||
|
||||
|
||||
for (i = 1; i < argc; i++)
|
||||
{
|
||||
strcat_s(CallParam, sizeof(CallParam), " ");
|
||||
|
||||
Reference in New Issue
Block a user