How to do it...

Once we have a default configuration, we will want to make modifications to it. The recommended way to change the Linux kernel configuration is using the Linux kernel build system with a Yocto SDK:

  1. First let's find the upstream Git repository by sourcing the environment setup script and using BitBake:
$ bitbake -e virtual/kernel | grep ^SRC_URI=
SRC_URI="git://github.com/wandboard-org/linux.git;branch=4.1-2.0.x-imx            file://defconfig  file://0001-01_02-Add-a-custom-device-tree-and-configuration.patch"  
  1. Clone the Linux kernel source from its upstream repository:
$ cd /opt/yocto/
$ git clone  https://github.com/wandboard-org/linux.git linux-wandboard
$ cd linux-wandboard  
The git clone command shown previously replaces the git:// prefix with the https:// prefix that was specified via the protocol argument in the SRC_URI shown previously.
  1. Next, check out the branch specified in the SRC_URI:
$ git checkout -b 4.1-2.0.x-imx origin/4.1-2.0.x-imx    
  1. Copy the configuration from the meta-bsp-custom layer to the kernel source:
$ cp /opt/yocto/fsl-community-bsp/sources/meta-bsp-custom/recipes-kernel/linux/linux-wandboard-4.1-2.0.x/wandboard-custom/defconfig arch/arm/configs/wandboard_defconfig
  1. Then configure it with the default Wandboard configuration:
$ make ARCH=arm wandboard_defconfig
  1. To bring out a graphical configuration tool to modify the configuration, run the following command:
$ make ARCH=arm xconfig  
If you encounter compilation errors, attempt to run from a new Terminal that has not had the environment configured with the Yocto setup environment scripts.
Also, make sure you have installed all the dependencies listed in Chapter 1, The Build System.
  1. A new window will open with the graphical configuration user interface:
Linux kernel x11 graphical configuration
Note that we haven't used the environment setup script. This is because it's enough with the standard utilities on the host to build the different configuration tools.
  1. When you save your changes, the .config file will be updated.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset