Date: Wed, 31 Dec 2014 02:19:09 +0100 From: Roland Smith <rsmith@xs4all.nl> To: Dima Veselov <kab00m@lich.phys.spbu.ru> Cc: freebsd-questions@freebsd.org Subject: Re: Distributing upgrades to remote host Message-ID: <20141231011909.GA5324@slackbox.erewhon.home> In-Reply-To: <20141231000729.GA4390@laura.ws.pu.ru> References: <20141231000729.GA4390@laura.ws.pu.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
--G4iJoqBmSsgzjUCe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 bett= er 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=3Dsparc64 TARGET_ARCH=3Dsparc64 MAKEOBJDIRPREFIX= =3D/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 e= ven 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=3D/usr/obj-sparc64/ make buildworld TARGET=3Dsparc64 > 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=3D/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 mach= ine and rsync the source and obj direcories to others. That works fine. Roland --=20 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) --G4iJoqBmSsgzjUCe Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABAgAGBQJUo08NAAoJEED21dyjijPgQD0QAJCeonXnrMDYJeOV2qMzhiaa jqLs+hc6swUJKRPZyRmzhwVGLgJKHkpak7mtPchZNOtaLZY08GKS6cVzQoJcnui4 6u6zWhruoK4U02cpXzh91DanTfUadx2OrtFKYU7XAFtFTepNCl47fj5bS6D4B1+j TK8Gv+t6ViHeh29DQ8H3yh8X1yCvarN2eiR6PvMS91qT+xFzaiGLfDS9VME2SaFU M8OeEkBx3RSrEQgTeIyEpe4ENjpJXEAaniuurXm4cOzf4zSF0yXDDrNTzMczjyAM YSwlWiQBK/2YnYjLQIK9l6/hrdIs7BUC4agwyszOxuYMsTU2VgwidvKteAhZ+sN/ lH+LUnjmaI9Rp6vebb+DizXY5PLTIddOnnwL/ByPHkVr774AKZXs2AV9YoWJKfXE Kt8ipRljokwxLtZWc98BLwYFCArtBb3SQ1bX7lx3385ns/kAZaPys5OCr3D2Es83 G9GaLR+ZaMoqtdwwG2/eHuEmQ5LdNawb4uRotHYUMhhap2IMLpHslbAaPUkiwleC 0X9oQehkIxDCMvxvpE14xJg9M9cOQmET4nXFKryN6zek2dexa+Dox2iBLCC+4fbN qNem2FMYOhcbVrQG6MF8Owdh5kXGPsRy7zhJSx6wxZcplOW4fMqj2boZoSEPnatb UNZxszkvXMVIqMbflLCL =qxPB -----END PGP SIGNATURE----- --G4iJoqBmSsgzjUCe--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20141231011909.GA5324>