Kernel config file used by Yocto

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Kernel config file used by Yocto

Jump to solution
32,753 Views
dhavalvadhar
Contributor IV

Hello,

I able to configure the Ubuntu machine and build the images using Yocto. But now I would like to modify the kernel configuration and build the kernel with that configuration. I read somewhere that Yocto uses the kernel configuration file "<build_dir>/../sources/meta-fsl-arm/recipes-kernel/linux/linux-imx-3.10.17/mx6/defconfig". But the linux kernel version is 3.14.28. Then how come the Yocto build uses the configuration file of linux kernel v3.10.17.

Please help me to understand this.

Appreciate your quick reply.

Thanks,

Dhaval

Labels (1)
1 Solution
12,465 Views
chrishossack
Contributor III

Hi Khang,

I've started another post about this subject and described my work around for this on the following thread

Changing the Kernel configuration for i.MX6 SABRE

The only way I found to change my Kernel that works is to run the following commands in this particular order.

$ bitbake linux-imx -c cleansstate
$ bitbake linux-imx -c menuconfig

(change anything)

$ bitbake linux-imx

But this changes the ./tmp rather than ../source, so changes are easily lost.

Cheers

Chris

View solution in original post

24 Replies
12,350 Views
chrishossack
Contributor III

Hi,

I'm having the same problem. Could you sum up what commands you ran to change the kernel and then rebuild it please.

cheers

Chris

0 Kudos
12,350 Views
khangbui
Contributor II

Hi,

I'm also having the same problems... would love a resolution on this issue.

0 Kudos
12,466 Views
chrishossack
Contributor III

Hi Khang,

I've started another post about this subject and described my work around for this on the following thread

Changing the Kernel configuration for i.MX6 SABRE

The only way I found to change my Kernel that works is to run the following commands in this particular order.

$ bitbake linux-imx -c cleansstate
$ bitbake linux-imx -c menuconfig

(change anything)

$ bitbake linux-imx

But this changes the ./tmp rather than ../source, so changes are easily lost.

Cheers

Chris

12,318 Views
kaustubhj
Contributor I

hi Chris,

I really appreciate the detail steps and analysis. Still I am facing issue.

After executing last step

$ bitbake linux-imx

How to pick up the latest configured changed into kernel. I guess `tmp/deploy/images/imx6qsabresd/` should get updated.

please guide.

Br,

kaustubh

0 Kudos
12,318 Views
chrishossack
Contributor III

Hi Kaustubh,

when you run the "-c cleansstate" you will find all of the files in tmp/deploy/images/imx6qsabresd/ are removed. Then by running "-c menuconfig" and building again it seems to regenerate all of these files with your kernel changes in.

This means you can use tmp/deploy/images/imx6qsabresd/core-image-base-imx6qsabresd.sdcard  (eg for bitbake core_image_base) to program your sdcard.

After you boot up you can verify your kernel options by using (if CONFIG_IKCONFIG and CONFIG_IKCONFIG_PROC are set, but these seem to be disabled in the latest release, eg 3.14.38)

$ cat /proc/config.gz | gunzip

cheers

Chris

12,318 Views
kaustubhj
Contributor I

Thanks chris,

It worked !

It has updated uimage in tmp/deploy/images/../ folder.

modules-.xxx.tgz also got updated modules i think. So on board using SD card I am able to change kernel uImage.

Could you please tell where to copy on board these modules ?

br,

kdj

12,318 Views
chrishossack
Contributor III

Hi kdj,

I'm a bit of a newbie as well. What are these modules-.xxx.tgz? I haven't seem them before, what are you trying to do?

If you look at Changing the Kernel configuration for i.MX6 SABRE  you will see Surabh posted a comment with a link to a tutorial

https://community.freescale.com/servlet/JiveServlet/previewBody/95096-102-10-7847/yocto_tutorial.pdf

I'm planning to work through it next week. So hopefully I'll know more then. It might be worth posting all future comments to the other discussion.

cheers

Chris

0 Kudos
12,352 Views
saurabh206
Senior Contributor III

Hi

Dhaval

You can select imx-3.14.28-1.0.0_ga

repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-3.14.28-1.0.0_ga

Or you can use the

PREFERRED_VERSION_linux-imx_mx6 = "3.14.28"

0 Kudos
12,352 Views
dhavalvadhar
Contributor IV

Hi Saurabh,

Thanks for your quick reply!

Actually, I followed the Freescake Yocto Project User's Guide available in the documentation of "fsl-yocto-3.14.28-1.0.0". I sync the repo mentioned in that document. Now as you mentioned to sync with different repo. Then do I need to remove the old repo? It would be really great if you can elaborate the options you have suggested.

I want to know how to build the kernel again after changing it's configuration using Yocto.

Thanks,

Dhaval

0 Kudos
12,354 Views
dhavalvadhar
Contributor IV

Hi,

Can someone please help me here?

Thanks,

Dhaval

0 Kudos
12,354 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Dhaval Vadhar,

Would you please confirm which repo were you using?

In case you switch repo you should just change the repo and run a sync. However, I would recommend using a new directory in case you will jump to a new kernel version.

There is a simple buy good document on how to change the kernel configuration on the following link, perhaps it will help.

Yocto Training - Task #5

0 Kudos
12,350 Views
dhavalvadhar
Contributor IV

Hi,

Thanks for your help!

As I said before, I was following Freescale Yocto Project User's Guide from 'fsl-yocto-3.14.28-1.0.0' documentation. Thus I have used following command to sync with the repo:

$ repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-3.14.28-1.0.0_ga

$ repo sync

I also read the Yocto Training Task #5. According to that to change the kernel configuration I need to replace the 'defconfig' file from "meta-fsl-arm/receipes-kernel/linux/linux-imx-<kernel version>/mx6". Now in my case, the 'kernel version' should be '3.14.28', but that directory doesn't exist. Instead directory 'linux-imx-3.10.17/mx6' is exist.

Thus I am getting little confused, how to change the kernel configuration and then built it using 'bitbake linux-imx' command. Please help me for the same.

Appreciate your quick reply!

Thanks,

Dhaval

0 Kudos
12,350 Views
saurabh206
Senior Contributor III

Hi

Dhaval

Please use following in local.conf to build 3.14.28 kernel.

PREFERRED_VERSION_linux-imx_mx6 = "3.14.28"

Thanks

Saurabh

0 Kudos
12,350 Views
dhavalvadhar
Contributor IV

Hi Saurabh,

Thanks for quick response!

I am able to build the linux kernel using 'bitbake linux-imx' command. But my question is how to build the kernel after changing the configuration?

Thanks,

Dhaval

0 Kudos
12,350 Views
saurabh206
Senior Contributor III

Hi

Dhaval

Please go through the attached Yocto tutorial.

0 Kudos
12,350 Views
dhavalvadhar
Contributor IV

Hi Saurabh,

Thanks once again for your reply!

That tutorial was really good. But it hasn't answered my question.

Thanks,

Dhaval

0 Kudos
12,350 Views
BiyongSUN
NXP Employee
NXP Employee

bitbake linux-imx -c menuconfig

linux-imx_3.14.28.bb

do_configure_prepend() {

# copy latest defconfig for imx_v7_defconfig  to use

   cp ${S}/arch/arm/configs/imx_v7_defconfig  ${S}/.config

   cp ${S}/arch/arm/configs/imx_v7_defconfig  ${S}/../defconfig

fi

}

0 Kudos
12,350 Views
dhavalvadhar
Contributor IV

Hi Biyong,

Thanks for your reply!

As you suggested, I need to add the do_configure_prepend() function in linux-imx_3.14.28.bb file. But that file is not exist.

So do I need to create it? If yes, what else I need to add into that file?

Thanks,

Dhaval

0 Kudos
12,350 Views
BiyongSUN
NXP Employee
NXP Employee

linux-imx_3.14.28.bb is just take 3.14.28 release as example.

What is your BSP version?

Like 3.10.53, you can find

fsl-release-bsp/sources/meta-fsl-bsp-release/imx/meta-fsl-arm/recipes-kernel/linux/linux-imx_3.10.53.bb

0 Kudos
12,350 Views
dhavalvadhar
Contributor IV

BSP Version is : 3.14.28

But the sources directory, sources/meta-fsl-arm/recipes-kernel/linux, doesn't have any directory/.bb file for linux version 3.14.28. Instead it has directory and .bb file for 3.10.17.

So do I need to create the .bb file for 3.14.28 manually?

0 Kudos