From: "Guido Martínez" <guido@vanguardiasur.com.ar>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC/PATCH] linux: remove the zImage before rebuild
Date: Fri, 17 Jul 2015 13:34:42 -0300 [thread overview]
Message-ID: <20150717163442.GA6466@fox> (raw)
In-Reply-To: <55A926DC.9010803@mentor.com>
Hi Hollis,
On Fri, Jul 17, 2015 at 09:01:32AM -0700, Hollis Blanchard wrote:
> Hi Guido, I just ran across this discussion
> <http://patchwork.ozlabs.org/patch/394002/> in patchwork, and wanted
> to say I hit the same thing this week (and spent a few hours figuring
> out what had gone wrong). Has there been any activity on the problem
> recently?
No, not really. We thought of changing quite a bit of the linux.mk file
to avoid this problem but I never got around to it :(.
I'll try to work on it in the following days, however feel free to do so
before me and send the patch :).
In any case you can use this workaround in the mean time, I've been
doing exactly that.
Cheers!
> Hollis Blanchard
> Mentor Graphics Emulation Division
>
> On 09/26/2014 04:22 PM, Guido Mart?nez wrote:
> > Currently, if we run "make linux-rebuild", the device tree blob gets
> > appended twice to the kernel image, rendering the latter append useless.
> >
> > Fix this by removing the zImage before building, so the DTB append runs
> > on a fresh kernel image. This is not optimal as the final Linux linking
> > step is run again, but at least we get sensible results.
> >
> > Signed-off-by: Guido Mart?nez <guido@vanguardiasur.com.ar>
> > ---
> > Hi guys,
> >
> > Has anyone ran into the above problem? It was a small headache for me,
> > so I wrote this small patch.
> >
> > It's not great, the right thing to do would be copying the zImage out
> > of the kernel tree and appending the DTB there, but my attempt at doing
> > that broke some other builds. This should work every time.
> >
> >
> > linux/linux.mk | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/linux/linux.mk b/linux/linux.mk
> > index 2fb7437..14c2b8e 100644
> > --- a/linux/linux.mk
> > +++ b/linux/linux.mk
> > @@ -263,6 +263,10 @@ endif
> > # Compilation. We make sure the kernel gets rebuilt when the
> > # configuration has changed.
> > define LINUX_BUILD_CMDS
> > + # Remove the previous image, if it exists, to prevent appending
> > + # multiple DTBs
> > + rm -f $(KERNEL_ARCH_PATH)/boot/zImage
> > +
> > $(if $(BR2_LINUX_KERNEL_USE_CUSTOM_DTS),
> > cp $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)) $(KERNEL_ARCH_PATH)/boot/dts/)
> > $(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_TARGET_NAME)
>
--
Guido Mart?nez, VanguardiaSur
www.vanguardiasur.com.ar
next prev parent reply other threads:[~2015-07-17 16:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-26 23:22 [Buildroot] [RFC/PATCH] linux: remove the zImage before rebuild Guido Martínez
2014-10-22 14:40 ` Guido Martínez
2015-03-08 17:47 ` Thomas Petazzoni
2015-03-08 18:53 ` Guido Martínez
2015-07-17 16:01 ` Hollis Blanchard
2015-07-17 16:34 ` Guido Martínez [this message]
2015-07-17 17:41 ` Thomas Petazzoni
2015-07-17 18:49 ` Hollis Blanchard
2015-07-17 21:16 ` Thomas Petazzoni
2015-07-17 21:24 ` Hollis Blanchard
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=20150717163442.GA6466@fox \
--to=guido@vanguardiasur.com.ar \
--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.