summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xautomated/linux/kernel-compilation/kernel-compilation.sh4
-rwxr-xr-xautomated/linux/libhugetlbfs/libhugetlbfs.sh12
2 files changed, 13 insertions, 3 deletions
diff --git a/automated/linux/kernel-compilation/kernel-compilation.sh b/automated/linux/kernel-compilation/kernel-compilation.sh
index 1637c12..7040e93 100755
--- a/automated/linux/kernel-compilation/kernel-compilation.sh
+++ b/automated/linux/kernel-compilation/kernel-compilation.sh
@@ -25,8 +25,8 @@ done
dist_name
# shellcheck disable=SC2154
case "${dist}" in
- Debian|Ubuntu) pkgs="time bc xz-utils build-essential" ;;
- CentOS|Fedora) pkgs="time bc xz gcc make" ;;
+ Debian|Ubuntu) pkgs="wget time bc xz-utils build-essential" ;;
+ CentOS|Fedora) pkgs="wget time bc xz gcc make" ;;
esac
! check_root && error_msg "You need to be root to install packages!"
# install_deps supports the above distributions.
diff --git a/automated/linux/libhugetlbfs/libhugetlbfs.sh b/automated/linux/libhugetlbfs/libhugetlbfs.sh
index 1570816..252dc1c 100755
--- a/automated/linux/libhugetlbfs/libhugetlbfs.sh
+++ b/automated/linux/libhugetlbfs/libhugetlbfs.sh
@@ -105,9 +105,19 @@ cd "${OUTPUT}"
info_msg "About to run libhugetlbfs test..."
info_msg "Output directory: ${OUTPUT}"
-
+if [ -f /proc/config.gz ]
+then
CONFIG_HUGETLBFS=$(zcat /proc/config.gz | grep "CONFIG_HUGETLBFS=")
CONFIG_HUGETLB_PAGE=$(zcat /proc/config.gz | grep "CONFIG_HUGETLB_PAGE=")
+elif [ -f /boot/config-"$(uname -r)" ]
+then
+KERNEL_CONFIG_FILE="/boot/config-$(uname -r)"
+CONFIG_HUGETLBFS=$(grep "CONFIG_HUGETLBFS=" "${KERNEL_CONFIG_FILE}")
+CONFIG_HUGETLB_PAGE=$(grep "CONFIG_HUGETLB_PAGE=" "${KERNEL_CONFIG_FILE}")
+else
+exit_on_skip "libhugetlb-pre-requirements" "Kernel config file not available"
+fi
+
HUGETLBFS=$(grep hugetlbfs /proc/filesystems | awk '{print $2}')
[ "${CONFIG_HUGETLBFS}" = "CONFIG_HUGETLBFS=y" ] && [ "${CONFIG_HUGETLB_PAGE}" = "CONFIG_HUGETLB_PAGE=y" ] && [ "${HUGETLBFS}" = "hugetlbfs" ]