[yocto] defconfig file (or fragment files) not used

Vincent Daanen vincent.daanen at orthotaxy.com
Thu Mar 29 03:42:43 PDT 2018


Hi,

What’s the difference between fragment and patch ?
I can easily make a patch but how do I make sure the patch will be applied to the .config file ?

Thanks for your help

Vincent

De : Prakash Ks <prakashpks15 at gmail.com>
Envoyé : jeudi 29 mars 2018 11:46
À : Khem Raj <raj.khem at gmail.com>
Cc : Vincent Daanen <vincent.daanen at orthotaxy.com>; yocto at yoctoproject.org
Objet : Re: [yocto] defconfig file (or fragment files) not used

Hi Vincent,

Its better to create patch and apply from platform specific kernel recipes.
if you need more info let me know.
Thanks!
Prakash

On Thu, Mar 29, 2018 at 1:55 PM, Khem Raj <raj.khem at gmail.com<mailto:raj.khem at gmail.com>> wrote:


On 3/28/18 11:00 PM, Vincent Daanen wrote:
On 3/28/18 9:27 AM, Vincent Daanen wrote:
Hi,

I want to add CAN driver support to the kernel. Here is the procedure
I
followed:

  1. Generate a .config file
  2. Copy it to meta-myWork/recipes-kernel/linux/files/defconfig
  3. Update it: set at the end the config to enable CAN as follows

# CAN Bus

CONFIG_NET=y

CONFIG_CAN=y

CONFIG_CAN_RAW=y

CONFIG_CAN_BCM=y

CONFIG_CAN_GW=y

#

# CAN Device Drivers

#

CONFIG_CAN_VCAN=y

# CONFIG_CAN_SLCAN is not set

CONFIG_CAN_DEV=y

# CONFIG_CAN_CALC_BITTIMING is not set

# CONFIG_CAN_LEDS is not set

# CONFIG_CAN_SJA1000 is not set

  4. Update the linux-yocto_%.bbappend file as follows

SUMMARY = "Recipe to configure kernel as required"

LICENSE = "CLOSED"

inherit kernel-yocto

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

SRC_URI += file://defconfig

  5. Request rebuilt:

bitbake linux-yocto-rt -c cleansstate

bitbake -k linux-yocto-rt

Once the image started (with qemu), I check if the CAN is enabled
(using zcat /proc/config.gz | grep CAN) and I always get “CAN not set”

I also tried using fragment and I got the same result ☹

According the user manual, it seems to me I’m doing the right think!

Does someone know why my defconfig file is not taken into account ?

If you are using linux-yocto for your kernel provider then I wouldr recommend that you look into developer manual.

you should look into using config fragments to modify the needed
options e.g. see
https://www.yoctoproject.org/docs/latest/kernel-dev/kernel-dev.html#cha
nging-the-configuration

I don't understand what you mean. That's what I'm doing. I followed the procedure described in the link you provide... Can u explain ?

Create a file for config fragment say can.cfg and put all options you want to change in that file and then add that to SRC_URI
you dont need to create full defconfig.

Thanks

Vincent
--
_______________________________________________
yocto mailing list
yocto at yoctoproject.org<mailto:yocto at yoctoproject.org>
https://lists.yoctoproject.org/listinfo/yocto



--
Thanks and Regards,
Prakash K S
+91 9620140303
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20180329/696e7490/attachment.html>


More information about the yocto mailing list