Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Dec 2014 14:26:16 +1100
From:      Luigi Rizzo <rizzo@iet.unipi.it>
To:        Alfred Perlstein <alfred@freebsd.org>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: cross installing freebsd?
Message-ID:  <CA%2BhQ2%2BixbTfVxYZYu2-62OHLXsitPrQH3i1h-VAvjzK_FMEhRw@mail.gmail.com>
In-Reply-To: <5483AE21.8090306@freebsd.org>
References:  <5483AE21.8090306@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday, December 7, 2014, Alfred Perlstein <alfred@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?
>
>
If you do so please put the extra targets into an additional  make file
that is included by the main one so people can easily exclude or modify it.
Or perhaps put something in tools/tools . The master makefule is way too
complex for humans, and i suspect very fragile too.

I also have my own makefile that I use for custom cross builds and wouldn't
mind seeing some better example than what I could come up with. As an
example from time to time I read good advice from people to cross build
kernel modules or individual binaries which I always forget. They would fit
well in this extra make file.

Cheers
Luigi

-Alfred
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
>


-- 
-----------------------------------------+-------------------------------
 Prof. Luigi RIZZO, rizzo@iet.unipi.it  . Dip. di Ing. dell'Informazione
 http://www.iet.unipi.it/~luigi/        . Universita` di Pisa
 TEL      +39-050-2211611               . via Diotisalvi 2
 Mobile   +39-338-6809875               . 56122 PISA (Italy)
-----------------------------------------+-------------------------------



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BhQ2%2BixbTfVxYZYu2-62OHLXsitPrQH3i1h-VAvjzK_FMEhRw>