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

Alexandre Belloni alexandre.belloni at free-electrons.com
Thu Jan 2 10:06:38 PST 2014


On 02/01/2014 17:22, Daiane.Angolini at freescale.com wrote:
> 
> 
>> -----Original Message-----
>> From: meta-freescale-bounces at yoctoproject.org [mailto:meta-freescale-
>> bounces at yoctoproject.org] On Behalf Of Alexandre Belloni
>> Sent: Thursday, January 02, 2014 11:46 AM
>> To: meta-freescale at yoctoproject.org
>> Cc: Maxime Ripard; jimwall at 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 at 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 at yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-freescale
>>
> 


-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


More information about the meta-freescale mailing list