Keith,
        thanks for your previous reply.
( Re: kbuild2.5 does not actually install vmlinux for debugging as claimed )

Here are some more questions/observations on using kbuild : I hope
this kind of feedback is useful. 

1) what version of make ? Makefile-2.5 suggests I need at least 3.79.1
but kbuild-2.5.txt says 3.7[78] will work ( section CONTROLLING KBUILD ).

2) $USER_VERSION versus $USERVERSION ?
Documentation/kbuild/kbuild-2.5.txt refers to USER_VERSION, but
Makefile-2.5 uses USERVERSION. Also, kbuild-2.5.txt refers to
file .tmp_A_version which does not seem to exist. Assuming
.tmp_A_version is not required, this is my take on USERVERSION

--- 2.5-kbuild-src/Documentation/kbuild/kbuild-2.5.txt  Wed Jun 19 12:17:11 2002
+++ 2.5-kbuild-src/Documentation/kbuild/kbuild-2.5.txt.jak      Sun Jun 23 11:39:43 
+2002
@@ -1994,6 +1994,22 @@
     forces a complete rebuild.  'arch_opt' is a set of architecture specific
     config variables, such as a list of machine types.

+  USERVERSION
+    In current kernels the kernel version information is part of the top
+    level Makefile. I want to move them to a separate file so the top level
+    Makefile it is only changed for kbuild, not for every kernel.  The plan
+    is to ship a file A_version containing just the VERSION, PATCHLEVEL,
+    SUBLEVEL and EXTRAVERSION variables with the kernel sources.
+    In the meantime, we generate our own $KBUILD_OBJTREE/A_version containing
+    these variables based on the old Makefile.
+
+    Variable USERVERSION is _not_ part of A_version, this variable is
+    reserved for the end user and must never be set in any distributed kernel.
+    The user can then customize the kernel version by setting USERVERSION as
+    part of the make command line e.g.
+       make -f $KBUILD_SRCTREE_000/Makefile-2.5 -j2 USERVERSION=whatever
+    The USERVERSION text gets appended to the existing kernel version info.
+

 TEMPORARY FILES FOR KBUILD

@@ -2013,17 +2029,6 @@
     modules, converting vmlinix to a bootable format, installing the bootable
     kernel, installing the modules and running the post install script, if
     any.
-
-  .tmp_A_version
-    In current kernels the kernel version information is part of the top
-    level Makefile.  I want to move them to a separate file so the top level
-    Makefile it is only changed for kbuild, not for every kernel.  The plan
-    is to create file A_version containing just the VERSION, PATCHLEVEL,
-    SUBLEVEL and EXTRAVERSION variables.  In the meantime, create
-    .tmp_A_version from the old Makefile and compare against the generated
-    A_version file.  Variable USER_VERSION is _not_ part of A_version, this
-    variable is reserved for the end user and must never be set in any
-    distributed kernel.

   .tmp_db_main
     The main kbuild database.  This uses Larry McVoy's memory mapped database
### end

3) what are the legal options for using shadow tree(s) e.g.
        what is the proper procedure for switching between using shadow tree(s),
then reverting to Linus sources. It looks like I need to do make mrproper and full 
recompile,
even though I am only ever likely to be changing/adding/dropping compilation of a small
number of objects. I would have expected the "only rebuild what's necessary" 
philosophy to apply here.

I think shadow tree support is a feature that will impress lots of people most, and 
deserves
more detailed description/instructions.

4) make *config insists I must do make dep
(  I am trying kbuild-*-2.4.19-pre10
while 2.5.x plays hard to compile ).

--- 2.4-src/scripts/Configure   Mon Jun 17 16:36:27 2002
+++ 2.4-src/scripts/Configure.jak       Tue Jun 18 22:42:18 2002
@@ -696,7 +696,7 @@
 echo "*** End of Linux kernel configuration."
 echo "*** Check the top-level Makefile for additional configuration."
 if [ ! -f .hdepend -o "$CONFIG_MODVERSIONS" = "y" ] ; then
-    echo "*** Next, you must run 'make dep'."
+    echo "*** Next, you must run 'make dep' ( unless you are using kbuild-2.5 )."
 else
     echo "*** Next, you may run 'make bzImage', 'make bzdisk', or 'make install'."
 fi
