Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC 2/2] linux: Add support for specifying a custom directory
Date: Fri, 3 Nov 2017 10:23:24 +0100	[thread overview]
Message-ID: <20171103102324.64c1fedb@windsurf> (raw)
In-Reply-To: <b3918167-5b3d-fb4d-19a8-8775228135c0@gmail.com>

Hello,

On Thu, 2 Nov 2017 22:03:32 -0700, Florian Fainelli wrote:

> OK. So by the same token, I should not expect that rsync operation
> syncing my development tree to output/build/linux-custom to work past
> the initial build/configuration? Right now it does not, I can make as
> many changes as I want in the directory reference from local.mk and
> output/build/linux-custom remains the same as it was the first time it
> got rsync'd, is that really expected?
> 
> I really wonder how you guys are doing serious kernel development with
> buildroot?

Come on Florian, such a silly and uninformed statement coming from you?
I could expect that from a less seasoned open-source contributor, but
from you, I'm really surprised.

This is explained very clearly in the section "8.12.6. Using Buildroot
during development" of the manual,
https://buildroot.org/downloads/manual/manual.html, which states:

"""

  When Buildroot finds that for a given package, an
  <pkg>_OVERRIDE_SRCDIR has been defined, it will no longer attempt to
  download, extract and patch the package. Instead, it will directly
  use the source code available in in the specified directory and make
  clean will not touch this directory. This allows to point Buildroot
  to your own directories, that can be managed by Git, Subversion, or
  any other version control system. To achieve this, Buildroot will use
  rsync to copy the source code of the component from the specified
  <pkg>_OVERRIDE_SRCDIR to output/build/<package>-custom/.

  This mechanism is best used in conjunction with the make <pkg>-rebuild
  and make <pkg>-reconfigure targets. A make <pkg>-rebuild all sequence
  will rsync the source code from <pkg>_OVERRIDE_SRCDIR to
  output/build/<package>-custom (thanks to rsync, only the modified
  files are copied), and restart the build process of just this package.

"""

This is also explained in details in the Buildroot training materials,
http://free-electrons.com/doc/training/buildroot/buildroot-slides.pdf
slide 269 and following.

So, before making such statements, could you perhaps read the
documentation first?

Also, it's worth mentioning that when I do active kernel development, I
personally don't build my kernel within Buildroot, but separately. I
use Buildroot to build the root filesystem (often a simple initramfs),
but I build the kernel separately. The kernel build process is simple
enough that building it separately is often easier.

<pkg>_OVERRIDE_SRCDIR can however be useful if you're building kernel
modules, as it ensures they are installed in the root filesystem.

However, I believe <pkg>_OVERRIDE_SRCDIR is particularly useful when
you're actively developing/debugging a user-space application/library
that has a complicated build process. In this case, having Buildroot
trigger the build is easier.

Best regards,

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

  parent reply	other threads:[~2017-11-03  9:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-29  2:06 [Buildroot] [RFC 0/2] Add support for specifying a custom kernel directory Florian Fainelli
2017-10-29  2:06 ` [Buildroot] [RFC 1/2] pkg-generic: Don't check for trailing slashes for local method Florian Fainelli
2017-10-29  2:06 ` [Buildroot] [RFC 2/2] linux: Add support for specifying a custom directory Florian Fainelli
2017-10-29  7:26   ` Yann E. MORIN
2017-10-29  9:12     ` Thomas Petazzoni
2017-10-29 17:26       ` Florian Fainelli
2017-10-29 18:12         ` Yann E. MORIN
2017-10-30  3:27           ` Florian Fainelli
2017-10-30 22:32             ` Yann E. MORIN
2017-11-03  5:03               ` Florian Fainelli
2017-11-03  7:04                 ` Yann E. MORIN
2017-11-03  9:23                 ` Thomas Petazzoni [this message]
2017-10-29  7:33 ` [Buildroot] [RFC 0/2] Add support for specifying a custom kernel directory Yann E. MORIN
2017-10-29 17:10   ` Florian Fainelli

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=20171103102324.64c1fedb@windsurf \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox