Installation Guide 2.8
From ChronOS Linux
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.8.
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
The first step is to apply the two patches -- CONFIG_PREEMPT_RT and ChronOS.
- Navigate to your kernel working folder
- Extract the downloaded kernel tarball.
tar xjvf linux-22.214.171.124.tar.bz2
- Rename the extracted folder
mv linux-126.96.36.199 linux-188.8.131.52-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.8/* chronos/command you executed at the end of the download instructions).
bzcat ../patch-184.108.40.206-rt31.bz2 | patch -p1
bzcat ../patch-220.127.116.11-chronos.bz2 | patch -p1
Configuring the Kernel
First, navigate into the kernel directory (if you're not already there):
If you're running Ubuntu, you may wish to copy over your previous configuration, since the default kernel config may not have the right options selected. For Ubuntu 10.04, this configuration is located at
/boot/config-2.6.32-33-generic, and you should copy it to
.config in the kernel directory, like this:
cp /boot/config-2.6.32-33-generic .config
Then, to update the Ubuntu config to match the current kernel version, you should run the following:
yes "" | make oldconfig
The next step is to configure the kernel. To do this, run
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: [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: [M] CHRONOS > ChronOS real-time scheduling: [*] 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-18.104.22.168-chronos make bzImage make modules sudo make modules_install
- Install the kernel image to the
/boot, create an
initramfsimage for the kernel and update
sudo cp arch/x86/boot/bzImage /boot/vmlinuz-22.214.171.124-chronos sudo cp .config /boot/config-126.96.36.199-chronos sudo cp System.map /boot/System.map-188.8.131.52-chronos sudo update-initramfs -c -k 184.108.40.206-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-220.127.116.11-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
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.
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.
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.
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.
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.
Back to main page