Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

System Booting Process overview

8.473 Aufrufe

Veröffentlicht am

This PPT shares some information on what is booting process and different stages in it. Importance of BIOS and BootROM. Steps involved for loading kernel into RAM. What is the importance of init RAM disk (initrd), when 1st user space application is started and who will create init process.

Veröffentlicht in: Bildung

System Booting Process overview

  1. 1. Booting Process By Raj Kumar Rampelli
  2. 2. What is Booting Process ?  Sequence of operations for initialization of hardware blocks including the memory controller, the processor and I/O peripherals etc.
  3. 3. Booting process in x86 based devicePower on device Start executing code in BIOS (H/W initialization), stored in EEPROM flash memory (Boot Flash) and Load Boot Vector Machine start to execute at fixed location 0xFFFFFFF0 (Boot Vector)  Loading Boot Vector BIOS loads Bootloader (ex: GRUB) to select & load OS from multiple OSes installed on hard disks Bootloader loads OS image (boot.img) into RAM by using Boot sector (of size 512MB) on disk (Master Boot Record in windows terminology)
  4. 4. Booting process in ARM based devicePower on Device BootROM start execution, do H/W Initialization and Load Boot Vector Machine start to execute at fixed location 0x0 (RESET) BootROM reads bootable device info from fuse register to load Bootloader. BootROM loads Bootloader Bootloader loads Kernel
  5. 5. Booting Stages….!!  BIOS/BootROM stored in flash memory on mother-board  BIOS/BootROM Tasks:  Power-On Self Test (POST)  H/W Initialization  Initialization of  SDRAM: Read BCT (Board Configuration Table) file, initialize and configure SDRAM  Cache memory  Memory controller  Clocks  Loading Boot Vector  Loading Bootloader  BootROM/BIOS reads BCT file and loads Bootloader into SDRAM  Perform all these operations in AVP (Audio Video Processor) mode only  Bootloader Tasks  1st stage Bootloader  2nd stage Bootloader
  6. 6. Bootloader Tasks (1st stage Bootloader)  Runs in AVP (Audio Video Processor)  Read BCT file and Initializes SDRAM  Check Battery level  If its value is meeting the target battery level then continue booting process  Else charge the device  Read BCT for 2nd stage Bootloader location  Load 2nd stage Bootloader into SDRAM  Initialize clock sources and enable clocks to required peripherals  Enable UART  Initialize CPU and transfer control to 2nd stage Bootloader  Power up CPU  Enable CPU clock  Take CPU out of the reset
  7. 7. Bootloader Tasks (2nd stage Bootloader)  Run in CPU mode  CPU tasks  Initialize & enable Cache memory  Configure General Interrupt Controller  Enable Timer & enable MMU  Initialize Page tables  Power on display  Provide booting options to select  Fastboot  Continue booting  Read GPT (General Partition Table) for kernel location  Load initrd (initial RAM Disk) into RAM and mounted  Serves as temporary root file system in RAM and allows kernel to boot without having to mount any phisical disks.  After kernel is booted, this file system in unmounted and real root file system is mounted.  Load compressed Kernel image (zImage) into memory  Prepare Kernel command line data to pass it to kernel  Disable MMU and cache, now jump to kernel
  8. 8. The Kernel  Bootloader loads compressed kernel image (zImage) into memory  A Routine (at Head of Kernel Image) uncompresses the Kernel and places into high memory start () •When zImage is invoked, the control begins at start() function located at arch/<arm/i386>/boot/head.S and do basic h/w setup Startup_32() •Located in arch/<arm/i386>/boot/compressed/head.S •Startup_32() setup environment ex: stack decompress _kernel() •Located in arch/<arm/i386>/boot/compressed/misc.c •Kernel is decompressed through this call startup_32() •Located in arch/<arm/i386>/kernel/head.S •Page tables are initialized, memory paging in enabled start_kernel () •Located in init/main.c, which takes us to the non-architecture specific linux kernel •Setup Interrupts, Memory configuration, load initial RAM disk Kernel_thread () •Start the init() process, which is the first user space process. Idle task is started and scheduler takes the control when cpu_idle() called.
  9. 9. Start init process  Kernel starts 1st user application /sbin/init  1st program which compiled with std. C library  Creates init process (id=1) (parent of all process)  Start system services  Init process reads /etc/inittab and creates startup processes.  /etc/inittab contains the settings for change the process behavior and their run-levels  Run level: S/W configuration of the system that allows only selected group of processes to exist  Init runs the system in any of the below run level at a time  0 – Halt, 1 – Single user mode  2 – Multi user mode, without NFS  3 – Full multi user mode, 4 – unused, 5 – x11, 6 – Reboot  inittab instructs the init process which run level system should run at and describes the processes to be run ar each run level
  10. 10. References  Inside the Linux boot process: https://www.ibm.com/developerworks/lib rary/l-linuxboot/  Basic Boot Terminology http://stackoverflow.com/questions/1200 2089/basic-boot-terms?rq=1
  11. 11. THANK YOU  Have a look at My PPTs: http://www.slideshare.net/rampalliraj/ My Tech Blog: http://practicepeople.blogspot.in/