ksummit.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "ksummit-discuss@lists.linuxfoundation.org"
	<ksummit-discuss@lists.linuxfoundation.org>,
	Michal Hocko <mhocko@kernel.org>
Subject: Re: [Ksummit-discuss] [PATCH 2/2] kconfig: new command line kernel configuration tool
Date: Sun, 9 Jul 2017 05:56:47 +0200	[thread overview]
Message-ID: <CACRpkdZB9g3rCgRDnZFDT2g9qQTtUZhKG2Pxp8qKrGP3u1p5+Q@mail.gmail.com> (raw)
In-Reply-To: <20170707090206.uiry6j7yizpl7yw4@mwanda>

On Fri, Jul 7, 2017 at 11:02 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:

> Krzysztof Kozlowski wrote:
>> However why not extending existing scripts/config? It
>> already has the feature for setting kconfig options (without looking
>> at dependencies - so like >> of yours).
>
> I didn't know about scripts/config when I wrote it.  scripts/config is
> essentially a UI around "echo CONFIG_FOO=m >> .config".  It's totally
> useless.

Maybe useless for you but i use it every day in my work. To compile a kernel
for a purpose I have a custom makefile.mak in my top kernel dir
that calls scripts/config to set stuff up on-the-fly with multiple rules like
this:

config-base: FORCE
        @mkdir -p $(build_dir)
        @cp $(rootfs) $(build_dir)/$(rootfsbase)
        $(MAKE) $(make_options) u8500_defconfig

config-initramfs: have-rootfs config-base
        # Configure in the initramfs
        $(CURDIR)/scripts/config --file $(config_file) \
        --enable BLK_DEV_INITRD \
        --set-str INITRAMFS_SOURCE $(rootfsbase) \
        --enable RD_GZIP \
        --enable INITRAMFS_COMPRESSION_GZIP

(....)

config: config-common config-distro config-initramfs
        $(CURDIR)/scripts/config --file $(config_file) \
        --enable USE_OF \
        --enable ARM_APPENDED_DTB \
        --enable ARM_ATAG_DTB_COMPAT \
        --enable PROC_DEVICETREE
        yes "" | make $(make_options) oldconfig

For the full Makefile see:

https://dflund.se/~triad/krad/makefiles/ux500.mak

There are several of these, like some that create a minimal
i586 system with busybox on an initramfs:
https://dflund.se/~triad/krad/makefiles/i586.mak

I don't know if I am stupid in using this rather than config
fragments, but it works for me.

That said, what you have brewing looks better :)

Yours,
Linus Walleij

  reply	other threads:[~2017-07-09  3:56 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-27 13:58 [Ksummit-discuss] [TECH TOPIC] is Kconfig a bit hard sometimes? Sergey Senozhatsky
2017-06-27 17:18 ` Linus Torvalds
2017-06-27 18:44   ` Luis R. Rodriguez
2017-06-27 19:27     ` Linus Torvalds
2017-06-27 20:53       ` Kees Cook
2017-06-27 21:16       ` Olof Johansson
2017-06-27 21:36         ` Linus Torvalds
2017-06-27 23:10           ` Serge E. Hallyn
2017-06-28  0:09             ` Luis R. Rodriguez
2017-06-28  0:14               ` Linus Torvalds
2017-06-28  0:26                 ` Luis R. Rodriguez
2017-06-28  3:54                   ` Stephen Hemminger
     [not found]                 ` <CAFhKne-o0S8fMo_XD_aUk2Rf7VbDhgO+PT_bjnM-9WpKfnWBvw@mail.gmail.com>
     [not found]                   ` <CAFhKne8FE=17wNdp=Svf2Z2tADok6htfYqTABEiZUrCOyeMaYg@mail.gmail.com>
2017-06-28 13:35                     ` Matthew Wilcox
2017-06-28 17:56                 ` Geert Uytterhoeven
2017-06-29 10:02                   ` Mauro Carvalho Chehab
2017-06-28  0:11             ` Linus Torvalds
2017-06-29 10:23           ` Mauro Carvalho Chehab
2017-06-28 12:58     ` Dan Carpenter
2017-06-30 17:11   ` Steven Rostedt
2017-06-30 17:52   ` Darren Hart
2017-06-30 17:58     ` Darren Hart
2017-07-01 17:24     ` Hannes Reinecke
2017-06-27 20:41 ` Kees Cook
2017-07-06 14:40 ` Dan Carpenter
2017-07-06 14:41   ` [Ksummit-discuss] [PATCH 1/2] kconfig: add a silent option to conf_write() Dan Carpenter
2017-07-06 15:08     ` Steven Rostedt
2017-07-06 14:42   ` [Ksummit-discuss] [PATCH 2/2] kconfig: new command line kernel configuration tool Dan Carpenter
2017-07-07  5:55     ` Krzysztof Kozlowski
2017-07-07  9:02       ` Dan Carpenter
2017-07-09  3:56         ` Linus Walleij [this message]
2017-07-09  8:31           ` Geert Uytterhoeven
2017-07-09 17:03             ` Randy Dunlap
2017-07-09 19:43               ` Geert Uytterhoeven
2017-07-09 17:32             ` Frank Rowand
2017-07-10  9:44     ` Geert Uytterhoeven
2017-07-10 11:15       ` Dan Carpenter
2017-07-06 16:41   ` [Ksummit-discuss] [TECH TOPIC] is Kconfig a bit hard sometimes? Linus Torvalds
2017-07-06 17:11     ` Randy Dunlap
2017-07-07 11:36     ` Dan Carpenter
2017-07-10 17:15       ` Luck, Tony
2017-07-10 17:33         ` Alexandre Belloni
2017-07-10 18:28           ` Linus Torvalds
2017-07-10 19:44             ` Randy Dunlap
2017-07-11  6:21             ` Valentin Rothberg
2017-07-06 21:19   ` Laurent Pinchart

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=CACRpkdZB9g3rCgRDnZFDT2g9qQTtUZhKG2Pxp8qKrGP3u1p5+Q@mail.gmail.com \
    --to=linus.walleij@linaro.org \
    --cc=dan.carpenter@oracle.com \
    --cc=ksummit-discuss@lists.linuxfoundation.org \
    --cc=mhocko@kernel.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