[Openpvrsgx-devgroup] openpvrsgx-devgroup Digest, Vol 11, Issue 8 - build for x86 / cedarview

H. Nikolaus Schaller hns at goldelico.com
Fri Oct 16 22:41:17 CEST 2020


Hi Alif,

> Am 16.10.2020 um 12:03 schrieb Alif Ilhan <alifilhan0 at gmail.com>:
> 
> Okay thank you. I will check out the code in my PC today and build it. Then I will inform the bugs.
> Thanks for the info
> Alif

I have extended my cross-compile setup so that I can compile for "ARCH=x86".
You may wonder why I need to cross compile for intel, but my build host
machine runs macOS so I need a cross-compiler for intel.

It turned out that the code needs some minor tweaks so that it compiles
for x86. I have attached some patches to the letux-pvrsrvkm-5.9-rc2 branch.

BTW: which defconfig do you use? Do you use some from arch/x86/configs
or a private one?

For my build tests I have started with a copy of the i386_defconfig
(expanded) and then changed:

@@ -297,7 +297,7 @@ CONFIG_SCHED_OMIT_FRAME_POINTER=y
 # CONFIG_M586 is not set
 # CONFIG_M586TSC is not set
 # CONFIG_M586MMX is not set
-CONFIG_M686=y
+# CONFIG_M686 is not set
 # CONFIG_MPENTIUMII is not set
 # CONFIG_MPENTIUMIII is not set
 # CONFIG_MPENTIUMM is not set
@@ -316,7 +316,7 @@ CONFIG_M686=y
 # CONFIG_MVIAC3_2 is not set
 # CONFIG_MVIAC7 is not set
 # CONFIG_MCORE2 is not set
-# CONFIG_MATOM is not set
+CONFIG_MATOM=y
 CONFIG_X86_GENERIC=y
 CONFIG_X86_INTERNODE_CACHE_SHIFT=6
 CONFIG_X86_L1_CACHE_SHIFT=6

To enable building the SGX kernel module:

@@ -2849,6 +2849,7 @@ CONFIG_DRM_FBDEV_EMULATION=y
 CONFIG_DRM_FBDEV_OVERALLOC=100
 # CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
 # CONFIG_DRM_DP_CEC is not set
+CONFIG_DRM_VM=y
 
 #
 # I2C encoder or helper chips
@@ -2910,8 +2911,29 @@ CONFIG_DRM_PANEL_BRIDGE=y
 # CONFIG_DRM_CIRRUS_QEMU is not set
 # CONFIG_DRM_GM12U320 is not set
 # CONFIG_DRM_VBOXVIDEO is not set
-# CONFIG_SGX is not set
-# CONFIG_DRM_LEGACY is not set
+CONFIG_SGX=y
+# CONFIG_PVRSGX_1_9_2188537 is not set
+# CONFIG_PVRSGX_1_9_2253347 is not set
+# CONFIG_PVRSGX_1_10_2359475 is not set
+# CONFIG_PVRSGX_1_13_3341330 is not set
+CONFIG_PVRSGX_1_14_3699939=y
+# CONFIG_PVRSGX_1_14_3759903 is not set
+# CONFIG_PVRSGX_1_14_3841212 is not set
+# CONFIG_PVRSGX_1_15_4564147 is not set
+# CONFIG_PVRSGX_1_17_4948957 is not set
+# CONFIG_SGX_DEBUG is not set
+CONFIG_SGX_DRM=y
+CONFIG_SGX_CEDARVIEW=m
+# CONFIG_SGX_POULSBO is not set
+# CONFIG_SGX_GENERIC is not set
+CONFIG_DRM_LEGACY=y
+# CONFIG_DRM_TDFX is not set
+# CONFIG_DRM_R128 is not set
+# CONFIG_DRM_I810 is not set
+# CONFIG_DRM_MGA is not set
+# CONFIG_DRM_SIS is not set
+# CONFIG_DRM_VIA is not set
+# CONFIG_DRM_SAVAGE is not set
 CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
 
 #

With these patches and settings I can successfully compile a kernel and
the resulting pvrsrvkm.ko looks like this:

iMac:master hns$ ls -l drivers/gpu/drm/pvrsgx/1.14.3699939/eurasia_km/pvrsrvkm_gma3600_sgx545_10141.ko
-rw-r--r--  1 hns  staff  5121748 16 Okt 20:10 drivers/gpu/drm/pvrsgx/1.14.3699939/eurasia_km/pvrsrvkm_gma3600_sgx545_10141.ko
iMac:master hns$ file drivers/gpu/drm/pvrsgx/1.14.3699939/eurasia_km/pvrsrvkm_gma3600_sgx545_10141.ko
drivers/gpu/drm/pvrsgx/1.14.3699939/eurasia_km/pvrsrvkm_gma3600_sgx545_10141.ko: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
iMac:master hns$ 

Since I have no matching hardware I can't check what needs to be done
to make the pvrsrvkm load during boot. On ARM or MIPS it is requested through
the device tree.

Well, for first tests you can do a modprobe and see if the kernel panics :)

BR and thanks,
Nikolaus

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-drm-pvrsgx-Makefile-fix-SGX_REV-and-TARGET_TYPE-for-.patch
Type: application/octet-stream
Size: 2854 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/openpvrsgx-devgroup/attachments/20201016/8fb0ffe5/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-gpu-pvr-1.14.3699939-cedarview-include-linux-version.patch
Type: application/octet-stream
Size: 1291 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/openpvrsgx-devgroup/attachments/20201016/8fb0ffe5/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-gpu-pvr-1.14.3699939-compile-fix-for-x86.patch
Type: application/applefile
Size: 111 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/openpvrsgx-devgroup/attachments/20201016/8fb0ffe5/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-gpu-pvr-1.14.3699939-mutils-fix-compile-issues-with-.patch
Type: application/octet-stream
Size: 1758 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/openpvrsgx-devgroup/attachments/20201016/8fb0ffe5/attachment-0007.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-gpu-pvr-1.14.3699939-cedarview-sysutils-define-empty.patch
Type: application/octet-stream
Size: 1146 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/openpvrsgx-devgroup/attachments/20201016/8fb0ffe5/attachment-0008.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-gpu-pvr-1.14.3699939-cedarview-sysconfig-disable-acc.patch
Type: application/octet-stream
Size: 1331 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/openpvrsgx-devgroup/attachments/20201016/8fb0ffe5/attachment-0009.obj>
-------------- next part --------------





More information about the openpvrsgx-devgroup mailing list