Browse Source

Add KPM support to action configuration

enable kallsyms for kpm support
jimsterino98 1 tháng trước cách đây
mục cha
commit
c33e863cc9
1 tập tin đã thay đổi với 21 bổ sung0 xóa
  1. 21 0
      .github/actions/configs/action.yml

+ 21 - 0
.github/actions/configs/action.yml

@@ -18,6 +18,27 @@ runs:
      CONFIG_TMPFS_POSIX_ACL=y
      EOF
 
+  - name: add KPM support
+    shell: bash
+    run: |
+     kpmconfig=(
+     "CONFIG_KALLSYMS=y"
+     "CONFIG_KALLSYMS_ALL=y"
+     )
+
+     for config in "${kpmconfig[@]}"; do
+         key="${config%%=*}"
+
+         if grep -qE "^(${key}=|# ${key} is not set$)" "$GKI_DEFCONFIG"; then
+             sed -i -E \
+                 -e "s/^${key}=.*/${config}/" \
+                 -e "s/^# ${key} is not set\$/${config}/" \
+                 "$GKI_DEFCONFIG"
+         else
+             echo "$config" >> "$GKI_DEFCONFIG"
+         fi
+     done
+     
   - name: nuke securities for root access
     shell: bash
     run: |