All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/2] Kbuild: Fix a false error of sanity check
@ 2014-02-24 13:11 Masahiro Yamada
  2014-02-24 13:11 ` [U-Boot] [PATCH 1/2] kbuild: Fix a false error of generic board support Masahiro Yamada
  2014-02-24 13:11 ` [U-Boot] [PATCH 2/2] kbuild: Move linker sciript check to prepare1 Masahiro Yamada
  0 siblings, 2 replies; 5+ messages in thread
From: Masahiro Yamada @ 2014-02-24 13:11 UTC (permalink / raw)
  To: u-boot




Masahiro Yamada (2):
  kbuild: Fix a false error of generic board support
  kbuild: Move linker sciript check to prepare1

 Makefile | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

-- 
1.8.3.2

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

* [U-Boot] [PATCH 1/2] kbuild: Fix a false error of generic board support
  2014-02-24 13:11 [U-Boot] [PATCH 0/2] Kbuild: Fix a false error of sanity check Masahiro Yamada
@ 2014-02-24 13:11 ` Masahiro Yamada
  2014-02-24 23:59   ` Masahiro Yamada
  2014-02-24 13:11 ` [U-Boot] [PATCH 2/2] kbuild: Move linker sciript check to prepare1 Masahiro Yamada
  1 sibling, 1 reply; 5+ messages in thread
From: Masahiro Yamada @ 2014-02-24 13:11 UTC (permalink / raw)
  To: u-boot

Before this commit, make terminated with an error
where it shouldn't under some condition.

This bug happened when we built a board unsupporting
generic board right after building with generic board.

For example, the following sequence failed.
(harmony uses generic board but microblaze-generic does not
support it)

  $ make harmony_config
  Configuring for harmony board...
  $ make CROSS_COMPILE=arm-linux-gnueabi-
    [ Build succeed ]
  $ make microblaze-generic_config
  Configuring for microblaze-generic board...
  $ make CROSS_COMPILE=microblaze-linux-
  Makefile:488: *** Your architecture does not support generic board.
  Please undefined CONFIG_SYS_GENERIC_BOARD in your board config file.  Stop.

We had to do "make mrproper" before building the microblaze board.

This commit fixes this unconvenience.

Move generic board sanity check to "prepare1" target,
which is run after generation of include/autoconf.mk.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

 Makefile | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index 84d6db4..fffeb7e 100644
--- a/Makefile
+++ b/Makefile
@@ -485,13 +485,6 @@ ifeq ($(wildcard include/config.mk),)
 $(error "System not configured - see README")
 endif
 
-ifeq ($(__HAVE_ARCH_GENERIC_BOARD),)
-ifneq ($(CONFIG_SYS_GENERIC_BOARD),)
-$(error Your architecture does not support generic board. \
-Please undefined CONFIG_SYS_GENERIC_BOARD in your board config file)
-endif
-endif
-
 # If board code explicitly specified LDSCRIPT or CONFIG_SYS_LDSCRIPT, use
 # that (or fail if absent).  Otherwise, search for a linker script in a
 # standard location.
@@ -996,7 +989,13 @@ endif
 prepare2: prepare3 outputmakefile
 
 prepare1: prepare2 $(version_h) $(timestamp_h)
-	@:
+ifeq ($(__HAVE_ARCH_GENERIC_BOARD),)
+ifeq ($(CONFIG_SYS_GENERIC_BOARD),y)
+	@echo >&2 "  Your architecture does not support generic board."
+	@echo >&2 "  Please undefine CONFIG_SYS_GENERIC_BOARD in your board config file."
+	@/bin/false
+endif
+endif
 
 archprepare: prepare1 scripts_basic
 
-- 
1.8.3.2

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

* [U-Boot] [PATCH 2/2] kbuild: Move linker sciript check to prepare1
  2014-02-24 13:11 [U-Boot] [PATCH 0/2] Kbuild: Fix a false error of sanity check Masahiro Yamada
  2014-02-24 13:11 ` [U-Boot] [PATCH 1/2] kbuild: Fix a false error of generic board support Masahiro Yamada
