Find the answer to your Linux question:
Results 1 to 3 of 3

Thread: Init Sequence

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Init Sequence

    Hi guys,

    I am understanding the linux start up sequence and stuck at the following:
    start_kernel() -> rest_init() -> kernel_init() -> do_basic_setup() -> do_initcalls()

    As per my understanding, we are initializing all the subsystems in do_initcalls():
    for (fn = __early_initcall_end; fn < __initcall_end; fn++)

    I could not find the definition of function pointers __early_initcall_end and __initcall_end.

    Please help me by stating where are these funciton pointer definitions.

    Thanks in advance!!


  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Search the kernel code tree?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    I searched the symbols using Source Insight.. could not find.
    Only clue I got is in
    #define INITCALLS \
    *(.initcallearly.init) \
    VMLINUX_SYMBOL(__early_initcall_end) = .; \
    *(.initcall0.init) \
    *(.initcall0s.init) \
    *(.initcall1.init) \
    *(.initcall1s.init) \
    *(.initcall2.init) \
    *(.initcall2s.init) \
    *(.initcall3.init) \
    *(.initcall3s.init) \
    *(.initcall4.init) \
    *(.initcall4s.init) \
    *(.initcall5.init) \
    *(.initcall5s.init) \
    *(.initcallrootfs.init) \
    *(.initcall6.init) \
    *(.initcall6s.init) \
    *(.initcall7.init) \

    Later how it is mapping to all subsystem init calls is the doubt.

    From trace32 debugging, I could find that all subsystem init funciton pointers are in between __early_initcall_end and __initcall_end. Ex: bt_init(), bluetooth_power_init() etc.. etc...

    But I would like to know how it is implemented in the code.

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts