TipsAndTricks/LinuxKernelAndSDKs: Difference between revisions

From Yocto Project
Jump to navigationJump to search
No edit summary
No edit summary
 
Line 1: Line 1:
<strong> This is the start of what I hope becomes a longer article. This early stage is to answer a particular question. </strong> <br>
<strong> This is the start of what I hope becomes a longer article. This early stage is to answer a particular question. </strong> <br>
<span style="color:#FF0000"> Issue: Currently <code>make menuconfig</code> fails in the sdk. This is an active bug and can be tracked here: https://bugzilla.yoctoproject.org/show_bug.cgi?id=11155  </span>
<span style="color:#FF0000"> Issue: Currently <code>make menuconfig</code> fails in the sdk. This is an active bug and can be tracked here: https://bugzilla.yoctoproject.org/show_bug.cgi?id=11155  </span> You can work around this currently by running make menuconfig in a different bash shell from the one you sourced the sdk environment into.


== Kernel Building w/o Bitbake ==
== Kernel Building w/o Bitbake ==

Latest revision as of 21:39, 15 March 2017

This is the start of what I hope becomes a longer article. This early stage is to answer a particular question.
Issue: Currently make menuconfig fails in the sdk. This is an active bug and can be tracked here: https://bugzilla.yoctoproject.org/show_bug.cgi?id=11155 You can work around this currently by running make menuconfig in a different bash shell from the one you sourced the sdk environment into.

Kernel Building w/o Bitbake

Suppose you'd like to build a kernel but you don't care about having it packed into a wic image. Maybe you are loading the kernel on the command line in qemu, or maybe you are netbooting it. But, you'd like to use the Yocto toolchains to insure that it will work with an eventual Yocto image... How do you do that?

  • make the sdk or download it.
  • install the sdk $. poky-glibc-x86_64-core-image-sato-core2-64-toolchain-2.2.1.sh for example. Or, you could use the one you built.
    • Since we are focused on the kernel, the image that the toolchain was built for isn't important, we want to use the cross toolchains.
    • from here on, we'll assume you installed it into /opt/poky/2.2
  • source the environment for the sdk from a fresh shell (i.e. not from the shell that has all the bitbake variables set in it). $. /opt/poky/2.2/environment-setup-x86_64-poky-linux
  • then just do $ make bzImage in your kernel directory. The kernel Makefile respects the env variables that were set in the environment script your sourced.

But, I want the config that linux-yocto would use...

  • If you want to start with the config that linux-yocto would use, do $ bitbake -c kernel_configme linux-yocto
    • The resulting .config file will be somewhere like tmp/work/qemux86_64-poky-linux/linux-yocto/...
    • honestly, it's easier to do $ find . -name .config| grep linux-yocto
  • then just cp that .config file to your kernel tree and make like above. You should probably to a make oldconfig if you aren't using the linux-yocto kernel source itself.

Kernel Modules

  • Addressed Later