action.yml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. name: build kernel
  2. description: each samsung kernel has its own way of building the kernel, they are sorted here.
  3. inputs:
  4. branch:
  5. description: 'device kernel'
  6. required: true
  7. ccache:
  8. description: 'build with ccache'
  9. required: true
  10. build_type:
  11. description: 'make or bazel'
  12. required: true
  13. runs:
  14. using: composite
  15. steps:
  16. - name: start bazel build
  17. if: inputs.build_type == 'Bazel'
  18. shell: bash
  19. run: |
  20. set -e
  21. set -x
  22. cd "$CONFIG"
  23. echo "Building the kernel..."
  24. if [[ -d kernel_platform ]]; then
  25. cd kernel_platform
  26. tools/bazel build //common:kernel_aarch64
  27. elif [[ ${{ inputs.branch }} == SM-A055* ]]; then
  28. chmod +x build_kernel.sh
  29. ./build_kernel.sh || true
  30. elif [[ ${{ inputs.branch }} == SM-S926* ]]; then
  31. sed -i '/"modules"/d' projects/s5e9945/s5e9945.bzl
  32. sed -i '/"modules.builtin.modinfo"/d' projects/s5e9945/build.config.s5e9945.common
  33. sed -i '/"modules.builtin"/d' projects/s5e9945/build.config.s5e9945.common
  34. sed -i '/"modules.order"/d' projects/s5e9945/build.config.s5e9945.common
  35. sed -i '/"modules.builtin.modinfo"/d' projects/s5e9945/s5e9945.bzl
  36. sed -i '/"modules.builtin"/d' projects/s5e9945/s5e9945.bzl
  37. sed -i '/"modules.order"/d' projects/s5e9945/s5e9945.bzl
  38. sed -i '/"Module.symvers"/d' projects/s5e9945/s5e9945.bzl
  39. tools/bazel run --nocheck_bzl_visibility --config=stamp --sandbox_debug --verbose_failures --debug_make_verbosity=I //projects/s5e9945:s5e9945_user_dist
  40. #cd kernel
  41. #SYMBOL_LIST=android/abi_gki_aarch64_galaxy
  42. #echo "find_in_flight_task_in_one_workqueue" >> $SYMBOL_LIST
  43. #sed -i '
  44. #/"kernel_aarch64": {/,/},/ {
  45. #s/"kmi_symbol_list_strict_mode": True/"kmi_symbol_list_strict_mode": False/
  46. #s/"trim_nonlisted_kmi": True/"trim_nonlisted_kmi": False/
  47. #}
  48. #cd ..
  49. #tools/bazel build //kernel:kernel_aarch64
  50. elif [[ ${{ inputs.branch }} == SM-A556* ]]; then
  51. sed -i '/"modules"/d' projects/s5e8845/s5e8845.bzl
  52. sed -i '/"modules.builtin.modinfo"/d' projects/s5e8845/build.config.s5e8845.common
  53. sed -i '/"modules.builtin"/d' projects/s5e8845/build.config.s5e8845.common
  54. sed -i '/"modules.order"/d' projects/s5e8845/build.config.s5e8845.common
  55. sed -i '/"modules.builtin.modinfo"/d' projects/s5e8845/s5e8845.bzl
  56. sed -i '/"modules.builtin"/d' projects/s5e8845/s5e8845.bzl
  57. sed -i '/"modules.order"/d' projects/s5e8845/s5e8845.bzl
  58. sed -i '/"Module.symvers"/d' projects/s5e8845/s5e8845.bzl
  59. tools/bazel run --nocheck_bzl_visibility --config=stamp --sandbox_debug --verbose_failures --debug_make_verbosity=I //projects/s5e8845:s5e8845_user_dist
  60. #cd kernel
  61. #SYMBOL_LIST=android/abi_gki_aarch64_galaxy
  62. #echo "find_in_flight_task_in_one_workqueue" >> $SYMBOL_LIST
  63. #sed -i '
  64. #/"kernel_aarch64": {/,/},/ {
  65. #s/"kmi_symbol_list_strict_mode": True/"kmi_symbol_list_strict_mode": False/
  66. #s/"trim_nonlisted_kmi": True/"trim_nonlisted_kmi": False/
  67. #}
  68. #cd ..
  69. #tools/bazel build //kernel:kernel_aarch64
  70. fi
  71. - name: start make build
  72. if: inputs.build_type == 'make'
  73. shell: bash
  74. run: |
  75. set -e
  76. set -x
  77. cd "$CONFIG"
  78. if [[ -f build_kernel_GKI.sh ]]; then
  79. chmod +x build_kernel_GKI.sh
  80. ./build_kernel_GKI.sh || true
  81. elif [[ -f build_kernel.sh ]]; then
  82. sudo apt update
  83. sudo apt-get install -y libyaml-dev
  84. chmod +x build_kernel.sh
  85. ./build_kernel.sh || true
  86. fi
  87. #if [[ ${{ inputs.branch }} == SM-S928B* || "${{ inputs.branch }}" == "SM-S938B-Oneui7" || "${{ inputs.branch }}" == "SM-S931B-Oneui8" || "${{ inputs.branch }}" == "SM-F741B-Oneui8" || "${{ inputs.branch }}" == "SM-X710-Oneui6.1.1" ]]; then
  88. #cd kernel_platform
  89. #tools/bazel build //common:kernel_aarch64
  90. #chmod +x build_kernel_GKI.sh
  91. #./build_kernel_GKI.sh || true
  92. #elif [[ "${{ inputs.branch }}" == "SM-X916B" || "${{ inputs.branch }}" == "SM-F946N-Oneui7" || "${{ inputs.branch }}" == "SM-S916B-Oneui8" || "${{ inputs.branch }}" == "SM-S918B-Oneui8" || "${{ inputs.branch }}" == "SM-F946B-Oneui8" || "${{ inputs.branch }}" == "SM-S901E-Oneui8" || "${{ inputs.branch }}" == "SM-X800-Oneui8" || ${{ inputs.branch }} == SM-S911B* || "${{ inputs.branch }}" == "SM-M556B-Oneui8" ]]; then
  93. #cd kernel_platform
  94. #tools/bazel build //common:kernel_aarch64
  95. #chmod +x build_kernel_GKI.sh
  96. #./build_kernel_GKI.sh || true
  97. #elif [[ ${{ inputs.branch }} == SM-A546* || "${{ inputs.branch }}" == "SM-M146B-Oneui7-ADYJ2" || "${{ inputs.branch }}" == "SM-S908B-Oneui8-bitK" || ${{ inputs.branch }} == SM-A055* || "${{ inputs.branch }}" == "SM-X610-Oneui6.1.1-bit7" || "${{ inputs.branch }}" == "SM-A166B-Oneui7" ]]; then
  98. #sudo apt update
  99. #sudo apt-get install -y libyaml-dev
  100. #chmod +x build_kernel.sh
  101. #./build_kernel.sh || true
  102. #elif [[ "${{ inputs.branch }}" == "SM-A566B" ]]; then
  103. #chmod +x build_script.sh
  104. #touch ./kernel-6.6/abi_symbollist.raw
  105. #touch ./kernel-6.6/abi_symbollist
  106. #./build_script.sh || true
  107. #elif [[ "${{ inputs.branch }}" == "SM-A075M-Oneui7" ]]; then
  108. #chmod +x build_kernel.sh
  109. #./build_kernel.sh
  110. #fi