Installation Guide 2.8

From ChronOS Linux

Revision as of 22:04, 25 April 2011 by Aclindsa (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This guide assumes you have already followed the download instructions and have a recent Linux distribution installed.

This documentation is current as of ChronOS Beta 2.7.

Contents

Install Required packages

In order to compile the kernel, the build tools need to be installed. On Ubuntu, these can be installed from the package manager with the following command:

 sudo apt-get install build-essential libncurses5-dev 

Installing the Kernel

Applying Patches

The first step is to apply the two patches -- CONFIG_PREEMPT_RT and ChronOS.

  • Navigate to your kernel working folder
 cd chronos 
  • Extract the downloaded kernel tarball.
 tar xjvf linux-2.6.33.7.tar.bz2 
  • Rename the extracted folder
 mv linux-2.6.33.7 linux-2.6.33.7-chronos 
  • Navigate into the renamed kernel folder and apply the patches in order. (Note: these patch files should have been placed in the chronos/ folder by the mv ChronOS_Beta_2.7/* chronos/ command you executed at the end of the download instructions).
 cd linux-2.6.33.7-chronos  
 bzcat ../patch-2.6.33.7.2-rt30.bz2 | patch -p1 
 bzcat ../patch-2.6.33.7-chronos.bz2 | patch -p1 

Configuring the Kernel

The next step is to configure the kernel. To do this, run

cd linux-2.6.33.7-chonos 
make menuconfig 

Once this works successfully, it should bring up a set of menus. You need to mark/unmark the following options:

General Setup > Group CPU Scheduler > Group Scheduling for SCHED_RR/FIFO: [n]
Processor Types and Features > Tickless System (Dynamic Ticks): [*]
Processor Types and Features > High Resolution Timer Support: [*]
Processor Types and Features > Symmetric multi-processing support: [*]
Processor Types and Features > Preemption Mode > Complete Preemption (Real-Time): [*]
Power Management Options > CPU Frequency Scaling > CPU Frequency Scaling: [n]
Device Drivers > Network Device Support > Network Console Logging Support: [*]
CHRONOS > ChronOS real-time scheduling subsystem: [*]
CHRONOS > Scheduling statistics for real-time schedulers: [*]

Compiling and Installing the Kernel

  • Compile the kernel and the modules and then install the modules.
cd linux-2.6.33.7-chronos
make bzImage
make modules
sudo make modules_install 
  • Install the kernel image to the /boot, create an initramfs image for the kernel and update grub
sudo cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.33.7-chronos
sudo cp arch/x86/boot/bzImage /boot/vmlinuz-2.6.33.7-chronos
sudo cp .config /boot/config-2.6.33.7-chronos
sudo cp System.map /boot/System.map-2.6.33.7-chronos
sudo update-initramfs -c -k 2.6.33.7-chronos
sudo update-grub 

In order to make the compilation and installing processor simpler on the x86 architecture, we have provided a bash script called kinst in the kernel folder. You will have to chmod this script before running it.

cd linux-2.6.33.7-chronos
chmod +x kinst
sudo ./kinst 

The script compiles the bzImage (kernel image), the kernel modules, and then installs the modules. It then copies the kernel image, system map, and kernel config to the /boot directory, generates the initramfs, and updates the grub menu. If you are on a non-x86 architecture, you'll have to change the directory to copy the kernel image from.

Installing Libraries and Utilities

Installing Libchronos

Libchronos is the shared userspace library which provides the hooks and headers files to interface with the ChronOS kernel.

Then you need to install libchronos before installing any other userspace components. To install, simply run a make all followed by a sudo make install in the libchronos folder inside the chronos directory.

If you are using a version of ChronOS before Beta 2.1, there is no libchronos, since the userspace APIs were provided by C/C++ headers.

The most recent version of libchronos is included in the main ChronOS archive, which you extracted as part of the download instructions.

Installing Sched_Test_App

Sched_Test_App is a userspace application written in QT4\C++ designed to provide an interface for testing real-time schedulers.

To compile it, run qmake followed by make. To install it, run the included install script. More details can be found in the README file.

The most recent version of Sched_Test_App is included in the main ChronOS archive, which you extracted as part of the download instructions.

Installing Libjchronos

Libjchronos is the shared userspace library which provides the hooks and class files to interface with the ChronOS kernel from Java.

Then you need to install libjchronos before installing Sched_Test_App_Java, or exercising the ChronOS scheduler through Java. To install, simply run a make followed by a sudo make install in the libjchronos folder inside the chronos directory.

Libjchronos was not a part of ChronOS before Beta 2.6, so to use it, you just download 2.6 or a later version.

The most recent version of libjchronos is included in the main ChronOS archive, which you extracted as part of the download instructions.

Installing Sched_Test_App_Java

Sched_Test_App_Java is a userspace application written in Java/SWT designed to provide an interface for testing real-time schedulers in Java.

To compile it, run make. To install it, run sudo make install.

Sched_Test_App_Java was not a part of ChronOS before Beta 2.6, so to use it, you just download 2.6 or a later version.

The most recent version of Sched_Test_App_Java is included in the main ChronOS archive, which you extracted as part of the download instructions.

Installing Test Cases

The ChronOS test cases provide an easy way to verify that a ChronOS Linux system is functioning correctly. Note that you will need to install Sched_Test_App and libchronos before running the test cases, since the slope computed during the installation of Sched_Test_App is used by the test cases.

Compile the test cases with make and run them with all_test_cases. Use the -v flag for a detailed output.

The most recent version of the test cases is included in the main ChronOS archive, which you extracted as part of the download instructions.

Installing Benchmarks

Several benchmarking programs are included with ChronOS to provide measurements of ChronOS specific calls and comparisons with standard Linux calls.

Compile the test cases with make and run them with all_benchmarks.

The most recent version of the benchmarks is included in the main ChronOS archive, which you extracted as part of the download instructions.

Generating Patch Files

To generate your own modified ChronOS patch file, you will need to have a folder containing a kernel with the PREEMPT_RT patch but without the ChronOS patch. Assuming this folder is at the same level as your ChronOS kernel, and is named linux-2.6.33.7.2-rt30 you can use the provided patch script in the ChronOS kernel folder to generate a patch file.


Back to main page

Personal tools