Mailinglist Archive: opensuse-kernel (131 mails)

< Previous Next >
[opensuse-kernel] [patch 2/5] [PATCH] scripts/sequence-patch.sh: Add --config=ARCH-FLAVOR option
One of the things I need to do every time I set up a new build directory
or update the source tree is copy the config file over from the git repo.

This patchs adds a --config=ARCH-FLAVOR option that copies it automatically.

If the config does not exist, it is not considered a fatal error.

Signed-off-by: Jeff Mahoney <jeffm@xxxxxxxx>
---
scripts/sequence-patch.sh | 30 +++++++++++++++--
1 file changed, 28 insertions(+), 2 deletions(-)

--- a/scripts/sequence-patch.sh
+++ b/scripts/sequence-patch.sh
@@ -37,7 +37,7 @@ sles9* | sles10* | sle10* | 9.* | 10.* |
esac

usage() {
- echo "SYNOPSIS: $0 [-qv] [--symbol=...] [--dir=...] [--combine] [--fast]
[last-patch-name] [--vanilla] [--fuzz=NUM] [--build-dir=PATH]"
+ echo "SYNOPSIS: $0 [-qv] [--symbol=...] [--dir=...] [--combine] [--fast]
[last-patch-name] [--vanilla] [--fuzz=NUM] [--build-dir=PATH]
[--config=ARCH-FLAVOR]"
exit 1
}

@@ -49,7 +49,7 @@ if $have_arch_patches; then
else
arch_opt=""
fi
-options=`getopt -o qvd:F: --long
quilt,no-quilt,$arch_opt,symbol:,dir:,combine,fast,vanilla,fuzz,build-dir: --
"$@"`
+options=`getopt -o qvd:F: --long
quilt,no-quilt,$arch_opt,symbol:,dir:,combine,fast,vanilla,fuzz,build-dir:,config:
-- "$@"`

if [ $? -ne 0 ]
then
@@ -65,6 +65,9 @@ COMBINE=
FAST=
VANILLA=false
SP_BUILD_DIR=
+CONFIG=
+CONFIG_ARCH=
+CONFIG_FLAVOR=

while true; do
case "$1" in
@@ -110,6 +113,10 @@ while true; do
SP_BUILD_DIR="$2"
shift
;;
+ --config)
+ CONFIG="$2"
+ shift
+ ;;
--)
shift
break ;;
@@ -125,6 +132,16 @@ if [ $# -ge 1 ]; then
shift
fi

+if test -n "$CONFIG"; then
+ CONFIG_ARCH=${CONFIG%%-*}
+ CONFIG_FLAVOR=${CONFIG##*-}
+ if [ "$CONFIG" = "$CONFIG_ARCH" -o "$CONFIG" = "$CONFIG_FLAVOR" -o \
+ -z "$CONFIG_ARCH" -o -z "$CONFIG_FLAVOR" ]; then
+ echo "Invalid config spec: --config=ARCH-FLAVOR is expected."
+ usage
+ fi
+fi
+
if [ $# -ne 0 ]; then
usage
fi
@@ -456,6 +473,15 @@ if test -e supported.conf; then
scripts/guards base external < supported.conf >
"$SP_BUILD_DIR/Module.supported"
fi

+if test -n "$CONFIG"; then
+ if test -e "config/$CONFIG_ARCH/$CONFIG_FLAVOR"; then
+ echo "[ Copying config/$CONFIG_ARCH/$CONFIG ]"
+ cp -a "config/$CONFIG_ARCH/$CONFIG_FLAVOR" "$SP_BUILD_DIR/.config"
+ else
+ echo "[ Config $CONFIG does not exist. ]"
+ fi
+fi
+
[ $# -gt 0 ] && exit $status

if ! $have_defconfig_files || test ! -e config.conf; then


--
To unsubscribe, e-mail: opensuse-kernel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-kernel+help@xxxxxxxxxxxx

< Previous Next >
References