ltning at anduin.net
Sat Nov 19 10:43:48 GMT 2005
I've spent about a week trying to accomplish a rather simple task: To
build kernel and world once for each architecture we have, and
distribute this precompiled src and obj tree via NFS to all the
systems that need updating. I have combined this with a locally
maintained CVS tree, in order to assure coherent releases being
installed on all our systems.
However, I am seeing some peculiar issues that I simply don't manage
to get around.
I've got one server running 6.0-STABLE-i386. On this host I've
created a jail for building. We have both i386 and amd64 platforms in-
house, so I've created a script that build for both:
make TARGET_ARCH=i386 MAKEOBJDIRPREFIX=/usr/obj.i386 buildworld
make TARGET_ARCH=amd64 MAKEOBJDIRPREFIX=/usr/obj.amd64 buildworld
And the same for buildkernel.
Starting out trying to upgrade the amd64 hosts, I export the two obj
directories via NFS, and mount them as /usr/obj on the amd64 hosts
that need upgrading. This was, at least, my initial approach. I then
found out that the /usr/src tree in the build jail is somehow tainted
by the build (and by the options I specified), so I need to export
that as well (which, I am afraid, means I have to maintain two
different build jails). Therefore I also export /usr/src and mount it
on the target hosts.
I then realized that I need to use the same objdir on the target
hosts as in the build jail, so I try mounting to /usr/obj.<arch> on
the target hosts. This allows me to get somewhat further.
Installworld now progresses for a while, until it bombs out with the
===> sys/boot/i386/boot2 (install)
dd if=/dev/zero of=boot2.ldr bs=276 count=1
dd: not found
*** Error code 127
When looking for dd, I find it in the host PATH, and also in the obj
[root at build] /usr/obj.amd64# find . -name dd -type f
At this point, I get rid of the MAKEOBJDIRPREFIX option and rebuild
everything with just TARGET_ARCH, only exporting /usr/obj from the
build jail. I notice that when using TARGET_ARCH with something else
than the architecture the build is running on (i.e. amd64 on an i386
host), the resulting build is NOT to be found in /usr/obj, but in /
usr/obj/amd64. Thus I need to specify MAKEOBJDIRPREFIX=/usr/obj/amd64
on the target host for installworld to get anything done at all.
I'm still getting the dd: not found error, and I do believe I've
tried every combination and variation I can think of. Clocks are in
sync between all the systems, so that is not the problem. Is the
build system partially broken in 6.0? Have I missed something? Do I
actually need an amd64 host to be able to build for amd64 systems, or
are there other ways to accomplish what I'm trying to do? Should I
prehaps try doing centralized binary upgrades instead?
Any help would be appreciated.
With best regards,
More information about the freebsd-stable