lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 21 Jul 2015 14:22:36 +0100
From:	Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To:	Michal Marek <mmarek@...e.cz>
Cc:	yann.morin.1998@...e.fr, linux-kbuild@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Subject: [PATCH RFC] merge_config.sh: Add support to pass arguments to make

The issue is flags like ARCH can be passed to make via environment variable
or at command line by passing "ARCH=" argument to make file. The former case
works fine if used with merge_config but the later case would not work and
resulting config file from merge_config is useless.

I hit this issue when I started using config fragments on arm64 bit platform
and I usually pass ARCH at the make command line.

As it is common for users like me to pass ARCH variable in command line,
providing such flexiblity in merge_config makes more sense.

This patch adds support to pass arguments to make file, without this patch the
user has to set the enviroment variables which is not explicit.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
---
 scripts/kconfig/merge_config.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index ec8e203..8d9cae4 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -28,6 +28,7 @@ trap clean_up HUP INT TERM
 
 usage() {
 	echo "Usage: $0 [OPTIONS] [CONFIG [...]]"
+	echo "  -a    arguments to make command. ex: ARCH=arm"
 	echo "  -h    display this help text"
 	echo "  -m    only merge the fragments, do not execute the make command"
 	echo "  -n    use allnoconfig instead of alldefconfig"
@@ -39,6 +40,7 @@ RUNMAKE=true
 ALLTARGET=alldefconfig
 WARNREDUN=false
 OUTPUT=.
+MAKE_ARGS=""
 
 while true; do
 	case $1 in
@@ -61,6 +63,11 @@ while true; do
 		shift
 		continue
 		;;
+	"-a")
+		MAKE_ARGS=$2
+		shift 2
+		continue
+		;;
 	"-O")
 		if [ -d $2 ];then
 			OUTPUT=$(echo $2 | sed 's/\/*$//')
@@ -139,7 +146,7 @@ fi
 # Use the merged file as the starting point for:
 # alldefconfig: Fills in any missing symbols with Kconfig default
 # allnoconfig: Fills in any missing symbols with # CONFIG_* is not set
-make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
+make $MAKE_ARGS KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
 
 
 # Check all specified config values took (might have missed-dependency issues)
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