action.yml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. droidspaces_commit:
  20. description: 'Pinned Droidspaces-OSS commit (empty = main tip)'
  21. required: false
  22. default: ''
  23. runs:
  24. using: composite
  25. steps:
  26. - name: Download and Apply Droidspaces-OSS Patches
  27. uses: ./.github/actions/retry
  28. with:
  29. command: |
  30. git clone --depth=1 https://github.com/ravindu644/Droidspaces-OSS.git
  31. attempts: 5
  32. delay: 5
  33. workdir: ${{ github.workspace }}
  34. - name: Pin Droidspaces-OSS to resolved commit
  35. shell: bash
  36. working-directory: ${{ github.workspace }}
  37. run: |
  38. if [ -n "${{ inputs.droidspaces_commit }}" ]; then
  39. git -C Droidspaces-OSS fetch --depth=1 origin "${{ inputs.droidspaces_commit }}"
  40. git -C Droidspaces-OSS checkout "${{ inputs.droidspaces_commit }}"
  41. [ "$(git -C Droidspaces-OSS rev-parse HEAD)" = "${{ inputs.droidspaces_commit }}" ] || { echo "Droidspaces pin mismatch" >&2; exit 1; }
  42. fi
  43. - name: Apply the SYSVIPC kABI fix
  44. shell: bash
  45. working-directory: ${{ github.workspace }}/kernel/common
  46. run: |
  47. if [ "${{ inputs.version }}" == "android16-6.12" ]; then
  48. cp ${{ github.workspace }}/Droidspaces-OSS/Documentation/resources/kernel-patches/GKI/kernel-6.12/001.GKI-6.12-or-above-fix_sysvipc_kabi.patch ./
  49. patch -p1 < 001.GKI-6.12-or-above-fix_sysvipc_kabi.patch
  50. elif [ "${{ inputs.version }}" == "android15-6.6" ]; then
  51. #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
  52. #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
  53. 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 ./
  54. patch -p1 < 001.GKI-below-6.12-fix_sysvipc_kabi_6_7_8.patch
  55. elif [ "${{ inputs.version }}" == "android14-6.1" ]; then
  56. #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
  57. #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
  58. 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 ./
  59. patch -p1 < 001.GKI-below-6.12-fix_sysvipc_kabi_6_7_8.patch
  60. elif [ "${{ inputs.version }}" == "android14-5.15" ]; then
  61. 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 ./
  62. patch -p1 < 001.GKI-below-6.12-fix_sysvipc_kabi_6_7_8.patch
  63. elif [ "${{ inputs.version }}" == "android13-5.15" ]; then
  64. 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 ./
  65. patch -p1 < 001.GKI-below-6.12-fix_sysvipc_kabi_6_7_8.patch
  66. elif [ "${{ inputs.version }}" == "android12-5.10" ] || [ "${{ inputs.version }}" == "android13-5.10" ]; then
  67. 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 ./
  68. patch -p1 < 001.GKI-below-6.12-fix_sysvipc_kabi_6_7_8.patch
  69. 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 ./
  70. patch -p1 < 002.5.10_or_lower_use_android_abi_padding_for_posix_mqueue.patch
  71. fi
  72. - name: Export IPC symbols for module linkage
  73. shell: bash
  74. if: inputs.version == 'android16-6.12'
  75. working-directory: ${{ github.workspace }}/kernel
  76. run: |
  77. echo >> "${{ github.workspace }}/kernel/common/ipc/namespace.c"
  78. echo 'EXPORT_SYMBOL_GPL(put_ipc_ns);' >> "${{ github.workspace }}/kernel/common/ipc/namespace.c"
  79. echo >> "${{ github.workspace }}/kernel/common/ipc/msgutil.c"
  80. echo 'EXPORT_SYMBOL_GPL(init_ipc_ns);' >> "${{ github.workspace }}/kernel/common/ipc/msgutil.c"
  81. - name: Enable Kernel Configs
  82. uses: ./.github/actions/set-kernel-config
  83. with:
  84. config_list: |
  85. CONFIG_PID_NS=y
  86. CONFIG_SYSVIPC=y
  87. CONFIG_POSIX_MQUEUE=y
  88. CONFIG_IPC_NS=y
  89. CONFIG_DEVTMPFS=y
  90. CONFIG_BINFMT_MISC=y
  91. CONFIG_BINFMT_SCRIPT=y
  92. CONFIG_BINFMT_ELF=y
  93. CONFIG_USER_NS=y