panic: bus_add_child is not implemented

Matías Perret Cantoni perretcantonim at gmail.com
Tue Mar 3 01:11:46 UTC 2015


Hello!

I wrote a simple newbus driver for reading and writing a specific I/O port,
which is basically a copy of the Warner Losh example driver for the iOpener
Led. I compiled with no errors, but I get a kernel panic " bus_add_child is
not implemented" when I try to load it in my development board which is a
Zedboard with FreeBSD.


The way I compiled it:

# cd /usr/src
root at matiBSD:/usr/src # make buildenv TARGET_ARCH=armv6
BUILDENV_SHELL=/usr/local/bin/bash
KERNBUILDDIR=/usr/obj/arm.armv6/usr/src/sys/ZEDBOARD
Entering world for armv6:arm
[root at matiBSD /usr/src]# cd /home/drivers/p3
[root at matiBSD /home/drivers/p3]# make


The content of the Makefile I used:

KMOD =p3
SRCS =p3.c device_if.c bus_if.h
.include <bsd.knod.mk>


The way I tried to load it:

root at zedboard:/usr # kldload /boot/msdos/p3.ko
panic: bus_add_child is not implemented
cpuid = 1


My only guess here is that I should compile the driver with the kernel so
that the linker can properly link the BUS_ADD_CHILD() method call in the
drivers identify() method.

My host is:    FreeBSD matiBSD  10.1-BETA2 FreeBSD 10.1-BETA2
My target is: FreeBSD zedboard 10.1-BETA2 FreeBSD 10.1-BETA2


I'm new at this, so any income is appreciated!

Regards,
Matias.


More information about the freebsd-arm mailing list