mirror of
https://github.com/ventoy/Ventoy.git
synced 2026-06-29 06:28:13 +00:00
Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d51e76daa9 | ||
|
|
f677d72e8d | ||
|
|
6418c2a09f | ||
|
|
c2a3f181c0 | ||
|
|
90e4f9db63 | ||
|
|
255e84dbab | ||
|
|
213ce02985 | ||
|
|
8c2a3b44da | ||
|
|
536545cd39 | ||
|
|
0f59e92a01 | ||
|
|
4b1e5ce89c | ||
|
|
1ed7bc9596 | ||
|
|
71ac855b36 | ||
|
|
4302854b8d | ||
|
|
036f7234ad | ||
|
|
26a394ce84 | ||
|
|
25369d5884 | ||
|
|
12387fff81 | ||
|
|
b54a7fe93b | ||
|
|
dba7530b21 | ||
|
|
e9b4c86082 | ||
|
|
dbcdf51950 | ||
|
|
de3e6c6d1d | ||
|
|
3c0df07b92 | ||
|
|
c1c27cd30c | ||
|
|
167c87402c | ||
|
|
d35b8431fe | ||
|
|
a1771bd9b8 | ||
|
|
ed61a955bf | ||
|
|
e7cf29fd9d | ||
|
|
b5d87d394a | ||
|
|
36da0e0f3d | ||
|
|
903fd7aa01 |
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/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>./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/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/BOOTMIPS.EFI</td> </tr>
|
||||||
<tr> <td>./INSTALL/EFI/BOOT/grubia32_real.efi</td>
|
<tr> <td>./INSTALL/EFI/BOOT/grubia32_real.efi</td></tr>
|
||||||
<tr> <td>./INSTALL/EFI/BOOT/grubx64_real.efi</td>
|
<tr> <td>./INSTALL/EFI/BOOT/grubx64_real.efi</td></tr>
|
||||||
<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> <td rowspan=3>upstream</td> <td rowspan=3>https://github.com/ValdikSS/Super-UEFIinSecureBoot-Disk </td> </tr>
|
||||||
<tr> <td>./INSTALL/EFI/BOOT/BOOTIA32.EFI</td>
|
<tr> <td>./INSTALL/EFI/BOOT/grubia32.efi</td></tr>
|
||||||
<tr> <td>./INSTALL/EFI/BOOT/BOOTX64.EFI</td>
|
<tr> <td>./INSTALL/EFI/BOOT/mmia32.efi</td></tr>
|
||||||
<tr> <td>./INSTALL/EFI/BOOT/grubia32.efi</td>
|
<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/mmia32.efi</td>
|
<tr> <td>./INSTALL/EFI/BOOT/mmx64.efi</td></tr>
|
||||||
<tr> <td>./INSTALL/EFI/BOOT/MokManager.efi</td>
|
|
||||||
<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/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/hexdump</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/aarch64/xzcat</td>
|
<tr> <td>./INSTALL/tool/aarch64/xzcat</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/i386/ash</td>
|
<tr> <td>./INSTALL/tool/i386/ash</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/i386/hexdump</td>
|
<tr> <td>./INSTALL/tool/i386/hexdump</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/i386/xzcat</td>
|
<tr> <td>./INSTALL/tool/i386/xzcat</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/mips64el/ash</td>
|
<tr> <td>./INSTALL/tool/mips64el/ash</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/mips64el/hexdump</td>
|
<tr> <td>./INSTALL/tool/mips64el/hexdump</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/mips64el/xzcat</td>
|
<tr> <td>./INSTALL/tool/mips64el/xzcat</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/x86_64/ash</td>
|
<tr> <td>./INSTALL/tool/x86_64/ash</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/x86_64/hexdump</td>
|
<tr> <td>./INSTALL/tool/x86_64/hexdump</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/x86_64/xzcat</td>
|
<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/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.gtk3</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/i386/Ventoy2Disk.gtk2</td>
|
<tr> <td>./INSTALL/tool/i386/Ventoy2Disk.gtk2</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/mips64el/Ventoy2Disk.gtk3</td>
|
<tr> <td>./INSTALL/tool/mips64el/Ventoy2Disk.gtk3</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/x86_64/Ventoy2Disk.gtk3</td>
|
<tr> <td>./INSTALL/tool/x86_64/Ventoy2Disk.gtk3</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/x86_64/Ventoy2Disk.gtk2</td>
|
<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/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/i386/Ventoy2Disk.qt5</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/mips64el/Ventoy2Disk.qt5</td>
|
<tr> <td>./INSTALL/tool/mips64el/Ventoy2Disk.qt5</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/x86_64/Ventoy2Disk.qt5</td>
|
<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/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/i386/Plugson</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/mips64el/Plugson</td>
|
<tr> <td>./INSTALL/tool/mips64el/Plugson</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/x86_64/Plugson</td>
|
<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/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/i386/V2DServer</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/mips64el/V2DServer</td>
|
<tr> <td>./INSTALL/tool/mips64el/V2DServer</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/x86_64/V2DServer</td>
|
<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/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/aarch64/mount.exfat-fuse</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/i386/mkexfatfs</td>
|
<tr> <td>./INSTALL/tool/i386/mkexfatfs</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/i386/mount.exfat-fuse</td>
|
<tr> <td>./INSTALL/tool/i386/mount.exfat-fuse</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/mips64el/mkexfatfs</td>
|
<tr> <td>./INSTALL/tool/mips64el/mkexfatfs</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/mips64el/mount.exfat-fuse</td>
|
<tr> <td>./INSTALL/tool/mips64el/mount.exfat-fuse</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/x86_64/mkexfatfs</td>
|
<tr> <td>./INSTALL/tool/x86_64/mkexfatfs</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/x86_64/mkexfatfs_static</td>
|
<tr> <td>./INSTALL/tool/x86_64/mkexfatfs_static</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/x86_64/mount.exfat-fuse</td>
|
<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/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/i386/vlnk</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/mips64el/vlnk</td>
|
<tr> <td>./INSTALL/tool/mips64el/vlnk</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/x86_64/vlnk</td>
|
<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/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/i386/vtoycli</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/mips64el/vtoycli</td>
|
<tr> <td>./INSTALL/tool/mips64el/vtoycli</td></tr>
|
||||||
<tr> <td>./INSTALL/tool/x86_64/vtoycli</td>
|
<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.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.exe</td></tr>
|
||||||
<tr> <td>./INSTALL/ventoy/imdisk/32/imdisk.sys</td>
|
<tr> <td>./INSTALL/ventoy/imdisk/32/imdisk.sys</td></tr>
|
||||||
<tr> <td>./INSTALL/ventoy/imdisk/64/imdisk.cpl</td>
|
<tr> <td>./INSTALL/ventoy/imdisk/64/imdisk.cpl</td></tr>
|
||||||
<tr> <td>./INSTALL/ventoy/imdisk/64/imdisk.exe</td>
|
<tr> <td>./INSTALL/ventoy/imdisk/64/imdisk.exe</td></tr>
|
||||||
<tr> <td>./INSTALL/ventoy/imdisk/64/imdisk.sys</td>
|
<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/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/udf_aa64.efi</td></tr>
|
||||||
<tr> <td>./INSTALL/ventoy/iso9660_ia32.efi</td>
|
<tr> <td>./INSTALL/ventoy/iso9660_ia32.efi</td></tr>
|
||||||
<tr> <td>./INSTALL/ventoy/udf_ia32.efi</td>
|
<tr> <td>./INSTALL/ventoy/udf_ia32.efi</td></tr>
|
||||||
<tr> <td>./INSTALL/ventoy/iso9660_x64.efi</td>
|
<tr> <td>./INSTALL/ventoy/iso9660_x64.efi</td></tr>
|
||||||
<tr> <td>./INSTALL/ventoy/udf_x64.efi</td>
|
<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.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.i386</td></tr>
|
||||||
<tr> <td>./INSTALL/VentoyGUI.mips64el</td>
|
<tr> <td>./INSTALL/VentoyGUI.mips64el</td></tr>
|
||||||
<tr> <td>./INSTALL/VentoyGUI.x86_64</td>
|
<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.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_ARM.exe</td></tr>
|
||||||
<tr> <td>./INSTALL/Ventoy2Disk_ARM64.exe</td>
|
<tr> <td>./INSTALL/Ventoy2Disk_ARM64.exe</td></tr>
|
||||||
<tr> <td>./INSTALL/Ventoy2Disk_X64.exe</td>
|
<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/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/vtoyjump64.exe</td></tr>
|
||||||
<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_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> <td>./INSTALL/ventoy/ventoy_ia32.efi</td></tr>
|
||||||
<tr> <td>./INSTALL/ventoy/ventoy_x64.efi</td>
|
<tr> <td>./INSTALL/ventoy/ventoy_x64.efi</td></tr>
|
||||||
<tr> <td>./INSTALL/ventoy/vtoyutil_aa64.efi</td>
|
<tr> <td>./INSTALL/ventoy/vtoyutil_aa64.efi</td></tr>
|
||||||
<tr> <td>./INSTALL/ventoy/vtoyutil_ia32.efi</td>
|
<tr> <td>./INSTALL/ventoy/vtoyutil_ia32.efi</td></tr>
|
||||||
<tr> <td>./INSTALL/ventoy/vtoyutil_x64.efi</td>
|
<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/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>./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>./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/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>./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/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/lunzip64</td></tr>
|
||||||
<tr> <td>./LZIP/lunzipaa64</td>
|
<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/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/lz4cataa64</td></tr>
|
||||||
<tr> <td>./LZIP/lz4catm64e</td>
|
<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/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_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_64</td></tr>
|
||||||
<tr> <td>./SQUASHFS/unsquashfs_aa64</td>
|
<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/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>./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_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_64</td></tr>
|
||||||
<tr> <td>./VBLADE/vblade-master/vblade_aa64</td>
|
<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>./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_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_64</td></tr>
|
||||||
<tr> <td>./VtoyTool/vtoytool/00/vtoytool_aa64</td>
|
<tr> <td>./VtoyTool/vtoytool/00/vtoytool_aa64</td></tr>
|
||||||
<tr> <td>./VtoyTool/vtoytool/00/vtoytool_m64e</td>
|
<tr> <td>./VtoyTool/vtoytool/00/vtoytool_m64e</td></tr>
|
||||||
<tr> <td>./VtoyTool/vtoytool/01/vtoytool_64</td>
|
<tr> <td>./VtoyTool/vtoytool/01/vtoytool_64</td></tr>
|
||||||
<tr> <td>./VtoyTool/vtoytool/02/vtoytool_64</td>
|
<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/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/zstdcat64</td></tr>
|
||||||
<tr> <td>./ZSTD/zstdcataa64</td>
|
<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/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/busybox64</td></tr>
|
||||||
<tr> <td>./IMG/cpio_x86/ventoy/busybox/xzcat32_musl</td>
|
<tr> <td>./IMG/cpio_x86/ventoy/busybox/xzcat32_musl</td></tr>
|
||||||
<tr> <td>./IMG/cpio_x86/ventoy/busybox/xzcat64_musl</td>
|
<tr> <td>./IMG/cpio_x86/ventoy/busybox/xzcat64_musl</td></tr>
|
||||||
<tr> <td>./IMG/cpio_arm64/ventoy/busybox/busyboxaa64</td>
|
<tr> <td>./IMG/cpio_arm64/ventoy/busybox/busyboxaa64</td></tr>
|
||||||
<tr> <td>./IMG/cpio_mips64/ventoy/busybox/busyboxm64e</td>
|
<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/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.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/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/32/geom_ventoy.ko</td></tr>
|
||||||
<tr> <td> ./Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/10.x/64/geom_ventoy.ko</td></tr>
|
<tr> <td> ./Unix/ventoy_unix/FreeBSD/geom_ventoy_ko/10.x/64/geom_ventoy.ko</td></tr>
|
||||||
|
|||||||
@@ -232,7 +232,7 @@
|
|||||||
SHA-256: cde08b6a2cf5ad914f05203e18e3f7c2ed6060a63604e3d75536f19b55e8e0af
|
SHA-256: cde08b6a2cf5ad914f05203e18e3f7c2ed6060a63604e3d75536f19b55e8e0af
|
||||||
|
|
||||||
5.8 imdisk
|
5.8 imdisk
|
||||||
download http://www.ltr-data.se/files/imdiskinst.exe and extract it by 7zip.
|
download http://static.ltr-data.se/files/imdiskinst_2.0.10.exe and extract it by 7zip.
|
||||||
|
|
||||||
INSTALL/ventoy/imdisk/64/imdisk.sys --> sys/amd64/imdisk.sys SHA-256: 6702202220268787e361f5a82dae53362c8e6c6dcd240bb01b44dd77ae0788da
|
INSTALL/ventoy/imdisk/64/imdisk.sys --> sys/amd64/imdisk.sys SHA-256: 6702202220268787e361f5a82dae53362c8e6c6dcd240bb01b44dd77ae0788da
|
||||||
INSTALL/ventoy/imdisk/64/imdisk.exe --> cli/amd64/imdisk.exe SHA-256: 9759175380af836869443e5f21ce2e33022125d154bc6b3d1c04dc36b190de04
|
INSTALL/ventoy/imdisk/64/imdisk.exe --> cli/amd64/imdisk.exe SHA-256: 9759175380af836869443e5f21ce2e33022125d154bc6b3d1c04dc36b190de04
|
||||||
@@ -274,3 +274,4 @@
|
|||||||
5.14 ./LiveCD/ISO/EFI/boot/vmlinuz64
|
5.14 ./LiveCD/ISO/EFI/boot/vmlinuz64
|
||||||
download from http://www.tinycorelinux.net/11.x/x86_64/archive/11.0/distribution_files/vmlinuz64
|
download from http://www.tinycorelinux.net/11.x/x86_64/archive/11.0/distribution_files/vmlinuz64
|
||||||
vmlinuz64 SHA-256: 641077fc1f9914af244c248453005f56536ba9e7f54ba3e52402f26709ddb8a5
|
vmlinuz64 SHA-256: 641077fc1f9914af244c248453005f56536ba9e7f54ba3e52402f26709ddb8a5
|
||||||
|
|
||||||
|
|||||||
55
EDK2/build_shim.sh
Normal file
55
EDK2/build_shim.sh
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
#!/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
|
||||||
|
objcopy \
|
||||||
|
--add-section .sbat="MdeModulePkg/Application/VtoyShim/sbat.csv" \
|
||||||
|
--set-section-flags .sbat=alloc,load,readonly,data \
|
||||||
|
"$VTEFI_PATH" "$DST_PATH"
|
||||||
|
|
||||||
|
objcopy --adjust-section-vma .sbat=0x1000 "$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 ==============='
|
echo '======== build EDK2 for x86_64-efi ==============='
|
||||||
sh ./build.sh || exit 1
|
sh ./build.sh || exit 1
|
||||||
|
|
||||||
|
|
||||||
|
echo '======== build EDK2 for x86_64-efi ==============='
|
||||||
|
sh ./build_shim.sh || exit 1
|
||||||
|
|
||||||
|
|||||||
@@ -7,12 +7,12 @@
|
|||||||
* modify it under the terms of the GNU General Public License as
|
* modify it under the terms of the GNU General Public License as
|
||||||
* published by the Free Software Foundation; either version 3 of the
|
* published by the Free Software Foundation; either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful, but
|
* This program is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
@@ -76,7 +76,7 @@ STATIC EFI_EXIT_BOOT_SERVICES g_org_exit_boot_service = NULL;
|
|||||||
|
|
||||||
/* Boot filename */
|
/* Boot filename */
|
||||||
UINTN gBootFileStartIndex = 1;
|
UINTN gBootFileStartIndex = 1;
|
||||||
CONST CHAR16 *gEfiBootFileName[] =
|
CONST CHAR16 *gEfiBootFileName[] =
|
||||||
{
|
{
|
||||||
L"@",
|
L"@",
|
||||||
EFI_REMOVABLE_MEDIA_FILE_NAME,
|
EFI_REMOVABLE_MEDIA_FILE_NAME,
|
||||||
@@ -101,7 +101,7 @@ CONST CHAR16 *gEfiBootFileName[] =
|
|||||||
L"\\EFI\\BOOT\\bootaa64.efi",
|
L"\\EFI\\BOOT\\bootaa64.efi",
|
||||||
L"\\efi\\boot\\bootaa64.efi",
|
L"\\efi\\boot\\bootaa64.efi",
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
VOID EFIAPI VtoyDebug(IN CONST CHAR8 *Format, ...)
|
VOID EFIAPI VtoyDebug(IN CONST CHAR8 *Format, ...)
|
||||||
@@ -112,14 +112,14 @@ VOID EFIAPI VtoyDebug(IN CONST CHAR8 *Format, ...)
|
|||||||
VA_START (Marker, Format);
|
VA_START (Marker, Format);
|
||||||
UnicodeVSPrintAsciiFormat(Buffer, sizeof(Buffer), Format, Marker);
|
UnicodeVSPrintAsciiFormat(Buffer, sizeof(Buffer), Format, Marker);
|
||||||
VA_END (Marker);
|
VA_END (Marker);
|
||||||
|
|
||||||
gST->ConOut->OutputString(gST->ConOut, Buffer);
|
gST->ConOut->OutputString(gST->ConOut, Buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
VOID EFIAPI ventoy_clear_input(VOID)
|
VOID EFIAPI ventoy_clear_input(VOID)
|
||||||
{
|
{
|
||||||
EFI_INPUT_KEY Key;
|
EFI_INPUT_KEY Key;
|
||||||
|
|
||||||
gST->ConIn->Reset(gST->ConIn, FALSE);
|
gST->ConIn->Reset(gST->ConIn, FALSE);
|
||||||
while (EFI_SUCCESS == gST->ConIn->ReadKeyStroke(gST->ConIn, &Key))
|
while (EFI_SUCCESS == gST->ConIn->ReadKeyStroke(gST->ConIn, &Key))
|
||||||
{
|
{
|
||||||
@@ -142,7 +142,7 @@ static void EFIAPI ventoy_dump_img_chunk(ventoy_chain_head *chain)
|
|||||||
for (i = 0; i < chain->img_chunk_num; i++)
|
for (i = 0; i < chain->img_chunk_num; i++)
|
||||||
{
|
{
|
||||||
debug("%2u: [ %u - %u ] <==> [ %llu - %llu ]",
|
debug("%2u: [ %u - %u ] <==> [ %llu - %llu ]",
|
||||||
i, chunk[i].img_start_sector, chunk[i].img_end_sector,
|
i, chunk[i].img_start_sector, chunk[i].img_end_sector,
|
||||||
chunk[i].disk_start_sector, chunk[i].disk_end_sector);
|
chunk[i].disk_start_sector, chunk[i].disk_end_sector);
|
||||||
|
|
||||||
if (i > 0 && (chunk[i].img_start_sector != chunk[i - 1].img_end_sector + 1))
|
if (i > 0 && (chunk[i].img_start_sector != chunk[i - 1].img_end_sector + 1))
|
||||||
@@ -161,7 +161,7 @@ static void EFIAPI ventoy_dump_img_chunk(ventoy_chain_head *chain)
|
|||||||
{
|
{
|
||||||
debug("image chunk size check failed %d", errcnt);
|
debug("image chunk size check failed %d", errcnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
ventoy_debug_pause();
|
ventoy_debug_pause();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,7 +169,7 @@ static void EFIAPI ventoy_dump_override_chunk(ventoy_chain_head *chain)
|
|||||||
{
|
{
|
||||||
UINT32 i;
|
UINT32 i;
|
||||||
ventoy_override_chunk *chunk;
|
ventoy_override_chunk *chunk;
|
||||||
|
|
||||||
chunk = (ventoy_override_chunk *)((char *)chain + chain->override_chunk_offset);
|
chunk = (ventoy_override_chunk *)((char *)chain + chain->override_chunk_offset);
|
||||||
|
|
||||||
debug("##################### ventoy_dump_override_chunk #######################");
|
debug("##################### ventoy_dump_override_chunk #######################");
|
||||||
@@ -186,7 +186,7 @@ static void EFIAPI ventoy_dump_virt_chunk(ventoy_chain_head *chain)
|
|||||||
{
|
{
|
||||||
UINT32 i;
|
UINT32 i;
|
||||||
ventoy_virt_chunk *node;
|
ventoy_virt_chunk *node;
|
||||||
|
|
||||||
debug("##################### ventoy_dump_virt_chunk #######################");
|
debug("##################### ventoy_dump_virt_chunk #######################");
|
||||||
debug("virt_chunk_offset=%u", chain->virt_chunk_offset);
|
debug("virt_chunk_offset=%u", chain->virt_chunk_offset);
|
||||||
debug("virt_chunk_num=%u", chain->virt_chunk_num);
|
debug("virt_chunk_num=%u", chain->virt_chunk_num);
|
||||||
@@ -194,7 +194,7 @@ static void EFIAPI ventoy_dump_virt_chunk(ventoy_chain_head *chain)
|
|||||||
node = (ventoy_virt_chunk *)((char *)chain + chain->virt_chunk_offset);
|
node = (ventoy_virt_chunk *)((char *)chain + chain->virt_chunk_offset);
|
||||||
for (i = 0; i < chain->virt_chunk_num; i++, node++)
|
for (i = 0; i < chain->virt_chunk_num; i++, node++)
|
||||||
{
|
{
|
||||||
debug("%2u: mem:[ %u, %u, %u ] remap:[ %u, %u, %u ]", i,
|
debug("%2u: mem:[ %u, %u, %u ] remap:[ %u, %u, %u ]", i,
|
||||||
node->mem_sector_start,
|
node->mem_sector_start,
|
||||||
node->mem_sector_end,
|
node->mem_sector_end,
|
||||||
node->mem_sector_offset,
|
node->mem_sector_offset,
|
||||||
@@ -202,7 +202,7 @@ static void EFIAPI ventoy_dump_virt_chunk(ventoy_chain_head *chain)
|
|||||||
node->remap_sector_end,
|
node->remap_sector_end,
|
||||||
node->org_sector_start);
|
node->org_sector_start);
|
||||||
}
|
}
|
||||||
|
|
||||||
ventoy_debug_pause();
|
ventoy_debug_pause();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -211,7 +211,7 @@ static void EFIAPI ventoy_dump_chain(ventoy_chain_head *chain)
|
|||||||
UINT32 i = 0;
|
UINT32 i = 0;
|
||||||
UINT8 chksum = 0;
|
UINT8 chksum = 0;
|
||||||
UINT8 *guid;
|
UINT8 *guid;
|
||||||
|
|
||||||
guid = chain->os_param.vtoy_disk_guid;
|
guid = chain->os_param.vtoy_disk_guid;
|
||||||
for (i = 0; i < sizeof(ventoy_os_param); i++)
|
for (i = 0; i < sizeof(ventoy_os_param); i++)
|
||||||
{
|
{
|
||||||
@@ -229,10 +229,10 @@ static void EFIAPI ventoy_dump_chain(ventoy_chain_head *chain)
|
|||||||
debug("os_param->vtoy_img_size=<%llu>", chain->os_param.vtoy_img_size);
|
debug("os_param->vtoy_img_size=<%llu>", chain->os_param.vtoy_img_size);
|
||||||
debug("os_param->vtoy_img_location_addr=<0x%llx>", chain->os_param.vtoy_img_location_addr);
|
debug("os_param->vtoy_img_location_addr=<0x%llx>", chain->os_param.vtoy_img_location_addr);
|
||||||
debug("os_param->vtoy_img_location_len=<%u>", chain->os_param.vtoy_img_location_len);
|
debug("os_param->vtoy_img_location_len=<%u>", chain->os_param.vtoy_img_location_len);
|
||||||
debug("os_param->vtoy_reserved=<%u %u %u %u %u %u %u>",
|
debug("os_param->vtoy_reserved=<%u %u %u %u %u %u %u>",
|
||||||
g_os_param_reserved[0],
|
g_os_param_reserved[0],
|
||||||
g_os_param_reserved[1],
|
g_os_param_reserved[1],
|
||||||
g_os_param_reserved[2],
|
g_os_param_reserved[2],
|
||||||
g_os_param_reserved[3],
|
g_os_param_reserved[3],
|
||||||
g_os_param_reserved[4],
|
g_os_param_reserved[4],
|
||||||
g_os_param_reserved[5],
|
g_os_param_reserved[5],
|
||||||
@@ -240,7 +240,7 @@ static void EFIAPI ventoy_dump_chain(ventoy_chain_head *chain)
|
|||||||
);
|
);
|
||||||
|
|
||||||
ventoy_debug_pause();
|
ventoy_debug_pause();
|
||||||
|
|
||||||
debug("chain->disk_drive=0x%x", chain->disk_drive);
|
debug("chain->disk_drive=0x%x", chain->disk_drive);
|
||||||
debug("chain->disk_sector_size=%u", chain->disk_sector_size);
|
debug("chain->disk_sector_size=%u", chain->disk_sector_size);
|
||||||
debug("chain->real_img_size_in_bytes=%llu", chain->real_img_size_in_bytes);
|
debug("chain->real_img_size_in_bytes=%llu", chain->real_img_size_in_bytes);
|
||||||
@@ -252,7 +252,7 @@ static void EFIAPI ventoy_dump_chain(ventoy_chain_head *chain)
|
|||||||
debug("chain->override_chunk_num=%u", chain->override_chunk_num);
|
debug("chain->override_chunk_num=%u", chain->override_chunk_num);
|
||||||
|
|
||||||
ventoy_debug_pause();
|
ventoy_debug_pause();
|
||||||
|
|
||||||
ventoy_dump_img_chunk(chain);
|
ventoy_dump_img_chunk(chain);
|
||||||
ventoy_dump_override_chunk(chain);
|
ventoy_dump_override_chunk(chain);
|
||||||
ventoy_dump_virt_chunk(chain);
|
ventoy_dump_virt_chunk(chain);
|
||||||
@@ -344,7 +344,7 @@ EFI_HANDLE EFIAPI ventoy_get_parent_handle(IN EFI_DEVICE_PATH_PROTOCOL *pDevPath
|
|||||||
EFI_DEVICE_PATH_PROTOCOL *pLastNode = NULL;
|
EFI_DEVICE_PATH_PROTOCOL *pLastNode = NULL;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *pCurNode = NULL;
|
EFI_DEVICE_PATH_PROTOCOL *pCurNode = NULL;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *pTmpDevPath = NULL;
|
EFI_DEVICE_PATH_PROTOCOL *pTmpDevPath = NULL;
|
||||||
|
|
||||||
pTmpDevPath = DuplicateDevicePath(pDevPath);
|
pTmpDevPath = DuplicateDevicePath(pDevPath);
|
||||||
if (!pTmpDevPath)
|
if (!pTmpDevPath)
|
||||||
{
|
{
|
||||||
@@ -387,8 +387,8 @@ EFI_STATUS EFIAPI ventoy_save_ramdisk_param(VOID)
|
|||||||
{
|
{
|
||||||
debug("find previous ramdisk variable <%llu>", g_backup_ramdisk_param.DiskSize);
|
debug("find previous ramdisk variable <%llu>", g_backup_ramdisk_param.DiskSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = gRT->SetVariable(L"VentoyRamDisk", &VarGuid,
|
Status = gRT->SetVariable(L"VentoyRamDisk", &VarGuid,
|
||||||
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
||||||
sizeof(g_ramdisk_param), &(g_ramdisk_param));
|
sizeof(g_ramdisk_param), &(g_ramdisk_param));
|
||||||
debug("set ramdisk variable %r", Status);
|
debug("set ramdisk variable %r", Status);
|
||||||
@@ -403,14 +403,14 @@ EFI_STATUS EFIAPI ventoy_delete_ramdisk_param(VOID)
|
|||||||
|
|
||||||
if (g_backup_ramdisk_param.DiskSize > 0 && g_backup_ramdisk_param.PhyAddr > 0)
|
if (g_backup_ramdisk_param.DiskSize > 0 && g_backup_ramdisk_param.PhyAddr > 0)
|
||||||
{
|
{
|
||||||
Status = gRT->SetVariable(L"VentoyRamDisk", &VarGuid,
|
Status = gRT->SetVariable(L"VentoyRamDisk", &VarGuid,
|
||||||
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
||||||
sizeof(g_backup_ramdisk_param), &g_backup_ramdisk_param);
|
sizeof(g_backup_ramdisk_param), &g_backup_ramdisk_param);
|
||||||
debug("resotre ramdisk variable %r", Status);
|
debug("resotre ramdisk variable %r", Status);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Status = gRT->SetVariable(L"VentoyRamDisk", &VarGuid,
|
Status = gRT->SetVariable(L"VentoyRamDisk", &VarGuid,
|
||||||
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
||||||
0, NULL);
|
0, NULL);
|
||||||
debug("delete ramdisk variable %r", Status);
|
debug("delete ramdisk variable %r", Status);
|
||||||
@@ -432,7 +432,7 @@ EFI_STATUS EFIAPI ventoy_save_variable(VOID)
|
|||||||
debug("find previous efi variable <%a>", g_backup_os_param_var.vtoy_img_path);
|
debug("find previous efi variable <%a>", g_backup_os_param_var.vtoy_img_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = gRT->SetVariable(L"VentoyOsParam", &VarGuid,
|
Status = gRT->SetVariable(L"VentoyOsParam", &VarGuid,
|
||||||
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
||||||
sizeof(g_chain->os_param), &(g_chain->os_param));
|
sizeof(g_chain->os_param), &(g_chain->os_param));
|
||||||
debug("set efi variable %r", Status);
|
debug("set efi variable %r", Status);
|
||||||
@@ -447,14 +447,14 @@ EFI_STATUS EFIAPI ventoy_delete_variable(VOID)
|
|||||||
|
|
||||||
if (0 == CompareMem(&(g_backup_os_param_var.guid), &VarGuid, sizeof(EFI_GUID)))
|
if (0 == CompareMem(&(g_backup_os_param_var.guid), &VarGuid, sizeof(EFI_GUID)))
|
||||||
{
|
{
|
||||||
Status = gRT->SetVariable(L"VentoyOsParam", &VarGuid,
|
Status = gRT->SetVariable(L"VentoyOsParam", &VarGuid,
|
||||||
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
||||||
sizeof(g_backup_os_param_var), &(g_backup_os_param_var));
|
sizeof(g_backup_os_param_var), &(g_backup_os_param_var));
|
||||||
debug("restore efi variable %r", Status);
|
debug("restore efi variable %r", Status);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Status = gRT->SetVariable(L"VentoyOsParam", &VarGuid,
|
Status = gRT->SetVariable(L"VentoyOsParam", &VarGuid,
|
||||||
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
||||||
0, NULL);
|
0, NULL);
|
||||||
debug("delete efi variable %r", Status);
|
debug("delete efi variable %r", Status);
|
||||||
@@ -481,7 +481,7 @@ STATIC VOID ventoy_warn_invalid_device(VOID)
|
|||||||
|
|
||||||
gST->ConOut->OutputString(gST->ConOut, L"This is NOT a standard Ventoy device and is NOT supported.\r\n\r\n");
|
gST->ConOut->OutputString(gST->ConOut, L"This is NOT a standard Ventoy device and is NOT supported.\r\n\r\n");
|
||||||
gST->ConOut->OutputString(gST->ConOut, L"You should follow the official instructions in https://www.ventoy.net\r\n");
|
gST->ConOut->OutputString(gST->ConOut, L"You should follow the official instructions in https://www.ventoy.net\r\n");
|
||||||
|
|
||||||
gST->ConOut->OutputString(gST->ConOut, L"\r\n\r\nWill exit after 10 seconds ...... ");
|
gST->ConOut->OutputString(gST->ConOut, L"\r\n\r\nWill exit after 10 seconds ...... ");
|
||||||
|
|
||||||
sleep(10);
|
sleep(10);
|
||||||
@@ -489,7 +489,7 @@ STATIC VOID ventoy_warn_invalid_device(VOID)
|
|||||||
#else
|
#else
|
||||||
STATIC VOID ventoy_warn_invalid_device(VOID)
|
STATIC VOID ventoy_warn_invalid_device(VOID)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -513,19 +513,19 @@ STATIC EFI_STATUS EFIAPI ventoy_load_image
|
|||||||
pFilePath->Header.Length[0] = FileNameLen + sizeof(EFI_DEVICE_PATH_PROTOCOL);
|
pFilePath->Header.Length[0] = FileNameLen + sizeof(EFI_DEVICE_PATH_PROTOCOL);
|
||||||
pFilePath->Header.Length[1] = 0;
|
pFilePath->Header.Length[1] = 0;
|
||||||
CopyMem(pFilePath->PathName, FileName, FileNameLen);
|
CopyMem(pFilePath->PathName, FileName, FileNameLen);
|
||||||
|
|
||||||
pImgPath = AppendDevicePathNode(pDevicePath, (EFI_DEVICE_PATH_PROTOCOL *)pFilePath);
|
pImgPath = AppendDevicePathNode(pDevicePath, (EFI_DEVICE_PATH_PROTOCOL *)pFilePath);
|
||||||
if (!pImgPath)
|
if (!pImgPath)
|
||||||
{
|
{
|
||||||
return EFI_NOT_FOUND;
|
return EFI_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = gBS->LoadImage(FALSE, ImageHandle, pImgPath, NULL, 0, Image);
|
Status = gBS->LoadImage(FALSE, ImageHandle, pImgPath, NULL, 0, Image);
|
||||||
|
|
||||||
debug("Load Image File %r DP: <%s>", Status, ConvertDevicePathToText(pImgPath, FALSE, FALSE));
|
debug("Load Image File %r DP: <%s>", Status, ConvertDevicePathToText(pImgPath, FALSE, FALSE));
|
||||||
|
|
||||||
FreePool(pImgPath);
|
FreePool(pImgPath);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -547,7 +547,7 @@ STATIC EFI_STATUS EFIAPI ventoy_find_iso_disk(IN EFI_HANDLE ImageHandle)
|
|||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiBlockIoProtocolGuid,
|
Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiBlockIoProtocolGuid,
|
||||||
NULL, &Count, &Handles);
|
NULL, &Count, &Handles);
|
||||||
if (EFI_ERROR(Status))
|
if (EFI_ERROR(Status))
|
||||||
{
|
{
|
||||||
@@ -591,16 +591,16 @@ STATIC EFI_STATUS EFIAPI ventoy_find_iso_disk(IN EFI_HANDLE ImageHandle)
|
|||||||
ventoy_warn_invalid_device();
|
ventoy_warn_invalid_device();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gBlockData.RawBlockIoHandle = Handles[i];
|
gBlockData.RawBlockIoHandle = Handles[i];
|
||||||
gBlockData.pRawBlockIo = pBlockIo;
|
gBlockData.pRawBlockIo = pBlockIo;
|
||||||
gBS->OpenProtocol(Handles[i], &gEfiDevicePathProtocolGuid,
|
gBS->OpenProtocol(Handles[i], &gEfiDevicePathProtocolGuid,
|
||||||
(VOID **)&(gBlockData.pDiskDevPath),
|
(VOID **)&(gBlockData.pDiskDevPath),
|
||||||
ImageHandle,
|
ImageHandle,
|
||||||
Handles[i],
|
Handles[i],
|
||||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL);
|
EFI_OPEN_PROTOCOL_GET_PROTOCOL);
|
||||||
|
|
||||||
debug("Find Ventoy Disk Sig Handle:%p DP:%s", Handles[i],
|
debug("Find Ventoy Disk Sig Handle:%p DP:%s", Handles[i],
|
||||||
ConvertDevicePathToText(gBlockData.pDiskDevPath, FALSE, FALSE));
|
ConvertDevicePathToText(gBlockData.pDiskDevPath, FALSE, FALSE));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -629,7 +629,7 @@ STATIC EFI_STATUS EFIAPI ventoy_find_iso_disk_fs(IN EFI_HANDLE ImageHandle)
|
|||||||
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *pFile = NULL;
|
EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *pFile = NULL;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *pDevPath = NULL;
|
EFI_DEVICE_PATH_PROTOCOL *pDevPath = NULL;
|
||||||
|
|
||||||
Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiSimpleFileSystemProtocolGuid,
|
Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiSimpleFileSystemProtocolGuid,
|
||||||
NULL, &Count, &Handles);
|
NULL, &Count, &Handles);
|
||||||
if (EFI_ERROR(Status))
|
if (EFI_ERROR(Status))
|
||||||
{
|
{
|
||||||
@@ -646,7 +646,7 @@ STATIC EFI_STATUS EFIAPI ventoy_find_iso_disk_fs(IN EFI_HANDLE ImageHandle)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = gBS->OpenProtocol(Handles[i], &gEfiDevicePathProtocolGuid,
|
Status = gBS->OpenProtocol(Handles[i], &gEfiDevicePathProtocolGuid,
|
||||||
(VOID **)&pDevPath,
|
(VOID **)&pDevPath,
|
||||||
ImageHandle,
|
ImageHandle,
|
||||||
Handles[i],
|
Handles[i],
|
||||||
@@ -683,29 +683,29 @@ STATIC EFI_STATUS EFIAPI ventoy_load_isoefi_driver(IN EFI_HANDLE ImageHandle)
|
|||||||
|
|
||||||
if (gIsoUdf)
|
if (gIsoUdf)
|
||||||
{
|
{
|
||||||
Status = ventoy_load_image(ImageHandle, gBlockData.pDiskFsDevPath,
|
Status = ventoy_load_image(ImageHandle, gBlockData.pDiskFsDevPath,
|
||||||
gUdfEfiDriverPath,
|
gUdfEfiDriverPath,
|
||||||
sizeof(gUdfEfiDriverPath),
|
sizeof(gUdfEfiDriverPath),
|
||||||
&Image);
|
&Image);
|
||||||
debug("load iso UDF efi driver status:%r", Status);
|
debug("load iso UDF efi driver status:%r", Status);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Status = ventoy_load_image(ImageHandle, gBlockData.pDiskFsDevPath,
|
Status = ventoy_load_image(ImageHandle, gBlockData.pDiskFsDevPath,
|
||||||
gIso9660EfiDriverPath,
|
gIso9660EfiDriverPath,
|
||||||
sizeof(gIso9660EfiDriverPath),
|
sizeof(gIso9660EfiDriverPath),
|
||||||
&Image);
|
&Image);
|
||||||
debug("load iso 9660 efi driver status:%r", Status);
|
debug("load iso 9660 efi driver status:%r", Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gDebugPrint)
|
if (gDebugPrint)
|
||||||
{
|
{
|
||||||
gRT->SetVariable(L"FS_LOGGING", &gShellVariableGuid,
|
gRT->SetVariable(L"FS_LOGGING", &gShellVariableGuid,
|
||||||
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
||||||
sizeof(LogVar), LogVar);
|
sizeof(LogVar), LogVar);
|
||||||
}
|
}
|
||||||
|
|
||||||
gRT->SetVariable(L"FS_NAME_NOCASE", &gShellVariableGuid,
|
gRT->SetVariable(L"FS_NAME_NOCASE", &gShellVariableGuid,
|
||||||
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
||||||
sizeof(LogVar), LogVar);
|
sizeof(LogVar), LogVar);
|
||||||
|
|
||||||
@@ -732,7 +732,7 @@ STATIC EFI_STATUS ventoy_proc_img_replace_name(ventoy_grub_param_file_replace *r
|
|||||||
}
|
}
|
||||||
|
|
||||||
AsciiStrCpyS(tmp, sizeof(tmp), replace->old_file_name[0]);
|
AsciiStrCpyS(tmp, sizeof(tmp), replace->old_file_name[0]);
|
||||||
|
|
||||||
for (i = 0; i < 256 && tmp[i]; i++)
|
for (i = 0; i < 256 && tmp[i]; i++)
|
||||||
{
|
{
|
||||||
if (tmp[i] == '/')
|
if (tmp[i] == '/')
|
||||||
@@ -755,7 +755,7 @@ EFI_STATUS EFIAPI ventoy_get_variable_wrapper
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status = EFI_SUCCESS;
|
EFI_STATUS Status = EFI_SUCCESS;
|
||||||
|
|
||||||
Status = g_org_get_variable(VariableName, VendorGuid, Attributes, DataSize, Data);
|
Status = g_org_get_variable(VariableName, VendorGuid, Attributes, DataSize, Data);
|
||||||
if (StrCmp(VariableName, L"SecureBoot") == 0)
|
if (StrCmp(VariableName, L"SecureBoot") == 0)
|
||||||
{
|
{
|
||||||
@@ -779,7 +779,7 @@ EFI_STATUS EFIAPI ventoy_exit_boot_service_wrapper
|
|||||||
gRT->GetVariable = g_org_get_variable;
|
gRT->GetVariable = g_org_get_variable;
|
||||||
g_org_get_variable = NULL;
|
g_org_get_variable = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return g_org_exit_boot_service(ImageHandle, MapKey);
|
return g_org_exit_boot_service(ImageHandle, MapKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -803,12 +803,12 @@ STATIC EFI_STATUS EFIAPI ventoy_disable_secure_boot(IN EFI_HANDLE ImageHandle)
|
|||||||
|
|
||||||
/* step1: wrapper security protocol. */
|
/* step1: wrapper security protocol. */
|
||||||
/* Do we still need it since we have been loaded ? */
|
/* Do we still need it since we have been loaded ? */
|
||||||
|
|
||||||
|
|
||||||
/* step2: fake SecureBoot variable */
|
/* step2: fake SecureBoot variable */
|
||||||
g_org_exit_boot_service = gBS->ExitBootServices;
|
g_org_exit_boot_service = gBS->ExitBootServices;
|
||||||
gBS->ExitBootServices = ventoy_exit_boot_service_wrapper;
|
gBS->ExitBootServices = ventoy_exit_boot_service_wrapper;
|
||||||
|
|
||||||
g_org_get_variable = gRT->GetVariable;
|
g_org_get_variable = gRT->GetVariable;
|
||||||
gRT->GetVariable = ventoy_get_variable_wrapper;
|
gRT->GetVariable = ventoy_get_variable_wrapper;
|
||||||
|
|
||||||
@@ -817,7 +817,7 @@ STATIC EFI_STATUS EFIAPI ventoy_disable_secure_boot(IN EFI_HANDLE ImageHandle)
|
|||||||
|
|
||||||
|
|
||||||
STATIC EFI_STATUS EFIAPI ventoy_parse_cmdline(IN EFI_HANDLE ImageHandle)
|
STATIC EFI_STATUS EFIAPI ventoy_parse_cmdline(IN EFI_HANDLE ImageHandle)
|
||||||
{
|
{
|
||||||
UINT32 i = 0;
|
UINT32 i = 0;
|
||||||
UINT32 old_cnt = 0;
|
UINT32 old_cnt = 0;
|
||||||
UINTN size = 0;
|
UINTN size = 0;
|
||||||
@@ -846,12 +846,12 @@ STATIC EFI_STATUS EFIAPI ventoy_parse_cmdline(IN EFI_HANDLE ImageHandle)
|
|||||||
{
|
{
|
||||||
gDebugPrint = TRUE;
|
gDebugPrint = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StrStr(pCmdLine, L"fallback"))
|
if (StrStr(pCmdLine, L"fallback"))
|
||||||
{
|
{
|
||||||
gBootFallBack = TRUE;
|
gBootFallBack = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StrStr(pCmdLine, L"dotefi"))
|
if (StrStr(pCmdLine, L"dotefi"))
|
||||||
{
|
{
|
||||||
gDotEfiBoot = TRUE;
|
gDotEfiBoot = TRUE;
|
||||||
@@ -861,7 +861,7 @@ STATIC EFI_STATUS EFIAPI ventoy_parse_cmdline(IN EFI_HANDLE ImageHandle)
|
|||||||
{
|
{
|
||||||
gLoadIsoEfi = TRUE;
|
gLoadIsoEfi = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StrStr(pCmdLine, L"iso_udf"))
|
if (StrStr(pCmdLine, L"iso_udf"))
|
||||||
{
|
{
|
||||||
gIsoUdf = TRUE;
|
gIsoUdf = TRUE;
|
||||||
@@ -899,7 +899,7 @@ STATIC EFI_STATUS EFIAPI ventoy_parse_cmdline(IN EFI_HANDLE ImageHandle)
|
|||||||
{
|
{
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
pGrubParam = (ventoy_grub_param *)StrHexToUintn(pPos + StrLen(L"env_param="));
|
pGrubParam = (ventoy_grub_param *)StrHexToUintn(pPos + StrLen(L"env_param="));
|
||||||
grub_env_set = pGrubParam->grub_env_set;
|
grub_env_set = pGrubParam->grub_env_set;
|
||||||
grub_env_get = pGrubParam->grub_env_get;
|
grub_env_get = pGrubParam->grub_env_get;
|
||||||
@@ -914,7 +914,7 @@ STATIC EFI_STATUS EFIAPI ventoy_parse_cmdline(IN EFI_HANDLE ImageHandle)
|
|||||||
ventoy_warn_invalid_device();
|
ventoy_warn_invalid_device();
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_file_replace_list = &pGrubParam->file_replace;
|
g_file_replace_list = &pGrubParam->file_replace;
|
||||||
old_cnt = g_file_replace_list->old_file_cnt;
|
old_cnt = g_file_replace_list->old_file_cnt;
|
||||||
debug("file replace: magic:0x%x virtid:%u name count:%u <%a> <%a> <%a> <%a>",
|
debug("file replace: magic:0x%x virtid:%u name count:%u <%a> <%a> <%a> <%a>",
|
||||||
@@ -927,7 +927,7 @@ STATIC EFI_STATUS EFIAPI ventoy_parse_cmdline(IN EFI_HANDLE ImageHandle)
|
|||||||
old_cnt > 3 ? g_file_replace_list->old_file_name[3] : ""
|
old_cnt > 3 ? g_file_replace_list->old_file_name[3] : ""
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
for (i = 0; i < VTOY_MAX_CONF_REPLACE; i++)
|
for (i = 0; i < VTOY_MAX_CONF_REPLACE; i++)
|
||||||
{
|
{
|
||||||
replace = pGrubParam->img_replace + i;
|
replace = pGrubParam->img_replace + i;
|
||||||
@@ -948,7 +948,7 @@ STATIC EFI_STATUS EFIAPI ventoy_parse_cmdline(IN EFI_HANDLE ImageHandle)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pPos = StrStr(pCmdLine, L"mem:");
|
pPos = StrStr(pCmdLine, L"mem:");
|
||||||
chain = (ventoy_chain_head *)StrHexToUintn(pPos + 4);
|
chain = (ventoy_chain_head *)StrHexToUintn(pPos + 4);
|
||||||
|
|
||||||
@@ -977,7 +977,7 @@ STATIC EFI_STATUS EFIAPI ventoy_parse_cmdline(IN EFI_HANDLE ImageHandle)
|
|||||||
debug("This is normal mode");
|
debug("This is normal mode");
|
||||||
g_chain = AllocatePool(size);
|
g_chain = AllocatePool(size);
|
||||||
CopyMem(g_chain, chain, size);
|
CopyMem(g_chain, chain, size);
|
||||||
|
|
||||||
g_chunk = (ventoy_img_chunk *)((char *)g_chain + g_chain->img_chunk_offset);
|
g_chunk = (ventoy_img_chunk *)((char *)g_chain + g_chain->img_chunk_offset);
|
||||||
g_img_chunk_num = g_chain->img_chunk_num;
|
g_img_chunk_num = g_chain->img_chunk_num;
|
||||||
g_override_chunk = (ventoy_override_chunk *)((char *)g_chain + g_chain->override_chunk_offset);
|
g_override_chunk = (ventoy_override_chunk *)((char *)g_chain + g_chain->override_chunk_offset);
|
||||||
@@ -997,7 +997,7 @@ STATIC EFI_STATUS EFIAPI ventoy_parse_cmdline(IN EFI_HANDLE ImageHandle)
|
|||||||
{
|
{
|
||||||
g_hook_keyboard = TRUE;
|
g_hook_keyboard = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_os_param_reserved[5] == 1 && g_os_param_reserved[2] == ventoy_chain_linux)
|
if (g_os_param_reserved[5] == 1 && g_os_param_reserved[2] == ventoy_chain_linux)
|
||||||
{
|
{
|
||||||
ventoy_disable_secure_boot(ImageHandle);
|
ventoy_disable_secure_boot(ImageHandle);
|
||||||
@@ -1024,7 +1024,7 @@ STATIC EFI_STATUS EFIAPI ventoy_parse_cmdline(IN EFI_HANDLE ImageHandle)
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_fix_windows_1st_cdrom_issue = FALSE;
|
g_fix_windows_1st_cdrom_issue = FALSE;
|
||||||
if (ventoy_chain_windows == g_os_param_reserved[2] ||
|
if (ventoy_chain_windows == g_os_param_reserved[2] ||
|
||||||
ventoy_chain_wim == g_os_param_reserved[2])
|
ventoy_chain_wim == g_os_param_reserved[2])
|
||||||
{
|
{
|
||||||
if (ventoy_is_cdrom_dp_exist())
|
if (ventoy_is_cdrom_dp_exist())
|
||||||
@@ -1066,7 +1066,7 @@ EFI_STATUS EFIAPI ventoy_clean_env(VOID)
|
|||||||
|
|
||||||
if (!gMemdiskMode)
|
if (!gMemdiskMode)
|
||||||
{
|
{
|
||||||
FreePool(g_chain);
|
FreePool(g_chain);
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
@@ -1126,7 +1126,7 @@ EFI_STATUS EFIAPI ventoy_boot(IN EFI_HANDLE ImageHandle)
|
|||||||
Count = 0;
|
Count = 0;
|
||||||
Handles = NULL;
|
Handles = NULL;
|
||||||
|
|
||||||
Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiSimpleFileSystemProtocolGuid,
|
Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiSimpleFileSystemProtocolGuid,
|
||||||
NULL, &Count, &Handles);
|
NULL, &Count, &Handles);
|
||||||
if (EFI_ERROR(Status))
|
if (EFI_ERROR(Status))
|
||||||
{
|
{
|
||||||
@@ -1145,7 +1145,7 @@ EFI_STATUS EFIAPI ventoy_boot(IN EFI_HANDLE ImageHandle)
|
|||||||
|
|
||||||
debug("FS:%u Protocol:%p OpenVolume:%p", i, pFile, pFile->OpenVolume);
|
debug("FS:%u Protocol:%p OpenVolume:%p", i, pFile, pFile->OpenVolume);
|
||||||
|
|
||||||
Status = gBS->OpenProtocol(Handles[i], &gEfiDevicePathProtocolGuid,
|
Status = gBS->OpenProtocol(Handles[i], &gEfiDevicePathProtocolGuid,
|
||||||
(VOID **)&pDevPath,
|
(VOID **)&pDevPath,
|
||||||
ImageHandle,
|
ImageHandle,
|
||||||
Handles[i],
|
Handles[i],
|
||||||
@@ -1165,7 +1165,7 @@ EFI_STATUS EFIAPI ventoy_boot(IN EFI_HANDLE ImageHandle)
|
|||||||
|
|
||||||
for (j = gBootFileStartIndex; j < ARRAY_SIZE(gEfiBootFileName); j++)
|
for (j = gBootFileStartIndex; j < ARRAY_SIZE(gEfiBootFileName); j++)
|
||||||
{
|
{
|
||||||
Status = ventoy_load_image(ImageHandle, pDevPath, gEfiBootFileName[j],
|
Status = ventoy_load_image(ImageHandle, pDevPath, gEfiBootFileName[j],
|
||||||
StrSize(gEfiBootFileName[j]), &Image);
|
StrSize(gEfiBootFileName[j]), &Image);
|
||||||
if (EFI_SUCCESS == Status)
|
if (EFI_SUCCESS == Status)
|
||||||
{
|
{
|
||||||
@@ -1187,7 +1187,7 @@ EFI_STATUS EFIAPI ventoy_boot(IN EFI_HANDLE ImageHandle)
|
|||||||
{
|
{
|
||||||
gST->ConIn->Reset(gST->ConIn, FALSE);
|
gST->ConIn->Reset(gST->ConIn, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((g_file_replace_list && g_file_replace_list->magic == GRUB_FILE_REPLACE_MAGIC) || g_img_replace_list)
|
if ((g_file_replace_list && g_file_replace_list->magic == GRUB_FILE_REPLACE_MAGIC) || g_img_replace_list)
|
||||||
{
|
{
|
||||||
ventoy_wrapper_push_openvolume(pFile->OpenVolume);
|
ventoy_wrapper_push_openvolume(pFile->OpenVolume);
|
||||||
@@ -1199,7 +1199,7 @@ EFI_STATUS EFIAPI ventoy_boot(IN EFI_HANDLE ImageHandle)
|
|||||||
//ventoy_wrapper_system();
|
//ventoy_wrapper_system();
|
||||||
Status = gBS->StartImage(Image, NULL, NULL);
|
Status = gBS->StartImage(Image, NULL, NULL);
|
||||||
ventoy_hook_stop();
|
ventoy_hook_stop();
|
||||||
|
|
||||||
if (EFI_ERROR(Status))
|
if (EFI_ERROR(Status))
|
||||||
{
|
{
|
||||||
debug("Failed to start image %r", Status);
|
debug("Failed to start image %r", Status);
|
||||||
@@ -1217,7 +1217,7 @@ EFI_STATUS EFIAPI ventoy_boot(IN EFI_HANDLE ImageHandle)
|
|||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
debug("Fs not found, now wait and retry...");
|
debug("Fs not found, now wait and retry...");
|
||||||
sleep(1);
|
sleep(1);
|
||||||
}
|
}
|
||||||
@@ -1231,6 +1231,32 @@ EFI_STATUS EFIAPI ventoy_boot(IN EFI_HANDLE ImageHandle)
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined (MDE_CPU_X64)
|
||||||
|
STATIC BOOLEAN EFIAPI CheckVtoyShim(VOID)
|
||||||
|
{
|
||||||
|
UINT8 SecureBoot = 0;
|
||||||
|
UINTN DataSize;
|
||||||
|
EFI_STATUS Status;
|
||||||
|
EFI_GUID Guid = VTOY_SHIM_POLICY_GUID;
|
||||||
|
VOID *Prot = NULL;
|
||||||
|
|
||||||
|
DataSize = sizeof(SecureBoot);
|
||||||
|
Status = gST->RuntimeServices->GetVariable(L"SecureBoot", &gEfiGlobalVariableGuid, NULL,
|
||||||
|
&DataSize, &SecureBoot);
|
||||||
|
if (!EFI_ERROR(Status) && SecureBoot)
|
||||||
|
{
|
||||||
|
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
|
EFI_STATUS EFIAPI VentoyEfiMain
|
||||||
(
|
(
|
||||||
IN EFI_HANDLE ImageHandle,
|
IN EFI_HANDLE ImageHandle,
|
||||||
@@ -1239,7 +1265,16 @@ EFI_STATUS EFIAPI VentoyEfiMain
|
|||||||
{
|
{
|
||||||
EFI_STATUS Status = EFI_SUCCESS;
|
EFI_STATUS Status = EFI_SUCCESS;
|
||||||
EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *Protocol;
|
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_num = 512; /* initial value */
|
||||||
|
|
||||||
g_sector_flag = AllocatePool(g_sector_flag_num * sizeof(ventoy_sector_flag));
|
g_sector_flag = AllocatePool(g_sector_flag_num * sizeof(ventoy_sector_flag));
|
||||||
@@ -1263,6 +1298,11 @@ EFI_STATUS EFIAPI VentoyEfiMain
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (g_os_param_reserved[11])
|
||||||
|
{
|
||||||
|
ventoy_lock_res(g_os_param_reserved[11]);
|
||||||
|
}
|
||||||
|
|
||||||
ventoy_disable_ex_filesystem();
|
ventoy_disable_ex_filesystem();
|
||||||
|
|
||||||
if (gMemdiskMode)
|
if (gMemdiskMode)
|
||||||
@@ -1278,12 +1318,12 @@ EFI_STATUS EFIAPI VentoyEfiMain
|
|||||||
ventoy_find_iso_disk_fs(ImageHandle);
|
ventoy_find_iso_disk_fs(ImageHandle);
|
||||||
ventoy_load_isoefi_driver(ImageHandle);
|
ventoy_load_isoefi_driver(ImageHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
ventoy_install_blockio(ImageHandle, g_iso_buf_size);
|
ventoy_install_blockio(ImageHandle, g_iso_buf_size);
|
||||||
ventoy_debug_pause();
|
ventoy_debug_pause();
|
||||||
|
|
||||||
Status = ventoy_boot(ImageHandle);
|
Status = ventoy_boot(ImageHandle);
|
||||||
|
|
||||||
ventoy_delete_ramdisk_param();
|
ventoy_delete_ramdisk_param();
|
||||||
|
|
||||||
if (gLoadIsoEfi && gBlockData.IsoDriverImage)
|
if (gLoadIsoEfi && gBlockData.IsoDriverImage)
|
||||||
@@ -1310,14 +1350,14 @@ EFI_STATUS EFIAPI VentoyEfiMain
|
|||||||
}
|
}
|
||||||
|
|
||||||
ventoy_debug_pause();
|
ventoy_debug_pause();
|
||||||
|
|
||||||
ventoy_install_blockio(ImageHandle, g_chain->virt_img_size_in_bytes);
|
ventoy_install_blockio(ImageHandle, g_chain->virt_img_size_in_bytes);
|
||||||
|
|
||||||
ventoy_debug_pause();
|
ventoy_debug_pause();
|
||||||
|
|
||||||
Status = ventoy_boot(ImageHandle);
|
Status = ventoy_boot(ImageHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
ventoy_clean_env();
|
ventoy_clean_env();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1330,17 +1370,22 @@ EFI_STATUS EFIAPI VentoyEfiMain
|
|||||||
sleep(30);
|
sleep(30);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ventoy_clear_input();
|
ventoy_clear_input();
|
||||||
gST->ConOut->ClearScreen(gST->ConOut);
|
gST->ConOut->ClearScreen(gST->ConOut);
|
||||||
|
|
||||||
if (gDotEfiBoot && (EFI_NOT_FOUND == Status))
|
if (gDotEfiBoot && (EFI_NOT_FOUND == Status))
|
||||||
{
|
{
|
||||||
grub_env_set("vtoy_dotefi_retry", "YES");
|
grub_env_set("vtoy_dotefi_retry", "YES");
|
||||||
}
|
}
|
||||||
|
|
||||||
ventoy_enable_ex_filesystem();
|
ventoy_enable_ex_filesystem();
|
||||||
|
|
||||||
|
if (g_os_param_reserved[11])
|
||||||
|
{
|
||||||
|
ventoy_unlock_res();
|
||||||
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,22 +7,24 @@
|
|||||||
* modify it under the terms of the GNU General Public License as
|
* modify it under the terms of the GNU General Public License as
|
||||||
* published by the Free Software Foundation; either version 3 of the
|
* published by the Free Software Foundation; either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful, but
|
* This program is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __VENTOY_H__
|
#ifndef __VENTOY_H__
|
||||||
#define __VENTOY_H__
|
#define __VENTOY_H__
|
||||||
|
|
||||||
#define COMPILE_ASSERT(expr) extern char __compile_assert[(expr) ? 1 : -1]
|
#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 }}
|
#define VENTOY_GUID { 0x77772020, 0x2e77, 0x6576, { 0x6e, 0x74, 0x6f, 0x79, 0x2e, 0x6e, 0x65, 0x74 }}
|
||||||
|
|
||||||
typedef enum ventoy_chain_type
|
typedef enum ventoy_chain_type
|
||||||
@@ -54,7 +56,7 @@ typedef struct ventoy_image_disk_region
|
|||||||
typedef struct ventoy_image_location
|
typedef struct ventoy_image_location
|
||||||
{
|
{
|
||||||
ventoy_guid guid;
|
ventoy_guid guid;
|
||||||
|
|
||||||
/* image sector size, currently this value is always 2048 */
|
/* image sector size, currently this value is always 2048 */
|
||||||
UINT32 image_sector_size;
|
UINT32 image_sector_size;
|
||||||
|
|
||||||
@@ -62,10 +64,10 @@ typedef struct ventoy_image_location
|
|||||||
UINT32 disk_sector_size;
|
UINT32 disk_sector_size;
|
||||||
|
|
||||||
UINT32 region_count;
|
UINT32 region_count;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* disk region data
|
* disk region data
|
||||||
* If the image file has more than one fragments in disk,
|
* If the image file has more than one fragments in disk,
|
||||||
* there will be more than one region data here.
|
* there will be more than one region data here.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -86,7 +88,7 @@ typedef struct ventoy_os_param
|
|||||||
char vtoy_img_path[384]; // It seems to be enough, utf-8 format
|
char vtoy_img_path[384]; // It seems to be enough, utf-8 format
|
||||||
UINT64 vtoy_img_size; // image file size in bytes
|
UINT64 vtoy_img_size; // image file size in bytes
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ventoy will write a copy of ventoy_image_location data into runtime memory
|
* Ventoy will write a copy of ventoy_image_location data into runtime memory
|
||||||
* this is the physically address and length of that memory.
|
* this is the physically address and length of that memory.
|
||||||
* Address 0 means no such data exist.
|
* Address 0 means no such data exist.
|
||||||
@@ -95,7 +97,7 @@ typedef struct ventoy_os_param
|
|||||||
*/
|
*/
|
||||||
UINT64 vtoy_img_location_addr;
|
UINT64 vtoy_img_location_addr;
|
||||||
UINT32 vtoy_img_location_len;
|
UINT32 vtoy_img_location_len;
|
||||||
|
|
||||||
UINT64 vtoy_reserved[4]; // Internal use by ventoy
|
UINT64 vtoy_reserved[4]; // Internal use by ventoy
|
||||||
|
|
||||||
UINT8 vtoy_disk_signature[4];
|
UINT8 vtoy_disk_signature[4];
|
||||||
@@ -124,7 +126,7 @@ typedef struct ventoy_chain_head
|
|||||||
UINT64 virt_img_size_in_bytes;
|
UINT64 virt_img_size_in_bytes;
|
||||||
UINT32 boot_catalog;
|
UINT32 boot_catalog;
|
||||||
UINT8 boot_catalog_sector[2048];
|
UINT8 boot_catalog_sector[2048];
|
||||||
|
|
||||||
UINT32 img_chunk_offset;
|
UINT32 img_chunk_offset;
|
||||||
UINT32 img_chunk_num;
|
UINT32 img_chunk_num;
|
||||||
|
|
||||||
@@ -199,11 +201,11 @@ typedef struct ventoy_virt_chunk
|
|||||||
typedef struct ventoy_sector_flag
|
typedef struct ventoy_sector_flag
|
||||||
{
|
{
|
||||||
UINT8 flag; // 0:init 1:mem 2:remap
|
UINT8 flag; // 0:init 1:mem 2:remap
|
||||||
UINT64 remap_lba;
|
UINT64 remap_lba;
|
||||||
}ventoy_sector_flag;
|
}ventoy_sector_flag;
|
||||||
|
|
||||||
|
|
||||||
typedef struct vtoy_block_data
|
typedef struct vtoy_block_data
|
||||||
{
|
{
|
||||||
EFI_HANDLE Handle;
|
EFI_HANDLE Handle;
|
||||||
EFI_BLOCK_IO_MEDIA Media; /* Media descriptor */
|
EFI_BLOCK_IO_MEDIA Media; /* Media descriptor */
|
||||||
@@ -272,7 +274,7 @@ typedef struct ventoy_grub_param
|
|||||||
grub_env_set_pf grub_env_set;
|
grub_env_set_pf grub_env_set;
|
||||||
ventoy_grub_param_file_replace file_replace;
|
ventoy_grub_param_file_replace file_replace;
|
||||||
ventoy_grub_param_file_replace img_replace[VTOY_MAX_CONF_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;
|
}ventoy_grub_param;
|
||||||
|
|
||||||
typedef struct ventoy_ram_disk
|
typedef struct ventoy_ram_disk
|
||||||
@@ -318,7 +320,7 @@ typedef struct MBR_HEAD
|
|||||||
#pragma pack()
|
#pragma pack()
|
||||||
|
|
||||||
|
|
||||||
typedef struct well_known_guid
|
typedef struct well_known_guid
|
||||||
{
|
{
|
||||||
EFI_GUID *guid;
|
EFI_GUID *guid;
|
||||||
const char *name;
|
const char *name;
|
||||||
@@ -331,7 +333,7 @@ typedef struct ventoy_system_wrapper
|
|||||||
|
|
||||||
EFI_HANDLE_PROTOCOL NewHandleProtocol;
|
EFI_HANDLE_PROTOCOL NewHandleProtocol;
|
||||||
EFI_HANDLE_PROTOCOL OriHandleProtocol;
|
EFI_HANDLE_PROTOCOL OriHandleProtocol;
|
||||||
|
|
||||||
EFI_OPEN_PROTOCOL NewOpenProtocol;
|
EFI_OPEN_PROTOCOL NewOpenProtocol;
|
||||||
EFI_OPEN_PROTOCOL OriOpenProtocol;
|
EFI_OPEN_PROTOCOL OriOpenProtocol;
|
||||||
|
|
||||||
@@ -382,7 +384,7 @@ typedef struct DriverBindWrapper
|
|||||||
extern BOOLEAN gDebugPrint;
|
extern BOOLEAN gDebugPrint;
|
||||||
VOID EFIAPI VtoyDebug(IN CONST CHAR8 *Format, ...);
|
VOID EFIAPI VtoyDebug(IN CONST CHAR8 *Format, ...);
|
||||||
EFI_STATUS EFIAPI ventoy_wrapper_system(VOID);
|
EFI_STATUS EFIAPI ventoy_wrapper_system(VOID);
|
||||||
EFI_STATUS EFIAPI ventoy_block_io_read
|
EFI_STATUS EFIAPI ventoy_block_io_read
|
||||||
(
|
(
|
||||||
IN EFI_BLOCK_IO_PROTOCOL *This,
|
IN EFI_BLOCK_IO_PROTOCOL *This,
|
||||||
IN UINT32 MediaId,
|
IN UINT32 MediaId,
|
||||||
@@ -428,6 +430,8 @@ EFI_STATUS ventoy_hook_1st_cdrom_start(VOID);
|
|||||||
EFI_STATUS ventoy_hook_1st_cdrom_stop(VOID);
|
EFI_STATUS ventoy_hook_1st_cdrom_stop(VOID);
|
||||||
EFI_STATUS ventoy_disable_ex_filesystem(VOID);
|
EFI_STATUS ventoy_disable_ex_filesystem(VOID);
|
||||||
EFI_STATUS ventoy_enable_ex_filesystem(VOID);
|
EFI_STATUS ventoy_enable_ex_filesystem(VOID);
|
||||||
|
EFI_STATUS ventoy_lock_res(UINT8 LockType);
|
||||||
|
EFI_STATUS ventoy_unlock_res(VOID);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,10 @@
|
|||||||
VERSION_STRING = 1.0
|
VERSION_STRING = 1.0
|
||||||
ENTRY_POINT = VentoyEfiMain
|
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]
|
[Sources]
|
||||||
Ventoy.h
|
Ventoy.h
|
||||||
|
|||||||
@@ -7,12 +7,12 @@
|
|||||||
* modify it under the terms of the GNU General Public License as
|
* modify it under the terms of the GNU General Public License as
|
||||||
* published by the Free Software Foundation; either version 3 of the
|
* published by the Free Software Foundation; either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful, but
|
* This program is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
@@ -85,7 +85,7 @@ BOOLEAN ventoy_is_cdrom_dp_exist(VOID)
|
|||||||
EFI_STATUS Status = EFI_SUCCESS;
|
EFI_STATUS Status = EFI_SUCCESS;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath = NULL;
|
EFI_DEVICE_PATH_PROTOCOL *DevicePath = NULL;
|
||||||
|
|
||||||
Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiDevicePathProtocolGuid,
|
Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiDevicePathProtocolGuid,
|
||||||
NULL, &Count, &Handles);
|
NULL, &Count, &Handles);
|
||||||
if (EFI_ERROR(Status))
|
if (EFI_ERROR(Status))
|
||||||
{
|
{
|
||||||
@@ -107,24 +107,24 @@ BOOLEAN ventoy_is_cdrom_dp_exist(VOID)
|
|||||||
FreePool(Handles);
|
FreePool(Handles);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
DevicePath = NextDevicePathNode(DevicePath);
|
DevicePath = NextDevicePathNode(DevicePath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FreePool(Handles);
|
FreePool(Handles);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* Block IO procotol */
|
/* Block IO procotol */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EFI_STATUS EFIAPI ventoy_block_io_reset
|
EFI_STATUS EFIAPI ventoy_block_io_reset
|
||||||
(
|
(
|
||||||
IN EFI_BLOCK_IO_PROTOCOL *This,
|
IN EFI_BLOCK_IO_PROTOCOL *This,
|
||||||
IN BOOLEAN ExtendedVerification
|
IN BOOLEAN ExtendedVerification
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
(VOID)This;
|
(VOID)This;
|
||||||
(VOID)ExtendedVerification;
|
(VOID)ExtendedVerification;
|
||||||
@@ -151,8 +151,8 @@ STATIC EFI_STATUS EFIAPI ventoy_read_iso_sector
|
|||||||
ventoy_img_chunk *pchunk = g_chunk;
|
ventoy_img_chunk *pchunk = g_chunk;
|
||||||
ventoy_override_chunk *pOverride = g_override_chunk;
|
ventoy_override_chunk *pOverride = g_override_chunk;
|
||||||
EFI_BLOCK_IO_PROTOCOL *pRawBlockIo = gBlockData.pRawBlockIo;
|
EFI_BLOCK_IO_PROTOCOL *pRawBlockIo = gBlockData.pRawBlockIo;
|
||||||
|
|
||||||
debug("read iso sector %lu count %u Buffer:%p Align:%u blk:%u",
|
debug("read iso sector %lu count %u Buffer:%p Align:%u blk:%u",
|
||||||
Sector, Count, Buffer, pRawBlockIo->Media->IoAlign, pRawBlockIo->Media->BlockSize);
|
Sector, Count, Buffer, pRawBlockIo->Media->IoAlign, pRawBlockIo->Media->BlockSize);
|
||||||
|
|
||||||
ReadStart = Sector * 2048;
|
ReadStart = Sector * 2048;
|
||||||
@@ -207,7 +207,7 @@ STATIC EFI_STATUS EFIAPI ventoy_read_iso_sector
|
|||||||
{
|
{
|
||||||
OverrideStart = pOverride->img_offset;
|
OverrideStart = pOverride->img_offset;
|
||||||
OverrideEnd = pOverride->img_offset + pOverride->override_size;
|
OverrideEnd = pOverride->img_offset + pOverride->override_size;
|
||||||
|
|
||||||
if (OverrideStart >= ReadEnd || ReadStart >= OverrideEnd)
|
if (OverrideStart >= ReadEnd || ReadStart >= OverrideEnd)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
@@ -217,7 +217,7 @@ STATIC EFI_STATUS EFIAPI ventoy_read_iso_sector
|
|||||||
{
|
{
|
||||||
if (ReadEnd <= OverrideEnd)
|
if (ReadEnd <= OverrideEnd)
|
||||||
{
|
{
|
||||||
CopyMem(pCurBuf + OverrideStart - ReadStart, pOverride->override_data, ReadEnd - OverrideStart);
|
CopyMem(pCurBuf + OverrideStart - ReadStart, pOverride->override_data, ReadEnd - OverrideStart);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -228,7 +228,7 @@ STATIC EFI_STATUS EFIAPI ventoy_read_iso_sector
|
|||||||
{
|
{
|
||||||
if (ReadEnd <= OverrideEnd)
|
if (ReadEnd <= OverrideEnd)
|
||||||
{
|
{
|
||||||
CopyMem(pCurBuf, pOverride->override_data + ReadStart - OverrideStart, ReadEnd - ReadStart);
|
CopyMem(pCurBuf, pOverride->override_data + ReadStart - OverrideStart, ReadEnd - ReadStart);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -236,7 +236,7 @@ STATIC EFI_STATUS EFIAPI ventoy_read_iso_sector
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_fixup_iso9660_secover_enable && (!g_fixup_iso9660_secover_start) &&
|
if (g_fixup_iso9660_secover_enable && (!g_fixup_iso9660_secover_start) &&
|
||||||
pOverride->override_size == sizeof(ventoy_iso9660_override))
|
pOverride->override_size == sizeof(ventoy_iso9660_override))
|
||||||
{
|
{
|
||||||
ventoy_iso9660_override *dirent = (ventoy_iso9660_override *)pOverride->override_data;
|
ventoy_iso9660_override *dirent = (ventoy_iso9660_override *)pOverride->override_data;
|
||||||
@@ -256,7 +256,7 @@ STATIC EFI_STATUS EFIAPI ventoy_read_iso_sector
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC EFI_STATUS EFIAPI ventoy_write_iso_sector
|
STATIC EFI_STATUS EFIAPI ventoy_write_iso_sector
|
||||||
@@ -276,7 +276,7 @@ STATIC EFI_STATUS EFIAPI ventoy_write_iso_sector
|
|||||||
UINT8 *pCurBuf = (UINT8 *)Buffer;
|
UINT8 *pCurBuf = (UINT8 *)Buffer;
|
||||||
ventoy_img_chunk *pchunk = g_chunk;
|
ventoy_img_chunk *pchunk = g_chunk;
|
||||||
EFI_BLOCK_IO_PROTOCOL *pRawBlockIo = gBlockData.pRawBlockIo;
|
EFI_BLOCK_IO_PROTOCOL *pRawBlockIo = gBlockData.pRawBlockIo;
|
||||||
|
|
||||||
debug("write iso sector %lu count %u", Sector, Count);
|
debug("write iso sector %lu count %u", Sector, Count);
|
||||||
|
|
||||||
ReadStart = Sector * 2048;
|
ReadStart = Sector * 2048;
|
||||||
@@ -321,17 +321,17 @@ STATIC EFI_STATUS EFIAPI ventoy_write_iso_sector
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
EFI_STATUS EFIAPI ventoy_block_io_ramdisk_write
|
EFI_STATUS EFIAPI ventoy_block_io_ramdisk_write
|
||||||
(
|
(
|
||||||
IN EFI_BLOCK_IO_PROTOCOL *This,
|
IN EFI_BLOCK_IO_PROTOCOL *This,
|
||||||
IN UINT32 MediaId,
|
IN UINT32 MediaId,
|
||||||
IN EFI_LBA Lba,
|
IN EFI_LBA Lba,
|
||||||
IN UINTN BufferSize,
|
IN UINTN BufferSize,
|
||||||
IN VOID *Buffer
|
IN VOID *Buffer
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
(VOID)This;
|
(VOID)This;
|
||||||
(VOID)MediaId;
|
(VOID)MediaId;
|
||||||
@@ -349,14 +349,14 @@ EFI_STATUS EFIAPI ventoy_block_io_ramdisk_write
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
EFI_STATUS EFIAPI ventoy_block_io_ramdisk_read
|
EFI_STATUS EFIAPI ventoy_block_io_ramdisk_read
|
||||||
(
|
(
|
||||||
IN EFI_BLOCK_IO_PROTOCOL *This,
|
IN EFI_BLOCK_IO_PROTOCOL *This,
|
||||||
IN UINT32 MediaId,
|
IN UINT32 MediaId,
|
||||||
IN EFI_LBA Lba,
|
IN EFI_LBA Lba,
|
||||||
IN UINTN BufferSize,
|
IN UINTN BufferSize,
|
||||||
OUT VOID *Buffer
|
OUT VOID *Buffer
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//debug("### ventoy_block_io_ramdisk_read sector:%u count:%u", (UINT32)Lba, (UINT32)BufferSize / 2048);
|
//debug("### ventoy_block_io_ramdisk_read sector:%u count:%u", (UINT32)Lba, (UINT32)BufferSize / 2048);
|
||||||
|
|
||||||
@@ -364,12 +364,12 @@ EFI_STATUS EFIAPI ventoy_block_io_ramdisk_read
|
|||||||
(VOID)MediaId;
|
(VOID)MediaId;
|
||||||
|
|
||||||
CopyMem(Buffer, g_iso_data_buf + (Lba * 2048), BufferSize);
|
CopyMem(Buffer, g_iso_data_buf + (Lba * 2048), BufferSize);
|
||||||
|
|
||||||
if (g_blockio_start_record_bcd && FALSE == g_blockio_bcd_read_done)
|
if (g_blockio_start_record_bcd && FALSE == g_blockio_bcd_read_done)
|
||||||
{
|
{
|
||||||
if (*(UINT32 *)Buffer == 0x66676572)
|
if (*(UINT32 *)Buffer == 0x66676572)
|
||||||
{
|
{
|
||||||
g_blockio_bcd_read_done = TRUE;
|
g_blockio_bcd_read_done = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -429,14 +429,14 @@ end:
|
|||||||
return Lba;
|
return Lba;
|
||||||
}
|
}
|
||||||
|
|
||||||
EFI_STATUS EFIAPI ventoy_block_io_read_real
|
EFI_STATUS EFIAPI ventoy_block_io_read_real
|
||||||
(
|
(
|
||||||
IN EFI_BLOCK_IO_PROTOCOL *This,
|
IN EFI_BLOCK_IO_PROTOCOL *This,
|
||||||
IN UINT32 MediaId,
|
IN UINT32 MediaId,
|
||||||
IN EFI_LBA Lba,
|
IN EFI_LBA Lba,
|
||||||
IN UINTN BufferSize,
|
IN UINTN BufferSize,
|
||||||
OUT VOID *Buffer
|
OUT VOID *Buffer
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINT32 i = 0;
|
UINT32 i = 0;
|
||||||
UINT32 j = 0;
|
UINT32 j = 0;
|
||||||
@@ -450,7 +450,7 @@ EFI_STATUS EFIAPI ventoy_block_io_read_real
|
|||||||
UINT8 *lastbuffer;
|
UINT8 *lastbuffer;
|
||||||
ventoy_sector_flag *cur_flag;
|
ventoy_sector_flag *cur_flag;
|
||||||
ventoy_virt_chunk *node;
|
ventoy_virt_chunk *node;
|
||||||
|
|
||||||
debug("### block_io_read_real sector:%u count:%u Buffer:%p", (UINT32)Lba, (UINT32)BufferSize / 2048, Buffer);
|
debug("### block_io_read_real sector:%u count:%u Buffer:%p", (UINT32)Lba, (UINT32)BufferSize / 2048, Buffer);
|
||||||
|
|
||||||
secNum = BufferSize / 2048;
|
secNum = BufferSize / 2048;
|
||||||
@@ -510,7 +510,7 @@ EFI_STATUS EFIAPI ventoy_block_io_read_real
|
|||||||
{
|
{
|
||||||
if (curlba >= node->mem_sector_start && curlba < node->mem_sector_end)
|
if (curlba >= node->mem_sector_start && curlba < node->mem_sector_end)
|
||||||
{
|
{
|
||||||
CopyMem((UINT8 *)Buffer + j * 2048,
|
CopyMem((UINT8 *)Buffer + j * 2048,
|
||||||
(char *)g_virt_chunk + node->mem_sector_offset + (curlba - node->mem_sector_start) * 2048,
|
(char *)g_virt_chunk + node->mem_sector_offset + (curlba - node->mem_sector_start) * 2048,
|
||||||
2048);
|
2048);
|
||||||
cur_flag->flag = 1;
|
cur_flag->flag = 1;
|
||||||
@@ -564,7 +564,7 @@ EFI_STATUS EFIAPI ventoy_block_io_read
|
|||||||
IN EFI_LBA Lba,
|
IN EFI_LBA Lba,
|
||||||
IN UINTN BufferSize,
|
IN UINTN BufferSize,
|
||||||
OUT VOID *Buffer
|
OUT VOID *Buffer
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINT32 IoAlign = 0;
|
UINT32 IoAlign = 0;
|
||||||
VOID *NewBuf = NULL;
|
VOID *NewBuf = NULL;
|
||||||
@@ -593,18 +593,18 @@ EFI_STATUS EFIAPI ventoy_block_io_read
|
|||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
EFI_STATUS EFIAPI ventoy_block_io_write
|
EFI_STATUS EFIAPI ventoy_block_io_write
|
||||||
(
|
(
|
||||||
IN EFI_BLOCK_IO_PROTOCOL *This,
|
IN EFI_BLOCK_IO_PROTOCOL *This,
|
||||||
IN UINT32 MediaId,
|
IN UINT32 MediaId,
|
||||||
IN EFI_LBA Lba,
|
IN EFI_LBA Lba,
|
||||||
IN UINTN BufferSize,
|
IN UINTN BufferSize,
|
||||||
IN VOID *Buffer
|
IN VOID *Buffer
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
UINT32 secNum = 0;
|
UINT32 secNum = 0;
|
||||||
UINT64 offset = 0;
|
UINT64 offset = 0;
|
||||||
|
|
||||||
(VOID)This;
|
(VOID)This;
|
||||||
(VOID)MediaId;
|
(VOID)MediaId;
|
||||||
|
|
||||||
@@ -636,8 +636,8 @@ STATIC UINTN ventoy_get_current_device_path_id(VOID)
|
|||||||
EFI_STATUS Status = EFI_SUCCESS;
|
EFI_STATUS Status = EFI_SUCCESS;
|
||||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath = NULL;
|
EFI_DEVICE_PATH_PROTOCOL *DevicePath = NULL;
|
||||||
VENDOR_DEVICE_PATH *venPath = NULL;
|
VENDOR_DEVICE_PATH *venPath = NULL;
|
||||||
|
|
||||||
Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiDevicePathProtocolGuid,
|
Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiDevicePathProtocolGuid,
|
||||||
NULL, &Count, &Handles);
|
NULL, &Count, &Handles);
|
||||||
if (EFI_ERROR(Status))
|
if (EFI_ERROR(Status))
|
||||||
{
|
{
|
||||||
@@ -688,7 +688,7 @@ EFI_STATUS EFIAPI ventoy_fill_device_path(VOID)
|
|||||||
venPath->Header.Length[1] = 0;
|
venPath->Header.Length[1] = 0;
|
||||||
CopyMem(&venPath->Guid, &gVtoyBlockDevicePathGuid, sizeof(EFI_GUID));
|
CopyMem(&venPath->Guid, &gVtoyBlockDevicePathGuid, sizeof(EFI_GUID));
|
||||||
CopyMem(venPath + 1, VtoyDpName, NameLen);
|
CopyMem(venPath + 1, VtoyDpName, NameLen);
|
||||||
|
|
||||||
gBlockData.Path = AppendDevicePathNode(NULL, (EFI_DEVICE_PATH_PROTOCOL *)TmpBuf);
|
gBlockData.Path = AppendDevicePathNode(NULL, (EFI_DEVICE_PATH_PROTOCOL *)TmpBuf);
|
||||||
gBlockData.DevicePathCompareLen = sizeof(VENDOR_DEVICE_PATH) + NameLen;
|
gBlockData.DevicePathCompareLen = sizeof(VENDOR_DEVICE_PATH) + NameLen;
|
||||||
|
|
||||||
@@ -710,7 +710,7 @@ EFI_STATUS EFIAPI ventoy_connect_driver(IN EFI_HANDLE ControllerHandle, IN CONST
|
|||||||
|
|
||||||
debug("ventoy_connect_driver <%s>...", DrvName);
|
debug("ventoy_connect_driver <%s>...", DrvName);
|
||||||
|
|
||||||
Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiComponentName2ProtocolGuid,
|
Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiComponentName2ProtocolGuid,
|
||||||
NULL, &Count, &Handles);
|
NULL, &Count, &Handles);
|
||||||
if (EFI_ERROR(Status))
|
if (EFI_ERROR(Status))
|
||||||
{
|
{
|
||||||
@@ -748,7 +748,7 @@ EFI_STATUS EFIAPI ventoy_connect_driver(IN EFI_HANDLE ControllerHandle, IN CONST
|
|||||||
FreePool(Handles);
|
FreePool(Handles);
|
||||||
Handles = NULL;
|
Handles = NULL;
|
||||||
|
|
||||||
Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiComponentNameProtocolGuid,
|
Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiComponentNameProtocolGuid,
|
||||||
NULL, &Count, &Handles);
|
NULL, &Count, &Handles);
|
||||||
if (EFI_ERROR(Status))
|
if (EFI_ERROR(Status))
|
||||||
{
|
{
|
||||||
@@ -781,10 +781,10 @@ EFI_STATUS EFIAPI ventoy_connect_driver(IN EFI_HANDLE ControllerHandle, IN CONST
|
|||||||
}
|
}
|
||||||
|
|
||||||
Status = EFI_NOT_FOUND;
|
Status = EFI_NOT_FOUND;
|
||||||
|
|
||||||
end:
|
end:
|
||||||
FreePool(Handles);
|
FreePool(Handles);
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -805,11 +805,11 @@ STATIC BOOLEAN ventoy_filesystem_need_wrapper(IN CONST CHAR16 *DrvName)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* suppress some file system drivers
|
* suppress some file system drivers
|
||||||
* 1. rEFInd File System Driver
|
* 1. rEFInd File System Driver
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (StrStr(UpperDrvName, L"REFIND") && StrStr(UpperDrvName, L"FILE SYSTEM"))
|
if (StrStr(UpperDrvName, L"REFIND") && StrStr(UpperDrvName, L"FILE SYSTEM"))
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -820,7 +820,7 @@ STATIC BOOLEAN ventoy_filesystem_need_wrapper(IN CONST CHAR16 *DrvName)
|
|||||||
|
|
||||||
STATIC VOID ventoy_add_filesystem_wrapper
|
STATIC VOID ventoy_add_filesystem_wrapper
|
||||||
(
|
(
|
||||||
IN EFI_DRIVER_BINDING_PROTOCOL *DriverBindProtocol,
|
IN EFI_DRIVER_BINDING_PROTOCOL *DriverBindProtocol,
|
||||||
IN CONST CHAR16 *DriverName
|
IN CONST CHAR16 *DriverName
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@@ -865,10 +865,10 @@ STATIC EFI_STATUS ventoy_find_filesystem_driverbind(VOID)
|
|||||||
EFI_COMPONENT_NAME_PROTOCOL *NameProtocol = NULL;
|
EFI_COMPONENT_NAME_PROTOCOL *NameProtocol = NULL;
|
||||||
EFI_COMPONENT_NAME2_PROTOCOL *Name2Protocol = NULL;
|
EFI_COMPONENT_NAME2_PROTOCOL *Name2Protocol = NULL;
|
||||||
EFI_DRIVER_BINDING_PROTOCOL *DriverBindProtocol = NULL;
|
EFI_DRIVER_BINDING_PROTOCOL *DriverBindProtocol = NULL;
|
||||||
|
|
||||||
debug("ventoy_find_filesystem_driverbind...");
|
debug("ventoy_find_filesystem_driverbind...");
|
||||||
|
|
||||||
Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiComponentName2ProtocolGuid,
|
Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiComponentName2ProtocolGuid,
|
||||||
NULL, &Count, &Handles);
|
NULL, &Count, &Handles);
|
||||||
if (EFI_ERROR(Status))
|
if (EFI_ERROR(Status))
|
||||||
{
|
{
|
||||||
@@ -899,7 +899,7 @@ STATIC EFI_STATUS ventoy_find_filesystem_driverbind(VOID)
|
|||||||
FreePool(Handles);
|
FreePool(Handles);
|
||||||
Handles = NULL;
|
Handles = NULL;
|
||||||
|
|
||||||
Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiComponentNameProtocolGuid,
|
Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiComponentNameProtocolGuid,
|
||||||
NULL, &Count, &Handles);
|
NULL, &Count, &Handles);
|
||||||
if (EFI_ERROR(Status))
|
if (EFI_ERROR(Status))
|
||||||
{
|
{
|
||||||
@@ -927,7 +927,7 @@ STATIC EFI_STATUS ventoy_find_filesystem_driverbind(VOID)
|
|||||||
}
|
}
|
||||||
|
|
||||||
FreePool(Handles);
|
FreePool(Handles);
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -988,7 +988,7 @@ EFI_STATUS ventoy_disable_ex_filesystem(VOID)
|
|||||||
|
|
||||||
debug("Wrapper Ex Driver Binding %lu", g_DriverBindWrapperCnt);
|
debug("Wrapper Ex Driver Binding %lu", g_DriverBindWrapperCnt);
|
||||||
ventoy_debug_pause();
|
ventoy_debug_pause();
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1046,10 +1046,10 @@ EFI_STATUS EFIAPI ventoy_block_io_read_512
|
|||||||
if (BufferSize >= 2048)
|
if (BufferSize >= 2048)
|
||||||
{
|
{
|
||||||
ReadSize = BufferSize / 2048 * 2048;
|
ReadSize = BufferSize / 2048 * 2048;
|
||||||
|
|
||||||
Status |= g_sector_2048_read(This, MediaId, Lba / 4, ReadSize, CurBuf);
|
Status |= g_sector_2048_read(This, MediaId, Lba / 4, ReadSize, CurBuf);
|
||||||
CurBuf += ReadSize;
|
CurBuf += ReadSize;
|
||||||
|
|
||||||
Lba += ReadSize / 512;
|
Lba += ReadSize / 512;
|
||||||
BufferSize -= ReadSize;
|
BufferSize -= ReadSize;
|
||||||
}
|
}
|
||||||
@@ -1096,7 +1096,7 @@ EFI_STATUS EFIAPI ventoy_block_io_write_512
|
|||||||
ReadSize = (4 - Mod) * 512;
|
ReadSize = (4 - Mod) * 512;
|
||||||
CopyMem(g_sector_buf + Mod * 512, CurBuf, ReadSize);
|
CopyMem(g_sector_buf + Mod * 512, CurBuf, ReadSize);
|
||||||
g_sector_2048_write(This, MediaId, Lba / 4, 2048, g_sector_buf);
|
g_sector_2048_write(This, MediaId, Lba / 4, 2048, g_sector_buf);
|
||||||
|
|
||||||
CurBuf += ReadSize;
|
CurBuf += ReadSize;
|
||||||
Lba += (4 - Mod);
|
Lba += (4 - Mod);
|
||||||
BufferSize -= ReadSize;
|
BufferSize -= ReadSize;
|
||||||
@@ -1106,10 +1106,10 @@ EFI_STATUS EFIAPI ventoy_block_io_write_512
|
|||||||
if (BufferSize >= 2048)
|
if (BufferSize >= 2048)
|
||||||
{
|
{
|
||||||
ReadSize = BufferSize / 2048 * 2048;
|
ReadSize = BufferSize / 2048 * 2048;
|
||||||
|
|
||||||
Status |= g_sector_2048_write(This, MediaId, Lba / 4, ReadSize, CurBuf);
|
Status |= g_sector_2048_write(This, MediaId, Lba / 4, ReadSize, CurBuf);
|
||||||
CurBuf += ReadSize;
|
CurBuf += ReadSize;
|
||||||
|
|
||||||
Lba += ReadSize / 512;
|
Lba += ReadSize / 512;
|
||||||
BufferSize -= ReadSize;
|
BufferSize -= ReadSize;
|
||||||
}
|
}
|
||||||
@@ -1117,7 +1117,7 @@ EFI_STATUS EFIAPI ventoy_block_io_write_512
|
|||||||
if (BufferSize > 0)
|
if (BufferSize > 0)
|
||||||
{
|
{
|
||||||
Status |= g_sector_2048_read(This, MediaId, Lba / 4, 2048, g_sector_buf);
|
Status |= g_sector_2048_read(This, MediaId, Lba / 4, 2048, g_sector_buf);
|
||||||
|
|
||||||
CopyMem(g_sector_buf, CurBuf, BufferSize);
|
CopyMem(g_sector_buf, CurBuf, BufferSize);
|
||||||
g_sector_2048_write(This, MediaId, Lba / 4, 2048, g_sector_buf);
|
g_sector_2048_write(This, MediaId, Lba / 4, 2048, g_sector_buf);
|
||||||
}
|
}
|
||||||
@@ -1126,10 +1126,10 @@ EFI_STATUS EFIAPI ventoy_block_io_write_512
|
|||||||
}
|
}
|
||||||
|
|
||||||
EFI_STATUS EFIAPI ventoy_install_blockio(IN EFI_HANDLE ImageHandle, IN UINT64 ImgSize)
|
EFI_STATUS EFIAPI ventoy_install_blockio(IN EFI_HANDLE ImageHandle, IN UINT64 ImgSize)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status = EFI_SUCCESS;
|
EFI_STATUS Status = EFI_SUCCESS;
|
||||||
EFI_BLOCK_IO_PROTOCOL *pBlockIo = &(gBlockData.BlockIo);
|
EFI_BLOCK_IO_PROTOCOL *pBlockIo = &(gBlockData.BlockIo);
|
||||||
|
|
||||||
ventoy_fill_device_path();
|
ventoy_fill_device_path();
|
||||||
|
|
||||||
debug("install block io protocol %p", ImageHandle);
|
debug("install block io protocol %p", ImageHandle);
|
||||||
@@ -1144,10 +1144,10 @@ EFI_STATUS EFIAPI ventoy_install_blockio(IN EFI_HANDLE ImageHandle, IN UINT64 Im
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
gBlockData.Media.BlockSize = 2048;
|
gBlockData.Media.BlockSize = 2048;
|
||||||
gBlockData.Media.LastBlock = ImgSize / 2048 - 1;
|
gBlockData.Media.LastBlock = ImgSize / 2048 - 1;
|
||||||
gBlockData.Media.ReadOnly = TRUE;
|
gBlockData.Media.ReadOnly = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gBlockData.Media.MediaPresent = 1;
|
gBlockData.Media.MediaPresent = 1;
|
||||||
gBlockData.Media.LogicalBlocksPerPhysicalBlock = 1;
|
gBlockData.Media.LogicalBlocksPerPhysicalBlock = 1;
|
||||||
|
|
||||||
@@ -1164,10 +1164,10 @@ EFI_STATUS EFIAPI ventoy_install_blockio(IN EFI_HANDLE ImageHandle, IN UINT64 Im
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pBlockIo->ReadBlocks = gMemdiskMode ? ventoy_block_io_ramdisk_read : ventoy_block_io_read;
|
pBlockIo->ReadBlocks = gMemdiskMode ? ventoy_block_io_ramdisk_read : ventoy_block_io_read;
|
||||||
pBlockIo->WriteBlocks = ventoy_block_io_write;
|
pBlockIo->WriteBlocks = ventoy_block_io_write;
|
||||||
}
|
}
|
||||||
|
|
||||||
pBlockIo->FlushBlocks = ventoy_block_io_flush;
|
pBlockIo->FlushBlocks = ventoy_block_io_flush;
|
||||||
|
|
||||||
Status = gBS->InstallMultipleProtocolInterfaces(&gBlockData.Handle,
|
Status = gBS->InstallMultipleProtocolInterfaces(&gBlockData.Handle,
|
||||||
@@ -1295,7 +1295,7 @@ DEF_WRAP_FUNC(7);
|
|||||||
#error "VTOY_MAX_CONF_REPLACE overflow"
|
#error "VTOY_MAX_CONF_REPLACE overflow"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static EFI_FILE_FLUSH_EX g_img_flush_func[VTOY_MAX_CONF_REPLACE] =
|
static EFI_FILE_FLUSH_EX g_img_flush_func[VTOY_MAX_CONF_REPLACE] =
|
||||||
{
|
{
|
||||||
ventoy_wrapper_file_flush_ex_img0,
|
ventoy_wrapper_file_flush_ex_img0,
|
||||||
ventoy_wrapper_file_flush_ex_img1,
|
ventoy_wrapper_file_flush_ex_img1,
|
||||||
@@ -1335,7 +1335,7 @@ STATIC ventoy_efi_file_replace *ventoy_wrapper_get_replace(EFI_FILE_HANDLE This)
|
|||||||
return g_img_file_replace + i;
|
return g_img_file_replace + i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1369,7 +1369,7 @@ ventoy_wrapper_file_set_pos(EFI_FILE_HANDLE This, UINT64 Position)
|
|||||||
ventoy_efi_file_replace *replace = NULL;
|
ventoy_efi_file_replace *replace = NULL;
|
||||||
|
|
||||||
replace = ventoy_wrapper_get_replace(This);
|
replace = ventoy_wrapper_get_replace(This);
|
||||||
|
|
||||||
if (Position <= replace->FileSizeBytes)
|
if (Position <= replace->FileSizeBytes)
|
||||||
{
|
{
|
||||||
replace->CurPos = Position;
|
replace->CurPos = Position;
|
||||||
@@ -1378,7 +1378,7 @@ ventoy_wrapper_file_set_pos(EFI_FILE_HANDLE This, UINT64 Position)
|
|||||||
{
|
{
|
||||||
replace->CurPos = replace->FileSizeBytes;
|
replace->CurPos = replace->FileSizeBytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1425,7 +1425,7 @@ ventoy_wrapper_file_get_info(EFI_FILE_HANDLE This, EFI_GUID *Type, UINTN *Len, V
|
|||||||
//Info->FileName = EFI_FILE_READ_ONLY;
|
//Info->FileName = EFI_FILE_READ_ONLY;
|
||||||
|
|
||||||
*Len = Info->Size;
|
*Len = Info->Size;
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1437,7 +1437,7 @@ ventoy_wrapper_file_read(EFI_FILE_HANDLE This, UINTN *Len, VOID *Data)
|
|||||||
ventoy_efi_file_replace *replace = NULL;
|
ventoy_efi_file_replace *replace = NULL;
|
||||||
|
|
||||||
replace = ventoy_wrapper_get_replace(This);
|
replace = ventoy_wrapper_get_replace(This);
|
||||||
|
|
||||||
debug("ventoy_wrapper_file_read ... %u", *Len);
|
debug("ventoy_wrapper_file_read ... %u", *Len);
|
||||||
|
|
||||||
if (replace->CurPos + ReadLen > replace->FileSizeBytes)
|
if (replace->CurPos + ReadLen > replace->FileSizeBytes)
|
||||||
@@ -1494,7 +1494,7 @@ STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_procotol(EFI_FILE_PROTOCOL *File, B
|
|||||||
STATIC BOOLEAN EFIAPI ventoy_replace_name_match(CHAR8 *pReplace, CHAR8 *pName)
|
STATIC BOOLEAN EFIAPI ventoy_replace_name_match(CHAR8 *pReplace, CHAR8 *pName)
|
||||||
{
|
{
|
||||||
UINTN Len1, Len2;
|
UINTN Len1, Len2;
|
||||||
|
|
||||||
Len1 = AsciiStrLen(pReplace);
|
Len1 = AsciiStrLen(pReplace);
|
||||||
Len2 = AsciiStrLen(pName);
|
Len2 = AsciiStrLen(pName);
|
||||||
|
|
||||||
@@ -1521,10 +1521,10 @@ STATIC BOOLEAN EFIAPI ventoy_replace_name_match(CHAR8 *pReplace, CHAR8 *pName)
|
|||||||
|
|
||||||
STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_open
|
STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_open
|
||||||
(
|
(
|
||||||
EFI_FILE_HANDLE This,
|
EFI_FILE_HANDLE This,
|
||||||
EFI_FILE_HANDLE *New,
|
EFI_FILE_HANDLE *New,
|
||||||
CHAR16 *Name,
|
CHAR16 *Name,
|
||||||
UINT64 Mode,
|
UINT64 Mode,
|
||||||
UINT64 Attributes
|
UINT64 Attributes
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@@ -1571,7 +1571,7 @@ STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_open
|
|||||||
virt = g_virt_chunk + g_file_replace_list->new_file_virtual_id;
|
virt = g_virt_chunk + g_file_replace_list->new_file_virtual_id;
|
||||||
|
|
||||||
Sectors = (virt->mem_sector_end - virt->mem_sector_start) + (virt->remap_sector_end - virt->remap_sector_start);
|
Sectors = (virt->mem_sector_end - virt->mem_sector_start) + (virt->remap_sector_end - virt->remap_sector_start);
|
||||||
|
|
||||||
g_efi_file_replace.BlockIoSectorStart = virt->mem_sector_start;
|
g_efi_file_replace.BlockIoSectorStart = virt->mem_sector_start;
|
||||||
g_efi_file_replace.FileSizeBytes = Sectors * 2048;
|
g_efi_file_replace.FileSizeBytes = Sectors * 2048;
|
||||||
|
|
||||||
@@ -1581,7 +1581,7 @@ STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_open
|
|||||||
g_efi_file_replace.BlockIoSectorStart, Sectors, Sectors * 2048);
|
g_efi_file_replace.BlockIoSectorStart, Sectors, Sectors * 2048);
|
||||||
sleep(3);
|
sleep(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1605,9 +1605,9 @@ STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_open
|
|||||||
{
|
{
|
||||||
AsciiStrCpyS(OldName, sizeof(OldName), replace->old_file_name[j]);
|
AsciiStrCpyS(OldName, sizeof(OldName), replace->old_file_name[j]);
|
||||||
if ((0 == AsciiStrCmp(OldName, TmpName)) ||
|
if ((0 == AsciiStrCmp(OldName, TmpName)) ||
|
||||||
(AsciiStrnCmp(OldName, "\\loader\\entries\\", 16) == 0 &&
|
(AsciiStrnCmp(OldName, "\\loader\\entries\\", 16) == 0 &&
|
||||||
AsciiStrCmp(OldName + 16, TmpName) == 0
|
AsciiStrCmp(OldName + 16, TmpName) == 0
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
g_original_fclose(*New);
|
g_original_fclose(*New);
|
||||||
@@ -1617,7 +1617,7 @@ STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_open
|
|||||||
virt = g_virt_chunk + replace->new_file_virtual_id;
|
virt = g_virt_chunk + replace->new_file_virtual_id;
|
||||||
|
|
||||||
Sectors = (virt->mem_sector_end - virt->mem_sector_start) + (virt->remap_sector_end - virt->remap_sector_start);
|
Sectors = (virt->mem_sector_end - virt->mem_sector_start) + (virt->remap_sector_end - virt->remap_sector_start);
|
||||||
|
|
||||||
g_img_file_replace[i].BlockIoSectorStart = virt->mem_sector_start;
|
g_img_file_replace[i].BlockIoSectorStart = virt->mem_sector_start;
|
||||||
g_img_file_replace[i].FileSizeBytes = Sectors * 2048;
|
g_img_file_replace[i].FileSizeBytes = Sectors * 2048;
|
||||||
|
|
||||||
@@ -1627,7 +1627,7 @@ STATIC EFI_STATUS EFIAPI ventoy_wrapper_file_open
|
|||||||
g_img_file_replace[i].BlockIoSectorStart, Sectors, Sectors * 2048);
|
g_img_file_replace[i].BlockIoSectorStart, Sectors, Sectors * 2048);
|
||||||
sleep(3);
|
sleep(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1648,7 +1648,7 @@ EFI_STATUS EFIAPI ventoy_wrapper_open_volume
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status = EFI_SUCCESS;
|
EFI_STATUS Status = EFI_SUCCESS;
|
||||||
|
|
||||||
Status = g_original_open_volume(This, Root);
|
Status = g_original_open_volume(This, Root);
|
||||||
if (!EFI_ERROR(Status))
|
if (!EFI_ERROR(Status))
|
||||||
{
|
{
|
||||||
@@ -1685,10 +1685,10 @@ STATIC EFI_STATUS EFIAPI ventoy_wrapper_read_key_ex
|
|||||||
KeyData->Key.UnicodeChar = 0;
|
KeyData->Key.UnicodeChar = 0;
|
||||||
KeyData->KeyState.KeyShiftState = 0;
|
KeyData->KeyState.KeyShiftState = 0;
|
||||||
KeyData->KeyState.KeyToggleState = 0;
|
KeyData->KeyState.KeyToggleState = 0;
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
return g_org_read_key_ex(This, KeyData);
|
return g_org_read_key_ex(This, KeyData);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1725,7 +1725,7 @@ EFI_STATUS ventoy_hook_keyboard_start(VOID)
|
|||||||
|
|
||||||
g_org_read_key = gST->ConIn->ReadKeyStroke;
|
g_org_read_key = gST->ConIn->ReadKeyStroke;
|
||||||
gST->ConIn->ReadKeyStroke = ventoy_wrapper_read_key;
|
gST->ConIn->ReadKeyStroke = ventoy_wrapper_read_key;
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1763,7 +1763,7 @@ STATIC EFI_STATUS EFIAPI ventoy_wrapper_locate_handle
|
|||||||
EFI_STATUS Status = EFI_SUCCESS;
|
EFI_STATUS Status = EFI_SUCCESS;
|
||||||
|
|
||||||
Status = g_org_locate_handle(SearchType, Protocol, SearchKey, BufferSize, Buffer);
|
Status = g_org_locate_handle(SearchType, Protocol, SearchKey, BufferSize, Buffer);
|
||||||
|
|
||||||
if (EFI_SUCCESS == Status && Protocol && CompareGuid(&gEfiBlockIoProtocolGuid, Protocol))
|
if (EFI_SUCCESS == Status && Protocol && CompareGuid(&gEfiBlockIoProtocolGuid, Protocol))
|
||||||
{
|
{
|
||||||
for (i = 0; i < (*BufferSize) / sizeof(EFI_HANDLE); i++)
|
for (i = 0; i < (*BufferSize) / sizeof(EFI_HANDLE); i++)
|
||||||
@@ -1785,7 +1785,7 @@ EFI_STATUS ventoy_hook_1st_cdrom_start(VOID)
|
|||||||
{
|
{
|
||||||
g_org_locate_handle = gBS->LocateHandle;
|
g_org_locate_handle = gBS->LocateHandle;
|
||||||
gBS->LocateHandle = ventoy_wrapper_locate_handle;
|
gBS->LocateHandle = ventoy_wrapper_locate_handle;
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1793,7 +1793,180 @@ EFI_STATUS ventoy_hook_1st_cdrom_stop(VOID)
|
|||||||
{
|
{
|
||||||
gBS->LocateHandle = g_org_locate_handle;
|
gBS->LocateHandle = g_org_locate_handle;
|
||||||
g_org_locate_handle = NULL;
|
g_org_locate_handle = NULL;
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
/* For force highest resolution for Windows/WinPE */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
STATIC UINT32 g_org_mode_num = 0;
|
||||||
|
STATIC EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE g_org_set_mode = NULL;
|
||||||
|
|
||||||
|
STATIC EFI_STATUS EFIAPI ventoy_set_mode
|
||||||
|
(
|
||||||
|
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
|
||||||
|
IN UINT32 ModeNumber
|
||||||
|
)
|
||||||
|
{
|
||||||
|
(void)This;
|
||||||
|
(void)ModeNumber;
|
||||||
|
|
||||||
|
/* Force highest resolution */
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
STATIC EFI_STATUS EFIAPI ventoy_set_mode2
|
||||||
|
(
|
||||||
|
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
|
||||||
|
IN UINT32 ModeNumber
|
||||||
|
)
|
||||||
|
{
|
||||||
|
UINTN Size;
|
||||||
|
EFI_STATUS rc;
|
||||||
|
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *info = NULL;
|
||||||
|
|
||||||
|
/* Force >= 1024x768 */
|
||||||
|
rc = This->QueryMode(This, ModeNumber, &Size, &info);
|
||||||
|
if (rc == EFI_SUCCESS)
|
||||||
|
{
|
||||||
|
if (info->HorizontalResolution < 1024 || info->VerticalResolution < 768)
|
||||||
|
{
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return g_org_set_mode(This, ModeNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
EFI_STATUS ventoy_lock_res(UINT8 LockType)
|
||||||
|
{
|
||||||
|
UINT32 i = 0;
|
||||||
|
UINT32 x = 0;
|
||||||
|
UINT32 y = 0;
|
||||||
|
UINT32 SelMode = 0;
|
||||||
|
UINT32 CurMode = 0;
|
||||||
|
UINT32 Highest = 0;
|
||||||
|
UINT32 M1024_768 = MAX_UINT32;
|
||||||
|
UINTN Size;
|
||||||
|
EFI_STATUS rc;
|
||||||
|
EFI_GRAPHICS_OUTPUT_PROTOCOL *gop = NULL;
|
||||||
|
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *info = NULL;
|
||||||
|
|
||||||
|
/* already hook */
|
||||||
|
if (g_org_set_mode)
|
||||||
|
{
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 1: Highest 2: 1024x768 3: >= 1024x768 */
|
||||||
|
if (LockType == 0 || LockType > 3)
|
||||||
|
{
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
rc = gBS->LocateProtocol(&gEfiGraphicsOutputProtocolGuid, NULL, (void **)&gop);
|
||||||
|
if (rc != EFI_SUCCESS)
|
||||||
|
{
|
||||||
|
debug("Failed to locate GOP protocol");
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (LockType == 3)
|
||||||
|
{
|
||||||
|
g_org_mode_num = MAX_UINT32;
|
||||||
|
g_org_set_mode = gop->SetMode;
|
||||||
|
gop->SetMode = ventoy_set_mode2;
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
CurMode = gop->Mode->Mode;
|
||||||
|
|
||||||
|
for (i = 0 ; i < gop->Mode->MaxMode ; i++)
|
||||||
|
{
|
||||||
|
/* Get mode information */
|
||||||
|
if (gop->QueryMode(gop, i, &Size, &info) == EFI_SUCCESS)
|
||||||
|
{
|
||||||
|
if (info->HorizontalResolution == 1024 && info->VerticalResolution == 768)
|
||||||
|
{
|
||||||
|
M1024_768 = i;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (x < info->HorizontalResolution ||
|
||||||
|
(x == info->HorizontalResolution && y < info->VerticalResolution))
|
||||||
|
{
|
||||||
|
Highest = i;
|
||||||
|
x = info->HorizontalResolution;
|
||||||
|
y = info->VerticalResolution;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (LockType == 1)
|
||||||
|
{
|
||||||
|
SelMode = Highest;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (M1024_768 == MAX_UINT32)
|
||||||
|
{
|
||||||
|
SelMode = Highest;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SelMode = M1024_768;
|
||||||
|
x = 1024;
|
||||||
|
y = 768;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (SelMode != CurMode)
|
||||||
|
{
|
||||||
|
gop->SetMode(gop, SelMode);
|
||||||
|
}
|
||||||
|
debug("Lock resolution to Mode:%d %d x %d", SelMode, x, y);
|
||||||
|
|
||||||
|
|
||||||
|
g_org_mode_num = CurMode;
|
||||||
|
g_org_set_mode = gop->SetMode;
|
||||||
|
gop->SetMode = ventoy_set_mode;
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
EFI_STATUS ventoy_unlock_res(VOID)
|
||||||
|
{
|
||||||
|
EFI_STATUS rc;
|
||||||
|
EFI_GRAPHICS_OUTPUT_PROTOCOL *gop = NULL;
|
||||||
|
|
||||||
|
/* not hooked yet */
|
||||||
|
if (!g_org_set_mode)
|
||||||
|
{
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
rc = gBS->LocateProtocol(&gEfiGraphicsOutputProtocolGuid, NULL, (void **)&gop);
|
||||||
|
if (rc != EFI_SUCCESS)
|
||||||
|
{
|
||||||
|
debug("Failed to locate GOP protocol");
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (g_org_mode_num != MAX_UINT32)
|
||||||
|
{
|
||||||
|
g_org_set_mode(gop, g_org_mode_num);
|
||||||
|
}
|
||||||
|
|
||||||
|
gop->SetMode = g_org_set_mode;
|
||||||
|
g_org_set_mode = NULL;
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,718 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* 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_DEVICE_PATH_TO_TEXT_PROTOCOL *gDpToText = NULL;
|
||||||
|
STATIC EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL *gTextToDp = NULL;
|
||||||
|
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 = 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 = gDpToText->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... ######");
|
||||||
|
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 = gDpToText->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 = gTextToDp->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:
|
||||||
|
|
||||||
|
CheckBSFreePool(DevDpStr);
|
||||||
|
CheckFreePool(NewDpStr);
|
||||||
|
CheckBSFreePool(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 = gDpToText->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);
|
||||||
|
CheckBSFreePool(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))
|
||||||
|
{
|
||||||
|
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 && 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 && 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 = gSysSec2FileAuth;
|
||||||
|
gSysSec2FileAuth = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Security && gSysSecFileAuth)
|
||||||
|
{
|
||||||
|
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 EFI_STATUS EFIAPI EnvInit(VOID)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
Status = gBS->LocateProtocol(&gEfiDevicePathToTextProtocolGuid, NULL, (VOID**)&gDpToText);
|
||||||
|
if (EFI_ERROR(Status) || !gDpToText || !gDpToText->ConvertDevicePathToText)
|
||||||
|
{
|
||||||
|
vLog(L"Failed to locate PathToText Protocol %lx", Status);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = gBS->LocateProtocol(&gEfiDevicePathFromTextProtocolGuid, NULL, (VOID**)&gTextToDp);
|
||||||
|
if (EFI_ERROR(Status) || !gTextToDp || !gTextToDp->ConvertTextToDevicePath)
|
||||||
|
{
|
||||||
|
vLog(L"Failed to locate PathFromText Protocol %lx", Status);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
EFI_STATUS EFIAPI VtoyShimEfiMain
|
||||||
|
(
|
||||||
|
IN EFI_HANDLE ImageHandle,
|
||||||
|
IN EFI_SYSTEM_TABLE *SystemTable
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
EFI_GUID Guid = SHIM_LOCK_GUID;
|
||||||
|
unhook_system_services_pf Func = NULL;
|
||||||
|
|
||||||
|
Status = EnvInit();
|
||||||
|
if (EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
vErr(L"Failed to prepare env");
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If secure boot is not enabled, nothing needed, just launch Ventoy grub */
|
||||||
|
if (!IsSecureBootEnabled())
|
||||||
|
{
|
||||||
|
Status = LaunchRealGrub(ImageHandle, REAL_GRUB_FILE);
|
||||||
|
if (EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
vErr(L"Failed to launch %s", REAL_GRUB_FILE);
|
||||||
|
}
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = gBS->LocateProtocol(&Guid, NULL, (VOID**)&gShimLock);
|
||||||
|
if (EFI_ERROR(Status) || !gShimLock)
|
||||||
|
{
|
||||||
|
vErr(L"Failed to locate SHIM LOCK Protocol %lx", Status);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Func = FindShimFuncAddr(NM_UNHOOK_SYSTEM_SERVICES_OFFSET);
|
||||||
|
if (!Func)
|
||||||
|
{
|
||||||
|
vErr(L"Can not find shim unhook_system_services");
|
||||||
|
Status = EFI_NOT_FOUND;
|
||||||
|
goto END;
|
||||||
|
}
|
||||||
|
|
||||||
|
Func(); /* call shim unhook_system_services() */
|
||||||
|
|
||||||
|
|
||||||
|
/* 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;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,121 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* 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 (*unhook_system_services_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
|
||||||
|
*
|
||||||
|
* 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 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 CheckBSFreePool(p) \
|
||||||
|
do { \
|
||||||
|
if (p) { \
|
||||||
|
gBS->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
|
* modify it under the terms of the GNU General Public License as
|
||||||
* published by the Free Software Foundation; either version 3 of the
|
* published by the Free Software Foundation; either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful, but
|
* This program is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* 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 CHAR16 *gCmdLine = NULL;
|
||||||
STATIC grub_env_printf_pf g_env_printf = NULL;
|
STATIC grub_env_printf_pf g_env_printf = NULL;
|
||||||
|
|
||||||
STATIC VtoyUtilFeature gFeatureList[] =
|
STATIC VtoyUtilFeature gFeatureList[] =
|
||||||
{
|
{
|
||||||
{ L"fix_windows_mmap", FixWindowsMemhole },
|
{ L"fix_windows_mmap", FixWindowsMemhole },
|
||||||
{ L"show_efi_drivers", ShowEfiDrivers },
|
{ L"show_efi_drivers", ShowEfiDrivers },
|
||||||
@@ -93,7 +93,7 @@ VOID EFIAPI VtoyUtilDebug(IN CONST CHAR8 *Format, ...)
|
|||||||
}
|
}
|
||||||
|
|
||||||
STATIC EFI_STATUS ParseCmdline(IN EFI_HANDLE ImageHandle)
|
STATIC EFI_STATUS ParseCmdline(IN EFI_HANDLE ImageHandle)
|
||||||
{
|
{
|
||||||
CHAR16 *pPos = NULL;
|
CHAR16 *pPos = NULL;
|
||||||
CHAR16 *pCmdLine = NULL;
|
CHAR16 *pCmdLine = NULL;
|
||||||
EFI_STATUS Status = EFI_SUCCESS;
|
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##########################");
|
gST->ConOut->OutputString(gST->ConOut, L"\r\n##########################");
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (StrStr(pCmdLine, L"debug"))
|
if (StrStr(pCmdLine, L"debug"))
|
||||||
{
|
{
|
||||||
gVtoyDebugPrint = TRUE;
|
gVtoyDebugPrint = TRUE;
|
||||||
@@ -139,12 +139,38 @@ STATIC EFI_STATUS ParseCmdline(IN EFI_HANDLE ImageHandle)
|
|||||||
}
|
}
|
||||||
|
|
||||||
gCurFeature = pPos + StrLen(L"feature=");
|
gCurFeature = pPos + StrLen(L"feature=");
|
||||||
|
|
||||||
gCmdLine = pCmdLine;
|
gCmdLine = pCmdLine;
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined (MDE_CPU_X64)
|
||||||
|
STATIC BOOLEAN EFIAPI CheckVtoyShim(VOID)
|
||||||
|
{
|
||||||
|
UINT8 SecureBoot = 0;
|
||||||
|
UINTN DataSize;
|
||||||
|
EFI_STATUS Status;
|
||||||
|
EFI_GUID Guid = VTOY_SHIM_POLICY_GUID;
|
||||||
|
VOID *Prot = NULL;
|
||||||
|
|
||||||
|
DataSize = sizeof(SecureBoot);
|
||||||
|
Status = gST->RuntimeServices->GetVariable(L"SecureBoot", &gEfiGlobalVariableGuid, NULL,
|
||||||
|
&DataSize, &SecureBoot);
|
||||||
|
if (!EFI_ERROR(Status) && SecureBoot)
|
||||||
|
{
|
||||||
|
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
|
EFI_STATUS EFIAPI VtoyUtilEfiMain
|
||||||
(
|
(
|
||||||
IN EFI_HANDLE ImageHandle,
|
IN EFI_HANDLE ImageHandle,
|
||||||
@@ -153,7 +179,16 @@ EFI_STATUS EFIAPI VtoyUtilEfiMain
|
|||||||
{
|
{
|
||||||
UINTN i;
|
UINTN i;
|
||||||
UINTN Len;
|
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);
|
ParseCmdline(ImageHandle);
|
||||||
|
|
||||||
for (i = 0; gCurFeature && i < ARRAY_SIZE(gFeatureList); i++)
|
for (i = 0; gCurFeature && i < ARRAY_SIZE(gFeatureList); i++)
|
||||||
@@ -170,7 +205,7 @@ EFI_STATUS EFIAPI VtoyUtilEfiMain
|
|||||||
if (gCmdLine)
|
if (gCmdLine)
|
||||||
{
|
{
|
||||||
FreePool(gCmdLine);
|
FreePool(gCmdLine);
|
||||||
gCmdLine = NULL;
|
gCmdLine = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|||||||
@@ -7,20 +7,22 @@
|
|||||||
* modify it under the terms of the GNU General Public License as
|
* modify it under the terms of the GNU General Public License as
|
||||||
* published by the Free Software Foundation; either version 3 of the
|
* published by the Free Software Foundation; either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful, but
|
* This program is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __VTOYUTIL_H__
|
#ifndef __VTOYUTIL_H__
|
||||||
#define __VTOYUTIL_H__
|
#define __VTOYUTIL_H__
|
||||||
|
|
||||||
|
#define VTOY_SHIM_POLICY_GUID {0x90a29d14, 0x3968, 0x48fe, { 0x85, 0x81, 0x6b, 0x7f, 0x7d, 0xc4, 0x70, 0x55 }};
|
||||||
|
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
|
|
||||||
typedef EFI_STATUS (*VTOY_UTIL_PROC_PF)(IN EFI_HANDLE ImageHandle, IN CONST CHAR16 *CmdLine);
|
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;
|
grub_env_set_pf grub_env_set;
|
||||||
ventoy_grub_param_file_replace file_replace;
|
ventoy_grub_param_file_replace file_replace;
|
||||||
ventoy_grub_param_file_replace img_replace[VTOY_MAX_CONF_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;
|
}ventoy_grub_param;
|
||||||
#pragma pack()
|
#pragma pack()
|
||||||
|
|
||||||
|
|
||||||
typedef struct VtoyUtilFeature
|
typedef struct VtoyUtilFeature
|
||||||
{
|
{
|
||||||
CONST CHAR16 *Cmd;
|
CONST CHAR16 *Cmd;
|
||||||
VTOY_UTIL_PROC_PF MainProc;
|
VTOY_UTIL_PROC_PF MainProc;
|
||||||
}VtoyUtilFeature;
|
}VtoyUtilFeature;
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,10 @@
|
|||||||
MODULE_TYPE = UEFI_APPLICATION
|
MODULE_TYPE = UEFI_APPLICATION
|
||||||
VERSION_STRING = 1.0
|
VERSION_STRING = 1.0
|
||||||
ENTRY_POINT = VtoyUtilEfiMain
|
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]
|
[Sources]
|
||||||
VtoyUtil.h
|
VtoyUtil.h
|
||||||
|
|||||||
@@ -205,6 +205,7 @@
|
|||||||
[Components]
|
[Components]
|
||||||
MdeModulePkg/Application/Ventoy/Ventoy.inf
|
MdeModulePkg/Application/Ventoy/Ventoy.inf
|
||||||
MdeModulePkg/Application/VtoyUtil/VtoyUtil.inf
|
MdeModulePkg/Application/VtoyUtil/VtoyUtil.inf
|
||||||
|
MdeModulePkg/Application/VtoyShim/VtoyShim.inf
|
||||||
MdeModulePkg/Application/VDiskChain/VDiskChain.inf
|
MdeModulePkg/Application/VDiskChain/VDiskChain.inf
|
||||||
MdeModulePkg/Application/HelloWorld/HelloWorld.inf
|
MdeModulePkg/Application/HelloWorld/HelloWorld.inf
|
||||||
MdeModulePkg/Application/DumpDynPcd/DumpDynPcd.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/misc.h>
|
||||||
#include <grub/mm.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. */
|
/* The initial context. */
|
||||||
static struct grub_env_context initial_context;
|
static struct grub_env_context initial_context;
|
||||||
|
|
||||||
@@ -238,12 +241,12 @@ grub_env_export (const char *name)
|
|||||||
if (! var)
|
if (! var)
|
||||||
{
|
{
|
||||||
grub_err_t err;
|
grub_err_t err;
|
||||||
|
|
||||||
err = grub_env_set (name, "");
|
err = grub_env_set (name, "");
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
var = grub_env_find (name);
|
var = grub_env_find (name);
|
||||||
}
|
}
|
||||||
var->global = 1;
|
var->global = 1;
|
||||||
|
|
||||||
return GRUB_ERR_NONE;
|
return GRUB_ERR_NONE;
|
||||||
|
|||||||
@@ -35,6 +35,8 @@
|
|||||||
#include <grub/i18n.h>
|
#include <grub/i18n.h>
|
||||||
#include <grub/lib/cmdline.h>
|
#include <grub/lib/cmdline.h>
|
||||||
#include <grub/linux.h>
|
#include <grub/linux.h>
|
||||||
|
#include <grub/time.h>
|
||||||
|
#include <grub/env.h>
|
||||||
#include <grub/machine/kernel.h>
|
#include <grub/machine/kernel.h>
|
||||||
|
|
||||||
GRUB_MOD_LICENSE ("GPLv3+");
|
GRUB_MOD_LICENSE ("GPLv3+");
|
||||||
@@ -297,7 +299,7 @@ grub_linux_setup_video (struct linux_kernel_params *params)
|
|||||||
params->lfb_size >>= 16;
|
params->lfb_size >>= 16;
|
||||||
params->have_vga = GRUB_VIDEO_LINUX_TYPE_VESA;
|
params->have_vga = GRUB_VIDEO_LINUX_TYPE_VESA;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GRUB_VIDEO_DRIVER_EFI_UGA:
|
case GRUB_VIDEO_DRIVER_EFI_UGA:
|
||||||
case GRUB_VIDEO_DRIVER_EFI_GOP:
|
case GRUB_VIDEO_DRIVER_EFI_GOP:
|
||||||
params->have_vga = GRUB_VIDEO_LINUX_TYPE_EFIFB;
|
params->have_vga = GRUB_VIDEO_LINUX_TYPE_EFIFB;
|
||||||
@@ -413,11 +415,11 @@ static void ventoy_debug_pause(void)
|
|||||||
{
|
{
|
||||||
char key;
|
char key;
|
||||||
|
|
||||||
if (0 == ventoy_debug)
|
if (0 == ventoy_debug)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
grub_printf("press Enter to continue ......\n");
|
grub_printf("press Enter to continue ......\n");
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
@@ -426,7 +428,7 @@ static void ventoy_debug_pause(void)
|
|||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ventoy_preboot(void)
|
static int ventoy_preboot(void)
|
||||||
@@ -435,7 +437,7 @@ static int ventoy_preboot(void)
|
|||||||
const char *file;
|
const char *file;
|
||||||
char buf[128];
|
char buf[128];
|
||||||
|
|
||||||
if (ventoy_debug)
|
if (ventoy_debug)
|
||||||
{
|
{
|
||||||
grub_printf("ventoy_preboot %d %d\n", ventoy_linux_argc, ventoy_initrd_called);
|
grub_printf("ventoy_preboot %d %d\n", ventoy_linux_argc, ventoy_initrd_called);
|
||||||
ventoy_debug_pause();
|
ventoy_debug_pause();
|
||||||
@@ -462,7 +464,7 @@ static int ventoy_preboot(void)
|
|||||||
ventoy_extra_initrd_list[ventoy_extra_initrd_num++] = grub_strdup(file);
|
ventoy_extra_initrd_list[ventoy_extra_initrd_num++] = grub_strdup(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ventoy_debug)
|
if (ventoy_debug)
|
||||||
{
|
{
|
||||||
grub_printf("========== initrd list ==========\n");
|
grub_printf("========== initrd list ==========\n");
|
||||||
for (i = 0; i < ventoy_extra_initrd_num; i++)
|
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("%s\n", ventoy_extra_initrd_list[i]);
|
||||||
}
|
}
|
||||||
grub_printf("=================================\n");
|
grub_printf("=================================\n");
|
||||||
|
|
||||||
ventoy_debug_pause();
|
ventoy_debug_pause();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -500,7 +502,7 @@ static int ventoy_boot_opt_filter(char *opt)
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (grub_strncmp(opt, "init=", 5) == 0)
|
if (grub_strncmp(opt, "init=", 5) == 0)
|
||||||
{
|
{
|
||||||
opt[0] = 'v';
|
opt[0] = 'v';
|
||||||
@@ -521,12 +523,12 @@ static int ventoy_boot_opt_filter(char *opt)
|
|||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (grub_strncmp(opt, "loglevel=", 9) == 0)
|
if (grub_strncmp(opt, "loglevel=", 9) == 0)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (grub_strcmp(opt, "splash") == 0)
|
if (grub_strcmp(opt, "splash") == 0)
|
||||||
{
|
{
|
||||||
return 1;
|
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[count] = ventoy_linux_args[i + (LINUX_MAX_ARGC / 2)];
|
||||||
ventoy_linux_args[i + (LINUX_MAX_ARGC / 2)] = NULL;
|
ventoy_linux_args[i + (LINUX_MAX_ARGC / 2)] = NULL;
|
||||||
|
|
||||||
if (ventoy_linux_args[count][0] == '@')
|
if (ventoy_linux_args[count][0] == '@')
|
||||||
{
|
{
|
||||||
env = grub_env_get(ventoy_linux_args[count] + 1);
|
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))
|
if (0 == ventoy_boot_opt_filter(last))
|
||||||
{
|
{
|
||||||
ventoy_linux_args[count++] = grub_strdup(last);
|
ventoy_linux_args[count++] = grub_strdup(last);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -634,7 +636,7 @@ static int ventoy_bootopt_hook(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -662,10 +664,10 @@ static int ventoy_bootopt_hook(int argc, char *argv[])
|
|||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
grub_printf("%s ", ventoy_linux_args[i]);
|
grub_printf("%s ", ventoy_linux_args[i]);
|
||||||
}
|
}
|
||||||
grub_printf("\n================================\n");
|
grub_printf("\n================================\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -677,7 +679,7 @@ grub_cmd_extra_initrd_append (grub_command_t cmd __attribute__ ((unused)),
|
|||||||
char *pos = NULL;
|
char *pos = NULL;
|
||||||
char *end = NULL;
|
char *end = NULL;
|
||||||
char buf[256] = {0};
|
char buf[256] = {0};
|
||||||
|
|
||||||
if (argc != 1)
|
if (argc != 1)
|
||||||
{
|
{
|
||||||
return 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]);
|
grub_snprintf(buf, sizeof(buf), "newc:%s:%s", end + 1, argv[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ventoy_extra_initrd_num < 256)
|
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 argc, char *argv[])
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
(void)argc;
|
(void)argc;
|
||||||
(void)argv;
|
(void)argv;
|
||||||
|
|
||||||
@@ -750,6 +752,16 @@ grub_linux_boot (void)
|
|||||||
grub_size_t mmap_size;
|
grub_size_t mmap_size;
|
||||||
grub_size_t cl_offset;
|
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();
|
ventoy_preboot();
|
||||||
|
|
||||||
#ifdef GRUB_MACHINE_IEEE1275
|
#ifdef GRUB_MACHINE_IEEE1275
|
||||||
@@ -924,9 +936,9 @@ grub_linux_boot (void)
|
|||||||
&efi_desc_size, &efi_desc_version);
|
&efi_desc_size, &efi_desc_version);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
/* Note that no boot services are available from here. */
|
/* 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);
|
+ ((grub_uint8_t *) efi_mmap_buf - (grub_uint8_t *) real_mode_mem);
|
||||||
/* Pass EFI parameters. */
|
/* Pass EFI parameters. */
|
||||||
if (grub_le_to_cpu16 (ctx.params->version) >= 0x0208)
|
if (grub_le_to_cpu16 (ctx.params->version) >= 0x0208)
|
||||||
@@ -1008,7 +1020,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
|||||||
if (tip)
|
if (tip)
|
||||||
{
|
{
|
||||||
grub_printf("%s\n", 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;
|
align = 0;
|
||||||
relocatable = 0;
|
relocatable = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (grub_le_to_cpu16 (lh.version) >= 0x020a)
|
if (grub_le_to_cpu16 (lh.version) >= 0x020a)
|
||||||
{
|
{
|
||||||
min_align = lh.min_alignment;
|
min_align = lh.min_alignment;
|
||||||
@@ -1361,7 +1373,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
|||||||
- (sizeof (LINUX_IMAGE) - 1),
|
- (sizeof (LINUX_IMAGE) - 1),
|
||||||
GRUB_VERIFY_KERNEL_CMDLINE);
|
GRUB_VERIFY_KERNEL_CMDLINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (err)
|
if (err)
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
@@ -1495,7 +1507,7 @@ ventoy_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
|
|||||||
|
|
||||||
if (ventoy_linux_argc == 0)
|
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"));
|
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");
|
grub_printf("=================================\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
return grub_cmd_initrd(cmd, ventoy_extra_initrd_num, ventoy_extra_initrd_list);
|
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;
|
int i;
|
||||||
const char *vtdebug;
|
const char *vtdebug;
|
||||||
grub_command_t regcmd;
|
grub_command_t regcmd;
|
||||||
|
|
||||||
for (i = 0; i < argc; i++)
|
for (i = 0; i < argc; i++)
|
||||||
{
|
{
|
||||||
ventoy_linux_args[ventoy_linux_argc + (LINUX_MAX_ARGC / 2) ] = grub_strdup(argv[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;
|
ventoy_linux16_func = regcmd->func;
|
||||||
regcmd->func = grub_cmd_linux;
|
regcmd->func = grub_cmd_linux;
|
||||||
}
|
}
|
||||||
|
|
||||||
regcmd = grub_command_find("initrd16");
|
regcmd = grub_command_find("initrd16");
|
||||||
if (regcmd)
|
if (regcmd)
|
||||||
{
|
{
|
||||||
@@ -1576,7 +1588,7 @@ grub_cmd_unset_boot_opt (grub_command_t cmd __attribute__ ((unused)),
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
grub_command_t regcmd;
|
grub_command_t regcmd;
|
||||||
|
|
||||||
(void)argc;
|
(void)argc;
|
||||||
(void)argv;
|
(void)argv;
|
||||||
|
|
||||||
@@ -1612,7 +1624,7 @@ grub_cmd_unset_boot_opt (grub_command_t cmd __attribute__ ((unused)),
|
|||||||
}
|
}
|
||||||
ventoy_initrd16_func = NULL;
|
ventoy_initrd16_func = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1633,7 +1645,7 @@ GRUB_MOD_INIT(linux)
|
|||||||
0, N_("Load initrd."));
|
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_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_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_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_(""));
|
cmd_extra_initrd_reset = grub_register_command ("vt_img_extra_initrd_reset", grub_cmd_extra_initrd_reset, 0, N_(""));
|
||||||
|
|
||||||
|
|||||||
@@ -438,11 +438,11 @@ static void menu_set_chosen_tip(grub_menu_t menu, int entry)
|
|||||||
|
|
||||||
if (g_ventoy_theme_path[0])
|
if (g_ventoy_theme_path[0])
|
||||||
{
|
{
|
||||||
grub_env_set("theme", g_ventoy_theme_path);
|
grub_env_set("theme", g_ventoy_theme_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_ventoy_tip_msg1 = g_ventoy_tip_msg2 = NULL;
|
g_ventoy_tip_msg1 = g_ventoy_tip_msg2 = NULL;
|
||||||
if (e && e->id && grub_strncmp(e->id, "VID_", 4) == 0)
|
if (e && e->id && grub_strncmp(e->id, "VID_", 4) == 0)
|
||||||
{
|
{
|
||||||
g_ventoy_theme_path[0] = 0;
|
g_ventoy_theme_path[0] = 0;
|
||||||
img = (img_info *)(void *)grub_strtoul(e->id + 4, NULL, 16);
|
img = (img_info *)(void *)grub_strtoul(e->id + 4, NULL, 16);
|
||||||
@@ -480,7 +480,7 @@ static void
|
|||||||
menu_set_chosen_entry (grub_menu_t menu, int entry)
|
menu_set_chosen_entry (grub_menu_t menu, int entry)
|
||||||
{
|
{
|
||||||
struct grub_menu_viewer *cur;
|
struct grub_menu_viewer *cur;
|
||||||
|
|
||||||
menu_set_chosen_tip(menu, entry);
|
menu_set_chosen_tip(menu, entry);
|
||||||
for (cur = viewers; cur; cur = cur->next)
|
for (cur = viewers; cur; cur = cur->next)
|
||||||
cur->set_chosen_entry (entry, cur->data);
|
cur->set_chosen_entry (entry, cur->data);
|
||||||
@@ -972,7 +972,7 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
|
|||||||
;
|
;
|
||||||
menu_fini ();
|
menu_fini ();
|
||||||
goto refresh;
|
goto refresh;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case (GRUB_TERM_CTRL | 'd'):
|
case (GRUB_TERM_CTRL | 'd'):
|
||||||
@@ -981,7 +981,7 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
|
|||||||
{
|
{
|
||||||
menu_fini ();
|
menu_fini ();
|
||||||
g_ventoy_memdisk_mode = 1 - g_ventoy_memdisk_mode;
|
g_ventoy_memdisk_mode = 1 - g_ventoy_memdisk_mode;
|
||||||
g_ventoy_menu_refresh = 1;
|
g_ventoy_menu_refresh = 1;
|
||||||
goto refresh;
|
goto refresh;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -992,7 +992,7 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
|
|||||||
menu_fini ();
|
menu_fini ();
|
||||||
g_ventoy_iso_raw = 1 - g_ventoy_iso_raw;
|
g_ventoy_iso_raw = 1 - g_ventoy_iso_raw;
|
||||||
g_ventoy_menu_refresh = 1;
|
g_ventoy_menu_refresh = 1;
|
||||||
goto refresh;
|
goto refresh;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case (GRUB_TERM_CTRL | 'r'):
|
case (GRUB_TERM_CTRL | 'r'):
|
||||||
@@ -1001,10 +1001,10 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
|
|||||||
{
|
{
|
||||||
menu_fini ();
|
menu_fini ();
|
||||||
g_ventoy_grub2_mode = 1 - g_ventoy_grub2_mode;
|
g_ventoy_grub2_mode = 1 - g_ventoy_grub2_mode;
|
||||||
g_ventoy_menu_refresh = 1;
|
g_ventoy_menu_refresh = 1;
|
||||||
goto refresh;
|
goto refresh;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case (GRUB_TERM_CTRL | 'w'):
|
case (GRUB_TERM_CTRL | 'w'):
|
||||||
case 'w':
|
case 'w':
|
||||||
if (0 == g_ventoy_secondary_menu_on)
|
if (0 == g_ventoy_secondary_menu_on)
|
||||||
@@ -1039,7 +1039,7 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
|
|||||||
case 'm':
|
case 'm':
|
||||||
{
|
{
|
||||||
if (0 == g_ventoy_secondary_menu_on)
|
if (0 == g_ventoy_secondary_menu_on)
|
||||||
{
|
{
|
||||||
if (g_ventoy_cur_img_path)
|
if (g_ventoy_cur_img_path)
|
||||||
{
|
{
|
||||||
grub_env_set("VTOY_CHKSUM_FILE_PATH", g_ventoy_cur_img_path);
|
grub_env_set("VTOY_CHKSUM_FILE_PATH", g_ventoy_cur_img_path);
|
||||||
@@ -1128,16 +1128,17 @@ static struct grub_menu_execute_callback execution_callback =
|
|||||||
static grub_err_t
|
static grub_err_t
|
||||||
show_menu (grub_menu_t menu, int nested, int autobooted)
|
show_menu (grub_menu_t menu, int nested, int autobooted)
|
||||||
{
|
{
|
||||||
const char *def;
|
const char *def;
|
||||||
def = grub_env_get("VTOY_DEFAULT_IMAGE");
|
def = grub_env_get("VTOY_DEFAULT_IMAGE");
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
int ndown;
|
int ndown;
|
||||||
|
char *pos = NULL;
|
||||||
int boot_entry;
|
int boot_entry;
|
||||||
grub_menu_entry_t e;
|
grub_menu_entry_t e;
|
||||||
int auto_boot;
|
int auto_boot;
|
||||||
|
|
||||||
boot_entry = run_menu (menu, nested, &auto_boot);
|
boot_entry = run_menu (menu, nested, &auto_boot);
|
||||||
if (boot_entry < 0)
|
if (boot_entry < 0)
|
||||||
break;
|
break;
|
||||||
@@ -1149,7 +1150,7 @@ show_menu (grub_menu_t menu, int nested, int autobooted)
|
|||||||
if (autobooted == 0 && auto_boot == 0) {
|
if (autobooted == 0 && auto_boot == 0) {
|
||||||
g_ventoy_last_entry = boot_entry;
|
g_ventoy_last_entry = boot_entry;
|
||||||
if (g_ventoy_menu_esc)
|
if (g_ventoy_menu_esc)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (autobooted == 0 && g_ventoy_menu_esc && auto_boot) {
|
if (autobooted == 0 && g_ventoy_menu_esc && auto_boot) {
|
||||||
@@ -1162,7 +1163,7 @@ show_menu (grub_menu_t menu, int nested, int autobooted)
|
|||||||
continue; /* Menu is empty. */
|
continue; /* Menu is empty. */
|
||||||
|
|
||||||
if (2 == e->argc && e->args && e->args[1] && grub_strncmp(e->args[1], "VTOY_RET", 8) == 0)
|
if (2 == e->argc && e->args && e->args[1] && grub_strncmp(e->args[1], "VTOY_RET", 8) == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
grub_cls ();
|
grub_cls ();
|
||||||
|
|
||||||
@@ -1175,16 +1176,29 @@ show_menu (grub_menu_t menu, int nested, int autobooted)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
if (2 == e->argc && e->args && e->args[1] && grub_strncmp(e->args[1], "VTOY_RUN_RET", 12) == 0)
|
if (2 == e->argc && e->args && e->args[1] && grub_strncmp(e->args[1], "VTOY_RUN_RET", 12) == 0)
|
||||||
break;
|
break;
|
||||||
else if (2 == e->argc && e->args && e->args[1] && grub_strncmp(e->args[1], "VTOY_RUN_SET", 12) == 0) {
|
else if (2 == e->argc && e->args && e->args[1] && grub_strncmp(e->args[1], "VTOY_RUN_SET_", 13) == 0) {
|
||||||
ndown = (int)grub_strtol(e->args[1] + 12, NULL, 10);
|
pos = NULL;
|
||||||
|
ndown = (int)grub_strtol(e->args[1] + 13, &pos, 10);
|
||||||
while (ndown > 0)
|
while (ndown > 0)
|
||||||
{
|
{
|
||||||
ventoy_menu_push_key(GRUB_TERM_KEY_DOWN);
|
ventoy_menu_push_key(GRUB_TERM_KEY_DOWN);
|
||||||
ndown--;
|
ndown--;
|
||||||
}
|
}
|
||||||
|
|
||||||
ventoy_menu_push_key('\n');
|
ventoy_menu_push_key('\n');
|
||||||
break;
|
|
||||||
|
if (pos && *pos == '_')
|
||||||
|
{
|
||||||
|
ndown = (int)grub_strtol(pos + 1, NULL, 10);
|
||||||
|
while (ndown > 0)
|
||||||
|
{
|
||||||
|
ventoy_menu_push_key(GRUB_TERM_KEY_DOWN);
|
||||||
|
ndown--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* ventoy.c
|
* ventoy.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2020, longpanda <admin@ventoy.net>
|
* Copyright (c) 2020, longpanda <admin@ventoy.net>
|
||||||
*
|
*
|
||||||
@@ -7,12 +7,12 @@
|
|||||||
* modify it under the terms of the GNU General Public License as
|
* modify it under the terms of the GNU General Public License as
|
||||||
* published by the Free Software Foundation; either version 3 of the
|
* published by the Free Software Foundation; either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful, but
|
* This program is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
@@ -49,6 +49,10 @@ int g_ventoy_debug = 0;
|
|||||||
static int g_efi_os = 0xFF;
|
static int g_efi_os = 0xFF;
|
||||||
grub_uint32_t g_ventoy_plat_data;
|
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, ...)
|
void ventoy_debug(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
@@ -137,7 +141,7 @@ int ventoy_str_len_alnum(const char *str, int len)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int slen;
|
int slen;
|
||||||
|
|
||||||
if (NULL == str || 0 == *str)
|
if (NULL == str || 0 == *str)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
@@ -168,7 +172,7 @@ int ventoy_str_len_alnum(const char *str, int len)
|
|||||||
char * ventoy_str_basename(char *path)
|
char * ventoy_str_basename(char *path)
|
||||||
{
|
{
|
||||||
char *pos = NULL;
|
char *pos = NULL;
|
||||||
|
|
||||||
pos = grub_strrchr(path, '/');
|
pos = grub_strrchr(path, '/');
|
||||||
if (pos)
|
if (pos)
|
||||||
{
|
{
|
||||||
@@ -185,17 +189,17 @@ char * ventoy_str_basename(char *path)
|
|||||||
int ventoy_str_chrcnt(const char *str, char c)
|
int ventoy_str_chrcnt(const char *str, char c)
|
||||||
{
|
{
|
||||||
int n = 0;
|
int n = 0;
|
||||||
|
|
||||||
if (str)
|
if (str)
|
||||||
{
|
{
|
||||||
while (*str)
|
while (*str)
|
||||||
{
|
{
|
||||||
if (*str == c)
|
if (*str == c)
|
||||||
{
|
{
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
str++;
|
str++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return n;
|
return n;
|
||||||
@@ -235,7 +239,7 @@ int ventoy_strncmp (const char *pattern, const char *str, grub_size_t n)
|
|||||||
grub_err_t ventoy_env_int_set(const char *name, int value)
|
grub_err_t ventoy_env_int_set(const char *name, int value)
|
||||||
{
|
{
|
||||||
char buf[16];
|
char buf[16];
|
||||||
|
|
||||||
grub_snprintf(buf, sizeof(buf), "%d", value);
|
grub_snprintf(buf, sizeof(buf), "%d", value);
|
||||||
return grub_env_set(name, buf);
|
return grub_env_set(name, buf);
|
||||||
}
|
}
|
||||||
@@ -248,13 +252,13 @@ void ventoy_debug_dump_guid(const char *prefix, grub_uint8_t *guid)
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
debug("%s", prefix);
|
debug("%s", prefix);
|
||||||
for (i = 0; i < 16; i++)
|
for (i = 0; i < 16; i++)
|
||||||
{
|
{
|
||||||
grub_printf("%02x ", guid[i]);
|
grub_printf("%02x ", guid[i]);
|
||||||
}
|
}
|
||||||
grub_printf("\n");
|
grub_printf("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
int ventoy_is_efi_os(void)
|
int ventoy_is_efi_os(void)
|
||||||
@@ -290,7 +294,7 @@ void ventoy_memfile_env_set(const char *prefix, const void *buf, unsigned long l
|
|||||||
grub_snprintf(name, sizeof(name), "%s_addr", prefix);
|
grub_snprintf(name, sizeof(name), "%s_addr", prefix);
|
||||||
grub_snprintf(val, sizeof(val), "0x%llx", (ulonglong)(ulong)buf);
|
grub_snprintf(val, sizeof(val), "0x%llx", (ulonglong)(ulong)buf);
|
||||||
grub_env_set(name, val);
|
grub_env_set(name, val);
|
||||||
|
|
||||||
grub_snprintf(name, sizeof(name), "%s_size", prefix);
|
grub_snprintf(name, sizeof(name), "%s_size", prefix);
|
||||||
grub_snprintf(val, sizeof(val), "%llu", len);
|
grub_snprintf(val, sizeof(val), "%llu", len);
|
||||||
grub_env_set(name, val);
|
grub_env_set(name, val);
|
||||||
@@ -298,9 +302,119 @@ void ventoy_memfile_env_set(const char *prefix, const void *buf, unsigned long l
|
|||||||
return;
|
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 *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)
|
||||||
|
{
|
||||||
|
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)
|
static int ventoy_arch_mode_init(void)
|
||||||
{
|
{
|
||||||
#ifdef GRUB_MACHINE_EFI
|
#ifdef GRUB_MACHINE_EFI
|
||||||
|
|
||||||
if (grub_strcmp(GRUB_TARGET_CPU, "i386") == 0)
|
if (grub_strcmp(GRUB_TARGET_CPU, "i386") == 0)
|
||||||
{
|
{
|
||||||
g_ventoy_plat_data = VTOY_PLAT_I386_UEFI;
|
g_ventoy_plat_data = VTOY_PLAT_I386_UEFI;
|
||||||
@@ -329,19 +443,6 @@ static int ventoy_arch_mode_init(void)
|
|||||||
return 0;
|
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)
|
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;
|
grub_uint64_t *total_mem = (grub_uint64_t *)data;
|
||||||
@@ -374,7 +475,7 @@ static int ventoy_hwinfo_init(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static global_var_cfg g_global_vars[] =
|
static global_var_cfg g_global_vars[] =
|
||||||
{
|
{
|
||||||
{ "gfxmode", "1024x768", NULL },
|
{ "gfxmode", "1024x768", NULL },
|
||||||
{ ventoy_left_key, "5%", NULL },
|
{ ventoy_left_key, "5%", NULL },
|
||||||
@@ -422,20 +523,21 @@ int ventoy_global_var_init(void)
|
|||||||
for (i = 0; g_global_vars[i].name; i++)
|
for (i = 0; g_global_vars[i].name; i++)
|
||||||
{
|
{
|
||||||
g_global_vars[i].value = grub_strdup(g_global_vars[i].defval);
|
g_global_vars[i].value = grub_strdup(g_global_vars[i].defval);
|
||||||
ventoy_env_export(g_global_vars[i].name, g_global_vars[i].defval);
|
ventoy_env_export(g_global_vars[i].name, g_global_vars[i].defval);
|
||||||
grub_register_variable_hook(g_global_vars[i].name, ventoy_global_var_read_hook, ventoy_global_var_write_hook);
|
grub_register_variable_hook(g_global_vars[i].name, ventoy_global_var_read_hook, ventoy_global_var_write_hook);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ctrl_var_cfg g_ctrl_vars[] =
|
static ctrl_var_cfg g_ctrl_vars[] =
|
||||||
{
|
{
|
||||||
{ "VTOY_WIN11_BYPASS_CHECK", 1 },
|
{ "VTOY_WIN11_BYPASS_CHECK", "1" },
|
||||||
{ "VTOY_WIN11_BYPASS_NRO", 1 },
|
{ "VTOY_WIN11_BYPASS_NRO", "1" },
|
||||||
{ "VTOY_LINUX_REMOUNT", 0 },
|
{ "VTOY_LINUX_REMOUNT", "0" },
|
||||||
{ "VTOY_SECONDARY_BOOT_MENU", 1 },
|
{ "VTOY_SECONDARY_BOOT_MENU", "1" },
|
||||||
{ NULL, 0 }
|
{ "VTOY_WIN_UEFI_RES_LOCK", "3" },
|
||||||
|
{ NULL, "" }
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char * ventoy_ctrl_var_read_hook(struct grub_env_var *var, const char *val)
|
static const char * ventoy_ctrl_var_read_hook(struct grub_env_var *var, const char *val)
|
||||||
@@ -446,7 +548,7 @@ static const char * ventoy_ctrl_var_read_hook(struct grub_env_var *var, const ch
|
|||||||
{
|
{
|
||||||
if (grub_strcmp(g_ctrl_vars[i].name, var->name) == 0)
|
if (grub_strcmp(g_ctrl_vars[i].name, var->name) == 0)
|
||||||
{
|
{
|
||||||
return g_ctrl_vars[i].value ? "1" : "0";
|
return g_ctrl_vars[i].szval;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -461,14 +563,14 @@ static char * ventoy_ctrl_var_write_hook(struct grub_env_var *var, const char *v
|
|||||||
{
|
{
|
||||||
if (grub_strcmp(g_ctrl_vars[i].name, var->name) == 0)
|
if (grub_strcmp(g_ctrl_vars[i].name, var->name) == 0)
|
||||||
{
|
{
|
||||||
if (val && val[0] == '1' && val[1] == 0)
|
if (val && grub_isdigit(val[0]) && val[1] == 0)
|
||||||
{
|
{
|
||||||
g_ctrl_vars[i].value = 1;
|
g_ctrl_vars[i].szval[0] = val[0];
|
||||||
return grub_strdup("1");
|
return grub_strdup(val);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_ctrl_vars[i].value = 0;
|
g_ctrl_vars[i].szval[0] = '0';
|
||||||
return grub_strdup("0");
|
return grub_strdup("0");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -479,12 +581,13 @@ static char * ventoy_ctrl_var_write_hook(struct grub_env_var *var, const char *v
|
|||||||
|
|
||||||
int ventoy_ctrl_var_init(void)
|
int ventoy_ctrl_var_init(void)
|
||||||
{
|
{
|
||||||
int i;
|
ctrl_var_cfg *cfg = g_ctrl_vars;
|
||||||
|
|
||||||
for (i = 0; g_ctrl_vars[i].name; i++)
|
while (cfg->name)
|
||||||
{
|
{
|
||||||
ventoy_env_export(g_ctrl_vars[i].name, g_ctrl_vars[i].value ? "1" : "0");
|
ventoy_env_export(cfg->name, cfg->szval);
|
||||||
grub_register_variable_hook(g_ctrl_vars[i].name, ventoy_ctrl_var_read_hook, ventoy_ctrl_var_write_hook);
|
grub_register_variable_hook(cfg->name, ventoy_ctrl_var_read_hook, ventoy_ctrl_var_write_hook);
|
||||||
|
cfg++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -495,6 +598,11 @@ GRUB_MOD_INIT(ventoy)
|
|||||||
ventoy_hwinfo_init();
|
ventoy_hwinfo_init();
|
||||||
ventoy_env_init();
|
ventoy_env_init();
|
||||||
ventoy_arch_mode_init();
|
ventoy_arch_mode_init();
|
||||||
|
|
||||||
|
#ifdef GRUB_MACHINE_EFI
|
||||||
|
ventoy_secure_boot_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
ventoy_register_all_cmd();
|
ventoy_register_all_cmd();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
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
|
* modify it under the terms of the GNU General Public License as
|
||||||
* published by the Free Software Foundation; either version 3 of the
|
* published by the Free Software Foundation; either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful, but
|
* This program is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
@@ -142,7 +142,7 @@ typedef enum VTOY_FILE_FLT
|
|||||||
VTOY_FILE_FLT_IMG, /* .img */
|
VTOY_FILE_FLT_IMG, /* .img */
|
||||||
VTOY_FILE_FLT_VHD, /* .vhd(x) */
|
VTOY_FILE_FLT_VHD, /* .vhd(x) */
|
||||||
VTOY_FILE_FLT_VTOY, /* .vtoy */
|
VTOY_FILE_FLT_VTOY, /* .vtoy */
|
||||||
|
|
||||||
VTOY_FILE_FLT_BUTT
|
VTOY_FILE_FLT_BUTT
|
||||||
}VTOY_FILE_FLT;
|
}VTOY_FILE_FLT;
|
||||||
|
|
||||||
@@ -160,7 +160,7 @@ typedef struct cmd_para
|
|||||||
grub_extcmd_func_t func;
|
grub_extcmd_func_t func;
|
||||||
grub_command_flags_t flags;
|
grub_command_flags_t flags;
|
||||||
const struct grub_arg_option *parser;
|
const struct grub_arg_option *parser;
|
||||||
|
|
||||||
const char *summary;
|
const char *summary;
|
||||||
const char *description;
|
const char *description;
|
||||||
|
|
||||||
@@ -171,7 +171,7 @@ typedef struct cmd_para
|
|||||||
#define ventoy_align(value, align) (((value) + ((align) - 1)) & (~((align) - 1)))
|
#define ventoy_align(value, align) (((value) + ((align) - 1)) & (~((align) - 1)))
|
||||||
|
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
typedef struct cpio_newc_header
|
typedef struct cpio_newc_header
|
||||||
{
|
{
|
||||||
char c_magic[6];
|
char c_magic[6];
|
||||||
char c_ino[8];
|
char c_ino[8];
|
||||||
@@ -195,6 +195,16 @@ typedef struct cpio_newc_header
|
|||||||
#define check_free(p, func) if (p) { func(p); p = NULL; }
|
#define check_free(p, func) if (p) { func(p); p = NULL; }
|
||||||
#define grub_check_free(p) if (p) { grub_free(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);
|
typedef int (*grub_char_check_func)(int c);
|
||||||
#define ventoy_is_decimal(str) ventoy_string_check(str, grub_isdigit)
|
#define ventoy_is_decimal(str) ventoy_string_check(str, grub_isdigit)
|
||||||
|
|
||||||
@@ -206,7 +216,7 @@ typedef struct ventoy_patch_vhd
|
|||||||
grub_uint8_t part_offset_or_guid[16];
|
grub_uint8_t part_offset_or_guid[16];
|
||||||
grub_uint32_t reserved1;
|
grub_uint32_t reserved1;
|
||||||
grub_uint32_t part_type;
|
grub_uint32_t part_type;
|
||||||
grub_uint8_t disk_signature_or_guid[16];
|
grub_uint8_t disk_signature_or_guid[16];
|
||||||
grub_uint8_t reserved2[16];
|
grub_uint8_t reserved2[16];
|
||||||
grub_uint8_t vhd_file_path[1];
|
grub_uint8_t vhd_file_path[1];
|
||||||
}ventoy_patch_vhd;
|
}ventoy_patch_vhd;
|
||||||
@@ -284,7 +294,7 @@ typedef struct img_info
|
|||||||
const char *tip2;
|
const char *tip2;
|
||||||
const char *class;
|
const char *class;
|
||||||
const char *menu_prefix;
|
const char *menu_prefix;
|
||||||
|
|
||||||
int id;
|
int id;
|
||||||
int type;
|
int type;
|
||||||
int plugin_list_index;
|
int plugin_list_index;
|
||||||
@@ -313,8 +323,8 @@ typedef struct img_iterator_node
|
|||||||
|
|
||||||
struct img_iterator_node *parent;
|
struct img_iterator_node *parent;
|
||||||
struct img_iterator_node *firstchild;
|
struct img_iterator_node *firstchild;
|
||||||
|
|
||||||
void *firstiso;
|
void *firstiso;
|
||||||
}img_iterator_node;
|
}img_iterator_node;
|
||||||
|
|
||||||
|
|
||||||
@@ -328,7 +338,7 @@ typedef struct initrd_info
|
|||||||
|
|
||||||
grub_uint8_t iso_type; // 0: iso9660 1:udf
|
grub_uint8_t iso_type; // 0: iso9660 1:udf
|
||||||
grub_uint32_t udf_start_block;
|
grub_uint32_t udf_start_block;
|
||||||
|
|
||||||
grub_uint64_t override_offset;
|
grub_uint64_t override_offset;
|
||||||
grub_uint32_t override_length;
|
grub_uint32_t override_length;
|
||||||
char override_data[32];
|
char override_data[32];
|
||||||
@@ -397,7 +407,7 @@ void ventoy_debug(const char *fmt, ...);
|
|||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
|
|
||||||
/* A WIM resource header */
|
/* A WIM resource header */
|
||||||
typedef struct wim_resource_header
|
typedef struct wim_resource_header
|
||||||
{
|
{
|
||||||
grub_uint64_t size_in_wim:56; /* Compressed length */
|
grub_uint64_t size_in_wim:56; /* Compressed length */
|
||||||
grub_uint64_t flags:8; /* flags */
|
grub_uint64_t flags:8; /* flags */
|
||||||
@@ -409,7 +419,7 @@ typedef struct wim_resource_header
|
|||||||
#define WIM_RESHDR_ZLEN_MASK 0x00ffffffffffffffULL
|
#define WIM_RESHDR_ZLEN_MASK 0x00ffffffffffffffULL
|
||||||
|
|
||||||
/* WIM resource header flags */
|
/* WIM resource header flags */
|
||||||
typedef enum wim_resource_header_flags
|
typedef enum wim_resource_header_flags
|
||||||
{
|
{
|
||||||
WIM_RESHDR_METADATA = ( 0x02ULL << 56 ), /* Resource contains metadata */
|
WIM_RESHDR_METADATA = ( 0x02ULL << 56 ), /* Resource contains metadata */
|
||||||
WIM_RESHDR_COMPRESSED = ( 0x04ULL << 56 ), /* Resource is compressed */
|
WIM_RESHDR_COMPRESSED = ( 0x04ULL << 56 ), /* Resource is compressed */
|
||||||
@@ -419,7 +429,7 @@ typedef enum wim_resource_header_flags
|
|||||||
#define WIM_HEAD_SIGNATURE "MSWIM\0\0"
|
#define WIM_HEAD_SIGNATURE "MSWIM\0\0"
|
||||||
|
|
||||||
/* WIM header */
|
/* WIM header */
|
||||||
typedef struct wim_header
|
typedef struct wim_header
|
||||||
{
|
{
|
||||||
grub_uint8_t signature[8]; /* Signature */
|
grub_uint8_t signature[8]; /* Signature */
|
||||||
grub_uint32_t header_len; /* Header length */
|
grub_uint32_t header_len; /* Header length */
|
||||||
@@ -439,21 +449,21 @@ typedef struct wim_header
|
|||||||
} wim_header;
|
} wim_header;
|
||||||
|
|
||||||
/* WIM header flags */
|
/* WIM header flags */
|
||||||
typedef enum wim_header_flags
|
typedef enum wim_header_flags
|
||||||
{
|
{
|
||||||
WIM_HDR_XPRESS = 0x00020000, /* WIM uses Xpress compresson */
|
WIM_HDR_XPRESS = 0x00020000, /* WIM uses Xpress compresson */
|
||||||
WIM_HDR_LZX = 0x00040000, /* WIM uses LZX compression */
|
WIM_HDR_LZX = 0x00040000, /* WIM uses LZX compression */
|
||||||
}wim_header_flags;
|
}wim_header_flags;
|
||||||
|
|
||||||
/* A WIM file hash */
|
/* A WIM file hash */
|
||||||
typedef struct wim_hash
|
typedef struct wim_hash
|
||||||
{
|
{
|
||||||
/* SHA-1 hash */
|
/* SHA-1 hash */
|
||||||
grub_uint8_t sha1[20];
|
grub_uint8_t sha1[20];
|
||||||
}wim_hash;
|
}wim_hash;
|
||||||
|
|
||||||
/* A WIM lookup table entry */
|
/* A WIM lookup table entry */
|
||||||
typedef struct wim_lookup_entry
|
typedef struct wim_lookup_entry
|
||||||
{
|
{
|
||||||
wim_resource_header resource; /* Resource header */
|
wim_resource_header resource; /* Resource header */
|
||||||
grub_uint16_t part; /* Part number */
|
grub_uint16_t part; /* Part number */
|
||||||
@@ -465,19 +475,19 @@ typedef struct wim_lookup_entry
|
|||||||
#define WIM_CHUNK_LEN 32768
|
#define WIM_CHUNK_LEN 32768
|
||||||
|
|
||||||
/* A WIM chunk buffer */
|
/* A WIM chunk buffer */
|
||||||
typedef struct wim_chunk_buffer
|
typedef struct wim_chunk_buffer
|
||||||
{
|
{
|
||||||
grub_uint8_t data[WIM_CHUNK_LEN]; /*Data */
|
grub_uint8_t data[WIM_CHUNK_LEN]; /*Data */
|
||||||
}wim_chunk_buffer;
|
}wim_chunk_buffer;
|
||||||
|
|
||||||
/* Security data */
|
/* Security data */
|
||||||
typedef struct wim_security_header
|
typedef struct wim_security_header
|
||||||
{
|
{
|
||||||
grub_uint32_t len; /* Length */
|
grub_uint32_t len; /* Length */
|
||||||
grub_uint32_t count; /* Number of entries */
|
grub_uint32_t count; /* Number of entries */
|
||||||
}wim_security_header;
|
}wim_security_header;
|
||||||
|
|
||||||
typedef struct wim_stream_entry
|
typedef struct wim_stream_entry
|
||||||
{
|
{
|
||||||
grub_uint64_t len;
|
grub_uint64_t len;
|
||||||
grub_uint64_t unused1;
|
grub_uint64_t unused1;
|
||||||
@@ -487,7 +497,7 @@ typedef struct wim_stream_entry
|
|||||||
}wim_stream_entry;
|
}wim_stream_entry;
|
||||||
|
|
||||||
/* Directory entry */
|
/* Directory entry */
|
||||||
typedef struct wim_directory_entry
|
typedef struct wim_directory_entry
|
||||||
{
|
{
|
||||||
grub_uint64_t len; /* Length */
|
grub_uint64_t len; /* Length */
|
||||||
grub_uint32_t attributes; /* Attributes */
|
grub_uint32_t attributes; /* Attributes */
|
||||||
@@ -590,7 +600,7 @@ typedef struct _VTOY_JSON
|
|||||||
struct _VTOY_JSON *pstChild;
|
struct _VTOY_JSON *pstChild;
|
||||||
|
|
||||||
JSON_TYPE enDataType;
|
JSON_TYPE enDataType;
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
char *pcStrVal;
|
char *pcStrVal;
|
||||||
int iNumVal;
|
int iNumVal;
|
||||||
@@ -702,7 +712,7 @@ int vtoy_json_parse_value
|
|||||||
(
|
(
|
||||||
char *pcNewStart,
|
char *pcNewStart,
|
||||||
char *pcRawStart,
|
char *pcRawStart,
|
||||||
VTOY_JSON *pstJson,
|
VTOY_JSON *pstJson,
|
||||||
const char *pcData,
|
const char *pcData,
|
||||||
const char **ppcEnd
|
const char **ppcEnd
|
||||||
);
|
);
|
||||||
@@ -718,51 +728,51 @@ int vtoy_json_scan_parse
|
|||||||
|
|
||||||
int vtoy_json_scan_array
|
int vtoy_json_scan_array
|
||||||
(
|
(
|
||||||
VTOY_JSON *pstJson,
|
VTOY_JSON *pstJson,
|
||||||
const char *szKey,
|
const char *szKey,
|
||||||
VTOY_JSON **ppstArrayItem
|
VTOY_JSON **ppstArrayItem
|
||||||
);
|
);
|
||||||
|
|
||||||
int vtoy_json_scan_array_ex
|
int vtoy_json_scan_array_ex
|
||||||
(
|
(
|
||||||
VTOY_JSON *pstJson,
|
VTOY_JSON *pstJson,
|
||||||
const char *szKey,
|
const char *szKey,
|
||||||
VTOY_JSON **ppstArrayItem
|
VTOY_JSON **ppstArrayItem
|
||||||
);
|
);
|
||||||
int vtoy_json_scan_object
|
int vtoy_json_scan_object
|
||||||
(
|
(
|
||||||
VTOY_JSON *pstJson,
|
VTOY_JSON *pstJson,
|
||||||
const char *szKey,
|
const char *szKey,
|
||||||
VTOY_JSON **ppstObjectItem
|
VTOY_JSON **ppstObjectItem
|
||||||
);
|
);
|
||||||
int vtoy_json_get_int
|
int vtoy_json_get_int
|
||||||
(
|
(
|
||||||
VTOY_JSON *pstJson,
|
VTOY_JSON *pstJson,
|
||||||
const char *szKey,
|
const char *szKey,
|
||||||
int *piValue
|
int *piValue
|
||||||
);
|
);
|
||||||
int vtoy_json_get_uint
|
int vtoy_json_get_uint
|
||||||
(
|
(
|
||||||
VTOY_JSON *pstJson,
|
VTOY_JSON *pstJson,
|
||||||
const char *szKey,
|
const char *szKey,
|
||||||
grub_uint32_t *puiValue
|
grub_uint32_t *puiValue
|
||||||
);
|
);
|
||||||
int vtoy_json_get_uint64
|
int vtoy_json_get_uint64
|
||||||
(
|
(
|
||||||
VTOY_JSON *pstJson,
|
VTOY_JSON *pstJson,
|
||||||
const char *szKey,
|
const char *szKey,
|
||||||
grub_uint64_t *pui64Value
|
grub_uint64_t *pui64Value
|
||||||
);
|
);
|
||||||
int vtoy_json_get_bool
|
int vtoy_json_get_bool
|
||||||
(
|
(
|
||||||
VTOY_JSON *pstJson,
|
VTOY_JSON *pstJson,
|
||||||
const char *szKey,
|
const char *szKey,
|
||||||
grub_uint8_t *pbValue
|
grub_uint8_t *pbValue
|
||||||
);
|
);
|
||||||
int vtoy_json_get_string
|
int vtoy_json_get_string
|
||||||
(
|
(
|
||||||
VTOY_JSON *pstJson,
|
VTOY_JSON *pstJson,
|
||||||
const char *szKey,
|
const char *szKey,
|
||||||
grub_uint32_t uiBufLen,
|
grub_uint32_t uiBufLen,
|
||||||
char *pcBuf
|
char *pcBuf
|
||||||
);
|
);
|
||||||
@@ -784,7 +794,7 @@ static inline int ventoy_isspace (int c)
|
|||||||
|
|
||||||
static inline int ventoy_is_word_end(int c)
|
static inline int ventoy_is_word_end(int c)
|
||||||
{
|
{
|
||||||
return (c == 0 || c == ',' || ventoy_isspace(c));
|
return (c == 0 || c == ',' || ventoy_isspace(c));
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
@@ -956,7 +966,7 @@ typedef struct persistence_config
|
|||||||
int cursel;
|
int cursel;
|
||||||
int backendnum;
|
int backendnum;
|
||||||
file_fullpath *backendpath;
|
file_fullpath *backendpath;
|
||||||
|
|
||||||
struct persistence_config *next;
|
struct persistence_config *next;
|
||||||
}persistence_config;
|
}persistence_config;
|
||||||
|
|
||||||
@@ -1296,7 +1306,7 @@ typedef struct global_var_cfg
|
|||||||
typedef struct ctrl_var_cfg
|
typedef struct ctrl_var_cfg
|
||||||
{
|
{
|
||||||
const char *name;
|
const char *name;
|
||||||
int value;
|
char szval[2];
|
||||||
}ctrl_var_cfg;
|
}ctrl_var_cfg;
|
||||||
|
|
||||||
#define vtoy_check_goto_out(p) if (!p) goto out
|
#define vtoy_check_goto_out(p) if (!p) goto out
|
||||||
@@ -1326,6 +1336,8 @@ int ventoy_ctrl_var_init(void);
|
|||||||
int ventoy_global_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_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);
|
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__ */
|
#endif /* __VENTOY_DEF_H__ */
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -24,6 +24,11 @@
|
|||||||
#include <grub/types.h>
|
#include <grub/types.h>
|
||||||
#include <grub/menu.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;
|
struct grub_env_var;
|
||||||
|
|
||||||
typedef const char *(*grub_env_read_hook_t) (struct grub_env_var *var,
|
typedef const char *(*grub_env_read_hook_t) (struct grub_env_var *var,
|
||||||
|
|||||||
@@ -7,12 +7,12 @@
|
|||||||
* modify it under the terms of the GNU General Public License as
|
* modify it under the terms of the GNU General Public License as
|
||||||
* published by the Free Software Foundation; either version 3 of the
|
* published by the Free Software Foundation; either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful, but
|
* This program is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
@@ -82,7 +82,7 @@ typedef struct ventoy_image_location
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* disk region data (region_count)
|
* disk region data (region_count)
|
||||||
* If the image file has more than one fragments in disk,
|
* If the image file has more than one fragments in disk,
|
||||||
* there will be more than one region data here.
|
* there will be more than one region data here.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -104,7 +104,7 @@ typedef struct ventoy_os_param
|
|||||||
char vtoy_img_path[384]; // It seems to be enough, utf-8 format
|
char vtoy_img_path[384]; // It seems to be enough, utf-8 format
|
||||||
grub_uint64_t vtoy_img_size; // image file size in bytes
|
grub_uint64_t vtoy_img_size; // image file size in bytes
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ventoy will write a copy of ventoy_image_location data into runtime memory
|
* Ventoy will write a copy of ventoy_image_location data into runtime memory
|
||||||
* this is the physically address and length of that memory.
|
* this is the physically address and length of that memory.
|
||||||
* Address 0 means no such data exist.
|
* Address 0 means no such data exist.
|
||||||
@@ -114,7 +114,7 @@ typedef struct ventoy_os_param
|
|||||||
grub_uint64_t vtoy_img_location_addr;
|
grub_uint64_t vtoy_img_location_addr;
|
||||||
grub_uint32_t vtoy_img_location_len;
|
grub_uint32_t vtoy_img_location_len;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* These 32 bytes are reserved by ventoy.
|
* These 32 bytes are reserved by ventoy.
|
||||||
*
|
*
|
||||||
* vtoy_reserved[0]: vtoy_break_level
|
* vtoy_reserved[0]: vtoy_break_level
|
||||||
@@ -125,6 +125,7 @@ typedef struct ventoy_os_param
|
|||||||
* vtoy_reserved[5]: vtoy_linux_remount
|
* vtoy_reserved[5]: vtoy_linux_remount
|
||||||
* vtoy_reserved[6]: vtoy_vlnk
|
* vtoy_reserved[6]: vtoy_vlnk
|
||||||
* vtoy_reserved[7~10]: vtoy_disk_sig[4] used for vlnk
|
* vtoy_reserved[7~10]: vtoy_disk_sig[4] used for vlnk
|
||||||
|
* vtoy_reserved[11]: vtoy_win_uefi_max_res
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
grub_uint8_t vtoy_reserved[32]; // Internal use by ventoy
|
grub_uint8_t vtoy_reserved[32]; // Internal use by ventoy
|
||||||
@@ -155,8 +156,8 @@ typedef struct ventoy_windows_data
|
|||||||
typedef struct ventoy_secure_data
|
typedef struct ventoy_secure_data
|
||||||
{
|
{
|
||||||
grub_uint8_t magic1[16]; /* VENTOY_GUID */
|
grub_uint8_t magic1[16]; /* VENTOY_GUID */
|
||||||
grub_uint8_t diskuuid[16];
|
grub_uint8_t diskuuid[16];
|
||||||
grub_uint8_t Checksum[16];
|
grub_uint8_t Checksum[16];
|
||||||
grub_uint8_t adminSHA256[32];
|
grub_uint8_t adminSHA256[32];
|
||||||
grub_uint8_t reserved[4000];
|
grub_uint8_t reserved[4000];
|
||||||
grub_uint8_t magic2[16]; /* VENTOY_GUID */
|
grub_uint8_t magic2[16]; /* VENTOY_GUID */
|
||||||
@@ -200,7 +201,7 @@ typedef struct ventoy_chain_head
|
|||||||
grub_uint64_t virt_img_size_in_bytes;
|
grub_uint64_t virt_img_size_in_bytes;
|
||||||
grub_uint32_t boot_catalog;
|
grub_uint32_t boot_catalog;
|
||||||
grub_uint8_t boot_catalog_sector[2048];
|
grub_uint8_t boot_catalog_sector[2048];
|
||||||
|
|
||||||
grub_uint32_t img_chunk_offset;
|
grub_uint32_t img_chunk_offset;
|
||||||
grub_uint32_t img_chunk_num;
|
grub_uint32_t img_chunk_num;
|
||||||
|
|
||||||
@@ -319,7 +320,7 @@ grub_uint64_t grub_udf_get_file_offset(grub_file_t file);
|
|||||||
grub_uint64_t grub_udf_get_last_pd_size_offset(void);
|
grub_uint64_t grub_udf_get_last_pd_size_offset(void);
|
||||||
grub_uint64_t grub_udf_get_last_file_attr_offset
|
grub_uint64_t grub_udf_get_last_file_attr_offset
|
||||||
(
|
(
|
||||||
grub_file_t file,
|
grub_file_t file,
|
||||||
grub_uint32_t *startBlock,
|
grub_uint32_t *startBlock,
|
||||||
grub_uint64_t *fe_entry_size_offset
|
grub_uint64_t *fe_entry_size_offset
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -33,11 +33,13 @@ echo "_vtRet1=$_vtRet1 _vtRet2=$_vtRet2 ..." >> $VTLOG
|
|||||||
|
|
||||||
if [ $_vtRet1 -ne 0 -a $_vtRet2 -eq 0 ]; then
|
if [ $_vtRet1 -ne 0 -a $_vtRet2 -eq 0 ]; then
|
||||||
vtFindFlag=0
|
vtFindFlag=0
|
||||||
$GREP '`value from`' /usr/* -r | $AWK -F: '{print $1}' | while read vtline; do
|
$GREP '`value from`' /usr/* -r | $AWK -F: '{print $1}' > $VTOY_PATH/.porteus
|
||||||
|
while read vtline; do
|
||||||
echo "hooking $vtline ..." >> $VTLOG
|
echo "hooking $vtline ..." >> $VTLOG
|
||||||
$SED "s#\`value from\`#$vtPath#g" -i $vtline
|
$SED "s#\`value from\`#$vtPath#g" -i $vtline
|
||||||
vtFindFlag=1
|
vtFindFlag=1
|
||||||
done
|
done < $VTOY_PATH/.porteus
|
||||||
|
rm -f $VTOY_PATH/.porteus
|
||||||
|
|
||||||
if [ $vtFindFlag -eq 0 ]; then
|
if [ $vtFindFlag -eq 0 ]; then
|
||||||
if $GREP -q '`value from`' /linuxrc; then
|
if $GREP -q '`value from`' /linuxrc; then
|
||||||
|
|||||||
@@ -58,6 +58,9 @@ ventoy_get_debian_distro() {
|
|||||||
if $GREP -q 'Tails' /etc/os-release; then
|
if $GREP -q 'Tails' /etc/os-release; then
|
||||||
echo 'tails'; return
|
echo 'tails'; return
|
||||||
fi
|
fi
|
||||||
|
if $GREP -q 'NAME="Kylin"' /etc/os-release; then
|
||||||
|
echo 'kylin'; return
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if $GREP -q 'slax/' /proc/cmdline; then
|
if $GREP -q 'slax/' /proc/cmdline; then
|
||||||
|
|||||||
@@ -72,6 +72,12 @@ ventoy_udev_disk_common_hook $* "noreplace"
|
|||||||
|
|
||||||
$BUSYBOX_PATH/mount $VTOY_DM_PATH /mnt/ventoy
|
$BUSYBOX_PATH/mount $VTOY_DM_PATH /mnt/ventoy
|
||||||
|
|
||||||
|
#fix Oracle Linux 6.9 install issue
|
||||||
|
if $GREP -q -i 'Oracle Linux' /mnt/ventoy/.discinfo; then
|
||||||
|
ln -s /mnt/ventoy /mnt/source
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# We do a trick for rhel6 series here.
|
# We do a trick for rhel6 series here.
|
||||||
# Use /dev/$vtCheatLoop and wapper it as a removable cdrom with bind mount.
|
# Use /dev/$vtCheatLoop and wapper it as a removable cdrom with bind mount.
|
||||||
|
|||||||
@@ -25,7 +25,19 @@ fi
|
|||||||
|
|
||||||
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
VTPATH_OLD=$PATH; PATH=$BUSYBOX_PATH:$VTOY_PATH/tool:$PATH
|
||||||
|
|
||||||
modprobe dm-mod
|
vtlog "Loading dax and dm-mod module ..."
|
||||||
|
$BUSYBOX_PATH/modprobe dax > /dev/null 2>&1
|
||||||
|
$BUSYBOX_PATH/modprobe dm-mod > /dev/null 2>&1
|
||||||
|
|
||||||
|
if $GREP -q 'device-mapper' /proc/devices; then
|
||||||
|
vtlog "dm-mod module check success ..."
|
||||||
|
else
|
||||||
|
vtlog "Need to extract dax and dm-mod module ..."
|
||||||
|
$VTOY_PATH/tool/zstdcat /lib/modules/$(uname -r)/drivers/dax/dax.ko.zst > $VTOY_PATH/extract_dax.ko
|
||||||
|
$BUSYBOX_PATH/insmod $VTOY_PATH/extract_dax.ko
|
||||||
|
$VTOY_PATH/tool/zstdcat /lib/modules/$(uname -r)/drivers/md/dm-mod.ko.zst > $VTOY_PATH/extract_dm_mod.ko
|
||||||
|
$BUSYBOX_PATH/insmod $VTOY_PATH/extract_dm_mod.ko
|
||||||
|
fi
|
||||||
|
|
||||||
wait_for_usb_disk_ready
|
wait_for_usb_disk_ready
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
. $VTOY_PATH/hook/ventoy-os-lib.sh
|
||||||
|
|
||||||
|
$SED "/Searching/i $BUSYBOX_PATH/sh $VTOY_PATH/hook/t2/disk_hook.sh" -i /init
|
||||||
|
$SED "/disktype/i x=/dev/ventoy" -i /init
|
||||||
$SED "/getdevice *devicefile/i $BUSYBOX_PATH/sh $VTOY_PATH/hook/t2/disk_hook.sh" -i /init
|
$SED "/getdevice *devicefile/i $BUSYBOX_PATH/sh $VTOY_PATH/hook/t2/disk_hook.sh" -i /init
|
||||||
$SED "/getdevice *devicefile/a devicefile=/dev/ventoy" -i /init
|
$SED "/getdevice *devicefile/a devicefile=/dev/ventoy" -i /init
|
||||||
|
|
||||||
|
|||||||
@@ -67,8 +67,11 @@ set_ventoy_hook_finish() {
|
|||||||
|
|
||||||
if [ -f /ventoy/ventoy_iso_part_dm_cmd ]; then
|
if [ -f /ventoy/ventoy_iso_part_dm_cmd ]; then
|
||||||
echo "### create iso part raw dm" >> $VTLOG
|
echo "### create iso part raw dm" >> $VTLOG
|
||||||
$BUSYBOX_PATH/sh /ventoy/ventoy_iso_part_dm_cmd >>$VTLOG 2>&1
|
$CAT $VTOY_PATH/ventoy_raw_table >> $VTLOG
|
||||||
$BUSYBOX_PATH/rm -f /ventoy/ventoy_iso_part_dm_cmd
|
echo "### iso part dm cmd" >> $VTLOG
|
||||||
|
$CAT /ventoy/ventoy_iso_part_dm_cmd >> $VTLOG
|
||||||
|
$BUSYBOX_PATH/sh /ventoy/ventoy_iso_part_dm_cmd >>$VTLOG 2>&1
|
||||||
|
#$BUSYBOX_PATH/rm -f /ventoy/ventoy_iso_part_dm_cmd
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -159,17 +162,17 @@ ventoy_get_vblade_bin() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
ventoy_find_bin_path() {
|
ventoy_find_bin_path() {
|
||||||
|
#must use built-in dmsetup, so first try ventoy path. Otherwise ubuntu installer unhappy. #3567
|
||||||
if $BUSYBOX_PATH/which "$1" > /dev/null; then
|
if $BUSYBOX_PATH/which "$1" > /dev/null; then
|
||||||
$BUSYBOX_PATH/which "$1"; return
|
$BUSYBOX_PATH/which "$1"; return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for vt_path in '/bin' '/sbin' '/usr/bin' '/usr/sbin' '/usr/local/bin' '/usr/local/sbin' '/root/bin'; do
|
for vt_path in '/bin' '/sbin' '/usr/bin' '/usr/sbin' '/usr/local/bin' '/usr/local/sbin' '/root/bin'; do
|
||||||
if [ -e "$vt_path/$1" ]; then
|
if [ -e "$vt_path/$1" ]; then
|
||||||
echo "$vt_path/$1"; return
|
echo "$vt_path/$1"; return
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -266,7 +269,9 @@ create_ventoy_device_mapper() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
RAWDISKNAME=$($HEAD -n1 $VTOY_PATH/ventoy_raw_table | $AWK '{print $4}')
|
RAWDISKNAME=$($HEAD -n1 $VTOY_PATH/ventoy_raw_table | $AWK '{print $4}')
|
||||||
echo "$VT_DM_BIN create ${RAWDISKNAME#/dev/} $VTOY_PATH/ventoy_raw_table" > /ventoy/ventoy_iso_part_dm_cmd
|
echo "$VT_DM_BIN create ${RAWDISKNAME#/dev/} $VTOY_PATH/ventoy_raw_table" > /ventoy/ventoy_iso_part_dm_cmd
|
||||||
|
#echo "$VT_DM_BIN mknodes ${RAWDISKNAME#/dev/}" >> /ventoy/ventoy_iso_part_dm_cmd
|
||||||
|
#echo "$VT_DM_BIN ls" >> /ventoy/ventoy_iso_part_dm_cmd
|
||||||
}
|
}
|
||||||
|
|
||||||
create_persistent_device_mapper() {
|
create_persistent_device_mapper() {
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ ventoy_get_os_type() {
|
|||||||
echo 'debian'; return
|
echo 'debian'; return
|
||||||
elif $GREP -q 'Solus' /etc/os-release; then
|
elif $GREP -q 'Solus' /etc/os-release; then
|
||||||
echo 'rhel7'; return
|
echo 'rhel7'; return
|
||||||
elif $GREP -q 'openEuler' /etc/os-release; then
|
elif $GREP -q -i 'openEuler' /etc/os-release; then
|
||||||
echo 'openEuler'; return
|
echo 'openEuler'; return
|
||||||
elif $GREP -q 'fuyu' /etc/os-release; then
|
elif $GREP -q 'fuyu' /etc/os-release; then
|
||||||
echo 'openEuler'; return
|
echo 'openEuler'; return
|
||||||
@@ -179,6 +179,8 @@ ventoy_get_os_type() {
|
|||||||
echo 'deepin'; return
|
echo 'deepin'; return
|
||||||
elif $GREP -qi 'aerynos' /etc/os-release; then
|
elif $GREP -qi 'aerynos' /etc/os-release; then
|
||||||
echo 'rhel7'; return
|
echo 'rhel7'; return
|
||||||
|
elif $GREP -qi 'ID_LIKE=debian' /etc/os-release; then
|
||||||
|
echo 'debian'; return
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -314,8 +316,8 @@ ventoy_get_os_type() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ -e /init ]; then
|
if [ -e /etc/initrd-release ]; then
|
||||||
if $GREP -q -m1 'T2 SDE' /init; then
|
if $GREP -q -m1 't2sde' /etc/initrd-release; then
|
||||||
echo 't2'; return
|
echo 't2'; return
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ ventoy_get_os_type() {
|
|||||||
echo 'debian'; return
|
echo 'debian'; return
|
||||||
elif $GREP -q 'Solus' /etc/os-release; then
|
elif $GREP -q 'Solus' /etc/os-release; then
|
||||||
echo 'rhel7'; return
|
echo 'rhel7'; return
|
||||||
elif $GREP -q 'openEuler' /etc/os-release; then
|
elif $GREP -q -i 'openEuler' /etc/os-release; then
|
||||||
echo 'openEuler'; return
|
echo 'openEuler'; return
|
||||||
elif $GREP -q 'fuyu' /etc/os-release; then
|
elif $GREP -q 'fuyu' /etc/os-release; then
|
||||||
echo 'openEuler'; return
|
echo 'openEuler'; return
|
||||||
@@ -344,8 +344,8 @@ ventoy_get_os_type() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ -e /init ]; then
|
if [ -e /etc/initrd-release ]; then
|
||||||
if $GREP -q -m1 'T2 SDE' /init; then
|
if $GREP -q -m1 't2sde' /etc/initrd-release; then
|
||||||
echo 't2'; return
|
echo 't2'; return
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
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.
@@ -11,7 +11,8 @@ Ventoy2Disk.sh CMD [ OPTION ] /dev/sdX
|
|||||||
|
|
||||||
OPTION: (optional)
|
OPTION: (optional)
|
||||||
-r SIZE_MB preserve some space at the bottom of the disk (only for install)
|
-r SIZE_MB preserve some space at the bottom of the disk (only for install)
|
||||||
-s enable secure boot support (default is disabled)
|
-s enable secure boot support (default is enabled)
|
||||||
|
-S disable secure boot support (default is enabled)
|
||||||
-g use GPT partition style, default is MBR style (only for install)
|
-g use GPT partition style, default is MBR style (only for install)
|
||||||
|
|
||||||
Please refer https://www.ventoy.net/en/doc_start.html for details.
|
Please refer https://www.ventoy.net/en/doc_start.html for details.
|
||||||
|
|||||||
@@ -66,6 +66,16 @@ if [ -f mkexfatfs_static ]; then
|
|||||||
if ldd --version 2>&1 | grep -qi musl; then
|
if ldd --version 2>&1 | grep -qi musl; then
|
||||||
mv mkexfatfs mkexfatfs_shared
|
mv mkexfatfs mkexfatfs_shared
|
||||||
mv mkexfatfs_static mkexfatfs
|
mv mkexfatfs_static mkexfatfs
|
||||||
|
else
|
||||||
|
if ./mkexfatfs -V > /dev/null 2>&1; then
|
||||||
|
echo "mkexfatfs can not run, check static version" >> ./log.txt
|
||||||
|
else
|
||||||
|
if ./mkexfatfs_static -V > /dev/null 2>&1; then
|
||||||
|
echo "Use static version of mkexfatfs" >> ./log.txt
|
||||||
|
mv mkexfatfs mkexfatfs_shared
|
||||||
|
mv mkexfatfs_static mkexfatfs
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#
|
#
|
||||||
submenu "$VTLANG_CTRL_TEMP_SET" --class=debug_temp_set --class=F5tool {
|
submenu "$VTLANG_CTRL_TEMP_SET" --class=debug_temp_set --class=F5tool {
|
||||||
menuentry "[ $VTOY_WIN11_BYPASS_CHECK ] $VTLANG_WIN11_BYPASS_CHECK" --class=debug_temp_win11_bypass --class=debug_temp_set --class=F5tool \
|
menuentry "[ $VTOY_WIN11_BYPASS_CHECK ] $VTLANG_WIN11_BYPASS_CHECK" --class=debug_temp_win11_bypass --class=debug_temp_set --class=F5tool \
|
||||||
VTOY_RUN_SET0 {
|
VTOY_RUN_SET_0_0 {
|
||||||
if [ "$VTOY_WIN11_BYPASS_CHECK" = "0" ]; then
|
if [ "$VTOY_WIN11_BYPASS_CHECK" = "0" ]; then
|
||||||
set VTOY_WIN11_BYPASS_CHECK=1
|
set VTOY_WIN11_BYPASS_CHECK=1
|
||||||
else
|
else
|
||||||
@@ -13,7 +13,7 @@ submenu "$VTLANG_CTRL_TEMP_SET" --class=debug_temp_set --class=F5tool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
menuentry "[ $VTOY_WIN11_BYPASS_NRO ] $VTLANG_WIN11_BYPASS_NRO" --class=debug_temp_win11_nro --class=debug_temp_set --class=F5tool \
|
menuentry "[ $VTOY_WIN11_BYPASS_NRO ] $VTLANG_WIN11_BYPASS_NRO" --class=debug_temp_win11_nro --class=debug_temp_set --class=F5tool \
|
||||||
VTOY_RUN_SET1 {
|
VTOY_RUN_SET_1_0 {
|
||||||
if [ "$VTOY_WIN11_BYPASS_NRO" = "0" ]; then
|
if [ "$VTOY_WIN11_BYPASS_NRO" = "0" ]; then
|
||||||
set VTOY_WIN11_BYPASS_NRO=1
|
set VTOY_WIN11_BYPASS_NRO=1
|
||||||
else
|
else
|
||||||
@@ -22,13 +22,13 @@ submenu "$VTLANG_CTRL_TEMP_SET" --class=debug_temp_set --class=F5tool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
menuentry "[ $VTOY_SECONDARY_BOOT_MENU ] $VTLANG_SECONDARY_BOOT_MENU" --class=debug_temp_second_menu --class=debug_temp_set --class=F5tool \
|
menuentry "[ $VTOY_SECONDARY_BOOT_MENU ] $VTLANG_SECONDARY_BOOT_MENU" --class=debug_temp_second_menu --class=debug_temp_set --class=F5tool \
|
||||||
VTOY_RUN_SET3 {
|
VTOY_RUN_SET_2_0 {
|
||||||
if [ "$VTOY_SECONDARY_BOOT_MENU" = "0" ]; then
|
if [ "$VTOY_SECONDARY_BOOT_MENU" = "0" ]; then
|
||||||
set VTOY_SECONDARY_BOOT_MENU=1
|
set VTOY_SECONDARY_BOOT_MENU=1
|
||||||
else
|
else
|
||||||
set VTOY_SECONDARY_BOOT_MENU=0
|
set VTOY_SECONDARY_BOOT_MENU=0
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
menuentry "$VTLANG_RETURN_PREVIOUS" --class=vtoyret VTOY_RET {
|
menuentry "$VTLANG_RETURN_PREVIOUS" --class=vtoyret VTOY_RET {
|
||||||
echo "Return ..."
|
echo "Return ..."
|
||||||
@@ -36,6 +36,42 @@ submenu "$VTLANG_CTRL_TEMP_SET" --class=debug_temp_set --class=F5tool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if [ "$grub_platform" != "pc" ]; then
|
||||||
|
submenu "$VTLANG_WIN_UEFI_RES_LOCK" --class=debug_uefi_res_lock --class=F5tool {
|
||||||
|
set vtActive0="[ ]"
|
||||||
|
set vtActive1="[ ]"
|
||||||
|
set vtActive2="[ ]"
|
||||||
|
set vtActive3="[ ]"
|
||||||
|
if [ "$VTOY_WIN_UEFI_RES_LOCK" = "0" ]; then
|
||||||
|
set vtActive0="[*]"
|
||||||
|
elif [ "$VTOY_WIN_UEFI_RES_LOCK" = "1" ]; then
|
||||||
|
set vtActive1="[*]"
|
||||||
|
elif [ "$VTOY_WIN_UEFI_RES_LOCK" = "2" ]; then
|
||||||
|
set vtActive2="[*]"
|
||||||
|
elif [ "$VTOY_WIN_UEFI_RES_LOCK" = "3" ]; then
|
||||||
|
set vtActive3="[*]"
|
||||||
|
fi
|
||||||
|
|
||||||
|
menuentry "$vtActive0 $VTLANG_UEFI_RES_LOCK_NONE" --class=debug_uefi_res_lock0 --class=F5tool VTOY_RUN_SET_0_1 {
|
||||||
|
set VTOY_WIN_UEFI_RES_LOCK=0
|
||||||
|
}
|
||||||
|
menuentry "$vtActive1 $VTLANG_UEFI_RES_LOCK_MAX" --class=debug_uefi_res_lock1 --class=F5tool VTOY_RUN_SET_1_1 {
|
||||||
|
set VTOY_WIN_UEFI_RES_LOCK=1
|
||||||
|
}
|
||||||
|
menuentry "$vtActive2 $VTLANG_UEFI_RES_LOCK_1024_768" --class=debug_uefi_res_lock2 --class=F5tool VTOY_RUN_SET_2_1 {
|
||||||
|
set VTOY_WIN_UEFI_RES_LOCK=2
|
||||||
|
}
|
||||||
|
menuentry "$vtActive3 $VTLANG_UEFI_RES_LOCK_BE1024_768" --class=debug_uefi_res_lock3 --class=F5tool VTOY_RUN_SET_3_1 {
|
||||||
|
set VTOY_WIN_UEFI_RES_LOCK=3
|
||||||
|
}
|
||||||
|
|
||||||
|
menuentry "$VTLANG_RETURN_PREVIOUS" --class=vtoyret VTOY_RET {
|
||||||
|
echo "Return ..."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
submenu "$VTLANG_MENU_LANG" --class=debug_menu_lang --class=F5tool {
|
submenu "$VTLANG_MENU_LANG" --class=debug_menu_lang --class=F5tool {
|
||||||
source $prefix/menulang.cfg
|
source $prefix/menulang.cfg
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2449,7 +2449,7 @@ function mimg_common_menuentry {
|
|||||||
#############################################################
|
#############################################################
|
||||||
#############################################################
|
#############################################################
|
||||||
|
|
||||||
set VENTOY_VERSION="1.1.10"
|
set VENTOY_VERSION="1.1.15"
|
||||||
|
|
||||||
#ACPI not compatible with Window7/8, so disable by default
|
#ACPI not compatible with Window7/8, so disable by default
|
||||||
set VTOY_PARAM_NO_ACPI=1
|
set VTOY_PARAM_NO_ACPI=1
|
||||||
@@ -2551,6 +2551,10 @@ else
|
|||||||
vt_check_json_path_case $vtoy_iso_part
|
vt_check_json_path_case $vtoy_iso_part
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#Update Secure Boot Policy
|
||||||
|
vt_update_sb_policy
|
||||||
|
|
||||||
|
|
||||||
if [ -n "$VTOY_MENU_LANGUAGE" ]; then
|
if [ -n "$VTOY_MENU_LANGUAGE" ]; then
|
||||||
vt_init_menu_lang "$VTOY_MENU_LANGUAGE"
|
vt_init_menu_lang "$VTOY_MENU_LANGUAGE"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -88,6 +88,11 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "تجاوز متطلبات الحساب عبر الإنترنت عند تثبيت Windows 11",
|
"VTLANG_WIN11_BYPASS_NRO": "تجاوز متطلبات الحساب عبر الإنترنت عند تثبيت Windows 11",
|
||||||
"VTLANG_LINUX_REMOUNT": "ضم قسم Ventoy بعد إقلاع Linux",
|
"VTLANG_LINUX_REMOUNT": "ضم قسم Ventoy بعد إقلاع Linux",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "اظهر قائمة الإقلاع الثانوية",
|
"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",
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "Windows 11 ইনস্টল করার সময় অনলাইন অ্যাকাউন্টের প্রয়োজন বাইপাস করুন",
|
"VTLANG_WIN11_BYPASS_NRO": "Windows 11 ইনস্টল করার সময় অনলাইন অ্যাকাউন্টের প্রয়োজন বাইপাস করুন",
|
||||||
"VTLANG_LINUX_REMOUNT": "লিনাক্স বুটের পরে ভেন্টয় পার্টিশনটি মাউন্ট করুন",
|
"VTLANG_LINUX_REMOUNT": "লিনাক্স বুটের পরে ভেন্টয় পার্টিশনটি মাউন্ট করুন",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "গৌণ বুট মেনু দেখান",
|
"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",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "Obejít požadování online účtu při instalaci Windows 11",
|
"VTLANG_WIN11_BYPASS_NRO": "Obejít požadování online účtu při instalaci Windows 11",
|
||||||
"VTLANG_LINUX_REMOUNT": "Připojit Ventoy oddíl po spuštění Linuxu",
|
"VTLANG_LINUX_REMOUNT": "Připojit Ventoy oddíl po spuštění Linuxu",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "Zobrazit druhou spouštěcí nabídku",
|
"VTLANG_SECONDARY_BOOT_MENU": "Zobrazit druhou spouštěcí nabídku",
|
||||||
|
"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",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "Umgehen Sie die Online-Kontoanforderung bei der Installation von Windows 11",
|
"VTLANG_WIN11_BYPASS_NRO": "Umgehen Sie die Online-Kontoanforderung bei der Installation von Windows 11",
|
||||||
"VTLANG_LINUX_REMOUNT": "Mounten Sie die Ventoy-Partition nach dem Booten von Linux",
|
"VTLANG_LINUX_REMOUNT": "Mounten Sie die Ventoy-Partition nach dem Booten von Linux",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "Sekundäres Bootmenü anzeigen",
|
"VTLANG_SECONDARY_BOOT_MENU": "Sekundäres Bootmenü anzeigen",
|
||||||
|
"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",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "Παράκαμψη της απαίτησης online λογαριασμού κατά την εγκατάσταση των Windows 11",
|
"VTLANG_WIN11_BYPASS_NRO": "Παράκαμψη της απαίτησης online λογαριασμού κατά την εγκατάσταση των Windows 11",
|
||||||
"VTLANG_LINUX_REMOUNT": "Προσάρτηση διαμερίσματος Ventoy μετά την εκκίνηση του Linux",
|
"VTLANG_LINUX_REMOUNT": "Προσάρτηση διαμερίσματος Ventoy μετά την εκκίνηση του Linux",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "Εμφάνιση δευτερεύοντος μενού εκκίνησης",
|
"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",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
@@ -87,7 +87,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_CHECK": "Bypass CPU/TPM/SecureBoot check when install Windows 11",
|
"VTLANG_WIN11_BYPASS_CHECK": "Bypass CPU/TPM/SecureBoot check when install Windows 11",
|
||||||
"VTLANG_WIN11_BYPASS_NRO": "Bypass online account requirement when install Windows 11",
|
"VTLANG_WIN11_BYPASS_NRO": "Bypass online account requirement when install Windows 11",
|
||||||
"VTLANG_LINUX_REMOUNT": "Mount Ventoy partition after boot Linux",
|
"VTLANG_LINUX_REMOUNT": "Mount Ventoy partition after boot Linux",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "Show secondary boot menu",
|
"VTLANG_SECONDARY_BOOT_MENU": "Show 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",
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "Saltar requerimiento de cuenta en linea al instalar Windows 11",
|
"VTLANG_WIN11_BYPASS_NRO": "Saltar requerimiento de cuenta en linea al instalar Windows 11",
|
||||||
"VTLANG_LINUX_REMOUNT": "Montar partición de Ventoy después de arrancar Linux",
|
"VTLANG_LINUX_REMOUNT": "Montar partición de Ventoy después de arrancar Linux",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "Mostrar menú de arranque secundario",
|
"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",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "دور زدن نیاز به حساب کاربری آنلاین هنگام نصب ویندوز 11",
|
"VTLANG_WIN11_BYPASS_NRO": "دور زدن نیاز به حساب کاربری آنلاین هنگام نصب ویندوز 11",
|
||||||
"VTLANG_LINUX_REMOUNT": "اتصال پارتیشن Ventoy بعد از بوت لینوکس",
|
"VTLANG_LINUX_REMOUNT": "اتصال پارتیشن Ventoy بعد از بوت لینوکس",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "نمایش منوی بوت ثانویه",
|
"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",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "Contourner l'exigence de compte en ligne lors de l'installation de Windows 11",
|
"VTLANG_WIN11_BYPASS_NRO": "Contourner l'exigence de compte en ligne lors de l'installation de Windows 11",
|
||||||
"VTLANG_LINUX_REMOUNT": "Monter la partition Ventoy après le démarrage de Linux",
|
"VTLANG_LINUX_REMOUNT": "Monter la partition Ventoy après le démarrage de Linux",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "Afficher le menu de démarrage secondaire",
|
"VTLANG_SECONDARY_BOOT_MENU": "Afficher le menu de démarrage secondaire",
|
||||||
|
"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",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "विंडोज 11 स्थापित करते समय ऑनलाइन खाते की आवश्यकता बाईपास",
|
"VTLANG_WIN11_BYPASS_NRO": "विंडोज 11 स्थापित करते समय ऑनलाइन खाते की आवश्यकता बाईपास",
|
||||||
"VTLANG_LINUX_REMOUNT": "लिनक्स बूट के बाद वेंटॉय विभाजन को माउंट करें",
|
"VTLANG_LINUX_REMOUNT": "लिनक्स बूट के बाद वेंटॉय विभाजन को माउंट करें",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "द्वितीयक बूट मेनू दिखाएं",
|
"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",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "Bypass online account requirement when install Windows 11",
|
"VTLANG_WIN11_BYPASS_NRO": "Bypass online account requirement when install Windows 11",
|
||||||
"VTLANG_LINUX_REMOUNT": "Mount Ventoy partition after boot Linux",
|
"VTLANG_LINUX_REMOUNT": "Mount Ventoy partition after boot Linux",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "Show secondary boot menu",
|
"VTLANG_SECONDARY_BOOT_MENU": "Show 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",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "Internetes fiók követelményének megkerülése Windows 11 telepítésekor",
|
"VTLANG_WIN11_BYPASS_NRO": "Internetes fiók követelményének megkerülése Windows 11 telepítésekor",
|
||||||
"VTLANG_LINUX_REMOUNT": "Ventoy partíció csatolása a Linux indítása után",
|
"VTLANG_LINUX_REMOUNT": "Ventoy partíció csatolása a Linux indítása után",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "Másodlagos indítási menü megjelenítése",
|
"VTLANG_SECONDARY_BOOT_MENU": "Másodlagos indítási menü megjelenítése",
|
||||||
|
"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",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
@@ -88,6 +88,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "Melewati persyaratan akun online ketika memasang Windows 11",
|
"VTLANG_WIN11_BYPASS_NRO": "Melewati persyaratan akun online ketika memasang Windows 11",
|
||||||
"VTLANG_LINUX_REMOUNT": "Memuat partisi Ventoy setelah boot ke Linux",
|
"VTLANG_LINUX_REMOUNT": "Memuat partisi Ventoy setelah boot ke Linux",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "Tampilkan menu boot sekunder",
|
"VTLANG_SECONDARY_BOOT_MENU": "Tampilkan menu boot sekunder",
|
||||||
|
"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",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "Durante l'installazione di Windows 11 bypassa il requisito di un account online ",
|
"VTLANG_WIN11_BYPASS_NRO": "Durante l'installazione di Windows 11 bypassa il requisito di un account online ",
|
||||||
"VTLANG_LINUX_REMOUNT": "Dopo l'avvio di Linux monta la partizione Ventoy ",
|
"VTLANG_LINUX_REMOUNT": "Dopo l'avvio di Linux monta la partizione Ventoy ",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "Visualizza menu di avvio secondario",
|
"VTLANG_SECONDARY_BOOT_MENU": "Visualizza menu di avvio secondario",
|
||||||
|
"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",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "Bypass online account requirement when install Windows 11",
|
"VTLANG_WIN11_BYPASS_NRO": "Bypass online account requirement when install Windows 11",
|
||||||
"VTLANG_LINUX_REMOUNT": "Mount Ventoy partition after boot Linux",
|
"VTLANG_LINUX_REMOUNT": "Mount Ventoy partition after boot Linux",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "Show secondary boot menu",
|
"VTLANG_SECONDARY_BOOT_MENU": "Show 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",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "Bypass online account requirement when install Windows 11",
|
"VTLANG_WIN11_BYPASS_NRO": "Bypass online account requirement when install Windows 11",
|
||||||
"VTLANG_LINUX_REMOUNT": "Mount Ventoy partition after boot Linux",
|
"VTLANG_LINUX_REMOUNT": "Mount Ventoy partition after boot Linux",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "Show secondary boot menu",
|
"VTLANG_SECONDARY_BOOT_MENU": "Show 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",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "Windows 11 설치 시 온라인 계정 요구 사항 무시",
|
"VTLANG_WIN11_BYPASS_NRO": "Windows 11 설치 시 온라인 계정 요구 사항 무시",
|
||||||
"VTLANG_LINUX_REMOUNT": "Linux 부팅 후 Ventoy 파티션 마운트",
|
"VTLANG_LINUX_REMOUNT": "Linux 부팅 후 Ventoy 파티션 마운트",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "보조 부팅 메뉴 표시",
|
"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",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "Bypass online account requirement when install Windows 11",
|
"VTLANG_WIN11_BYPASS_NRO": "Bypass online account requirement when install Windows 11",
|
||||||
"VTLANG_LINUX_REMOUNT": "Mount Ventoy partition after boot Linux",
|
"VTLANG_LINUX_REMOUNT": "Mount Ventoy partition after boot Linux",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "Show secondary boot menu",
|
"VTLANG_SECONDARY_BOOT_MENU": "Show 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",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"VTLANG_LANGUAGE_NAME": "Polish (Poland)",
|
"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_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_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_PREVIOUS": "Powrót do poprzedniego menu [Esc]",
|
||||||
"VTLANG_RETURN_PRV_NOESC": "Powrót do poprzedniego menu",
|
"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_SHA256_CALC_CHK": "Oblicz i sprawdź sumę sha256",
|
||||||
"VTLANG_CHKSUM_SHA512_CALC_CHK": "Oblicz i sprawdź sumę sha512",
|
"VTLANG_CHKSUM_SHA512_CALC_CHK": "Oblicz i sprawdź sumę sha512",
|
||||||
|
|
||||||
"VTLANG_POWER": "Zasilanie",
|
"VTLANG_POWER": "Opcje zasilania",
|
||||||
"VTLANG_POWER_REBOOT": "Uruchom ponownie",
|
"VTLANG_POWER_REBOOT": "Uruchom ponownie",
|
||||||
"VTLANG_POWER_HALT": "Zakończ",
|
"VTLANG_POWER_HALT": "Zakończ",
|
||||||
"VTLANG_POWER_BOOT_EFIFW": "Uruchom ponownie i przejdź do konfiguracji EFI",
|
"VTLANG_POWER_BOOT_EFIFW": "Uruchom ponownie i przejdź do konfiguracji EFI",
|
||||||
|
|
||||||
"VTLANG_KEYBRD_LAYOUT": "Układy klawiatury",
|
"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_RESOLUTION_CFG": "Konfiguracja rozdzielczości",
|
||||||
"VTLANG_SCREEN_MODE": "Tryb wyświetlania ekranu",
|
"VTLANG_SCREEN_MODE": "Tryb wyświetlania ekranu",
|
||||||
"VTLANG_SCREEN_TEXT_MODE": "Wymuś tryb tekstowy",
|
"VTLANG_SCREEN_TEXT_MODE": "Wymuś tryb tekstowy",
|
||||||
"VTLANG_SCREEN_GUI_MODE": "Wymuś tryb graficzny",
|
"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_SHOW_EFI_DRV": "Pokaż sterowniki EFI",
|
||||||
"VTLANG_UTIL_FIX_BLINIT_FAIL": "Napraw błąd BlinitializeLibrary systemu Windows",
|
"VTLANG_UTIL_FIX_BLINIT_FAIL": "Napraw błąd BlinitializeLibrary systemu Windows",
|
||||||
|
|
||||||
"VTLANG_JSON_CHK_JSON": "Sprawdź konfigurację wtyczki json (ventoy.json)",
|
"VTLANG_JSON_CHK_JSON": "Sprawdź konfigurację pluginu json (ventoy.json)",
|
||||||
"VTLANG_JSON_CHK_CONTROL": "Sprawdź konfigurację wtyczki globalnej kontroli",
|
"VTLANG_JSON_CHK_CONTROL": "Sprawdź konfigurację pluginu Global Control",
|
||||||
"VTLANG_JSON_CHK_THEME": "Sprawdź konfigurację wtyczki motywu",
|
"VTLANG_JSON_CHK_THEME": "Sprawdź konfigurację pluginu Theme",
|
||||||
"VTLANG_JSON_CHK_AUTOINS": "Sprawdź konfigurację wtyczki automatycznej instalacji",
|
"VTLANG_JSON_CHK_AUTOINS": "Sprawdź konfigurację pluginu Auto Installation",
|
||||||
"VTLANG_JSON_CHK_PERSIST": "Sprawdź konfigurację wtyczki trwałości",
|
"VTLANG_JSON_CHK_PERSIST": "Sprawdź konfigurację pluginu Persistence",
|
||||||
"VTLANG_JSON_CHK_MENU_ALIAS": "Sprawdź konfigurację wtyczek aliasów menu",
|
"VTLANG_JSON_CHK_MENU_ALIAS": "Sprawdź konfigurację pluginu Menu Alias",
|
||||||
"VTLANG_JSON_CHK_MENU_TIP": "Sprawdź konfigurację wtyczki podpowiedzi menu",
|
"VTLANG_JSON_CHK_MENU_TIP": "Sprawdź konfigurację pluginu Menu Tip",
|
||||||
"VTLANG_JSON_CHK_MENU_CLASS": "Sprawdź konfigurację wtyczki klasy menu",
|
"VTLANG_JSON_CHK_MENU_CLASS": "Sprawdź konfigurację pluginu Menu Class",
|
||||||
"VTLANG_JSON_CHK_INJECTION": "Sprawdź konfigurację wtyczki wstrzykiwania",
|
"VTLANG_JSON_CHK_INJECTION": "Sprawdź konfigurację pluginu Injection",
|
||||||
"VTLANG_JSON_CHK_AUTO_MEMDISK": "Sprawdź automatyczną konfigurację wtyczki memdisk",
|
"VTLANG_JSON_CHK_AUTO_MEMDISK": "Sprawdź konfigurację pluginu Auto Memdisk",
|
||||||
"VTLANG_JSON_CHK_IMG_LIST": "Sprawdź konfigurację wtyczki listy obrazów",
|
"VTLANG_JSON_CHK_IMG_LIST": "Sprawdź konfigurację pluginu Image List",
|
||||||
"VTLANG_JSON_CHK_IMG_BLIST": "Sprawdź konfigurację wtyczki czarnej listy obrazów",
|
"VTLANG_JSON_CHK_IMG_BLIST": "Sprawdź konfigurację pluginu Blacklist dla obrazów",
|
||||||
"VTLANG_JSON_CHK_CONF_REPLACE": "Sprawdź konfigurację wtyczki zastępującej konfigurację bootowania",
|
"VTLANG_JSON_CHK_CONF_REPLACE": "Sprawdź konfigurację pluginu Boot Conf Replace",
|
||||||
"VTLANG_JSON_CHK_DUD": "Sprawdź konfigurację wtyczki dud",
|
"VTLANG_JSON_CHK_DUD": "Sprawdź konfigurację pluginu DUD (Driver Update Disk)",
|
||||||
"VTLANG_JSON_CHK_PASSWORD": "Sprawdź konfigurację wtyczki hasła",
|
"VTLANG_JSON_CHK_PASSWORD": "Sprawdź konfigurację pluginu Password",
|
||||||
|
|
||||||
"VTLANG_NORMAL_MODE": "Uruchom w trybie normalnym",
|
"VTLANG_NORMAL_MODE": "Uruchom w trybie normalnym",
|
||||||
"VTLANG_WIMBOOT_MODE": "Uruchom w trybie Wimboot",
|
"VTLANG_WIMBOOT_MODE": "Uruchom w trybie Wimboot",
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
"VTLANG_NO_AUTOINS_SCRIPT": "Uruchom bez szablonu automatycznej instalacji",
|
"VTLANG_NO_AUTOINS_SCRIPT": "Uruchom bez szablonu automatycznej instalacji",
|
||||||
"VTLANG_AUTOINS_USE": "Uruchom z",
|
"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_PERSIST_USE": "Uruchom z",
|
||||||
|
|
||||||
"VTLANG_BROWER_RETURN": "Powrót",
|
"VTLANG_BROWER_RETURN": "Powrót",
|
||||||
@@ -84,10 +84,16 @@
|
|||||||
"VTLANG_ENTER_CONTINUE": "naciśnij klawisz Enter, aby kontynuować",
|
"VTLANG_ENTER_CONTINUE": "naciśnij klawisz Enter, aby kontynuować",
|
||||||
|
|
||||||
"VTLANG_CTRL_TEMP_SET": "Tymczasowe ustawienia kontroli",
|
"VTLANG_CTRL_TEMP_SET": "Tymczasowe ustawienia kontroli",
|
||||||
"VTLANG_WIN11_BYPASS_CHECK": "Pominięcie kontroli CPU/TPM/SecureBoot podczas instalacji Windows 11",
|
"VTLANG_WIN11_BYPASS_CHECK": "Pominięcie sprawdzania CPU/TPM/SecureBoot podczas instalacji Windows 11",
|
||||||
"VTLANG_WIN11_BYPASS_NRO": "Pominięcie wymogu posiadania konta online podczas instalacji systemu Windows 11",
|
"VTLANG_WIN11_BYPASS_NRO": "Pominięcie wymogu posiadania konta Microsoft podczas instalacji Windows 11",
|
||||||
"VTLANG_LINUX_REMOUNT": "Zamontuj partycję Ventoy po starcie Linuksa",
|
"VTLANG_LINUX_REMOUNT": "Zamontuj partycję Ventoy po uruchomieniu Linuksa",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "Pokaż dodatkowe menu startowe",
|
"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": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "Ignorar o requerimento de conta online quanto instalar o Windows 11",
|
"VTLANG_WIN11_BYPASS_NRO": "Ignorar o requerimento de conta online quanto instalar o Windows 11",
|
||||||
"VTLANG_LINUX_REMOUNT": "Montar a partição do Ventoy após iniciar o Linux",
|
"VTLANG_LINUX_REMOUNT": "Montar a partição do Ventoy após iniciar o Linux",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "Mostrar o menu secundário da inicialização",
|
"VTLANG_SECONDARY_BOOT_MENU": "Mostrar o menu secundário da inicialização",
|
||||||
|
"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",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "Ignorar requerimento de conta online quanto instalando Windows 11",
|
"VTLANG_WIN11_BYPASS_NRO": "Ignorar requerimento de conta online quanto instalando Windows 11",
|
||||||
"VTLANG_LINUX_REMOUNT": "Montar partição Ventoy após boot do Linux",
|
"VTLANG_LINUX_REMOUNT": "Montar partição Ventoy após boot do Linux",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "Mostar menu seundário de boot",
|
"VTLANG_SECONDARY_BOOT_MENU": "Mostar menu seundário de boot",
|
||||||
|
"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",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "Обойти требование сетевой учётной записи при установке Windows 11",
|
"VTLANG_WIN11_BYPASS_NRO": "Обойти требование сетевой учётной записи при установке Windows 11",
|
||||||
"VTLANG_LINUX_REMOUNT": "Смонтировать раздел Ventoy после загрузки Linux",
|
"VTLANG_LINUX_REMOUNT": "Смонтировать раздел Ventoy после загрузки Linux",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "Показать вторичное загрузочное меню",
|
"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",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "Obid zahteve po spletnem računu pri namestitvi sistema Windows 11",
|
"VTLANG_WIN11_BYPASS_NRO": "Obid zahteve po spletnem računu pri namestitvi sistema Windows 11",
|
||||||
"VTLANG_LINUX_REMOUNT": "Priklopi Ventoy particijo po zagonu Linuxa",
|
"VTLANG_LINUX_REMOUNT": "Priklopi Ventoy particijo po zagonu Linuxa",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "Prikaz sekundarnega zagonskega menija",
|
"VTLANG_SECONDARY_BOOT_MENU": "Prikaz sekundarnega zagonskega menija",
|
||||||
|
"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",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "Bypass online account requirement when install Windows 11",
|
"VTLANG_WIN11_BYPASS_NRO": "Bypass online account requirement when install Windows 11",
|
||||||
"VTLANG_LINUX_REMOUNT": "Mount Ventoy partition after boot Linux",
|
"VTLANG_LINUX_REMOUNT": "Mount Ventoy partition after boot Linux",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "Show secondary boot menu",
|
"VTLANG_SECONDARY_BOOT_MENU": "Show 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",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "விண்டோஸ் 11 ஐ நிறுவும் போது ஆன்லைன் கணக்கின் தேவையை புறக்கணிக்கவும்",
|
"VTLANG_WIN11_BYPASS_NRO": "விண்டோஸ் 11 ஐ நிறுவும் போது ஆன்லைன் கணக்கின் தேவையை புறக்கணிக்கவும்",
|
||||||
"VTLANG_LINUX_REMOUNT": "லினக்ஸை துவக்கிய பிறகு Ventoy பகிர்வை ஏற்றவும்",
|
"VTLANG_LINUX_REMOUNT": "லினக்ஸை துவக்கிய பிறகு Ventoy பகிர்வை ஏற்றவும்",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "இரண்டாம் நிலை துவக்க பட்டியலைக் காட்டு",
|
"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",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "Windows11'i yüklerken, çevrimiçi hesap gereksinimini(OOBE) atla",
|
"VTLANG_WIN11_BYPASS_NRO": "Windows11'i yüklerken, çevrimiçi hesap gereksinimini(OOBE) atla",
|
||||||
"VTLANG_LINUX_REMOUNT": "Linux sistemi önyükledikten sonra, Ventoy bölümünü bağla",
|
"VTLANG_LINUX_REMOUNT": "Linux sistemi önyükledikten sonra, Ventoy bölümünü bağla",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "İkincil önyükleme menüsünü göster",
|
"VTLANG_SECONDARY_BOOT_MENU": "İkincil önyükleme menüsünü göster",
|
||||||
|
"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",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "Обійти вимогу онлайн-аккаунту під час інсталяції Windows 11",
|
"VTLANG_WIN11_BYPASS_NRO": "Обійти вимогу онлайн-аккаунту під час інсталяції Windows 11",
|
||||||
"VTLANG_LINUX_REMOUNT": "Монтувати розділ Ventoy після завантаження Linux",
|
"VTLANG_LINUX_REMOUNT": "Монтувати розділ Ventoy після завантаження Linux",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "Показувати вторинне меню завантаження",
|
"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",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,12 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "Bỏ qua yêu cầu tài khoản trực tuyến khi cài đặt Windows 11",
|
"VTLANG_WIN11_BYPASS_NRO": "Bỏ qua yêu cầu tài khoản trực tuyến khi cài đặt Windows 11",
|
||||||
"VTLANG_LINUX_REMOUNT": "Gắn phân vùng Ventoy sau khi khởi động GNU/Linux",
|
"VTLANG_LINUX_REMOUNT": "Gắn phân vùng Ventoy sau khi khởi động GNU/Linux",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "Hiện menu khởi động thứ cấp`",
|
"VTLANG_SECONDARY_BOOT_MENU": "Hiện menu khởi động thứ cấp`",
|
||||||
|
"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",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,11 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "安装 Windows 11 时绕过在线账户的要求",
|
"VTLANG_WIN11_BYPASS_NRO": "安装 Windows 11 时绕过在线账户的要求",
|
||||||
"VTLANG_LINUX_REMOUNT": "启动 Linux 系统后挂载 Ventoy 分区",
|
"VTLANG_LINUX_REMOUNT": "启动 Linux 系统后挂载 Ventoy 分区",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "显示二级启动菜单",
|
"VTLANG_SECONDARY_BOOT_MENU": "显示二级启动菜单",
|
||||||
|
"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": ""
|
"MENU_STR_XXX": ""
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,11 @@
|
|||||||
"VTLANG_WIN11_BYPASS_NRO": "安裝 Windows 11 時繞過登入帳戶的需求",
|
"VTLANG_WIN11_BYPASS_NRO": "安裝 Windows 11 時繞過登入帳戶的需求",
|
||||||
"VTLANG_LINUX_REMOUNT": "啟動 Linux 系統後掛載 Ventoy 分區",
|
"VTLANG_LINUX_REMOUNT": "啟動 Linux 系統後掛載 Ventoy 分區",
|
||||||
"VTLANG_SECONDARY_BOOT_MENU": "顯示次要啟動選單",
|
"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",
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"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.
38
INSTALL/tool/create_ventoy_iso_part_dm.sh
Normal file
38
INSTALL/tool/create_ventoy_iso_part_dm.sh
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
|
echo "Please run with sudo ..."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
oldpwd=$(pwd)
|
||||||
|
VPART=""
|
||||||
|
|
||||||
|
if dmsetup -h > /dev/null 2>&1; then
|
||||||
|
VPART_MAJOR_MINOR=$(dmsetup table ventoy | head -n 1 | awk '{print $4}')
|
||||||
|
cd /sys/class/block/
|
||||||
|
for t in *; do
|
||||||
|
if grep -q "^${VPART_MAJOR_MINOR}$" $t/dev; then
|
||||||
|
VPART=$t
|
||||||
|
echo 0 $(cat /sys/class/block/$VPART/size) linear /dev/$VPART 0 | dmsetup create $VPART
|
||||||
|
dmsetup mknodes "$VPART" > /dev/null 2>&1
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
cd $oldpwd
|
||||||
|
|
||||||
|
if [ -z "$VPART" ]; then
|
||||||
|
echo "$VPART_MAJOR_MINOR not found"
|
||||||
|
dmsetup ls; dmsetup info ventoy; dmsetup table ventoy
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
if [ ! -b "/dev/mapper/$VPART" ]; then
|
||||||
|
udevadm trigger --type=devices --action=add > /dev/null 2>&1
|
||||||
|
udevadm settle > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
echo "Create /dev/mapper/$VPART success"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "dmsetup program not avaliable"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
@@ -60,7 +60,7 @@ check_tool_work_ok() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if mkexfatfs -V > /dev/null; then
|
if mkexfatfs -V > /dev/null; then
|
||||||
vtdebug "mkexfatfs test ok ..."
|
vtdebug "mkexfatfs test ok ..."
|
||||||
else
|
else
|
||||||
vtdebug "mkexfatfs test fail ..."
|
vtdebug "mkexfatfs test fail ..."
|
||||||
@@ -341,6 +341,7 @@ EOF
|
|||||||
|
|
||||||
udevadm trigger --name-match=$DISK >/dev/null 2>&1
|
udevadm trigger --name-match=$DISK >/dev/null 2>&1
|
||||||
partprobe >/dev/null 2>&1
|
partprobe >/dev/null 2>&1
|
||||||
|
partx -u $DISK >/dev/null 2>&1
|
||||||
sleep 3
|
sleep 3
|
||||||
echo "Done"
|
echo "Done"
|
||||||
|
|
||||||
@@ -458,6 +459,7 @@ format_ventoy_disk_gpt() {
|
|||||||
|
|
||||||
udevadm trigger --name-match=$DISK >/dev/null 2>&1
|
udevadm trigger --name-match=$DISK >/dev/null 2>&1
|
||||||
partprobe >/dev/null 2>&1
|
partprobe >/dev/null 2>&1
|
||||||
|
partx -u $DISK >/dev/null 2>&1
|
||||||
sleep 3
|
sleep 3
|
||||||
echo "Done"
|
echo "Done"
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,64 @@
|
|||||||
#!/bin/sh
|
#!/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
|
if [ "$1" = "CI" ]; then
|
||||||
OPT='-dR'
|
OPT='-dR'
|
||||||
else
|
else
|
||||||
@@ -126,11 +185,33 @@ mkdir -p $tmpmnt/tool
|
|||||||
dd status=none bs=1024 count=16 if=./tool/i386/vtoycli of=$tmpmnt/tool/mount.exfat-fuse_i386
|
dd status=none bs=1024 count=16 if=./tool/i386/vtoycli of=$tmpmnt/tool/mount.exfat-fuse_i386
|
||||||
dd status=none bs=1024 count=16 if=./tool/x86_64/vtoycli of=$tmpmnt/tool/mount.exfat-fuse_x86_64
|
dd status=none bs=1024 count=16 if=./tool/x86_64/vtoycli of=$tmpmnt/tool/mount.exfat-fuse_x86_64
|
||||||
dd status=none bs=1024 count=16 if=./tool/aarch64/vtoycli of=$tmpmnt/tool/mount.exfat-fuse_aarch64
|
dd status=none bs=1024 count=16 if=./tool/aarch64/vtoycli of=$tmpmnt/tool/mount.exfat-fuse_aarch64
|
||||||
|
cp -a ./tool/create_ventoy_iso_part_dm.sh $tmpmnt/tool/
|
||||||
|
|
||||||
|
|
||||||
rm -f $tmpmnt/grub/i386-pc/*.img
|
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
|
umount $tmpmnt && rm -rf $tmpmnt
|
||||||
|
|
||||||
|
|
||||||
@@ -270,6 +351,13 @@ cd $CurDir
|
|||||||
mv ../LiveCDGUI/ventoy*.iso ./
|
mv ../LiveCDGUI/ventoy*.iso ./
|
||||||
|
|
||||||
if [ -e ventoy-${curver}-windows.zip ] && [ -e ventoy-${curver}-linux.tar.gz ]; then
|
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"
|
echo -e "\n ============= SUCCESS =================\n"
|
||||||
else
|
else
|
||||||
echo -e "\n ============= FAILED =================\n"
|
echo -e "\n ============= FAILED =================\n"
|
||||||
|
|||||||
@@ -616,10 +616,10 @@
|
|||||||
"STR_BTN_CANCEL":"Anuluj",
|
"STR_BTN_CANCEL":"Anuluj",
|
||||||
"STR_PRESERVE_SPACE":"Zarezerwuj trochę miejsca na końcu dysku",
|
"STR_PRESERVE_SPACE":"Zarezerwuj trochę miejsca na końcu dysku",
|
||||||
"STR_SPACE_VAL_INVALID":"Nieprawidłowa wartość dla zarezerwowanego miejsca",
|
"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_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_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_DISK_2TB_MBR_ERROR":"Wybierz GPT dla dysku powyżej 2TB",
|
||||||
"STR_SHOW_ALL_DEV":"Pokaż wszystkie urządzenia",
|
"STR_SHOW_ALL_DEV":"Pokaż wszystkie urządzenia",
|
||||||
"STR_PART_ALIGN_4KB":"Wyrównaj partycje do 4KB",
|
"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_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_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_VTSI_CREATE_FAILED":"Wygenerowanie pliku VTSI nie powiodło się.",
|
||||||
"STR_MENU_PART_RESIZE":"Nieniszcząca instalacja",
|
"STR_MENU_PART_RESIZE":"Instalacja bez utraty danych",
|
||||||
"STR_PART_RESIZE_TIP":"Ventoy spróbuje nieniszczącej instalacji jeśli jest możliwa. #@Kontynuować?",
|
"STR_PART_RESIZE_TIP":"Jeśli to możliwe, Ventoy spróbuje przeprowadzić instalację bez utraty danych. #@Kontynuować?",
|
||||||
"STR_PART_RESIZE_SUCCESS":"Gratulacje!#@Nieniszcząca instalacja Ventoy zakończyła się pomyślnie.",
|
"STR_PART_RESIZE_SUCCESS":"Gratulacje! Instalacja bez utraty danych #@Ventoy zakończona pomyślnie.",
|
||||||
"STR_PART_RESIZE_FAILED":"Nieniszcząca instalacja nie powiodła się, sprawdź log.txt po szczegóły.",
|
"STR_PART_RESIZE_FAILED":"Instalacja bez utraty danych zakończyła się niepowodzeniem. Szczegóły znajdziesz w pliku log.txt.",
|
||||||
"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_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_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_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",
|
"STR_PART_VENTOY_FS":"System plików dla partycji Ventoy",
|
||||||
|
|||||||
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
|
* modify it under the terms of the GNU General Public License as
|
||||||
* published by the Free Software Foundation; either version 3 of the
|
* published by the Free Software Foundation; either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful, but
|
* This program is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
@@ -37,7 +37,7 @@ typedef enum bios_mode
|
|||||||
bios_ia32,
|
bios_ia32,
|
||||||
bios_aa64,
|
bios_aa64,
|
||||||
bios_mips,
|
bios_mips,
|
||||||
|
|
||||||
bios_max
|
bios_max
|
||||||
}bios_mode;
|
}bios_mode;
|
||||||
|
|
||||||
@@ -81,6 +81,8 @@ typedef struct data_control
|
|||||||
int linux_remount;
|
int linux_remount;
|
||||||
int secondary_menu;
|
int secondary_menu;
|
||||||
int password_asterisk;
|
int password_asterisk;
|
||||||
|
int uefi_res_lock;
|
||||||
|
int uefi_sb_policy;
|
||||||
char default_search_root[MAX_PATH];
|
char default_search_root[MAX_PATH];
|
||||||
char default_image[MAX_PATH];
|
char default_image[MAX_PATH];
|
||||||
char default_kbd_layout[32];
|
char default_kbd_layout[32];
|
||||||
@@ -110,7 +112,7 @@ typedef struct data_theme
|
|||||||
char ventoy_top[32];
|
char ventoy_top[32];
|
||||||
char ventoy_color[32];
|
char ventoy_color[32];
|
||||||
char serial_param[256];
|
char serial_param[256];
|
||||||
|
|
||||||
path_node *fontslist;
|
path_node *fontslist;
|
||||||
}data_theme;
|
}data_theme;
|
||||||
|
|
||||||
@@ -411,6 +413,9 @@ else\
|
|||||||
#define CONTROL_PARSE_INT_DEF_1(node, val) \
|
#define CONTROL_PARSE_INT_DEF_1(node, val) \
|
||||||
if (node->unData.pcStrVal[0] == '0') val = 0
|
if (node->unData.pcStrVal[0] == '0') val = 0
|
||||||
|
|
||||||
|
#define CONTROL_PARSE_INT_DEF_3(node, val) \
|
||||||
|
if (node->unData.pcStrVal[0] == '3') val = 3
|
||||||
|
|
||||||
#define VTOY_JSON_INT(key, val) vtoy_json_get_int(json, key, &val)
|
#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(key, buf) vtoy_json_get_string(json, key, sizeof(buf), buf)
|
||||||
#define VTOY_JSON_STR_EX(key) vtoy_json_get_string_ex(json, key)
|
#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
|
20260624 16:39:09
|
||||||
@@ -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>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<!-- HTTP 1.1 -->
|
<!-- HTTP 1.1 -->
|
||||||
<meta http-equiv="pragma" content="no-cache">
|
<meta http-equiv="pragma" content="no-cache">
|
||||||
<!-- HTTP 1.0 -->
|
<!-- HTTP 1.0 -->
|
||||||
<meta http-equiv="cache-control" content="no-cache">
|
<meta http-equiv="cache-control" content="no-cache">
|
||||||
<title>Ventoy Plugson</title>
|
<title>Ventoy Plugson</title>
|
||||||
<!-- Tell the browser to be responsive to screen width -->
|
<!-- 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">
|
<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/AdminLTE/css/skins/skin-blue.min.css">
|
||||||
<link rel="stylesheet" href="static/datatables/dataTables.bootstrap.css">
|
<link rel="stylesheet" href="static/datatables/dataTables.bootstrap.css">
|
||||||
<link rel="stylesheet" href="static/css/vtoy.css">
|
<link rel="stylesheet" href="static/css/vtoy.css">
|
||||||
|
|
||||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
<!-- 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:// -->
|
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
@@ -39,6 +39,9 @@
|
|||||||
.treeview-menu a {
|
.treeview-menu a {
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
}
|
}
|
||||||
|
.label-rt {
|
||||||
|
margin-left: 20px !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@@ -48,13 +51,13 @@
|
|||||||
<header class="main-header" style="position: fixed; right: 0; left: 0;">
|
<header class="main-header" style="position: fixed; right: 0; left: 0;">
|
||||||
<!-- Logo -->
|
<!-- Logo -->
|
||||||
<a href="." class="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>
|
<span class="logo-lg" > <img src="/static/img/logo_32.png" > Ventoy Plugson</span>
|
||||||
</a>
|
</a>
|
||||||
<!-- Header Navbar: style can be found in header.less -->
|
<!-- Header Navbar: style can be found in header.less -->
|
||||||
<nav class="navbar navbar-static-top" role="navigation">
|
<nav class="navbar navbar-static-top" role="navigation">
|
||||||
<!-- Navbar Right Menu -->
|
<!-- Navbar Right Menu -->
|
||||||
|
|
||||||
<div class="navbar-custom-menu">
|
<div class="navbar-custom-menu">
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
<li class="dropdown user user-menu">
|
<li class="dropdown user user-menu">
|
||||||
@@ -62,22 +65,22 @@
|
|||||||
<span class="fa fa-file-code-o"></span>
|
<span class="fa fa-file-code-o"></span>
|
||||||
<span id="id_span_preview" class="hidden-xs">Preview</span>
|
<span id="id_span_preview" class="hidden-xs">Preview</span>
|
||||||
<span class="hidden-xs"> </span>
|
<span class="hidden-xs"> </span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="dropdown user user-menu">
|
<li class="dropdown user user-menu">
|
||||||
<a href="javascript:void(0)" id="id_a_language">
|
<a href="javascript:void(0)" id="id_a_language">
|
||||||
<span class="fa fa-language"></span>
|
<span class="fa fa-language"></span>
|
||||||
<span id="id_span_language" class="hidden-xs">English</span>
|
<span id="id_span_language" class="hidden-xs">English</span>
|
||||||
<span class="hidden-xs"> </span>
|
<span class="hidden-xs"> </span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="dropdown user user-menu">
|
<li class="dropdown user user-menu">
|
||||||
<a id="id_top_donation" href="#plugson_donation" data-href="#plugson_donation">
|
<a id="id_top_donation" href="#plugson_donation" data-href="#plugson_donation">
|
||||||
<span class="fa fa-paypal"></span>
|
<span class="fa fa-paypal"></span>
|
||||||
<span id="id_span_donation" class="hidden-xs">捐助</span>
|
<span id="id_span_donation" class="hidden-xs">捐助</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<!-- User Account: style can be found in dropdown.less -->
|
<!-- User Account: style can be found in dropdown.less -->
|
||||||
@@ -85,12 +88,12 @@
|
|||||||
<a href="https://www.ventoy.net" target="_blank" >
|
<a href="https://www.ventoy.net" target="_blank" >
|
||||||
<span class="fa fa-link"></span>
|
<span class="fa fa-link"></span>
|
||||||
<span class="hidden-xs">Ventoy</span>
|
<span class="hidden-xs">Ventoy</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<!-- Left side column. contains the logo and sidebar -->
|
<!-- Left side column. contains the logo and sidebar -->
|
||||||
@@ -108,7 +111,7 @@
|
|||||||
<a href="#plugson_control" data-href="#plugson_control">
|
<a href="#plugson_control" data-href="#plugson_control">
|
||||||
<i class="fa fa-wrench"></i> <span id="id_span_menu_control">全局控制插件</span>
|
<i class="fa fa-wrench"></i> <span id="id_span_menu_control">全局控制插件</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#plugson_theme" data-href="#plugson_theme">
|
<a href="#plugson_theme" data-href="#plugson_theme">
|
||||||
<i class="fa fa-file-image-o"></i> <span id="id_span_menu_theme">主题插件</span>
|
<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>
|
<i class="glyphicon glyphicon-lock"></i> <span id="id_span_menu_password">密码插件</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href="#plugson_image_list" data-href="#plugson_image_list">
|
<a href="#plugson_image_list" data-href="#plugson_image_list">
|
||||||
<i class="fa fa-list-alt"></i> <span id="id_span_menu_imagelist">文件列表插件</span>
|
<i class="fa fa-list-alt"></i> <span id="id_span_menu_imagelist">文件列表插件</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href="#plugson_auto_memdisk" data-href="#plugson_auto_memdisk">
|
<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>
|
<i class="fa fa-floppy-o"></i> <span id="id_span_menu_auto_memdisk">自动 Memdisk 插件</span>
|
||||||
@@ -196,13 +199,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" class="form-control" id="PwdPath" name="PwdPath" />
|
<input type="text" class="form-control" id="PwdPath" name="PwdPath" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" id="id_note_pwdfile_cn">
|
<div class="form-group" id="id_note_pwdfile_cn">
|
||||||
<div class="col-sm-3"></div>
|
<div class="col-sm-3"></div>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
请输入文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
请输入文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||||
<span id="id_span_pwdfile_tip1" style="color:red;"></span><br/>
|
<span id="id_span_pwdfile_tip1" style="color:red;"></span><br/>
|
||||||
<span id="id_span_pwdfile_tip2" style="color:red;"></span>
|
<span id="id_span_pwdfile_tip2" style="color:red;"></span>
|
||||||
</div>
|
</div>
|
||||||
@@ -210,7 +213,7 @@
|
|||||||
<div class="form-group" id="id_note_pwdfile_en">
|
<div class="form-group" id="id_note_pwdfile_en">
|
||||||
<div class="col-sm-3"></div>
|
<div class="col-sm-3"></div>
|
||||||
<div class="col-sm-9">
|
<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_tip1" style="color:red;"></span><br/>
|
||||||
<span id="id_span_pwdfile_tip2" style="color:red;"></span><br/>
|
<span id="id_span_pwdfile_tip2" style="color:red;"></span><br/>
|
||||||
</div>
|
</div>
|
||||||
@@ -284,22 +287,22 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" class="form-control" id="FilePath" name="FilePath" />
|
<input type="text" class="form-control" id="FilePath" name="FilePath" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" id="id_note_setfile_cn">
|
<div class="form-group" id="id_note_setfile_cn">
|
||||||
<div class="col-sm-2"></div>
|
<div class="col-sm-2"></div>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
请输入文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
请输入文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||||
<span id="id_span_filepath_tip1" style="color:red;"></span><br/>
|
<span id="id_span_filepath_tip1" style="color:red;"></span><br/>
|
||||||
<span id="id_span_filepath_tip2" style="color:red;"></span>
|
<span id="id_span_filepath_tip2" style="color:red;"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" id="id_note_setfile_en">
|
<div class="form-group" id="id_note_setfile_en">
|
||||||
<div class="col-sm-2"></div>
|
<div class="col-sm-2"></div>
|
||||||
<div class="col-sm-9">
|
<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_tip1" style="color:red;"></span><br/>
|
||||||
<span id="id_span_filepath_tip2" style="color:red;"></span><br/>
|
<span id="id_span_filepath_tip2" style="color:red;"></span><br/>
|
||||||
</div>
|
</div>
|
||||||
@@ -317,18 +320,18 @@
|
|||||||
<div class="form-group" id="id_note_tip3_cn">
|
<div class="form-group" id="id_note_tip3_cn">
|
||||||
<div class="col-sm-2"></div>
|
<div class="col-sm-2"></div>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
请输入对应文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
请输入对应文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||||
<span id="id_span_filepath_tip3" style="color:red;"></span><br/>
|
<span id="id_span_filepath_tip3" style="color:red;"></span><br/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group" id="id_note_tip3_en">
|
<div class="form-group" id="id_note_tip3_en">
|
||||||
<div class="col-sm-2"></div>
|
<div class="col-sm-2"></div>
|
||||||
<div class="col-sm-9">
|
<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/>
|
<span id="id_span_filepath_tip3" style="color:red;"></span><br/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button id="SetFileForm_lang_3" type="submit" class="btn btn-primary btn-flat">确定</button>
|
<button id="SetFileForm_lang_3" type="submit" class="btn btn-primary btn-flat">确定</button>
|
||||||
@@ -357,22 +360,22 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" class="form-control" id="FileFilePath1" name="FileFilePath1" />
|
<input type="text" class="form-control" id="FileFilePath1" name="FileFilePath1" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" id="id_note_filefile_cn">
|
<div class="form-group" id="id_note_filefile_cn">
|
||||||
<div class="col-sm-2"></div>
|
<div class="col-sm-2"></div>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
请输入文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
请输入文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||||
<span id="id_span_filefile_tip1" style="color:red;"></span><br/>
|
<span id="id_span_filefile_tip1" style="color:red;"></span><br/>
|
||||||
<span id="id_span_filefile_tip2" style="color:red;"></span>
|
<span id="id_span_filefile_tip2" style="color:red;"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" id="id_note_filefile_en">
|
<div class="form-group" id="id_note_filefile_en">
|
||||||
<div class="col-sm-2"></div>
|
<div class="col-sm-2"></div>
|
||||||
<div class="col-sm-9">
|
<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_tip1" style="color:red;"></span><br/>
|
||||||
<span id="id_span_filefile_tip2" style="color:red;"></span><br/>
|
<span id="id_span_filefile_tip2" style="color:red;"></span><br/>
|
||||||
</div>
|
</div>
|
||||||
@@ -390,18 +393,18 @@
|
|||||||
<div class="form-group" id="id_note_filefile_cn">
|
<div class="form-group" id="id_note_filefile_cn">
|
||||||
<div class="col-sm-2"></div>
|
<div class="col-sm-2"></div>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
请输入对应文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
请输入对应文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||||
<span id="id_span_filefile_tip3" style="color:red;"></span><br/>
|
<span id="id_span_filefile_tip3" style="color:red;"></span><br/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group" id="id_note_filefile_en">
|
<div class="form-group" id="id_note_filefile_en">
|
||||||
<div class="col-sm-2"></div>
|
<div class="col-sm-2"></div>
|
||||||
<div class="col-sm-9">
|
<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/>
|
<span id="id_span_filefile_tip3" style="color:red;"></span><br/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button id="SetFileFileForm_ok" type="submit" class="btn btn-primary btn-flat">确定</button>
|
<button id="SetFileFileForm_ok" type="submit" class="btn btn-primary btn-flat">确定</button>
|
||||||
@@ -430,21 +433,21 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" class="form-control" id="DirFilePath1" name="DirFilePath1" />
|
<input type="text" class="form-control" id="DirFilePath1" name="DirFilePath1" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" id="id_note_dirfile_cn">
|
<div class="form-group" id="id_note_dirfile_cn">
|
||||||
<div class="col-sm-2"></div>
|
<div class="col-sm-2"></div>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
请输入对应目录在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
请输入对应目录在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||||
<span id="id_span_dirfile_tip1" style="color:red;"></span><br/>
|
<span id="id_span_dirfile_tip1" style="color:red;"></span><br/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" id="id_note_dirfile_en">
|
<div class="form-group" id="id_note_dirfile_en">
|
||||||
<div class="col-sm-2"></div>
|
<div class="col-sm-2"></div>
|
||||||
<div class="col-sm-9">
|
<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/>
|
<span id="id_span_dirfile_tip1" style="color:red;"></span><br/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -461,18 +464,18 @@
|
|||||||
<div class="form-group" id="id_note_dirfile_cn">
|
<div class="form-group" id="id_note_dirfile_cn">
|
||||||
<div class="col-sm-2"></div>
|
<div class="col-sm-2"></div>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
请输入对应文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
请输入对应文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||||
<span id="id_span_dirfile_tip2" style="color:red;"></span><br/>
|
<span id="id_span_dirfile_tip2" style="color:red;"></span><br/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group" id="id_note_dirfile_en">
|
<div class="form-group" id="id_note_dirfile_en">
|
||||||
<div class="col-sm-2"></div>
|
<div class="col-sm-2"></div>
|
||||||
<div class="col-sm-9">
|
<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/>
|
<span id="id_span_dirfile_tip2" style="color:red;"></span><br/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button id="SetDirFileForm_ok" type="submit" class="btn btn-primary btn-flat">确定</button>
|
<button id="SetDirFileForm_ok" type="submit" class="btn btn-primary btn-flat">确定</button>
|
||||||
@@ -502,22 +505,22 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" class="form-control" id="IsoPath" name="IsoPath" />
|
<input type="text" class="form-control" id="IsoPath" name="IsoPath" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" id="id_note_conf_cn">
|
<div class="form-group" id="id_note_conf_cn">
|
||||||
<div class="col-sm-2"></div>
|
<div class="col-sm-2"></div>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
请输入文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
请输入文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||||
<span id="id_span_conf_tip1" style="color:red;"></span><br/>
|
<span id="id_span_conf_tip1" style="color:red;"></span><br/>
|
||||||
<span id="id_span_conf_tip2" style="color:red;"></span>
|
<span id="id_span_conf_tip2" style="color:red;"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" id="id_note_conf_en">
|
<div class="form-group" id="id_note_conf_en">
|
||||||
<div class="col-sm-2"></div>
|
<div class="col-sm-2"></div>
|
||||||
<div class="col-sm-9">
|
<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_tip1" style="color:red;"></span><br/>
|
||||||
<span id="id_span_conf_tip2" style="color:red;"></span>
|
<span id="id_span_conf_tip2" style="color:red;"></span>
|
||||||
</div>
|
</div>
|
||||||
@@ -529,7 +532,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" class="form-control" id="OrgPath" name="OrgPath" />
|
<input type="text" class="form-control" id="OrgPath" name="OrgPath" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group" id="id_note_conf_cn">
|
<div class="form-group" id="id_note_conf_cn">
|
||||||
<div class="col-sm-2"></div>
|
<div class="col-sm-2"></div>
|
||||||
@@ -552,19 +555,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" class="form-control" id="NewPath" name="NewPath" />
|
<input type="text" class="form-control" id="NewPath" name="NewPath" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group" id="id_note_conf_cn">
|
<div class="form-group" id="id_note_conf_cn">
|
||||||
<div class="col-sm-2"></div>
|
<div class="col-sm-2"></div>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
新文件在当前系统中的全路径(注意是完整的绝对路径)例如:<br/>
|
新文件在当前系统中的全路径(注意是完整的绝对路径)例如:<br/>
|
||||||
<span id="id_span_conf_tip3" style="color:red;"></span>
|
<span id="id_span_conf_tip3" style="color:red;"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group" id="id_note_conf_en">
|
<div class="form-group" id="id_note_conf_en">
|
||||||
<div class="col-sm-2"></div>
|
<div class="col-sm-2"></div>
|
||||||
<div class="col-sm-9">
|
<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>
|
<span id="id_span_conf_tip3" style="color:red;"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -579,7 +582,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="modal" id="SetDirModal">
|
<div class="modal" id="SetDirModal">
|
||||||
<div class="modal-dialog" style="width: 800px;">
|
<div class="modal-dialog" style="width: 800px;">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
@@ -597,9 +600,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" class="form-control" id="DirPath" name="DirPath" />
|
<input type="text" class="form-control" id="DirPath" name="DirPath" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" id="id_note_setfile_cn">
|
<div class="form-group" id="id_note_setfile_cn">
|
||||||
<div class="col-sm-2"></div>
|
<div class="col-sm-2"></div>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
@@ -607,7 +610,7 @@
|
|||||||
<span id="id_span_dirpath_tip" style="color:red;"></span>
|
<span id="id_span_dirpath_tip" style="color:red;"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" id="id_note_setfile_en">
|
<div class="form-group" id="id_note_setfile_en">
|
||||||
<div class="col-sm-2"></div>
|
<div class="col-sm-2"></div>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
@@ -615,27 +618,27 @@
|
|||||||
<span id="id_span_dirpath_tip" style="color:red;"></span>
|
<span id="id_span_dirpath_tip" style="color:red;"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" id="id_div_dir_extra">
|
<div class="form-group" id="id_div_dir_extra">
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-2">
|
||||||
<label id="SetDirForm_extra" class="control-label">xx</label>
|
<label id="SetDirForm_extra" class="control-label">xx</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" class="form-control" id="DirExtra" name="DirExtra" />
|
<input type="text" class="form-control" id="DirExtra" name="DirExtra" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" id="id_note_tip3_cn">
|
<div class="form-group" id="id_note_tip3_cn">
|
||||||
<div class="col-sm-2"></div>
|
<div class="col-sm-2"></div>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
请输入对应文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
请输入对应文件在当前系统中的全路径(注意是完整的绝对路径),例如:<br/>
|
||||||
<span id="id_span_dirpath_tip3" style="color:red;"></span><br/>
|
<span id="id_span_dirpath_tip3" style="color:red;"></span><br/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group" id="id_note_tip3_en">
|
<div class="form-group" id="id_note_tip3_en">
|
||||||
<div class="col-sm-2"></div>
|
<div class="col-sm-2"></div>
|
||||||
<div class="col-sm-9">
|
<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/>
|
<span id="id_span_dirpath_tip3" style="color:red;"></span><br/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -676,7 +679,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-sm-9">
|
<div class="col-sm-9">
|
||||||
<input type="text" class="form-control" id="SetKeyValue" name="SetKeyValue" />
|
<input type="text" class="form-control" id="SetKeyValue" name="SetKeyValue" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
@@ -718,12 +721,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="modal" id="JsonPreviewModal">
|
<div class="modal" id="JsonPreviewModal">
|
||||||
<div class="modal-dialog" style="width: 80%;">
|
<div class="modal-dialog" style="width: 80%;">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<form id="JsonPeviewForm" class="form-horizontal">
|
<form id="JsonPeviewForm" class="form-horizontal">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
@@ -732,7 +735,7 @@
|
|||||||
<b id="JsonPreviewForm_lang_1">JSON</b>
|
<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>
|
<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>
|
</h4>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<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>
|
<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>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@@ -757,7 +760,7 @@
|
|||||||
|
|
||||||
<footer class="main-footer">
|
<footer class="main-footer">
|
||||||
<div class="pull-right hidden-xs">
|
<div class="pull-right hidden-xs">
|
||||||
<b id="plugson_build_date">20231014 18:52:12</b>
|
<b id="plugson_build_date">20260624 16:39:09</b>
|
||||||
</div>
|
</div>
|
||||||
<strong><a href="https://www.ventoy.net" target="_blank">https://www.ventoy.net</a></strong>
|
<strong><a href="https://www.ventoy.net" target="_blank">https://www.ventoy.net</a></strong>
|
||||||
</footer>
|
</footer>
|
||||||
@@ -771,16 +774,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- ./wrapper -->
|
<!-- ./wrapper -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- jQuery 2.1.4 -->
|
<!-- jQuery 2.1.4 -->
|
||||||
<script src="/static/js/jQuery-2.1.4.min.js"></script>
|
<script src="/static/js/jQuery-2.1.4.min.js"></script>
|
||||||
<!-- jquery validate -->
|
<!-- jquery validate -->
|
||||||
<script src="/static/js/jquery.validate.min.js"></script>
|
<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.vtoymethods.js?v=317"></script>
|
||||||
|
|
||||||
<script src="/static/js/jquery.vtoy.alert.js?v=253"></script>
|
<script src="/static/js/jquery.vtoy.alert.js?v=317"></script>
|
||||||
<script src="/static/js/vtoy.js?v=253"></script>
|
<script src="/static/js/vtoy.js?v=317"></script>
|
||||||
<script src="/static/js/md5.min.js"></script>
|
<script src="/static/js/md5.min.js"></script>
|
||||||
|
|
||||||
<!-- Bootstrap 3.3.5 -->
|
<!-- Bootstrap 3.3.5 -->
|
||||||
@@ -788,10 +791,10 @@
|
|||||||
<!-- AdminLTE App -->
|
<!-- AdminLTE App -->
|
||||||
<script src="/static/AdminLTE/js/app.min.js"></script>
|
<script src="/static/AdminLTE/js/app.min.js"></script>
|
||||||
<script src="/static/AdminLTE/plugins/chartjs/Chart.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/jquery.dataTables.min.js"></script>
|
||||||
<script src="/static/datatables/dataTables.bootstrap.min.js"></script>
|
<script src="/static/datatables/dataTables.bootstrap.min.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
function VtoyJsonCopyClick() {
|
function VtoyJsonCopyClick() {
|
||||||
@@ -818,15 +821,15 @@
|
|||||||
}, function(data) {
|
}, function(data) {
|
||||||
$('#JsonPeviewForm #JsonPreviewForm_lang_1').text(g_vtoy_cur_language.STR_JSON_PREVIEW);
|
$('#JsonPeviewForm #JsonPreviewForm_lang_1').text(g_vtoy_cur_language.STR_JSON_PREVIEW);
|
||||||
$('#JsonPeviewForm #PrewForm_lang_2').text(g_vtoy_cur_language.STR_BTN_OK);
|
$('#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();
|
$("#JsonPreviewModal").modal();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function VtoyLanguageClick() {
|
function VtoyLanguageClick() {
|
||||||
var defaultPage = window.location.hash;
|
var defaultPage = window.location.hash;
|
||||||
|
|
||||||
if (g_current_language === 'cn') {
|
if (g_current_language === 'cn') {
|
||||||
g_current_language = 'en';
|
g_current_language = 'en';
|
||||||
} else {
|
} else {
|
||||||
@@ -851,14 +854,14 @@
|
|||||||
m_syntax_error = data.syntax_error;
|
m_syntax_error = data.syntax_error;
|
||||||
m_invalid_config = data.invalid_config;
|
m_invalid_config = data.invalid_config;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#id_btn_json_copy').click(VtoyJsonCopyClick);
|
$('#id_btn_json_copy').click(VtoyJsonCopyClick);
|
||||||
$('#id_a_preview').click(VtoyPreviewClick);
|
$('#id_a_preview').click(VtoyPreviewClick);
|
||||||
$('#id_a_language').click(VtoyLanguageClick);
|
$('#id_a_language').click(VtoyLanguageClick);
|
||||||
|
|
||||||
$("#plugson-menu a").click(function() {
|
$("#plugson-menu a").click(function() {
|
||||||
var href = $(this).data("href");
|
var href = $(this).data("href");
|
||||||
if (href && href !== '#') {
|
if (href && href !== '#') {
|
||||||
@@ -872,7 +875,7 @@
|
|||||||
loadContent(href.substring(1));
|
loadContent(href.substring(1));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
(function openDefaultPage() {
|
(function openDefaultPage() {
|
||||||
var defaultPage = window.location.hash;
|
var defaultPage = window.location.hash;
|
||||||
if (defaultPage) {
|
if (defaultPage) {
|
||||||
@@ -881,14 +884,14 @@
|
|||||||
defaultPage = defaultPage || 'plugson_main';
|
defaultPage = defaultPage || 'plugson_main';
|
||||||
loadContent(defaultPage);
|
loadContent(defaultPage);
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
||||||
(function ventoy_handshake() {
|
(function ventoy_handshake() {
|
||||||
callVtoyCatchErr({
|
callVtoyCatchErr({
|
||||||
method : 'handshake'
|
method : 'handshake'
|
||||||
},
|
},
|
||||||
function(data) {
|
function(data) {
|
||||||
|
|
||||||
if (m_syntax_error === 1 && typeof(Modal) === 'object') {
|
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 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;
|
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;
|
m_syntax_error = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_invalid_config === 1 && typeof(Modal) === 'object') {
|
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 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;
|
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(undefined === errorThrown.length)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
else if('' == errorThrown.trim())
|
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>
|
<i class="fa fa-wrench"> </i>
|
||||||
<h1 class="box-title" style="font-weight:bold;" id="id_h1_page_title">全局控制插件</h1>
|
<h1 class="box-title" style="font-weight:bold;" id="id_h1_page_title">全局控制插件</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-sm-2" style="padding-top:2px;">
|
<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_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>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
<legend></legend>
|
<legend></legend>
|
||||||
|
|
||||||
<div class="box-body">
|
<div class="box-body">
|
||||||
<div class="nav-tabs-custom">
|
<div class="nav-tabs-custom">
|
||||||
<ul class="nav nav-tabs" id="id_tab_control">
|
<ul class="nav nav-tabs" id="id_tab_control">
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||||
<td>
|
<td>
|
||||||
<select id="id_ctrl_sel_menu_lang" name="name_ctrl_sel_menu_lang" class="form-control">
|
<select id="id_ctrl_sel_menu_lang" name="name_ctrl_sel_menu_lang" class="form-control">
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
<tr id="tr_title_desc_en">
|
<tr id="tr_title_desc_en">
|
||||||
<td class="td_ctrl_col">Option Description</td>
|
<td class="td_ctrl_col">Option Description</td>
|
||||||
<td>
|
<td>
|
||||||
Ventoy menu language. Default is "en_US",
|
Ventoy menu language. Default is "en_US",
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
</div><!-- /.box -->
|
</div><!-- /.box -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="box box-primary box-solid">
|
<div class="box box-primary box-solid">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_DEFAULT_SEARCH_ROOT
|
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_DEFAULT_SEARCH_ROOT
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
</div><!-- /.box-tools -->
|
</div><!-- /.box-tools -->
|
||||||
</div><!-- /.box-header -->
|
</div><!-- /.box-header -->
|
||||||
<div class="box-body no-padding">
|
<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;">
|
<tr style="font-weight:bold;">
|
||||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -108,8 +108,8 @@
|
|||||||
<tr id="tr_title_desc_en">
|
<tr id="tr_title_desc_en">
|
||||||
<td class="td_ctrl_col">Option Description</td>
|
<td class="td_ctrl_col">Option Description</td>
|
||||||
<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.
|
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.
|
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/>
|
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.
|
Note: the path must not be the mountpoint of the first partition, but a subdirectory.
|
||||||
</td>
|
</td>
|
||||||
@@ -117,7 +117,80 @@
|
|||||||
</table>
|
</table>
|
||||||
</div><!-- /.box-body -->
|
</div><!-- /.box-body -->
|
||||||
</div><!-- /.box -->
|
</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 box-primary box-solid">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
@@ -133,18 +206,20 @@
|
|||||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||||
<td>
|
<td>
|
||||||
<label class="radio-inline">
|
<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>
|
<input type="radio" id="id_ctrl_bypass_win11_radio0" name="id_ctrl_bypass_win11_radio" data-type="0" value="0"/>
|
||||||
</label>
|
<span id="id_span_desc_cn">不绕过Windows 11安装时的硬件检查</span>
|
||||||
<label class="radio-inline">
|
<span id="id_span_desc_en">Do not bypass Windows 11 hardware check</span>
|
||||||
<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>
|
</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>
|
</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="tr_title_desc_cn">
|
<tr id="tr_title_desc_cn">
|
||||||
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
||||||
<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文件有效,对于其他镜像文件无效。
|
该选项只对标准Windows 11 ISO文件有效,对于其他镜像文件无效。
|
||||||
当设置为1时,Ventoy 会在安装时创建以下几个注册表项用来绕过 Windows 11 安装程序的硬件检查。<br/>
|
当设置为1时,Ventoy 会在安装时创建以下几个注册表项用来绕过 Windows 11 安装程序的硬件检查。<br/>
|
||||||
<code>HKEY_LOCAL_MACHINE\SYSTEM\Setup\LabConfig\BypassRAMCheck</code><br/>
|
<code>HKEY_LOCAL_MACHINE\SYSTEM\Setup\LabConfig\BypassRAMCheck</code><br/>
|
||||||
@@ -156,8 +231,6 @@
|
|||||||
<tr id="tr_title_desc_en">
|
<tr id="tr_title_desc_en">
|
||||||
<td class="td_ctrl_col" id="td_title_desc">Option Description</td>
|
<td class="td_ctrl_col" id="td_title_desc">Option Description</td>
|
||||||
<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.
|
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/>
|
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/>
|
<code>HKEY_LOCAL_MACHINE\SYSTEM\Setup\LabConfig\BypassRAMCheck</code><br/>
|
||||||
@@ -170,9 +243,9 @@
|
|||||||
</table>
|
</table>
|
||||||
</div><!-- /.box-body -->
|
</div><!-- /.box-body -->
|
||||||
</div><!-- /.box -->
|
</div><!-- /.box -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="box box-primary box-solid">
|
<div class="box box-primary box-solid">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_WIN11_BYPASS_NRO
|
<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 class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||||
<td>
|
<td>
|
||||||
<label class="radio-inline">
|
<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>
|
<input type="radio" id="id_ctrl_bypass_nro_radio0" name="id_ctrl_bypass_nro_radio" data-type="0" value="0"/>
|
||||||
</label>
|
<span id="id_span_desc_cn">不绕过Windows 11安装时的在线账户需求</span>
|
||||||
<label class="radio-inline">
|
<span id="id_span_desc_en">Do not bypass Windows 11 online account requirement</span>
|
||||||
<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>
|
</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>
|
</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="tr_title_desc_cn">
|
<tr id="tr_title_desc_cn">
|
||||||
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
||||||
<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文件有效,对于其他镜像文件无效。
|
该选项只对标准Windows 11 ISO文件有效,对于其他镜像文件无效。
|
||||||
当设置为1时,Ventoy 会在安装时创建以下注册表项用来绕过 Windows 11 安装时对在线账户的需求。<br/>
|
当设置为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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="tr_title_desc_en">
|
<tr id="tr_title_desc_en">
|
||||||
<td class="td_ctrl_col" id="td_title_desc">Option Description</td>
|
<td class="td_ctrl_col" id="td_title_desc">Option Description</td>
|
||||||
<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.
|
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/>
|
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>
|
<code>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE\BypassNRO</code>
|
||||||
@@ -217,9 +290,9 @@
|
|||||||
</table>
|
</table>
|
||||||
</div><!-- /.box-body -->
|
</div><!-- /.box-body -->
|
||||||
</div><!-- /.box -->
|
</div><!-- /.box -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -237,25 +310,15 @@
|
|||||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||||
<td>
|
<td>
|
||||||
<label class="radio-inline">
|
<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>
|
<input type="radio" id="id_ctrl_radio_menu_mode0" name="id_ctrl_radio_menu_mode" data-type="0" value="0">
|
||||||
</label>
|
<span id="id_span_desc_cn">文件列表模式</span>
|
||||||
<label class="radio-inline">
|
<span id="id_span_desc_en">ListView Mode</span>
|
||||||
<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>
|
</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>
|
</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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -267,7 +330,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="box box-primary box-solid">
|
<div class="box box-primary box-solid">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_MENU_TIMEOUT
|
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_MENU_TIMEOUT
|
||||||
@@ -283,7 +346,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<div class="col-sm-9" style="padding-left:0px;">
|
<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"/>
|
<input type="text" class="form-control" id="id_ctrl_text_timeout" name="name_ctrl_text_timeout"/>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="tr_title_desc_cn">
|
<tr id="tr_title_desc_cn">
|
||||||
@@ -303,9 +366,9 @@
|
|||||||
</table>
|
</table>
|
||||||
</div><!-- /.box-body -->
|
</div><!-- /.box-body -->
|
||||||
</div><!-- /.box -->
|
</div><!-- /.box -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="box box-primary box-solid">
|
<div class="box box-primary box-solid">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_DEFAULT_IMAGE
|
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_DEFAULT_IMAGE
|
||||||
@@ -352,14 +415,14 @@
|
|||||||
</table>
|
</table>
|
||||||
</div><!-- /.box-body -->
|
</div><!-- /.box-body -->
|
||||||
</div><!-- /.box -->
|
</div><!-- /.box -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="box box-primary box-solid">
|
<div class="box box-primary box-solid">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_MAX_SEARCH_LEVEL
|
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_MAX_SEARCH_LEVEL
|
||||||
@@ -369,7 +432,7 @@
|
|||||||
</div><!-- /.box-tools -->
|
</div><!-- /.box-tools -->
|
||||||
</div><!-- /.box-header -->
|
</div><!-- /.box-header -->
|
||||||
<div class="box-body no-padding">
|
<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;">
|
<tr style="font-weight:bold;">
|
||||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -392,7 +455,7 @@
|
|||||||
<tr id="tr_title_desc_cn">
|
<tr id="tr_title_desc_cn">
|
||||||
<td class="td_ctrl_col">选项说明</td>
|
<td class="td_ctrl_col">选项说明</td>
|
||||||
<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/>
|
默认值为:<code>max</code><br/>
|
||||||
默认Ventoy会递归搜索磁盘上的所有目录和子目录,不管目录结构有多深都会搜索到底。你可以通过这个参数来控制搜索时的路径深度。<br/><br/>
|
默认Ventoy会递归搜索磁盘上的所有目录和子目录,不管目录结构有多深都会搜索到底。你可以通过这个参数来控制搜索时的路径深度。<br/><br/>
|
||||||
<code>max</code> : 最大层数,也就是搜索所有子目录的意思。这也是 Ventoy 的默认值。<br/>
|
<code>max</code> : 最大层数,也就是搜索所有子目录的意思。这也是 Ventoy 的默认值。<br/>
|
||||||
@@ -407,7 +470,7 @@
|
|||||||
<tr id="tr_title_desc_en">
|
<tr id="tr_title_desc_en">
|
||||||
<td class="td_ctrl_col">Option Description</td>
|
<td class="td_ctrl_col">Option Description</td>
|
||||||
<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/>
|
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/>
|
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/>
|
You can use this parameter to set a max-depth for the search path.<br/><br/>
|
||||||
@@ -423,57 +486,6 @@
|
|||||||
</table>
|
</table>
|
||||||
</div><!-- /.box-body -->
|
</div><!-- /.box-body -->
|
||||||
</div><!-- /.box -->
|
</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-tools -->
|
||||||
</div><!-- /.box-header -->
|
</div><!-- /.box-header -->
|
||||||
<div class="box-body no-padding">
|
<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;">
|
<tr style="font-weight:bold;">
|
||||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||||
<td>
|
<td>
|
||||||
<label class="radio-inline">
|
<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>
|
<input type="radio" id="id_ctrl_secondary_radio0" name="id_ctrl_secondary_radio" data-type="0" value="0">
|
||||||
</label>
|
<span id="id_span_desc_cn">不显示二级启动菜单</span>
|
||||||
<label class="radio-inline">
|
<span id="id_span_desc_en">Don't show secondary boot menu</span>
|
||||||
<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>
|
</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>
|
</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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div><!-- /.box-body -->
|
</div><!-- /.box-body -->
|
||||||
</div><!-- /.box -->
|
</div><!-- /.box -->
|
||||||
|
|
||||||
|
|
||||||
<div class="box box-primary box-solid">
|
<div class="box box-primary box-solid">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_SHOW_PASSWORD_ASTERISK
|
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_SHOW_PASSWORD_ASTERISK
|
||||||
@@ -527,39 +528,28 @@
|
|||||||
</div><!-- /.box-tools -->
|
</div><!-- /.box-tools -->
|
||||||
</div><!-- /.box-header -->
|
</div><!-- /.box-header -->
|
||||||
<div class="box-body no-padding">
|
<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;">
|
<tr style="font-weight:bold;">
|
||||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||||
<td>
|
<td>
|
||||||
<label class="radio-inline">
|
<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>
|
<input type="radio" id="id_ctrl_asterisk_radio0" name="id_ctrl_asterisk_radio" data-type="0" value="0">
|
||||||
</label>
|
<span id="id_span_desc_cn">隐藏</span>
|
||||||
<label class="radio-inline">
|
<span id="id_span_desc_en">Hide</span>
|
||||||
<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>
|
</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>
|
</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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div><!-- /.box-body -->
|
</div><!-- /.box-body -->
|
||||||
</div><!-- /.box -->
|
</div><!-- /.box -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="box box-primary box-solid">
|
<div class="box box-primary box-solid">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_SECONDARY_TIMEOUT
|
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_SECONDARY_TIMEOUT
|
||||||
@@ -575,7 +565,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<div class="col-sm-9" style="padding-left:0px;">
|
<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"/>
|
<input type="text" class="form-control" id="id_ctrl_text_secondary_timeout" name="name_ctrl_text_secondary_timeout"/>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="tr_title_desc_cn">
|
<tr id="tr_title_desc_cn">
|
||||||
@@ -596,10 +586,10 @@
|
|||||||
</table>
|
</table>
|
||||||
</div><!-- /.box-body -->
|
</div><!-- /.box-body -->
|
||||||
</div><!-- /.box -->
|
</div><!-- /.box -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="box box-primary box-solid">
|
<div class="box box-primary box-solid">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_DEFAULT_KBD_LAYOUT
|
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_DEFAULT_KBD_LAYOUT
|
||||||
@@ -609,7 +599,7 @@
|
|||||||
</div><!-- /.box-tools -->
|
</div><!-- /.box-tools -->
|
||||||
</div><!-- /.box-header -->
|
</div><!-- /.box-header -->
|
||||||
<div class="box-body no-padding">
|
<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;">
|
<tr style="font-weight:bold;">
|
||||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -652,10 +642,10 @@
|
|||||||
</table>
|
</table>
|
||||||
</div><!-- /.box-body -->
|
</div><!-- /.box-body -->
|
||||||
</div><!-- /.box -->
|
</div><!-- /.box -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="box box-primary box-solid">
|
<div class="box box-primary box-solid">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_TREE_VIEW_MENU_STYLE
|
<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">
|
<tr id="tr_title_desc_en">
|
||||||
<td class="td_ctrl_col" id="td_title_desc">Option Description</td>
|
<td class="td_ctrl_col" id="td_title_desc">Option Description</td>
|
||||||
<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;">0</code> with DIR and file size prefix
|
||||||
<code style="font-weight: bold;">1</code> No DIR and file size. Default is 0.
|
<code style="font-weight: bold;">1</code> No DIR and file size. Default is 0.
|
||||||
</td>
|
</td>
|
||||||
@@ -696,7 +686,7 @@
|
|||||||
</div><!-- /.box-body -->
|
</div><!-- /.box-body -->
|
||||||
</div><!-- /.box -->
|
</div><!-- /.box -->
|
||||||
|
|
||||||
|
|
||||||
<div class="box box-primary box-solid">
|
<div class="box box-primary box-solid">
|
||||||
<div class="box-header with-border">
|
<div class="box-header with-border">
|
||||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_FILT_DOT_UNDERSCORE_FILE
|
<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-tools -->
|
||||||
</div><!-- /.box-header -->
|
</div><!-- /.box-header -->
|
||||||
<div class="box-body no-padding">
|
<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;">
|
<tr style="font-weight:bold;">
|
||||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -721,14 +711,14 @@
|
|||||||
<tr id="tr_title_desc_cn">
|
<tr id="tr_title_desc_cn">
|
||||||
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
||||||
<td>过滤以 ._ 开头的文件。当使用苹果系统时,有时拷贝文件会产生一些 ._ 开头的文件,可以通过此选项过滤掉。
|
<td>过滤以 ._ 开头的文件。当使用苹果系统时,有时拷贝文件会产生一些 ._ 开头的文件,可以通过此选项过滤掉。
|
||||||
<code style="font-weight: bold;">0</code> 不过滤
|
<code style="font-weight: bold;">0</code> 不过滤
|
||||||
<code style="font-weight: bold;">1</code> 过滤
|
<code style="font-weight: bold;">1</code> 过滤
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="tr_title_desc_en">
|
<tr id="tr_title_desc_en">
|
||||||
<td class="td_ctrl_col" id="td_title_desc">Option Description</td>
|
<td class="td_ctrl_col" id="td_title_desc">Option Description</td>
|
||||||
<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;">0</code> Don't filt
|
||||||
<code style="font-weight: bold;">1</code> Filt
|
<code style="font-weight: bold;">1</code> Filt
|
||||||
</td>
|
</td>
|
||||||
@@ -736,7 +726,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div><!-- /.box-body -->
|
</div><!-- /.box-body -->
|
||||||
</div><!-- /.box -->
|
</div><!-- /.box -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="box box-primary box-solid">
|
<div class="box box-primary box-solid">
|
||||||
@@ -769,7 +759,7 @@
|
|||||||
<tr id="tr_title_desc_en">
|
<tr id="tr_title_desc_en">
|
||||||
<td class="td_ctrl_col" id="td_title_desc">Option Description</td>
|
<td class="td_ctrl_col" id="td_title_desc">Option Description</td>
|
||||||
<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
|
<code style="font-weight: bold;">0</code> case insensitive <code style="font-weight: bold;">1</code> case sensitive
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -819,7 +809,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="box box-primary box-solid">
|
<div class="box box-primary box-solid">
|
||||||
@@ -831,7 +821,7 @@
|
|||||||
</div><!-- /.box-tools -->
|
</div><!-- /.box-tools -->
|
||||||
</div><!-- /.box-header -->
|
</div><!-- /.box-header -->
|
||||||
<div class="box-body no-padding">
|
<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;">
|
<tr style="font-weight:bold;">
|
||||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -846,8 +836,8 @@
|
|||||||
<tr id="tr_title_desc_cn">
|
<tr id="tr_title_desc_cn">
|
||||||
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
||||||
<td>
|
<td>
|
||||||
<code style="font-weight: bold;">0</code> 不过滤 .iso 文件
|
<code style="font-weight: bold;">0</code> 不过滤 .iso 文件
|
||||||
<code style="font-weight: bold;">1</code> 过滤掉 .iso 文件。
|
<code style="font-weight: bold;">1</code> 过滤掉 .iso 文件。
|
||||||
过滤之后 .iso 文件就不会显示在启动菜单中。
|
过滤之后 .iso 文件就不会显示在启动菜单中。
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -873,7 +863,7 @@
|
|||||||
</div><!-- /.box-tools -->
|
</div><!-- /.box-tools -->
|
||||||
</div><!-- /.box-header -->
|
</div><!-- /.box-header -->
|
||||||
<div class="box-body no-padding">
|
<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;">
|
<tr style="font-weight:bold;">
|
||||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -888,8 +878,8 @@
|
|||||||
<tr id="tr_title_desc_cn">
|
<tr id="tr_title_desc_cn">
|
||||||
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
||||||
<td>
|
<td>
|
||||||
<code style="font-weight: bold;">0</code> 不过滤 .wim 文件
|
<code style="font-weight: bold;">0</code> 不过滤 .wim 文件
|
||||||
<code style="font-weight: bold;">1</code> 过滤掉 .wim 文件。
|
<code style="font-weight: bold;">1</code> 过滤掉 .wim 文件。
|
||||||
过滤之后 .wim 文件就不会显示在启动菜单中。
|
过滤之后 .wim 文件就不会显示在启动菜单中。
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -916,7 +906,7 @@
|
|||||||
</div><!-- /.box-tools -->
|
</div><!-- /.box-tools -->
|
||||||
</div><!-- /.box-header -->
|
</div><!-- /.box-header -->
|
||||||
<div class="box-body no-padding">
|
<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;">
|
<tr style="font-weight:bold;">
|
||||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -931,8 +921,8 @@
|
|||||||
<tr id="tr_title_desc_cn">
|
<tr id="tr_title_desc_cn">
|
||||||
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
||||||
<td>
|
<td>
|
||||||
<code style="font-weight: bold;">0</code> 不过滤 .efi 文件
|
<code style="font-weight: bold;">0</code> 不过滤 .efi 文件
|
||||||
<code style="font-weight: bold;">1</code> 过滤掉 .efi 文件。
|
<code style="font-weight: bold;">1</code> 过滤掉 .efi 文件。
|
||||||
过滤之后 .efi 文件就不会显示在启动菜单中。
|
过滤之后 .efi 文件就不会显示在启动菜单中。
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -959,7 +949,7 @@
|
|||||||
</div><!-- /.box-tools -->
|
</div><!-- /.box-tools -->
|
||||||
</div><!-- /.box-header -->
|
</div><!-- /.box-header -->
|
||||||
<div class="box-body no-padding">
|
<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;">
|
<tr style="font-weight:bold;">
|
||||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -974,8 +964,8 @@
|
|||||||
<tr id="tr_title_desc_cn">
|
<tr id="tr_title_desc_cn">
|
||||||
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
||||||
<td>
|
<td>
|
||||||
<code style="font-weight: bold;">0</code> 不过滤 .img 文件
|
<code style="font-weight: bold;">0</code> 不过滤 .img 文件
|
||||||
<code style="font-weight: bold;">1</code> 过滤掉 .img 文件。
|
<code style="font-weight: bold;">1</code> 过滤掉 .img 文件。
|
||||||
过滤之后 .img 文件就不会显示在启动菜单中。
|
过滤之后 .img 文件就不会显示在启动菜单中。
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -1002,7 +992,7 @@
|
|||||||
</div><!-- /.box-tools -->
|
</div><!-- /.box-tools -->
|
||||||
</div><!-- /.box-header -->
|
</div><!-- /.box-header -->
|
||||||
<div class="box-body no-padding">
|
<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;">
|
<tr style="font-weight:bold;">
|
||||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -1017,8 +1007,8 @@
|
|||||||
<tr id="tr_title_desc_cn">
|
<tr id="tr_title_desc_cn">
|
||||||
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
||||||
<td>
|
<td>
|
||||||
<code style="font-weight: bold;">0</code> 不过滤 .vhd(x) 文件
|
<code style="font-weight: bold;">0</code> 不过滤 .vhd(x) 文件
|
||||||
<code style="font-weight: bold;">1</code> 过滤掉 .vhd(x) 文件。
|
<code style="font-weight: bold;">1</code> 过滤掉 .vhd(x) 文件。
|
||||||
过滤之后 .vhd(x) 文件就不会显示在启动菜单中。
|
过滤之后 .vhd(x) 文件就不会显示在启动菜单中。
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -1045,7 +1035,7 @@
|
|||||||
</div><!-- /.box-tools -->
|
</div><!-- /.box-tools -->
|
||||||
</div><!-- /.box-header -->
|
</div><!-- /.box-header -->
|
||||||
<div class="box-body no-padding">
|
<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;">
|
<tr style="font-weight:bold;">
|
||||||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -1060,8 +1050,8 @@
|
|||||||
<tr id="tr_title_desc_cn">
|
<tr id="tr_title_desc_cn">
|
||||||
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
<td class="td_ctrl_col" id="td_title_desc">选项说明</td>
|
||||||
<td>
|
<td>
|
||||||
<code style="font-weight: bold;">0</code> 不过滤 .vtoy 文件
|
<code style="font-weight: bold;">0</code> 不过滤 .vtoy 文件
|
||||||
<code style="font-weight: bold;">1</code> 过滤掉 .vtoy 文件。
|
<code style="font-weight: bold;">1</code> 过滤掉 .vtoy 文件。
|
||||||
过滤之后 .vtoy 文件就不会显示在启动菜单中。
|
过滤之后 .vtoy 文件就不会显示在启动菜单中。
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -1077,18 +1067,18 @@
|
|||||||
</div><!-- /.box-body -->
|
</div><!-- /.box-body -->
|
||||||
</div><!-- /.box -->
|
</div><!-- /.box -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
function VtoyPageLanguageChange(newlang) {
|
function VtoyPageLanguageChange(newlang) {
|
||||||
VtoyCommonChangeLanguage(newlang);
|
VtoyCommonChangeLanguage(newlang);
|
||||||
|
|
||||||
$('h1[id=id_h1_page_title]').text(g_vtoy_cur_language.STR_PLUG_CONTROL);
|
$('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_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_valid').text(g_vtoy_cur_language.STR_VALID);
|
||||||
$('#id_ctrl_span_img_invalid').text(g_vtoy_cur_language.STR_INVALID);
|
$('#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_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.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.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.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.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.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.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();
|
data.default_image = $('input:text[id=id_ctrl_text_default_img]').val();
|
||||||
|
|
||||||
level = $('select[id=id_ctrl_sel_max_depth').val();
|
level = $('select[id=id_ctrl_sel_max_depth').val();
|
||||||
if (level === 'max') {
|
if (level === 'max') {
|
||||||
data.max_search_level = -1;
|
data.max_search_level = -1;
|
||||||
} else {
|
} else {
|
||||||
data.max_search_level = parseInt(level);
|
data.max_search_level = parseInt(level);
|
||||||
}
|
}
|
||||||
|
|
||||||
data.default_kbd_layout = $('select[id=id_ctrl_sel_kbd').val();
|
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.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());
|
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;
|
$('input:radio[name=id_ctrl_bypass_win11_radio]')[data.win11_bypass_check].checked = true;
|
||||||
//VTOY_WIN11_BYPASS_NRO
|
//VTOY_WIN11_BYPASS_NRO
|
||||||
$('input:radio[name=id_ctrl_bypass_nro_radio]')[data.win11_bypass_nro].checked = true;
|
$('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_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;
|
$('input:radio[name=id_ctrl_asterisk_radio]')[data.password_asterisk].checked = true;
|
||||||
|
|
||||||
//VTOY_DEFAULT_SEARCH_ROOT
|
//VTOY_DEFAULT_SEARCH_ROOT
|
||||||
@@ -1166,7 +1159,7 @@
|
|||||||
|
|
||||||
//VTOY_MENU_TIMEOUT
|
//VTOY_MENU_TIMEOUT
|
||||||
$('input:text[id=id_ctrl_text_timeout]').val(data.menu_timeout);
|
$('input:text[id=id_ctrl_text_timeout]').val(data.menu_timeout);
|
||||||
|
|
||||||
//VTOY_SECONDARY_TIMEOUT
|
//VTOY_SECONDARY_TIMEOUT
|
||||||
$('input:text[id=id_ctrl_text_secondary_timeout]').val(data.secondary_menu_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_check: data.win11_bypass_check,
|
||||||
win11_bypass_nro: data.win11_bypass_nro,
|
win11_bypass_nro: data.win11_bypass_nro,
|
||||||
linux_remount:data.linux_remount,
|
linux_remount:data.linux_remount,
|
||||||
|
uefi_res_lock:data.uefi_res_lock,
|
||||||
|
uefi_sb_policy:data.uefi_sb_policy,
|
||||||
secondary_menu:data.secondary_menu,
|
secondary_menu:data.secondary_menu,
|
||||||
password_asterisk:data.password_asterisk,
|
password_asterisk:data.password_asterisk,
|
||||||
default_search_root: data.default_search_root,
|
default_search_root: data.default_search_root,
|
||||||
@@ -1285,7 +1280,7 @@
|
|||||||
if (index < 0 || index >= g_vtoy_data_default_index || current_tab_index === index) {
|
if (index < 0 || index >= g_vtoy_data_default_index || current_tab_index === index) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
current_tab_index = index;
|
current_tab_index = index;
|
||||||
VtoyFillCurrentPageItem(m_data_control[index]);
|
VtoyFillCurrentPageItem(m_data_control[index]);
|
||||||
}
|
}
|
||||||
@@ -1307,7 +1302,7 @@
|
|||||||
var path = root.substr(g_current_dir.length);
|
var path = root.substr(g_current_dir.length);
|
||||||
$('input:text[id=id_ctrl_text_default_img]').val(path);
|
$('input:text[id=id_ctrl_text_default_img]').val(path);
|
||||||
if (path.length === 0) {
|
if (path.length === 0) {
|
||||||
$('div[id=id_ctrl_div_img_status]').hide();
|
$('div[id=id_ctrl_div_img_status]').hide();
|
||||||
} else {
|
} else {
|
||||||
$('div[id=id_ctrl_div_img_status]').show();
|
$('div[id=id_ctrl_div_img_status]').show();
|
||||||
$('span[id=id_ctrl_span_img_valid]').show();
|
$('span[id=id_ctrl_span_img_valid]').show();
|
||||||
@@ -1323,7 +1318,7 @@
|
|||||||
callVtoySync({method : 'get_control'}, function(data) {
|
callVtoySync({method : 'get_control'}, function(data) {
|
||||||
m_data_control = data;
|
m_data_control = data;
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#id_ctrl_btn_sel_root').click(function() {
|
$('#id_ctrl_btn_sel_root').click(function() {
|
||||||
var tip = (g_current_os === 'windows') ? '\\ISO\\Windows' : "/ISO/Linux";
|
var tip = (g_current_os === 'windows') ? '\\ISO\\Windows' : "/ISO/Linux";
|
||||||
var para = {
|
var para = {
|
||||||
@@ -1335,7 +1330,7 @@
|
|||||||
};
|
};
|
||||||
VtoySelectDirPath(OnSelectSearchRoot, para);
|
VtoySelectDirPath(OnSelectSearchRoot, para);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#id_ctrl_btn_clr_root').click(function() {
|
$('#id_ctrl_btn_clr_root').click(function() {
|
||||||
var old = $('input:text[id=id_ctrl_text_search_root]').val();
|
var old = $('input:text[id=id_ctrl_text_search_root]').val();
|
||||||
if (old.length != 0) {
|
if (old.length != 0) {
|
||||||
@@ -1344,7 +1339,7 @@
|
|||||||
VtoySaveCurrentPage();
|
VtoySaveCurrentPage();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#id_ctrl_btn_default_img').click(function() {
|
$('#id_ctrl_btn_default_img').click(function() {
|
||||||
var tip = (g_current_os === 'windows') ? '\\ISO\\Windows10_en.iso' : "/ISO/Windows10_en.iso";
|
var tip = (g_current_os === 'windows') ? '\\ISO\\Windows10_en.iso' : "/ISO/Windows10_en.iso";
|
||||||
var para = {
|
var para = {
|
||||||
@@ -1402,13 +1397,13 @@
|
|||||||
$('#id_tab_control a[href="#tab_3"]').click(OnClickMultiModeTab);
|
$('#id_tab_control a[href="#tab_3"]').click(OnClickMultiModeTab);
|
||||||
$('#id_tab_control a[href="#tab_4"]').click(OnClickMultiModeTab);
|
$('#id_tab_control a[href="#tab_4"]').click(OnClickMultiModeTab);
|
||||||
$('#id_tab_control a[href="#tab_5"]').click(OnClickMultiModeTab);
|
$('#id_tab_control a[href="#tab_5"]').click(OnClickMultiModeTab);
|
||||||
|
|
||||||
function UpdateTabTitleIcon(data) {
|
function UpdateTabTitleIcon(data) {
|
||||||
CommonUpdateTabTitleIcon(data.exist_control, '#id_tab_control a[href="#tab_', 'control');
|
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) {
|
Modal.confirm({msg:GetResetTabConfigTipMsg(current_tab_index, 'control')}).on(function(e) {
|
||||||
if (e) {
|
if (e) {
|
||||||
VtoyFillCurrentPageItem(m_data_control[g_vtoy_data_default_index]);
|
VtoyFillCurrentPageItem(m_data_control[g_vtoy_data_default_index]);
|
||||||
VtoySaveCurrentPage();
|
VtoySaveCurrentPage();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,40 +1,40 @@
|
|||||||
|
|
||||||
function VtoyUTF16HexToAscii(hex) {
|
function VtoyUTF16HexToAscii(hex) {
|
||||||
var str = "";
|
var str = "";
|
||||||
for (var i = 0; i < hex.length; i += 4) {
|
for (var i = 0; i < hex.length; i += 4) {
|
||||||
str += String.fromCharCode(parseInt(hex.substring(i, i + 4), 16));
|
str += String.fromCharCode(parseInt(hex.substring(i, i + 4), 16));
|
||||||
}
|
}
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
function ventoy_replace_slash(str) {
|
function ventoy_replace_slash(str) {
|
||||||
var str1 = str.replace(/\\/g, '/');
|
var str1 = str.replace(/\\/g, '/');
|
||||||
var str2 = str1.replace(/\/\//g, '/');
|
var str2 = str1.replace(/\/\//g, '/');
|
||||||
|
|
||||||
if (str2 && str2.length > 0) {
|
if (str2 && str2.length > 0) {
|
||||||
if (str2.substr(-1) === "/") {
|
if (str2.substr(-1) === "/") {
|
||||||
return str2.substr(0, str2.length - 1);
|
return str2.substr(0, str2.length - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return str2;
|
return str2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function ventoy_get_ulen(str) {
|
function ventoy_get_ulen(str) {
|
||||||
var c, b = 0, l = str.length;
|
var c, b = 0, l = str.length;
|
||||||
while(l) {
|
while(l) {
|
||||||
c = str.charCodeAt(--l);
|
c = str.charCodeAt(--l);
|
||||||
b += (c < 128) ? 1 : ((c < 2048) ? 2 : ((c < 65536) ? 3 : 4));
|
b += (c < 128) ? 1 : ((c < 2048) ? 2 : ((c < 65536) ? 3 : 4));
|
||||||
};
|
};
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function ventoy_common_check_path(path) {
|
function ventoy_common_check_path(path) {
|
||||||
var curdir
|
var curdir
|
||||||
|
|
||||||
if (path.indexOf('//') >= 0) {
|
if (path.indexOf('//') >= 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -43,11 +43,11 @@ function ventoy_common_check_path(path) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
curdir = path.substr(0, g_current_dir.length);
|
curdir = path.substr(0, g_current_dir.length);
|
||||||
if (curdir.match("^[a-z]:$")) {
|
if (curdir.match("^[a-z]:$")) {
|
||||||
curdir = curdir.toUpperCase();
|
curdir = curdir.toUpperCase();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (curdir != g_current_dir) {
|
if (curdir != g_current_dir) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -135,7 +135,7 @@ function callVtoy(p1, p2, p3) {
|
|||||||
}
|
}
|
||||||
else if(undefined === errorThrown.length)
|
else if(undefined === errorThrown.length)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
else if('' == errorThrown.trim())
|
else if('' == errorThrown.trim())
|
||||||
{
|
{
|
||||||
@@ -184,11 +184,11 @@ function callVtoyASyncTimeout(time, data, func) {
|
|||||||
success: func,
|
success: func,
|
||||||
error: function(xmlHttpRequest, textStatus, errorThrown) {
|
error: function(xmlHttpRequest, textStatus, errorThrown) {
|
||||||
if(undefined === errorThrown)
|
if(undefined === errorThrown)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
else if(undefined === errorThrown.length)
|
else if(undefined === errorThrown.length)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
else if('' == errorThrown.trim())
|
else if('' == errorThrown.trim())
|
||||||
{
|
{
|
||||||
@@ -232,11 +232,11 @@ function callVtoySync(data, func) {
|
|||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
async: false,
|
async: false,
|
||||||
data: JSON.stringify(data),
|
data: JSON.stringify(data),
|
||||||
success: function VtoyCallFuncWrapper(data) {
|
success: function VtoyCallFuncWrapper(data) {
|
||||||
if (data.result === 'busy') {
|
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 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>';
|
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 {
|
}else {
|
||||||
func(data);
|
func(data);
|
||||||
}
|
}
|
||||||
@@ -248,7 +248,7 @@ function callVtoySync(data, func) {
|
|||||||
}
|
}
|
||||||
else if(undefined === errorThrown.length)
|
else if(undefined === errorThrown.length)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
else if('' == errorThrown.trim())
|
else if('' == errorThrown.trim())
|
||||||
{
|
{
|
||||||
@@ -285,16 +285,16 @@ function callVtoySync(data, func) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var vtoy = {
|
var vtoy = {
|
||||||
baseurl : '',
|
baseurl : '',
|
||||||
status: '',
|
status: '',
|
||||||
scan: {
|
scan: {
|
||||||
time: 3,
|
time: 3,
|
||||||
ret: []
|
ret: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
String.prototype.endsWith = function(str) {
|
String.prototype.endsWith = function(str) {
|
||||||
if (str == null || str == "" || this.length == 0 || str.length > this.length)
|
if (str == null || str == "" || this.length == 0 || str.length > this.length)
|
||||||
return false;
|
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_INFO": "Info",
|
||||||
"STR_BTN_OK": "OK",
|
"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_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_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_PATH": "Invalid or nonexist full file path, please check!",
|
||||||
"STR_INVALID_FILE_PATH1": "The 1st 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_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_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_DIR_PATH": "Invalid directory path, please check!",
|
||||||
"STR_INVALID_NUMBER": "Please input valid non-negative integer!",
|
"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_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_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_SET_DEFAULT_IMAGE": "Set Default Image",
|
||||||
"STR_ADD_THEME": "Add Theme",
|
"STR_ADD_THEME": "Add Theme",
|
||||||
"STR_ADD_FONT": "Set Font",
|
"STR_ADD_FONT": "Set Font",
|
||||||
@@ -426,7 +426,7 @@ var g_vtoy_cur_language_en =
|
|||||||
"STR_DEFAULT_SELECT": " Default",
|
"STR_DEFAULT_SELECT": " Default",
|
||||||
"STR_AUTO_TEMPLATE": "Auto Install Template",
|
"STR_AUTO_TEMPLATE": "Auto Install Template",
|
||||||
"STR_ADD_AUTO_TEMPLATE": "Add Auto Install Template",
|
"STR_ADD_AUTO_TEMPLATE": "Add Auto Install Template",
|
||||||
|
|
||||||
"STR_PERSISTENCE_DAT": "Persistence Dat File",
|
"STR_PERSISTENCE_DAT": "Persistence Dat File",
|
||||||
"STR_ADD_PERSISTENCE_DAT": "Add Persistence Dat File",
|
"STR_ADD_PERSISTENCE_DAT": "Add Persistence Dat File",
|
||||||
|
|
||||||
@@ -449,7 +449,7 @@ var g_vtoy_cur_language_en =
|
|||||||
"STR_XXX": "xxx"
|
"STR_XXX": "xxx"
|
||||||
};
|
};
|
||||||
|
|
||||||
var g_vtoy_cur_language_cn =
|
var g_vtoy_cur_language_cn =
|
||||||
{
|
{
|
||||||
"STR_INFO": "提醒",
|
"STR_INFO": "提醒",
|
||||||
"STR_BTN_OK": "确定",
|
"STR_BTN_OK": "确定",
|
||||||
@@ -486,7 +486,7 @@ var g_vtoy_cur_language_cn =
|
|||||||
"STR_DELETE_CONFIRM": "确定要删除吗?",
|
"STR_DELETE_CONFIRM": "确定要删除吗?",
|
||||||
"STR_FILE_PATH": "文件路径",
|
"STR_FILE_PATH": "文件路径",
|
||||||
"STR_DIR_PATH": "目录路径",
|
"STR_DIR_PATH": "目录路径",
|
||||||
|
|
||||||
"STR_SET_ALIAS": "设置菜单别名",
|
"STR_SET_ALIAS": "设置菜单别名",
|
||||||
"STR_ALIAS": "别名",
|
"STR_ALIAS": "别名",
|
||||||
"STR_SET_TIP": "设置菜单提示",
|
"STR_SET_TIP": "设置菜单提示",
|
||||||
@@ -531,10 +531,10 @@ var g_vtoy_cur_language_cn =
|
|||||||
|
|
||||||
"STR_PATH_TOO_LONG": "路径超过最大支持长度,请检查!",
|
"STR_PATH_TOO_LONG": "路径超过最大支持长度,请检查!",
|
||||||
"STR_INPUT_TOO_LONG": "字符串超过最大支持长度,请检查!",
|
"STR_INPUT_TOO_LONG": "字符串超过最大支持长度,请检查!",
|
||||||
"STR_INVALID_FILE_PATH": "文件路径不合法或不存在,请检查!",
|
"STR_INVALID_FILE_PATH": "文件路径不合法或不存在,请检查!",
|
||||||
"STR_INVALID_FILE_PATH1": "第1个文件路径不合法或不存在,请检查!",
|
"STR_INVALID_FILE_PATH1": "第1个文件路径不合法或不存在,请检查!",
|
||||||
"STR_INVALID_FILE_PATH2": "第2个文件路径不合法或不存在,请检查!",
|
"STR_INVALID_FILE_PATH2": "第2个文件路径不合法或不存在,请检查!",
|
||||||
"STR_INVALID_NEW_FILE_PATH": "new 文件路径不合法或不存在,请检查!",
|
"STR_INVALID_NEW_FILE_PATH": "new 文件路径不合法或不存在,请检查!",
|
||||||
"STR_INVALID_DIR_PATH": "文件夹路径不合法,请检查!",
|
"STR_INVALID_DIR_PATH": "文件夹路径不合法,请检查!",
|
||||||
"STR_INVALID_NUMBER": "请输入合法的非负整数!",
|
"STR_INVALID_NUMBER": "请输入合法的非负整数!",
|
||||||
"STR_INVALID_AUTOSEL": "autosel 的值超过了列表实际长度!",
|
"STR_INVALID_AUTOSEL": "autosel 的值超过了列表实际长度!",
|
||||||
@@ -562,7 +562,7 @@ var g_vtoy_cur_language_cn =
|
|||||||
"STR_SET_PARENT_PWD": "[parent] 为某个目录下的所有文件设置相同的密码",
|
"STR_SET_PARENT_PWD": "[parent] 为某个目录下的所有文件设置相同的密码",
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"STR_SET_SEARCH_ROOT": "设置搜索目录",
|
"STR_SET_SEARCH_ROOT": "设置搜索目录",
|
||||||
"STR_SET_DEFAULT_IMAGE": "设置默认镜像文件",
|
"STR_SET_DEFAULT_IMAGE": "设置默认镜像文件",
|
||||||
"STR_ADD_THEME": "添加主题",
|
"STR_ADD_THEME": "添加主题",
|
||||||
@@ -607,13 +607,13 @@ var g_dir_modal_callback;
|
|||||||
|
|
||||||
function GetResetTabConfigTipMsg(index, name) {
|
function GetResetTabConfigTipMsg(index, name) {
|
||||||
var msgstr;
|
var msgstr;
|
||||||
|
|
||||||
if (g_current_language === 'en') {
|
if (g_current_language === 'en') {
|
||||||
msgstr = 'Are you sure to reset all the configurations on the <code>' + name + g_bios_postfix[index] + '</code> tab ?';
|
msgstr = 'Are you sure to reset all the configurations on the <code>' + name + g_bios_postfix[index] + '</code> tab ?';
|
||||||
} else {
|
} else {
|
||||||
msgstr = '确认要重置 <code>' + name + g_bios_postfix[index] + '</code> 标签页下的所有配置?';
|
msgstr = '确认要重置 <code>' + name + g_bios_postfix[index] + '</code> 标签页下的所有配置?';
|
||||||
}
|
}
|
||||||
|
|
||||||
return msgstr;
|
return msgstr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -629,7 +629,7 @@ function CommonUpdateTabTitleIcon(exists, id, name) {
|
|||||||
} else {
|
} else {
|
||||||
newhtml = name + g_bios_postfix[i];
|
newhtml = name + g_bios_postfix[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newhtml != oldhtml) {
|
if (newhtml != oldhtml) {
|
||||||
$(fid).html(newhtml);
|
$(fid).html(newhtml);
|
||||||
}
|
}
|
||||||
@@ -661,7 +661,7 @@ function ventoy_file_submit(form, extra) {
|
|||||||
callVtoySync({
|
callVtoySync({
|
||||||
method : 'check_fuzzy',
|
method : 'check_fuzzy',
|
||||||
path: filepath
|
path: filepath
|
||||||
}, function(data) {
|
}, function(data) {
|
||||||
if (data.exist != 0) {
|
if (data.exist != 0) {
|
||||||
if (typeof(g_file_modal_callback) === 'function') {
|
if (typeof(g_file_modal_callback) === 'function') {
|
||||||
g_file_modal_callback(filepath, -1, fileextra);
|
g_file_modal_callback(filepath, -1, fileextra);
|
||||||
@@ -676,7 +676,7 @@ function ventoy_file_submit(form, extra) {
|
|||||||
method : 'check_path',
|
method : 'check_path',
|
||||||
dir: 0,
|
dir: 0,
|
||||||
path: filepath
|
path: filepath
|
||||||
}, function(data) {
|
}, function(data) {
|
||||||
if (data.exist === 1) {
|
if (data.exist === 1) {
|
||||||
if (typeof(g_file_modal_callback) === 'function') {
|
if (typeof(g_file_modal_callback) === 'function') {
|
||||||
g_file_modal_callback(filepath, 1, fileextra);
|
g_file_modal_callback(filepath, 1, fileextra);
|
||||||
@@ -691,7 +691,7 @@ function ventoy_file_submit(form, extra) {
|
|||||||
|
|
||||||
|
|
||||||
var g_filepath_validator = $("#SetFileForm").validate({
|
var g_filepath_validator = $("#SetFileForm").validate({
|
||||||
rules: {
|
rules: {
|
||||||
FilePath : {
|
FilePath : {
|
||||||
required: true,
|
required: true,
|
||||||
utfmaxlen: true,
|
utfmaxlen: true,
|
||||||
@@ -708,7 +708,7 @@ var g_filepath_validator = $("#SetFileForm").validate({
|
|||||||
});
|
});
|
||||||
|
|
||||||
var g_dirpath_validator = $("#SetDirForm").validate({
|
var g_dirpath_validator = $("#SetDirForm").validate({
|
||||||
rules: {
|
rules: {
|
||||||
DirPath : {
|
DirPath : {
|
||||||
required: true,
|
required: true,
|
||||||
utfmaxlen: true,
|
utfmaxlen: true,
|
||||||
@@ -722,7 +722,7 @@ var g_dirpath_validator = $("#SetDirForm").validate({
|
|||||||
submitHandler: function(form) {
|
submitHandler: function(form) {
|
||||||
var dirpath = $("#DirPath").val();
|
var dirpath = $("#DirPath").val();
|
||||||
var dirextra = $("#DirExtra").val();
|
var dirextra = $("#DirExtra").val();
|
||||||
|
|
||||||
if (!dirpath) {
|
if (!dirpath) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -747,8 +747,8 @@ var g_dirpath_validator = $("#SetDirForm").validate({
|
|||||||
callVtoySync({
|
callVtoySync({
|
||||||
method : 'check_path',
|
method : 'check_path',
|
||||||
dir: 1,
|
dir: 1,
|
||||||
path: dirpath
|
path: dirpath
|
||||||
}, function(data) {
|
}, function(data) {
|
||||||
if (data.exist === 1) {
|
if (data.exist === 1) {
|
||||||
if (typeof(g_dir_modal_callback) === 'function') {
|
if (typeof(g_dir_modal_callback) === 'function') {
|
||||||
g_dir_modal_callback(dirpath, dirextra);
|
g_dir_modal_callback(dirpath, dirextra);
|
||||||
@@ -763,7 +763,7 @@ var g_dirpath_validator = $("#SetDirForm").validate({
|
|||||||
|
|
||||||
function VtoySelectFilePath(cb, para) {
|
function VtoySelectFilePath(cb, para) {
|
||||||
g_file_fuzzy_match = para.fuzzy;
|
g_file_fuzzy_match = para.fuzzy;
|
||||||
|
|
||||||
if (para.extra) {
|
if (para.extra) {
|
||||||
$('div[id=id_div_file_extra]').show();
|
$('div[id=id_div_file_extra]').show();
|
||||||
$('#SetFileForm_extra').text(para.extra_title);
|
$('#SetFileForm_extra').text(para.extra_title);
|
||||||
@@ -787,7 +787,7 @@ function VtoySelectFilePath(cb, para) {
|
|||||||
} else {
|
} else {
|
||||||
$('#SetFileForm #SetFileForm_lang_1').text(para.title);
|
$('#SetFileForm #SetFileForm_lang_1').text(para.title);
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#SetFileForm #SetFileForm_lang_2').text("File Path");
|
$('#SetFileForm #SetFileForm_lang_2').text("File Path");
|
||||||
$('#SetFileForm #SetFileForm_lang_3').text(" OK");
|
$('#SetFileForm #SetFileForm_lang_3').text(" OK");
|
||||||
$('#SetFileForm #SetFileForm_lang_4').text("Cancel");
|
$('#SetFileForm #SetFileForm_lang_4').text("Cancel");
|
||||||
@@ -823,7 +823,7 @@ function VtoySelectFilePath(cb, para) {
|
|||||||
g_file_with_extra = para.extra;
|
g_file_with_extra = para.extra;
|
||||||
g_filepath_validator.settings.rules.FileExtra.required = g_file_with_extra;
|
g_filepath_validator.settings.rules.FileExtra.required = g_file_with_extra;
|
||||||
g_filepath_validator.resetForm();
|
g_filepath_validator.resetForm();
|
||||||
$("#SetFileModal").modal();
|
$("#SetFileModal").modal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -882,8 +882,8 @@ function VtoySelectDirPath(cb, para) {
|
|||||||
g_dir_modal_callback = cb;
|
g_dir_modal_callback = cb;
|
||||||
g_dir_with_extra = para.extra;
|
g_dir_with_extra = para.extra;
|
||||||
g_dirpath_validator.settings.rules.DirExtra.required = g_dir_with_extra;
|
g_dirpath_validator.settings.rules.DirExtra.required = g_dir_with_extra;
|
||||||
g_dirpath_validator.resetForm();
|
g_dirpath_validator.resetForm();
|
||||||
$("#SetDirModal").modal();
|
$("#SetDirModal").modal();
|
||||||
}
|
}
|
||||||
|
|
||||||
function VtoyCommonChangeLanguage(newlang) {
|
function VtoyCommonChangeLanguage(newlang) {
|
||||||
@@ -891,7 +891,7 @@ function VtoyCommonChangeLanguage(newlang) {
|
|||||||
g_vtoy_cur_language = g_vtoy_cur_language_en;
|
g_vtoy_cur_language = g_vtoy_cur_language_en;
|
||||||
;$.extend($.validator.messages, {
|
;$.extend($.validator.messages, {
|
||||||
required: "This field is required",
|
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"),
|
maxlength: $.validator.format("You can enter up to {0} characters"),
|
||||||
minlength: $.validator.format("Must enter at least {0} characters"),
|
minlength: $.validator.format("Must enter at least {0} characters"),
|
||||||
rangelength: $.validator.format("Please input {0} to {1} characters"),
|
rangelength: $.validator.format("Please input {0} to {1} characters"),
|
||||||
@@ -910,23 +910,23 @@ function VtoyCommonChangeLanguage(newlang) {
|
|||||||
var newlink = oldlink.replace("/cn/", "/en/");
|
var newlink = oldlink.replace("/cn/", "/en/");
|
||||||
$(this).attr('href', newlink);
|
$(this).attr('href', newlink);
|
||||||
});
|
});
|
||||||
|
|
||||||
$("span[id=id_span_official_doc]").each(function(){
|
$("span[id=id_span_official_doc]").each(function(){
|
||||||
$(this).text(" Plugin Official Document");
|
$(this).text(" Plugin Official Document");
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#id_span_copy').text("Copy");
|
$('#id_span_copy').text("Copy");
|
||||||
$('#id_span_preview').text("Preview");
|
$('#id_span_preview').text("Preview");
|
||||||
$('#id_span_language').text("中文");
|
$('#id_span_language').text("中文");
|
||||||
|
|
||||||
$("tr[id=tr_title_desc_cn]").each(function(){
|
$("tr[id=tr_title_desc_cn]").each(function(){
|
||||||
$(this).hide();
|
$(this).hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("tr[id=tr_title_desc_en]").each(function(){
|
$("tr[id=tr_title_desc_en]").each(function(){
|
||||||
$(this).show();
|
$(this).show();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("th[id=id_th_file_path]").each(function(){
|
$("th[id=id_th_file_path]").each(function(){
|
||||||
$(this).text("Full File Path");
|
$(this).text("Full File Path");
|
||||||
});
|
});
|
||||||
@@ -934,12 +934,15 @@ function VtoyCommonChangeLanguage(newlang) {
|
|||||||
$("span[id=id_span_desc_cn]").each(function(){
|
$("span[id=id_span_desc_cn]").each(function(){
|
||||||
$(this).hide();
|
$(this).hide();
|
||||||
});
|
});
|
||||||
|
$("span[id=id_span_desc_en]").each(function(){
|
||||||
|
$(this).show();
|
||||||
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
g_vtoy_cur_language = g_vtoy_cur_language_cn;
|
g_vtoy_cur_language = g_vtoy_cur_language_cn;
|
||||||
;$.extend($.validator.messages, {
|
;$.extend($.validator.messages, {
|
||||||
required: "这是必填字段",
|
required: "这是必填字段",
|
||||||
remote: "请修正此字段",
|
remote: "请修正此字段",
|
||||||
maxlength: $.validator.format("最多可以输入 {0} 个字符"),
|
maxlength: $.validator.format("最多可以输入 {0} 个字符"),
|
||||||
minlength: $.validator.format("最少要输入 {0} 个字符"),
|
minlength: $.validator.format("最少要输入 {0} 个字符"),
|
||||||
rangelength: $.validator.format("请输入长度在 {0} 到 {1} 之间的字符串"),
|
rangelength: $.validator.format("请输入长度在 {0} 到 {1} 之间的字符串"),
|
||||||
@@ -952,29 +955,29 @@ function VtoyCommonChangeLanguage(newlang) {
|
|||||||
filenamepart:$.validator.format("作为文件名的一部分,不能包含特殊的符号"),
|
filenamepart:$.validator.format("作为文件名的一部分,不能包含特殊的符号"),
|
||||||
printascii: $.validator.format("不能包含中文或其他非 ascii 字符。")
|
printascii: $.validator.format("不能包含中文或其他非 ascii 字符。")
|
||||||
});
|
});
|
||||||
|
|
||||||
$("a[id=id_a_official_doc]").each(function(){
|
$("a[id=id_a_official_doc]").each(function(){
|
||||||
var oldlink = $(this).attr('href');
|
var oldlink = $(this).attr('href');
|
||||||
var newlink = oldlink.replace("/en/", "/cn/");
|
var newlink = oldlink.replace("/en/", "/cn/");
|
||||||
$(this).attr('href', newlink);
|
$(this).attr('href', newlink);
|
||||||
});
|
});
|
||||||
|
|
||||||
$("span[id=id_span_official_doc]").each(function(){
|
$("span[id=id_span_official_doc]").each(function(){
|
||||||
$(this).text(" 插件官网文档");
|
$(this).text(" 插件官网文档");
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#id_span_copy').text("复制");
|
$('#id_span_copy').text("复制");
|
||||||
$('#id_span_preview').text("预览");
|
$('#id_span_preview').text("预览");
|
||||||
$('#id_span_language').text("English");
|
$('#id_span_language').text("English");
|
||||||
|
|
||||||
$("tr[id=tr_title_desc_cn]").each(function(){
|
$("tr[id=tr_title_desc_cn]").each(function(){
|
||||||
$(this).show();
|
$(this).show();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("tr[id=tr_title_desc_en]").each(function(){
|
$("tr[id=tr_title_desc_en]").each(function(){
|
||||||
$(this).hide();
|
$(this).hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
$("th[id=id_th_file_path]").each(function(){
|
$("th[id=id_th_file_path]").each(function(){
|
||||||
$(this).text("文件路径");
|
$(this).text("文件路径");
|
||||||
});
|
});
|
||||||
@@ -982,6 +985,10 @@ function VtoyCommonChangeLanguage(newlang) {
|
|||||||
$("span[id=id_span_desc_cn]").each(function(){
|
$("span[id=id_span_desc_cn]").each(function(){
|
||||||
$(this).show();
|
$(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);
|
$("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_save').text(g_vtoy_cur_language.STR_SAVE);
|
||||||
$('#id_span_reset').text(g_vtoy_cur_language.STR_RESET);
|
$('#id_span_reset').text(g_vtoy_cur_language.STR_RESET);
|
||||||
$('#id_span_donation').text(g_vtoy_cur_language.STR_PLUG_DONATION);
|
$('#id_span_donation').text(g_vtoy_cur_language.STR_PLUG_DONATION);
|
||||||
|
|
||||||
$('span[id=id_btn_span_reset]').each(function(){
|
$('span[id=id_btn_span_reset]').each(function(){
|
||||||
$(this).text(' ' + g_vtoy_cur_language.STR_RESET);
|
$(this).text(' ' + g_vtoy_cur_language.STR_RESET);
|
||||||
});
|
});
|
||||||
@@ -1033,13 +1040,13 @@ function VtoyCommonChangeLanguage(newlang) {
|
|||||||
$("td[id=td_title_desc]").each(function(){
|
$("td[id=td_title_desc]").each(function(){
|
||||||
$(this).text(g_vtoy_cur_language.STR_OPT_DESC);
|
$(this).text(g_vtoy_cur_language.STR_OPT_DESC);
|
||||||
});
|
});
|
||||||
|
|
||||||
$("td[id=td_title_setting]").each(function(){
|
$("td[id=td_title_setting]").each(function(){
|
||||||
$(this).text(g_vtoy_cur_language.STR_OPT_SETTING);
|
$(this).text(g_vtoy_cur_language.STR_OPT_SETTING);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function ventoy_get_status_line(dir, exist) {
|
function ventoy_get_status_line(dir, exist) {
|
||||||
if (dir) {
|
if (dir) {
|
||||||
if (exist === 0) {
|
if (exist === 0) {
|
||||||
@@ -1062,7 +1069,7 @@ function ventoy_get_status_line(dir, exist) {
|
|||||||
|
|
||||||
var g_type_select_callback;
|
var g_type_select_callback;
|
||||||
|
|
||||||
var g_type_select_validator = $("#TypeSelectForm").validate({
|
var g_type_select_validator = $("#TypeSelectForm").validate({
|
||||||
submitHandler: function(form) {
|
submitHandler: function(form) {
|
||||||
var sel = parseInt($('input:radio[name=name_select_type_radio]:checked').val());
|
var sel = parseInt($('input:radio[name=name_select_type_radio]:checked').val());
|
||||||
if (typeof(g_type_select_callback) === 'function') {
|
if (typeof(g_type_select_callback) === 'function') {
|
||||||
@@ -1076,7 +1083,7 @@ var g_type_select_validator = $("#TypeSelectForm").validate({
|
|||||||
function VtoySelectType(cb, para) {
|
function VtoySelectType(cb, para) {
|
||||||
|
|
||||||
$('#TypeSelectForm #TypeSelForm_lang_1').text(g_vtoy_cur_language.STR_SELECT);
|
$('#TypeSelectForm #TypeSelForm_lang_1').text(g_vtoy_cur_language.STR_SELECT);
|
||||||
|
|
||||||
if (g_current_language === 'en') {
|
if (g_current_language === 'en') {
|
||||||
$('#TypeSelectForm #TypeSelForm_lang_2').text(" OK");
|
$('#TypeSelectForm #TypeSelForm_lang_2').text(" OK");
|
||||||
$('#TypeSelectForm #TypeSelForm_lang_3').text("Cancel");
|
$('#TypeSelectForm #TypeSelForm_lang_3').text("Cancel");
|
||||||
@@ -1084,7 +1091,7 @@ function VtoySelectType(cb, para) {
|
|||||||
$('#TypeSelectForm #TypeSelForm_lang_2').text("确定");
|
$('#TypeSelectForm #TypeSelForm_lang_2').text("确定");
|
||||||
$('#TypeSelectForm #TypeSelForm_lang_3').text("取消");
|
$('#TypeSelectForm #TypeSelForm_lang_3').text("取消");
|
||||||
}
|
}
|
||||||
|
|
||||||
var $tbl = $("#id_type_select_table tbody");
|
var $tbl = $("#id_type_select_table tbody");
|
||||||
$tbl.empty();
|
$tbl.empty();
|
||||||
|
|
||||||
@@ -1101,23 +1108,23 @@ function VtoySelectType(cb, para) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_type_select_callback = cb;
|
g_type_select_callback = cb;
|
||||||
g_type_select_validator.resetForm();
|
g_type_select_validator.resetForm();
|
||||||
$("#TypeSelectModal").modal();
|
$("#TypeSelectModal").modal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var g_set_key_callback;
|
var g_set_key_callback;
|
||||||
|
|
||||||
var g_set_key_validator = $("#SetKeyForm").validate({
|
var g_set_key_validator = $("#SetKeyForm").validate({
|
||||||
rules: {
|
rules: {
|
||||||
SetKeyKey : {
|
SetKeyKey : {
|
||||||
required: true,
|
required: true,
|
||||||
utfmaxlen: true
|
utfmaxlen: true
|
||||||
},
|
},
|
||||||
SetKeyValue : {
|
SetKeyValue : {
|
||||||
required: true,
|
required: true,
|
||||||
utfmaxlen: true,
|
utfmaxlen: true,
|
||||||
filenamepart: true
|
filenamepart: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -1151,10 +1158,10 @@ function VtoySetKey(cb, para) {
|
|||||||
$('#SetKeyForm #SetKeyForm_lang_4').text("确定");
|
$('#SetKeyForm #SetKeyForm_lang_4').text("确定");
|
||||||
$('#SetKeyForm #SetKeyForm_lang_5').text("取消");
|
$('#SetKeyForm #SetKeyForm_lang_5').text("取消");
|
||||||
}
|
}
|
||||||
|
|
||||||
g_set_key_callback = cb;
|
g_set_key_callback = cb;
|
||||||
g_set_key_validator.resetForm();
|
g_set_key_validator.resetForm();
|
||||||
$("#SetKeyModal").modal();
|
$("#SetKeyModal").modal();
|
||||||
}
|
}
|
||||||
|
|
||||||
var g_valid_color_name = [
|
var g_valid_color_name = [
|
||||||
@@ -1204,7 +1211,7 @@ function ventoy_check_file_path(isopath, fuzzy, cb) {
|
|||||||
callVtoySync({
|
callVtoySync({
|
||||||
method : 'check_fuzzy',
|
method : 'check_fuzzy',
|
||||||
path: isopath
|
path: isopath
|
||||||
}, function(data) {
|
}, function(data) {
|
||||||
if (data.exist != 0) {
|
if (data.exist != 0) {
|
||||||
if (typeof(cb) === 'function') {
|
if (typeof(cb) === 'function') {
|
||||||
cb(data.exist);
|
cb(data.exist);
|
||||||
@@ -1218,7 +1225,7 @@ function ventoy_check_file_path(isopath, fuzzy, cb) {
|
|||||||
method : 'check_path',
|
method : 'check_path',
|
||||||
dir: 0,
|
dir: 0,
|
||||||
path: isopath
|
path: isopath
|
||||||
}, function(data) {
|
}, function(data) {
|
||||||
if (data.exist === 1) {
|
if (data.exist === 1) {
|
||||||
if (typeof(cb) === 'function') {
|
if (typeof(cb) === 'function') {
|
||||||
cb(data.exist);
|
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 t = "abcdefhijkmnprstwxyz2345678";
|
||||||
var a = t.length;
|
var a = t.length;
|
||||||
var n = "";
|
var n = "";
|
||||||
@@ -1243,15 +1250,15 @@ function ventoy_random_string(e) {
|
|||||||
|
|
||||||
var g_set_filefile_callback;
|
var g_set_filefile_callback;
|
||||||
|
|
||||||
var g_set_filefile_validator = $("#SetFileFileForm").validate({
|
var g_set_filefile_validator = $("#SetFileFileForm").validate({
|
||||||
rules: {
|
rules: {
|
||||||
FileFilePath1 : {
|
FileFilePath1 : {
|
||||||
required: true,
|
required: true,
|
||||||
utfmaxlen: true
|
utfmaxlen: true
|
||||||
},
|
},
|
||||||
FileFilePath2 : {
|
FileFilePath2 : {
|
||||||
required: true,
|
required: true,
|
||||||
utfmaxlen: true
|
utfmaxlen: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -1332,24 +1339,24 @@ function VtoySetFileFile(cb, para) {
|
|||||||
$('span[id=id_span_filefile_tip3]').each(function(){
|
$('span[id=id_span_filefile_tip3]').each(function(){
|
||||||
$(this).text(para.tip3);
|
$(this).text(para.tip3);
|
||||||
});
|
});
|
||||||
|
|
||||||
g_set_filefile_callback = cb;
|
g_set_filefile_callback = cb;
|
||||||
g_set_filefile_validator.resetForm();
|
g_set_filefile_validator.resetForm();
|
||||||
$("#SetFileFileModal").modal();
|
$("#SetFileFileModal").modal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var g_set_dirfile_callback;
|
var g_set_dirfile_callback;
|
||||||
|
|
||||||
var g_set_dirfile_validator = $("#SetDirFileForm").validate({
|
var g_set_dirfile_validator = $("#SetDirFileForm").validate({
|
||||||
rules: {
|
rules: {
|
||||||
DirFilePath1 : {
|
DirFilePath1 : {
|
||||||
required: true,
|
required: true,
|
||||||
utfmaxlen: true
|
utfmaxlen: true
|
||||||
},
|
},
|
||||||
DirFilePath2 : {
|
DirFilePath2 : {
|
||||||
required: true,
|
required: true,
|
||||||
utfmaxlen: true
|
utfmaxlen: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -1427,9 +1434,9 @@ function VtoySetDirFile(cb, para) {
|
|||||||
$('span[id=id_span_dirfile_tip2]').each(function(){
|
$('span[id=id_span_dirfile_tip2]').each(function(){
|
||||||
$(this).text(para.tip2);
|
$(this).text(para.tip2);
|
||||||
});
|
});
|
||||||
|
|
||||||
g_set_dirfile_callback = cb;
|
g_set_dirfile_callback = cb;
|
||||||
g_set_dirfile_validator.resetForm();
|
g_set_dirfile_validator.resetForm();
|
||||||
$("#SetDirFileModal").modal();
|
$("#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" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
@@ -7,12 +7,12 @@
|
|||||||
* modify it under the terms of the GNU General Public License as
|
* modify it under the terms of the GNU General Public License as
|
||||||
* published by the Free Software Foundation; either version 3 of the
|
* published by the Free Software Foundation; either version 3 of the
|
||||||
* License, or (at your option) any later version.
|
* License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful, but
|
* This program is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
*
|
*
|
||||||
@@ -70,7 +70,7 @@ static void vlog(const char *fmt, ...)
|
|||||||
n += vsnprintf(log, sizeof(log) - 1, fmt, arg);
|
n += vsnprintf(log, sizeof(log) - 1, fmt, arg);
|
||||||
va_end(arg);
|
va_end(arg);
|
||||||
|
|
||||||
fwrite(log, 1, n, fp);
|
fwrite(log, 1, n, fp);
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -90,7 +90,7 @@ static int copy_file(const char *file1, const char *file2)
|
|||||||
vlog("Failed to read file <%s>\n", file1);
|
vlog("Failed to read file <%s>\n", file1);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
fp2 = fopen(file2, "wb+");
|
fp2 = fopen(file2, "wb+");
|
||||||
if (!fp2)
|
if (!fp2)
|
||||||
{
|
{
|
||||||
@@ -115,7 +115,7 @@ static int copy_file(const char *file1, const char *file2)
|
|||||||
vlog("Failed to read <%s> %d %d\n", file1, n, size);
|
vlog("Failed to read <%s> %d %d\n", file1, n, size);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
n = fwrite(buf, 1, size, fp2);
|
n = fwrite(buf, 1, size, fp2);
|
||||||
if (n != size)
|
if (n != size)
|
||||||
{
|
{
|
||||||
@@ -167,7 +167,7 @@ static int vtoy_is_possible_blkdev(const char *name)
|
|||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -184,7 +184,7 @@ static ulonglong vtoy_get_disk_size_in_byte(const char *disk)
|
|||||||
if (access(diskpath, F_OK) >= 0)
|
if (access(diskpath, F_OK) >= 0)
|
||||||
{
|
{
|
||||||
vlog("get disk size from sysfs for %s\n", disk);
|
vlog("get disk size from sysfs for %s\n", disk);
|
||||||
|
|
||||||
fd = open(diskpath, O_RDONLY | O_BINARY);
|
fd = open(diskpath, O_RDONLY | O_BINARY);
|
||||||
if (fd >= 0)
|
if (fd >= 0)
|
||||||
{
|
{
|
||||||
@@ -233,7 +233,7 @@ static int get_disk_num(void)
|
|||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((p = readdir(dir)) != NULL)
|
while ((p = readdir(dir)) != NULL)
|
||||||
{
|
{
|
||||||
n++;
|
n++;
|
||||||
@@ -248,7 +248,7 @@ static int is_usb_disk(const char *diskname)
|
|||||||
int rc;
|
int rc;
|
||||||
char dstpath[1024] = { 0 };
|
char dstpath[1024] = { 0 };
|
||||||
char syspath[1024] = { 0 };
|
char syspath[1024] = { 0 };
|
||||||
|
|
||||||
snprintf(syspath, sizeof(syspath), "/sys/block/%s", diskname);
|
snprintf(syspath, sizeof(syspath), "/sys/block/%s", diskname);
|
||||||
rc = readlink(syspath, dstpath, sizeof(dstpath) - 1);
|
rc = readlink(syspath, dstpath, sizeof(dstpath) - 1);
|
||||||
if (rc > 0 && strstr(dstpath, "/usb"))
|
if (rc > 0 && strstr(dstpath, "/usb"))
|
||||||
@@ -296,13 +296,13 @@ static int get_all_disk(void)
|
|||||||
vlog("disk %s is filted by name\n", p->d_name);
|
vlog("disk %s is filted by name\n", p->d_name);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
cursize = vtoy_get_disk_size_in_byte(p->d_name);
|
cursize = vtoy_get_disk_size_in_byte(p->d_name);
|
||||||
|
|
||||||
node = g_disk_list + g_disk_num;
|
node = g_disk_list + g_disk_num;
|
||||||
g_disk_num++;
|
g_disk_num++;
|
||||||
|
|
||||||
|
|
||||||
snprintf(node->name, sizeof(node->name), p->d_name);
|
snprintf(node->name, sizeof(node->name), p->d_name);
|
||||||
node->size = cursize;
|
node->size = cursize;
|
||||||
node->isUSB = is_usb_disk(p->d_name);
|
node->isUSB = is_usb_disk(p->d_name);
|
||||||
@@ -338,7 +338,7 @@ static int get_all_disk(void)
|
|||||||
node->size / 1024 / 1024 / 1024, node->size, node->isUSB);
|
node->size / 1024 / 1024 / 1024, node->size, node->isUSB);
|
||||||
}
|
}
|
||||||
vlog("============ DISK DUMP END ===========\n");
|
vlog("============ DISK DUMP END ===========\n");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -410,7 +410,7 @@ static int expand_var(const char *var, char *value, int len)
|
|||||||
{
|
{
|
||||||
uiDst = strtoul(var + 22, NULL, 10);
|
uiDst = strtoul(var + 22, NULL, 10);
|
||||||
uiDst = uiDst * (1024ULL * 1024ULL * 1024ULL);
|
uiDst = uiDst * (1024ULL * 1024ULL * 1024ULL);
|
||||||
|
|
||||||
for (i = 0; i < g_disk_num; i++)
|
for (i = 0; i < g_disk_num; i++)
|
||||||
{
|
{
|
||||||
node = g_disk_list + i;
|
node = g_disk_list + i;
|
||||||
@@ -418,7 +418,7 @@ static int expand_var(const char *var, char *value, int len)
|
|||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (node->size > uiDst)
|
if (node->size > uiDst)
|
||||||
{
|
{
|
||||||
delta = node->size - uiDst;
|
delta = node->size - uiDst;
|
||||||
@@ -427,7 +427,52 @@ static int expand_var(const char *var, char *value, int len)
|
|||||||
{
|
{
|
||||||
delta = uiDst - node->size;
|
delta = uiDst - node->size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (delta < maxdelta)
|
||||||
|
{
|
||||||
|
index = i;
|
||||||
|
maxdelta = delta;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (index >= 0)
|
||||||
|
{
|
||||||
|
vlog("%s=<%s>\n", var, g_disk_list[index].name);
|
||||||
|
snprintf(value, len, "%s", g_disk_list[index].name);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
vlog("[Error] %s not found\n", var);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (strncmp(var, "VT_LINUX_DISK_NONVTOY_CLOSEST_", 30) == 0)
|
||||||
|
{
|
||||||
|
uiDst = strtoul(var + 30, NULL, 10);
|
||||||
|
uiDst = uiDst * (1024ULL * 1024ULL * 1024ULL);
|
||||||
|
|
||||||
|
for (i = 0; i < g_disk_num; i++)
|
||||||
|
{
|
||||||
|
node = g_disk_list + i;
|
||||||
|
if (node->size == 0)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strcmp(node->name, g_vtoy_disk_name) == 0)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (node->size > uiDst)
|
||||||
|
{
|
||||||
|
delta = node->size - uiDst;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
delta = uiDst - node->size;
|
||||||
|
}
|
||||||
|
|
||||||
if (delta < maxdelta)
|
if (delta < maxdelta)
|
||||||
{
|
{
|
||||||
index = i;
|
index = i;
|
||||||
@@ -481,10 +526,10 @@ int vtoyexpand_main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
g_vtoy_disk_name += 5;
|
g_vtoy_disk_name += 5;
|
||||||
}
|
}
|
||||||
vlog("<%s> <%s> <%s>\n", argv[1], argv[2], g_vtoy_disk_name);
|
vlog("<%s> <%s> <%s>\n", argv[1], argv[2], g_vtoy_disk_name);
|
||||||
|
|
||||||
get_all_disk();
|
get_all_disk();
|
||||||
|
|
||||||
fp = fopen(argv[1], "r");
|
fp = fopen(argv[1], "r");
|
||||||
if (!fp)
|
if (!fp)
|
||||||
{
|
{
|
||||||
@@ -502,7 +547,7 @@ int vtoyexpand_main(int argc, char **argv)
|
|||||||
|
|
||||||
memset(line, 0, sizeof(line));
|
memset(line, 0, sizeof(line));
|
||||||
memset(value, 0, sizeof(value));
|
memset(value, 0, sizeof(value));
|
||||||
|
|
||||||
while (fgets(line, sizeof(line), fp))
|
while (fgets(line, sizeof(line), fp))
|
||||||
{
|
{
|
||||||
start = strstr(line, "$$VT_");
|
start = strstr(line, "$$VT_");
|
||||||
@@ -519,7 +564,7 @@ int vtoyexpand_main(int argc, char **argv)
|
|||||||
*end = 0;
|
*end = 0;
|
||||||
expand_var(start + 2, value, sizeof(value));
|
expand_var(start + 2, value, sizeof(value));
|
||||||
fprintf(fout, "%s", value);
|
fprintf(fout, "%s", value);
|
||||||
|
|
||||||
fprintf(fout, "%s", end + 2);
|
fprintf(fout, "%s", end + 2);
|
||||||
|
|
||||||
memset(value, 0, sizeof(value));
|
memset(value, 0, sizeof(value));
|
||||||
@@ -531,7 +576,7 @@ int vtoyexpand_main(int argc, char **argv)
|
|||||||
|
|
||||||
line[0] = line[4095] = 0;
|
line[0] = line[4095] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
fclose(fout);
|
fclose(fout);
|
||||||
|
|
||||||
@@ -540,7 +585,7 @@ int vtoyexpand_main(int argc, char **argv)
|
|||||||
|
|
||||||
vlog("Copy file <%s> --> <%s>\n", TMP_FILE, argv[1]);
|
vlog("Copy file <%s> --> <%s>\n", TMP_FILE, argv[1]);
|
||||||
copy_file(TMP_FILE, argv[1]);
|
copy_file(TMP_FILE, argv[1]);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
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;
|
PROCESS_INFORMATION Pi;
|
||||||
|
|
||||||
Log("Break at line:%d", line);
|
Log("Break at line:%d", line);
|
||||||
|
|
||||||
GetStartupInfoA(&Si);
|
GetStartupInfoA(&Si);
|
||||||
Si.dwFlags |= STARTF_USESHOWWINDOW;
|
Si.dwFlags |= STARTF_USESHOWWINDOW;
|
||||||
Si.wShowWindow = SW_NORMAL;
|
Si.wShowWindow = SW_NORMAL;
|
||||||
@@ -129,7 +129,7 @@ static void TrimString(CHAR *String, BOOL TrimLeft)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (TrimLeft)
|
if (TrimLeft)
|
||||||
{
|
{
|
||||||
while (*Pos1 == ' ' || *Pos1 == '\t')
|
while (*Pos1 == ' ' || *Pos1 == '\t')
|
||||||
{
|
{
|
||||||
Pos1++;
|
Pos1++;
|
||||||
@@ -420,7 +420,7 @@ static BOOL CheckOsParam(ventoy_os_param *param)
|
|||||||
{
|
{
|
||||||
Sum += *((BYTE *)param + i);
|
Sum += *((BYTE *)param + i);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Sum)
|
if (Sum)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -472,7 +472,7 @@ static int IsUTF8Encode(const char *src)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -494,7 +494,7 @@ static int Utf8ToUtf16(const char* src, WCHAR * dst)
|
|||||||
|
|
||||||
BOOL IsDirExist(const char *Fmt, ...)
|
BOOL IsDirExist(const char *Fmt, ...)
|
||||||
{
|
{
|
||||||
va_list Arg;
|
va_list Arg;
|
||||||
DWORD Attr;
|
DWORD Attr;
|
||||||
int UTF8 = 0;
|
int UTF8 = 0;
|
||||||
CHAR FilePathA[MAX_PATH];
|
CHAR FilePathA[MAX_PATH];
|
||||||
@@ -515,7 +515,7 @@ BOOL IsDirExist(const char *Fmt, ...)
|
|||||||
{
|
{
|
||||||
Attr = GetFileAttributesA(FilePathA);
|
Attr = GetFileAttributesA(FilePathA);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Attr != INVALID_FILE_ATTRIBUTES && (Attr & FILE_ATTRIBUTE_DIRECTORY))
|
if (Attr != INVALID_FILE_ATTRIBUTES && (Attr & FILE_ATTRIBUTE_DIRECTORY))
|
||||||
{
|
{
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -564,7 +564,7 @@ BOOL IsFileExist(const char *Fmt, ...)
|
|||||||
{
|
{
|
||||||
Attr = GetFileAttributesA(FilePathA);
|
Attr = GetFileAttributesA(FilePathA);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Attr & FILE_ATTRIBUTE_DIRECTORY)
|
if (Attr & FILE_ATTRIBUTE_DIRECTORY)
|
||||||
{
|
{
|
||||||
goto out;
|
goto out;
|
||||||
@@ -613,7 +613,7 @@ static int GetPhyDiskUUID(const char LogicalDrive, UINT8 *UUID, UINT32 *DiskSig,
|
|||||||
CloseHandle(Handle);
|
CloseHandle(Handle);
|
||||||
|
|
||||||
memcpy(DiskExtent, DiskExtents.Extents, sizeof(DISK_EXTENT));
|
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));
|
(ULONGLONG)(DiskExtents.Extents[0].StartingOffset.QuadPart));
|
||||||
|
|
||||||
sprintf_s(PhyPath, sizeof(PhyPath), "\\\\.\\PhysicalDrive%d", DiskExtents.Extents[0].DiskNumber);
|
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);
|
CloseHandle(Handle);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(UUID, SectorBuf + 0x180, 16);
|
memcpy(UUID, SectorBuf + 0x180, 16);
|
||||||
if (DiskSig)
|
if (DiskSig)
|
||||||
{
|
{
|
||||||
@@ -735,7 +735,7 @@ static int VentoyAttachVirtualDisk(HANDLE Handle, const char *IsoPath)
|
|||||||
{
|
{
|
||||||
int DriveYFree;
|
int DriveYFree;
|
||||||
DWORD Drives;
|
DWORD Drives;
|
||||||
|
|
||||||
Drives = GetLogicalDrives();
|
Drives = GetLogicalDrives();
|
||||||
if ((1 << 24) & Drives)
|
if ((1 << 24) & Drives)
|
||||||
{
|
{
|
||||||
@@ -782,7 +782,7 @@ int VentoyMountISOByAPI(const char *IsoPath)
|
|||||||
|
|
||||||
memset(&StorageType, 0, sizeof(StorageType));
|
memset(&StorageType, 0, sizeof(StorageType));
|
||||||
memset(&OpenParameters, 0, sizeof(OpenParameters));
|
memset(&OpenParameters, 0, sizeof(OpenParameters));
|
||||||
|
|
||||||
OpenParameters.Version = OPEN_VIRTUAL_DISK_VERSION_1;
|
OpenParameters.Version = OPEN_VIRTUAL_DISK_VERSION_1;
|
||||||
|
|
||||||
for (i = 0; i < 10; i++)
|
for (i = 0; i < 10; i++)
|
||||||
@@ -937,7 +937,7 @@ static CHAR GetIMDiskMountLogicalDrive(const char *suffix)
|
|||||||
|
|
||||||
Drives = GetLogicalDrives();
|
Drives = GetLogicalDrives();
|
||||||
Log("Drives=0x%x", Drives);
|
Log("Drives=0x%x", Drives);
|
||||||
|
|
||||||
while (Mask)
|
while (Mask)
|
||||||
{
|
{
|
||||||
if ((Drives & Mask) == 0)
|
if ((Drives & Mask) == 0)
|
||||||
@@ -955,8 +955,8 @@ static CHAR GetIMDiskMountLogicalDrive(const char *suffix)
|
|||||||
UINT64 GetVentoyEfiPartStartSector(HANDLE hDrive)
|
UINT64 GetVentoyEfiPartStartSector(HANDLE hDrive)
|
||||||
{
|
{
|
||||||
BOOL bRet;
|
BOOL bRet;
|
||||||
DWORD dwSize;
|
DWORD dwSize;
|
||||||
MBR_HEAD MBR;
|
MBR_HEAD MBR;
|
||||||
VTOY_GPT_INFO *pGpt = NULL;
|
VTOY_GPT_INFO *pGpt = NULL;
|
||||||
UINT64 StartSector = 0;
|
UINT64 StartSector = 0;
|
||||||
|
|
||||||
@@ -981,7 +981,7 @@ UINT64 GetVentoyEfiPartStartSector(HANDLE hDrive)
|
|||||||
}
|
}
|
||||||
|
|
||||||
SetFilePointer(hDrive, 0, NULL, FILE_BEGIN);
|
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)))
|
if ((!bRet) || (dwSize != sizeof(VTOY_GPT_INFO)))
|
||||||
{
|
{
|
||||||
Log("Failed to read gpt info %d %u %d", bRet, dwSize, LASTERR);
|
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"))
|
if (IsFileExist("X:\\Windows\\System32\\imdisk.exe"))
|
||||||
{
|
{
|
||||||
Log("imdisk.exe already exist, no need to copy...");
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1065,7 +1065,7 @@ static int VentoyCopyImdisk(DWORD PhyDrive, CHAR *ImPath)
|
|||||||
strcat_s(PhyPath, sizeof(PhyPath), "\\ventoy\\imdisk.sys");
|
strcat_s(PhyPath, sizeof(PhyPath), "\\ventoy\\imdisk.sys");
|
||||||
|
|
||||||
if (LoadNtDriver(PhyPath) == 0)
|
if (LoadNtDriver(PhyPath) == 0)
|
||||||
{
|
{
|
||||||
strcpy_s(ImPath, MAX_PATH, "ventoy\\imdisk.exe");
|
strcpy_s(ImPath, MAX_PATH, "ventoy\\imdisk.exe");
|
||||||
rc = 0;
|
rc = 0;
|
||||||
}
|
}
|
||||||
@@ -1090,7 +1090,7 @@ static int VentoyRunImdisk(const char *suffix, const char *IsoPath, const char *
|
|||||||
|
|
||||||
Letter = GetIMDiskMountLogicalDrive(suffix);
|
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);
|
Log("mount iso to %C: use imdisk cmd <%s>", Letter, Cmdline);
|
||||||
|
|
||||||
if (IsUTF8Encode(IsoPath))
|
if (IsUTF8Encode(IsoPath))
|
||||||
@@ -1156,7 +1156,7 @@ static int GetIsoId(CONST CHAR *IsoPath, IsoId *ids)
|
|||||||
|
|
||||||
SetFilePointer(hFile, 2048 * 16 + 8, NULL, FILE_BEGIN);
|
SetFilePointer(hFile, 2048 * 16 + 8, NULL, FILE_BEGIN);
|
||||||
bRet[n++] = ReadFile(hFile, ids->SystemId, 32, &dwSize, NULL);
|
bRet[n++] = ReadFile(hFile, ids->SystemId, 32, &dwSize, NULL);
|
||||||
|
|
||||||
SetFilePointer(hFile, 2048 * 16 + 40, NULL, FILE_BEGIN);
|
SetFilePointer(hFile, 2048 * 16 + 40, NULL, FILE_BEGIN);
|
||||||
bRet[n++] = ReadFile(hFile, ids->VolumeId, 32, &dwSize, NULL);
|
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->PulisherId, FALSE);
|
||||||
TrimString(ids->PreparerId, 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);
|
ids->SystemId, ids->VolumeId, ids->PulisherId, ids->PreparerId);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1546,7 +1546,7 @@ static int UnattendNeedVarExpand(const char *script)
|
|||||||
}
|
}
|
||||||
|
|
||||||
szLine[0] = szLine[4095] = 0;
|
szLine[0] = szLine[4095] = 0;
|
||||||
|
|
||||||
while (fgets(szLine, sizeof(szLine) - 1, fp))
|
while (fgets(szLine, sizeof(szLine) - 1, fp))
|
||||||
{
|
{
|
||||||
if (strstr(szLine, "$$VT_"))
|
if (strstr(szLine, "$$VT_"))
|
||||||
@@ -1554,10 +1554,10 @@ static int UnattendNeedVarExpand(const char *script)
|
|||||||
fclose(fp);
|
fclose(fp);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
szLine[0] = szLine[4095] = 0;
|
szLine[0] = szLine[4095] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1572,7 +1572,7 @@ static int ExpandSingleVar(VarDiskInfo *pDiskInfo, int DiskNum, const char *var,
|
|||||||
UINT64 uiMaxDelta = ULLONG_MAX;
|
UINT64 uiMaxDelta = ULLONG_MAX;
|
||||||
|
|
||||||
value[0] = 0;
|
value[0] = 0;
|
||||||
|
|
||||||
if (strcmp(var, "VT_WINDOWS_DISK_1ST_NONVTOY") == 0)
|
if (strcmp(var, "VT_WINDOWS_DISK_1ST_NONVTOY") == 0)
|
||||||
{
|
{
|
||||||
for (i = 0; i < DiskNum; i++)
|
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 = strtoul(var + 24, NULL, 10);
|
||||||
uiDst = uiDst * (1024ULL * 1024ULL * 1024ULL);
|
uiDst = uiDst * (1024ULL * 1024ULL * 1024ULL);
|
||||||
|
|
||||||
for (i = 0; i < DiskNum; i++)
|
for (i = 0; i < DiskNum; i++)
|
||||||
{
|
{
|
||||||
if (pDiskInfo[i].Capacity == 0)
|
if (pDiskInfo[i].Capacity == 0)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pDiskInfo[i].Capacity > uiDst)
|
if (pDiskInfo[i].Capacity > uiDst)
|
||||||
{
|
{
|
||||||
uiDelta = pDiskInfo[i].Capacity - uiDst;
|
uiDelta = pDiskInfo[i].Capacity - uiDst;
|
||||||
@@ -1631,7 +1631,38 @@ static int ExpandSingleVar(VarDiskInfo *pDiskInfo, int DiskNum, const char *var,
|
|||||||
{
|
{
|
||||||
uiDelta = uiDst - pDiskInfo[i].Capacity;
|
uiDelta = uiDst - pDiskInfo[i].Capacity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (uiDelta < uiMaxDelta)
|
||||||
|
{
|
||||||
|
uiMaxDelta = uiDelta;
|
||||||
|
index = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Log("%s=<PhyDrive%d>", var, index);
|
||||||
|
sprintf_s(value, len, "%d", index);
|
||||||
|
}
|
||||||
|
else if (strncmp(var, "VT_WINDOWS_DISK_NONVTOY_CLOSEST_", 32) == 0)
|
||||||
|
{
|
||||||
|
uiDst = strtoul(var + 32, NULL, 10);
|
||||||
|
uiDst = uiDst * (1024ULL * 1024ULL * 1024ULL);
|
||||||
|
|
||||||
|
for (i = 0; i < DiskNum; i++)
|
||||||
|
{
|
||||||
|
if (pDiskInfo[i].Capacity == 0 || i == g_vtoy_disk_drive)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pDiskInfo[i].Capacity > uiDst)
|
||||||
|
{
|
||||||
|
uiDelta = pDiskInfo[i].Capacity - uiDst;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
uiDelta = uiDst - pDiskInfo[i].Capacity;
|
||||||
|
}
|
||||||
|
|
||||||
if (uiDelta < uiMaxDelta)
|
if (uiDelta < uiMaxDelta)
|
||||||
{
|
{
|
||||||
uiMaxDelta = uiDelta;
|
uiMaxDelta = uiDelta;
|
||||||
@@ -1647,7 +1678,7 @@ static int ExpandSingleVar(VarDiskInfo *pDiskInfo, int DiskNum, const char *var,
|
|||||||
Log("Invalid var name <%s>", var);
|
Log("Invalid var name <%s>", var);
|
||||||
sprintf_s(value, len, "$$%s$$", var);
|
sprintf_s(value, len, "$$%s$$", var);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value[0] == 0)
|
if (value[0] == 0)
|
||||||
{
|
{
|
||||||
sprintf_s(value, len, "$$%s$$", var);
|
sprintf_s(value, len, "$$%s$$", var);
|
||||||
@@ -1753,12 +1784,12 @@ static int EnumerateAllDisk(VarDiskInfo **ppDiskInfo, int *pDiskNum)
|
|||||||
DWORD dwBytes;
|
DWORD dwBytes;
|
||||||
VarDiskInfo *pDiskInfo = NULL;
|
VarDiskInfo *pDiskInfo = NULL;
|
||||||
HANDLE Handle = INVALID_HANDLE_VALUE;
|
HANDLE Handle = INVALID_HANDLE_VALUE;
|
||||||
CHAR PhyDrive[128];
|
CHAR PhyDrive[128];
|
||||||
GET_LENGTH_INFORMATION LengthInfo;
|
GET_LENGTH_INFORMATION LengthInfo;
|
||||||
STORAGE_PROPERTY_QUERY Query;
|
STORAGE_PROPERTY_QUERY Query;
|
||||||
STORAGE_DESCRIPTOR_HEADER DevDescHeader;
|
STORAGE_DESCRIPTOR_HEADER DevDescHeader;
|
||||||
STORAGE_DEVICE_DESCRIPTOR *pDevDesc;
|
STORAGE_DEVICE_DESCRIPTOR *pDevDesc;
|
||||||
|
|
||||||
if (GetRegDwordValue(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Services\\disk\\Enum", "Count", &Value) == 0)
|
if (GetRegDwordValue(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Services\\disk\\Enum", "Count", &Value) == 0)
|
||||||
{
|
{
|
||||||
DiskNum = (int)Value;
|
DiskNum = (int)Value;
|
||||||
@@ -1788,7 +1819,7 @@ static int EnumerateAllDisk(VarDiskInfo **ppDiskInfo, int *pDiskNum)
|
|||||||
SAFE_CLOSE_HANDLE(Handle);
|
SAFE_CLOSE_HANDLE(Handle);
|
||||||
|
|
||||||
safe_sprintf(PhyDrive, "\\\\.\\PhysicalDrive%d", i);
|
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);
|
Log("Create file Handle:%p %s status:%u", Handle, PhyDrive, LASTERR);
|
||||||
|
|
||||||
if (Handle == INVALID_HANDLE_VALUE)
|
if (Handle == INVALID_HANDLE_VALUE)
|
||||||
@@ -1923,7 +1954,7 @@ static int UnattendVarExpand(const char *script, const char *tmpfile)
|
|||||||
Log("Failed to EnumerateAllDisk");
|
Log("Failed to EnumerateAllDisk");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
fopen_s(&fp, script, "r");
|
fopen_s(&fp, script, "r");
|
||||||
if (!fp)
|
if (!fp)
|
||||||
{
|
{
|
||||||
@@ -1940,7 +1971,7 @@ static int UnattendVarExpand(const char *script, const char *tmpfile)
|
|||||||
}
|
}
|
||||||
|
|
||||||
szLine[0] = szLine[4095] = 0;
|
szLine[0] = szLine[4095] = 0;
|
||||||
|
|
||||||
while (fgets(szLine, sizeof(szLine) - 1, fp))
|
while (fgets(szLine, sizeof(szLine) - 1, fp))
|
||||||
{
|
{
|
||||||
start = strstr(szLine, "$$VT_");
|
start = strstr(szLine, "$$VT_");
|
||||||
@@ -1957,14 +1988,14 @@ static int UnattendVarExpand(const char *script, const char *tmpfile)
|
|||||||
*end = 0;
|
*end = 0;
|
||||||
ExpandSingleVar(pDiskInfo, DiskNum, start + 2, szValue, sizeof(szValue) - 1);
|
ExpandSingleVar(pDiskInfo, DiskNum, start + 2, szValue, sizeof(szValue) - 1);
|
||||||
fprintf(fout, "%s", szValue);
|
fprintf(fout, "%s", szValue);
|
||||||
|
|
||||||
fprintf(fout, "%s", end + 2);
|
fprintf(fout, "%s", end + 2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf(fout, "%s", szLine);
|
fprintf(fout, "%s", szLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
szLine[0] = szLine[4095] = 0;
|
szLine[0] = szLine[4095] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2002,7 +2033,7 @@ static int ProcessUnattendedInstallation(const char *script, DWORD PhyDrive)
|
|||||||
CHAR ImPath[MAX_PATH];
|
CHAR ImPath[MAX_PATH];
|
||||||
|
|
||||||
Log("Copy unattended XML ...");
|
Log("Copy unattended XML ...");
|
||||||
|
|
||||||
GetCurrentDirectory(sizeof(CurDir), CurDir);
|
GetCurrentDirectory(sizeof(CurDir), CurDir);
|
||||||
Letter = CurDir[0];
|
Letter = CurDir[0];
|
||||||
if ((Letter >= 'A' && Letter <= 'Z') || (Letter >= 'a' && Letter <= 'z'))
|
if ((Letter >= 'A' && Letter <= 'Z') || (Letter >= 'a' && Letter <= 'z'))
|
||||||
@@ -2024,7 +2055,7 @@ static int ProcessUnattendedInstallation(const char *script, DWORD PhyDrive)
|
|||||||
{
|
{
|
||||||
sprintf_s(TmpFile, sizeof(TmpFile), "%C:\\__Autounattend", Letter);
|
sprintf_s(TmpFile, sizeof(TmpFile), "%C:\\__Autounattend", Letter);
|
||||||
UnattendVarExpand(script, TmpFile);
|
UnattendVarExpand(script, TmpFile);
|
||||||
|
|
||||||
Log("Expand Copy file <%s> --> <%s>", script, CurDir);
|
Log("Expand Copy file <%s> --> <%s>", script, CurDir);
|
||||||
CopyFileA(TmpFile, CurDir, FALSE);
|
CopyFileA(TmpFile, CurDir, FALSE);
|
||||||
}
|
}
|
||||||
@@ -2144,7 +2175,7 @@ End:
|
|||||||
|
|
||||||
static BOOL VentoyIsNeedBypass(const char *isofile, const char MntLetter)
|
static BOOL VentoyIsNeedBypass(const char *isofile, const char MntLetter)
|
||||||
{
|
{
|
||||||
UINT16 Major;
|
UINT16 Major;
|
||||||
BOOL bRet = FALSE;
|
BOOL bRet = FALSE;
|
||||||
CHAR CheckFile[MAX_PATH];
|
CHAR CheckFile[MAX_PATH];
|
||||||
|
|
||||||
@@ -2200,7 +2231,7 @@ End:
|
|||||||
|
|
||||||
static int Windows11Bypass(const char *isofile, const char MntLetter, UINT8 Check, UINT8 NRO)
|
static int Windows11Bypass(const char *isofile, const char MntLetter, UINT8 Check, UINT8 NRO)
|
||||||
{
|
{
|
||||||
int Ret = 1;
|
int Ret = 1;
|
||||||
HKEY hKey = NULL;
|
HKEY hKey = NULL;
|
||||||
HKEY hSubKey = NULL;
|
HKEY hSubKey = NULL;
|
||||||
LSTATUS Status;
|
LSTATUS Status;
|
||||||
@@ -2215,7 +2246,7 @@ static int Windows11Bypass(const char *isofile, const char MntLetter, UINT8 Chec
|
|||||||
}
|
}
|
||||||
|
|
||||||
//bugfix: change VTOYEFI partition attribute
|
//bugfix: change VTOYEFI partition attribute
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Now we really need to bypass windows 11 check. create registry
|
//Now we really need to bypass windows 11 check. create registry
|
||||||
@@ -2267,13 +2298,13 @@ static int Windows11Bypass(const char *isofile, const char MntLetter, UINT8 Chec
|
|||||||
|
|
||||||
SetupMonNroStart(isofile);
|
SetupMonNroStart(isofile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Ret = 0;
|
Ret = 0;
|
||||||
|
|
||||||
End:
|
End:
|
||||||
|
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL CheckVentoyDisk(DWORD DiskNum)
|
static BOOL CheckVentoyDisk(DWORD DiskNum)
|
||||||
@@ -2362,7 +2393,7 @@ static BOOL VentoyIsLenovoRecovery(CHAR *IsoPath, CHAR *VTLRIPath)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2370,9 +2401,9 @@ static int MountVTLRI(CHAR *ImgPath, DWORD PhyDrive)
|
|||||||
{
|
{
|
||||||
STARTUPINFOA Si;
|
STARTUPINFOA Si;
|
||||||
PROCESS_INFORMATION Pi;
|
PROCESS_INFORMATION Pi;
|
||||||
CHAR Cmdline[256];
|
CHAR Cmdline[256];
|
||||||
CHAR ImDiskPath[256];
|
CHAR ImDiskPath[256];
|
||||||
|
|
||||||
Log("MountVTLRI <%s> %u", ImgPath, PhyDrive);
|
Log("MountVTLRI <%s> %u", ImgPath, PhyDrive);
|
||||||
|
|
||||||
VentoyCopyImdisk(PhyDrive, ImDiskPath);
|
VentoyCopyImdisk(PhyDrive, ImDiskPath);
|
||||||
@@ -2514,7 +2545,7 @@ static int VentoyHook(ventoy_os_param *param)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Log("Find ISO file <%s>", IsoPath);
|
Log("Find ISO file <%s>", IsoPath);
|
||||||
|
|
||||||
//Find VtoyLetter in Vlnk Mode
|
//Find VtoyLetter in Vlnk Mode
|
||||||
if (g_os_param_reserved[6] == 1)
|
if (g_os_param_reserved[6] == 1)
|
||||||
{
|
{
|
||||||
@@ -2532,7 +2563,7 @@ static int VentoyHook(ventoy_os_param *param)
|
|||||||
memset(UUID, 0, sizeof(UUID));
|
memset(UUID, 0, sizeof(UUID));
|
||||||
memset(&VtoyDiskExtent, 0, sizeof(VtoyDiskExtent));
|
memset(&VtoyDiskExtent, 0, sizeof(VtoyDiskExtent));
|
||||||
DiskSig = 0;
|
DiskSig = 0;
|
||||||
|
|
||||||
if (GetPhyDiskUUID(VtoyLetter, UUID, &DiskSig, &VtoyDiskExtent) == 0)
|
if (GetPhyDiskUUID(VtoyLetter, UUID, &DiskSig, &VtoyDiskExtent) == 0)
|
||||||
{
|
{
|
||||||
Log("[%d] DiskSig=%08X PartStart=%lld", i, DiskSig, VtoyDiskExtent.StartingOffset.QuadPart);
|
Log("[%d] DiskSig=%08X PartStart=%lld", i, DiskSig, VtoyDiskExtent.StartingOffset.QuadPart);
|
||||||
@@ -2564,7 +2595,7 @@ static int VentoyHook(ventoy_os_param *param)
|
|||||||
if (vtoyfind == FALSE) // vlnk mode Ventoy partition has no letter
|
if (vtoyfind == FALSE) // vlnk mode Ventoy partition has no letter
|
||||||
{
|
{
|
||||||
Log("Warning: Ventoy partition has no drive letter, assume C: and find by sig");
|
Log("Warning: Ventoy partition has no drive letter, assume C: and find by sig");
|
||||||
VtoyLetter = 'C';
|
VtoyLetter = 'C';
|
||||||
vtoyfind = FindVentoyDiskBySig(VtoySig, &VtoyDiskExtent.DiskNumber);
|
vtoyfind = FindVentoyDiskBySig(VtoySig, &VtoyDiskExtent.DiskNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2598,7 +2629,7 @@ static int VentoyHook(ventoy_os_param *param)
|
|||||||
|
|
||||||
Drives = GetLogicalDrives();
|
Drives = GetLogicalDrives();
|
||||||
Log("Drives before mount: 0x%x", Drives);
|
Log("Drives before mount: 0x%x", Drives);
|
||||||
|
|
||||||
if (VentoyIsLenovoRecovery(IsoPath, VTLRIPath))
|
if (VentoyIsLenovoRecovery(IsoPath, VTLRIPath))
|
||||||
{
|
{
|
||||||
Log("This is lenovo recovery image, mount VTLRI file.");
|
Log("This is lenovo recovery image, mount VTLRI file.");
|
||||||
@@ -2645,7 +2676,7 @@ static int VentoyHook(ventoy_os_param *param)
|
|||||||
// for protect
|
// for protect
|
||||||
rc = DeleteVentoyPart2MountPoint(VtoyDiskNum);
|
rc = DeleteVentoyPart2MountPoint(VtoyDiskNum);
|
||||||
Log("Delete ventoy mountpoint: %s", rc == 0 ? "SUCCESS" : "NO NEED");
|
Log("Delete ventoy mountpoint: %s", rc == 0 ? "SUCCESS" : "NO NEED");
|
||||||
|
|
||||||
if (g_windows_data.auto_install_script[0])
|
if (g_windows_data.auto_install_script[0])
|
||||||
{
|
{
|
||||||
if (IsFileExist("%s", VTOY_AUTO_FILE))
|
if (IsFileExist("%s", VTOY_AUTO_FILE))
|
||||||
@@ -2740,7 +2771,7 @@ static int ExtractWindowsDataFile(char *databuf)
|
|||||||
filedata += pdata->auto_install_len;
|
filedata += pdata->auto_install_len;
|
||||||
len = pdata->auto_install_len;
|
len = pdata->auto_install_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2772,7 +2803,7 @@ int VentoyJump(INT argc, CHAR **argv, CHAR *LunchFile)
|
|||||||
DWORD PeStart;
|
DWORD PeStart;
|
||||||
DWORD FileSize;
|
DWORD FileSize;
|
||||||
DWORD LockStatus = 0;
|
DWORD LockStatus = 0;
|
||||||
BYTE *Buffer = NULL;
|
BYTE *Buffer = NULL;
|
||||||
CHAR ExeFileName[MAX_PATH];
|
CHAR ExeFileName[MAX_PATH];
|
||||||
|
|
||||||
sprintf_s(ExeFileName, sizeof(ExeFileName), "%s", argv[0]);
|
sprintf_s(ExeFileName, sizeof(ExeFileName), "%s", argv[0]);
|
||||||
@@ -2788,7 +2819,7 @@ int VentoyJump(INT argc, CHAR **argv, CHAR *LunchFile)
|
|||||||
{
|
{
|
||||||
goto End;
|
goto End;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log("VentoyJump %dbit", g_system_bit);
|
Log("VentoyJump %dbit", g_system_bit);
|
||||||
|
|
||||||
MUTEX_LOCK(g_vtoyins_mutex);
|
MUTEX_LOCK(g_vtoyins_mutex);
|
||||||
@@ -2802,13 +2833,13 @@ int VentoyJump(INT argc, CHAR **argv, CHAR *LunchFile)
|
|||||||
|
|
||||||
for (PeStart = 0; PeStart < FileSize; PeStart += 16)
|
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)))
|
CheckPeHead(Buffer, FileSize, PeStart + sizeof(ventoy_os_param)))
|
||||||
{
|
{
|
||||||
Log("Find os pararm at %u", PeStart);
|
Log("Find os pararm at %u", PeStart);
|
||||||
|
|
||||||
memcpy(&g_os_param, Buffer + PeStart, sizeof(ventoy_os_param));
|
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));
|
exlen = ExtractWindowsDataFile(Buffer + PeStart + sizeof(ventoy_os_param));
|
||||||
memcpy(g_os_param_reserved, g_os_param.vtoy_reserved, sizeof(g_os_param_reserved));
|
memcpy(g_os_param_reserved, g_os_param.vtoy_reserved, sizeof(g_os_param_reserved));
|
||||||
|
|
||||||
@@ -2818,7 +2849,7 @@ int VentoyJump(INT argc, CHAR **argv, CHAR *LunchFile)
|
|||||||
goto End;
|
goto End;
|
||||||
}
|
}
|
||||||
|
|
||||||
// convert / to \\
|
// convert '/'
|
||||||
for (Pos = 0; Pos < sizeof(g_os_param.vtoy_img_path) && g_os_param.vtoy_img_path[Pos]; Pos++)
|
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] == '/')
|
if (g_os_param.vtoy_img_path[Pos] == '/')
|
||||||
@@ -2871,6 +2902,26 @@ End:
|
|||||||
return rc;
|
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)
|
int real_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
@@ -2905,7 +2956,7 @@ int real_main(int argc, char **argv)
|
|||||||
|
|
||||||
Log("LunchFile=<%s> CallParam=<%s>", LunchFile, CallParam);
|
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);
|
sprintf_s(NewFile, sizeof(NewFile), "%s\\VTOYJUMP.EXE", g_prog_dir);
|
||||||
MoveFileA(g_prog_full_path, NewFile);
|
MoveFileA(g_prog_full_path, NewFile);
|
||||||
@@ -3074,7 +3125,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
GetCurrentDirectoryA(sizeof(CurDir), CurDir);
|
GetCurrentDirectoryA(sizeof(CurDir), CurDir);
|
||||||
Log("Current directory is <%s>", CurDir);
|
Log("Current directory is <%s>", CurDir);
|
||||||
|
|
||||||
GetModuleFileNameA(NULL, g_prog_full_path, MAX_PATH);
|
GetModuleFileNameA(NULL, g_prog_full_path, MAX_PATH);
|
||||||
split_path_name(g_prog_full_path, g_prog_dir, g_prog_name);
|
split_path_name(g_prog_full_path, g_prog_dir, g_prog_name);
|
||||||
|
|
||||||
@@ -3099,7 +3150,7 @@ int main(int argc, char **argv)
|
|||||||
if (_stricmp(g_prog_name, "WinLogon.exe") == 0)
|
if (_stricmp(g_prog_name, "WinLogon.exe") == 0)
|
||||||
{
|
{
|
||||||
Log("This time is rejump back ...");
|
Log("This time is rejump back ...");
|
||||||
|
|
||||||
strcpy_s(g_prog_full_path, sizeof(g_prog_full_path), argv[1]);
|
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);
|
split_path_name(g_prog_full_path, g_prog_dir, g_prog_name);
|
||||||
|
|
||||||
@@ -3109,7 +3160,7 @@ int main(int argc, char **argv)
|
|||||||
{
|
{
|
||||||
strcpy_s(NewArgv0, sizeof(NewArgv0), g_prog_dir);
|
strcpy_s(NewArgv0, sizeof(NewArgv0), g_prog_dir);
|
||||||
VentoyToUpper(NewArgv0);
|
VentoyToUpper(NewArgv0);
|
||||||
|
|
||||||
if (NULL == strstr(NewArgv0, "SYSTEM32") && IsFileExist(ORG_PECMD_BK_PATH))
|
if (NULL == strstr(NewArgv0, "SYSTEM32") && IsFileExist(ORG_PECMD_BK_PATH))
|
||||||
{
|
{
|
||||||
Log("Just call original pecmd.exe");
|
Log("Just call original pecmd.exe");
|
||||||
@@ -3124,7 +3175,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
sprintf_s(CallParam, sizeof(CallParam), "ventoy\\WinLogon.exe %s", g_prog_full_path);
|
sprintf_s(CallParam, sizeof(CallParam), "ventoy\\WinLogon.exe %s", g_prog_full_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 1; i < argc; i++)
|
for (i = 1; i < argc; i++)
|
||||||
{
|
{
|
||||||
strcat_s(CallParam, sizeof(CallParam), " ");
|
strcat_s(CallParam, sizeof(CallParam), " ");
|
||||||
|
|||||||
Reference in New Issue
Block a user