From owner-freebsd-arm@FreeBSD.ORG Sun Aug 24 00:58:08 2014 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E427416 for ; Sun, 24 Aug 2014 00:58:08 +0000 (UTC) Received: from mail-pd0-f177.google.com (mail-pd0-f177.google.com [209.85.192.177]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E79C8320B for ; Sun, 24 Aug 2014 00:58:07 +0000 (UTC) Received: by mail-pd0-f177.google.com with SMTP id p10so17846537pdj.22 for ; Sat, 23 Aug 2014 17:58:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-type; bh=fLehKuq8aqhmUE59jrk5VjVEcUdk9M/Rtd0mjs1Br4I=; b=fo/bq+GN6PhBFsIwexHRHT/S+FG2axeFIE+K+mKo+fXAxpDqAxF9AIpcAhA7ksp1td N2kdjhxTEHRww/HyZXHyPsPI/CzXqyjrPztFc5C4rN0nN1KgynvoCLE0ZuumBmbWqVZs gMxbbFo7goBvbbtIb/bS04uiBJxkWV9T60yG8zpzq5wncjaymsMZSRP6A7fZV6LHZ8IZ oeY2vuCGE819M7a7MMQuHwUVNApIglNCh4+jDkhphyqCoKL/c3hoIOutjstkLgICfFzb Qc/rtipChGlCUpfX0LTM+EN09jSyXeYCp1pdLjNU/kAoXI1ahwGL9EhNmsmbjQmxCFbY PQGQ== X-Gm-Message-State: ALoCoQlwtkuWLiNS0xJ6UB6eg1B41OoOn9sEtAwHy7BI3UujtETMNuOpX493Ohskq0Eqxw2ppRAK X-Received: by 10.67.24.73 with SMTP id ig9mr17233418pad.67.1408841881297; Sat, 23 Aug 2014 17:58:01 -0700 (PDT) Received: from [192.168.77.199] (vdsl-66-18-222-12.broadband.nucleus.com. [66.18.222.12]) by mx.google.com with ESMTPSA id dr9sm50372816pdb.78.2014.08.23.17.57.59 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 23 Aug 2014 17:58:00 -0700 (PDT) Message-ID: <53F93895.6060905@0x544745.com> Date: Sat, 23 Aug 2014 18:57:57 -0600 From: Tom Everett User-Agent: Postbox 3.0.11 (Macintosh/20140602) MIME-Version: 1.0 To: "freebsd-arm@freebsd.org" Subject: wandboard SMP panic Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Sun, 24 Aug 2014 00:58:08 -0000 Hello everyone. I am seeing a new panic booting Wandboard: Loaded DTB from file 'wandboard-quad.dtb'. Kernel entry at 0x12000100... Kernel args: (null) KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2014 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 11.0-CURRENT #0 r270430M: Sat Aug 23 17:24:21 MDT 2014 tom@bernice:/storage/home/tom/crochet/crochet-freebsd/work/obj/arm.armv6/storage/home/tom/crochet/src/FreeBSDHead/head/sys/IMX6 arm FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 CPU: Cortex A9-r2 rev 10 (Cortex-A core) Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 Security_Ext WB disabled EABT branch prediction enabled LoUU:2 LoC:1 LoUIS:2 Cache level 1: 32KB/32B 4-way data cache WB Read-Alloc Write-Alloc 32KB/32B 4-way instruction cache Read-Alloc real memory = 2147483648 (2048 MB) avail memory = 2093891584 (1996 MB) WARNING: Some AP's failed to start FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs random device not loaded; using insecure entropy panic: Built bad topology at 0xc2510fb4. CPU mask (f) != (1) cpuid = 0 KDB: enter: panic [ thread pid 0 tid 100000 ] Stopped at $d: ldrb r15, [r15, r15, ror r15]! db> From owner-freebsd-arm@FreeBSD.ORG Sun Aug 24 10:05:38 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DCF0FB90 for ; Sun, 24 Aug 2014 10:05:38 +0000 (UTC) Received: from nibbler.fubar.geek.nz (nibbler.fubar.geek.nz [199.48.134.198]) by mx1.freebsd.org (Postfix) with ESMTP id BD0D23CAB for ; Sun, 24 Aug 2014 10:05:38 +0000 (UTC) Received: from bender.lan (97e07ab1.skybroadband.com [151.224.122.177]) by nibbler.fubar.geek.nz (Postfix) with ESMTPSA id B06BE5DEBC; Sun, 24 Aug 2014 10:05:36 +0000 (UTC) Date: Sun, 24 Aug 2014 11:05:30 +0100 From: Andrew Turner To: Tom Everett Subject: Re: wandboard SMP panic Message-ID: <20140824110530.042dfecf@bender.lan> In-Reply-To: <53F93895.6060905@0x544745.com> References: <53F93895.6060905@0x544745.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "freebsd-arm@freebsd.org" 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: Sun, 24 Aug 2014 10:05:38 -0000 On Sat, 23 Aug 2014 18:57:57 -0600 Tom Everett wrote: > > Hello everyone. I am seeing a new panic booting Wandboard: > > Loaded DTB from file 'wandboard-quad.dtb'. > > > Kernel entry at 0x12000100... > > > Kernel args: (null) > > > KDB: debugger backends: ddb > KDB: current backend: ddb > Copyright (c) 1992-2014 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, > 1994 The Regents of the University of California. All rights reserved. > FreeBSD is a registered trademark of The FreeBSD Foundation. > FreeBSD 11.0-CURRENT #0 r270430M: Sat Aug 23 17:24:21 MDT 2014 > > tom@bernice:/storage/home/tom/crochet/crochet-freebsd/work/obj/arm.armv6/storage/home/tom/crochet/src/FreeBSDHead/head/sys/IMX6 > arm > FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) > 20140512 CPU: Cortex A9-r2 rev 10 (Cortex-A core) > Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 > Security_Ext WB disabled EABT branch prediction enabled > LoUU:2 LoC:1 LoUIS:2 > Cache level 1: > 32KB/32B 4-way data cache WB Read-Alloc Write-Alloc > 32KB/32B 4-way instruction cache Read-Alloc > real memory = 2147483648 (2048 MB) > avail memory = 2093891584 (1996 MB) > WARNING: Some AP's failed to start > FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs > random device not loaded; using insecure entropy > panic: Built bad topology at 0xc2510fb4. CPU mask (f) != (1) > cpuid = 0 > KDB: enter: panic > [ thread pid 0 tid 100000 ] > Stopped at $d: ldrb r15, [r15, r15, ror r15]! > db> I had a similar problem. It turned out to be a caching issue in U-Boot. It appears to not correctly flush the dcache. You can try to run "dcache off ; dcache flush" before entering ubldr. If this fails you will need to build a version of U-Boot with the dcache disabled. Andrew From owner-freebsd-arm@FreeBSD.ORG Sun Aug 24 17:26:57 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49AE01AF for ; Sun, 24 Aug 2014 17:26:57 +0000 (UTC) Received: from mail-we0-f171.google.com (mail-we0-f171.google.com [74.125.82.171]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CD3FF3238 for ; Sun, 24 Aug 2014 17:26:56 +0000 (UTC) Received: by mail-we0-f171.google.com with SMTP id p10so12541839wes.16 for ; Sun, 24 Aug 2014 10:26:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=V1uWzIDGGsVpNqEJg6zL7L7VODFaQCm4eBlthKpglvc=; b=h40BLmy7gNJT02kxJbjJrLTGzn+H0lOHBH1RZgLNQUX8uI44xWiUxULSVL0FW6AHDw b+8BPPDNEJXOpsbGqxZQNCTKarFwRTxKkVa7EJwiYFjhsB/HM0jYQ2pHmXdZIi8HbJqL 7zyCN+ZvRzfHYauOO0iaIs+3l7um2orfIIlexCnBhcB0FZQHvmQQkhiHX8CxhYfNDuVV W627w9IFFEOws6yvU7ZYifm+cTRfV7XlTD/620vWIz/z+iqTd8FY6ae66xDkGnCU6bER hACOz2mMK/y3aREe2O+6h50TR98k46lh65MjYsqje9h0wcOvrpTam+kfH8aIxOpHgB+p yE9A== X-Gm-Message-State: ALoCoQkWmdDgoGH67mEjb67pOZd72MZ9NmsWgi3oOYvHrMgv/zQpQwyYQqJtaXX8xnIZCAhDb8BX MIME-Version: 1.0 X-Received: by 10.194.77.212 with SMTP id u20mr17663057wjw.27.1408899418457; Sun, 24 Aug 2014 09:56:58 -0700 (PDT) Received: by 10.217.70.69 with HTTP; Sun, 24 Aug 2014 09:56:58 -0700 (PDT) In-Reply-To: <1408896148.1150.62.camel@revolution.hippie.lan> References: <53F93895.6060905@0x544745.com> <20140824110530.042dfecf@bender.lan> <1408896148.1150.62.camel@revolution.hippie.lan> Date: Sun, 24 Aug 2014 10:56:58 -0600 Message-ID: Subject: Re: wandboard SMP panic From: Tom Everett To: Ian Lepore Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "freebsd-arm@freebsd.org" 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: Sun, 24 Aug 2014 17:26:57 -0000 I'm upgrading the crochet build for Wandboard to use u-boot 2014.04. Previously it was using a 2013 u-boot. I did have to upgrade the dtc to a more modern version so that uboot-2014-04 would compile. Could that have caused it? The boot command I'm using is: *setenv fdt_file wandboard-quad.dtb;fatload mmc 0:1 88000000 ubldr;bootelf 88000000;* On Sun, Aug 24, 2014 at 10:02 AM, Ian Lepore wrote: > On Sun, 2014-08-24 at 11:05 +0100, Andrew Turner wrote: > > On Sat, 23 Aug 2014 18:57:57 -0600 > > Tom Everett wrote: > > > > > > > > Hello everyone. I am seeing a new panic booting Wandboard: > > > > > > Loaded DTB from file 'wandboard-quad.dtb'. > > > > > > > > > Kernel entry at 0x12000100... > > > > > > > > > Kernel args: (null) > > > > > > > > > KDB: debugger backends: ddb > > > KDB: current backend: ddb > > > Copyright (c) 1992-2014 The FreeBSD Project. > > > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, > > > 1994 The Regents of the University of California. All rights reserved. > > > FreeBSD is a registered trademark of The FreeBSD Foundation. > > > FreeBSD 11.0-CURRENT #0 r270430M: Sat Aug 23 17:24:21 MDT 2014 > > > > > > tom@bernice > :/storage/home/tom/crochet/crochet-freebsd/work/obj/arm.armv6/storage/home/tom/crochet/src/FreeBSDHead/head/sys/IMX6 > > > arm > > > FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) > > > 20140512 CPU: Cortex A9-r2 rev 10 (Cortex-A core) > > > Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 > > > Security_Ext WB disabled EABT branch prediction enabled > > > LoUU:2 LoC:1 LoUIS:2 > > > Cache level 1: > > > 32KB/32B 4-way data cache WB Read-Alloc Write-Alloc > > > 32KB/32B 4-way instruction cache Read-Alloc > > > real memory = 2147483648 (2048 MB) > > > avail memory = 2093891584 (1996 MB) > > > WARNING: Some AP's failed to start > > > FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs > > > random device not loaded; using insecure entropy > > > panic: Built bad topology at 0xc2510fb4. CPU mask (f) != (1) > > > cpuid = 0 > > > KDB: enter: panic > > > [ thread pid 0 tid 100000 ] > > > Stopped at $d: ldrb r15, [r15, r15, ror r15]! > > > db> > > > > I had a similar problem. It turned out to be a caching issue in U-Boot. > > It appears to not correctly flush the dcache. You can try to run > > "dcache off ; dcache flush" before entering ubldr. If this fails you > > will need to build a version of U-Boot with the dcache disabled. > > > > Andrew > > That's interesting... how are y'all launching ubldr, with a 'go' > command? It's been my experience that the bootelf and bootm commands > manage the cache correctly, but go doesn't. You can launch ubldr with > bootelf (it has proper elf headers) but you can't launch the kernel > directly that way. But the stock u-boot might not have bootelf. > > -- Ian > > > -- A better world shall emerge based on faith and understanding - Douglas MacArthur From owner-freebsd-arm@FreeBSD.ORG Sun Aug 24 18:01:33 2014 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63311F67 for ; Sun, 24 Aug 2014 18:01:33 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33AAC3545 for ; Sun, 24 Aug 2014 18:01:32 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1XLaFT-000OGW-IK; Sun, 24 Aug 2014 16:02:31 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id s7OG2Stg063345; Sun, 24 Aug 2014 10:02:28 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX186ZY1RD9TdSPg7oPKnGTL/ X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: wandboard SMP panic From: Ian Lepore To: Andrew Turner In-Reply-To: <20140824110530.042dfecf@bender.lan> References: <53F93895.6060905@0x544745.com> <20140824110530.042dfecf@bender.lan> Content-Type: text/plain; charset="us-ascii" Date: Sun, 24 Aug 2014 10:02:28 -0600 Message-ID: <1408896148.1150.62.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: Tom Everett , "freebsd-arm@freebsd.org" 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: Sun, 24 Aug 2014 18:01:33 -0000 On Sun, 2014-08-24 at 11:05 +0100, Andrew Turner wrote: > On Sat, 23 Aug 2014 18:57:57 -0600 > Tom Everett wrote: > > > > > Hello everyone. I am seeing a new panic booting Wandboard: > > > > Loaded DTB from file 'wandboard-quad.dtb'. > > > > > > Kernel entry at 0x12000100... > > > > > > Kernel args: (null) > > > > > > KDB: debugger backends: ddb > > KDB: current backend: ddb > > Copyright (c) 1992-2014 The FreeBSD Project. > > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, > > 1994 The Regents of the University of California. All rights reserved. > > FreeBSD is a registered trademark of The FreeBSD Foundation. > > FreeBSD 11.0-CURRENT #0 r270430M: Sat Aug 23 17:24:21 MDT 2014 > > > > tom@bernice:/storage/home/tom/crochet/crochet-freebsd/work/obj/arm.armv6/storage/home/tom/crochet/src/FreeBSDHead/head/sys/IMX6 > > arm > > FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) > > 20140512 CPU: Cortex A9-r2 rev 10 (Cortex-A core) > > Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 > > Security_Ext WB disabled EABT branch prediction enabled > > LoUU:2 LoC:1 LoUIS:2 > > Cache level 1: > > 32KB/32B 4-way data cache WB Read-Alloc Write-Alloc > > 32KB/32B 4-way instruction cache Read-Alloc > > real memory = 2147483648 (2048 MB) > > avail memory = 2093891584 (1996 MB) > > WARNING: Some AP's failed to start > > FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs > > random device not loaded; using insecure entropy > > panic: Built bad topology at 0xc2510fb4. CPU mask (f) != (1) > > cpuid = 0 > > KDB: enter: panic > > [ thread pid 0 tid 100000 ] > > Stopped at $d: ldrb r15, [r15, r15, ror r15]! > > db> > > I had a similar problem. It turned out to be a caching issue in U-Boot. > It appears to not correctly flush the dcache. You can try to run > "dcache off ; dcache flush" before entering ubldr. If this fails you > will need to build a version of U-Boot with the dcache disabled. > > Andrew That's interesting... how are y'all launching ubldr, with a 'go' command? It's been my experience that the bootelf and bootm commands manage the cache correctly, but go doesn't. You can launch ubldr with bootelf (it has proper elf headers) but you can't launch the kernel directly that way. But the stock u-boot might not have bootelf. -- Ian From owner-freebsd-arm@FreeBSD.ORG Sun Aug 24 22:29:29 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A39C5F3 for ; Sun, 24 Aug 2014 22:29:29 +0000 (UTC) Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [IPv6:2a00:1450:400c:c05::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1491C3B2E for ; Sun, 24 Aug 2014 22:29:28 +0000 (UTC) Received: by mail-wi0-f181.google.com with SMTP id bs8so1734074wib.8 for ; Sun, 24 Aug 2014 15:29:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Jc/mQHNBJVCX1hlLUtJ0bMePS5e5LBG3NklxEHteCtE=; b=hq/zkg+lpfX/sssHaDFUot/UdlqtflFXPaCM/rT6niP/fVTgAKQpRA+VgZw93zJ8uF pTr/fH9moHFUjTxE5JgcIK5u0SooVoJGW6vcJGCTaeGNDEGV22PN4qmKI4HHDPboH/1n rSHCNlC+QFzwe9LXvWlikF/ca4ryb03yLcpxf7BqfOXBf9XmzulIkSJDooijUJKBFb4V pUZv7b7uZDHqOGJMsJAsVdRT/IYx4OIE9zEpFxJMLvYQy+Zfzqc2QmDHjjjqrnCjbtrh cmRn990zc5HpK4ShpCDJi+lwJHivW9ihZtZSVnOjvzgoV6H2eCbpYoWMQMO+5J5O/4DP khEw== MIME-Version: 1.0 X-Received: by 10.180.37.77 with SMTP id w13mr11327981wij.78.1408919367175; Sun, 24 Aug 2014 15:29:27 -0700 (PDT) Received: by 10.217.93.133 with HTTP; Sun, 24 Aug 2014 15:29:27 -0700 (PDT) In-Reply-To: <53F8FED8.6030409@freebsdbrasil.com.br> References: <5D802942-2D0F-4324-8212-C2871EEB6327@FreeBSD.org> <01562FB1-32C6-45AF-AB77-5BB80526E18C@FreeBSD.org> <53F8FED8.6030409@freebsdbrasil.com.br> Date: Sun, 24 Aug 2014 19:29:27 -0300 Message-ID: Subject: Re: HC-SR04 and FreeBSD From: Evandro Nunes To: Patrick Tracanelli Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "freebsd-arm@freebsd.org" , Rui Paulo 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: Sun, 24 Aug 2014 22:29:29 -0000 On Sat, Aug 23, 2014 at 5:51 PM, Patrick Tracanelli < eksffa@freebsdbrasil.com.br> wrote: > On 08/22/14 16:55, Luiz Otavio O Souza wrote: > > On 22 August 2014 00:43, Evandro Nunes wrote: > >> On Thu, Aug 21, 2014 at 4:13 PM, Rui Paulo wrote: > >> > >>> You can use an led instead of a multimeter. The point I'm trying to > make > >>> is to make sure the gpio number really corresponds to that port numbe= r. > >>> > >> > >> still no success, but just an update... > >> > >> ok I added two led: > >> > >> pin 02: 0 gpio_2 =3D=3D=3D> echo (orange LED) > >> pin 03: 0 gpio_3 =3D=3D=3D> trigger (blue LED) > >> pin 49: 0 gpio_49 =3D=3D=3D> previous echo > >> > >> and I have the two simple loops below. > >> > >> when I run loop1, BLUE LED blinks every second; > >> when I run loop2 while loop1 stills run, ORANGE LED won't blink, and > loop2 > >> value still shows 0 value > >> > >> if I "gpioctl -c 2 OUT ; gpioctl -t 2", ORANGE LED will light, > confirming > >> LED is OK; thoses leds will light with 2-5v input... however I have no > idea > >> if the sonar output will range 2-5 or if it will be below 2 (i tried > adding > >> my hand very close and far away from the sensor but led was never lit) > > Hello, > > As far as I know, for this specific ultrasonic sensor, you are missing > to set the echo GPIO pin to high. This sonar sensor will bring it back > to 0 when the triggered sound get back to the sensor (round-trip). > > So the correct sequence should be, in a loop: > > 1 - Set echo pin to HIGH > 2 - Trigger the sensor for 10us (it means your 100ms is more than you > need, but no, it won=E2=80=99t cause a problem) > 3 - Wait until echo in is LOW > > When the sound come back to sensor, the device will LOW the GPIO pin agai= n. > > So what you have to do is to measure how long it took from step 1 to 3. > This is your duration. And it means a sound-speed duration from 0 (your > transmitter) until the object and back. We are talking about a 58.22 > sound speed. > > Therefore, what you want is to determine the duration of a pulse with > microsecond accuracy, to measure the duration of HIGH or LOW pulse on a > pin. > > How to do this? I don=E2=80=99t know how you can get this with in the com= mand > line. First of, date(1) won=E2=80=99t display the time with enough precis= ion. I > believe date =E2=80=9C+%s=E2=80=9D is the best precision you have and it= =E2=80=99s epoch (1 full > second, not a fraction). > > You can use some code, however, to get a usec precision =E2=80=9Cnow=E2= =80=9D. Example > code below I have used in the past will do the trick. > > But how will you =E2=80=9Cwait=E2=80=9D from 1 to 0 on your GPIO echo pin= , on a shell > script, without using almost all CPU you=E2=80=99ve got in your BeagleBon= e (and > this is not much CPU), I have no idea. > > I would test some loop similar to this: > > #/bin/sh > gpioctl -c 2 IN > gpioctl -c 3 OUT > gpioctl 3 0 > gpioctl 2 0 > > while true ; do > gpioctl 3 1 ; sleep .10; gpioctl 3 0 # trigger > gpioctl 2 1 # set echo HIGH > > inicio=3D$(/root/date-precisao) # what time is it? > > while [ $(gpioctl 2 | tail -1) -gt 0 ] ; do > echo "...=E2=80=9D #does nothing, because the pin is still HIGH > done > > fim=3D$(/root/date-precisao) # pin is now LOW, what time is it? > dura=3D$(( $fim - $inicio )) # echo duration (HIGH to LOW usec duration= ) > dura2=3D$(( $dura * 10 )) # sh doesn=E2=80=99t like X.Y precision, make= it integer > dist=3D$(( $dura2 / 582 )) # 58.22 should be the number but 58.2 is OK > echo "Distance: $dist=E2=80=9D # this is your not much precise distance > sleep 1 > done > > The above code is untested, I just wrote it on this e-mail. Your CPU > will be insanely high because this is not something that should be done > on shell script, and therefore, your distance precision won=E2=80=99t be > reliable. However, you will have a relative reference. > > Meaning, add an object 10cm from the sensor and you will have a number. > Add an object 100cm from the and you will have another number, hopefully > a 10 times higher number =E2=80=94 maybe 9, maybe 12, expect imprecision = caused > by high CPU usage and a big latency on shell commands getting executed > to do a math that should be done somehow else. > > Good luck with your experiments. > > FreeBSD/arm with a BeagleBone is a HELL of a FUN ]:-) > > /* > * Dummy code to print date with usec precision > * Patrick Tracanelli > * > * clang date-precisao.c -o date-precisao (should cleanly compile) > * > */ > #include > #include > #include > int main(void) > { > struct timeval agora; > struct tm *t; > char time[9]; > int ret; > > ret =3D gettimeofday(&agora, 0); > t =3D localtime(&agora.tv_sec); > ret =3D strftime(time, sizeof(time), "%H%M%S", t); > // xunxo 999 pq as vezes em armv6 fica zerado... > printf("999%s%06ld\n", time, agora.tv_usec); > return 0; > } > > hey patrick yea somehow it made some sense now first test was your afirmation that sensor will set pin value to zero, it really does as soon as I set to 1, sensor will set it to 0 again i really expected to get a value on echo pin other than 0 or 1 :( i run your shell script and while cpu was high, it was not exausting the board, about 20% cpu comsuption running this loop when i add an object say 5cm from the sensor I get values that mean nothing, around 2201, 2300 when i add the object at 10cm i get values around 48000-49000 when i add the object at 1 meter i get values around 200000-230000 so yes the values mean nothing but they make some relative sense, with a lot of imprecision for sure, sometimes deviation is upper some times lower so it means we need a library in freebsd for electronics, so we can have functions like arduino's pulseIn which seem to do just that, wait for a pin status and return how long it took until that value was received, the kind of libs we see out there in nodejs, python... now that you made clear how the sensor works, i will try to write something to do that more precisely instead of using a shell script thank you all From owner-freebsd-arm@FreeBSD.ORG Mon Aug 25 08:56:32 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3347A469 for ; Mon, 25 Aug 2014 08:56:32 +0000 (UTC) Received: from alogt.com (alogt.com [69.36.191.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0AA2331CF for ; Mon, 25 Aug 2014 08:56:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alogt.com; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Subject:To:From:Date; bh=y+oKKQrUbN0vtPK9An7fMZouTuMvHlgvSXFmyl2E3Bs=; b=CAZakkHPIwMKVC5Wr9eQmKnlw73v+bWfay0/XE1c3gFuN9K8jerdLAYctgED3b82eZTKlSKuOv4OuDrawOYMaBdp/D7FXdtxFAt5Tvk03t5Iw70GO10VXN3Ggpja7DpyQRZF1k4pflYUnswgU8qmpMILQ+UDj794ZK+M9PnmIX4=; Received: from [39.252.70.96] (port=64258 helo=X220.alogt.com) by sl-508-2.slc.westdc.net with esmtpsa (SSLv3:DHE-RSA-AES128-SHA:128) (Exim 4.82) (envelope-from ) id 1XLq4k-000JtF-0S for freebsd-arm@freebsd.org; Mon, 25 Aug 2014 02:56:31 -0600 Date: Mon, 25 Aug 2014 16:56:22 +0800 From: Erich Dollansky To: freebsd-arm@freebsd.org Subject: FreeBSD 10.0 on Raspberry PI B+ no network devices Message-ID: <20140825165622.6771b548@X220.alogt.com> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.22; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - sl-508-2.slc.westdc.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - alogt.com X-Get-Message-Sender-Via: sl-508-2.slc.westdc.net: authenticated_id: erichsfreebsdlist@alogt.com X-Source: X-Source-Args: X-Source-Dir: 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: Mon, 25 Aug 2014 08:56:32 -0000 Hi, I got recently two Raspberries B+. I downloaded the file FreeBSD-10.0-STABLE-arm-armv6-RPI-B-20140406-r264194.img.bz2 and copied it to a memory card. I edited rc.conf to be able to use the Raspberries without keyboard. The problem is now that no network comes up. ue0 simply does not exist. What do I do wrong here? It must be something simple I just do not see. Thanks! Erich From owner-freebsd-arm@FreeBSD.ORG Mon Aug 25 09:00:04 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B18B45EF; Mon, 25 Aug 2014 09:00:03 +0000 (UTC) Date: Mon, 25 Aug 2014 04:59:59 -0400 From: Glen Barber To: Erich Dollansky Subject: Re: FreeBSD 10.0 on Raspberry PI B+ no network devices Message-ID: <20140825085959.GK43778@hub.FreeBSD.org> References: <20140825165622.6771b548@X220.alogt.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wwX5Nmi7feudBrEr" Content-Disposition: inline In-Reply-To: <20140825165622.6771b548@X220.alogt.com> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-arm@freebsd.org 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: Mon, 25 Aug 2014 09:00:04 -0000 --wwX5Nmi7feudBrEr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 25, 2014 at 04:56:22PM +0800, Erich Dollansky wrote: > Hi, >=20 > I got recently two Raspberries B+. I downloaded the file > FreeBSD-10.0-STABLE-arm-armv6-RPI-B-20140406-r264194.img.bz2 and copied > it to a memory card.=20 >=20 > I edited rc.conf to be able to use the Raspberries without keyboard. > The problem is now that no network comes up. >=20 > ue0 simply does not exist. >=20 > What do I do wrong here? >=20 > It must be something simple I just do not see. >=20 That image is 4 months old. Can you try the most recent one? http://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/10.0/Free= BSD-10.0-STABLE-arm-armv6-RPI-B-20140822-r270340.img.bz2 If you do not see this file exists on your local mirror, please email me privately so I can get some details from you. Glen --wwX5Nmi7feudBrEr Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJT+vsPAAoJELls3eqvi17QU0QP/0kt620ZuEKXu6/CRX4H+e97 aYE35pVR+0j1vrxxwYRchA4yrc3F708YPH1Yx7TanfHIq40csM8W2Ujui0PngCGk NcS4SDwGUtw7TOZr5qxYpFggwI7rr3qaUqAQYm+W78T09BlJAsNlVMEXjNYXvLxs oPr3THkZ66uiv1MlHixcIuINFuIZzubki9yTcZZfkSYAM09zW6ewTZTyBiSVOZi2 YrjfVmvqotSgxUwx25kH9ZDYlAhAgQGzsvcshSOIuj13Jt5blYrh8QehvhBvMT8m YFHc20wGOxawZNRxPcKPkZZZii9Dx893U5Xe6BPcbn0XOFxYRaj1TPPHnpeyqLvj +HuroatxgvXpjgQnzp+qmVZeazRbY9bde2BfZDYDsAGF3qes/9MMS9b6Dqqnz+lb FYfK02Cm5USiLEfntuLJ/krw/XOfEyLgWHuykLWPGR+nW6wATV+6Gz7WHtDYVXox zTITjxWVadJQ5RMQGpVw8Jh82km6A8vYHyUZHa6IB3vkIf9F95YXHuBzWri2gDN6 Jw3mjxz2a1jCZLnLvItcS/laD8Va322yVJ/ttZpYOvByhLYr63CW3xeIapeNw4qS loSPs4HeAos+/uB83A1G0yJWnYfeCMurjgyLFoVm3P0nya3VjQ3iCubZTeU6SoFx Ae1VGDqtbNDrnoPZe14A =P9z0 -----END PGP SIGNATURE----- --wwX5Nmi7feudBrEr-- From owner-freebsd-arm@FreeBSD.ORG Mon Aug 25 10:20:34 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9573DAA1; Mon, 25 Aug 2014 10:20:34 +0000 (UTC) Received: from nibbler.fubar.geek.nz (nibbler.fubar.geek.nz [199.48.134.198]) by mx1.freebsd.org (Postfix) with ESMTP id 78774395E; Mon, 25 Aug 2014 10:20:34 +0000 (UTC) Received: from bender.lan (97e07ab1.skybroadband.com [151.224.122.177]) by nibbler.fubar.geek.nz (Postfix) with ESMTPSA id A320C5DEBC; Mon, 25 Aug 2014 10:20:26 +0000 (UTC) Date: Mon, 25 Aug 2014 11:20:18 +0100 From: Andrew Turner To: Ian Lepore Subject: Re: wandboard SMP panic Message-ID: <20140825112018.36988c28@bender.lan> In-Reply-To: <1408896148.1150.62.camel@revolution.hippie.lan> References: <53F93895.6060905@0x544745.com> <20140824110530.042dfecf@bender.lan> <1408896148.1150.62.camel@revolution.hippie.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Tom Everett , "freebsd-arm@freebsd.org" 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: Mon, 25 Aug 2014 10:20:34 -0000 On Sun, 24 Aug 2014 10:02:28 -0600 Ian Lepore wrote: > On Sun, 2014-08-24 at 11:05 +0100, Andrew Turner wrote: > > On Sat, 23 Aug 2014 18:57:57 -0600 > > Tom Everett wrote: > > > > > > > > Hello everyone. I am seeing a new panic booting Wandboard: > > > > > > Loaded DTB from file 'wandboard-quad.dtb'. > > > > > > > > > Kernel entry at 0x12000100... > > > > > > > > > Kernel args: (null) > > > > > > > > > KDB: debugger backends: ddb > > > KDB: current backend: ddb > > > Copyright (c) 1992-2014 The FreeBSD Project. > > > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, > > > 1993, 1994 The Regents of the University of California. All > > > rights reserved. FreeBSD is a registered trademark of The FreeBSD > > > Foundation. FreeBSD 11.0-CURRENT #0 r270430M: Sat Aug 23 17:24:21 > > > MDT 2014 > > > tom@bernice:/storage/home/tom/crochet/crochet-freebsd/work/obj/arm.armv6/storage/home/tom/crochet/src/FreeBSDHead/head/sys/IMX6 > > > arm > > > FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) > > > 20140512 CPU: Cortex A9-r2 rev 10 (Cortex-A core) > > > Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 > > > Security_Ext WB disabled EABT branch prediction enabled > > > LoUU:2 LoC:1 LoUIS:2 > > > Cache level 1: > > > 32KB/32B 4-way data cache WB Read-Alloc Write-Alloc > > > 32KB/32B 4-way instruction cache Read-Alloc > > > real memory = 2147483648 (2048 MB) > > > avail memory = 2093891584 (1996 MB) > > > WARNING: Some AP's failed to start > > > FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs > > > random device not loaded; using insecure entropy > > > panic: Built bad topology at 0xc2510fb4. CPU mask (f) != (1) > > > cpuid = 0 > > > KDB: enter: panic > > > [ thread pid 0 tid 100000 ] > > > Stopped at $d: ldrb r15, [r15, r15, ror r15]! > > > db> > > > > I had a similar problem. It turned out to be a caching issue in > > U-Boot. It appears to not correctly flush the dcache. You can try > > to run "dcache off ; dcache flush" before entering ubldr. If this > > fails you will need to build a version of U-Boot with the dcache > > disabled. > > > > Andrew > > That's interesting... how are y'all launching ubldr, with a 'go' > command? It's been my experience that the bootelf and bootm commands > manage the cache correctly, but go doesn't. You can launch ubldr with > bootelf (it has proper elf headers) but you can't launch the kernel > directly that way. But the stock u-boot might not have bootelf. This was with the bootelf command. I never tracked down why it was failing to flush the cache correctly and in the end disabled it. Andrew From owner-freebsd-arm@FreeBSD.ORG Mon Aug 25 13:05:45 2014 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27023895 for ; Mon, 25 Aug 2014 13:05:45 +0000 (UTC) Received: from gromit.dlib.vt.edu (gromit.dlib.vt.edu [128.173.49.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "gromit.dlib.vt.edu", Issuer "Chumby Certificate Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id F01373912 for ; Mon, 25 Aug 2014 13:05:44 +0000 (UTC) Received: from pmather.tower.lib.vt.edu (pmather.tower.lib.vt.edu [128.173.51.28]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by gromit.dlib.vt.edu (Postfix) with ESMTPSA id 72AFCA8; Mon, 25 Aug 2014 09:05:36 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: FreeBSD 10.0 on Raspberry PI B+ no network devices From: Paul Mather In-Reply-To: <20140825165622.6771b548@X220.alogt.com> Date: Mon, 25 Aug 2014 09:05:35 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20140825165622.6771b548@X220.alogt.com> To: Erich Dollansky X-Mailer: Apple Mail (2.1878.6) Cc: freebsd-arm@freebsd.org 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: Mon, 25 Aug 2014 13:05:45 -0000 On Aug 25, 2014, at 4:56 AM, Erich Dollansky = wrote: > Hi, >=20 > I got recently two Raspberries B+. I downloaded the file > FreeBSD-10.0-STABLE-arm-armv6-RPI-B-20140406-r264194.img.bz2 and = copied > it to a memory card.=20 >=20 > I edited rc.conf to be able to use the Raspberries without keyboard. > The problem is now that no network comes up. >=20 > ue0 simply does not exist. >=20 > What do I do wrong here? >=20 > It must be something simple I just do not see. You are likely not doing anything wrong. As I understand it, the Model=20= B+ uses a slightly different USB controller/revision to the Model B,=20 and this might not be recognised/supported yet by FreeBSD. The network=20= is via USB on Raspberry Pi, so the USB support problem would cause the=20= network not to work/be recognised. This may have been fixed recently, though, so you might want to try a=20 more recent image. Cheers, Paul.= From owner-freebsd-arm@FreeBSD.ORG Mon Aug 25 13:33:19 2014 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67A50DB5 for ; Mon, 25 Aug 2014 13:33:19 +0000 (UTC) Received: from alogt.com (alogt.com [69.36.191.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CDC53C03 for ; Mon, 25 Aug 2014 13:33:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alogt.com; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=5LpFpmIN5VzE66F68u6MlR19nFX8zHVe2V3JXhfukXY=; b=o5k/uf89ra9iY1ubTsnV6EZR84B72aXAEL87FLtHOlJ9iywrUBU5TmoWw44m2CtKo4OXbVMXd9AzrlTw1olhQu2LH1NMt5aH1hB6xeINFtY2PTT9V/5nncc0qaLBp8rEdAdINZIZghOvV0PIk8T9xe5s71dnOHmaouSY/tDXfYg=; Received: from [114.121.153.38] (port=44855 helo=X220.alogt.com) by sl-508-2.slc.westdc.net with esmtpsa (SSLv3:DHE-RSA-AES128-SHA:128) (Exim 4.82) (envelope-from ) id 1XLuOZ-00318y-49; Mon, 25 Aug 2014 07:33:18 -0600 Date: Mon, 25 Aug 2014 21:33:08 +0800 From: Erich Dollansky To: Paul Mather Subject: Re: FreeBSD 10.0 on Raspberry PI B+ no network devices Message-ID: <20140825213308.5eddb65d@X220.alogt.com> In-Reply-To: References: <20140825165622.6771b548@X220.alogt.com> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.22; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - sl-508-2.slc.westdc.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - alogt.com X-Get-Message-Sender-Via: sl-508-2.slc.westdc.net: authenticated_id: erichsfreebsdlist@alogt.com X-Source: X-Source-Args: X-Source-Dir: Cc: freebsd-arm@freebsd.org 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: Mon, 25 Aug 2014 13:33:19 -0000 Hi, On Mon, 25 Aug 2014 09:05:35 -0400 Paul Mather wrote: > On Aug 25, 2014, at 4:56 AM, Erich Dollansky > wrote: > > > Hi, > > > > I got recently two Raspberries B+. I downloaded the file > > FreeBSD-10.0-STABLE-arm-armv6-RPI-B-20140406-r264194.img.bz2 and > > copied it to a memory card. > > > > I edited rc.conf to be able to use the Raspberries without keyboard. > > The problem is now that no network comes up. > > > > ue0 simply does not exist. > > > > What do I do wrong here? > > > > It must be something simple I just do not see. > > You are likely not doing anything wrong. As I understand it, the > Model B+ uses a slightly different USB controller/revision to the > Model B, and this might not be recognised/supported yet by FreeBSD. > The network is via USB on Raspberry Pi, so the USB support problem > would cause the network not to work/be recognised. > > This may have been fixed recently, though, so you might want to try a > more recent image. > I just tried with the image from last Friday and come to the same result. Here are the logs: syslogd: restart syslogd: kernel boot file is /boot/kernel/kernel kernel: KDB: debugger backends: ddb kernel: KDB: current backend: ddb kernel: Copyright (c) 1992-2014 The FreeBSD Project. kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 kernel: The Regents of the University of California. All rights reserved. kernel: FreeBSD is a registered trademark of The FreeBSD Foundation. kernel: FreeBSD 10.0-STABLE #0 r270340: Sat Aug 23 17:25:24 UTC 2014 kernel: root@grind.freebsd.org:/usr/obj/arm.armv6/usr/src/sys/RPI-B arm kernel: FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 kernel: VT: init without driver. kernel: CPU: ARM1176JZ-S rev 7 (ARM11J core) kernel: Supported features: ARM_ISA THUMB2 JAZELLE ARMv4 Security_Ext kernel: WB enabled LABT branch prediction enabled kernel: 16KB/32B 4-way instruction cache kernel: 16KB/32B 4-way write-back-locking-C data cache kernel: real memory = 536866816 (511 MB) kernel: avail memory = 483495936 (461 MB) kernel: random: initialized kernel: kbd0 at kbdmux0 kernel: ofwbus0: kernel: simplebus0: mem 0x20000000-0x20ffffff on ofwbus0 kernel: intc0: mem 0xb200-0xb3ff on simplebus0 kernel: systimer0: System Timer> mem 0x3000-0x3fff irq 8,9,10,11 on simplebus0 kernel: Event timer "BCM2835 Event Timer 3" frequency 1000000 Hz quality 1000 kernel: Timecounter "BCM2835 Timecounter" frequency 1000000 Hz quality 1000 kernel: bcmwd0: mem 0x10001c-0x100027 on simplebus0 kernel: gpio0: mem 0x200000-0x2000af irq 57,59,58,60 on simplebus0 kernel: controller> gpio0: read-only pins: 46,47,48,49,50,51,52,53. kernel: gpio0: reserved pins: 48,49,50,51,52,53. kernel: gpioc0: on gpio0 kernel: gpiobus0: on gpio0 kernel: gpioled0: at pin(s) 16 on gpiobus0 kernel: iichb0: mem 0x205000-0x20501f irq 61 on simplebus0 kernel: iicbus0: on iichb0 kernel: iic0: on iicbus0 kernel: iichb1: mem 0x804000-0x80401f irq 61 on simplebus0 kernel: iicbus1: on iichb1 kernel: iic1: on iicbus1 kernel: spi0: mem 0x204000-0x20401f irq 62 on simplebus0 kernel: spibus0: on spi0 kernel: bcm_dma0: mem 0x7000-0x7fff,0xe05000-0xe05fff irq 24,25,26,27,28,29,30,31,32,33,34,35,36 on simplebus0 kernel: mbox0: mem 0xb880-0xb8bf irq 1 on simplebus0 kernel: sdhci_bcm0: mem 0x300000-0x3000ff irq 70 on simplebus0 kernel: mmc0: on sdhci_bcm0 kernel: uart0: mem 0x201000-0x201fff irq 65 on simplebus0 kernel: uart0: console (115200,n,8,1) kernel: dwcotg0: mem 0x980000-0x99ffff irq 17 on simplebus0 kernel: usbus0 on dwcotg0 kernel: fb0: on ofwbus0 kernel: simplebus1: on ofwbus0 kernel: simplebus1: could not get ranges kernel: device_attach: simplebus1 attach returned 6 kernel: Timecounters tick every 10.000 msec kernel: usbus0: 480Mbps High Speed USB v2.0 kernel: ugen0.1: at usbus0 kernel: uhub0: on usbus0 kernel: mmcsd0: 16GB at mmc0 50.0MHz/4bit/65535-block kernel: fb0: 1184x624(0x0@0,0) 16bpp kernel: fb0: pitch 2368, base 0x5e006000, screen_size 1477632 kernel: fbd0 on fb0 kernel: VT: initialize with new VT driver "fb". kernel: random: unblocking device. kernel: Root mount waiting for: usbus0 kernel: uhub0: 1 port with 1 removable, self powered kernel: Trying to mount root from ufs:/dev/mmcsd0s2a [rw,noatime]... kernel: warning: no time-of-day clock registered, system time will not be set accurately kernel: Setting hostuuid: 7df57adf-2c56-11e4-8de2-735c72d3849c. kernel: Setting hostid: 0xd82db415. kernel: Entropy harvesting: interrupts ethernet point_to_point swi. kernel: Starting file system checks: kernel: /dev/mmcsd0s2a: FILE SYSTEM CLEAN; SKIPPING CHECKS kernel: /dev/mmcsd0s2a: clean, 3660719 free (3479 frags, 457155 blocks, 0.1% fragmentation) kernel: Mounting local file systems:. kernel: Writing entropy file:. kernel: Setting hostname: raspberry0.alogt.com. kernel: Starting Network: lo0. kernel: lo0: flags=8049 metric 0 mtu 16384 kernel: options=600003 kernel: inet6 ::1 prefixlen 128 kernel: inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 kernel: inet 127.0.0.1 netmask 0xff000000 kernel: nd6 options=21 kernel: Starting devd. kernel: route: writing to routing socket: Network is unreachable kernel: add net default: gateway 192.168.0.115 fib 0: Network is unreachable kernel: add net fe80::: gateway ::1 kernel: add net ff02::: gateway ::1 kernel: add net ::ffff:0.0.0.0: gateway ::1 kernel: add net ::0.0.0.0: gateway ::1 kernel: Generating host.conf. kernel: Creating and/or trimming log files. kernel: Starting syslogd. kernel: Setting date via ntp. kernel: Error : hostname nor servname provided, or not known kernel: 25 Aug 12:51:23 ntpdate[278]: can't find host 0.freebsd.pool.ntp.org kernel: kernel: Error : hostname nor servname provided, or not known kernel: 25 Aug 12:51:23 ntpdate[278]: can't find host 1.freebsd.pool.ntp.org kernel: kernel: Error : hostname nor servname provided, or not known kernel: 25 Aug 12:51:23 ntpdate[278]: can't find host 2.freebsd.pool.ntp.org kernel: kernel: 25 Aug 12:51:23 ntpdate[278]: no servers can be used, exiting kernel: ELF ldconfig path: /lib /usr/lib /usr/lib/compat kernel: Clearing /tmp (X related). kernel: Updating motd: kernel: . kernel: Mounting late file systems: kernel: . ntpd[437]: ntpd 4.2.4p5-a (1) kernel: Starting ntpd. ntpd[438]: precision = 4.000 usec ntpd[438]: Listening on interface #0 wildcard, 0.0.0.0#123 Disabled ntpd[438]: Listening on interface #1 wildcard, ::#123 Disabled ntpd[438]: Listening on interface #2 lo0, ::1#123 Enabled ntpd[438]: Listening on interface #3 lo0, fe80::1#123 Enabled ntpd[438]: Listening on interface #4 lo0, 127.0.0.1#123 Enabled ntpd[438]: Listening on routing socket on fd #25 for interface updates ntpd[438]: kernel time sync status 2040 kernel: Configuring syscons: blanktime. kernel: Generating RSA1 host key. ntpd_initres[441]: host name not found: 0.freebsd.pool.ntp.org kernel: Aug 25 12:51:29 raspberry0 ntpd_initres[441]: host name not found: 0.freebsd.pool.ntp.org ntpd_initres[441]: host name not found: 1.freebsd.pool.ntp.org kernel: Aug 25 12:51:29 raspberry0 ntpd_initres[441]: host name not found: 1.freebsd.pool.ntp.org ntpd_initres[441]: host name not found: 2.freebsd.pool.ntp.org kernel: Aug 25 12:51:29 raspberry0 ntpd_initres[441]: host name not found: 2.freebsd.pool.ntp.org kernel: 2048 35:0a:e6:25:e6:65:4a:f2:24:d2:87:9e:5e:71:4c:9b root@raspberry0.alogt.com (RSA1) kernel: Generating RSA host key. kernel: 2048 7b:1d:d9:e4:f3:f3:fb:23:f4:97:a6:92:59:91:8e:b5 root@raspberry0.alogt.com (RSA) kernel: Generating DSA host key. kernel: 1024 90:e9:7d:9d:ef:73:f2:2a:7e:93:6d:ad:fd:9f:8c:58 root@raspberry0.alogt.com (DSA) kernel: Generating ECDSA host key. kernel: 256 fd:b6:4b:bd:45:58:b2:63:fe:90:04:94:f3:fb:9b:e5 root@raspberry0.alogt.com (ECDSA) kernel: Generating ED25519 host key. kernel: 256 8b:02:cd:9d:0e:51:a8:4e:21:7d:78:7e:db:a4:2d:fb root@raspberry0.alogt.com (ED25519) kernel: Performing sanity check on sshd configuration. kernel: Starting sshd. kernel: Starting inetd. inetd[501]: telnet/tcp: bind: Can't assign requested address kernel: Aug 25 12:51:54 raspberry0 inetd[501]: telnet/tcp: bind: Can't assign requested address inetd[501]: IPv6 bind is ignored for telnet sshd[480]: Server listening on :: port 22. sshd[480]: Server listening on 0.0.0.0 port 22. kernel: Starting background file system checks in 60 seconds. kernel: kernel: Mon Aug 25 12:51:55 UTC 2014 So, it realy could be as you said. I will have to wait before getting it supported. Erich From owner-freebsd-arm@FreeBSD.ORG Mon Aug 25 13:33:32 2014 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FEBEDED for ; Mon, 25 Aug 2014 13:33:32 +0000 (UTC) Received: from smtp.hs-karlsruhe.de (smtp.HS-Karlsruhe.DE [193.196.64.25]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D77673C04 for ; Mon, 25 Aug 2014 13:33:31 +0000 (UTC) Received: from iz-wera01.hs-karlsruhe.de ([193.196.65.46]) by smtp.hs-karlsruhe.de with esmtp (Exim 4.80.1) (envelope-from ) id 1XLuOm-00AHD6-Bp; Mon, 25 Aug 2014 15:33:28 +0200 X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.5 From: Ralf Wenk To: Erich Dollansky Subject: Re: FreeBSD 10.0 on Raspberry PI B+ no network devices In-reply-to: References: <20140825165622.6771b548@X220.alogt.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 25 Aug 2014 15:33:27 +0200 Message-Id: Cc: freebsd-arm@freebsd.org 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: Mon, 25 Aug 2014 13:33:32 -0000 Hi, > > Hi, > > > > I got recently two Raspberries B+. I downloaded the file > > FreeBSD-10.0-STABLE-arm-armv6-RPI-B-20140406-r264194.img.bz2 and copied > > it to a memory card. > > > > I edited rc.conf to be able to use the Raspberries without keyboard. > > The problem is now that no network comes up. > > > > ue0 simply does not exist. > > > > What do I do wrong here? > > > > It must be something simple I just do not see. > > You are likely not doing anything wrong. As I understand it, the Model > B+ uses a slightly different USB controller/revision to the Model B, > and this might not be recognised/supported yet by FreeBSD. The network > is via USB on Raspberry Pi, so the USB support problem would cause the > network not to work/be recognised. > > This may have been fixed recently, though, so you might want to try a > more recent image. Last month YAMAMOTO Shigeru wrote a mail that he has the same problem with a official image while his own one is fine. He suggested to use a newer firmware for the official image. Please have a look at http://lists.freebsd.org/pipermail/freebsd-arm/2014-July/008872.html for his mail and a link to his image(s) for a RaspberryPi B+. Ralf From owner-freebsd-arm@FreeBSD.ORG Mon Aug 25 13:37:44 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB06EE75 for ; Mon, 25 Aug 2014 13:37:44 +0000 (UTC) Received: from alogt.com (alogt.com [69.36.191.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A28793C25 for ; Mon, 25 Aug 2014 13:37:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alogt.com; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=qS1DM7X5m7Ydf5U8suCSFpeQOrZmc22Yfso/CdJLf+I=; b=K9nwLpff86A24Vu8iNstt00hHyl92/jmwHPMya2CKDxY4rPPwhUrIVk6X8N0yecll37+9J0Vm6CYUkGkdv12MR1EzkOMlBLuDz5+VdbZ8r9vTe+KH7sPmfdih32E/C+F2PSWQ1mc5z7DrleCiY3jy2AFGVgHnBe4Jfa3CTSEdMc=; Received: from [114.121.153.38] (port=44603 helo=X220.alogt.com) by sl-508-2.slc.westdc.net with esmtpsa (SSLv3:DHE-RSA-AES128-SHA:128) (Exim 4.82) (envelope-from ) id 1XLuSt-0035o4-07; Mon, 25 Aug 2014 07:37:44 -0600 Date: Mon, 25 Aug 2014 21:37:36 +0800 From: Erich Dollansky To: Ralf Wenk Subject: Re: FreeBSD 10.0 on Raspberry PI B+ no network devices Message-ID: <20140825213736.5ce4f895@X220.alogt.com> In-Reply-To: References: <20140825165622.6771b548@X220.alogt.com> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.22; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - sl-508-2.slc.westdc.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - alogt.com X-Get-Message-Sender-Via: sl-508-2.slc.westdc.net: authenticated_id: erichsfreebsdlist@alogt.com X-Source: X-Source-Args: X-Source-Dir: Cc: freebsd-arm@freebsd.org 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: Mon, 25 Aug 2014 13:37:44 -0000 Hi, On Mon, 25 Aug 2014 15:33:27 +0200 Ralf Wenk wrote: > > > I got recently two Raspberries B+. I downloaded the file > > > FreeBSD-10.0-STABLE-arm-armv6-RPI-B-20140406-r264194.img.bz2 and > > > copied it to a memory card. > > > > > > I edited rc.conf to be able to use the Raspberries without > > > keyboard. The problem is now that no network comes up. > > > > > > ue0 simply does not exist. > > > > > > What do I do wrong here? > > > > > > It must be something simple I just do not see. > > > > You are likely not doing anything wrong. As I understand it, the > > Model B+ uses a slightly different USB controller/revision to the > > Model B, and this might not be recognised/supported yet by > > FreeBSD. The network is via USB on Raspberry Pi, so the USB > > support problem would cause the network not to work/be recognised. > > > > This may have been fixed recently, though, so you might want to try > > a more recent image. > > Last month YAMAMOTO Shigeru wrote a mail that he has the same problem > with a official image while his own one is fine. > He suggested to use a newer firmware for the official image. > > Please have a look at > http://lists.freebsd.org/pipermail/freebsd-arm/2014-July/008872.html > for his mail and a link to his image(s) for a RaspberryPi B+. it seems to be the same problem. I am currently downloading the image. Erich From owner-freebsd-arm@FreeBSD.ORG Mon Aug 25 14:31:32 2014 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E8A222BE for ; Mon, 25 Aug 2014 14:31:32 +0000 (UTC) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "raven.bwct.de", Issuer "BWCT" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5F4943222 for ; Mon, 25 Aug 2014 14:31:31 +0000 (UTC) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id s7PETvbS048827 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 25 Aug 2014 16:29:57 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.5/8.14.4) with ESMTP id s7PETq3h098043 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 25 Aug 2014 16:29:52 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id s7PETqGZ031013; Mon, 25 Aug 2014 16:29:52 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id s7PETpXu031012; Mon, 25 Aug 2014 16:29:51 +0200 (CEST) (envelope-from ticso) Date: Mon, 25 Aug 2014 16:29:51 +0200 From: Bernd Walter To: Paul Mather Subject: Re: FreeBSD 10.0 on Raspberry PI B+ no network devices Message-ID: <20140825142951.GA30923@cicely7.cicely.de> Reply-To: ticso@cicely.de References: <20140825165622.6771b548@X220.alogt.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED=-1, BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 autolearn=ham version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on spamd.cicely.de Cc: freebsd-arm@freebsd.org 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: Mon, 25 Aug 2014 14:31:33 -0000 On Mon, Aug 25, 2014 at 09:05:35AM -0400, Paul Mather wrote: > On Aug 25, 2014, at 4:56 AM, Erich Dollansky wrote: > > > Hi, > > > > I got recently two Raspberries B+. I downloaded the file > > FreeBSD-10.0-STABLE-arm-armv6-RPI-B-20140406-r264194.img.bz2 and copied > > it to a memory card. > > > > I edited rc.conf to be able to use the Raspberries without keyboard. > > The problem is now that no network comes up. > > > > ue0 simply does not exist. > > > > What do I do wrong here? > > > > It must be something simple I just do not see. > > You are likely not doing anything wrong. As I understand it, the Model > B+ uses a slightly different USB controller/revision to the Model B, > and this might not be recognised/supported yet by FreeBSD. The network > is via USB on Raspberry Pi, so the USB support problem would cause the > network not to work/be recognised. Unfortunately I can't take a look at the broadcom, because it is piggy packed with the RAM, so I can't tell about the host controller. Would be good to know if the controller got probed or not. Maybe I can do an image based test boot later today. At least for the ethernet chip I can say that there are two different devices used with the raspberry. Old devices used the LAN9512 and newer the LAN9514. Main difference is that the later has 4 external hub ports, but maybe there are some errata differences as well. However the LAN9514 already had been used with later B models. At least my 512M RAM B and my B+ all have the LAN9514 and the older 256M has the LAN9512. > This may have been fixed recently, though, so you might want to try a > more recent image. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Mon Aug 25 14:35:44 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEE5C430 for ; Mon, 25 Aug 2014 14:35:44 +0000 (UTC) Received: from olinguito.schwarzes.net (olinguito.schwarzes.net [IPv6:2a01:4f8:7d:1b5::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 602253306 for ; Mon, 25 Aug 2014 14:35:44 +0000 (UTC) Received: from asc-t60.schwarzes.net (p5B033EB6.dip0.t-ipconnect.de [91.3.62.182]) (authenticated bits=0) by olinguito.schwarzes.net (8.14.8/8.14.8) with ESMTP id s7PEZakd023669; Mon, 25 Aug 2014 16:35:36 +0200 (CEST) (envelope-from Andreas.Schwarz@schwarzes.net) Date: Mon, 25 Aug 2014 16:35:36 +0200 (CEST) From: Andreas Schwarz To: freebsd-arm@freebsd.org Subject: Re: FreeBSD 10.0 on Raspberry PI B+ no network devices Message-Id: <20140825163528.d2e696cc3d03ad9bebcd239c@schwarzes.net> In-Reply-To: References: <20140825165622.6771b548@X220.alogt.com> X-Mailer: Sylpheed 3.4.2 (GTK+ 2.10.14; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (olinguito.schwarzes.net [78.47.41.143]); Mon, 25 Aug 2014 16:35:37 +0200 (CEST) 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: Mon, 25 Aug 2014 14:35:44 -0000 On Mon, 25 Aug 2014 09:05:35 -0400 Paul Mather wrote: > On Aug 25, 2014, at 4:56 AM, Erich Dollansky wrote: Hi, > > I got recently two Raspberries B+. I downloaded the file > > FreeBSD-10.0-STABLE-arm-armv6-RPI-B-20140406-r264194.img.bz2 and copied > > it to a memory card. > > > > I edited rc.conf to be able to use the Raspberries without keyboard. > > The problem is now that no network comes up. > > > > ue0 simply does not exist. > > > > What do I do wrong here? > > > > It must be something simple I just do not see. > > You are likely not doing anything wrong. As I understand it, the Model > B+ uses a slightly different USB controller/revision to the Model B, > and this might not be recognised/supported yet by FreeBSD. The network > is via USB on Raspberry Pi, so the USB support problem would cause the > network not to work/be recognised. I've got also two B+ Models two weeks ago and I'm able to use the image (r269955) from my B Models without any problems. The only thing, what I had to do, was to upgrade the bootloader to a recent version. Have a look at : https://github.com/raspberrypi/firmware/tree/master/boot root@pizelot:~ # uname -a FreeBSD pizelot.schwarzes.net 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r269955: Fri Aug 15 05:00:27 CEST 2014 root@pizelot.schwarzes.net:/usr/obj/usr/src/sys/RPI-B-ASC arm root@pizelot:~ # dmesg KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2014 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 11.0-CURRENT #0 r269955: Fri Aug 15 05:00:27 CEST 2014 root@pizelot.schwarzes.net:/usr/obj/usr/src/sys/RPI-B-ASC arm FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 VT: init without driver. CPU: ARM1176JZ-S rev 7 (ARM11J core) Supported features: ARM_ISA THUMB2 JAZELLE ARMv4 Security_Ext WB enabled LABT branch prediction enabled 16KB/32B 4-way instruction cache 16KB/32B 4-way write-back-locking-C data cache real memory = 536866816 (511 MB) avail memory = 499798016 (476 MB) random: initialized kbd0 at kbdmux0 ofwbus0: simplebus0: mem 0x20000000-0x20ffffff on ofwbus0 intc0: mem 0xb200-0xb3ff on simplebus0 systimer0: mem 0x3000-0x3fff irq 8,9,10,11 on simplebus0 Event timer "BCM2835 Event Timer 3" frequency 1000000 Hz quality 1000 Timecounter "BCM2835 Timecounter" frequency 1000000 Hz quality 1000 bcmwd0: mem 0x10001c-0x100027 on simplebus0 gpio0: mem 0x200000-0x2000af irq 57,59,58,60 on simplebus0 gpio0: read-only pins: 46,47,48,49,50,51,52,53. gpio0: reserved pins: 48,49,50,51,52,53. gpioc0: on gpio0 gpiobus0: on gpio0 gpioled0: at pin(s) 16 on gpiobus0 iichb0: mem 0x205000-0x20501f irq 61 on simplebus0 iicbus0: on iichb0 iic0: on iicbus0 iichb1: mem 0x804000-0x80401f irq 61 on simplebus0 iicbus1: on iichb1 iic1: on iicbus1 spi0: mem 0x204000-0x20401f irq 62 on simplebus0 spibus0: on spi0 bcm_dma0: mem 0x7000-0x7fff,0xe05000-0xe05fff irq 24,25,26,27,28,29,30,31,32,33,34,35,36 on simplebus0 mbox0: mem 0xb880-0xb8bf irq 1 on simplebus0 sdhci_bcm0: mem 0x300000-0x3000ff irq 70 on simplebus0 mmc0: on sdhci_bcm0 uart0: mem 0x201000-0x201fff irq 65 on simplebus0 uart0: console (115200,n,8,1) dwcotg0: mem 0x980000-0x99ffff irq 17 on simplebus0 usbus0 on dwcotg0 fb0: on ofwbus0 simplebus1: on ofwbus0 simplebus1: could not get ranges device_attach: simplebus1 attach returned 6 Timecounters tick every 10.000 msec usbus0: 480Mbps High Speed USB v2.0 ugen0.1: at usbus0 uhub0: on usbus0 mmcsd0: 32GB at mmc0 25.0MHz/4bit/65535-block fb0: 1920x1200(0x0@0,0) 16bpp fb0: pitch 3840, base 0x5f005000, screen_size 4608000 fbd0 on fb0 VT: initialize with new VT driver "fb". random: unblocking device. Root mount waiting for: usbus0 uhub0: 1 port with 1 removable, self powered ugen0.2: at usbus0 uhub1: on usbus0 uhub1: MTT enabled Root mount waiting for: usbus0 uhub1: 5 ports with 4 removable, self powered Root mount waiting for: usbus0 ugen0.3: at usbus0 smsc0: on usbus0 smsc0: chip 0xec00, rev. 0002 miibus0: on smsc0 ukphy0: PHY 1 on miibus0 ukphy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto ue0: on smsc0 ue0: Ethernet address: b8:27:eb:ba:c9:19 Root mount waiting for: usbus0 ugen0.4: at usbus0 ukbd0: on usbus0 kbd1 at ukbd0 Trying to mount root from ufs:/dev/mmcsd0s2a [rw,noatime]... warning: no time-of-day clock registered, system time will not be set accurately smsc0: chip 0xec00, rev. 0002 uhid0: on usbus0 -- best regards Andreas From owner-freebsd-arm@FreeBSD.ORG Mon Aug 25 18:48:18 2014 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FDF0120 for ; Mon, 25 Aug 2014 18:48:18 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEAFB3D95 for ; Mon, 25 Aug 2014 18:48:17 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1XLzJJ-00037V-NP; Mon, 25 Aug 2014 18:48:09 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id s7PIm8Le066042; Mon, 25 Aug 2014 12:48:08 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19tyZvWwWsNJoxwAMbMcRoW X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: C++ exceptions in freebsd-arm doesn't seem to work From: Ian Lepore To: Olavi Kumpulainen In-Reply-To: <2C97B126-91FE-4E93-920F-6ED5045666A6@gmail.com> References: <1405809318.85788.35.camel@revolution.hippie.lan> <1406063473.71975.8.camel@revolution.hippie.lan> <53D2CFBE.3040207@fgznet.ch> <834BA562-84ED-425C-9D61-0A235A28A94A@gmail.com> <1408472517.56408.659.camel@revolution.hippie.lan> <1408562392.1150.4.camel@revolution.hippie.lan> <2C97B126-91FE-4E93-920F-6ED5045666A6@gmail.com> Content-Type: text/plain; charset="iso-8859-7" Date: Mon, 25 Aug 2014 12:48:08 -0600 Message-ID: <1408992488.1150.105.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by ilsoft.org id s7PIm8Le066042 Cc: freebsd-arm@freebsd.org 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: Mon, 25 Aug 2014 18:48:18 -0000 On Thu, 2014-08-21 at 18:54 +0200, Olavi Kumpulainen wrote: > On 20 Aug 2014, at 21:19 , Ian Lepore wrote: >=20 > > On Wed, 2014-08-20 at 19:19 +0200, Olavi Kumpulainen wrote: > >> On 19 Aug 2014, at 20:21 , Ian Lepore wrote: > >>=20 > >>> On Tue, 2014-08-19 at 19:40 +0200, Olavi Kumpulainen wrote: > >>>> On 25 Jul 2014, at 23:44 , Andreas Tobler wrote: > >>>>=20 > >>>>> On 22.07.14 23:11, Ian Lepore wrote: > >>>>>> On Sat, 2014-07-19 at 16:35 -0600, Ian Lepore wrote: > >>>>>>> On Sat, 2014-06-07 at 14:12 +0200, Olavi Kumpulainen wrote: > >>>>>>>> [c++ exceptions don't work and related discussion] > >>>>>>>=20 > >>>>>>> I checked in a partial fix for c++ exception handling in r26889= 3. It > >>>>>>> fixes the specific problem you detailed above, which was essent= ially > >>>>>>> that the __gnu_Unwind_Find_exidx() function was not available i= n any > >>>>>>> shared library, making the unwinder fall back to using the __ex= idx_start > >>>>>>> and end symbols, which are only valid in a statically-linked ap= p. > >>>>>>>=20 > >>>>>>> With the new function in place, exceptions are closer to workin= g with > >>>>>>> gcc 4.2.1, but still don't work with clang. With gcc, some thi= ngs work > >>>>>>> and some things don't. For example if you throw an exception a= nd in the > >>>>>>> same function have a catch with the right specific type it segf= aults, > >>>>>>> but a catch(...) will catch it without problems. But you can c= atch an > >>>>>>> exception by type if the catch is in a function higher up the c= all chain > >>>>>>> from the place it was thrown. > >>>>>>>=20 > >>>>>>> We're continuing to debug this at $work, and welcome any input = if anyone > >>>>>>> else makes progress with it. Right now we still don't know whe= ther the > >>>>>>> segfaults are because of bad unwinder library code or bad unwin= d data > >>>>>>> emitted by gcc. (I sure hope it's the library, because that's = easier to > >>>>>>> fix.) > >>>>>>>=20 > >>>>>>> On the clang front, it has been said that c++ exceptions work i= n clang > >>>>>>> 3.5, so we tried the clang-devel port, and it didn't just work.= But it > >>>>>>> turns out that port hasn't been updated for quite a while, so w= e may not > >>>>>>> have tested the code that's supposed to work right. While tryi= ng that I > >>>>>>> discovered that clang 3.5 isn't scheduled for release for about= another > >>>>>>> year, so that really isn't a viable solution for anyone with ne= ar-term > >>>>>>> needs, unless the required changes can be cherry-picked and bro= ught into > >>>>>>> our version of 3.4. > >>>>>>>=20 > >>>>>>> -- Ian > >>>>>>=20 > >>>>>> Another update to this... today I committed r268993 and r268994,= and now > >>>>>> I believe arm eabi c++ exceptions are fully working with gcc. I= haven't > >>>>>> run an extensive test suite, but all the test cases we've been u= sing at > >>>>>> $work to debug this now work correctly. > >>>>>=20 > >>>>> Thank you! Confirmed. My test cases which are working with gcc-4.= 10 are now also working with the system gcc, 4.2.1. > >>>>> I totally forgot about this change. I have it in my local gcc tre= e since a while but I forgot about..... > >>>>>=20 > >>>>> Andreas > >>>>>=20 > >>>>>=20 > >>>>=20 > >>>> Please excuse my late reply. I=A2ve been away from keyboard for a = while. > >>>>=20 > >>>> I back-ported r268893, r268993 and r268994 to stable/10 for beagl= ebone. C++ exceptions works for static builds, but not for binaries linke= d to shared libs. > >>>>=20 > >>>> Since this seems to work ok in HEAD, I=A2m obviously missing somet= hing. Do any of you guys have any ideas? > >>>>=20 > >>>> Cheers > >>>>=20 > >>>=20 > >>> I'm not sure what you mean by "backported to stable/10", I merged a= ll > >>> the necessary changes to stable-10 as r269792 on Aug 10. Are you > >>> working with a checkout from earlier than that? If so, just updati= ng > >>> should fix it for you. > >>>=20 > >>> -- Ian > >>>=20 > >>>=20 > >>=20 > >>=20 > >> Updating to stable-10 as of today didn=A2t help. I=A2m running a cle= an checkout except for a couple of drivers in the kernel. > >> This makes me think I have a bad src.conf - How shall I configure th= e build for this to work? > >>=20 > >> /Olavi > >>=20 > >>=20 > >>=20 > >>=20 > >=20 > > You need to use GCC, not clang, as the compiler. Exceptions are just > > broken on clang 3.4, so we're waiting for 3.5 (should be released any > > time now I think). > >=20 > > To compile with gcc, put this in your /etc/make.conf: > >=20 > > WITH_GCC=3Dyes > > WITH_GNUCXX=3Dyes > > WITH_GCC_BOOTSTRAP=3Dyes > > WITHOUT_CLANG=3Dyes > > WITHOUT_CLANG_IS_CC=3Dyes > > WITHOUT_CLANG_BOOTSTRAP=3Dyes > >=20 > > -- Ian > >=20 > >=20 >=20 >=20 > Thank you. It turned out that I already used these with the exception o= f WITHOUT_CLANG_BOOTSTRAP. >=20 > However, c++ exceptions in stable/10 is still defunct when I build it.=20 >=20 > So instead I pulled master, built and installed that instead. And voila= - Exceptions do work!=20 >=20 > Therefore it seems my build method, flags and environment is ok after a= ll. I glanced the commit logs in master but didn=A2t find anything obviou= s, but still; something related seems missing in stable/10 if you ask me. >=20 > /Olavi >=20 >=20 >=20 > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" >=20 I chased this down today to a missing MFC. One of my merges claimed to include a change that wasn't really included. I fixed it today with r270606, and this time I actually tested that I could throw and catch an exception using freebsd built from stable-10 at this rev. :) Thanks for testing this, and sorry for claiming it was fixed when it wasn't quite complete. -- Ian From owner-freebsd-arm@FreeBSD.ORG Mon Aug 25 19:58:04 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54E07E7D for ; Mon, 25 Aug 2014 19:58:04 +0000 (UTC) Received: from capeta.freebsdbrasil.com.br (capeta.freebsdbrasil.com.br [177.10.156.3]) by mx1.freebsd.org (Postfix) with SMTP id 498F935B6 for ; Mon, 25 Aug 2014 19:58:02 +0000 (UTC) Received: (qmail 98579 invoked from network); 25 Aug 2014 16:57:45 -0300 Received: by simscan 1.4.0 ppid: 98568, pid: 98577, t: 0.0086s scanners:none Received: from unknown (HELO darwin.bh.freebsdbrasil.com.br) (eksffa@freebsdbrasil.com.br@10.69.69.7) by capeta.freebsdbrasil.com.br with ESMTPA; 25 Aug 2014 16:57:45 -0300 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: HC-SR04 and FreeBSD From: Patrick Tracanelli In-Reply-To: Date: Mon, 25 Aug 2014 16:57:39 -0300 Content-Transfer-Encoding: quoted-printable Message-Id: <3949AF9C-B5BD-44E8-A049-21F26B8B6B9A@freebsdbrasil.com.br> References: <5D802942-2D0F-4324-8212-C2871EEB6327@FreeBSD.org> <01562FB1-32C6-45AF-AB77-5BB80526E18C@FreeBSD.org> <53F8FED8.6030409@freebsdbrasil.com.br> To: Evandro Nunes X-Mailer: Apple Mail (2.1878.6) Cc: "freebsd-arm@freebsd.org" , Rui Paulo 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: Mon, 25 Aug 2014 19:58:04 -0000 On 24/08/2014, at 19:29, Evandro Nunes wrote: > On Sat, Aug 23, 2014 at 5:51 PM, Patrick Tracanelli = wrote: > On 08/22/14 16:55, Luiz Otavio O Souza wrote: > > On 22 August 2014 00:43, Evandro Nunes wrote: > >> On Thu, Aug 21, 2014 at 4:13 PM, Rui Paulo wrote: > >> > >>> You can use an led instead of a multimeter. The point I'm trying = to make > >>> is to make sure the gpio number really corresponds to that port = number. > >>> > >> > >> still no success, but just an update... > >> > >> ok I added two led: > >> > >> pin 02: 0 gpio_2 =3D=3D=3D> echo (orange LED) > >> pin 03: 0 gpio_3 =3D=3D=3D> trigger (blue LED) > >> pin 49: 0 gpio_49 =3D=3D=3D> previous echo > >> > >> and I have the two simple loops below. > >> > >> when I run loop1, BLUE LED blinks every second; > >> when I run loop2 while loop1 stills run, ORANGE LED won't blink, = and loop2 > >> value still shows 0 value > >> > >> if I "gpioctl -c 2 OUT ; gpioctl -t 2", ORANGE LED will light, = confirming > >> LED is OK; thoses leds will light with 2-5v input... however I have = no idea > >> if the sonar output will range 2-5 or if it will be below 2 (i = tried adding > >> my hand very close and far away from the sensor but led was never = lit) >=20 > Hello, >=20 > As far as I know, for this specific ultrasonic sensor, you are missing > to set the echo GPIO pin to high. This sonar sensor will bring it back > to 0 when the triggered sound get back to the sensor (round-trip). >=20 > So the correct sequence should be, in a loop: >=20 > 1 - Set echo pin to HIGH > 2 - Trigger the sensor for 10us (it means your 100ms is more than you > need, but no, it won=92t cause a problem) > 3 - Wait until echo in is LOW >=20 > When the sound come back to sensor, the device will LOW the GPIO pin = again. >=20 > So what you have to do is to measure how long it took from step 1 to = 3. > This is your duration. And it means a sound-speed duration from 0 = (your > transmitter) until the object and back. We are talking about a 58.22 > sound speed. >=20 > Therefore, what you want is to determine the duration of a pulse with > microsecond accuracy, to measure the duration of HIGH or LOW pulse on = a pin. >=20 > How to do this? I don=92t know how you can get this with in the = command > line. First of, date(1) won=92t display the time with enough = precision. I > believe date =93+%s=94 is the best precision you have and it=92s epoch = (1 full > second, not a fraction). >=20 > You can use some code, however, to get a usec precision =93now=94. = Example > code below I have used in the past will do the trick. >=20 > But how will you =93wait=94 from 1 to 0 on your GPIO echo pin, on a = shell > script, without using almost all CPU you=92ve got in your BeagleBone = (and > this is not much CPU), I have no idea. >=20 > I would test some loop similar to this: >=20 > #/bin/sh > gpioctl -c 2 IN > gpioctl -c 3 OUT > gpioctl 3 0 > gpioctl 2 0 >=20 > while true ; do > gpioctl 3 1 ; sleep .10; gpioctl 3 0 # trigger > gpioctl 2 1 # set echo HIGH >=20 > inicio=3D$(/root/date-precisao) # what time is it? >=20 > while [ $(gpioctl 2 | tail -1) -gt 0 ] ; do > echo "...=94 #does nothing, because the pin is still HIGH > done >=20 > fim=3D$(/root/date-precisao) # pin is now LOW, what time is it? > dura=3D$(( $fim - $inicio )) # echo duration (HIGH to LOW usec = duration) > dura2=3D$(( $dura * 10 )) # sh doesn=92t like X.Y precision, make it = integer > dist=3D$(( $dura2 / 582 )) # 58.22 should be the number but 58.2 is = OK > echo "Distance: $dist=94 # this is your not much precise distance > sleep 1 > done >=20 > The above code is untested, I just wrote it on this e-mail. Your CPU > will be insanely high because this is not something that should be = done > on shell script, and therefore, your distance precision won=92t be > reliable. However, you will have a relative reference. >=20 > Meaning, add an object 10cm from the sensor and you will have a = number. > Add an object 100cm from the and you will have another number, = hopefully > a 10 times higher number =97 maybe 9, maybe 12, expect imprecision = caused > by high CPU usage and a big latency on shell commands getting executed > to do a math that should be done somehow else. >=20 > Good luck with your experiments. >=20 > FreeBSD/arm with a BeagleBone is a HELL of a FUN ]:-) >=20 > /* > * Dummy code to print date with usec precision > * Patrick Tracanelli > * > * clang date-precisao.c -o date-precisao (should cleanly compile) > * > */ > #include > #include > #include > int main(void) > { > struct timeval agora; > struct tm *t; > char time[9]; > int ret; >=20 > ret =3D gettimeofday(&agora, 0); > t =3D localtime(&agora.tv_sec); > ret =3D strftime(time, sizeof(time), "%H%M%S", t); > // xunxo 999 pq as vezes em armv6 fica zerado... > printf("999%s%06ld\n", time, agora.tv_usec); > return 0; > } >=20 >=20 > hey patrick > yea somehow it made some sense now > first test was your afirmation that sensor will set pin value to zero, = it really does as soon as I set to 1, sensor will set it to 0 again > i really expected to get a value on echo pin other than 0 or 1 :( > i run your shell script and while cpu was high, it was not exausting = the board, about 20% cpu comsuption running this loop > when i add an object say 5cm from the sensor I get values that mean = nothing, around 2201, 2300 > when i add the object at 10cm i get values around 48000-49000 > when i add the object at 1 meter i get values around 200000-230000 > so yes the values mean nothing but they make some relative sense, with = a lot of imprecision for sure, sometimes deviation is upper some times = lower Good... > so it means we need a library in freebsd for electronics, so we can = have functions like arduino's pulseIn which seem to do just that, wait = for a pin status and return how long it took until that value was = received, the kind of libs we see out there in nodejs, python...=20 > now that you made clear how the sensor works, i will try to write = something to do that more precisely instead of using a shell script > thank you all Yes, that=92s it. What you wanna do is to measure how long HIGH takes. I just made a better test so you can actually "see" the sensor working. = Run this more simple loop: gpioctl -c 2 IN gpioctl -c 3 OUT gpioctl 3 0 while true ; do gpioctl 3 1 ; sleep .10; gpioctl 3 0 while [ $(gpioctl 2 | tail -1) -gt 0 ] ; do echo "..." #nada done sleep 1 done On a second shell, run this horrible cpu consuming loop: sh -c "while true ; do /root/date-precisao && gpioctl 2 ; done" And check for the date when PIN 2 becomes high and later when it becomes = low again. Speed of sound is 340 meters per second. Since this sensor measures = round-trip, you shall divide by two, so here is a simple measurement by = hand: An object added 1 meter from sensor: (eksffa@localhost):~% echo "((999013225427212-999013225364525)/340)/2" | = bc 92 An object added 2 meters from sensor: (eksffa@localhost):~% echo "((999013003943898-999013003811223)/340)/2" | = bc 195 So, now you have a better precision, but insanely high CPU usage due to = the second loop. Yes, you are right, I personally agree some library with basic = electronic functions would be very valuable to FreeBSD. Good to read you will try to write something, I believe Rui Paulo's = library is a good start to hack, reading GPIO device, detecting when a = PIN is HIGH and measuring the time until it becomes LOW is probably a = good starter challenge ;-) One sensor I am trying to make work is DHT11 temperature and humidity, = according to datasheet[1] on section 7, this "single-wire = bi-directional" sensor seems to return a 32bit value which shall be = calculated in 4 octets. This is a kind of sensor that deserves a library for sure (and FreeBSD = deserves to have such a library) but hopefully not the kind of Arduino = library which is device specific. A more generic library that reads a = selectable 8/16/32bit value and returns it in different formats = (decimal, hex, ...) would do the job for this sensor as well as other = single-wire pin sensors. [1]http://akizukidenshi.com/download/ds/aosong/DHT11.pdf -- Patrick Tracanelli FreeBSD Brasil LTDA. Tel.: (31) 3516-0800 316601@sip.freebsdbrasil.com.br http://www.freebsdbrasil.com.br "Long live Hanin Elias, Kim Deal!" From owner-freebsd-arm@FreeBSD.ORG Tue Aug 26 00:11:16 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1AE09454 for ; Tue, 26 Aug 2014 00:11:16 +0000 (UTC) Received: from alogt.com (alogt.com [69.36.191.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D09AB3D50 for ; Tue, 26 Aug 2014 00:11:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alogt.com; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=H9jvO1RmcLZpCTdnRUNk9enKskjQaK/TFEMhBXsn/SQ=; b=r/Qk/DjydFrnLtVkIw406B0rS67Jt4NBNuuuu56xDMhTVeXodgJMvXp/T52lhLPbPi7a1nODggIMewSYHWzyzRJDO9avmXNu1swjWp+Vj+5zmtR3odsDc2TrdgCpj7RiTeAzLRB7SSJHqSCH4mgBe8UYif7VMVCzszvCvb92bHE=; Received: from [114.121.161.126] (port=37463 helo=X220.alogt.com) by sl-508-2.slc.westdc.net with esmtpsa (SSLv3:DHE-RSA-AES128-SHA:128) (Exim 4.82) (envelope-from ) id 1XM4Lx-002tQn-RP; Mon, 25 Aug 2014 18:11:14 -0600 Date: Tue, 26 Aug 2014 07:45:41 +0800 From: Erich Dollansky To: Ralf Wenk Subject: Re: FreeBSD 10.0 on Raspberry PI B+ no network devices Message-ID: <20140826074541.7607b4e0@X220.alogt.com> In-Reply-To: References: <20140825165622.6771b548@X220.alogt.com> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.22; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - sl-508-2.slc.westdc.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - alogt.com X-Get-Message-Sender-Via: sl-508-2.slc.westdc.net: authenticated_id: erichsfreebsdlist@alogt.com X-Source: X-Source-Args: X-Source-Dir: Cc: freebsd-arm@freebsd.org 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, 26 Aug 2014 00:11:16 -0000 Hi, On Mon, 25 Aug 2014 15:33:27 +0200 Ralf Wenk wrote: > > > > > > I got recently two Raspberries B+. I downloaded the file > > > FreeBSD-10.0-STABLE-arm-armv6-RPI-B-20140406-r264194.img.bz2 and > > > copied it to a memory card. > > Last month YAMAMOTO Shigeru wrote a mail that he has the same problem > with a official image while his own one is fine. > He suggested to use a newer firmware for the official image. > Alzheimer has struck. I have read this message but forgot about it later and downloaded even an outdated image. > Please have a look at > http://lists.freebsd.org/pipermail/freebsd-arm/2014-July/008872.html > for his mail and a link to his image(s) for a RaspberryPi B+. > I have downloaded that image. It boots and recognises USB and network. It seems that I have now other problems but at least the Raspberry is active on the USB and network connectors. Thanks! Erich From owner-freebsd-arm@FreeBSD.ORG Tue Aug 26 00:24:09 2014 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0359D738 for ; Tue, 26 Aug 2014 00:24:09 +0000 (UTC) Received: from alogt.com (alogt.com [69.36.191.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF79F3E75 for ; Tue, 26 Aug 2014 00:24:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=alogt.com; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=0SQ0KhtSQkp0XmAVztfNXGhF3KQTf1rNXT3PuYupJ8E=; b=CUgysuu2JXLfVNysPmRA1vwZA1KwnilAmFFoMEQ5qqclEVU3+w1csVxCjCFAsakLq7wTM6iwZCRg4VmVLphGrHuz6DFRcNXch/cSmX7hZWGLfoDjB4HJOuSvFTLzWqpoLSWOICT8gIAYCmKKrfM5eeRlRBiW4vbTi6MsAWUknqA=; Received: from [114.121.161.126] (port=36567 helo=X220.alogt.com) by sl-508-2.slc.westdc.net with esmtpsa (SSLv3:DHE-RSA-AES128-SHA:128) (Exim 4.82) (envelope-from ) id 1XM4YQ-002znm-Js; Mon, 25 Aug 2014 18:24:08 -0600 Date: Tue, 26 Aug 2014 07:49:51 +0800 From: Erich Dollansky To: Andreas Schwarz Subject: Re: FreeBSD 10.0 on Raspberry PI B+ no network devices Message-ID: <20140826074951.4cf5a8fc@X220.alogt.com> In-Reply-To: <20140825163528.d2e696cc3d03ad9bebcd239c@schwarzes.net> References: <20140825165622.6771b548@X220.alogt.com> <20140825163528.d2e696cc3d03ad9bebcd239c@schwarzes.net> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.22; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - sl-508-2.slc.westdc.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - alogt.com X-Get-Message-Sender-Via: sl-508-2.slc.westdc.net: authenticated_id: erichsfreebsdlist@alogt.com X-Source: X-Source-Args: X-Source-Dir: Cc: freebsd-arm@freebsd.org 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, 26 Aug 2014 00:24:09 -0000 Hi, On Mon, 25 Aug 2014 16:35:36 +0200 (CEST) Andreas Schwarz wrote: > On Mon, 25 Aug 2014 09:05:35 -0400 Paul Mather > wrote: > > On Aug 25, 2014, at 4:56 AM, Erich Dollansky > > wrote: > > Hi, > > > > I got recently two Raspberries B+. I downloaded the file > > > FreeBSD-10.0-STABLE-arm-armv6-RPI-B-20140406-r264194.img.bz2 and > > > copied it to a memory card. > > > > > > I edited rc.conf to be able to use the Raspberries without > > > keyboard. The problem is now that no network comes up. > > > > > > ue0 simply does not exist. > > > > > > What do I do wrong here? > > > > > > It must be something simple I just do not see. > > > > You are likely not doing anything wrong. As I understand it, the > > Model B+ uses a slightly different USB controller/revision to the > > Model B, and this might not be recognised/supported yet by > > FreeBSD. The network is via USB on Raspberry Pi, so the USB > > support problem would cause the network not to work/be recognised. > > I've got also two B+ Models two weeks ago and I'm able to use the > image (r269955) from my B Models without any problems. The only > thing, what I had to do, was to upgrade the bootloader to a recent > version. > > Have a look at : > > https://github.com/raspberrypi/firmware/tree/master/boot > I used now the image from http://freebsd-current.os-hackers.jp/pub/FreeBSD/snapshots/20140725/raspberry-pi/ and the machine boots. I do not know more at the moment. Erich From owner-freebsd-arm@FreeBSD.ORG Tue Aug 26 19:27:14 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E96A09C0 for ; Tue, 26 Aug 2014 19:27:14 +0000 (UTC) Received: from mail-wi0-x230.google.com (mail-wi0-x230.google.com [IPv6:2a00:1450:400c:c05::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 79D4D3F2C for ; Tue, 26 Aug 2014 19:27:14 +0000 (UTC) Received: by mail-wi0-f176.google.com with SMTP id bs8so4738983wib.15 for ; Tue, 26 Aug 2014 12:27:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=w+E+8gJiM7bETNFV/SM2Duw//IXWpsAZWD72kJA5764=; b=rHRy39mJ2mFE1s6BVBs0hUSEtnrGWavIyHDixEj8gK+X3AyPECqdSQTtPM2cg0edSB ITwKHa2UdneEDqJdxVJ0Qfil9zbTaj+EdtqB2gGPiRRcUkc8dfJHy1OnkYrwhQj04LkS xnenkWVUHPayTPwdQugtfSnqg4Kqf48oGO0GZHRhckmNFyF4YW6hKulupgc6EVxHTJZe 44nBko8YxAzuvOZyZGw9lew0t4XUhMwRKR4ed4WoZsOyBHZ447G6LUl1efo7MXGoXLbB RsGZHFaiZnDka/ety5Ct+FdqMl/z7WOt6fNZwDOs8HkwVOflUgWxrTGeleL8Lt5k1N6n 8Dqw== MIME-Version: 1.0 X-Received: by 10.180.92.73 with SMTP id ck9mr24031583wib.54.1409081232661; Tue, 26 Aug 2014 12:27:12 -0700 (PDT) Received: by 10.216.199.70 with HTTP; Tue, 26 Aug 2014 12:27:12 -0700 (PDT) In-Reply-To: <3949AF9C-B5BD-44E8-A049-21F26B8B6B9A@freebsdbrasil.com.br> References: <5D802942-2D0F-4324-8212-C2871EEB6327@FreeBSD.org> <01562FB1-32C6-45AF-AB77-5BB80526E18C@FreeBSD.org> <53F8FED8.6030409@freebsdbrasil.com.br> <3949AF9C-B5BD-44E8-A049-21F26B8B6B9A@freebsdbrasil.com.br> Date: Tue, 26 Aug 2014 16:27:12 -0300 Message-ID: Subject: Re: HC-SR04 and FreeBSD From: Luiz Otavio O Souza To: Patrick Tracanelli Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-arm@freebsd.org" , Rui Paulo 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, 26 Aug 2014 19:27:15 -0000 On 25 August 2014 16:57, Patrick Tracanelli wrote: > On 24/08/2014, at 19:29, Evandro Nunes wrote: >>> On Sat, Aug 23, 2014 at 5:51 PM, Patrick Tracanelli wrote: >> Hello, >> >> As far as I know, for this specific ultrasonic sensor, you are missing >> to set the echo GPIO pin to high. This sonar sensor will bring it back >> to 0 when the triggered sound get back to the sensor (round-trip). >> >> So the correct sequence should be, in a loop: >> >> 1 - Set echo pin to HIGH >> 2 - Trigger the sensor for 10us (it means your 100ms is more than you >> need, but no, it won=E2=80=99t cause a problem) >> 3 - Wait until echo in is LOW >> >> When the sound come back to sensor, the device will LOW the GPIO pin aga= in. No, this is not correct, setting a value to an input is a noop and when you need this kind of cooperation from both sides, you usually will be using a pull-up and open colector outputs (they never drive the output to 'high' to avoid short-circuits). [...] > > What you wanna do is to measure how long HIGH takes. > > I just made a better test so you can actually "see" the sensor working. R= un this more simple loop: > > gpioctl -c 2 IN > gpioctl -c 3 OUT > gpioctl 3 0 > > while true ; do > gpioctl 3 1 ; sleep .10; gpioctl 3 0 > while [ $(gpioctl 2 | tail -1) -gt 0 ] ; do > echo "..." #nada > done > sleep 1 > done > > On a second shell, run this horrible cpu consuming loop: > > sh -c "while true ; do /root/date-precisao && gpioctl 2 ; done" This one is okay, > > And check for the date when PIN 2 becomes high and later when it becomes = low again. > > Speed of sound is 340 meters per second. Since this sensor measures round= -trip, you shall divide by two, so here is a simple measurement by hand: > > An object added 1 meter from sensor: > > (eksffa@localhost):~% echo "((999013225427212-999013225364525)/340)/2" | = bc > 92 > > An object added 2 meters from sensor: > > (eksffa@localhost):~% echo "((999013003943898-999013003811223)/340)/2" | = bc > 195 > > So, now you have a better precision, but insanely high CPU usage due to t= he second loop. > > Yes, you are right, I personally agree some library with basic electronic= functions would be very valuable to FreeBSD. > > Good to read you will try to write something, I believe Rui Paulo's libra= ry is a good start to hack, reading GPIO device, detecting when a PIN is HI= GH and measuring the time until it becomes LOW is probably a good starter c= hallenge ;-) What we need is interrupt support so you don't need to keep reading the GPIO pin in a busy loop and just get notified when the pin change its state. I hope i can get this sorted out soon (it is being worked on). > > One sensor I am trying to make work is DHT11 temperature and humidity, ac= cording to datasheet[1] on section 7, this "single-wire bi-directional" sen= sor seems to return a 32bit value which shall be calculated in 4 octets. I can help you with the DHT11. I have some DHT11 working with an AVR bridge which gives me the DHT11 data through I2C, this make the readings reliable. I hope GPIO eventually grow up so i can get rid of the AVR bridge. There are 5 octets with the Parity. > This is a kind of sensor that deserves a library for sure (and FreeBSD de= serves to have such a library) but hopefully not the kind of Arduino librar= y which is device specific. A more generic library that reads a selectable = 8/16/32bit value and returns it in different formats (decimal, hex, ...) wo= uld do the job for this sensor as well as other single-wire pin sensors. A generic library isn't always possible because each device encodes the data in its own format, the DHT11(/DHT22) is different than onewire and so on, but a good driver (if possible) for DHT11 would be useful. > > [1]http://akizukidenshi.com/download/ds/aosong/DHT11.pdf Luiz From owner-freebsd-arm@FreeBSD.ORG Tue Aug 26 23:20:49 2014 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F03BDF35 for ; Tue, 26 Aug 2014 23:20:49 +0000 (UTC) Received: from feynman.konjz.org (feynman.konjz.org [64.147.119.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5E2A3F39 for ; Tue, 26 Aug 2014 23:20:49 +0000 (UTC) Received: from 127.0.0.1 (tor-exit01.solidonetworks.com [94.126.178.1]) (authenticated bits=0) by feynman.konjz.org (8.14.7/8.14.4) with ESMTP id s7QNKhYO022142 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Tue, 26 Aug 2014 19:20:46 -0400 (EDT) (envelope-from george@ceetonetechnology.com) Message-ID: <53FD1646.2010103@ceetonetechnology.com> Date: Tue, 26 Aug 2014 19:20:38 -0400 From: George Rosamond MIME-Version: 1.0 To: freebsd-arm@freebsd.org Subject: Re: FreeBSD 10.0 on Raspberry PI B+ no network devices References: <20140825165622.6771b548@X220.alogt.com> <20140825163528.d2e696cc3d03ad9bebcd239c@schwarzes.net> <20140826074951.4cf5a8fc@X220.alogt.com> In-Reply-To: <20140826074951.4cf5a8fc@X220.alogt.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit 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, 26 Aug 2014 23:20:50 -0000 Erich Dollansky wrote: > Hi, > > On Mon, 25 Aug 2014 16:35:36 +0200 (CEST) > Andreas Schwarz wrote: > >> On Mon, 25 Aug 2014 09:05:35 -0400 Paul Mather >> wrote: >>> On Aug 25, 2014, at 4:56 AM, Erich Dollansky >>> wrote: >> >> Hi, >> >>>> I got recently two Raspberries B+. I downloaded the file >>>> FreeBSD-10.0-STABLE-arm-armv6-RPI-B-20140406-r264194.img.bz2 and >>>> copied it to a memory card. >>>> >>>> I edited rc.conf to be able to use the Raspberries without >>>> keyboard. The problem is now that no network comes up. >>>> >>>> ue0 simply does not exist. >>>> >>>> What do I do wrong here? >>>> >>>> It must be something simple I just do not see. >>> >>> You are likely not doing anything wrong. As I understand it, the >>> Model B+ uses a slightly different USB controller/revision to the >>> Model B, and this might not be recognised/supported yet by >>> FreeBSD. The network is via USB on Raspberry Pi, so the USB >>> support problem would cause the network not to work/be recognised. >> >> I've got also two B+ Models two weeks ago and I'm able to use the >> image (r269955) from my B Models without any problems. The only >> thing, what I had to do, was to upgrade the bootloader to a recent >> version. >> >> Have a look at : >> >> https://github.com/raspberrypi/firmware/tree/master/boot >> > I used now the image from > > http://freebsd-current.os-hackers.jp/pub/FreeBSD/snapshots/20140725/raspberry-pi/ > > and the machine boots. I do not know more at the moment. I assume the entire RPi firmware from Github directory gets dumped into /boot/msdos? g From owner-freebsd-arm@FreeBSD.ORG Tue Aug 26 23:21:24 2014 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96B39F72 for ; Tue, 26 Aug 2014 23:21:24 +0000 (UTC) Received: from capeta.freebsdbrasil.com.br (capeta.freebsdbrasil.com.br [177.10.156.3]) by mx1.freebsd.org (Postfix) with SMTP id DA7183FB8 for ; Tue, 26 Aug 2014 23:21:23 +0000 (UTC) Received: (qmail 84893 invoked from network); 26 Aug 2014 20:21:07 -0300 Received: by simscan 1.4.0 ppid: 84889, pid: 84891, t: 0.0059s scanners:none Received: from unknown (HELO darwin.bh.freebsdbrasil.com.br) (eksffa@freebsdbrasil.com.br@10.69.69.7) by capeta.freebsdbrasil.com.br with ESMTPA; 26 Aug 2014 20:21:07 -0300 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: HC-SR04 and FreeBSD From: Patrick Tracanelli In-Reply-To: Date: Tue, 26 Aug 2014 20:21:08 -0300 Content-Transfer-Encoding: quoted-printable Message-Id: <411C643B-BC46-494E-919B-39098FB87EEA@freebsdbrasil.com.br> References: <5D802942-2D0F-4324-8212-C2871EEB6327@FreeBSD.org> <01562FB1-32C6-45AF-AB77-5BB80526E18C@FreeBSD.org> <53F8FED8.6030409@freebsdbrasil.com.br> <3949AF9C-B5BD-44E8-A049-21F26B8B6B9A@freebsdbrasil.com.br> To: Luiz Otavio O Souza X-Mailer: Apple Mail (2.1878.6) Cc: "freebsd-arm@freebsd.org" , Rui Paulo 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, 26 Aug 2014 23:21:24 -0000 On 26/08/2014, at 16:27, Luiz Otavio O Souza wrote: > On 25 August 2014 16:57, Patrick Tracanelli wrote: >> On 24/08/2014, at 19:29, Evandro Nunes wrote: >>>> On Sat, Aug 23, 2014 at 5:51 PM, Patrick Tracanelli wrote: >>> Hello, >>>=20 >>> As far as I know, for this specific ultrasonic sensor, you are = missing >>> to set the echo GPIO pin to high. This sonar sensor will bring it = back >>> to 0 when the triggered sound get back to the sensor (round-trip). >>>=20 >>> So the correct sequence should be, in a loop: >>>=20 >>> 1 - Set echo pin to HIGH >>> 2 - Trigger the sensor for 10us (it means your 100ms is more than = you >>> need, but no, it won=92t cause a problem) >>> 3 - Wait until echo in is LOW >>>=20 >>> When the sound come back to sensor, the device will LOW the GPIO pin = again. >=20 > No, this is not correct, setting a value to an input is a noop and > when you need this kind of cooperation from both sides, you usually > will be using a pull-up and open colector outputs (they never drive > the output to 'high' to avoid short-circuits). Yes, I was not clear, that=92s why I did some tests and sent the other = e-mail. You won=92t set anything, you will measure how long it was set = to high. >> What you wanna do is to measure how long HIGH takes. >>=20 >> I just made a better test so you can actually "see" the sensor = working. Run this more simple loop: >>=20 >> gpioctl -c 2 IN >> gpioctl -c 3 OUT >> gpioctl 3 0 >>=20 >> while true ; do >> gpioctl 3 1 ; sleep .10; gpioctl 3 0 >> while [ $(gpioctl 2 | tail -1) -gt 0 ] ; do >> echo "..." #nada >> done >> sleep 1 >> done >>=20 >> On a second shell, run this horrible cpu consuming loop: >>=20 >> sh -c "while true ; do /root/date-precisao && gpioctl 2 ; done" >=20 > This one is okay, That=92s it, my best shot to be clear about this specific sensor = behavior. >> Yes, you are right, I personally agree some library with basic = electronic functions would be very valuable to FreeBSD. >>=20 >> Good to read you will try to write something, I believe Rui Paulo's = library is a good start to hack, reading GPIO device, detecting when a = PIN is HIGH and measuring the time until it becomes LOW is probably a = good starter challenge ;-) >=20 > What we need is interrupt support so you don't need to keep reading > the GPIO pin in a busy loop and just get notified when the pin change > its state. >=20 > I hope i can get this sorted out soon (it is being worked on). Wow this is very good news Loos. Is it something new to gpioctl or another utility? Do you need a sensor = to sort it out? I can send you with that board we talked before. >> One sensor I am trying to make work is DHT11 temperature and = humidity, according to datasheet[1] on section 7, this "single-wire = bi-directional" sensor seems to return a 32bit value which shall be = calculated in 4 octets. >=20 > I can help you with the DHT11. I have some DHT11 working with an AVR > bridge which gives me the DHT11 data through I2C, this make the > readings reliable. I hope GPIO eventually grow up so i can get rid of > the AVR bridge. There are 5 octets with the Parity. My DHT11 is just dead, Ill get a new one soon and I would like to see = your schematics and code, if possible, on how you made it to work. Are = you using on a BBB board? >> This is a kind of sensor that deserves a library for sure (and = FreeBSD deserves to have such a library) but hopefully not the kind of = Arduino library which is device specific. A more generic library that = reads a selectable 8/16/32bit value and returns it in different formats = (decimal, hex, ...) would do the job for this sensor as well as other = single-wire pin sensors. >=20 > A generic library isn't always possible because each device encodes > the data in its own format, the DHT11(/DHT22) is different than > onewire and so on, but a good driver (if possible) for DHT11 would be > useful. I agree, it=92s a cheap device and useful one. >> [1]http://akizukidenshi.com/download/ds/aosong/DHT11.pdf -- Patrick Tracanelli FreeBSD Brasil LTDA. Tel.: (31) 3516-0800 316601@sip.freebsdbrasil.com.br http://www.freebsdbrasil.com.br "Long live Hanin Elias, Kim Deal!" From owner-freebsd-arm@FreeBSD.ORG Wed Aug 27 00:14:11 2014 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B2C0CBB3 for ; Wed, 27 Aug 2014 00:14:11 +0000 (UTC) Received: from olinguito.schwarzes.net (olinguito.schwarzes.net [IPv6:2a01:4f8:7d:1b5::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F0213554 for ; Wed, 27 Aug 2014 00:14:10 +0000 (UTC) Received: from asc-t60.schwarzes.net (p5B033017.dip0.t-ipconnect.de [91.3.48.23]) (authenticated bits=0) by olinguito.schwarzes.net (8.14.8/8.14.8) with ESMTP id s7R0E0Ta030731; Wed, 27 Aug 2014 02:14:01 +0200 (CEST) (envelope-from Andreas.Schwarz@schwarzes.net) Date: Wed, 27 Aug 2014 02:14:00 +0200 (CEST) From: Andreas Schwarz To: George Rosamond Subject: Re: FreeBSD 10.0 on Raspberry PI B+ no network devices Message-Id: <20140827021349.1273f703c6756d07fad72a16@schwarzes.net> In-Reply-To: <53FD1646.2010103@ceetonetechnology.com> References: <20140825165622.6771b548@X220.alogt.com> <20140825163528.d2e696cc3d03ad9bebcd239c@schwarzes.net> <20140826074951.4cf5a8fc@X220.alogt.com> <53FD1646.2010103@ceetonetechnology.com> X-Mailer: Sylpheed 3.4.2 (GTK+ 2.10.14; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (olinguito.schwarzes.net [78.47.41.143]); Wed, 27 Aug 2014 02:14:01 +0200 (CEST) Cc: freebsd-arm@freebsd.org 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: Wed, 27 Aug 2014 00:14:11 -0000 On Tue, 26 Aug 2014 19:20:38 -0400 George Rosamond wrote: > Erich Dollansky wrote: > > On Mon, 25 Aug 2014 16:35:36 +0200 (CEST) > > Andreas Schwarz wrote: > > > >> I've got also two B+ Models two weeks ago and I'm able to use the > >> image (r269955) from my B Models without any problems. The only > >> thing, what I had to do, was to upgrade the bootloader to a recent > >> version. > >> > >> Have a look at : > >> > >> https://github.com/raspberrypi/firmware/tree/master/boot > >> > > I used now the image from > > > > http://freebsd-current.os-hackers.jp/pub/FreeBSD/snapshots/20140725/raspberry-pi/ > > > > and the machine boots. I do not know more at the moment. > > I assume the entire RPi firmware from Github directory gets dumped into > /boot/msdos? Yes, but we don't need the kernel.img, at this point we are loading the uboot.img (keep uboot.img and ubldr from your existing boot partition). See the structure of my boot partition below. root@pizelot:~ # mount_msdosfs /dev/mmcsd0s1 /mnt/ root@pizelot:~ # ll /mnt/ total 7140 -rwxr-xr-x 1 root wheel 17840 Aug 13 04:16 bootcode.bin -rwxr-xr-x 1 root wheel 101 Aug 13 04:17 config.txt -rwxr-xr-x 1 root wheel 6061 Aug 13 04:16 fixup.dat -rwxr-xr-x 1 root wheel 2276 Aug 13 04:16 fixup_cd.dat -rwxr-xr-x 1 root wheel 9107 Aug 13 04:16 fixup_x.dat -rwxr-xr-x 1 root wheel 16041 Jul 2 09:30 rpi.dtb -rwxr-xr-x 1 root wheel 2595320 Aug 13 04:16 start.elf -rwxr-xr-x 1 root wheel 528632 Aug 13 04:16 start_cd.elf -rwxr-xr-x 1 root wheel 3550632 Aug 13 04:16 start_x.elf -rwxr-xr-x 1 root wheel 250129 Jul 2 09:30 ubldr -rwxr-xr-x 1 root wheel 306016 Jul 2 09:30 uboot.img -rwxr-xr-x 1 root wheel 89 Jul 2 09:30 uenv.txt root@pizelot:~ # cat /mnt/config.txt disable_commandline_tags=1 gpu_mem=16 device_tree=rpi.dtb device_tree_address=0x100 kernel=uboot.img root@pizelot:~ # cat /mnt/uenv.txt loadbootscript=fatload mmc 0 0x2000000 ubldr bootscript=fdt addr 0x100;bootelf 0x2000000 -- best regards Andreas From owner-freebsd-arm@FreeBSD.ORG Wed Aug 27 12:53:42 2014 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB9B2F6B for ; Wed, 27 Aug 2014 12:53:42 +0000 (UTC) Received: from mail-ie0-x22f.google.com (mail-ie0-x22f.google.com [IPv6:2607:f8b0:4001:c03::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 943713CAC for ; Wed, 27 Aug 2014 12:53:42 +0000 (UTC) Received: by mail-ie0-f175.google.com with SMTP id x19so188499ier.20 for ; Wed, 27 Aug 2014 05:53:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ac6HR4eW+vvaiPYt0sUthcgFdNeIGepFfiC1iu81nUU=; b=AalFjmvgHVtSeVaQNjxSdaj++o0PrEIQg2IH9PrFuXz8T+3uUcYjq/lCJC/yboCT8p rLUQrEHRaRdF5Vc8q/h67UheWlkh0h/oCCc9h7lCqYD5R9XZ/RY2Ja6b61ooKAghp3oI F4CWD6siCNIZqOTUGQhUghqSiRERHF63Ufw40zZHxemhUuo+UG16U3e5sK3CJy3IwAXc DT9LDjbc4gxKVcyKp5BNgcilU8Bj0hfDJjGT3Ti24HDhv3tQw5vTEggdxSc2nPqDExtC 4Bt4VmjGfr8LF4pbr6yH5dAmDT51UUM3LIWjDHEwChduA9dOtFRUH6GTdXCZxeCVwy6U ll6A== MIME-Version: 1.0 X-Received: by 10.50.66.133 with SMTP id f5mr25456081igt.38.1409144021299; Wed, 27 Aug 2014 05:53:41 -0700 (PDT) Received: by 10.64.88.163 with HTTP; Wed, 27 Aug 2014 05:53:41 -0700 (PDT) In-Reply-To: <53F27EB9.3090805@toomeek.waw.pl> References: <53EE0F93.6060407@toomeek.waw.pl> <53EE23B1.2020403@toomeek.waw.pl> <53EE402D.8000204@toomeek.waw.pl> <20140815214416.GJ60808@cicely7.cicely.de> <53EFCD6C.5000601@toomeek.waw.pl> <53EFD5D5.7010406@toomeek.waw.pl> <53F0E640.5030506@toomeek.waw.pl> <53F14BD7.1050007@fukaumi.org> <53F1A126.1020408@toomeek.waw.pl> <53F1D8FD.9010903@fukaumi.org> <53F27EB9.3090805@toomeek.waw.pl> Date: Wed, 27 Aug 2014 20:53:41 +0800 Message-ID: Subject: Re: U-boot for Banana Pi From: Ganbold Tsagaankhuu To: TooMeeK Admin Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "freebsd-arm@freebsd.org" 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: Wed, 27 Aug 2014 12:53:42 -0000 On Tue, Aug 19, 2014 at 6:31 AM, TooMeeK Admin wrote: > Hello, > > thanks Naoki, but.. this is my script's header for SD booting image: > > #!/bin/bash > cd /root/banana > rm /root/banana/banana.img > truncate -s 940M banana.img > > mdconfig -f banana.img -u0 > gpart create -s mbr md0 > gpart add -b 1m -s 64m -t fat16 md0 > gpart set -a active -i 1 md0 > gpart add -t freebsd md0 > newfs_msdos -F 16 /dev/md0s1 > newfs /dev/md0s2 > > mount_msdosfs /dev/md0s1 /mnt > cp /usr/obj/arm.armv6/usr/src/sys/BANANAPI/kernel /mnt > cd /usr/src/sunxi-tools > echo "fatload mmc 0 0x40200000 kernel; go 0x40200100" > boot.cmd > /usr/src/u-boot-bananapi/tools/mkimage -C none -A arm -T script -d > boot.cmd boot.scr > cp boot.scr /mnt > umount /mnt > > mdconfig -d -u0 > cd /root/banana > # Original Banana Pi U-boot loader > #dd if=/usr/src/u-boot-sunxi/spl/sunxi-spl.bin conv=notrunc of=banana.img > bs=1024 seek=8 > #dd if=/usr/src/u-boot-sunxi/u-boot.bin conv=notrunc of=banana.img > bs=1024 seek=40 > # Lemaker's U-boot loader > dd if=/usr/src/u-boot-bananapi/spl/sunxi-spl.bin conv=notrunc > of=banana.img bs=1024 seek=8 > dd if=/usr/src/u-boot-bananapi/u-boot.bin conv=notrunc of=banana.img > bs=1024 seek=40 > > The script output is similar to this: > > root@freebsd:~/banana # bash prepare_boot.sh > md0 created > md0s1 added > active set on md0s1 > md0s2 added > /dev/md0s1: 130888 sectors in 16361 FAT16 clusters (4096 bytes/cluster) > BytesPerSec=512 SecPerClust=8 ResSectors=1 FATs=2 RootDirEnts=512 > Media=0xf0 FATsecs=64 SecPerTrack=17 Heads=255 HiddenSecs=0 > HugeSectors=131053 > /dev/md0s2: 875.0MB (1792000 sectors) block size 32768, fragment size 4096 > using 4 cylinder groups of 218.78MB, 7001 blks, 28032 inodes. > super-block backups (for fsck -b #) at: > 192, 448256, 896320, 1344384 > Image Name: > Created: Tue Aug 19 02:20:04 2014 > Image Type: ARM Linux Script (uncompressed) > Data Size: 55 Bytes = 0.05 kB = 0.00 MB > Load Address: 00000000 > Entry Point: 00000000 > Contents: > Image 0: 47 Bytes = 0.05 kB = 0.00 MB > 23+1 records in > 23+1 records out > 24064 bytes transferred in 0.003972 secs (6058691 bytes/sec) > 235+1 records in > 235+1 records out > 241544 bytes transferred in 0.003128 secs (77224557 bytes/sec) > > > Original Banana Pi U-boot loader output: > > > U-Boot SPL 2014.04-10704-gf625d1d (Aug 16 2014 - 23:44:23) > Board: Bananapi > DRAM: 1024 MiB > CPU: 960000000Hz, AXI/AHB/APB: 3/2/2 > spl: not an uImage at 1600 > spl: not an uImage at 80 > ### ERROR ### Please RESET the board ### > > And Lemaker's: > > U-Boot SPL 2014.04-10693-gf954935 (Aug 17 2014 - 21:41:27) > > Board: Bananapi > DRAM: 1024 MiB > CPU: 960000000Hz, AXI/AHB/APB: 3/2/2 > spl: not an uImage at 1600 > spl: not an uImage at 80 > ### ERROR ### Please RESET the board ### > > The only way it works is: > # Cubieboard's 2 U-boot loader from FreeBSD Wiki > > dd if=sunxi-spl.bin conv=notrunc of=banana.img bs=1024 seek=8 > dd if=u-boot.bin conv=notrunc of=banana.img bs=1024 seek=32 > > And according to https://github.com/linux-sunxi/u-boot-sunxi/wiki > "If using v2013.07 or earlier then the procedure is slightly different > dd if=spl/sunxi-spl.bin of=/dev/sdX bs=1024 seek=8 > dd if=u-boot.bin of=/dev/sdX bs=1024 seek=32" > > So it SHOULD be seek=40 and it's not working anyway.. > I suspect wrong U-boot may cause these memory problems too (kernel not > booting with 1024MB nad 768MB addressed). > I've just got Banana PI today, and I confirm that Cubieboard2 kernel works just fine detecting 1GB RAM and booting to multi user mode. I run recent Current of course. Ganbold > > Cheers, > TooMeeK > > > > W dniu 2014-08-18 12:44, FUKAUMI Naoki pisze: > >> >> On 08/18/2014 03:45 PM, TooMeeK Admin wrote: >> >>> I'm working on image, not raw device. >>> So "conv=notrun" is needed to avoid destroying it completly.. >>> >>> Note that partitions start outside bootloader, so ~1MB after this data. >>> >> >> please see the number after *seek=* >> >> dd if=/usr/src/u-boot-sunxi/spl/sunxi-spl.bin conv=notrunc of=banana.img >>>>> bs=1024 seek=8 >>>>> dd if=/usr/src/u-boot-sunxi/u-boot.bin conv=notrunc of=banana.img >>>>> bs=1024 seek=32 >>>>> >>>> >>>> from https://github.com/linux-sunxi/u-boot-sunxi/wiki >>>> >>>> dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8 >>>> >>>> or >>>> >>>> dd if=spl/sunxi-spl.bin of=/dev/sdX bs=1024 seek=8 >>>> dd if=u-boot.img of=/dev/sdX bs=1024 seek=40 >>>> >>> >> > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" > From owner-freebsd-arm@FreeBSD.ORG Fri Aug 29 03:32:40 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FC7B249 for ; Fri, 29 Aug 2014 03:32:40 +0000 (UTC) Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D90911A8D for ; Fri, 29 Aug 2014 03:32:39 +0000 (UTC) Received: by mail-pa0-f53.google.com with SMTP id fa1so5222388pad.40 for ; Thu, 28 Aug 2014 20:32:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-type:content-transfer-encoding :subject:message-id:date:to:mime-version; bh=zy2gH1rDT8mWQqswpanvKAcKG+4WebZFGyreqK42OoY=; b=EzGyBHb7ThRQirfG2xjJqrHZ/Rp5+2j2d4RMsHKqxznFj3n6ojB6z7/5G0RHvP38OU W4Gk8X4Qqzg/QK3PUQh92DRo7pqICp3o2lPhk5rm4ln3JFy4bM9/IO8bl5W8lM2bC8ZX idit3aoEX5UVlbzo5rVzb1NSgTKujCqYDxHQXASsPYhzR5dm2rfoFiJLmUgG/fUXkzPG b9m4Azae95Z/gKkSPJ9idQCKCf5Of2Cf6/E/FOb6NI6cusXoHgJJI6RPPSMBKSf5jp+4 kFO5ZYgqcTzEHV3AkygC6xpndYl4V+F31fU9vAMovCnqnqVFl2+XId2Ij4Gxnre/EyX4 m7jw== X-Gm-Message-State: ALoCoQnLW6CgSUTRZwg9yCSgnkXLRev8PoLIFBuyW9j6g0E1Ii1MeOwVkbb0u7TptpzOoOljQ2qo X-Received: by 10.67.12.175 with SMTP id er15mr11736950pad.143.1409283158694; Thu, 28 Aug 2014 20:32:38 -0700 (PDT) Received: from [192.168.1.100] (c-24-6-220-224.hsd1.ca.comcast.net. [24.6.220.224]) by mx.google.com with ESMTPSA id du5sm5028146pbb.80.2014.08.28.20.32.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Aug 2014 20:32:37 -0700 (PDT) From: Tim Kientzle Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: VM lock panic on PandaBoard Message-Id: <15A16032-6F36-451E-8F36-502AD1AAD911@kientzle.com> Date: Thu, 28 Aug 2014 20:32:35 -0700 To: FreeBSD ARM Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) X-Mailer: Apple Mail (2.1878.6) 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: Fri, 29 Aug 2014 03:32:40 -0000 Tried today to get my PandaBoard running again. The Crochet board = config needed a couple of minor tweaks but then it seems to build okay. = First boot lasted a few minutes before it panicked, but then I rebuilt a = new kernel (enabling WITNESS and INVARIANTS) and things are looking = worse. This is -CURRENT r270695 with the PANDABOARD config, where the boot = halts with the below message and backtrace. I also notice that second = processor doesn=92t seem to be launching. Anyone need any more = information before I put this back in the closet? (I=92ll be away for the weekend, so may not be able to provide = additional info until Tuesday night after work.) Starting file system checks: /dev/mmcsd0s2a: FILE SYSTEM CLEAN; SKIPPING CHECKS /dev/mmcsd0s2a: clean, 3664195 free (531 frags, 457958 blocks, 0.0% = fragmentation) Mounting local file systems:. panic: Lock vm object not exclusively locked @ = /usr/src/sys/vm/vm_map.c:4054 cpuid =3D 0 KDB: enter: panic [ thread pid 99 tid 100045 ] Stopped at $d: ldrb r15, [r15, r15, ror r15]! db> bt Tracing pid 99 tid 100045 td 0xc3dd1320 db_trace_self() at db_trace_self pc =3D 0xc05079ec lr =3D 0xc0231bb0 (db_stack_trace+0xf4) sp =3D 0xefad03b8 fp =3D 0xefad03d0 r10 =3D 0xc08e5b0c db_stack_trace() at db_stack_trace+0xf4 pc =3D 0xc0231bb0 lr =3D 0xc0231520 (db_command+0x270) sp =3D 0xefad03d8 fp =3D 0xefad0478 r4 =3D 0x00000000 r5 =3D 0x00000000 r6 =3D 0x00000000 db_command() at db_command+0x270 pc =3D 0xc0231520 lr =3D 0xc0231284 (db_command_loop+0x60) sp =3D 0xefad0480 fp =3D 0xefad0490 r4 =3D 0xc054eaa2 r5 =3D 0xc056a2c3 r6 =3D 0xc08e5af8 r7 =3D 0xefad0660 r8 =3D 0x00000000 r9 =3D 0xc05ff918 r10 =3D 0xc0641df4 db_command_loop() at db_command_loop+0x60 pc =3D 0xc0231284 lr =3D 0xc0233c4c (db_trap+0xd8) sp =3D 0xefad0498 fp =3D 0xefad05b8 r4 =3D 0x00000000 r5 =3D 0xc08e5b04 r6 =3D 0xc0641e18 db_trap() at db_trap+0xd8 pc =3D 0xc0233c4c lr =3D 0xc039bd20 (kdb_trap+0x15c) sp =3D 0xefad05c0 fp =3D 0xefad05e0 r4 =3D 0x00000000 r5 =3D 0x00000001 r6 =3D 0xc0641e18 r7 =3D 0xefad0660 kdb_trap() at kdb_trap+0x15c pc =3D 0xc039bd20 lr =3D 0xc051f680 = (undefinedinstruction+0x2a4) sp =3D 0xefad05e8 fp =3D 0xefad0658 r4 =3D 0x00000000 r5 =3D 0x00000000 r6 =3D 0xc051f32c r7 =3D 0xe7ffffff r8 =3D 0xc3dd1320 r9 =3D 0xc039b48c r10 =3D 0xefad0660 undefinedinstruction() at undefinedinstruction+0x2a4 pc =3D 0xc051f680 lr =3D 0xc05096d4 (exception_exit) sp =3D 0xefad0660 fp =3D 0xefad06b8 r4 =3D 0xc056a318 r5 =3D 0x00000001 r6 =3D 0xc0633970 r7 =3D 0xc0633b08 r8 =3D 0xefad06f4 r9 =3D 0xc08e759c r10 =3D 0xc3dd1320 exception_exit() at exception_exit pc =3D 0xc05096d4 lr =3D 0xc039b480 (kdb_enter+0x40) sp =3D 0xefad06b0 fp =3D 0xefad06b8 r0 =3D 0xc0641e04 r1 =3D 0x00000000 r2 =3D 0xc056de7c r3 =3D 0x000000aa r4 =3D 0xc056a318 r5 =3D 0x00000001 r6 =3D 0xc0633970 r7 =3D 0xc0633b08 r8 =3D 0xefad06f4 r9 =3D 0xc08e759c r10 =3D 0xc3dd1320 r12 =3D 0x00000000 $a() at $a pc =3D 0xc039b490 lr =3D 0xc0362958 (vpanic+0x130) sp =3D 0xefad06c0 fp =3D 0xefad06e0 r4 =3D 0x00000100 vpanic() at vpanic+0x130 pc =3D 0xc0362958 lr =3D 0xc03629c8 (kproc_shutdown) sp =3D 0xefad06e8 fp =3D 0xefad06ec r4 =3D 0xc3f71dd0 r5 =3D 0x00000fd6 r6 =3D 0xc058c073 r7 =3D 0xc3f71dc0 r8 =3D 0x20051000 r9 =3D 0xc0b0b9e0 r10 =3D 0xc3f749b0 kproc_shutdown() at kproc_shutdown pc =3D 0xc03629c8 lr =3D 0x00000000 (0) sp =3D 0xefad06f4 fp =3D 0xefad0720 r4 =3D 0xc03629c8 r5 =3D 0xefad06f4 Unable to unwind into user mode From owner-freebsd-arm@FreeBSD.ORG Fri Aug 29 12:33:57 2014 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 671ADDEA for ; Fri, 29 Aug 2014 12:33:57 +0000 (UTC) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail-n.franken.de", Issuer "Thawte DV SSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B1871737 for ; Fri, 29 Aug 2014 12:33:57 +0000 (UTC) Received: from [192.168.1.200] (p508F16A0.dip0.t-ipconnect.de [80.143.22.160]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id 34EA81C0B4058 for ; Fri, 29 Aug 2014 14:33:53 +0200 (CEST) From: Michael Tuexen Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Remove FDT from IMX6 Message-Id: <29E5B5BB-09C3-4916-8903-4CD25BB8E5B0@freebsd.org> Date: Fri, 29 Aug 2014 14:33:52 +0200 To: "freebsd-arm@freebsd.org" Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) X-Mailer: Apple Mail (2.1878.6) 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: Fri, 29 Aug 2014 12:33:57 -0000 Dear all, FDT is currently defined in IMX6 and in the files including IMX6 (WANDBOARD-DUAL, WANDBOARD-QUAD, WANDBOARD-SOLO, APALIS-IMX6). Should it be removed from IMX6? Best regards Michael From owner-freebsd-arm@FreeBSD.ORG Fri Aug 29 12:44:26 2014 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3AA881D6 for ; Fri, 29 Aug 2014 12:44:26 +0000 (UTC) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail-n.franken.de", Issuer "Thawte DV SSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F28CB183E for ; Fri, 29 Aug 2014 12:44:25 +0000 (UTC) Received: from [192.168.1.200] (p508F16A0.dip0.t-ipconnect.de [80.143.22.160]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id 814D01C0B4058 for ; Fri, 29 Aug 2014 14:44:18 +0200 (CEST) From: Michael Tuexen Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Problem running make_dtb.sh Message-Id: Date: Fri, 29 Aug 2014 14:44:16 +0200 To: "freebsd-arm@freebsd.org" Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) X-Mailer: Apple Mail (2.1878.6) 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: Fri, 29 Aug 2014 12:44:26 -0000 Dear all, when trying to build the kernel on a Wandboard the traditional way as = described in = https://www.freebsd.org/doc/en/books/developers-handbook/kernelbuild.html#= kernelbuild-traditional a make results in ... sh ../../../tools/fdt/make_dtb.sh ../../.. wandboard-quad.dts = /usr/home/tuexen/sys/arm/compile/WANDBOARD-QUAD converting wandboard-quad.dts -> = /usr/home/tuexen/sys/arm/compile/WANDBOARD-QUAD/wandboard-quad.dtb :159:10: fatal error: 'wandboard-quad.dts' file not found #include "wandboard-quad.dts" ^ 1 error generated. Error: :1.1-2.1 syntax error FATAL ERROR: Unable to parse input tree *** Error code 1 Stop. The reason is that make_dtb.sh uses $MACHINE which is not set. If I set = it to arm, the make completes successfully. How is this fixed in the best way? Best regards Michael From owner-freebsd-arm@FreeBSD.ORG Fri Aug 29 13:58:40 2014 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07EE575A; Fri, 29 Aug 2014 13:58:40 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCB1D1FF0; Fri, 29 Aug 2014 13:58:39 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1XNMhJ-000E7P-Mk; Fri, 29 Aug 2014 13:58:37 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id s7TDwaSE003510; Fri, 29 Aug 2014 07:58:36 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+5jlx7Kqp1HP4+flAtTIIr X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: Problem running make_dtb.sh From: Ian Lepore To: Michael Tuexen In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-mzIiZcdXs5Wta0bkDBIO" Date: Fri, 29 Aug 2014 07:58:36 -0600 Message-ID: <1409320716.1150.169.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: "freebsd-arm@freebsd.org" 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: Fri, 29 Aug 2014 13:58:40 -0000 --=-mzIiZcdXs5Wta0bkDBIO Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Fri, 2014-08-29 at 14:44 +0200, Michael Tuexen wrote: > Dear all, > > when trying to build the kernel on a Wandboard the traditional way as described in > https://www.freebsd.org/doc/en/books/developers-handbook/kernelbuild.html#kernelbuild-traditional > a make results in > ... > sh ../../../tools/fdt/make_dtb.sh ../../.. wandboard-quad.dts /usr/home/tuexen/sys/arm/compile/WANDBOARD-QUAD > converting wandboard-quad.dts -> /usr/home/tuexen/sys/arm/compile/WANDBOARD-QUAD/wandboard-quad.dtb > :159:10: fatal error: 'wandboard-quad.dts' file not found > #include "wandboard-quad.dts" > ^ > 1 error generated. > Error: :1.1-2.1 syntax error > FATAL ERROR: Unable to parse input tree > *** Error code 1 > > Stop. > > The reason is that make_dtb.sh uses $MACHINE which is not set. If I set it to arm, the make completes > successfully. How is this fixed in the best way? > > Best regards > Michael IMO, the best way to fix it would be to update the handbook to say that the "traditional" way of building a kernel is no longer supported. Since that won't fly due to a small but very vocal minority, maybe the attached patch would be a good fix. -- Ian --=-mzIiZcdXs5Wta0bkDBIO Content-Disposition: inline; filename="make_dtb_machine.diff" Content-Type: text/x-patch; name="make_dtb_machine.diff"; charset="us-ascii" Content-Transfer-Encoding: 7bit Index: sys/tools/fdt/make_dtb.sh =================================================================== --- sys/tools/fdt/make_dtb.sh (revision 270064) +++ sys/tools/fdt/make_dtb.sh (working copy) @@ -12,6 +12,10 @@ if [ -z "$dts" ]; then exit 1 fi +if [ -z "${MACHINE}" ]; then + MACHINE=$(uname -m) +fi + for d in ${dts}; do dtb=${dtb_path}/`basename $d .dts`.dtb echo "converting $d -> $dtb" --=-mzIiZcdXs5Wta0bkDBIO-- From owner-freebsd-arm@FreeBSD.ORG Fri Aug 29 16:19:21 2014 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 115AE838 for ; Fri, 29 Aug 2014 16:19:21 +0000 (UTC) Received: from mail-ie0-f179.google.com (mail-ie0-f179.google.com [209.85.223.179]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CACED11D4 for ; Fri, 29 Aug 2014 16:19:20 +0000 (UTC) Received: by mail-ie0-f179.google.com with SMTP id tr6so2937169ieb.24 for ; Fri, 29 Aug 2014 09:19:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=M6UqFvlnD44jvbwd0gp5O0xelyBEExqVWFPgzMvEUQg=; b=kHX9lIs72W4f2R/jzeMVCOlatge/twSlpNPGEAgM049srjRQMhxHljcrBd3+BpPWf1 ii4Q3CmRkWUxpcbfahSAv+P/5th0ruV6rb4o/PMrwKp0yYhzYgGDnRU+Jq4t2HIgaHqI vmf/YnmpMe+YGZw/7hJdgVG8eXF2PKDQixUSCb95MKFOwv/3tg1Dw46rCbcRrCg81yui T8yzz2PIvq4g91ggmhA3FlOerTXvxGJsH0RPh/gFKMEVsJPLX1f8QxUog1bHnDrM4Gos OYBq4IJJ5kIAV2wyDfKJthchdPZAvbn+2TutaBBeMuiEGJe3IDCbwsQf/nRa5PUaIaJZ G+jw== X-Gm-Message-State: ALoCoQlY5P2o2cYP+Ipr5CiA7YeGz/jWQHLyLbcf9A1Nww+5hk/KqNyfjodztqqruXBaULF9GoKk X-Received: by 10.50.21.3 with SMTP id r3mr5336736ige.13.1409329154245; Fri, 29 Aug 2014 09:19:14 -0700 (PDT) Received: from [172.27.4.216] (75-104-69-80.mobility.exede.net. [75.104.69.80]) by mx.google.com with ESMTPSA id an1sm55276775igc.8.2014.08.29.09.19.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 29 Aug 2014 09:19:13 -0700 (PDT) Sender: Warner Losh Content-Type: multipart/signed; boundary="Apple-Mail=_95E9F03A-4241-4225-A97D-3D079414652A"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Problem running make_dtb.sh From: Warner Losh In-Reply-To: <1409320716.1150.169.camel@revolution.hippie.lan> Date: Fri, 29 Aug 2014 09:19:03 -0700 Message-Id: References: <1409320716.1150.169.camel@revolution.hippie.lan> To: Ian Lepore X-Mailer: Apple Mail (2.1878.6) Cc: "freebsd-arm@freebsd.org" 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: Fri, 29 Aug 2014 16:19:21 -0000 --Apple-Mail=_95E9F03A-4241-4225-A97D-3D079414652A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Aug 29, 2014, at 6:58 AM, Ian Lepore wrote: > On Fri, 2014-08-29 at 14:44 +0200, Michael Tuexen wrote: >> Dear all, >>=20 >> when trying to build the kernel on a Wandboard the traditional way as = described in >> = https://www.freebsd.org/doc/en/books/developers-handbook/kernelbuild.html#= kernelbuild-traditional >> a make results in >> ... >> sh ../../../tools/fdt/make_dtb.sh ../../.. wandboard-quad.dts = /usr/home/tuexen/sys/arm/compile/WANDBOARD-QUAD >> converting wandboard-quad.dts -> = /usr/home/tuexen/sys/arm/compile/WANDBOARD-QUAD/wandboard-quad.dtb >> :159:10: fatal error: 'wandboard-quad.dts' file not found >> #include "wandboard-quad.dts" >> ^ >> 1 error generated. >> Error: :1.1-2.1 syntax error >> FATAL ERROR: Unable to parse input tree >> *** Error code 1 >>=20 >> Stop. >>=20 >> The reason is that make_dtb.sh uses $MACHINE which is not set. If I = set it to arm, the make completes >> successfully. How is this fixed in the best way? >>=20 >> Best regards >> Michael >=20 > IMO, the best way to fix it would be to update the handbook to say = that > the "traditional" way of building a kernel is no longer supported. > Since that won't fly due to a small but very vocal minority, maybe the > attached patch would be a good fix. Yea, good luck with that one=85 Then again, I do use it all the time = because it still works. > Index: sys/tools/fdt/make_dtb.sh > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sys/tools/fdt/make_dtb.sh (revision 270064) > +++ sys/tools/fdt/make_dtb.sh (working copy) > @@ -12,6 +12,10 @@ if [ -z "$dts" ]; then > exit 1 > fi >=20 > +if [ -z "${MACHINE}" ]; then > + MACHINE=3D$(uname -m) > +fi > + > for d in ${dts}; do > dtb=3D${dtb_path}/`basename $d .dts`.dtb > echo "converting $d -> $dtb=94 This fix works for me. Warner --Apple-Mail=_95E9F03A-4241-4225-A97D-3D079414652A Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJUAKf3AAoJEGwc0Sh9sBEAqUIQALVj3wAh8aq8bKnoDF/BJAOL v6r0AmTIQfunQgDPsYZ/SGWye9da3kuDHG77MEoWn7caRqZy54oyZjuMA3/t719X aDB2OkkiM5yKJ3iFn9xaVDEzkJVFgf3fs2+THI3qi06jDOr58lC7G8p7Y9dwjNaa SRrZ8gjKEK5tpa13irgjZhpIzgkG/hB7tFb6AVEPBMX93h6Sl8rWKlnbQC0+36NO MugmUFIXwj0AkZfVF34zqmAiS+Q3CjxCi+jhOz/0OFuSOYqWXYUT3bqYb21pEzbA vCRnkosHtnMp3Ym/972MHxnMhsBDx6zd524E7dZzClcCUgSW62PQ/B7h+m4j+L+Z rTLrp6BYafibRl7M0JKSU8Oe6WVyXX0ezO4xOZOx/WxtefeGfFk0voQh8tOp4ZWn HluwP8hZ5ydH+OEmnhjVjI//7SFfx0zGlT41RQtFgTci91RUBGHdx9qPUxzpKVtW dOBfsjfxSjOW6qd17QbELUk57KXGDBtqaGy+O2DVTP0lb9VUqyyM8LbkN/2+r4hL 6XjaEG7xTAc2vSlp5H3CYMcWJnIheuhNBDCQS7h2XwlTTjpOJTvStbpMDZ9ss2Xi TGUpnjICXedqyQhLq64hjYEeEFtNgiZxZvYbVAE+dMUVpiyHv+wizT3oUWiDK2rr sb3+GC/fBFIMvGmqoV5K =oBCH -----END PGP SIGNATURE----- --Apple-Mail=_95E9F03A-4241-4225-A97D-3D079414652A-- From owner-freebsd-arm@FreeBSD.ORG Fri Aug 29 16:34:06 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA0DCECB; Fri, 29 Aug 2014 16:34:06 +0000 (UTC) Received: from mail-la0-x232.google.com (mail-la0-x232.google.com [IPv6:2a00:1450:4010:c03::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2045213D1; Fri, 29 Aug 2014 16:34:05 +0000 (UTC) Received: by mail-la0-f50.google.com with SMTP id mc6so3024650lab.37 for ; Fri, 29 Aug 2014 09:34:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Gf7gt5gGSp9sL2f5DUGofeACyC5KDFaT7aaCYEfHDP4=; b=LLoCd1r4u0gCKccboXGIroWmoM5Rl/RRmsW7rBIkxdxBuoMdXiygRM36/UHTm4K32z 8ETe1eI8ifxjtY4zqwt3ozerj3/VFmLS1gU5KGxbC4MsxKUqCF3hy4Kzdt+14FmNhWmW lo2m/puT3Tv2S1lEFwbCYcI8Fee3vVpqZQc68FHbqMUdJMiOhNXkMpXVavp58n9Z+Llx so03As/foEU+VUQjFghejH7XWWPdXAGH6bpW6GtUQsi4md4qVjVcrwnx/MXD6CwKaEVK rh3XHxolCGxbOYAxBzwMW4bYG7fMmi4iI5E8L4njfaLqL28rQreK2Qt7ODnH444qirvd LMQw== X-Received: by 10.152.234.36 with SMTP id ub4mr12577518lac.52.1409330043777; Fri, 29 Aug 2014 09:34:03 -0700 (PDT) Received: from [192.168.1.100] (c-d135e155.556-1-64736c11.cust.bredbandsbolaget.se. [85.225.53.209]) by mx.google.com with ESMTPSA id w11sm651780lbm.30.2014.08.29.09.34.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 29 Aug 2014 09:34:02 -0700 (PDT) Content-Type: text/plain; charset=iso-8859-7 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: C++ exceptions in freebsd-arm doesn't seem to work From: Olavi Kumpulainen In-Reply-To: <1408992488.1150.105.camel@revolution.hippie.lan> Date: Fri, 29 Aug 2014 18:34:00 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <9EC067FB-EE88-4C6D-A0B2-E90467683A5B@gmail.com> References: <1405809318.85788.35.camel@revolution.hippie.lan> <1406063473.71975.8.camel@revolution.hippie.lan> <53D2CFBE.3040207@fgznet.ch> <834BA562-84ED-425C-9D61-0A235A28A94A@gmail.com> <1408472517.56408.659.camel@revolution.hippie.lan> <1408562392.1150.4.camel@revolution.hippie.lan> <2C97B126-91FE-4E93-920F-6ED5045666A6@gmail.com> <1408992488.1150.105.camel@revolution.hippie.lan> To: Ian Lepore X-Mailer: Apple Mail (2.1878.6) Cc: freebsd-arm@freebsd.org 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: Fri, 29 Aug 2014 16:34:06 -0000 On 25 Aug 2014, at 20:48 , Ian Lepore wrote: > On Thu, 2014-08-21 at 18:54 +0200, Olavi Kumpulainen wrote: >> On 20 Aug 2014, at 21:19 , Ian Lepore wrote: >>=20 >>> On Wed, 2014-08-20 at 19:19 +0200, Olavi Kumpulainen wrote: >>>> On 19 Aug 2014, at 20:21 , Ian Lepore wrote: >>>>=20 >>>>> On Tue, 2014-08-19 at 19:40 +0200, Olavi Kumpulainen wrote: >>>>>> On 25 Jul 2014, at 23:44 , Andreas Tobler = wrote: >>>>>>=20 >>>>>>> On 22.07.14 23:11, Ian Lepore wrote: >>>>>>>> On Sat, 2014-07-19 at 16:35 -0600, Ian Lepore wrote: >>>>>>>>> On Sat, 2014-06-07 at 14:12 +0200, Olavi Kumpulainen wrote: >>>>>>>>>> [c++ exceptions don't work and related discussion] >>>>>>>>>=20 >>>>>>>>> I checked in a partial fix for c++ exception handling in = r268893. It >>>>>>>>> fixes the specific problem you detailed above, which was = essentially >>>>>>>>> that the __gnu_Unwind_Find_exidx() function was not available = in any >>>>>>>>> shared library, making the unwinder fall back to using the = __exidx_start >>>>>>>>> and end symbols, which are only valid in a statically-linked = app. >>>>>>>>>=20 >>>>>>>>> With the new function in place, exceptions are closer to = working with >>>>>>>>> gcc 4.2.1, but still don't work with clang. With gcc, some = things work >>>>>>>>> and some things don't. For example if you throw an exception = and in the >>>>>>>>> same function have a catch with the right specific type it = segfaults, >>>>>>>>> but a catch(...) will catch it without problems. But you can = catch an >>>>>>>>> exception by type if the catch is in a function higher up the = call chain >>>>>>>>> from the place it was thrown. >>>>>>>>>=20 >>>>>>>>> We're continuing to debug this at $work, and welcome any input = if anyone >>>>>>>>> else makes progress with it. Right now we still don't know = whether the >>>>>>>>> segfaults are because of bad unwinder library code or bad = unwind data >>>>>>>>> emitted by gcc. (I sure hope it's the library, because that's = easier to >>>>>>>>> fix.) >>>>>>>>>=20 >>>>>>>>> On the clang front, it has been said that c++ exceptions work = in clang >>>>>>>>> 3.5, so we tried the clang-devel port, and it didn't just = work. But it >>>>>>>>> turns out that port hasn't been updated for quite a while, so = we may not >>>>>>>>> have tested the code that's supposed to work right. While = trying that I >>>>>>>>> discovered that clang 3.5 isn't scheduled for release for = about another >>>>>>>>> year, so that really isn't a viable solution for anyone with = near-term >>>>>>>>> needs, unless the required changes can be cherry-picked and = brought into >>>>>>>>> our version of 3.4. >>>>>>>>>=20 >>>>>>>>> -- Ian >>>>>>>>=20 >>>>>>>> Another update to this... today I committed r268993 and = r268994, and now >>>>>>>> I believe arm eabi c++ exceptions are fully working with gcc. = I haven't >>>>>>>> run an extensive test suite, but all the test cases we've been = using at >>>>>>>> $work to debug this now work correctly. >>>>>>>=20 >>>>>>> Thank you! Confirmed. My test cases which are working with = gcc-4.10 are now also working with the system gcc, 4.2.1. >>>>>>> I totally forgot about this change. I have it in my local gcc = tree since a while but I forgot about..... >>>>>>>=20 >>>>>>> Andreas >>>>>>>=20 >>>>>>>=20 >>>>>>=20 >>>>>> Please excuse my late reply. I=A2ve been away from keyboard for a = while. >>>>>>=20 >>>>>> I back-ported r268893, r268993 and r268994 to stable/10 for = beaglebone. C++ exceptions works for static builds, but not for binaries = linked to shared libs. >>>>>>=20 >>>>>> Since this seems to work ok in HEAD, I=A2m obviously missing = something. Do any of you guys have any ideas? >>>>>>=20 >>>>>> Cheers >>>>>>=20 >>>>>=20 >>>>> I'm not sure what you mean by "backported to stable/10", I merged = all >>>>> the necessary changes to stable-10 as r269792 on Aug 10. Are you >>>>> working with a checkout from earlier than that? If so, just = updating >>>>> should fix it for you. >>>>>=20 >>>>> -- Ian >>>>>=20 >>>>>=20 >>>>=20 >>>>=20 >>>> Updating to stable-10 as of today didn=A2t help. I=A2m running a = clean checkout except for a couple of drivers in the kernel. >>>> This makes me think I have a bad src.conf - How shall I configure = the build for this to work? >>>>=20 >>>> /Olavi >>>>=20 >>>>=20 >>>>=20 >>>>=20 >>>=20 >>> You need to use GCC, not clang, as the compiler. Exceptions are = just >>> broken on clang 3.4, so we're waiting for 3.5 (should be released = any >>> time now I think). >>>=20 >>> To compile with gcc, put this in your /etc/make.conf: >>>=20 >>> WITH_GCC=3Dyes >>> WITH_GNUCXX=3Dyes >>> WITH_GCC_BOOTSTRAP=3Dyes >>> WITHOUT_CLANG=3Dyes >>> WITHOUT_CLANG_IS_CC=3Dyes >>> WITHOUT_CLANG_BOOTSTRAP=3Dyes >>>=20 >>> -- Ian >>>=20 >>>=20 >>=20 >>=20 >> Thank you. It turned out that I already used these with the exception = of WITHOUT_CLANG_BOOTSTRAP. >>=20 >> However, c++ exceptions in stable/10 is still defunct when I build = it.=20 >>=20 >> So instead I pulled master, built and installed that instead. And = voila - Exceptions do work!=20 >>=20 >> Therefore it seems my build method, flags and environment is ok after = all. I glanced the commit logs in master but didn=A2t find anything = obvious, but still; something related seems missing in stable/10 if you = ask me. >>=20 >> /Olavi >>=20 >>=20 >>=20 >> _______________________________________________ >> freebsd-arm@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-arm >> To unsubscribe, send any mail to = "freebsd-arm-unsubscribe@freebsd.org" >>=20 >=20 > I chased this down today to a missing MFC. One of my merges claimed = to > include a change that wasn't really included. I fixed it today with > r270606, and this time I actually tested that I could throw and catch = an > exception using freebsd built from stable-10 at this rev. :) >=20 > Thanks for testing this, and sorry for claiming it was fixed when it > wasn't quite complete. >=20 > -- Ian >=20 >=20 I=A2m a little late again, but I still want to confirm that stable/10 = works for me too. It catches c++ exceptions like a real champ! Thanks a million - /Olavi From owner-freebsd-arm@FreeBSD.ORG Fri Aug 29 18:07:20 2014 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47D0BCB7 for ; Fri, 29 Aug 2014 18:07:20 +0000 (UTC) Received: from mail-wg0-x231.google.com (mail-wg0-x231.google.com [IPv6:2a00:1450:400c:c00::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C80D81FAC for ; Fri, 29 Aug 2014 18:07:19 +0000 (UTC) Received: by mail-wg0-f49.google.com with SMTP id y10so2532886wgg.32 for ; Fri, 29 Aug 2014 11:07:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=s5R/5/0WZd6PSqzc9bEWa80joLTwG6EvHdzxR7zePig=; b=TuQIzI+gopXM64QxhWl4mPiv2CEwpd8aHEMlTm6mTG1vk5P1FIPiZvcZOd7KdCcQma 38RIjm0RJGOpbanIPyjHnvC5fJK+s+KtRxvHfI4+p/gB6K7EEsJEZ+NqkJab1Y3wAuoU 42D5EPaadTRUXtHZ5WW5mPtx0pq/jBpEG4tluZJny5oORLKBoiz4L9gLjJZB9HPb8HPM rMgAx1mOi53bDkLcU0r5A2XFkftYMWsBQI+602d9d2oVHzNMOUfSdwtmLz5dNLPuxw9o nQ1SEzb8XbEngg+2F8qzG0RIW/R8QN046GMow+J1zgC8mu79uypvSf1hgCf/i2X5XgIM 8Eog== MIME-Version: 1.0 X-Received: by 10.194.82.106 with SMTP id h10mr15196400wjy.37.1409335638013; Fri, 29 Aug 2014 11:07:18 -0700 (PDT) Received: by 10.216.199.70 with HTTP; Fri, 29 Aug 2014 11:07:17 -0700 (PDT) In-Reply-To: <411C643B-BC46-494E-919B-39098FB87EEA@freebsdbrasil.com.br> References: <5D802942-2D0F-4324-8212-C2871EEB6327@FreeBSD.org> <01562FB1-32C6-45AF-AB77-5BB80526E18C@FreeBSD.org> <53F8FED8.6030409@freebsdbrasil.com.br> <3949AF9C-B5BD-44E8-A049-21F26B8B6B9A@freebsdbrasil.com.br> <411C643B-BC46-494E-919B-39098FB87EEA@freebsdbrasil.com.br> Date: Fri, 29 Aug 2014 15:07:17 -0300 Message-ID: Subject: Re: HC-SR04 and FreeBSD From: Luiz Otavio O Souza To: Patrick Tracanelli Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "freebsd-arm@freebsd.org" , Rui Paulo 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: Fri, 29 Aug 2014 18:07:20 -0000 Okay, so i got my hands on one HC-SR04 and got it working quite easily. Two consecutive GPIO readings takes from 15 to 30 usec which gives a good precision for this case (readings above 116 usec). I written a simple C program to program the GPIO pins, trigger the sensor and read back the duration of echo pulse, it give me good readings using the datasheet formula, so i'm happy with it. Build it with: cc -o hc-sr04 hc-sr04.c I'm using the wiring suggested at (voltage divisor on echo pin): https://www.modmypi.com/blog/hc-sr04-ultrasonic-range-sensor-on-the-raspberry-pi The trigger and echo pin is connected to pins 2 and 3 respectively. The module is powered from DGND and VDD_5V. This maybe a good candidate to be on Wiki. Luiz From owner-freebsd-arm@FreeBSD.ORG Fri Aug 29 18:45:58 2014 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 143F72EC; Fri, 29 Aug 2014 18:45:58 +0000 (UTC) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail-n.franken.de", Issuer "Thawte DV SSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C8C1C15AE; Fri, 29 Aug 2014 18:45:57 +0000 (UTC) Received: from [192.168.1.200] (p508F16A0.dip0.t-ipconnect.de [80.143.22.160]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id 1B0FC1C0B4058; Fri, 29 Aug 2014 20:45:53 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Problem running make_dtb.sh From: Michael Tuexen In-Reply-To: <1409320716.1150.169.camel@revolution.hippie.lan> Date: Fri, 29 Aug 2014 20:45:52 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <7D1D98AB-39AE-4C36-BC4C-5D328956CDAC@freebsd.org> References: <1409320716.1150.169.camel@revolution.hippie.lan> To: Ian Lepore X-Mailer: Apple Mail (2.1878.6) Cc: "freebsd-arm@freebsd.org" 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: Fri, 29 Aug 2014 18:45:58 -0000 On 29 Aug 2014, at 15:58, Ian Lepore wrote: > On Fri, 2014-08-29 at 14:44 +0200, Michael Tuexen wrote: >> Dear all, >>=20 >> when trying to build the kernel on a Wandboard the traditional way as = described in >> = https://www.freebsd.org/doc/en/books/developers-handbook/kernelbuild.html#= kernelbuild-traditional >> a make results in >> ... >> sh ../../../tools/fdt/make_dtb.sh ../../.. wandboard-quad.dts = /usr/home/tuexen/sys/arm/compile/WANDBOARD-QUAD >> converting wandboard-quad.dts -> = /usr/home/tuexen/sys/arm/compile/WANDBOARD-QUAD/wandboard-quad.dtb >> :159:10: fatal error: 'wandboard-quad.dts' file not found >> #include "wandboard-quad.dts" >> ^ >> 1 error generated. >> Error: :1.1-2.1 syntax error >> FATAL ERROR: Unable to parse input tree >> *** Error code 1 >>=20 >> Stop. >>=20 >> The reason is that make_dtb.sh uses $MACHINE which is not set. If I = set it to arm, the make completes >> successfully. How is this fixed in the best way? >>=20 >> Best regards >> Michael >=20 > IMO, the best way to fix it would be to update the handbook to say = that > the "traditional" way of building a kernel is no longer supported. > Since that won't fly due to a small but very vocal minority, maybe the > attached patch would be a good fix. >=20 > -- Ian >=20 > Index: sys/tools/fdt/make_dtb.sh > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sys/tools/fdt/make_dtb.sh (revision 270064) > +++ sys/tools/fdt/make_dtb.sh (working copy) > @@ -12,6 +12,10 @@ if [ -z "$dts" ]; then > exit 1 > fi >=20 > +if [ -z "${MACHINE}" ]; then > + MACHINE=3D$(uname -m) > +fi > + > for d in ${dts}; do > dtb=3D${dtb_path}/`basename $d .dts`.dtb > echo "converting $d -> $dtb" That resolves the issue. Will you commit it? Best regards Michael From owner-freebsd-arm@FreeBSD.ORG Sat Aug 30 00:51:24 2014 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 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 00F029F1 for ; Sat, 30 Aug 2014 00:51:23 +0000 (UTC) Received: from mail-we0-x236.google.com (mail-we0-x236.google.com [IPv6:2a00:1450:400c:c03::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6D140110F for ; Sat, 30 Aug 2014 00:51:23 +0000 (UTC) Received: by mail-we0-f182.google.com with SMTP id w62so2878846wes.41 for ; Fri, 29 Aug 2014 17:51:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=0Bx5zh+d+ecMGH0Wg98JxT3LFXEJeu1507S/iTbwe78=; b=zGlw51+cT4AFRILrIFW9DOPdqTgm/dwGf6brtwqlMnlIg7q8xqaGXhVjo0EVHQvf3c 0VawXVvGBK3mdnIW9uWJ2lDKyaKjGXiBJ3tYuBDqvbFTBpqMNZJDcfXf40LihImUfhbv KFjjvYsNK3AEHDfS2CJdJmvIsyAqcO2BGnvAYOEK7v5e3KuACG3ybxisGRhqTcObty0E uG+11bYkJhVHaEiUl3Kq+asgWUaG24i3XoXFtNBS8HBw1/SC9rZkXuaBU1OzBvrWtvBQ kf8VidiS7nwfL9pcHn+tbqRk+ylcLzPYg/9AIOhX2d5KXwAnH1MYU1/Dco3y2D8NGoxi dHdg== MIME-Version: 1.0 X-Received: by 10.180.104.42 with SMTP id gb10mr7233958wib.65.1409359881476; Fri, 29 Aug 2014 17:51:21 -0700 (PDT) Received: by 10.217.93.133 with HTTP; Fri, 29 Aug 2014 17:51:21 -0700 (PDT) In-Reply-To: References: <5D802942-2D0F-4324-8212-C2871EEB6327@FreeBSD.org> <01562FB1-32C6-45AF-AB77-5BB80526E18C@FreeBSD.org> <53F8FED8.6030409@freebsdbrasil.com.br> <3949AF9C-B5BD-44E8-A049-21F26B8B6B9A@freebsdbrasil.com.br> <411C643B-BC46-494E-919B-39098FB87EEA@freebsdbrasil.com.br> Date: Fri, 29 Aug 2014 21:51:21 -0300 Message-ID: Subject: Re: HC-SR04 and FreeBSD From: Evandro Nunes To: Luiz Otavio O Souza Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "freebsd-arm@freebsd.org" , Rui Paulo 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: Sat, 30 Aug 2014 00:51:24 -0000 hello luiz, it looks promissing! i will try it by the weekend thank you very much it seems like a begining for a libary, or at least an examples collection, a sonar sensor utility, a relay which you helped me before, the temperature sensor patrick mentioned and you seem to have it working... I guess they are the basic and popular stuff On Fri, Aug 29, 2014 at 3:07 PM, Luiz Otavio O Souza wrote: > Okay, so i got my hands on one HC-SR04 and got it working quite > easily. Two consecutive GPIO readings takes from 15 to 30 usec which > gives a good precision for this case (readings above 116 usec). > > I written a simple C program to program the GPIO pins, trigger the > sensor and read back the duration of echo pulse, it give me good > readings using the datasheet formula, so i'm happy with it. Build it > with: cc -o hc-sr04 hc-sr04.c > > I'm using the wiring suggested at (voltage divisor on echo pin): > > https://www.modmypi.com/blog/hc-sr04-ultrasonic-range-sensor-on-the-raspberry-pi > > The trigger and echo pin is connected to pins 2 and 3 respectively. > The module is powered from DGND and VDD_5V. > > This maybe a good candidate to be on Wiki. > > Luiz > From owner-freebsd-arm@FreeBSD.ORG Sat Aug 30 22:40:04 2014 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C39373F6; Sat, 30 Aug 2014 22:40:04 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96B741281; Sat, 30 Aug 2014 22:40:04 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1XNrJT-000FVL-IR; Sat, 30 Aug 2014 22:40:03 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id s7UMe2DK006425; Sat, 30 Aug 2014 16:40:02 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+QmrP1pR4A0IX3BGO8v0w1 X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan [172.22.42.240] claimed to be [172.22.42.240] Subject: Re: Problem running make_dtb.sh From: Ian Lepore To: Michael Tuexen In-Reply-To: <7D1D98AB-39AE-4C36-BC4C-5D328956CDAC@freebsd.org> References: <1409320716.1150.169.camel@revolution.hippie.lan> <7D1D98AB-39AE-4C36-BC4C-5D328956CDAC@freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Sat, 30 Aug 2014 16:40:02 -0600 Message-ID: <1409438402.1150.189.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: "freebsd-arm@freebsd.org" 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: Sat, 30 Aug 2014 22:40:04 -0000 On Fri, 2014-08-29 at 20:45 +0200, Michael Tuexen wrote: > On 29 Aug 2014, at 15:58, Ian Lepore wrote: > > > On Fri, 2014-08-29 at 14:44 +0200, Michael Tuexen wrote: > >> Dear all, > >> > >> when trying to build the kernel on a Wandboard the traditional way as described in > >> https://www.freebsd.org/doc/en/books/developers-handbook/kernelbuild.html#kernelbuild-traditional > >> a make results in > >> ... > >> sh ../../../tools/fdt/make_dtb.sh ../../.. wandboard-quad.dts /usr/home/tuexen/sys/arm/compile/WANDBOARD-QUAD > >> converting wandboard-quad.dts -> /usr/home/tuexen/sys/arm/compile/WANDBOARD-QUAD/wandboard-quad.dtb > >> :159:10: fatal error: 'wandboard-quad.dts' file not found > >> #include "wandboard-quad.dts" > >> ^ > >> 1 error generated. > >> Error: :1.1-2.1 syntax error > >> FATAL ERROR: Unable to parse input tree > >> *** Error code 1 > >> > >> Stop. > >> > >> The reason is that make_dtb.sh uses $MACHINE which is not set. If I set it to arm, the make completes > >> successfully. How is this fixed in the best way? > >> > >> Best regards > >> Michael > > > > IMO, the best way to fix it would be to update the handbook to say that > > the "traditional" way of building a kernel is no longer supported. > > Since that won't fly due to a small but very vocal minority, maybe the > > attached patch would be a good fix. > > > > -- Ian > > > > Index: sys/tools/fdt/make_dtb.sh > > =================================================================== > > --- sys/tools/fdt/make_dtb.sh (revision 270064) > > +++ sys/tools/fdt/make_dtb.sh (working copy) > > @@ -12,6 +12,10 @@ if [ -z "$dts" ]; then > > exit 1 > > fi > > > > +if [ -z "${MACHINE}" ]; then > > + MACHINE=$(uname -m) > > +fi > > + > > for d in ${dts}; do > > dtb=${dtb_path}/`basename $d .dts`.dtb > > echo "converting $d -> $dtb" > That resolves the issue. Will you commit it? Done, r270863. -- Ian From owner-freebsd-arm@FreeBSD.ORG Sat Aug 30 22:43:42 2014 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FDDC44E; Sat, 30 Aug 2014 22:43:42 +0000 (UTC) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail-n.franken.de", Issuer "Thawte DV SSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C47A71316; Sat, 30 Aug 2014 22:43:41 +0000 (UTC) Received: from [192.168.1.200] (p54818E06.dip0.t-ipconnect.de [84.129.142.6]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id CB5471C104674; Sun, 31 Aug 2014 00:43:37 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Problem running make_dtb.sh From: Michael Tuexen In-Reply-To: <1409438402.1150.189.camel@revolution.hippie.lan> Date: Sun, 31 Aug 2014 00:43:37 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <591AF701-C2AF-4D70-9BFF-46D40083963D@freebsd.org> References: <1409320716.1150.169.camel@revolution.hippie.lan> <7D1D98AB-39AE-4C36-BC4C-5D328956CDAC@freebsd.org> <1409438402.1150.189.camel@revolution.hippie.lan> To: Ian Lepore X-Mailer: Apple Mail (2.1878.6) Cc: "freebsd-arm@freebsd.org" 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: Sat, 30 Aug 2014 22:43:42 -0000 On 31 Aug 2014, at 00:40, Ian Lepore wrote: > On Fri, 2014-08-29 at 20:45 +0200, Michael Tuexen wrote: >> On 29 Aug 2014, at 15:58, Ian Lepore wrote: >>=20 >>> On Fri, 2014-08-29 at 14:44 +0200, Michael Tuexen wrote: >>>> Dear all, >>>>=20 >>>> when trying to build the kernel on a Wandboard the traditional way = as described in >>>> = https://www.freebsd.org/doc/en/books/developers-handbook/kernelbuild.html#= kernelbuild-traditional >>>> a make results in >>>> ... >>>> sh ../../../tools/fdt/make_dtb.sh ../../.. wandboard-quad.dts = /usr/home/tuexen/sys/arm/compile/WANDBOARD-QUAD >>>> converting wandboard-quad.dts -> = /usr/home/tuexen/sys/arm/compile/WANDBOARD-QUAD/wandboard-quad.dtb >>>> :159:10: fatal error: 'wandboard-quad.dts' file not found >>>> #include "wandboard-quad.dts" >>>> ^ >>>> 1 error generated. >>>> Error: :1.1-2.1 syntax error >>>> FATAL ERROR: Unable to parse input tree >>>> *** Error code 1 >>>>=20 >>>> Stop. >>>>=20 >>>> The reason is that make_dtb.sh uses $MACHINE which is not set. If I = set it to arm, the make completes >>>> successfully. How is this fixed in the best way? >>>>=20 >>>> Best regards >>>> Michael >>>=20 >>> IMO, the best way to fix it would be to update the handbook to say = that >>> the "traditional" way of building a kernel is no longer supported. >>> Since that won't fly due to a small but very vocal minority, maybe = the >>> attached patch would be a good fix. >>>=20 >>> -- Ian >>>=20 >>> Index: sys/tools/fdt/make_dtb.sh >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> --- sys/tools/fdt/make_dtb.sh (revision 270064) >>> +++ sys/tools/fdt/make_dtb.sh (working copy) >>> @@ -12,6 +12,10 @@ if [ -z "$dts" ]; then >>> exit 1 >>> fi >>>=20 >>> +if [ -z "${MACHINE}" ]; then >>> + MACHINE=3D$(uname -m) >>> +fi >>> + >>> for d in ${dts}; do >>> dtb=3D${dtb_path}/`basename $d .dts`.dtb >>> echo "converting $d -> $dtb" >> That resolves the issue. Will you commit it? >=20 > Done, r270863. Thanks. Michael >=20 > -- Ian >=20 >=20 >=20