[BUG] Fix drivers/memory O= build

Masahiro Yamada yamada.masahiro at socionext.com
Fri Apr 6 19:55:22 PDT 2018


2018-04-07 3:55 GMT+09:00 Russell King - ARM Linux <linux at armlinux.org.uk>:
> On Fri, Apr 06, 2018 at 11:45:01AM -0700, Santosh Shilimkar wrote:
>> On 4/6/2018 9:46 AM, Tony Lindgren wrote:
>> >* Russell King - ARM Linux <linux at armlinux.org.uk> [180406 03:27]:
>> >>When building a kernel with split object directories, the following
>> >>failure occurs:
>> >>
>> >>.../drivers/memory/emif-asm-offsets.c:1:0: fatal error: can't open drivers/memory/emif-asm-offsets.s for writing: No such file or directory
>> >>compilation terminated.
>> >>drivers/memory/Makefile.asm-offsets:2: recipe for target 'drivers/memory/emif-asm-offsets.s' failed
>> >>make[2]: *** [drivers/memory/emif-asm-offsets.s] Error 1
>> >>.../Makefile:1060: recipe for target 'arch/arm/mach-omap2' failed
>> >>make[1]: *** [arch/arm/mach-omap2] Error 2
>> >>
>> >>This prevents any kernel being built that includes decending into
>> >>arch/arm/mach-omap2 with split object directories.
>> >>
>> >>This is a regression.
>> >
>> >Dave, I presume you're looking into this already?
>> >
>> Fix is already posted by 'Anders Roxell <anders.roxell at linaro.org>'
>> You are copied on the email Tony.
>
> Arnd also has a fix for it as well, which moves emif-asm-offsets.s
> into include/generated, as that will always exist prior to these
> rules being invoked.  Arnd's passing it through his randconfig
> builder before publishing it.


I do not like this idea.

Not sure exactly what Arnd is trying to do,
but the same file should not be touched from multiple points
in case Kbuild descends into mach-omap2/ and memory/ at the same time.


I recommend to put copies in each directory:

arch/arm/mach-omap2/emif-asm-offsets.h
drivers/memory/ti-emif-asm-offsets.h


If you want me to send a patch,
I will give it a try.




-- 
Best Regards
Masahiro Yamada



More information about the linux-arm-kernel mailing list