ChronOS Real-time Linux

本文档为ChronOS Linux的安装指南,介绍了从下载到安装所需的步骤。内容包括安装必需的软件包、安装内核(应用补丁、配置及编译内核)、安装库文件和实用工具等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Installation Guide

From ChronOS Linux

 

http://chronoslinux.org/wiki/Installation_Guide

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.8.

Contents

[hide]

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.9.tar.bz2 
  • Rename the extracted folder
 mv linux-2.6.33.9 linux-2.6.33.9-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).
 cd linux-2.6.33.9-chronos  
 bzcat ../patch-2.6.33.9-rt31.bz2 | patch -p1 
 bzcat ../patch-2.6.33.9-chronos.bz2 | patch -p1 

Configuring the Kernel

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

cd linux-2.6.33.9-chronos 

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

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: [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-2.6.33.9-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-2.6.33.9-chronos
sudo cp .config /boot/config-2.6.33.9-chronos
sudo cp System.map /boot/System.map-2.6.33.9-chronos
sudo update-initramfs -c -k 2.6.33.9-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.9-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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值