Patchwork [1/2] UBUNTU: allow us to build default configs for automated builds

login
register
mail settings
Submitter Andy Whitcroft
Date March 17, 2010, 5:01 p.m.
Message ID <1268845277-24204-2-git-send-email-apw@canonical.com>
Download mbox | patch
Permalink /patch/47955/
State Accepted
Delegated to: Andy Whitcroft
Headers show

Comments

Andy Whitcroft - March 17, 2010, 5:01 p.m.
Allow us to request an automated update to the configs taking whatever
the default answers are.  This allows us to automate builds of mainline
kernels using our build infrastructure and configs.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
 debian/rules.d/1-maintainer.mk   |    5 +++++
 debian/scripts/misc/kernelconfig |    5 +++++
 2 files changed, 10 insertions(+), 0 deletions(-)
Stefan Bader - March 17, 2010, 5:11 p.m.
Sounds useful, why didn't we have that before. :)

Andy Whitcroft wrote:
> Allow us to request an automated update to the configs taking whatever
> the default answers are.  This allows us to automate builds of mainline
> kernels using our build infrastructure and configs.
> 
> Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
> ---
>  debian/rules.d/1-maintainer.mk   |    5 +++++
>  debian/scripts/misc/kernelconfig |    5 +++++
>  2 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/1-maintainer.mk
> index ea8e158..65b9688 100644
> --- a/debian/rules.d/1-maintainer.mk
> +++ b/debian/rules.d/1-maintainer.mk
> @@ -44,6 +44,11 @@ updateconfigs:
>  	$(SHELL) $(DROOT)/scripts/misc/kernelconfig oldconfig
>  	rm -rf build
>  
> +defaultconfigs:
> +	dh_testdir;
> +	yes "" | $(SHELL) $(DROOT)/scripts/misc/kernelconfig defaultconfig
> +	rm -rf build
> +
>  editconfigs:
>  	dh_testdir
>  	$(SHELL) $(DROOT)/scripts/misc/kernelconfig editconfig
> diff --git a/debian/scripts/misc/kernelconfig b/debian/scripts/misc/kernelconfig
> index 0c77c14..936680c 100755
> --- a/debian/scripts/misc/kernelconfig
> +++ b/debian/scripts/misc/kernelconfig
> @@ -14,6 +14,7 @@ fi
>  mode=${1:?"Usage: $0 [oldconfig|editconfig]"}
>  case "$mode" in
>      oldconfig)  ;; # All is good
> +    defaultconfig)  ;; # All is good
>      editconfig) ;; # All is good
>      genconfig)  ;; # All is good
>      *) echo "$0 called with invalid mode" 1>&2
> @@ -86,6 +87,10 @@ for arch in $archs; do
>  				# Weed out incorrect config parameters
>  				echo "* Run silentoldconfig on $arch/$config ..."
>  				make O=`pwd`/build ARCH=$kernarch silentoldconfig ;;
> +			    defaultconfig)
> +				# Weed out incorrect config parameters
> +				echo "* Run oldconfig on $arch/$config ..."
> +				make O=`pwd`/build ARCH=$kernarch oldconfig ;;
>  			    editconfig)
>  				# Interactively edit config parameters
>  				echo " * Run menuconfig on $arch/$config... Press a key."
Colin King - March 17, 2010, 5:27 p.m.
Good one. A useful enhancement and it's easy to understand too.

On Wed, 2010-03-17 at 17:01 +0000, Andy Whitcroft wrote:
> Allow us to request an automated update to the configs taking whatever
> the default answers are.  This allows us to automate builds of mainline
> kernels using our build infrastructure and configs.
> 
> Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by Colin King <colin.king@canonical.com>

