Skip to content

Commit

Permalink
experimental support for loongson mips64el uefi
Browse files Browse the repository at this point in the history
  • Loading branch information
ventoy committed Mar 5, 2021
1 parent bb7e10d commit b63ce2a
Show file tree
Hide file tree
Showing 294 changed files with 26,403 additions and 93 deletions.
19 changes: 19 additions & 0 deletions BUSYBOX/build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,25 @@ ARCH=arm64 CROSS_COMPILE=aarch64-linux- make
rename ./busybox to xzcat


======== How to build ash/hexdump/xzcat for mips64el ========
#download mips64el-musl cross toolchain from https://github.com/ventoy/musl-cross-make/releases/download/latest/
#How to get ash.config/hexdump.cofig/xzcat.config
#ARCH=mips CROSS_COMPILE=mips64el-linux-musl- make allnoconfig "CFLAGS+=-mips64r2 -mabi=64 -Os" "LDFLAGS+=-mips64r2 -mabi=64 -Os"
#ARCH=mips CROSS_COMPILE=mips64el-linux-musl- make menuconfig "CFLAGS+=-mips64r2 -mabi=64 -Os" "LDFLAGS+=-mips64r2 -mabi=64 -Os"
#----> enable static build
#----> enable xzcat
#get mips64el_xzcat.config

tar xf busybox-1.32.0.tar.bz2
cd busybox-1.32.0
copy mips64el_xzcat.config as .config
ARCH=mips CROSS_COMPILE=mips64el-linux-musl- make "CFLAGS+=-mips64r2 -mabi=64 -Os" "LDFLAGS+=-mips64r2 -mabi=64 -Os"
rename ./busybox to xzcat


======== How to build full busybox =========
#make defconfig
#make menuconfig select static build

======== How to build ash/hexdump/xzcat for x86_64 ==========
#How to get ash.config/hexdump.cofig/xzcat.config
Expand Down
8 changes: 7 additions & 1 deletion BUSYBOX/chmod/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,29 @@
DSTDIR=../../IMG/cpio/ventoy/busybox

rm -f vtchmod32 vtchmod64 vtchmod64_musl vtchmodaa64
rm -f $DSTDIR/vtchmod32 $DSTDIR/vtchmod64 $DSTDIR/vtchmodaa64
rm -f $DSTDIR/vtchmod32 $DSTDIR/vtchmod64 $DSTDIR/vtchmodaa64 $DSTDIR/vtchmodm64e

/opt/diet32/bin/diet gcc -Os -m32 vtchmod.c -o vtchmod32
/opt/diet64/bin/diet gcc -Os vtchmod.c -o vtchmod64
aarch64-linux-gcc -Os -static vtchmod.c -o vtchmodaa64
aarch64-linux-strip --strip-all vtchmodaa64

mips64el-linux-musl-gcc -mips64r2 -mabi=64 -Os -static vtchmod.c -o vtchmodm64e
mips64el-linux-musl-strip --strip-all vtchmodm64e


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
chmod 777 vtchmodm64e

cp -a vtchmod32 $DSTDIR/
cp -a vtchmod64 $DSTDIR/
cp -a vtchmodaa64 $DSTDIR/
cp -a vtchmod64_musl $DSTDIR/
cp -a vtchmodm64e $DSTDIR/

Binary file added BUSYBOX/chmod/vtchmodm64e
Binary file not shown.
Loading

0 comments on commit b63ce2a

Please sign in to comment.