[meta-freescale] [meta-fsl-arm-extra][PATCH 2/4] imx-bootlets: add a recipe for barebox and cfa-10036 support

Alexandre Belloni alexandre.belloni at free-electrons.com
Thu Aug 22 07:51:15 PDT 2013


Signed-off-by: Alexandre Belloni <alexandre.belloni at free-electrons.com>
---
 .../imx-bootlets/barebox-fix-paths.patch           | 35 ++++++++++++
 recipes-bsp/imx-bootlets/imx-bootlets_cfa.bb       | 65 ++++++++++++++++++++++
 2 files changed, 100 insertions(+)
 create mode 100644 recipes-bsp/imx-bootlets/imx-bootlets/barebox-fix-paths.patch
 create mode 100644 recipes-bsp/imx-bootlets/imx-bootlets_cfa.bb

diff --git a/recipes-bsp/imx-bootlets/imx-bootlets/barebox-fix-paths.patch b/recipes-bsp/imx-bootlets/imx-bootlets/barebox-fix-paths.patch
new file mode 100644
index 0000000..c6c90d1
--- /dev/null
+++ b/recipes-bsp/imx-bootlets/imx-bootlets/barebox-fix-paths.patch
@@ -0,0 +1,35 @@
+From 98721be1c1762adec9130f15263d98e575e290ae Mon Sep 17 00:00:00 2001
+From: Alexandre Belloni <alexandre.belloni at free-electrons.com>
+Date: Thu, 8 Aug 2013 20:14:51 +0200
+Subject: [PATCH] imx-bootlets: Fix paths used during boot stream generation
+
+This will be run during image generation thus this won't use a
+complete path to allow for relocation.
+
+Upstream-Status: Inappropriate [configuration]
+
+Signed-off-by: Alexandre Belloni <alexandre.belloni at free-electrons.com>
+---
+ barebox_ivt.bd | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/barebox_ivt.bd b/barebox_ivt.bd
+index 0c67e9c..c603f9e 100644
+--- a/barebox_ivt.bd
++++ b/barebox_ivt.bd
+@@ -1,9 +1,9 @@
+ // STMP378x ROM command script to load and run U-Boot
+ 
+ sources {
+-	power_prep="./power_prep/power_prep";
+-	sdram_prep="./boot_prep/boot_prep";
+-	barebox="./barebox";
++	power_prep="imx-bootlets-power_prep- at MACHINE@";
++	sdram_prep="imx-bootlets-boot_prep- at MACHINE@";
++	barebox="barebox- at MACHINE@.bin";
+ }
+ 
+ section (0) {
+-- 
+1.8.1.2
+
diff --git a/recipes-bsp/imx-bootlets/imx-bootlets_cfa.bb b/recipes-bsp/imx-bootlets/imx-bootlets_cfa.bb
new file mode 100644
index 0000000..580adef
--- /dev/null
+++ b/recipes-bsp/imx-bootlets/imx-bootlets_cfa.bb
@@ -0,0 +1,65 @@
+DESCRIPTION = "i.MXS boot streams"
+LICENSE = "GPL-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6"
+
+PR = "r1"
+
+SRC_URI = "git://github.com/crystalfontz/bootlets.git \
+		   file://barebox-fix-paths.patch \
+		  "
+SRCREV = "03bfdef0fa7efc6b64392e3eebfaf688018751cc"
+
+S = "${WORKDIR}/git"
+
+# Disable parallel building or it may fail to build.
+PARALLEL_MAKE = ""
+
+EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
+
+# 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_configure () {
+    sed -i 's, at MACHINE@,${MACHINE},g' barebox_ivt.bd
+}
+
+do_compile () {
+    oe_runmake BOARD=${IMXBOOTLETS_MACHINE} linux_prep \
+                                            boot_prep \
+                                            power_prep
+}
+
+do_install () {
+    install -d ${D}/boot/
+    install -m 644 boot_prep/boot_prep power_prep/power_prep \
+                   barebox_ivt.bd \
+                   ${D}/boot
+}
+
+FILES_${PN} = "/boot"
+
+do_deploy () {
+    install -d ${DEPLOY_DIR_IMAGE}
+
+	for f in boot_prep/boot_prep \
+             power_prep/power_prep \
+             barebox_ivt.bd; do
+        full_name="imx-bootlets-`basename $f`-${MACHINE}-${PV}-${PR}"
+        symlink_name="imx-bootlets-`basename $f`-${MACHINE}"
+
+        install -m 644 ${S}/$f ${DEPLOY_DIR_IMAGE}/$full_name
+        (cd ${DEPLOY_DIR_IMAGE} ; rm -f $symlink_nake ; ln -sf $full_name $symlink_name)
+    done
+}
+
+addtask deploy before do_build after do_compile
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+COMPATIBLE_MACHINE = "(mxs)"
-- 
1.8.1.2




More information about the meta-freescale mailing list