How to use customized defconfig in Colibri imx6ull

I want to change the kernel config.
I ran the following to create fragment.cfg.
$ bitbake virtual/kernel -c menuconfig
$ bitbake virtual/kernel -c diffconfig

Please tell me how to make a recipe to reflect this.
Or provide a sample recipe.

Dear @C.T, welcome to the Toradex Community.

We have information here on how to modify the kernel configuration in Yocto:

Let us know if you need further help.

Kind regards,

I created the following configuration.

├── conf
│   └── layer.conf
└── recipes-kernel
    └── linux
        ├── linux-toradex
        │   └── fragment.cfg
        └── linux-toradex_%.bbappend

The bbappend file is described as follows.

SRC_URI_append += "\

do_configure_append() {
cat …/*cfg >> ${B}/.config


bitbake -b meta-customer/recipes-kernel/linux/linux-toradex_%.bbappend 


ERROR: Command execution failed: Traceback (most recent call last):
  File "/home/****/work/yocto/test/layers/openembedded-core/bitbake/lib/bb/", line 106, in runAsyncCommand
    commandmethod(self.cmds_async, self, options)
  File "/home/****/work/yocto/test/layers/openembedded-core/bitbake/lib/bb/", line 550, in buildFile
    command.cooker.buildFile(bfile, task)
  File "/home/****/work/yocto/test/layers/openembedded-core/bitbake/lib/bb/", line 1301, in buildFile
    self.buildFileInternal(buildfile, task)
  File "/home/****/work/yocto/test/layers/openembedded-core/bitbake/lib/bb/", line 1326, in buildFileInternal
    infos = bb_cache.parse(fn, self.collection.get_file_appends(fn))
  File "/home/****/work/yocto/test/layers/openembedded-core/bitbake/lib/bb/", line 485, in parse
    datastores = self.load_bbfile(filename, appends)
  File "/home/****/work/yocto/test/layers/openembedded-core/bitbake/lib/bb/", line 341, in load_bbfile
    datastores = parse_recipe(bb_data, bbfile, appends)
  File "/home/****/work/yocto/test/layers/openembedded-core/bitbake/lib/bb/", line 300, in parse_recipe
    bb_data = bb.parse.handle(bbfile, bb_data)
  File "/home/****/work/yocto/test/layers/openembedded-core/bitbake/lib/bb/parse/", line 108, in handle
    raise ParseError("not a BitBake file", fn)
bb.parse.ParseError: ParseError in /home/****/work/yocto/test/layers/meta-customer/recipes-kernel/linux/linux-toradex_%.bbappend: not a BitBake file


・Why do you get such an error?
・Is the bbapend file correct?

Hi @C.T, thanks for the details.

You cannot build a bbappend, only a bb file.

To build the kernel, you should use the following:

bitbake virtual/kernel

Please note the error message mentions that this is not a Bitbake file:

raise ParseError("not a BitBake file", fn)
 bb.parse.ParseError: ParseError in /home/****/work/yocto/test/layers/meta-customer/recipes-kernel/linux/linux-toradex_%.bbappend: not a BitBake file 

The bbappend looks good by itself

I executed as below.
bitbake virtual/kernel

Can you confirm this change?(no Actual machine)

I understand that you added the content of fragment.cfg: What are the changes there? I checked the question but didn’t see it here.

In any case, testing would take a long time since we would have to recompile it here with your changes changes but you can do several things to test this without the machine:

  1. Check/Add changes with bitbake -c menuconfig virtual/kernel.
  2. Change the config and see if the kernel is recompiled. In this case, it is very likely that the changes are added.

Let us know how this goes and if it doesn’t show the changes, please post the changes and we will check.

Kind regards,

test fragment.cfg (change CONFIG_COUNTER=y)


Revert the changes for confirmation.

bitbake -c menuconfig virtual/kernel



bitbake virtual/kernel


bitbake -c menuconfig virtual/kernel


meta-toradex-demos includes fstab.
Is it related?

Sorry for the delay. Could be that the prepend is not done correctly

Please try the supported method of creating a patch file like described here:

For this,

  1. Copy the kernel under tmp/work-shared/colibri-imx6ull/kernel-source/ in another folder.
  2. Make your changes to the defconfig/kernel on arch/arm/configs/colibri-imx6ull_defconfig
  3. Create a patch with “git diff HEAD > mypatch.patch”.
  4. Add this to the kernel recipe as SRC_URI like in the documentation.