4.4.2ÀýÀÇ (5)¿¡¼ start_kernelÀÌ ºÒ¸®´Âµ¥ ¿©±â ºÎÅͰ¡ ÀÏ¹Ý ÀûÀÎ Ä¿³ÎÀÇ ½ÃÀÛÀ̶ó°í »ý°¢ÇÏ¸é µÈ´Ù.
start_kernel Àü ±îÁö´Â ¸®´ª½º Ä¿³ÎÀÌ ½ÇÇàµÇ±â À§ÇÑ ±âº» ÀûÀÎ ÃʱâÈ µîÀ» ÇØ³õÀº »óŶó°í »ý°¢ÇÏ¸é µÈ´Ù. ¾Æ·¡¿¡ start_kernel()¸¸À» ¹ßÃéÇØ ³ù´Ù. ¶Ç Ä¿³Î ºÎÆÃ Áß ³²Àº ±â·ÏÀº 5.8Àý¸¦ ÂüÁ¶ ¹Ù¶õ´Ù.
/*
* Activate the first processor.
*/
asmlinkage void __init start_kernel(void)
{
char * command_line;
unsigned long mempages;
extern char saved_command_line[];
/*
* Interrupts are still disabled. Do necessary setups, then
* enable them
*/
(1)
lock_kernel();
(2)
printk(linux_banner);
(3)
setup_arch(&command_line);
(4)
printk("Kernel command line: %s\n", saved_command_line);
(5)
parse_options(command_line);
(6)
trap_init();
(7)
init_IRQ();
(8)
sched_init();
(9)
softirq_init();
(10)
time_init();
/*
* HACK ALERT! This is early. We're enabling the console before
* we've done PCI setups etc, and console_init() must be aware of
* this. But we do want output early, in case something goes wrong.
*/
(11)
console_init();
#ifdef CONFIG_MODULES
(12)
init_modules();
#endif
if (prof_shift) {
unsigned int size;
/* only text is profiled */
prof_len = (unsigned long) &_etext - (unsigned long) &_stext;
prof_len >>= prof_shift;
size = prof_len * sizeof(unsigned int) + PAGE_SIZE-1;
prof_buffer = (unsigned int *) alloc_bootmem(size);
}
(13)
kmem_cache_init();
(14)
sti();
(15)
calibrate_delay();
#ifdef CONFIG_BLK_DEV_INITRD
if (initrd_start && !initrd_below_start_ok &&
initrd_start < min_low_pfn << PAGE_SHIFT) {
printk(KERN_CRIT "initrd overwritten (0x%08lx < 0x%08lx) - "
"disabling it.\n",initrd_start,min_low_pfn << PAGE_SHIFT);
initrd_start = 0;
}
#endif
(16)
mem_init();
(17)
kmem_cache_sizes_init();
pgtable_cache_init();
mempages = num_physpages;
(18)
fork_init(mempages);
(19)
proc_caches_init();
(20)
vfs_caches_init(mempages);
buffer_init(mempages);
page_cache_init(mempages);
#if defined(CONFIG_ARCH_S390)
ccwcache_init();
#endif
signals_init();
#ifdef CONFIG_PROC_FS
proc_root_init();
#endif
#if defined(CONFIG_SYSVIPC)
(21)
ipc_init();
#endif
(22)
check_bugs();
printk("POSIX conformance testing by UNIFIX\n");
/*
* We count on the initial thread going ok
* Like idlers init is an unlocked kernel thread, which will
* make syscalls (and thus be locked).
*/
(23)
smp_init();
(24)
rest_init();
} |
const char *linux_banner =
"Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n"; |
ÀÌ ³»¿ëÀº ºÎÆÃÇÒ ¶§ ¾Æ·¡¿Í °°ÀÌ Ãâ·ÂµÇ°í /var/log/dmesgÀÇ Ã¹ ÁÙ¿¡ ±â·ÏµÈ´Ù.
Linux version 2.4.16 (root@localhost) (gcc version 2.95.3 20010315 (release)) #22 2002. 02. 27. (¼ö) 13:30:14 KST |
ÇØ¼®µÈ ¿É¼ÇÀº '='°¡ ÀÖÀ¸¸é ȯ°æ º¯¼ö·Î Ãë±ÞµÇ°í ¾øÀ¸¸é ¿É¼ÇÀ» ó¸®µÇ ȯ°æ º¯¼ö´Â envp_init[]¿¡ ´ã±â°í ¿É¼ÇÀº argv_init[]¿¡ ´ã±ä´Ù.
³ª¸ÓÁö¿¡ ´ëÇØ¼± 5.7Àý ÂüÁ¶