From Yocto Project
Jump to: navigation, search

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: 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 $. 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
Personal tools