[U-Boot] [PATCH v4 0/3] mtd, ubi, ubifs: resync with Linux-3.14

Scott Wood scottwood at freescale.com
Tue Jul 1 01:09:53 CEST 2014


On Tue, 2014-07-01 at 00:56 +0200, Wolfgang Denk wrote:
> Dear Scott,
> 
> In message <1404159636.2435.165.camel at snotra.buserror.net> you wrote:
> >
> > > I agree that #ifdef's should be avoided, but then here they also serve
> > > a documentation purpose as they clearly mark areas of code that are
> > > specific to U-Boot, or that are not used in U-Boot.
> > 
> > git diff can do that too, without reducing readability or increasing the
> > likelihood of mismerges.
> 
> (git) diff needs a reference to diff against. Maybe I missed some
> earlier comments about that, but how exactly should this be done
> here?

When the code is synced, the corresponding Linux SHA1 or tag should be
placed in the commit message.  This is the case for the NAND code.
Unfortunately it has never been true of the mtd/ubi code, but this
do-over in those trees is an opportunity to fix that.

> If we want to have strictly bisectable code in mainline, I don't
> really see how to provide an unmodified source reference to show the
> U-Boot specific diffs.
>
> Can you please explain (maybe again, sorry) how you think the code
> update should be done do both allow such a git diff and remain
> bisectable?  The ways I can see all require a non-working / non-com-
> piling intermediate step.

There is no intermediate step.  

The unmodified source is in the Linux tree -- most likely in a more
accurate/complete form than the ifdefs convey, since minor differences
and subsequent local changes are unlikely to be marked.

You can either fetch the Linux tree into your local U-Boot repo (or vice
versa) so that git diff can compare them, or you can check out separate
repositories to the proper tags/SHAs and use ordinary diff.  It's not
something that I'd expect one to want to do very often, though.  Usually
you want to know how things work in the codebase you're working on, or
you want to compare some specific aspect of the code which can more
easily be done manually.

-Scott




More information about the U-Boot mailing list