making custom kernels easier to build

ottos ottohaliburton at tx.rr.com
Tue Aug 12 17:58:35 UTC 2014



-----Original Message-----
From: devel-bounces at lists.fedoraproject.org [mailto:devel-bounces at lists.fedoraproject.org] On Behalf Of Josh Boyer
Sent: Tuesday, August 12, 2014 12:43 PM
To: Development discussions related to Fedora
Subject: Re: making custom kernels easier to build

On Tue, Aug 12, 2014 at 1:34 PM, ottos <ottohaliburton at tx.rr.com> wrote:
>
>
>
>
> From: devel-bounces at lists.fedoraproject.org
> [mailto:devel-bounces at lists.fedoraproject.org] On Behalf Of Przemek 
> Klosowski
> Sent: Tuesday, August 12, 2014 12:02 PM
> To: devel at lists.fedoraproject.org
>
>
> Subject: Re: making custom kernels easier to build
>
>
>
> On Tue, Aug 12, 2014 at 4:29 AM, ottos <ottohaliburton at tx.rr.com> wrote:
>
> Since this topic is here.  There is an error in Makefile when you do a 
> make modules_install.  It attempts to delete a directory with a delete 
> file command.  This occurs in two places.  If you are fixing fix this problem.
>
> Typically, something like that might happen if you are compiling in a 
> pre-existing environment, where either an old compilation or someone 
> manually created a directory with the same name as a file from the 
> current compilation. Such error tends not to self-correct.  The kernel 
> build system builds from scratch so it doesn't see the problem---I bet 
> if you rm -rf the entire build tree before rebuilding it'll work for you as well.
>
> NB, when you report errors, please provide more context: what exactly 
> are you comparing (version/release numbers, where you got them from) 
> and what errors are you seeing (the exact copy of the error message); 
> otherwise all others can offer is guesses.
>
>
>
> The following code is the defective code from Makefile.  The lines 
> with the
> ** besides them is the lines in particular that are defective.
>
>
>
> modules_install: _modinst_ _modinst_post
>
>
>
> PHONY += _modinst_
>
> _modinst_:
>
>         @rm -rf $(MODLIB)/kernel
>
>   **      @rm -f $(MODLIB)/source
>
>         @mkdir -p $(MODLIB)/kernel
>
>         @ln -s $(srctree) $(MODLIB)/source
>
>         @if [ ! $(objtree) -ef  $(MODLIB)/build ]; then \
>
> **               rm -f $(MODLIB)/build ; \
>
>                 ln -s $(objtree) $(MODLIB)/build ; \
>
>         fi
>
>
>
> if you execute a "make modules_install"   notice that you are trying delete
> a directive with a file delete.  I edit this file each time I build a 
> custom kernel and put a "r" in front of the "f" making it -rf.  Is this enough.

$(MODLIB)/source and $(MODLIB)/build are symlinks.  It's removing the link, not the directory.  If they aren't links on your machine then something went wrong somewhere for you, but this is not a problem Fedora or upstream has.

Josh

I would accept this explanation except notice the line  @rm -rf $(MODLIB)/kernel which by your def is a symlink but has the -rf for removing a directory and on my machine all of the above are directories so it is intending to delete files in those directories and it works when I correct it.
--
devel mailing list
devel at lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct



More information about the devel mailing list