From c1e383505576f7aeeea477ee90c18326ac0f8fb7 Mon Sep 17 00:00:00 2001 From: Michal Mielewczyk Date: Mon, 14 Oct 2019 08:43:22 -0400 Subject: [PATCH 1/3] Update ocf version. Signed-off-by: Michal Mielewczyk --- ocf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocf b/ocf index 17ec78d..9e515e0 160000 --- a/ocf +++ b/ocf @@ -1 +1 @@ -Subproject commit 17ec78d88f471cfe370d86d764e5fde59dd67069 +Subproject commit 9e515e02712b80f01fed956894326bcaa031a4e9 From 195e5c5e5697b3dd1dbf2ff1012da8396091b183 Mon Sep 17 00:00:00 2001 From: Michal Mielewczyk Date: Mon, 14 Oct 2019 07:15:36 -0400 Subject: [PATCH 2/3] configure: Save output from test modules compilation. Currently configure script doesn't support any logging mechanism. To make easy debugging possible, output from all failed compilation attempts is stored. Signed-off-by: Michal Mielewczyk --- configure.d/conf_framework | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/configure.d/conf_framework b/configure.d/conf_framework index c679f20..7ad15ae 100644 --- a/configure.d/conf_framework +++ b/configure.d/conf_framework @@ -34,6 +34,7 @@ compile_module(){ config_file=$1 test_module_dir=$SCRIPTPATH/configure.d/${config_file}_dir + test_module_log=$SCRIPTPATH/configure.d/.${config_file}.log test_module_file=$test_module_dir/test_mod.c test_module_obj=$test_module_dir/test_mod.o @@ -54,12 +55,19 @@ compile_module(){ EOF ####################################### - make -C $test_module_dir KERNEL_DIR=${KERNEL_DIR} &> /dev/null + echo "### $2 ###" >> $test_module_log + + make -C $test_module_dir KERNEL_DIR=${KERNEL_DIR} &>> $test_module_log local ret=$? rm -Rf $test_module_dir + if [ $ret -eq 0 ] + then + rm -f $test_module_log + fi + return $ret } From b05491edac07931e061442a584b44af3620f6373 Mon Sep 17 00:00:00 2001 From: Michal Mielewczyk Date: Mon, 14 Oct 2019 08:37:45 -0400 Subject: [PATCH 3/3] configure: check for requiured tools. Configure is not only supposed to check for tools required by itself but also for those ones needed by OCL. Signed-off-by: Michal Mielewczyk --- configure | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 13aa0b4..9b46951 100755 --- a/configure +++ b/configure @@ -4,14 +4,44 @@ # SPDX-License-Identifier: BSD-3-Clause-Clear # +MISSING_TOOLS=0 + check_util() { - which $1 2>&1 > /dev/null || { echo >&2 "Error: missing '$1' utility"; exit 1; } + which $1 &> /dev/null + if [ $? -ne 0 ] + then + echo >&2 "Error: missing '$1' utility" + MISSING_TOOLS=1 + fi } check_util dirname check_util realpath check_util basename check_util awk +check_util python3 +check_util sed +check_util make +check_util gcc +check_util lsblk + +if [ ! -e /lib/modules/$(uname -r)/build/ &> /dev/null ] +then + echo >&2 "Error: missing kernel headers" + MISSING_TOOLS=1 +fi + +`python3 -c "import argparse" &> /dev/null` +if [ $? -ne 0 ] +then + echo >&2 "Error: missing argparse python module" + MISSING_TOOLS=1 +fi + +if [ "$MISSING_TOOLS" -ne "0" ] +then + exit 1 +fi SCRIPTPATH=`dirname $0` SCRIPTPATH=`realpath $SCRIPTPATH`