This repository contains a simple build script and environment setup for compiling the Samsung Galaxy S24 (Exynos) kernel based on the AOSP toolchain and Samsung kernel sources.
- Automated setup of the Android build toolchain (prebuilts, clang, kernel build tools, etc.)
- Support for custom build arguments (e.g.
--enable-kernelsu) --disable-samsung-protectionis enabled by default, otherwise your device won't boot.
This is the main branch. With this you can build the kernel without any ksu or susfs functions. To build with sukisu and susfs use the suki-susfs branch or use the main branch and clone your flavor of ksu into the kernel. Please follow the ksu build guides and build your kernel on the main branch with:
./build_kernel.sh --enable-kernelsuOn the suki-susfs branch the --enable-kernelsu is not needed because it's enabled by default.
- Linux environment (tested on WSL2 + Ubuntu)
- Install dependencies:
sudo apt-get update sudo apt-get install git make bc bison flex libssl-dev wget curl lzop git-core gnupg flex bison build-essential zip zlib1g-dev libc6-dev-i386 x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig python3 repo -y
- Sufficient disk space (~100GB+ recommended)
-
Clone the repository:
git clone https://github.com/dx4m/kernel-buildscript-e1s.git cd kernel-buildscript-e1s chmod +x *.sh
-
Install dependencies:
./install_dep.sh
and then you need to setup your identity
git config --global user.email "your@email.com" git config --global user.name "Your Name"
-
Setup the toolchain (downloads AOSP prebuilts):
./setup_buildchain.sh
-
Build the kernel:
./build_kernel.sh
- Additional flags are supported, e.g.:
./build_kernel.sh --enable-kernelsu
- Make sure you have KernelSU in your kernel sources. Please follow the build guide of your prefered KernelSU repo
- Additional flags are supported, e.g.:
-
The compiled kernel output will be placed in:
out/arch/arm64/boot/and a flashable boot.img will be generated.
This project is licensed under the GNU General Public License v3.0 (GPL-3.0).
See the LICENSE file for details.
Special thanks to:
- Samsung for releasing the kernel sources
- Lucius for his buildscript and kernel for the Galaxy A56.
- AOSP Kernel Sources
- Samsung Kernel Source
- Kernel Buildscript for the Galaxy Tab S10 FE where this bases on
- susfs4ksu