Re: Why should I use `config;make depend;make...` instead of `make kernel` when building from a stock source tree? (ref. Handbook sec. 9.3)

2003-02-02 Thread Scott Mitchell
On Sat, Feb 01, 2003 at 10:49:10PM -0800, Darren Pilgrim wrote:
 Lowell Gilbert wrote:
 Darren Pilgrim [EMAIL PROTECTED] writes:
 There are two sets of commands you can use to build a kernel in FreeBSD:
 
 Procedure 1 is the old way: config, make depend, make, make
 install. Procedure 2 is the make kernel sequence from makeworld.
 
 Section 9.3 of the Handbook says I should use procedure 1 if I haven't
 updated my source tree.  I can understand then need to use procedure 2
 if I've updated my source tree, but why shouldn't I use it with an
 unmodified tree?
 
 There's no reason you shouldn't.  That section of the handbook
 explicitly says that you can use either procedure in that case.
 
 Hey you're right.  In the bulleted list just before the two procedures are 
 listed it says, #If you are building a new kernel without updating the 
 source code...you can use either procedure.  After the two procedures are 
 listed, it says, If you have not upgraded your source tree in any 
 way...you should use the config, make depend, make, make install sequence. 
 That sounds contradictory to me.  What do you think?

I may not be 100% right on this, but I believe the main difference is that
'make buildkernel' will build the kernel using the toolchain left in
/usr/obj by a previous 'make buildworld', whereas the 'config' method uses
the toolchain currently installed on your machine.  That's why you should
use buildkernel after a cvsup, to make sure your kernel is built against
the same stuff your about to install with 'make installworld'.  If you're
just building a new kernel from the same sources, I guess either method
would work, although you'd need to have the /usr/obj from your last
buildworld still hanging around, so using config might be more convenient.

Maybe that part of the handbook could stand a little clarification?

Scott

-- 
===
Scott Mitchell  | PGP Key ID | Eagles may soar, but weasels
Cambridge, England  | 0x54B171B9 |  don't get sucked into jet engines
[EMAIL PROTECTED] | 0xAA775B8B |  -- Anon

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Why should I use `config;make depend;make...` instead of `make kernel` when building from a stock source tree? (ref. Handbook sec. 9.3)

2003-02-02 Thread Giorgos Keramidas
Scott, pardon my replying to your post to write to Darren.  I missed
Darren's initial post and I wanted to chime in adding my bits to your
excellent explanation.

On 2003-02-02 10:31, Scott Mitchell [EMAIL PROTECTED] wrote:
 On Sat, Feb 01, 2003 at 10:49:10PM -0800, Darren Pilgrim wrote:
  Hey you're right.  In the bulleted list just before the two
  procedures are listed it says, #If you are building a new kernel
  without updating the source code...you can use either procedure.
  After the two procedures are listed, it says, If you have not
  upgraded your source tree in any way...you should use the config,
  make depend, make, make install sequence. That sounds
  contradictory to me.  What do you think?

That's not exactly what the text says though.  The text of the second
paragraph where config(8) is referenced is:

If you are upgrading to a version of FreeBSD below 4.0 you should
use the old kernel build procedure. However, it is recommended
that you use the new version of config(8), using a command line
like this.

# /usr/obj/usr/src/usr.sbin/config/config KERNELNAME

This is true.  Older FreeBSD versions, before FreeBSD 4.0-RELEASE, did
not support the same make targets (buildworld, buildkernel) in the
same manner.  The writer of this part makes an attempt at supporting
those with older releases too.  If you have the sources of a newer
FreeBSD version, then this paragraph doesn't apply to you.

Does this clarification make it any clearer?  Do you still think that
the Handbook needs fixing?  If yes, then I'm open to suggestions :-)

 I may not be 100% right on this, but I believe the main difference
 is that 'make buildkernel' will build the kernel using the toolchain
 left in /usr/obj by a previous 'make buildworld', whereas the
 'config' method uses the toolchain currently installed on your
 machine.  That's why you should use buildkernel after a cvsup, to
 make sure your kernel is built against the same stuff your about to
 install with 'make installworld'.  If you're just building a new
 kernel from the same sources, I guess either method would work,
 although you'd need to have the /usr/obj from your last buildworld
 still hanging around, so using config might be more convenient.

I couldn't possibly put it in better words, even if I tried.

 Maybe that part of the handbook could stand a little clarification?

