On 03/28/2018 12:27 PM, 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”

Do you have all of the CAN* Kconfig dependencies in your defconfig ?
If you don't, the kernel config subsystem will turn them off.

Also note that a 'defconfig' translates to a merge config run (yes,
even with just a defconfig) of 'allnoconfig', so that can also be
turning off dependencies if they were only valid via their default
and were not explicitly specified.

You can set KCONFIG_MODE="alldefconfig" in a linux-yocto bbappend to
change what mode merge-config uses.

Bruce



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 ?

Thanks

Vincent




--
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to