mirror of
https://github.com/commaai/agnos-builder.git
synced 2026-09-30 03:13:51 +08:00
initial agnos-builder release
This commit is contained in:
Executable
+36
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
DEFCONFIG=tici_defconfig
|
||||
|
||||
# Get directories and make sure we're in the correct spot to start the build
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
|
||||
TOOLS=$DIR/tools
|
||||
TMP_DIR=/tmp/agnos-builder-tmp
|
||||
OUTPUT_DIR=$DIR/output
|
||||
BOOT_IMG=./boot.img
|
||||
cd $DIR
|
||||
|
||||
# Clone kernel if not done already
|
||||
if [ ! -d agnos-kernel-sdm845 ]; then
|
||||
git submodule init agnos-kernel-sdm845
|
||||
fi
|
||||
cd agnos-kernel-sdm845
|
||||
|
||||
# Build parameters
|
||||
export ARCH=arm64
|
||||
export CROSS_COMPILE=$TOOLS/aarch64-linux-gnu-gcc/bin/aarch64-linux-gnu-
|
||||
export CC=$TOOLS/aarch64-linux-gnu-gcc/bin/aarch64-linux-gnu-gcc
|
||||
export LD=$TOOLS/aarch64-linux-gnu-gcc/bin/aarch64-linux-gnu-ld.bfd
|
||||
|
||||
# these do anything?
|
||||
export KCFLAGS="-w"
|
||||
|
||||
# Load defconfig and build kernel
|
||||
echo "-- First make --"
|
||||
make $DEFCONFIG O=out
|
||||
echo "-- Second make: $(nproc --all) cores --"
|
||||
make bindeb-pkg -j$(nproc --all) O=out # Image.gz-dtb
|
||||
|
||||
# Copy output
|
||||
cp linux-headers-*.deb $OUTPUT_DIR
|
||||
|
||||
Reference in New Issue
Block a user