0% found this document useful (0 votes)
50 views8 pages

Linux Startup Sequence

Uploaded by

Vamsidharan v
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
50 views8 pages

Linux Startup Sequence

Uploaded by

Vamsidharan v
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 8
sXe Linux Start-Up Sequence a) * Flow of how the various kernel subsystems are started and how Linux gives control to the user space. * The Linux start-up sequence describes the series of steps that happen right from the moment a Linux system is booted on until the user is presented with a log-in prompt on the console. The Linux start-up sequence can be split into three phases. Boot loader phase: Typically this stage does the hardware initialization and testing, loads the ate image, and transfers control to the Linux ernel. Kernel initialization phase: This stage does the platform-specific initialization, brings up the kernel subsystems, turns on multitasking, mounts the root file system, and jumps to user space. User- space initialization phase: Typically this phase brings up the services, does network initialization, and then issues a log-in prompt The boot loader is the piece of software that starts executing immediately after the system is powered on. Boot loader is highly board and processor specific. The boot loader functionalities : the mandatory ones and the optional ones. * The mandatory boot loader functionalities are: 1.Initializing the hardware: This includes the processor, the essential controllers such as the memory controller, and the hardware devices necessary for loading the kernel such as flash. 2.Loading the kernel: The necessary software to download the kernel and copy it to the appropriate memory location. \ Hardware Initialization(Bootingj SNR This typically includes: 1. Configuring the CPU speed 2. Memory initialization, such as setting up the registers, clearing the memory,and determining the size of the onboard memory 3. Turning on the caches 4.Doing the hardware diagnostics or the POST (Power On Self-Test diagnostics) GNU Cross-Platform Toolchain * One of the initial steps in the embedded Linux movement is setting up the toolchains for building the kernel and the applications. * The toolchain that is used on embedded systems is known as the cross-platform toolchain Contd. * Any compiler requires a lot of support libraries (such as libc) and binaries (such as assemblers and linkers). * One would require a similar set of tools for cross-compilation too. This whole set of tools, binaries, and libraries is collectively called the cross-platform toolchain Contd. * The most reliable open source compiler toolkit available across various platforms is the GNU compiler and its accessory tools are called the GNU toolchain. * These compilers are backed up by a host of developers across the Internet and tested by millions of people across the globe on various platforms Contd. * Across-platform toolchain has the components listed below. Binutils: Binutils are a set of programs necessary for compilation/linking/ assembling and other debugging operations. GNU C compiler: The basic C compiler used for generating object code (both kernel and applications). GNU C library: This library implements the system call APIs such as open, read, and so on, and other support functions. All applications that are developed need to be linked against this base library. Contd. + Some of the utilities that constitute binutils are the following. * addr2line: It translates program addresses into file names and line numbers. Given an address and an executable, it uses the debugging information in the executable to figure out which file name and line number are associated with a given address. + ar: The GNU ar program creates, modifies, and extracts from archives. ‘An archive is a single file holding a collection of other files in a structure that makes it possible to retrieve the original individual files (called members of the archive) Contd. * as: GNU as is a family of assemblers. If you use (or have used) the GNU assembler on one architecture, you should find a fairly similar environment when you use it on another architecture. * Each version has much in common with the others, including object file formats, most assembler directives (often called pseudo-ops), and assembler syntax. enn To be able to select the next task to run, the scheduler itself must execute at the end of each time slice. The end of a time slice is not the only place that the scheduler can select a new task to run. The scheduler will also select a new task to run immediately after the currently executing task enters the Blocked state, or when an interrupt moves a higher priority task into the Ready state. A periodic interrupt, called the tick interrupt, is used for this purpose. Contd. The length of the time slice is effectively set by the tick interrupt frequency, which is configured by the application-defined configTICK_RATE_HZ compile-time configuration constant within FreeRTOSConfig.h. For example, if configTICK_RATE_HZ is set to 100 (Hz), then the time slice will be 10 milliseconds. The time between two tick interrupts is called the tick period. One time slice equals one tick period. Contd. FreeRTOS is customised using a configuration file called FreeRTOSConfig.h. FreeRTOSConfig.h tailors the RTOS kernel to the application being built

You might also like