SlideShare a Scribd company logo
1 of 13
Compiling Linux Kernel &
Submit First Patch
Speaker:
Mr Mayur S Patil, Asst Prof, MITAOE.
As linux kernel compilation is daunting task, so to save our
time I request to the participants coming for this workshop
must have following things preinstalled:
> VMware Player (If possible, VMware tools also)
> Virtualbox
> Guest and Host Linux Installed (Fedora or CentOS)
> Thunderbird Email client as mentioned in schedule.
Strict Requirement
Plan of Talk
❖ Very Brief history of Linux
❖ Let's Build Kernel right away
❖ Uh………..But where is my driver?
❖ Writing your first Linux Kernel Module
❖ Send it to Mail
Hope you all are ready with prerequisites that I mentioned
Check these packages:
# yum install ncurses-devel
# yum install rsyslog
# yum install gcc
Start the Game
Source Code Uncompress
To extract code at desired location,
# tar -Jxvf linux-3.12.42.tar.xz -C /usr/src
Enter into Directory
# cd /usr/src
Create a link to original one
# ln -s linux-3.x.x/ linux-fudcon
# cd linux-fudcon/
Start Compilation
To clean config+prev backup+prev files
# make mrproper
To copy old config file
# cp /usr/src/kernels/3.10.x/.config /usr/src/linux-fudcon/
To start build
# make localmodconfig
Time to create image
# make bzImage
To compile modules only
# make modules
To install modules
# make modules_install
Time to install the Kernel images
# make install
Time to reboot as compilation process completed
# reboot
Hello World Module
Create a dir at non-root user location
$ cd Documents/LKP/
https://github.com/ramlaxman/LKP/
Contains two files:
- hello.c
- Makefile (Be careful with name and its contents)
Now go to Directory of Modules
$ make
Loading Module….
Log in as root
# insmod hello.ko
# lsmod | less
# tail -f /var/log/messages
Now unload module
# rmmod hello
# dmesg
Create a patch
Now make create copy of hello.c and make
changes into that:
$ cp hello.c hello1.c
After making changes,
$ diff -u hello.c hello1.c > hello.patch
Apply patch,
$ patch < hello.patch
Send your patch to:
kernel-training@lukaselsner.de
[Will disabled later]
Use thunderbird settings.
Thanks to:
Lukas Elsner: For email Domains
Greg Kroah-hartman: For advice on building kernel like
Speedy Machine
and of course,
Audience !!

More Related Content

What's hot

Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014
D
 

What's hot (20)

SELF 2014: PBI v10: Application Management Made Easy
SELF 2014: PBI v10: Application Management Made EasySELF 2014: PBI v10: Application Management Made Easy
SELF 2014: PBI v10: Application Management Made Easy
 
Installation of LAMP Server with Ubuntu 14.10 Server Edition
Installation of LAMP Server with Ubuntu 14.10 Server EditionInstallation of LAMP Server with Ubuntu 14.10 Server Edition
Installation of LAMP Server with Ubuntu 14.10 Server Edition
 
Nelf2012
Nelf2012Nelf2012
Nelf2012
 
Practical Introduction To Linux
Practical Introduction To LinuxPractical Introduction To Linux
Practical Introduction To Linux
 
Plesk CLI Wrapper
Plesk CLI WrapperPlesk CLI Wrapper
Plesk CLI Wrapper
 
BayLISA - FreeNAS 10 by Jordan Hubbard
BayLISA - FreeNAS 10 by Jordan HubbardBayLISA - FreeNAS 10 by Jordan Hubbard
BayLISA - FreeNAS 10 by Jordan Hubbard
 
Docker techzone
Docker techzoneDocker techzone
Docker techzone
 
Develop and deploy haskell with docker
Develop and deploy haskell with dockerDevelop and deploy haskell with docker
Develop and deploy haskell with docker
 
Launching containers with fleet
Launching containers with fleetLaunching containers with fleet
Launching containers with fleet
 
Nycbsdcon14
Nycbsdcon14Nycbsdcon14
Nycbsdcon14
 
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
 
Jenkins, Bhyve, and Webdriver: Continuous Integration testing on FreeNAS by C...
Jenkins, Bhyve, and Webdriver: Continuous Integration testing on FreeNAS by C...Jenkins, Bhyve, and Webdriver: Continuous Integration testing on FreeNAS by C...
Jenkins, Bhyve, and Webdriver: Continuous Integration testing on FreeNAS by C...
 
AWS 기반 Docker, Kubernetes
AWS 기반 Docker, KubernetesAWS 기반 Docker, Kubernetes
AWS 기반 Docker, Kubernetes
 
Phoenix Servers with Docker and Nginx
Phoenix Servers with Docker and NginxPhoenix Servers with Docker and Nginx
Phoenix Servers with Docker and Nginx
 
Puppet Intfrastructure as Code
Puppet Intfrastructure as CodePuppet Intfrastructure as Code
Puppet Intfrastructure as Code
 
Light my-fuse
Light my-fuseLight my-fuse
Light my-fuse
 
Kernel compilation
Kernel compilationKernel compilation
Kernel compilation
 
