meta-freescale.lists.yoctoproject.org archive mirror
 help / color / mirror / Atom feed
* how to compile kernel module with SDK #compilation
@ 2021-09-04  2:27 hkkim
  0 siblings, 0 replies; only message in thread
From: hkkim @ 2021-09-04  2:27 UTC (permalink / raw)
  To: meta-freescale

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

hi

i am not good at English

i have a problem with compiling  a kernel module

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/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   and installed  and  compiled kernel and modules ( in kernel 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 into kernel/driver and make modules ,,it works fine)

and i compiled previous yocto SDK  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 /opt/
fsl-imx-wayland/ fsl-imx-xwayland/ VBoxGuestAdditions-5.2.32/
imx6ull@imx6ull-VirtualBox:/media/sf_shared/example/gpio-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-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 /opt/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=/media/sf_shared/example/gpio-irq/dev modules*
*make[1]: Entering directory '/home/imx6ull/work/imx-yocto-bsp/imx6ull/tmp/work-shared/imx6ull14x14evk/kernel-source'   --> 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/work-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 := of-test.o

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

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

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

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-04  2:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-04  2:27 how to compile kernel module with SDK #compilation hkkim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).