Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Dec 2015 10:22:05 -0600
From:      Karl Denninger <karl@denninger.net>
To:        "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>
Subject:   Re: Updating / keeping current strategies?
Message-ID:  <56703E2D.8050504@denninger.net>
In-Reply-To: <1450195123.25138.42.camel@freebsd.org>
References:  <5666F37C.4060908@denninger.net> <10BBDDBB-75AA-4034-B494-9EB28D009882@gromit.dlib.vt.edu> <566EEAC4.1060306@denninger.net> <566F0238.9060605@denninger.net> <1450190791.25138.30.camel@freebsd.org> <567031C9.2090109@denninger.net> <1450195123.25138.42.camel@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a cryptographically signed message in MIME format.

--------------ms040102000306060807030605
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable


On 12/15/2015 09:58, Ian Lepore wrote:
> On Tue, 2015-12-15 at 09:29 -0600, Karl Denninger wrote:
>> On 12/15/2015 08:46, Ian Lepore wrote:
>>>>> There seem to be some problems with this in the general sense,
>>>>> unless
>>>>> you're willing to move the media around (I'm generally not.)
>>>>>
>>>>> Using that script in the Wiki appears to work, but there are
>>>>> problems.=20
>>>>> If you try to nfs mount the object and source directories on
>>>>> the
>>>>> target
>>>>> so you can do a "make installworld" or "make installkernel" on
>>>>> the
>>>>> target you quickly find that clang wasn't cross-built in the
>>>>> object
>>>>> directory; the "tmp" directory in object contains a copy of it,
>>>>> but
>>>>> it's
>>>>> compiled for your _*source*_ machine (in this case
>>>>> FreeBSD/amd64)
>>>>> and
>>>>> the install blows up as it can't determine the cc version.  The
>>>>> interesting thing is that what's in ~/nfsroot/usr/bin/cc is
>>>>> correct
>>>>> which doesn't appear to make sense, but it is what it is.
>>>>>
>>>>> I'm going to see if I can get a rsync-type thing to work....
>>>>>
>>>> It.... gets.... worse.
>>>>
>>>> I can update using rsync.  However, the armv6hf target given in
>>>> the
>>>> wiki
>>>> at https://wiki.freebsd.org/FreeBSD/arm/crossbuild produces
>>>> binaries
>>>> that blow up when floating point is attempted.  Armv6 is
>>>> deprecated
>>>> and
>>>> won't build at all.
>>>>
>>> I'm having a hard time understanding this.  Nobody else is
>>> reporting
>>> problems with cross-built binaries that use floating point.  Also,
>>> armv6 is deprecated only in the sense that armv6hf is more
>>> efficient
>>> and there's no reason to use the old softfp ABI anymore.  But that
>>> doesn't mean it can't be built, it builds and cross-builds just
>>> fine.
>>>
>>> -- Ian
>> Well, I'm reporting what I got.  I followed the instructions in the
>> Wiki, got a product nfsroot directory and the expected src and obj
>> directories, attempted to mount the src and obj directories over nfs
>> and
>> execute a "make installworld" on the target and that blew up with
>> complaints about expected directories being missing.
>>
> Oh, you can't do that.  The pathnames in the obj directory are correct
> for the build machine, but wrong when nfs-mounted on another machine.
Well, but they are if I maintain the paths.

Example: I have the build at /pics/CrossBuild on the source (10.2-STABLE
amd64) machine.
I export /pics/CrossBuild.

I then mount that at /pics/CrossBuild on the target.  Now the paths are
the same.

But..... when I try to do a "make installkernel" as you would do if
doing this on a consistent architecture what I get is this:

root@Pool-MCP:/pics/CrossBuild # ./mk installkernel TARGET_ARCH=3Darmv6hf=

+ cd /pics/CrossBuild/src
+ nice -10 make -j 4 -DNO_CLEAN 'TARGET_ARCH=3Darmv6hf'
'DESTDIR=3D/pics/CrossBuild/nfsroot'
'__MAKE_CONF=3D/pics/CrossBuild/config/make.conf'
'srcconf=3D/pics/CrossBuild/config/src.conf' 'KERNCONF=3DRPI2'
'UBLDR_LOADADDR=3D0x2000000' installkernel 'TARGET_ARCH=3Darmv6hf'
--- installkernel ---
--- installkernel ---
--------------------------------------------------------------
>>> Installing kernel RPI2
--------------------------------------------------------------
cd /pics/CrossBuild/obj/arm.armv6hf/pics/CrossBuild/src/sys/RPI2;=20
MAKEOBJDIRPREFIX=3D/pics/CrossBuild/obj/arm.armv6hf  MACHINE_ARCH=3Darmv6=
hf=20
MACHINE=3Darm  CPUTYPE=3D
GROFF_BIN_PATH=3D/pics/CrossBuild/obj/arm.armv6hf/pics/CrossBuild/src/tmp=
/legacy/usr/bin=20
GROFF_FONT_PATH=3D/pics/CrossBuild/obj/arm.armv6hf/pics/CrossBuild/src/tm=
p/legacy/usr/share/groff_font=20
GROFF_TMAC_PATH=3D/pics/CrossBuild/obj/arm.armv6hf/pics/CrossBuild/src/tm=
p/legacy/usr/share/tmac
CC=3D"cc " CXX=3D"c++  "  DEPFLAGS=3D""  CPP=3D"cpp "  AS=3D"as" AR=3D"ar=
" LD=3D"ld"
NM=3Dnm  OBJDUMP=3Dobjdump OBJCOPY=3D"objcopy"  RANLIB=3Dranlib STRINGS=3D=
=20
SIZE=3D"size"
PATH=3D/pics/CrossBuild/obj/arm.armv6hf/pics/CrossBuild/src/tmp/legacy/us=
r/sbin:/pics/CrossBuild/obj/arm.armv6hf/pics/CrossBuild/src/tmp/legacy/us=
r/bin:/pics/CrossBuild/obj/arm.armv6hf/pics/CrossBuild/src/tmp/legacy/bin=
:/pics/CrossBuild/obj/arm.armv6hf/pics/CrossBuild/src/tmp/usr/sbin:/pics/=
CrossBuild/obj/arm.armv6hf/pics/CrossBuild/src/tmp/usr/bin:/sbin:/bin:/us=
r/sbin:/usr/bin=20
make  KERNEL=3Dkernel install
sh: cc: Exec format error
make[2]: "/pics/CrossBuild/src/share/mk/bsd.compiler.mk" line 137:
Unable to determine compiler type for cc .  Consider setting COMPILER_TYP=
E.
*** [installkernel] Error code 1

