Compare commits

...

2 commits

Author SHA1 Message Date
XOR
e9bb7b3fe5 Makefile: Set compilers path to default Linux 2024-10-19 22:17:17 +02:00
XOR
d0e5c4fbfc Add basic build script 2024-10-19 22:14:54 +02:00
2 changed files with 48 additions and 6 deletions

View file

@ -311,7 +311,7 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
# Default value for CROSS_COMPILE is not to prefix executables
# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
ARCH ?=arm64
CROSS_COMPILE= $(srctree)/toolchain/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android-
CROSS_COMPILE ?=$(CONFIG_CROSS_COMPILE:"%"=%)
# Architecture as present in compile.h
UTS_MACHINE := $(ARCH)
@ -507,7 +507,7 @@ endif
ifeq ($(cc-name),clang)
ifneq ($(CROSS_COMPILE),)
CLANG_TRIPLE ?= $(srctree)/toolchain/clang/host/linux-x86/clang-4639204/bin/aarch64-linux-gnu-
CLANG_TRIPLE ?= $(CROSS_COMPILE)
CLANG_FLAGS := --target=$(notdir $(CLANG_TRIPLE:%-=%))
ifeq ($(shell $(srctree)/scripts/clang-android.sh $(CC) $(CLANG_FLAGS)), y)
$(error "Clang with Android --target detected. Did you specify CLANG_TRIPLE?")

50
build_kernel.sh Normal file → Executable file
View file

@ -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 <https://www.gnu.org/licenses/>.
#
# =========================
#
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)