| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- name: Setup Droidspaces-OSS
- description: Clone and apply Droidspaces-OSS patches with version-specific fixes
- inputs:
- version:
- description: 'Kernel config version (e.g., android15-6.6)'
- required: true
- android_version:
- description: 'Android version (e.g., android15)'
- required: true
- kernel_version:
- description: 'Kernel version (e.g., 6.6)'
- required: true
- os_patch_level:
- description: 'OS patch level (e.g., 2024-07)'
- required: true
- sublevel:
- description: 'Kernel sublevel'
- required: true
- droidspaces_commit:
- description: 'Pinned Droidspaces-OSS commit (empty = main tip)'
- required: false
- default: ''
- runs:
- using: composite
- steps:
- - name: Download and Apply Droidspaces-OSS Patches
- uses: ./.github/actions/retry
- with:
- command: |
- git clone --depth=1 https://github.com/ravindu644/Droidspaces-OSS.git
- attempts: 5
- delay: 5
- workdir: ${{ github.workspace }}
- - name: Pin Droidspaces-OSS to resolved commit
- shell: bash
- working-directory: ${{ github.workspace }}
- run: |
- if [ -n "${{ inputs.droidspaces_commit }}" ]; then
- git -C Droidspaces-OSS fetch --depth=1 origin "${{ inputs.droidspaces_commit }}"
- git -C Droidspaces-OSS checkout "${{ inputs.droidspaces_commit }}"
- [ "$(git -C Droidspaces-OSS rev-parse HEAD)" = "${{ inputs.droidspaces_commit }}" ] || { echo "Droidspaces pin mismatch" >&2; exit 1; }
- fi
- - name: Apply the SYSVIPC kABI fix
- shell: bash
- working-directory: ${{ github.workspace }}/kernel/common
- run: |
- if [ "${{ inputs.version }}" == "android16-6.12" ]; then
- cp ${{ github.workspace }}/Droidspaces-OSS/Documentation/resources/kernel-patches/GKI/kernel-6.12/001.GKI-6.12-or-above-fix_sysvipc_kabi.patch ./
- patch -p1 < 001.GKI-6.12-or-above-fix_sysvipc_kabi.patch
- elif [ "${{ inputs.version }}" == "android15-6.6" ]; then
- #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
- #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
- 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 ./
- patch -p1 < 001.GKI-below-6.12-fix_sysvipc_kabi_6_7_8.patch
- elif [ "${{ inputs.version }}" == "android14-6.1" ]; then
- #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
- #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
- 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 ./
- patch -p1 < 001.GKI-below-6.12-fix_sysvipc_kabi_6_7_8.patch
- elif [ "${{ inputs.version }}" == "android14-5.15" ]; then
- 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 ./
- patch -p1 < 001.GKI-below-6.12-fix_sysvipc_kabi_6_7_8.patch
- elif [ "${{ inputs.version }}" == "android13-5.15" ]; then
- 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 ./
- patch -p1 < 001.GKI-below-6.12-fix_sysvipc_kabi_6_7_8.patch
- elif [ "${{ inputs.version }}" == "android12-5.10" ] || [ "${{ inputs.version }}" == "android13-5.10" ]; then
- 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 ./
- patch -p1 < 001.GKI-below-6.12-fix_sysvipc_kabi_6_7_8.patch
- 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 ./
- patch -p1 < 002.5.10_or_lower_use_android_abi_padding_for_posix_mqueue.patch
- fi
- - name: Export IPC symbols for module linkage
- shell: bash
- if: inputs.version == 'android16-6.12'
- working-directory: ${{ github.workspace }}/kernel
- run: |
- echo >> "${{ github.workspace }}/kernel/common/ipc/namespace.c"
- echo 'EXPORT_SYMBOL_GPL(put_ipc_ns);' >> "${{ github.workspace }}/kernel/common/ipc/namespace.c"
- echo >> "${{ github.workspace }}/kernel/common/ipc/msgutil.c"
- echo 'EXPORT_SYMBOL_GPL(init_ipc_ns);' >> "${{ github.workspace }}/kernel/common/ipc/msgutil.c"
- - name: Enable Kernel Configs
- uses: ./.github/actions/set-kernel-config
- with:
- config_list: |
- CONFIG_PID_NS=y
- CONFIG_SYSVIPC=y
- CONFIG_POSIX_MQUEUE=y
- CONFIG_IPC_NS=y
- CONFIG_DEVTMPFS=y
- CONFIG_BINFMT_MISC=y
- CONFIG_BINFMT_SCRIPT=y
- CONFIG_BINFMT_ELF=y
- CONFIG_USER_NS=y
|