make[1]: stopped in /pics/CrossBuild/src
1 error

make[1]: stopped in /pics/CrossBuild/src
*** [installkernel] Error code 2

make: stopped in /pics/CrossBuild/src
1 error

make: stopped in /pics/CrossBuild/src
root@Pool-MCP:/pics/CrossBuild #

When investigating this what I find is that the executable in the path
for "cc" is in fact an arm64 executable!  So I have a built system but
no way to install it.


>
> The instructions in the wiki page you cited are how to set up a
> development environment that uses an nfs-mounted root directory.  You
> can also use it as a source for rsync, but you can't install directly
> from the objdir of such a build environment using an nfs mount unless
> the target system has the exact directory layout of the build system
> after nfs-mounting the source and obj dirs.
Except that doesn't work because the PATH contains executables for the
source which is a different architecture.

And when I tried to rsync it I got a system that booted and ran, sort
of, but anything that did floating point blew up.  That might be because
of schg flags prevented some of the copies and rsync has no good way to
get around that (removing them from the target is undesirable for all
the obvious reasons.)

>
> Another way to make it work is to nfs-mount the target's root directory=

> on your build machine, then you can make installworld DESTDIR=3D<mountp=
t>
That's an interesting idea that I will look into. It's undesirable for a
number of reasons down the road (enabling nfs server on these machines
isn't my idea of a good thing over time) but it might get me going for
the moment.
>> I then attempted to rsync the nfsroot directory to the target machine
>> (a
>> Raspberry Pi2); that succeeded.  But, once the machine was rebooted
>> any
>> attempt to execute anything that had floating point operations
>> dumped;
>> "awk", for example, blows up.
>>
> I built on a 10.2-STABLE machine, if that matters.
> Using a kernel and world built yesterday for armv6hf...
>
>     root@wand    :~ # awk "BEGIN {print 2.7+4.2 }"
>     6.9
>
> I do all my building on a 10-stable machine.
>
> I wonder if your first attempt to installworld somehow installed some
> x86 stuff by accident and now you've got a mixed/broken world, and rsyn=

> c didn't fix it because some of the broken files were more recent?
>
> -- Ian
Maybe.  But I don't think so; I suspect the issue revolves around schg
flags (in other words some things didn't update) and if so it's a
problem since I don't believe rsync can deal with that.

--=20
Karl Denninger
karl@denninger.net <mailto:karl@denninger.net>
/The Market Ticker/
/[S/MIME encrypted email preferred]/

--------------ms040102000306060807030605
Content-Type: application/pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExDzANBglghkgBZQMEAgMFADCABgkqhkiG9w0BBwEAAKCC
Bl8wggZbMIIEQ6ADAgECAgEpMA0GCSqGSIb3DQEBCwUAMIGQMQswCQYDVQQGEwJVUzEQMA4G
A1UECBMHRmxvcmlkYTESMBAGA1UEBxMJTmljZXZpbGxlMRkwFwYDVQQKExBDdWRhIFN5c3Rl
bXMgTExDMRwwGgYDVQQDExNDdWRhIFN5c3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ysQOnBZPqiX3r7TnLlPNEvxM58rG515ITXEZQWyCbltn7+kJUXmO2IsHvPl/CB2qsCV4b9
EQSCmUyHsXxcvts1CliT4Zi/kivZBt9+crqrpeJHpUm3LsYCFBk03dUlV0bwyTzfUTxC2WGE
/CvsTUae7H7cfC7G5JSvDmwOOTkDVmU9ZhHM3rh/XXzdZiF3k8B+XK0OiP/ElnWdXc+GCW4P
lH5EAGnBE6GW5LlYMwUEqr8WVCD1igu6oKUoku0NjvSob/hHMAKFqon56R/QmQqoGjfzAbF/
TgotuamVRog90sd6o97AeIAE6TurYwtTswaF60cH76k7xutd0/wjVOZd+T4HMUBynObQ0SX3
1YW1Bzy+kSPUkv05n16/+z0uE5IUaySlr23FoiosCG5FeWFZIXGDKP80bl08QcpvSukrcrah
d+oaGVX7YPvE6iS4Cf4yhAzkW1unD3Ji2nIfBnLGtXMy+sl9V6eBV3DosoP3gN5k58Ed4Gl+
lx+fjB4oVhXHYLzOd0WRtDkDhPfHXDzejZYBz26WDhYley7fpVB4lEwDfLphG5DfKarvRBlY
oAcVK0GMTp8nkHTwvghIK0kYqbsAAAAAAAA=
--------------ms040102000306060807030605--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?56703E2D.8050504>