summaryrefslogtreecommitdiffstats
path: root/sys/boot/ofw/common
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/ofw/common
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/ofw/common')
-rw-r--r--sys/boot/ofw/common/main.c37
1 files changed, 2 insertions, 35 deletions
diff --git a/sys/boot/ofw/common/main.c b/sys/boot/ofw/common/main.c
index 9348135..8e201b3 100644
--- a/sys/boot/ofw/common/main.c
+++ b/sys/boot/ofw/common/main.c
@@ -32,7 +32,6 @@
#include "libofw.h"
#include "bootstrap.h"
-struct ofw_devdesc currdev; /* our current device */
struct arch_switch archsw; /* MI/MD interface boundary */
extern char end[];
@@ -123,41 +122,9 @@ main(int (*openfirm)(void *))
printf("\n");
- switch (ofw_devicetype(bootpath)) {
- case DEVT_DISK:
- currdev.d_dev = &ofwdisk;
- currdev.d_type = DEVT_DISK;
- strncpy(currdev.d_kind.ofwdisk.path, bootpath, 64);
- currdev.d_kind.ofwdisk.unit = ofwd_getunit(bootpath);
-
- if (currdev.d_kind.ofwdisk.unit == -1) {
- printf("Could not locate boot device.\n");
- OF_exit();
- }
-
- break;
-
- case DEVT_NET:
- currdev.d_dev = &netdev;
- currdev.d_type = DEVT_NET;
- strncpy(currdev.d_kind.netif.path, bootpath, 64);
- /* XXX Only works when we only look for one net device */
- currdev.d_kind.netif.unit = 0;
-
- break;
-
- case DEVT_NONE:
- default:
- printf("\n");
- printf("Could not establish type of boot device.\n");
- OF_exit();
- /* NOTREACHED */
- break;
- }
-
- env_setenv("currdev", EV_VOLATILE, ofw_fmtdev(&currdev),
+ env_setenv("currdev", EV_VOLATILE, bootpath,
ofw_setcurrdev, env_nounset);
- env_setenv("loaddev", EV_VOLATILE, ofw_fmtdev(&currdev), env_noset,
+ env_setenv("loaddev", EV_VOLATILE, bootpath, env_noset,
env_nounset);
setenv("LINES", "24", 1); /* optional */
OpenPOWER on IntegriCloud