Patchwork [meta-fsl-arm-extra,for,dora,PATCHv2,3/4] linux-cfa: split recipe to create an include file

login
register
mail settings
Submitter Alexandre Belloni
Date Jan. 3, 2014, 12:10 a.m.
Message ID <1388707841-19927-3-git-send-email-alexandre.belloni@free-electrons.com>
Download mbox | patch
Permalink /patch/63995/
State Accepted
Delegated to: Otavio Salvador
Headers show

Comments

Alexandre Belloni - Jan. 3, 2014, 12:10 a.m.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 recipes-kernel/linux/linux-cfa.inc     | 29 +++++++++++++++++++++++++++++
 recipes-kernel/linux/linux-cfa_3.10.bb | 29 +----------------------------
 2 files changed, 30 insertions(+), 28 deletions(-)
 create mode 100644 recipes-kernel/linux/linux-cfa.inc

Patch

diff --git a/recipes-kernel/linux/linux-cfa.inc b/recipes-kernel/linux/linux-cfa.inc
new file mode 100644
index 000000000000..83506188f88e
--- /dev/null
+++ b/recipes-kernel/linux/linux-cfa.inc
@@ -0,0 +1,29 @@ 
+DESCRIPTION = "Linux kernel for Crystalfontz boards"
+SECTion = "kernel"
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
+
+inherit kernel
+require recipes-kernel/linux/linux-dtb.inc
+
+SRC_URI = "git://github.com/crystalfontz/cfa_10036_kernel;branch=${SRCBRANCH} \
+           file://defconfig"
+
+S = "${WORKDIR}/git"
+
+# create symlinks that are the defaults of barebox
+pkg_postinst_kernel-devicetree_append () {
+	for DTB_FILE in ${KERNEL_DEVICETREE}
+	do
+		DTB_BASE_NAME=`basename ${DTB_FILE} | awk -F "." '{print $1}'`
+		DTB_BOARD_NAME=`echo ${DTB_BASE_NAME} | awk -F "-" '{print $2}'`
+		DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
+		update-alternatives --install /${KERNEL_IMAGEDEST}/oftree-${DTB_BOARD_NAME} oftree-${DTB_BOARD_NAME} devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
+	done
+}
+
+pkg_postinst_kernel-image_append () {
+	update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-cfa10036 ${KERNEL_IMAGETYPE}-cfa10036 ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
+}
+
diff --git a/recipes-kernel/linux/linux-cfa_3.10.bb b/recipes-kernel/linux/linux-cfa_3.10.bb
index 603f036b0c4b..4b285d8daf5f 100644
--- a/recipes-kernel/linux/linux-cfa_3.10.bb
+++ b/recipes-kernel/linux/linux-cfa_3.10.bb
@@ -1,34 +1,7 @@ 
-DESCRIPTION = "Linux kernel for Crystalfontz boards"
-SECTion = "kernel"
-LICENSE = "GPLv2"
-
-LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
-
-inherit kernel
-require recipes-kernel/linux/linux-dtb.inc
+require linux-cfa.inc
 
 SRCBRANCH = "cfa-3.10.25"
-SRC_URI = "git://github.com/crystalfontz/cfa_10036_kernel;branch=${SRCBRANCH} \
-           file://defconfig"
-
 SRCREV = "61dbe8ef338ce4cc1c10d5a6cdd418c047fb136d"
 
-S = "${WORKDIR}/git"
-
-# create symlinks that are the defaults of barebox
-pkg_postinst_kernel-devicetree_append () {
-	for DTB_FILE in ${KERNEL_DEVICETREE}
-	do
-		DTB_BASE_NAME=`basename ${DTB_FILE} | awk -F "." '{print $1}'`
-		DTB_BOARD_NAME=`echo ${DTB_BASE_NAME} | awk -F "-" '{print $2}'`
-		DTB_SYMLINK_NAME=`echo ${KERNEL_IMAGE_SYMLINK_NAME} | sed "s/${MACHINE}/${DTB_BASE_NAME}/g"`
-		update-alternatives --install /${KERNEL_IMAGEDEST}/oftree-${DTB_BOARD_NAME} oftree-${DTB_BOARD_NAME} devicetree-${DTB_SYMLINK_NAME}.dtb ${KERNEL_PRIORITY} || true
-	done
-}
-
-pkg_postinst_kernel-image_append () {
-	update-alternatives --install /${KERNEL_IMAGEDEST}/${KERNEL_IMAGETYPE}-cfa10036 ${KERNEL_IMAGETYPE}-cfa10036 ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
-}
-
 COMPATIBLE_MACHINE = "cfa10036"