Skip to contentSkip to conversation

recipes-bsp: Add recipe for PowerVR SGX544MP2 kernel drivers

PATCH In review Mrinmayee Hingolikar 4 participants 4 messages Jul 1, 2013 – Oct 25, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 recipes-bsp: Add recipe for PowerVR SGX544MP2 kernel drivers

* The PowerVR SGX544MP2 is found on omap5 and dra7xx devices. This recipe adds support for the PowerVR graphics subsystem.

---
 .../powervr-drivers/omapdrm-pvr_1.9.2253347.bb     |   42 ++++++++++++++++++++
 1 files changed, 42 insertions(+), 0 deletions(-)
 create mode 100644 recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb
recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +42 -0
new file mode 100644
index 0000000..edb2682
@@ -0,0 +1,42 @@
+DESCRIPTION =  "Kernel drivers for the PowerVR SGX chipset found in the omap5 SoCs"
+HOMEPAGE = "http://git.ti.com"
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://MIT-COPYING;md5=8c2810fa6bfdc5ae5c15a0c1ade34054"
+
+inherit module 
+
+SRC_URI = "git://git.ti.com/graphics/omap5-sgx-ddk-linux.git;protocol=git"
+S = "${WORKDIR}/git"
+
+SRCREV = "6668f4ea0bbf7e3df7f72dc2230ab8da1e748b2d"
+PR = "${MACHINE_KERNEL_PR}"
+
+do_compile() {
+    cd ${S}/eurasiacon/build/linux2/omap5430_linux
+    oe_runmake KERNELDIR="${STAGING_KERNEL_DIR}"
+}
+
+do_install() {
+    mkdir -p ${D}/lib/modules/${KERNEL_VERSION}/extra/
+    cp ${S}/eurasiacon/binary2_omap5430_linux_release/target/kbuild/omapdrm_pvr.ko \ 
+    ${D}/lib/modules/${KERNEL_VERSION}/extra/
+}
+
+FILES_omapdrm-pvr = "/lib/modules/${KERNEL_VERSION}/extra/omapdrm_pvr.ko"
+RDEPENDS_omapdrm-pvr += "update-modules"
+
+pkg_postinst_omapdrm-pvr () {
+#!/bin/sh
+if [ -n "$D" ]; then
+        exit 1
+fi
+
+depmod -a
+update-modules || true
+}
+
+pkg_postrm_omapdrm-pvr () {
+#!/bin/sh
+update-modules || true
+}
Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 34 lines

-----Original Message-----
From: [email protected] [mailto:meta-ti- [email protected]] On Behalf Of Hingolikar, Mrinmayee
Sent: Monday, July 01, 2013 7:32 AM
To: [email protected]
Subject: [meta-ti] [PATCH 1/2] recipes-bsp: Add recipe for PowerVR SGX544MP2 kernel drivers

* The PowerVR SGX544MP2 is found on omap5 and dra7xx devices. This recipe adds support for the PowerVR graphics subsystem.

---
.../powervr-drivers/omapdrm-pvr_1.9.2253347.bb | 42
++++++++++++++++++++

1 files changed, 42 insertions(+), 0 deletions(-)

create mode 100644 recipes-bsp/powervr-drivers/omapdrm- pvr_1.9.2253347.bb

(quoted diff) +0 -0

pvr_1.9.2253347.bb b/recipes-bsp/powervr-drivers/omapdrm- pvr_1.9.2253347.bb
new file mode 100644
index 0000000..edb2682

recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +1 -0
@@ -0,0 +1,42 @@
+DESCRIPTION =  "Kernel drivers for the PowerVR SGX chipset found

in the omap5 SoCs"

recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +4 -0
+HOMEPAGE = "http://git.ti.com"
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://MIT-
Quoted 1 line

COPYING;md5=8c2810fa6bfdc5ae5c15a0c1ade34054"

I see an issue with you setting the LICENSE to GPLv2 but having the file you are checking be MIT-COPYING. This seems wrong.

