β οΈ This project is on stand-by for the moment. Indeed, as I don't have a computer anymore, it's impossible for me to debug/test or even to update what would certainly have needed it. Keep in mind that this was originally designed to facilitate the management/build of multiple kernels maintained by experienced developers and is not and will not be a "run it and grab a coffee" tool. Kernel compilation requires a minimum of prior knowledge and this kind of tool simply does not exist.
- Overview
 - Requirements
 - Installation
 - Getting Started
 - Options
 - Working Structure
 - Toolchains
 - Screenshots
 - More information
 - Common warnings and errors
 - Reporting Issues
 - Contributing
 - Help us Translate ZenMaxBuilder
 - License
 - Credits
 
ZenMaxBuilder (ZMB) is a Linux kernel builder written in Bash and oriented for android devices but as well compatible for other platforms. It can be installed on any compatible Linux system (feel free to Pull Request for win/mac support). By default it uses AOSP-Clang, Eva-GCC, Proton-Clang, Neutron-Clang or Lineage-GCC but you can use any Clang or GCC toolchain you like (with LLVM and binutils included).
Find all your compilations and working folders in one place, update and maintain your kernels faster. Full logs with the possibility to restart the build after error. Automatic creation of a flashable signed ZIP for android devices (with AK3 and AOSP Keys). Real time status feedback with build sending on any group or Telegram channel. And more. The perfect tool to compile on the fly and keep fresh and clean kernel paths.
- A compatible Linux system
 - The kernel source code of your device/os
 - A minimum of knowledge in kernel compilation
 - Patience
 
The installation of the missing dependencies will be proposed by the installer or first install them manually with your favorite package manager (no package is installed without your prior consent) :
bash sed wget git curl zip tar jq expect make cmake automake autoconf llvm lld lldb clang gcc binutils bison perl gperf gawk flex bc python3 zstd openssl sudo
The optional flashable zip signature with AOSP Keys requires java (JDK) which is not proposed to install (openjdk recommended).
The installer simply clones the repository in your HOME and creates a copy of the executable in usr/bin.
Install ZenMaxBuilder :
wget kernel-builder.com/zmb && bash zmb install
Checking the installation :
bash ~/ZenMaxBuilder/docs/zmb check
Update ZenMaxBuilder :
zmb --update
Uninstall ZenMaxBuilder :
bash ~/ZenMaxBuilder/docs/zmb uninstall
rm -rf ~/ZenMaxBuilder
Create a copy of settings.cfg to set your settings (optional) :
cp ~/ZenMaxBuilder/etc/settings.cfg ~/ZenMaxBuilder/etc/user.cfg
vi ~/ZenMaxBuilder/etc/user.cfg
Start ZMB and follow instructions :
zmb --start
You can exit ZMB at any time using ctrl+c or ctrl+z combinaison keys.
Usage: zmb [OPTION] [ARGUMENT] (e.g. zmb --info zenfone pro)
Options
    -h, --help                      show this message and exit
    -s, --start                     start new kernel compilation
    -u, --update                    update script and toolchains
    -v, --version                   show toolchains versions
    -l, --list                      show list of your kernels
    -t, --tag          [v4.19]      show the latest Linux tag
    -i, --info        [device]      mobile device specifications
    -m, --msg        [message]      send message on Telegram
    -f, --file          [file]      send file on Telegram
    -z, --zip          [image]      create new kernel zip
    -p, --patch                     apply a patch to a kernel
    -r, --revert                    revert a patch to a kernel
    -d, --debug                     start compilation in debug mode
