From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ua1-f49.google.com (mail-ua1-f49.google.com [209.85.222.49]) by mx.groups.io with SMTP id smtpd.web09.9683.1610032642424236744 for ; Thu, 07 Jan 2021 07:17:22 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20161025 header.b=GpOaNcUS; spf=pass (domain: gmail.com, ip: 209.85.222.49, mailfrom: kerenyi.nagy.zoltan@gmail.com) Received: by mail-ua1-f49.google.com with SMTP id y21so2363508uag.2 for ; Thu, 07 Jan 2021 07:17:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QmVpV34xt8MLYkAP1Ja/RKs9TOnIpaH4USbjnGldgwk=; b=GpOaNcUSLG9hoG9smtxSs6TqWNKnWNl8XOd7LDkmGSWTA4zgwN5FF7qRZOhL+Glip+ kVyrAG4qV7G6ygcsro7N54uA0EDxW2PAOIQXhc9f6YQByINmmz+jEBSOGr/jpIGwOJJ/ 0eydgxdpps0VEHjsQc8ERdI3GPu/Mmu3e252WKlUqmuemBeADq+f+3TuuyZB+D7y7zsM cPBnQ70dKlpCUWfW5gq5vLBzFYeaxLzQ1LqPSx86I3bJaqHi8yUDUcrRo0vA7iNB8uAb Sx7e8D3l/NvvKXB8zSFtFxjDl6ryitAT19+cnoCGXW8Jy5k3ARxzjmyr2aKqmfr30rBY rQSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QmVpV34xt8MLYkAP1Ja/RKs9TOnIpaH4USbjnGldgwk=; b=dMLvpxc6LEDgDTIA1SkBXDKK7S9J2DsSrbCxz1QeLmMjU/z0j+2sGvwpLd69T6OWZS dNjxYMJ4g0bRy+QYw2DteuPoWbX/cKn3BI+lqOoiggkhO4p+A9K7FQCQK7PjeeFkmYdn BWqbHhrlG7OKkuToQH7o6sv1D/WEL5CviwGZ2hEAT34YCMNWZPaiqY5XjkVTO5pgoXz4 nCvZdZIKXGJGRW2FdKrMeqbPzAcW9+ot/Hf20uI0AShQi4+upczRFh8AuWeaaF77eLff 8tNoDCpAfrk25nKobORYLmI2XagczkKUkj5Tom5ZZUAvHA/4wrD/ZnXOnwcWl0GroapS r+Vw== X-Gm-Message-State: AOAM5306V2T7RVnNusgz0QSoz0iLuSRcgmc8BffYxvUVUofzd21gd+gB eCiLFpHJfspUG9w7WMqr76CL7PpSzSEY7Dv+HNE= X-Google-Smtp-Source: ABdhPJxQ9wluDhQ4Rs98xhe1USGjN3CRoqlhReXtx6Q17SJC/jz68OHC5aRHwWKCkKMjwAFiNo4JcGG2RaPxONXQHqE= X-Received: by 2002:ab0:3b59:: with SMTP id o25mr8057403uaw.62.1610032641575; Thu, 07 Jan 2021 07:17:21 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: "Zoltan Kerenyi Nagy" Date: Thu, 7 Jan 2021 16:16:45 +0100 Message-ID: Subject: Re: [yocto] insmod - huawei E3372h kernel module To: Zoran Stojsavljevic Cc: Yocto-mailing-list Content-Type: multipart/alternative; boundary="000000000000ad8d5305b850ef38" --000000000000ad8d5305b850ef38 Content-Type: text/plain; charset="UTF-8" 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 > 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 > > > > > --000000000000ad8d5305b850ef38 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Zo= ran,

Thanks, I modified the M= akefile:

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

but this is the error= :

ERROR: hua= wei-1.1-r0 do_configure: oe_runmake failed
ERROR: huawei-1.1-r0 do_confi= gure: 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/t= emp/log.do_configure.4488)
ERROR: Logfile of failure stored in: /home/ke= renyiz/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=3D/home/kerenyiz/oe= -core/build/tmp-glibc/work-shared/barix-ipam400/kernel-source clean
| ER= ROR: oe_runmake failed
| Makefile:2: *** empty variable name.=C2=A0 Stop= .
| ERROR: Function failed: do_configure (log file is located at /home/k= erenyiz/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/b= uild/../stuff/meta-barix-sdk/recipes-z/kernel-modules/huawei/huawei_1.1.bb:= do_configure) failed with exit code '1'
NOTE: Tasks Summary: Att= empted 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:
He= llo 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_nc= m.ko': unknown symbol in module, or unknown parameter

Please, try to set Kconfig (obj-y :=3D 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
<
ker= enyi.nagy.zoltan@gmail.com> wrote:
>
> Hi Folks,
>
> I bitbaked a Huawei E3372h driver into the distro with this recipe fi= le:
>
> SUMMARY =3D "Huawei Stick kernel module"
> LICENSE =3D "CLOSED"
>
> inherit module
>
> SRC_URI =3D "file://Makefile \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 file://huawei_cdc_ncm.c \ >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"
>
> S =3D "${WORKDIR}"
>
> The makefile looks like this:
>
> obj-m :=3D huawei_cdc_ncm.o
>
> SRC :=3D $(shell pwd)
>
> all:
> $(MAKE) -C $(KERNEL_SRC) M=3D$(SRC)
>
> modules_install:
> $(MAKE) -C $(KERNEL_SRC) M=3D$(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.bo= otlin.com/linux/v4.0/source/drivers/net/usb/huawei_cdc_ncm.c
>
> I included this into the conf file:
> KERNEL_MODULE_AUTOLOAD +=3D "lte"KERNEL_MODULE_PROBECONF += =3D "lte"huawei_cdc_ncm =3D "options lte iProduct=3DE3372h = iManufacturer=3DHuawei"
>
> Bitbake runs without error, however when I insert the SD card into th= e 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_nc= m.ko': unknown symbol in module, or unknown parameter
>
> To me it looks like that there was an error during the bitbake, or th= e header files included in the driver doesn't match the kernel.
>
> Do you have any idea how to procede?
>
> Thanks,
>
>
>
> --
> Zolee
>
>

--
Zolee --000000000000ad8d5305b850ef38--