All of lore.kernel.org
 help / color / mirror / Atom feed
* Problems about selecting linux kernel drivers.
@ 2019-11-20  8:43 Yusuf Altıparmak
  2019-11-20  9:17 ` Andrey Zhizhikin
  0 siblings, 1 reply; 8+ messages in thread
From: Yusuf Altıparmak @ 2019-11-20  8:43 UTC (permalink / raw)
  To: meta-freescale

[-- Attachment #1: Type: text/plain, Size: 582 bytes --]

Hello,
First of all, I am using NXP T1042D4RDB-64B board. They have linux sdk
which is
https://www.nxp.com/docs/en/supporting-information/QORIQ-SDK-2.0-IC-REV0.pdf

My problem is,
I am trying to add new modules to linux rootfs generated by yocto. But the
drivers I selected on "menuconfig" is not compiling as ".ko" file. They
only got compiled as ".o" file. Here is the details of problem.
https://stackoverflow.com/questions/58941714/yocto-generated-linux-modules-do-not-contain-all-the-drivers-selected-in-config
.

Can you help me about this situation?

Regards.

[-- Attachment #2: Type: text/html, Size: 994 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problems about selecting linux kernel drivers.
  2019-11-20  8:43 Problems about selecting linux kernel drivers Yusuf Altıparmak
@ 2019-11-20  9:17 ` Andrey Zhizhikin
       [not found]   ` <CAGzVRjyrP90pnV+phYg8CrPGv8CN2NQ7JZ_j-HQbXHqS+=zyZg@mail.gmail.com>
  0 siblings, 1 reply; 8+ messages in thread
From: Andrey Zhizhikin @ 2019-11-20  9:17 UTC (permalink / raw)
  To: Yusuf Altıparmak; +Cc: meta-freescale Mailing List

Hello Yusuf,

On Wed, Nov 20, 2019 at 9:44 AM Yusuf Altıparmak
<yusufalti1997@gmail.com> wrote:
>
> Hello,
> First of all, I am using NXP T1042D4RDB-64B board. They have linux sdk which is https://www.nxp.com/docs/en/supporting-information/QORIQ-SDK-2.0-IC-REV0.pdf
>
> My problem is,
> I am trying to add new modules to linux rootfs generated by yocto. But the drivers I selected on "menuconfig" is not compiling as ".ko" file. They only got compiled as ".o" file. Here is the details of problem. https://stackoverflow.com/questions/58941714/yocto-generated-linux-modules-do-not-contain-all-the-drivers-selected-in-config.

As you stated on Stackoveflow, some config options are =y and some are
=m. Those with =m are actually be modules, those with =y are
built-ins. It is really hard to tell how you configure the kernel, so
please do:
# bitbake virtual/kernel -c diffconfig
and post your fragment here.

>
> Can you help me about this situation?
>
> Regards.
> --
> _______________________________________________
> meta-freescale mailing list
> meta-freescale@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale



-- 
Regards,
Andrey.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problems about selecting linux kernel drivers.
       [not found]     ` <CAHtQpK5Dm9gxrVv7S5yBk-yz0ogUT9DQRxJGjWwg26mz+4TrfA@mail.gmail.com>
@ 2019-11-20 13:17       ` Yusuf Altıparmak
  2019-11-20 13:34         ` Andrey Zhizhikin
  0 siblings, 1 reply; 8+ messages in thread
From: Yusuf Altıparmak @ 2019-11-20 13:17 UTC (permalink / raw)
  To: Andrey Zhizhikin; +Cc: meta-freescale

