Ventoy: vtoytool: build for loongarch and musl

gcc -specs /usr/local/musl/lib/musl-gcc.specs -Os  -DVTOY_LOONGARCH64 -D_FILE_OFFSET_BITS=64  *.c BabyISO/*.c -IBabyISO -Wall -DUSE_MUSL_C -DBUILD_VTOY_TOOL  -o  vtoytool_la64

Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
This commit is contained in:
Wentao Guan 2024-09-02 11:19:59 +08:00
parent 66b1c78aa6
commit 4f81cac646
4 changed files with 14 additions and 1 deletions

BIN
INSTALL/tool/loongarch64/vtoytool Executable file

Binary file not shown.

View file

@ -9,6 +9,10 @@ aarch64-buildroot-linux-uclibc-gcc -Os -static -DVTOY_AA64 -D_FILE_OFFSET_BITS=6
mips64el-linux-musl-gcc -mips64r2 -mabi=64 -Os -static -DVTOY_MIPS64 -D_FILE_OFFSET_BITS=64 *.c BabyISO/*.c -IBabyISO -Wall -DBUILD_VTOY_TOOL -o vtoytool_m64e
#loongarch
#gcc -specs /usr/local/musl/lib/musl-gcc.specs -Os -DVTOY_LOONGARCH64 -D_FILE_OFFSET_BITS=64 *.c BabyISO/*.c -IBabyISO -Wall -DUSE_MUSL_C -DBUILD_VTOY_TOOL -o vtoytool_la64
#gcc -D_FILE_OFFSET_BITS=64 -static -Wall -DBUILD_VTOY_TOOL *.c BabyISO/*.c -IBabyISO -o vtoytool_64
#gcc -D_FILE_OFFSET_BITS=64 -Wall -DBUILD_VTOY_TOOL -m32 *.c BabyISO/*.c -IBabyISO -o vtoytool_32

View file

@ -42,12 +42,15 @@
#define O_BINARY 0
#endif
#ifndef USE_MUSL_C
#ifndef USE_DIET_C
#ifndef __mips__
typedef unsigned long long uint64_t;
#endif
typedef unsigned int uint32_t;
#endif
#else
#endif
#pragma pack(4)
typedef struct ventoy_img_chunk

View file

@ -23,7 +23,9 @@
#define IS_DIGIT(x) ((x) >= '0' && (x) <= '9')
#ifndef USE_DIET_C
#ifndef USE_MUSL_C
#ifndef USE_DIET_C
#ifndef __mips__
typedef unsigned long long uint64_t;
#endif
@ -32,6 +34,10 @@ typedef unsigned short uint16_t;
typedef unsigned char uint8_t;
#endif
#else
typedef unsigned char uint8_t;
#endif
#define VENTOY_GUID { 0x77772020, 0x2e77, 0x6576, { 0x6e, 0x74, 0x6f, 0x79, 0x2e, 0x6e, 0x65, 0x74 }}
typedef enum ventoy_fs_type