action.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. name: 'Apply NTSync Patches'
  2. description: 'Apply ntsync compatibility patches and enable CONFIG_NTSYNC in defconfig'
  3. inputs:
  4. version:
  5. description: 'Kernel config version (e.g., android14-6.12)'
  6. required: true
  7. kernel_version:
  8. description: 'Kernel version (e.g., 6.1)'
  9. required: true
  10. runs:
  11. using: 'composite'
  12. steps:
  13. - name: Apply NTSync Patch
  14. shell: bash
  15. working-directory: ${{ github.workspace }}/kernel/common
  16. run: |
  17. set -euo pipefail
  18. echo "Using patch: $(basename $NTSYNC_PATCH)"
  19. if [[ ${{ inputs.version }} = "android16-6.12" ]]; then
  20. echo "Removing pre-existing ntsync files for android16-6.12"
  21. rm -f include/uapi/linux/ntsync.h
  22. rm -f drivers/misc/ntsync.c
  23. fi
  24. cp ${{ github.workspace }}/kernel_patches/common/ntsync/ntsync_compat_${{ inputs.version }}.patch ${{ github.workspace }}/kernel/common
  25. patch -p1 ntsync_compat_${{ inputs.version }}.patch
  26. cp ${{ github.workspace }}/kernel_patches/common/ntsync/ntsync_base.patch ${{ github.workspace }}/kernel/common
  27. patch -p1 < ntsync_base.patch
  28. cat >> "${{ github.workspace }}/kernel/common/arch/arm64/configs/gki_defconfig" << 'EOF'
  29. CONFIG_NTSYNC=y
  30. EOF