8 Replies Latest reply on Oct 24, 2011 1:05 PM by sfin

    Creating a custom linux image

    sfin

      Hi,

       

      I wanted to ask how is it possible someone to create a custom linux kernel image. Basically i wanted to know if only tiny core linux are supported by SCC or if i can use other versions of linux kernels as well. Also because i am new to this procedure is it possible to provide me with some guidlines?

       

      Thanks

      Panayiotis

        • 1. Re: Creating a custom linux image
          tedk

          You should start with the source we provide at http://marcbug.scc-dc.com/svn/repository/

          The look at the file ... How to Build SCC Linux at http://communities.intel.com/docs/DOC-5802

           

          The lastest 1.4.0 SCC Linux is not there yet. We have an internal SVN repository and the public one. The latest source is in our internal repository, but its build scripts needed to be run in our local environment to work. We've just recently modified those scripts to work publicly, but there's still some testing and cleaning up to do. I expect the very latest SCC Linux source to be available begininning of next week.

           

          We're looking at having two versions of the linux source. One, the gold image that builds the linux image that comes with sccKit 1.4.0, which would be read-only; and two, a read/write version for users who join a kernel-hackers group. We think that two will be a good way for the community to contribute linux changes.

          1 of 1 people found this helpful
          • 2. Re: Creating a custom linux image
            sfin

            Thanks for the help! The reason i am asking is because i want to use performance counters as stated to a previous thread and i think that this can be done if there is a linux kernel image that supports them. Is this correct or i missunderstood ? So basically there will be two linux kernel images one that is read only and the other one can be modified by users in order to add modules that can support specific modules ?

             

            Thanks again for the help

            • 3. Re: Creating a custom linux image
              tedk

              You don't have to wait. You can check out the source anonomously and modify for your own use. And yes modifying for measuring performance is what people are doing (Boston University, Rice University). The read/write area I was referring to was just a method of getting your changes back into the community.

               

              When I said read and read/write I was referring to the repository, not the image. Once you check out the code, it's yours to modify. If you checked it out from a read-only repository, that just means you can't check your changes into the repository. But you can still build and use a modified Linux image. And several people do that now.

              • 4. Re: Creating a custom linux image
                troeger

                We created a custom Gentoo image for the SCC, in order to get the improved tool support you might also need for your task. Please consult this page for further instructions:

                 

                http://www.dcl.hpi.uni-potsdam.de/research/scc/gentoo.htm

                • 5. Re: Creating a custom linux image
                  tedk

                  If you are building a custom Linux for sccKit >= 1.4.1, please folowo the directions in http://communities.intel.com/docs/DOC-6869.Donwload trhe source from http://marcbug.scc-dc.com/svn/repository/trunk/sccLinux/

                   

                  Earlier versions os sccKit required an older SCC Linux, located in http://marcbug.scc-dc.com/svn/repository/trunk/linuxkernel/ and http://marcbug.scc-dc.com/svn/repository/trunk/rckos/ with directions in http://communities.intel.com/docs/DOC-5802 If you are running an older sccKit you can still build and use this older Linux. However, please note that the mk_all script does not work in this context.

                  With the older Linux build, users executed the script mk_all_minimal rather than mk_all. The mk_all bug is
                  http://marcbug.scc-dc.com/bugzilla3/show_bug.cgi?id=202
                  • 6. Re: Creating a custom linux image
                    sfin

                    Hi I wanted to ask something regarding the linux kernel that is available for SCC. I would like to patch that kernel with some features and I want to ask if it can be done and also how to do this... I know it is a very basic question but i dont have experience with kernel modules but i know how to patch a kernel on a regular linux kernel command. Is this supported also for this available kernel?

                     

                    Thanks

                    • 7. Re: Creating a custom linux image
                      tedk

                      You can build a whole new SCC Linux by following the instructions in http://communities.intel.com/docs/DOC-6869

                       

                      This method uses the buildroot method. The way I've customized this Linux is to build the standard one and then replace the files I've changed and then rebuild. The first build takes a long time (anywhere from 90 min to 6 hours depending on your connectivity); the second does not (depending on what changes you made, I guess).

                       

                      The other possiblity is to build an installable kernel module. The new SCC Linux with >= 1.4.1.2 allows this.

                      For example, if you ssh to a core and issue lsmod, you see the following.

                      tekubasx@marc101:~$ ssh root@rck00
                      rck00:/root # lsmod
                      Module                  Size  Used by    Not tainted
                      rckemac                 8600  0
                      rck00:/root #

                       

                      Then, you just install a kernel module with insmod and remove it with rmmod. Example here is installing a module called smcmprotect.ko.

                      rck00:SMC # insmod smcmprotect.ko

                      rck00:SMC # lsmod

                      Module                  Size  Used by    Not tainted

                      smcmprotect             1520  0

                      rckemac                 8600  0

                      rck00:SMC # rmmod scmmprotect

                      rck00:SMC # rmmod smcmprotect

                      rck00:SMC # lsmod

                      Module                  Size  Used by    Not tainted

                      rckemac                 8600  0

                      rck00:SMC #

                      1 of 1 people found this helpful
                      • 8. Re: Creating a custom linux image
                        sfin

                        Thank you very much for your help!! Your instructions are very helpful!!!