Quoted 5 lines
recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +4 -0
+
+inherit module
+
+SRC_URI = "git://git.ti.com/graphics/omap5-sgx-ddk-

linux.git;protocol=git"

recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb line 18

Quoted 9 lines
recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +9 -0
+S = "${WORKDIR}/git"
+
+SRCREV = "6668f4ea0bbf7e3df7f72dc2230ab8da1e748b2d"
+PR = "${MACHINE_KERNEL_PR}"
+
+do_compile() {
+    cd ${S}/eurasiacon/build/linux2/omap5430_linux
+    oe_runmake KERNELDIR="${STAGING_KERNEL_DIR}"
+}

I think you could do a do_compile_prepend here to perform the cd command and set EXTRA_OEMAKE to include the KERNELDIR setting. That way you don't have to override the entire do_compile function.

recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb

Quoted 8 lines
recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +4 -0
+
+do_install() {
+    mkdir -p ${D}/lib/modules/${KERNEL_VERSION}/extra/
+    cp

${S}/eurasiacon/binary2_omap5430_linux_release/target/kbuild/omapd rm_pvr.ko \

recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +2 -0
+    ${D}/lib/modules/${KERNEL_VERSION}/extra/
+}

Can you not use the default do_install in the module.bbclass? As long as your makefile can handle modules_install you should be fine here.

Quoted 3 lines
recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +2 -0
+
+FILES_omapdrm-pvr =

"/lib/modules/${KERNEL_VERSION}/extra/omapdrm_pvr.ko"

The FILES setting in module.bbclass should pick this us out of /lib/modules

Quoted 1 line

+RDEPENDS_omapdrm-pvr += "update-modules"

This RDEPENDS is already part of module.bbclass

Quoted 4 lines
recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +4 -0
+
+pkg_postinst_omapdrm-pvr () {
+#!/bin/sh
+if [ -n "$D" ]; then

recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb line 41

Quoted 10 lines
recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +10 -0
+        exit 1
+fi
+
+depmod -a
+update-modules || true
+}
+
+pkg_postrm_omapdrm-pvr () {
+#!/bin/sh
+update-modules || true

Why did you need to define these functions? The module.bbclass that you inherit already has:

pkg_postinst_append () {
if [ -z "$D" ]; then

    depmod -a
    update-modules || true

fi
}

pkg_postrm_append () {
update-modules || true
}

Won't these work for you?

Quoted 8 lines

+}
--
1.7.0.4

_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti

#2 lore raw

Ping for addressing Chase's comments?

Quoted 123 lines · Chase
Quoted 34 lines

-----Original Message-----
From: [email protected] [mailto:meta-ti- [email protected]] On Behalf Of Hingolikar, Mrinmayee
Sent: Monday, July 01, 2013 7:32 AM
To: [email protected]
Subject: [meta-ti] [PATCH 1/2] recipes-bsp: Add recipe for PowerVR SGX544MP2 kernel drivers

* The PowerVR SGX544MP2 is found on omap5 and dra7xx devices. This recipe adds support for the PowerVR graphics subsystem.

---
.../powervr-drivers/omapdrm-pvr_1.9.2253347.bb | 42
++++++++++++++++++++

1 files changed, 42 insertions(+), 0 deletions(-)

create mode 100644 recipes-bsp/powervr-drivers/omapdrm- pvr_1.9.2253347.bb

(quoted diff) +0 -0

pvr_1.9.2253347.bb b/recipes-bsp/powervr-drivers/omapdrm- pvr_1.9.2253347.bb
new file mode 100644
index 0000000..edb2682

recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +1 -0
@@ -0,0 +1,42 @@
+DESCRIPTION =  "Kernel drivers for the PowerVR SGX chipset found

in the omap5 SoCs"

recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +4 -0
+HOMEPAGE = "http://git.ti.com"
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://MIT-
Quoted 1 line

COPYING;md5=8c2810fa6bfdc5ae5c15a0c1ade34054"

I see an issue with you setting the LICENSE to GPLv2 but having the file you are checking be MIT-COPYING. This seems wrong.

Quoted 5 lines
recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +4 -0
+
+inherit module
+
+SRC_URI = "git://git.ti.com/graphics/omap5-sgx-ddk-

linux.git;protocol=git"

recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb line 18

Quoted 9 lines
recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +9 -0
+S = "${WORKDIR}/git"
+
+SRCREV = "6668f4ea0bbf7e3df7f72dc2230ab8da1e748b2d"
+PR = "${MACHINE_KERNEL_PR}"
+
+do_compile() {
+    cd ${S}/eurasiacon/build/linux2/omap5430_linux
+    oe_runmake KERNELDIR="${STAGING_KERNEL_DIR}"
+}

I think you could do a do_compile_prepend here to perform the cd command and set EXTRA_OEMAKE to include the KERNELDIR setting. That way you don't have to override the entire do_compile function.

recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb

Quoted 8 lines
recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +4 -0
+
+do_install() {
+    mkdir -p ${D}/lib/modules/${KERNEL_VERSION}/extra/
+    cp

${S}/eurasiacon/binary2_omap5430_linux_release/target/kbuild/omapd rm_pvr.ko \

recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +2 -0
+    ${D}/lib/modules/${KERNEL_VERSION}/extra/
+}

Can you not use the default do_install in the module.bbclass? As long as your makefile can handle modules_install you should be fine here.

Quoted 3 lines
recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +2 -0
+
+FILES_omapdrm-pvr =

"/lib/modules/${KERNEL_VERSION}/extra/omapdrm_pvr.ko"

The FILES setting in module.bbclass should pick this us out of /lib/modules

Quoted 1 line

+RDEPENDS_omapdrm-pvr += "update-modules"

This RDEPENDS is already part of module.bbclass

Quoted 4 lines
recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +4 -0
+
+pkg_postinst_omapdrm-pvr () {
+#!/bin/sh
+if [ -n "$D" ]; then

recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb line 41

Quoted 10 lines
recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +10 -0
+        exit 1
+fi
+
+depmod -a
+update-modules || true
+}
+
+pkg_postrm_omapdrm-pvr () {
+#!/bin/sh
+update-modules || true

Why did you need to define these functions? The module.bbclass that you inherit already has:

pkg_postinst_append () {
if [ -z "$D" ]; then

    depmod -a
    update-modules || true

fi
}

pkg_postrm_append () {
update-modules || true
}

Won't these work for you?

Quoted 8 lines

+}
--
1.7.0.4

_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti

_______________________________________________
meta-ti mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-ti

#3 lore raw

Hi,

2013/7/23 Denys Dmytriyenko <[email protected]>:

Quoted 118 lines

Ping for addressing Chase's comments?

Quoted 115 lines · Chase
Quoted 34 lines

-----Original Message-----
From: [email protected] [mailto:meta-ti- [email protected]] On Behalf Of Hingolikar, Mrinmayee
Sent: Monday, July 01, 2013 7:32 AM
To: [email protected]
Subject: [meta-ti] [PATCH 1/2] recipes-bsp: Add recipe for PowerVR SGX544MP2 kernel drivers

* The PowerVR SGX544MP2 is found on omap5 and dra7xx devices. This recipe adds support for the PowerVR graphics subsystem.

---
.../powervr-drivers/omapdrm-pvr_1.9.2253347.bb | 42
++++++++++++++++++++

1 files changed, 42 insertions(+), 0 deletions(-)

create mode 100644 recipes-bsp/powervr-drivers/omapdrm- pvr_1.9.2253347.bb

(quoted diff) +0 -0

pvr_1.9.2253347.bb b/recipes-bsp/powervr-drivers/omapdrm- pvr_1.9.2253347.bb
new file mode 100644
index 0000000..edb2682

recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +1 -0
@@ -0,0 +1,42 @@
+DESCRIPTION =  "Kernel drivers for the PowerVR SGX chipset found

in the omap5 SoCs"

recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +4 -0
+HOMEPAGE = "http://git.ti.com"
+LICENSE = "GPLv2"
+
+LIC_FILES_CHKSUM = "file://MIT-
Quoted 1 line

COPYING;md5=8c2810fa6bfdc5ae5c15a0c1ade34054"

I see an issue with you setting the LICENSE to GPLv2 but having the file you are checking be MIT-COPYING. This seems wrong.

Quoted 5 lines
recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +4 -0
+
+inherit module
+
+SRC_URI = "git://git.ti.com/graphics/omap5-sgx-ddk-

linux.git;protocol=git"

recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb line 18

Quoted 9 lines
recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +9 -0
+S = "${WORKDIR}/git"
+
+SRCREV = "6668f4ea0bbf7e3df7f72dc2230ab8da1e748b2d"
+PR = "${MACHINE_KERNEL_PR}"
+
+do_compile() {
+    cd ${S}/eurasiacon/build/linux2/omap5430_linux
+    oe_runmake KERNELDIR="${STAGING_KERNEL_DIR}"
+}

I think you could do a do_compile_prepend here to perform the cd command and set EXTRA_OEMAKE to include the KERNELDIR setting. That way you don't have to override the entire do_compile function.

recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb

Quoted 8 lines
recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +4 -0
+
+do_install() {
+    mkdir -p ${D}/lib/modules/${KERNEL_VERSION}/extra/
+    cp

${S}/eurasiacon/binary2_omap5430_linux_release/target/kbuild/omapd rm_pvr.ko \

recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +2 -0
+    ${D}/lib/modules/${KERNEL_VERSION}/extra/
+}

Can you not use the default do_install in the module.bbclass? As long as your makefile can handle modules_install you should be fine here.

Quoted 3 lines
recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +2 -0
+
+FILES_omapdrm-pvr =

"/lib/modules/${KERNEL_VERSION}/extra/omapdrm_pvr.ko"

The FILES setting in module.bbclass should pick this us out of /lib/modules

Quoted 1 line

+RDEPENDS_omapdrm-pvr += "update-modules"

This RDEPENDS is already part of module.bbclass

Quoted 4 lines
recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +4 -0
+
+pkg_postinst_omapdrm-pvr () {
+#!/bin/sh
+if [ -n "$D" ]; then

recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb line 41

Quoted 10 lines
recipes-bsp/powervr-drivers/omapdrm-pvr_1.9.2253347.bb new file +10 -0
+        exit 1
+fi
+
+depmod -a
+update-modules || true
+}
+
+pkg_postrm_omapdrm-pvr () {
+#!/bin/sh
+update-modules || true

Why did you need to define these functions? The module.bbclass that you inherit already has:

pkg_postinst_append () {
if [ -z "$D" ]; then

    depmod -a
    update-modules || true

fi
}

pkg_postrm_append () {
update-modules || true
}

Won't these work for you?

Quoted 4 lines

+}
--
1.7.0.4

Against which kernel is expected that this driver builds successfully ?

I'm trying to build this driver against 3.8 from git.ti.com and seems is not working.

eurasiacon/binary2_omap5430_linux_release/target/kbuild/services4/srvkm/env/linux/mmap.c:466:2:
error: implicit declaration of function 'omap_gem_new_ext' [-Werror=implicit-function-declaration]
return omap_gem_new_ext(dev, gsize, flags, paddr, pages, &gem_ops);
^

eurasiacon/binary2_omap5430_linux_release/target/kbuild/services4/srvkm/env/linux/mmap.c:1423:15:
error: variable 'gem_ops' has initializer but incomplete type

 static struct omap_gem_vm_ops gem_ops = {
               ^

eurasiacon/binary2_omap5430_linux_release/target/kbuild/services4/srvkm/env/linux/mmap.c:1424:3:
error: unknown field 'open' specified in initializer
.open = MMapVOpenExt,
^

Best regards,
Enric