summaryrefslogtreecommitdiffstats
path: root/sys/boot/sparc64/loader/metadata.c
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2002-11-10 19:17:36 +0000
committerjake <jake@FreeBSD.org>2002-11-10 19:17:36 +0000
commit73d398d702d8489985977353b7f67aaabb9d840c (patch)
treeafef4c9c5cb095c3438e4a1874a05286c64fec0e /sys/boot/sparc64/loader/metadata.c
parent1ff96af1eab5b5285540c2bb95862f1687e10252 (diff)
downloadFreeBSD-src-73d398d702d8489985977353b7f67aaabb9d840c.zip
FreeBSD-src-73d398d702d8489985977353b7f67aaabb9d840c.tar.gz
Change the device path representation in libofw to use the full firmware
path, instead of an internal i386 specific one. Don't try to interpret a disklabel in ofw_disk.c, open the partition's device node directly and let the firmware do it. This fixes booting from a partition other than 'a' on sparc64, which is needed to support more installation methods. No objection: ppc
Diffstat (limited to 'sys/boot/sparc64/loader/metadata.c')
-rw-r--r--sys/boot/sparc64/loader/metadata.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/sys/boot/sparc64/loader/metadata.c b/sys/boot/sparc64/loader/metadata.c
index 7f0b873..5de7e7d 100644
--- a/sys/boot/sparc64/loader/metadata.c
+++ b/sys/boot/sparc64/loader/metadata.c
@@ -261,7 +261,6 @@ md_load(char *args, vm_offset_t *modulep)
struct preloaded_file *kfp;
struct preloaded_file *xp;
struct file_metadata *md;
- struct ofw_devdesc *rootdev;
vm_offset_t kernend;
vm_offset_t addr;
vm_offset_t envp;
@@ -276,17 +275,9 @@ md_load(char *args, vm_offset_t *modulep)
* This should perhaps go to MI code and/or have $rootdev tested/set by
* MI code before launching the kernel.
*/
- rootdevname = getenv("rootdev");
- ofw_getdev((void **)(&rootdev), rootdevname, NULL);
- if (rootdev == NULL) { /* bad $rootdev/$currdev */
- printf("can't determine root device\n");
- return(EINVAL);
- }
-
- /* Try reading the /etc/fstab file to select the root device */
- getrootmount(ofw_fmtdev((void *)rootdev));
-
- free(rootdev);
+ if ((rootdevname = getenv("rootdev")) == NULL)
+ rootdevname = getenv("currdev");
+ getrootmount(rootdevname);
/* find the last module in the chain */
addr = 0;
OpenPOWER on IntegriCloud