cross installing freebsd?

Alfred Perlstein bright at mu.org
Sun Dec 7 17:36:52 UTC 2014


On Dec 7, 2014, at 7:28 AM, Matthias Meyser wrote:

> Hi all
> 
> Am 07.12.2014 um 02:32 schrieb Alfred Perlstein:
>> 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
> Thank you! You are my hero.
> This bothers me a long time. Even on arm.
> 
> 
>> Seems to work nicely.
>> Any objections if I add something like this target as "cross-installworld" and "cross-installkernel" to top level Makefile?
> 
> It would be much nicer if the normal install* would handle this automatically.
> Someone should teach the Makesystem to build the installboottrapbinaries
> not only for the HOST system but also for the Targetsystem.
> 
> Then normal install would just work.

I wish I had time to do that, but I really do not have time to sort how to determine that reliably, also people have been pretty upset if anything in the build changes lately and anything breaks.  So I am very afraid to touch any defaults.

Due to time and the pressure to not break anything I can do one of two things:
1) clean up the two targets I've submitted and put them in a Makefile.cross-install, then document them in the main Makefile.
2) Keep this code in my own repo.

Sorry.  Let me know if there is a way forward with 1 for the time being?

-Alfred

> 
> 
> 
> - Matthias
> 
> -- 
> Matthias Meyser            | XeNET GmbH
> Tel.:  +49-5323-9489050    | 38678 Clausthal-Zellerfeld, Marktstrasse 40
> Fax:   +49-5323-9489059    | Registergericht: Amtsgericht Braunschweig HRB 110823
> Email: Meyser at xenet.de     | Geschaeftsfuehrer: Matthias Meyser
> 
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
> 



More information about the freebsd-hackers mailing list