AnsweredAssumed Answered

Changing the Kernel configuration for i.MX6 SABRE

Question asked by Chris Hossack on Sep 24, 2015
Latest reply on Mar 26, 2018 by Kazuhito Inoue

Hi

I’m trying to change the default Kernel to include PCIe, but I’ve been having real problems trying to change the configuration used to build the kernel.

 

I can build a default kernel using the following steps (I’m using branch imx-3.10.53-1.1.0_ga)

 

$ mkdir fsl-release-bsp

$ cd fsl-release-bsp

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

$ repo sync

$ MACHINE=imx6qsabresd source fsl-setup-release.sh -b build-x11 -e x11

$ bitbake core-image-base

 

This image works fine. I can power up my Sabre platform.

 

But I now want to change the Kernel configuration to include PCIe, but it seems that the documented way (see “Task #5 - Kernel - The complete step by step to change the kernel configuration”) doesn’t work for me. Here are the steps from the document.

 

$ bitbake -c menuconfig linux-imx

(change anything)

$ cp tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.0.35-r33.10/git/.config ../sources/meta-fsl-arm/recipes-kernel/linux/linux-imx-3.0.35/mx6/defconfig

$ bitbake -c cleansstate linux-imx

$ bitbake fsl-image-gui

 

But I don’t have the correct paths for the “cp” command. My .config file is actually located in

 

./tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.10.53-r0/git/.config

 

So I would expect to find a matching folder in ../sources, but I don’t have a “../sources/meta-fsl-arm/recipes-kernel/linux/linux-imx-3.0.35” directory ;-(

The only directories I have at this level are

 

linux-fslc          linux-imx-2.6.35.3     linux-imx.inc                 linux-imx-rt_3.10.17.bb

linux-fslc_3.14.bb  linux-imx_2.6.35.3.bb  linux-imx-mfgtool-3.10.17     linux-mfgtool.inc

linux-fslc.inc      linux-imx-3.10.17      linux-imx-mfgtool_3.10.17.bb  linux-timesys-3.0.15

linux-imx           linux-imx_3.10.17.bb   linux-imx-rt-3.10.17          linux-timesys_3.0.15.bb

 

And I think (by looking at each sub-directory) that…

 

  • Linux-imx-2.6.35.3 is used for mx5, imx23evk, imx28evk
  • Linux-imx-3.10.17 is used for imx6

 

So I’ve tried copying .config to linux-imx-3.10.17/imx/defconfig and created new directories for linux-imx-3.10.53/imx/defconfig. Then I run

 

$ bitbake -c cleansstate linux-imx

$ bitbake linux-imx

 

Then I program my SD card and try to power up and test my PCIe changes. But while it does boot up, none of my Kernel changes are present. I test this by using lspci and also the following command

 

$ cat /proc/config.gz | gunzip | grep –i pci

 

I’ve looked at other pages and it seems that I’m not the only one having problems, eg

 

https://community.freescale.com/thread/360368

https://community.freescale.com/thread/372003

https://community.freescale.com/message/563729#563729

https://community.freescale.com/docs/DOC-95045

https://community.freescale.com/docs/DOC-100847

 

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

 

  • The cleansstate removes …/3.10.53-r0/git/.config (and a lot of others files).
  • Then menuconfig populates …/3.10.53-r0/git before running the terminal to allow changes.
  • The build process picks up the changed …/3.10.53-r0/git/.config and builds the Kernel.

 

While this system works I realize that I’m changing a file in the ./tmp directory, so it will be lost when I clean my build. I guess the advantage of copying it to the ../source directory is that I could then have my own git branch and keep track of my changes.

 

So I would like to know what exactly my “copy” command should be, eg

 

$ cp tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.10.53-r0/git/.config

<what should this be???>

 

Any help on changing the Kernel configurations correctly would be greatly appreciated.

 

Cheers

Chris

Outcomes