From 44a5fa04b1e9344946732a8c36b7a0779f5403e5 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Wed, 13 Nov 2013 19:15:09 +0100 Subject: [PATCH] imx-bootlets: move BOARD selection to the machine config Move the BOARD selection out of the bootlets recipe so it can be used from machines defined in other layers. Signed-off-by: Javier Viguera --- meta-digi-arm/conf/machine/ccardimx28js.conf | 2 ++ meta-digi-arm/conf/machine/wr21.conf | 2 ++ .../imx-bootlets-dey/imx-bootlets-dey_git.bb | 14 +++++++++++--- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/meta-digi-arm/conf/machine/ccardimx28js.conf b/meta-digi-arm/conf/machine/ccardimx28js.conf index 83888bddd..ac2423084 100644 --- a/meta-digi-arm/conf/machine/ccardimx28js.conf +++ b/meta-digi-arm/conf/machine/ccardimx28js.conf @@ -4,6 +4,8 @@ include conf/machine/include/ccardimx28.inc +IMXBOOTLETS_MACHINE = "CCARDIMX28JS" + DTSNAME = "imx28-${MACHINE}" # Use standard serial port name and let device handlers (mdev, udev) diff --git a/meta-digi-arm/conf/machine/wr21.conf b/meta-digi-arm/conf/machine/wr21.conf index 8b9b9f898..d16f4d966 100644 --- a/meta-digi-arm/conf/machine/wr21.conf +++ b/meta-digi-arm/conf/machine/wr21.conf @@ -6,6 +6,8 @@ include conf/machine/include/mxs-digi-base.inc SOC_FAMILY = "mxs:mx28" +IMXBOOTLETS_MACHINE = "WR21" + UBOOT_ENTRYPOINT = "0x41008000" UBOOT_LOADADDRESS = "0x41008000" diff --git a/meta-digi-arm/recipes-bsp/imx-bootlets-dey/imx-bootlets-dey_git.bb b/meta-digi-arm/recipes-bsp/imx-bootlets-dey/imx-bootlets-dey_git.bb index bd5310c02..a03f1184d 100644 --- a/meta-digi-arm/recipes-bsp/imx-bootlets-dey/imx-bootlets-dey_git.bb +++ b/meta-digi-arm/recipes-bsp/imx-bootlets-dey/imx-bootlets-dey_git.bb @@ -20,9 +20,17 @@ S = "${WORKDIR}/git" # Disable parallel building or it may fail to build. PARALLEL_MAKE = "" -EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}" -EXTRA_OEMAKE_append_ccardimx28js = " BOARD=CCARDIMX28JS" -EXTRA_OEMAKE_append_wr21 = " BOARD=WR21" +EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} BOARD=${IMXBOOTLETS_MACHINE}" + +# Ensure machine defines the IMXBOOTLETS_MACHINE +python () { + if not d.getVar("IMXBOOTLETS_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("because IMXBOOTLETS_MACHINE is not set") +} do_install () { install -d ${STAGING_DIR_TARGET}/boot