1. Improve documentation.

2. Use static build binaries for linux.
This commit is contained in:
longpanda
2022-02-03 11:36:41 +08:00
parent a8b961b199
commit 7636c87615
13 changed files with 30 additions and 20 deletions
+8 -1
View File
@@ -4,7 +4,7 @@
This is a tool used with "Ventoy Compatible". See [https://www.ventoy.net/en/compatible.html](https://www.ventoy.net/en/compatible.html) for detail.
#### Usage
For Linux:
For Linux: (must be run with root privileges)
```
vtoydump [ -lL ] [ -v ]
none Only print ventoy runtime data
@@ -35,4 +35,11 @@ Select a free drive from D E F G H I J K L M N O P Q R S T U V W and use it to m
```
#### Build From Source
Normally you can directly use the binraries in `bin/linux` directory (e.g. `bin/linux/x86_64/vtoydump`).
These binaries are static built version and should work for most distros.
Also you can build from source for your distro. Of course, `gcc` must be available before build.
Just run `sh build.sh` to build vtoydump.
If your OS is x86_64 then the output `vtoydump` is just for x86_64 architecture, so as i386 and arm64.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+6 -19
View File
@@ -2,26 +2,13 @@
rm -f vtoydump*
#/opt/diet64/bin/diet -Os gcc -std=gnu99 -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 ./src/vtoydump_linux.c ./src/libexfat/*.c -I ./src -I ./src/libexfat -o vtoydump64
#/opt/diet32/bin/diet -Os gcc -Wall -std=gnu99 -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -m32 ./src/vtoydump_linux.c ./src/libexfat/*.c -I ./src -I ./src/libexfat -o vtoydump32
machine=$(uname -m)
gcc -Wall -std=gnu99 -DHAVE_CONFIG_H -O2 -D_FILE_OFFSET_BITS=64 ./src/vtoydump_linux.c ./src/libexfat/*.c -I ./src -I ./src/libexfat -o vtoydump64
gcc -Wall -std=gnu99 -DHAVE_CONFIG_H -O2 -D_FILE_OFFSET_BITS=64 -m32 ./src/vtoydump_linux.c ./src/libexfat/*.c -I ./src -I ./src/libexfat -o vtoydump32
gcc -Wall -std=gnu99 -DHAVE_CONFIG_H -O2 -D_FILE_OFFSET_BITS=64 ./src/vtoydump_linux.c ./src/libexfat/*.c -I ./src -I ./src/libexfat -o vtoydump
aarch64-linux-gnu-gcc -Wall -std=gnu99 -DHAVE_CONFIG_H -O2 -D_FILE_OFFSET_BITS=64 ./src/vtoydump_linux.c ./src/libexfat/*.c -I ./src -I ./src/libexfat -o vtoydumpaa64
if [ -e vtoydump64 ] && [ -e vtoydump32 ] && [ -e vtoydumpaa64 ]; then
rm -f ../Vtoyboot/vtoyboot/tools/vtoydump*
strip vtoydump64
strip vtoydump32
aarch64-linux-gnu-strip vtoydumpaa64
cp -a vtoydumpaa64 ../Vtoyboot/vtoyboot/tools/
cp -a vtoydump64 ../Vtoyboot/vtoyboot/tools/
cp -a vtoydump32 ../Vtoyboot/vtoyboot/tools/
echo -e '\n===== success =======\n'
if [ -e vtoydump ]; then
strip vtoydump
echo -e "\n===== build vtoydump for $machine success =======\n"
else
echo -e '\n===== failed =======\n'
echo -e "\n===== build vtoydump for $machine failed =======\n"
fi
+4
View File
@@ -44,6 +44,10 @@ if not exist vtoydump.exe (
echo Failed to build vtoydump
exit /b 1
)
del /q bin/windows/NT6/32/vtoydump.exe
copy /y vtoydump.exe bin/windows/NT6/32/
echo Build vtoydump for x86 success ...
echo.
pause
+4
View File
@@ -44,6 +44,10 @@ if not exist vtoydump.exe (
echo Failed to build vtoydump
exit /b 1
)
del /q bin/windows/NT5/32/vtoydump.exe
copy /y vtoydump.exe bin/windows/NT5/32/
echo Build vtoydump for x86 success ...
echo.
pause
+4
View File
@@ -45,6 +45,10 @@ if not exist vtoydump.exe (
echo Failed to build vtoydump
exit /b 1
)
del /q bin/windows/NT6/64/vtoydump.exe
copy /y vtoydump.exe bin/windows/NT6/64/
echo Build vtoydump for amd64 success ...
echo.
pause
+4
View File
@@ -44,6 +44,10 @@ if not exist vtoydump.exe (
echo Failed to build vtoydump
exit /b 1
)
del /q bin/windows/NT5/64/vtoydump.exe
copy /y vtoydump.exe bin/windows/NT5/64/
echo Build vtoydump for amd64 success ...
echo.
pause