/kernel-buildscript-e1s

A kernel buildscript for the Samsung Galaxy S24 (Exynos) - e1s

Primary LanguageShellGNU General Public License v3.0GPL-3.0

Kernel Build Script for the Samsung Galaxy S24 (Exynos)

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.

Intro

  • Automated setup of the Android build toolchain (prebuilts, clang, kernel build tools, etc.)
  • Support for custom build arguments (e.g. --enable-kernelsu)
  • --disable-samsung-protection is enabled by default, otherwise your device won't boot.

Different branches

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-kernelsu

On the suki-susfs branch the --enable-kernelsu is not needed because it's enabled by default.

Requirements

  • 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)

Usage

  1. Clone the repository:

    git clone https://github.com/dx4m/kernel-buildscript-e1s.git
    cd kernel-buildscript-e1s
    chmod +x *.sh
  2. 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"
  3. Setup the toolchain (downloads AOSP prebuilts):

    ./setup_buildchain.sh
  4. 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
  5. The compiled kernel output will be placed in:

    out/arch/arm64/boot/
    

    and a flashable boot.img will be generated.

License

This project is licensed under the GNU General Public License v3.0 (GPL-3.0).
See the LICENSE file for details.

Credits

Special thanks to:

Resources

KSU flavors