* [PATCH v2] meta/meta-selftest: add selftest-hello-mod recipe
@ 2025-06-09 13:41 Dixit Parmar
2025-06-09 14:54 ` [OE-core] " Gyorgy Sarvari
2025-06-19 4:45 ` [OE-core] " Mathieu Dubois-Briand
0 siblings, 2 replies; 8+ messages in thread
From: Dixit Parmar @ 2025-06-09 13:41 UTC (permalink / raw)
To: openembedded-core; +Cc: Dixit Parmar
Kernel module specific oe test cases requires a test kernel
module package to work with. Added selftest-hello-mod
derived from meta-skeleton/recipes-kernel/hello-mod.
Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
---
.../files/hello-mod/Makefile | 14 +++++++++++
.../files/hello-mod/hello.c | 24 +++++++++++++++++++
.../selftest-hello-mod/hello-mod_0.1.bb | 17 +++++++++++++
3 files changed, 55 insertions(+)
create mode 100644 meta-selftest/recipes-test/selftest-hello-mod/files/hello-mod/Makefile
create mode 100644 meta-selftest/recipes-test/selftest-hello-mod/files/hello-mod/hello.c
create mode 100644 meta-selftest/recipes-test/selftest-hello-mod/hello-mod_0.1.bb
diff --git a/meta-selftest/recipes-test/selftest-hello-mod/files/hello-mod/Makefile b/meta-selftest/recipes-test/selftest-hello-mod/files/hello-mod/Makefile
new file mode 100644
index 0000000000..4ded35fbc3
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-hello-mod/files/hello-mod/Makefile
@@ -0,0 +1,14 @@
+obj-m := hello.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
diff --git a/meta-selftest/recipes-test/selftest-hello-mod/files/hello-mod/hello.c b/meta-selftest/recipes-test/selftest-hello-mod/files/hello-mod/hello.c
new file mode 100644
index 0000000000..4f73455d20
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-hello-mod/files/hello-mod/hello.c
@@ -0,0 +1,24 @@
+/******************************************************************************
+ *
+ * Copyright (C) 2011 Intel Corporation. All rights reserved.
+ *
+ * SPDX-License-Identifier: GPL-2.0-only
+ *
+ *****************************************************************************/
+
+#include <linux/module.h>
+
+static int __init hello_init(void)
+{
+ pr_info("Hello World!\n");
+ return 0;
+}
+
+static void __exit hello_exit(void)
+{
+ pr_info("Goodbye Cruel World!\n");
+}
+
+module_init(hello_init);
+module_exit(hello_exit);
+MODULE_LICENSE("GPL");
diff --git a/meta-selftest/recipes-test/selftest-hello-mod/hello-mod_0.1.bb b/meta-selftest/recipes-test/selftest-hello-mod/hello-mod_0.1.bb
new file mode 100644
index 0000000000..8a98c70703
--- /dev/null
+++ b/meta-selftest/recipes-test/selftest-hello-mod/hello-mod_0.1.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Example of how to build an external Linux kernel module - selftest variant"
+DESCRIPTION = "${SUMMARY}"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+inherit module
+
+SRC_URI = "file://hello-mod/Makefile \
+ file://hello-mod/hello.c \
+ "
+
+S = "${WORKDIR}/hello-mod"
+
+# The inherit of module.bbclass will automatically name module packages with
+# "kernel-module-" prefix as required by the oe-core build environment.
+
+RPROVIDES:${PN} += "kernel-module-hello"
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [OE-core] [PATCH v2] meta/meta-selftest: add selftest-hello-mod recipe
2025-06-09 13:41 [PATCH v2] meta/meta-selftest: add selftest-hello-mod recipe Dixit Parmar
@ 2025-06-09 14:54 ` Gyorgy Sarvari
2025-06-18 12:29 ` Dixit Parmar
2025-06-19 4:45 ` [OE-core] " Mathieu Dubois-Briand
1 sibling, 1 reply; 8+ messages in thread
From: Gyorgy Sarvari @ 2025-06-09 14:54 UTC (permalink / raw)
To: dixitparmar19, openembedded-core
On 6/9/25 15:41, Dixit Parmar via lists.openembedded.org wrote:
> <snip>
> --- /dev/null
> +++ b/meta-selftest/recipes-test/selftest-hello-mod/files/hello-mod/hello.c
> @@ -0,0 +1,24 @@
> +/******************************************************************************
> + *
> + * Copyright (C) 2011 Intel Corporation. All rights reserved.
> + *
> + * SPDX-License-Identifier: GPL-2.0-only
> + *
> + *****************************************************************************/
<snip>
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
>
One note: the recipe says MIT license, but the source claims to be
GPL-2.0-only
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] meta/meta-selftest: add selftest-hello-mod recipe
2025-06-09 14:54 ` [OE-core] " Gyorgy Sarvari
@ 2025-06-18 12:29 ` Dixit Parmar
0 siblings, 0 replies; 8+ messages in thread
From: Dixit Parmar @ 2025-06-18 12:29 UTC (permalink / raw)
To: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 333 bytes --]
Yes. The entire hello-mod package is taken from meta-skeleton. The source file remained unchanged, so it has the same License as it is in the meta-skeleton. The bb recipe file is modified to match the build requirements and is kept under the MIT license, following other recipes under the meta-selftest. I hope that should be fine.
[-- Attachment #2: Type: text/html, Size: 344 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [OE-core] [PATCH v2] meta/meta-selftest: add selftest-hello-mod recipe
2025-06-09 13:41 [PATCH v2] meta/meta-selftest: add selftest-hello-mod recipe Dixit Parmar
2025-06-09 14:54 ` [OE-core] " Gyorgy Sarvari
@ 2025-06-19 4:45 ` Mathieu Dubois-Briand
2025-06-19 5:56 ` Dixit Parmar
1 sibling, 1 reply; 8+ messages in thread
From: Mathieu Dubois-Briand @ 2025-06-19 4:45 UTC (permalink / raw)
To: dixitparmar19, openembedded-core
On Mon Jun 9, 2025 at 3:41 PM CEST, Dixit Parmar via lists.openembedded.org wrote:
> Kernel module specific oe test cases requires a test kernel
> module package to work with. Added selftest-hello-mod
> derived from meta-skeleton/recipes-kernel/hello-mod.
>
> Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
> ---
Thanks or your patch.
> +S = "${WORKDIR}/hello-mod"
This will trigger an error if some patches in master-next are merged,
you can rebase on master-next to see the error. The hello-mod recipe of
meta-skeleton was also updated accordingly.
https://lists.openembedded.org/g/openembedded-core/message/218806
https://lists.openembedded.org/g/openembedded-core/message/218804
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] meta/meta-selftest: add selftest-hello-mod recipe
2025-06-19 4:45 ` [OE-core] " Mathieu Dubois-Briand
@ 2025-06-19 5:56 ` Dixit Parmar
2025-06-19 11:40 ` [OE-core] " Mathieu Dubois-Briand
0 siblings, 1 reply; 8+ messages in thread
From: Dixit Parmar @ 2025-06-19 5:56 UTC (permalink / raw)
To: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]
On Thu, Jun 19, 2025 at 10:15 AM, Mathieu Dubois-Briand wrote:
>
> On Mon Jun 9, 2025 at 3:41 PM CEST, Dixit Parmar via
> lists.openembedded.org wrote:
>
>> Kernel module specific oe test cases requires a test kernel
>> module package to work with. Added selftest-hello-mod
>> derived from meta-skeleton/recipes-kernel/hello-mod.
>>
>> Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
>> ---
>
> Thanks or your patch.
>
>
>> +S = "${WORKDIR}/hello-mod"
>
> This will trigger an error if some patches in master-next are merged,
> you can rebase on master-next to see the error. The hello-mod recipe of
> meta-skeleton was also updated accordingly.
Do you mean I should take the latest reference from master-next for the meta-skeleton/hello-mod to meta-selftest?
>
> https://lists.openembedded.org/g/openembedded-core/message/218806
> https://lists.openembedded.org/g/openembedded-core/message/218804
>
> --
> Mathieu Dubois-Briand, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
[-- Attachment #2: Type: text/html, Size: 1477 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [OE-core] [PATCH v2] meta/meta-selftest: add selftest-hello-mod recipe
2025-06-19 5:56 ` Dixit Parmar
@ 2025-06-19 11:40 ` Mathieu Dubois-Briand
2025-06-19 11:56 ` Dixit Parmar
0 siblings, 1 reply; 8+ messages in thread
From: Mathieu Dubois-Briand @ 2025-06-19 11:40 UTC (permalink / raw)
To: dixitparmar19, openembedded-core
On Thu Jun 19, 2025 at 7:56 AM CEST, Dixit Parmar via lists.openembedded.org wrote:
> On Thu, Jun 19, 2025 at 10:15 AM, Mathieu Dubois-Briand wrote:
>
>>
>> On Mon Jun 9, 2025 at 3:41 PM CEST, Dixit Parmar via
>> lists.openembedded.org wrote:
>>
>>> Kernel module specific oe test cases requires a test kernel
>>> module package to work with. Added selftest-hello-mod
>>> derived from meta-skeleton/recipes-kernel/hello-mod.
>>>
>>> Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
>>> ---
>>
>> Thanks or your patch.
>>
>>
>>> +S = "${WORKDIR}/hello-mod"
>>
>> This will trigger an error if some patches in master-next are merged,
>> you can rebase on master-next to see the error. The hello-mod recipe of
>> meta-skeleton was also updated accordingly.
>
> Do you mean I should take the latest reference from master-next for the meta-skeleton/hello-mod to meta-selftest?
>
All I can say for sure is we cannot take both the series from Alexander
and your patch as-is.
So as I believe the said series is likely to be merged, I would indeed
suggest to modify your patch accordingly, and this can be done by taking
the last version of meta-skeleton/hello-mod. But again, I'm not the one
deciding what gets merged, so I cannot be sure if and when it will be
merged.
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] meta/meta-selftest: add selftest-hello-mod recipe
2025-06-19 11:40 ` [OE-core] " Mathieu Dubois-Briand
@ 2025-06-19 11:56 ` Dixit Parmar
2025-06-21 7:32 ` Dixit Parmar
0 siblings, 1 reply; 8+ messages in thread
From: Dixit Parmar @ 2025-06-19 11:56 UTC (permalink / raw)
To: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 2090 bytes --]
On Thu, Jun 19, 2025 at 05:10 PM, Mathieu Dubois-Briand wrote:
>
> On Thu Jun 19, 2025 at 7:56 AM CEST, Dixit Parmar via
> lists.openembedded.org wrote:
>
>> On Thu, Jun 19, 2025 at 10:15 AM, Mathieu Dubois-Briand wrote:
>>
>>
>>> On Mon Jun 9, 2025 at 3:41 PM CEST, Dixit Parmar via
>>> lists.openembedded.org wrote:
>>>
>>>
>>>> Kernel module specific oe test cases requires a test kernel
>>>> module package to work with. Added selftest-hello-mod
>>>> derived from meta-skeleton/recipes-kernel/hello-mod.
>>>>
>>>> Signed-off-by: Dixit Parmar <dixitparmar19@gmail.com>
>>>> ---
>>>
>>> Thanks or your patch.
>>>
>>>
>>>
>>>> +S = "${WORKDIR}/hello-mod"
>>>
>>> This will trigger an error if some patches in master-next are merged,
>>> you can rebase on master-next to see the error. The hello-mod recipe of
>>> meta-skeleton was also updated accordingly.
>>
>> Do you mean I should take the latest reference from master-next for the
>> meta-skeleton/hello-mod to meta-selftest?
>
> All I can say for sure is we cannot take both the series from Alexander
> and your patch as-is.
>
> So as I believe the said series is likely to be merged, I would indeed
> suggest to modify your patch accordingly, and this can be done by taking
> the last version of meta-skeleton/hello-mod. But again, I'm not the one
> deciding what gets merged, so I cannot be sure if and when it will be
> merged.
Understood. A failure was reported with the previous version of this patch, where the .bb file was missing the WORKDIR-related changes for ${S} as it was directly taken from the meta-skeleton/hello-mod. Now, to fix that, I have incorporated the solution this way. do you think this will give errors too? Pls don't misunderstand me, I get your point of rebasing to the latest meta-skeleton as reference but I just want to understand if this will get failed or not. because the said master-next patch sets are still yet to get merged.
>
> --
> Mathieu Dubois-Briand, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
[-- Attachment #2: Type: text/html, Size: 2287 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] meta/meta-selftest: add selftest-hello-mod recipe
2025-06-19 11:56 ` Dixit Parmar
@ 2025-06-21 7:32 ` Dixit Parmar
0 siblings, 0 replies; 8+ messages in thread
From: Dixit Parmar @ 2025-06-21 7:32 UTC (permalink / raw)
To: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 109 bytes --]
Hi,
Submitted new patch: https://lists.openembedded.org/g/openembedded-core/message/219152
Thanks,
Dixit
[-- Attachment #2: Type: text/html, Size: 264 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-06-21 7:32 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-09 13:41 [PATCH v2] meta/meta-selftest: add selftest-hello-mod recipe Dixit Parmar
2025-06-09 14:54 ` [OE-core] " Gyorgy Sarvari
2025-06-18 12:29 ` Dixit Parmar
2025-06-19 4:45 ` [OE-core] " Mathieu Dubois-Briand
2025-06-19 5:56 ` Dixit Parmar
2025-06-19 11:40 ` [OE-core] " Mathieu Dubois-Briand
2025-06-19 11:56 ` Dixit Parmar
2025-06-21 7:32 ` Dixit Parmar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox