All of lore.kernel.org
 help / color / mirror / Atom feed
* insmod - huawei E3372h kernel module
@ 2021-01-07 13:46 Zoltan Kerenyi Nagy
  2021-01-07 15:03 ` [yocto] " Zoran
  0 siblings, 1 reply; 31+ messages in thread
From: Zoltan Kerenyi Nagy @ 2021-01-07 13:46 UTC (permalink / raw)
  To: yocto

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

Hi Folks,

I bitbaked a Huawei E3372h driver into the distro with this recipe file:

SUMMARY = "Huawei Stick kernel module"
LICENSE = "CLOSED"

inherit module

SRC_URI = "file://Makefile \
           file://huawei_cdc_ncm.c \
          "

S = "${WORKDIR}"

The makefile looks like this:

obj-m := huawei_cdc_ncm.o

SRC := $(shell pwd)

all:
$(MAKE) -C $(KERNEL_SRC) M=$(SRC)

modules_install:
$(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install

clean:
rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
rm -f Module.markers Module.symvers modules.order
rm -rf .tmp_versions Modules.symvers

The source file is the one that matches the kernel:

https://elixir.bootlin.com/linux/v4.0/source/drivers/net/usb/huawei_cdc_ncm.c

I included this into the conf file:
KERNEL_MODULE_AUTOLOAD += "lte"KERNEL_MODULE_PROBECONF +=
"lte"huawei_cdc_ncm = "options lte iProduct=E3372h iManufacturer=Huawei"

Bitbake runs without error, however when I insert the SD card into the
hardware ( barix ipam 400)
and boot the hardware this is the error message:

root@barix-ipam400:~# insmod /lib/modules/4.10.0/extra/huawei_cdc_ncm.ko
insmod: can't insert '/lib/modules/4.10.0/extra/huawei_cdc_ncm.ko': *unknown
symbol in module, or unknown parameter*

To me it looks like that there was an error during the bitbake, or the
header files included in the driver doesn't match the kernel.

Do you have any idea how to procede?

Thanks,

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

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

* Re: [yocto] insmod - huawei E3372h kernel module
  2021-01-07 13:46 insmod - huawei E3372h kernel module Zoltan Kerenyi Nagy
@ 2021-01-07 15:03 ` Zoran
  2021-01-07 15:16   ` Zoltan Kerenyi Nagy
  0 siblings, 1 reply; 31+ messages in thread
From: Zoran @ 2021-01-07 15:03 UTC (permalink / raw)
  To: Zoltan Kerenyi Nagy; +Cc: Yocto-mailing-list

Hello Zoltan,

> root@barix-ipam400:~# insmod /lib/modules/4.10.0/extra/huawei_cdc_ncm.ko
> insmod: can't insert '/lib/modules/4.10.0/extra/huawei_cdc_ncm.ko': unknown symbol in module, or unknown parameter

Please, try to set Kconfig (obj-y := huawei_cdc_ncm.o) to y, I guess
99.9% that the kernel compilation (actually, driver compilation) will
pass.

I think YOCTO (recipe) behaves perfectly correctly.

Other approach: try to compile the same module with Makefile above on
the target.

(my two cent thoughts)

Zoran
_______

On Thu, Jan 7, 2021 at 2:46 PM Zoltan Kerenyi Nagy
<kerenyi.nagy.zoltan@gmail.com> wrote:
>
> Hi Folks,
>
> I bitbaked a Huawei E3372h driver into the distro with this recipe file:
>
> SUMMARY = "Huawei Stick kernel module"
> LICENSE = "CLOSED"
>
> inherit module
>
> SRC_URI = "file://Makefile \
>            file://huawei_cdc_ncm.c \
>           "
>
> S = "${WORKDIR}"
>
> The makefile looks like this:
>
> obj-m := huawei_cdc_ncm.o
>
> SRC := $(shell pwd)
>
> all:
> $(MAKE) -C $(KERNEL_SRC) M=$(SRC)
>
> modules_install:
> $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
>
> clean:
> rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
> rm -f Module.markers Module.symvers modules.order
> rm -rf .tmp_versions Modules.symvers
>
> The source file is the one that matches the kernel:
>
> https://elixir.bootlin.com/linux/v4.0/source/drivers/net/usb/huawei_cdc_ncm.c
>
> I included this into the conf file:
> KERNEL_MODULE_AUTOLOAD += "lte"KERNEL_MODULE_PROBECONF += "lte"huawei_cdc_ncm = "options lte iProduct=E3372h iManufacturer=Huawei"
>
> Bitbake runs without error, however when I insert the SD card into the hardware ( barix ipam 400)
> and boot the hardware this is the error message:
>
> root@barix-ipam400:~# insmod /lib/modules/4.10.0/extra/huawei_cdc_ncm.ko
> insmod: can't insert '/lib/modules/4.10.0/extra/huawei_cdc_ncm.ko': unknown symbol in module, or unknown parameter
>
> To me it looks like that there was an error during the bitbake, or the header files included in the driver doesn't match the kernel.
>
> Do you have any idea how to procede?
>
> Thanks,
>
>
>
> --
> Zolee
> 
>

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

* Re: [yocto] insmod - huawei E3372h kernel module
  2021-01-07 15:03 ` [yocto] " Zoran
@ 2021-01-07 15:16   ` Zoltan Kerenyi Nagy
  2021-01-07 15:27     ` Zoran
                       ` (2 more replies)
  0 siblings, 3 replies; 31+ messages in thread
From: Zoltan Kerenyi Nagy @ 2021-01-07 15:16 UTC (permalink / raw)
  To: Zoran Stojsavljevic; +Cc: Yocto-mailing-list

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

Hi Zoran,

Thanks, I modified the Makefile:

obj-m := huawei_cdc_ncm.o
Kconfig (obj-y := huawei_cdc_ncm.o)
SRC := $(shell pwd)
all:
$(MAKE) -C $(KERNEL_SRC) M=$(SRC)
modules_install:
$(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
clean:
rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
rm -f Module.markers Module.symvers modules.order
rm -rf .tmp_versions Modules.symvers

but this is the error:

ERROR: huawei-1.1-r0 do_configure: oe_runmake failed
ERROR: huawei-1.1-r0 do_configure: Function failed: do_configure (log file
is located at
/home/kerenyiz/oe-core/build/tmp-glibc/work/barix_ipam400-oe-linux-gnueabi/huawei/1.1-r0/temp/log.do_configure.4488)
ERROR: Logfile of failure stored in:
/home/kerenyiz/oe-core/build/tmp-glibc/work/barix_ipam400-oe-linux-gnueabi/huawei/1.1-r0/temp/log.do_configure.4488
Log data follows:
| DEBUG: Executing shell function do_configure
| NOTE: make
KERNEL_SRC=/home/kerenyiz/oe-core/build/tmp-glibc/work-shared/barix-ipam400/kernel-source
clean
| ERROR: oe_runmake failed
| Makefile:2: *** empty variable name.  Stop.
| ERROR: Function failed: do_configure (log file is located at
/home/kerenyiz/oe-core/build/tmp-glibc/work/barix_ipam400-oe-linux-gnueabi/huawei/1.1-r0/temp/log.do_configure.4488)
ERROR: Task
(/home/kerenyiz/oe-core/build/../stuff/meta-barix-sdk/recipes-z/kernel-modules/huawei/huawei_1.1.bb:do_configure)
failed with exit code '1'
NOTE: Tasks Summary: Attempted 3880 tasks of which 3873 didn't need to be
rerun and 1 failed.

On Thu, 7 Jan 2021 at 16:03, Zoran Stojsavljevic <
zoran.stojsavljevic@gmail.com> wrote:

> Hello Zoltan,
>
> > root@barix-ipam400:~# insmod /lib/modules/4.10.0/extra/huawei_cdc_ncm.ko
> > insmod: can't insert '/lib/modules/4.10.0/extra/huawei_cdc_ncm.ko':
> unknown symbol in module, or unknown parameter
>
> Please, try to set Kconfig (obj-y := huawei_cdc_ncm.o) to y, I guess
> 99.9% that the kernel compilation (actually, driver compilation) will
> pass.
>
> I think YOCTO (recipe) behaves perfectly correctly.
>
> Other approach: try to compile the same module with Makefile above on
> the target.
>
> (my two cent thoughts)
>
> Zoran
> _______
>
> On Thu, Jan 7, 2021 at 2:46 PM Zoltan Kerenyi Nagy
> <kerenyi.nagy.zoltan@gmail.com> wrote:
> >
> > Hi Folks,
> >
> > I bitbaked a Huawei E3372h driver into the distro with this recipe file:
> >
> > SUMMARY = "Huawei Stick kernel module"
> > LICENSE = "CLOSED"
> >
> > inherit module
> >
> > SRC_URI = "file://Makefile \
> >            file://huawei_cdc_ncm.c \
> >           "
> >
> > S = "${WORKDIR}"
> >
> > The makefile looks like this:
> >
> > obj-m := huawei_cdc_ncm.o
> >
> > SRC := $(shell pwd)
> >
> > all:
> > $(MAKE) -C $(KERNEL_SRC) M=$(SRC)
> >
> > modules_install:
> > $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
> >
> > clean:
> > rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
> > rm -f Module.markers Module.symvers modules.order
> > rm -rf .tmp_versions Modules.symvers
> >
> > The source file is the one that matches the kernel:
> >
> >
> https://elixir.bootlin.com/linux/v4.0/source/drivers/net/usb/huawei_cdc_ncm.c
> >
> > I included this into the conf file:
> > KERNEL_MODULE_AUTOLOAD += "lte"KERNEL_MODULE_PROBECONF +=
> "lte"huawei_cdc_ncm = "options lte iProduct=E3372h iManufacturer=Huawei"
> >
> > Bitbake runs without error, however when I insert the SD card into the
> hardware ( barix ipam 400)
> > and boot the hardware this is the error message:
> >
> > root@barix-ipam400:~# insmod /lib/modules/4.10.0/extra/huawei_cdc_ncm.ko
> > insmod: can't insert '/lib/modules/4.10.0/extra/huawei_cdc_ncm.ko':
> unknown symbol in module, or unknown parameter
> >
> > To me it looks like that there was an error during the bitbake, or the
> header files included in the driver doesn't match the kernel.
> >
> > Do you have any idea how to procede?
> >
> > Thanks,
> >
> >
> >
> > --
> > Zolee
> > 
> >
>

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

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

* Re: [yocto] insmod - huawei E3372h kernel module
  2021-01-07 15:16   ` Zoltan Kerenyi Nagy
@ 2021-01-07 15:27     ` Zoran
       [not found]     ` <1657FCB4180F6472.31350@lists.yoctoproject.org>
  2021-01-08 10:24     ` Zoltan Kerenyi Nagy
  2 siblings, 0 replies; 31+ messages in thread
From: Zoran @ 2021-01-07 15:27 UTC (permalink / raw)
  To: Zoltan Kerenyi Nagy; +Cc: Yocto-mailing-list

No, no... I did not mean in the makefile to change m to y.

Please, maybe you can try to set your makefile to lookalike as these ones:
https://github.com/ZoranStojsavljevic/mikrobus/blob/mikrobusv2/Makefile
https://github.com/ZoranStojsavljevic/mikrobus/blob/mikrobusv2-debug/Makefile

Zoran
_______

On Thu, Jan 7, 2021 at 4:17 PM Zoltan Kerenyi Nagy
<kerenyi.nagy.zoltan@gmail.com> wrote:
>
> Hi Zoran,
>
> Thanks, I modified the Makefile:
>
> obj-m := huawei_cdc_ncm.o
> Kconfig (obj-y := huawei_cdc_ncm.o)
> SRC := $(shell pwd)
> all:
> $(MAKE) -C $(KERNEL_SRC) M=$(SRC)
> modules_install:
> $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
> clean:
> rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
> rm -f Module.markers Module.symvers modules.order
> rm -rf .tmp_versions Modules.symvers
>
> but this is the error:
>
> ERROR: huawei-1.1-r0 do_configure: oe_runmake failed
> ERROR: huawei-1.1-r0 do_configure: Function failed: do_configure (log file is located at /home/kerenyiz/oe-core/build/tmp-glibc/work/barix_ipam400-oe-linux-gnueabi/huawei/1.1-r0/temp/log.do_configure.4488)
> ERROR: Logfile of failure stored in: /home/kerenyiz/oe-core/build/tmp-glibc/work/barix_ipam400-oe-linux-gnueabi/huawei/1.1-r0/temp/log.do_configure.4488
> Log data follows:
> | DEBUG: Executing shell function do_configure
> | NOTE: make KERNEL_SRC=/home/kerenyiz/oe-core/build/tmp-glibc/work-shared/barix-ipam400/kernel-source clean
> | ERROR: oe_runmake failed
> | Makefile:2: *** empty variable name.  Stop.
> | ERROR: Function failed: do_configure (log file is located at /home/kerenyiz/oe-core/build/tmp-glibc/work/barix_ipam400-oe-linux-gnueabi/huawei/1.1-r0/temp/log.do_configure.4488)
> ERROR: Task (/home/kerenyiz/oe-core/build/../stuff/meta-barix-sdk/recipes-z/kernel-modules/huawei/huawei_1.1.bb:do_configure) failed with exit code '1'
> NOTE: Tasks Summary: Attempted 3880 tasks of which 3873 didn't need to be rerun and 1 failed.
>
> On Thu, 7 Jan 2021 at 16:03, Zoran Stojsavljevic <zoran.stojsavljevic@gmail.com> wrote:
>>
>> Hello Zoltan,
>>
>> > root@barix-ipam400:~# insmod /lib/modules/4.10.0/extra/huawei_cdc_ncm.ko
>> > insmod: can't insert '/lib/modules/4.10.0/extra/huawei_cdc_ncm.ko': unknown symbol in module, or unknown parameter
>>
>> Please, try to set Kconfig (obj-y := huawei_cdc_ncm.o) to y, I guess
>> 99.9% that the kernel compilation (actually, driver compilation) will
>> pass.
>>
>> I think YOCTO (recipe) behaves perfectly correctly.
>>
>> Other approach: try to compile the same module with Makefile above on
>> the target.
>>
>> (my two cent thoughts)
>>
>> Zoran
>> _______
>>
>> On Thu, Jan 7, 2021 at 2:46 PM Zoltan Kerenyi Nagy
>> <kerenyi.nagy.zoltan@gmail.com> wrote:
>> >
>> > Hi Folks,
>> >
>> > I bitbaked a Huawei E3372h driver into the distro with this recipe file:
>> >
>> > SUMMARY = "Huawei Stick kernel module"
>> > LICENSE = "CLOSED"
>> >
>> > inherit module
>> >
>> > SRC_URI = "file://Makefile \
>> >            file://huawei_cdc_ncm.c \
>> >           "
>> >
>> > S = "${WORKDIR}"
>> >
>> > The makefile looks like this:
>> >
>> > obj-m := huawei_cdc_ncm.o
>> >
>> > SRC := $(shell pwd)
>> >
>> > all:
>> > $(MAKE) -C $(KERNEL_SRC) M=$(SRC)
>> >
>> > modules_install:
>> > $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
>> >
>> > clean:
>> > rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
>> > rm -f Module.markers Module.symvers modules.order
>> > rm -rf .tmp_versions Modules.symvers
>> >
>> > The source file is the one that matches the kernel:
>> >
>> > https://elixir.bootlin.com/linux/v4.0/source/drivers/net/usb/huawei_cdc_ncm.c
>> >
>> > I included this into the conf file:
>> > KERNEL_MODULE_AUTOLOAD += "lte"KERNEL_MODULE_PROBECONF += "lte"huawei_cdc_ncm = "options lte iProduct=E3372h iManufacturer=Huawei"
>> >
>> > Bitbake runs without error, however when I insert the SD card into the hardware ( barix ipam 400)
>> > and boot the hardware this is the error message:
>> >
>> > root@barix-ipam400:~# insmod /lib/modules/4.10.0/extra/huawei_cdc_ncm.ko
>> > insmod: can't insert '/lib/modules/4.10.0/extra/huawei_cdc_ncm.ko': unknown symbol in module, or unknown parameter
>> >
>> > To me it looks like that there was an error during the bitbake, or the header files included in the driver doesn't match the kernel.
>> >
>> > Do you have any idea how to procede?
>> >
>> > Thanks,
>> >
>> >
>> >
>> > --
>> > Zolee
>> > 
>> >

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

* Re: [yocto] insmod - huawei E3372h kernel module
       [not found]     ` <1657FCB4180F6472.31350@lists.yoctoproject.org>
@ 2021-01-07 17:20       ` Zoran
       [not found]         ` <CAHwRhWZSW+g0qJkAQLz5npmi5ig37XTvM6r_tJWmpk3ERMB9ew@mail.gmail.com>
  2021-01-08 10:36         ` Zoltan Kerenyi Nagy
  0 siblings, 2 replies; 31+ messages in thread
From: Zoran @ 2021-01-07 17:20 UTC (permalink / raw)
  To: Zoran Stojsavljevic; +Cc: Zoltan Kerenyi Nagy, Yocto-mailing-list

If I think more... For driver development the Out Of (OOT) Tree driver
is a must, and so far the most efficient way is to have native tool
environment presence on the target, so the quick recompilation of the
module is a must/should be achieved... It is a pain doing this on the
host using cross compilation, or even building it to the kernel.

Once the driver is stable, then it should be built-in with Y in the
kernel, changing the YOCTO kernel defconfig (not the topic for this
problem, there is a good explanation how to do that in YOCTO manuals).

If the driver is out of shelf, it should be recompiled as built-in the kernel.

There are differences between having an OOT driver versus a built-in driver.

Since some variables and functions are exported in .c files, and not
propagated into related .h files. And then this makes some confusion
while having OOT drivers.

Zoran
_______

On Thu, Jan 7, 2021 at 4:27 PM Zoran via lists.yoctoproject.org
<zoran.stojsavljevic=gmail.com@lists.yoctoproject.org> wrote:
>
> No, no... I did not mean in the makefile to change m to y.
>
> Please, maybe you can try to set your makefile to lookalike as these ones:
> https://github.com/ZoranStojsavljevic/mikrobus/blob/mikrobusv2/Makefile
> https://github.com/ZoranStojsavljevic/mikrobus/blob/mikrobusv2-debug/Makefile
>
> Zoran
> _______
>
> On Thu, Jan 7, 2021 at 4:17 PM Zoltan Kerenyi Nagy
> <kerenyi.nagy.zoltan@gmail.com> wrote:
> >
> > Hi Zoran,
> >
> > Thanks, I modified the Makefile:
> >
> > obj-m := huawei_cdc_ncm.o
> > Kconfig (obj-y := huawei_cdc_ncm.o)
> > SRC := $(shell pwd)
> > all:
> > $(MAKE) -C $(KERNEL_SRC) M=$(SRC)
> > modules_install:
> > $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
> > clean:
> > rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
> > rm -f Module.markers Module.symvers modules.order
> > rm -rf .tmp_versions Modules.symvers
> >
> > but this is the error:
> >
> > ERROR: huawei-1.1-r0 do_configure: oe_runmake failed
> > ERROR: huawei-1.1-r0 do_configure: Function failed: do_configure (log file is located at /home/kerenyiz/oe-core/build/tmp-glibc/work/barix_ipam400-oe-linux-gnueabi/huawei/1.1-r0/temp/log.do_configure.4488)
> > ERROR: Logfile of failure stored in: /home/kerenyiz/oe-core/build/tmp-glibc/work/barix_ipam400-oe-linux-gnueabi/huawei/1.1-r0/temp/log.do_configure.4488
> > Log data follows:
> > | DEBUG: Executing shell function do_configure
> > | NOTE: make KERNEL_SRC=/home/kerenyiz/oe-core/build/tmp-glibc/work-shared/barix-ipam400/kernel-source clean
> > | ERROR: oe_runmake failed
> > | Makefile:2: *** empty variable name.  Stop.
> > | ERROR: Function failed: do_configure (log file is located at /home/kerenyiz/oe-core/build/tmp-glibc/work/barix_ipam400-oe-linux-gnueabi/huawei/1.1-r0/temp/log.do_configure.4488)
> > ERROR: Task (/home/kerenyiz/oe-core/build/../stuff/meta-barix-sdk/recipes-z/kernel-modules/huawei/huawei_1.1.bb:do_configure) failed with exit code '1'
> > NOTE: Tasks Summary: Attempted 3880 tasks of which 3873 didn't need to be rerun and 1 failed.
> >
> > On Thu, 7 Jan 2021 at 16:03, Zoran Stojsavljevic <zoran.stojsavljevic@gmail.com> wrote:
> >>
> >> Hello Zoltan,
> >>
> >> > root@barix-ipam400:~# insmod /lib/modules/4.10.0/extra/huawei_cdc_ncm.ko
> >> > insmod: can't insert '/lib/modules/4.10.0/extra/huawei_cdc_ncm.ko': unknown symbol in module, or unknown parameter
> >>
> >> Please, try to set Kconfig (obj-y := huawei_cdc_ncm.o) to y, I guess
> >> 99.9% that the kernel compilation (actually, driver compilation) will
> >> pass.
> >>
> >> I think YOCTO (recipe) behaves perfectly correctly.
> >>
> >> Other approach: try to compile the same module with Makefile above on
> >> the target.
> >>
> >> (my two cent thoughts)
> >>
> >> Zoran
> >> _______
> >>
> >> On Thu, Jan 7, 2021 at 2:46 PM Zoltan Kerenyi Nagy
> >> <kerenyi.nagy.zoltan@gmail.com> wrote:
> >> >
> >> > Hi Folks,
> >> >
> >> > I bitbaked a Huawei E3372h driver into the distro with this recipe file:
> >> >
> >> > SUMMARY = "Huawei Stick kernel module"
> >> > LICENSE = "CLOSED"
> >> >
> >> > inherit module
> >> >
> >> > SRC_URI = "file://Makefile \
> >> >            file://huawei_cdc_ncm.c \
> >> >           "
> >> >
> >> > S = "${WORKDIR}"
> >> >
> >> > The makefile looks like this:
> >> >
> >> > obj-m := huawei_cdc_ncm.o
> >> >
> >> > SRC := $(shell pwd)
> >> >
> >> > all:
> >> > $(MAKE) -C $(KERNEL_SRC) M=$(SRC)
> >> >
> >> > modules_install:
> >> > $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
> >> >
> >> > clean:
> >> > rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
> >> > rm -f Module.markers Module.symvers modules.order
> >> > rm -rf .tmp_versions Modules.symvers
> >> >
> >> > The source file is the one that matches the kernel:
> >> >
> >> > https://elixir.bootlin.com/linux/v4.0/source/drivers/net/usb/huawei_cdc_ncm.c
> >> >
> >> > I included this into the conf file:
> >> > KERNEL_MODULE_AUTOLOAD += "lte"KERNEL_MODULE_PROBECONF += "lte"huawei_cdc_ncm = "options lte iProduct=E3372h iManufacturer=Huawei"
> >> >
> >> > Bitbake runs without error, however when I insert the SD card into the hardware ( barix ipam 400)
> >> > and boot the hardware this is the error message:
> >> >
> >> > root@barix-ipam400:~# insmod /lib/modules/4.10.0/extra/huawei_cdc_ncm.ko
> >> > insmod: can't insert '/lib/modules/4.10.0/extra/huawei_cdc_ncm.ko': unknown symbol in module, or unknown parameter
> >> >
> >> > To me it looks like that there was an error during the bitbake, or the header files included in the driver doesn't match the kernel.
> >> >
> >> > Do you have any idea how to procede?
> >> >
> >> > Thanks,
> >> >
> >> >
> >> >
> >> > --
> >> > Zolee
> >> >
> >> >
>
> 
>

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

* Re: [yocto] insmod - huawei E3372h kernel module
       [not found]         ` <CAHwRhWZSW+g0qJkAQLz5npmi5ig37XTvM6r_tJWmpk3ERMB9ew@mail.gmail.com>
@ 2021-01-07 18:35           ` Zoran
  0 siblings, 0 replies; 31+ messages in thread
From: Zoran @ 2021-01-07 18:35 UTC (permalink / raw)
  To: Zoltan Kerenyi Nagy, Yocto-mailing-list

> Since some variables and functions are exported in .c files, and not
> propagated into related .h files. And then this makes some confusion
> while having OOT drivers.

Quite an opposite. It must be defined to be exported, and to appear in
Module.symvers .

If it is NOT defined as exported (EXPORT_SYMBOL, EXPORT_SYMBOL_GPL),
it will behave as from your initial post, if the driver is defined as
a module.

The example for this behaviour is here:
https://github.com/ZoranStojsavljevic/mikrobus/blob/mikrobusv2-debug/mikrobus_core.c#L447

Symbol regulator_register_always_on (it is NOT exported at all,
neither in include/linux/regulator/fixed.h, neither in
drivers/regulator/fixed-helper.c).

So the mikrobus driver, being a module, produces such an error:
unknown symbol in module, or unknown parameter .
_______

Sorry for the confusion. :(

Zoran
_______


On Thu, Jan 7, 2021 at 6:55 PM Zoltan Kerenyi Nagy
<kerenyi.nagy.zoltan@gmail.com> wrote:
>
> Yep, the best would be if the driver burned into the root filesystem with bitbake. I dont want to compile that driver on the device. I'll modifile the makefile tomorrow, thanks
>
> On 2021. Jan 7., Thu at 18:20, Zoran Stojsavljevic <zoran.stojsavljevic@gmail.com> wrote:
>>
>> If I think more... For driver development the Out Of (OOT) Tree driver
>> is a must, and so far the most efficient way is to have native tool
>> environment presence on the target, so the quick recompilation of the
>> module is a must/should be achieved... It is a pain doing this on the
>> host using cross compilation, or even building it to the kernel.
>>
>> Once the driver is stable, then it should be built-in with Y in the
>> kernel, changing the YOCTO kernel defconfig (not the topic for this
>> problem, there is a good explanation how to do that in YOCTO manuals).
>>
>> If the driver is out of shelf, it should be recompiled as built-in the kernel.
>>
>> There are differences between having an OOT driver versus a built-in driver.
>>
>> Since some variables and functions are exported in .c files, and not
>> propagated into related .h files. And then this makes some confusion
>> while having OOT drivers.
>>
>> Zoran
>> _______
>>
>> On Thu, Jan 7, 2021 at 4:27 PM Zoran via lists.yoctoproject.org
>> <zoran.stojsavljevic=gmail.com@lists.yoctoproject.org> wrote:
>> >
>> > No, no... I did not mean in the makefile to change m to y.
>> >
>> > Please, maybe you can try to set your makefile to lookalike as these ones:
>> > https://github.com/ZoranStojsavljevic/mikrobus/blob/mikrobusv2/Makefile
>> > https://github.com/ZoranStojsavljevic/mikrobus/blob/mikrobusv2-debug/Makefile
>> >
>> > Zoran
>> > _______
>> >
>> > On Thu, Jan 7, 2021 at 4:17 PM Zoltan Kerenyi Nagy
>> > <kerenyi.nagy.zoltan@gmail.com> wrote:
>> > >
>> > > Hi Zoran,
>> > >
>> > > Thanks, I modified the Makefile:
>> > >
>> > > obj-m := huawei_cdc_ncm.o
>> > > Kconfig (obj-y := huawei_cdc_ncm.o)
>> > > SRC := $(shell pwd)
>> > > all:
>> > > $(MAKE) -C $(KERNEL_SRC) M=$(SRC)
>> > > modules_install:
>> > > $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
>> > > clean:
>> > > rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
>> > > rm -f Module.markers Module.symvers modules.order
>> > > rm -rf .tmp_versions Modules.symvers
>> > >
>> > > but this is the error:
>> > >
>> > > ERROR: huawei-1.1-r0 do_configure: oe_runmake failed
>> > > ERROR: huawei-1.1-r0 do_configure: Function failed: do_configure (log file is located at /home/kerenyiz/oe-core/build/tmp-glibc/work/barix_ipam400-oe-linux-gnueabi/huawei/1.1-r0/temp/log.do_configure.4488)
>> > > ERROR: Logfile of failure stored in: /home/kerenyiz/oe-core/build/tmp-glibc/work/barix_ipam400-oe-linux-gnueabi/huawei/1.1-r0/temp/log.do_configure.4488
>> > > Log data follows:
>> > > | DEBUG: Executing shell function do_configure
>> > > | NOTE: make KERNEL_SRC=/home/kerenyiz/oe-core/build/tmp-glibc/work-shared/barix-ipam400/kernel-source clean
>> > > | ERROR: oe_runmake failed
>> > > | Makefile:2: *** empty variable name.  Stop.
>> > > | ERROR: Function failed: do_configure (log file is located at /home/kerenyiz/oe-core/build/tmp-glibc/work/barix_ipam400-oe-linux-gnueabi/huawei/1.1-r0/temp/log.do_configure.4488)
>> > > ERROR: Task (/home/kerenyiz/oe-core/build/../stuff/meta-barix-sdk/recipes-z/kernel-modules/huawei/huawei_1.1.bb:do_configure) failed with exit code '1'
>> > > NOTE: Tasks Summary: Attempted 3880 tasks of which 3873 didn't need to be rerun and 1 failed.
>> > >
>> > > On Thu, 7 Jan 2021 at 16:03, Zoran Stojsavljevic <zoran.stojsavljevic@gmail.com> wrote:
>> > >>
>> > >> Hello Zoltan,
>> > >>
>> > >> > root@barix-ipam400:~# insmod /lib/modules/4.10.0/extra/huawei_cdc_ncm.ko
>> > >> > insmod: can't insert '/lib/modules/4.10.0/extra/huawei_cdc_ncm.ko': unknown symbol in module, or unknown parameter
>> > >>
>> > >> Please, try to set Kconfig (obj-y := huawei_cdc_ncm.o) to y, I guess
>> > >> 99.9% that the kernel compilation (actually, driver compilation) will
>> > >> pass.
>> > >>
>> > >> I think YOCTO (recipe) behaves perfectly correctly.
>> > >>
>> > >> Other approach: try to compile the same module with Makefile above on
>> > >> the target.
>> > >>
>> > >> (my two cent thoughts)
>> > >>
>> > >> Zoran
>> > >> _______
>> > >>
>> > >> On Thu, Jan 7, 2021 at 2:46 PM Zoltan Kerenyi Nagy
>> > >> <kerenyi.nagy.zoltan@gmail.com> wrote:
>> > >> >
>> > >> > Hi Folks,
>> > >> >
>> > >> > I bitbaked a Huawei E3372h driver into the distro with this recipe file:
>> > >> >
>> > >> > SUMMARY = "Huawei Stick kernel module"
>> > >> > LICENSE = "CLOSED"
>> > >> >
>> > >> > inherit module
>> > >> >
>> > >> > SRC_URI = "file://Makefile \
>> > >> >            file://huawei_cdc_ncm.c \
>> > >> >           "
>> > >> >
>> > >> > S = "${WORKDIR}"
>> > >> >
>> > >> > The makefile looks like this:
>> > >> >
>> > >> > obj-m := huawei_cdc_ncm.o
>> > >> >
>> > >> > SRC := $(shell pwd)
>> > >> >
>> > >> > all:
>> > >> > $(MAKE) -C $(KERNEL_SRC) M=$(SRC)
>> > >> >
>> > >> > modules_install:
>> > >> > $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
>> > >> >
>> > >> > clean:
>> > >> > rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
>> > >> > rm -f Module.markers Module.symvers modules.order
>> > >> > rm -rf .tmp_versions Modules.symvers
>> > >> >
>> > >> > The source file is the one that matches the kernel:
>> > >> >
>> > >> > https://elixir.bootlin.com/linux/v4.0/source/drivers/net/usb/huawei_cdc_ncm.c
>> > >> >
>> > >> > I included this into the conf file:
>> > >> > KERNEL_MODULE_AUTOLOAD += "lte"KERNEL_MODULE_PROBECONF += "lte"huawei_cdc_ncm = "options lte iProduct=E3372h iManufacturer=Huawei"
>> > >> >
>> > >> > Bitbake runs without error, however when I insert the SD card into the hardware ( barix ipam 400)
>> > >> > and boot the hardware this is the error message:
>> > >> >
>> > >> > root@barix-ipam400:~# insmod /lib/modules/4.10.0/extra/huawei_cdc_ncm.ko
>> > >> > insmod: can't insert '/lib/modules/4.10.0/extra/huawei_cdc_ncm.ko': unknown symbol in module, or unknown parameter
>> > >> >
>> > >> > To me it looks like that there was an error during the bitbake, or the header files included in the driver doesn't match the kernel.
>> > >> >
>> > >> > Do you have any idea how to procede?
>> > >> >
>> > >> > Thanks,
>> > >> >
>> > >> >
>> > >> >
>> > >> > --
>> > >> > Zolee
>> > >> >
>> > >> >
>> >
>> > 
>> >

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

* Re: insmod - huawei E3372h kernel module
  2021-01-07 15:16   ` Zoltan Kerenyi Nagy
  2021-01-07 15:27     ` Zoran
       [not found]     ` <1657FCB4180F6472.31350@lists.yoctoproject.org>
