From: hkkim@the-road.co.kr
To: meta-freescale@lists.yoctoproject.org
Subject: how to compile kernel module with SDK #compilation
Date: Fri, 03 Sep 2021 19:27:41 -0700 [thread overview]
Message-ID: <FQj6.1630722461604608033.X1Oo@lists.yoctoproject.org> (raw)
[-- 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 --]
reply other threads:[~2021-09-04 2:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=FQj6.1630722461604608033.X1Oo@lists.yoctoproject.org \
--to=hkkim@the-road.co.kr \
--cc=meta-freescale@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).