From 71dd258dd976d472463a175f7b530197c0d82fc5 Mon Sep 17 00:00:00 2001 From: XOR Date: Mon, 21 Oct 2024 22:41:23 +0200 Subject: [PATCH] Add basic build script --- build_kernel.sh | 50 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 4 deletions(-) mode change 100644 => 100755 build_kernel.sh diff --git a/build_kernel.sh b/build_kernel.sh old mode 100644 new mode 100755 index 62475d60f930..10ccc12e3671 --- a/build_kernel.sh +++ b/build_kernel.sh @@ -1,8 +1,50 @@ #!/bin/bash +# ========================================= +# _____ _ +# | ___| __ ___ ___| |__ +# | |_ | '__/ _ \/ __| '_ \ +# | _|| | | __/\__ \ | | | +# |_| |_| \___||___/_| |_| +# +# ========================================= +# +# Minty - The kernel build script for Mint +# The Fresh Project +# Copyright (C) 2019-2021 TenSeventy7 +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# ========================= +# +ORIGIN_DIR=$(pwd) + +LLVM_TOOLCHAIN=$ORIGIN_DIR/toolchain/linux-x86-android-9.0.0_r6-clang-4639204 +GNU_TOOLCHAIN=$ORIGIN_DIR/toolchain/android_prebuilts_gcc_linux-x86_aarch64_aarch64-linux-android-4.9 + +PATH=$LLVM_TOOLCHAIN/bin:$GNU_TOOLCHAIN/bin:$PATH + +# compiler -> LLVM +#export CLANG=$LLVM_TOOLCHAIN/bin/clang + +# binutils -> GNU +export CROSS_COMPILE=aarch64-linux-androidkernel- +export CLANG_TRIPLE=aarch64-linux-gnu- + +export PLATFORM_VERSION=13 +export ANDROID_MAJOR_VERSION=t export ARCH=arm64 -export PLATFORM_VERSION=12 -export ANDROID_MAJOR_VERSION=s -make ARCH=arm64 exynos9610-a51xx_defconfig -make ARCH=arm64 -j16 +make CC=clang -j$(nproc --all) exynos9610-a51xx_defconfig +make CC=clang #-j$(nproc --all)