linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Porcel <nicolasporcel06@gmail.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>
Subject: Re: [PATCH 2/2] kconfig: support out of tree KCONFIG_CONFIG
Date: Fri, 22 Sep 2017 01:41:54 +0200	[thread overview]
Message-ID: <20170921234154.GA21682@nicolas-laptop> (raw)
In-Reply-To: <CAK7LNASmS0tNXvo=p_j_yKgNnmgGP7PpejB-aJWpUL05MrKRgg@mail.gmail.com>

On Wed, Sep 20, 2017 at 06:56:17PM +0900, Masahiro Yamada wrote:
> Some targets can choose the save path of the .config file.
> 
> For example, run "make gconfig"
> then choose "File  ->  Save as"
> from the menu.
>
> But, silentoldconfig does not have a way to save .config
> out out the build tree.

Yes, I noticed this feature when writing the patch and I tried not to
break it. However, running make without target will call silentconfig
before building and it is not possible to use a file outside the build
folder.

The reason I did this patch is because I am keeping my kernel
configuration files in an external git repository and I am using
KCONFIG_CONFIG to select the reference this config. It was working well
before 4.13. But maybe my workflow is wrong.

> 
> conf_write() may be called with a directory path,
> in this case, the KCONFIG_OVERWRITECONFIG is appended
> as the base name.
> 
> If we support an absolute path in KCONFIG_OVERWRITECONFIG,
> I think it is strange.
> 

According to the documentation, KCONFIG_OVERWRITECONFIG is a boolean
that should be set if the .config file is a symlink. In the code, it
conf_write will directly write the config file unstead of creating a
temporary file and renaming it to .config.

So it allows me to use any file on the machine by symlinking it to the
.config file of the build folder so that I can keep my current workflow.
Unfortunately, I didn't know about it before writing the patch.

The strange part is that KCONFIG_CONFIG supports absolute path in most
of the build process. It only breaks when referencing a file on a
different file-system than the build folder, and only because of the
silentconfig call.

Best regards,

-- 
Nicolas Porcel

  reply	other threads:[~2017-09-21 23:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-18 22:20 [PATCH 0/2] Improve KCONFIG_CONFIG use in kconfig Nicolas Porcel
2017-08-18 22:20 ` [PATCH 1/2] kconfig: Use KCONFIG_CONFIG in buildtar Nicolas Porcel
2017-09-02  4:58   ` Masahiro Yamada
2017-08-18 22:20 ` [PATCH 2/2] kconfig: support out of tree KCONFIG_CONFIG Nicolas Porcel
2017-09-02  7:31   ` Masahiro Yamada
2017-09-02 22:21     ` Nicolas Porcel
2017-09-20  9:56       ` Masahiro Yamada
2017-09-21 23:41         ` Nicolas Porcel [this message]
2017-09-02  4:55 ` [PATCH 0/2] Improve KCONFIG_CONFIG use in kconfig Masahiro Yamada

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=20170921234154.GA21682@nicolas-laptop \
    --to=nicolasporcel06@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=yamada.masahiro@socionext.com \
    /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).