From owner-freebsd-arm@freebsd.org Fri May 12 11:14:14 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF9A6D68EB0 for ; Fri, 12 May 2017 11:14:14 +0000 (UTC) (envelope-from amutu@amutu.com) Received: from mail-oi0-x22d.google.com (mail-oi0-x22d.google.com [IPv6:2607:f8b0:4003:c06::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E432AAF for ; Fri, 12 May 2017 11:14:14 +0000 (UTC) (envelope-from amutu@amutu.com) Received: by mail-oi0-x22d.google.com with SMTP id h4so61675227oib.3 for ; Fri, 12 May 2017 04:14:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amutu-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=iIAvTy/fiV9UbuLxm4pKEOK10yeqzuSdOlb8wD0Qtkw=; b=QqyZ3Yr0lkFpJ1dsZAgrxpNQ4tvYxBwPrNhg0ceSYBFaRbdn6KXbiHFeoZkh3BscEi erRJkrdw2E4yZBQcrdVLAcbtqDKNgrodLR08p6hCxRwrZBHNb2a63fHN1v9AFztctA39 G6BTqeB4bED8nO/iMpzZX7fJ4Q1BTBgu/fL5NViTSgUc0NezcE1k+UMDLeIPit9mSO7M BQYotGO3ayUxkvBayuYmDwHYX7Rko1HwIWjUwr+x+0rtE+uyA35qsm7RXyMOrhcnlT0w r8ScNWiscOfQgpbq+VNsx2j39YZnLBsVKmS/R4XxIREzbZ7pWwlh3KoQY46Ex7SObDwF Tpjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=iIAvTy/fiV9UbuLxm4pKEOK10yeqzuSdOlb8wD0Qtkw=; b=l4D0qkbty0NnYs+yv1FOsVCBS1SQZI1pB4/5m7nsokhkJWlPOV+6+T6lLFJsLAzOMm 5EYoDfOQhHcuntc5pEzeO7atvPNK3Z5PSqTkTt5Nkj6l76DxqVSrp28EKlHuzTYb//WV 40wO8Qz0GKBiCcNCrOJO21JkRFrTFyG5QxLG+x+DMaEwECX3aSGgQX8OJXdizPU+XBpd M4l24bZYtmDTeW/IwOvI1a00N3ZGRijQYv39j8iFjW+fg1DcRHDsBCKpGvmQVzxcm7C5 2w3Uf+5r1qdAWEdTMjiW0+Ew6+eBEwdogZFYXptXAoJADYPksRCt0/9tQUt0DSaaMu/I JquQ== X-Gm-Message-State: AODbwcAD7yk9kU9kmvHyQU92beNSK1qOeZavr8oGRJHxi3JyQIWSwP02 TCxjhkVDfXjj6Lpj72k= X-Received: by 10.157.63.156 with SMTP id r28mr1860728otc.225.1494587653422; Fri, 12 May 2017 04:14:13 -0700 (PDT) Received: from mail-oi0-f50.google.com (mail-oi0-f50.google.com. [209.85.218.50]) by smtp.gmail.com with ESMTPSA id h27sm1439204ote.27.2017.05.12.04.14.12 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 May 2017 04:14:13 -0700 (PDT) Received: by mail-oi0-f50.google.com with SMTP id w10so61856217oif.0 for ; Fri, 12 May 2017 04:14:12 -0700 (PDT) X-Received: by 10.157.61.52 with SMTP id a49mr1536394otc.30.1494587652452; Fri, 12 May 2017 04:14:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.134.72 with HTTP; Fri, 12 May 2017 04:13:52 -0700 (PDT) In-Reply-To: <0d94c2c1-6b1f-3da1-9de9-f25c84573029@paranoici.org> References: <0d94c2c1-6b1f-3da1-9de9-f25c84573029@paranoici.org> From: Jov Date: Fri, 12 May 2017 19:13:52 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: FreeBSD 12-CURRENT on OrangePi One To: aggaz Cc: freebsd-arm Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 11:14:14 -0000 Good job! I think you can pick up any license you like because you are the owner,but if you wish your work get into the freebsd project(such as crochet),you'd better choose bsd friendly license,like bsd or mit license. 2017-05-10 23:07 GMT+08:00 aggaz : > Dear list, > > I am still playing with FreeBSD/Crochet/OrangePi-One. > > In my last attempts, I was able to boot FreeBSD by using two dtb files: > > [nano]: NanoPi-Neo ($FREEBSDSRC/sys/boot/fdt/dts/arm/nanopi-neo.dts) > [plus]: OrangePi-Plus-2E > ($FREEBSDSRC/sys/boot/fdt/dts/arm/orangepi-plus-2e.dts) > > Using [nano] I was able to use ethernet but not USB. > Using [plus] I was able to use USB but not ethernet. > > Now, I merged [nano] and [plus] generating a dts file for OrangePi One > (lets call it: [one]). > > Basically, [one] is a copy of [plus], but the lines regarding ethernet > interface are from [nano]. > > In particular, lines 65-78 of [plus] are deleted and lines 53-63 of > [nano] are used instead. > > [one] works fine on my OrangePi One, I used it in the last couple of > days, and both ethernet and USB are working. > > > --------------------------------------------------------------------------------------------- > ==Other attempts: > > Before writing file [one], I also tried to use the dts file for OrangePi > One from Linux: > > [linux]: $FREEBSDSRC/sys/gnu/dts/arm/sun8i-h3-orangepi-one.dts > > With this file ethernet does not work, and usb works sporadically. > > In order to add ethernet, I applyed the patches as described in [1]. > To be more specific, I only used the patches written in the following > text, copied from the cited blog: > > #==================================================================== > # [v4,04/10] ARM: dts: sun8i-h3: Add dt node for the syscon > wget https://patchwork.kernel.org/patch/9365773/raw/ \ > -O sun8i-emac-patch-4.patch > > # [v4,05/10] ARM: dts: sun8i-h3: add sun8i-emac ethernet driver > wget https://patchwork.kernel.org/patch/9365757/raw/ \ > -O sun8i-emac-patch-5.patch > > # [v4,07/10] ARM: dts: sun8i: Enable sun8i-emac on the Orange PI One > wget https://patchwork.kernel.org/patch/9365767/raw/ \ > -O sun8i-emac-patch-7.patch > #==================================================================== > > The resulting patched file ([patch]) boots. I can see both ethernet and > USB, but ethernet never works, and USB works sporadically. > > To be more specific: > > When I attach an USB memory to the port, I can mount it 1 time over 5 > attempts, and when things do not work I see the following messages in dmesg: > > #==================================================================== > ugen0.2: at usbus0 > umass0 on uhub0 > umass0: on usbus0 > umass0: SCSI over Bulk-Only; quirks = 0x8100 > umass0:0:0: Attached to scbus0 > (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00 > (probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error > (probe0:umass-sim0:0:0:0): Retrying command > (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00 > (probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error > (probe0:umass-sim0:0:0:0): Retrying command > (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00 > (probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error > (probe0:umass-sim0:0:0:0): Retrying command > (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00 > (probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error > (probe0:umass-sim0:0:0:0): Retrying command > (probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00 > (probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error > (probe0:umass-sim0:0:0:0): Error 5, Retries exhausted > #==================================================================== > > > Regarding ethernet, it does never work, and at boot (using DHCP) I see > these messages: > > #==================================================================== > awg0: link state changed to DOWN > awg0: link state changed to UP > Starting Network: lo0 awg0. > lo0: flags=8049 metric 0 mtu 16384 > options=600003 > inet6 ::1 prefixlen 128 > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 > inet 127.0.0.1 netmask 0xff000000 > groups: lo > nd6 options=21 > awg0: flags=8843 metric 0 mtu 1500 > options=8000b > ether 02:81:1c:2e:66:ec > media: Ethernet none (none ) > status: active > nd6 options=29 > Starting devd. > Starting dhclient. > DHCPDISCOVER on awg0 to 255.255.255.255 port 67 interval 6 > DHCPDISCOVER on awg0 to 255.255.255.255 port 67 interval 15 > DHCPDISCOVER on awg0 to 255.255.255.255 port 67 interval 16 > DHCPDISCOVER on awg0 to 255.255.255.255 port 67 interval 14 > DHCPDISCOVER on awg0 to 255.255.255.255 port 67 interval 9 > No DHCPOFFERS received. > No working leases in persistent database - sleeping. > > add host 127.0.0.1: gateway lo0 fib 0: route already in table > add host ::1: gateway lo0 fib 0: route already in table > add net fe80::: gateway ::1 > add net ff02::: gateway ::1 > add net ::ffff:0.0.0.0: gateway ::1 > add net ::0.0.0.0: gateway ::1 > Generating host.conf. > Waiting 30s for the default route interface: ............................. > #==================================================================== > > > > --------------------------------------------------------------------------------------------- > ==Work in progress: > > Now that I have both USB and ethernet, given that the [linux] dts seems > to be not working, and given that I was not able to really understand > wich dts file is the best one for OrangePi One in the land of Linux, I > am inclined to work on [one], because it works and derives from [plus], > which was written for a similar board. > > One of the differences between OrangePi Plus 2E and OrangePi One is the > voltage regulator responsible for cpu scaling. > > I had a look at the values used in the FEX files from Armbian [2] (lines > 713-730), and I inserted similar values in the lines 96-97 and 111-121 > of [plus]. > > Things seem to work fine until now, but I really don't know how should I > check the correct behavior of cpu-scaling. > > Moreover, I am not an experienced developer and I am really just putting > things together here, so I would like to know if you think I am > following the right road. > > Finally, given that I used a FEX file from Armbian as a reference, and > given that I am not sure about the license this file is released with, I > do not know what kind of license should I use for my work in progress > dts file. > > I am a beginner here, any kind of help or suggestion is very much > appreciated. > > > Regards > Aggaz > > > > [1] > https://blog.christophersmart.com/2016/10/23/building-and-booting-upstream-linux-and-u-boot-for-orange-pi-one-arm-board/ > > [2] https://github.com/armbian/build/blob/master/config/fex/orangepione.fex > > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"