[OE-core] [PATCH] kernel-devsrc: fix cpio randomly hit insane file name

Bruce Ashfield bruce.ashfield at windriver.com
Mon Apr 23 02:43:46 UTC 2018


On 2018-04-22 10:15 PM, Hongxu Jia wrote:
> On 2018年04月20日 20:50, Bruce Ashfield wrote:
>> On 04/19/2018 11:19 PM, Hongxu Jia wrote:
>>> Occasionally compile kernel-devsrc failed at world build.
>>> ...
>>> |0 blocks
>>> |cpio: ./tools/perf/arch/arm/util/sedr7ORqk: Cannot stat:
>>> No such file or directory
>>> |0 blocks
>>> ...
>>> cpio tried to find a file at ${S}/tools/perf and failed
>>> if the input list is not valid.
>>>
>>> The reason is perf and kernel-devsrc have the same ${S},
>>> Perf sed ${S}/tools/perf/* at do_configure, kernel-devsrc
>>> cpio ${S} at do_install. The former task affects the latter
>>> one, so let the latter depends the former to avoid the conflict.
>>
>> While I have my devsrc rewrite ready to go for the 2.6 release
>> window, it would still suffer from this, so I'm making the same
>> change to the new recipe.
>>
>> I do have a question though. Why not just add DEPENDS on perf ?
>> Won't that be the same, since it means the configure of this
>> recipe depends on the configure of perf ?
>>
> 
> For this fix, I think depends perf or perf's do_configure are the same,
> maybe the latter could be built earlier.
> 
> Since you will rewrite devsrc, my question is should we rewrite the perf?
> It is not a good idea to modify shared kernel's ${S}, any recipe depends
> "virtual/kernel:do_shared_workdir" may have potential conflict with it.
> I thinks it is the root cause of this issue.

This fix is fine to solve the issue, I wouldn't necessarily go all
the way to re-writing the perf recipe.

Well, I wouldn't call it a re-write, since all we could change is
to make a copy of the kernel shared source directory into a perf
specific dir, and modify it there. But the complication is on
build, since perf can dip into the rest of the kernel build
infrastructure if you aren't careful.

Definitely something to consider for 2.6.

Bruce

> 
> //Hongxu
> 
>> Cheers,
>>
>> Bruce
>>
>>>
>>> Signed-off-by: Hongxu Jia <hongxu.jia at windriver.com>
>>> ---
>>>   meta/recipes-kernel/linux/kernel-devsrc.bb | 3 +++
>>>   1 file changed, 3 insertions(+)
>>>
>>> diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb 
>>> b/meta/recipes-kernel/linux/kernel-devsrc.bb
>>> index 8bbfa23..5ebeabc 100644
>>> --- a/meta/recipes-kernel/linux/kernel-devsrc.bb
>>> +++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
>>> @@ -18,6 +18,9 @@ inherit module-base
>>>   do_install[depends] += "virtual/kernel:do_shared_workdir"
>>>   # Need the source, not just the output of populate_sysroot
>>>   do_install[depends] += "virtual/kernel:do_install"
>>> +# Perf `sed ${S}/tools/perf/*' at do_configure, make sure it is done
>>> +# before kernel-devsrc `cpio ${S}' at do_install
>>> +do_install[depends] += "virtual/perf:do_configure"
>>>     # There's nothing to do here, except install the source where we 
>>> can package it
>>>   do_fetch[noexec] = "1"
>>>
>>
> 




More information about the Openembedded-core mailing list