action.yml 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. name: prepare ak3
  2. description: copy kernel image to ak3 folder
  3. inputs:
  4. branch:
  5. description: 'device kernel/repo'
  6. required: true
  7. runs:
  8. using: composite
  9. steps:
  10. - name: copy image to ak3 folder depending on branch
  11. shell: bash
  12. run: |
  13. cd "$CONFIG"
  14. if [[ ${{ inputs.branch }} == SM-S928B* || ${{ inputs.branch }} == SM-S931* || ${{ inputs.branch }} == SM-X926* || ${{ inputs.branch }} == SM-F741* ]]; then
  15. KERNEL_IMAGE=$(find kernel_platform/out -type f -path "*_kbuild_mixed_tree/Image" | head -n1)
  16. echo "$KERNEL_IMAGE"
  17. cp "$KERNEL_IMAGE" "$ANYKERNEL3/Image"
  18. elif [[ -f ./kernel_platform/bazel-bin/common/kernel_aarch64/Image ]]; then
  19. cp ./kernel_platform/bazel-bin/common/kernel_aarch64/Image "$ANYKERNEL3/Image"
  20. elif [[ -f ./bazel-bin/kernel/kernel_aarch64/Image ]]; then
  21. cp ./bazel-bin/kernel/kernel_aarch64/Image "$ANYKERNEL3/Image"
  22. elif [[ "${{ inputs.branch }}" == "SM-S928B-Oneui7" || "${{ inputs.branch }}" == "SM-S928B-Oneui8-bit4" || "${{ inputs.branch }}" == "SM-S928B-Oneui8-bit5" || "${{ inputs.branch }}" == "SM-F741B-Oneui8" ]]; then
  23. cp ./kernel_platform/sec/dist/Image "$ANYKERNEL3/Image"
  24. elif [[ "${{ inputs.branch }}" == "SM-S928B-Oneui6.1" ]]; then
  25. cp ./out/msm-pineapple-pineapple-gki/dist/Image "$ANYKERNEL3/Image"
  26. elif [[ "${{ inputs.branch }}" == "SM-S938B-Oneui7" || "${{ inputs.branch }}" == "SM-S931B-Oneui8" || "${{ inputs.branch }}" == "SM-M556B-Oneui8" ]]; then
  27. cp ./kernel_platform/gki/dist/Image "$ANYKERNEL3/Image"
  28. elif [[ "${{ inputs.branch }}" == "SM-X916B" || "${{ inputs.branch }}" == "SM-F946N-Oneui7" || "${{ inputs.branch }}" == "SM-F946B-Oneui8" || "${{ inputs.branch }}" == "SM-S916B-Oneui8" || "${{ inputs.branch }}" == "SM-S918B-Oneui8" || ${{ inputs.branch }} == SM-S911B* || "${{ inputs.branch }}" == "SM-X710-Oneui6.1.1" ]]; then
  29. cp ./out/msm-kalama-kalama-gki/dist/Image "$ANYKERNEL3/Image"
  30. elif [[ ${{ inputs.branch }} == SM-A546* || "${{ inputs.branch }}" == "SM-M146B-Oneui7-ADYJ2" || "${{ inputs.branch }}" == "SM-S908B-Oneui8-bitK" || "${{ inputs.branch }}" == "SM-X610-Oneui6.1.1-bit7" || "${{ inputs.branch }}" == "SM-A166B-Oneui7" ]]; then
  31. cp ./arch/arm64/boot/Image "$ANYKERNEL3/Image"
  32. elif [[ "${{ inputs.branch }}" == "SM-A566B" ]]; then
  33. cp ./kernel-6.6/out/arch/arm64/boot/Image "$ANYKERNEL3/Image"
  34. elif [[ ${{ inputs.branch }} == SM-S926B* ]]; then
  35. #cp ./out/s5e9945_user/dist/Image "$ANYKERNEL3/Image"
  36. KERNEL_IMAGE=$(find out -type f -name "Image" | head -n1)
  37. echo "$KERNEL_IMAGE"
  38. cp "$KERNEL_IMAGE" "$ANYKERNEL3/Image"
  39. elif [[ ${{ inputs.branch }} == SM-A556* ]]; then
  40. #cp ./out/s5e8845_user/dist/Image "$ANYKERNEL3/Image"
  41. KERNEL_IMAGE=$(find out -type f -name "Image" | head -n1)
  42. echo "$KERNEL_IMAGE"
  43. cp "$KERNEL_IMAGE" "$ANYKERNEL3/Image"
  44. elif [[ "${{ inputs.branch }}" == "SM-S901E-Oneui8" || "${{ inputs.branch }}" == "SM-X800-Oneui8" ]]; then
  45. cp ./out/msm-waipio-waipio-gki/dist/Image "$ANYKERNEL3/Image"
  46. elif [[ ${{ inputs.branch }} == SM-A055* ]]; then
  47. #cp ./out/target/product/a05m/obj/KLEAF_OBJ/dist/kernel_device_modules-6.6/mgk_64_k66_kernel_aarch64.user/Image.gz "$ANYKERNEL3/Image.gz"
  48. KERNEL_IMAGE=$(find out -type f -name "Image.gz" | head -n1)
  49. echo "$KERNEL_IMAGE"
  50. cp "$KERNEL_IMAGE" "$ANYKERNEL3/Image.gz"
  51. elif [[ "${{ inputs.branch }}" == "SM-A075M-Oneui7" ]]; then
  52. cp ./out/target/product/a07/obj/KERNEL_OBJ/kernel-5.10/arch/arm64/boot/Image.gz "$ANYKERNEL3/Image.gz"
  53. elif [[ ${{ inputs.branch }} == SM-X926* ]]; then
  54. #cp ./out/target/product/gts10u/obj/KLEAF_OBJ/dist/kernel_device_modules-6.1/mgk_64_k61_kernel_aarch64.user/Image.gz "$ANYKERNEL3/Image.gz"
  55. KERNEL_IMAGE=$(find out -type f -name "Image.gz" | head -n1)
  56. echo "$KERNEL_IMAGE"
  57. cp "$KERNEL_IMAGE" "$ANYKERNEL3/Image.gz"
  58. else
  59. echo "Error: Image file not found in any expected location"
  60. exit 1
  61. fi