ZenMaxBuilder/
|
|---- builds/               # Flashable kernel zips
|     |---- DEVICE1/
|     |---- DEVICE2/
|
|---- logs/                 # Compilation build logs
|     |---- DEVICE1/
|     |---- DEVICE2/
|
|---- out/                  # Kernel working directories
|     |---- DEVICE1/
|     |---- DEVICE2/
ZMB uses prebuilt toolchains by default (built on x86-64 interpreter: lib64/ld-linux-x86-64.so.2).
In case you need others or have already compiled/downloaded some, just move them to the toolchains folder and name them aosp-clang for example (see settings.cfg).
- AOSP-Clang 
Android Clang/LLVM Prebuilts by Google - Binutils 
Android GCC/LLVM Prebuilts by Google - Eva-GCC 
Bleeding Edge GCC Prebuilts by mvaisakh - Neutron-Clang 
Bleeding Edge LLVM Prebuilts by dakkshesh07 - Proton-Clang 
Android Clang/LLVM Prebuilts by kdrag0n - Lineage-GCC 
Android GCC Prebuilts by LineageOS - Proton-GCC 
Proton-Clang vs Eva-GCC - Neutron-GCC 
Neutron-Clang vs Eva-GCC - Host-Clang 
system host Clang/LLVM 
ZMB is a tool to facilitate the compilation of the Linux kernel, it does not modify the source, does not adds possible patchset and does not fixes specific drivers or compilation warnings.
The only change made is the addition of the selected toolchain compiler in the main Makefile, all others options from ZMB settings will be passed directly to make as command-line arguments :
# AOSP-Clang
CROSS_COMPILE ?= aarch64-linux-android-
CC             = clang
# Proton-Clang / Neutron-Clang
CROSS_COMPILE ?= aarch64-linux-gnu-
CC             = clang
# Eva-GCC
CROSS_COMPILE ?= aarch64-elf-
CC             = aarch64-elf-gcc
# Lineage-GCC
CROSS_COMPILE ?= aarch64-linux-android-
CC             = aarch64-linux-android-gcc
- 
invalid kernel directory: occurs while theARCHoption is not matching the selected kernel directory (or whileKERNEL_DIRis not correctly set), edituser.cfgaccordingly. - 
your system does not support this prebuilt of: occurs while the included prebuilt toolchains are not compatible with your system, you can disableHOST_LINKERinuser.cfgbut the build will fail in most cases. System compatible toolchains are required or you can try host compiler option. - 
CROSS_COMPILE not found in Makefile: occurs while your source is configured to passCROSS_COMPILEtomakeas command-line argument. You can ignore this warning except if you deactivatedMAKE_CMD_ARGS. - 
CROSS_COMPILE may not be set correctly in Makefile: occurs while another compiler is defined in the mainMakefile. You can ignore this warning and answeryeswhile ZMB asking to set it up for you. - 
failed to add toolchain bin to the PATH: occurs while thePATHis not correctly set, please open an issue. - 
An error occurs while getting the kernel version : in most cases your source is not configured to be built with the selected toolchain compiler. Try another compiler or answer
yeswhile purposed and edit yourMakefileaccordingly. - 
kernel version not found: same as above or issue with your source. 
Found a problem? Want a new feature? Have a question? First of all see if your issue, question or idea has already been reported. If don't, just open a new clear and descriptive issue.
If you want to contribute to ZenMaxBuilder project and make it better, your help is very welcome: Contributing Guidelines.
| language | flag | translator | progress | 
|---|---|---|---|
| English | π¬π§ | @grm34 | 100% | 
| Spanish | πͺπΈ | @grm34 | 100% | 
| French | π«π· | @grm34 | 100% | 
| German | π©πͺ | @0n1cOn3 | 100% | 
MIT License
Copyright (c) 2021-2022 darkmaster @grm34 Neternels Team
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- Neternels Team: https://neternels.org
 - Proton-Clang: @kdrag0n
 - Neutron-Clang: @dakkshesh07
 - Eva-GCC: @mvaisakh
 - Lineage-GCC: @LineageOS
 - AnyKernel3: @osm0sis
 - ZipSigner: @osm0sis @topjohnwu
 - Patches: @Kali-Linux @cyberknight777
 
LTC: MHjiEKDw7SAtx6HzSeFEWTfEUiVUak2wUD
BTC: 356URzmeVn8AF8WxMtqipP2qQ3gwZQHdRi
BCH: 1MrG2pNek2v1nM2JShjW6gnxvS9sdxaytw
DOGE: DEMJp1QLze6n76h2f4KH6a55UBETuZHdMp
GTC: 0x349319b09D93EE3576F99622fDEE1388f42a82B0
ETH: 0x445bd5EF7f36CF09135F23dd9E85B8De9fab2199



