Distributing upgrades to remote host
Roland Smith
rsmith at xs4all.nl
Wed Dec 31 01:19:19 UTC 2014
On Wed, Dec 31, 2014 at 03:07:29AM +0300, Dima Veselov wrote:
> Hello!
>
> I spent few hours on the internet and still stuck in simple
> problem. I have amd64 host on FreeBSD 10-STABLE and wish it
> will be able to build worlds for sparc64 hosts.
> Targets are weak and busy, so I don't want them to do
> much job or have much storage.
Which version are you upgrading them from? If it's 8.x you're probably better
off doing a fresh install.
Anyway, have you looked at this wiki page:
https://wiki.freebsd.org/A_Brief_Guide_To_Cross_Compiling_FreeBSD
> What is the right way to make proper upgrade for remote hosts?
> I say proper, because I wish target host behave like build host
> (mergemaster, make installworld and so on).
The proper build procedure should be something like;
make buildworld TARGET=sparc64 TARGET_ARCH=sparc64 MAKEOBJDIRPREFIX=/path/to/build
On AMD64 the default compiler on 10-STABLE is clang. And /usr/src/share/mk/bsd.own.mk
implies that it's gcc on sparc64. So I don't know if a cross-compile will even
work.
Note that you should clean /etc/src.conf and /etc/make.conf of anything
that is specific to AMD64 (like explicitly setting the CPUTYPE)!
Alternatively, you could set up a sparc64 virtual machine with QEMU and do the
build there. It would not be very fast, though. But it would be a native
build, without cross-compile headaches.
> What I did and this don't work (not sure I understand everything):
>
> 1. I have built different objdir
> MAKEOBJDIRPREFIX=/usr/obj-sparc64/ make buildworld TARGET=sparc64
> On target I got it syncronized (what is quite weird to do on long
> distance) to the nearest NFS server.
>
> 2. Target won't take NFS path like /net/nfsserver/export/freebsd-src
> because of different path treat
>
> 3. If I mount NFS in /usr/obj (what is strange) - target won't take
> 'make' command due to amd64 tools in obj
>
> 4. I issued make distributeworld DISTDIR=/export/freebsd-sparc64,
> but don't understand clear way to populate system properly with it.
What I would do after succesfully running `make buildworld` and `make
buildkernel` is to copy the contents of build's source and obj directories to the
target machine's /usr/src and /usr/obj, and then run `make installkernel` (and
after a reboot) `make installworld` there.
That is the procedure that I use for my AMD64 machines. I build on one machine
and rsync the source and obj direcories to others. That works fine.
Roland
--
R.F.Smith http://rsmith.home.xs4all.nl/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 5753 3324 1661 B0FE 8D93 FCED 40F6 D5DC A38A 33E0 (keyID: A38A33E0)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20141231/6b4b244e/attachment.sig>
More information about the freebsd-questions
mailing list