diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2023-01-15 10:48:17 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2023-01-15 10:48:17 +0000 |
commit | f8d3af72aab9ab4f1278ba6ffc0688dea746ae65 (patch) | |
tree | b832eb7a05116d4c23eeaaf82c0b160e61d96713 | |
parent | 86fd655613c99012ee599e7766505fcfb9ebd032 (diff) | |
parent | df393309dbbfe3993363ebc62d56ecd0ba4dbe3d (diff) | |
download | libufdt-main-16k-with-phones.tar.gz |
Merge "verifyDTBO: update to use bootconfig"main-16k-with-phones
-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 |