cross installing freebsd?

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


On Dec 7, 2014, at 21:48, Alfred Perlstein <alfred at freebsd.org> wrote:

>> 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!
> 
> 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…

Right. I didn’t know about all of these magic things until I started reading the Makefiles :).

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

Yes. Basically for things that can be replaced while make installworld is run, or as Makefile.inc1 says…

"# Required install tools to be saved in a scratch dir for safety.”

All the libraries for the tools are backed up so if the tools get replaced while make distributeworld/installworld is running, your system won’t be hosed (that’s why make installworld works for me the majority of the time, if cp gets replaced and ABI changes — not always, but oftentimes).

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

Review opened for that issue: https://reviews.freebsd.org/D1280

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

It’s something that ru@ introduced (probably to do comparisons between architectures). I haven’t quite tracked down why make tinderbox works with TARGET_ARCH/TARGET set to the host values, but I’ll probably figure it out soon.

> 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?

Setting TARGET/TARGET_ARCH should be sufficient in an ideal world. Jumping through hoops to do this with a myriad of variables which should be automatically determined via sane defaults seems wrong/unusable… there shouldn’t be a reason for why we need to introduce autoconf variable style hell for building/installing world, unless someone is intentionally skating around sane defaults.

I think that creating more custom targets will only complicate/muddle the build process, and create more potential for bugs like the one that I just addressed with xdev.

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/20141208/1d4c5833/attachment.sig>


More information about the freebsd-hackers mailing list