aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Murphy <dmurphy@ti.com>2020-03-25 10:45:47 -0500
committerDan Murphy <dmurphy@ti.com>2020-03-25 13:34:45 -0500
commit0b23946627c8dd9c0a1845e0a0b39d36a5256690 (patch)
tree48a6da488e4478cdcca26cc80d75111eda5e4ebb
parent7d5191cde9a8e7365d93a37a6bf4e278ca17ebf5 (diff)
downloadlinux-dt-0b23946627c8dd9c0a1845e0a0b39d36a5256690.tar.gz
defconfigs: defconfig_builder: Redirect output the defconfig to a different directory
Add the ability through "-o" argument to output the built defconfig to a separate directory. Signed-off-by: Dan Murphy <dmurphy@ti.com>
-rwxr-xr-xconfig/defconfig_builder.sh17
1 files changed, 14 insertions, 3 deletions
diff --git a/config/defconfig_builder.sh b/config/defconfig_builder.sh
index dca7f12..8429e1e 100755
--- a/config/defconfig_builder.sh
+++ b/config/defconfig_builder.sh
@@ -285,8 +285,16 @@ build_defconfig() {
"$CONFIGS" "$EXTRA_CONFIG_FILE" > /dev/null
if [ "$?" = "0" ];then
- echo "Creating defconfig file ""$DEFCONFIG_KERNEL_PATH/""$CHOSEN_BUILD_TYPE"_defconfig
- mv .config "$DEFCONFIG_KERNEL_PATH"/"$CHOSEN_BUILD_TYPE"_defconfig
+ if [ -z ${DEFCONFIG_OUT} ]; then
+ echo "Creating defconfig file ""$DEFCONFIG_KERNEL_PATH/""$CHOSEN_BUILD_TYPE"_defconfig
+ mv .config "$DEFCONFIG_KERNEL_PATH"/"$CHOSEN_BUILD_TYPE"_defconfig
+ else
+ if [ ! -d ${DEFCONFIG_OUT} ]; then
+ mkdir -p ${DEFCONFIG_OUT}
+ fi
+ echo "Creating defconfig file ""$DEFCONFIG_OUT/""$CHOSEN_BUILD_TYPE"_defconfig
+ mv .config ${DEFCONFIG_OUT}/${CHOSEN_BUILD_TYPE}_defconfig
+ fi
else
echo "Defconfig creation failed"
return 1
@@ -398,6 +406,7 @@ Optional:
-t - Indicates the type of defconfig to build. This will force the
defconfig to build without user interaction.
-l - List all buildable defconfig options
+ -o - Outputs the built defconfigs to a different directory.
Command line example to generate the TI SDK AM335x processor defconfig automatically
without user interaction:
@@ -415,7 +424,7 @@ EOF
#########################################
# Script Start
#########################################
-while getopts "?k:t:l" OPTION
+while getopts "?k:t:o:l" OPTION
do
case $OPTION in
k)
@@ -424,6 +433,8 @@ do
CHOSEN_BUILD_TYPE=$OPTARG;;
l)
LIST_TARGETS="y";;
+ o)
+ DEFCONFIG_OUT=$OPTARG;;
?)
usage
exit;;