Procházet zdrojové kódy

Add GitHub Action to integrate BBG into the kernel

This action adds BBG to the kernel by modifying defconfig and Kconfig files.
jimsterino98 před 4 měsíci
rodič
revize
9c953db312
1 změnil soubory, kde provedl 31 přidání a 0 odebrání
  1. 31 0
      .github/actions/bbg/action.yml

+ 31 - 0
.github/actions/bbg/action.yml

@@ -0,0 +1,31 @@
+name: Add bbg
+description: add and enable bbg into the kernel
+
+runs:
+  using: composite
+  steps:
+   - name: add bbg into kernel
+     shell: bash
+     run: |
+      cd "$COMMON"
+      echo "Adding BBG..."
+      curl -LSs https://github.com/vc-teahouse/Baseband-guard/raw/main/setup.sh | bash
+      
+   - name: enable bbg in defconfig
+     shell: bash
+     run: |
+      cd "$GITHUB_WORKSPACE"
+      cat >> "$GKI_DEFCONFIG" << 'EOF'
+      CONFIG_BBG=y
+      EOF
+
+   - name: add bbg into kconfig
+     shell: bash
+     run: |
+       sed -i '/^config LSM$/,/^help$/{ /^[[:space:]]*default/ { /baseband_guard/! s/selinux/selinux,baseband_guard/ } }' security/Kconfig
+
+   - name: if config_lsm is in defconfig, add bbg
+     shell: bash
+     run: |
+      cd "$GITHUB_WORKSPACE"
+      sed -i '/^CONFIG_LSM=/ s/"$/,baseband_guard"/' "$GKI_DEFCONFIG"