Update Novendor.yml #5
This file contains hidden or 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 OnePlus 7 Kernel (No Vendor Blobs + Flashable) | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main, lineage-21, android-16] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup build environment | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y bc bison flex clang lld llvm lz4 \ | |
| make python3 git zip curl wget ccache libssl-dev rsync tar gzip xz-utils unzip | |
| - name: Download Clang toolchain | |
| run: | | |
| mkdir -p clang | |
| wget https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/refs/heads/master/clang-r530567.tar.gz -O clang.tar.gz | |
| tar -xf clang.tar.gz -C clang | |
| echo "✅ Clang toolchain ready." | |
| - name: Configure environment | |
| run: | | |
| export ARCH=arm64 | |
| export SUBARCH=arm64 | |
| export PATH=$PWD/clang/bin:$PATH | |
| export CC=clang | |
| export CROSS_COMPILE=aarch64-linux-gnu- | |
| export CROSS_COMPILE_ARM32=arm-linux-gnueabi- | |
| mkdir -p out | |
| - name: Disable Vendor-dependent Modules | |
| run: | | |
| echo "🔧 Disabling vendor-related configs..." | |
| cat > novendor.defaults <<'EOF' | |
| CONFIG_LOCALVERSION_AUTO=y | |
| CONFIG_VENDOR_EDIT=n | |
| CONFIG_OPLUS_DEVICE_INFO=n | |
| CONFIG_OPLUS_FEATURE_CHG_BASIC=n | |
| CONFIG_OPLUS_ARCH_EXTENDS=n | |
| CONFIG_OPLUS_PROJECT_INFO=n | |
| CONFIG_DRM_MSM_OPLUS=n | |
| CONFIG_QCOM_CAMERA=n | |
| CONFIG_SPECTRA_CAMERA=n | |
| CONFIG_SPECTRA_EEPROM=n | |
| CONFIG_NETFILTER=y | |
| CONFIG_NETFILTER_XTABLES=y | |
| CONFIG_NF_CONNTRACK=y | |
| CONFIG_NF_CONNTRACK_IPV4=y | |
| CONFIG_NF_CONNTRACK_IPV6=y | |
| CONFIG_IP_NF_FILTER=y | |
| CONFIG_IP6_NF_FILTER=y | |
| CONFIG_IP6_NF_REJECT=y | |
| CONFIG_IP6_NF_TARGET_REJECT=y | |
| EOF | |
| make O=out ARCH=arm64 guacamole_defconfig | |
| make O=out ARCH=arm64 olddefconfig KCONFIG_ALLCONFIG=novendor.defaults | |
| - name: Build Kernel | |
| run: | | |
| export ARCH=arm64 | |
| export SUBARCH=arm64 | |
| export PATH=$PWD/clang/bin:$PATH | |
| make O=out ARCH=arm64 -j$(nproc) \ | |
| CC=clang \ | |
| CROSS_COMPILE=aarch64-linux-gnu- \ | |
| CROSS_COMPILE_ARM32=arm-linux-gnueabi- | |
| - name: Package Kernel (AnyKernel3) | |
| run: | | |
| git clone https://github.com/osm0sis/AnyKernel3.git | |
| cp out/arch/arm64/boot/Image* AnyKernel3/ | |
| cd AnyKernel3 | |
| zip -r9 ../oneplus7_kernel_novendor_anykernel.zip * -x .git README.md *placeholder | |
| cd .. | |
| - name: Optional Boot Image Repack | |
| run: | | |
| mkdir boot | |
| cd boot | |
| wget -q "https://mirrorbits.lineageos.org/full/guacamoleb/20251026/boot.img" -O boot.img | |
| wget -q https://github.com/topjohnwu/magisk-files/raw/main/magiskboot | |
| chmod +x magiskboot | |
| ./magiskboot unpack boot.img | |
| cp ../out/arch/arm64/boot/Image kernel | |
| ./magiskboot repack boot.img new-boot.img | |
| mv new-boot.img ../oneplus7_kernel_novendor_boot.img | |
| cd .. | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: oneplus7-novendor-flashables | |
| path: | | |
| oneplus7_kernel_novendor_anykernel.zip | |
| oneplus7_kernel_novendor_boot.img |