Structure of a startup program

Each startup program consists of a main() with the following structure (in pseudo code):

Global variables

main()
{
    Call add_callout_array()

    Argument parsing (Call handle_common_option())


    Call init_raminfo()
    Remove ram used by modules in the image

    if (virtual) Call init_mmu() to initialize the MMU

    Call init_intrinfo()
    Call init_qtime()
    Call init_cacheattr()
    Call init_cpuinfo()


    Set hardware machine name

    Call init_system_private()

    Call print_syspage() to print debugging output
}
Note: You should examine the commented source for each of the functions within the library to see if you need to replace a library function with one of your own.