參考資訊:
https://lore.kernel.org/lkml/CR55BD4YCDR1.22R5TLYJW6YS0@vincent-arch/t
問題如下:
drivers/gpu/drm/pvrsgx/1.14.3699939/eurasia_km/services4/srvkm/env/linux/mmap.c: In function ‘DoMapToUser’: drivers/gpu/drm/pvrsgx/1.14.3699939/eurasia_km/services4/srvkm/env/linux/mmap.c:767:28: error: assignment of read-only member ‘vm_flags’ ps_vma->vm_flags |= VM_MIXEDMAP; ^~ drivers/gpu/drm/pvrsgx/1.14.3699939/eurasia_km/services4/srvkm/env/linux/mmap.c: In function ‘PVRMMap’: drivers/gpu/drm/pvrsgx/1.14.3699939/eurasia_km/services4/srvkm/env/linux/mmap.c:1091:22: error: assignment of read-only member ‘vm_flags’ ps_vma->vm_flags |= VM_DONTDUMP; ^~ drivers/gpu/drm/pvrsgx/1.14.3699939/eurasia_km/services4/srvkm/env/linux/mmap.c:1093:22: error: assignment of read-only member ‘vm_flags’ ps_vma->vm_flags |= VM_IO; ^~ drivers/gpu/drm/pvrsgx/1.14.3699939/eurasia_km/services4/srvkm/env/linux/mmap.c:1099:22: error: assignment of read-only member ‘vm_flags’ ps_vma->vm_flags |= VM_DONTEXPAND; ^~ drivers/gpu/drm/pvrsgx/1.14.3699939/eurasia_km/services4/srvkm/env/linux/mmap.c:1102:22: error: assignment of read-only member ‘vm_flags’ ps_vma->vm_flags |= VM_DONTCOPY; ^~ make[6]: *** [scripts/Makefile.build:252: drivers/gpu/drm/pvrsgx/1.14.3699939/eurasia_km/services4/srvkm/env/linux/mmap.o] Error 1 make[5]: *** [drivers/gpu/drm/pvrsgx/Makefile:66: drivers/gpu/drm/pvrsgx/pvr] Error 2 make[4]: *** [scripts/Makefile.build:494: drivers/gpu/drm/pvrsgx] Error 2 make[3]: *** [scripts/Makefile.build:494: drivers/gpu/drm] Error 2 make[2]: *** [scripts/Makefile.build:494: drivers/gpu] Error 2 make[1]: *** [scripts/Makefile.build:494: drivers] Error 2 make: *** [Makefile:2026: .] Error 2
解法如下:
$ vim include/linux/mm_types.h +512 const vm_flags_t vm_flags;