From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: how to compile kernel module with SDK #compilation To: meta-freescale@lists.yoctoproject.org From: hkkim@the-road.co.kr X-Originating-Location: Anyang-si, Gyeonggi-do, KR (118.36.46.192) X-Originating-Platform: Windows Chrome 92 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Fri, 03 Sep 2021 19:27:41 -0700 Message-ID: Content-Type: multipart/alternative; boundary="DAB8af0bTlbBWfEZYjfs" --DAB8af0bTlbBWfEZYjfs Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable hi i am not good at English i have a problem with compiling=C2=A0 a kernel module a board is imx6sx evk and kernel is 5.10.35 , yocto is hardknott ( is right= ? i installed with this command=C2=A0 : repo init -u https://source.codeau= rora.org/external/imx/imx-manifest -b imx-linux-hardknott -m imx-5.10.35-2.0.0.xml ) i make SDK form core-image-full_cmdline image=C2=A0 =C2=A0and installed=C2= =A0 and=C2=A0 compiled kernel and modules ( in kernel directroy) ,a test pr= ogram=C2=A0 without problems but when i compile a module which is not in kernel directory no module.ko file made the module source is fine=C2=A0 ( i copy a source into kernel/driver and ma= ke modules ,,it works fine) and i compiled previous yocto SDK=C2=A0 with success any tips and ideas will be appreciated . thank in advance imx6ull@imx6ull-VirtualBox:/media/sf_shared/example/gpio-irq/dev$ imx6ull@imx6ull-VirtualBox:/media/sf_shared/example/gpio-irq/dev$ source /o= pt/ fsl-imx-wayland/ fsl-imx-xwayland/ VBoxGuestAdditions-5.2.32/ imx6ull@imx6ull-VirtualBox:/media/sf_shared/example/gpio-irq/dev$ source /o= pt/fsl-imx- fsl-imx-wayland/ fsl-imx-xwayland/ imx6ull@imx6ull-VirtualBox:/media/sf_shared/example/gpio-irq/dev$ source /o= pt/fsl-imx-wayland/5.10-hardknott/ environment-setup-cortexa7t2hf-neon-poky-linux-gnueabi sysroots/ site-config-cortexa7t2hf-neon-poky-linux-gnueabi version-cortexa7t2hf-neon-= poky-linux-gnueabi imx6ull@imx6ull-VirtualBox:/media/sf_shared/example/gpio-irq/dev$ source /o= pt/fsl-imx-wayland/5.10-hardknott/environment-setup-cortexa7t2hf-neon-poky-= linux-gnueabi imx6ull@imx6ull-VirtualBox:/media/sf_shared/example/gpio-irq/dev$ *make* *make -C /home/imx6ull/work/Kernel/git.5.10.35 SUBDIRS=3D/media/sf_shared/e= xample/gpio-irq/dev modules* *make[1]: Entering directory '/home/imx6ull/work/imx-yocto-bsp/imx6ull/tmp/= work-shared/imx6ull14x14evk/kernel-source'=C2=A0 =C2=A0--> i don't know why= make goes into this directory which i made SDK* CALL scripts/checksyscalls.sh CALL scripts/atomic/check-atomics.sh CHK include/generated/compile.h make[1]: Leaving directory '/home/imx6ull/work/imx-yocto-bsp/imx6ull/tmp/wo= rk-shared/imx6ull14x14evk/kernel-source' imx6ull@imx6ull-VirtualBox:/media/sf_shared/example/gpio-irq/dev$ ls *.ko *ls: cannot access '*.ko': No such file or directory* imx6ull@imx6ull-VirtualBox:/media/sf_shared/example/gpio-irq/dev$ and my makefile obj-m :=3D of-test.o KDIR :=3D /home/imx6ull/work/Kernel/git.5.10.35 PWD :=3D $(shell pwd) NFS_ROOT =3D /home/imx6ull/work/imx-yocto-bsp/imx6sx/nfs_full/home/root default: $(MAKE) -C $(KDIR) SUBDIRS=3D$(PWD) modules # cp of-test.ko $(NFS_ROOT)/ clean: rm -rf *.ko rm -rf *.mod.* rm -rf .*.cmd m -rf *.o --DAB8af0bTlbBWfEZYjfs Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

