Difficulty with armv6 to v7 transition.
Ian Lepore
ian at freebsd.org
Sat Oct 14 16:03:33 UTC 2017
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 at 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/<path>/src/sbin/init/init
-- Ian
More information about the freebsd-arm
mailing list