http://lists.arm.linux.org.uk/lurker/message/20011005.154003.5d698445.html
What runs first depends on what type of kernel you start running.
Compressed kernel (aka zImage):
- the startup code in arch/arm/boot/compressed/head.S (start label)
(and maybe some other architecture specific code in other head-*.S files in that directory). - Decompressor proper (via decompress_kernel) in arch/arm/boot/compressed/misc.c which gunzips the kernel.
- We then relocate the kernel if required, and call it.
This is where we join the uncompressed kernel startup.
- arch/arm/kernel/head-armv.S (Edit head.S and head-*.S ) describes this, and includes such things as:
page table initialization and processor cache initialization
(via support stuff in arch/arm/mm/proc-*.S). - We then proceed to start_kernel in init/main.c, and everything follows from that point on.
- The only other thing to note is that the various drivers are initialized via a table built by the linker from the __initcall() and module_init() statements scattered throughout the kernel source. The code which calls them can be found in init/main.c: do_initcalls().
Nessun commento:
Posta un commento