openpilot is an open source driver assistance system. openpilot performs the functions of Automated Lane Centering and Adaptive Cruise Control for over 200 supported car makes and models.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.1 KiB

#!/usr/bin/bash -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
ARCHNAME="x86_64"
BLAS_TARGET="X64_AUTOMATIC"
if [ -f /TICI ]; then
ARCHNAME="larch64"
BLAS_TARGET="ARMV8A_ARM_CORTEX_A57"
elif [ -f /EON ]; then
ARCHNAME="aarch64"
BLAS_TARGET="ARMV8A_ARM_CORTEX_A57"
fi
if [ ! -d acados/ ]; then
#git clone https://github.com/acados/acados.git $DIR/acados
git clone https://github.com/commaai/acados.git $DIR/acados
fi
cd acados
git fetch
git checkout 05bcbfe42818738c74572f27d06ad75a28d3b380
git submodule update --recursive --init
# build
mkdir -p build
cd build
cmake -DACADOS_WITH_QPOASES=ON -UBLASFEO_TARGET -DBLASFEO_TARGET=$BLAS_TARGET ..
make -j4 install
INSTALL_DIR="$DIR/$ARCHNAME"
rm -rf $INSTALL_DIR
mkdir -p $INSTALL_DIR
rm $DIR/acados/lib/*.json
cp -r $DIR/acados/include $DIR
cp -r $DIR/acados/lib $INSTALL_DIR
cp -r $DIR/acados/interfaces/acados_template/acados_template $DIR/../../pyextra
#pip3 install -e $DIR/acados/interfaces/acados_template
# build tera
cd $DIR/acados/interfaces/acados_template/tera_renderer/
cargo build --verbose --release
cp target/release/t_renderer $INSTALL_DIR/