From 9aac9f8dd6ae10f9186edaca58fe43df3203ac63 Mon Sep 17 00:00:00 2001 From: Naresh Kamboju Date: Wed, 18 Jan 2017 12:36:38 +0530 Subject: automated: device-tree test fix Change-Id: Ifa9e27e06396d61e4e32b26755129364f09a7c8d Signed-off-by: Naresh Kamboju --- automated/linux/device-tree/device-tree.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'automated') diff --git a/automated/linux/device-tree/device-tree.sh b/automated/linux/device-tree/device-tree.sh index c2d2fcc..f2deea2 100755 --- a/automated/linux/device-tree/device-tree.sh +++ b/automated/linux/device-tree/device-tree.sh @@ -56,8 +56,18 @@ device_tree_property() { [ -d "${OUTPUT}" ] && mv "${OUTPUT}" "${OUTPUT}_$(date +%Y%m%d%H%M%S)" mkdir -p "${OUTPUT}" -CONFIG_PROC_FS=$(zcat /proc/config.gz | grep CONFIG_PROC_FS) -CONFIG_OF=$(zcat /proc/config.gz | grep "CONFIG_OF=") +if [ -f /proc/config.gz ] +then + CONFIG_PROC_FS=$(zcat /proc/config.gz | grep "CONFIG_PROC_FS=") + CONFIG_OF=$(zcat /proc/config.gz | grep "CONFIG_OF=") +elif [ -f /boot/config-"$(uname -r)" ] +then + KERNEL_CONFIG_FILE="/boot/config-$(uname -r)" + CONFIG_PROC_FS=$(grep "CONFIG_PROC_FS=" "${KERNEL_CONFIG_FILE}") + CONFIG_OF=$(grep "CONFIG_OF=" "${KERNEL_CONFIG_FILE}") +else + exit_on_skip "device-tree-pre-requirements" "Kernel config file not available" +fi [ "${CONFIG_PROC_FS}" = "CONFIG_PROC_FS=y" ] && [ "${CONFIG_OF}" = "CONFIG_OF=y" ] && [ -d "${SYSFS_DEVICE_TREE}" ] exit_on_fail "device-tree-Kconfig" "${DT_SKIP_LIST_2}" -- cgit v1.2.3