8 Replies Latest reply on Sep 16, 2014 1:53 AM by mhahn

    How to build new kernel ?

    guypld

      Hi,

       

      I have a running Linux on galileo (The lab image),

      I want to compile new kernel with my own modules,

      Where can I download a new Galileo kernel (source code) ?

       

      Another thing, here:

      http://www.malinov.com/Home/sergey-s-blog/intelgalileo-buildinglinuximage

      it says to download the file 'Board_Support_Package_Sources_for_Intel_Quark_v0.7.5.7z', but this file doesn't exist in the page,

      it only has Board Support Package Sources for Intel Quark (full Yocto archive file 1 - 2) , this files (after combined the 2)  has lots of dirs without the file

      'meta-clanton_v0.7.5.tar.gz'.


      Is there a SIMPLE way to download a source code of a working galileo kernel and just compile it as usual (make config\make\make install etc.) ??


      Thanks,

      Guy.

        • 1. Re: How to build new kernel ?
          JPMontero_Intel

          Hi guypld

           

          Check the BSP document https://communities.intel.com/docs/DOC-22476 In section 6 are the steps for building the kernel, for that you also need to download the board support package sources part 1 and 2 at this link https://communities.intel.com/docs/DOC-22226 . Regarding the meta-clanton_v0.7.5.tar.gz that is because 0.7.5 is an old version, the current one available is the 1.0.1 and is included in the board support package sources.

           

          Regards,
          JPMontero_Intel

          1 of 1 people found this helpful
          • 2. Re: How to build new kernel ?
            JPMontero_Intel

            Hi guypld

             

            I’ve kept investigating and found out some additional information on this. In the https://communities.intel.com/docs/DOC-22226 you need to download the BSP source (Part 1 and Part 2) you will also need BSP Patches and Build Instructions which contain instructions to modify built 1.0.1 to be 1.0.2.

             

            Regrds,
            JPMontero_Intel

            • 3. Re: How to build new kernel ?
              guypld

              Hi,

              Thanks for your help.

              So far I'm working on Ubuntu 14.04 64bit (VM),

              I get errors at the 4th section (Building the EDKII Firmware),

              After downloaded openssl-0.9.8w version, copy the folder to 'Quark_EDKII_v1.0.2/CryptoPkg/Library/OpensslLib/', try to 'make install' it, I get this error:

               

              installing man1/smime.1

              smime.pod around line 272: Expected text after =item, not a number

              smime.pod around line 276: Expected text after =item, not a number

              smime.pod around line 280: Expected text after =item, not a number

              smime.pod around line 285: Expected text after =item, not a number

              smime.pod around line 289: Expected text after =item, not a number

              POD document had syntax errors at /usr/bin/pod2man line 71.

              make: *** [install_docs] Error 255

               

              and after tried to proceed to building the firmwork by './buildallconfigs.sh GCC47 QuarkPlatform' I get this error:

               

              /home/guypld/UNIV/Quark_EDKII_v1.0.2/CryptoPkg/Library/OpensslLib/openssl-0.9.8w/e_os.h:62:33: fatal error: openssl/opensslconf.h: No such file or directory

              #include <openssl/opensslconf.h>

                ^

              compilation terminated.

              make: *** [/home/guypld/UNIV/Quark_EDKII_v1.0.2/Build/QuarkPlatform/DEBUG_GCC47/IA32/CryptoPkg/Library/OpensslLib/OpensslLib/OUTPUT/openssl-0.9.8w/crypto/cryptlib.obj] Error 1

               

              build.py...

              : error 7000: Failed to execute command

              make tbuild [/home/guypld/UNIV/Quark_EDKII_v1.0.2/Build/QuarkPlatform/DEBUG_GCC47/IA32/CryptoPkg/Library/OpensslLib/OpensslLib]

               

              build.py...

              : error 7000: Failed to execute command

              make tbuild [/home/guypld/UNIV/Quark_EDKII_v1.0.2/Build/QuarkPlatform/DEBUG_GCC47/IA32/CryptoPkg/Library/BaseCryptLib/BaseCryptLib]

               

              build.py...

              : error F002: Failed to build module

              /home/guypld/UNIV/Quark_EDKII_v1.0.2/CryptoPkg/Library/OpensslLib/OpensslLib.inf [IA32, GCC47, DEBUG]

               

              - Failed -

              Build end time: 16:51:52, Jul.12 2014

              Build total time: 00:03:44

               

              How can I proceed to the next step in this User Guide ?

              Thanks!

              • 4. Re: How to build new kernel ?
                Rushang.Karia

                Hi,

                 

                Ubuntu 14.04 is known to cause problems. Try with Ubuntu 12.04 which has been verified to work. I do not know of anyone who has successfully built the BSP using 14.04. If you do let us know.

                 

                Now as JP_Montero pointed out you are using an outdated version of the firmware (0.7.5). The current version available is 1.0.x and all the previous ones are no longer available.

                 

                To sum it up you need the newest version.

                Get the newest arduino IDE from the downloads page and update your firmware {This step is crucial}

                Build the BSP by reading the updated manuals also available on the downloads page. There are patches for ssl and UART that you need to apply.

                 

                To change the kernel configuration, once you have sourced the enviornment { OR before you issue bitbake image-full-*}

                Type

                bitbake linux-yocto-clanton -c menuconfig

                 

                This will give you a GUI menu to configure the kernel options. The cfg file is called quark.cfg

                Change whichever options you want.

                 

                Then run bitbake image-full-* to build the image with your custom kernel.

                 

                Regarding the EDK firmware build, I do not have much of an idea. Did you double check your downoad?? Let me know how you fixed this issue.

                • 5. Re: How to build new kernel ?
                  AlexT_Intel

                  Looks like you're first getting an error when installing the openssl library you build and that in turn causes the EDK build process to fail as it doesn't find the necessary openssl headers.

                   

                  I wonder why you want to install openssl from sources, Ubuntu has necessary "-dev" package for that, I'd suggest you just to install it using apt: "sudo apt-get update && sudo apt-get install libssl-dev".

                   

                  But as it was mentioned already, Ubuntu 14.04 may not work because the process was only validated on 12.04 and I think all the attempts so far were failing.

                   

                  I'd suggest you to get 12.04 and it's better to be a x86_64 (64-bit) version, if your hardware allows that - there's a known bug on 32-bit one (but with a solution - just use search on this forum).

                  • 6. Re: How to build new kernel ?
                    xbolshe

                    guypld написал(а):

                     

                     

                    After downloaded openssl-0.9.8w version, copy the folder to 'Quark_EDKII_v1.0.2/CryptoPkg/Library/OpensslLib/', try to 'make install' it, I get this

                    How can I proceed to the next step in this User Guide ?

                    Thanks!

                     

                    I guess a problem is in 'make install'. Read Patch-HOWTO.txt in ../OpensslLib/  for the instruction how to patch and install with ./Install.sh

                     

                    About Ubuntu 14.04.

                    ig_gcc.png

                     

                    I have no problem to compile after a trick under Ubuntu 14.04.

                    • 7. Re: How to build new kernel ?
                      guypld

                      OK, I've Successfully Build the EDKII Firmware and the Grub OS Loader.

                      Currently I'm at the step 'Creating the file system and building the kernel using Yocto' ,

                      but before I'll build the system (which will take 2-4 hours) I need to apply a custom patch (with the usbtv driver).

                       

                      Unfortunately the links from the PDF are not working, and I don't know where to find a 'patch' for the module.

                       

                      Is there any Kernel Sources that I can compile from scratch  with my own modules (with make menuconfig) ?

                       

                      Thanks,

                      Guy.

                      • 8. Re: How to build new kernel ?
                        mhahn

                        Yocto will compile from scratch.

                        If you need to play around with the kernel config: Yocto will extract the kernel sources somewhere in build/tmp/work