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:
- Make sure you have SVN access to your LinuxLink repository.
- 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.
- 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.
- 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.
- 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.
- If needed, download and install tsrpm.
- Apply any patches, either manually, or using tsrpm.
- Copy the new kernel files into the kernel subdirectory:
$ cp kernel-<dist_name>/* kernel
- If needed, update the kernel configuration, using your favorite kernel configuration editor.
- Modify the kernel.spec file appropriately, and then apply the changes.
- 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', ], },
NoteThis is the extracted RPM name without the .src.rpm extension.
- 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.
- To verify that the code is checked in, go to https://src.timesys.com/svn/<team>/<group>/<project>/.
- Start a new build with the kernel changes included.