11 Replies Latest reply on Nov 26, 2014 1:12 PM by AlexT_Intel

    Error during Kernel Compilation:  make: *** No rule to make target `bzImage'.  Stop.

    williamTurner

      I'm encountering the following while trying to build an image following the BSP documentation:

       

      NOTE: Preparing runqueue

      NOTE: Executing SetScene Tasks

      NOTE: Executing RunQueue Tasks

      NOTE: validating kernel config, see log.do_kernel_configcheck for details

      ERROR: Function failed: do_compile (log file is located at /opt/entercharge/software/edison/images/src/edison-src/build/tmp/work/edison-poky-linux/linux-yocto/3.10.17+gitAUTOINC+6ad20f049a_c03195ed6e-r0/temp/log.do_compile.3136)

      ERROR: Logfile of failure stored in: /opt/entercharge/software/edison/images/src/edison-src/build/tmp/work/edison-poky-linux/linux-yocto/3.10.17+gitAUTOINC+6ad20f049a_c03195ed6e-r0/temp/log.do_compile.3136

      Log data follows:

      | DEBUG: Executing shell function do_compile

      | NOTE: make -j 4 bzImage CC=i586-poky-linux-gcc  LD=i586-poky-linux-ld.bfd

      | make: *** No rule to make target `bzImage'.  Stop.

      | ERROR: oe_runmake failed

      | WARNING: exit code 1 from a shell command.

      | ERROR: Function failed: do_compile (log file is located at /opt/entercharge/software/edison/images/src/edison-src/build/tmp/work/edison-poky-linux/linux-yocto/3.10.17+gitAUTOINC+6ad20f049a_c03195ed6e-r0/temp/log.do_compile.3136)

      ERROR: Task 77 (/opt/entercharge/software/edison/images/src/edison-src/poky/meta/recipes-kernel/linux/linux-yocto_3.10.bb, do_compile) failed with exit code '1'

      NOTE: Tasks Summary: Attempted 1043 tasks of which 660 didn't need to be rerun and 1 failed.

      Waiting for 0 running tasks to finish:

       

      Do we have any known workarounds for this?  If so we should repackage and do another release as this seems to be affecting more users than myself.  Also there is an unrelated issue of a libwebsockets tarball that doesn't download from the default mirror, but that is a separate, resolved issue.   Thank you!

        • 1. Re: Error during Kernel Compilation:  make: *** No rule to make target `bzImage'.  Stop.
          mhahn

          can you share the steps you have taken?

          Did you change anything in the Yocto sources?

          how did you run bitbake?

          • 2. Re: Error during Kernel Compilation:  make: *** No rule to make target `bzImage'.  Stop.
            williamTurner

            I have downloaded: edison-src-rel1-maint-rel1-ww42-14.tgz

            Extracted and run setup.sh

            Nothing has been changed in Yocto sources. 

            I ran bitbake by running: source poky/oe-init-build-env, changing directories to build, than running bitbake edison-image.

            • 3. Re: Error during Kernel Compilation:  make: *** No rule to make target `bzImage'.  Stop.
              mhahn

              Not sure wether it's relevant : which OS do you use?

              • 4. Re: Error during Kernel Compilation:  make: *** No rule to make target `bzImage'.  Stop.
                AlexT_Intel

                Yes, OS (rather versions of basic utilities included) may be a culprit here, so would be interesting to know that.

                 

                williamTurner

                Yocto (bitbake) supports only some distros and their versions, if your one is not on the list, you'll see a warning at the very beginning of the image building process.

                 

                In addition, have you looked into the log file at /opt/entercharge/software/edison/images/src/edison-src/build/tmp/work/edison-poky-linux/linux-yocto/3.10.17+gitAUTOINC+6ad20f049a_c03195ed6e-r0/temp/log.do_compile.3136, is there anything additional there? You could post it here for analysis.

                • 5. Re: Error during Kernel Compilation:  make: *** No rule to make target `bzImage'.  Stop.
                  williamTurner

                  The log is in my workshop which I don't have access to right now.  I'm running Ubuntu 14.04 Trusty x86_64.

                  • 6. Re: Error during Kernel Compilation:  make: *** No rule to make target `bzImage'.  Stop.
                    Hirofumi.Fujimoto

                    I had same problem on Ubuntu 12.04 x86_64, but I got workaround.

                    You can comment out two tasks, 'do_kernel_configme' and 'do_patch', in below file to build an image.

                     

                    edison-src/device-software/meta-edison/recipes-kernel/linux/linux-yocto_3.10.bbappend

                     

                    This is the patch.

                    <pre>

                    --- a/device-software/meta-edison/recipes-kernel/linux/linux-yocto_3.10.bbappend    2014-11-21 16:36:41.529017755 +0900

                    +++ b/device-software/meta-edison/recipes-kernel/linux/linux-yocto_3.10.bbappend    2014-11-21 15:13:47.549194709 +0900

                    @@ -9,10 +9,10 @@ SRC_URI += "file://upstream_to_edison.pa

                    do_configure() {

                       cp "${WORKDIR}/defconfig" "${B}/.config"

                    }

                    -do_kernel_configme() {

                    -  cp "${WORKDIR}/defconfig" "${B}/.config"

                    -}

                    -do_patch() {

                    -  cd ${S}

                    -  git am "${WORKDIR}/upstream_to_edison.patch"

                    -}

                    +#do_kernel_configme() {

                    +#  cp "${WORKDIR}/defconfig" "${B}/.config"

                    +#}

                    +#do_patch() {

                    +#  cd ${S}

                    +#  git am "${WORKDIR}/upstream_to_edison.patch"

                    +#}

                     

                    </pre>

                     

                    'do_kernel_configme' is originally defined in edison-src/poky/meta/classes/kernel-yocto.bbclass.

                    This task creates kernel build directory, edison-src/build/tmp/work/edison-poky-linux/linux-yocto/3.10.17+gitAUTOINC+6ad20f049a_c03195ed6e-r0/linux-edison-standard-build,

                    for specific ${LINUX_KERNEL_TYPE} and ${KMACHINE} specified in your configuration from original kernel source.

                    However, this task is overridden by useless "just copy 'defconfig' to build dir" function in linux-yocto_3.10.bbappend,

                    thus when bitbake attempt to make bzImage, there are no file but .config in build dir, results fail.

                     

                    Original 'do_patch' is also required to complete the job.

                    • 7. Re: Error during Kernel Compilation:  make: *** No rule to make target `bzImage'.  Stop.
                      AlexT_Intel

                      My primary build host is Ubuntu 12.04 x86_64 and I don't have this problem even with the overridden do_patch, do_kernel_configme and do_configure, so that must be something else in your one causing this.

                       

                      With that said, if you comment these out, yes, it will still work and even a bit better - because you'll have so called "configuration fragments" Yocto feature working again and you'll be able to just incrementally specify kernel configuration options you want to set instead of redefining the whole defconfig file. Alas this is something the development team won't fix because they rely on that in their development process, I've reported that quite a while ago.

                       

                      Beware - your kernel will be named a bit differently and will have a different set of options enabled as a result (due to some defaults in the kernel-yocto.bbclass, netfilter will be enabled - is the biggest one). Not a big deal probably, if you're rebuilding it anyway, but worth knowing.

                      • 8. Re: Error during Kernel Compilation:  make: *** No rule to make target `bzImage'.  Stop.
                        Ling

                        I met the same issue even I'm using recommended Ubuntu 12.04.

                         

                        Before I add the edison source to my local git, it works well besides known libwebsockets issue.

                        After I commit the eidson source to my local git, I start to meet the error message shown in the original post.

                         

                        After I digging into it, I've found the root cause.

                        It is because there're some patching commands in setup.sh using git apply.

                        Before I add the source to my local git, these git apply works well. After adding the source to the git, these commands fail to do the patch but exit without any error message.

                        I replace them using patch command, then everything back to normal.

                         

                        Hope this can help you guys.

                         

                        --- a/edison-src/device-software/setup.sh

                        +++ b/edison-src/device-software/setup.sh

                        @@ -239,13 +239,13 @@ COPYLEFT_LICENSE_INCLUDE = 'GPL* LGPL*'

                           # Apply patch on top of it allowing to perform build in external source directory

                           #echo "Applying patch on it"

                           cd $poky_dir

                        -  git apply --whitespace=nowarn $my_dir/device-software/utils/fix-gcc49-binutils.patch

                        -  git apply $my_dir/device-software/utils/0001-kernel-kernel-yocto-fix-external-src-builds-when-S-B-poky-dora.patch

                        -  git apply $my_dir/device-software/utils/gcc-Clean-up-configure_prepend-and-fix-for-mingw.patch

                        -  git apply $my_dir/device-software/utils/sdk-populate-clean-broken-links.patch

                        -  git apply $my_dir/device-software/utils/fix-sshd-varloglastlog-warning.patch

                        -  git apply --whitespace=nowarn $my_dir/device-software/utils/0001-bash-fix-CVE-2014-6271.patch

                        -  git apply --whitespace=nowarn $my_dir/device-software/utils/0002-bash-Fix-CVE-2014-7169.patch

                        +  patch -p1 < $my_dir/device-software/utils/fix-gcc49-binutils.patch

                        +  patch -p1 < $my_dir/device-software/utils/0001-kernel-kernel-yocto-fix-external-src-builds-when-S-B-poky-dora.patch

                        +  patch -p1 < $my_dir/device-software/utils/gcc-Clean-up-configure_prepend-and-fix-for-mingw.patch

                        +  patch -p1 < $my_dir/device-software/utils/sdk-populate-clean-broken-links.patch

                        +  patch -p1 < $my_dir/device-software/utils/fix-sshd-varloglastlog-warning.patch

                        +  patch -p1 < $my_dir/device-software/utils/0001-bash-fix-CVE-2014-6271.patch

                        +  patch -p1 < $my_dir/device-software/utils/0002-bash-Fix-CVE-2014-7169.patch

                        • 9. Re: Error during Kernel Compilation:  make: *** No rule to make target `bzImage'.  Stop.
                          AlexT_Intel

                          Thanks for sharing that.

                           

                          To make sure - "I add the edison source to my local git" means exactly what sequence of commands?

                          • 10. Re: Error during Kernel Compilation:  make: *** No rule to make target `bzImage'.  Stop.
                            Ling

                            git init a bare repo

                            git add all the edison source from tar bar.

                            git commit