From owner-freebsd-arm@freebsd.org Thu Jun 15 16:58:36 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 A0A18D8DDEB for ; Thu, 15 Jun 2017 16:58:36 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-16.reflexion.net [208.70.210.16]) (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 652337BBE7 for ; Thu, 15 Jun 2017 16:58:35 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 664 invoked from network); 15 Jun 2017 16:58:34 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 15 Jun 2017 16:58:34 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v8.40.0) with SMTP; Thu, 15 Jun 2017 12:58:34 -0400 (EDT) Received: (qmail 6140 invoked from network); 15 Jun 2017 16:58:33 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 15 Jun 2017 16:58:33 -0000 Received: from [192.168.1.114] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 30D3DEC8B7B; Thu, 15 Jun 2017 09:58:33 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Next up on creating armv7 MACHINE_ARCH: pre FCP stage From: Mark Millard In-Reply-To: Date: Thu, 15 Jun 2017 09:58:32 -0700 Cc: Warner Losh , "freebsd-arm@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <0F64C8AC-576B-4E6E-BAB4-44FE819F9B44@dsl-only.net> References: <6EC26472-CE31-4B14-A049-3F153E590647@dsl-only.net> <20170615145107.97e6460fbb6222b258bfd614@bidouilliste.com> To: Emmanuel Vadot X-Mailer: Apple Mail (2.3273) 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: Thu, 15 Jun 2017 16:58:36 -0000 On 2017-Jun-15, at 8:40 AM, Mark Millard wrote: > On 2017-Jun-15, at 5:51 AM, Emmanuel Vadot = wrote: >=20 >> On Thu, 15 Jun 2017 02:08:10 -0700 >> Mark Millard wrote: >>=20 >>> On 2017-Jun-14, at 11:20 PM, Mark Millard = wrote: >>>=20 >>>> On 2017-Jun-14, at 10:22 PM, Warner Losh wrote: >>>>=20 >>>>> . . . >>>>> Comments? >>>>=20 >>>> I booted Ubuntu Mate on a BPI-M3 and tried: >>>>=20 >>>> $ uname -p >>>> armv7l >>>>=20 >>>> $ uname -ap >>>> Linux bpi-iot-ros-ai 3.4.39-BPI-M3-Kernel #1 SMP PREEMPT Tue May 3 = 13:47:01 UTC 2016 armv7l armv7l armv7l GNU/Linux >>>>=20 >>>> I was actually thinking that a "hf" might >>>> show up in how they name things if it was >>>> a hard float based build. But looking I >>>> see in /lib/ : >>>>=20 >>>> . . . >>>> drwxr-xr-x 3 root root 16384 Nov 4 2016 arm-linux-gnueabihf >>>> . . . >>>> lrwxrwxrwx 1 root root 30 Oct 14 2016 ld-linux-armhf.so.3 -> = arm-linux-gnueabihf/ld-2.23.so >>>> lrwxrwxrwx 1 root root 24 Apr 21 2016 ld-linux.so.3 -> = /lib/ld-linux-armhf.so.3 >>>> . . . >>>>=20 >>>> and in /lib/arm-linux-gnueabihf/ : >>>>=20 >>>> lrwxrwxrwx 1 root root 10 Oct 14 2016 = /lib/arm-linux-gnueabihf/ld-linux-armhf.so.3 -> ld-2.23.so >>>>=20 >>>> so it appears armv7l was used for naming a >>>> hard float build in uname -p. >>>>=20 >>>> Of course this does not check how uniform the >>>> various linux distributions are about such >>>> naming. >>>>=20 >>>> Still it may mean that for linux-matching "armv7" >>>> might not be the right name for uname -p output. >>>=20 >>> I tried another linux on the BPI-M3: gentoo . >>>=20 >>> # uname -p >>> ARMv7 Processor rev 5 (v7l) >>>=20 >>> (Wow. Not what I expected.) >>>=20 >>> # uname -pa >>> Linux bananapi 3.4.39-BPI-M3-Kernel #1 SMP PREEMPT Tue May 3 = 13:47:01 UTC 2016 armv7l ARMv7 Processor rev 5 (v7l) sun8i GNU/Linux >>>=20 >>> # uname -m >>> armv7l >>>=20 >>> # uname -i >>> sun8i >>>=20 >>> # ls -l /lib/ld-* >>> -rwxr-xr-x 1 root root 134192 Mar 26 2016 /lib/ld-2.21.so >>> lrwxrwxrwx 1 root root 10 Mar 26 2016 /lib/ld-linux-armhf.so.3 = -> ld-2.21.so >>>=20 >>> So again armv7l seems to be the base name used for >>> a hardfloat little-endian context --although it >>> appears that "uname -m" gives text more likely to >>> be used in testing for how to configure to match >>> the live context. "uname -p" seems far less >>> standardized for its results. The same for >>> "uname -i". >>>=20 >>> =3D=3D=3D >>> Mark Millard >>> markmi at dsl-only.net >>=20 >> On both your linux you are using linux-sunxi which is a fork of the >> Allwinner kernel "maintained" by the sunxi community (and it is old). >> To have the proper values of uname one should test running linux >> vanilla kernel. >=20 > They both reported (extracted from the earlier text > that I sent): >=20 > 3.4.39-BPI-M3-Kernel > 3.4.39-BPI-M3-Kernel >=20 > It is the same kernel version from the same group > for the same hardware context as far as what each > reported. >=20 > While they may have varied the kernel for some > reason without changing the version identification > that is not want I would expect. >=20 > I expected it was the Ubuntu vs. Gentoo code that > makes the difference, not the kernel. >=20 > I'm not aware of a modern vanilla kernel for the > BPI-M3. >=20 > =46rom what I can tell for little armv7 boards like > this having older kernels is a common case and > is something ports code would normally deal with > upstream. It is not just sunxi as I understand. >=20 > I may do more experiments and report those too. > My notes are just information for Warner and others > to consider. An FYI: I tried the following on both kernel7.img files (this was via macOS): $ strings /Volumes/BPI-BOOT/kernel7.img | grep -i sun8i | more $ strings /Volumes/BPI-BOOT/kernel7.img | grep -i armv7 | more Both came up empty. The strings reported by uname -p -m -i do not seem to be directly from the kernels. =3D=3D=3D Mark Millard markmi at dsl-only.net