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…
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
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
已解决! 转到解答。
Hi,
So after bashing my head against a brick wall for weeks I’ve finally found a way to apply my .cfg file in my own layer. I’m not sure it’s the correct way, but it seems to work. Please let me know if there is a better way of doing it.
So repeating my initial steps I create an image based branch imx-3.10.53-1.1.0_ga.
$ mkdir fsl-release-bsp-3-10-53
$ cd fsl-release-bsp-3-10-53
$ 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. I now create my new layer called meta-fsl-pci
$ cd ../sources
$ yocto-layer create fsl-pci
Please enter the layer priority you'd like to use for the layer: [default: 6]
Would you like to have an example recipe created? (y/n) [default: n]
Would you like to have an example bbappend file created? (y/n) [default: n]
New layer created in meta-fsl-pci.
Don't forget to add it to your BBLAYERS (for details see meta-fsl-pci\README).
$ cd ../build-x11
I then update ./conf/bblayers.conf with my new layer.
BBLAYERS += " ${BSPDIR}/sources/meta-fsl-bsp-release/imx/meta-fsl-demos "
BBLAYERS += " ${BSPDIR}/sources/meta-fsl-pci "
BBLAYERS += " ${BSPDIR}/sources/meta-browser "
I verify this bit has worked by using the following command
$ bitbake-layers show-layers
layer path priority
==========================================================================
meta /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/poky/meta 5
meta-yocto /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/poky/meta-yocto 5
meta-oe /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-openembedded/meta-oe 6
meta-fsl-arm /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-fsl-arm 5
meta-fsl-arm-extra /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-fsl-arm-extra 4
meta-fsl-demos /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-fsl-demos 4
meta-fsl-arm /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-fsl-bsp-release/imx/meta-fsl-arm 0
meta-fsl-demos /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-fsl-bsp-release/imx/meta-fsl-demos 0
meta-fsl-pci /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-fsl-pci 6 <-- Here's my layer
meta-browser /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-browser 7
meta-gnome /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-openembedded/meta-gnome 7
meta-networking /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-openembedded/meta-networking 5
meta-ruby /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-openembedded/meta-ruby 7
meta-qt5 /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-qt5 7
meta-fsl-qt5 /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-fsl-bsp-release/imx/meta-fsl-qt5 0
meta-fsl-bluez /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-fsl-bsp-release/imx/meta-fsl-bluez 8
I now create a layer directory structure to support my PCI modifications to the kernel:
$ mkdir -p ../sources/meta-fsl-pci/recipes-kernel/linux/linux-imx
I now create my pci.cfg file.
$ bitbake linux-imx -c cleansstate
$ bitbake linux-imx -c menuconfig
<enable pci configurations>
$ bitbake linux-imx -c diffconfig
Config fragment has been dumped into:
/mnt/data/imx6/fsl-release-bsp-3-10-53/build-x11/tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.10.53-r0/fragment.cfg
NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn't need to be rerun and all succeeded.
Then copy to pci.cfg
cp /mnt/data/imx6/fsl-release-bsp-3-10-53/build-x11/tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.10.53-r0/fragment.cfg ../sources/meta-fsl-pci/recipes-kernel/linux/linux-imx/pci.cfg
I need to create a bbappend file that matches the following .bb file, eg
ls ../sources/meta-fsl-bsp-release/imx/meta-fsl-arm/recipes-kernel/linux/linux-imx_3.10.53.bb
I now create my bbappend file
vi ../sources/meta-fsl-pci/recipes-kernel/linux/linux-imx_3.10.53.bbappend
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://pci.cfg"
do_configure_append() {
#this is run from
#./tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.10.53-r0/git
cat ../*.cfg >> ${B}/.config
}
I then clean and rebuild
bitbake linux-imx -c cleansstate
bitbake core-image-base -c cleansstate
bitbake core-image-base
And my PCI configurations is now in my kernel ;-)
The trick to this solution is the do_configure_append() function which is called after the .config and .defconfig is copied across from imx_v7_defconfig in the following file
../sources/meta-fsl-bsp-release/imx/meta-fsl-arm/recipes-kernel/linux/linux-imx_3.10.53.bb
do_configure_prepend() {
# copy latest defconfig for imx_v7_defoonfig to use
cp ${S}/arch/arm/configs/imx_v7_defconfig ${S}/.config
cp ${S}/arch/arm/configs/imx_v7_defconfig ${S}/../defconfig
}
I think Yocto does use my pci.cfg to generate .config, but the above lines then splats over this file. So I then concatenate any *.cfg files to the end of the splatted .config, and it seems to work. But I’m not proud of this hack ;-(
Note: The order of the configuration options in the .config file are important. The later ones in the file overrides any previous values.
Cheers
Chris
PS unless anybody can give me a better answer than this I'll mark this as the correct answer next week.
Hello Chris and everyone reading this post,
The post is a bit old but still true today, so I post an answer. I try to achieve the same goal Chris, I have tried your solution with "cat ../*.cfg", that's working well ... EXCEPT that when I run menuconfig again and then diffconfig, a fragment is generated which is the result of all fragments applied.
When using linux-yocto, each fragment is integrated to the configuration and only the NEW modifications made during menuconfig are reported in the diffconfig result. This permit to create several fragments easily.
Anyone can confirm this problem with the solution proposed by Chris ?
Anyone found a better solution ? I have personally tried to create my own recipe to build linux-imx, including linux-yocto except of linux-imx, but it fails to compile and with plethora of errors..... I wonder if the solution can be to include only some part of the kernel-yocto class... not sure of the quantity of work to do for that....
Regards,
Joel
Joel,
I try to stick to only having one fragment applied. You're right that the diffconfig produces a report of all changes, especially if you're running on a kernel where menu-config patches are already being applied.
My solution is to only have one config delta patch file. If I change my config, I run diffconfig and get the fragment generated. Then I compare it to my last one to make sure only what I expect to change has changed. This is easy using git when I replace my old file. Then the old file is in effect overwritten (although its still in my git history). Only the new file is used going forward when I bitbake my kernel next time.
Hope that helps!
Thanks for your confirmation.
I understand your method. This is working but limiting the possibilities for example when you use several layers or if some fragments should be applied only for some specific machines or features (configuration of drivers, etc).
I just looked at "kernel-yocto.bbclass" code, and will try to port some parts of the code to my linux-imx recipe.
Joel
Hi all!
Finally created my own recipe that "require recipes-kernel/linux/linux-yocto.inc":
Own defconfig and support of fragments, warrior branch, no use of Freescale BSP, just clone poky and meta-openembedded. Simple and efficient.
DESCRIPTION = "Linux Kernel for SoMLabs boards"
SECTION = "kernel"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"COMPATIBLE_MACHINE = "sls16y2_792c_512r_512n_1wb"
require recipes-kernel/linux/linux-yocto.inc
DEPENDS += "lzop-native bc-native"
SRCBRANCH = "imx_4.9.123_imx8mm_ga"
LOCALVERSION = "-imx"
SRCREV = "6a71cbc089755afd6a86c005c22a1af6eab24a70"SRC_URI += " \
git://source.codeaurora.org/external/imx/linux-imx;protocol=git;branch=${SRCBRANCH} \
file://sls16y2_792c_512r_512n_1wb.dts \
file://defconfig \
"LINUX_VERSION ?= "4.9.123"
PV = "${LINUX_VERSION}+git${SRCPV}"S = "${WORKDIR}/git"
# Copy the right dts after unpack of the sources
python do_copydts () {
import shutil
src = ("%s/%s.dts" % (d.getVar('WORKDIR'), d.getVar('MACHINE')))
dst = ("%s/arch/%s/boot/dts/%s" % (d.getVar('S'), d.getVar('ARCH'), d.getVar('KERNEL_DEVICETREE').replace('dtb', 'dts')))
shutil.copy2(src, dst)
}
addtask do_copydts after do_unpack before do_patch
Joel
Hello Chris,
To my understanding if you are creating a layer and you want to override the default defconfig, you may need to use your own machine configuration which is similar to the one imx6 has.
It depends on SOC_FAMILY as i see, if you can override SOC family, your configuration will be used.
comment SOC_FAMILY = "MX6|MX7"
Then check and let me know.
Chris,
You are a genius my friend. I've been trying to figure out exactly the same thing (for exactly the same reason - to get PCIe into the iMX6 Linux) for about a week now. Been playing around with menuconfig and could not get it to stick. Then I found your thread. As an application developer I want to get into making it work, I don't want to spend a lifetime learning how to use bitbake. So your hard-won answer to your own question has just saved me a similar amount of time.
Anyway, my reason to post is that I have just followed your instructions with the 4.1.15-1.0.0_ga branch from git://git.freescale.com/imx/fsl-arm-yocto-bsp.git. I did not find any problems or major differences. The only minor query I had was about the fact that the .config file is now in the Linux-imx/4.1.15-r0/build folder rather than the /git folder. But it all seems to work as advertised.
Also, to clarity for anyone else, I didn't get why you mentioned the sources/meta-fsl-bsp-release/imx/meta-fsl-arm/recipes-kernel/linux/linux-imx_3.10.53.bb file. Eventually I realised you are just showing us the naming convention to use for the .bbappend file.
Anyway, not finally fully tested, but I can see in the build/drivers folder there is a pci sub-folder and all the expected object files contained within it. So looks like its all worked as expected.
Hi,
So after bashing my head against a brick wall for weeks I’ve finally found a way to apply my .cfg file in my own layer. I’m not sure it’s the correct way, but it seems to work. Please let me know if there is a better way of doing it.
So repeating my initial steps I create an image based branch imx-3.10.53-1.1.0_ga.
$ mkdir fsl-release-bsp-3-10-53
$ cd fsl-release-bsp-3-10-53
$ 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. I now create my new layer called meta-fsl-pci
$ cd ../sources
$ yocto-layer create fsl-pci
Please enter the layer priority you'd like to use for the layer: [default: 6]
Would you like to have an example recipe created? (y/n) [default: n]
Would you like to have an example bbappend file created? (y/n) [default: n]
New layer created in meta-fsl-pci.
Don't forget to add it to your BBLAYERS (for details see meta-fsl-pci\README).
$ cd ../build-x11
I then update ./conf/bblayers.conf with my new layer.
BBLAYERS += " ${BSPDIR}/sources/meta-fsl-bsp-release/imx/meta-fsl-demos "
BBLAYERS += " ${BSPDIR}/sources/meta-fsl-pci "
BBLAYERS += " ${BSPDIR}/sources/meta-browser "
I verify this bit has worked by using the following command
$ bitbake-layers show-layers
layer path priority
==========================================================================
meta /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/poky/meta 5
meta-yocto /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/poky/meta-yocto 5
meta-oe /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-openembedded/meta-oe 6
meta-fsl-arm /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-fsl-arm 5
meta-fsl-arm-extra /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-fsl-arm-extra 4
meta-fsl-demos /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-fsl-demos 4
meta-fsl-arm /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-fsl-bsp-release/imx/meta-fsl-arm 0
meta-fsl-demos /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-fsl-bsp-release/imx/meta-fsl-demos 0
meta-fsl-pci /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-fsl-pci 6 <-- Here's my layer
meta-browser /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-browser 7
meta-gnome /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-openembedded/meta-gnome 7
meta-networking /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-openembedded/meta-networking 5
meta-ruby /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-openembedded/meta-ruby 7
meta-qt5 /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-qt5 7
meta-fsl-qt5 /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-fsl-bsp-release/imx/meta-fsl-qt5 0
meta-fsl-bluez /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-fsl-bsp-release/imx/meta-fsl-bluez 8
I now create a layer directory structure to support my PCI modifications to the kernel:
$ mkdir -p ../sources/meta-fsl-pci/recipes-kernel/linux/linux-imx
I now create my pci.cfg file.
$ bitbake linux-imx -c cleansstate
$ bitbake linux-imx -c menuconfig
<enable pci configurations>
$ bitbake linux-imx -c diffconfig
Config fragment has been dumped into:
/mnt/data/imx6/fsl-release-bsp-3-10-53/build-x11/tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.10.53-r0/fragment.cfg
NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn't need to be rerun and all succeeded.
Then copy to pci.cfg
cp /mnt/data/imx6/fsl-release-bsp-3-10-53/build-x11/tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.10.53-r0/fragment.cfg ../sources/meta-fsl-pci/recipes-kernel/linux/linux-imx/pci.cfg
I need to create a bbappend file that matches the following .bb file, eg
ls ../sources/meta-fsl-bsp-release/imx/meta-fsl-arm/recipes-kernel/linux/linux-imx_3.10.53.bb
I now create my bbappend file
vi ../sources/meta-fsl-pci/recipes-kernel/linux/linux-imx_3.10.53.bbappend
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://pci.cfg"
do_configure_append() {
#this is run from
#./tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.10.53-r0/git
cat ../*.cfg >> ${B}/.config
}
I then clean and rebuild
bitbake linux-imx -c cleansstate
bitbake core-image-base -c cleansstate
bitbake core-image-base
And my PCI configurations is now in my kernel ;-)
The trick to this solution is the do_configure_append() function which is called after the .config and .defconfig is copied across from imx_v7_defconfig in the following file
../sources/meta-fsl-bsp-release/imx/meta-fsl-arm/recipes-kernel/linux/linux-imx_3.10.53.bb
do_configure_prepend() {
# copy latest defconfig for imx_v7_defoonfig to use
cp ${S}/arch/arm/configs/imx_v7_defconfig ${S}/.config
cp ${S}/arch/arm/configs/imx_v7_defconfig ${S}/../defconfig
}
I think Yocto does use my pci.cfg to generate .config, but the above lines then splats over this file. So I then concatenate any *.cfg files to the end of the splatted .config, and it seems to work. But I’m not proud of this hack ;-(
Note: The order of the configuration options in the .config file are important. The later ones in the file overrides any previous values.
Cheers
Chris
PS unless anybody can give me a better answer than this I'll mark this as the correct answer next week.
Hello Chris,
Thank you for posting your investigation. This info still works for i.mx8mqevk even in March 2018.
This is the place where the kernel config is replaced in my context.
I concatenated .config at do_configure_append() in my layer like you. And it worked.
Hi,
So after getting some very good responses I decided to create my own layer and change the kernel configurations the correct way (well, I think so anyway…)
So repeating my initial steps I create a image based branch imx-3.10.53-1.1.0_ga.
$ mkdir fsl-release-bsp-3-10-53
$ cd fsl-release-bsp-3-10-53
$ 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.
I now create my new layer called meta-fsl-pci
cd ../source
$ yocto-layer create fsl-pci
Please enter the layer priority you'd like to use for the layer: [default: 6]
Would you like to have an example recipe created? (y/n) [default: n] y
Please enter the name you'd like to use for your example recipe: [default: example]
Would you like to have an example bbappend file created? (y/n) [default: n] y
Please enter the name you'd like to use for your bbappend file: [default: example]
Please enter the version number you'd like to use for your bbappend file (this should match the recipe you're appending to): [default: 0.1]
New layer created in meta-fsl-pci.
Don't forget to add it to your BBLAYERS (for details see meta-fsl-pci\README).
cd ../build-x11
Any comments?
I then update ./conf/bblayers.conf with my new layer.
BBLAYERS += " ${BSPDIR}/sources/meta-fsl-bsp-release/imx/meta-fsl-demos "
BBLAYERS += " ${BSPDIR}/sources/meta-fsl-pci "
BBLAYERS += " ${BSPDIR}/sources/meta-browser "
I verify this bit has worked by using the following command
bitbake-layers show-layers
layer path priority
==========================================================================
meta /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/poky/meta 5
meta-yocto /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/poky/meta-yocto 5
meta-oe /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-openembedded/meta-oe 6
meta-fsl-arm /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-fsl-arm 5
meta-fsl-arm-extra /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-fsl-arm-extra 4
meta-fsl-demos /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-fsl-demos 4
meta-fsl-arm /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-fsl-bsp-release/imx/meta-fsl-arm 0
meta-fsl-demos /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-fsl-bsp-release/imx/meta-fsl-demos 0
meta-fsl-pci /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-fsl-pci 6 <-- Here's my layer
meta-browser /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-browser 7
meta-gnome /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-openembedded/meta-gnome 7
meta-networking /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-openembedded/meta-networking 5
meta-ruby /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-openembedded/meta-ruby 7
meta-qt5 /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-qt5 7
meta-fsl-qt5 /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-fsl-bsp-release/imx/meta-fsl-qt5 0
meta-fsl-bluez /mnt/data/imx6/fsl-release-bsp-3-10-53/sources/meta-fsl-bsp-release/imx/meta-fsl-bluez 8
I now create a layer directory structure to support my PCI modifications to the kernel:
mkdir -p ../sources/meta-fsl-pci/recipes-kernel/linux/linux-imx
I now create my linux-imx_3.10.17.bbappend that matches the path in meta-fsl-arm, eg
ls ../sources/meta-fsl-arm/recipes-kernel/linux/linux-imx-3.10.17
cat ../sources/meta-fsl-pci/recipes-kernel/linux/linux-imx_3.10.17.bbappend
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://pci.cfg"
I think "${THISDIR}/${PN}:" expands out to ../sources/meta-fsl-pci/recipes-kernel/linux/linux-imx
I now create my pci.cfg file.
bitbake linux-imx -c cleansstate
bitbake linux-imx -c menuconfig
<enable pci configurations>
bitbake linux-imx -c diffconfig
Config fragment has been dumped into:
/mnt/data/imx6/fsl-release-bsp-3-10-53/build-x11/tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.10.53-r0/fragment.cfg
NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn't need to be rerun and all succeeded.
Then copy to pci.cfg
cp /mnt/data/imx6/fsl-release-bsp-3-10-53/build-x11/tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/3.10.53-r0/fragment.cfg ../sources/meta-fsl-pci/recipes-kernel/linux/linux-imx/pci.cfg
I then clean and rebuild
bitbake linux-imx -c cleansstate (do I need to do this or is Yocoto clever enough)
bitbake linux-imx
But when I power up with the new image my PCI configurations changes are missing ;-(
Can anybody please tell me what I'm doing wrong.
Cheers
Chris
Hi Chris,
I am suffering the same issue now. No matter where the defconfig/.cfig is located. Kernel .config file has never updated according to defconfig/.cfg with command "bitbake -c compile -f linux-imx". Do you solve the problem?
I also find some information from Yocto Project Linux Kernel Development Manual . But these steps don't work on my environment either.
Cheers,
Matt
Hi,
I haven't solved this problem yet either ;-(
I've read most of the manuals that describe how to do this, but with no luck. I'm sure its easy once you know how, but nobody has told me.
I'm still working on this and I'll post my answer, if I find one.
If you manage to work it out please let me know.
cheers
Chris
Hi Chris
You have to create your custom layer. Create your patched with respect to kernel.
If you have added your custom defconfig file name like "mydefconfig"
than add following to your local.config file.
FSL_KERNEL_DEFCONFIG = "mydefconfig"
Thanks
Saurabh
Hi Saurabh,
I'd followed your suggestion to do the test but fail. Just wondering where to put the "mydefconfig"? Currently, I put "mydefconfig" in $(yocto)/sources/meta-mylayer/recipes-linux/linux/linux-imx-3.10.53/. Should I move it to somewhere else?
Cheers,
Matt
Hi Shiuan
You must first generate patch for your defconfig.
Put that patch in your layer.
Run Bitbake linux-imx.
Verify your defconfig is available in yocto build kernel. If yes than you need to update the local.config file.
and build again.
Hi Saurabh,
thank you for your help with this. Since you seem to know what you are doing could you please create a new layer with a single kernel config line change in a .cfg file and post the new layer files. There should only be a couple of files and maybe you will see something that Matt and I are missing when we do it. I know it's cheeky of me to ask but rather than us keep trying things based on your suggestions you could create a working layer in 5 minutes ;-)
I'll then write up a nice post explaining what you have done for the next people who have the same problem.
If you don't want to do this I'll totally understand.
cheers
Chris
Hi Saurabh,
Thanks for your information, I did generate defconfig/mytest.cfg, put it into my layer and run "bitbake -c compile -f linux-imx" again. But the defconfig is not copy to git/.config. Where I also observed that mytest.cfg and defconfig are all copy to the working directory. I can patch mytest.cfg manually by "scripts/kconfig/merge_config.sh", but Yocto didn't patch anything.
BR,
Matthew
Hi Saurabh,
defconfig didn't copy to .git/arch/arm/configs/mydefconfig. After "bitbake -c compile -f linux-imx", ${S}/../defconfig is replaced by imx_v7_defconfig which is instructed by the following code snippet in sources/meta-fsl-bsp-release/imx/meta-fsl-arm/recipes-kernel/linux/linux-imx_3.10.53.bb. I wonder if I have to add some code snippet, like "do_configure_prepend()", to my linux-imx_3.10.53.bbappend.
do_configure_prepend() {
# copy latest defconfig for imx_v7_defoonfig to use
cp ${S}/arch/arm/configs/imx_v7_defconfig ${S}/.config
cp ${S}/arch/arm/configs/imx_v7_defconfig ${S}/../defconfig
}
Cheers,
Matt