From owner-freebsd-arm@FreeBSD.ORG Tue Mar 3 01:11:46 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56056F83 for ; Tue, 3 Mar 2015 01:11:46 +0000 (UTC) Received: from mail-qg0-x234.google.com (mail-qg0-x234.google.com [IPv6:2607:f8b0:400d:c04::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0F80C6CA for ; Tue, 3 Mar 2015 01:11:46 +0000 (UTC) Received: by mail-qg0-f52.google.com with SMTP id l89so16368255qgf.11 for ; Mon, 02 Mar 2015 17:11:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=M2qWHQLeR+gv7u7X9ETGIlYP7OkboVtXig71bipR7aA=; b=IiiSu6GpSlU2yYvu87vSqeuRl31313eHr8iemhlqijTQzWOfwxfL/MhtWJXem2knEj AMfTKjRql6YTz9E68wY6XWooH92TAMK831j+DmHlG0h43+EwQC6ePph4+SnKn12Ohpfs KcQNqHtZ6NiqQoKU4TuP3awlI9Kfa0DdNg0hE/rBL+w1PDT2ngzHtuECEODFFu6GB3uz UsUKxj8Ke/QNRYNvKyftUOhLdVmPKhtSiIFDL6D9ds6f/s0L47B3zRS0XJgJsTiHGfed imKSWHYnMtUi1+yvkbiUMsTs1E8Fwitqg0w0f35V9OJC5QlYnJPYn1E/CQkeEXsPsa8d yViQ== MIME-Version: 1.0 X-Received: by 10.140.234.130 with SMTP id f124mr38593444qhc.36.1425345105281; Mon, 02 Mar 2015 17:11:45 -0800 (PST) Received: by 10.140.37.82 with HTTP; Mon, 2 Mar 2015 17:11:45 -0800 (PST) Date: Mon, 2 Mar 2015 22:11:45 -0300 Message-ID: Subject: panic: bus_add_child is not implemented From: =?UTF-8?Q?Mat=C3=ADas_Perret_Cantoni?= To: freebsd-arm@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2015 01:11:46 -0000 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@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@matiBSD /usr/src]# cd /home/drivers/p3 [root@matiBSD /home/drivers/p3]# make The content of the Makefile I used: KMOD =p3 SRCS =p3.c device_if.c bus_if.h .include The way I tried to load it: root@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.