SlideShare uma empresa Scribd logo
1 de 17
Baixar para ler offline
Linux Kernel Compilation
Tushar B. Kute,
http://tusharkute.com
Linux
• Linux is not an Operating System.
• Linux is a kernel.
• A kernel is a program that allocates and
controls hardware and software
resources in a system.
• Linux Distributions use the Linux kernel
together with the GNU Operating System.
Linux Kernel- Types of releases
• The Linux kernel is currently maintained by
Linus Torvalds and a few hundred developers.
• Releases are numbered in a very ordered
fashion.
– major.minor.patchlevel
• Odd minor numbers are development kernels
– 3.18.7 latest stable kernel
– 4.0 latest development kernel
Linux Kernel- Versions
2.6.32.65
3.18.7
Major Number Minor Number Revision Stable Version
Patch Level
Linux Kernel Maintener
http://www.kernel.org
Linux Kernel Categories
• Prepatch
Prepatch or "RC" kernels are mainline kernel pre-releases that are mostly aimed at other
kernel developers and Linux enthusiasts. They must be compiled from source and usually
contain new features that must be tested before they can be put into a stable release.
Prepatch kernels are maintained and released by Linus Torvalds.
• Mainline
Mainline tree is maintained by Linus Torvalds. It's the tree where all new features are
introduced and where all the exciting new development happens. New mainline kernels are
released every 2-3 months.
• Stable
After each mainline kernel is released, it is considered "stable." Any bug fixes for a stable
kernel are backported from the mainline tree and applied by a designated stable kernel
maintainer.
• Longterm
There are usually several "longterm maintenance" kernel releases provided for the
purposes of backporting bugfixes for older kernel trees. Only important bugfixes are
applied to such kernels and they don't usually see very frequent releases, especially for
older trees.
Find out kernel version
• Find out the version of the kernel:
uname -r
Find out operating system version
• Find out the version of the kernel:
lsb_release -a
• Download the kernel source code from http://kernel.org
– Actual link:
https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.18.1.tar.xz
– Can be downloaded by command:
wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.18.1.tar.xz
– Downloaded file is: linux-3.18.1.tar.xz
• Extract the file using command or GUI:
– tar -xvf linux-3.18.1.tar.xz
Linux Kernel Compilation
Extraction using GUI
Use this option for
Extraction
Linux Source Tree Layout
/linux-3.18.1Documentation
arch
fs
init kernel
include
ipc
drivers
net
mmlib
scripts
alpha
arm
i386
ia64
m68k
mips
mips64
ppc
s390
sh
sparc
sparc64
acorn
atm
block
cdrom
char
dio
fc4
i2c
i2o
ide
ieee1394
isdn
macintosh
misc
net
…
adfs
affs
autofs
autofs4
bfs
code
cramfs
devfs
devpts
efs
ext2
fat
hfs
hpfs
…
asm-alpha
asm-arm
asm-generic
asm-i386
asm-ia64
asm-m68k
asm-mips
asm-mips64
linux
math-emu
net
pcmcia
scsi
video …
adfs
affs
autofs
autofs4
bfs
code
cramfs
devfs
devpts
efs
ext2
fat
hfs
hpfs …
802
appletalk
atm
ax25
bridge
core
decnet
econet
ethernet
ipv4
ipv6
ipx
irda
khttpd
lapb
…
• Open the terminal and change the directory to the
Linux kernel source code.
– cd linux­3.18.1
• sudo apt­get update
• sudo apt­get install libncurses5­dev
– ncurses (new curses) is a programming library that
provides an API which allows the programmer to
write text-based user interfaces in a terminal-
independent manner. It is a toolkit for developing
"GUI-like" application software that runs under a
terminal emulator.
Linux Kernel Compilation
• Configure the kernel:
– sudo make menuconfig
– Make the configuration changes as per your
requirements.
• Other ways to do configuration (optional):
– sudo make oldconfig
– sudo make xconfig
• Compile the Linux kernel:
– sudo make 
• The compilation process can be shifted to all the cores of
the system. (Next slide).
Linux Kernel Compilation
• The number of cores of the CPU can be found by:
– lscpu
Check the number cores in CPU
Number of CPU cores
32-bit Architecture
• The compilation process can be shifted to all the cores
of the system (2 cores or 4 cores).
– sudo make ­j2
• After completion of the process, install the modules.
– sudo make modules_install install
• The above command will install the Linux Kernel 3.18.1
into your system. It will create some files under /boot/
directory and it will automatically make a entry in your
grub.cfg. Check whether it made correct entry and
check for the files it created.
Linux Kernel Compilation
• The files under /boot/ directory are,
– system.map3.18.1
– vmlinuz3.18.1
– initrd.img3.18.1
– config3.18.1
• Restart your system manually or type:
– sudo reboot
• After restart, check the Linux kernel version:
– uname ­r
Linux Kernel Compilation
tushar@tusharkute.com
Thank you
This presentation is created using LibreOffice Impress 4.2.7.2, can be used freely as per GNU General Public License
Blogs
http://digitallocha.blogspot.in
http://kyamputar.blogspot.in
Web Resources
http://tusharkute.com

