Skip to contentSkip to conversation

u-boot-fw-utils: Skip package if UBOOT_MACHINE is unset

PATCH In review Otavio Salvador 2 participants 2 messages Sep 18, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 u-boot-fw-utils: Skip package if UBOOT_MACHINE is unset

The UBOOT_MACHINE variable needs to be set so the firmware utils can know about some configuration settings which are board dependent. This patch ensures the package is skipped in case UBOOT_MACHINE is unset thus avoid its build in 'bitbake world' builds for incompatible machines.

Fixes [YOCTO: #5223]

---
 meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb | 9 +++++++++
 1 file changed, 9 insertions(+)
meta/recipes-bsp/u-boot/u-boot-fw-utils_2013.07.bb +9 -0
index f97df71..e711951 100644
@@ -17,6 +17,15 @@ S = "${WORKDIR}/git"
 
 EXTRA_OEMAKE = 'HOSTCC="${CC}" HOSTSTRIP="true"'
 
+python () {
+	if not d.getVar("UBOOT_MACHINE", True):
+		PN = d.getVar("PN", True)
+		FILE = os.path.basename(d.getVar("FILE", True))
+		bb.debug(1, "To build %s, see %s for instructions on \
+			     setting up your machine config" % (PN, FILE))
+		raise bb.parse.SkipPackage("UBOOT_MACHINE is not set in the %s machine configuration." % d.getVar("MACHINE", True))
+}
+
 do_compile () {
   oe_runmake ${UBOOT_MACHINE}
   oe_runmake env
Signature · 1 line
1.8.4.rc3
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Otavio Salvador

The UBOOT_MACHINE variable needs to be set so the firmware utils can know about some configuration settings which are board dependent. This patch ensures the package is skipped in case UBOOT_MACHINE is unset thus avoid its build in 'bitbake world' builds for incompatible machines.

Fixes [YOCTO: #5223]

Thanks for the quick fix!

/Anders