diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-gles | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-gles')
2 files changed, 101 insertions, 0 deletions
diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bb new file mode 100644 index 00000000..50a6765c --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles.bb @@ -0,0 +1,76 @@ +DESCRIPTION = "Kernel module of PowerVR GPU" +LICENSE = "GPLv2 & MIT" +LIC_FILES_CHKSUM = " \ + file://GPL-COPYING;md5=60422928ba677faaa13d6ab5f5baaa1e \ + file://MIT-COPYING;md5=8c2810fa6bfdc5ae5c15a0c1ade34054 \ +" +inherit module +PN = "kernel-module-gles" +PR = "r0" + +COMPATIBLE_MACHINE = "(r8a7795|r8a7796|r8a77965|r8a77990)" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +SRC_URI_r8a7795 = 'file://GSX_KM_H3.tar.bz2' +SRC_URI_r8a7796 = 'file://GSX_KM_M3.tar.bz2' +SRC_URI_r8a77965 = 'file://GSX_KM_M3N.tar.bz2' +SRC_URI_r8a77990 = 'file://GSX_KM_E3.tar.bz2' + +S = "${WORKDIR}/rogue_km" + +# W/A fix build errors with GCC 8.1 +SRC_URI_append = " file://0001-Silence-warnings-being-treated-as-errors.patch" + +KBUILD_DIR_r8a7795 = "${S}/build/linux/r8a7795_linux" +KBUILD_DIR_r8a7796 = "${S}/build/linux/r8a7796_linux" +KBUILD_DIR_r8a77965 = "${S}/build/linux/r8a77965_linux" +KBUILD_DIR_r8a77990 = "${S}/build/linux/r8a7799_linux" +KBUILD_OUTDIR_r8a7795 = "binary_r8a7795_linux_release/target_aarch64/kbuild/" +KBUILD_OUTDIR_r8a7796 = "binary_r8a7796_linux_release/target_aarch64/kbuild/" +KBUILD_OUTDIR_r8a77965 = "binary_r8a77965_linux_release/target_aarch64/kbuild/" +KBUILD_OUTDIR_r8a77990 = "binary_r8a7799_linux_release/target_aarch64/kbuild/" + +B = "${KBUILD_DIR}" + +EXTRA_OEMAKE = "KERNELDIR=${STAGING_KERNEL_BUILDDIR}" +EXTRA_OEMAKE += "CROSS_COMPILE=${CROSS_COMPILE}" + +# Build GFX kernel module without suffix +KERNEL_MODULE_PACKAGE_SUFFIX = "" + +module_do_compile() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + cd ${KBUILD_DIR} + oe_runmake +} + +module_do_install() { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + install -d ${D}/lib/modules/${KERNEL_VERSION} + cd ${KBUILD_DIR} + oe_runmake DISCIMAGE="${D}" install +} + +# Ship the module symbol file to kernel build dir +SYSROOT_PREPROCESS_FUNCS = "module_sysroot_symbol" + +module_sysroot_symbol() { + install -m 644 ${S}/${KBUILD_OUTDIR}/Module.symvers ${STAGING_KERNEL_BUILDDIR}/GLES.symvers +} + +# Clean up the module symbol file +CLEANFUNCS = "module_clean_symbol" + +module_clean_symbol() { + rm -f ${STAGING_KERNEL_BUILDDIR}/GLES.symvers +} + +FILES_${PN} = " \ + /lib/modules/${KERNEL_VERSION}/extra/pvrsrvkm.ko \ + ${sysconfdir}/modules-load.d \ +" + +RPROVIDES_${PN} += "kernel-module-pvrsrvkm kernel-module-dc-linuxfb" + +# Auto load pvrsrvkm +KERNEL_MODULE_AUTOLOAD_append = " pvrsrvkm" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles/0001-Silence-warnings-being-treated-as-errors.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles/0001-Silence-warnings-being-treated-as-errors.patch new file mode 100644 index 00000000..a9ddfa51 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-kernel/kernel-module-gles/kernel-module-gles/0001-Silence-warnings-being-treated-as-errors.patch @@ -0,0 +1,25 @@ +Current GFX source code will get compilation error with GCC 9.x, +because it is defined in makefile to use -Wall to enable all Warnings +check. +-Wcast-function-type, -Wsizeof-pointer-div and -Wstringop-truncation +-Wmissing-attributes -Waddress-of-packed-member +are new Warnings from GCC 9. + +Signed-off-by: Khang Nguyen <khang.nguyen.xw@renesas.com> +--- + build/linux/buildvars.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: rogue_km/build/linux/buildvars.mk +=================================================================== +--- rogue_km.orig/build/linux/buildvars.mk ++++ rogue_km/build/linux/buildvars.mk +@@ -51,7 +51,7 @@ + + # These flags are used for kernel, User C and User C++ + # +-COMMON_FLAGS := -W -Wall ++COMMON_FLAGS := -W -Wall -Wno-cast-function-type -Wno-sizeof-pointer-div -Wno-stringop-truncation -Wno-missing-attributes -Wno-address-of-packed-member + + # Enable 64-bit file & memory handling on 32-bit systems. + # |