action.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. if [[ ${{ inputs.version }} = "android16-6.12" ]]; then
  19. echo "Removing pre-existing ntsync files for android16-6.12"
  20. rm -f include/uapi/linux/ntsync.h
  21. rm -f drivers/misc/ntsync.c
  22. fi
  23. if [[ ${{ inputs.version }} = "android13-5.10" ]]; then
  24. cp ${{ github.workspace }}/kernel_patches/common/ntsync/ntsync_compat_android12-5.10.patch ${{ github.workspace }}/kernel/common
  25. patch -p1 ntsync_compat_android12-5.10.patch
  26. elif [[ ${{ inputs.version }} = "android14-5.15" ]]; then
  27. cp ${{ github.workspace }}/kernel_patches/common/ntsync/ntsync_compat_android13-5.15.patch ${{ github.workspace }}/kernel/common
  28. patch -p1 ntsync_compat_android13-5.15.patch
  29. else
  30. cp ${{ github.workspace }}/kernel_patches/common/ntsync/ntsync_compat_${{ inputs.version }}.patch ${{ github.workspace }}/kernel/common
  31. patch -p1 ntsync_compat_${{ inputs.version }}.patch
  32. fi
  33. cp ${{ github.workspace }}/kernel_patches/common/ntsync/ntsync_base.patch ${{ github.workspace }}/kernel/common
  34. patch -p1 < ntsync_base.patch
  35. - name: Enable NTSync
  36. uses: ./.github/actions/set-kernel-config
  37. with:
  38. config_list: |
  39. CONFIG_NTSYNC=y