omap3-sgx-modules-x11: Separate X11 SGX driver package into new recipe
[glsdk/meta-ti-glsdk.git] / recipes-bsp / powervr-drivers / omap3-sgx-modules-x11_4.09.00.01.bb
1 DESCRIPTION = "Kernel drivers for the PowerVR SGX chipset found in the omap3 SoCs (for X11)"
2 LICENSE = "GPLv2"
3 LIC_FILES_CHKSUM = "file://COPYING;md5=ea5743acf520dd81ca172e69f818a3d4"
5 TI_BIN_UNPK_CMDS="Y: qY:workdir:Y"
6 require ../../recipes-ti/includes/ti-eula-unpack.inc
8 SGXPV = "4_09_00_01"
9 IMGPV = "1.9.2188537"
10 BINFILE = "Graphics_SDK_setuplinux_${SGXPV}_minimal_demos.bin"
12 inherit module
14 MACHINE_KERNEL_PR_append = "a"
15 PR = "${MACHINE_KERNEL_PR}"
17 DEFAULT_PREFERENCE = "-1"
19 SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/${SGXPV}/exports/${BINFILE}"
21 SRC_URI[md5sum] = "bd35e9d8843aff3a2aca9d41e7db1c7d"
22 SRC_URI[sha256sum] = "eb37f75ddde4640b09e760fa86e689beb394330ecdf68786188c34f249247647"
24 TI_BIN_UNPK_WDEXT="/Graphics_SDK_${SGXPV}"
25 S = "${WORKDIR}${TI_BIN_UNPK_WDEXT}/GFX_Linux_KM"
27 PVRBUILD = "release"
28 export KERNELDIR = "${STAGING_KERNEL_DIR}"
30 INHIBIT_PACKAGE_STRIP = "1"
32 TI_PLATFORM_omap3 = "omap3630"
33 TI_PLATFORM_ti814x = "ti81xx"
34 TI_PLATFORM_ti816x = "ti81xx"
35 TI_PLATFORM_ti33x = "ti335x"
37 MODULESLOCATION_omap3 = "dc_omapfb3_linux"
38 MODULESLOCATION_ti814x = "dc_ti81xx_linux"
39 MODULESLOCATION_ti816x = "dc_ti81xx_linux"
40 MODULESLOCATION_ti33x = "dc_ti335x_linux"
42 export SUPPORT_XORG ?= "1"
44 MAKE_TARGETS = " BUILD=${PVRBUILD} TI_PLATFORM=${TI_PLATFORM} SUPPORT_XORG=${SUPPORT_XORG}"
46 do_compile() {
47         export TOOLCHAIN="${TOOLCHAIN_PATH}"
48         export PLAT_CC="${CC}"
49         export PLAT_CPP="${CXX}"
50         export PLAR_AR="${AR}"
51         for kernelver in ${WORKDIR}/../../linux-ti-staging/* ; do
52                 cp -f $kernelver/git/drivers/gpu/drm/*.c ${S}/services4/3rdparty/linux_drm/
53         done
54         if [ $(echo -e "${KERNEL_VERSION}\n3.3" | sort --version-sort | head -1) = "3.3" ] ; then
55                 cp -f ${S}/services4/3rdparty/linux_drm/Kbuild_3.3 \
56                         ${S}/services4/3rdparty/linux_drm/Kbuild
57         else 
58                 if [ $(echo -e "${KERNEL_VERSION}\n3.2" | sort --version-sort | head -1) = "3.2" ] ; then
59                         cp -f ${S}/services4/3rdparty/linux_drm/Kbuild_3.2 \
60                                 ${S}/services4/3rdparty/linux_drm/Kbuild
61                 fi
62         fi
63         oe_runmake BUILD=${PVRBUILD} TI_PLATFORM=${TI_PLATFORM} SUPPORT_XORG=${SUPPORT_XORG}
64 }
66 do_install() {
67     mkdir -p ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/gpu/pvr
68     cp  ${S}/pvrsrvkm.ko \
69          ${S}/services4/3rdparty/bufferclass_ti/bufferclass_ti.ko \
70         ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/gpu/pvr
72     cp ${S}/services4/3rdparty/linux_drm/drm.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/gpu/pvr
73 }