Ejemplo n.º 1
0
int xboot_main(int argc, char * argv[])
{
	struct runtime_t rt;

	/* Create runtime */
	runtime_create_save(&rt, 0, 0, 0, 0);

	/* Do initial kobj */
	do_init_kobj();

	/* Do all initial calls */
	do_initcalls();

	/* Mount root filesystem */
	do_system_rootfs();

	/* Display system logo */
	do_system_logo();

	/* System autoboot */
	do_system_autoboot();

	/* Run loop */
	while(1)
	{
		/* Run shell */
		run_shell();
	}

	/* Do all exit calls */
	do_exitcalls();

	/* Destroy runtime */
	runtime_destroy_restore(&rt, 0);

	/* Xboot return */
	return 0;
}
Ejemplo n.º 2
0
/*
 * the entry of main function.
 */
int xboot_main(int argc, char * argv[])
{
	/* do all init calls */
	do_initcalls();

	/* do system xtime */
	do_system_xtime();

	/* mount root filesystem */
	do_system_rootfs();

	/* load system configure */
	do_system_cfg();

	/* load system fonts */
	do_system_fonts();

	/* check battery capacity */
	do_system_battery();

	/* wait a moment */
	do_system_wait();

	/* run loop */
	while(1)
	{
		/*
		 * normal mode
		 */
		if(xboot_get_mode() == MODE_NORMAL)
		{
			run_normal_mode();
		}

		/*
		 * shell mode
		 */
		else if(xboot_get_mode() == MODE_SHELL)
		{
			run_shell_mode();
		}

		/*
		 * memu mode
		 */
		else if(xboot_get_mode() == MODE_MENU)
		{
			run_menu_mode();
		}

		/*
		 * graphic mode
		 */
		else if(xboot_get_mode() == MODE_GRAPHIC)
		{
			run_graphic_mode();
		}

		/*
		 * application mode
		 */
		else if(xboot_get_mode() == MODE_APPLICATION)
		{
			run_application_mode();
		}
	}

	/* do all exit calls */
	do_exitcalls();

	/* xboot return */
	return 0;
}