action.yml 838 B

12345678910111213141516171819202122232425262728293031
  1. name: Add bbg
  2. description: add and enable bbg into the kernel
  3. runs:
  4. using: composite
  5. steps:
  6. - name: add bbg into kernel
  7. shell: bash
  8. run: |
  9. cd "$COMMON"
  10. echo "Adding BBG..."
  11. curl -LSs https://github.com/vc-teahouse/Baseband-guard/raw/main/setup.sh | bash
  12. - name: enable bbg in defconfig
  13. shell: bash
  14. run: |
  15. cd "$GITHUB_WORKSPACE"
  16. cat >> "$GKI_DEFCONFIG" << 'EOF'
  17. CONFIG_BBG=y
  18. EOF
  19. - name: add bbg into kconfig
  20. shell: bash
  21. run: |
  22. sed -i '/^config LSM$/,/^help$/{ /^[[:space:]]*default/ { /baseband_guard/! s/selinux/selinux,baseband_guard/ } }' security/Kconfig
  23. - name: if config_lsm is in defconfig, add bbg
  24. shell: bash
  25. run: |
  26. cd "$GITHUB_WORKSPACE"
  27. sed -i '/^CONFIG_LSM=/ s/"$/,baseband_guard"/' "$GKI_DEFCONFIG"