All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] Analysis of bug #5030: busybox built fails if we use an override src dir BUSYBOX_OVERRIDE_SRCDIR and that dir does not contain .config
Date: Wed, 12 Feb 2014 11:51:18 +0100	[thread overview]
Message-ID: <20140212115118.71cc1154@skate> (raw)
In-Reply-To: <CAAXf6LXauh9AM15fgOC8L8jdfL5nG+zQtuFCjX1A9dasBpanXg@mail.gmail.com>

Dear Thomas De Schampheleire,

On Wed, 12 Feb 2014 11:41:29 +0100, Thomas De Schampheleire wrote:

> > But what would you change the .config and then re-run the configure
> > step? The configure is all about *producing* the .config, so making a
> > change to the .config, and then re-running the configure step seems
> > weird to me.
> 
> I don't necessarily feel that the 'configure' step is about producing
> the .config. To me, the configure step is about configuring busybox,
> based on the .config. So for me, the .config is input to the configure
> step, not output.

Well, in some sense the configure step is just "some step you do before
building", and generating the .config thing typically falls in this
category.

> > We have had for quite a while this comment in busybox.mk, which I never
> > really understood:
> >
> > # We do this here to avoid busting a modified .config in configure
> > BUSYBOX_POST_EXTRACT_HOOKS += BUSYBOX_COPY_CONFIG
> >
> > But we have the busybox-{menuconfig,xconfig} targets that allow to
> > adjust the configuration, and they only remove the "built" and
> > "target_installed" stamp files, which means after doing "make
> > busybox-menuconfig", if you run "make", the configure step of busybox
> > isn't re-executed, so the configuration changes you made are properly
> > taken into account and preserved.
> 
> One may also edit .config manually, without running any of the *config commands.

And then you simply run "make busybox-rebuild", and that's it.

> Note by the way that the bug report is submitted from the context of
> the OVERRIDE_SRCDIR mechanism. Here there is no .config created at
> all, so it is not about editing it.

There would be a .config created is the .config creation was done in
the "configure" step and not in the extract step.

> >> For linux this is not true: if you change your config and re-run the configure
> >> step, your changes are lost. If you change your .config and expect to keep the
> >> changes, you can only rebuild, not reconfigure.
> >>
> >> This patch proposes to line-up busybox more with how the linux kernel handles
> >> it.
> >>
> >> This raises the question: what do we want, what should the behavior be?
> >>
> >> Personally, I haven't had a big problem with the linux way, and thus would
> >> accept the principle of this patch. But I don't have a very strong opinion on
> >> this...
> >
> > I also accept the principle of this patch.
> >
> > As a side note, this behavior of busybox.mk was also problematic when
> > trying to implement out of tree build for packages, because .config is
> > inherently part of the *build* directory, but the build directory
> > doesn't exist yet during the extract step: it is only created at the
> > beginning of the configure step. So my out-of-tree patch set contains:
> >
> > -# We do this here to avoid busting a modified .config in configure
> > -BUSYBOX_POST_EXTRACT_HOOKS += BUSYBOX_COPY_CONFIG
> > -
> >  define BUSYBOX_CONFIGURE_CMDS
> > +       $(BUSYBOX_COPY_CONFIG)
> >
> 
> Then maybe we should apply exactly this change, and not the proposed
> one that uses a hook?
> Additionally, we should then also make this change in uclibc, right?

Yes. But I would like to hear Peter's opinion on this.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2014-02-12 10:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-11 20:58 [Buildroot] Analysis of bug #5030: busybox built fails if we use an override src dir BUSYBOX_OVERRIDE_SRCDIR and that dir does not contain .config Thomas De Schampheleire
2014-02-12  8:21 ` Thomas Petazzoni
2014-02-12 10:41   ` Thomas De Schampheleire
2014-02-12 10:51     ` Thomas Petazzoni [this message]
2014-02-12 10:55       ` Thomas De Schampheleire
2014-02-12 19:26         ` Peter Korsgaard

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=20140212115118.71cc1154@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.