Build Huawei-LLD-EMUI9-KSU-Kernel #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Huawei-LLD-EMUI9-KSU-Kernel | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- HEAD | |
pull_request: | |
branches: | |
- HEAD | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
env: | |
CCACHE_COMPILERCHECK: "%compiler% -dumpmachine; %compiler% -dumpversion" | |
CCACHE_NOHASHDIR: "true" | |
CCACHE_MAXSIZE: "2G" | |
CCACHE_HARDLINK: "true" | |
KERNEL_CMDLINE: "ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=out" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
fetch-depth: 100 | |
- name: Set up ccache | |
uses: hendrikmuhs/[email protected] | |
- name: Install dependencies | |
run: | | |
sudo apt-get update -y | |
sudo apt install binutils make python2 libssl-dev flex unzip libssl-dev ca-certificates xz-utils mkbootimg cpio device-tree-compiler git git-lfs bc bison build-essential ccache curl flex g++-multilib gcc-multilib git git-lfs gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev libelf-dev liblz4-tool libncurses5 libncurses5-dev libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev adb fastboot -y | |
git clone https://github.com/Coconutat/ToolChains.git --dept=1 -b linaro_gcc_4.9 | |
- name: GetTime | |
id: get_time | |
run: | | |
echo "TIME=$(TZ=UTC-8 date +%m%d%H%M )" >> $GITHUB_OUTPUT | |
- name: Build Kernel | |
run: | | |
sudo ln -sf /usr/bin/python2.7 /usr/bin/python | |
if [ -d include/config ]; | |
then | |
echo "Find config,will remove it" | |
rm -rf include/config | |
else | |
echo "No Config,good." | |
fi | |
rm -rf KernelSU | |
rm -rf drivers/kernelsu | |
curl -LSs "https://raw.githubusercontent.com/tiann/KernelSU/main/kernel/setup.sh" | bash -s v0.9.5 | |
export PATH=$(pwd)/ToolChains/bin/:$PATH | |
export ARCH=arm64 | |
export SUBARCH=arm64 | |
make $KERNEL_CMDLINE merge_hi6250_defconfig | |
make $KERNEL_CMDLINE -j$(nproc --all) | |
tools/mkbootimg --kernel out/arch/arm64/boot/Image.gz --base 0x00400000 --cmdline "loglevel=4 coherent_pool=512K page_tracker=on slub_min_objects=12 unmovable_isolate1=2:192M,3:224M,4:256M printktimer=0xfff0a000,0x534,0x538 androidboot.selinux=enforcing buildvariant=user" --tags_offset 0x07A00000 --kernel_offset 0x00080000 --ramdisk_offset 0x10000000 --os_version 9 --os_patch_level 2019-04-01 --output KernelSU_LLD_EMUI9_enforcing_${{ steps.get_time.outputs.TIME }}.img | |
- name: Upload Kernel | |
uses: actions/upload-artifact@v4 | |
with: | |
name: KernelSU_LLD_EMUI9_${{ steps.get_time.outputs.TIME }} | |
path: "KernelSU_LLD_EMUI9_*.img" |