action.yml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. name: Setup Droidspaces-OSS
  2. description: Clone and apply Droidspaces-OSS patches with version-specific fixes
  3. inputs:
  4. version:
  5. description: 'Kernel config version (e.g., android15-6.6)'
  6. required: true
  7. android_version:
  8. description: 'Android version (e.g., android15)'
  9. required: true
  10. kernel_version:
  11. description: 'Kernel version (e.g., 6.6)'
  12. required: true
  13. os_patch_level:
  14. description: 'OS patch level (e.g., 2024-07)'
  15. required: true
  16. sublevel:
  17. description: 'Kernel sublevel'
  18. required: true
  19. runs:
  20. using: composite
  21. steps:
  22. - name: Download and Apply Droidspaces-OSS Patches
  23. uses: ./.github/actions/retry
  24. with:
  25. command: |
  26. git clone --depth=1 https://github.com/ravindu644/Droidspaces-OSS.git
  27. attempts: 5
  28. delay: 5
  29. workdir: ${{ github.workspace }}
  30. - name: Apply the SYSVIPC kABI fix
  31. shell: bash
  32. working-directory: ${{ github.workspace }}/kernel/common
  33. run: |
  34. if [ "${{ inputs.version }}" == "android16-6.12" ]; then
  35. cp ${{ github.workspace }}/Droidspaces-OSS/Documentation/resources/kernel-patches/GKI/kernel-6.12/001.GKI-6.12-or-above-fix_sysvipc_kabi.patch ./
  36. patch -p1 < 001.GKI-6.12-or-above-fix_sysvipc_kabi.patch
  37. elif [ "${{ inputs.version }}" == "android15-6.6" ]; then
  38. #curl -L https://raw.githubusercontent.com/ravindu644/Droidspaces-OSS/main/Documentation/resources/kernel-patches/GKI/below-kernel-6.12/001.GKI-below-6.12-fix_sysvipc_kabi_1_2_3.patch
  39. #curl -L https://raw.githubusercontent.com/ravindu644/Droidspaces-OSS/main/Documentation/resources/kernel-patches/GKI/below-kernel-6.12/001.GKI-below-6.12-fix_sysvipc_kabi_3_4_5.patch
  40. cp ${{ github.workspace }}/Droidspaces-OSS/Documentation/resources/kernel-patches/GKI/below-kernel-6.12/001.GKI-below-6.12-fix_sysvipc_kabi_6_7_8.patch ./
  41. patch -p1 < 001.GKI-below-6.12-fix_sysvipc_kabi_6_7_8.patch
  42. elif [ "${{ inputs.version }}" == "android14-6.1" ]; then
  43. #curl -L https://raw.githubusercontent.com/ravindu644/Droidspaces-OSS/main/Documentation/resources/kernel-patches/GKI/below-kernel-6.12/001.GKI-below-6.12-fix_sysvipc_kabi_1_2_3.patch
  44. #curl -L https://raw.githubusercontent.com/ravindu644/Droidspaces-OSS/main/Documentation/resources/kernel-patches/GKI/below-kernel-6.12/001.GKI-below-6.12-fix_sysvipc_kabi_3_4_5.patch
  45. cp ${{ github.workspace }}/Droidspaces-OSS/Documentation/resources/kernel-patches/GKI/below-kernel-6.12/001.GKI-below-6.12-fix_sysvipc_kabi_6_7_8.patch ./
  46. patch -p1 < 001.GKI-below-6.12-fix_sysvipc_kabi_6_7_8.patch
  47. elif [ "${{ inputs.version }}" == "android14-5.15" ]; then
  48. cp ${{ github.workspace }}/Droidspaces-OSS/Documentation/resources/kernel-patches/GKI/below-kernel-6.12/001.GKI-below-6.12-fix_sysvipc_kabi_6_7_8.patch ./
  49. patch -p1 < 001.GKI-below-6.12-fix_sysvipc_kabi_6_7_8.patch
  50. elif [ "${{ inputs.version }}" == "android13-5.15" ]; then
  51. cp ${{ github.workspace }}/Droidspaces-OSS/Documentation/resources/kernel-patches/GKI/below-kernel-6.12/001.GKI-below-6.12-fix_sysvipc_kabi_6_7_8.patch ./
  52. patch -p1 < 001.GKI-below-6.12-fix_sysvipc_kabi_6_7_8.patch
  53. elif [ "${{ inputs.version }}" == "android12-5.10" ] || [ "${{ inputs.version }}" == "android13-5.10" ]; then
  54. cp ${{ github.workspace }}/Droidspaces-OSS/Documentation/resources/kernel-patches/GKI/below-kernel-6.12/001.GKI-below-6.12-fix_sysvipc_kabi_6_7_8.patch ./
  55. patch -p1 < 001.GKI-below-6.12-fix_sysvipc_kabi_6_7_8.patch
  56. cp ${{ github.workspace }}/Droidspaces-OSS/Documentation/resources/kernel-patches/GKI/below-kernel-6.12/002.5.10_or_lower_use_android_abi_padding_for_posix_mqueue.patch ./
  57. patch -p1 < 002.5.10_or_lower_use_android_abi_padding_for_posix_mqueue.patch
  58. fi
  59. - name: Export IPC symbols for module linkage
  60. shell: bash
  61. if: inputs.version == 'android16-6.12'
  62. working-directory: ${{ github.workspace }}/kernel
  63. run: |
  64. echo >> "${{ github.workspace }}/kernel/common/ipc/namespace.c"
  65. echo 'EXPORT_SYMBOL_GPL(put_ipc_ns);' >> "${{ github.workspace }}/kernel/common/ipc/namespace.c"
  66. echo >> "${{ github.workspace }}/kernel/common/ipc/msgutil.c"
  67. echo 'EXPORT_SYMBOL_GPL(init_ipc_ns);' >> "${{ github.workspace }}/kernel/common/ipc/msgutil.c"
  68. - name: Enable Kernel Configs
  69. uses: ./.github/actions/set-kernel-config
  70. with:
  71. config_list: |
  72. CONFIG_PID_NS=y
  73. CONFIG_SYSVIPC=y
  74. CONFIG_POSIX_MQUEUE=y
  75. CONFIG_IPC_NS=y
  76. CONFIG_DEVTMPFS=y
  77. CONFIG_BINFMT_MISC=y
  78. CONFIG_BINFMT_SCRIPT=y
  79. CONFIG_BINFMT_ELF=y
  80. CONFIG_USER_NS=n