Dockerize Me: Distributed PHP applications with Symfony, Docker, Consul and A...
Dockerize Me: Distributed PHP applications with Symfony, Docker, Consul and A...Dockerize Me: Distributed PHP applications with Symfony, Docker, Consul and A...
Dockerize Me: Distributed PHP applications with Symfony, Docker, Consul and A...
 
Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014Dockerizing Symfony Applications - Symfony Live Berlin 2014
Dockerizing Symfony Applications - Symfony Live Berlin 2014
 
CoreOS : 설치부터 컨테이너 배포까지
CoreOS : 설치부터 컨테이너 배포까지CoreOS : 설치부터 컨테이너 배포까지
CoreOS : 설치부터 컨테이너 배포까지
 

Similar to Compiling linux kernel and submit first patch

Docker workshop
Docker workshopDocker workshop
Docker workshop
Evans Ye
 

Similar to Compiling linux kernel and submit first patch (20)

Docker for mere mortals
Docker for mere mortalsDocker for mere mortals
Docker for mere mortals
 
Docker, c'est bonheur !
Docker, c'est bonheur !Docker, c'est bonheur !
Docker, c'est bonheur !
 
Docker - A Ruby Introduction
Docker - A Ruby IntroductionDocker - A Ruby Introduction
Docker - A Ruby Introduction
 
Docker
DockerDocker
Docker
 
Docker use dockerfile
Docker use dockerfileDocker use dockerfile
Docker use dockerfile
 
Software Packaging for Cross OS Distribution
Software Packaging for Cross OS DistributionSoftware Packaging for Cross OS Distribution
Software Packaging for Cross OS Distribution
 
Docker perl build
Docker perl buildDocker perl build
Docker perl build
 
Powercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptxPowercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptx
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and Production
 
Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)
Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)
Puppet Camp Chicago 2014: Docker and Puppet: 1+1=3 (Intermediate)
 
Docker
DockerDocker
Docker
 
Docker Ecosystem on Azure
Docker Ecosystem on AzureDocker Ecosystem on Azure
Docker Ecosystem on Azure
 
Docker in Action
Docker in ActionDocker in Action
Docker in Action
 
Linux
LinuxLinux
Linux
 
Os dev tool box
Os dev tool boxOs dev tool box
Os dev tool box
 
Lab docker
Lab dockerLab docker
Lab docker
 
Docker
DockerDocker
Docker
 
Docker workshop
Docker workshopDocker workshop
Docker workshop
 
Introduction to Linux Kernel Development
Introduction to Linux Kernel DevelopmentIntroduction to Linux Kernel Development
Introduction to Linux Kernel Development
 
Docker and containers - Presentation Slides by Priyadarshini Anand
Docker and containers - Presentation Slides by Priyadarshini AnandDocker and containers - Presentation Slides by Priyadarshini Anand
Docker and containers - Presentation Slides by Priyadarshini Anand
 

Recently uploaded

Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 

Recently uploaded (20)

Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 

Compiling linux kernel and submit first patch

  • 1. Compiling Linux Kernel & Submit First Patch Speaker: Mr Mayur S Patil, Asst Prof, MITAOE.
  • 2. As linux kernel compilation is daunting task, so to save our time I request to the participants coming for this workshop must have following things preinstalled: > VMware Player (If possible, VMware tools also) > Virtualbox > Guest and Host Linux Installed (Fedora or CentOS) > Thunderbird Email client as mentioned in schedule. Strict Requirement
  • 3. Plan of Talk ❖ Very Brief history of Linux ❖ Let's Build Kernel right away ❖ Uh………..But where is my driver? ❖ Writing your first Linux Kernel Module ❖ Send it to Mail
  • 4. Hope you all are ready with prerequisites that I mentioned Check these packages: # yum install ncurses-devel # yum install rsyslog # yum install gcc Start the Game
  • 5. Source Code Uncompress To extract code at desired location, # tar -Jxvf linux-3.12.42.tar.xz -C /usr/src Enter into Directory # cd /usr/src Create a link to original one # ln -s linux-3.x.x/ linux-fudcon # cd linux-fudcon/
  • 6. Start Compilation To clean config+prev backup+prev files # make mrproper To copy old config file # cp /usr/src/kernels/3.10.x/.config /usr/src/linux-fudcon/ To start build # make localmodconfig
  • 7. Time to create image # make bzImage To compile modules only # make modules To install modules # make modules_install
  • 8. Time to install the Kernel images # make install Time to reboot as compilation process completed # reboot
  • 9. Hello World Module Create a dir at non-root user location $ cd Documents/LKP/ https://github.com/ramlaxman/LKP/ Contains two files: - hello.c - Makefile (Be careful with name and its contents) Now go to Directory of Modules $ make
  • 10. Loading Module…. Log in as root # insmod hello.ko # lsmod | less # tail -f /var/log/messages Now unload module # rmmod hello # dmesg
  • 11. Create a patch Now make create copy of hello.c and make changes into that: $ cp hello.c hello1.c After making changes, $ diff -u hello.c hello1.c > hello.patch Apply patch, $ patch < hello.patch
  • 12. Send your patch to: kernel-training@lukaselsner.de [Will disabled later] Use thunderbird settings.
  • 13. Thanks to: Lukas Elsner: For email Domains Greg Kroah-hartman: For advice on building kernel like Speedy Machine and of course, Audience !!