forked from CraftRom/Chidori-Kernel_chime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gettools.sh
33 lines (28 loc) · 1.38 KB
/
gettools.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright (C) 2018 Raphiel Rollerscaperers (raphielscape)
# Copyright (C) 2018 Rama Bondan Prakoso (rama982)
# Android Kernel Build Script
# Install build package for debian based linux
sudo apt install bc bash git-core gnupg build-essential \
zip curl make automake autogen autoconf autotools-dev libtool shtool python \
m4 gcc libtool zlib1g-dev flex bison libssl-dev
# Clone toolchain
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 -b android-11.0.0_r48 --depth=1 stock
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9 -b android-11.0.0_r48 --depth=1 stock_32
# Clone AnyKernel3
git clone https://github.com/CraftRom/AnyKernel3 -b onclite
# Download Clang
if [ ! -d ~/toolchains/proton-clang ]; then
git clone https://github.com/kdrag0n/proton-clang ~/toolchains/proton-clang --depth=1
fi
if [ ! -d ~/toolchains/gcc64 ]; then
git clone --depth=1 https://github.com/LineageOS/android_prebuilts_gcc_linux-x86_aarch64_aarch64-linux-android-4.9 ~/toolchains/gcc64
fi
# Download libufdt
if [ ! -d libufdt ]; then
wget https://android.googlesource.com/platform/system/libufdt/+archive/refs/tags/android-11.0.0_r48/utils.tar.gz
mkdir -p libufdt
tar xvzf utils.tar.gz -C libufdt
rm utils.tar.gz
fi