Enable LXC, Docker support for GKI Kernel
Currently only supports android12-5.10
Fork repo and run new workflow
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
git clone https://github.com/TapetalArray/gki-custom
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
LTO=thin BUILD_CONFIG=common/build.config.gki.aarch64 build/build.sh
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
Support for other release GKI