
On Sun, 2014-06-22 at 08:59 +0200, Heiko Schocher wrote:
Ok, did a "git diff v3.7.1..v3.14 ..." for drivers/mtd/nand and drivers/mtd/mtd*.{c,h} and applied it with "git am -3 ..." after fetching the Linux tree into my U-boot repository ... this command worked now nice ... but there are subtle diffs between the sources in the "copied from linux" tree and the "git am -3" tree ... which did not pop up when doing a "git am -3 ...", just detected them because I could do a diff between "my copied from linux" version and the "git am -3 ..." created version!
It looks like the 3.7.1 sync was mainly just the NAND code, not the rest of mtd, other than some API changes needed by the NAND code.
Did you find any differences in the NAND code?
And I have no chance to detect this difference, when using "git am -3 ..." ... it just remains in the code ...
I vote for copying the linux files, marking U-Boot specific code with __UBOOT__ ...
Yes, the 3-way merge approach requires that we know where and when the old code came from. Unfortunately that information is not present outside of drivers/mtd/nand, so for those directories starting from scratch is reasonable (unless we can figure it out based on when the code was added to U-Boot...). Once that's been done, future updates can be done with 3-way merges.
I still disagree with #ifndef __UBOOT__ as it will hurt more than it helps with future merges.
-Scott