From owner-freebsd-arm@freebsd.org Sat Oct 14 16:03:33 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 4779CE4A3FF for ; Sat, 14 Oct 2017 16:03:33 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (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 D3AFA74074 for ; Sat, 14 Oct 2017 16:03:31 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 33ed03d5-b0f9-11e7-a893-25625093991c X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id 33ed03d5-b0f9-11e7-a893-25625093991c; Sat, 14 Oct 2017 16:03:23 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v9EG3Iv9001643; Sat, 14 Oct 2017 10:03:18 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1507996998.77532.4.camel@freebsd.org> Subject: Re: Difficulty with armv6 to v7 transition. From: Ian Lepore To: mmel@freebsd.org, bob prohaska Cc: freebsd-arm@freebsd.org Date: Sat, 14 Oct 2017 10:03:18 -0600 In-Reply-To: <559584b5-47c6-b9f8-9fae-43ee76fc99cc@freebsd.org> References: <20171011030021.GB57571@www.zefox.net> <20171013020604.GA70845@www.zefox.net> <20171013175943.GA74121@www.zefox.net> <20171014010713.GA75288@www.zefox.net> <254A2C41-59A9-4E4E-8982-ADDBAE2B5F91@dsl-only.net> <20171014021133.GB75288@www.zefox.net> <39f6419f-48f3-aaec-dfa4-3048c8a893d8@freebsd.org> <20171014054706.GC75288@www.zefox.net> <559584b5-47c6-b9f8-9fae-43ee76fc99cc@freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit 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: Sat, 14 Oct 2017 16:03:33 -0000 On Sat, 2017-10-14 at 08:28 +0200, Michal Meloun wrote: > > On 14.10.2017 7:47, bob prohaska wrote: > > > > Hi Michal, > > > > On Sat, Oct 14, 2017 at 06:28:13AM +0200, Michal Meloun wrote: > > > > > > Bob, > > > can you please try this? > > > setenv MACHINE_ARCH armv7; make buildworld TARGET=arm TARGET_ARCH=armv7 > > > > > I _believe_ I did try that, with no success,  but the scrollback buffer  > > isn't long enough to let me verify it.  > > > > Right now the machine is running buildworld, using  > > BUILD_ARCH!= echo armv7 > > in /usr/src/Makefile.inc1 to set BUILD_ARCH.  If the > > buildworld fails I'll try setenv, just to verify. Should know > > late Saturday or early Sunday. > > A more immediate puzzle is how to test whether the buildworld command > > produced an armv7 userland, or something else, before running installworld. > > I'd hate to trash the system _again_. Running clang -v ought to give a  > > good hint, if I can find the executable. Is there a better test?  > > > For not-installed world executable you can dump ABI version encoded in > .note.tag section: > ' objdump -s -j .note.tag  //bin/sh' > > the right binary have something like this: > ----------------------------------------------------- > /bin/sh:     file format elf32-littlearm > > Contents of section .note.tag: >  814c 08000000 04000000 01000000 46726565  ............Free >  815c 42534400 b24f1200 08000000 04000000  BSD..O.......... >  816c 02000000 46726565 42534400 00000000  ....FreeBSD..... >  817c 08000000 06000000 03000000 46726565  ............Free >  818c 42534400 61726d76 37000000           BSD.armv7... > ------------------------------------------------------- > where ' FreeBSD.armv7' is ABI version. > > For installed world, the next method is 'make -V MACHINE_ARCH -f/dev/null' > And for kernel, 'sysctl kern.supported_archs' and 'sysctl  > hw.machine_arch' shoul return armv7 > > You can also get some info formatted nicely with readelf -A: root@wand:~ # readelf -A /sbin/init Attribute Section: aeabi File Attributes   Tag_CPU_arch: ARM v7   Tag_CPU_arch_profile: Application Profile   Tag_ARM_ISA_use: Yes   Tag_THUMB_ISA_use: 32-bit Thumb   Tag_FP_arch: VFPv3   Tag_Advanced_SIMD_arch: NEONv1   Tag_ABI_PCS_GOT_use: direct   Tag_ABI_PCS_wchar_t: wchar_t size 4   Tag_ABI_FP_denormal: Sign Only   Tag_ABI_FP_exceptions: Needed   Tag_ABI_FP_number_model: IEEE 754   Tag_ABI_align_needed: 8-byte align   Tag_ABI_align_preserved: 8-byte align   Tag_ABI_enum_size: 32-bit   Tag_ABI_VFP_args: AAPCS (VFP variant)   Tag_ABI_optimization_goals: Speed   Tag_ABI_FP_16bit_format: IEEE 754   Tag_conformance: 2.09 When doing it to check before installworld, be sure to check the new one in $OBJDIRPREFIX/arm.armv7//src/sbin/init/init -- Ian