[meta-freescale] [meta-fsl-arm-extra][PATCH 1/2] u-boot-congatec: Fix out-of-tree build

Otavio Salvador otavio at ossystems.com.br
Fri Apr 10 10:20:43 PDT 2015


Due the possibility of generating several binaries, for U-Boot, the
build needs to be done out-of-tree however the build system of 2013.04
version was not ready for it. Apply a simple fix for the time being.

The out-of-tree mechanism is much more robust in more recent versions
of U-Boot however this is not an option for this set of boards at the
moment.

Change-Id: I3b80e8c07a41f66dd74465dc064bec4c040d853c
Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
---
 conf/machine/cgtqmx6.conf                          |  2 +-
 .../build-Fix-out-of-tree-build.patch              | 39 ++++++++++++++++++++++
 recipes-bsp/u-boot/u-boot-congatec_2013.04.bb      |  1 +
 3 files changed, 41 insertions(+), 1 deletion(-)
 create mode 100644 recipes-bsp/u-boot/u-boot-congatec/build-Fix-out-of-tree-build.patch

diff --git a/conf/machine/cgtqmx6.conf b/conf/machine/cgtqmx6.conf
index 7a51d82..7562165 100644
--- a/conf/machine/cgtqmx6.conf
+++ b/conf/machine/cgtqmx6.conf
@@ -25,7 +25,7 @@ UBOOT_CONFIG[pn016111] = "cgt_qmx6_pn016111"
 UBOOT_CONFIG[pn016112] = "cgt_qmx6_pn016112"
 UBOOT_CONFIG[pn016113] = "cgt_qmx6_pn016113"
 
-UBOOT_MAKE_TARGET = "u-boot.${UBOOT_CONFIG}.imx"
+UBOOT_MAKE_TARGET = ""
 UBOOT_BINARY = "u-boot.${UBOOT_CONFIG}.imx"
 
 # Use linux kernel QMX6
diff --git a/recipes-bsp/u-boot/u-boot-congatec/build-Fix-out-of-tree-build.patch b/recipes-bsp/u-boot/u-boot-congatec/build-Fix-out-of-tree-build.patch
new file mode 100644
index 0000000..ea16a08
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot-congatec/build-Fix-out-of-tree-build.patch
@@ -0,0 +1,39 @@
+From dbc95624603467b1a963475aaa980cb2347d4871 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio at ossystems.com.br>
+Date: Fri, 10 Apr 2015 11:49:54 -0300
+Subject: [PATCH] build: Fix out of tree build
+Organization: O.S. Systems Software LTDA.
+
+Upstream-Status: Pending
+
+Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
+---
+ Makefile | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 2b963c2..7eb9dae 100644
+--- a/Makefile
++++ b/Makefile
+@@ -464,7 +464,8 @@ $(obj)u-boot.img:	$(obj)u-boot.bin
+ 		-d $< $@
+ 
+ $(obj)u-boot.pn$(CONFIG_QMX6_PN).imx:	$(obj)u-boot.bin
+-		$(CC) -E -x c $(CONFIG_IMX_CONFIG) -I./include -o $(obj)imxcfg.imx
++		$(CC) -E -x c $(CONFIG_IMX_CONFIG) -I$(TOPDIR)/arch/$(ARCH)/include \
++			-I$(TOPDIR)/include -I$(obj)include -o $(obj)imxcfg.imx
+ 		$(obj)tools/mkimage -n  $(obj)imxcfg.imx -T imximage \
+ 		-e $(CONFIG_SYS_TEXT_BASE) -d $< $@
+ 
+@@ -778,7 +779,7 @@ unconfig:
+ 
+ %_config::	unconfig
+ 	@$(MKCONFIG) -A $(@:_config=)
+-	@sed -n 's/^#define CONFIG_QMX6_PN[ \t]/ pn/p' $(obj)include/config.h > localversion-qmx6-pn
++	@sed -n 's/^#define CONFIG_QMX6_PN[ \t]/ pn/p' $(obj)include/config.h > $(obj)localversion-qmx6-pn
+ 
+ 
+ sinclude $(obj).boards.depend
+-- 
+2.1.4
+
diff --git a/recipes-bsp/u-boot/u-boot-congatec_2013.04.bb b/recipes-bsp/u-boot/u-boot-congatec_2013.04.bb
index ace1c45..be35bd3 100644
--- a/recipes-bsp/u-boot/u-boot-congatec_2013.04.bb
+++ b/recipes-bsp/u-boot/u-boot-congatec_2013.04.bb
@@ -17,6 +17,7 @@ SRCBRANCH = "cgt_imx_v2013.04_3.10.17_1.0.2"
 SRC_URI = "git://git.congatec.com/arm/qmx6_uboot.git;protocol=http;branch=${SRCBRANCH} \
 	   file://u-boot-congatec-Change_environment_variables.patch \
 	   file://u-boot-congatec-Change-environment-mmcroot-variable.patch \
+	   file://build-Fix-out-of-tree-build.patch \
 "
 
 S = "${WORKDIR}/git"
-- 
2.1.4



More information about the meta-freescale mailing list