SlideShare ist ein Scribd-Unternehmen logo
1 von 3
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 to
hard real time operating system using CONFIG_PREEMPT_RT patch


Preamble
--------
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 from
http://www.kernel.org
Download RT patch from http://www.kernel.org/pub/linux/kernel/projects/rt/. Make
sure that patch is for same kernel that is downloaded

You can also use Linux Kernel 2.6.33.7 and its related real-time patch, which
is 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 2.6.33.7 and corresponding
real-time patch. They are expected to work the same for other versions as
well. Our Kernel and patch are compressed as a bzip2 file.


(1) Unpack the Linux kernel using following command

tar vxfj linux-2.6.33.7.tar.bz2

(2) Move to the kernel folder linux-2.6.33.7

cd linux-2.6.33.7

(3) Lets dry run the real-time patch before applying it.

bzcat ../patch-2.6.33.7-rt29.bz2 | patch --dry-run -p1

Make sure no error is reported in the dry-run.   If so, it
implies that patch will apply correctly.

(4) To apply the patch, use the following command.

bzcat ../patch-2.6.33.7-rt29.bz2 | patch -p1

This step completes patching the Linux kernel.
Reading the Patched Files
-------------------------
You are highly encouraged to see at least a few of patched
files and to compare them with un-patched original file to
understand the changes made. All of these changes will fall
into one of the reasons or classes mentioned in this course
write up.



Configuration of Linux Kernel
-----------------------------

Start configuration dialog by issuing the following command

make menuconfig

(1) Enable real time option for kernel (Processor type and features ---> Preemption
mode ---> Complete Preemption )

(2) Activate High Resolution Timer (Processor type and features ---> High
Resolution Timer)

(3) Apply power management settings according to your specific hardware.
Power management settings are hardware dependent. Read Help for each and every
option in
"Power management and ACPI options" section and perform appropriate setting

After completing configuration, exit the configuration dialog and save you
configuration 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 by
following command.

make

Since our test system has 8 cores, we used make -j8 so that all cores
are 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 following
command.

make modules

And finally issue the following commands from a privileged access e.g. becoming a
root or
using sudo, one after the other.

make modules_install
make install
Running the System
-------------------
Now boot the system with the newly built kernel.   Make sure by
running

uname -a

command that system is up with the real time kernel. Now original
Linux has been changed to real time Linux and server your real time
applications.

Weitere ähnliche Inhalte

Kürzlich hochgeladen

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Kürzlich hochgeladen (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 

Empfohlen

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Empfohlen (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

GPOS to RTOS conversion

  • 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 to hard real time operating system using CONFIG_PREEMPT_RT patch Preamble -------- 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 from http://www.kernel.org Download RT patch from http://www.kernel.org/pub/linux/kernel/projects/rt/. Make sure that patch is for same kernel that is downloaded You can also use Linux Kernel 2.6.33.7 and its related real-time patch, which is 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 2.6.33.7 and corresponding real-time patch. They are expected to work the same for other versions as well. Our Kernel and patch are compressed as a bzip2 file. (1) Unpack the Linux kernel using following command tar vxfj linux-2.6.33.7.tar.bz2 (2) Move to the kernel folder linux-2.6.33.7 cd linux-2.6.33.7 (3) Lets dry run the real-time patch before applying it. bzcat ../patch-2.6.33.7-rt29.bz2 | patch --dry-run -p1 Make sure no error is reported in the dry-run. If so, it implies that patch will apply correctly. (4) To apply the patch, use the following command. bzcat ../patch-2.6.33.7-rt29.bz2 | patch -p1 This step completes patching the Linux kernel.
  • 2. Reading the Patched Files ------------------------- You are highly encouraged to see at least a few of patched files and to compare them with un-patched original file to understand the changes made. All of these changes will fall into one of the reasons or classes mentioned in this course write up. Configuration of Linux Kernel ----------------------------- Start configuration dialog by issuing the following command make menuconfig (1) Enable real time option for kernel (Processor type and features ---> Preemption mode ---> Complete Preemption ) (2) Activate High Resolution Timer (Processor type and features ---> High Resolution Timer) (3) Apply power management settings according to your specific hardware. Power management settings are hardware dependent. Read Help for each and every option in "Power management and ACPI options" section and perform appropriate setting After completing configuration, exit the configuration dialog and save you configuration 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 by following command. make Since our test system has 8 cores, we used make -j8 so that all cores are 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 following command. make modules And finally issue the following commands from a privileged access e.g. becoming a root or using sudo, one after the other. make modules_install make install
  • 3. Running the System ------------------- Now boot the system with the newly built kernel. Make sure by running uname -a command that system is up with the real time kernel. Now original Linux has been changed to real time Linux and server your real time applications.