@ 2021-01-08 10:24     ` Zoltan Kerenyi Nagy
  2 siblings, 0 replies; 31+ messages in thread
From: Zoltan Kerenyi Nagy @ 2021-01-08 10:24 UTC (permalink / raw)
  To: yocto

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

Hi,

Makefile: huawei_cdc_ncm-y :=    huawei_cdc_ncm.o obj-m += huawei_cdc_ncm.o KDIR ?= /lib/modules/`uname -r`/build all: make -C $(KDIR) M=$(PWD) modules clean: make -C $(KDIR) M=$(PWD) clean install: cp *.ko /lib/modules/$(shell uname -r)/kernel/drivers/misc/ depmod -a

This one doesnt work:
DEBUG: Executing shell function do_compile NOTE: make -j 8 KERNEL_SRC=/home/kerenyiz/oe-core/build/tmp-glibc/work-shared/barix-ipam400/kernel-source KERNEL_PATH=/home/kerenyiz/oe-core/build/tmp-glibc/work-shared/barix-ipam400/kernel-source KERNEL_VERSION=4.10.0 CC=arm-oe-linux-gnueabi-gcc   -fuse-ld=bfd LD=arm-oe-linux-gnueabi-ld.bfd   AR=arm-oe-linux-gnueabi-ar  O=/home/kerenyiz/oe-core/build/tmp-glibc/work-shared/barix-ipam400/kernel-build-artifacts KBUILD_EXTRA_SYMBOLS= ERROR: oe_runmake failed make -C /lib/modules/`uname -r`/build M=/home/kerenyiz/oe-core/build/tmp-glibc/work/barix_ipam400-oe-linux-gnueabi/huawei/1.1-r0 modules make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule. make[1]: Entering directory '/usr/src/linux-headers-4.15.0-88-generic' make[2]: Entering directory '/home/kerenyiz/oe-core/build/tmp-glibc/work-shared/barix-ipam400/kernel-build-artifacts' make[3]: Circular /home/kerenyiz/oe-core/build/tmp-glibc/work/barix_ipam400-oe-linux-gnueabi/huawei/1.1-r0/huawei_cdc_ncm.o <- /home/kerenyiz/oe-core/build/tmp-glibc/work/barix_ipam400-oe-linux-gnueabi/huawei/1.1-r0/huawei_cdc_ncm.o dependency dropped. LD [M]  /home/kerenyiz/oe-core/build/tmp-glibc/work/barix_ipam400-oe-linux-gnueabi/huawei/1.1-r0/huawei_cdc_ncm.o arm-oe-linux-gnueabi-ld.bfd: no input files /usr/src/linux-headers-4.15.0-88-generic/scripts/Makefile.build:578: recipe for target '/home/kerenyiz/oe-core/build/tmp-glibc/work/barix_ipam400-oe-linux-gnueabi/huawei/1.1-r0/huawei_cdc_ncm.o' failed make[3]: *** [/home/kerenyiz/oe-core/build/tmp-glibc/work/barix_ipam400-oe-linux-gnueabi/huawei/1.1-r0/huawei_cdc_ncm.o] Error 1 /usr/src/linux-headers-4.15.0-88-generic/Makefile:1577: recipe for target '_module_/home/kerenyiz/oe-core/build/tmp-glibc/work/barix_ipam400-oe-linux-gnueabi/huawei/1.1-r0' failed make[2]: *** [_module_/home/kerenyiz/oe-core/build/tmp-glibc/work/barix_ipam400-oe-linux-gnueabi/huawei/1.1-r0] Error 2 make[2]: Leaving directory '/home/kerenyiz/oe-core/build/tmp-glibc/work-shared/barix-ipam400/kernel-build-artifacts' Makefile:146: recipe for target 'sub-make' failed make[1]: *** [sub-make] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-88-generic' Makefile:25: recipe for target 'all' failed make: *** [all] Error 2 ERROR: F --
Zolee

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

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

* Re: insmod - huawei E3372h kernel module
  2021-01-07 17:20       ` Zoran
       [not found]         ` <CAHwRhWZSW+g0qJkAQLz5npmi5ig37XTvM6r_tJWmpk3ERMB9ew@mail.gmail.com>
@ 2021-01-08 10:36         ` Zoltan Kerenyi Nagy
  2021-01-08 11:22           ` Zoltan Kerenyi Nagy
  1 sibling, 1 reply; 31+ messages in thread
From: Zoltan Kerenyi Nagy @ 2021-01-08 10:36 UTC (permalink / raw)
  To: yocto

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

Hi,

I managed to bitbake with these:

http://paste.ubuntu.com/p/4W2525MQDj/

http://paste.ubuntu.com/p/VT3zyhy7h2/

I'm very curious how it behaves on the hardware

--
Zolee

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

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

* Re: insmod - huawei E3372h kernel module
  2021-01-08 10:36         ` Zoltan Kerenyi Nagy
@ 2021-01-08 11:22           ` Zoltan Kerenyi Nagy
  2021-01-08 11:59             ` [yocto] " Zoran
  0 siblings, 1 reply; 31+ messages in thread
From: Zoltan Kerenyi Nagy @ 2021-01-08 11:22 UTC (permalink / raw)
  To: yocto

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

