NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Some questions about build.sh, machine, -u and tools



According to the paper

 <http://www.mewburn.net/luke/papers/build.sh.pdf>

let's use the terms `build host', `host' and `target'.

On mag 03  8:30, Greg Troxel wrote:

> I keep forgetting this and having to page it in, but a big concept is
> that you can share userland among systems built for the same CPU type
> but that are different kinds of computers.  Basically MACHINE describes
> the computer and MACHINE_ARCH the CPU.  It may be helpful to read
> build.sh.

I thought it was the opposite: a userland shared by several MACHINEs of
the same type but different CPUs...

MACHINE is defined in the paper as a platform (par. 5.1).  Intuitively,
yes, MACHINE seems related to a whole computer (so, a collection
of hardware devices with its standards and conventions) and
MACHINE_ARCH is somewhat more specific, being related to a specific
CPU, but MACHINE is still a somewhat blurry element to me.

I scrolled the whole build.sh searching for the string MACHINE, but
(at least at a first glance) I didn't find something new.

> The tooldir is a prefix that has bin/lib and so on, which has programs
> that run on the build host, and are cross for targets.
> 
> There is also an obj dir for building the cross tools, usually the tools
> subdir within the objdir.

This is the exact fact which confuses me. I tried to understand this as
follows (but I'm not sure it's right and the par. 5.5 in the paper did
not shed a light).

There are two different kinds of tools:

1.
The ones in obj_dir/tools, which are the result of the building of
/usr/src/tools.
These are the tools used by the `build host' to build the second type of
tools, the toolchain.

2.
The ones in obj_dir/tooldir.NetBSD-9.99.81-amd64, which are the actual
toolchain.
They are used by the `host' to build the sourcecode (kernel and/or
userland) for the `target' system.

> -u basically means "just run make, and don't clean first",
> operationally.  This only works if the makefile rules are correct and
> nothing has changed outside the scope of what make copes with.
> 
> If you have changed a few lines of code, -u almost always works.
> 
> If you did cvs update along netbsd-9, it is highly likely that -u will
> work.
> 
> If you updated along current, it often works.   The shorter the time
> period, the more likely.

Ok! This is straght and simple.

Thank you!

Rocky


Home | Main Index | Thread Index | Old Index