Rebuild some binaries with musl-libc to avoid virus false positive (issue #660)

This commit is contained in:
longpanda 2020-12-22 21:21:44 +08:00
parent ff0ad76d8d
commit 4707b76bb2
26 changed files with 210 additions and 47 deletions

View file

@ -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
ARCH=arm64 CROSS_COMPILE=aarch64-linux- make allnoconfig
======== 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
======== use mini-native-x86_64 uclibc to build ash/hexdump/busybox for x86_64 ==========
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

View file

@ -2,7 +2,7 @@
DSTDIR=../../IMG/cpio/ventoy/busybox
rm -f vtchmod32 vtchmod64 vtchmodaa64
rm -f vtchmod32 vtchmod64 vtchmod64_musl vtchmodaa64
rm -f $DSTDIR/vtchmod32 $DSTDIR/vtchmod64 $DSTDIR/vtchmodaa64
/opt/diet32/bin/diet gcc -Os -m32 vtchmod.c -o vtchmod32
@ -10,12 +10,16 @@ rm -f $DSTDIR/vtchmod32 $DSTDIR/vtchmod64 $DSTDIR/vtchmodaa64
aarch64-linux-gcc -Os -static vtchmod.c -o vtchmodaa64
aarch64-linux-strip --strip-all vtchmodaa64
gcc -specs "/usr/local/musl/lib/musl-gcc.specs" -Os -static vtchmod.c -o vtchmod64_musl
strip --strip-all vtchmod64_musl
chmod 777 vtchmod32
chmod 777 vtchmod64
chmod 777 vtchmodaa64
chmod 777 vtchmod64_musl
cp -a vtchmod32 $DSTDIR/
cp -a vtchmod64 $DSTDIR/
cp -a vtchmodaa64 $DSTDIR/
cp -a vtchmod64_musl $DSTDIR/

Binary file not shown.