Reading it again now, I don't think it's wrong.  But perhaps my lack
of sleep today makes things a bit difficult for me.

- Giorgos


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Why should I use `config;make depend;make...` instead of `make kernel`when building from a stock source tree? (ref. Handbook sec. 9.3)

2003-02-02 Thread Mike Meyer
In [EMAIL PROTECTED], Darren Pilgrim [EMAIL PROTECTED] typed:
 There are two sets of commands you can use to build a kernel in FreeBSD:
 
 Procedure 1 is the old way: config, make depend, make, make install. 
 Procedure 2 is the make kernel sequence from makeworld.
 
 Section 9.3 of the Handbook says I should use procedure 1 if I haven't 
 updated my source tree.  I can understand then need to use procedure 2 
 if I've updated my source tree, but why shouldn't I use it with an 
 unmodified tree?

There's no reason not to use the kernel targets, as already
discussed. The kernel targets does one thing different than the old
way - it uses tools from /usr/obj if they are there, otherwise it uses
the /usr tools.

The reason for using the old one is that you may be able to skip some
of the steps. In particular, if you're tweaking the sources, you can
just do make and make install - no need to go through the
config/depend steps.

mike
-- 
Mike Meyer [EMAIL PROTECTED]  http://www.mired.org/consulting.html
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: Why should I use `config;make depend;make...` instead of `make kernel` when building from a stock source tree? (ref. Handbook sec. 9.3)

2003-02-02 Thread Scott Mitchell
[CC-ing Mike in since he added useful info to the thread on -questions]

On Sun, Feb 02, 2003 at 02:49:16PM +0200, Giorgos Keramidas wrote:
 Scott, pardon my replying to your post to write to Darren.  I missed
 Darren's initial post and I wanted to chime in adding my bits to your
 excellent explanation.
[...]
 Does this clarification make it any clearer?  Do you still think that
 the Handbook needs fixing?  If yes, then I'm open to suggestions :-)

I'd remove the paragraph (4th from bottom of 
http://www.uk.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-building.html)
that says:

If you have not upgraded your source tree in any way (you have not run
 CVSup, CTM, or used anoncvs), then you should use the config, make depend,
 make, make install sequence.

because it's somewhat confusing in the context of If you are building a
new kernel without updating the source code... you can use either
procedure. further up the page, and I'm not really sure what it means: if
I've just installed full source from a CD, but not 'upgraded' it, do I have
to use the config procuedure?  Obviously I don't, but that paragraph seems
to imply that I do.

Assuming Mike is right (and I tend to assume he is :-) about buildkernel
using the installed toolchain if it can't find one in /usr/obj, the rest of
the page makes perfect sense.

Scott

-- 
===
Scott Mitchell  | PGP Key ID | Eagles may soar, but weasels
Cambridge, England  | 0x54B171B9 |  don't get sucked into jet engines
[EMAIL PROTECTED] | 0xAA775B8B |  -- Anon

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Why should I use `config;make depend;make...` instead of `make kernel`when building from a stock source tree? (ref. Handbook sec. 9.3)

2003-02-01 Thread Darren Pilgrim
There are two sets of commands you can use to build a kernel in FreeBSD:

Procedure 1 is the old way: config, make depend, make, make install. 
Procedure 2 is the make kernel sequence from makeworld.

Section 9.3 of the Handbook says I should use procedure 1 if I haven't 
updated my source tree.  I can understand then need to use procedure 2 
if I've updated my source tree, but why shouldn't I use it with an 
unmodified tree?


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message


Re: Why should I use `config;make depend;make...` instead of `make kernel` when building from a stock source tree? (ref. Handbook sec. 9.3)

2003-02-01 Thread Lowell Gilbert
Darren Pilgrim [EMAIL PROTECTED] writes:

 There are two sets of commands you can use to build a kernel in FreeBSD:
 
 Procedure 1 is the old way: config, make depend, make, make
 install. Procedure 2 is the make kernel sequence from makeworld.
 
 Section 9.3 of the Handbook says I should use procedure 1 if I haven't
 updated my source tree.  I can understand then need to use procedure 2
 if I've updated my source tree, but why shouldn't I use it with an
 unmodified tree?

There's no reason you shouldn't.  That section of the handbook
explicitly says that you can use either procedure in that case.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message