--- 2.4-src/scripts/Menuconfig  Mon Jun 10 14:17:11 2002
+++ 2.4-src/scripts/Menuconfig.jak      Tue Jun 18 22:43:23 2002
@@ -1454,7 +1454,7 @@
        echo "*** End of Linux kernel configuration."
        echo "*** Check the top-level Makefile for additional configuration."
        if [ ! -f .hdepend -o "$CONFIG_MODVERSIONS" = "y" ] ; then
-           echo "*** Next, you must run 'make dep'."
+           echo "*** Next, you must run 'make dep' ( unless you are using kbuild-2.5 
+)."
        else
            echo "*** Next, you may run 'make bzImage', 'make bzdisk', or 'make 
install'."
        fi
--- 2.4-src/scripts/header.tk   Mon Jul  2 21:56:40 2001
+++ 2.4-src/scripts/header.tk.jak       Tue Jun 18 22:44:31 2002
@@ -551,7 +551,7 @@
        global CONFIG_MODVERSIONS; vfix CONFIG_MODVERSIONS
        if { ([file exists .hdepend] != 1) || ($CONFIG_MODVERSIONS == 1) } then {
            message $w.m -width 400 -aspect 300 -relief raised -text \
-               "End of Linux kernel configuration.  Check the top-level Makefile for 
additional configuration.  Next, you must run 'make dep'."
+               "End of Linux kernel configuration.  Check the top-level Makefile for 
+additional configuration.  Next, you must run 'make dep' ( unless you are using 
+kbuild-2.5 )."
        } else {
            message $w.m -width 400 -aspect 300 -relief raised -text \
                "End of Linux kernel configuration.  Check the top-level Makefile for 
additional configuration.  Next, you may 'make bzImage', 'make bzdisk', or 'make 
bzlilo.'"
### end patch

5) I can't figure out how to make the kernel docs now. I can see a Makefile.in in 
Documentation/DocBook,
so there must be a way !
There should probably be some scripts or instructions for each of the old Makefile 
targets now evicted
from Makefile-2.5.

6) Finally, in the "file this under curiosities department", I have seen the following 
error output a couple of times :
make -f $KBUILD_SRCTREE_000/Makefile-2.5 -j2 HOSTCC=gcc-3.1 CC=gcc-3.1 
Using ARCH='i386' AS='as' LD='ld' CC='gcc-3.1' CPP='gcc-3.1 -E' AR='ar' HOSTAS='as' 
HOSTLD='gcc' HOSTCC='gcc-3.1' HOSTAR='ar'
Generating global Makefile
  phase 1 (find all inputs)
/home/compo/2.4-src/scripts/pp_makefile4.c: In function `read_tmp_select':
/home/compo/2.4-src/scripts/pp_makefile4.c:686: warning: `eof' might be used 
uninitialized in this function
/home/compo/2.4-src/scripts/pp_makefile4.c: In function `read_makefile':
/home/compo/2.4-src/scripts/pp_makefile4.c:781: warning: `eof' might be used 
uninitialized in this function
/home/compo/2.4-src/scripts/pp_makefile4.c: In function `copy_makefile':
/home/compo/2.4-src/scripts/pp_makefile4.c:2711: warning: `eof' might be used 
uninitialized in this function
  phase 2 (convert all Makefile.in files)
  phase 3 (evaluate selections)
  phase 4 (integrity checks, write global makefile)
Starting phase 5 (build) for installable

This happens sometimes if I do make mrproper; cp saved.config $KBUILD_OBJTREE/.config 
; make oldconfig installable
It doesn't seem to cause any problems, and the .config file is OK thereafter. The 
saved.config file may be from a previous
kernel version, so maybe it has some invalid config ? Probably a "don't do that !", 
but saving a .config file and copying
it to $KBUILD_OBJTREE is referred to in kbuild-2.5.txt.

Hey, new question, in the command line in above example, I specified CC and HOSTCC. 
CPP becomes $(CC) -E,
whereas HOSTLD stays as gcc. So I need to specify 3 command line variables CC, HOSTCC 
& HOSTLD to avoid
using whatever compiler gcc happens to point at. Is HOSTLD = gcc when HOSTCC != gcc 
correct ?

                        Thanks again,
                                        Jak.


-------------------------------------------------------
Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/
_______________________________________________
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel

Reply via email to