Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/arch/sparc64



>>> Martin Husemann <martin%netbsd.org@localhost> wrote

> Module Name:  src
> Committed By: martin
> Date:         Fri Apr  2 18:34:16 UTC 2010
> 
> Modified Files:
>       src/sys/arch/sparc64/include: bootinfo.h
>       src/sys/arch/sparc64/sparc64: autoconf.c
> 
> Log Message:
> Add a bootinfo node to allow the loader to override the boot device

This change makes -current kernel cannot boot with old ofwboot.

        NetBSD 5.99.25 (GENERIC) #37: Sun Apr  4 06:36:29 JST 2010
                takeshi@nyx:/usr/src/sys/arch/sparc64/compile/GENERIC
        total memory = 768 MB
        avail memory = 741 MB
        panic: lookup_bootinfo: No BTINFO_BOOTDEV found.

The following patch fixes the problem.

-- Takeshi Nakayama


Index: autoconf.c
===================================================================
RCS file: /cvsroot/src/sys/arch/sparc64/sparc64/autoconf.c,v
retrieving revision 1.174
diff -u -d -r1.174 autoconf.c
--- autoconf.c  2 Apr 2010 18:34:16 -0000       1.174
+++ autoconf.c  4 Apr 2010 11:34:32 -0000
@@ -356,8 +356,8 @@
        if ((chosen = OF_finddevice("/chosen")) == -1)
                return;
 
-       LOOKUP_BOOTINFO(bdev, BTINFO_BOOTDEV);
-       if (bdev) {
+       bdev = lookup_bootinfo(BTINFO_BOOTDEV);
+       if (bdev != NULL) {
                strcpy(ofbootpath, bdev->name);
        } else {
                if (OF_getprop(chosen, "bootpath", sbuf, sizeof(sbuf)) < 0)


Home | Main Index | Thread Index | Old Index