Mais conteúdo relacionado

Mais procurados

Embedded_Linux_Booting
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_Booting
Rashila Rr
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequence
Houcheng Lin
 

Mais procurados (20)

Linux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell ScriptingLinux systems - Linux Commands and Shell Scripting
Linux systems - Linux Commands and Shell Scripting
 
Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)
 
File systems for Embedded Linux
File systems for Embedded LinuxFile systems for Embedded Linux
File systems for Embedded Linux
 
Embedded_Linux_Booting
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_Booting
 
U-Boot - An universal bootloader
U-Boot - An universal bootloader U-Boot - An universal bootloader
U-Boot - An universal bootloader
 
Introduction to linux ppt
Introduction to linux pptIntroduction to linux ppt
Introduction to linux ppt
 
Linux Internals - Part II
Linux Internals - Part IILinux Internals - Part II
Linux Internals - Part II
 
Linux kernel modules
Linux kernel modulesLinux kernel modules
Linux kernel modules
 
Shell and its types in LINUX
Shell and its types in LINUXShell and its types in LINUX
Shell and its types in LINUX
 
Basics of boot-loader
Basics of boot-loaderBasics of boot-loader
Basics of boot-loader
 
Linux device drivers
Linux device driversLinux device drivers
Linux device drivers
 
USB Drivers
USB DriversUSB Drivers
USB Drivers
 
Linux Systems: Getting started with setting up an Embedded platform
Linux Systems: Getting started with setting up an Embedded platformLinux Systems: Getting started with setting up an Embedded platform
Linux Systems: Getting started with setting up an Embedded platform
 
Kernel module in linux os.
Kernel module in linux os.Kernel module in linux os.
Kernel module in linux os.
 
Install and configure linux
Install and configure linuxInstall and configure linux
Install and configure linux
 
Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internals
 
Linux file system
Linux file systemLinux file system
Linux file system
 
Linux Device Tree
Linux Device TreeLinux Device Tree
Linux Device Tree
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequence
 
A Quick Introduction to Linux
A Quick Introduction to LinuxA Quick Introduction to Linux
A Quick Introduction to Linux
 

Destaque

Linux Kernel Programming
Linux Kernel ProgrammingLinux Kernel Programming
Linux Kernel Programming
Nalin Sharma
 
Firewall
FirewallFirewall
Firewall
Apo
 
Best topics for seminar
Best topics for seminarBest topics for seminar
Best topics for seminar
shilpi nagpal
 

Destaque (20)

Part 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module ProgrammingPart 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module Programming
 
Signal Handling in Linux
Signal Handling in LinuxSignal Handling in Linux
Signal Handling in Linux
 
Kernel module programming
Kernel module programmingKernel module programming
Kernel module programming
 
Linux Kernel Overview
Linux Kernel OverviewLinux Kernel Overview
Linux Kernel Overview
 
Basic Linux kernel
Basic Linux kernelBasic Linux kernel
Basic Linux kernel
 
Linux Kernel Programming
Linux Kernel ProgrammingLinux Kernel Programming
Linux Kernel Programming
 
Study techniques of programming in c at kkwpss
Study techniques of programming in c at kkwpssStudy techniques of programming in c at kkwpss
Study techniques of programming in c at kkwpss
 
Unit 6 Operating System TEIT Savitribai Phule Pune University by Tushar B Kute
Unit 6 Operating System TEIT Savitribai Phule Pune University by Tushar B KuteUnit 6 Operating System TEIT Savitribai Phule Pune University by Tushar B Kute
Unit 6 Operating System TEIT Savitribai Phule Pune University by Tushar B Kute
 
Course 101: Lecture 5: Linux & GNU
Course 101: Lecture 5: Linux & GNU Course 101: Lecture 5: Linux & GNU
Course 101: Lecture 5: Linux & GNU
 
GCC, GNU compiler collection
GCC, GNU compiler collectionGCC, GNU compiler collection
GCC, GNU compiler collection
 
