summaryrefslogtreecommitdiff
path: root/build_abi.sh
diff options
context:
space:
mode:
authorMatthias Maennich <maennich@google.com>2019-04-15 07:52:12 +0100
committerMatthias Maennich <maennich@google.com>2019-04-16 07:03:24 +0100
commit680e80cafde8475e3e4c1f55d67b8547c5c7d2eb (patch)
tree713a0140a69b8345137b667a746842214265164a /build_abi.sh
parent02963acbce77ae59ce6d271a862212690dc245e5 (diff)
build_abi.sh: Ensure valid abigail installation
As of now, build_abi.sh (indirectly) relies on libabigail while creating the abi dump. In case abigail is not installed or not in PATH, this script will do all the (time consuming) kernel building before failing at its most essential step. Avoid that by ensuring a valid abigail before building the kernel. Change-Id: I979b61de00473f4cfd6537f7151add454a02c1c9 Signed-off-by: Matthias Maennich <maennich@google.com>
Diffstat (limited to 'build_abi.sh')
-rwxr-xr-xbuild_abi.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/build_abi.sh b/build_abi.sh
index 12d125e..011bfd2 100755
--- a/build_abi.sh
+++ b/build_abi.sh
@@ -39,6 +39,14 @@ function update_config_for_abi_dump() {
make O=${OUT_DIR} $archsubarch CROSS_COMPILE=${CROSS_COMPILE} olddefconfig)
}
+# ensure we have a sufficient abigail installation in path before continuing
+if ! dpkg --compare-versions \
+ $(abidiff --version | awk '{print $2}') ge 1.6.0; then
+ echo "ERROR: no suitable libabigail (>= 1.6.0) in \$PATH."
+ echo "Did you run abi/bootstrap and followed the instructions?"
+ exit 1
+fi
+
# delegate the actual build to build.sh
${ROOT_DIR}/build/build.sh $*