From owner-freebsd-arm@freebsd.org Mon Nov 27 06:28:16 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 6F1C1DFA3F9 for ; Mon, 27 Nov 2017 06:28:16 +0000 (UTC) (envelope-from eval@iptk.ru) Received: from newmail.iptk.ru (newmail.iptk.ru [83.217.3.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.iptk.ru", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D3A2865C99 for ; Mon, 27 Nov 2017 06:28:15 +0000 (UTC) (envelope-from eval@iptk.ru) Received: from localhost (localhost [127.0.0.1]) by newmail.iptk.ru (Postfix) with SMTP id 89EFA1B00666 for ; Mon, 27 Nov 2017 10:28:09 +0400 (+04) Received: from HP7320 (unknown [IPv6:2a00:d8c0:0:1:9885:68d4:8a50:284c]) by newmail.iptk.ru (Postfix) with ESMTPA id 4189F1B00084 for ; Mon, 27 Nov 2017 10:28:09 +0400 (+04) Date: Mon, 27 Nov 2017 10:26:37 +0400 From: Eugene Sevastyanov To: freebsd-arm@freebsd.org Subject: Re: Allwinner H3/H2+ dts question - regression? Message-Id: <20171127102637.3340c8a8df935b8bec3a4312@iptk.ru> In-Reply-To: <20171127084355.1dabd642748f25cb87c16b44@iptk.ru> References: <20171126124217.2a512392@zeta.dino.sk> <20171127084355.1dabd642748f25cb87c16b44@iptk.ru> Reply-To: eval@iptk.ru Organization: IPTelecom Ltd. X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.23; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Mon Nov 27 10:28:09 2017 X-DSPAM-Confidence: 0.9960 X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 5a1bb07914691430116795 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Nov 2017 06:28:16 -0000 Sorry, attachments are not allowed. To whom it is interesting, the archive can be downloaded from http://opi.iptk.ru/OrangePi.tgz > Hi, > > Faced with exactly the same problem. Installed FreeBSD on the Orange Pi Zero board, but in the regular dts there is no description for emac. So I wrote my dts, partly taking information from the native file, and partly from Linux. > To avoid rebuilding the whole kernel for the compilation of dtb, I created a separate project. In the attached archive, the project with the original dts and the received dtb for Orange Pi Zero. In fact, this is a copy of the structure of the native FreeBSD source tree with only the necessary files for DTS compilation. > The script arm.sh takes care of all the work on creating a bootable flash drive. Uncomment there only the necessary sections. The script DOES NOT COPY the resulting dtb on the USB flash drive, be careful. > > > Hi, > > > > after some time I am playing a bit again with my Allwinner H3/H2+ based > > boards. First I crossbuild world and kernel using svn rev. 324530, > > after trying to upgrade older armv6 to current armv7 with no success, > > put them on micro SD card and tested it. I found there are some dtb's > > for this SOC, but none worked well. I tested ethernet, USB and thermal > > devices. Ethernet worked only with sun8i-h3-nanopi-neo.dtb, but using > > it USB did not work. > > > > Then I upgraded sources to svn rev. 326187 and built new kernel > > natively. While resulting kernel loads, none of dtb's provided have > > ethernet working. Using nanopi-neo.dtb from old revision, originally > > identical with sun8i-h3-nanopi-neo.dtb, provides me again with working > > ethernet. > > > > This raises a question what changed with dts sources and why we have no > > stable working dts... By the way, I am using GENERIC-NOCTF-NOINET6 > > kernel (plain GENERIC, just with CTF and INET6 options removed), > > currently on Orange Pi Zero and Orange Pi R1 boards, the later being > > almost identical with the former, just there is second USB > > connected ethernet port instead of usual USB port, and changed wifi > > module, which does not works for us anyway. > > > > I looked over our sources and could not find any definition of emac for > > Allwinner H3/H2+ SoC. Is it just me or is it really somehow lost? > > > > One more question, loosely related - how does one build dtb file? I > > mean, I know I can just invoke 'make buildkernel -DNO_CLEAN' and all > > dtb's for boards defined in makefile will be created. However, I think > > it is handy to do it on board tested, because you can simply stop > > u-boot, type > > > > env set fdtfile sun8i-h2-plus-orangepi-zero.dtb;boot > > > > and test new definition. Reboot is quick on Allwinner board I have, but > > 'make buildkernel -DNO_CLEAN' takes ~ 3 minutes, additionally, your dts > > needs to be mentioned in Makefile. I found it is actually done with > > > > /usr/src/sys/tools/fdt/make_dtb.sh /usr/src/sys sun8i-h2-plus-orangepi-zero.dts /usr/obj/usr/src/arm.armv7/sys/GENERIC-NOCTF-NOINET6/modules/usr/src/sys/modules/dtb/allwinner > > > > (in one line) invoked from some make command, but this does not give me > > exactly the same result, probably environment differs. dtb file created > > this way is larger than one produced with 'make buildkernel' command, > > there are some fixups added. No idea whether it does any harm or not. > >