Kernel Module Programming
Kernel Module ProgrammingKernel Module Programming
Kernel Module Programming
 
Part 04 Creating a System Call in Linux
Part 04 Creating a System Call in LinuxPart 04 Creating a System Call in Linux
Part 04 Creating a System Call in Linux
 
Gulf Cooperation Council
Gulf Cooperation CouncilGulf Cooperation Council
Gulf Cooperation Council
 
introduction to system administration
introduction to system administrationintroduction to system administration
introduction to system administration
 
Apache Pig: A big data processor
Apache Pig: A big data processorApache Pig: A big data processor
Apache Pig: A big data processor
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administration
 
What is Compiler?
What is Compiler?What is Compiler?
What is Compiler?
 
Compiler Chapter 1
Compiler Chapter 1Compiler Chapter 1
Compiler Chapter 1
 
Firewall
FirewallFirewall
Firewall
 
Best topics for seminar
Best topics for seminarBest topics for seminar
Best topics for seminar
 

Semelhante a Part 01 Linux Kernel Compilation (Ubuntu)

Linux操作系统01 简介
Linux操作系统01 简介Linux操作系统01 简介
Linux操作系统01 简介
lclsg123
 
Kernel maintainance in Linux distributions: Debian
Kernel maintainance in Linux distributions: DebianKernel maintainance in Linux distributions: Debian
Kernel maintainance in Linux distributions: Debian
Anne Nicolas
 
unixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdfunixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdf
IxtiyorTeshaboyev
 
Module 13 - Troubleshooting
Module 13 - TroubleshootingModule 13 - Troubleshooting
Module 13 - Troubleshooting
T. J. Saotome
 

Semelhante a Part 01 Linux Kernel Compilation (Ubuntu) (20)

Linux kernel
Linux kernelLinux kernel
Linux kernel
 
Linux booting process - Linux System Administration
Linux booting process - Linux System AdministrationLinux booting process - Linux System Administration
Linux booting process - Linux System Administration
 
Building Mini Embedded Linux System for X86 Arch
Building Mini Embedded Linux System for X86 ArchBuilding Mini Embedded Linux System for X86 Arch
Building Mini Embedded Linux System for X86 Arch
 
From Zero to Hero - Contribute to Linux Kernel in 15 Minutes
From Zero to Hero - Contribute to Linux Kernel in 15 MinutesFrom Zero to Hero - Contribute to Linux Kernel in 15 Minutes
From Zero to Hero - Contribute to Linux Kernel in 15 Minutes
 
embedded-linux-120203.pdf
embedded-linux-120203.pdfembedded-linux-120203.pdf
embedded-linux-120203.pdf
 
Linux操作系统01 简介
Linux操作系统01 简介Linux操作系统01 简介
Linux操作系统01 简介
 
Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...
Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...
Embedded Webinar #13: "From Zero to Hero: contribute to Linux Kernel in 15 mi...
 
Linux Operating System. UOG MARGHAZAR Campus
 Linux Operating System. UOG MARGHAZAR Campus Linux Operating System. UOG MARGHAZAR Campus
Linux Operating System. UOG MARGHAZAR Campus
 
Building Embedded Linux Full Tutorial for ARM
Building Embedded Linux Full Tutorial for ARMBuilding Embedded Linux Full Tutorial for ARM
Building Embedded Linux Full Tutorial for ARM
 
LinuxTraining_26_Sept_2021.ppt
LinuxTraining_26_Sept_2021.pptLinuxTraining_26_Sept_2021.ppt
LinuxTraining_26_Sept_2021.ppt
 
Kernel maintainance in Linux distributions: Debian
Kernel maintainance in Linux distributions: DebianKernel maintainance in Linux distributions: Debian
Kernel maintainance in Linux distributions: Debian
 
The Linux System
The Linux SystemThe Linux System
The Linux System
 
unixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdfunixoperatingsystem-130327073532-phpapp01.pdf
unixoperatingsystem-130327073532-phpapp01.pdf
 
NXP IMX6 Processor - Embedded Linux
NXP IMX6 Processor - Embedded LinuxNXP IMX6 Processor - Embedded Linux
NXP IMX6 Processor - Embedded Linux
 
Introduction to Linux Kernel by Quontra Solutions
Introduction to Linux Kernel by Quontra SolutionsIntroduction to Linux Kernel by Quontra Solutions
Introduction to Linux Kernel by Quontra Solutions
 
Device Drivers in Linux
Device Drivers in LinuxDevice Drivers in Linux
Device Drivers in Linux
 
