GPOS to RTOS conversion


Published on

Shared by Mansoor Mirza
Step by Step explanation for GPOS to RTOS Conversion for Real Time Embedded Development.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

GPOS to RTOS conversion

  1. 1. Lab1 - Patching Linux Kernel to Convert it to a Real-Time Operating System--------------------------------------------------------------------------Lab Goal--------In this lab we will convert the general purpose Linux operating system tohard real time operating system using CONFIG_PREEMPT_RT patchPreamble--------We have tested this lab on a Fedora 13, 64 bit system.Download Linux Kernel and Real-Time Patch------------------------------------------Download latest Linux kernel form which RT patch is available fromhttp://www.kernel.orgDownload RT patch from Makesure that patch is for same kernel that is downloadedYou can also use Linux Kernel and its related real-time patch, whichis included with this lab material for easy access.Patch the Linux Kernel----------------------Place kernel and patch in a same directory.We have test the following steps on Linux kernel and correspondingreal-time patch. They are expected to work the same for other versions aswell. Our Kernel and patch are compressed as a bzip2 file.(1) Unpack the Linux kernel using following commandtar vxfj linux- Move to the kernel folder linux- linux- Lets dry run the real-time patch before applying it.bzcat ../patch- | patch --dry-run -p1Make sure no error is reported in the dry-run. If so, itimplies that patch will apply correctly.(4) To apply the patch, use the following command.bzcat ../patch- | patch -p1This step completes patching the Linux kernel.
  2. 2. Reading the Patched Files-------------------------You are highly encouraged to see at least a few of patchedfiles and to compare them with un-patched original file tounderstand the changes made. All of these changes will fallinto one of the reasons or classes mentioned in this coursewrite up.Configuration of Linux Kernel-----------------------------Start configuration dialog by issuing the following commandmake menuconfig(1) Enable real time option for kernel (Processor type and features ---> Preemptionmode ---> Complete Preemption )(2) Activate High Resolution Timer (Processor type and features ---> HighResolution Timer)(3) Apply power management settings according to your specific hardware.Power management settings are hardware dependent. Read Help for each and everyoption in"Power management and ACPI options" section and perform appropriate settingAfter completing configuration, exit the configuration dialog and save youconfiguration by selecting "yes" to the exiting message.Building the Linux Kernel-------------------------Once the kernel has been configured, it is time to build it. It is done byfollowing command.makeSince our test system has 8 cores, we used make -j8 so that all coresare used in parallel to complete the work quickly.Make sure the building process does not report any error.It will take some time to compile the kernel. After compiling issue followingcommand.make modulesAnd finally issue the following commands from a privileged access e.g. becoming aroot orusing sudo, one after the other.make modules_installmake install
  3. 3. Running the System-------------------Now boot the system with the newly built kernel. Make sure byrunninguname -acommand that system is up with the real time kernel. Now originalLinux has been changed to real time Linux and server your real timeapplications.