Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Nov 2018 20:41:32 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        Sean Bruno <sbruno@freebsd.org>, Kyle Evans <kevans@FreeBSD.org>, ports-list freebsd <freebsd-ports@freebsd.org>
Subject:   qemu-arm-static: bsd-user/arm/target_syscall.h: #define TARGET_HW_MACHINE_ARCH  "armv6" // what of armv7?
Message-ID:  <3B210EB1-E7A8-4C77-B418-D82C58AE7290@yahoo.com>

next in thread | raw e-mail | index | archive | help
11.x:
o 11.2-STABLE armv6 BANANAPI
o 11.2-STABLE armv6 BEAGLEBONE
o 11.2-STABLE armv6 CUBIEBOARD
o 11.2-STABLE armv6 CUBIEBOARD2
o 11.2-STABLE armv6 CUBOX-HUMMINGBOARD
o 11.2-STABLE armv6 RPI-B
o 11.2-STABLE armv6 RPI2
o 11.2-STABLE armv6 PANDABOARD
o 11.2-STABLE armv6 WANDBOARD

12.x+ (I got the list from a 13.0 snapshot announcement):
o 13.0-CURRENT armv6 RPI-B
o 13.0-CURRENT armv7 BANANAPI
o 13.0-CURRENT armv7 BEAGLEBONE
o 13.0-CURRENT armv7 CUBIEBOARD
o 13.0-CURRENT armv7 CUBIEBOARD2
o 13.0-CURRENT armv7 CUBOX-HUMMINGBOARD
o 13.0-CURRENT armv7 RPI2
o 13.0-CURRENT armv7 PANDABOARD
o 13.0-CURRENT armv7 WANDBOARD
o 13.0-CURRENT armv7 GENERICSD

So as of 12.x+ most are armv7 --as are most new ones
expected to be.

As stands, in my amd64 -> armv7 13.0 cross-build activity,
uname -p and the like under the chroot context are
returning armv6 instead of armv7 unless I override via
a UNAME_p definition.

This appears to trace back to: bsd-user/arm/target_syscall.h
and its:

#define TARGET_HW_MACHINE       "arm"
#define TARGET_HW_MACHINE_ARCH  "armv6"

and lack context sensitivity, such as to the FreeBSD version
that it is in use under.

So it seems that most 12.x+ use needs to define UNAME_p to
actually have armv7 in uname output and the like.

I noticed this by trying a armv7 buildworld under a
chroot and it reported:

make[1]: "/usr/src/Makefile.inc1" line 577: To cross-build, set TARGET_ARCH.

This was because of Makefile.inc1 and its:

.if make(buildworld)
BUILD_ARCH!=    uname -p
.if ${MACHINE_ARCH} != ${BUILD_ARCH}
.error To cross-build, set TARGET_ARCH.
.endif
.endif

in which it compared armv7 != armv6 and
stopped the build. As it sees things under
qemu-arm-static, only armv6 is a native
buildworld, the rest are cross-builds.

Ports could be choosing inappropriately based on
armv6 being reported in/for armv7 contexts.

Should ports normally see armv6 instead of armv7 on
FreeBSD 12.x+ for some reason? Or would this better be
changed to armv7 as the default for such contexts?

Should documentation report on the issue and how
to handle it when the default is inappropriate?


===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B210EB1-E7A8-4C77-B418-D82C58AE7290>