action.yml 4.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. shell: bash
  24. working-directory: ${{ github.workspace }}
  25. run: |
  26. git clone --depth=1 https://github.com/ravindu644/Droidspaces-OSS.git
  27. - name: Apply the SYSVIPC kABI fix
  28. shell: bash
  29. working-directory: ${{ github.workspace }}/kernel/common
  30. run: |
  31. if [ "${{ inputs.version }}" == "android16-6.12" ]; then
  32. cp ${{ github.workspace }}/Droidspaces-OSS/Documentation/resources/kernel-patches/GKI/kernel-6.12/001.GKI-6.12-or-above-fix_sysvipc_kabi.patch ./
  33. patch -p1 < 001.GKI-6.12-or-above-fix_sysvipc_kabi.patch
  34. elif [ "${{ inputs.version }}" == "android15-6.6" ]; then
  35. #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
  36. #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
  37. 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 ./
  38. patch -p1 < 001.GKI-below-6.12-fix_sysvipc_kabi_6_7_8.patch
  39. elif [ "${{ inputs.version }}" == "android14-6.1" ]; then
  40. #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
  41. #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
  42. 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 ./
  43. patch -p1 < 001.GKI-below-6.12-fix_sysvipc_kabi_6_7_8.patch
  44. elif [ "${{ inputs.version }}" == "android14-5.15" ]; then
  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 }}" == "android13-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 }}" == "android12-5.10" ] || [ "${{ inputs.version }}" == "android13-5.10" ]; 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. 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 ./
  54. patch -p1 < 002.5.10_or_lower_use_android_abi_padding_for_posix_mqueue.patch
  55. fi
  56. - name: Export IPC symbols for module linkage
  57. shell: bash
  58. if: inputs.version == 'android16-6.12'
  59. working-directory: ${{ github.workspace }}/kernel
  60. run: |
  61. echo >> "${{ github.workspace }}/kernel/common/ipc/namespace.c"
  62. echo 'EXPORT_SYMBOL_GPL(put_ipc_ns);' >> "${{ github.workspace }}/kernel/common/ipc/namespace.c"
  63. echo >> "${{ github.workspace }}/kernel/common/ipc/msgutil.c"
  64. echo 'EXPORT_SYMBOL_GPL(init_ipc_ns);' >> "${{ github.workspace }}/kernel/common/ipc/msgutil.c"
  65. - name: Enable Kernel Configs
  66. uses: ./.github/actions/set-kernel-config
  67. with:
  68. config_list: |
  69. CONFIG_PID_NS=y
  70. CONFIG_SYSVIPC=y
  71. CONFIG_POSIX_MQUEUE=y
  72. CONFIG_IPC_NS=y
  73. CONFIG_DEVTMPFS=y
  74. CONFIG_BINFMT_MISC=y
  75. CONFIG_BINFMT_SCRIPT=y
  76. CONFIG_BINFMT_ELF=y
  77. CONFIG_USER_NS=y