All of lore.kernel.org
 help / color / mirror / Atom feed
* 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

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.