* [PATCH] merge_config.sh: Add switch to specify ARCH variable
@ 2020-10-08 23:26 Victor Erminpour
2020-10-10 2:58 ` Masahiro Yamada
0 siblings, 1 reply; 2+ messages in thread
From: Victor Erminpour @ 2020-10-08 23:26 UTC (permalink / raw)
To: masahiroy; +Cc: linux-kbuild, linux-kernel
Add a switch to merge_config.sh to specify the ARCH variable
which defines the target architecture.
Set x86 as the default architecture.
Signed-off-by: Victor Erminpour <victor.erminpour@oracle.com>
---
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 63c8565206a4..b7a687f093f0 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -22,6 +22,7 @@ clean_up() {
usage() {
echo "Usage: $0 [OPTIONS] [CONFIG [...]]"
+ echo " -a set ARCH variable to define the target architecture"
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"
@@ -34,6 +35,7 @@ usage() {
RUNMAKE=true
ALLTARGET=alldefconfig
+ARCH=x86
WARNREDUN=false
BUILTIN=false
OUTPUT=.
@@ -46,6 +48,11 @@ while true; do
shift
continue
;;
+ "-a")
+ ARCH=$2
+ shift 2
+ continue
+ ;;
"-m")
RUNMAKE=false
shift
@@ -172,7 +179,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 ARCH=$ARCH KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
# Check all specified config values took (might have missed-dependency issues)
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] merge_config.sh: Add switch to specify ARCH variable
2020-10-08 23:26 [PATCH] merge_config.sh: Add switch to specify ARCH variable Victor Erminpour
@ 2020-10-10 2:58 ` Masahiro Yamada
0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2020-10-10 2:58 UTC (permalink / raw)
To: Victor Erminpour; +Cc: Linux Kbuild mailing list, Linux Kernel Mailing List
On Fri, Oct 9, 2020 at 8:25 AM Victor Erminpour
<victor.erminpour@oracle.com> wrote:
>
> Add a switch to merge_config.sh to specify the ARCH variable
> which defines the target architecture.
>
> Set x86 as the default architecture.
>
> Signed-off-by: Victor Erminpour <victor.erminpour@oracle.com>
> ---
You can do
ARCH=arm ./scripts/kconfig/merge_config.sh
> 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 63c8565206a4..b7a687f093f0 100755
> --- a/scripts/kconfig/merge_config.sh
> +++ b/scripts/kconfig/merge_config.sh
> @@ -22,6 +22,7 @@ clean_up() {
>
> usage() {
> echo "Usage: $0 [OPTIONS] [CONFIG [...]]"
> + echo " -a set ARCH variable to define the target architecture"
> 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"
> @@ -34,6 +35,7 @@ usage() {
>
> RUNMAKE=true
> ALLTARGET=alldefconfig
> +ARCH=x86
> WARNREDUN=false
> BUILTIN=false
> OUTPUT=.
> @@ -46,6 +48,11 @@ while true; do
> shift
> continue
> ;;
> + "-a")
> + ARCH=$2
> + shift 2
> + continue
> + ;;
> "-m")
> RUNMAKE=false
> shift
> @@ -172,7 +179,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 ARCH=$ARCH KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
>
>
> # Check all specified config values took (might have missed-dependency issues)
> --
> 1.8.3.1
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-10 3:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-08 23:26 [PATCH] merge_config.sh: Add switch to specify ARCH variable Victor Erminpour
2020-10-10 2:58 ` Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).