summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Maennich <maennich@google.com>2020-05-05 14:02:19 +0200
committerMatthias Maennich <maennich@google.com>2020-05-05 17:20:48 +0200
commitd96f85df16ec7b407623f7fad8cd911bfa9e2fcb (patch)
tree976b1bea6494416f6982b8bc5b830ec8435d3a8c
parent859b92e1c190257de379edbfab828e628d7b17db (diff)
downloadbuild-d96f85df16ec7b407623f7fad8cd911bfa9e2fcb.tar.gz
build.sh: write abi.prop to contain ABI related properties
Depending on whether the build configuration defines a KMI definition and/or whitelists, emit those into a .prop file during the build. The file could contain more information (like KMI version) at a later point. It can be picked up by testing infrastructure or by humans to inspect the build result. As part of this change, consolidate the variable definitions for abi.xml and abi_whitelist. Change-Id: I52723565cbe5d31d5b9c19348b34c6be0811a4e2 Signed-off-by: Matthias Maennich <maennich@google.com>
-rwxr-xr-xbuild.sh31
1 files changed, 24 insertions, 7 deletions
diff --git a/build.sh b/build.sh
index 452c80bd..78614fcc 100755
--- a/build.sh
+++ b/build.sh
@@ -298,33 +298,50 @@ if [ -n "${TAGS_CONFIG}" ]; then
exit 0
fi
+if [ -n "${ABI_DEFINITION}" ]; then
+
+ ABI_PROP=${DIST_DIR}/abi.prop
+ ABI_XML=${DIST_DIR}/abi.xml
+
+ : > ${ABI_PROP}
+
+ echo "KMI_DEFINITION=abi.xml" >> ${ABI_PROP}
+ echo "KMI_MONITORED=1" >> ${ABI_PROP}
+
+ if [ -n "${KMI_WHITELIST}" ]; then
+ ABI_WL=${DIST_DIR}/abi_whitelist
+ echo "KMI_WHITELIST=abi_whitelist" >> ${ABI_PROP}
+ fi
+
+fi
+
# Copy the abi_${arch}.xml file from the sources into the dist dir
if [ -n "${ABI_DEFINITION}" ]; then
echo "========================================================"
- echo " Copying abi definition to ${DIST_DIR}/abi.xml"
+ echo " Copying abi definition to ${ABI_XML}"
pushd $ROOT_DIR/$KERNEL_DIR
- cp "${ABI_DEFINITION}" ${DIST_DIR}/abi.xml
+ cp "${ABI_DEFINITION}" ${ABI_XML}
popd
fi
# Copy the abi whitelist file from the sources into the dist dir
if [ -n "${KMI_WHITELIST}" ]; then
echo "========================================================"
- echo " Generating abi whitelist definition to ${DIST_DIR}/abi_whitelist"
+ echo " Generating abi whitelist definition to ${ABI_WL}"
pushd $ROOT_DIR/$KERNEL_DIR
- cp "${KMI_WHITELIST}" ${DIST_DIR}/abi_whitelist
+ cp "${KMI_WHITELIST}" ${ABI_WL}
# If there are additional whitelists specified, append them
if [ -n "${ADDITIONAL_KMI_WHITELISTS}" ]; then
for whitelist in ${ADDITIONAL_KMI_WHITELISTS}; do
- echo >> ${DIST_DIR}/abi_whitelist
- cat "${whitelist}" >> ${DIST_DIR}/abi_whitelist
+ echo >> ${ABI_WL}
+ cat "${whitelist}" >> ${ABI_WL}
done
fi
if [ -n "${TRIM_NONLISTED_KMI}" ]; then
# Create the raw whitelist
- cat ${DIST_DIR}/abi_whitelist | \
+ cat ${ABI_WL} | \
${ROOT_DIR}/build/abi/flatten_whitelist > \
${OUT_DIR}/abi_whitelist.raw