mirror of
https://github.com/ventoy/Ventoy.git
synced 2026-06-29 14:38:12 +00:00
Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f66a309e4 | ||
|
|
aa75cdac7d | ||
|
|
ccf4f7234a | ||
|
|
c1cad99584 | ||
|
|
d9cab1cb33 | ||
|
|
18f4c8afcc | ||
|
|
aeb46cd3c8 | ||
|
|
475de1dada | ||
|
|
31648a0d4b | ||
|
|
d51e76daa9 | ||
|
|
f677d72e8d | ||
|
|
6418c2a09f | ||
|
|
c2a3f181c0 | ||
|
|
90e4f9db63 | ||
|
|
255e84dbab | ||
|
|
213ce02985 | ||
|
|
8c2a3b44da | ||
|
|
536545cd39 | ||
|
|
0f59e92a01 | ||
|
|
4b1e5ce89c | ||
|
|
1ed7bc9596 | ||
|
|
71ac855b36 | ||
|
|
4302854b8d | ||
|
|
036f7234ad | ||
|
|
26a394ce84 | ||
|
|
25369d5884 | ||
|
|
12387fff81 | ||
|
|
b54a7fe93b |
190
BLOB_List.md
190
BLOB_List.md
@@ -46,132 +46,132 @@
|
|||||||
<tr> <td>./IMG/cpio_x86/ventoy/tool/zstdcat</td> <td>build</td> <td>Same with ./ZSTD/zstdcat<br/>Check the file hash to confirm</td> </tr>
|
<tr> <td>./IMG/cpio_x86/ventoy/tool/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>
|
||||||
|
|||||||
113
EDK2/build_shim.sh
Normal file
113
EDK2/build_shim.sh
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
EDKARCH=X64
|
||||||
|
postfix=x64
|
||||||
|
elif [ "$1" = "ia32" ]; then
|
||||||
|
EDKARCH=IA32
|
||||||
|
postfix=ia32
|
||||||
|
shift
|
||||||
|
elif [ "$1" = "aa64" ]; then
|
||||||
|
EDKARCH=AARCH64
|
||||||
|
postfix=aa64
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd edk2-edk2-stable201911
|
||||||
|
|
||||||
|
rm -rf ./Conf/.cache
|
||||||
|
rm -f ./Conf/.AutoGenIdFile.txt
|
||||||
|
|
||||||
|
VTEFI_PATH=Build/MdeModule/RELEASE_GCC48/$EDKARCH/MdeModulePkg/Application/VtoyShim/VtoyShim/OUTPUT/VtoyShim.efi
|
||||||
|
DST_PATH=../../INSTALL/EFI/BOOT/fb${postfix}.efi
|
||||||
|
|
||||||
|
|
||||||
|
rm -f $VTEFI_PATH
|
||||||
|
rm -f $DST_PATH
|
||||||
|
|
||||||
|
unset WORKSPACE
|
||||||
|
source ./edksetup.sh
|
||||||
|
|
||||||
|
if [ "$EDKARCH" = "AARCH64" ]; then
|
||||||
|
PATH=$PATH:/opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin \
|
||||||
|
GCC48_AARCH64_PREFIX=aarch64-linux-gnu- \
|
||||||
|
build -p MdeModulePkg/MdeModulePkg.dsc -a $EDKARCH -b RELEASE -t GCC48 -m MdeModulePkg/Application/VtoyShim/VtoyShim.inf
|
||||||
|
else
|
||||||
|
build -p MdeModulePkg/MdeModulePkg.dsc -a $EDKARCH -b RELEASE -t GCC48 -m MdeModulePkg/Application/VtoyShim/VtoyShim.inf
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -e $VTEFI_PATH ]; then
|
||||||
|
|
||||||
|
objdump -h "$VTEFI_PATH"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
objcopy \
|
||||||
|
--add-section .sbat="MdeModulePkg/Application/VtoyShim/sbat.csv" \
|
||||||
|
--set-section-flags .sbat=alloc,load,readonly,data \
|
||||||
|
"$VTEFI_PATH" "$DST_PATH"
|
||||||
|
|
||||||
|
#find the right sbat section VMA
|
||||||
|
tmpfile=$(mktemp)
|
||||||
|
|
||||||
|
cnt1=$(objdump -h "$DST_PATH" | grep -P '^\s*[0-9][0-9]* \.' | wc -l)
|
||||||
|
cnt2=$(objdump -h "$DST_PATH" | grep -P 'ALLOC' | wc -l)
|
||||||
|
|
||||||
|
if [ $cnt1 -ne $cnt2 ]; then
|
||||||
|
echo "Section count mismatch $cnt1 $cnt2"
|
||||||
|
objdump -h "$DST_PATH"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
objdump -h "$DST_PATH" | grep -P '^\s*[0-9][0-9]* \.' > $tmpfile
|
||||||
|
sbat_size=$(stat -c '%s' MdeModulePkg/Application/VtoyShim/sbat.csv)
|
||||||
|
sbat_size_hex=$(printf '0x%08x' $sbat_size)
|
||||||
|
|
||||||
|
lmax='0000000000000000'
|
||||||
|
lsize='0000000000000000'
|
||||||
|
while read line; do
|
||||||
|
echo $line
|
||||||
|
lbase=$(echo $line | awk '{print $4}')
|
||||||
|
if expr "$lmax" \< "$lbase" > /dev/null; then
|
||||||
|
lmax=$lbase
|
||||||
|
lsize=$(echo $line | awk '{print $3}')
|
||||||
|
fi
|
||||||
|
echo "max=$lmax size=$lsize"
|
||||||
|
done < $tmpfile
|
||||||
|
rm -f $tmpfile
|
||||||
|
|
||||||
|
|
||||||
|
lvma=$((0x${lsize}+0x${lmax}))
|
||||||
|
lvma_align=`printf '0x%08x' $(( (lvma + 4095) / 4096 * 4096 ))`
|
||||||
|
echo "sbat section lvma_align=$lvma_align"
|
||||||
|
|
||||||
|
objcopy --adjust-section-vma .sbat=$lvma_align "$DST_PATH"
|
||||||
|
|
||||||
|
img_base=$(objdump -p "$DST_PATH" | grep ImageBase | awk '{print $2}')
|
||||||
|
size_img=0x$(objdump -p "$DST_PATH" | grep SizeOfImage | awk '{print $2}')
|
||||||
|
sbat_end=`printf '0x%08x' $(($lvma_align+$sbat_size_hex))`
|
||||||
|
|
||||||
|
if [ "$img_base" != "0000000000000000" ]; then
|
||||||
|
echo "#### ImageBase is not 0 $img_base"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "size_img=$size_img sbat_size=$sbat_size_hex sbat_range $lvma_align - $sbat_end"
|
||||||
|
|
||||||
|
if expr "$size_img" \< "$sbat_end" > /dev/null; then
|
||||||
|
echo "SizeOfImage $size_img less than sbat section addr $sbat_end"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "SizeOfImage $size_img >= $sbat_end is OK"
|
||||||
|
fi
|
||||||
|
|
||||||
|
objdump -h "$DST_PATH"
|
||||||
|
|
||||||
|
echo -e '\n\n====================== SUCCESS ========================\n\n'
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
else
|
||||||
|
echo -e '\n\n====================== FAILED ========================\n\n'
|
||||||
|
cd ..
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
@@ -19,3 +19,7 @@ sh ./build.sh aa64 || exit 1
|
|||||||
echo '======== build EDK2 for x86_64-efi ==============='
|
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
|
||||||
|
|
||||||
|
|||||||
@@ -1231,6 +1231,65 @@ EFI_STATUS EFIAPI ventoy_boot(IN EFI_HANDLE ImageHandle)
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined (MDE_CPU_X64)
|
||||||
|
|
||||||
|
STATIC BOOLEAN EFIAPI IsSecureBootEnabled(VOID)
|
||||||
|
{
|
||||||
|
UINT8 SecureBoot = 0;
|
||||||
|
UINTN DataSize;
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
DataSize = sizeof(SecureBoot);
|
||||||
|
Status = gST->RuntimeServices->GetVariable(L"SecureBoot", &gEfiGlobalVariableGuid, NULL,
|
||||||
|
&DataSize, &SecureBoot);
|
||||||
|
if (EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return SecureBoot ? TRUE : FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
STATIC BOOLEAN EFIAPI IsSetupMode(VOID)
|
||||||
|
{
|
||||||
|
UINT8 SetupMode = 0;
|
||||||
|
UINTN DataSize;
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
DataSize = sizeof(SetupMode);
|
||||||
|
Status = gST->RuntimeServices->GetVariable(L"SetupMode", &gEfiGlobalVariableGuid, NULL,
|
||||||
|
&DataSize, &SetupMode);
|
||||||
|
if (EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return SetupMode ? TRUE : FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
STATIC BOOLEAN EFIAPI CheckVtoyShim(VOID)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
EFI_GUID Guid = VTOY_SHIM_POLICY_GUID;
|
||||||
|
VOID *Prot = NULL;
|
||||||
|
|
||||||
|
/* If secure boot is not enabled or in SetupMode, nothing needed */
|
||||||
|
if (!IsSecureBootEnabled() || IsSetupMode())
|
||||||
|
{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = gBS->LocateProtocol(&Guid, NULL, (VOID**)&Prot);
|
||||||
|
if (EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
VtoyDebug("Failed to locate Vtoy Shim Protocol %lx\r\n", Status);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
EFI_STATUS EFIAPI VentoyEfiMain
|
EFI_STATUS EFIAPI VentoyEfiMain
|
||||||
(
|
(
|
||||||
IN EFI_HANDLE ImageHandle,
|
IN EFI_HANDLE ImageHandle,
|
||||||
@@ -1240,6 +1299,15 @@ 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));
|
||||||
|
|||||||
@@ -23,6 +23,8 @@
|
|||||||
|
|
||||||
#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
|
||||||
|
|||||||
@@ -25,6 +25,10 @@
|
|||||||
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
|
||||||
Ventoy.c
|
Ventoy.c
|
||||||
|
|||||||
@@ -0,0 +1,800 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* VtoyShim.c
|
||||||
|
*
|
||||||
|
* Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <Uefi.h>
|
||||||
|
|
||||||
|
#include <Library/DebugLib.h>
|
||||||
|
#include <Library/PrintLib.h>
|
||||||
|
#include <Library/UefiLib.h>
|
||||||
|
#include <Library/BaseMemoryLib.h>
|
||||||
|
#include <Library/DevicePathLib.h>
|
||||||
|
#include <Library/MemoryAllocationLib.h>
|
||||||
|
#include <Library/UefiBootServicesTableLib.h>
|
||||||
|
#include <Library/UefiRuntimeServicesTableLib.h>
|
||||||
|
#include <Library/UefiApplicationEntryPoint.h>
|
||||||
|
#include <Library/PeCoffLib.h>
|
||||||
|
#include <Protocol/LoadedImage.h>
|
||||||
|
#include <Guid/FileInfo.h>
|
||||||
|
#include <Guid/FileSystemInfo.h>
|
||||||
|
#include <Protocol/BlockIo.h>
|
||||||
|
#include <Protocol/RamDisk.h>
|
||||||
|
#include <Protocol/SimpleFileSystem.h>
|
||||||
|
#include <Protocol/DevicePathToText.h>
|
||||||
|
#include <Protocol/DevicePathFromText.h>
|
||||||
|
#include <Protocol/LoadedImage.h>
|
||||||
|
#include <Protocol/Security.h>
|
||||||
|
#include <Protocol/Security2.h>
|
||||||
|
#include <IndustryStandard/PeImage.h>
|
||||||
|
#include <VtoyShim.h>
|
||||||
|
|
||||||
|
#define CUR_SBAT_VER 1
|
||||||
|
|
||||||
|
STATIC EFI_GUID gVtoySbatGUID = { 0xf755068a, 0xe04f, 0x452b, { 0x9d, 0x6d, 0x7c, 0x55, 0x96, 0xb3, 0xc0, 0x7d }};
|
||||||
|
STATIC EFI_GUID gShimLockGUID = SHIM_LOCK_GUID;
|
||||||
|
STATIC EFI_SECURITY_FILE_AUTHENTICATION_STATE gSysSecFileAuth = NULL;
|
||||||
|
STATIC EFI_SECURITY2_FILE_AUTHENTICATION gSysSec2FileAuth = NULL;
|
||||||
|
STATIC BOOLEAN gVtoyByPassSB = FALSE; /* must be FALSE by default for revoke */
|
||||||
|
STATIC VTOY_SHIM gVtoyShimProtocol;
|
||||||
|
STATIC EFI_HANDLE gVtoyShimProtHandle;
|
||||||
|
STATIC SHIM_LOCK gShimLock;
|
||||||
|
|
||||||
|
STATIC EFI_EXIT_BOOT_SERVICES gSysExitBootServices = NULL;
|
||||||
|
STATIC EFI_GET_VARIABLE gSysGetVariable = NULL;
|
||||||
|
|
||||||
|
STATIC VOID EFIAPI VtoyLog(CONST CHAR16 *Format, ...)
|
||||||
|
{
|
||||||
|
VA_LIST Marker;
|
||||||
|
CHAR16 Buffer[512];
|
||||||
|
UINTN BufLen = 0;
|
||||||
|
|
||||||
|
Buffer[0] = 0;
|
||||||
|
VA_START(Marker, Format);
|
||||||
|
BufLen = UnicodeVSPrint(Buffer, sizeof(Buffer), Format, Marker);
|
||||||
|
VA_END(Marker);
|
||||||
|
|
||||||
|
if (gST->ConOut && gST->ConOut->OutputString)
|
||||||
|
{
|
||||||
|
gST->ConOut->OutputString(gST->ConOut, Buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
STATIC VOID EFIAPI DumpDevicePath(const EFI_DEVICE_PATH_PROTOCOL *DevicePath)
|
||||||
|
{
|
||||||
|
CHAR16 *DPStr = NULL;
|
||||||
|
|
||||||
|
DPStr = ConvertDevicePathToText(DevicePath, TRUE, TRUE);
|
||||||
|
if (DPStr)
|
||||||
|
{
|
||||||
|
vLog(L"%s", DPStr);
|
||||||
|
gBS->FreePool(DPStr);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
vLog(L"NULL");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
STATIC VOID EFIAPI ShowSBWarning(BOOLEAN Reboot, const EFI_DEVICE_PATH_PROTOCOL *DevicePath)
|
||||||
|
{
|
||||||
|
UINTN Index = 0;
|
||||||
|
|
||||||
|
vLog(L"\r\n=======================================================");
|
||||||
|
vLog(L"=======================================================\r\n");
|
||||||
|
|
||||||
|
DumpDevicePath(DevicePath);
|
||||||
|
|
||||||
|
vLog(L"\r\n####### Security Boot Violation ##########\r\n");
|
||||||
|
|
||||||
|
vLog(L"=======================================================");
|
||||||
|
vLog(L"=======================================================");
|
||||||
|
|
||||||
|
if (Reboot)
|
||||||
|
{
|
||||||
|
vLog(L"\r\n###### Press Enter to reboot... ######");
|
||||||
|
if (gST->ConIn)
|
||||||
|
{
|
||||||
|
gST->ConIn->Reset(gST->ConIn, FALSE);
|
||||||
|
gBS->WaitForEvent(1, &gST->ConIn->WaitForKey, &Index);
|
||||||
|
}
|
||||||
|
gRT->ResetSystem(EfiResetWarm, EFI_SECURITY_VIOLATION, 0, NULL);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
VtoySleep(5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
STATIC VOID * EFIAPI FindShimFuncAddr(UINT64 FuncOffset)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
SHIM_IMAGE_LOADER *ImgLoader = NULL;
|
||||||
|
EFI_GUID ShimImgLoaderGuid = SHIM_IMAGE_LOADER_GUID;
|
||||||
|
|
||||||
|
Status = gBS->LocateProtocol(&ShimImgLoaderGuid, NULL, (VOID **)&ImgLoader);
|
||||||
|
if (EFI_ERROR(Status) || !ImgLoader || !ImgLoader->LoadImage)
|
||||||
|
{
|
||||||
|
vLog(L"Failed to locate shim image loader protocol %lx %p", Status, ImgLoader);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (NM_SHIM_LOAD_IMAGE_OFFSET > FuncOffset)
|
||||||
|
{
|
||||||
|
return (UINT8 *)ImgLoader->LoadImage - (NM_SHIM_LOAD_IMAGE_OFFSET - FuncOffset);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return (UINT8 *)ImgLoader->LoadImage + (FuncOffset - NM_SHIM_LOAD_IMAGE_OFFSET);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EFI_STATUS EFIAPI LaunchRealGrub(EFI_HANDLE ImageHandle, CONST CHAR16 *FileName)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
UINTN BufferSize = 0;
|
||||||
|
CHAR16 *DevDpStr = NULL;
|
||||||
|
CHAR16 *NewDpStr = NULL;
|
||||||
|
EFI_HANDLE ChildHandle = NULL;
|
||||||
|
EFI_LOADED_IMAGE_PROTOCOL *Li = NULL;
|
||||||
|
EFI_DEVICE_PATH_PROTOCOL *DeviceDP = NULL;
|
||||||
|
EFI_DEVICE_PATH_PROTOCOL *TargetDp = NULL;
|
||||||
|
|
||||||
|
Status = gBS->HandleProtocol(ImageHandle, &gEfiLoadedImageProtocolGuid, (VOID**)&Li);
|
||||||
|
if (EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
vLog(L"Failed to locate loaded image protocol %lx", Status);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
DeviceDP = DevicePathFromHandle(Li->DeviceHandle);
|
||||||
|
if (!DeviceDP || !IsDevicePathValid(DeviceDP, 0))
|
||||||
|
{
|
||||||
|
vLog(L"Failed to get device path of device handle %p", Li->DeviceHandle);
|
||||||
|
Status = EFI_NOT_FOUND;
|
||||||
|
goto END;
|
||||||
|
}
|
||||||
|
|
||||||
|
DevDpStr = ConvertDevicePathToText(DeviceDP, FALSE, TRUE);
|
||||||
|
if (!DevDpStr)
|
||||||
|
{
|
||||||
|
vLog(L"Failed to convert device path to text");
|
||||||
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
|
goto END;
|
||||||
|
}
|
||||||
|
|
||||||
|
BufferSize = (StrLen(DevDpStr) + 64) * sizeof(CHAR16);
|
||||||
|
NewDpStr = (CHAR16 *)AllocatePool(BufferSize);
|
||||||
|
if (!NewDpStr)
|
||||||
|
{
|
||||||
|
vLog(L"Failed to alloc new device path string buffer size:%lu", BufferSize);
|
||||||
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
|
goto END;
|
||||||
|
}
|
||||||
|
|
||||||
|
UnicodeSPrint(NewDpStr, BufferSize, L"%s/EFI/BOOT/%s", DevDpStr, FileName);
|
||||||
|
|
||||||
|
TargetDp = ConvertTextToDevicePath(NewDpStr);
|
||||||
|
if (!TargetDp)
|
||||||
|
{
|
||||||
|
vLog(L"Failed to convert new text <%s> to device path", NewDpStr);
|
||||||
|
Status = EFI_NOT_FOUND;
|
||||||
|
goto END;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = gBS->LoadImage(FALSE, ImageHandle, TargetDp, NULL, 0, &ChildHandle);
|
||||||
|
if (EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
vLog(L"Failed to LoadImage %lx", Status);
|
||||||
|
goto END;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = gBS->StartImage(ChildHandle, NULL, NULL);
|
||||||
|
if (EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
vLog(L"Failed to StartImage %lx", Status);
|
||||||
|
gBS->UnloadImage(ChildHandle);
|
||||||
|
goto END;
|
||||||
|
}
|
||||||
|
|
||||||
|
END:
|
||||||
|
|
||||||
|
CheckFreePool(DevDpStr);
|
||||||
|
CheckFreePool(NewDpStr);
|
||||||
|
CheckFreePool(TargetDp);
|
||||||
|
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
STATIC EFI_STATUS EFIAPI ReadAuthFile
|
||||||
|
(
|
||||||
|
const EFI_DEVICE_PATH_PROTOCOL *DevicePathConst,
|
||||||
|
VOID **Buffer,
|
||||||
|
UINT32 *Size
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
UINTN TmpSize = 0;
|
||||||
|
CHAR16 *DpStr = NULL;
|
||||||
|
EFI_HANDLE Handle = NULL;
|
||||||
|
EFI_DEVICE_PATH *DevPath = NULL;
|
||||||
|
EFI_DEVICE_PATH *TmpPath = NULL;
|
||||||
|
EFI_FILE_IO_INTERFACE *FileIO = NULL;
|
||||||
|
EFI_FILE *File = NULL;
|
||||||
|
EFI_FILE *Root = NULL;
|
||||||
|
UINT8 *FileData = NULL;
|
||||||
|
EFI_FILE_INFO *FInfo = NULL;
|
||||||
|
UINT8 Buf[1024];
|
||||||
|
|
||||||
|
DevPath = TmpPath = DuplicateDevicePath(DevicePathConst);
|
||||||
|
if (!DevPath)
|
||||||
|
{
|
||||||
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
|
goto END;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = gBS->LocateDevicePath(&gEfiSimpleFileSystemProtocolGuid, &DevPath, &Handle);
|
||||||
|
if (EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
vLog(L"Failed to locate simple file protocol %lx", Status);
|
||||||
|
goto END;
|
||||||
|
}
|
||||||
|
|
||||||
|
DpStr = ConvertDevicePathToText(DevPath, FALSE, TRUE);
|
||||||
|
if (!DpStr)
|
||||||
|
{
|
||||||
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
|
goto END;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = gBS->HandleProtocol(Handle, &gEfiSimpleFileSystemProtocolGuid, (VOID **)&FileIO);
|
||||||
|
if (EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
vLog(L"Failed to handle simple file protocol %lx", Status);
|
||||||
|
goto END;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = FileIO->OpenVolume(Handle, &Root);
|
||||||
|
if (EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
vLog(L"Failed to open drive volume (%lx)\n", Status);
|
||||||
|
goto END;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = Root->Open(Root, &File, DpStr, EFI_FILE_MODE_READ, 0);
|
||||||
|
if (EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
vLog(L"Failed to open file (%s) (%lx)\n", DpStr, Status);
|
||||||
|
goto END;
|
||||||
|
}
|
||||||
|
|
||||||
|
FInfo = (EFI_FILE_INFO *)Buf;
|
||||||
|
TmpSize = sizeof(Buf);
|
||||||
|
ZeroMem(FInfo, sizeof(EFI_FILE_INFO));
|
||||||
|
|
||||||
|
Status = File->GetInfo(File, &gEfiFileInfoGuid, &TmpSize, FInfo);
|
||||||
|
if (EFI_ERROR(Status) || FInfo->FileSize == 0 || FInfo->FileSize >= 0xFFFFFFFFUL)
|
||||||
|
{
|
||||||
|
vLog(L"Failed to open file (%s) (%lx) Size(%ld)\n", DpStr, Status, (UINTN)FInfo->FileSize);
|
||||||
|
goto END;
|
||||||
|
}
|
||||||
|
|
||||||
|
FileData = AllocatePool(FInfo->FileSize);
|
||||||
|
if (!FileData)
|
||||||
|
{
|
||||||
|
Status = EFI_OUT_OF_RESOURCES;
|
||||||
|
goto END;
|
||||||
|
}
|
||||||
|
|
||||||
|
TmpSize = FInfo->FileSize;
|
||||||
|
Status = File->Read(File, &TmpSize, FileData);
|
||||||
|
if (EFI_ERROR(Status) || TmpSize != (UINTN)FInfo->FileSize)
|
||||||
|
{
|
||||||
|
vLog(L"Failed to read file (%lx) Read:%ld Size:%ld\n", Status, TmpSize, (UINTN)FInfo->FileSize);
|
||||||
|
goto END;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
END:
|
||||||
|
|
||||||
|
if (File)
|
||||||
|
{
|
||||||
|
File->Close(File);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Root)
|
||||||
|
{
|
||||||
|
Root->Close(Root);
|
||||||
|
}
|
||||||
|
|
||||||
|
CheckFreePool(TmpPath);
|
||||||
|
CheckFreePool(DpStr);
|
||||||
|
|
||||||
|
if (EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
CheckFreePool(FileData);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*Buffer = FileData;
|
||||||
|
*Size = (UINT32)FInfo->FileSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
STATIC BOOLEAN VtoyCheckRevoke(VOID *Buffer, UINTN Size)
|
||||||
|
{
|
||||||
|
UINT32 uiVer = 0;
|
||||||
|
EFI_IMAGE_DOS_HEADER *DosHead = (EFI_IMAGE_DOS_HEADER *)Buffer;
|
||||||
|
|
||||||
|
if (Size > sizeof(EFI_IMAGE_DOS_HEADER) && DosHead->e_magic == 0x5A4D)
|
||||||
|
{
|
||||||
|
if (CompareMem(DosHead->e_res2, &gVtoySbatGUID, 16) == 0)
|
||||||
|
{
|
||||||
|
CopyMem(&uiVer, DosHead->e_res2 + 8, 4);
|
||||||
|
if (uiVer < CUR_SBAT_VER)
|
||||||
|
{
|
||||||
|
vLog(L"Ventoy EFI file revoke (%u < %u)", uiVer, CUR_SBAT_VER);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
STATIC EFI_STATUS EFIAPI SecurityPolicyAuth
|
||||||
|
(
|
||||||
|
const EFI_SECURITY_ARCH_PROTOCOL *This,
|
||||||
|
UINT32 AuthenticationStatus,
|
||||||
|
const EFI_DEVICE_PATH_PROTOCOL *DevicePathConst
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
BOOLEAN bRevokeChkOK = TRUE;
|
||||||
|
UINT32 Size = 0;
|
||||||
|
VOID *Buffer = NULL;
|
||||||
|
|
||||||
|
/* Just return OK if the user choose to bypass SB */
|
||||||
|
if (gVtoyByPassSB)
|
||||||
|
{
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Step 1:
|
||||||
|
* Use original UEFI firmware auth API.
|
||||||
|
* If it's OK, it may be signed with Microsoft UEFI CA. (e.g. bootmgr/shim/...)
|
||||||
|
*/
|
||||||
|
if (gSysSecFileAuth)
|
||||||
|
{
|
||||||
|
Status = gSysSecFileAuth(This, AuthenticationStatus, DevicePathConst);
|
||||||
|
if (!EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Step 2:
|
||||||
|
* Use shim verify API.
|
||||||
|
* If it's OK, it may be signed with a MOK key. (e.g. Ventoy EFI files)
|
||||||
|
*/
|
||||||
|
if (gShimLock.Verify)
|
||||||
|
{
|
||||||
|
Status = ReadAuthFile(DevicePathConst, &Buffer, &Size);
|
||||||
|
if (!EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
Status = gShimLock.Verify(Buffer, Size);
|
||||||
|
if (!EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
bRevokeChkOK = VtoyCheckRevoke(Buffer, Size);
|
||||||
|
if (bRevokeChkOK)
|
||||||
|
{
|
||||||
|
FreePool(Buffer);
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FreePool(Buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ShowSBWarning(!bRevokeChkOK, DevicePathConst);
|
||||||
|
|
||||||
|
return EFI_SECURITY_VIOLATION;
|
||||||
|
}
|
||||||
|
|
||||||
|
STATIC EFI_STATUS EFIAPI Security2PolicyAuth
|
||||||
|
(
|
||||||
|
const EFI_SECURITY2_ARCH_PROTOCOL *This,
|
||||||
|
const EFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
||||||
|
VOID *FileBuffer,
|
||||||
|
UINTN FileSize,
|
||||||
|
BOOLEAN BootPolicy
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
BOOLEAN bRevokeChkOK = TRUE;
|
||||||
|
|
||||||
|
/* Just return OK if the user choose to bypass SB */
|
||||||
|
if (gVtoyByPassSB)
|
||||||
|
{
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Step 1:
|
||||||
|
* Use original UEFI firmware auth API.
|
||||||
|
* If it's OK, it may be signed with Microsoft UEFI CA. (e.g. bootmgr/shim/...)
|
||||||
|
*/
|
||||||
|
if (gSysSec2FileAuth)
|
||||||
|
{
|
||||||
|
Status = gSysSec2FileAuth(This, DevicePath, FileBuffer, FileSize, BootPolicy);
|
||||||
|
if (!EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Step 2:
|
||||||
|
* Use shim verify API.
|
||||||
|
* If it's OK, it may be signed with a MOK key. (e.g. Ventoy EFI files)
|
||||||
|
*/
|
||||||
|
if (gShimLock.Verify)
|
||||||
|
{
|
||||||
|
if (FileBuffer && FileSize > 0 && FileSize < 0xFFFFFFFFUL)
|
||||||
|
{
|
||||||
|
Status = gShimLock.Verify(FileBuffer, (UINT32)FileSize);
|
||||||
|
if (!EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
bRevokeChkOK = VtoyCheckRevoke(FileBuffer, FileSize);
|
||||||
|
if (bRevokeChkOK)
|
||||||
|
{
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ShowSBWarning(!bRevokeChkOK, DevicePath);
|
||||||
|
|
||||||
|
return EFI_SECURITY_VIOLATION;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
STATIC EFI_STATUS EFIAPI HookSecurityPolicy(VOID)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
EFI_STATUS Status2;
|
||||||
|
EFI_SECURITY_ARCH_PROTOCOL *Security = NULL;
|
||||||
|
EFI_SECURITY2_ARCH_PROTOCOL *Security2 = NULL;
|
||||||
|
|
||||||
|
Status = gBS->LocateProtocol(&gEfiSecurityArchProtocolGuid, NULL, (VOID **)&Security);
|
||||||
|
Status2 = gBS->LocateProtocol(&gEfiSecurity2ArchProtocolGuid, NULL, (VOID **)&Security2);
|
||||||
|
if (EFI_ERROR(Status) && EFI_ERROR(Status2))
|
||||||
|
{
|
||||||
|
vLog(L"Failed to locate security or security2 protocol. %lx %lx %p %p",
|
||||||
|
Status, Status2, Security, Security2);
|
||||||
|
return EFI_NOT_FOUND;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Security2)
|
||||||
|
{
|
||||||
|
gSysSec2FileAuth = Security2->FileAuthentication;
|
||||||
|
Security2->FileAuthentication = Security2PolicyAuth;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Security)
|
||||||
|
{
|
||||||
|
gSysSecFileAuth = Security->FileAuthenticationState;
|
||||||
|
Security->FileAuthenticationState = SecurityPolicyAuth;
|
||||||
|
}
|
||||||
|
|
||||||
|
return EFI_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
STATIC VOID EFIAPI UnHookSecurityPolicy(VOID)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
EFI_STATUS Status2;
|
||||||
|
EFI_SECURITY_ARCH_PROTOCOL *Security = NULL;
|
||||||
|
EFI_SECURITY2_ARCH_PROTOCOL *Security2 = NULL;
|
||||||
|
|
||||||
|
if (!gSysSec2FileAuth && !gSysSecFileAuth)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = gBS->LocateProtocol(&gEfiSecurityArchProtocolGuid, NULL, (VOID **)&Security);
|
||||||
|
Status2 = gBS->LocateProtocol(&gEfiSecurity2ArchProtocolGuid, NULL, (VOID **)&Security2);
|
||||||
|
if (EFI_ERROR(Status) && EFI_ERROR(Status2))
|
||||||
|
{
|
||||||
|
vLog(L"Failed to locate security or security2 protocol. %lx %lx %p %p",
|
||||||
|
Status, Status2, Security, Security2);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Security2 && gSysSec2FileAuth && Security2->FileAuthentication == Security2PolicyAuth)
|
||||||
|
{
|
||||||
|
Security2->FileAuthentication = gSysSec2FileAuth;
|
||||||
|
gSysSec2FileAuth = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Security && gSysSecFileAuth && Security->FileAuthenticationState == SecurityPolicyAuth)
|
||||||
|
{
|
||||||
|
Security->FileAuthenticationState = gSysSecFileAuth;
|
||||||
|
gSysSecFileAuth = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
STATIC VOID EFIAPI VtoyByPassSB(VOID)
|
||||||
|
{
|
||||||
|
gVtoyByPassSB = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
STATIC VOID EFIAPI VtoyCheckSB(VOID)
|
||||||
|
{
|
||||||
|
gVtoyByPassSB = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
STATIC VOID EFIAPI UnInstallVtoyShimProtocol(VOID)
|
||||||
|
{
|
||||||
|
EFI_GUID Guid = VTOY_SHIM_POLICY_GUID;
|
||||||
|
|
||||||
|
if (gVtoyShimProtHandle)
|
||||||
|
{
|
||||||
|
gBS->UninstallProtocolInterface(gVtoyShimProtHandle, &Guid, &gVtoyShimProtocol);
|
||||||
|
gVtoyShimProtHandle = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
STATIC EFI_STATUS EFIAPI InstallVtoyShimProtocol(VOID)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
EFI_GUID Guid = VTOY_SHIM_POLICY_GUID;
|
||||||
|
VTOY_SHIM *Prot = NULL;
|
||||||
|
|
||||||
|
gVtoyShimProtocol.ByPassSB = VtoyByPassSB;
|
||||||
|
gVtoyShimProtocol.CheckSB = VtoyCheckSB;
|
||||||
|
|
||||||
|
Status = gBS->LocateProtocol(&Guid, NULL, (VOID**)&Prot);
|
||||||
|
if (!EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
vLog(L"Ventoy shim already loaded, cannot be nested.");
|
||||||
|
return EFI_ALREADY_STARTED;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = gBS->InstallProtocolInterface(&gVtoyShimProtHandle, &Guid,
|
||||||
|
EFI_NATIVE_INTERFACE, &gVtoyShimProtocol);
|
||||||
|
if (EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
vLog(L"Failed to install protocol %lx", Status);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
STATIC BOOLEAN EFIAPI IsSecureBootEnabled(VOID)
|
||||||
|
{
|
||||||
|
UINT8 SecureBoot = 0;
|
||||||
|
UINTN DataSize;
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
DataSize = sizeof(SecureBoot);
|
||||||
|
Status = gST->RuntimeServices->GetVariable(L"SecureBoot", &gEfiGlobalVariableGuid, NULL,
|
||||||
|
&DataSize, &SecureBoot);
|
||||||
|
if (EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return SecureBoot ? TRUE : FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
STATIC BOOLEAN EFIAPI IsSetupMode(VOID)
|
||||||
|
{
|
||||||
|
UINT8 SetupMode = 0;
|
||||||
|
UINTN DataSize;
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
DataSize = sizeof(SetupMode);
|
||||||
|
Status = gST->RuntimeServices->GetVariable(L"SetupMode", &gEfiGlobalVariableGuid, NULL,
|
||||||
|
&DataSize, &SetupMode);
|
||||||
|
if (EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return SetupMode ? TRUE : FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
STATIC EFI_STATUS EFIAPI ShimEfiMain
|
||||||
|
(
|
||||||
|
IN EFI_HANDLE ImageHandle,
|
||||||
|
IN EFI_SYSTEM_TABLE *SystemTable,
|
||||||
|
IN BOOLEAN IsSecureBoot,
|
||||||
|
IN BOOLEAN IsSetup
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
SHIM_LOCK *ShimLock = NULL;
|
||||||
|
shim_void_func_pf Func1 = NULL;
|
||||||
|
shim_void_func_pf Func2 = NULL;
|
||||||
|
|
||||||
|
/* If secure boot is not enabled or in SetupMode, nothing needed, just launch Ventoy grub */
|
||||||
|
if (!IsSecureBoot || IsSetup)
|
||||||
|
{
|
||||||
|
Status = LaunchRealGrub(ImageHandle, REAL_GRUB_FILE);
|
||||||
|
if (EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
vErr(L"Failed to launch %s", REAL_GRUB_FILE);
|
||||||
|
}
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* We must be launched by shim */
|
||||||
|
Status = gBS->LocateProtocol(&gShimLockGUID, NULL, (VOID**)&ShimLock);
|
||||||
|
if (EFI_ERROR(Status) || !ShimLock)
|
||||||
|
{
|
||||||
|
vErr(L"Failed to locate SHIM LOCK Protocol %lx", Status);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Backup shim Lock because we will remove it later */
|
||||||
|
gShimLock.Verify = ShimLock->Verify;
|
||||||
|
gShimLock.Hash = ShimLock->Hash;
|
||||||
|
gShimLock.Context = ShimLock->Context;
|
||||||
|
|
||||||
|
Status = InstallVtoyShimProtocol();
|
||||||
|
if (EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
vErr(L"Failed to install ventoy shim protocol");
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* IMPORTANT: All recent shim implementations hook the UEFI Boot Services
|
||||||
|
* (e.g. LoadImage, StartImage) to enforce signature verification.
|
||||||
|
*
|
||||||
|
* We must restore the original system service pointers here. If we fail to do this,
|
||||||
|
* we will be unable to launch Ventoy-signed EFI binaries or any other unsigned
|
||||||
|
* EFI applications later, even when the user has explicitly opted to disable
|
||||||
|
* all Secure Boot validation checks.
|
||||||
|
*
|
||||||
|
* To the best of my knowledge, there is no official way to remove these hooks.
|
||||||
|
* This is a tricky hack that relies on shim's internal implementation details.
|
||||||
|
* It may break in future versions of shim, and a better approach may exist.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
Func1 = FindShimFuncAddr(NM_UNHOOK_SYSTEM_SERVICES_OFFSET);
|
||||||
|
Func2 = FindShimFuncAddr(NM_UNINSTALL_SHIM_PROTOCOLS_OFFSET);
|
||||||
|
if (!Func1 || !Func2)
|
||||||
|
{
|
||||||
|
vErr(L"Can not find shim func %p %p", Func1, Func2);
|
||||||
|
Status = EFI_NOT_FOUND;
|
||||||
|
goto END;
|
||||||
|
}
|
||||||
|
|
||||||
|
Func1(); /* call shim unhook_system_services() */
|
||||||
|
Func2(); /* call shim uninstall_shim_protocols() */
|
||||||
|
|
||||||
|
|
||||||
|
/* Hook the system security policy */
|
||||||
|
Status = HookSecurityPolicy();
|
||||||
|
if (EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
vErr(L"Failed to hook system security policy");
|
||||||
|
goto END;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Finally launch Ventoy grub */
|
||||||
|
Status = LaunchRealGrub(ImageHandle, REAL_GRUB_FILE);
|
||||||
|
if (EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
vErr(L"Failed to finally launch real grub %s", REAL_GRUB_FILE);
|
||||||
|
goto END;
|
||||||
|
}
|
||||||
|
|
||||||
|
END:
|
||||||
|
|
||||||
|
/* UnHook system security policy */
|
||||||
|
UnHookSecurityPolicy();
|
||||||
|
|
||||||
|
UnInstallVtoyShimProtocol();
|
||||||
|
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
STATIC EFI_STATUS EFIAPI VtoyExitBootServices
|
||||||
|
(
|
||||||
|
IN EFI_HANDLE ImageHandle,
|
||||||
|
IN UINTN MapKey
|
||||||
|
)
|
||||||
|
{
|
||||||
|
UnHookSecurityPolicy();
|
||||||
|
UnInstallVtoyShimProtocol();
|
||||||
|
|
||||||
|
gST->RuntimeServices->GetVariable = gSysGetVariable;
|
||||||
|
gBS->ExitBootServices = gSysExitBootServices;
|
||||||
|
|
||||||
|
return gSysExitBootServices(ImageHandle, MapKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
EFI_STATUS EFIAPI VtoyGetVariable
|
||||||
|
(
|
||||||
|
IN CHAR16 *VariableName,
|
||||||
|
IN EFI_GUID *VendorGuid,
|
||||||
|
OUT UINT32 *Attributes, OPTIONAL
|
||||||
|
IN OUT UINTN *DataSize,
|
||||||
|
OUT VOID *Data OPTIONAL
|
||||||
|
)
|
||||||
|
{
|
||||||
|
BOOLEAN bChk = FALSE;
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
if (gVtoyByPassSB && VariableName && VendorGuid && DataSize && Data && (*DataSize) > 0)
|
||||||
|
{
|
||||||
|
bChk = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = gSysGetVariable(VariableName, VendorGuid, Attributes, DataSize, Data);
|
||||||
|
if (bChk && (!EFI_ERROR(Status)))
|
||||||
|
{
|
||||||
|
if (CompareMem(&gShimLockGUID, VendorGuid, 16) == 0 &&
|
||||||
|
StrCmp(VariableName, L"MokSBState") == 0)
|
||||||
|
{
|
||||||
|
*(UINT8 *)Data = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
EFI_STATUS EFIAPI VtoyShimEfiMain
|
||||||
|
(
|
||||||
|
IN EFI_HANDLE ImageHandle,
|
||||||
|
IN EFI_SYSTEM_TABLE *SystemTable
|
||||||
|
)
|
||||||
|
{
|
||||||
|
BOOLEAN IsSetup = FALSE;
|
||||||
|
BOOLEAN IsSecureBoot = FALSE;
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
IsSetup = IsSetupMode();
|
||||||
|
IsSecureBoot = IsSecureBootEnabled();
|
||||||
|
|
||||||
|
if (!IsSecureBoot || IsSetup)
|
||||||
|
{
|
||||||
|
Status = ShimEfiMain(ImageHandle, SystemTable, IsSecureBoot, IsSetup);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gSysExitBootServices = gBS->ExitBootServices;
|
||||||
|
gBS->ExitBootServices = VtoyExitBootServices;
|
||||||
|
|
||||||
|
gSysGetVariable = gST->RuntimeServices->GetVariable;
|
||||||
|
gST->RuntimeServices->GetVariable = VtoyGetVariable;
|
||||||
|
|
||||||
|
Status = ShimEfiMain(ImageHandle, SystemTable, IsSecureBoot, IsSetup);
|
||||||
|
|
||||||
|
gBS->ExitBootServices = gSysExitBootServices;
|
||||||
|
gST->RuntimeServices->GetVariable = gSysGetVariable;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* VtoyShim.h
|
||||||
|
*
|
||||||
|
* Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||||
|
* SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __VTOYSHIM_H__
|
||||||
|
#define __VTOYSHIM_H__
|
||||||
|
|
||||||
|
#if defined (MDE_CPU_IA32)
|
||||||
|
#define REAL_GRUB_FILE L"grubia32_real.efi"
|
||||||
|
#elif defined (MDE_CPU_X64)
|
||||||
|
#define REAL_GRUB_FILE L"grubx64_real.efi"
|
||||||
|
#elif defined (MDE_CPU_AARCH64)
|
||||||
|
#define REAL_GRUB_FILE L"grubaa64_real.efi"
|
||||||
|
#else
|
||||||
|
#error "Not supported now"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* The following definations are copied from shim source code */
|
||||||
|
|
||||||
|
#define SHIM_LOCK_GUID {0x605dab50, 0xe046, 0x4300, {0xab, 0xb6, 0x3d, 0xd8, 0x10, 0xdd, 0x8b, 0x23 } };
|
||||||
|
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(*EFI_SHIM_LOCK_VERIFY) (
|
||||||
|
IN VOID *buffer,
|
||||||
|
IN UINT32 size
|
||||||
|
);
|
||||||
|
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(*EFI_SHIM_LOCK_HASH) (
|
||||||
|
IN char *data,
|
||||||
|
IN int datasize,
|
||||||
|
PE_COFF_LOADER_IMAGE_CONTEXT *context,
|
||||||
|
UINT8 *sha256hash,
|
||||||
|
UINT8 *sha1hash
|
||||||
|
);
|
||||||
|
|
||||||
|
typedef
|
||||||
|
EFI_STATUS
|
||||||
|
(*EFI_SHIM_LOCK_CONTEXT) (
|
||||||
|
IN VOID *data,
|
||||||
|
IN unsigned int datasize,
|
||||||
|
PE_COFF_LOADER_IMAGE_CONTEXT *context
|
||||||
|
);
|
||||||
|
|
||||||
|
typedef struct _SHIM_LOCK {
|
||||||
|
EFI_SHIM_LOCK_VERIFY Verify;
|
||||||
|
EFI_SHIM_LOCK_HASH Hash;
|
||||||
|
EFI_SHIM_LOCK_CONTEXT Context;
|
||||||
|
} SHIM_LOCK;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define SHIM_IMAGE_LOADER_GUID {0x1f492041, 0xfadb, 0x4e59, {0x9e, 0x57, 0x7c, 0xaf, 0xe7, 0x3a, 0x55, 0xab } }
|
||||||
|
|
||||||
|
typedef struct _SHIM_IMAGE_LOADER {
|
||||||
|
EFI_IMAGE_LOAD LoadImage;
|
||||||
|
EFI_IMAGE_START StartImage;
|
||||||
|
EFI_EXIT Exit;
|
||||||
|
EFI_IMAGE_UNLOAD UnloadImage;
|
||||||
|
} SHIM_IMAGE_LOADER;
|
||||||
|
|
||||||
|
typedef VOID (*shim_void_func_pf)(VOID);
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The two offset here are extract from the shim file which used in Ventoy.
|
||||||
|
* nm BOOTX64.EFI | grep shim_load_image
|
||||||
|
* nm BOOTX64.EFI | grep unhook_system_services
|
||||||
|
* nm BOOTX64.EFI | grep uninstall_shim_protocols
|
||||||
|
*
|
||||||
|
* It means that they must be updated every time Ventoy update the shim file.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define NM_SHIM_LOAD_IMAGE_OFFSET 0x2dc12
|
||||||
|
#define NM_UNHOOK_SYSTEM_SERVICES_OFFSET 0x2e278
|
||||||
|
#define NM_UNINSTALL_SHIM_PROTOCOLS_OFFSET 0x26264
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#define VtoySleep(sec) gBS->Stall(1000000 * (sec))
|
||||||
|
#define vLog(fmt, ...) VtoyLog(fmt "\r\n", ##__VA_ARGS__)
|
||||||
|
#define vErr(fmt, ...) VtoyLog(fmt "\r\n", ##__VA_ARGS__); VtoySleep(5)
|
||||||
|
|
||||||
|
#define CheckFreePool(p) \
|
||||||
|
do { \
|
||||||
|
if (p) { \
|
||||||
|
FreePool(p); \
|
||||||
|
(p) = NULL; \
|
||||||
|
}\
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
|
#define VTOY_SHIM_POLICY_GUID {0x90a29d14, 0x3968, 0x48fe, { 0x85, 0x81, 0x6b, 0x7f, 0x7d, 0xc4, 0x70, 0x55 }};
|
||||||
|
|
||||||
|
|
||||||
|
typedef VOID (EFIAPI *VTOY_BYPASS_SB)(VOID);
|
||||||
|
typedef VOID (EFIAPI *VTOY_CHECK_SB)(VOID);
|
||||||
|
typedef struct _VTOY_SHIM{
|
||||||
|
VTOY_BYPASS_SB ByPassSB;
|
||||||
|
VTOY_BYPASS_SB CheckSB;
|
||||||
|
} VTOY_SHIM;
|
||||||
|
|
||||||
|
CONST UINT8 * ventoy_get_der_data(UINT32 *Len);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
#************************************************************************************
|
||||||
|
# Copyright (c) 2026, longpanda <admin@ventoy.net>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License as
|
||||||
|
# published by the Free Software Foundation; either version 3 of the
|
||||||
|
# License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful, but
|
||||||
|
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
#************************************************************************************
|
||||||
|
|
||||||
|
[Defines]
|
||||||
|
INF_VERSION = 0x00010005
|
||||||
|
BASE_NAME = VtoyShim
|
||||||
|
FILE_GUID = 6d7c7406-b32c-461f-8454-ddaa5243d93d
|
||||||
|
MODULE_TYPE = UEFI_APPLICATION
|
||||||
|
VERSION_STRING = 1.0
|
||||||
|
ENTRY_POINT = VtoyShimEfiMain
|
||||||
|
|
||||||
|
[BuildOptions]
|
||||||
|
# Force standard GNU ld to pack and align ELF segments to 4KB page boundaries
|
||||||
|
GCC:*_*_*_DLINK_FLAGS = -Wl,-z,common-page-size=0x1000 -Wl,-z,max-page-size=0x1000
|
||||||
|
|
||||||
|
[Sources]
|
||||||
|
VtoyShim.h
|
||||||
|
VtoyShim.c
|
||||||
|
|
||||||
|
[Packages]
|
||||||
|
MdePkg/MdePkg.dec
|
||||||
|
MdeModulePkg/MdeModulePkg.dec
|
||||||
|
ShellPkg/ShellPkg.dec
|
||||||
|
|
||||||
|
[LibraryClasses]
|
||||||
|
UefiApplicationEntryPoint
|
||||||
|
UefiLib
|
||||||
|
DevicePathLib
|
||||||
|
DebugLib
|
||||||
|
|
||||||
|
[Guids]
|
||||||
|
gEfiGlobalVariableGuid
|
||||||
|
gShellVariableGuid
|
||||||
|
gEfiVirtualCdGuid
|
||||||
|
gEfiFileInfoGuid
|
||||||
|
|
||||||
|
[Protocols]
|
||||||
|
gEfiSecurityArchProtocolGuid
|
||||||
|
gEfiSecurity2ArchProtocolGuid
|
||||||
|
gEfiLoadedImageProtocolGuid
|
||||||
|
gEfiBlockIoProtocolGuid
|
||||||
|
gEfiDevicePathProtocolGuid
|
||||||
|
gEfiDevicePathToTextProtocolGuid
|
||||||
|
gEfiDevicePathFromTextProtocolGuid
|
||||||
|
gEfiSimpleFileSystemProtocolGuid
|
||||||
|
gEfiRamDiskProtocolGuid
|
||||||
|
gEfiAbsolutePointerProtocolGuid
|
||||||
|
gEfiAcpiTableProtocolGuid
|
||||||
|
gEfiBlockIo2ProtocolGuid
|
||||||
|
gEfiBusSpecificDriverOverrideProtocolGuid
|
||||||
|
gEfiComponentNameProtocolGuid
|
||||||
|
gEfiComponentName2ProtocolGuid
|
||||||
|
gEfiDriverBindingProtocolGuid
|
||||||
|
gEfiDiskIoProtocolGuid
|
||||||
|
gEfiDiskIo2ProtocolGuid
|
||||||
|
gEfiGraphicsOutputProtocolGuid
|
||||||
|
gEfiHiiConfigAccessProtocolGuid
|
||||||
|
gEfiHiiFontProtocolGuid
|
||||||
|
gEfiLoadFileProtocolGuid
|
||||||
|
gEfiLoadFile2ProtocolGuid
|
||||||
|
gEfiLoadedImageProtocolGuid
|
||||||
|
gEfiLoadedImageDevicePathProtocolGuid
|
||||||
|
gEfiPciIoProtocolGuid
|
||||||
|
gEfiSerialIoProtocolGuid
|
||||||
|
gEfiSimpleTextInProtocolGuid
|
||||||
|
gEfiSimpleTextInputExProtocolGuid
|
||||||
|
gEfiSimpleTextOutProtocolGuid
|
||||||
|
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md
|
||||||
|
ventoy-shim,1,Ventoy,ventoy-shim,1.0,https://www.ventoy.net/
|
||||||
|
@@ -145,6 +145,66 @@ STATIC EFI_STATUS ParseCmdline(IN EFI_HANDLE ImageHandle)
|
|||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined (MDE_CPU_X64)
|
||||||
|
|
||||||
|
STATIC BOOLEAN EFIAPI IsSecureBootEnabled(VOID)
|
||||||
|
{
|
||||||
|
UINT8 SecureBoot = 0;
|
||||||
|
UINTN DataSize;
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
DataSize = sizeof(SecureBoot);
|
||||||
|
Status = gST->RuntimeServices->GetVariable(L"SecureBoot", &gEfiGlobalVariableGuid, NULL,
|
||||||
|
&DataSize, &SecureBoot);
|
||||||
|
if (EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return SecureBoot ? TRUE : FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
STATIC BOOLEAN EFIAPI IsSetupMode(VOID)
|
||||||
|
{
|
||||||
|
UINT8 SetupMode = 0;
|
||||||
|
UINTN DataSize;
|
||||||
|
EFI_STATUS Status;
|
||||||
|
|
||||||
|
DataSize = sizeof(SetupMode);
|
||||||
|
Status = gST->RuntimeServices->GetVariable(L"SetupMode", &gEfiGlobalVariableGuid, NULL,
|
||||||
|
&DataSize, &SetupMode);
|
||||||
|
if (EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return SetupMode ? TRUE : FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
STATIC BOOLEAN EFIAPI CheckVtoyShim(VOID)
|
||||||
|
{
|
||||||
|
EFI_STATUS Status;
|
||||||
|
EFI_GUID Guid = VTOY_SHIM_POLICY_GUID;
|
||||||
|
VOID *Prot = NULL;
|
||||||
|
|
||||||
|
/* If secure boot is not enabled or in SetupMode, nothing needed */
|
||||||
|
if (!IsSecureBootEnabled() || IsSetupMode())
|
||||||
|
{
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = gBS->LocateProtocol(&Guid, NULL, (VOID**)&Prot);
|
||||||
|
if (EFI_ERROR(Status))
|
||||||
|
{
|
||||||
|
gST->ConOut->OutputString(gST->ConOut, L"Can not locate Vtoy Shim\r\n");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
EFI_STATUS EFIAPI VtoyUtilEfiMain
|
EFI_STATUS EFIAPI VtoyUtilEfiMain
|
||||||
(
|
(
|
||||||
IN EFI_HANDLE ImageHandle,
|
IN EFI_HANDLE ImageHandle,
|
||||||
@@ -154,6 +214,15 @@ 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++)
|
||||||
|
|||||||
@@ -21,6 +21,8 @@
|
|||||||
#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);
|
||||||
|
|||||||
@@ -24,6 +24,9 @@
|
|||||||
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;
|
||||||
|
|
||||||
|
|||||||
@@ -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+");
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -298,9 +302,134 @@ 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 secure_boot = 0;
|
||||||
|
grub_uint8_t setup_mode = 0;
|
||||||
|
grub_uint8_t *var = NULL;
|
||||||
|
grub_size_t size = 0;
|
||||||
|
grub_efi_guid_t global = GRUB_EFI_GLOBAL_VARIABLE_GUID;
|
||||||
|
|
||||||
|
var = grub_efi_get_variable("SecureBoot", &global, &size);
|
||||||
|
if (var && size == 1 && *var == 1)
|
||||||
|
{
|
||||||
|
secure_boot = 1;
|
||||||
|
}
|
||||||
|
grub_check_free(var);
|
||||||
|
|
||||||
|
size = 0;
|
||||||
|
var = grub_efi_get_variable("SetupMode", &global, &size);
|
||||||
|
if (var && size == 1 && *var == 1)
|
||||||
|
{
|
||||||
|
setup_mode = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (secure_boot == 1 && setup_mode == 0)
|
||||||
|
{
|
||||||
|
g_sys_sb = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
grub_check_free(var);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int ventoy_secure_boot_init(void)
|
||||||
|
{
|
||||||
|
grub_efi_guid_t ProtGuid = VTOY_SHIM_POLICY_GUID;
|
||||||
|
|
||||||
|
ventoy_get_uefi_sb();
|
||||||
|
|
||||||
|
if (g_sys_sb == 0)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When SecureBoot enabled, Ventoy grub must be launched by Ventoy Shim.
|
||||||
|
* Currently only x86_64 support this feature.
|
||||||
|
*/
|
||||||
|
if (g_ventoy_plat_data == VTOY_PLAT_X86_64_UEFI)
|
||||||
|
{
|
||||||
|
g_vtoy_shim = grub_efi_locate_protocol(&ProtGuid, NULL);
|
||||||
|
if (g_vtoy_shim == NULL || g_vtoy_shim->ByPassSB == NULL || g_vtoy_shim->CheckSB == NULL)
|
||||||
|
{
|
||||||
|
grub_cls();
|
||||||
|
grub_printf(VTOY_WARNING"\n");
|
||||||
|
grub_printf(VTOY_WARNING"\n");
|
||||||
|
grub_printf(VTOY_WARNING"\n\n\n");
|
||||||
|
|
||||||
|
grub_printf("Ventoy grub is not launched by Ventoy shim.\n\n");
|
||||||
|
grub_refresh();
|
||||||
|
|
||||||
|
ventoy_prompt_end();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
static int ventoy_arch_mode_init(void)
|
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 +458,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;
|
||||||
@@ -497,6 +613,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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -896,6 +896,36 @@ static grub_err_t ventoy_cmd_strstr(grub_extcmd_context_t ctxt, int argc, char *
|
|||||||
return (grub_strstr(args[0], args[1])) ? 0 : 1;
|
return (grub_strstr(args[0], args[1])) ? 0 : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static grub_err_t ventoy_cmd_istrstr(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||||
|
{
|
||||||
|
grub_err_t ret = 1;
|
||||||
|
char *s1 = NULL;
|
||||||
|
char *s2 = NULL;
|
||||||
|
|
||||||
|
(void)ctxt;
|
||||||
|
|
||||||
|
if (argc != 2)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
s1 = grub_strdup(args[0]);
|
||||||
|
s2 = grub_strdup(args[1]);
|
||||||
|
if (s1 == NULL || s2 == NULL)
|
||||||
|
{
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
|
||||||
|
ventoy_str_toupper(s1);
|
||||||
|
ventoy_str_toupper(s2);
|
||||||
|
ret = (grub_strstr(s1, s2)) ? 0 : 1;
|
||||||
|
|
||||||
|
end:
|
||||||
|
grub_check_free(s1);
|
||||||
|
grub_check_free(s2);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
static grub_err_t ventoy_cmd_strbegin(grub_extcmd_context_t ctxt, int argc, char **args)
|
static grub_err_t ventoy_cmd_strbegin(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||||
{
|
{
|
||||||
char *c0, *c1;
|
char *c0, *c1;
|
||||||
@@ -4723,7 +4753,7 @@ static grub_err_t ventoy_cmd_img_unhook_root(grub_extcmd_context_t ctxt, int arg
|
|||||||
static grub_err_t ventoy_cmd_check_secureboot_var(grub_extcmd_context_t ctxt, int argc, char **args)
|
static grub_err_t ventoy_cmd_check_secureboot_var(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||||
{
|
{
|
||||||
int ret = 1;
|
int ret = 1;
|
||||||
grub_uint8_t *var;
|
grub_uint8_t *var = NULL;
|
||||||
grub_size_t size;
|
grub_size_t size;
|
||||||
grub_efi_guid_t global = GRUB_EFI_GLOBAL_VARIABLE_GUID;
|
grub_efi_guid_t global = GRUB_EFI_GLOBAL_VARIABLE_GUID;
|
||||||
|
|
||||||
@@ -4734,6 +4764,7 @@ static grub_err_t ventoy_cmd_check_secureboot_var(grub_extcmd_context_t ctxt, in
|
|||||||
var = grub_efi_get_variable("SecureBoot", &global, &size);
|
var = grub_efi_get_variable("SecureBoot", &global, &size);
|
||||||
if (var && *var == 1)
|
if (var && *var == 1)
|
||||||
{
|
{
|
||||||
|
grub_free(var);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5118,7 +5149,7 @@ int ventoy_load_part_table(const char *diskname)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ventoy_prompt_end(void)
|
void ventoy_prompt_end(void)
|
||||||
{
|
{
|
||||||
int op = 0;
|
int op = 0;
|
||||||
char c;
|
char c;
|
||||||
@@ -6412,6 +6443,52 @@ static grub_err_t ventoy_cmd_load_menu_lang(grub_extcmd_context_t ctxt, int argc
|
|||||||
VENTOY_CMD_RETURN(0);
|
VENTOY_CMD_RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static grub_err_t ventoy_cmd_update_sb_policy(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||||
|
{
|
||||||
|
(void)ctxt;
|
||||||
|
(void)argc;
|
||||||
|
(void)args;
|
||||||
|
|
||||||
|
#ifdef GRUB_MACHINE_EFI
|
||||||
|
ventoy_set_sb_policy();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
VENTOY_CMD_RETURN(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
static grub_err_t ventoy_cmd_sb_info(grub_extcmd_context_t ctxt, int argc, char **args)
|
||||||
|
{
|
||||||
|
(void)ctxt;
|
||||||
|
(void)argc;
|
||||||
|
(void)args;
|
||||||
|
|
||||||
|
#ifdef GRUB_MACHINE_EFI
|
||||||
|
const char *policy = NULL;
|
||||||
|
|
||||||
|
if (g_sb_policy == VTOY_SB_POLICY_BYPASS)
|
||||||
|
{
|
||||||
|
policy = "ByPass";
|
||||||
|
}
|
||||||
|
else if (g_sb_policy == VTOY_SB_POLICY_CHECK)
|
||||||
|
{
|
||||||
|
policy = "Check";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
policy = "XXX";
|
||||||
|
}
|
||||||
|
|
||||||
|
grub_printf("UEFI Firmware Secure Boot: %s\n", g_sys_sb ? "Enable" : "Disable");
|
||||||
|
grub_printf("Ventoy Secure Boot Policy: %s\n", policy);
|
||||||
|
#else
|
||||||
|
grub_printf("Non EFI mode!\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
grub_refresh();
|
||||||
|
|
||||||
|
VENTOY_CMD_RETURN(0);
|
||||||
|
}
|
||||||
|
|
||||||
static int ventoy_chksum_pathcmp(int chktype, char *rlpath, char *rdpath)
|
static int ventoy_chksum_pathcmp(int chktype, char *rlpath, char *rdpath)
|
||||||
{
|
{
|
||||||
char *pos1 = NULL;
|
char *pos1 = NULL;
|
||||||
@@ -6897,6 +6974,7 @@ static cmd_para ventoy_cmds[] =
|
|||||||
{ "vt_incr", ventoy_cmd_incr, 0, NULL, "{Var} {INT}", "Increase integer variable", NULL },
|
{ "vt_incr", ventoy_cmd_incr, 0, NULL, "{Var} {INT}", "Increase integer variable", NULL },
|
||||||
{ "vt_mod", ventoy_cmd_mod, 0, NULL, "{Int} {Int} {Var}", "mod integer variable", NULL },
|
{ "vt_mod", ventoy_cmd_mod, 0, NULL, "{Int} {Int} {Var}", "mod integer variable", NULL },
|
||||||
{ "vt_strstr", ventoy_cmd_strstr, 0, NULL, "", "", NULL },
|
{ "vt_strstr", ventoy_cmd_strstr, 0, NULL, "", "", NULL },
|
||||||
|
{ "vt_istrstr", ventoy_cmd_istrstr, 0, NULL, "", "", NULL },
|
||||||
{ "vt_str_begin", ventoy_cmd_strbegin, 0, NULL, "", "", NULL },
|
{ "vt_str_begin", ventoy_cmd_strbegin, 0, NULL, "", "", NULL },
|
||||||
{ "vt_str_casebegin", ventoy_cmd_strcasebegin, 0, NULL, "", "", NULL },
|
{ "vt_str_casebegin", ventoy_cmd_strcasebegin, 0, NULL, "", "", NULL },
|
||||||
{ "vt_debug", ventoy_cmd_debug, 0, NULL, "{on|off}", "turn debug on/off", NULL },
|
{ "vt_debug", ventoy_cmd_debug, 0, NULL, "{on|off}", "turn debug on/off", NULL },
|
||||||
@@ -7060,6 +7138,9 @@ static cmd_para ventoy_cmds[] =
|
|||||||
{ "vt_pop_menu_lang", ventoy_cmd_pop_menulang, 0, NULL, "", "", NULL },
|
{ "vt_pop_menu_lang", ventoy_cmd_pop_menulang, 0, NULL, "", "", NULL },
|
||||||
{ "vt_linux_initrd", ventoy_cmd_linux_initrd, 0, NULL, "", "", NULL },
|
{ "vt_linux_initrd", ventoy_cmd_linux_initrd, 0, NULL, "", "", NULL },
|
||||||
|
|
||||||
|
{ "vt_sbinfo", ventoy_cmd_sb_info, 0, NULL, "", "", NULL },
|
||||||
|
{ "vt_update_sb_policy", ventoy_cmd_update_sb_policy, 0, NULL, "", "", NULL },
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
int ventoy_register_all_cmd(void)
|
int ventoy_register_all_cmd(void)
|
||||||
|
|||||||
@@ -195,6 +195,16 @@ typedef struct cpio_newc_header
|
|||||||
#define check_free(p, func) if (p) { func(p); p = NULL; }
|
#define 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)
|
||||||
|
|
||||||
@@ -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__ */
|
||||||
|
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
INSTALL/EFI/BOOT/mmx64.efi
Normal file
BIN
INSTALL/EFI/BOOT/mmx64.efi
Normal file
Binary file not shown.
@@ -1457,7 +1457,10 @@ function ventoy_iso_busybox_ver {
|
|||||||
set ventoy_busybox_ver=64
|
set ventoy_busybox_ver=64
|
||||||
elif vt_strstr "$vt_volume_id" "x86_64"; then
|
elif vt_strstr "$vt_volume_id" "x86_64"; then
|
||||||
set ventoy_busybox_ver=64
|
set ventoy_busybox_ver=64
|
||||||
|
elif vt_istrstr "${vt_chosen_path}" "x86_64"; then
|
||||||
|
set ventoy_busybox_ver=64
|
||||||
|
elif vt_istrstr "${vt_chosen_path}" "amd64"; then
|
||||||
|
set ventoy_busybox_ver=64
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -2449,7 +2452,7 @@ function mimg_common_menuentry {
|
|||||||
#############################################################
|
#############################################################
|
||||||
#############################################################
|
#############################################################
|
||||||
|
|
||||||
set VENTOY_VERSION="1.1.12"
|
set VENTOY_VERSION="1.1.16"
|
||||||
|
|
||||||
#ACPI not compatible with Window7/8, so disable by default
|
#ACPI not compatible with Window7/8, so disable by default
|
||||||
set VTOY_PARAM_NO_ACPI=1
|
set VTOY_PARAM_NO_ACPI=1
|
||||||
@@ -2551,6 +2554,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
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
L - Seleccionar lenguaje
|
L - Seleccionar idioma
|
||||||
F1 - Mostrar información de ayuda
|
F1 - Mostrar información de ayuda
|
||||||
F2 - Navegar y arranca archivos en el disco local
|
F2 - Navegar y arrancar archivos en el disco local
|
||||||
F3 - Cambiar modo de menú entre vista de árbol <-> vista de lista
|
F3 - Cambiar modo de menú entre Vista de árbol <-> Vista de lista
|
||||||
F4 - arrancar Windows/Linux en el disco local
|
F4 - Arrancar Windows/Linux en el disco local
|
||||||
F5 - Utilidades
|
F5 - Utilidades
|
||||||
F6 - Cargar menú de Grub2 personalizado
|
F6 - Cargar menú de Grub2 personalizado
|
||||||
F7 - Cambiar entre modo grafico <-> modo texto
|
F7 - Cambiar entre Modo GUI <-> Modo texto
|
||||||
|
|
||||||
m/Ctrl+m - Suma de comprobación de archivos de imagen (md5/sha1/sha256/sha512)
|
m/Ctrl+m - Suma de comprobación de archivos de imagen (md5/sha1/sha256/sha512)
|
||||||
d/Ctrl+d - Modo Memdisk (solo para WinPE/LiveCD ISO/IMG pequeños)
|
d/Ctrl+d - Modo Memdisk (Sólo para WinPE/LiveCD ISO/IMG pequeños)
|
||||||
w/Ctrl+w - Modo WIMBOOT (Solo para archivos Windows/WinPE ISO)
|
w/Ctrl+w - Modo WIMBOOT (Sólo para archivos Windows/WinPE ISO)
|
||||||
r/Ctrl+r - Modo Grub2 (Solo para algunas distribuciones de Linux)
|
r/Ctrl+r - Modo Grub2 (Sólo para algunas distros de Linux)
|
||||||
i/Ctrl+i - Modo compatible (Solo para depuración)
|
i/Ctrl+i - Modo compatible (Sólo para depuración)
|
||||||
u/Ctrl+u - Cargar controlador ISO EFI (Solo para depuración, no se puede usar oficialmente)
|
u/Ctrl+u - Cargar controlador ISO EFI (Sólo para depuración, uso no oficial)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"VTLANG_LANGUAGE_NAME": "Spanish (Español)",
|
"VTLANG_LANGUAGE_NAME": "Spanish (Español)",
|
||||||
|
|
||||||
"VTLANG_STR_HOTKEY_LIST": "L:Lenguaje F1:Ayuda F2:Navegar F3:Vista de lista F4:Arranque local F5:Herramientas F6:Extensión de menú",
|
"VTLANG_STR_HOTKEY_LIST": "L:Idioma F1:Ayuda F2:Navegar F3:Vista de lista F4:Arranque local F5:Herramientas F6:Menú ext.",
|
||||||
"VTLANG_STR_HOTKEY_TREE": "L:Lenguaje F1:Ayuda F2:Navegar F3:Vista de árbol F4:Arranque local F5:Herramientas F6:Extensión de menú",
|
"VTLANG_STR_HOTKEY_TREE": "L:Idioma F1:Ayuda F2:Navegar F3:Vista de árbol F4:Arranque local F5:Herramientas F6:Menú ext.",
|
||||||
"VTLANG_RETURN_PREVIOUS": "Regresar al menú previo [Esc]",
|
"VTLANG_RETURN_PREVIOUS": "Regresar al menú anterior [Esc]",
|
||||||
"VTLANG_RETURN_PRV_NOESC": "Regresar al menú previo",
|
"VTLANG_RETURN_PRV_NOESC": "Regresar al menú anterior",
|
||||||
|
|
||||||
"VTLANG_MENU_LANG": "Selección de idioma del menú",
|
"VTLANG_MENU_LANG": "Selección de idioma del menú",
|
||||||
|
|
||||||
@@ -28,13 +28,13 @@
|
|||||||
"VTLANG_CHKSUM_SHA256_CALC_CHK": "Calcular y comprobar sha256sum",
|
"VTLANG_CHKSUM_SHA256_CALC_CHK": "Calcular y comprobar sha256sum",
|
||||||
"VTLANG_CHKSUM_SHA512_CALC_CHK": "Calcular y comprobar sha512sum",
|
"VTLANG_CHKSUM_SHA512_CALC_CHK": "Calcular y comprobar sha512sum",
|
||||||
|
|
||||||
"VTLANG_POWER": "Poder",
|
"VTLANG_POWER": "Energía",
|
||||||
"VTLANG_POWER_REBOOT": "Reiniciar",
|
"VTLANG_POWER_REBOOT": "Reiniciar",
|
||||||
"VTLANG_POWER_HALT": "Detener",
|
"VTLANG_POWER_HALT": "Apagar",
|
||||||
"VTLANG_POWER_BOOT_EFIFW": "Reiniciar a configuración EFI",
|
"VTLANG_POWER_BOOT_EFIFW": "Reiniciar a la configuración EFI",
|
||||||
|
|
||||||
"VTLANG_KEYBRD_LAYOUT": "Distribuciones de teclado",
|
"VTLANG_KEYBRD_LAYOUT": "Distribuciones de teclado",
|
||||||
"VTLANG_HWINFO": "Información de Hardware",
|
"VTLANG_HWINFO": "Información de hardware",
|
||||||
|
|
||||||
"VTLANG_RESOLUTION_CFG": "Configuración de resolución",
|
"VTLANG_RESOLUTION_CFG": "Configuración de resolución",
|
||||||
"VTLANG_SCREEN_MODE": "Modo de visualización de pantalla",
|
"VTLANG_SCREEN_MODE": "Modo de visualización de pantalla",
|
||||||
@@ -45,23 +45,23 @@
|
|||||||
|
|
||||||
"VTLANG_UEFI_UTIL": "Utilidades UEFI de Ventoy",
|
"VTLANG_UEFI_UTIL": "Utilidades UEFI de Ventoy",
|
||||||
"VTLANG_UTIL_SHOW_EFI_DRV": "Mostrar controladores EFI",
|
"VTLANG_UTIL_SHOW_EFI_DRV": "Mostrar controladores EFI",
|
||||||
"VTLANG_UTIL_FIX_BLINIT_FAIL": "Reparar la falla de BinitializeLibrary de Windows",
|
"VTLANG_UTIL_FIX_BLINIT_FAIL": "Reparar error BlinitializeLibrary de Windows",
|
||||||
|
|
||||||
"VTLANG_JSON_CHK_JSON": "Comprobar configuración de complemento de json (ventoy.json)",
|
"VTLANG_JSON_CHK_JSON": "Comprobar configuración del complemento de json (ventoy.json)",
|
||||||
"VTLANG_JSON_CHK_CONTROL": "Comprobar configuración de complemento de control global",
|
"VTLANG_JSON_CHK_CONTROL": "Comprobar configuración del complemento de control global",
|
||||||
"VTLANG_JSON_CHK_THEME": "Comprobar configuración de complemento de tema",
|
"VTLANG_JSON_CHK_THEME": "Comprobar configuración del complemento de tema",
|
||||||
"VTLANG_JSON_CHK_AUTOINS": "Comprobar configuración de complemento de auto instalación",
|
"VTLANG_JSON_CHK_AUTOINS": "Comprobar configuración del complemento de autoinstalación",
|
||||||
"VTLANG_JSON_CHK_PERSIST": "Comprobar configuración de complemento de persistencia",
|
"VTLANG_JSON_CHK_PERSIST": "Comprobar configuración del complemento de persistencia",
|
||||||
"VTLANG_JSON_CHK_MENU_ALIAS": "Comprobar configuración de complemento de alias de menú",
|
"VTLANG_JSON_CHK_MENU_ALIAS": "Comprobar configuración del complemento de alias de menú",
|
||||||
"VTLANG_JSON_CHK_MENU_TIP": "Comprobar configuración de complemento de consejo de menú",
|
"VTLANG_JSON_CHK_MENU_TIP": "Comprobar configuración del complemento de consejo de menú",
|
||||||
"VTLANG_JSON_CHK_MENU_CLASS": "Comprobar configuración de complemento de clase de menú",
|
"VTLANG_JSON_CHK_MENU_CLASS": "Comprobar configuración del complemento de clases de menú",
|
||||||
"VTLANG_JSON_CHK_INJECTION": "Comprobar configuración de complemento de inyección",
|
"VTLANG_JSON_CHK_INJECTION": "Comprobar configuración del complemento de inyección",
|
||||||
"VTLANG_JSON_CHK_AUTO_MEMDISK": "Comprobar configuración de complemento de auto memdisk",
|
"VTLANG_JSON_CHK_AUTO_MEMDISK": "Comprobar configuración del complemento auto memdisk",
|
||||||
"VTLANG_JSON_CHK_IMG_LIST": "Comprobar configuración de complemento de lista de imágenes",
|
"VTLANG_JSON_CHK_IMG_LIST": "Comprobar configuración del complemento de lista de imágenes",
|
||||||
"VTLANG_JSON_CHK_IMG_BLIST": "Comprobar configuración de complemento de lista negra de imágenes",
|
"VTLANG_JSON_CHK_IMG_BLIST": "Comprobar configuración del complemento de lista negra de imágenes",
|
||||||
"VTLANG_JSON_CHK_CONF_REPLACE": "Comprobar configuración de complemento de reemplazo de configuración de arranque",
|
"VTLANG_JSON_CHK_CONF_REPLACE": "Comprobar configuración del complemento de reemplazo de configuración de arranque",
|
||||||
"VTLANG_JSON_CHK_DUD": "Comprobar configuración de complemento de dud",
|
"VTLANG_JSON_CHK_DUD": "Comprobar configuración del complemento dud",
|
||||||
"VTLANG_JSON_CHK_PASSWORD": "Comprobar configuración de complemento de contraseñas",
|
"VTLANG_JSON_CHK_PASSWORD": "Comprobar configuración del complemento de contraseñas",
|
||||||
|
|
||||||
"VTLANG_NORMAL_MODE": "Arrancar en modo normal",
|
"VTLANG_NORMAL_MODE": "Arrancar en modo normal",
|
||||||
"VTLANG_WIMBOOT_MODE": "Arrancar en modo wimboot",
|
"VTLANG_WIMBOOT_MODE": "Arrancar en modo wimboot",
|
||||||
@@ -79,20 +79,20 @@
|
|||||||
|
|
||||||
"VTLANG_BROWER_RETURN": "Regresar",
|
"VTLANG_BROWER_RETURN": "Regresar",
|
||||||
|
|
||||||
"VTLANG_ENTER_EXIT": "presiona tecla Entrar para salir",
|
"VTLANG_ENTER_EXIT": "Presiona la tecla Entrar para salir",
|
||||||
"VTLANG_ENTER_REBOOT": "presiona tecla Entrar para reiniciar",
|
"VTLANG_ENTER_REBOOT": "Presiona la tecla Entrar para reiniciar",
|
||||||
"VTLANG_ENTER_CONTINUE": "presiona tecla Entrar para continuar",
|
"VTLANG_ENTER_CONTINUE": "Presiona la tecla Entrar para continuar",
|
||||||
|
|
||||||
"VTLANG_CTRL_TEMP_SET": "Ajustes de control temporales",
|
"VTLANG_CTRL_TEMP_SET": "Ajustes de control temporales",
|
||||||
"VTLANG_WIN11_BYPASS_CHECK": "Saltar comprobación de CPU/TPM/Arranque Seguro al instalar Windows 11",
|
"VTLANG_WIN11_BYPASS_CHECK": "Omitir comprobación de CPU/TPM/SecureBoot al instalar Windows 11",
|
||||||
"VTLANG_WIN11_BYPASS_NRO": "Saltar requerimiento de cuenta en linea al instalar Windows 11",
|
"VTLANG_WIN11_BYPASS_NRO": "Omitir requisito de cuenta en línea al instalar Windows 11",
|
||||||
"VTLANG_LINUX_REMOUNT": "Montar partición de Ventoy después de arrancar Linux",
|
"VTLANG_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_WIN_UEFI_RES_LOCK": "Bloquear la resolución al arrancar Windows/WinPE en modo UEFI",
|
||||||
"VTLANG_UEFI_RES_LOCK_NONE": "None",
|
"VTLANG_UEFI_RES_LOCK_NONE": "Ninguno",
|
||||||
"VTLANG_UEFI_RES_LOCK_MAX": "Highest",
|
"VTLANG_UEFI_RES_LOCK_MAX": "La más alta",
|
||||||
"VTLANG_UEFI_RES_LOCK_1024_768": "Fixed 1024 x 768",
|
"VTLANG_UEFI_RES_LOCK_1024_768": "Fija 1024 x 768",
|
||||||
"VTLANG_UEFI_RES_LOCK_BE1024_768": "At least 1024 x 768",
|
"VTLANG_UEFI_RES_LOCK_BE1024_768": "Al menos 1024 x 768",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
|
|||||||
@@ -88,11 +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_WIN_UEFI_RES_LOCK": "UEFI 부팅 시 Windows/WinPE 해상도 고정",
|
||||||
"VTLANG_UEFI_RES_LOCK_NONE": "None",
|
"VTLANG_UEFI_RES_LOCK_NONE": "고정 안 함",
|
||||||
"VTLANG_UEFI_RES_LOCK_MAX": "Highest",
|
"VTLANG_UEFI_RES_LOCK_MAX": "최고 해상도로 고정",
|
||||||
"VTLANG_UEFI_RES_LOCK_1024_768": "Fixed 1024 x 768",
|
"VTLANG_UEFI_RES_LOCK_1024_768": "1024 x 768로 고정",
|
||||||
"VTLANG_UEFI_RES_LOCK_BE1024_768": "At least 1024 x 768",
|
"VTLANG_UEFI_RES_LOCK_BE1024_768": "1024 x 768 이상으로 고정",
|
||||||
|
|
||||||
|
|
||||||
"MENU_STR_XXX": ""
|
"MENU_STR_XXX": ""
|
||||||
|
|||||||
@@ -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,15 +84,15 @@
|
|||||||
"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": "Lock the resolution when UEFI boot Windows/WinPE",
|
"VTLANG_WIN_UEFI_RES_LOCK": "Zablokuj rozdzielczość podczas bootowania UEFI Windows/WinPE",
|
||||||
"VTLANG_UEFI_RES_LOCK_NONE": "None",
|
"VTLANG_UEFI_RES_LOCK_NONE": "Brak",
|
||||||
"VTLANG_UEFI_RES_LOCK_MAX": "Highest",
|
"VTLANG_UEFI_RES_LOCK_MAX": "Najwyższa",
|
||||||
"VTLANG_UEFI_RES_LOCK_1024_768": "Fixed 1024 x 768",
|
"VTLANG_UEFI_RES_LOCK_1024_768": "Stała 1024 x 768",
|
||||||
"VTLANG_UEFI_RES_LOCK_BE1024_768": "At least 1024 x 768",
|
"VTLANG_UEFI_RES_LOCK_BE1024_768": "Co najmniej 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.
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
|
||||||
@@ -132,6 +191,27 @@ 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
|
||||||
|
|
||||||
|
|
||||||
@@ -271,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",
|
||||||
@@ -1172,13 +1172,13 @@
|
|||||||
"name":"Spanish (Latinoamérica)",
|
"name":"Spanish (Latinoamérica)",
|
||||||
"FontFamily":"Courier New",
|
"FontFamily":"Courier New",
|
||||||
"FontSize":16,
|
"FontSize":16,
|
||||||
"Author":"MELERIX",
|
"Author":"MELERIX, independent-arg",
|
||||||
|
|
||||||
"STR_ERROR":"Error",
|
"STR_ERROR":"Error",
|
||||||
"STR_WARNING":"Advertencia",
|
"STR_WARNING":"Advertencia",
|
||||||
"STR_INFO":"Información",
|
"STR_INFO":"Información",
|
||||||
"STR_INCORRECT_DIR":"¡Por favor, ejecuta bajo el directorio correcto!",
|
"STR_INCORRECT_DIR":"¡Por favor, ejecuta el programa bajo el directorio correcto!",
|
||||||
"STR_INCORRECT_TREE_DIR":"No me ejecutes aquí, por favor descarga el paquete de instalación lanzado, y ejecútalo allí.",
|
"STR_INCORRECT_TREE_DIR":"No me ejecutes aquí. Por favor descarga el paquete de instalación oficial y ejecútalo desde allí.",
|
||||||
"STR_DEVICE":"Dispositivo",
|
"STR_DEVICE":"Dispositivo",
|
||||||
"STR_LOCAL_VER":"Ventoy En Paquete",
|
"STR_LOCAL_VER":"Ventoy En Paquete",
|
||||||
"STR_DISK_VER":"Ventoy En Dispositivo",
|
"STR_DISK_VER":"Ventoy En Dispositivo",
|
||||||
@@ -1189,47 +1189,47 @@
|
|||||||
"STR_INSTALL_TIP":"El dispositivo será formateado y todos los datos se perderán.#@¿Continuar?",
|
"STR_INSTALL_TIP":"El dispositivo será formateado y todos los datos se perderán.#@¿Continuar?",
|
||||||
"STR_INSTALL_TIP2":"El dispositivo será formateado y todos los datos se perderán.#@¿Continuar? (Doble Comprobación)",
|
"STR_INSTALL_TIP2":"El dispositivo será formateado y todos los datos se perderán.#@¿Continuar? (Doble Comprobación)",
|
||||||
"STR_INSTALL_SUCCESS":"¡Felicitaciones!#@Ventoy ha sido instalado exitosamente en el dispositivo.",
|
"STR_INSTALL_SUCCESS":"¡Felicitaciones!#@Ventoy ha sido instalado exitosamente en el dispositivo.",
|
||||||
"STR_INSTALL_FAILED":"Ocurrió un error durante la instalación. Puedes reinsertar el dispositivo USB e intentar de nuevo. Comprueba log.txt para detalles. Si siempre falla, consulta las PF en el sitio web oficial.",
|
"STR_INSTALL_FAILED":"Ocurrió un error durante la instalación. Puedes reinsertar el dispositivo USB e intentar de nuevo. Comprueba log.txt para más detalles. Si siempre falla, consulta las preguntas frecuentes (FAQ) en el sitio web oficial.",
|
||||||
"STR_UPDATE_SUCCESS":"¡Felicitaciones!#@Ventoy ha sido actualizado exitosamente en el dispositivo.",
|
"STR_UPDATE_SUCCESS":"¡Felicitaciones!#@Ventoy ha sido actualizado exitosamente en el dispositivo.",
|
||||||
"STR_UPDATE_FAILED":"Ocurrió un error durante la actualización. Puedes reinsertar el dispositivo USB e intentar de nuevo. Comprueba log.txt para detalles. Si siempre falla, consulta las PF en el sitio web oficial.",
|
"STR_UPDATE_FAILED":"Ocurrió un error durante la actualización. Puedes reinsertar el dispositivo USB e intentar de nuevo. Comprueba log.txt para más detalles. Si siempre falla, consulta las preguntas frecuentes (FAQ) en el sitio web oficial.",
|
||||||
"STR_WAIT_PROCESS":"Un hilo está ejecutándose, por favor espera...",
|
"STR_WAIT_PROCESS":"Un hilo del sistema está ejecutándose, por favor espera...",
|
||||||
"STR_MENU_OPTION":"Opción",
|
"STR_MENU_OPTION":"Opción",
|
||||||
"STR_MENU_SECURE_BOOT":"Soporte De Arranque Seguro",
|
"STR_MENU_SECURE_BOOT":"Soporte de arranque seguro",
|
||||||
"STR_MENU_PART_CFG":"Configuración De Partición",
|
"STR_MENU_PART_CFG":"Configuración de partición",
|
||||||
"STR_BTN_OK":"Aceptar",
|
"STR_BTN_OK":"Aceptar",
|
||||||
"STR_BTN_CANCEL":"Cancelar",
|
"STR_BTN_CANCEL":"Cancelar",
|
||||||
"STR_PRESERVE_SPACE":"Preservar algo de espacio al final del dispositivo",
|
"STR_PRESERVE_SPACE":"Preservar algo de espacio al final del dispositivo",
|
||||||
"STR_SPACE_VAL_INVALID":"Valor inválido para espacio reservado",
|
"STR_SPACE_VAL_INVALID":"Valor inválido para el espacio reservado",
|
||||||
"STR_MENU_CLEAR":"Limpiar Ventoy",
|
"STR_MENU_CLEAR":"Limpiar Ventoy",
|
||||||
"STR_CLEAR_SUCCESS":"Ventoy ha sido removido exitosamente desde el dispositivo.",
|
"STR_CLEAR_SUCCESS":"Ventoy ha sido eliminado exitosamente del dispositivo.",
|
||||||
"STR_CLEAR_FAILED":"Ocurrió un error al remover Ventoy del dispositivo. Puedes reinsertar el dispositivo USB e intentar de nuevo. Comprueba log.txt para detalles.",
|
"STR_CLEAR_FAILED":"Ocurrió un error al eliminar Ventoy del dispositivo. Puedes reinsertar el dispositivo USB e intentar de nuevo. Comprueba log.txt para más detalles.",
|
||||||
"STR_MENU_PART_STYLE":"Estilo De Partición",
|
"STR_MENU_PART_STYLE":"Estilo de partición",
|
||||||
"STR_DISK_2TB_MBR_ERROR":"Por favor selecciona GPT para dispositivos sobre 2TB",
|
"STR_DISK_2TB_MBR_ERROR":"Por favor selecciona GPT para dispositivos de más de 2TB",
|
||||||
"STR_SHOW_ALL_DEV":"Mostrar Todos Los Dispositivos",
|
"STR_SHOW_ALL_DEV":"Mostrar todos los dispositivos",
|
||||||
"STR_PART_ALIGN_4KB":"Alinear particiones con 4KB",
|
"STR_PART_ALIGN_4KB":"Alinear particiones a 4KB",
|
||||||
"STR_WEB_COMMUNICATION_ERR":"Error de comunicación:",
|
"STR_WEB_COMMUNICATION_ERR":"Error de comunicación:",
|
||||||
"STR_WEB_REMOTE_ABNORMAL":"Error de comunicación: anormal remoto",
|
"STR_WEB_REMOTE_ABNORMAL":"Error de comunicación: anomalía remoto",
|
||||||
"STR_WEB_REQUEST_TIMEOUT":"Error de comunicación: Tiempo de espera agotado",
|
"STR_WEB_REQUEST_TIMEOUT":"Error de comunicación: tiempo de espera agotado",
|
||||||
"STR_WEB_SERVICE_UNAVAILABLE":"Error de comunicación: Servicio No Disponible",
|
"STR_WEB_SERVICE_UNAVAILABLE":"Error de comunicación: servicio no disponible",
|
||||||
"STR_WEB_TOKEN_MISMATCH":" Estado del daemon actualizado, por favor reintenta más tarde.",
|
"STR_WEB_TOKEN_MISMATCH":" Estado del daemon actualizado, por favor reintenta más tarde.",
|
||||||
"STR_WEB_SERVICE_BUSY":" El servicio está ocupado, por favor reintenta más tarde.",
|
"STR_WEB_SERVICE_BUSY":" El servicio está ocupado, por favor reintenta más tarde.",
|
||||||
"STR_MENU_VTSI_CREATE":"Generar Archivo VTSI",
|
"STR_MENU_VTSI_CREATE":"Generar archivo VTSI",
|
||||||
"STR_VTSI_CREATE_TIP":"Esta vez no se escribirá al dispositivo, pero solo generará un archivo VTSI#@¿Continuar?",
|
"STR_VTSI_CREATE_TIP":"Esta acción no escribirá en el dispositivo, sólo generará un archivo VTSI.#@¿Continuar?",
|
||||||
"STR_VTSI_CREATE_SUCCESS":"¡Archivo VTSI creado exitosamente!#@Puedes usar Rufus(3.15+) para escribirlo al dispositivo a fin de completar la instalación de Ventoy.",
|
"STR_VTSI_CREATE_SUCCESS":"¡Archivo VTSI creado exitosamente!#@Puedes usar Rufus(3.15+) para escribirlo al dispositivo a fin de completar la instalación de Ventoy.",
|
||||||
"STR_VTSI_CREATE_FAILED":"Fallo en el archivo VTSI creado.",
|
"STR_VTSI_CREATE_FAILED":"Error al crear el archivo VTSI.",
|
||||||
"STR_MENU_PART_RESIZE":"Instalación no destructiva",
|
"STR_MENU_PART_RESIZE":"Instalación no destructiva",
|
||||||
"STR_PART_RESIZE_TIP":"Ventoy intentará una instalación no destructiva si es posible. #@¿Continuar?",
|
"STR_PART_RESIZE_TIP":"Ventoy intentará una instalación no destructiva si es posible. #@¿Continuar?",
|
||||||
"STR_PART_RESIZE_SUCCESS":"¡Felicitaciones!#@La instalación no destructiva de Ventoy a finalizado exitosamente.",
|
"STR_PART_RESIZE_SUCCESS":"¡Felicitaciones!#@La instalación no destructiva de Ventoy a finalizado exitosamente.",
|
||||||
"STR_PART_RESIZE_FAILED":"Instalación no destructiva fallida, Comprueba log.txt para detalles.",
|
"STR_PART_RESIZE_FAILED":"Instalación no destructiva fallida, Comprueba log.txt para detalles.",
|
||||||
"STR_PART_RESIZE_UNSUPPORTED":"Instalación no destructiva de Ventoy detenida porque algunas condiciones no se pueden cumplir. Comprueba log.txt para detalles.",
|
"STR_PART_RESIZE_UNSUPPORTED":"Instalación no destructiva de Ventoy detenida porque algunas condiciones no se pueden cumplir. Comprueba log.txt para más detalles.",
|
||||||
"STR_INSTALL_YES_TIP1":"Advertencia: ¡Los datos se perderán!",
|
"STR_INSTALL_YES_TIP1":"Advertencia: ¡Los datos se perderán!",
|
||||||
"STR_INSTALL_YES_TIP2":"Por favor ingresa YES en el cuadro de texto a continuación para confirmar que realmente quieres realizar una instalación nueva en vez de actualizar.",
|
"STR_INSTALL_YES_TIP2":"Por favor ingresa YES en el cuadro de texto a continuación para confirmar que realmente quieres realizar una instalación nueva en vez de actualizar.",
|
||||||
"STR_PART_VENTOY_FS":"Sistema de archivos para partición de Ventoy",
|
"STR_PART_VENTOY_FS":"Sistema de archivos para partición de Ventoy",
|
||||||
"STR_PART_FS":"Sistema de archivos",
|
"STR_PART_FS":"Sistema de archivos",
|
||||||
"STR_PART_CLUSTER":"Tamaño de cluster",
|
"STR_PART_CLUSTER":"Tamaño del clúster",
|
||||||
"STR_PART_CLUSTER_DEFAULT":"Valor predeterminado del sistema",
|
"STR_PART_CLUSTER_DEFAULT":"Valor predeterminado del sistema",
|
||||||
"STR_DONATE":"Donar",
|
"STR_DONATE":"Donar",
|
||||||
"STR_4KN_UNSUPPORTED":"Actualmente Ventoy no soporta dispositivos nativos 4K.",
|
"STR_4KN_UNSUPPORTED":"Actualmente Ventoy no es compatible con dispositivos nativos 4K.",
|
||||||
|
|
||||||
"STRXXX":""
|
"STRXXX":""
|
||||||
},
|
},
|
||||||
@@ -3043,14 +3043,14 @@
|
|||||||
"STR_PART_RESIZE_SUCCESS":"Onnittelut!#@Ventoyn ei-tuhoisa asennus saapui päätökseen onnistuneesti.",
|
"STR_PART_RESIZE_SUCCESS":"Onnittelut!#@Ventoyn ei-tuhoisa asennus saapui päätökseen onnistuneesti.",
|
||||||
"STR_PART_RESIZE_FAILED":"Ei-tuhoisa asennusmuoto epäonnistui, tarkista log.txt nähdäksesi yksityiskohtaiset tiedot.",
|
"STR_PART_RESIZE_FAILED":"Ei-tuhoisa asennusmuoto epäonnistui, tarkista log.txt nähdäksesi yksityiskohtaiset tiedot.",
|
||||||
"STR_PART_RESIZE_UNSUPPORTED":"Ventoyn ei-tuhoisa asennus pysähtyi koska jotkut ehdot eivät täyttyneet. Tarkista log.txt nähdäksesi yksityiskohdat.",
|
"STR_PART_RESIZE_UNSUPPORTED":"Ventoyn ei-tuhoisa asennus pysähtyi koska jotkut ehdot eivät täyttyneet. Tarkista log.txt nähdäksesi yksityiskohdat.",
|
||||||
"STR_INSTALL_YES_TIP1":"Warning: Data will be lost!",
|
"STR_INSTALL_YES_TIP1":"Varoitus: Data menetetään!",
|
||||||
"STR_INSTALL_YES_TIP2":"Please enter YES in the text box below to confirm that you indeed want to do a fresh install instead of upgrade.",
|
"STR_INSTALL_YES_TIP2":"Kirjoita YES alla olevaan tekstikenttään vahvistaaksesi että haluat tehdä uuden asennuksen päivityksen sijaan.",
|
||||||
"STR_PART_VENTOY_FS":"File System For Ventoy Partition",
|
"STR_PART_VENTOY_FS":"Ventoy -osion tiedostojärjestelmä",
|
||||||
"STR_PART_FS":"File System",
|
"STR_PART_FS":"Tiedostojärjestelmä",
|
||||||
"STR_PART_CLUSTER":"Cluster Size",
|
"STR_PART_CLUSTER":"Klusterin koko",
|
||||||
"STR_PART_CLUSTER_DEFAULT":"System Default Value",
|
"STR_PART_CLUSTER_DEFAULT":"Järjestelmän oletusarvo",
|
||||||
"STR_DONATE":"Lahjoittaa",
|
"STR_DONATE":"Lahjoittaa",
|
||||||
"STR_4KN_UNSUPPORTED":"Currently Ventoy does not support 4K native devices.",
|
"STR_4KN_UNSUPPORTED":"Tällä hetkellä Ventoy ei tue 4K laitteita.",
|
||||||
|
|
||||||
"STRXXX":""
|
"STRXXX":""
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -559,6 +559,8 @@ void ventoy_data_default_control(data_control *data)
|
|||||||
data->secondary_menu_timeout = 0;
|
data->secondary_menu_timeout = 0;
|
||||||
data->win11_bypass_check = 1;
|
data->win11_bypass_check = 1;
|
||||||
data->win11_bypass_nro = 1;
|
data->win11_bypass_nro = 1;
|
||||||
|
data->uefi_res_lock = 3;
|
||||||
|
data->uefi_sb_policy = 0;
|
||||||
|
|
||||||
strlcpy(data->default_kbd_layout, "QWERTY_USA");
|
strlcpy(data->default_kbd_layout, "QWERTY_USA");
|
||||||
strlcpy(data->menu_language, "en_US");
|
strlcpy(data->menu_language, "en_US");
|
||||||
@@ -584,6 +586,8 @@ int ventoy_data_cmp_control(data_control *data1, data_control *data2)
|
|||||||
data1->password_asterisk != data2->password_asterisk ||
|
data1->password_asterisk != data2->password_asterisk ||
|
||||||
data1->secondary_menu != data2->secondary_menu ||
|
data1->secondary_menu != data2->secondary_menu ||
|
||||||
data1->menu_timeout != data2->menu_timeout ||
|
data1->menu_timeout != data2->menu_timeout ||
|
||||||
|
data1->uefi_res_lock != data2->uefi_res_lock ||
|
||||||
|
data1->uefi_sb_policy != data2->uefi_sb_policy ||
|
||||||
data1->secondary_menu_timeout != data2->secondary_menu_timeout)
|
data1->secondary_menu_timeout != data2->secondary_menu_timeout)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
@@ -633,6 +637,8 @@ int ventoy_data_save_control(data_control *data, const char *title, char *buf, i
|
|||||||
VTOY_JSON_FMT_CTRL_INT(L2, "VTOY_SECONDARY_BOOT_MENU", secondary_menu);
|
VTOY_JSON_FMT_CTRL_INT(L2, "VTOY_SECONDARY_BOOT_MENU", secondary_menu);
|
||||||
VTOY_JSON_FMT_CTRL_INT(L2, "VTOY_SHOW_PASSWORD_ASTERISK", password_asterisk);
|
VTOY_JSON_FMT_CTRL_INT(L2, "VTOY_SHOW_PASSWORD_ASTERISK", password_asterisk);
|
||||||
VTOY_JSON_FMT_CTRL_INT(L2, "VTOY_MENU_TIMEOUT", menu_timeout);
|
VTOY_JSON_FMT_CTRL_INT(L2, "VTOY_MENU_TIMEOUT", menu_timeout);
|
||||||
|
VTOY_JSON_FMT_CTRL_INT(L2, "VTOY_WIN_UEFI_RES_LOCK", uefi_res_lock);
|
||||||
|
VTOY_JSON_FMT_CTRL_INT(L2, "VTOY_SECURE_BOOT_POLICY", uefi_sb_policy);
|
||||||
VTOY_JSON_FMT_CTRL_INT(L2, "VTOY_SECONDARY_TIMEOUT", secondary_menu_timeout);
|
VTOY_JSON_FMT_CTRL_INT(L2, "VTOY_SECONDARY_TIMEOUT", secondary_menu_timeout);
|
||||||
|
|
||||||
VTOY_JSON_FMT_CTRL_STRN(L2, "VTOY_DEFAULT_KBD_LAYOUT", default_kbd_layout);
|
VTOY_JSON_FMT_CTRL_STRN(L2, "VTOY_DEFAULT_KBD_LAYOUT", default_kbd_layout);
|
||||||
@@ -682,6 +688,8 @@ int ventoy_data_json_control(data_control *ctrl, char *buf, int buflen)
|
|||||||
VTOY_JSON_FMT_SINT("secondary_menu", ctrl->secondary_menu);
|
VTOY_JSON_FMT_SINT("secondary_menu", ctrl->secondary_menu);
|
||||||
VTOY_JSON_FMT_SINT("password_asterisk", ctrl->password_asterisk);
|
VTOY_JSON_FMT_SINT("password_asterisk", ctrl->password_asterisk);
|
||||||
VTOY_JSON_FMT_SINT("menu_timeout", ctrl->menu_timeout);
|
VTOY_JSON_FMT_SINT("menu_timeout", ctrl->menu_timeout);
|
||||||
|
VTOY_JSON_FMT_SINT("uefi_res_lock", ctrl->uefi_res_lock);
|
||||||
|
VTOY_JSON_FMT_SINT("uefi_sb_policy", ctrl->uefi_sb_policy);
|
||||||
VTOY_JSON_FMT_SINT("secondary_menu_timeout", ctrl->secondary_menu_timeout);
|
VTOY_JSON_FMT_SINT("secondary_menu_timeout", ctrl->secondary_menu_timeout);
|
||||||
VTOY_JSON_FMT_STRN("default_kbd_layout", ctrl->default_kbd_layout);
|
VTOY_JSON_FMT_STRN("default_kbd_layout", ctrl->default_kbd_layout);
|
||||||
VTOY_JSON_FMT_STRN("menu_language", ctrl->menu_language);
|
VTOY_JSON_FMT_STRN("menu_language", ctrl->menu_language);
|
||||||
@@ -751,6 +759,8 @@ static int ventoy_api_save_control(struct mg_connection *conn, VTOY_JSON *json)
|
|||||||
VTOY_JSON_INT("secondary_menu", ctrl->secondary_menu);
|
VTOY_JSON_INT("secondary_menu", ctrl->secondary_menu);
|
||||||
VTOY_JSON_INT("password_asterisk", ctrl->password_asterisk);
|
VTOY_JSON_INT("password_asterisk", ctrl->password_asterisk);
|
||||||
VTOY_JSON_INT("menu_timeout", ctrl->menu_timeout);
|
VTOY_JSON_INT("menu_timeout", ctrl->menu_timeout);
|
||||||
|
VTOY_JSON_INT("uefi_res_lock", ctrl->uefi_res_lock);
|
||||||
|
VTOY_JSON_INT("uefi_sb_policy", ctrl->uefi_sb_policy);
|
||||||
VTOY_JSON_INT("secondary_menu_timeout", ctrl->secondary_menu_timeout);
|
VTOY_JSON_INT("secondary_menu_timeout", ctrl->secondary_menu_timeout);
|
||||||
|
|
||||||
VTOY_JSON_STR("default_image", ctrl->default_image);
|
VTOY_JSON_STR("default_image", ctrl->default_image);
|
||||||
@@ -4164,6 +4174,14 @@ static int ventoy_parse_control(VTOY_JSON *json, void *p)
|
|||||||
{
|
{
|
||||||
CONTROL_PARSE_INT_DEF_0(child, data->sort_casesensitive);
|
CONTROL_PARSE_INT_DEF_0(child, data->sort_casesensitive);
|
||||||
}
|
}
|
||||||
|
else if (strcmp(child->pcName, "VTOY_WIN_UEFI_RES_LOCK") == 0)
|
||||||
|
{
|
||||||
|
CONTROL_PARSE_INT_DEF_3(child, data->uefi_res_lock);
|
||||||
|
}
|
||||||
|
else if (strcmp(child->pcName, "VTOY_SECURE_BOOT_POLICY") == 0)
|
||||||
|
{
|
||||||
|
CONTROL_PARSE_INT_DEF_0(child, data->uefi_sb_policy);
|
||||||
|
}
|
||||||
else if (strcmp(child->pcName, "VTOY_MAX_SEARCH_LEVEL") == 0)
|
else if (strcmp(child->pcName, "VTOY_MAX_SEARCH_LEVEL") == 0)
|
||||||
{
|
{
|
||||||
if (strcmp(child->unData.pcStrVal, "max") == 0)
|
if (strcmp(child->unData.pcStrVal, "max") == 0)
|
||||||
|
|||||||
@@ -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];
|
||||||
@@ -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] >= '0' && node->unData.pcStrVal[0] < '3') val = node->unData.pcStrVal[0] - '0'
|
||||||
|
|
||||||
#define VTOY_JSON_INT(key, val) vtoy_json_get_int(json, key, &val)
|
#define VTOY_JSON_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
|
20260625 19:36:29
|
||||||
@@ -1 +1 @@
|
|||||||
ar_ARbn_BNcs_CZde_DEel_GRen_USes_ESfr_FRhi_HIhr_HRhu_HUid_IDit_ITja_JPka_GEko_KRpl_PLpt_BRpt_PTru_RUsr_RSta_INtr_TRuk_UAzh_CNzh_TW
|
ar_ARbn_BNcs_CZde_DEel_GRen_USes_ESfa_IRfr_FRhi_HIhr_HRhu_HUid_IDit_ITja_JPka_GEko_KRlg_UGpl_PLpt_BRpt_PTru_RUsl_SIsr_RSta_INtr_TRuk_UAvi_VNzh_CNzh_TW
|
||||||
@@ -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>
|
||||||
|
|
||||||
@@ -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">20260625 19:36:29</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>
|
||||||
@@ -777,10 +780,10 @@
|
|||||||
<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=331"></script>
|
||||||
|
|
||||||
<script src="/static/js/jquery.vtoy.alert.js?v=253"></script>
|
<script src="/static/js/jquery.vtoy.alert.js?v=331"></script>
|
||||||
<script src="/static/js/vtoy.js?v=253"></script>
|
<script src="/static/js/vtoy.js?v=331"></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 -->
|
||||||
|
|||||||
@@ -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
|
||||||
@@ -119,6 +119,79 @@
|
|||||||
</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">
|
||||||
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_WIN11_BYPASS_CHECK
|
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_WIN11_BYPASS_CHECK
|
||||||
@@ -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/>
|
||||||
@@ -187,18 +260,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_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/>
|
||||||
@@ -207,8 +282,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 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>
|
||||||
@@ -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>
|
||||||
@@ -426,57 +489,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<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 -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<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_BOOT_MENU
|
<h3 class="box-title" style="font-size: 14px;font-weight: bold;">VTOY_SECONDARY_BOOT_MENU
|
||||||
@@ -491,26 +503,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_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>
|
||||||
@@ -532,26 +533,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_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>
|
||||||
@@ -1107,8 +1097,10 @@
|
|||||||
|
|
||||||
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());
|
||||||
@@ -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
|
||||||
@@ -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,
|
||||||
|
|||||||
@@ -934,6 +934,9 @@ 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;
|
||||||
@@ -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);
|
||||||
|
|||||||
41
SecureBoot.md
Normal file
41
SecureBoot.md
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
|
||||||
|
# Ventoy Secure Boot Policy
|
||||||
|
|
||||||
|
## Why shim
|
||||||
|
Ventoy is based on grub2 which is in GPL license, so it will not directly get signed with UEFI Certificate.
|
||||||
|
Like most Linux distros, Ventoy grub2 must be launched by shim when Secure Boot is enabled.
|
||||||
|
Different is that, Ventoy does not have its own shim and must make use of a third-part shim.
|
||||||
|
When boot Ventoy with Secure Boot enabled, the shim will not directly boot Ventoy grub because Ventoy grub is not signed with the shim embedded Certificate.
|
||||||
|
The shim will open the MokManager and we must enroll Ventoy's Secure Boot Key and reboot, then the shim will accept Ventoy grub and boot it.
|
||||||
|
|
||||||
|
## Which shim
|
||||||
|
I choose a shim file from Rocky Linux because it was signed with both UEFI CA 2011 and UEFI CA 2023.
|
||||||
|
|
||||||
|
## Policy
|
||||||
|
Now you can boot into Ventoy after you enroll Ventoy Secure Boot Key.
|
||||||
|
Ventoy provides two secure boot policies.
|
||||||
|
1. Fully bypass secure boot.
|
||||||
|
This mode will bypass secure boot which means it will boot any EFI files without check.
|
||||||
|
This mode enables all features of Ventoy and is the most convenient to use.
|
||||||
|
However, it also carries certain risks, as the Secure Boot mechanism is effectively bypassed.
|
||||||
|
You must therefore be fully aware of the risks involved and decide whether to use this mode according to your actual circumstances.
|
||||||
|
|
||||||
|
3. Follow UEFI firmware secure boot policy.
|
||||||
|
This mode will use the original UEFI secure boot policy to check every EFI file before boot it.
|
||||||
|
This means you can only boot these EFI files which are signed with UEFI CA (e.g. Windows bootmgr, another shim).
|
||||||
|
In this mode, certain features of Ventoy are disabled (such as grub2boot mode, insmod, etc.), but this mode is the most secure.
|
||||||
|
|
||||||
|
Policy 1 is the default policy by now.
|
||||||
|
|
||||||
|
If you want to use policy 2, you can set `VTOY_SECURE_BOOT_POLICY` to `1` in Ventoy global control plugin as follows:
|
||||||
|
(PS: `VTOY_SECURE_BOOT_POLICY` value `0` and `1` correspond to Policy 1 and Policy 2 respectively)
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"control":[
|
||||||
|
{ "VTOY_SECURE_BOOT_POLICY": "1" }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
58
vtoyjump/build.bat
Normal file
58
vtoyjump/build.bat
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
@echo off
|
||||||
|
chcp 65001
|
||||||
|
echo ==============================================
|
||||||
|
echo VS 命令行双架构编译脚本
|
||||||
|
echo ==============================================
|
||||||
|
|
||||||
|
:: ====================== 【必须改这里】======================
|
||||||
|
:: 1. 你的 VS 版本对应的 VsDevCmd.bat 路径(看下面的路径对照表)
|
||||||
|
set "VS_DEV_CMD=%VS120COMNTOOLS%VsDevCmd.bat"
|
||||||
|
:: 2. 你的 VS 解决方案文件名(.sln)
|
||||||
|
set "SLN_FILE=vtoyjump.sln"
|
||||||
|
:: ==========================================================
|
||||||
|
|
||||||
|
:: 初始化VS编译环境(必须第一步)
|
||||||
|
echo 正在初始化 VS 编译环境...
|
||||||
|
call "%VS_DEV_CMD%" -no_logo
|
||||||
|
if %errorlevel% neq 0 (
|
||||||
|
echo 错误:VS环境初始化失败!检查路径是否正确
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
:: ============== 编译 Release Win32 (x86) ==============
|
||||||
|
echo.
|
||||||
|
echo 正在编译:Release Win32
|
||||||
|
MSBuild "%SLN_FILE%" /t:Build /p:Configuration=Release;Platform=Win32 /m
|
||||||
|
if %errorlevel% neq 0 (
|
||||||
|
echo 编译 Release Win32 失败!
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
:: ============== 编译 Release x64 ==============
|
||||||
|
echo.
|
||||||
|
echo 正在编译:Release x64
|
||||||
|
MSBuild "%SLN_FILE%" /t:Build /p:Configuration=Release;Platform=x64 /m
|
||||||
|
if %errorlevel% neq 0 (
|
||||||
|
echo 编译 Release x64 失败!
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
del ..\INSTALL\ventoy\vtoyjump32.exe
|
||||||
|
del ..\INSTALL\ventoy\vtoyjump64.exe
|
||||||
|
|
||||||
|
copy Release\vtoyjump32.exe ..\INSTALL\ventoy\vtoyjump32.exe
|
||||||
|
copy x64\Release\vtoyjump64.exe ..\INSTALL\ventoy\vtoyjump64.exe
|
||||||
|
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo ==============================================
|
||||||
|
echo ✅ 2架构编译完成!
|
||||||
|
echo ==============================================
|
||||||
|
echo.
|
||||||
|
pause
|
||||||
|
|
||||||
|
|
||||||
@@ -2849,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] == '/')
|
||||||
@@ -2902,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)
|
||||||
{
|
{
|
||||||
@@ -2936,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);
|
||||||
|
|||||||
Reference in New Issue
Block a user