LiSA Versioning

Current LiSA (release) version is defined in the main Makefile, by means of 3 macros:

  • MAJOR: changes when the whole engine/api is redesigned;
  • MINOR: changes when kernel ↔ userspace api is modified (usually when new features are added);
  • PATCH: changes when things are fixed or for small functionality improvements.

The tarball

Because several kernel branches (with different kernel versions) are maintained in parallel and LiSA kernel side api is neither standardized nor pushed upstream yet, userspace tools must exactly match kernel side code in order to function properly. When the tarball is created, the appropriate headers from the kernel tree are copied in the tarball, thus making that particular tarball dependent on a specific kernel version.

The tarball can be built with make tarball and by default the current tree in the linux-2.6 git subproject is used as reference. In order to build the tarball against a different kernel tree, the environment variable LINUX_DIR must be set up to point to the appropriate kernel tree. On redhat-derived systems, the build directory under /lib/modules/<kernel_version> can be used, as long as the appropriate kernel-devel package is installed.

Userspace rpm packages

Userspace rpm packages can be build with make rpm. A valid tarball must exist. When building against other kernel tree than the linux-2.6 git subproject, the LINUX_DIR variable must point to the same tree as the one used for building the tarball. Therefore, exporting the LINUX_DIR variable and then building both the tarball and the rpm packages is a good practice.

To prevent incompatibility between kernel and userspace, the rpm is set up to depend on the specific kernel version that the package was built against.


Local build tree

Create an empty directory, for instance ~/rpmb/lisa, then use the included to populate it with appropriate subdirectories. The generated tree is required for the rpm build system to operate properly.

Local rpm configuration

Edit ~/.rpmmacros and define the appropriate macros so that building takes place in the build tree that you prepared. An example (assuming the build tree is in ~/rpmb/lisa):

%_topdir    /home/<user>/rpm/lisa
%_tmppath   %{_topdir}/tmp

Kernel rpm packages

FIXME For Centos: add

--without kabichk

to rpmbuild.

FIXME this was taken from an old README file and needs reviewing

1. Prepare build directory structure:
- create appropriate directory in $HOME (e.g. ~/rpmb/kernel-<version>)
- cwd to that directory and run included (root of lisa
- locally configure rpm by editing ~/.rpmmacros and making it look like:

======== ~/.rpmmacros ========
%_topdir    /home/<user>/rpmb/kernel-<version>
%_tmppath   %{_topdir}/tmp
==== end of ~/.rpmmacros =====

- install original distro kernel rpm:
$ rpm -ivh kernel-<version>.src.rpm

2. Prepare the .spec file:
Use appropriate patch from rpm directory (in the root of lisa tree) and
patch the original spec file (should be in ~/rpmb/kernel-<version>/SPECS).

3. Create and copy lisa patch:
- run from root of lisa tree
- move linux-2.6-lisa.patch from linux-2.6 directory to kernel sources
  directory (should be ~/rpmb/kernel-<version>/SOURCE)

4. Build the rpm packages:
- cwd to SPECS directory (should be ~/rpmb/kernel-<version>/SPECS)
- run rpmbuild: rpmbuild -ba --target i686 kernel.spec

Install LISA kernel rpm packages

rpm -ivh kernel-firmware-2.6.32-279.9.1.el6.lisa2.0.1.build3.i686.rpm
rpm -ivh kernel-2.6.32-279.9.1.el6.lisa2.0.1.build3.i686.rpm
rpm -ivh kernel-devel-2.6.32-279.9.1.el6.lisa2.0.1.build3.i686.rpm
rpm -Uvh kernel-headers-2.6.32-279.9.1.el6.lisa2.0.1.build3.i686.rpm

Check the new kernel image with lisa 2.0.1 in /etc/grub.conf. Reboot and select the new kernel image.

Compile and run LISA CLI

Install the GNU Readline library:

yum install readline-devel
cd lisa/userspace/cli/

Set LINUX_DIR variable to /lib/modules/2.6.32-279.9.1.el6.lisa2.0.1.build3.i686/build/:

export LINUX_DIR=/lib/modules/2.6.32-279.9.1.el6.lisa2.0.1.build3.i686/build/

Compile and run the CLI:

cd lisa/userspace/
make clean
cd cli
building_packages.txt · Last modified: 2012/10/19 16:47 by claudiu
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki