Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Apr 2022 21:40:00 +0000
From:      Brooks Davis <brooks@freebsd.org>
To:        "Patrick M. Hausen" <pmh@hausen.com>
Cc:        "freebsd-current@freebsd.org" <freebsd-current@FreeBSD.org>
Subject:   Re: Cross-compile worked, cross-install not so much ...
Message-ID:  <20220425214000.GB89506@spindle.one-eyed-alien.net>
In-Reply-To: <7FA0C88D-4446-47DD-BBC0-3300B26D6A27@hausen.com>
References:  <3D48BE93-7D42-4AB2-82D4-88BBF4E1FD40@hausen.com> <20220425191823.GA89506@spindle.one-eyed-alien.net> <7FA0C88D-4446-47DD-BBC0-3300B26D6A27@hausen.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--3uo+9/B/ebqu+fSQ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Apr 25, 2022 at 09:26:04PM +0200, Patrick M. Hausen wrote:
> Hi,
>=20
> > Am 25.04.2022 um 21:18 schrieb Brooks Davis <brooks@freebsd.org>:
> > Cross install is not supported.  As you have seen, certain tools are
> > bootstrapped on the build host and used during the install process.  You
> > might be able to get away with nuking
> > /usr/obj/usr/src/arm64.aarch64/tmp/legacy (or maybe tmp) and then
> > running `make toolchain` to build native versions of those tools.
>=20
> that comes as a big surprise and disappointment. What is the point of cro=
ss-compiling, then?
> How to update a small slow embedded platform?

The traditional answer is: build a new image and install it as a
whole-sale replacement for the device image or in a nanobsd system
with two boot partitions.

If someone was motivated they could presumably work things out so we could
cross compile the boostrap tools, but that would be a fair bit of work.

It would probably be easier to figure out how to process the METALOG
file in a sysroot to extract the files you want to update and install
them in the right order (the order mostly doesn't matter until it really
does and everything explodes as you crossthread rtld/libc/libthr). If I
had time, this is the path I would pursue.

> I tried your suggestion - unfortunately no worky:
>=20
> cd /usr/src/tools/build;  make DIRPRFX=3Dtools/build/ DESTDIR=3D/usr/obj/=
usr/src/arm64.aarch64/tmp/legacy host-symlinks
> Linking host tools into /usr/obj/usr/src/arm64.aarch64/tmp/legacy/bin
> cp: chflags: /usr/obj/usr/src/arm64.aarch64/tmp/legacy/bin/basename: Oper=
ation not supported
> *** Error code 1

You might try editing tools/build/Makefile and dropping -p from
_COPY_HOST_TOOL or just tweaking the code to take the !FreeBSD branch.
I'm not fully convinced that cp -p should fail if file flags can't be
manipulated, but apparently it does.

-- Brooks

--3uo+9/B/ebqu+fSQ
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEcBAEBAgAGBQJiZxUvAAoJEKzQXbSebgfAQMUIAIPXaqFgNgweNZkfcftrk3mk
qlXc2+GWTDbFcS2KRvLt9T1LZT+RaDhbpUIQkD3AdNaLeQyi2uuYx+gBGLDafzGA
Mx05UIJ06nStODM4NUncXs3eEOfVw4QDKYvw80i+ySMSkYucZ4FzYx34Gp5DbBbD
Bjbok2DMJTlwwM/fA98AsOP5FfRMRMkrhonqCvWoEcHHqX4fEEK3MKjc2anqFsug
39zi0gl4dDs29RBA1bzCBBjHLMXXjWpNAg3UA0yMG3V8cspGMH0MzGHOJbyplLGf
Zrml2fgpot0tujpRpOEZY0UfbunAO0E8W3JmlsWspKZLKnNLsGmgIryrhuumook=
=sQpS
-----END PGP SIGNATURE-----

--3uo+9/B/ebqu+fSQ--



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