All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Rebuilding Linux after modifying Linux device tree in output/build directory?
@ 2019-11-15 19:40 Whitney, Scott
  2019-11-15 20:13 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Whitney, Scott @ 2019-11-15 19:40 UTC (permalink / raw)
  To: buildroot

Hi Buildroot community,

I need to run some experiments where I may need to make a number of minor modifications to the Linux Device tree, for example to change PWM outputs to GPIO outputs, add some extra GPIO inputs, etc.

Is there a way that I can force a minimal rebuild based on such a local change?  Buildroot does not seem to keep track of many dependencies to trigger a rebuild such as the DTS file being newer than the Linux image.

Is "make linux-rebuild" a viable option, or is there a better way to rebuild only what is required due to the Device Tree change?

Thanks for your help,

Scott

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] Rebuilding Linux after modifying Linux device tree in output/build directory?
  2019-11-15 19:40 [Buildroot] Rebuilding Linux after modifying Linux device tree in output/build directory? Whitney, Scott
@ 2019-11-15 20:13 ` Thomas Petazzoni
       [not found]   ` <1573850449466.42632@amazon.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2019-11-15 20:13 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 15 Nov 2019 19:40:09 +0000
"Whitney, Scott" <scwhitn@amazon.com> wrote:

> I need to run some experiments where I may need to make a number of
> minor modifications to the Linux Device tree, for example to change
> PWM outputs to GPIO outputs, add some extra GPIO inputs, etc.
> 
> Is there a way that I can force a minimal rebuild based on such a
> local change?  Buildroot does not seem to keep track of many
> dependencies to trigger a rebuild such as the DTS file being newer
> than the Linux image.
> 
> Is "make linux-rebuild" a viable option, or is there a better way to
> rebuild only what is required due to the Device Tree change?

Running "make linux-rebuild" is what you want. It will rebuild just the
kernel, but not from scratch: it will simply run "make" in the kernel
source tree, so only the files you have changed will be rebuilt.

However, be careful: output/build/linux-<version>/ is a "temporary"
directory: the next time you run "make clean", it will be removed, and
all your changes will be lost. So, doing changes directly in
output/build/linux-<version>/ is only good for quick local hacks.

For more serious development, I'd recommend looking at using the
<pkg>_OVERRIDE_SRCDIR mechanism.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] Rebuilding Linux after modifying Linux device tree in output/build directory?
       [not found]   ` <1573850449466.42632@amazon.com>
@ 2019-11-15 21:02     ` Thomas Petazzoni
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2019-11-15 21:02 UTC (permalink / raw)
  To: buildroot

Hello Scott,

Please keep the Buildroot mailing list in Cc.

On Fri, 15 Nov 2019 20:40:50 +0000
"Whitney, Scott" <scwhitn@amazon.com> wrote:

> I understand that such changes are volatile, but this gives me a way
> to run experiments without having to check each one into Git and
> pulling a new copy of the Linux repository from scratch.

Using the <pkg>_OVERRIDE_SRCDIR would give you the best of both worlds:
you're not working on a volatile copy *and* you don't rebuild from
scratch.

> After running "make linux-rebuild", I believe that I will also need
> to run "make" in order to generate the sdcard.img file that I need
> for my target, correct?  "make linux-rebuild" only rebuilds parts of
> the kernel that changed, but does not run any of my post-build steps
> to create my image, I believe.

Correct, "make linux-rebuild" only rebuilds the kernel itself.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-15 21:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-15 19:40 [Buildroot] Rebuilding Linux after modifying Linux device tree in output/build directory? Whitney, Scott
2019-11-15 20:13 ` Thomas Petazzoni
     [not found]   ` <1573850449466.42632@amazon.com>
2019-11-15 21:02     ` Thomas Petazzoni

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.