* How to config kernel in my own meta layer?
@ 2017-12-21 15:32 Fan Zhang
2017-12-22 14:21 ` Bruce Ashfield
2017-12-23 14:49 ` Patrick Ohly
0 siblings, 2 replies; 3+ messages in thread
From: Fan Zhang @ 2017-12-21 15:32 UTC (permalink / raw)
To: yocto@yoctoproject.org
[-- Attachment #1.1: Type: text/plain, Size: 3612 bytes --]
Greetings,
I have a recipes that requires 128MB of CMA allocation for DMA. I
followed the instruction in
http://www.yoctoproject.org/docs/1.6/kernel-dev/kernel-dev.html#changing-the-configuration
and did the following:
My recipes structure:
meta-mylayer\recipes-my\uio-test\
1. Then in uio-test folder, I have uio-test.bb that created by
recipetool (in general) with some modification. uio-test.bb looks like
this:
#------------------------------------------------------------------
# Recipe created by recipetool
# This is the basis of a recipe and may need further editing in order to
be fully functional.
# (Feel free to remove these comments when editing.)
# Unable to find any files that looked like license statements. Check
the accompanying
# documentation and source headers and set LICENSE and LIC_FILES_CHKSUM
accordingly.
#
# NOTE: LICENSE is being set to "CLOSED" to allow you to at least start
building - if
# this is not accurate with respect to the licensing of the software
being built (it
# will not be in most cases) you must specify the correct value before
using this
# recipe for anything other than initial testing/development!
LICENSE = "CLOSED"
LIC_FILES_CHKSUM = ""
# No information for SRC_URI yet (only an external source tree was
specified)
PV = "2.0.2"
SRC_URI = "file://src"
# NOTE: this is a Makefile-only piece of software, so we cannot generate
much of the
# recipe automatically - you will need to examine the Makefile yourself
and ensure
# that the appropriate arguments are passed in.
do_configure () {
# Specify any needed configure commands here
:
}
do_compile () {
# You will almost certainly need to add additional arguments here
cd ${WORKDIR}/src
oe_runmake
}
FILES_${PN} = "/www/pages /etc/lighttpd.d"
do_install () {
# This is a guess; additional arguments may be required
cd ${WORKDIR}/src
oe_runmake install 'DESTDIR=${D}'
}
DEPENDS = "libgcc boost"
RDEPENDS_${PN} = "libgcc boost-thread boost-system lighttpd
lighttpd-module-cgi"
#------------------------------------------------------------------
2. Also in uio-test folder, I have uio-test.bbappend file with these
contents:
#------------------------------------------------------------------
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += "file://uio-test.cfg"
#----------------------^^^^^^^^^^^^^^^^^^^-------------------------
3. In uio-test/files folder, I have uio-test.cfg with the following
contents:
#------------------------------------------------------------------
CONFIG_CMA_ALIGNMENT=8
CONFIG_CMA=y
CONFIG_CMA_AREAS=7
CONFIG_DMA_CMA=y
CONFIG_CMA_SIZE_MBYTES=128
CONFIG_CMA_SIZE_SEL_MBYTES=y
CONFIG_DMADEVICES=y
CONFIG_DMA_ENGINE=y
CONFIG_DMA_OF=y
CONFIG_XILINX_DMA_ENGINES=y
CONFIG_XILINX_DMA=y
CONFIG_DMA_API_DEBUG=y
CONFIG_HAS_DMA=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_HAVE_DMA_CONTIGUOUS=y
CONFIG_HAVE_DMA_API_DEBUG=y
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_ARM_DMA_MEM_BUFFERABLE=y
CONFIG_ZONE_DMA_FLAG=0
#----------------------^^^^^^^^^^^^^^^^^^^-------------------------
My question: I think the cfg file is being parsed because if I change
the folder name files to something else, bitbake will complaint about
not being able to find uio-test.cfg. However, the final .config in built
do not have the CMA allocated. My meta layer does have a priority higher
than the upstream layers. What else can cause the problem here? Any
suggestions? Thanks.
Fan Zhang
[-- Attachment #1.2: Type: text/html, Size: 6640 bytes --]
[-- Attachment #2: fzhang.vcf --]
[-- Type: text/x-vcard, Size: 185 bytes --]
begin:vcard
fn:Fan Zhang
n:Zhang;Fan
org:Sander Geophysics Ltd.
email;internet:fzhang@sgl.com
title:Electronics Design Engineer
tel;work:(613)521-9626
version:2.1
end:vcard
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: How to config kernel in my own meta layer?
2017-12-21 15:32 How to config kernel in my own meta layer? Fan Zhang
@ 2017-12-22 14:21 ` Bruce Ashfield
2017-12-23 14:49 ` Patrick Ohly
1 sibling, 0 replies; 3+ messages in thread
From: Bruce Ashfield @ 2017-12-22 14:21 UTC (permalink / raw)
To: Fan Zhang; +Cc: yocto@yoctoproject.org
On Thu, Dec 21, 2017 at 11:32 AM, Fan Zhang <fzhang@sgl.com> wrote:
> Greetings,
>
> I have a recipes that requires 128MB of CMA allocation for DMA. I followed
> the instruction in
> http://www.yoctoproject.org/docs/1.6/kernel-dev/kernel-dev.html#changing-the-configuration
> and did the following:
>
> My recipes structure:
>
> meta-mylayer\recipes-my\uio-test\
>
> 1. Then in uio-test folder, I have uio-test.bb that created by recipetool
> (in general) with some modification. uio-test.bb looks like this:
>
> #------------------------------------------------------------------
>
> # Recipe created by recipetool
> # This is the basis of a recipe and may need further editing in order to be
> fully functional.
> # (Feel free to remove these comments when editing.)
>
> # Unable to find any files that looked like license statements. Check the
> accompanying
> # documentation and source headers and set LICENSE and LIC_FILES_CHKSUM
> accordingly.
> #
> # NOTE: LICENSE is being set to "CLOSED" to allow you to at least start
> building - if
> # this is not accurate with respect to the licensing of the software being
> built (it
> # will not be in most cases) you must specify the correct value before using
> this
> # recipe for anything other than initial testing/development!
> LICENSE = "CLOSED"
> LIC_FILES_CHKSUM = ""
>
> # No information for SRC_URI yet (only an external source tree was
> specified)
> PV = "2.0.2"
> SRC_URI = "file://src"
>
> # NOTE: this is a Makefile-only piece of software, so we cannot generate
> much of the
> # recipe automatically - you will need to examine the Makefile yourself and
> ensure
> # that the appropriate arguments are passed in.
>
> do_configure () {
> # Specify any needed configure commands here
> :
> }
>
> do_compile () {
> # You will almost certainly need to add additional arguments here
> cd ${WORKDIR}/src
> oe_runmake
> }
>
> FILES_${PN} = "/www/pages /etc/lighttpd.d"
> do_install () {
> # This is a guess; additional arguments may be required
> cd ${WORKDIR}/src
> oe_runmake install 'DESTDIR=${D}'
> }
>
> DEPENDS = "libgcc boost"
> RDEPENDS_${PN} = "libgcc boost-thread boost-system lighttpd
> lighttpd-module-cgi"
> #------------------------------------------------------------------
>
> 2. Also in uio-test folder, I have uio-test.bbappend file with these
> contents:
>
> #------------------------------------------------------------------
>
> FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
> SRC_URI += "file://uio-test.cfg"
>
> #----------------------^^^^^^^^^^^^^^^^^^^-------------------------
>
> 3. In uio-test/files folder, I have uio-test.cfg with the following
> contents:
>
>
> #------------------------------------------------------------------
>
> CONFIG_CMA_ALIGNMENT=8
> CONFIG_CMA=y
> CONFIG_CMA_AREAS=7
> CONFIG_DMA_CMA=y
> CONFIG_CMA_SIZE_MBYTES=128
> CONFIG_CMA_SIZE_SEL_MBYTES=y
> CONFIG_DMADEVICES=y
> CONFIG_DMA_ENGINE=y
> CONFIG_DMA_OF=y
> CONFIG_XILINX_DMA_ENGINES=y
> CONFIG_XILINX_DMA=y
> CONFIG_DMA_API_DEBUG=y
> CONFIG_HAS_DMA=y
> CONFIG_NEED_DMA_MAP_STATE=y
> CONFIG_HAVE_DMA_CONTIGUOUS=y
> CONFIG_HAVE_DMA_API_DEBUG=y
> CONFIG_HAVE_GENERIC_DMA_COHERENT=y
> CONFIG_ARM_DMA_MEM_BUFFERABLE=y
> CONFIG_ZONE_DMA_FLAG=0
> #----------------------^^^^^^^^^^^^^^^^^^^-------------------------
>
> My question: I think the cfg file is being parsed because if I change the
> folder name files to something else, bitbake will complaint about not being
> able to find uio-test.cfg. However, the final .config in built do not have
> the CMA allocated. My meta layer does have a priority higher than the
> upstream layers. What else can cause the problem here? Any suggestions?
> Thanks.
The question is ... which kernel is it ? If the kernel recipe you are
using doesn't
inherit linux-yocto, the fragments won't be applied.
And a second question, what release/branch are you using ?
On that note, I actually have a patch completed to move the core of the fragment
support to kernel.bbclass, so any kernel could use it. So if you
aren't linux-yocto
and would like to test a patch, I could send it along.
Bruce
>
> Fan Zhang
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
--
"Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end"
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: How to config kernel in my own meta layer?
2017-12-21 15:32 How to config kernel in my own meta layer? Fan Zhang
2017-12-22 14:21 ` Bruce Ashfield
@ 2017-12-23 14:49 ` Patrick Ohly
1 sibling, 0 replies; 3+ messages in thread
From: Patrick Ohly @ 2017-12-23 14:49 UTC (permalink / raw)
To: Fan Zhang, yocto@yoctoproject.org
On Thu, 2017-12-21 at 10:32 -0500, Fan Zhang wrote:
> Greetings,
>
> I have a recipes that requires 128MB of CMA allocation for DMA. I
> followed the instruction in http://www.yoctoproject.org/docs/1.6/ker
> nel-dev/kernel-dev.html#changing-the-configuration and did the
> following:
>
> My recipes structure:
>
>
> meta-mylayer\recipes-my\uio-test\
>
> 1. Then in uio-test folder, I have uio-test.bb
>
[...]
> My question: I think the cfg file is being parsed because if I change
> the folder name files to something else, bitbake will complaint about
> not being able to find uio-test.cfg. However, the final .config in
> built do not have the CMA allocated.
I suspect there's a fundamental misunderstanding. Your uio-test.bb is a
separate recipe, and therefore its content has no effect whatsoever on
the kernel configuration.
The right place to add your "file://uio-test.cfg" is in a .bbappend for
the kernel that you are building. But as Bruce said, that kernel must
be derived from linux-yocto.
--
Best Regards, Patrick Ohly
The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-23 14:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-21 15:32 How to config kernel in my own meta layer? Fan Zhang
2017-12-22 14:21 ` Bruce Ashfield
2017-12-23 14:49 ` Patrick Ohly
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.