Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] Config: unbreak check-source caused by empty defconfigs
@ 2011-07-13 21:47 Yann E. MORIN
  2011-07-14  8:14 ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2011-07-13 21:47 UTC (permalink / raw)
  To: buildroot

Running check-source uses an allyesconfig-like configuration.
But in this case, the defconfig files for BareBox, U-Boot and
the Linux kernel are not set, thus braking the check.

This patch fixes it by setting a dummy value '(none)' as the
default value for the three affected defconfig entries.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
---
 boot/barebox/Config.in |    1 +
 boot/uboot/Config.in   |    1 +
 linux/Config.in        |    1 +
 3 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/boot/barebox/Config.in b/boot/barebox/Config.in
index a821c45..852df65 100644
--- a/boot/barebox/Config.in
+++ b/boot/barebox/Config.in
@@ -8,6 +8,7 @@ menuconfig BR2_TARGET_BAREBOX
 if BR2_TARGET_BAREBOX
 config BR2_TARGET_BAREBOX_BOARD_DEFCONFIG
 	string "board defconfig"
+	default "(none)"
 	help
 	  Name of the board for which Barebox should be built, without
 	  the _defconfig suffix.
diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index 070533e..bcd556d 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -6,6 +6,7 @@ menuconfig BR2_TARGET_UBOOT
 if BR2_TARGET_UBOOT
 config BR2_TARGET_UBOOT_BOARDNAME
 	string "U-Boot board name"
+	default "(none)"
 	help
 	  One of U-Boot supported boards to be built.
 	  This will be suffixed with _config to meet U-Boot standard naming.
diff --git a/linux/Config.in b/linux/Config.in
index 8d3b0ba..a8ba98f 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -111,6 +111,7 @@ endchoice
 config BR2_LINUX_KERNEL_DEFCONFIG
 	string "Defconfig name"
 	depends on BR2_LINUX_KERNEL_USE_DEFCONFIG
+	default "(none)"
 	help
 	 Name of the defconfig file to use, without the trailing
 	 _defconfig
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] Config: unbreak check-source caused by empty defconfigs
  2011-07-13 21:47 [Buildroot] [PATCH] Config: unbreak check-source caused by empty defconfigs Yann E. MORIN
@ 2011-07-14  8:14 ` Thomas Petazzoni
  2011-07-14 10:28   ` Yann E. MORIN
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2011-07-14  8:14 UTC (permalink / raw)
  To: buildroot

Le Wed, 13 Jul 2011 23:47:29 +0200,
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> a ?crit :

> Running check-source uses an allyesconfig-like configuration.
> But in this case, the defconfig files for BareBox, U-Boot and
> the Linux kernel are not set, thus braking the check.
> 
> This patch fixes it by setting a dummy value '(none)' as the
> default value for the three affected defconfig entries.

No. The check at the end of the Linux, Barebox and U-Boot are here on
purpose. This commit makes those checks useless.

There is already a check :

ifeq ($(filter source,$(MAKECMDGOALS)),)

which disable the board name check when "make source" or "make
source-check" is used.

Or maybe I misunderstood the problem ?

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] Config: unbreak check-source caused by empty defconfigs
  2011-07-14  8:14 ` Thomas Petazzoni
@ 2011-07-14 10:28   ` Yann E. MORIN
  2011-07-14 11:34     ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2011-07-14 10:28 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On Thursday 14 July 2011 10:14:57 Thomas Petazzoni wrote:
> Le Wed, 13 Jul 2011 23:47:29 +0200,
> "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> a ?crit :
> 
> > Running check-source uses an allyesconfig-like configuration.
> > But in this case, the defconfig files for BareBox, U-Boot and
> > the Linux kernel are not set, thus braking the check.
> > 
> > This patch fixes it by setting a dummy value '(none)' as the
> > default value for the three affected defconfig entries.
> 
> No. The check at the end of the Linux, Barebox and U-Boot are here on
> purpose. This commit makes those checks useless.
> 
> There is already a check :
> 
> ifeq ($(filter source,$(MAKECMDGOALS)),)
> 
> which disable the board name check when "make source" or "make
> source-check" is used.
> 
> Or maybe I misunderstood the problem ?

No, you did not. Fact is, that check does not work for 'source-check'.

If I replace the $(error ...) message with this (eg. in barebox):
  MKGOALS=$(filter source,$(MAKECMDGOALS))
  $(error MAKECMDGOALS="$(MAKECMDGOALS)" MKGOALS="$(MKGOALS)")

then it gives me this:
  $ make source-check
  [--SNIP--]
  boot/barebox/barebox.mk:61: *** MAKECMDGOALS="_source-check" MKGOALS="".  Stop.

That's because, 'source-check' spawns a second make to run '_source-check'
which in turn runs a third make for 'source' with DL_MODE=SOURCE_CHECK

Now, I wonder how to properly fix this.

Either we check for 'source' and '_source-check', or we change the way
'_source-check' behaves. I'll push a patch for the second case, so you can
see what I have in my head about this... ;-)

Thanks for the review, I totally missed the check... :-/

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] Config: unbreak check-source caused by empty defconfigs
  2011-07-14 10:28   ` Yann E. MORIN
@ 2011-07-14 11:34     ` Peter Korsgaard
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2011-07-14 11:34 UTC (permalink / raw)
  To: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@anciens.enib.fr> writes:

Hi,

 Yann> That's because, 'source-check' spawns a second make to run '_source-check'
 Yann> which in turn runs a third make for 'source' with DL_MODE=SOURCE_CHECK

Ahh yes, so your problem is the first run - E.G. with annotation added:

diff --git a/Makefile b/Makefile
index 2f3802c..64bcafc 100644
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,7 @@
 # Just run 'make menuconfig', configure stuff, then run 'make'.
 # You shouldn't need to mess with anything beyond this point...
 #--------------------------------------------------------------
+$(warning MAKECMDGOALS=$(MAKECMDGOALS))
 
 # Set and export the version string
 export BR2_VERSION:=2011.08-git

We get:

make external-deps
Makefile:25: MAKECMDGOALS=external-deps
Makefile:25: MAKECMDGOALS=source

 Yann> Now, I wonder how to properly fix this.

 Yann> Either we check for 'source' and '_source-check', or we change
 Yann> the way '_source-check' behaves. I'll push a patch for the second
 Yann> case, so you can see what I have in my head about this... ;-)

We could probably combine source-check and _source-check, but as far as
I can see we would need to handle both source/source-check/external-deps

-- 
Bye, Peter Korsgaard

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-07-14 11:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-13 21:47 [Buildroot] [PATCH] Config: unbreak check-source caused by empty defconfigs Yann E. MORIN
2011-07-14  8:14 ` Thomas Petazzoni
2011-07-14 10:28   ` Yann E. MORIN
2011-07-14 11:34     ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox