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.
Rebuild some binaries with musl-libc to avoid virus false positive (i…
…ssue ventoy#660)
- Loading branch information
Showing
26 changed files
with
210 additions
and
47 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,36 @@ | ||
======== Build busybox 1.32 for aarch64 ======== | ||
|
||
ARCH=arm64 CROSS_COMPILE=aarch64-linux- make defconfig | ||
ARCH=arm64 CROSS_COMPILE=aarch64-linux- make menuconfig | ||
----> enable static build | ||
----> enable ar | ||
----> enable inotifyd | ||
|
||
|
||
======== How to build ash/hexdump/xzcat for aarch64 ======== | ||
#How to get ash.config/hexdump.cofig/xzcat.config | ||
#ARCH=arm64 CROSS_COMPILE=aarch64-linux- make allnoconfig | ||
#ARCH=arm64 CROSS_COMPILE=aarch64-linux- make menuconfig | ||
#----> enable static build | ||
#----> enable xzcat | ||
#get aarch64_xzcat.config | ||
|
||
tar xf busybox-1.32.0.tar.bz2 | ||
cd busybox-1.32.0 | ||
copy aarch64_xzcat.config as .config | ||
ARCH=arm64 CROSS_COMPILE=aarch64-linux- make | ||
rename ./busybox to xzcat | ||
|
||
|
||
|
||
======== How to build ash/hexdump/xzcat for x86_64 ========== | ||
#How to get ash.config/hexdump.cofig/xzcat.config | ||
#make allnoconfig | ||
#make menuconfig | ||
#----> enable static build | ||
#----> enable xzcat | ||
#get x86_64_xzcat.config | ||
|
||
ARCH=arm64 CROSS_COMPILE=aarch64-linux- make allnoconfig | ||
|
||
tar xf busybox-1.32.0.tar.bz2 | ||
cd busybox-1.32.0 | ||
copy x86_64_xzcat.config as .config | ||
modify Makefile | ||
CC = gcc -specs "/usr/local/musl/lib/musl-gcc.specs" | ||
MODFLAGS = -DMODULE -specs "/usr/local/musl/lib/musl-gcc.specs" | ||
make | ||
rename ./busybox to xzcat | ||
|
||
======== use mini-native-x86_64 uclibc to build ash/hexdump/busybox for x86_64 ========== | ||
|
||
|
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
Binary file not shown.
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
Binary file not shown.
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
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.
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.
Binary file not shown.
48 changes: 48 additions & 0 deletions
48
Ventoy2Disk/Ventoy2Disk/xz-embedded-20130513/userspace/ventoy_makefile64_musl
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,48 @@ | ||
# | ||
# Makefile | ||
# | ||
# Author: Lasse Collin <lasse.collin@tukaani.org> | ||
# | ||
# This file has been put into the public domain. | ||
# You can do whatever you want with this file. | ||
# | ||
|
||
CC = gcc -specs "/usr/local/musl/lib/musl-gcc.specs" -Os -static -std=gnu89 | ||
BCJ_CPPFLAGS = -DXZ_DEC_X86 -DXZ_DEC_POWERPC -DXZ_DEC_IA64 \ | ||
-DXZ_DEC_ARM -DXZ_DEC_ARMTHUMB -DXZ_DEC_SPARC | ||
CPPFLAGS = -DXZ_USE_CRC64 -DXZ_DEC_ANY_CHECK | ||
CFLAGS = -ggdb3 -O2 -pedantic -Wall -Wextra | ||
RM = rm -f | ||
VPATH = ../linux/include/linux ../linux/lib/xz | ||
COMMON_SRCS = xz_crc32.c xz_crc64.c xz_dec_stream.c xz_dec_lzma2.c xz_dec_bcj.c | ||
COMMON_OBJS = $(COMMON_SRCS:.c=.o) | ||
XZMINIDEC_OBJS = xzminidec.o | ||
BYTETEST_OBJS = bytetest.o | ||
BUFTEST_OBJS = buftest.o | ||
BOOTTEST_OBJS = boottest.o | ||
XZ_HEADERS = xz.h xz_private.h xz_stream.h xz_lzma2.h xz_config.h | ||
PROGRAMS = xzminidec bytetest buftest boottest | ||
|
||
ALL_CPPFLAGS = -I../linux/include/linux -I. $(BCJ_CPPFLAGS) $(CPPFLAGS) | ||
|
||
all: $(PROGRAMS) | ||
|
||
%.o: %.c $(XZ_HEADERS) | ||
$(CC) $(ALL_CPPFLAGS) $(CFLAGS) -c -o $@ $< | ||
|
||
xzminidec: $(COMMON_OBJS) $(XZMINIDEC_OBJS) | ||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(COMMON_OBJS) $(XZMINIDEC_OBJS) | ||
|
||
bytetest: $(COMMON_OBJS) $(BYTETEST_OBJS) | ||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(COMMON_OBJS) $(BYTETEST_OBJS) | ||
|
||
buftest: $(COMMON_OBJS) $(BUFTEST_OBJS) | ||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(COMMON_OBJS) $(BUFTEST_OBJS) | ||
|
||
boottest: $(BOOTTEST_OBJS) $(COMMON_SRCS) | ||
$(CC) $(ALL_CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $(BOOTTEST_OBJS) | ||
|
||
.PHONY: clean | ||
clean: | ||
-$(RM) $(COMMON_OBJS) $(XZMINIDEC_OBJS) $(BUFTEST_OBJS) \ | ||
$(BOOTTEST_OBJS) $(PROGRAMS) |
48 changes: 48 additions & 0 deletions
48
Ventoy2Disk/Ventoy2Disk/xz-embedded-20130513/userspace/ventoy_makefileaa64
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,48 @@ | ||
# | ||
# Makefile | ||
# | ||
# Author: Lasse Collin <lasse.collin@tukaani.org> | ||
# | ||
# This file has been put into the public domain. | ||
# You can do whatever you want with this file. | ||
# | ||
|
||
CC = /opt/aarch64--uclibc--stable-2020.08-1/bin/aarch64-linux-gcc -Os -static -std=gnu89 | ||
BCJ_CPPFLAGS = -DXZ_DEC_X86 -DXZ_DEC_POWERPC -DXZ_DEC_IA64 \ | ||
-DXZ_DEC_ARM -DXZ_DEC_ARMTHUMB -DXZ_DEC_SPARC | ||
CPPFLAGS = -DXZ_USE_CRC64 -DXZ_DEC_ANY_CHECK | ||
CFLAGS = -ggdb3 -O2 -pedantic -Wall -Wextra | ||
RM = rm -f | ||
VPATH = ../linux/include/linux ../linux/lib/xz | ||
COMMON_SRCS = xz_crc32.c xz_crc64.c xz_dec_stream.c xz_dec_lzma2.c xz_dec_bcj.c | ||
COMMON_OBJS = $(COMMON_SRCS:.c=.o) | ||
XZMINIDEC_OBJS = xzminidec.o | ||
BYTETEST_OBJS = bytetest.o | ||
BUFTEST_OBJS = buftest.o | ||
BOOTTEST_OBJS = boottest.o | ||
XZ_HEADERS = xz.h xz_private.h xz_stream.h xz_lzma2.h xz_config.h | ||
PROGRAMS = xzminidec bytetest buftest boottest | ||
|
||
ALL_CPPFLAGS = -I../linux/include/linux -I. $(BCJ_CPPFLAGS) $(CPPFLAGS) | ||
|
||
all: $(PROGRAMS) | ||
|
||
%.o: %.c $(XZ_HEADERS) | ||
$(CC) $(ALL_CPPFLAGS) $(CFLAGS) -c -o $@ $< | ||
|
||
xzminidec: $(COMMON_OBJS) $(XZMINIDEC_OBJS) | ||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(COMMON_OBJS) $(XZMINIDEC_OBJS) | ||
|
||
bytetest: $(COMMON_OBJS) $(BYTETEST_OBJS) | ||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(COMMON_OBJS) $(BYTETEST_OBJS) | ||
|
||
buftest: $(COMMON_OBJS) $(BUFTEST_OBJS) | ||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(COMMON_OBJS) $(BUFTEST_OBJS) | ||
|
||
boottest: $(BOOTTEST_OBJS) $(COMMON_SRCS) | ||
$(CC) $(ALL_CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $(BOOTTEST_OBJS) | ||
|
||
.PHONY: clean | ||
clean: | ||
-$(RM) $(COMMON_OBJS) $(XZMINIDEC_OBJS) $(BUFTEST_OBJS) \ | ||
$(BOOTTEST_OBJS) $(PROGRAMS) |
Binary file not shown.