-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
80 lines (62 loc) · 2.46 KB
/
Dockerfile
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#
# Jugal Kishore -- 2020
#
# All the dependencies requred for Android Kernel Building
#
# Base Image: ubuntu:noble
FROM ubuntu:noble
# Setting Non-Interactive Build Time Environment Variable
ARG DEBIAN_FRONTEND=noninteractive
# Setting TERM Environment Variable
ENV TERM=xterm-256color
# Updating apt packages list
RUN apt-get update
# Upgrading apt packages to latest
RUN apt-get -y upgrade
# Installing required packages
RUN apt-get install -y \
curl git python3 bc tar make wget gcc libssl-dev \
zip unzip ca-certificates gpg openssh-client \
nano vim xz-utils tmux screen jq tree 1> /dev/null
# Install tmate
RUN curl -sL https://raw.githubusercontent.com/crazyuploader/Bash/master/install/tmate.sh | bash -
# Custom Functions
RUN curl -sL https://raw.githubusercontent.com/crazyuploader/Misc/master/functions >> ~/.bashrc
# Removing all unused packages
RUN apt-get -y autoremove --purge
# APT clean up
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/*
# Directory to store cross-compilers
RUN mkdir toolchains
# ARM Cross Compiler
RUN printf "Cloning Toolchains...\n" && \
echo "Getting AOSP ARM Cross Compiler..." && \
cd toolchains && \
git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9 gcc
# ARM_64 Cross Compiler
RUN echo "Getting AOSP ARM_64 Cross Compiler..." && \
cd toolchains && \
git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9 gcc32
# Downloading Prebuilt AOSP Clang
RUN echo "Cloning Clang..." && \
cd toolchains && \
git clone --depth=1 https://gitlab.com/crazyuploader/clang-toolchain.git clang
# Install ffsend
RUN curl -sL https://raw.githubusercontent.com/crazyuploader/Bash/master/install/ffsend.sh | bash -
# Setting Kernel Build Script
RUN curl -sO https://raw.githubusercontent.com/crazyuploader/Bash/master/kbuild.sh && \
mkdir ~/misc && \
mv ./kbuild.sh ~/misc && \
cd ~/misc && \
chmod +x kbuild.sh && \
printf "\nalias kbuild=\"~/misc/kbuild.sh\"" >> ~/.bashrc
# Setting Git Identity
RUN git config --global user.email "me@devjugal.com" && \
git config --global user.name "crazyuploader"
# Setting up an environment variable
ENV TOOLCHAIN /toolchains
ENV CLANG /toolchains/clang/bin/clang
ENV GCC /toolchains/gcc/bin/aarch64-linux-android-
ENV GCC32 /toolchains/gcc32/bin/arm-linux-androideabi-
CMD ["bash"]