Skip to content

Android Kernel Patch with Docker and LXC LXD Features

License

Notifications You must be signed in to change notification settings

1orz/android-gki-custom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GKI Custom

Enable LXC, Docker support for GKI Kernel

Notice

Currently only supports android12-5.10

Build

Build with action

Fork repo and run new workflow

Manual Build

Sync Sources
Reference KernelSU how to build

mkdir android-kernel; cd android-kernel
repo init --depth 1 -u https://android.googlesource.com/kernel/manifest -b [BRANCH]
repo sync

Clone Repo

git clone https://github.com/TapetalArray/gki-custom

Apply Change

Usually we need to add these options to meet the basic requirements of docker. But for GKI kernel it is a little different, check this diff

CONFIG_SYSVIPC=y
CONFIG_UTS_NS=y
CONFIG_PID_NS=y
CONFIG_IPC_NS=y
CONFIG_USER_NS=y
CONFIG_NET_NS=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CGROUP_FREEZER=y

You can also use this
Only available android12-5.10

cp ./gki-custom/config/gki_defconfig-android12-5.10 ./android-kernel/common/arch/arm64/configs/gki_defconfig

Patch

git apply -v ../../gki-custom/patches/android12-5.10/*.patch

Save

BUILD_CONFIG=common/build.config.gki.aarch64 build/config.sh savedefconfig

Build

LTO=thin BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh

Create Image

Download gki-release-builds.

./tools/mkbootimg/unpack_bootimg.py --boot_img path/to/img
./tools/mkbootimg/mkbootimg.py --header_version 4 --kernel path/to/Image --ramdisk path/to/ramdisk --os_version [OS_VERSION] --os_patch_level [OS_PATCH_LEVEL] -o path/to/img

Contribute

Support for other release GKI

Credits

lateautumn233 TapetalArray

About

Android Kernel Patch with Docker and LXC LXD Features

Topics

Resources

License

Stars

Watchers

Forks