make buildkernel fails without complete source tree

John Baldwin jhb at freebsd.org
Thu Jan 18 19:52:57 UTC 2007


On Thursday 18 January 2007 12:50, Murray Stokely wrote:
> On 1/18/07, Remko Lodder <remko at elvandar.org> wrote:
> >         This is not true. I downloaded the packages which are being used 
by sysinstall
> >         and extracted them. I found the Makefile, it was properly filled 
with instructions.
> 
> It looks to me like src/release/makefile builds the tar file ssys.tar
> by just tarring /usr/src/sys and therefore would in fact be missing
> /usr/src/Makefile and /usr/src/Makefile.inc1 necessary for "make
> buildkernel".
> 
> Taking a look at the tar file:
> 
> cat ssys.a?? > ssys.tar && tar tvf ssys.tar
> 
> I see that only files in /usr/src/sys are included.
> 
> We could add a tar -r -f .. /usr/src/Makefile /usr/src/Makefile.inc1
> to release.7 in /usr/src/release/Makefile to automatically add these
> two files as a special case to the ssys distribution.  CCing re@ for
> any comments on that proposal.

Those are already in sbase.  I think the menu options that say "just install 
kernel sources" should enable sbase as well as ssys, and if someone then goes 
and turns it off they get what they asked for.  And in fact, sysinstall 
already does this:

int
distSetKernDeveloper(dialogMenuItem *self)
{
    int i;

    distReset(NULL);
    Dists = _DIST_DEVELOPER;
    SrcDists = DIST_SRC_SYS | DIST_SRC_BASE;
    KernelDists = selectKernel();
    i = distMaybeSetPorts(self);
    distVerifyFlags();
    return i;
}

So in this case you are dealing with someone who explicitly only asked 
for 'ssys'.  I think we delivered the foot to the bullet quite well. :)
Maybe add a comment though to the menu like:

Index: menus.c
===================================================================
RCS file: /usr/cvs/src/usr.sbin/sysinstall/menus.c,v
retrieving revision 1.421
diff -u -r1.421 menus.c
--- menus.c     10 Dec 2006 16:33:38 -0000      1.421
+++ menus.c     18 Jan 2007 19:25:46 -0000
@@ -1096,7 +1096,7 @@
        dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', 
DIST_SRC_SSECURE },
       { " share",      "/usr/src/share (documents and shared files)",
        dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', 
DIST_SRC_SHARE },
-      { " sys",                "/usr/src/sys (FreeBSD kernel)",
+      { " sys",                "/usr/src/sys (FreeBSD kernel; requires 'base' 
to build)",
        dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', 
DIST_SRC_SYS },
       { " tools",      "/usr/src/tools (miscellaneous tools)",
        dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', 
DIST_SRC_TOOLS },

I've tested it and the menu still fits in 80x25 with this.  I wouldn't do 
anything more than this though.

-- 
John Baldwin



More information about the freebsd-doc mailing list