Normalize null-separated dtc multi-string output in DTB checks
This commit is contained in:
1 parent
f6b42ff604
commit
edc8c5a6fc
4 files changed
+9
-4
No files matched your search
@@ -2278,7 +2278,7 @@ done
|
||||
if command -v dtc >/dev/null 2>&1; then
|
||||
for dtb in "$BASE_DIR"/prebuilt/kernel-6.12.1-msm8916/dtbs/*.dtb; do
|
||||
[ -f "$dtb" ] || continue
|
||||
dec_dts="$(dtc -q -I dtb -O dts "$dtb" 2>/dev/null || true)"
|
||||
dec_dts="$(dtc -q -I dtb -O dts "$dtb" 2>/dev/null | sed 's/\\0/", "/g' || true)"
|
||||
if [ -z "$dec_dts" ]; then
|
||||
fail "failed to decompile ${dtb#"$BASE_DIR/"}"
|
||||
elif printf "%s\n" "$dec_dts" | grep -qE 'cd-gpios|broken-cd'; then
|
||||
@@ -2309,7 +2309,7 @@ if ! awk '/resin \{/,/\};/ { if ($0 ~ /linux,code = <0x6c>;/) found=1 } END { ex
|
||||
fi
|
||||
COCONUT_DTB="$BASE_DIR/prebuilt/kernel-6.12.1-msm8916/dtbs/qcom-msm8905-nokia-coconut.dtb"
|
||||
if command -v dtc >/dev/null 2>&1 && [ -f "$COCONUT_DTB" ]; then
|
||||
dec_coco="$(dtc -q -I dtb -O dts "$COCONUT_DTB" 2>/dev/null || true)"
|
||||
dec_coco="$(dtc -q -I dtb -O dts "$COCONUT_DTB" 2>/dev/null | sed 's/\\0/", "/g' || true)"
|
||||
if ! printf "%s\n" "$dec_coco" | grep -qF '"gpio0", "gpio3", "gpio7", "gpio99", "gpio6", "gpio1"' || \
|
||||
printf "%s\n" "$dec_coco" | grep -qF '"gpio52", "gpio56"' || \
|
||||
! printf "%s\n" "$dec_coco" | grep -qF '0x3030067' || \
|
||||
@@ -2352,7 +2352,7 @@ if ! grep -qF '0x500d4' "$SPARKLER_DTS" || \
|
||||
fail "devices/nokia-sparkler/qcom-msm8909-nokia-sparkler.dts drifted from Sxmo keypad, CPU clock, or haptic invariants"
|
||||
fi
|
||||
if command -v dtc >/dev/null 2>&1 && [ -f "$SPARKLER_DTB" ]; then
|
||||
dec_sparkler="$(dtc -q -I dtb -O dts "$SPARKLER_DTB" 2>/dev/null || true)"
|
||||
dec_sparkler="$(dtc -q -I dtb -O dts "$SPARKLER_DTB" 2>/dev/null | sed 's/\\0/", "/g' || true)"
|
||||
if ! printf "%s\n" "$dec_sparkler" | grep -qF 'qcom,msm-id = <0xf5 0x00>;' || \
|
||||
! printf "%s\n" "$dec_sparkler" | grep -qF 'qcom,board-id = <0x08 0x100>;' || \
|
||||
! printf "%s\n" "$dec_sparkler" | grep -qF 'reg = <0x80000000 0x20000000>;' || \
|
||||
|
||||
Reference in new issue
Block a user