0

I am trying to make two/multiple custom modules outside buildroot directory and build them whenever needed. Tree as below,

buildroot
kernel_module
├── Config.in
├── external.desc
├── external.mk
├── package
│   └── kernel-modules
│       ├── Config.in
│       ├── kernel-modules.mk
│       ├── kmod-example
│       │   ├── Config.in
│       │   ├── kmod-example.c
│       │   ├── kmod-example.mk
│       │   ├── Makefile
│       └── kmod-notifier-exmp
│           ├── Config.in
│           ├── kmod-notifier-exmp.c
│           ├── kmod-notifier-exmp.mk
│           ├── Makefile
├── readme

added this config to .config

make BR2_EXTERNAL=/home/beaglebone_black/buildroot/kernel_module beaglebone_defconfig

Then I can see external options enabled in make menuconfig.

The issue is if I execute,

make kmod-notifier-exmp

this doesnt rsync my local configurations and fails saying,

buildroot/output/build/kmod-notifier-exmp/./Makefile: No such file or directory

contents generated as below

❯ cd output/build/kmod-notifier-exmp
❯ ls -la
total 788
drwxr-xr-x  2 n n   4096 Dec 24 19:34 .
drwxr-xr-x 61 n n   4096 Dec 24 19:34 ..
-rw-r--r--  1 n n      0 Dec 24 19:32 .applied_patches_list
-rw-r--r--  1 n n 300823 Dec 24 19:32 .files-list.before
-rw-r--r--  1 n n  93604 Dec 24 19:32 .files-list-host.before
-rw-r--r--  1 n n    724 Dec 24 19:32 .files-list-images.before
-rw-r--r--  1 n n 395450 Dec 24 19:32 .files-list-staging.before
-rw-r--r--  1 n n      0 Dec 24 19:32 .stamp_configured
-rw-r--r--  1 n n      0 Dec 24 19:32 .stamp_downloaded
-rw-r--r--  1 n n      0 Dec 24 19:32 .stamp_extracted
-rw-r--r--  1 n n      0 Dec 24 19:32 .stamp_patched

for make kmod-example it rsyncs, but it sync kmod-notifier-exmp files and build fails.

Keeping single module works but not multiple modules.

How to solve this issue?

mrigendra
  • 1,472
  • 3
  • 19
  • 33

1 Answers1

0

Solution to above problem is naming convention in final *.mk file. If we want to make another module named foo, naming convention have to follow as below,

foo.mk

FOO_VERSION = 1.0
FOO_SITE = $(BR2_EXTERNAL_KERNEL_MODULE_PATH)/package/kernel-modules/foo
FOO_SITE_METHOD = local

$(eval $(kernel-module))
$(eval $(generic-package))

as above I was facing problem with kmod-notifier-exmp package so its *.mk will be as below

kmod-notifier-exmp.mk

KMOD_NOTIFIER_EXMP_VERSION = 1.0
KMOD_NOTIFIER_EXMP_SITE = $(BR2_EXTERNAL_KERNEL_MODULE_PATH)/package/kernel-modules/kmod-notifier-exmp
KMOD_NOTIFIER_EXMP_SITE_METHOD = local

$(eval $(kernel-module))
$(eval $(generic-package))
0andriy
  • 4,183
  • 1
  • 24
  • 37
mrigendra
  • 1,472
  • 3
  • 19
  • 33