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

login
register
mail settings
Submitter Alexandre Belloni
Date Jan. 2, 2014, 1:45 p.m.
Message ID <1388670350-23158-3-git-send-email-alexandre.belloni@free-electrons.com>
Download mbox | patch
Permalink /patch/63987/
State Changes Requested
Delegated to: Otavio Salvador
Headers show

Comments

Alexandre Belloni - Jan. 2, 2014, 1:45 p.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
Daiane Angolini - Jan. 2, 2014, 4:22 p.m.
> -----Original Message-----
> From: meta-freescale-bounces@yoctoproject.org [mailto:meta-freescale-
> bounces@yoctoproject.org] On Behalf Of Alexandre Belloni
> Sent: Thursday, January 02, 2014 11:46 AM
> To: meta-freescale@yoctoproject.org
> Cc: Maxime Ripard; jimwall@q.com
> Subject: [meta-freescale] [meta-fsl-arm-extra][for dora][PATCH 3/4] linux-
> cfa: split recipe to create an include file

I like it!

> 
> 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
> 
> diff --git a/recipes-kernel/linux/linux-cfa.inc b/recipes-
> kernel/linux/linux-cfa.inc
> new file mode 100644
> index 000000000000..408a51f8d852
> --- /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=${SRC_BRANCH} \
> +           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 65ea294539c8..ddf53961ef76 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
> +include linux-cfa.inc

You may want to use "require" to your -cfa.inc file as well.

> 
>  SRC_BRANCH = "cfa-3.10.25"
> -SRC_URI =
> "git://github.com/crystalfontz/cfa_10036_kernel;branch=${SRC_BRANCH} \
> -           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"
> 
> --
> 1.8.3.2
> 
> _______________________________________________
> meta-freescale mailing list
> meta-freescale@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale
>
Alexandre Belloni - Jan. 2, 2014, 6:06 p.m.
On 02/01/2014 17:22, Daiane.Angolini@freescale.com wrote:
> 
> 
>> -----Original Message-----
>> From: meta-freescale-bounces@yoctoproject.org [mailto:meta-freescale-
>> bounces@yoctoproject.org] On Behalf Of Alexandre Belloni
>> Sent: Thursday, January 02, 2014 11:46 AM
>> To: meta-freescale@yoctoproject.org
>> Cc: Maxime Ripard; jimwall@q.com
>> Subject: [meta-freescale] [meta-fsl-arm-extra][for dora][PATCH 3/4] linux-
>> cfa: split recipe to create an include file
> 
> I like it!
> 
>>
>> 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
>>
>> diff --git a/recipes-kernel/linux/linux-cfa.inc b/recipes-
>> kernel/linux/linux-cfa.inc
>> new file mode 100644
>> index 000000000000..408a51f8d852
>> --- /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=${SRC_BRANCH} \
>> +           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 65ea294539c8..ddf53961ef76 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
>> +include linux-cfa.inc
> 
> You may want to use "require" to your -cfa.inc file as well.
> 

Ok, will do.

>>
>>  SRC_BRANCH = "cfa-3.10.25"
>> -SRC_URI =
>> "git://github.com/crystalfontz/cfa_10036_kernel;branch=${SRC_BRANCH} \
>> -           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"
>>
>> --
>> 1.8.3.2
>>
>> _______________________________________________
>> meta-freescale mailing list
>> meta-freescale@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-freescale
>>
>

Patch

diff --git a/recipes-kernel/linux/linux-cfa.inc b/recipes-kernel/linux/linux-cfa.inc
new file mode 100644
index 000000000000..408a51f8d852
--- /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=${SRC_BRANCH} \
+           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 65ea294539c8..ddf53961ef76 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
+include linux-cfa.inc
 
 SRC_BRANCH = "cfa-3.10.25"
-SRC_URI = "git://github.com/crystalfontz/cfa_10036_kernel;branch=${SRC_BRANCH} \
-           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"