Exemplo n.º 1
0
/*
 * Set up the root device from the boot args
 */
void
cpu_rootconf(void)
{
	set_root_device();
	printf("boot device: %s\n",
	    booted_device != NULL ? device_xname(booted_device) : "<unknown>");
	rootconf();
}
Exemplo n.º 2
0
void
cpu_rootconf(void)
{
	cpu_bootconf();

	aprint_normal("boot device: %s\n",
	    booted_device ? device_xname(booted_device) : "<unknown>");
	rootconf();
}
Exemplo n.º 3
0
void
cpu_rootconf(void)
{

	if (booted_device == NULL)
		printf("WARNING: can't figure what device matches \"%s\"\n",
		    bootinfo.booted_dev);
	rootconf();
}
Exemplo n.º 4
0
void
cpu_rootconf(void)
{
	if (booted_device == NULL) {
		printf("FATAL: boot device not found, check your firmware "
		    "settings!\n");
	}

	rootconf();
}
Exemplo n.º 5
0
void
cpu_rootconf(void)
{
	findroot();

	printf("boot device: %s\n",
		booted_device ? device_xname(booted_device) : "<unknown>");

	rootconf();
}
Exemplo n.º 6
0
/*
 * Set up the root device from the boot args
 */
void
cpu_rootconf(void)
{
#ifndef MEMORY_DISK_IS_ROOT
	set_root_device();
#endif
	aprint_normal("boot device: %s\n",
	    booted_device != NULL ? device_xname(booted_device) : "<unknown>");
	rootconf();
}
void
cpu_rootconf(void)
{

	findroot();
	matchbiosdisks();

	aprint_normal("boot device: %s\n",
	    booted_device ? device_xname(booted_device) : "<unknown>");
	rootconf();
}
Exemplo n.º 8
0
void
cpu_rootconf(void)
{

	/* XXXCGD don't know how to find the root device */

	printf("boot device: %s\n",
		booted_device ? device_xname(booted_device) : "<unknown>");

	rootconf();
}
Exemplo n.º 9
0
/*
 * Choose root and swap devices.
 */
void 
cpu_rootconf(void)
{
	struct prom_n2f *nf;
	const char *devname;
	findfunc_t find;
	char promname[4];
	char partname[4];
	const char *prompath;
	int prom_ctlr, prom_unit, prom_part;

	/* Get the PROM boot path and take it apart. */
	prompath = prom_getbootpath();
	if (prompath == NULL)
		prompath = "zz(0,0,0)";
	promname[0] = *(prompath++);
	promname[1] = *(prompath++);
	promname[2] = '\0';
	prom_ctlr = prom_unit = prom_part = 0;
	if (*prompath == '(' &&
	    *(prompath = str2hex(++prompath, &prom_ctlr)) == ',' &&
	    *(prompath = str2hex(++prompath, &prom_unit)) == ',') 
		(void)str2hex(++prompath, &prom_part);

	/* Default to "unknown" */
	booted_device = NULL;
	booted_partition = 0;
	devname = "<unknown>";
	partname[0] = '\0';
	find = NULL;

	/* Do we know anything about the PROM boot device? */
	for (nf = prom_dev_table; nf->func; nf++)
		if (!strcmp(nf->name, promname)) {
			find = nf->func;
			break;
		}
	if (find)
		booted_device = (*find)(promname, prom_ctlr, prom_unit);
	if (booted_device) {
		devname = device_xname(booted_device);
		if (device_class(booted_device) == DV_DISK) {
			booted_partition = prom_part & 7;
			partname[0] = 'a' + booted_partition;
			partname[1] = '\0';
		}
	}

	printf("boot device: %s%s\n", devname, partname);
	rootconf();
}
Exemplo n.º 10
0
void
cpu_rootconf(void)
{
	extern char *usermode_root_device;
	device_t rdev;

	if (usermode_root_device != NULL) {
		rdev = device_find_by_xname(usermode_root_device);
	} else {
		rdev = device_find_by_xname("ld0");
		if (rdev == NULL)
			rdev = device_find_by_xname("md0");
	}

	aprint_normal("boot device: %s\n",
	    rdev ? device_xname(rdev) : "<unknown>");
	booted_device = rdev;
	rootconf();
}
Exemplo n.º 11
0
void
cpu_rootconf(void)
{

	findroot();
#if defined(MEMORY_DISK_HOOKS)
	/*
	 * XXX
	 * quick hacks for atari's traditional "auto-load from floppy on open"
	 * installation md(4) ramdisk.
	 * See sys/arch/atari/dev/md_root.c for details.
	 */
#define RAMD_NDEV	3	/* XXX */

	if ((boothowto & RB_ASKNAME) != 0) {
		int md_major, i;
		cfdata_t cf;
		struct md_softc *sc;

		md_major = devsw_name2blk("md", NULL, 0);
		if (md_major >= 0) {
			for (i = 0; i < RAMD_NDEV; i++) {
				cf = malloc(sizeof(*cf), M_DEVBUF,
				    M_ZERO|M_WAITOK);
				if (cf == NULL)
					break;	/* XXX */
				cf->cf_name = md_cd.cd_name;
				cf->cf_atname = md_cd.cd_name;
				cf->cf_unit = i;
				cf->cf_fstate = FSTATE_STAR;
				/* XXX mutex */
				sc = device_private(config_attach_pseudo(cf));
				if (sc == NULL)
					break;	/* XXX */
			}
		}
	}
#endif
	rootconf();
}
Exemplo n.º 12
0
void
cpu_rootconf(void)
{

	rootconf();
}
Exemplo n.º 13
0
void
cpu_rootconf(void)
{
	device_t dv;
	char *p;
	const char *bootdev_name, *netdev_name;
	int unit, partition;

	/* Extract boot device */
	for (p = __boot_kernel_name; *p; p++) {
		if (*p == ':') {
			*p = '\0';
			break;
		}
	}
	p = __boot_kernel_name;

	bootdev_name = 0;
	unit = 0;

	switch (SBD_INFO->machine) {
#ifdef EWS4800_TR2
	case MACHINE_TR2:
		netdev_name = "iee0";
		break;
#endif
#ifdef EWS4800_TR2A
	case MACHINE_TR2A:
		netdev_name = "le0";
		break;
#endif
	default:
		netdev_name = NULL;
	}
	partition = 0;

	if (strncmp(p, "sd", 2) == 0) {
		unit = p[2] - '0';
		partition = p[3] - 'a';
		if (unit >= 0 && unit <= 9 && partition >= 0 &&
		    partition < MAXPARTITIONS) {
			p[3] = '\0';
			bootdev_name = __boot_kernel_name;
		}
	} else if (strncmp(p, "nfs", 3) == 0) {
		bootdev_name = netdev_name;
	} else if (strncmp(p, "mem", 3) == 0) {
		int bootdev = (*platform.ipl_bootdev)();
		if (bootdev == NVSRAM_BOOTDEV_HARDDISK)
			bootdev_name = "sd0";
		else if (bootdev == NVSRAM_BOOTDEV_NETWORK)
			bootdev_name = netdev_name;
		else
			bootdev_name = 0;
	}

	if (bootdev_name &&
	    (dv = device_find_by_xname(bootdev_name)) != NULL) {
		booted_device = dv;
		booted_partition = partition;
	}
	rootconf();
}
Exemplo n.º 14
0
void
disk_configure()
{
	rootconf();
	dumpconf();
}