From: me@tobin.cc (Tobin C. Harding)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Build using O=path
Date: Tue, 11 Sep 2018 08:46:11 +1000 [thread overview]
Message-ID: <20180910224611.GE4939@eros> (raw)
In-Reply-To: <ce41a97e-0404-83c9-19f9-ce2db2aab70b@lucaceresoli.net>
Thanks Luca, you had the winning entry!
On Mon, Sep 10, 2018 at 11:37:15AM +0200, Luca Ceresoli wrote:
> Hi,
>
> On 10/09/2018 08:33, Tobin C. Harding wrote:
> > Hi,
> >
> > I'm unable to build the kernel using the O=path/to/out option. Am I
> > doing something brain dead?
> >
> > $ cd $KERNEL
> > $ make mrproper
> > $ cp path/to/valid/config/file .config
>
> Here you are copying a file in the source directory...
>
> > $ make O=/abs/path/to/output
> > ...
> > scripts/kconfig/conf --syncconfig Kconfig
> > ***
> > *** Configuration file ".config" not found!
> > ***
> > *** Please run some configurator (e.g. "make oldconfig" or
> > *** "make menuconfig" or "make xconfig").
> > ...
> >
> > So I tried copying the .config file to the output directory
> >
> > $ cp .config /abs/path/to/output
> > $ make O=/abs/path/to/output
> > ...
> > Using /home/tobin/build/kernel/linux as source for kernel
> > /home/tobin/build/kernel/linux is not clean, please run 'make mrproper'
> > in the '/home/tobin/build/kernel/linux' directory.
>
> ...and here's where the kernel complains about it.
Well explained, I did not garner this from the error messages. Thanks.
> You have to put your .config file in the out-of-tree build dir, not the
> source dir. BTW this also allows you to have multiple builds woth
> different configs in different directories, all from the same set of
> sources -- how would it be possible if the config were in the source dir?
>
> So, fix it as:
>
> cd $KERNEL
> make mrproper
> make O=/abs/path/to/output # BTW: can be also relative
The key takeaway (for me) is that this invocation of make is expected to
fail (since we have not created the output directory or config file yet).
> cd /abs/path/to/output
> cp path/to/valid/config/file .config
> make olddefconfig # might be not needed, but harmless anyway
> make
I would not have realised that one can run make from the output
directory.
thanks,
Tobin.
prev parent reply other threads:[~2018-09-10 22:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-10 6:33 Build using O=path Tobin C. Harding
2018-09-10 6:37 ` Dhiraj Kumar
2018-09-10 6:46 ` Joey Pabalinas
2018-09-10 6:52 ` Joey Pabalinas
2018-09-10 9:37 ` Luca Ceresoli
2018-09-10 22:46 ` Tobin C. Harding [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180910224611.GE4939@eros \
--to=me@tobin.cc \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).