Installation Guide 3.4

From ChronOS Linux

(Difference between revisions)
Jump to: navigation, search
(Compiling and Installing the Kernel)
Line 97: Line 97:
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.
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 [[Downloading ChronOS Linux | download instructions]].
+
The most recent version of libchronos is included in the main ChronOS archive, which you extracted as part of the [[Downloading ChronOS Linux v3.4 | download instructions]].
===Installing Sched_Test_App===
===Installing Sched_Test_App===
Line 104: Line 104:
To compile it, simply run <tt>'''make'''</tt>. To install it, run <tt>sudo make install</tt> script. More details can be found in the README file.
To compile it, simply run <tt>'''make'''</tt>. To install it, run <tt>sudo make install</tt> 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 [[Downloading ChronOS Linux | download instructions]].
+
The most recent version of Sched_Test_App is included in the main ChronOS archive, which you extracted as part of the [[Downloading ChronOS Linux v3.4 | download instructions]].
===Installing Libjchronos===
===Installing Libjchronos===
Line 113: Line 113:
Libjchronos was not a part of ChronOS before Beta 2.6, so to use it, you just download 2.6 or a later version.
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 [[Downloading ChronOS Linux | download instructions]].
+
The most recent version of libjchronos is included in the main ChronOS archive, which you extracted as part of the [[Downloading ChronOS Linux v3.4 | download instructions]].
===Installing Sched_Test_App_Java===
===Installing Sched_Test_App_Java===
Line 122: Line 122:
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.
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 [[Downloading ChronOS Linux | download instructions]].
+
The most recent version of Sched_Test_App_Java is included in the main ChronOS archive, which you extracted as part of the [[Downloading ChronOS Linux v3.4 | download instructions]].
===Installing Test Cases===
===Installing Test Cases===
Line 129: Line 129:
Compile the test cases with <tt>make</tt> and run them with <tt>sudo ./all_test_cases.sh</tt>. Use the <tt>-v</tt> flag for a detailed output.
Compile the test cases with <tt>make</tt> and run them with <tt>sudo ./all_test_cases.sh</tt>. Use the <tt>-v</tt> 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 [[Downloading ChronOS Linux | download instructions]].
+
The most recent version of the test cases is included in the main ChronOS archive, which you extracted as part of the [[Downloading ChronOS Linux v3.4 | download instructions]].
===Installing Benchmarks===
===Installing Benchmarks===
Line 136: Line 136:
Compile the test cases with <tt>make</tt> and run them with <tt>sudo ./all_benchmarks.sh</tt>.
Compile the test cases with <tt>make</tt> and run them with <tt>sudo ./all_benchmarks.sh</tt>.
-
The most recent version of the benchmarks is included in the main ChronOS archive, which you extracted as part of the [[Downloading ChronOS Linux | download instructions]].
+
The most recent version of the benchmarks is included in the main ChronOS archive, which you extracted as part of the [[Downloading ChronOS Linux v3.4 | download instructions]].
----
----
Back to [[Main Page | main page]]
Back to [[Main Page | main page]]

Revision as of 21:53, 16 April 2014

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

This documentation is current as of ChronOS 3.4. (Installation Guide for ChronOS 3.0)

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 ChronOS directory (created as part of the download instructions)
 cd chronos 
  • Rename the extracted folder
 mv linux-stable-rt linux-3.4.82-chronos 
  • Navigate into the renamed kernel folder, switch branches, then apply the chronos patch. (Note: thi patch file should have been placed in the chronos/ folder by the mv ChronOS_3.4/* chronos/ command you executed at the end of the download instructions).
 cd linux-3.4.82-chronos  
 git checkout origin/v3.4-rt 
 patch -p1 < ../patch-3.4.82-chronos.patch 

Configuring the Kernel

First, navigate into the kernel directory (if you're not already there):

cd linux-3.4.82-chronos 

You may wish to copy over your previous configuration, since the default kernel config may not have the correct options selected for your distribution or hardware. You should copy the most recent config for your distribution to a .config file in this linux-3.4.82-chronos directory. For Ubuntu 10.04, this configuration is located at /boot/config-X.X.XX-XX-generic, and you may copy it to .config in the kernel directory, like so:

cp /boot/config-X.X.XX-XX-generic .config 

Note: other distributions ought to have kernel config files available as well; try the /boot directory, check if /proc/config.gz exists, and if all else fails, consult your distribution's documentation.

You should now update this .config file to work with the ChronOS kernel version. To update it with the defaults for every option which has been added between your distribution's kernel's release and the ChronOS kernel's release, run the following (omit the yes "" | portion to pick the value of each option by hand. Beware: this can be time consuming):

 yes "" | make oldconfig 

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

make menuconfig 


This should bring up a set of menus. You need to mark/unmark the following options:

General Setup > Control Group support > 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 Model > Fully Preemptible Kernel (RT) (X)
General setup > RCU Subsystem > RCU Implementation > Preemptible tree-based hierarchical RCU (X)
Power Management Options > CPU Frequency Scaling > CPU Frequency Scaling: [n]
ChronOS Real-time Scheduling > ChronOS real-time scheduling: [*]
ChronOS Real-time Scheduling > Scheduling statistics for real-time schedulers: [*]
ChronOS Real-time Scheduling > Locking statistics for scheduler-managed locks: [*]

Compiling and Installing the Kernel

  • Compile the kernel and the modules and then install the modules.
cd linux-3.4.82-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/x86/boot/bzImage /boot/vmlinuz-3.4.82-chronos
sudo cp .config /boot/config-3.4.82-chronos
sudo cp System.map /boot/System.map-3.4.82-chronos
sudo update-initramfs -c -k 3.4.82-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-3.4.82-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.

Note that if you run into an error building one of the modules, you may need to go back to make menuconfig and unselect the module causing the build error.

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 C designed to provide an interface for testing real-time schedulers.

To compile it, simply run make. To install it, run sudo make 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 sudo ./all_test_cases.sh. 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 sudo ./all_benchmarks.sh.

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


Back to main page

Personal tools