Skip to contentSkip to conversation

Config: unbreak check-source caused by empty defconfigs

PATCH New Yann E. MORIN 3 participants 4 messages Jul 13, 2011 – Jul 14, 2011 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Config: unbreak check-source caused by empty defconfigs

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.

---
 boot/barebox/Config.in |    1 +
 boot/uboot/Config.in   |    1 +
 linux/Config.in        |    1 +
 3 files changed, 3 insertions(+), 0 deletions(-)
boot/barebox/Config.in +1 -0
index a821c45..852df65 100644
@@ -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.
boot/uboot/Config.in +1 -0
index 070533e..bcd556d 100644
@@ -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.
linux/Config.in +1 -0
index 8d3b0ba..a8ba98f 100644
@@ -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
Signature · 1 line
1.7.2.5
#1 lore raw

PATCH 1/1 Config: unbreak check-source caused by empty defconfigs

Le Wed, 13 Jul 2011 23:47:29 +0200,
"Yann E. MORIN" <[email protected]> a ?crit :

Quoted 6 lines

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

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#2 lore raw

PATCH 1/1 Config: unbreak check-source caused by empty defconfigs

Thomas, All,

Quoted 13 lines · On Thursday 14 July 2011 10:14:57 Thomas Petazzoni wrote:

Le Wed, 13 Jul 2011 23:47:29 +0200,
"Yann E. MORIN" <[email protected]> a ?crit :

Quoted 6 lines

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.

Quoted 8 lines

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.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/1 Config: unbreak check-source caused by empty defconfigs

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Yann" == Yann E MORIN <[email protected]> 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:

Makefile +1 -0
index 2f3802c..64bcafc 100644
@@ -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

Signature · 1 line
Bye, Peter Korsgaard