[-- Attachment #1: Type: text/plain, Size: 4281 bytes --]

Apologies for the situation, this was my first question to community.

I didn't know the differences between built-ins and modules. I made a
little research after your answer and corrected the defconfig file as you
explained in last answer. Everything gone well. kernelmodules.tar file is
changed with including the desired drivers.

Andrey Zhizhikin <andrey.z@gmail.com>, 20 Kas 2019 Çar, 16:02 tarihinde
şunu yazdı:

> Hey Yusuf,
>
> Please don't take a conversation out from the list (use Reply-To-All)
> unless you really have a question that you would like to ask privately
> from me. By this, other people which might have similar issues might
> get answers by reading mail threads. If you intend to reply to this
> email - please include the list address back.
>
> On Wed, Nov 20, 2019 at 11:26 AM Yusuf Altıparmak
> <yusufalti1997@gmail.com> wrote:
> >
> > Hello Mr. Andrey,
> >
> > My actual aim is to install 'amdgpu' driver to use 'AMD 9171' product
> with my embedded boards PCIe slot. 'amdgpu' driver is available after
> kernel version 4.2. At first, my default bsp kernel was 4.1.xxx and I
> changed it to 4.9 which I found in qoriq github. Then,in <machine>.conf
> file, I declared my own defconfig to enable amdpu section. I added the
> screenshot of menuconfig. amdgpu was selected as '*'. I changed it to 'M'
> and my diff fragment is like this now.
> > CONFIG_MFD_CORE=m
> > CONFIG_DRM_RADEON=m
> > CONFIG_DRM_AMDGPU=m
>
> That is correct and that is what I would expect to be produced.
>
> The trick here is (and this is what you've solved later and reported
> in another reply) that you created your own defconfig, then did
> menuconfig, and then re-built the kernel. If you would like to
> configure the kernel with your own defconfig, then you should do the
> following:
> 1. bitbake virtual/kernel
> 2. bitbake virtual/kernel -c menuconfig
> 3. change configuration fragment, save the config
> 4. bitbake virtual/kernel -c savedefconfig
>
> After the last step, you would be presented with the path to a new
> defconfig which you can use to overwrite your previous one. In the new
> defconfig file, all your config items would be as you have them
> configured, and also some additional items which might be required by
> your modified config items. This is a preferred way of doing things,
> as in this case you would not have any missing dependencies during
> configuration.
>
> >
> > But result is still same. There is still 13 '.ko' files in my
> modules.tgz. amdgpu or other modules still does not exist in modules.tgz or
> rootfs.tar.gz
>
> I believe you then did full virtual/kernel re-build, which flushed
> your modified config items and took the default one.
>
> >
> > Andrey Zhizhikin <andrey.z@gmail.com>, 20 Kas 2019 Çar, 12:18 tarihinde
> şunu yazdı:
> >>
> >> Hello Yusuf,
> >>
> >> On Wed, Nov 20, 2019 at 9:44 AM Yusuf Altıparmak
> >> <yusufalti1997@gmail.com> wrote:
> >> >
> >> > Hello,
> >> > First of all, I am using NXP T1042D4RDB-64B board. They have linux
> sdk which is
> https://www.nxp.com/docs/en/supporting-information/QORIQ-SDK-2.0-IC-REV0.pdf
> >> >
> >> > My problem is,
> >> > I am trying to add new modules to linux rootfs generated by yocto.
> But the drivers I selected on "menuconfig" is not compiling as ".ko" file.
> They only got compiled as ".o" file. Here is the details of problem.
> https://stackoverflow.com/questions/58941714/yocto-generated-linux-modules-do-not-contain-all-the-drivers-selected-in-config
> .
> >>
> >> As you stated on Stackoveflow, some config options are =y and some are
> >> =m. Those with =m are actually be modules, those with =y are
> >> built-ins. It is really hard to tell how you configure the kernel, so
> >> please do:
> >> # bitbake virtual/kernel -c diffconfig
> >> and post your fragment here.
> >>
> >> >
> >> > Can you help me about this situation?
> >> >
> >> > Regards.
> >> > --
> >> > _______________________________________________
> >> > meta-freescale mailing list
> >> > meta-freescale@yoctoproject.org
> >> > https://lists.yoctoproject.org/listinfo/meta-freescale
> >>
> >>
> >>
> >> --
> >> Regards,
> >> Andrey.
>
>
>
> --
> Regards,
> Andrey.
>

[-- Attachment #2: Type: text/html, Size: 5764 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problems about selecting linux kernel drivers.
  2019-11-20 13:17       ` Yusuf Altıparmak
@ 2019-11-20 13:34         ` Andrey Zhizhikin
  2019-11-20 13:56           ` Atakan AKBULUT
  0 siblings, 1 reply; 8+ messages in thread
From: Andrey Zhizhikin @ 2019-11-20 13:34 UTC (permalink / raw)
  To: Yusuf Altıparmak; +Cc: meta-freescale Mailing List

On Wed, Nov 20, 2019 at 2:17 PM Yusuf Altıparmak
<yusufalti1997@gmail.com> wrote:
>
> Apologies for the situation, this was my first question to community.

No problem, we've all been there. :) If we continue on the topic -
please also avoid top postings. Example:

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

A: No.
Q: Should I include quotations after my reply?

http://daringfireball.net/2007/07/on_top

>
> I didn't know the differences between built-ins and modules. I made a little research after your answer and corrected the defconfig file as you explained in last answer. Everything gone well. kernelmodules.tar file is changed with including the desired drivers.

Glad to hear it has solved your issues.

>
> Andrey Zhizhikin <andrey.z@gmail.com>, 20 Kas 2019 Çar, 16:02 tarihinde şunu yazdı:
>>
>> Hey Yusuf,
>>
>> Please don't take a conversation out from the list (use Reply-To-All)
>> unless you really have a question that you would like to ask privately
>> from me. By this, other people which might have similar issues might
>> get answers by reading mail threads. If you intend to reply to this
>> email - please include the list address back.
>>
>> On Wed, Nov 20, 2019 at 11:26 AM Yusuf Altıparmak
>> <yusufalti1997@gmail.com> wrote:
>> >
>> > Hello Mr. Andrey,
>> >
>> > My actual aim is to install 'amdgpu' driver to use 'AMD 9171' product with my embedded boards PCIe slot. 'amdgpu' driver is available after kernel version 4.2. At first, my default bsp kernel was 4.1.xxx and I changed it to 4.9 which I found in qoriq github. Then,in <machine>.conf file, I declared my own defconfig to enable amdpu section. I added the screenshot of menuconfig. amdgpu was selected as '*'. I changed it to 'M' and my diff fragment is like this now.
>> > CONFIG_MFD_CORE=m
>> > CONFIG_DRM_RADEON=m
>> > CONFIG_DRM_AMDGPU=m
>>
>> That is correct and that is what I would expect to be produced.
>>
>> The trick here is (and this is what you've solved later and reported
>> in another reply) that you created your own defconfig, then did
>> menuconfig, and then re-built the kernel. If you would like to
>> configure the kernel with your own defconfig, then you should do the
>> following:
>> 1. bitbake virtual/kernel
>> 2. bitbake virtual/kernel -c menuconfig
>> 3. change configuration fragment, save the config
>> 4. bitbake virtual/kernel -c savedefconfig
>>
>> After the last step, you would be presented with the path to a new
>> defconfig which you can use to overwrite your previous one. In the new
>> defconfig file, all your config items would be as you have them
>> configured, and also some additional items which might be required by
>> your modified config items. This is a preferred way of doing things,
>> as in this case you would not have any missing dependencies during
>> configuration.
>>
>> >
>> > But result is still same. There is still 13 '.ko' files in my modules.tgz. amdgpu or other modules still does not exist in modules.tgz or rootfs.tar.gz
>>
>> I believe you then did full virtual/kernel re-build, which flushed
>> your modified config items and took the default one.
>>
>> >
>> > Andrey Zhizhikin <andrey.z@gmail.com>, 20 Kas 2019 Çar, 12:18 tarihinde şunu yazdı:
>> >>
>> >> Hello Yusuf,
>> >>
>> >> On Wed, Nov 20, 2019 at 9:44 AM Yusuf Altıparmak
>> >> <yusufalti1997@gmail.com> wrote:
>> >> >
>> >> > Hello,
>> >> > First of all, I am using NXP T1042D4RDB-64B board. They have linux sdk which is https://www.nxp.com/docs/en/supporting-information/QORIQ-SDK-2.0-IC-REV0.pdf
>> >> >
>> >> > My problem is,
>> >> > I am trying to add new modules to linux rootfs generated by yocto. But the drivers I selected on "menuconfig" is not compiling as ".ko" file. They only got compiled as ".o" file. Here is the details of problem. https://stackoverflow.com/questions/58941714/yocto-generated-linux-modules-do-not-contain-all-the-drivers-selected-in-config.
>> >>
>> >> As you stated on Stackoveflow, some config options are =y and some are
>> >> =m. Those with =m are actually be modules, those with =y are
>> >> built-ins. It is really hard to tell how you configure the kernel, so
>> >> please do:
>> >> # bitbake virtual/kernel -c diffconfig
>> >> and post your fragment here.
>> >>
>> >> >
>> >> > Can you help me about this situation?
>> >> >
>> >> > Regards.
>> >> > --
>> >> > _______________________________________________
>> >> > meta-freescale mailing list
>> >> > meta-freescale@yoctoproject.org
>> >> > https://lists.yoctoproject.org/listinfo/meta-freescale
>> >>
>> >>
>> >>
>> >> --
>> >> Regards,
>> >> Andrey.
>>
>>
>>
>> --
>> Regards,
>> Andrey.



-- 
Regards,
Andrey.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problems about selecting linux kernel drivers.
  2019-11-20 13:34         ` Andrey Zhizhikin
@ 2019-11-20 13:56           ` Atakan AKBULUT
  2019-11-20 14:08             ` Yusuf Altıparmak
  0 siblings, 1 reply; 8+ messages in thread
From: Atakan AKBULUT @ 2019-11-20 13:56 UTC (permalink / raw)
  To: yusufalti1997; +Cc: meta-freescale

[-- Attachment #1: Type: text/plain, Size: 188 bytes --]

Hello Yusuf,
    You should be careful when generating kernel config file. Yocto project
override kernel config(.config file) when compiling again.

-- 
Atakan AKBULUT
Best Regards

[-- Attachment #2: Type: text/html, Size: 387 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problems about selecting linux kernel drivers.
  2019-11-20 13:56           ` Atakan AKBULUT
@ 2019-11-20 14:08             ` Yusuf Altıparmak
  2019-11-20 15:00               ` Andrey Zhizhikin
  0 siblings, 1 reply; 8+ messages in thread
From: Yusuf Altıparmak @ 2019-11-20 14:08 UTC (permalink / raw)
  To: Atakan AKBULUT; +Cc: meta-freescale

[-- Attachment #1: Type: text/plain, Size: 562 bytes --]

> Hello Yusuf,
>     You should be careful when generating kernel config file. Yocto
> project override kernel config(.config file) when compiling again.
>
>
Hello Atakan,

I solved that problem by changing the defconfig source string in
<machine>.conf file. Each time I make changes, I also copy new .config file
to another folder and rename it as in <machine>.conf file. My
<machine>.conf(t1042d4rdb-64b.conf) file is like this;
KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/yusuf_defconfig"
KBUILD_DEFCONFIG ?= "yusuf_defconfig"

Best Regards

[-- Attachment #2: Type: text/html, Size: 974 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problems about selecting linux kernel drivers.
  2019-11-20 14:08             ` Yusuf Altıparmak
@ 2019-11-20 15:00               ` Andrey Zhizhikin
  2019-11-20 15:09                 ` Yusuf Altıparmak
  0 siblings, 1 reply; 8+ messages in thread
From: Andrey Zhizhikin @ 2019-11-20 15:00 UTC (permalink / raw)
  To: Yusuf Altıparmak; +Cc: meta-freescale Mailing List

On Wed, Nov 20, 2019 at 3:14 PM Yusuf Altıparmak
<yusufalti1997@gmail.com> wrote:
>
>
>> Hello Yusuf,
>>     You should be careful when generating kernel config file. Yocto project override kernel config(.config file) when compiling again.
>>
>
> Hello Atakan,
>
> I solved that problem by changing the defconfig source string in <machine>.conf file. Each time I make changes, I also copy new .config file to another folder and rename it as in <machine>.conf file. My <machine>.conf(t1042d4rdb-64b.conf) file is like this;
> KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/yusuf_defconfig"
> KBUILD_DEFCONFIG ?= "yusuf_defconfig"

This approach has 2 problems:
1. .config file is not the same as defconfig file. .config is
auto-generated from whatever the defconfig you supply.
2. keeping the config file in the kernel tree implies you have to
maintain your own kernel repository, or pollute it with unnecessary
copy operation during kernel build

To solve those problems you can do the following:
1. bitbake virtual/kernel -c savedefconfig would give you a defconfig
file which is a real defconfig.
2. keep this defconfig next to the kernel recipe, and set
KBUILD_DEFCONFIG to the one you generated at the step 1. above

In this case you would not need to keep your kernel tree, have a
"clean" defconfig file on hands which you can always update, and have
a very nice tidy kernel recipe to build.

Also, add to your kernel recipe following lines:
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
SRC_URI += "file://yusuf_defconfig"

This would ensure that your yusuf_defconfig could be found and used
for the build. ${BPN} is the kernel recipe name, so you would need to
create a folder named as your kernel recipe next to the recipe itself
and store the config file there.

>
> Best Regards
>
> --
> _______________________________________________
> meta-freescale mailing list
> meta-freescale@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale



-- 
Regards,
Andrey.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problems about selecting linux kernel drivers.
  2019-11-20 15:00               ` Andrey Zhizhikin
@ 2019-11-20 15:09                 ` Yusuf Altıparmak
  0 siblings, 0 replies; 8+ messages in thread
From: Yusuf Altıparmak @ 2019-11-20 15:09 UTC (permalink / raw)
  To: Andrey Zhizhikin; +Cc: meta-freescale

[-- Attachment #1: Type: text/plain, Size: 2358 bytes --]

20 Kas 2019 Çar 18:00 tarihinde Andrey Zhizhikin <andrey.z@gmail.com> şunu
yazdı:

> On Wed, Nov 20, 2019 at 3:14 PM Yusuf Altıparmak
> <yusufalti1997@gmail.com> wrote:
> >
> >
> >> Hello Yusuf,
> >>     You should be careful when generating kernel config file. Yocto
> project override kernel config(.config file) when compiling again.
> >>
> >
> > Hello Atakan,
> >
> > I solved that problem by changing the defconfig source string in
> <machine>.conf file. Each time I make changes, I also copy new .config file
> to another folder and rename it as in <machine>.conf file. My
> <machine>.conf(t1042d4rdb-64b.conf) file is like this;
> > KERNEL_DEFCONFIG ?= "${S}/arch/powerpc/configs/yusuf_defconfig"
> > KBUILD_DEFCONFIG ?= "yusuf_defconfig"
>
> This approach has 2 problems:
> 1. .config file is not the same as defconfig file. .config is
> auto-generated from whatever the defconfig you supply.
> 2. keeping the config file in the kernel tree implies you have to
> maintain your own kernel repository, or pollute it with unnecessary
> copy operation during kernel build
>
> To solve those problems you can do the following:
> 1. bitbake virtual/kernel -c savedefconfig would give you a defconfig
> file which is a real defconfig.
> 2. keep this defconfig next to the kernel recipe, and set
> KBUILD_DEFCONFIG to the one you generated at the step 1. above
>
> In this case you would not need to keep your kernel tree, have a
> "clean" defconfig file on hands which you can always update, and have
> a very nice tidy kernel recipe to build.
>
> Also, add to your kernel recipe following lines:
> FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
> SRC_URI += "file://yusuf_defconfig"
>
> This would ensure that your yusuf_defconfig could be found and used
> for the build. ${BPN} is the kernel recipe name, so you would need to
> create a folder named as your kernel recipe next to the recipe itself
> and store the config file there.
>
> >
> > Best Regards
> >
> > --
> > _______________________________________________
> > meta-freescale mailing list
> > meta-freescale@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/meta-freescale
>
>
>
> --
> Regards,
> Andrey.
>

Thank you Andrey,

I will do this solution to avoid further compile time errors.

Best Regards.

>

[-- Attachment #2: Type: text/html, Size: 3518 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-11-20 15:09 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-20  8:43 Problems about selecting linux kernel drivers Yusuf Altıparmak
2019-11-20  9:17 ` Andrey Zhizhikin
     [not found]   ` <CAGzVRjyrP90pnV+phYg8CrPGv8CN2NQ7JZ_j-HQbXHqS+=zyZg@mail.gmail.com>
     [not found]     ` <CAHtQpK5Dm9gxrVv7S5yBk-yz0ogUT9DQRxJGjWwg26mz+4TrfA@mail.gmail.com>
2019-11-20 13:17       ` Yusuf Altıparmak
2019-11-20 13:34         ` Andrey Zhizhikin
2019-11-20 13:56           ` Atakan AKBULUT
2019-11-20 14:08             ` Yusuf Altıparmak
2019-11-20 15:00               ` Andrey Zhizhikin
2019-11-20 15:09                 ` Yusuf Altıparmak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.