From f3b699793b1ca1abcddaeeb86d3047508e06592e Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Sat, 8 Nov 2025 19:15:31 +0100 Subject: [PATCH] Implement option to skip certain kernel configs that don't want to play along --- .github/workflows/rewrite-kernel-configs.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rewrite-kernel-configs.yml b/.github/workflows/rewrite-kernel-configs.yml index d0da5c493c..68d7b53ed5 100644 --- a/.github/workflows/rewrite-kernel-configs.yml +++ b/.github/workflows/rewrite-kernel-configs.yml @@ -27,12 +27,22 @@ jobs: id: gen shell: bash run: | + set -euo pipefail JSON="output/info/image-info.json" + # === Kernel config files to skip (filenames under config/kernel/) === + # Add more entries as needed. + SKIP_CONFIGS=( + "linux-rockchip-rv1106-vendor.config" + ) + + # Convert bash array -> JSON array for jq + SKIP_JSON="$(printf '%s\n' "${SKIP_CONFIGS[@]}" | jq -R . | jq -s .)" + tmp="$(mktemp)" - jq -c ' + jq -c --argjson skip "$SKIP_JSON" ' def norm_branches: if . == null then [] elif (type=="string") then ( gsub("[,\\s]+";" ") | split(" ") | map(select(length>0)) ) @@ -61,6 +71,12 @@ jobs: # 4) If multiple boards share same (family,branch), keep smallest board (lexicographic) | sort_by(.linuxfamily, .branch, .board) | group_by([.linuxfamily,.branch]) | map(.[0]) + # 5) Filter out rows whose kernel config filename is in skip list + | map( + . as $row + | ( "linux-" + $row.linuxfamily + "-" + $row.branch + ".config" ) as $fname + | select( ($skip | index($fname)) | not ) + ) ' "$JSON" > "$tmp" echo "count=$(jq 'length' "$tmp")" >> "$GITHUB_OUTPUT"