Operating Systems: Linux in Detail
Operating Systems: Linux in DetailOperating Systems: Linux in Detail
Operating Systems: Linux in Detail
 
CSA-lecture 6.pptx
CSA-lecture 6.pptxCSA-lecture 6.pptx
CSA-lecture 6.pptx
 
First steps on CentOs7
First steps on CentOs7First steps on CentOs7
First steps on CentOs7
 
Module 13 - Troubleshooting
Module 13 - TroubleshootingModule 13 - Troubleshooting
Module 13 - Troubleshooting
 

Mais de Tushar B Kute

Mais de Tushar B Kute (20)

01 Introduction to Android
01 Introduction to Android01 Introduction to Android
01 Introduction to Android
 
Ubuntu OS and it's Flavours
Ubuntu OS and it's FlavoursUbuntu OS and it's Flavours
Ubuntu OS and it's Flavours
 
Install Drupal in Ubuntu by Tushar B. Kute
Install Drupal in Ubuntu by Tushar B. KuteInstall Drupal in Ubuntu by Tushar B. Kute
Install Drupal in Ubuntu by Tushar B. Kute
 
Install Wordpress in Ubuntu Linux by Tushar B. Kute
Install Wordpress in Ubuntu Linux by Tushar B. KuteInstall Wordpress in Ubuntu Linux by Tushar B. Kute
Install Wordpress in Ubuntu Linux by Tushar B. Kute
 
Share File easily between computers using sftp
Share File easily between computers using sftpShare File easily between computers using sftp
Share File easily between computers using sftp
 
Implementation of FIFO in Linux
Implementation of FIFO in LinuxImplementation of FIFO in Linux
Implementation of FIFO in Linux
 
Implementation of Pipe in Linux
Implementation of Pipe in LinuxImplementation of Pipe in Linux
Implementation of Pipe in Linux
 
Basic Multithreading using Posix Threads
Basic Multithreading using Posix ThreadsBasic Multithreading using Posix Threads
Basic Multithreading using Posix Threads
 
Part 03 File System Implementation in Linux
Part 03 File System Implementation in LinuxPart 03 File System Implementation in Linux
Part 03 File System Implementation in Linux
 
Open source applications softwares
Open source applications softwaresOpen source applications softwares
Open source applications softwares
 
Introduction to Ubuntu Edge Operating System (Ubuntu Touch)
Introduction to Ubuntu Edge Operating System (Ubuntu Touch)Introduction to Ubuntu Edge Operating System (Ubuntu Touch)
Introduction to Ubuntu Edge Operating System (Ubuntu Touch)
 
Technical blog by Engineering Students of Sandip Foundation, itsitrc
Technical blog by Engineering Students of Sandip Foundation, itsitrcTechnical blog by Engineering Students of Sandip Foundation, itsitrc
Technical blog by Engineering Students of Sandip Foundation, itsitrc
 
Chapter 01 Introduction to Java by Tushar B Kute
Chapter 01 Introduction to Java by Tushar B KuteChapter 01 Introduction to Java by Tushar B Kute
Chapter 01 Introduction to Java by Tushar B Kute
 
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B KuteChapter 02: Classes Objects and Methods Java by Tushar B Kute
Chapter 02: Classes Objects and Methods Java by Tushar B Kute
 
Java Servlet Programming under Ubuntu Linux by Tushar B Kute
Java Servlet Programming under Ubuntu Linux by Tushar B KuteJava Servlet Programming under Ubuntu Linux by Tushar B Kute
Java Servlet Programming under Ubuntu Linux by Tushar B Kute
 
Module 02 Using Linux Command Shell
Module 02 Using Linux Command ShellModule 02 Using Linux Command Shell
Module 02 Using Linux Command Shell
 
Module 01 Introduction to Linux
Module 01 Introduction to LinuxModule 01 Introduction to Linux
Module 01 Introduction to Linux
 
Module 03 Programming on Linux
Module 03 Programming on LinuxModule 03 Programming on Linux
Module 03 Programming on Linux
 
See through C
See through CSee through C
See through C
 