> ---
>  debian/rules.d/1-maintainer.mk   |    5 +++++
>  debian/scripts/misc/kernelconfig |    5 +++++
>  2 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/1-maintainer.mk
> index ea8e158..65b9688 100644
> --- a/debian/rules.d/1-maintainer.mk
> +++ b/debian/rules.d/1-maintainer.mk
> @@ -44,6 +44,11 @@ updateconfigs:
>  	$(SHELL) $(DROOT)/scripts/misc/kernelconfig oldconfig
>  	rm -rf build
>  
> +defaultconfigs:
> +	dh_testdir;
> +	yes "" | $(SHELL) $(DROOT)/scripts/misc/kernelconfig defaultconfig
> +	rm -rf build
> +
>  editconfigs:
>  	dh_testdir
>  	$(SHELL) $(DROOT)/scripts/misc/kernelconfig editconfig
> diff --git a/debian/scripts/misc/kernelconfig b/debian/scripts/misc/kernelconfig
> index 0c77c14..936680c 100755
> --- a/debian/scripts/misc/kernelconfig
> +++ b/debian/scripts/misc/kernelconfig
> @@ -14,6 +14,7 @@ fi
>  mode=${1:?"Usage: $0 [oldconfig|editconfig]"}
>  case "$mode" in
>      oldconfig)  ;; # All is good
> +    defaultconfig)  ;; # All is good
>      editconfig) ;; # All is good
>      genconfig)  ;; # All is good
>      *) echo "$0 called with invalid mode" 1>&2
> @@ -86,6 +87,10 @@ for arch in $archs; do
>  				# Weed out incorrect config parameters
>  				echo "* Run silentoldconfig on $arch/$config ..."
>  				make O=`pwd`/build ARCH=$kernarch silentoldconfig ;;
> +			    defaultconfig)
> +				# Weed out incorrect config parameters
> +				echo "* Run oldconfig on $arch/$config ..."
> +				make O=`pwd`/build ARCH=$kernarch oldconfig ;;
>  			    editconfig)
>  				# Interactively edit config parameters
>  				echo " * Run menuconfig on $arch/$config... Press a key."
> -- 
> 1.7.0
> 
>

Patch

diff --git a/debian/rules.d/1-maintainer.mk b/debian/rules.d/1-maintainer.mk
index ea8e158..65b9688 100644
--- a/debian/rules.d/1-maintainer.mk
+++ b/debian/rules.d/1-maintainer.mk
@@ -44,6 +44,11 @@  updateconfigs:
 	$(SHELL) $(DROOT)/scripts/misc/kernelconfig oldconfig
 	rm -rf build
 
+defaultconfigs:
+	dh_testdir;
+	yes "" | $(SHELL) $(DROOT)/scripts/misc/kernelconfig defaultconfig
+	rm -rf build
+
 editconfigs:
 	dh_testdir
 	$(SHELL) $(DROOT)/scripts/misc/kernelconfig editconfig
diff --git a/debian/scripts/misc/kernelconfig b/debian/scripts/misc/kernelconfig
index 0c77c14..936680c 100755
--- a/debian/scripts/misc/kernelconfig
+++ b/debian/scripts/misc/kernelconfig
@@ -14,6 +14,7 @@  fi
 mode=${1:?"Usage: $0 [oldconfig|editconfig]"}
 case "$mode" in
     oldconfig)  ;; # All is good
+    defaultconfig)  ;; # All is good
     editconfig) ;; # All is good
     genconfig)  ;; # All is good
     *) echo "$0 called with invalid mode" 1>&2
@@ -86,6 +87,10 @@  for arch in $archs; do
 				# Weed out incorrect config parameters
 				echo "* Run silentoldconfig on $arch/$config ..."
 				make O=`pwd`/build ARCH=$kernarch silentoldconfig ;;
+			    defaultconfig)
+				# Weed out incorrect config parameters
+				echo "* Run oldconfig on $arch/$config ..."
+				make O=`pwd`/build ARCH=$kernarch oldconfig ;;
 			    editconfig)
 				# Interactively edit config parameters
 				echo " * Run menuconfig on $arch/$config... Press a key."