Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dadigang
Ventoy
Commits
f4bbec65
Commit
f4bbec65
authored
Mar 28, 2021
by
longpanda
Browse files
1.0.39 release
parent
58d387f7
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
148 additions
and
12 deletions
+148
-12
EDK2/edk2_mod/edk2-edk2-stable201911/MdeModulePkg/Application/Ventoy/VentoyProtocol.c
...le201911/MdeModulePkg/Application/Ventoy/VentoyProtocol.c
+6
-2
GRUB2/MOD_SRC/grub-2.04/grub-core/normal/menu.c
GRUB2/MOD_SRC/grub-2.04/grub-core/normal/menu.c
+11
-7
IMG/cpio/ventoy/hook/debian/kerio-disk.sh
IMG/cpio/ventoy/hook/debian/kerio-disk.sh
+79
-0
IMG/cpio/ventoy/hook/debian/kerio-hook.sh
IMG/cpio/ventoy/hook/debian/kerio-hook.sh
+20
-0
IMG/cpio/ventoy/hook/debian/ventoy-hook.sh
IMG/cpio/ventoy/hook/debian/ventoy-hook.sh
+3
-0
IMG/cpio/ventoy/hook/manjaro/ventoy-disk.sh
IMG/cpio/ventoy/hook/manjaro/ventoy-disk.sh
+6
-1
IMG/vtloopex/kerio/vtloopex/dm-mod/3.16.0-k5-kerio-amd64/64/dm-mod.ko.xz
...rio/vtloopex/dm-mod/3.16.0-k5-kerio-amd64/64/dm-mod.ko.xz
+0
-0
INSTALL/grub/grub.cfg
INSTALL/grub/grub.cfg
+1
-1
IPXE/ipxe_mod_code/ipxe-3fe683e/src/arch/x86/core/ventoy_vdisk.c
...xe_mod_code/ipxe-3fe683e/src/arch/x86/core/ventoy_vdisk.c
+22
-1
LANGUAGES/languages.ini
LANGUAGES/languages.ini
+0
-0
No files found.
EDK2/edk2_mod/edk2-edk2-stable201911/MdeModulePkg/Application/Ventoy/VentoyProtocol.c
View file @
f4bbec65
...
@@ -475,7 +475,11 @@ EFI_STATUS EFIAPI ventoy_block_io_read
...
@@ -475,7 +475,11 @@ EFI_STATUS EFIAPI ventoy_block_io_read
}
}
VirtSec
=
g_chain
->
virt_img_size_in_bytes
/
2048
;
VirtSec
=
g_chain
->
virt_img_size_in_bytes
/
2048
;
if
(
Lba
+
secNum
>
VirtSec
)
if
(
Lba
>=
VirtSec
)
{
return
EFI_SUCCESS
;
}
else
if
(
Lba
+
secNum
>
VirtSec
)
{
{
secNum
=
VirtSec
-
Lba
;
secNum
=
VirtSec
-
Lba
;
}
}
...
...
GRUB2/MOD_SRC/grub-2.04/grub-core/normal/menu.c
View file @
f4bbec65
...
@@ -42,6 +42,7 @@ int g_ventoy_last_entry = -1;
...
@@ -42,6 +42,7 @@ int g_ventoy_last_entry = -1;
int
g_ventoy_suppress_esc
=
0
;
int
g_ventoy_suppress_esc
=
0
;
int
g_ventoy_menu_esc
=
0
;
int
g_ventoy_menu_esc
=
0
;
int
g_ventoy_fn_mutex
=
0
;
int
g_ventoy_fn_mutex
=
0
;
int
g_ventoy_terminal_output
=
0
;
/* Time to delay after displaying an error message about a default/fallback
/* Time to delay after displaying an error message about a default/fallback
entry failing to boot. */
entry failing to boot. */
...
@@ -871,15 +872,18 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
...
@@ -871,15 +872,18 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
}
}
break
;
break
;
case
GRUB_TERM_KEY_F7
:
case
GRUB_TERM_KEY_F7
:
case
'7'
:
cmdstr
=
grub_env_get
(
"VTOY_F7_CMD"
);
if
(
cmdstr
)
{
menu_fini
();
menu_fini
();
grub_script_execute_sourcecode
(
cmdstr
);
if
(
g_ventoy_terminal_output
==
0
)
goto
refresh
;
{
grub_script_execute_sourcecode
(
"terminal_output console"
);
g_ventoy_terminal_output
=
1
;
}
}
break
;
else
{
grub_script_execute_sourcecode
(
"terminal_output gfxterm"
);
g_ventoy_terminal_output
=
0
;
}
goto
refresh
;
case
GRUB_TERM_KEY_F1
:
case
GRUB_TERM_KEY_F1
:
case
'1'
:
case
'1'
:
menu_fini
();
menu_fini
();
...
...
IMG/cpio/ventoy/hook/debian/kerio-disk.sh
0 → 100644
View file @
f4bbec65
#!/ventoy/busybox/sh
#************************************************************************************
# Copyright (c) 2020, 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/>.
#
#************************************************************************************
.
/ventoy/hook/ventoy-hook-lib.sh
if
is_ventoy_hook_finished
;
then
exit
0
fi
vtlog
"#######
$0
$*
########"
VTPATH_OLD
=
$PATH
;
PATH
=
$BUSYBOX_PATH
:
$VTOY_PATH
/tool:
$PATH
ventoy_os_install_dmsetup_by_ko
()
{
vtlog
"ventoy_os_install_dmsetup_by_ko
$1
"
vtVer
=
$(
uname
-r
)
if
uname
-m
|
$GREP
-q
64
;
then
vtBit
=
64
else
vtBit
=
32
fi
ventoy_extract_vtloopex
$1
kerio
vtLoopExDir
=
$VTOY_PATH
/vtloopex/kerio/vtloopex
if
[
-e
$vtLoopExDir
/dm-mod/
$vtVer
/
$vtBit
/dm-mod.ko.xz
]
;
then
$BUSYBOX_PATH
/xz
-d
$vtLoopExDir
/dm-mod/
$vtVer
/
$vtBit
/dm-mod.ko.xz
insmod
$vtLoopExDir
/dm-mod/
$vtVer
/
$vtBit
/dm-mod.ko
fi
}
wait_for_usb_disk_ready
vtdiskname
=
$(
get_ventoy_disk_name
)
if
[
"
$vtdiskname
"
=
"unknown"
]
;
then
vtlog
"ventoy disk not found"
PATH
=
$VTPATH_OLD
exit
0
fi
if
echo
$vtdiskname
|
$EGREP
-q
"nvme|mmc|nbd"
;
then
ventoy_os_install_dmsetup_by_ko
"
${
vtdiskname
}
p2"
else
ventoy_os_install_dmsetup_by_ko
"
${
vtdiskname
}
2"
fi
ventoy_udev_disk_common_hook
"
${
vtdiskname
#/dev/
}
2"
"noreplace"
blkdev_num
=
$(
$VTOY_PATH
/tool/dmsetup
ls
|
grep
ventoy |
sed
's/.*(\([0-9][0-9]*\),.*\([0-9][0-9]*\).*/\1:\2/'
)
vtDM
=
$(
ventoy_find_dm_id
${
blkdev_num
}
)
vtlog
"/dev/
$vtDM
"
mount
-t
iso9660 /dev/
$vtDM
/cdrom
modprobe squashfs
echo
"/dev/
$vtDM
"
>
/ventoy/vtDM
PATH
=
$VTPATH_OLD
set_ventoy_hook_finish
IMG/cpio/ventoy/hook/debian/kerio-hook.sh
0 → 100644
View file @
f4bbec65
#!/ventoy/busybox/sh
#************************************************************************************
# Copyright (c) 2020, 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/>.
#
#************************************************************************************
$SED
"/for drive in/i
\
$BUSYBOX_PATH
/sh
$VTOY_PATH
/hook/debian/kerio-disk.sh >/dev/null 2>&1; cat /ventoy/vtDM; exit 0"
-i
/installer/install_init
IMG/cpio/ventoy/hook/debian/ventoy-hook.sh
View file @
f4bbec65
...
@@ -86,6 +86,9 @@ ventoy_get_debian_distro() {
...
@@ -86,6 +86,9 @@ ventoy_get_debian_distro() {
fi
fi
fi
fi
if
[
-e
/opt/kerio
]
;
then
echo
'kerio'
;
return
fi
echo
'default'
echo
'default'
...
...
IMG/cpio/ventoy/hook/manjaro/ventoy-disk.sh
View file @
f4bbec65
...
@@ -49,7 +49,12 @@ done
...
@@ -49,7 +49,12 @@ done
if
[
-n
"
$1
"
]
;
then
if
[
-n
"
$1
"
]
;
then
vtlog
"ln -s /dev/
$vtDM
$1
"
vtlog
"ln -s /dev/
$vtDM
$1
"
if
[
-e
"
$1
"
]
;
then
vtlog
"
$1
already exist"
else
ln
-s
/dev/
$vtDM
"
$1
"
ln
-s
/dev/
$vtDM
"
$1
"
fi
else
else
vtLABEL
=
$(
$BUSYBOX_PATH
/blkid /dev/
$vtDM
|
$SED
's/.*LABEL="\([^"]*\)".*/\1/'
)
vtLABEL
=
$(
$BUSYBOX_PATH
/blkid /dev/
$vtDM
|
$SED
's/.*LABEL="\([^"]*\)".*/\1/'
)
vtlog
"vtLABEL is
$vtLABEL
"
vtlog
"vtLABEL is
$vtLABEL
"
...
...
IMG/vtloopex/kerio/vtloopex/dm-mod/3.16.0-k5-kerio-amd64/64/dm-mod.ko.xz
0 → 100644
View file @
f4bbec65
File added
INSTALL/grub/grub.cfg
View file @
f4bbec65
...
@@ -1608,7 +1608,7 @@ function img_unsupport_menuentry {
...
@@ -1608,7 +1608,7 @@ function img_unsupport_menuentry {
#############################################################
#############################################################
#############################################################
#############################################################
set VENTOY_VERSION="1.0.3
8
"
set VENTOY_VERSION="1.0.3
9
"
#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
...
...
IPXE/ipxe_mod_code/ipxe-3fe683e/src/arch/x86/core/ventoy_vdisk.c
View file @
f4bbec65
...
@@ -402,6 +402,19 @@ int ventoy_vdisk_read(struct san_device *sandev, uint64_t lba, unsigned int coun
...
@@ -402,6 +402,19 @@ int ventoy_vdisk_read(struct san_device *sandev, uint64_t lba, unsigned int coun
if
(
g_hddmode
)
if
(
g_hddmode
)
{
{
#if 0
/* need to check ?? */
lastlba = g_chain->virt_img_size_in_bytes / 512;
if (lba < lastlba)
{
if (lba + count > lastlba)
{
count = lastlba - lba;
}
ventoy_vdisk_read_real_hdd(lba, count, buffer);
}
#endif
ventoy_vdisk_read_real_hdd
(
lba
,
count
,
buffer
);
ventoy_vdisk_read_real_hdd
(
lba
,
count
,
buffer
);
ix86
->
regs
.
dl
=
sandev
->
drive
;
ix86
->
regs
.
dl
=
sandev
->
drive
;
return
0
;
return
0
;
...
@@ -435,7 +448,15 @@ int ventoy_vdisk_read(struct san_device *sandev, uint64_t lba, unsigned int coun
...
@@ -435,7 +448,15 @@ int ventoy_vdisk_read(struct san_device *sandev, uint64_t lba, unsigned int coun
}
}
VirtSec
=
g_chain
->
virt_img_size_in_bytes
/
2048
;
VirtSec
=
g_chain
->
virt_img_size_in_bytes
/
2048
;
if
(
lba
+
count
>
VirtSec
)
if
(
lba
>=
VirtSec
)
{
/* fix for grub4dos Inconsistent data read from error */
memset
((
void
*
)(
buffer
+
(
count
-
1
)
*
2048
),
0
,
2048
);
ix86
->
regs
.
dl
=
sandev
->
drive
;
return
0
;
}
else
if
(
lba
+
count
>
VirtSec
)
{
{
count
=
VirtSec
-
lba
;
count
=
VirtSec
-
lba
;
}
}
...
...
LANGUAGES/languages.ini
View file @
f4bbec65
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment