Skip to contentSkip to conversation

Add hwspinlocktest

PATCH RESEND In review Judith Mendez 2 participants 3 messages Nov 19, 2024 – Nov 21, 2024

lore
Share & tools
lore
#0 lore raw

PATCH RESEND v2 1/1 Add hwspinlocktest

Add hwspinlock recipe to build out of tree module hwspinlock test.

---
Changes since v2:
- Add v2 to subject
Changes since v1:
- Change SRC_URI to pull from remote repo and add patches on top

---
 .../recipes-core/packagegroups/ti-test.bb     |  1 +
 .../0001-Add-support-for-AM62-SoCs.patch      | 31 +++++++++++++
 ...Fix-Makefile-for-to-build-with-yocto.patch | 46 +++++++++++++++++++
 .../hwspinlocktest/hwspinlocktest_0.1.bb      | 18 ++++++++
 4 files changed, 96 insertions(+)
 create mode 100644 meta-arago-test/recipes-kernel/hwspinlocktest/files/0001-Add-support-for-AM62-SoCs.patch
 create mode 100644 meta-arago-test/recipes-kernel/hwspinlocktest/files/0001-Fix-Makefile-for-to-build-with-yocto.patch
 create mode 100644 meta-arago-test/recipes-kernel/hwspinlocktest/hwspinlocktest_0.1.bb
meta-arago-test/recipes-core/packagegroups/ti-test.bb +1 -0
index 695bed5c..91ebec44 100644
@@ -17,6 +17,7 @@ TI_TEST_BASE = "\
     evtest \
     fio \
     git \
+    hwspinlocktest \
     hdparm \
     i2c-tools \
     iozone3 \
meta-arago-test/recipes-kernel/hwspinlocktest/files/0001-Add-support-for-AM62-SoCs.patch new file +31 -0
new file mode 100644
index 00000000..b2b99814
@@ -0,0 +1,31 @@
+From 2d8d169898fb6615dd5100c4ac4e307c54678153 Mon Sep 17 00:00:00 2001
+From: Judith Mendez <[email protected]>
+Date: Mon, 18 Nov 2024 14:57:45 -0600
+Subject: [PATCH] Add support for AM62* SoCs
+
+The K3 AM62* SoCs have a hwspinlock IP in MAIN domain.
+Extend the test to add the desired SoC compatible so that
+the test can be exercised on these new SoC families.
+
+Signed-off-by: Judith Mendez <[email protected]>
+---
+ omap_hwspinlock_test.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/omap_hwspinlock_test.c b/omap_hwspinlock_test.c
+index b180138..46fcc08 100644
+--- a/omap_hwspinlock_test.c
++++ b/omap_hwspinlock_test.c
+@@ -199,6 +199,9 @@ static const struct hwspinlock_data soc_data[] = {
+ 	{ "ti,j7200",	256, },
+ 	{ "ti,am642",	256, },
+ 	{ "ti,j721s2",	256, },
++	{ "ti,am625",	256, },
++	{ "ti,am62a7",	256, },
++	{ "ti,am62p5",	256, },
+ 	{ /* sentinel */ },
+ };
+ 
+-- 
+2.47.0
+
meta-arago-test/recipes-kernel/hwspinlocktest/files/0001-Fix-Makefile-for-to-build-with-yocto.patch new file +46 -0

46 lines not on this page · raw message

meta-arago-test/recipes-kernel/hwspinlocktest/hwspinlocktest_0.1.bb new file +18 -0
new file mode 100644
index 00000000..6de7bbb5
@@ -0,0 +1,18 @@
+SUMMARY = "Build hwspinlock test as an external Linux kernel module"
+DESCRIPTION = "${SUMMARY}"
+LICENSE = "GPL-2.0-only | BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=bfa02c83df161e37647ee23a2c7eacd4"
+
+inherit module
+
+SRC_URI = "git://github.com/sumananna/omap-hwspinlock-test;protocol=https;branch=master \
+		   file://0001-Fix-Makefile-for-to-build-with-yocto.patch \
+		   file://0001-Add-support-for-AM62-SoCs.patch "
+SRCREV = "20f15e79a3a0197e06328c252d23aec225de21ed"
+
+S = "${WORKDIR}/git"
+
+# 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-hwspinlocktest"
Signature · 1 line
2.47.0
#1 lore raw
Quoted 36 lines · Judith Mendez

Add hwspinlock recipe to build out of tree module hwspinlock test.

---
Changes since v2:
- Add v2 to subject
Changes since v1:
- Change SRC_URI to pull from remote repo and add patches on top

---
  .../recipes-core/packagegroups/ti-test.bb     |  1 +
  .../0001-Add-support-for-AM62-SoCs.patch      | 31 +++++++++++++
  ...Fix-Makefile-for-to-build-with-yocto.patch | 46 +++++++++++++++++++
  .../hwspinlocktest/hwspinlocktest_0.1.bb      | 18 ++++++++
  4 files changed, 96 insertions(+)

create mode 100644 meta-arago-test/recipes-kernel/hwspinlocktest/files/0001-Add-support-for-AM62-SoCs.patch create mode 100644 meta-arago-test/recipes-kernel/hwspinlocktest/files/0001-Fix-Makefile-for-to-build-with-yocto.patch create mode 100644 meta-arago-test/recipes-kernel/hwspinlocktest/hwspinlocktest_0.1.bb

meta-arago-test/recipes-core/packagegroups/ti-test.bb +1 -0
index 695bed5c..91ebec44 100644
@@ -17,6 +17,7 @@ TI_TEST_BASE = "\
      evtest \
      fio \
      git \
+    hwspinlocktest \
      hdparm \
      i2c-tools \
      iozone3 \
meta-arago-test/recipes-kernel/hwspinlocktest/files/0001-Add-support-for-AM62-SoCs.patch new file +0 -0
new file mode 100644
index 00000000..b2b99814

meta-arago-test/recipes-kernel/hwspinlocktest/files/0001-Add-support-for-AM62-SoCs.patch line 9

Quoted 9 lines
meta-arago-test/recipes-kernel/hwspinlocktest/files/0001-Add-support-for-AM62-SoCs.patch new file +9 -0
@@ -0,0 +1,31 @@
+From 2d8d169898fb6615dd5100c4ac4e307c54678153 Mon Sep 17 00:00:00 2001
+From: Judith Mendez <[email protected]>
+Date: Mon, 18 Nov 2024 14:57:45 -0600
+Subject: [PATCH] Add support for AM62* SoCs
+
+The K3 AM62* SoCs have a hwspinlock IP in MAIN domain.
+Extend the test to add the desired SoC compatible so that
+the test can be exercised on these new SoC families.
+

Both of the patches need an Upstream-Status entry to tell maintainers what the disposition of the patch is.

Add this to both:

Upstream-Status: Inactive-Upstream [private repo]

meta-arago-test/recipes-kernel/hwspinlocktest/files/0001-Add-support-for-AM62-SoCs.patch line 10

Quoted 1 line
meta-arago-test/recipes-kernel/hwspinlocktest/files/0001-Add-support-for-AM62-SoCs.patch new file +1 -0
+Signed-off-by: Judith Mendez <jm@ti.

com>

Quoted 97 lines
meta-arago-test/recipes-kernel/hwspinlocktest/files/0001-Add-support-for-AM62-SoCs.patch new file +21 -0
+---
+ omap_hwspinlock_test.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/omap_hwspinlock_test.c b/omap_hwspinlock_test.c
+index b180138..46fcc08 100644
+--- a/omap_hwspinlock_test.c
++++ b/omap_hwspinlock_test.c
+@@ -199,6 +199,9 @@ static const struct hwspinlock_data soc_data[] = {
+ 	{ "ti,j7200",	256, },
+ 	{ "ti,am642",	256, },
+ 	{ "ti,j721s2",	256, },
++	{ "ti,am625",	256, },
++	{ "ti,am62a7",	256, },
++	{ "ti,am62p5",	256, },
+ 	{ /* sentinel */ },
+ };
+
+--
+2.47.0
+
meta-arago-test/recipes-kernel/hwspinlocktest/files/0001-Fix-Makefile-for-to-build-with-yocto.patch new file +46 -0
new file mode 100644
index 00000000..ac362b2c
@@ -0,0 +1,46 @@
+From 3e1a3e3b9455f4cd40f7cc86a8eaff80206f77ce Mon Sep 17 00:00:00 2001
+From: Judith Mendez <[email protected]>
+Date: Mon, 18 Nov 2024 10:26:55 -0600
+Subject: [PATCH] Fix Makefile for to build with yocto
+
+Fix Makefile that builds hwspinlocktest out-of-tree-module
+for yocto recipie to be able to build the module.
+
+Signed-off-by: Judith Mendez <[email protected]>
+---
+ Makefile | 18 ++++++++++--------
+ 1 file changed, 10 insertions(+), 8 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 23ee629..d8fe76d 100644
+--- a/Makefile
++++ b/Makefile
+@@ -3,15 +3,17 @@
+ # TI OMAP HwSpinlock Unit Test
+ #
+
+-obj-m = omap_hwspinlock_test.o
++obj-m := omap_hwspinlock_test.o
++
++SRC := $(shell pwd)
+
+ all:
+-ifeq ($(KERNELDIR),)
+-	@echo "Error: KERNELDIR not set, exiting..."
+-	@echo "Eg: make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- KERNELDIR=<linux-kernel rootdir>"
+-	@exit 1
+-endif
+-	make ${MAKE_OPTS} -C $(KERNELDIR) M=$(PWD) modules
++	$(MAKE) -C $(KERNEL_SRC) M=$(SRC)
++
++modules_install:
++	$(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
+
+ clean:
+-	$(RM) -r *.o *.ko *.mod* *.dwo .*.dwo .*.cmd *.symvers modules.order
++	rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
++	rm -f Module.markers Module.symvers modules.order
++	rm -rf .tmp_versions Modules.symvers
+--
+2.47.0
+
meta-arago-test/recipes-kernel/hwspinlocktest/hwspinlocktest_0.1.bb new file +18 -0
new file mode 100644
index 00000000..6de7bbb5
@@ -0,0 +1,18 @@
+SUMMARY = "Build hwspinlock test as an external Linux kernel module"
+DESCRIPTION = "${SUMMARY}"
+LICENSE = "GPL-2.0-only | BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=bfa02c83df161e37647ee23a2c7eacd4"
+
+inherit module
+
+SRC_URI = "git://github.com/sumananna/omap-hwspinlock-test;protocol=https;branch=master \
+		   file://0001-Fix-Makefile-for-to-build-with-yocto.patch \
+		   file://0001-Add-support-for-AM62-SoCs.patch "
+SRCREV = "20f15e79a3a0197e06328c252d23aec225de21ed"
+
+S = "${WORKDIR}/git"
+
+# 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-hwspinlocktest"
Signature · 3 lines
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS
#2 lore raw

Hi Ryan,

Quoted 52 lines · Ryan Eatmon
Quoted 37 lines · Judith Mendez

Add hwspinlock recipe to build out of tree module hwspinlock test.

---
Changes since v2:
- Add v2 to subject
Changes since v1:
- Change SRC_URI to pull from remote repo and add patches on top
---
  .../recipes-core/packagegroups/ti-test.bb     |  1 + .../0001-Add-support-for-AM62-SoCs.patch      | 31 +++++++++++++ ...Fix-Makefile-for-to-build-with-yocto.patch | 46 +++++++++++++++++++ .../hwspinlocktest/hwspinlocktest_0.1.bb      | 18 ++++++++

  4 files changed, 96 insertions(+)

  create mode 100644 meta-arago-test/recipes-kernel/hwspinlocktest/files/0001-Add-support-for-AM62-SoCs.patch create mode 100644 meta-arago-test/recipes-kernel/hwspinlocktest/files/0001-Fix-Makefile-for-to-build-with-yocto.patch create mode 100644 meta-arago-test/recipes-kernel/hwspinlocktest/hwspinlocktest_0.1.bb

meta-arago-test/recipes-core/packagegroups/ti-test.bb +1 -0
index 695bed5c..91ebec44 100644
@@ -17,6 +17,7 @@ TI_TEST_BASE = "\
       evtest \
       fio \
       git \
+    hwspinlocktest \
       hdparm \
       i2c-tools \
       iozone3 \
(quoted diff) +0 -0
new file mode 100644
index 00000000..b2b99814

b/meta-arago-test/recipes-kernel/hwspinlocktest/files/0001-Add-support-for-AM62-SoCs.patch

meta-arago-test/recipes-kernel/hwspinlocktest/files/0001-Add-support-for-AM62-SoCs.patch line 9

Quoted 9 lines
meta-arago-test/recipes-kernel/hwspinlocktest/files/0001-Add-support-for-AM62-SoCs.patch new file +9 -0
@@ -0,0 +1,31 @@
+From 2d8d169898fb6615dd5100c4ac4e307c54678153 Mon Sep 17 00:00:00 2001
+From: Judith Mendez <[email protected]>
+Date: Mon, 18 Nov 2024 14:57:45 -0600
+Subject: [PATCH] Add support for AM62* SoCs
+
+The K3 AM62* SoCs have a hwspinlock IP in MAIN domain.
+Extend the test to add the desired SoC compatible so that
+the test can be exercised on these new SoC families.
+

Both of the patches need an Upstream-Status entry to tell maintainers what the disposition of the patch is.

Quoted 4 lines

Add this to both:

Upstream-Status: Inactive-Upstream [private repo]

Sure I can add, thanks.

~ Judith

Quoted 110 lines

Review line 10

Quoted 4 lines
(quoted diff) +1 -0
+Signed-off-by: Judith Mendez <jm@ti.

com>

Quoted 103 lines
meta-arago-test/recipes-kernel/hwspinlocktest/files/0001-Add-support-for-AM62-SoCs.patch new file +21 -0
+---
+ omap_hwspinlock_test.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/omap_hwspinlock_test.c b/omap_hwspinlock_test.c
+index b180138..46fcc08 100644
+--- a/omap_hwspinlock_test.c
++++ b/omap_hwspinlock_test.c
+@@ -199,6 +199,9 @@ static const struct hwspinlock_data soc_data[] = {
+     { "ti,j7200",    256, },
+     { "ti,am642",    256, },
+     { "ti,j721s2",    256, },
++    { "ti,am625",    256, },
++    { "ti,am62a7",    256, },
++    { "ti,am62p5",    256, },
+     { /* sentinel */ },
+ };
+
+--
+2.47.0
+
(quoted diff) +0 -0
new file mode 100644
index 00000000..ac362b2c

b/meta-arago-test/recipes-kernel/hwspinlocktest/files/0001-Fix-Makefile-for-to-build-with-yocto.patch

meta-arago-test/recipes-kernel/hwspinlocktest/files/0001-Fix-Makefile-for-to-build-with-yocto.patch new file +30 -0
@@ -0,0 +1,46 @@
+From 3e1a3e3b9455f4cd40f7cc86a8eaff80206f77ce Mon Sep 17 00:00:00 2001
+From: Judith Mendez <[email protected]>
+Date: Mon, 18 Nov 2024 10:26:55 -0600
+Subject: [PATCH] Fix Makefile for to build with yocto
+
+Fix Makefile that builds hwspinlocktest out-of-tree-module
+for yocto recipie to be able to build the module.
+
+Signed-off-by: Judith Mendez <[email protected]>
+---
+ Makefile | 18 ++++++++++--------
+ 1 file changed, 10 insertions(+), 8 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 23ee629..d8fe76d 100644
+--- a/Makefile
++++ b/Makefile
+@@ -3,15 +3,17 @@
+ # TI OMAP HwSpinlock Unit Test
+ #
+
+-obj-m = omap_hwspinlock_test.o
++obj-m := omap_hwspinlock_test.o
++
++SRC := $(shell pwd)
+
+ all:
+-ifeq ($(KERNELDIR),)
+-    @echo "Error: KERNELDIR not set, exiting..."
+-    @echo "Eg: make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- 

KERNELDIR=<linux-kernel rootdir>"

+-    @exit 1
+-endif
+-    make ${MAKE_OPTS} -C $(KERNELDIR) M=$(PWD) modules

++    $(MAKE) -C $(KERNEL_SRC) M=$(SRC)
++
++modules_install:
++    $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install +
+ clean:
+-    $(RM) -r *.o *.ko *.mod* *.dwo .*.dwo .*.cmd *.symvers modules.order
++    rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c ++    rm -f Module.markers Module.symvers modules.order ++    rm -rf .tmp_versions Modules.symvers
+--
+2.47.0

(quoted diff) +1 -0
+
meta-arago-test/recipes-kernel/hwspinlocktest/hwspinlocktest_0.1.bb new file +4 -0
new file mode 100644
index 00000000..6de7bbb5
@@ -0,0 +1,18 @@
+SUMMARY = "Build hwspinlock test as an external Linux kernel module"
+DESCRIPTION = "${SUMMARY}"
+LICENSE = "GPL-2.0-only | BSD-3-Clause"
+LIC_FILES_CHKSUM = 

"file://${WORKDIR}/git/LICENSE;md5=bfa02c83df161e37647ee23a2c7eacd4"

meta-arago-test/recipes-kernel/hwspinlocktest/hwspinlocktest_0.1.bb new file +4 -0
+
+inherit module
+
+SRC_URI = 

"git://github.com/sumananna/omap-hwspinlock-test;protocol=https;branch=master \
+           file://0001-Fix-Makefile-for-to-build-with-yocto.patch \
+           file://0001-Add-support-for-AM62-SoCs.patch "

meta-arago-test/recipes-kernel/hwspinlocktest/hwspinlocktest_0.1.bb new file +5 -0
+SRCREV = "20f15e79a3a0197e06328c252d23aec225de21ed"
+
+S = "${WORKDIR}/git"
+
+# The inherit of module.bbclass will automatically name module 

packages with

meta-arago-test/recipes-kernel/hwspinlocktest/hwspinlocktest_0.1.bb new file +3 -0
+# "kernel-module-" prefix as required by the oe-core build environment.
+
+RPROVIDES:${PN} += "kernel-module-hwspinlocktest"