@ 2014-02-24 13:11 ` Masahiro Yamada
  2014-02-25 23:47   ` Simon Glass
  1 sibling, 1 reply; 5+ messages in thread
From: Masahiro Yamada @ 2014-02-24 13:11 UTC (permalink / raw)
  To: u-boot

Same as the previous commit.
Move sanity check to prepare1 target to avoid nasty troubles.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

 Makefile | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index fffeb7e..b034a36 100644
--- a/Makefile
+++ b/Makefile
@@ -518,9 +518,6 @@ ifndef LDSCRIPT
 		# We don't expect a Makefile here
 		LDSCRIPT_MAKEFILE_DIR =
 	endif
-	ifeq ($(wildcard $(LDSCRIPT)),)
-$(error could not find linker script)
-	endif
 endif
 
 else
@@ -996,6 +993,10 @@ ifeq ($(CONFIG_SYS_GENERIC_BOARD),y)
 	@/bin/false
 endif
 endif
+ifeq ($(wildcard $(LDSCRIPT)),)
+	@echo >&2 "  Could not find linker script."
+	@/bin/false
+endif
 
 archprepare: prepare1 scripts_basic
 
-- 
1.8.3.2

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

* [U-Boot] [PATCH 1/2] kbuild: Fix a false error of generic board support
  2014-02-24 13:11 ` [U-Boot] [PATCH 1/2] kbuild: Fix a false error of generic board support Masahiro Yamada
@ 2014-02-24 23:59   ` Masahiro Yamada
  0 siblings, 0 replies; 5+ messages in thread
From: Masahiro Yamada @ 2014-02-24 23:59 UTC (permalink / raw)
  To: u-boot

Hello Tom,

On Mon, 24 Feb 2014 22:11:45 +0900
Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:

> Before this commit, make terminated with an error
> where it shouldn't under some condition.
> 
> This bug happened when we built a board unsupporting
> generic board right after building with generic board.
> 
> For example, the following sequence failed.
> (harmony uses generic board but microblaze-generic does not
> support it)
> 
>   $ make harmony_config
>   Configuring for harmony board...
>   $ make CROSS_COMPILE=arm-linux-gnueabi-
>     [ Build succeed ]
>   $ make microblaze-generic_config
>   Configuring for microblaze-generic board...
>   $ make CROSS_COMPILE=microblaze-linux-
>   Makefile:488: *** Your architecture does not support generic board.
>   Please undefined CONFIG_SYS_GENERIC_BOARD in your board config file.  Stop.
> 
> We had to do "make mrproper" before building the microblaze board.

I've noticed a mistake here in commit log.
"make mrproper" should be "make clean".

So, correct description is:
We had to do "make clean" before building the microblaze board.


If possible, could you directly edit the commit log on your queue?

Or better to submit v2 ?

Best Regards
Masahiro Yamada

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

* [U-Boot] [PATCH 2/2] kbuild: Move linker sciript check to prepare1
  2014-02-24 13:11 ` [U-Boot] [PATCH 2/2] kbuild: Move linker sciript check to prepare1 Masahiro Yamada
@ 2014-02-25 23:47   ` Simon Glass
  0 siblings, 0 replies; 5+ messages in thread
From: Simon Glass @ 2014-02-25 23:47 UTC (permalink / raw)
  To: u-boot

On 24 February 2014 06:11, Masahiro Yamada <yamada.m@jp.panasonic.com> wrote:
> Same as the previous commit.
> Move sanity check to prepare1 target to avoid nasty troubles.
>
> Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>

Acked-by: Simon Glass <sjg@chromium.org>

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

end of thread, other threads:[~2014-02-25 23:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-24 13:11 [U-Boot] [PATCH 0/2] Kbuild: Fix a false error of sanity check Masahiro Yamada
2014-02-24 13:11 ` [U-Boot] [PATCH 1/2] kbuild: Fix a false error of generic board support Masahiro Yamada
2014-02-24 23:59   ` Masahiro Yamada
2014-02-24 13:11 ` [U-Boot] [PATCH 2/2] kbuild: Move linker sciript check to prepare1 Masahiro Yamada
2014-02-25 23:47   ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.