[FAQ] Prerequisites for a successful buildworld/buildkernel
Ruslan Ermilov
ru at FreeBSD.org
Wed Mar 24 07:00:36 PST 2004
On Wed, Mar 24, 2004 at 01:31:01AM -0800, Kris Kennaway wrote:
> On Wed, Mar 24, 2004 at 10:20:45AM +0200, Ruslan Ermilov wrote:
>
> > > > Yes, src/sys/ is self-sufficient, except for some tools used during
> > > > buildkernel, aicasm is one of them.
> > >
> > > ...which was the content of my question. So, upgrades (buildworld
> > > then buildkernel) apparently don't work if you don't have /usr/include
> > > installed to begin with.
> > >
> > Of course not. For a successful buildworld (and buildkernel),
> > it is required to have a complete and non-broken build system,
> > as we still build lot of tools using the host toolchain.
>
> > - build-tools. These are special small helper applications
> > that are built and used only during buildworld/buildkernel.
> > For example, "mkinit" for bin/sh and "aicasm" for the
> > Adaptec SCSI drivers.
>
> By the time we get to building the kernel, we have already built world
> successfully, and a complete up-to-date toolchain is available (but
> not yet installed in the default location on the host). The failure
> case I reported to you occurs at this point; missing db.h will allow
> the world to build, but kernel builds to fail.
>
> In other words there's no need for kernel build tools to fail, because
> everything they require is available from the output of 'make
> buildworld'. Whether or not it is difficult to use these in the
> current FreeBSD build implementation is another matter, but your
> general "of course not" is missing my specific point.
>
No, we cannot use "up-to-date" (target) toolchain to build "aicasm",
because using this toolchain will produce binaries that may be
incompatible with the running kernel -- it will link them with fresh
libraries (which the currently running kernel don't necessarily will
survive) and headers. Furthemore, it may be for a different hardware
architecture, and we need to _run_ "aicasm" to build the kernel,
hence it should be built using host toolchain (including libraries
and headers). Re-read carefully what I've said before.
Cheers,
--
Ruslan Ermilov
FreeBSD committer
ru at FreeBSD.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040324/628e0404/attachment.bin
More information about the freebsd-current
mailing list