1 ################################################################################
5 ################################################################################
7 AMD_CATALYST_VERSION
= 15.9
8 AMD_CATALYST_VERBOSE_VER
= 15.201.1151
9 AMD_CATALYST_SITE
= http
://www2.ati.com
/drivers
/linux
10 AMD_CATALYST_DL_OPTS
= --referer
='http://support.amd.com'
11 AMD_CATALYST_SOURCE
= amd-catalyst-
$(AMD_CATALYST_VERSION
)-linux-installer-
$(AMD_CATALYST_VERBOSE_VER
)-x86.x86_64.zip
12 AMD_CATALYST_LICENSE
= AMD Software License
13 AMD_CATALYST_LICENSE_FILES
= LICENSE.TXT
14 AMD_CATALYST_INSTALL_STAGING
= YES
15 AMD_CATALYST_SUFFIX
= $(if
$(BR2_x86_64
),_64
)
16 AMD_CATALYST_ARCH_DIR
= $(@D
)/arch
/x86
$(AMD_CATALYST_SUFFIX
)
17 AMD_CATALYST_LIB_SUFFIX
= $(if
$(BR2_x86_64
),64)
20 define AMD_CATALYST_EXTRACT_CMDS
21 unzip
-q
$(DL_DIR
)/$(AMD_CATALYST_SOURCE
) -d
$(@D
)
22 $(SHELL
) $(@D
)/AMD-Catalyst-
$(AMD_CATALYST_VERSION
)-Linux-installer-
$(AMD_CATALYST_VERBOSE_VER
)-x86.x86_64.run
--extract
$(@D
)
25 ifeq ($(BR2_PACKAGE_AMD_CATALYST_MODULE
),y
)
26 AMD_CATALYST_MODULE_SUBDIRS
= common
/lib
/modules
/fglrx
/build_mod
/2.6.x
27 AMD_CATALYST_MODULE_MAKE_OPTS
= \
28 CFLAGS_MODULE
="-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space"
30 define AMD_CATALYST_PREPARE_MODULE
31 # The Makefile expects to have source in the folder 2.6.x
32 cp
$(@D
)/common
/lib
/modules
/fglrx
/build_mod
/*.
{c
,h
} \
33 $(@D
)/common
/lib
/modules
/fglrx
/build_mod
/2.6.x
34 # This static lib is required during the link
35 cp
$(@D
)/arch
/x86
$(AMD_CATALYST_SUFFIX
)/lib
/modules
/fglrx
/build_mod
/libfglrx_ip.a \
36 $(@D
)/common
/lib
/modules
/fglrx
/build_mod
/2.6.x
39 AMD_CATALYST_POST_PATCH_HOOKS
+= AMD_CATALYST_PREPARE_MODULE
41 $(eval
$(kernel-module
))
44 ifeq ($(BR2_PACKAGE_AMD_CATALYST_OPENCL
),y
)
46 AMD_CATALYST_OCL_SUFFIX
= $(if
$(BR2_x86_64
),64,32)
47 AMD_CATALYST_OPENCL_FILES
= \
50 libamdocl
$(AMD_CATALYST_OCL_SUFFIX
).so \
51 libamdocl12cl
$(AMD_CATALYST_OCL_SUFFIX
).so
53 define AMD_CATALYST_INSTALL_OPENCL
54 $(foreach f
,$(AMD_CATALYST_OPENCL_FILES
), \
55 $(INSTALL
) -D
-m
0755 $(AMD_CATALYST_ARCH_DIR
)/usr
/lib
$(AMD_CATALYST_LIB_SUFFIX
)/$(f
) $(TARGET_DIR
)/usr
/lib
/$(f
)
57 ln
-sf libOpenCL.so
.1 \
58 $(TARGET_DIR
)/usr
/lib
/libOpenCL.so
59 $(INSTALL
) -m
0755 $(AMD_CATALYST_ARCH_DIR
)/usr
/bin
/clinfo \
60 $(TARGET_DIR
)/usr
/bin
/clinfo
61 $(INSTALL
) -D
-m
0644 $(AMD_CATALYST_ARCH_DIR
)/etc
/OpenCL
/vendors
/amdocl
$(AMD_CATALYST_OCL_SUFFIX
).icd \
62 $(TARGET_DIR
)/etc
/OpenCL
/vendors
/amdocl
$(AMD_CATALYST_OCL_SUFFIX
).icd
67 ifeq ($(BR2_PACKAGE_AMD_CATALYST_XORG
), y
)
69 # GL headers are needed by any package that wants to use libgl, so they need to
70 # be installed before any user of it. The only way to do so is to have this
71 # package depends on mesa3d-headers.
72 AMD_CATALYST_DEPENDENCIES
+= mesa3d-headers
73 AMD_CATALYST_PROVIDES
= libgl
74 AMD_CATALYST_X11R6_LIB
= $(@D
)/xpic
$(if
$(BR2_x86_64
),_64a
)/usr
/X11R6
/lib
$(AMD_CATALYST_LIB_SUFFIX
)
76 define AMD_CATALYST_INSTALL_GL_LIBS
77 $(INSTALL
) -m
0644 $(AMD_CATALYST_ARCH_DIR
)/usr
/X11R6
/lib
$(AMD_CATALYST_LIB_SUFFIX
)/fglrx
/fglrx-libGL.so
.1.2 \
79 ln
-sf fglrx-libGL.so
.1.2 $(1)/usr
/lib
/libGL.so
.1.2
80 ln
-sf fglrx-libGL.so
.1.2 $(1)/usr
/lib
/libGL.so
.1
81 ln
-sf fglrx-libGL.so
.1.2 $(1)/usr
/lib
/libGL.so
84 define AMD_CATALYST_INSTALL_STAGING_XORG
85 $(call AMD_CATALYST_INSTALL_GL_LIBS
,$(STAGING_DIR
))
86 $(INSTALL
) -D
-m
0644 package
/amd-catalyst
/gl.
pc \
87 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/gl.
pc
90 AMD_CATALYST_XORG_DRIVERS_FILES
= modules
/amdxmm.so \
91 modules
/drivers
/fglrx_drv.so \
92 modules
/linux
/libfglrxdrm.so
94 define AMD_CATALYST_INSTALL_XORG
96 $(foreach f
,$(AMD_CATALYST_XORG_DRIVERS_FILES
), \
97 $(INSTALL
) -D
-m
0755 $(AMD_CATALYST_X11R6_LIB
)/$(f
) \
98 $(TARGET_DIR
)/usr
/lib
/xorg
/$(f
)
101 # Xorg is not able to detect the driver automatically
102 $(INSTALL
) -D
-m
0644 package
/amd-catalyst
/20-fglrx.conf \
103 $(TARGET_DIR
)/etc
/X11
/xorg.conf.d
/20-fglrx.conf
106 # Common files: containing binary profiles about GPUs,
107 # required by the fglrx_drv xorg driver
108 $(INSTALL
) -d
$(TARGET_DIR
)/etc
/ati
109 $(INSTALL
) -m
0644 $(@D
)/common
/etc
/ati
/* $(TARGET_DIR
)/etc
/ati
/
111 # DRI and GLX xorg modules: by default DRI is activated,
112 # these modules are required by the fglrx_drv.so xorg driver
113 $(INSTALL
) -D
-m
0644 $(AMD_CATALYST_ARCH_DIR
)/usr
/X11R6
/lib
$(AMD_CATALYST_LIB_SUFFIX
)/modules
/dri
/fglrx_dri.so \
114 $(TARGET_DIR
)/usr
/lib
/dri
/fglrx_dri.so
115 $(INSTALL
) -D
-m
0644 $(AMD_CATALYST_X11R6_LIB
)/modules
/extensions
/fglrx
/fglrx-libglx.so \
116 $(TARGET_DIR
)/usr
/lib
/xorg
/modules
/extensions
/libglx.so
117 $(INSTALL
) -D
-m
0644 $(AMD_CATALYST_X11R6_LIB
)/modules
/glesx.so \
118 $(TARGET_DIR
)/usr
/lib
/xorg
/modules
/glesx.so
120 # Userspace GL libraries, also runtime dependency of most of the cmdline
122 $(INSTALL
) -m
0644 $(AMD_CATALYST_ARCH_DIR
)/usr
/X11R6
/lib
$(AMD_CATALYST_LIB_SUFFIX
)/*.so \
123 $(TARGET_DIR
)/usr
/lib
/
124 $(call AMD_CATALYST_INSTALL_GL_LIBS
,$(TARGET_DIR
))
126 # Runtime dependency required by libfglrxdrm.so
127 $(INSTALL
) -m
0644 $(AMD_CATALYST_ARCH_DIR
)/usr
/lib
$(AMD_CATALYST_LIB_SUFFIX
)/libatiuki.so
.1.0 \
128 $(TARGET_DIR
)/usr
/lib
/
129 ln
-sf libatiuki.so
.1.0 \
130 $(TARGET_DIR
)/usr
/lib
/libatiuki.so
.1
135 ifeq ($(BR2_PACKAGE_AMD_CATALYST_CMDLINE_TOOLS
), y
)
136 AMD_CATALYST_CMDLINE_TOOLS_FILES
= \
144 define AMD_CATALYST_INSTALL_CMDLINE_TOOLS
145 $(INSTALL
) -m
0755 $(AMD_CATALYST_ARCH_DIR
)/usr
/sbin
/atieventsd \
146 $(TARGET_DIR
)/usr
/sbin
147 $(foreach f
,$(AMD_CATALYST_CMDLINE_TOOLS_FILES
), \
148 $(INSTALL
) -D
-m
0755 $(AMD_CATALYST_ARCH_DIR
)/usr
/X11R6
/bin
/$(f
) \
149 $(TARGET_DIR
)/usr
/bin
/$(f
)
154 ifeq ($(BR2_PACKAGE_AMD_CATALYST_CCCLE
), y
)
155 define AMD_CATALYST_INSTALL_CCCLE
156 $(INSTALL
) -m
0755 $(AMD_CATALYST_ARCH_DIR
)/usr
/X11R6
/bin
/amdcccle \
157 $(TARGET_DIR
)/usr
/bin
/amdcccle
158 $(INSTALL
) -m
0755 $(AMD_CATALYST_ARCH_DIR
)/usr
/sbin
/amdnotifyui \
159 $(TARGET_DIR
)/usr
/sbin
/amdnotifyui
163 define AMD_CATALYST_INSTALL_STAGING_CMDS
164 $(call AMD_CATALYST_INSTALL_STAGING_XORG
)
167 define AMD_CATALYST_INSTALL_TARGET_CMDS
168 $(call AMD_CATALYST_INSTALL_XORG
)
169 $(call AMD_CATALYST_INSTALL_CMDLINE_TOOLS
)
170 $(call AMD_CATALYST_INSTALL_CCCLE
)
171 $(call AMD_CATALYST_INSTALL_OPENCL
)
174 $(eval
$(generic-package
))