forked from firmadyne/console
-
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.
Add back setup scripts for in dockerfile builds
- Loading branch information
Andrew Fasano
committed
Nov 3, 2023
1 parent
2d4c9d3
commit 23a13d6
Showing
2 changed files
with
53 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/sh | ||
set -eux | ||
|
||
# valid: arm, mipsel, mipseb, mips64eb | ||
ARCH=$1 | ||
ABI= | ||
|
||
if [ "$ARCH" = "arm" ]; then | ||
ABI=eabi # only for arm | ||
fi | ||
|
||
# Firmadyne cross compilers from https://zenodo.org/record/4922202 - arm, mips, mipsel | ||
# works for kernel 4.10 | ||
CROSS_CC=/opt/cross/${ARCH}-linux-musl${ABI}/bin/${ARCH}-linux-musl${ABI}-gcc | ||
|
||
# Need your own mips64 toolchain or you can grab ours: | ||
#wget --quiet http://panda.re/secret/mips64-linux-musl-cross_gcc-6.5.0.tar.gz -O - | tar -xz -C /opt/cross && \ | ||
# mv /opt/cross/mips64-linux-musl-cross /opt/cross/mips64-linux-musl | ||
|
||
# this is a mips64 toolchain built using https://github.com/richfelker/musl-cross-make | ||
#BINUTILS_VER = 2.25.1 | ||
#GCC_VER = 6.5.0 | ||
#MUSL_VER = git-v1.1.24 | ||
#GMP_VER = 6.1.0 | ||
#MPC_VER = 1.0.3 | ||
#MPFR_VER = 3.1.4 | ||
#GCC_CONFIG += --enable-languages=c | ||
|
||
if [ "$ARCH" = "mips64eb" ]; then | ||
SHORT_ARCH=mips | ||
CROSS_CC=/opt/cross/mips64-linux-musl/bin/mips64-linux-musl-gcc | ||
fi | ||
|
||
|
||
|
||
make clean | ||
CC=$CROSS_CC make | ||
|
||
mv console console.$ARCH |
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,14 @@ | ||
#!/bin/bash | ||
|
||
set -eux | ||
|
||
rm -f console.arm console.armel console.mipsel console.mipseb | ||
./setup.sh arm | ||
./setup.sh mipsel | ||
./setup.sh mipseb | ||
|
||
rm -rf consoles || true | ||
mkdir consoles | ||
|
||
mv console.arm console.armel | ||
mv console.a* console.m* consoles/ |