forked from ventoy/Ventoy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
569 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
tinycore follows the GPL-v2 License (see gpl-2.0.txt) | ||
|
||
Ventoy does not modify its source code, only its binraries are used. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
search -f /EFI/VentoyLiveCD -s root | ||
configfile ($root)/EFI/boot/grub.cfg | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
VentoyLiveCD | ||
|
||
https://www.ventoy.net |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
set timeout=3 | ||
set default=LiveCD | ||
|
||
clear | ||
|
||
menuentry 'Ventoy xxx LiveCD' --id=LiveCD { | ||
linux /EFI/boot/vmlinuz quiet loglevel=0 superuser rdinit=/ventoy/init.sh | ||
initrd /EFI/ventoy/ventoy.gz /EFI/boot/core.gz /EFI/boot/modules.gz newc:ventoy.tar.gz:/EFI/ventoy/ventoy-xxx-linux.tar.gz | ||
boot | ||
} | ||
|
||
menuentry 'Ventoy xxx LiveCD (Debug Mode)' { | ||
linux /EFI/boot/vmlinuz loglevel=10 multivt superuser rdinit=/ventoy/init.sh | ||
initrd /EFI/ventoy/ventoy.gz /EFI/boot/core.gz /EFI/boot/modules.gz newc:ventoy.tar.gz:/EFI/ventoy/ventoy-xxx-linux.tar.gz | ||
boot | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
Ventoy LiveCD is Tinycore distro + Ventoy linux install package. | ||
|
||
|
||
vmlinuz and core.gz are downloaded from: | ||
http://www.tinycorelinux.net/11.x/x86/release/distribution_files/ | ||
|
||
MD5SUM: | ||
0fd08c73e84b26aabbd0d12006d64855 core.gz | ||
a9c2e2abbf464517e681234fb4687aa1 vmlinuz | ||
|
||
|
||
|
||
VTOY/ventoy/tcz/*/tcz are downloaded from: | ||
http://distro.ibiblio.org/tinycorelinux/11.x/x86/tcz/ | ||
|
||
MD5SUM: | ||
b6153a469d1d56e1e6895c6812a344cd dosfstools.tcz | ||
29a4585d38b34ad58f8a7cb2d09e065f glib2.tcz | ||
6812067a60165aee3cbcc07a75b6b1f4 libffi.tcz | ||
5120e0c9ee65f936dea8cb6a0a0a1ddd liblvm2.tcz | ||
92909db8fb3c4333a2a4a325ffbf4b50 ncursesw.tcz | ||
e2bb47c9da2abab62fa794d69aba97c0 parted.tcz | ||
0e6dfbebe816062a81aff6d3e5e7719b readline.tcz | ||
3cf996373ab01be269ea0efaf17ce0cd udev-lib.tcz | ||
|
||
|
||
VTOY/ventoy/drivers/*.ko | ||
build kernel | ||
http://www.tinycorelinux.net/11.x/x86/release/src/kernel/ | ||
config-5.4.3-tinycore | ||
linux-5.4.3-patched.txz | ||
disable a wireless lan driver to avoid compile error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <string.h> | ||
|
||
typedef unsigned long long UINT64; | ||
|
||
int GetHumanReadableGBSize(UINT64 SizeBytes) | ||
{ | ||
int i; | ||
int Pow2 = 1; | ||
double Delta; | ||
double GB = SizeBytes * 1.0 / 1000 / 1000 / 1000; | ||
|
||
for (i = 0; i < 12; i++) | ||
{ | ||
if (Pow2 > GB) | ||
{ | ||
Delta = (Pow2 - GB) / Pow2; | ||
} | ||
else | ||
{ | ||
Delta = (GB - Pow2) / Pow2; | ||
} | ||
|
||
if (Delta < 0.05) | ||
{ | ||
return Pow2; | ||
} | ||
|
||
Pow2 <<= 1; | ||
} | ||
|
||
return (int)GB; | ||
} | ||
|
||
int main(int argc, char **argv) | ||
{ | ||
UINT64 value = strtoul(argv[1], NULL, 10); | ||
|
||
printf("%d", GetHumanReadableGBSize(value * 512)); | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
|
||
cat /ventoy/modlist | while read line; do | ||
if [ -e /ventoy/drivers/${line}.ko ]; then | ||
insmod /ventoy/drivers/${line}.ko | ||
fi | ||
done | ||
|
||
sleep 5 | ||
|
||
echo "sh /ventoy/profile.sh" >> /root/.profile | ||
exec /init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
scsi_transport_sas | ||
mptbase | ||
mptscsih | ||
mptsas | ||
yurex | ||
ezusb | ||
parport | ||
uss720 | ||
usb4604 | ||
usb3503 | ||
sisusbvga | ||
usb251xb | ||
pi3usb30532 | ||
usb-otg-fsm | ||
usb-conn-gpio | ||
ulpi | ||
ums-realtek | ||
xhci-hcd | ||
xhci-pci | ||
xhci-plat-hcd | ||
usbip-core | ||
usbip-host | ||
vhci-hcd | ||
cdc-wdm | ||
cdc-acm | ||
usblp | ||
megaraid_sas |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh | ||
|
||
cd / | ||
tar -xf ventoy.tar.gz | ||
|
||
cd /ventoy | ||
mkdir mnt | ||
for i in $(ls tcz/*.tcz); do | ||
mount $i mnt | ||
cp -a mnt/* / | ||
umount mnt | ||
done | ||
|
||
ldconfig /usr/local/lib /usr/lib /lib | ||
|
||
#workaround for swapon | ||
rm -f /sbin/swapon | ||
echo '#!/bin/sh' > /sbin/swapon | ||
chmod +x /sbin/swapon | ||
|
||
sh /ventoy/ventoy.sh | ||
|
Oops, something went wrong.