8 Replies Latest reply on Jul 4, 2016 2:12 PM by Intel Corporation

    Customizing Kernel


      I've been trying to customize the kernel on the latest release (release 3.0 of Yocto sources) and am stumbling on where to copy the .config file.  The i386_edison_defconfig seemed to be the logical place from what I gleaned from the recipes, however when I issue the bitbake edison-image following overwriting the i386_edison_defconfig it tell me that it has nothing to do...


      All of the documents that I have found make reference to outdated directory structures so a link to the updated document (that makes reference to the linux-externalsrc portion of the tree) or any guidance would be greatly appreciated.  To be clear, I am able to generate the new .config correctly, the question is simply where I should put it and/or which bitbake incantation I should use to get it to rebuild the kernel with the driver I need to add.


      Any help / guidance  would be greatly appreciated.

        • 1. Re: Customizing Kernel
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hello mpapini,

          Let me try to do some tests and see if I can replicate this behavior. I will get bac to you as soon as as I can.


          • 2. Re: Customizing Kernel



            Using Alex's guide for galileo I was able to build the driver module, however, the driver won't install since it says that the module dep of "kernel-3.10.17-poky-edison+" can't be satisfied ... and in fact a "uname -r" shows "3-10.17-yocto-standard" so now I have the issue that somewhere the kernel names get crossed.


            To facilitate you reconstructing my chaos here's what I did ...


            1) Download latest iot tarball and extract

            2) ran setup.sh with dl & sstate directories

            3) cd to directory that the script tells me to ...

            4) source poky/oe-init-build-env

            5) do a full bitbake (bitbake edison-image), which asides from the already known and resolved mqtt runs without a hitch.

            6) bitbake -c menuconfig linux-externalsrc

            7) mark driver as module and save config. (in my case the bq27x00)

            8) copy just the changed lines from i386_edison_defconfig

            9) force a recompile of linux-externalsrc (bitbake -f -c compile linux-externalsrc) - I tried deploy but it didn't work for me (i.e., yocto doesn't have a rule for deploy)

            10) bitbake edison-image

            The module seems to be included with the modules ipk, but even when I just built it, the dependancy for the wrong kernel was there...

            I have a new clean build running and will be able to experiment again tomorrow.

            Thanks for your help - Mario

            • 3. Re: Customizing Kernel

              Anyone been able to modify the kernel config and get it to build correctly?


              Anyone have any clues how to re-invoke bitbake after updating the config or defconfig?


              Anyone at Intel able to point me in the right direction?  Even if you don't re-create the problem, what are the steps I should be following because the BSP User's Guide doesn't seem to work anymore.

              • 4. Re: Customizing Kernel
                Intel Corporation
                This message was posted on behalf of Intel Corporation

                Hello Mario,

                I'm sorry for the delay in my reply. This is what we did for the image 3.0:

                On the file iot-devkit-yp-poky-edison-20160315/poky/meta-intel-edison/meta-intel-edison-bsp/recipes-kernel/linux/linux-externalsrc.bb.
                Comment line 17 and replace it with:
                cp "<the path for your .config>/.config" "${B}/.config"

                Let me know if it works, we'll be glad to help you if otherwise.


                • 5. Re: Customizing Kernel

                  Thanks Peter it now works.  For future reference, here are the steps that I followed to customize the kernel (based on the README, other discussions in the forum and Peter's comment):


                  1) unzip iot-devkit-yp-poky-edison-20160315.zip

                  2) cd iot-devkit-yp-poky-edison-20160315/poky/

                  3) source oe-init-build-env ../build_edison/

                  4) edit iot-devkit-yp-poky-edison-20160315/build_edison/conf/local.conf to comment out the following lines (starting at line 223):


                  #PACKAGECONFIG_append_pn-qemu-native = " sdl" line 223

                  #PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"

                  #ASSUME_PROVIDED += "libsdl-native"


                  5) bitbake edison-image u-boot

                  6) bitbake virtual/kernel -c menuconfig & configure your kernel

                  7) cp iot-devkit-yp-poky-edison-20160315/build_edison/tmp/work/edison-poky-linux/linux-externalsrc/1.0-r2/linux-externalsrc-1.0/.config iot-devkit-yp-poky-edison-20160315/poky

                  8) edit linux-externalsrc.bb:   cp "${EDISONREPO_TOP_DIR}/.config" "${B}/.config"

                  9) bitbake edison-image u-boot

                  10) ../poky/meta-intel-edison/utils/flash/postBuild.sh .

                  11) zip -r toFlash.zip toFlash or install module .ipk (if you built a module) from iot-devkit-yp-poky-edison-20160315/build_edison/tmp/deploy/ipk/edison


                  Please note that all paths are relative to where iot-devkit... is installed. Hope this helps someone else.



                  2 of 2 people found this helpful
                  • 6. Re: Customizing Kernel



                    When I am performing the 7th step mentioned above it says that there is no file existing. I checked in the folder also and I couldn't find any file or folder by the name ".config". Please let me know the solution to it.




                    • 7. Re: Customizing Kernel



                      It gives the following response when i run the 7th step.


                      configure: WARNING: you should use --build, --host, --target

                      configure: WARNING: you should use --build, --host, --target

                      checking whether to use symlinks for manpages... no

                      checking whether to compress the manpages... no

                      checking whether to add a package name suffix for the manpages... no

                      checking for your-gcc... no

                      checking for gcc... gcc

                      checking whether the C compiler works... yes

                      checking for C compiler default output file name... a.out

                      checking for suffix of executables...

                      checking whether we are cross compiling... no

                      checking for suffix of object files... o

                      checking whether we are using the GNU C compiler... yes

                      checking whether gcc accepts -g... yes

                      checking for gcc option to accept ISO C89... none needed

                      checking for inline... inline

                      checking how to run the C preprocessor... ERROR: Only one copy of bitbake should be run against a build directory

                      gcc -E

                      checking for grep that handles long lines and -e... /bin/grep

                      checking for egrep... /bin/grep -E

                      checking for ANSI C header files... yes

                      checking for sys/types.h... yes

                      checking for sys/stat.h... yes

                      checking for stdlib.h... yes

                      checking for string.h... yes

                      checking for memory.h... yes

                      checking for strings.h... yes

                      checking for inttypes.h... yes

                      checking for stdint.h... yes

                      checking for unistd.h... yes

                      checking dirent.h... yes

                      checking float.h usability... yes

                      checking float.h presence... yes

                      checking for float.h... yes

                      checking values.h usability... yes

                      checking values.h presence... yes

                      checking for values.h... yes

                      checking limits.h usability... yes

                      checking limits.h presence... yes

                      checking for limits.h... yes

                      checking for stdlib.h... (cached) yes

                      checking for string.h... (cached) yes

                      checking sys/wait.h usability... yes

                      checking sys/wait.h presence... yes

                      checking for sys/wait.h... yes

                      checking dlfcn.h usability... yes

                      checking dlfcn.h presence... yes

                      checking for dlfcn.h... yes

                      checking sys/param.h usability... yes

                      checking sys/param.h presence... yes

                      checking for sys/param.h... yes

                      checking if the compiler understands -pipe... yes

                      checking for building with threads... no (default)

                      checking for sin... no

                      checking for main in -lieee... yes

                      checking for main in -linet... no

                      checking net/errno.h usability... no

                      checking net/errno.h presence... no

                      checking for net/errno.h... no

                      checking for connect... yes

                      checking for gethostbyname... yes

                      checking how to build libraries... shared

                      checking for your-ranlib... no

                      checking for ranlib... ranlib

                      checking if 64bit support is requested... no

                      checking if 64bit Sparc VIS support is requested... no

                      checking if compiler supports visibility "hidden"... yes

                      checking if rpath support is requested... yes

                      checking system version... Linux-3.13.0-24-generic

                      checking for dlopen in -ldl... yes

                      checking for your-ar... no

                      checking for ar... ar

                      checking for build with symbols... no

                      checking for required early compiler flags...  _LARGEFILE64_SOURCE

                      checking for 64-bit integer type... using long

                      checking whether byte ordering is bigendian... no

                      checking for getcwd... yes

                      checking for opendir... yes

                      checking for strtol... yes

                      checking for waitpid... yes

                      checking for strerror... yes

                      checking for getwd... yes

                      checking for wait3... yes

                      checking for uname... yes

                      checking for realpath... yes

                      checking for getaddrinfo... yes

                      checking for working getaddrinfo... yes

                      checking sys/modem.h usability... no

                      checking sys/modem.h presence... no

                      checking for sys/modem.h... no

                      checking termios vs. termio vs. sgtty... termios

                      checking for fd_set in sys/types... yes

                      checking sys/time.h usability... yes

                      checking sys/time.h presence... yes

                      checking for sys/time.h... yes

                      checking whether time.h and sys/time.h may both be included... yes

                      checking for gmtime_r... yes

                      checking for localtime_r... yes

                      checking for mktime... yes

                      checking tm_tzadj in struct tm... no

                      checking tm_gmtoff in struct tm... yes

                      checking long timezone variable... yes

                      checking for struct stat.st_blocks... yes

                      checking for struct stat.st_blksize... yes

                      checking for blkcnt_t... yes

                      checking for fstatfs... yes

                      checking for working memcmp... yes

                      checking for memmove... yes

                      checking for strstr... yes

                      checking proper strstr implementation... ok

                      checking for strtoul... yes

                      checking proper strtoul implementation... ok

                      checking for strtod... yes

                      checking proper strtod implementation... ok

                      checking for strtod... (cached) yes

                      checking for Solaris2.4/Tru64 strtod bugs... ok

                      checking for mode_t... yes

                      checking for pid_t... yes

                      checking for size_t... yes

                      checking for uid_t in sys/types.h... yes

                      checking for socklen_t... yes

                      checking for intptr_t... yes

                      checking for uintptr_t... yes

                      checking for opendir... (cached) yes

                      checking union wait... yes

                      checking for strncasecmp... yes

                      checking for BSDgettimeofday... no

                      checking for gettimeofday... yes

                      checking for gettimeofday declaration... present

                      checking whether char is unsigned... no

                      checking signed char declarations... yes

                      checking for a putenv() that copies the buffer... no

                      checking langinfo.h usability... yes

                      checking langinfo.h presence... yes

                      checking for langinfo.h... yes

                      checking whether to use nl_langinfo... yes

                      checking for chflags... no

                      checking isnan... yes

                      checking for fts... yes

                      checking sys/ioctl.h usability... yes

                      checking sys/ioctl.h presence... yes

                      checking for sys/ioctl.h... yes

                      checking sys/filio.h usability... no

                      checking sys/filio.h presence... no

                      checking for sys/filio.h... no

                      checking system version... (cached) Linux-3.13.0-24-generic

                      checking FIONBIO vs. O_NONBLOCK for nonblocking I/O... O_NONBLOCK

                      checking whether to use dll unloading... yes

                      checking for timezone data... /usr/share/zoneinfo

                      checking whether to enable DTrace support... no

                      checking if the C stack grows upwards in memory... no

                      configure: creating ./config.status

                      config.status: creating Makefile

                      config.status: creating dltest/Makefile

                      config.status: creating tclConfig.sh

                      [2]-  Exit 1                  bitbake virtual/kernel -c menuconfig


                      There is an error that says, that only one copy of bitbake should be run against build directory. What does it mean and how could I solve it? Please help me with this.




                      • 8. Re: Customizing Kernel
                        Intel Corporation
                        This message was posted on behalf of Intel Corporation

                        Hello nag96chidara,

                        If you did not change the name of the file it'll be called .config and if you haven't changed your PC's settings, it will be hidden, so I suggest you to look for it using the terminal with the command ls -la.