mirror of
https://github.com/commaai/agnos-builder.git
synced 2026-04-06 14:53:54 +08:00
* build kernel in container * remove ci deps * cleaning * more cleaning * even more cleaning * README.md update for masOS Case-sensitive required volume * README.md more info about macOS * README.md more info about macOS * README.md more info about macOS - M-series vs Intel * README.md more info about macOS - M-series vs Intel * extract_tools should install and pull lfs no matter the ARCH * raise attention on macOS Case-sensitive volume * --privileged not needed in build_kernel.sh * remove docker and git checks * set -e * always build image * updated host user in container * also works with sudo/root * removed deps in ci since they are not needed anymore * agnos-meta-builder * show macOS support only if current path is not on a Case-sensitive APFS volume * more succint * just exit * fixing caching issues * cache kernel out * cleaning * debug out * ccache-action no needed anymore * debug * rebuild * remove out cache * revert ccache action * create-symlink not needed since it's building in the container * simpler ccache key name * cleaning * rebuild * git ignore .ccache --------- Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
52 lines
1.2 KiB
Bash
Executable File
52 lines
1.2 KiB
Bash
Executable File
#!/bin/bash -e
|
|
|
|
git lfs &> /dev/null || {
|
|
echo "ERROR: git lfs not installed"
|
|
exit 1
|
|
}
|
|
|
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
|
|
THIS_SCRIPT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")"
|
|
ROOT=$DIR/..
|
|
|
|
cd $DIR
|
|
|
|
# grep for `-`, which stands for LFS pointer
|
|
git lfs ls-files | awk '{print $2}' | grep "-" &>/dev/null && {
|
|
echo "Pulling git lfs objects..."
|
|
cd $ROOT
|
|
git lfs install
|
|
git lfs pull
|
|
cd $DIR
|
|
}
|
|
|
|
LINARO_GCC=aarch64-linux-gnu-gcc
|
|
GOOGLE_GCC_4_9=aarch64-linux-android-4.9
|
|
EDK2_LLVM=llvm-arm-toolchain-ship
|
|
SEC_IMAGE=SecImage
|
|
|
|
LINARO_GCC_TARBALL=$LINARO_GCC.tar.gz
|
|
GOOGLE_GCC_4_9_TARBALL=$GOOGLE_GCC_4_9.tar.gz
|
|
EDK2_LLVM_TARBALL=$EDK2_LLVM.tar.gz
|
|
SEC_IMAGE_TARBALL=$SEC_IMAGE.tar.gz
|
|
|
|
ARCH=$(uname -m)
|
|
if [ "$ARCH" != "arm64" ] && [ "$ARCH" != "aarch64" ]; then
|
|
echo "Extracting tools..."
|
|
if [ ! -d $LINARO_GCC ]; then
|
|
tar -xzf $LINARO_GCC_TARBALL &>/dev/null
|
|
fi
|
|
|
|
if [ ! -d $GOOGLE_GCC_4_9 ]; then
|
|
tar -xzf $GOOGLE_GCC_4_9_TARBALL &>/dev/null
|
|
fi
|
|
|
|
if [ ! -d $EDK2_LLVM ]; then
|
|
tar -xzf $EDK2_LLVM_TARBALL &>/dev/null
|
|
fi
|
|
|
|
if [ ! -d $SEC_IMAGE ]; then
|
|
tar -xzf $SEC_IMAGE_TARBALL &>/dev/null
|
|
fi
|
|
fi
|