action.yml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. sublevel:
  11. description: 'Kernel sublevel'
  12. required: true
  13. runs:
  14. using: 'composite'
  15. steps:
  16. - name: Apply NTSync Patch
  17. shell: bash
  18. working-directory: ${{ github.workspace }}/kernel/common
  19. run: |
  20. set -euo pipefail
  21. if [[ ${{ inputs.version }} = "android16-6.12" ]]; then
  22. echo "Removing pre-existing ntsync files for android16-6.12"
  23. rm -f include/uapi/linux/ntsync.h
  24. rm -f drivers/misc/ntsync.c
  25. fi
  26. if [[ ${{ inputs.version }} = "android13-5.10" ]]; then
  27. patch -p1 < ${{ github.workspace }}/kernel_patches/common/ntsync/ntsync_compat_android12-5.10.patch
  28. elif [[ ${{ inputs.version }} = "android14-5.15" ]]; then
  29. patch -p1 < ${{ github.workspace }}/kernel_patches/common/ntsync/ntsync_compat_android13-5.15.patch
  30. else
  31. patch -p1 < ${{ github.workspace }}/kernel_patches/common/ntsync/ntsync_compat_${{ inputs.version }}.patch
  32. fi
  33. patch -p1 < ${{ github.workspace }}/kernel_patches/common/ntsync/ntsync_base.patch
  34. - name: Enable NTSync
  35. uses: ./.github/actions/set-kernel-config
  36. with:
  37. config_list: |
  38. CONFIG_NTSYNC=y