Adding a Kernel to a Classic Project

TimeSys LinuxLink Classic Builder projects create the necessary packages for a base reference distribution, but lack a Linux kernel, which is needed for your project to boot and run on your reference board. The following example inserts a kernel in source RPM format; or your own kernel from any other source.

To add or modify a kernel in a LinuxLink Builder project:

  1. Make sure you have SVN access to your LinuxLink repository.
  2. Create a platform-specific project to set up a kernel project with LinuxLink Builder. As a baseline check, create a project similar to the one you want as the final product.
  3. Make sure that your baseline project is good by building it as described in Performing a Build in LinuxLink, and verifying that it builds successfully. This will create a file called kernel.spec, located in the kernel directory of the project.
  4. Check out a local copy of your project files using the following command:
    $ svn co https://src.timesys.com/svn/<team>/<group>/<project>

    and move to the project directory.

    Note

    The examples in this document use the command line; if you are using a graphical program to check files in and out of LinuxLink, the methods for doing this will differ from the examples.

  5. Obtain the kernel source files, either from TimeSys, or from a source such as Kernel.org. TimeSys recommends using tsrpm for extracting the contents of source RPM files, such as those provided by TimeSys.
  6. If needed, download and install tsrpm.
  7. Apply any patches, either manually, or using tsrpm.
  8. Copy the new kernel files into the kernel subdirectory:
    $ cp kernel-<dist_name>/* kernel
  9. If needed, update the kernel configuration, using your favorite kernel configuration editor.
  10. Modify the kernel.spec file appropriately, and then apply the changes.
  11. Locate the dist_data.py file in your project directory, and uncomment the appropriate lines in the kernel and rfs-extra sections, editing the kernel version and release numbers, if necessary, in the rfs-extra section:
    'kernel' : {
       'list' : [
         # Kernel sources for the host development system
         'kernel-sourcecode-2.6.16-ts.amcc405ep.1',
       ],
    },
    
    'rfs-extra': {
       'list': [
         # Kernel binary for the target system
         'kernel-2.6.16-ts.amcc405ep.1',
       ],
    },
    Note

    This is the extracted RPM name without the .src.rpm extension.

  12. Add the modified kernel source files to SVN and commit the changes:
    $ svn add kernel/*
    $ svn commit

    Ignore any warnings about kernel.spec and kernel.tshint already being under version control.

  13. To verify that the code is checked in, go to https://src.timesys.com/svn/<team>/<group>/<project>/.
  14. Start a new build with the kernel changes included.