diff --git a/build.sh b/build.sh index 1cac5d8..dbb5110 100755 --- a/build.sh +++ b/build.sh @@ -5,4 +5,8 @@ cd "$(dirname "$0")" # Build cd workspace/build -exec ../crosstool-ng/bin/ct-ng build \ No newline at end of file +for type in */; do + cd "${type}" + ../../crosstool-ng/bin/ct-ng build + cd ../ +done \ No newline at end of file diff --git a/prepare.sh b/prepare.sh index 2e9b0f2..eb64112 100755 --- a/prepare.sh +++ b/prepare.sh @@ -3,6 +3,12 @@ set -e cd "$(dirname "$0")" +# Check +if [ "$(uname -m)" != 'x86_64' ]; then + echo 'Unsupported Build System!' > /dev/stderr + exit 1 +fi + # Versions CT_NAME="crosstool-ng" CT_VERSION="1.27.0" @@ -46,6 +52,13 @@ patch 9999-change-page-size.patch export PATH="${PREFIX}/bin:${PATH}" cd "${WORKSPACE}" dir build -cp "${SRC}/defconfig" . -ct-ng defconfig -ct-ng show-config \ No newline at end of file +prepare() { + dir "$1" + cp "${SRC}/defconfig" . + printf "$2" >> defconfig + ct-ng defconfig + ct-ng show-config + cd ../ +} +prepare x86_64 '' +prepare aarch64 'CT_CANADIAN=y\nCT_HOST="aarch64-linux-gnu"\n# CT_ZSTD_NEEDED is not set\n' \ No newline at end of file