hi

i am not good at English 

i have a problem with compiling  a kernel modu= le 

a board is imx6sx evk and kernel is 5.10.35 , yocto= is hardknott ( is right ? i installed with this command  : repo init = -u https://source.codeaurora.org/exte= rnal/imx/imx-manifest
-b imx-linux-hardknott -m imx-5.10.35-2.0.0.= xml )

i make SDK form core-image-full_cmdline image =  and installed  and  compiled kernel and modules ( in kerne= l directroy) ,a test program  without problems

but when i compile a module which is not in kernel = directory

no module.ko file made  

the module source is fine  ( i copy a source i= nto kernel/driver and make modules ,,it works fine)

and i compiled previous yocto SDK  with succes= s 

any tips and ideas will be appreciated . thank in a= dvance 

 

 

imx6ull@imx6ull-VirtualBox:/media/sf_shared/example= /gpio-irq/dev$
imx6ull@imx6ull-VirtualBox:/media/sf_shared/example/gpi= o-irq/dev$ source /opt/
fsl-imx-wayland/ fsl-imx-xwayland/ VBoxGuestAd= ditions-5.2.32/
imx6ull@imx6ull-VirtualBox:/media/sf_shared/example/gp= io-irq/dev$ source /opt/fsl-imx-
fsl-imx-wayland/ fsl-imx-xwayland/imx6ull@imx6ull-VirtualBox:/media/sf_shared/example/gpio-irq/dev$ source= /opt/fsl-imx-wayland/5.10-hardknott/
environment-setup-cortexa7t2hf-n= eon-poky-linux-gnueabi sysroots/
site-config-cortexa7t2hf-neon-poky-li= nux-gnueabi version-cortexa7t2hf-neon-poky-linux-gnueabi
imx6ull@imx6u= ll-VirtualBox:/media/sf_shared/example/gpio-irq/dev$ source /opt/fsl-imx-wa= yland/5.10-hardknott/environment-setup-cortexa7t2hf-neon-poky-linux-gnueabi=
imx6ull@imx6ull-VirtualBox:/media/sf_shared/example/gpio-irq/dev$&nbs= p;make
make -C /home/imx6ull/work/Kernel/git.= 5.10.35 SUBDIRS=3D/media/sf_shared/example/gpio-irq/dev modulesmake[1]: Entering directory '/home/imx6ull/work/imx-yocto-bsp/im= x6ull/tmp/work-shared/imx6ull14x14evk/kernel-source'   --> i d= on't know why make goes into this directory which i made SDK
= CALL scripts/checksyscalls.sh
CALL scripts/atomic/check-atomics.sh
CHK include/generated/compile.h
make[1]: Leaving directory '/home/im= x6ull/work/imx-yocto-bsp/imx6ull/tmp/work-shared/imx6ull14x14evk/kernel-sou= rce'
imx6ull@imx6ull-VirtualBox:/media/sf_shared/example/gpio-irq/dev$= ls *.ko
ls: cannot access '*.ko': No such file or directory
imx6ull@imx6ull-VirtualBox:/media/sf_shared/example/gpio-irq/d= ev$

and my makefile 

obj-m :=3D of-test.o

KDIR :=3D /home/imx6ull/work/Kernel/git.5.10.35
PWD :=3D $(shell pwd)
NFS_ROOT =3D /home/imx6ull/work/imx-yocto-bsp/= imx6sx/nfs_full/home/root

default:
$(MAKE) -C $(KDIR) SUBDIRS=3D$(PWD) m= odules
# cp of-test.ko $(NFS_ROOT)/

clean:
rm -rf *.ko=
rm -rf *.mod.*
rm -rf .*.cmd
m -rf *.o

 

--DAB8af0bTlbBWfEZYjfs--