cross installing freebsd?

Garrett Cooper yaneurabeya at gmail.com
Mon Dec 8 04:35:04 UTC 2014


On Dec 6, 2014, at 17:32, Alfred Perlstein <alfred at freebsd.org> wrote:

> Hey folks,
> 
> 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"
> 
> Steps are as follows:
> 
> On amd64 host:
> /usr/trees/freebsd.git % env TARGET=i386 make -j8 buildworld && env TARGET=i386 make -j8 buildkernel
> 
> On i386 host:
> mount spigot:/usr/trees /usr/trees
> mount spigot:/usr/obj /usr/obj
> cd /usr/trees/freebsd.git
> # install kernel:
> env MAKEOBJDIRPREFIX=/usr/obj/i386.i386 CC=/usr/bin/cc \
>  INSTALL=/usr/bin/install \
>  make installkernel
> # install world:
> env MAKEOBJDIRPREFIX=/usr/obj/i386.i386 CC=/usr/bin/cc \
>  INSTALL=/usr/bin/install STRIPBIN=/usr/bin/strip \
>  MAKEWHATIS=/usr/bin/makewhatis \
>  make installworld
> 
> Seems to work nicely.
> 
> Any objections if I add something like this target as "cross-installworld" and "cross-installkernel" to top level Makefile?

Hi Alfred,
	Reading your examples...
	1. I’m wondering if we should formalize CROSS_BUILD_TESTING in Makefile.inc1:

 188 .if ${MACHINE} == ${TARGET} && ${MACHINE_ARCH} == ${TARGET_ARCH} && !defined(CROSS_BUILD_TESTING)
 189 OBJTREE=        ${MAKEOBJDIRPREFIX}
 190 .else
 191 OBJTREE=        ${MAKEOBJDIRPREFIX}/${TARGET}.${TARGET_ARCH}
 192 .endif

	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!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20141207/20e3927e/attachment.sig>


More information about the freebsd-hackers mailing list