No success :-(

insmod /lib/modules/4.10.0/extra/huawei_cdc_ncm.ko
insmod: can't insert '/lib/modules/4.10.0/extra/huawei_cdc_ncm.ko': *unknown symbol in module, or unknown parameter*

--
Zolee

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

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

* Re: [yocto] insmod - huawei E3372h kernel module
  2021-01-08 11:22           ` Zoltan Kerenyi Nagy
@ 2021-01-08 11:59             ` Zoran
  2021-01-08 12:28               ` Zoltan Kerenyi Nagy
  2021-01-08 12:35               ` Zoltan Kerenyi Nagy
  0 siblings, 2 replies; 31+ messages in thread
From: Zoran @ 2021-01-08 11:59 UTC (permalink / raw)
  To: Zoltan Kerenyi Nagy; +Cc: Yocto-mailing-list

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

> insmod /lib/modules/4.10.0/extra/huawei_cdc_ncm.ko
> insmod: can't insert '/lib/modules/4.10.0/extra/huawei_cdc_ncm.ko': *unknown
symbol in module, or unknown parameter*

On my target (Pocket Bone):

debian@arm:/lib/modules/5.8.18-bone24/kernel$ find . -name huawei_cdc_ncm*
./drivers/net/usb/huawei_cdc_ncm.ko.xz
debian@arm:/lib/modules/5.8.18-bone24/kernel$ cd ./drivers/net/usb/






*debian@arm:/lib/modules/5.8.18-bone24/kernel/drivers/net/sudo insmod
huawei_cdc_ncm.ko.xz[ 6554.826591] huawei_cdc_ncm: Unknown symbol
cdc_ncm_tx_fixup (err -2)[ 6554.833115] huawei_cdc_ncm: Unknown symbol
cdc_ncm_bind_common (err -2)[ 6554.841745] huawei_cdc_ncm: Unknown symbol
usb_cdc_wdm_register (err -2)[ 6554.849680] huawei_cdc_ncm: Unknown symbol
cdc_ncm_unbind (err -2)[ 6554.857042] huawei_cdc_ncm: Unknown symbol
cdc_ncm_rx_fixup (err -2)insmod: ERROR: could not insert module
huawei_cdc_ncm.ko.xz: Unknown symbol in module*
debian@arm:/lib/modules/5.8.18-bone24/kernel/drivers/net/usb$ uname -a
Linux arm 5.8.18-bone24 #1 PREEMPT Sun Dec 13 19:15:04 CET 2020 armv7l
GNU/Linux
debian@arm:/lib/modules/5.8.18-bone24/kernel/drivers/net/usb$ cat
/etc/debian_version
10.7
debian@arm:/lib/modules/5.8.18-bone24/kernel/drivers/net/usb$

Good Luck!
Zoran
_______


On Fri, Jan 8, 2021 at 12:22 PM Zoltan Kerenyi Nagy <
kerenyi.nagy.zoltan@gmail.com> wrote:

> No success :-(
>
> insmod /lib/modules/4.10.0/extra/huawei_cdc_ncm.ko
> insmod: can't insert '/lib/modules/4.10.0/extra/huawei_cdc_ncm.ko': *unknown
> symbol in module, or unknown parameter*
>
> --
> Zolee
> 
>
>

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

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

* Re: insmod - huawei E3372h kernel module
  2021-01-08 11:59             ` [yocto] " Zoran
@ 2021-01-08 12:28               ` Zoltan Kerenyi Nagy
  2021-01-08 12:49                 ` [yocto] " Zoran
       [not found]                 ` <165842AB3B8C5237.7830@lists.yoctoproject.org>
  2021-01-08 12:35               ` Zoltan Kerenyi Nagy
  1 sibling, 2 replies; 31+ messages in thread
From: Zoltan Kerenyi Nagy @ 2021-01-08 12:28 UTC (permalink / raw)
  To: yocto

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

Does it mean that it will never ever work?

Could you please try this one? This might match your kernel version:

https://elixir.bootlin.com/linux/v5.8.18/source/drivers/net/usb/huawei_cdc_ncm.c
--
Zolee

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

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

* Re: insmod - huawei E3372h kernel module
  2021-01-08 11:59             ` [yocto] " Zoran
  2021-01-08 12:28               ` Zoltan Kerenyi Nagy
@ 2021-01-08 12:35               ` Zoltan Kerenyi Nagy
  1 sibling, 0 replies; 31+ messages in thread
From: Zoltan Kerenyi Nagy @ 2021-01-08 12:35 UTC (permalink / raw)
  To: yocto

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

I experimented with the latest and greatest source, this is my log during bitbake:

http://paste.ubuntu.com/p/R5PjtrtVYn/

Thank you for your efforts!
--
Zolee

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

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

* Re: [yocto] insmod - huawei E3372h kernel module
  2021-01-08 12:28               ` Zoltan Kerenyi Nagy
@ 2021-01-08 12:49                 ` Zoran
       [not found]                 ` <165842AB3B8C5237.7830@lists.yoctoproject.org>
  1 sibling, 0 replies; 31+ messages in thread
From: Zoran @ 2021-01-08 12:49 UTC (permalink / raw)
  To: Zoltan Kerenyi Nagy; +Cc: Yocto-mailing-list

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

> Does it mean that it will never ever work?
> Could you please try this one? This might match your kernel version:
>
https://elixir.bootlin.com/linux/v5.8.18/source/drivers/net/usb/huawei_cdc_ncm.c
>
> Zolee

[vuser@fedora33-ssd usb]$ kdiff3 huawei_cdc_ncm_5.8.18.c huawei_cdc_ncm.c
org.kde.kdiff3: "Loading A: /home/vuser/projects/
kernel.bb/bb-kernel-5.8.18-bone24/KERNEL/drivers/net/usb/huawei_cdc_ncm_5.8.18.c
"
"/proc/1715042/root"
org.kde.kdiff3: Loading B:  "/home/vuser/projects/
kernel.bb/bb-kernel-5.8.18-bone24/KERNEL/drivers/net/usb/huawei_cdc_ncm.c"
[vuser@fedora33-ssd usb]$ diff huawei_cdc_ncm_5.8.18.c huawei_cdc_ncm.c
[vuser@fedora33-ssd usb]$ diff -c huawei_cdc_ncm_5.8.18.c huawei_cdc_ncm.c
[vuser@fedora33-ssd usb]$ diff -s huawei_cdc_ncm_5.8.18.c huawei_cdc_ncm.c
Files huawei_cdc_ncm_5.8.18.c and huawei_cdc_ncm.c are identical
[vuser@fedora33-ssd usb]$

This is the same modul. You need to try to built-in this one in the kernel.

Obviously, you need to load some basic module, this one is dependent upon
(my best guess).

This one is missing. Maybe this one!

$ cat config-5.8.18-bone24 | grep HUAWEI
*# CONFIG_NET_VENDOR_HUAWEI is not set*
CONFIG_USB_NET_HUAWEI_CDC_NCM=m

Zee
_______

On Fri, Jan 8, 2021 at 1:29 PM Zoltan Kerenyi Nagy <
kerenyi.nagy.zoltan@gmail.com> wrote:

> Does it mean that it will never ever work?
>
> Could you please try this one? This might match your kernel version:
>
>
> https://elixir.bootlin.com/linux/v5.8.18/source/drivers/net/usb/huawei_cdc_ncm.c
> --
> Zolee
> 
>
>

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

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

* Re: [yocto] insmod - huawei E3372h kernel module
       [not found]                 ` <165842AB3B8C5237.7830@lists.yoctoproject.org>
@ 2021-01-08 14:43                   ` Zoran
  2021-01-11 10:23                     ` Zoltan Kerenyi Nagy
                                       ` (3 more replies)
  0 siblings, 4 replies; 31+ messages in thread
From: Zoran @ 2021-01-08 14:43 UTC (permalink / raw)
  To: Zoran Stojsavljevic; +Cc: Zoltan Kerenyi Nagy, Yocto-mailing-list

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

Even better:

debian@arm:/lib/modules/5.8.18-bone24/kernel/drivers/net/usb$ lsmod
Module                  Size  Used by


*huawei_cdc_ncm         16384  0cdc_wdm                24576  1
huawei_cdc_ncmcdc_ncm                32768  1 huawei_cdc_ncm*
spidev                 20480  0
evdev                  20480  1
usb_f_acm              20480  2
u_serial               24576  3 usb_f_acm
usb_f_ncm              24576  2
usb_f_rndis            24576  4
u_ether                24576  2 usb_f_ncm,usb_f_rndis
libcomposite           49152  16 usb_f_acm,usb_f_ncm,usb_f_rndis
8021q                  24576  0
garp                   16384  1 8021q
stp                    16384  1 garp
mrp                    16384  1 8021q
llc                    16384  2 garp,stp
iptable_nat            16384  0
nf_nat                 28672  1 iptable_nat
nf_conntrack           98304  1 nf_nat
nf_defrag_ipv6         20480  1 nf_conntrack
nf_defrag_ipv4         16384  1 nf_conntrack
iptable_mangle         16384  0
iptable_filter         16384  0
mikrobus_test          16384  1
mikrobus               32768  1 mikrobus_test
ip_tables              24576  3 iptable_mangle,iptable_filter,iptable_nat
x_tables               24576  3 iptable_mangle,ip_tables,iptable_filter
debian@arm:/lib/modules/5.8.18-bone24/kernel/drivers/net/usb$

Zolee, U need (based upon this lsmod on my target) to solve the problem
(homework for you).

( U owe me double Glenmorangie on rocks! )

Zee
_______

On Fri, Jan 8, 2021 at 1:49 PM Zoran via lists.yoctoproject.org
<zoran.stojsavljevic=gmail.com@lists.yoctoproject.org> wrote:

> > Does it mean that it will never ever work?
> > Could you please try this one? This might match your kernel version:
> >
> https://elixir.bootlin.com/linux/v5.8.18/source/drivers/net/usb/huawei_cdc_ncm.c
> >
> > Zolee
>
> [vuser@fedora33-ssd usb]$ kdiff3 huawei_cdc_ncm_5.8.18.c huawei_cdc_ncm.c
> org.kde.kdiff3: "Loading A: /home/vuser/projects/
> kernel.bb/bb-kernel-5.8.18-bone24/KERNEL/drivers/net/usb/huawei_cdc_ncm_5.8.18.c
> "
> "/proc/1715042/root"
> org.kde.kdiff3: Loading B:  "/home/vuser/projects/
> kernel.bb/bb-kernel-5.8.18-bone24/KERNEL/drivers/net/usb/huawei_cdc_ncm.c"
> [vuser@fedora33-ssd usb]$ diff huawei_cdc_ncm_5.8.18.c huawei_cdc_ncm.c
> [vuser@fedora33-ssd usb]$ diff -c huawei_cdc_ncm_5.8.18.c huawei_cdc_ncm.c
> [vuser@fedora33-ssd usb]$ diff -s huawei_cdc_ncm_5.8.18.c huawei_cdc_ncm.c
> Files huawei_cdc_ncm_5.8.18.c and huawei_cdc_ncm.c are identical
> [vuser@fedora33-ssd usb]$
>
> This is the same modul. You need to try to built-in this one in the kernel.
>
> Obviously, you need to load some basic module, this one is dependent upon
> (my best guess).
>
> This one is missing. Maybe this one!
>
> $ cat config-5.8.18-bone24 | grep HUAWEI
> *# CONFIG_NET_VENDOR_HUAWEI is not set*
> CONFIG_USB_NET_HUAWEI_CDC_NCM=m
>
> Zee
> _______
>
> On Fri, Jan 8, 2021 at 1:29 PM Zoltan Kerenyi Nagy <
> kerenyi.nagy.zoltan@gmail.com> wrote:
>
>> Does it mean that it will never ever work?
>>
>> Could you please try this one? This might match your kernel version:
>>
>>
>> https://elixir.bootlin.com/linux/v5.8.18/source/drivers/net/usb/huawei_cdc_ncm.c
>> --
>> Zolee
>>
>>
>>
> 
>
>

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

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

* Re: insmod - huawei E3372h kernel module
  2021-01-08 14:43                   ` Zoran
@ 2021-01-11 10:23                     ` Zoltan Kerenyi Nagy
  2021-01-11 13:20                     ` Zoltan Kerenyi Nagy
                                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 31+ messages in thread
From: Zoltan Kerenyi Nagy @ 2021-01-11 10:23 UTC (permalink / raw)
  To: yocto

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

Hi, Im doing this:

KERNEL_MODULE_AUTOLOAD += "ncm_driver"KERNEL_MODULE_PROBECONF += "ncm_driver"cdc_ncm = "options ncm_driver iProduct=USB_Host_Driver_for_Network_Control_Model iManufacturer=NCM" KERNEL_MODULE_AUTOLOAD += "wmc_device_managment"KERNEL_MODULE_PROBECONF += "wmc_device"cdc_wdm = "options wmc_device iProduct=USB_CDC_WCM_Device_Management iManufacturer=WMC" KERNEL_MODULE_AUTOLOAD += "lte"KERNEL_MODULE_PROBECONF += "lte"huawei_cdc_ncm = "options lte iProduct=E3372h iManufacturer=Huawei"

Im very curious. I think the *cdc_ncm* and *cdc_wdm should* be inserted before *huawei_cdc_ncm* --
Zolee

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

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

* Re: insmod - huawei E3372h kernel module
  2021-01-08 14:43                   ` Zoran
  2021-01-11 10:23                     ` Zoltan Kerenyi Nagy
@ 2021-01-11 13:20                     ` Zoltan Kerenyi Nagy
  2021-01-12 15:13                     ` Zoltan Kerenyi Nagy
  2021-01-17 12:34                     ` Zoltan Kerenyi Nagy
  3 siblings, 0 replies; 31+ messages in thread
From: Zoltan Kerenyi Nagy @ 2021-01-11 13:20 UTC (permalink / raw)
  To: yocto

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

I managed to bitbake without errors/warning the 2 additional modules, however I cannot load those modules manually on the device:

http://paste.ubuntu.com/p/My4x5j3t4R/

Do you you have any idea?
--
Zolee

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

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

* Re: insmod - huawei E3372h kernel module
  2021-01-08 14:43                   ` Zoran
  2021-01-11 10:23                     ` Zoltan Kerenyi Nagy
  2021-01-11 13:20                     ` Zoltan Kerenyi Nagy
@ 2021-01-12 15:13                     ` Zoltan Kerenyi Nagy
  2021-01-12 15:17                       ` Zoltan Kerenyi Nagy
  2021-01-17 12:34                     ` Zoltan Kerenyi Nagy
  3 siblings, 1 reply; 31+ messages in thread
From: Zoltan Kerenyi Nagy @ 2021-01-12 15:13 UTC (permalink / raw)
  To: yocto

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

Intrestingly modprobe gives me a different error than insmod:
To me this means that it's gonna be a Yocto issue during bitbake.
My testing kernel module (hello word) bitbakes, and can be loaded and unloaded on the hardware
root@barix-ipam400:~# modprobe /lib/modules/4.10.0/extra/cdc-ncm.ko modprobe: module /lib/modules/4.10.0/extra/cdc-ncm.ko not found in modules.dep root@barix-ipam400:~# root@barix-ipam400:~# modprobe /lib/modules/4.10.0/extra/cdc-wdm.ko modprobe: module /lib/modules/4.10.0/extra/cdc-wdm.ko not found in modules.dep root@barix-ipam400:~# root@barix-ipam400:~# modprobe /lib/modules/4.10.0/extra/h hello.ko           huawei_cdc_ncm.ko root@barix-ipam400:~# modprobe /lib/modules/4.10.0/extra/huawei_cdc_ncm.ko modprobe: module /lib/modules/4.10.0/extra/huawei_cdc_ncm.ko not found in modules.dep root@barix-ipam400:~#

--
Zolee

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

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

* Re: insmod - huawei E3372h kernel module
  2021-01-12 15:13                     ` Zoltan Kerenyi Nagy
@ 2021-01-12 15:17                       ` Zoltan Kerenyi Nagy
  0 siblings, 0 replies; 31+ messages in thread
From: Zoltan Kerenyi Nagy @ 2021-01-12 15:17 UTC (permalink / raw)
  To: yocto

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

If I make a symbolic link for modprobe, the message is the same like insmod: root@barix-ipam400:~# ln -s /lib/modules/4.10.0/extra/cdc-ncm.ko /lib/modules/4.10.0/ root@barix-ipam400:~# modprobe cdc_ncm.ko modprobe: can't load module cdc_wdm (extra/cdc-wdm.ko): invalid module format
--
Zolee

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

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

* Re: insmod - huawei E3372h kernel module
  2021-01-08 14:43                   ` Zoran
                                       ` (2 preceding siblings ...)
  2021-01-12 15:13                     ` Zoltan Kerenyi Nagy
@ 2021-01-17 12:34                     ` Zoltan Kerenyi Nagy
  2021-01-17 22:27                       ` [yocto] " Zoran
  3 siblings, 1 reply; 31+ messages in thread
From: Zoltan Kerenyi Nagy @ 2021-01-17 12:34 UTC (permalink / raw)
  To: yocto

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

Hi,

I contacted the kernel module (cdc_ncm) developper, and he suggested to change/experiment the kernel module load order.

I thought if I specify this way: KERNEL_MODULE_AUTOLOAD += "ncm_driver"KERNEL_MODULE_PROBECONF += "ncm_driver"cdc_ncm = "options ncm_driver iProduct=USB_Host_Driver_for_Network_Control_Model iManufacturer=NCM" KERNEL_MODULE_AUTOLOAD += "wmc_device_managment"KERNEL_MODULE_PROBECONF += "wmc_device"cdc_wdm = "options wmc_device iProduct=USB_CDC_WCM_Device_Management iManufacturer=WMC" KERNEL_MODULE_AUTOLOAD += "lte"KERNEL_MODULE_PROBECONF += "lte"huawei_cdc_ncm = "options lte iProduct=E3372h iManufacturer=Huawei"
Than this means the order of loading too. Is there any additional feature in Yocto that can interfere and set the exact kernel module loading order?

Thanks,

--
Zolee

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

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

* Re: [yocto] insmod - huawei E3372h kernel module
  2021-01-17 12:34                     ` Zoltan Kerenyi Nagy
@ 2021-01-17 22:27                       ` Zoran
  2021-01-18  5:27                         ` Zoltan Kerenyi Nagy
                                           ` (2 more replies)
  0 siblings, 3 replies; 31+ messages in thread
From: Zoran @ 2021-01-17 22:27 UTC (permalink / raw)
  To: Zoltan Kerenyi Nagy; +Cc: Yocto-mailing-list

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

> KERNEL_MODULE_AUTOLOAD += "ncm_driver"KERNEL_MODULE_PROBECONF
> += "ncm_driver"*cdc_ncm* = "options ncm_driver iProduct=
> USB_Host_Driver_for_Network_Control_Model iManufacturer=NCM"

> KERNEL_MODULE_AUTOLOAD += "wmc_device_managment"
> KERNEL_MODULE_PROBECONF += "wmc_device"*cdc_wdm* = "options wmc_device
> iProduct=USB_CDC_WCM_Device_Management iManufacturer=WMC"

> KERNEL_MODULE_AUTOLOAD += "lte"KERNEL_MODULE_PROBECONF +=
> "lte"*huawei_cdc_ncm* = "options lte iProduct=E3372h iManufacturer=Huawei"

Here is the exact loading order, outlined in target's /etc/modules :

debian@arm:~$ cat /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

*cdc_ncm*
*cdc_wdm*
*huawei_cdc_ncm*

You need to, using YOCTO recipes, to modify /etc/modules file to look
as shown above, while bitbaking the target.

Zoran
_______


On Sun, Jan 17, 2021 at 1:34 PM Zoltan Kerenyi Nagy <
kerenyi.nagy.zoltan@gmail.com> wrote:

> Hi,
>
> I contacted the kernel module (cdc_ncm) developper, and he suggested to
> change/experiment the kernel module load order.
>
> I thought if I specify this way: KERNEL_MODULE_AUTOLOAD +=
> "ncm_driver"KERNEL_MODULE_PROBECONF += "ncm_driver"cdc_ncm = "options
> ncm_driver iProduct=USB_Host_Driver_for_Network_Control_Model
> iManufacturer=NCM" KERNEL_MODULE_AUTOLOAD +=
> "wmc_device_managment"KERNEL_MODULE_PROBECONF += "wmc_device"cdc_wdm =
> "options wmc_device iProduct=USB_CDC_WCM_Device_Management
> iManufacturer=WMC" KERNEL_MODULE_AUTOLOAD += "lte"KERNEL_MODULE_PROBECONF
> += "lte"huawei_cdc_ncm = "options lte iProduct=E3372h iManufacturer=Huawei"
> Than this means the order of loading too. Is there any additional feature
> in Yocto that can interfere and set the exact kernel module loading order?
>
> Thanks,
>
>
> --
> Zolee
> 
>
>

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

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

* Re: [yocto] insmod - huawei E3372h kernel module
  2021-01-17 22:27                       ` [yocto] " Zoran
@ 2021-01-18  5:27                         ` Zoltan Kerenyi Nagy
  2021-01-19 13:00                         ` Zoltan Kerenyi Nagy
  2021-01-19 13:41                         ` Zoltan Kerenyi Nagy
  2 siblings, 0 replies; 31+ messages in thread
From: Zoltan Kerenyi Nagy @ 2021-01-18  5:27 UTC (permalink / raw)
  To: Zoran Stojsavljevic; +Cc: Yocto-mailing-list

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

Thank you Zoran, I will do it :-)

On 2021. Jan 17., Sun at 23:27, Zoran Stojsavljevic <
zoran.stojsavljevic@gmail.com> wrote:

> > KERNEL_MODULE_AUTOLOAD += "ncm_driver"KERNEL_MODULE_PROBECONF
> > += "ncm_driver"*cdc_ncm* = "options ncm_driver iProduct=
> > USB_Host_Driver_for_Network_Control_Model iManufacturer=NCM"
>
> > KERNEL_MODULE_AUTOLOAD += "wmc_device_managment"
> > KERNEL_MODULE_PROBECONF += "wmc_device"*cdc_wdm* = "options wmc_device
> > iProduct=USB_CDC_WCM_Device_Management iManufacturer=WMC"
>
> > KERNEL_MODULE_AUTOLOAD += "lte"KERNEL_MODULE_PROBECONF +=
> > "lte"*huawei_cdc_ncm* = "options lte iProduct=E3372h
> iManufacturer=Huawei"
>
> Here is the exact loading order, outlined in target's /etc/modules :
>
> debian@arm:~$ cat /etc/modules
> # /etc/modules: kernel modules to load at boot time.
> #
> # This file contains the names of kernel modules that should be loaded
> # at boot time, one per line. Lines beginning with "#" are ignored.
>
> *cdc_ncm*
> *cdc_wdm*
> *huawei_cdc_ncm*
>
> You need to, using YOCTO recipes, to modify /etc/modules file to look
> as shown above, while bitbaking the target.
>
> Zoran
> _______
>
>
> On Sun, Jan 17, 2021 at 1:34 PM Zoltan Kerenyi Nagy <
> kerenyi.nagy.zoltan@gmail.com> wrote:
>
>> Hi,
>>
>> I contacted the kernel module (cdc_ncm) developper, and he suggested to
>> change/experiment the kernel module load order.
>>
>> I thought if I specify this way: KERNEL_MODULE_AUTOLOAD +=
>> "ncm_driver"KERNEL_MODULE_PROBECONF += "ncm_driver"cdc_ncm = "options
>> ncm_driver iProduct=USB_Host_Driver_for_Network_Control_Model
>> iManufacturer=NCM" KERNEL_MODULE_AUTOLOAD +=
>> "wmc_device_managment"KERNEL_MODULE_PROBECONF += "wmc_device"cdc_wdm =
>> "options wmc_device iProduct=USB_CDC_WCM_Device_Management
>> iManufacturer=WMC" KERNEL_MODULE_AUTOLOAD +=
>> "lte"KERNEL_MODULE_PROBECONF += "lte"huawei_cdc_ncm = "options lte
>> iProduct=E3372h iManufacturer=Huawei"
>> Than this means the order of loading too. Is there any additional feature
>> in Yocto that can interfere and set the exact kernel module loading order?
>>
>> Thanks,
>>
>>
>> --
>> Zolee
>> 
>>
>>

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

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

* Re: insmod - huawei E3372h kernel module
  2021-01-17 22:27                       ` [yocto] " Zoran
  2021-01-18  5:27                         ` Zoltan Kerenyi Nagy
@ 2021-01-19 13:00                         ` Zoltan Kerenyi Nagy
  2021-01-19 13:23                           ` [yocto] " Zoran
       [not found]                           ` <165BA4E49F808CA9.28472@lists.yoctoproject.org>
  2021-01-19 13:41                         ` Zoltan Kerenyi Nagy
  2 siblings, 2 replies; 31+ messages in thread
From: Zoltan Kerenyi Nagy @ 2021-01-19 13:00 UTC (permalink / raw)
  To: yocto

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

I don have a recipie for /etc/modules

To my understanding this order will cause the load:
KERNEL_MODULE_AUTOLOAD += "ncm_driver"KERNEL_MODULE_PROBECONF += "ncm_driver"cdc_ncm = "options ncm_driver iProduct=USB_Host_Driver_for_Network_Control_Model iManufacturer=NCM" KERNEL_MODULE_AUTOLOAD += "wmc_device_managment"KERNEL_MODULE_PROBECONF += "wmc_device"cdc_wdm = "options wmc_device iProduct=USB_CDC_WCM_Device_Management iManufacturer=WMC" KERNEL_MODULE_AUTOLOAD += "lte"KERNEL_MODULE_PROBECONF += "lte"huawei_cdc_ncm = "options lte iProduct=E3372h iManufacturer=Huawei"

As far as I understand the KERNEL_MODULE_AUTOLOAD directive will populate the /etc/modules file, however, after bitbaking, on the device there is no /etc/modules file or folder but another folder:

root@barix-ipam400:~# ls /lib/modules/4.10.0/extra/
cdc-ncm.ko         cdc-wdm.ko         hello.ko           huawei_cdc_ncm.ko --
Zolee

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

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

* Re: [yocto] insmod - huawei E3372h kernel module
  2021-01-19 13:00                         ` Zoltan Kerenyi Nagy
@ 2021-01-19 13:23                           ` Zoran
       [not found]                           ` <165BA4E49F808CA9.28472@lists.yoctoproject.org>
  1 sibling, 0 replies; 31+ messages in thread
From: Zoran @ 2021-01-19 13:23 UTC (permalink / raw)
  To: Zoltan Kerenyi Nagy, Burton, Ross; +Cc: Yocto-mailing-list

> As far as I understand the KERNEL_MODULE_AUTOLOAD directive will
> populate the /etc/modules file, however, after bitbaking, on the device there
> is no /etc/modules file or folder but another folder:
>
> root@barix-ipam400:~# ls /lib/modules/4.10.0/extra/
> cdc-ncm.ko         cdc-wdm.ko         hello.ko           huawei_cdc_ncm.ko

Hello Ross,

Any comment from you on the target module configuration?

My understanding is the same, the YOCTO building system should somehow
create targets' /etc/modules file, since every reboot should repeat
the order of modules loading (read from the same).

Thank you,
Zoran
_______

On Tue, Jan 19, 2021 at 2:00 PM Zoltan Kerenyi Nagy
<kerenyi.nagy.zoltan@gmail.com> wrote:
>
> I don have a recipie for /etc/modules
>
> To my understanding this order will cause the load:
>
> KERNEL_MODULE_AUTOLOAD += "ncm_driver"KERNEL_MODULE_PROBECONF += "ncm_driver"cdc_ncm = "options ncm_driver iProduct=USB_Host_Driver_for_Network_Control_Model iManufacturer=NCM"
>
> KERNEL_MODULE_AUTOLOAD += "wmc_device_managment"KERNEL_MODULE_PROBECONF += "wmc_device"cdc_wdm = "options wmc_device iProduct=USB_CDC_WCM_Device_Management iManufacturer=WMC"
>
> KERNEL_MODULE_AUTOLOAD += "lte"KERNEL_MODULE_PROBECONF += "lte"huawei_cdc_ncm = "options lte iProduct=E3372h iManufacturer=Huawei"
>
> As far as I understand the KERNEL_MODULE_AUTOLOAD directive will populate the /etc/modules file, however, after bitbaking, on the device there is no /etc/modules file or folder but another folder:
>
> root@barix-ipam400:~# ls /lib/modules/4.10.0/extra/
> cdc-ncm.ko         cdc-wdm.ko         hello.ko           huawei_cdc_ncm.ko
>
>
>
> --
> Zolee
> 
>

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

* [yocto] insmod - huawei E3372h kernel module
       [not found]                           ` <165BA4E49F808CA9.28472@lists.yoctoproject.org>
@ 2021-01-19 13:27                             ` Zoran
  0 siblings, 0 replies; 31+ messages in thread
From: Zoran @ 2021-01-19 13:27 UTC (permalink / raw)
  To: Ross Burton, Yocto-mailing-list, Zoltan Kerenyi Nagy

Forwarded to ross@burtonini.com .

Thank you,
Zoran/Zee

---------- Forwarded message ---------
From: Zoran via lists.yoctoproject.org
<zoran.stojsavljevic=gmail.com@lists.yoctoproject.org>
Date: Tue, Jan 19, 2021 at 2:23 PM
Subject: Re: [yocto] insmod - huawei E3372h kernel module
To: Zoltan Kerenyi Nagy <kerenyi.nagy.zoltan@gmail.com>, Burton, Ross
<ross.burton@intel.com>
Cc: Yocto-mailing-list <yocto@lists.yoctoproject.org>

> As far as I understand the KERNEL_MODULE_AUTOLOAD directive will
> populate the /etc/modules file, however, after bitbaking, on the device there
> is no /etc/modules file or folder but another folder:
>
> root@barix-ipam400:~# ls /lib/modules/4.10.0/extra/
> cdc-ncm.ko         cdc-wdm.ko         hello.ko           huawei_cdc_ncm.ko

Hello Ross,

Any comment from you on the target module configuration?

My understanding is the same, the YOCTO building system should somehow
create targets' /etc/modules file, since every reboot should repeat
the order of modules loading (read from the same).

Thank you,
Zoran
_______

On Tue, Jan 19, 2021 at 2:00 PM Zoltan Kerenyi Nagy
<kerenyi.nagy.zoltan@gmail.com> wrote:
>
> I don have a recipie for /etc/modules
>
> To my understanding this order will cause the load:
>
> KERNEL_MODULE_AUTOLOAD += "ncm_driver"KERNEL_MODULE_PROBECONF += "ncm_driver"cdc_ncm = "options ncm_driver iProduct=USB_Host_Driver_for_Network_Control_Model iManufacturer=NCM"
>
> KERNEL_MODULE_AUTOLOAD += "wmc_device_managment"KERNEL_MODULE_PROBECONF += "wmc_device"cdc_wdm = "options wmc_device iProduct=USB_CDC_WCM_Device_Management iManufacturer=WMC"
>
> KERNEL_MODULE_AUTOLOAD += "lte"KERNEL_MODULE_PROBECONF += "lte"huawei_cdc_ncm = "options lte iProduct=E3372h iManufacturer=Huawei"
>
> As far as I understand the KERNEL_MODULE_AUTOLOAD directive will populate the /etc/modules file, however, after bitbaking, on the device there is no /etc/modules file or folder but another folder:
>
> root@barix-ipam400:~# ls /lib/modules/4.10.0/extra/
> cdc-ncm.ko         cdc-wdm.ko         hello.ko           huawei_cdc_ncm.ko
>
>
>
> --
> Zolee
>
>



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

* Re: insmod - huawei E3372h kernel module
  2021-01-17 22:27                       ` [yocto] " Zoran
  2021-01-18  5:27                         ` Zoltan Kerenyi Nagy
  2021-01-19 13:00                         ` Zoltan Kerenyi Nagy
@ 2021-01-19 13:41                         ` Zoltan Kerenyi Nagy
  2021-01-19 14:48                           ` Zoltan Kerenyi Nagy
  2 siblings, 1 reply; 31+ messages in thread
From: Zoltan Kerenyi Nagy @ 2021-01-19 13:41 UTC (permalink / raw)
  To: yocto

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

Here is an error message:

modprobe - insmod ( http://paste.ubuntu.com/p/hMWBQSDKcF/ )
--
Zolee

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

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

* Re: insmod - huawei E3372h kernel module
  2021-01-19 13:41                         ` Zoltan Kerenyi Nagy
@ 2021-01-19 14:48                           ` Zoltan Kerenyi Nagy
  2021-01-19 16:54                             ` [yocto] " Zoran
  0 siblings, 1 reply; 31+ messages in thread
From: Zoltan Kerenyi Nagy @ 2021-01-19 14:48 UTC (permalink / raw)
  To: yocto

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

My modeles.dep file looks like this on target:

kernel/fs/nfs/flexfilelayout/nfs_layout_flexfiles.ko:
kernel/crypto/echainiv.ko:
kernel/crypto/gcm.ko:
kernel/crypto/ccm.ko:
kernel/crypto/ghash-generic.ko:
kernel/drivers/char/hw_random/rng-core.ko:
kernel/net/ipv4/tcp_bic.ko:
kernel/net/ipv4/tcp_westwood.ko:
kernel/net/ipv4/tcp_htcp.ko:
kernel/net/bridge/br_netfilter.ko:
kernel/net/wireless/cfg80211.ko: kernel/net/rfkill/rfkill.ko
kernel/net/mac80211/mac80211.ko: kernel/net/wireless/cfg80211.ko kernel/net/rfkill/rfkill.ko
kernel/net/rfkill/rfkill.ko:
kernel/net/rfkill/rfkill-regulator.ko: kernel/net/rfkill/rfkill.ko
kernel/net/rfkill/rfkill-gpio.ko: kernel/net/rfkill/rfkill.ko
extra/cdc-ncm.ko: extra/cdc-wdm.ko
extra/hello.ko:
extra/cdc-wdm.ko:
extra/huawei_cdc_ncm.ko: extra/cdc-wdm.ko

--
Zolee

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

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

* Re: [yocto] insmod - huawei E3372h kernel module
  2021-01-19 14:48                           ` Zoltan Kerenyi Nagy
@ 2021-01-19 16:54                             ` Zoran
  2021-01-20 11:20                               ` Zoltan Kerenyi Nagy
  0 siblings, 1 reply; 31+ messages in thread
From: Zoran @ 2021-01-19 16:54 UTC (permalink / raw)
  To: Zoltan Kerenyi Nagy; +Cc: Yocto-mailing-list

Zolee,

You need also to do on the target platform the following (very first time):

You must have header files, at minimum, in target's : /usr/src/$(uname -r)/

Or for yocto (AFAIK), maybe: /usr/src/kernel/$(uname -r)/

To prepare out-of-tree device driver compilation in /usr/src/kernel/$(uname -r)/

/usr/src/kernel/$(uname -r)$ make oldconfig && make prepare
/usr/src/kernel/$(uname -r)$ sudo make scripts prepare

Zee
_______

On Tue, Jan 19, 2021 at 3:48 PM Zoltan Kerenyi Nagy
<kerenyi.nagy.zoltan@gmail.com> wrote:
>
> My modeles.dep file looks like this on target:
>
> kernel/fs/nfs/flexfilelayout/nfs_layout_flexfiles.ko:
> kernel/crypto/echainiv.ko:
> kernel/crypto/gcm.ko:
> kernel/crypto/ccm.ko:
> kernel/crypto/ghash-generic.ko:
> kernel/drivers/char/hw_random/rng-core.ko:
> kernel/net/ipv4/tcp_bic.ko:
> kernel/net/ipv4/tcp_westwood.ko:
> kernel/net/ipv4/tcp_htcp.ko:
> kernel/net/bridge/br_netfilter.ko:
> kernel/net/wireless/cfg80211.ko: kernel/net/rfkill/rfkill.ko
> kernel/net/mac80211/mac80211.ko: kernel/net/wireless/cfg80211.ko kernel/net/rfkill/rfkill.ko
> kernel/net/rfkill/rfkill.ko:
> kernel/net/rfkill/rfkill-regulator.ko: kernel/net/rfkill/rfkill.ko
> kernel/net/rfkill/rfkill-gpio.ko: kernel/net/rfkill/rfkill.ko
> extra/cdc-ncm.ko: extra/cdc-wdm.ko
> extra/hello.ko:
> extra/cdc-wdm.ko:
> extra/huawei_cdc_ncm.ko: extra/cdc-wdm.ko
>
> --
> Zolee
> 
>

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

* Re: insmod - huawei E3372h kernel module
  2021-01-19 16:54                             ` [yocto] " Zoran
@ 2021-01-20 11:20                               ` Zoltan Kerenyi Nagy
  2021-01-20 13:04                                 ` [yocto] " Zoran
  0 siblings, 1 reply; 31+ messages in thread
From: Zoltan Kerenyi Nagy @ 2021-01-20 11:20 UTC (permalink / raw)
  To: yocto

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

Hi Zoran,

Interestingly I don't have any header file on the target: # find / -name *.h #
--
Zolee

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

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

* Re: [yocto] insmod - huawei E3372h kernel module
  2021-01-20 11:20                               ` Zoltan Kerenyi Nagy
@ 2021-01-20 13:04                                 ` Zoran
  2021-01-21 10:00                                   ` Zoltan Kerenyi Nagy
  0 siblings, 1 reply; 31+ messages in thread
From: Zoran @ 2021-01-20 13:04 UTC (permalink / raw)
  To: Zoltan Kerenyi Nagy; +Cc: Yocto-mailing-list

> Interestingly I don't have any header file on the target:

Yes, since U R compiling target modules on the HOST GCC cross compiler
(using YOCTO bitbake scripts).

I ALWAYS keep full target setup, with as many tools as I can to do
target module compiling, and other stuff.

YOCTO is after all YOCTO (doing host and target prep), but I like to
have total control over the target myself. ;-)

To include target kernel-dev, please, use the local.conf similar to one here:
https://github.com/ZoranStojsavljevic/bbb-yocto/blob/master/bbb-releases/bbb-dunfell/local.conf_kernel

Zee
_______


On Wed, Jan 20, 2021 at 12:20 PM Zoltan Kerenyi Nagy
<kerenyi.nagy.zoltan@gmail.com> wrote:
>
> Hi Zoran,
>
> Interestingly I don't have any header file on the target:
>
> # find / -name *.h
>
> #
>
>
> --
> Zolee
> 
>

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

* Re: insmod - huawei E3372h kernel module
  2021-01-20 13:04                                 ` [yocto] " Zoran
@ 2021-01-21 10:00                                   ` Zoltan Kerenyi Nagy
  2021-01-25 13:39                                     ` Zoltan Kerenyi Nagy
  0 siblings, 1 reply; 31+ messages in thread
From: Zoltan Kerenyi Nagy @ 2021-01-21 10:00 UTC (permalink / raw)
  To: yocto

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

Im experimenting with the kernel's defconfig.

Added these:
USB_NET_HUAWEI_CDC_NCM=m
USB_NET_DRIVERS=y
USB_USBNET=y

and I'm recompiling the kernel: bitbake -f linux

Takes some time...
--
Zolee

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

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

* Re: insmod - huawei E3372h kernel module
  2021-01-21 10:00                                   ` Zoltan Kerenyi Nagy
@ 2021-01-25 13:39                                     ` Zoltan Kerenyi Nagy
  0 siblings, 0 replies; 31+ messages in thread
From: Zoltan Kerenyi Nagy @ 2021-01-25 13:39 UTC (permalink / raw)
  To: yocto

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

Hi,

If I intentionally typo in the defconfig file:

USB_NET_HUAWEI_CDC_NCM_cat=y
USB_NET_DRIVERS=y
USB_USBNET=y

The bitbake -f linux command doesn't recognize the change. It means to me that any change in this will not have an effect.

--
Zolee

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

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

end of thread, other threads:[~2021-01-25 13:39 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-07 13:46 insmod - huawei E3372h kernel module Zoltan Kerenyi Nagy
2021-01-07 15:03 ` [yocto] " Zoran
2021-01-07 15:16   ` Zoltan Kerenyi Nagy
2021-01-07 15:27     ` Zoran
     [not found]     ` <1657FCB4180F6472.31350@lists.yoctoproject.org>
2021-01-07 17:20       ` Zoran
     [not found]         ` <CAHwRhWZSW+g0qJkAQLz5npmi5ig37XTvM6r_tJWmpk3ERMB9ew@mail.gmail.com>
2021-01-07 18:35           ` Zoran
2021-01-08 10:36         ` Zoltan Kerenyi Nagy
2021-01-08 11:22           ` Zoltan Kerenyi Nagy
2021-01-08 11:59             ` [yocto] " Zoran
2021-01-08 12:28               ` Zoltan Kerenyi Nagy
2021-01-08 12:49                 ` [yocto] " Zoran
     [not found]                 ` <165842AB3B8C5237.7830@lists.yoctoproject.org>
2021-01-08 14:43                   ` Zoran
2021-01-11 10:23                     ` Zoltan Kerenyi Nagy
2021-01-11 13:20                     ` Zoltan Kerenyi Nagy
2021-01-12 15:13                     ` Zoltan Kerenyi Nagy
2021-01-12 15:17                       ` Zoltan Kerenyi Nagy
2021-01-17 12:34                     ` Zoltan Kerenyi Nagy
2021-01-17 22:27                       ` [yocto] " Zoran
2021-01-18  5:27                         ` Zoltan Kerenyi Nagy
2021-01-19 13:00                         ` Zoltan Kerenyi Nagy
2021-01-19 13:23                           ` [yocto] " Zoran
     [not found]                           ` <165BA4E49F808CA9.28472@lists.yoctoproject.org>
2021-01-19 13:27                             ` Zoran
2021-01-19 13:41                         ` Zoltan Kerenyi Nagy
2021-01-19 14:48                           ` Zoltan Kerenyi Nagy
2021-01-19 16:54                             ` [yocto] " Zoran
2021-01-20 11:20                               ` Zoltan Kerenyi Nagy
2021-01-20 13:04                                 ` [yocto] " Zoran
2021-01-21 10:00                                   ` Zoltan Kerenyi Nagy
2021-01-25 13:39                                     ` Zoltan Kerenyi Nagy
2021-01-08 12:35               ` Zoltan Kerenyi Nagy
2021-01-08 10:24     ` Zoltan Kerenyi Nagy

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.