Beispiel #1
0
void
arch_of_init( void )
{
#if USE_RTAS
	phandle_t ph;
#endif
	int autoboot;

	devtree_init();
	node_methods_init();
	modules_init();
        setup_timers();
#ifdef CONFIG_DRIVER_PCI
	ob_pci_init();
#endif

#if USE_RTAS
	if( !(ph=find_dev("/rtas")) )
		printk("Warning: No /rtas node\n");
	else {
		ulong size = 0x1000;
		while( size < (ulong)of_rtas_end - (ulong)of_rtas_start )
			size *= 2;
		set_property( ph, "rtas-size", (char*)&size, sizeof(size) );
	}
#endif

#if 0
	/* tweak boot settings */
	autoboot = !!get_bool_res("autoboot");
#endif
	autoboot = 0;
	if( !autoboot )
		printk("Autobooting disabled - dropping into OpenFirmware\n");
	setenv("auto-boot?", autoboot ? "true" : "false" );
	setenv("boot-command", "briqboot");

#if 0
	if( get_bool_res("tty-interface") == 1 )
#endif
		fword("activate-tty-interface");

	/* hack */
	device_end();
	bind_func("briqboot", boot );
}
Beispiel #2
0
void
arch_of_init( void )
{
	mol_phandle_t ph;
	int autoboot;

	devtree_init();
	node_methods_init();
	nvram_init("/pci/mac-io/nvram");
	openbios_init();
	modules_init();
	pseudodisk_init();
	osiblk_init();
	osiscsi_init();
	init_video();

	if( (ph=prom_find_device("/rtas")) == -1 )
		printk("Warning: No /rtas node\n");
	else {
		unsigned long size = 0x1000;
		while( size < (unsigned long)of_rtas_end - (unsigned long)of_rtas_start )
			size *= 2;
		prom_set_prop( ph, "rtas-size", (char*)&size, sizeof(size) );
	}

	/* tweak boot settings */
	autoboot = !!get_bool_res("autoboot");
	if( !autoboot )
		printk("Autobooting disabled - dropping into OpenFirmware\n");
	setenv("auto-boot?", autoboot ? "true" : "false" );
	setenv("boot-command", "molboot");

	if( get_bool_res("tty-interface") == 1 )
		fword("activate-tty-interface");

	/* hack */
	device_end();
	bind_func("molboot", boot );
}