[Buildroot] [git commit branch/next] Factorize the u-boot images code

From: Thomas Petazzoni <hidden>
Date: 2012-07-31 21:08:28
Subsystem: the rest · Maintainer: Linus Torvalds

commit: http://git.buildroot.net/buildroot/commit/?id=902609fbb31506dfe04f100c9c8099fbfa8095a1
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/next

This patch introduces the BR2_LINUX_KERNEL_UBOOT_IMAGE boolean to
factorize more code that will be shared in the next patches that
introduces other uImage-like targets.

Signed-off-by: Maxime Ripard <redacted>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <redacted>
Signed-off-by: Thomas Petazzoni <redacted>
---
 linux/Config.in |    4 ++++
 linux/linux.mk  |    5 ++++-
 2 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/linux/Config.in b/linux/Config.in
index 16c7ea7..84fae91 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -129,12 +129,16 @@ config BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE
 # Binary format
 #
 
+config BR2_LINUX_KERNEL_UBOOT_IMAGE
+       bool
+
 choice
 	prompt "Kernel binary format"
 
 config BR2_LINUX_KERNEL_UIMAGE
 	bool "uImage"
 	depends on BR2_arm || BR2_armeb || BR2_bfin || BR2_powerpc || BR2_avr32 || BR2_sh || BR2_sh64
+	select BR2_LINUX_KERNEL_UBOOT_IMAGE
 
 config BR2_LINUX_KERNEL_BZIMAGE
 	bool "bzImage"
diff --git a/linux/linux.mk b/linux/linux.mk
index 099f8ba..844ce55 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -36,6 +36,10 @@ LINUX_PATCHES = $(call qstrip,$(BR2_LINUX_KERNEL_PATCH))
 LINUX_INSTALL_IMAGES = YES
 LINUX_DEPENDENCIES  += host-module-init-tools
 
+ifeq ($(BR2_LINUX_KERNEL_UBOOT_IMAGE),y)
+	LINUX_DEPENDENCIES += host-uboot-tools
+endif
+
 LINUX_MAKE_FLAGS = \
 	HOSTCC="$(HOSTCC)" \
 	HOSTCFLAGS="$(HOSTCFLAGS)" \
@@ -64,7 +68,6 @@ LINUX_IMAGE_NAME=vmImage
 else
 LINUX_IMAGE_NAME=uImage
 endif
-LINUX_DEPENDENCIES+=host-uboot-tools
 else ifeq ($(BR2_LINUX_KERNEL_BZIMAGE),y)
 LINUX_IMAGE_NAME=bzImage
 else ifeq ($(BR2_LINUX_KERNEL_ZIMAGE),y)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help