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
6ded3355
"...resnet50_tensorflow.git" did not exist on "ce9504afc44250a3605162c8e8a4ab46e8f0e3f4"
Commit
6ded3355
authored
Feb 05, 2021
by
longpanda
Browse files
Optimization for booting TinyCore series distros
parent
3545dfa2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
10 deletions
+40
-10
IMG/cpio/ventoy/hook/tinycore/ventoy-disk.sh
IMG/cpio/ventoy/hook/tinycore/ventoy-disk.sh
+28
-5
IMG/cpio/ventoy/hook/tinycore/ventoy-hook.sh
IMG/cpio/ventoy/hook/tinycore/ventoy-hook.sh
+2
-3
INSTALL/grub/grub.cfg
INSTALL/grub/grub.cfg
+10
-2
No files found.
IMG/cpio/ventoy/hook/tinycore/
udev_disk_hoo
k.sh
→
IMG/cpio/ventoy/hook/tinycore/
ventoy-dis
k.sh
View file @
6ded3355
...
@@ -19,22 +19,43 @@
...
@@ -19,22 +19,43 @@
.
/ventoy/hook/ventoy-hook-lib.sh
.
/ventoy/hook/ventoy-hook-lib.sh
if
is_ventoy_hook_finished
||
not_ventoy_disk
"
${
1
:0:-1
}
"
;
then
if
is_ventoy_hook_finished
;
then
exit
0
exit
0
fi
fi
vtlog
"#######
$0
$*
########"
VTPATH_OLD
=
$PATH
;
PATH
=
$BUSYBOX_PATH
:
$VTOY_PATH
/tool:
$PATH
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.*p[0-9]
$|
mmc.*p[0-9]$"
;
then
vPart
=
"
${
vtdiskname
}
p2"
else
vPart
=
"
${
vtdiskname
}
2"
fi
# TinyCore linux distro doesn't contain dmsetup, we use aoe here
# TinyCore linux distro doesn't contain dmsetup, we use aoe here
sudo
$BUSYBOX_PATH
/
modprobe aoe
aoe_iflist
=
lo
sudo
modprobe aoe
aoe_iflist
=
lo
if
[
-e
/sys/module/aoe
]
;
then
if
[
-e
/sys/module/aoe
]
;
then
VBLADE_BIN
=
$(
ventoy_get_vblade_bin
)
VBLADE_BIN
=
$(
ventoy_get_vblade_bin
)
sudo
$VBLADE_BIN
-r
-f
$VTOY_PATH
/ventoy_image_map 9 0 lo
"/dev/
${
1
:0:-1
}
"
&
sudo nohup
$VBLADE_BIN
-r
-f
$VTOY_PATH
/ventoy_image_map 9 0 lo
"
$vtdiskname
"
>
/dev/null &
sleep
2
while
!
[
-b
/dev/etherd/e9.0
]
;
do
while
!
[
-b
/dev/etherd/e9.0
]
;
do
vtlog
'Wait for /dev/etherd/e9.0 ....'
vtlog
'Wait for /dev/etherd/e9.0 ....'
$SLEEP
0.1
sleep
2
done
done
sudo
$BUSYBOX_PATH
/
cp
-a
/dev/etherd/e9.0
"
/dev/
$1
"
sudo cp
-a
/dev/etherd/e9.0
"
$vPart
"
ventoy_find_bin_run rebuildfstab
ventoy_find_bin_run rebuildfstab
else
else
...
@@ -42,4 +63,6 @@ else
...
@@ -42,4 +63,6 @@ else
fi
fi
# OK finish
# OK finish
PATH
=
$VTPATH_OLD
set_ventoy_hook_finish
set_ventoy_hook_finish
IMG/cpio/ventoy/hook/tinycore/ventoy-hook.sh
View file @
6ded3355
...
@@ -19,6 +19,5 @@
...
@@ -19,6 +19,5 @@
.
$VTOY_PATH
/hook/ventoy-os-lib.sh
.
$VTOY_PATH
/hook/ventoy-os-lib.sh
ventoy_systemd_udevd_work_around
$SED
"/
\[
.*-n.*WAITUSB/i
\W
AITUSB=10"
-i
/etc/init.d/tc-config
$SED
"/
\[
.*-n.*AOE/i
\$
VTOY_PATH/hook/tinycore/ventoy-disk.sh"
-i
/etc/init.d/tc-config
ventoy_add_udev_rule_with_name
"
$VTOY_PATH
/hook/tinycore/udev_disk_hook.sh %k"
"90-ventoy.rules"
INSTALL/grub/grub.cfg
View file @
6ded3355
...
@@ -668,6 +668,14 @@ function uefi_unix_menu_func {
...
@@ -668,6 +668,14 @@ function uefi_unix_menu_func {
fi
fi
}
}
function ventoy_reset_nojoliet {
if vt_str_begin "$vt_volume_id" "ARCARESCUE"; then
vt_iso9660_nojoliet 1
else
vt_iso9660_nojoliet 0
fi
}
function uefi_iso_menu_func {
function uefi_iso_menu_func {
if [ -d (loop)/ ]; then
if [ -d (loop)/ ]; then
...
@@ -691,7 +699,7 @@ function uefi_iso_menu_func {
...
@@ -691,7 +699,7 @@ function uefi_iso_menu_func {
set ventoy_fs_probe=udf
set ventoy_fs_probe=udf
else
else
set ventoy_fs_probe=iso9660
set ventoy_fs_probe=iso9660
v
t_iso9660
_nojoliet
0
v
entoy_reset
_nojoliet
fi
fi
loopback loop "${1}${chosen_path}"
loopback loop "${1}${chosen_path}"
...
@@ -880,7 +888,7 @@ function legacy_iso_menu_func {
...
@@ -880,7 +888,7 @@ function legacy_iso_menu_func {
set ventoy_fs_probe=udf
set ventoy_fs_probe=udf
else
else
set ventoy_fs_probe=iso9660
set ventoy_fs_probe=iso9660
v
t_iso9660
_nojoliet
0
v
entoy_reset
_nojoliet
fi
fi
loopback loop "${1}${chosen_path}"
loopback loop "${1}${chosen_path}"
...
...
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