|
在vivi里面第二阶段,main函数里面,最后阶段,应该启动linux内核吧。可我看vivi代码的时候没有看到启动linux内核啊,代码如下:
int main(int argc, char *argv[])
{
…………
init_builtin_cmds();
update_program();
/* Step 8:
* 绢叼肺 哎鳖唱?
*/
/* GPDCON = 0xaaa5aaaa;
GPDUP &= 0xfffffdff;
GPDDAT |= ~(0xfffffdff);
*/
boot_or_vivi(); //应该从这里面启动内核吧???
}
void boot_or_vivi(void)
{
char c;
int ret;
ulong boot_delay;
boot_delay = get_param_value("boot_delay", &ret);
if (ret) boot_delay = DEFAULT_BOOT_DELAY;
/* If a value of boot_delay is zero,
* unconditionally call vivi shell */
if (boot_delay == 0) vivi_shell();
/*
* wait for a keystroke (or a button press if you want.)
*/
printk("Press Return to start the LINUX now, any other key for vivi%lx\n",boot_delay);
if(boot_delay>0x300) boot_delay=0x300;
// c = awaitkey(boot_delay, NULL);
c = awaitkey(boot_delay, NULL);
if (((c != '\r') && (c != '\n') && (c != '\0')))
{
printk("type \"help\" for help.\n");
vivi_shell();
}
run_autoboot();
return;
}
void run_autoboot(void)
{
while (1) {
exec_string("boot");
printk("Failed 'boot' command. reentering vivi shell\n");
/* if default boot fails, drop into the shell */
vivi_shell();
}
}
void
vivi_shell(void)
{
#ifdef CONFIG_SERIAL_TERM
serial_term();
#else
#error there is no terminal.
#endif
}
void serial_term(void)
{
char cmd_buf[MAX_CMDBUF_SIZE];
for (;;) {
printk("%s> ", prompt);
getcmd(cmd_buf, MAX_CMDBUF_SIZE);
/* execute a user command */
if (cmd_buf[0])
exec_string(cmd_buf);
}
}
————————————————————-
一直没有找到哪里有启动内核的代码啊? 请指教 |
|