Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Dec 2014 21:48:53 -0800
From:      Alfred Perlstein <alfred@freebsd.org>
To:        Garrett Cooper <yaneurabeya@gmail.com>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: cross installing freebsd?
Message-ID:  <613884DA-F978-4D9F-9E37-D39581EFEA61@freebsd.org>
In-Reply-To: <D925B118-113F-42CB-8F1F-6B9087F0CF4D@gmail.com>
References:  <5483AE21.8090306@freebsd.org> <D925B118-113F-42CB-8F1F-6B9087F0CF4D@gmail.com>

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

On Dec 7, 2014, at 8:35 PM, Garrett Cooper wrote:

> On Dec 6, 2014, at 17:32, Alfred Perlstein <alfred@freebsd.org> wrote:
>=20
>> Hey folks,
>>=20
>> In order to make installation of a new world/kernel on my i386 =
soekris a LOT faster/easier I've taken to doing builds on an amd64 host =
and then "cross-installing"
>>=20
>> Steps are as follows:
>>=20
>> On amd64 host:
>> /usr/trees/freebsd.git % env TARGET=3Di386 make -j8 buildworld && env =
TARGET=3Di386 make -j8 buildkernel
>>=20
>> On i386 host:
>> mount spigot:/usr/trees /usr/trees
>> mount spigot:/usr/obj /usr/obj
>> cd /usr/trees/freebsd.git
>> # install kernel:
>> env MAKEOBJDIRPREFIX=3D/usr/obj/i386.i386 CC=3D/usr/bin/cc \
>> INSTALL=3D/usr/bin/install \
>> make installkernel
>> # install world:
>> env MAKEOBJDIRPREFIX=3D/usr/obj/i386.i386 CC=3D/usr/bin/cc \
>> INSTALL=3D/usr/bin/install STRIPBIN=3D/usr/bin/strip \
>> MAKEWHATIS=3D/usr/bin/makewhatis \
>> make installworld
>>=20
>> Seems to work nicely.
>>=20
>> Any objections if I add something like this target as =
"cross-installworld" and "cross-installkernel" to top level Makefile?
>=20
> Hi Alfred,
> 	Reading your examples...
> 	1. I=92m wondering if we should formalize CROSS_BUILD_TESTING in =
Makefile.inc1:
>=20
> 188 .if ${MACHINE} =3D=3D ${TARGET} && ${MACHINE_ARCH} =3D=3D =
${TARGET_ARCH} && !defined(CROSS_BUILD_TESTING)
> 189 OBJTREE=3D        ${MAKEOBJDIRPREFIX}
> 190 .else
> 191 OBJTREE=3D        ${MAKEOBJDIRPREFIX}/${TARGET}.${TARGET_ARCH}
> 192 .endif
>=20
> 	2. MAKEWHATIS seems like it should be added to ITOOLS. Do you =
agree?
> 	3. Seems like strip should be added to ITOOLS if =
CROSS_BUILD_TESTING is defined (or at the very least LOCAL_ITOOLS).
> 	4. Why did you need to explicitly define the path to INSTALL?
> Thanks!

To be honest I have a gist as to what you're saying but I think the =
build is suffering from shibboleth-itis.  Meaning it's not serviceable =
unless you're intimately familiar with it=85

I *guess* that ITOOLS or maybe LOCAL_ITOOLS means programs needed to =
installworld/installkernel?

If so, then yes, makewhatis needs to be added to that.

As far as everything else written:
no idea what "CROSS_BUILD_TESTING" means, it's not documented anywhere I =
can see in the makefile.

I can't decode if there will be a target that "just works" for doing a =
cross-install, will there be?  What will it be named and how will people =
invoke it?

Can we have cross-installworld and cross-installkernel targets please?

-Alfred=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?613884DA-F978-4D9F-9E37-D39581EFEA61>