NetBSD-Bugs archive

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

kern/52704: netbsd-8 build break for OPENBLOCKS600 kernel



>Number:         52704
>Category:       kern
>Synopsis:       netbsd-8 build break for OPENBLOCKS600 kernel
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 06 14:15:00 +0000 2017
>Originator:     Kazuhiro Ito
>Release:        netbsd-8 at Nov 6 2017
>Organization:
>Environment:
Linux 4.13.0-1-amd64 #1 SMP Debian 4.13.10-1 (2017-10-30) x86_64 GNU/Linux
>Description:
OPENBLOCKS600 kernel can't be built.
>How-To-Repeat:
Build OPENBLOCKS600 kernel.
$ ./build.sh -m evbppc -u -U tools kernel=OPENBLOCKS600

#   compile  OPENBLOCKS600/obs600_autoconf.o
/usr/NetBSD/src/obj/tooldir.Linux-4.13.0-1-amd64-x86_64/bin/powerpc--netbsd-gcc -mcpu=405 -msdata=none -msoft-float -ffreestanding -fno-zero-initialized-in-bss -g -O2 -fno-strict-aliasing -fno-common -std=gnu99 -Werror -Wreturn-type -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-unreachable-code -Wno-pointer-sign -Wno-attributes -Wno-sign-compare --sysroot=/usr/NetBSD/src/obj/destdir.evbppc -D__obs405__ -Devbppc=evbppc -I. -I/usr/NetBSD/src/sys/../common/lib/libx86emu -I/usr/NetBSD/src/sys/../common/include -I/usr/NetBSD/src/sys/arch -I/usr/NetBSD/src/sys -nostdinc -DPPC_INTR_IMPL=<powerpc/intr.h> -DPPC_PCI_MACHDEP_IMPL=<powerpc/pci_machdep.h> -DSPILLSTK=1024 -DEVBPPC_HAS_MBR -DKERNBASE=0x25000 -DDEBUG -DTRAP_PANICWAIT -DDISKLABEL_EI -DEXT2FS_SYSTEM_FLAGS -DEMAC_EVENT_COUNTERS -D_KERNEL -D_KERNEL_OPT -std=gnu99 -I/usr/NetBSD/src/sys/lib/libkern/../../../common/l
 ib/libc/quad -I/usr/NetBSD/src/sys/lib/libkern/../../../common/lib/libc/string -I/usr/NetBSD/src/sys/lib/libkern/../../../common/lib/libc/arch/powerpc/string -I/usr/NetBSD/src/sys/external/bsd/ipf -I/usr/NetBSD/src/sys/external/bsd/common/include -I/usr/NetBSD/src/sys/external/bsd -I/usr/NetBSD/src/sys/external/bsd/dwc2/dist -c /usr/NetBSD/src/sys/arch/evbppc/obs405/obs600_autoconf.c -o obs600_autoconf.o
In file included from ./machine/bus_funcs.h:3:0,
                 from /usr/NetBSD/src/sys/sys/bus.h:215,
                 from /usr/NetBSD/src/sys/dev/usb/usbdivar.h:74,
                 from /usr/NetBSD/src/sys/arch/evbppc/obs405/obs600_autoconf.c:55:
/usr/NetBSD/src/sys/external/bsd/dwc2/dist/dwc2_core.h: In function 'dwc2_is_host_mode':
/usr/NetBSD/src/sys/external/bsd/dwc2/dwc2.h:67:39: error: dereferencing pointer to incomplete type 'struct dwc2_softc'
     bus_space_read_4((hsotg)->hsotg_sc->sc_iot, (hsotg)->hsotg_sc->sc_ioh, (reg))
                                       ^
./powerpc/bus_funcs.h:202:6: note: in definition of macro 'bus_space_read_4'
  ((*(t)->pbs_scalar.pbss_read_4)((t), (h), (o)))
      ^
/usr/NetBSD/src/sys/external/bsd/dwc2/dist/dwc2_core.h:1147:10: note: in expansion of macro 'DWC2_READ_4'
  return (DWC2_READ_4(hsotg, GINTSTS) & GINTSTS_CURMODE_HOST) != 0;
          ^

>Fix:
Apply below patch.

diff --git a/sys/arch/evbppc/obs405/obs600_autoconf.c b/sys/arch/evbppc/obs405/obs600_autoconf.c
index 773fb08095a7..75ad833ab84a 100644
--- a/sys/arch/evbppc/obs405/obs600_autoconf.c
+++ b/sys/arch/evbppc/obs405/obs600_autoconf.c
@@ -55,6 +55,7 @@ __KERNEL_RCSID(0, "$NetBSD: obs600_autoconf.c,v 1.7 2013/11/21 13:52:27 kiyohara
 #include <dev/usb/usbdivar.h>
 
 #include <dwc2/dwc2.h>
+#include <dwc2/dwc2var.h>
 #include "dwc2_core.h"
 
 /* This parameters was set from u-boot. */



Home | Main Index | Thread Index | Old Index