diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-01-16 02:31:09 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-01-16 02:31:09 +0000 |
commit | 5eab58857efcaef735b730e580a6b13634e3e068 (patch) | |
tree | 4d146b70e81e196e072bcb73f882b8a942f30c75 | |
parent | ac73f42361fa7373e9d01c1cb6ead9687e01c376 (diff) | |
parent | f986c148e415a2f6f5b76e01f297d26fdae88594 (diff) | |
download | libufdt-5eab58857efcaef735b730e580a6b13634e3e068.tar.gz |
Snap for 9493049 from f986c148e415a2f6f5b76e01f297d26fdae88594 to udc-release
Change-Id: I8b40b147203f8505c7f436cac70a3e7e9e76ece5
-rwxr-xr-x | tests/verifyDTBO.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/verifyDTBO.sh b/tests/verifyDTBO.sh index 4c4a732..7c3dbfd 100755 --- a/tests/verifyDTBO.sh +++ b/tests/verifyDTBO.sh @@ -27,8 +27,12 @@ adb pull /sys/firmware/fdt final_dt > /dev/null mkdtimg_path="${ANDROID_HOST_BIN_LOCATION}/mkdtboimg" $mkdtimg_path dump dtbo.img -b dumped_dtbo > /dev/null -#Get the index of the overlay applied from the kernel command line -overlay_idx=$(adb shell cat /proc/cmdline | grep -o "androidboot.dtbo_idx=[^ ]*" | cut -d "=" -f 2) +#Get the index of the overlay applied. Try bootconfig first, then cmdline. +overlay_idx=$(adb shell cat /proc/bootconfig \ + | grep 'androidboot.dtbo_idx = .*$' | cut -d "=" -f 2 | sed 's/[ \\\"]//g') +if [[ ! $overlay_idx =~ [0-9]+ ]]; then + overlay_idx=$(adb shell cat /proc/cmdline | grep -o "androidboot.dtbo_idx=[^ ]*" | cut -d "=" -f 2) +fi arg="" for idx in ${overlay_idx//,/ } do |