• Save
Linux Kernel Overview
Upcoming SlideShare
Loading in...5
×
 

Linux Kernel Overview

on

  • 13,227 views

 

Statistics

Views

Total Views
13,227
Views on SlideShare
7,445
Embed Views
5,782

Actions

Likes
15
Downloads
0
Comments
3

16 Embeds 5,782

http://sysplay.in 3023
http://profession.sarika-pugs.com 2091
http://www.ustudy.in 309
http://www.userspace.org 299
http://www.sysplay.in 12
http://www.techgig.com 9
http://www.linkedin.com 8
http://localhost 7
https://uml.umassonline.net 6
https://www.linkedin.com 5
url_unknown 4
http://192.168.1.5 3
http://ustudy.in 2
http://www.slideshare.net 2
http://shrishti 1
http://128.199.163.140 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • nice article sir...this article also looks good on LInux Basics..

    http://learnlinuxconcepts.blogspot.in/2014/03/explain-basics-of-linux-kernel.html
    Are you sure you want to
    Your message goes here
    Processing…
  • Thanks
    Are you sure you want to
    Your message goes here
    Processing…
  • I'T good!
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Linux Kernel Overview Linux Kernel Overview Presentation Transcript

  • Linux Kernel Overview © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> All Rights Reserved.
  • What to Expect?Ws of KernelLinux ArchitectureLinux Kernel StartupLinux Kernel FunctionalityLinux Kernel ConfigurationLinux Kernel Compilation © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 2 All Rights Reserved.
  • What is a Kernel? Core of a SystemThe Operating System© 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 3 All Rights Reserved.
  • OS CoreOS Core could be further classified as thefollowing major functionalities Inter Process Communication Minimal Memory Management Low-level Process Management & Scheduling Low-level Input / Output © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 4 All Rights Reserved.
  • Types of KernelsMicro kernel Also called the Modular kernel Contains only the OS Core Other OS stuff are typically provided as services Examples: Amoeba, Mach, QNXMonolithic kernel Contains all the OS related stuff Either built into it statically or loaded dynamically Examples: VxWorks, Linux © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 5 All Rights Reserved.
  • Micro vs Monolithic Advantages Micro Kernel Flexible Modular Easy to implement Monolithic Kernel Performance © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 6 All Rights Reserved.
  • Linux Architecture User Space (is the usage platform) Kernel Space (provides functionalities & facilities to use) Hardware (is what is to be used) System Call I/F (the connector)© 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 7 All Rights Reserved.
  • Linux Architecture DetailsUser Space Memory where user processes run Doing typical computation tasks And accesses kernel space for privileged tasks Through System Call interfaceKernel Space This is protected space Place of all privileged happening I/O access, Memory access, … (System Resources access)Kernel processes can access User processes but not vice versaThese levels are achieved by processor statesHow does system call switches user to kernel space?Check Which space is executing command from root? Do we need these levels and system calls if the kernel image and root file system are read only? © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 8 All Rights Reserved.
  • Linux Kernel StartupCPU / Platform specific Initialization CPU Speed Setup MMU Setup Board Id SetupMinimal Driver Initialization: FS specificMounting Root File SystemRemaining Driver InitializationDoing Initcall & Freeing Initial MemoryMoving to User Space by Jumping to the first user process init © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 9 All Rights Reserved.
  • Linux Kernel Functional OverviewProcess ManagementMemory ManagementDevice ManagementStorage ManagementNetwork Management © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 10 All Rights Reserved.
  • Linux Kernel SourceLets get down to the Source Code © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 11 All Rights Reserved.
  • Linux Kernel Build SystemKey components Makefile KconfigConfiguring the Makefile Setting up the kernel version (specially for the Desktops) For Cross Compilation, need to setup ARCH CROSS_COMPILE Or, invoke make with these options © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 12 All Rights Reserved.
  • Linux Kernel Configuration Methodsmake configmake menuconfigmake xconfigOthers make defconfig make oldconfig make <specific>configCheck: Where is the menuconfig target? © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 13 All Rights Reserved.
  • Linux Kernel ConfigurationCode Maturity level OptionsGeneral SetupLoadable Module SupportBlock LayerNetworkingDevice DriversFile SystemsKernel HackingSecurity OptionsCryptographic OptionsLibrary Routines © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 14 All Rights Reserved.
  • Linux Kernel CompilationCleaning Methods make clean – Simple clean make mrproper – Complete sweep clean, incl. ConfigsAlso called Building the KernelAfter configuring the kernel, we are all set to build itBuild Methods make vmlinux – To build everything configured for a kernel image make modules – To build only configured modules make – To build everything configured (kernel image & modules) make modules_prepare – To only prepare for building modules © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 15 All Rights Reserved.
  • Linux Kernel ImagesKernel Image should be understood by Stage 2 BootloaderDefault kernel compilation builds vmlinuxvmlinux is understood only by the desktop bootloadersSo, for embedded systems, we would typically have to do thefollowing Creating linux.bin using <cross>-objcopy Example: arm-linux-objcopy -O binary vmlinux linux.bin And then, convert it into the bootloader specific image using some bootloader utility. For u-boot, it is done using mkimage Example: mkimage -A arm -O linux -T kernel -C none -a 20008000 -e 20008000 -n “Custom” -d linux.bin uImage.arm © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 16 All Rights Reserved.
  • Linux Kernel Argumentsconsolerootinitrdmemresume... © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 17 All Rights Reserved.
  • What all have we learnt?Ws of KernelLinux ArchitectureLinux Kernel StartupLinux Kernel FunctionalityLinux Kernel ConfigurationLinux Kernel Compilation © 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 18 All Rights Reserved.
  • Any Queries?© 2010 Anil Kumar Pugalia <email@sarika-pugs.com> 19 All Rights Reserved.