[meta-freescale] [meta-fsl-arm-extra][PATCH 3/4] linux-cfa: add a kernel recipe supporting Crystalfontz boards

Otavio Salvador otavio at ossystems.com.br
Thu Aug 22 10:19:12 PDT 2013


On Thu, Aug 22, 2013 at 2:17 PM, Alexandre Belloni
<alexandre.belloni at free-electrons.com> wrote:
> On 22/08/2013 19:06, Otavio Salvador wrote:
>> On Thu, Aug 22, 2013 at 11:51 AM, Alexandre Belloni
>> <alexandre.belloni at free-electrons.com> wrote:
>>> Signed-off-by: Alexandre Belloni <alexandre.belloni at free-electrons.com>
>>> ---
>>>  recipes-kernel/linux/linux-cfa-3.10/defconfig | 177 ++++++++++++++++++++++++++
>>>  recipes-kernel/linux/linux-cfa_3.10.bb        |  33 +++++
>>>  2 files changed, 210 insertions(+)
>>>  create mode 100644 recipes-kernel/linux/linux-cfa-3.10/defconfig
>>>  create mode 100644 recipes-kernel/linux/linux-cfa_3.10.bb
>>>
>>> diff --git a/recipes-kernel/linux/linux-cfa-3.10/defconfig b/recipes-kernel/linux/linux-cfa-3.10/defconfig
>> ...
>>> diff --git a/recipes-kernel/linux/linux-cfa_3.10.bb b/recipes-kernel/linux/linux-cfa_3.10.bb
>>> new file mode 100644
>>> index 0000000..2c2a723
>>> --- /dev/null
>>> +++ b/recipes-kernel/linux/linux-cfa_3.10.bb
>>> @@ -0,0 +1,33 @@
>>> +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 \
>>> +           file://defconfig"
>>> +
>>> +SRCREV = "552d876f4737ffeb18c9139ede3c439bdcafca94"
>>> +
>>> +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}-${MACHINE} ${KERNEL_IMAGETYPE}-${MACHINE} ${KERNEL_IMAGETYPE}-${KERNEL_VERSION} ${KERNEL_PRIORITY} || true
>>> +}
>>> +
>>> +COMPATIBLE_MACHINE = "cfa10036"
>>> +
>> What it does different here than original linux-dtb alternatives?
>>
>
> Actually, the default environment present in the barebox mainline for
> the cfa10036 is looking for a kernel named zImage-cfa10036 and DTBs
> named oftree-${DTB_BOARD_NAME} in /boot. So I'm just creating more links
> to the kernel and DTBs. I'm not doing anything differently, I'm just
> creating more links.

I'd patch the default environment so we avoid custom behaviour from
other boards. Do you mind?

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750



More information about the meta-freescale mailing list