Module 05 Preprocessor and Macros in C
Module 05 Preprocessor and Macros in CModule 05 Preprocessor and Macros in C
Module 05 Preprocessor and Macros in C
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
[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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
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...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Part 01 Linux Kernel Compilation (Ubuntu)

  • 2. Linux • Linux is not an Operating System. • Linux is a kernel. • A kernel is a program that allocates and controls hardware and software resources in a system. • Linux Distributions use the Linux kernel together with the GNU Operating System.
  • 3. Linux Kernel- Types of releases • The Linux kernel is currently maintained by Linus Torvalds and a few hundred developers. • Releases are numbered in a very ordered fashion. – major.minor.patchlevel • Odd minor numbers are development kernels – 3.18.7 latest stable kernel – 4.0 latest development kernel
  • 4. Linux Kernel- Versions 2.6.32.65 3.18.7 Major Number Minor Number Revision Stable Version Patch Level
  • 6. Linux Kernel Categories • Prepatch Prepatch or "RC" kernels are mainline kernel pre-releases that are mostly aimed at other kernel developers and Linux enthusiasts. They must be compiled from source and usually contain new features that must be tested before they can be put into a stable release. Prepatch kernels are maintained and released by Linus Torvalds. • Mainline Mainline tree is maintained by Linus Torvalds. It's the tree where all new features are introduced and where all the exciting new development happens. New mainline kernels are released every 2-3 months. • Stable After each mainline kernel is released, it is considered "stable." Any bug fixes for a stable kernel are backported from the mainline tree and applied by a designated stable kernel maintainer. • Longterm There are usually several "longterm maintenance" kernel releases provided for the purposes of backporting bugfixes for older kernel trees. Only important bugfixes are applied to such kernels and they don't usually see very frequent releases, especially for older trees.
  • 7. Find out kernel version • Find out the version of the kernel: uname -r
  • 8. Find out operating system version • Find out the version of the kernel: lsb_release -a
  • 9. • Download the kernel source code from http://kernel.org – Actual link: https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.18.1.tar.xz – Can be downloaded by command: wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.18.1.tar.xz – Downloaded file is: linux-3.18.1.tar.xz • Extract the file using command or GUI: – tar -xvf linux-3.18.1.tar.xz Linux Kernel Compilation
  • 10. Extraction using GUI Use this option for Extraction
  • 11. Linux Source Tree Layout /linux-3.18.1Documentation arch fs init kernel include ipc drivers net mmlib scripts alpha arm i386 ia64 m68k mips mips64 ppc s390 sh sparc sparc64 acorn atm block cdrom char dio fc4 i2c i2o ide ieee1394 isdn macintosh misc net … adfs affs autofs autofs4 bfs code cramfs devfs devpts efs ext2 fat hfs hpfs … asm-alpha asm-arm asm-generic asm-i386 asm-ia64 asm-m68k asm-mips asm-mips64 linux math-emu net pcmcia scsi video … adfs affs autofs autofs4 bfs code cramfs devfs devpts efs ext2 fat hfs hpfs … 802 appletalk atm ax25 bridge core decnet econet ethernet ipv4 ipv6 ipx irda khttpd lapb …
  • 12. • Open the terminal and change the directory to the Linux kernel source code. – cd linux­3.18.1 • sudo apt­get update • sudo apt­get install libncurses5­dev – ncurses (new curses) is a programming library that provides an API which allows the programmer to write text-based user interfaces in a terminal- independent manner. It is a toolkit for developing "GUI-like" application software that runs under a terminal emulator. Linux Kernel Compilation
  • 13. • Configure the kernel: – sudo make menuconfig – Make the configuration changes as per your requirements. • Other ways to do configuration (optional): – sudo make oldconfig – sudo make xconfig • Compile the Linux kernel: – sudo make  • The compilation process can be shifted to all the cores of the system. (Next slide). Linux Kernel Compilation
  • 14. • The number of cores of the CPU can be found by: – lscpu Check the number cores in CPU Number of CPU cores 32-bit Architecture
  • 15. • The compilation process can be shifted to all the cores of the system (2 cores or 4 cores). – sudo make ­j2 • After completion of the process, install the modules. – sudo make modules_install install • The above command will install the Linux Kernel 3.18.1 into your system. It will create some files under /boot/ directory and it will automatically make a entry in your grub.cfg. Check whether it made correct entry and check for the files it created. Linux Kernel Compilation
  • 16. • The files under /boot/ directory are, – system.map3.18.1 – vmlinuz3.18.1 – initrd.img3.18.1 – config3.18.1 • Restart your system manually or type: – sudo reboot • After restart, check the Linux kernel version: – uname ­r Linux Kernel Compilation
  • 17. tushar@tusharkute.com Thank you This presentation is created using LibreOffice Impress 4.2.7.2, can be used freely as per GNU General Public License Blogs http://digitallocha.blogspot.in http://kyamputar.blogspot.in Web Resources http://tusharkute.com