[Buildroot] [PATCH] ltp-testsuite: build kernel modules when appropriate

Arnout Vandecappelle arnout at mind.be
Tue Mar 29 19:12:11 UTC 2016


On 03/28/16 14:49, Mason wrote:
> On 24/03/2016 22:25, Thomas Petazzoni wrote:
>
>> On Thu, 24 Mar 2016 15:02:59 +0100, Mason wrote:
>>
>>> +ifeq ($(BR2_LINUX_KERNEL),y)
>>> +LTP_TESTSUITE_DEPENDENCIES += linux
>>> +LTP_TESTSUITE_CONF_OPTS += --with-linux-dir=$(LINUX_DIR)
>>> +else
>>> +LTP_TESTSUITE_CONF_OPTS += --without-modules
>>> +endif
>>
>> It looks good in principle, but unfortunately in practice it doesn't
>> work. Try to build the following configuration: [snip]
>>
>> And you will see that the LTP kernel modules are not built. And the
>> reason is that it tries to build them without passing the appropriate
>> ARCH= variable, so it falls back to x86, and therefore fails to build
>> them. Here is what I see: [snip]
>>
>> And then lots and lots of errors about arch/x86 related headers. And
>> indeed, my kernel is configured/built for ARM.
>>
>> So maybe it worked if you tested for a x86 target, but I'm a bit
>> confused since I know you're working on ARM stuff. Maybe you have
>> ARCH=arm defined globally in your environment and therefore it makes
>> things work?
>
> Yes, you hit the nail on the head. Since I work exclusively with
> ARM platforms, I have ARCH=arm exported in my environment.
>
>> Could you look into this and send an updated patch?
>
> I'm not sure what the correct solution is. We discussed the issue
> a few days ago, and you mentioned KERNEL_ARCH.
>
> Should I just export ARCH=$(KERNEL_ARCH) in the environment?
>
> But I'm not sure how to do it globally, or whether that is the
> appropriate solution... Could someone provide some guidance?

  You need to add that to LTP_TESTSUITE_MAKE_ENV:

LTP_TESTSUITE_MAKE_ENV = ARCH=$(KERNEL_ARCH)

  Regards,
  Arnout


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF



More information about the buildroot mailing list