Add support for AMD Catalyst graphics driver
v4 cover Add support for AMD Catalyst graphics driver
The AMD Catalyst Proprietary Linux Graphics Driver 15.9 supports GPUs AMD Radeon HD 5xxx and newer graphics. It requires at least glibc 2.2 or 2.3 and is compatible up to Xorg 1.17. This serie adds the required changes to support this driver.
The fglrx kernel module is compatible up to Linux kernel 4.4 LTS. All the graphical stack has been tested on a x86_64 system with an AMD-GT40N (w/ Radeon HD 6290 GPU).
Romain Perier (7):
support/download: Add support to pass options directly to downloaders
pkg-download: Allow packages to pass generic options to download
methods
docs/manual: Document the variable $(PKG)_DL_OPTS package/amd-catalyst: Add AMD proprietary graphic stack support package/amd-catalyst: Add AMD cmdline tools package/amd-catalyst: Add support AMD CCCLE package/amd-catalyst: Add support for OpenCL
docs/manual/adding-packages-generic.txt | 7 + package/Config.in | 1 + .../0001-Add-support-for-Linux-4.0.patch | 45 ++++++ .../0002-Add-support-for-Linux-4.1.patch | 31 ++++ .../0003-Add-support-for-Linux-4.2.patch | 121 +++++++++++++++ ...0004-Use-fpregs_active-instead-of-has_fpu.patch | 33 ++++ ...-Use-a-local-copy-of-copy_xregs_to_kernel.patch | 79 ++++++++++ .../0006-Add-support-for-Linux-4.4.patch | 78 ++++++++++ package/amd-catalyst/0007-remove-gpl-symbols.patch | 54 +++++++ package/amd-catalyst/20-fglrx.conf | 4 + package/amd-catalyst/Config.in | 73 +++++++++ package/amd-catalyst/amd-catalyst.hash | 2 + package/amd-catalyst/amd-catalyst.mk | 168 +++++++++++++++++++++ package/amd-catalyst/gl.pc | 12 ++ package/pkg-download.mk | 24 ++- support/download/bzr | 4 +- support/download/cp | 4 +- support/download/cvs | 4 +- support/download/git | 6 +- support/download/hg | 4 +- support/download/scp | 4 +- support/download/svn | 4 +- support/download/wget | 4 +- 23 files changed, 749 insertions(+), 17 deletions(-) create mode 100644 package/amd-catalyst/0001-Add-support-for-Linux-4.0.patch create mode 100644 package/amd-catalyst/0002-Add-support-for-Linux-4.1.patch create mode 100644 package/amd-catalyst/0003-Add-support-for-Linux-4.2.patch create mode 100644 package/amd-catalyst/0004-Use-fpregs_active-instead-of-has_fpu.patch create mode 100644 package/amd-catalyst/0005-Use-a-local-copy-of-copy_xregs_to_kernel.patch create mode 100644 package/amd-catalyst/0006-Add-support-for-Linux-4.4.patch create mode 100644 package/amd-catalyst/0007-remove-gpl-symbols.patch create mode 100644 package/amd-catalyst/20-fglrx.conf create mode 100644 package/amd-catalyst/Config.in create mode 100644 package/amd-catalyst/amd-catalyst.hash create mode 100644 package/amd-catalyst/amd-catalyst.mk create mode 100644 package/amd-catalyst/gl.pc
Signature · 1 line
2.8.1
PATCH v4 1/7 support/download: Add support to pass options directly to downloaders
This adds support to pass options to the underlying command that is used by downloader. Useful for retrieving data with server-side checking for user login or passwords, use a proxy or use specific options for cloning a repository via git and hg.
---
Changes in v4:
- Rebased onto master
- Pass "${@}" to "git clone --depth 1" too.
Changes in v3:
- Don't use the variable ${dl_opts} to catch extra arguments
- We prefer to use shift and "${@}", it does not introduce empty string when there are no extra parameters.
Changes in v2:
- Replaced the variable $(PKG)_DL_REFERER by $(PKG)_DL_OPTS
- Add modification to all downloaders
support/download/bzr | 4 +++- support/download/cp | 4 +++- support/download/cvs | 4 +++- support/download/git | 6 ++++-- support/download/hg | 4 +++- support/download/scp | 4 +++- support/download/svn | 4 +++- support/download/wget | 4 +++- 8 files changed, 25 insertions(+), 9 deletions(-)
support/download/bzr +3 -1
@@ -26,6 +26,8 @@ repo="${2}" rev="${3}" basename="${4}" +shift 4 # Get rid of our options + # Caller needs to single-quote its arguments to prevent them from # being expanded a second time (in case there are spaces in them) _bzr() {
@@ -49,5 +51,5 @@ if [ ${bzr_version} -ge ${bzr_min_version} ]; then fi _bzr export ${verbose} --root="'${basename}/'" --format=tgz \ - ${timestamp_opt} - "'${repo}'" -r "'${rev}'" \ + ${timestamp_opt} - "${@}" "'${repo}'" -r "'${rev}'" \ >"${output}"
support/download/cp +3 -1
@@ -28,10 +28,12 @@ shift $((OPTIND-1)) output="${1}" source="${2}" +shift 2 # Get rid of our options + # Caller needs to single-quote its arguments to prevent them from # being expanded a second time (in case there are spaces in them) _localfiles() { eval ${LOCALFILES} "${@}" } -_localfiles ${verbose} "'${source}'" "'${output}'" +_localfiles ${verbose} "${@}""'${source}'" "'${output}'"
support/download/cvs +3 -1
@@ -26,6 +26,8 @@ rev="${3}" rawname="${4}" basename="${5}" +shift 5 # Get rid of our options + # Caller needs to single-quote its arguments to prevent them from # being expanded a second time (in case there are spaces in them) _cvs() {
@@ -48,6 +50,6 @@ fi export TZ=UTC _cvs ${verbose} -z3 -d"'${repo}'" \ - co -d "'${basename}'" ${select} "'${rev}'" -P "'${rawname}'" + co "${@}" -d "'${basename}'" ${select} "'${rev}'" -P "'${rawname}'" tar czf "${output}" "${basename}"
support/download/git +4 -2
@@ -30,6 +30,8 @@ repo="${2}" cset="${3}" basename="${4}" +shift 4 # Get rid of our options + # Caller needs to single-quote its arguments to prevent them from # being expanded a second time (in case there are spaces in them) _git() {
@@ -46,7 +48,7 @@ _git() { git_done=0 if [ -n "$(_git ls-remote "'${repo}'" "'${cset}'" 2>&1)" ]; then printf "Doing shallow clone\n" - if _git clone ${verbose} --depth 1 -b "'${cset}'" "'${repo}'" "'${basename}'"; then + if _git clone ${verbose} "${@}" --depth 1 -b "'${cset}'" "'${repo}'" "'${basename}'"; then git_done=1 else printf "Shallow clone failed, falling back to doing a full clone\n"
@@ -54,7 +56,7 @@ if [ -n "$(_git ls-remote "'${repo}'" "'${cset}'" 2>&1)" ]; then fi if [ ${git_done} -eq 0 ]; then printf "Doing full clone\n" - _git clone ${verbose} "'${repo}'" "'${basename}'" + _git clone ${verbose} "${@}" "'${repo}'" "'${basename}'" fi pushd "${basename}" >/dev/null
support/download/hg +3 -1
@@ -25,13 +25,15 @@ repo="${2}" cset="${3}" basename="${4}" +shift 4 # Get rid of our options + # Caller needs to single-quote its arguments to prevent them from # being expanded a second time (in case there are spaces in them) _hg() { eval ${HG} "${@}" } -_hg clone ${verbose} --noupdate "'${repo}'" "'${basename}'" +_hg clone ${verbose} "${@}" --noupdate "'${repo}'" "'${basename}'" _hg archive ${verbose} --repository "'${basename}'" --type tgz \ --prefix "'${basename}'" --rev "'${cset}'" \
support/download/scp +3 -1
@@ -23,10 +23,12 @@ shift $((OPTIND-1)) output="${1}" url="${2}" +shift 2 # Get rid of our options + # Caller needs to single-quote its arguments to prevent them from # being expanded a second time (in case there are spaces in them) _scp() { eval ${SCP} "${@}" } -_scp ${verbose} "'${url}'" "'${output}'" +_scp ${verbose} "${@}" "'${url}'" "'${output}'"
support/download/svn +3 -1
@@ -25,12 +25,14 @@ repo="${2}" rev="${3}" basename="${4}" +shift 4 # Get rid of our options + # Caller needs to single-quote its arguments to prevent them from # being expanded a second time (in case there are spaces in them) _svn() { eval ${SVN} "${@}" } -_svn export ${verbose} "'${repo}@${rev}'" "'${basename}'" +_svn export ${verbose} "${@}" "'${repo}@${rev}'" "'${basename}'" tar czf "${output}" "${basename}"
support/download/wget +3 -1
@@ -23,10 +23,12 @@ shift $((OPTIND-1)) output="${1}" url="${2}" +shift 2 # Get rid of our options + # Caller needs to single-quote its arguments to prevent them from # being expanded a second time (in case there are spaces in them) _wget() { eval ${WGET} "${@}" } -_wget ${verbose} -O "'${output}'" "'${url}'" +_wget ${verbose} "${@}" -O "'${output}'" "'${url}'"
Signature · 1 line
2.8.1
PATCH v4 1/7 support/download: Add support to pass options directly to downloaders
Romain, All,
On 2016-08-05 16:53 +0200, Romain Perier spake thusly:
Quoted 6 lines
This adds support to pass options to the underlying command that is used by downloader. Useful for retrieving data with server-side checking for user login or passwords, use a proxy or use specific options for cloning a repository via git and hg.
Signed-off-by Romain Perier <[email protected]>
Regards,
Yann E. MORIN.
Quoted 195 lines
---
Changes in v4:
- Rebased onto master
- Pass "${@}" to "git clone --depth 1" too.Changes in v3:
- Don't use the variable ${dl_opts} to catch extra arguments
- We prefer to use shift and "${@}", it does not introduce empty string when there are no extra parameters.Changes in v2:
- Replaced the variable $(PKG)_DL_REFERER by $(PKG)_DL_OPTS
- Add modification to all downloaderssupport/download/bzr | 4 +++- support/download/cp | 4 +++- support/download/cvs | 4 +++- support/download/git | 6 ++++-- support/download/hg | 4 +++- support/download/scp | 4 +++- support/download/svn | 4 +++- support/download/wget | 4 +++- 8 files changed, 25 insertions(+), 9 deletions(-)support/download/bzr +3
-1@@ -26,6 +26,8 @@ repo="${2}" rev="${3}" basename="${4}" +shift 4 # Get rid of our options + # Caller needs to single-quote its arguments to prevent them from # being expanded a second time (in case there are spaces in them) _bzr() {@@ -49,5 +51,5 @@ if [ ${bzr_version} -ge ${bzr_min_version} ]; then fi _bzr export ${verbose} --root="'${basename}/'" --format=tgz \ - ${timestamp_opt} - "'${repo}'" -r "'${rev}'" \ + ${timestamp_opt} - "${@}" "'${repo}'" -r "'${rev}'" \ >"${output}"support/download/cp +3
-1@@ -28,10 +28,12 @@ shift $((OPTIND-1)) output="${1}" source="${2}" +shift 2 # Get rid of our options + # Caller needs to single-quote its arguments to prevent them from # being expanded a second time (in case there are spaces in them) _localfiles() { eval ${LOCALFILES} "${@}" } -_localfiles ${verbose} "'${source}'" "'${output}'" +_localfiles ${verbose} "${@}""'${source}'" "'${output}'"support/download/cvs +3
-1@@ -26,6 +26,8 @@ rev="${3}" rawname="${4}" basename="${5}" +shift 5 # Get rid of our options + # Caller needs to single-quote its arguments to prevent them from # being expanded a second time (in case there are spaces in them) _cvs() {@@ -48,6 +50,6 @@ fi export TZ=UTC _cvs ${verbose} -z3 -d"'${repo}'" \ - co -d "'${basename}'" ${select} "'${rev}'" -P "'${rawname}'" + co "${@}" -d "'${basename}'" ${select} "'${rev}'" -P "'${rawname}'" tar czf "${output}" "${basename}"support/download/git +4
-2@@ -30,6 +30,8 @@ repo="${2}" cset="${3}" basename="${4}" +shift 4 # Get rid of our options + # Caller needs to single-quote its arguments to prevent them from # being expanded a second time (in case there are spaces in them) _git() {@@ -46,7 +48,7 @@ _git() { git_done=0 if [ -n "$(_git ls-remote "'${repo}'" "'${cset}'" 2>&1)" ]; then printf "Doing shallow clone\n" - if _git clone ${verbose} --depth 1 -b "'${cset}'" "'${repo}'" "'${basename}'"; then + if _git clone ${verbose} "${@}" --depth 1 -b "'${cset}'" "'${repo}'" "'${basename}'"; then git_done=1 else printf "Shallow clone failed, falling back to doing a full clone\n"@@ -54,7 +56,7 @@ if [ -n "$(_git ls-remote "'${repo}'" "'${cset}'" 2>&1)" ]; then fi if [ ${git_done} -eq 0 ]; then printf "Doing full clone\n" - _git clone ${verbose} "'${repo}'" "'${basename}'" + _git clone ${verbose} "${@}" "'${repo}'" "'${basename}'" fi pushd "${basename}" >/dev/nullsupport/download/hg +3
-1@@ -25,13 +25,15 @@ repo="${2}" cset="${3}" basename="${4}" +shift 4 # Get rid of our options + # Caller needs to single-quote its arguments to prevent them from # being expanded a second time (in case there are spaces in them) _hg() { eval ${HG} "${@}" } -_hg clone ${verbose} --noupdate "'${repo}'" "'${basename}'" +_hg clone ${verbose} "${@}" --noupdate "'${repo}'" "'${basename}'" _hg archive ${verbose} --repository "'${basename}'" --type tgz \ --prefix "'${basename}'" --rev "'${cset}'" \support/download/scp +3
-1@@ -23,10 +23,12 @@ shift $((OPTIND-1)) output="${1}" url="${2}" +shift 2 # Get rid of our options + # Caller needs to single-quote its arguments to prevent them from # being expanded a second time (in case there are spaces in them) _scp() { eval ${SCP} "${@}" } -_scp ${verbose} "'${url}'" "'${output}'" +_scp ${verbose} "${@}" "'${url}'" "'${output}'"support/download/svn +3
-1@@ -25,12 +25,14 @@ repo="${2}" rev="${3}" basename="${4}" +shift 4 # Get rid of our options + # Caller needs to single-quote its arguments to prevent them from # being expanded a second time (in case there are spaces in them) _svn() { eval ${SVN} "${@}" } -_svn export ${verbose} "'${repo}@${rev}'" "'${basename}'" +_svn export ${verbose} "${@}" "'${repo}@${rev}'" "'${basename}'" tar czf "${output}" "${basename}"support/download/wget +3
-1@@ -23,10 +23,12 @@ shift $((OPTIND-1)) output="${1}" url="${2}" +shift 2 # Get rid of our options + # Caller needs to single-quote its arguments to prevent them from # being expanded a second time (in case there are spaces in them) _wget() { eval ${WGET} "${@}" } -_wget ${verbose} -O "'${output}'" "'${url}'" +_wget ${verbose} "${@}" -O "'${output}'" "'${url}'"Signature · 1 line
2.8.1
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v4 2/7 pkg-download: Allow packages to pass generic options to download methods
In reply to Romain PerierIntroduce a new package variable $(PKG)_DL_OPTS. When this variable is defined, its value is passed to the downloader as options to the underlying command. Packages can now retrieve archives from server expecting logins and passwords, use referer url, proxy or specific options for cloning a repository.
---
Changes in v4:
- Add missing Reviewed-by tag
Changes in v2:
- Replaced $(PKG)_DL_REFERER by $(PKG)_DL_OPTS
- Add support for this options to all downloaders
package/pkg-download.mk | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-)
package/pkg-download.mk +16 -8
@@ -81,7 +81,8 @@ define DOWNLOAD_GIT -- \ $($(PKG)_SITE) \ $($(PKG)_DL_VERSION) \ - $($(PKG)_BASE_NAME) + $($(PKG)_BASE_NAME) \ + $($(PKG)_DL_OPTS) endef # TODO: improve to check that the given PKG_DL_VERSION exists on the remote
@@ -97,7 +98,8 @@ define DOWNLOAD_BZR -- \ $($(PKG)_SITE) \ $($(PKG)_DL_VERSION) \ - $($(PKG)_BASE_NAME) + $($(PKG)_BASE_NAME) \ + $($(PKG)_DL_OPTS) endef define SOURCE_CHECK_BZR
@@ -112,7 +114,8 @@ define DOWNLOAD_CVS $(call stripurischeme,$(call qstrip,$($(PKG)_SITE))) \ $($(PKG)_DL_VERSION) \ $($(PKG)_RAWNAME) \ - $($(PKG)_BASE_NAME) + $($(PKG)_BASE_NAME) \ + $($(PKG)_DL_OPTS) endef # Not all CVS servers support ls/rls, use login to see if we can connect
@@ -127,7 +130,8 @@ define DOWNLOAD_SVN -- \ $($(PKG)_SITE) \ $($(PKG)_DL_VERSION) \ - $($(PKG)_BASE_NAME) + $($(PKG)_BASE_NAME) \ + $($(PKG)_DL_OPTS) endef define SOURCE_CHECK_SVN
@@ -143,7 +147,8 @@ define DOWNLOAD_SCP -H $(PKGDIR)/$($(PKG)_RAWNAME).hash \ $(QUIET) \ -- \ - '$(call stripurischeme,$(call qstrip,$(1)))' + '$(call stripurischeme,$(call qstrip,$(1)))' \ + $($(PKG)_DL_OPTS) endef define SOURCE_CHECK_SCP
@@ -157,7 +162,8 @@ define DOWNLOAD_HG -- \ $($(PKG)_SITE) \ $($(PKG)_DL_VERSION) \ - $($(PKG)_BASE_NAME) + $($(PKG)_BASE_NAME) \ + $($(PKG)_DL_OPTS) endef # TODO: improve to check that the given PKG_DL_VERSION exists on the remote
@@ -172,7 +178,8 @@ define DOWNLOAD_WGET -H $(PKGDIR)/$($(PKG)_RAWNAME).hash \ $(QUIET) \ -- \ - '$(call qstrip,$(1))' + '$(call qstrip,$(1))' \ + $($(PKG)_DL_OPTS) endef define SOURCE_CHECK_WGET
@@ -185,7 +192,8 @@ define DOWNLOAD_LOCALFILES -H $(PKGDIR)/$($(PKG)_RAWNAME).hash \ $(QUIET) \ -- \ - $(call stripurischeme,$(call qstrip,$(1))) + $(call stripurischeme,$(call qstrip,$(1))) \ + $($(PKG)_DL_OPTS) endef define SOURCE_CHECK_LOCALFILES
Signature · 1 line
2.8.1
PATCH v4 3/7 docs/manual: Document the variable $(PKG)_DL_OPTS
In reply to Romain PerierThis adds a description of the optional variable $(PKG)_DL_OPTS. When it is set, this option passes additional options to the downloader.
---
Changes in v4:
- Add Reviewed-by tag
Changes in v3:
- Improve documentation
Changes in v2:
- Don't include the example in the snippet of code
- Replaced $(PKG)_DL_REFERER by $(PKG)_DL_OPTS
docs/manual/adding-packages-generic.txt | 7 +++++++ 1 file changed, 7 insertions(+)
docs/manual/adding-packages-generic.txt +7 -0
@@ -250,6 +250,13 @@ information is (assuming the package name is +libfoo+) : +LIBFOO_SITE=/opt/software/libfoo.tar.gz+ + +LIBFOO_SITE=$(TOPDIR)/../src/libfoo+ +* +LIBFOO_DL_OPTS+ is a space-separated list of additional options to + pass to the downloader. Useful for retrieving documents with + server-side checking for user logins and passwords, or to use a proxy. + All download methods valid for +LIBFOO_SITE_METHOD+ are supported; + valid options depend on the download method (consult the man page + for the respective download utilities). + * +LIBFOO_EXTRA_DOWNLOADS+ is a space-separated list of additional files that Buildroot should download. If an entry contains +://+ then Buildroot will assume it is a complete URL and will download
Signature · 1 line
2.8.1
PATCH v4 4/7 package/amd-catalyst: Add AMD proprietary graphic stack support
In reply to Romain PerierThis commits adds support for the AMD Catalyst Linux driver 15.9 (15.201.1151). It includes the fglrx kernel module with various fixes to make it work with at least Linux kernel 4.4 LTS, the userspace OpenGL stack and the xorg driver module.
---
Changes in v4:
- Remove prompt for patching MODULE_LICENSE on the fly in the kernel module, we included a patch for removing code which depends on GPL symbols instead.
- Split into multiple patches
Changes in v3:
- Add a missing comma before the first argument of AMD_CATALYST_DRIVER_INSTALL_GL_LIBS, otherwise this function is skipped and does nothing.
package/Config.in | 1 + .../0001-Add-support-for-Linux-4.0.patch | 45 ++++++++ .../0002-Add-support-for-Linux-4.1.patch | 31 ++++++ .../0003-Add-support-for-Linux-4.2.patch | 121 +++++++++++++++++++++ ...0004-Use-fpregs_active-instead-of-has_fpu.patch | 33 ++++++ ...-Use-a-local-copy-of-copy_xregs_to_kernel.patch | 79 ++++++++++++++ .../0006-Add-support-for-Linux-4.4.patch | 78 +++++++++++++ package/amd-catalyst/0007-remove-gpl-symbols.patch | 54 +++++++++ package/amd-catalyst/20-fglrx.conf | 4 + package/amd-catalyst/Config.in | 49 +++++++++ package/amd-catalyst/amd-catalyst.hash | 2 + package/amd-catalyst/amd-catalyst.mk | 114 +++++++++++++++++++ package/amd-catalyst/gl.pc | 12 ++ 13 files changed, 623 insertions(+) create mode 100644 package/amd-catalyst/0001-Add-support-for-Linux-4.0.patch create mode 100644 package/amd-catalyst/0002-Add-support-for-Linux-4.1.patch create mode 100644 package/amd-catalyst/0003-Add-support-for-Linux-4.2.patch create mode 100644 package/amd-catalyst/0004-Use-fpregs_active-instead-of-has_fpu.patch create mode 100644 package/amd-catalyst/0005-Use-a-local-copy-of-copy_xregs_to_kernel.patch create mode 100644 package/amd-catalyst/0006-Add-support-for-Linux-4.4.patch create mode 100644 package/amd-catalyst/0007-remove-gpl-symbols.patch create mode 100644 package/amd-catalyst/20-fglrx.conf create mode 100644 package/amd-catalyst/Config.in create mode 100644 package/amd-catalyst/amd-catalyst.hash create mode 100644 package/amd-catalyst/amd-catalyst.mk create mode 100644 package/amd-catalyst/gl.pc
package/Config.in +1 -0
@@ -344,6 +344,7 @@ endmenu source "package/acpitool/Config.in" source "package/aer-inject/Config.in" source "package/am335x-pru-package/Config.in" + source "package/amd-catalyst/Config.in" source "package/avrdude/Config.in" source "package/bcache-tools/Config.in" source "package/biosdevname/Config.in"
package/amd-catalyst/0001-Add-support-for-Linux-4.0.patch new file +45 -0
45 lines not on this page · raw message
package/amd-catalyst/0002-Add-support-for-Linux-4.1.patch new file +31 -0
@@ -0,0 +1,31 @@ +From e9c8ccb4c8c842042542b792c51f9a7ec6c85e06 Mon Sep 17 00:00:00 2001 +From: Alberto Milone <[email protected]> +Date: Thu, 17 Sep 2015 15:44:59 +0200 +Subject: [PATCH] Add support for Linux 4.1 + +Signed-off-by: Romain Perier <[email protected]> +--- + common/lib/modules/fglrx/build_mod/firegl_public.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c +index 6017e89..94778f1 100755 +--- a/common/lib/modules/fglrx/build_mod/firegl_public.c ++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c +@@ -3508,10 +3508,12 @@ int ATI_API_CALL KCL_InstallInterruptHandler( + KCL_PUB_InterruptHandlerWrap, + #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) + ((useMSI) ? (SA_INTERRUPT) : (SA_SHIRQ)), +-#else ++#elif LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0) + //when MSI enabled. keep irq disabled when calling the action handler, + //exclude this IRQ from irq balancing (only on one CPU) + ((useMSI) ? (IRQF_DISABLED) : (IRQF_SHARED)), ++#else ++ ((useMSI) ? (0x0) : (IRQF_SHARED)), + #endif + dev_name, + context); +-- +2.8.1 +
package/amd-catalyst/0003-Add-support-for-Linux-4.2.patch new file +121 -0
121 lines not on this page · raw message
package/amd-catalyst/0004-Use-fpregs_active-instead-of-has_fpu.patch new file +33 -0
@@ -0,0 +1,33 @@ +From 7120f00015570a2e4d9b6532731960d509c71cba Mon Sep 17 00:00:00 2001 +From: Alberto Milone <[email protected]> +Date: Thu, 17 Sep 2015 15:48:30 +0200 +Subject: [PATCH] Use fpregs_active instead of has_fpu + +This is for Linux 4.2 + +Thanks to Tim Gardner for the patch. + +Signed-off-by: Romain Perier <[email protected]> +--- + common/lib/modules/fglrx/build_mod/firegl_public.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c +index 749ea51..4c1f9a5 100755 +--- a/common/lib/modules/fglrx/build_mod/firegl_public.c ++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c +@@ -6528,7 +6528,11 @@ void ATI_API_CALL KCL_fpu_begin(void) + /* The thread structure is changed with the commit below for kernel 3.3: + * https://github.com/torvalds/linux/commit/7e16838d94b566a17b65231073d179bc04d590c8 + */ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0) ++ if (cur_task->thread.fpu.fpregs_active) ++#else + if (cur_task->thread.fpu.has_fpu) ++#endif + #else + if (cur_task->thread.has_fpu) + #endif +-- +2.8.1 +
package/amd-catalyst/0005-Use-a-local-copy-of-copy_xregs_to_kernel.patch new file +79 -0
79 lines not on this page · raw message
package/amd-catalyst/0006-Add-support-for-Linux-4.4.patch new file +78 -0
78 lines not on this page · raw message
package/amd-catalyst/0007-remove-gpl-symbols.patch new file +54 -0
54 lines not on this page · raw message
package/amd-catalyst/20-fglrx.conf new file +4 -0
@@ -0,0 +1,4 @@ +Section "Device" + Identifier "AMD Radeon GPU" + Driver "fglrx" +EndSection
package/amd-catalyst/Config.in new file +49 -0
49 lines not on this page · raw message
package/amd-catalyst/amd-catalyst.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally computed +sha256 bf3e6e7d5c51db3d075410a3f116f865b82823debc1d66698d187249feec6a91 amd-catalyst-15.9-linux-installer-15.201.1151-x86.x86_64.zip
package/amd-catalyst/amd-catalyst.mk new file +114 -0
114 lines not on this page · raw message
package/amd-catalyst/gl.pc new file +12 -0
@@ -0,0 +1,12 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: gl +Description: AMD Catalyst OpenGL library +Version: 15.9 +Libs: -L${libdir} -lGL -lm -lXext -lX11 -ldl +Cflags: -I${includedir} +glx_tls: no +
Signature · 1 line
2.8.1
PATCH v4 4/7 package/amd-catalyst: Add AMD proprietary graphic stack support
Romain, All,
On 2016-08-05 16:53 +0200, Romain Perier spake thusly:
Quoted 11 lines
This commits adds support for the AMD Catalyst Linux driver 15.9 (15.201.1151). It includes the fglrx kernel module with various fixes to make it work with at least Linux kernel 4.4 LTS, the userspace OpenGL stack and the xorg driver module.
Signed-off-by Romain Perier <[email protected]>---
Changes in v4:
- Remove prompt for patchingMODULE_LICENSEon the fly in the kernel module, we included a patch for removing code which depends on GPL symbols instead.
Indeed, much better. We'll have to trust the Gentoo guys that they did not simply and blindly copy the corresponding kernel code...
[--SNIP--]
Quoted 14 lines
package/amd-catalyst/Config.in new file +8
-0@@ -0,0 +1,49 @@ +comment "amd-catalyst needs a glibc toolchain" + depends on BR2_i386 || BR2_x86_64 + depends on !BR2_TOOLCHAIN_USES_GLIBC + +config BR2_PACKAGE_AMD_CATALYST + bool "amd-catalyst" + depends on BR2_i386 || BR2_x86_64 + depends on BR2_TOOLCHAIN_USES_GLIBC
package/amd-catalyst/Config.in line 18
Quoted 10 lines
package/amd-catalyst/Config.in new file +10
-0+ help + The binary-only driver blob for AMD cards. + This driver supports AMD Radeon HD 5xxx and newer graphics + cards. + + http://www.amd.com/ + +if BR2_PACKAGE_AMD_CATALYST + +comment "amd-catalyst needs a modular Xorg <= 1.17"
Not really, it's only the X.org driver that needs it:
comment "amd-catalyst X.org drivers needs a modular Xorg server <= 1.17"
package/amd-catalyst/Config.in line 19
Quoted 1 line
package/amd-catalyst/Config.in new file +1
-0+ depends on !BR2_PACKAGE_XORG7 || !BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR || !BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_19
Please split long lines when they are > ~80 chars:
depends on !BR2_PACKAGE_XORG7 \
|| !BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR \
|| !BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_19package/amd-catalyst/Config.in line 33
Quoted 13 lines
package/amd-catalyst/Config.in new file +13
-0+config BR2_PACKAGE_AMD_CATALYST_XORG + bool "X.org drivers" + default y + depends on BR2_PACKAGE_XORG7 + depends on BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR + depends on BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_19 + select BR2_PACKAGE_XSERVER_XORG_SERVER_AIGLX + select BR2_PACKAGE_ACPID # runtime + # This package does not have standard GL headers + select BR2_PACKAGE_MESA3D_HEADERS + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXCOMPOSITE
You select those three libs, but you do not depend on them at build time. I suspect because they are only a runtime dependency, like acpid, right?
In which case, please state so, and group runtime dependencies together.
Quoted 4 lines
package/amd-catalyst/Config.in new file +4
-0+ select BR2_PACKAGE_HAS_LIBGL + +if BR2_PACKAGE_AMD_CATALYST_XORG +
package/amd-catalyst/Config.in line 47
Quoted 10 lines
package/amd-catalyst/Config.in new file +10
-0+config BR2_PACKAGE_PROVIDES_LIBGL + default "amd-catalyst" + +endif + +config BR2_PACKAGE_AMD_CATALYST_MODULE + bool "fglrx kernel module" + depends on BR2_LINUX_KERNEL + help + Builds and install the fglrx kernel module
We usually also add a comment:
comment "amd-catalyst kernel module needs a kernel to be built"
depends on !BR2_LINUX_KERNEL
package/amd-catalyst/Config.in line 49
Quoted 1 line
package/amd-catalyst/Config.in new file +1
-0+endif # BR2_PACKAGE_AMD_CATALYST
[--SNIP--]
Quoted 6 lines
package/amd-catalyst/amd-catalyst.mk new file +0
-0
package/amd-catalyst/amd-catalyst.mk line 10
Quoted 10 lines
package/amd-catalyst/amd-catalyst.mk new file +10
-0@@ -0,0 +1,114 @@ +################################################################################ +# +# amd-catalyst +# +################################################################################ + +AMD_CATALYST_VERSION = 15.9 +AMD_CATALYST_VERBOSE_VER = 15.201.1151 +AMD_CATALYST_SITE = http://www2.ati.com/drivers/linux +AMD_CATALYST_DL_OPTS = --referer='http://support.amd.com/en-us/kb-articles/Pages/latest-linux-beta-driver.aspx'
I've just tried with:
--referrer='http://support.amd.com/'
and it is enough to trick the server into delivering the archive.
package/amd-catalyst/amd-catalyst.mk line 11
Quoted 1 line
package/amd-catalyst/amd-catalyst.mk new file +1
-0+AMD_CATALYST_SOURCE = amd-catalyst-$(AMD_CATALYST_VERSION)-linux-installer-$(AMD_CATALYST_VERBOSE_VER)-x86.x86_64.zip
Just out of curiosity: I've seen that there are other drivers; at least I could see (and DL) radeon-crimson-15.12-15.302-151217a-297685e.zip.
Do you have an idea how different the GPUs are, if Catalyst is suposed to suport the whole range, if we could also add radeon-crimson as another package (later!), how they all play together? ;-)
package/amd-catalyst/amd-catalyst.mk line 16
Quoted 1 line
package/amd-catalyst/amd-catalyst.mk new file +1
-0+AMD_CATALYST_ARCH_DIR = $(@D)/arch/x86$(AMD_CATALYST_SUFFIX)
Given that AMD_CATALYST_ARCH_DIR is only ever used to construct the path $(AMD_CATALYST_ARCH_DIR)/usr/X11R6/lib$(AMD_CATALYST_LIB_SUFFIX) maybe it should directly refer to that path, so you don't have to repeat it again and again, and that would make the commands a little bit shorter.
[--SNIP--]
package/amd-catalyst/amd-catalyst.mk line 30
Quoted 6 lines
package/amd-catalyst/amd-catalyst.mk new file +6
-0+ifeq ($(BR2_PACKAGE_AMD_CATALYST_MODULE),y) +AMD_CATALYST_MODULE_SUBDIRS = common/lib/modules/fglrx/build_mod/2.6.x +AMD_CATALYST_MODULE_MAKE_OPTS = \ + CFLAGS_MODULE="-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space" + +define AMD_CATALYST_CONFIGURE_CMDS
Like you did for the userland stuff, I'd have made that a "separate" (by lack of better word) macro, and called it from the reall _CONFIGURE_CMDS outside of the module conditional:
define AMD_CATALYST_PREPARE_MODULE
blabla
endef
and below, with the other traditional Buildroot macros:
define AMD_CATALYST_CONFIGURE_CMDS
$(AMD_CATALYST_PREPARE_MODULE)
endefThis is purely cosmetics in this case, granted, as you don't have anything else to configure, but makes the file look more coherent.
Quoted 4 lines
package/amd-catalyst/amd-catalyst.mk new file +4
-0+ # The Makefile expects to have source in the folder 2.6.x + cp $(@D)/common/lib/modules/fglrx/build_mod/*.{c,h} \ + $(@D)/common/lib/modules/fglrx/build_mod/2.6.x + # This static lib is required during the link
package/amd-catalyst/amd-catalyst.mk line 44
Quoted 10 lines
package/amd-catalyst/amd-catalyst.mk new file +10
-0+ cp $(@D)/arch/x86$(AMD_CATALYST_SUFFIX)/lib/modules/fglrx/build_mod/libfglrx_ip.a \ + $(@D)/common/lib/modules/fglrx/build_mod/2.6.x +endef + +$(eval $(kernel-module)) +endif + +ifeq ($(BR2_PACKAGE_AMD_CATALYST_XORG), y) + +AMD_CATALYST_DEPENDENCIES += mesa3d-headers
I was gonna comment that they are not really a build dependency of this package, as it provides only pre-built libraries.
However, the headers are needed by any package that wants to use libgl, so they need to be installed bedfore any user of it, so the only way is to have amd-catalyst depend on them, even if it does not them for itself.
Maybe this would warrant a little comment?
package/amd-catalyst/amd-catalyst.mk line 46
Quoted 2 lines
package/amd-catalyst/amd-catalyst.mk new file +2
-0+AMD_CATALYST_PROVIDES = libgl +AMD_CATALYST_XPIC_DIR = $(@D)/xpic$(if $(BR2_x86_64),_64a)
Given that AMD_CATALYST_XPIC_DIR is only ever used to construct the path $(AMD_CATALYST_XPIC_DIR)/usr/X11R6/lib$(AMD_CATALYST_LIB_SUFFIX) , maybe it should directly refer to that path, so you don't have to repeat it again and again, and that would make the commands a little bit shorter.
;-)
Quoted 10 lines
package/amd-catalyst/amd-catalyst.mk new file +10
-0+define AMD_CATALYST_INSTALL_GL_LIBS + $(INSTALL) -m 0644 $(AMD_CATALYST_ARCH_DIR)/usr/X11R6/lib$(AMD_CATALYST_LIB_SUFFIX)/fglrx/fglrx-libGL.so.1.2 \ + $(1)/usr/lib + ln -sf fglrx-libGL.so.1.2 $(1)/usr/lib/libGL.so.1.2 + ln -sf fglrx-libGL.so.1.2 $(1)/usr/lib/libGL.so.1 + ln -sf fglrx-libGL.so.1.2 $(1)/usr/lib/libGL.so +endef + +define AMD_CATALYST_INSTALL_STAGING_XORG + $(call AMD_CATALYST_INSTALL_GL_LIBS,$(STAGING_DIR))
package/amd-catalyst/amd-catalyst.mk line 67
Quoted 10 lines
package/amd-catalyst/amd-catalyst.mk new file +10
-0+ $(INSTALL) -D -m 0644 package/amd-catalyst/gl.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/gl.pc +endef + +AMD_CATALYST_XORG_DRIVERS_FILES = modules/amdxmm.so \ + modules/drivers/fglrx_drv.so \ + modules/linux/libfglrxdrm.so + +define AMD_CATALYST_INSTALL_XORG +# Xorg drivers
Please indent comment inside a macro at the same level you indent the code. Valid for below as well.
Quoted 9 lines
package/amd-catalyst/amd-catalyst.mk new file +9
-0+ $(foreach f,$(AMD_CATALYST_XORG_DRIVERS_FILES), \ + $(INSTALL) -D -m 0755 $(AMD_CATALYST_XPIC_DIR)/usr/X11R6/lib$(AMD_CATALYST_LIB_SUFFIX)/$(f) \ + $(TARGET_DIR)/usr/lib/xorg/$(f) + ) + +# Xorg is not able to detect the driver automatically + $(INSTALL) -D -m 0644 package/amd-catalyst/20-fglrx.conf \ + $(TARGET_DIR)/etc/X11/xorg.conf.d/20-fglrx.conf +
package/amd-catalyst/amd-catalyst.mk line 86
Quoted 10 lines
package/amd-catalyst/amd-catalyst.mk new file +10
-0+ +# Common files: containing binary profiles about GPUs, +# required by the fglrx_drv xorg driver + $(INSTALL) -d $(TARGET_DIR)/etc/ati + $(INSTALL) -m 0644 $(@D)/common/etc/ati/* $(TARGET_DIR)/etc/ati/ + +# DRI and GLX xorg modules: by default DRI is activated, +# these modules are required by the fglrx_drv.so xorg driver + $(INSTALL) -D -m 0644 $(AMD_CATALYST_ARCH_DIR)/usr/X11R6/lib$(AMD_CATALYST_LIB_SUFFIX)/modules/dri/fglrx_dri.so \ + $(TARGET_DIR)/usr/lib/dri/fglrx_dri.so
This comes from the Xorg's 'modules' sub-dir, but is installed in another location. Is that intended? Why should it not go into $(TARGET_DIR)/usr/lib/xorg/modules/ ?
package/amd-catalyst/amd-catalyst.mk line 90
Quoted 4 lines
package/amd-catalyst/amd-catalyst.mk new file +4
-0+ $(INSTALL) -D -m 0644 $(AMD_CATALYST_XPIC_DIR)/usr/X11R6/lib$(AMD_CATALYST_LIB_SUFFIX)/modules/extensions/fglrx/fglrx-libglx.so \ + $(TARGET_DIR)/usr/lib/xorg/modules/extensions/libglx.so + $(INSTALL) -D -m 0644 $(AMD_CATALYST_XPIC_DIR)/usr/X11R6/lib$(AMD_CATALYST_LIB_SUFFIX)/modules/glesx.so \ + $(TARGET_DIR)/usr/lib/xorg/modules/glesx.so
Maybe glesx could go in the AMD_CATALYST_XORG_DRIVERS_FILES since it follows the same layout, no?
fglrx-libglx is not following this layout, so it has to have its own separate command, indeed. Sigh.... :-(
package/amd-catalyst/amd-catalyst.mk line 97
Quoted 6 lines
package/amd-catalyst/amd-catalyst.mk new file +6
-0+# Userspace GL libraries, also runtime dependency of most of the cmdline tools + $(INSTALL) -m 0644 $(AMD_CATALYST_ARCH_DIR)/usr/X11R6/lib$(AMD_CATALYST_LIB_SUFFIX)/*.so \ + $(TARGET_DIR)/usr/lib/ + $(call AMD_CATALYST_INSTALL_GL_LIBS,$(TARGET_DIR)) + +# Runtime depedency required by libfglrxdrm.so
*dependency
package/amd-catalyst/amd-catalyst.mk line 101
Quoted 4 lines
package/amd-catalyst/amd-catalyst.mk new file +4
-0+ $(INSTALL) -m 0644 $(AMD_CATALYST_ARCH_DIR)/usr/lib$(AMD_CATALYST_LIB_SUFFIX)/libatiuki.so.1.0 \ + $(TARGET_DIR)/usr/lib/ + ln -sf libatiuki.so.1.0 \ + $(TARGET_DIR)/usr/lib/libatiuki.so.1
Whithout checking, that's because the SONAME of the library is libatiuki.so.1, right? If so, why not installing it directly as its SONAME rather than have an unncessary symlink?
Regards,
Yann E. MORIN.
Quoted 13 lines
package/amd-catalyst/amd-catalyst.mk new file +13
-0+endef + +endif + +define AMD_CATALYST_INSTALL_STAGING_CMDS + $(call AMD_CATALYST_INSTALL_STAGING_XORG) +endef + +define AMD_CATALYST_INSTALL_TARGET_CMDS + $(call AMD_CATALYST_INSTALL_XORG) +endef + +$(eval $(generic-package))
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v4 5/7 package/amd-catalyst: Add AMD cmdline tools
In reply to Romain PerierThe AMD Catalyst driver includes some cmdline tools for displaying specific infos about the GL stack or to test 3D, like fglxinfo or fgl_gears. This commit adds support to install such tools.
--- package/amd-catalyst/Config.in | 5 +++++ package/amd-catalyst/amd-catalyst.mk | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+)
package/amd-catalyst/Config.in +5 -0
@@ -38,6 +38,11 @@ if BR2_PACKAGE_AMD_CATALYST_XORG config BR2_PACKAGE_PROVIDES_LIBGL default "amd-catalyst" +config BR2_PACKAGE_AMD_CATALYST_CMDLINE_TOOLS + bool "command-line configuration tools and utilities" + help + Build the amd command line tools + endif config BR2_PACKAGE_AMD_CATALYST_MODULE
package/amd-catalyst/amd-catalyst.mk +20 -0
@@ -103,12 +103,32 @@ endef endif +ifeq ($(BR2_PACKAGE_AMD_CATALYST_CMDLINE_TOOLS), y) +AMD_CATALYST_CMDLINE_TOOLS_FILES = \ + atiode \ + atiodcli \ + fgl_glxgears \ + aticonfig \ + amd-console-helper \ + fglrxinfo + +define AMD_CATALYST_INSTALL_CMDLINE_TOOLS + $(INSTALL) -m 0755 $(AMD_CATALYST_ARCH_DIR)/usr/sbin/atieventsd \ + $(TARGET_DIR)/usr/sbin + $(foreach f,$(AMD_CATALYST_CMDLINE_TOOLS_FILES), \ + $(INSTALL) -D -m 0755 $(AMD_CATALYST_ARCH_DIR)/usr/X11R6/bin/$(f) \ + $(TARGET_DIR)/usr/bin/$(f) + ) +endef +endif + define AMD_CATALYST_INSTALL_STAGING_CMDS $(call AMD_CATALYST_INSTALL_STAGING_XORG) endef define AMD_CATALYST_INSTALL_TARGET_CMDS $(call AMD_CATALYST_INSTALL_XORG) + $(call AMD_CATALYST_INSTALL_CMDLINE_TOOLS) endef $(eval $(generic-package))
Signature · 1 line
2.8.1
PATCH v4 5/7 package/amd-catalyst: Add AMD cmdline tools
Romain, All,
On 2016-08-05 16:53 +0200, Romain Perier spake thusly:
Quoted 5 lines
The AMD Catalyst driver includes some cmdline tools for displaying specific infos about the GL stack or to test 3D, like fglxinfo or
fgl_gears. This commit adds support to install such tools.Signed-off-by Romain Perier <[email protected]>
(much easier to review in small patches, thanks! ;-) )
Regards,
Yann E. MORIN.
Quoted 61 lines
--- package/amd-catalyst/Config.in | 5 +++++ package/amd-catalyst/amd-catalyst.mk | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+)package/amd-catalyst/Config.in +5
-0@@ -38,6 +38,11 @@ if BR2_PACKAGE_AMD_CATALYST_XORG config BR2_PACKAGE_PROVIDES_LIBGL default "amd-catalyst" +config BR2_PACKAGE_AMD_CATALYST_CMDLINE_TOOLS + bool "command-line configuration tools and utilities" + help + Build the amd command line tools + endif config BR2_PACKAGE_AMD_CATALYST_MODULEpackage/amd-catalyst/amd-catalyst.mk +20
-0@@ -103,12 +103,32 @@ endef endif +ifeq ($(BR2_PACKAGE_AMD_CATALYST_CMDLINE_TOOLS), y) +AMD_CATALYST_CMDLINE_TOOLS_FILES = \ + atiode \ + atiodcli \ + fgl_glxgears \ + aticonfig \ + amd-console-helper \ + fglrxinfo + +define AMD_CATALYST_INSTALL_CMDLINE_TOOLS + $(INSTALL) -m 0755 $(AMD_CATALYST_ARCH_DIR)/usr/sbin/atieventsd \ + $(TARGET_DIR)/usr/sbin + $(foreach f,$(AMD_CATALYST_CMDLINE_TOOLS_FILES), \ + $(INSTALL) -D -m 0755 $(AMD_CATALYST_ARCH_DIR)/usr/X11R6/bin/$(f) \ + $(TARGET_DIR)/usr/bin/$(f) + ) +endef +endif + define AMD_CATALYST_INSTALL_STAGING_CMDS $(call AMD_CATALYST_INSTALL_STAGING_XORG) endef define AMD_CATALYST_INSTALL_TARGET_CMDS $(call AMD_CATALYST_INSTALL_XORG) + $(call AMD_CATALYST_INSTALL_CMDLINE_TOOLS) endef $(eval $(generic-package))Signature · 1 line
2.8.1
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v4 5/7 package/amd-catalyst: Add AMD cmdline tools
In reply to Romain PerierRomain, All,
On 2016-08-05 16:53 +0200, Romain Perier spake thusly:
Quoted 35 lines
The AMD Catalyst driver includes some cmdline tools for displaying specific infos about the GL stack or to test 3D, like fglxinfo or
fgl_gears. This commit adds support to install such tools.Signed-off-by Romain Perier <[email protected]>--- package/amd-catalyst/Config.in | 5 +++++ package/amd-catalyst/amd-catalyst.mk | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+)package/amd-catalyst/Config.in +5
-0@@ -38,6 +38,11 @@ if BR2_PACKAGE_AMD_CATALYST_XORG config BR2_PACKAGE_PROVIDES_LIBGL default "amd-catalyst" +config BR2_PACKAGE_AMD_CATALYST_CMDLINE_TOOLS + bool "command-line configuration tools and utilities" + help + Build the amd command line tools + endif config BR2_PACKAGE_AMD_CATALYST_MODULEpackage/amd-catalyst/amd-catalyst.mk +1
-0@@ -103,12 +103,32 @@ endef endif +ifeq ($(BR2_PACKAGE_AMD_CATALYST_CMDLINE_TOOLS), y)
package/amd-catalyst/amd-catalyst.mk endef · line 116
Quoted 10 lines
package/amd-catalyst/amd-catalyst.mk +10
-0+AMD_CATALYST_CMDLINE_TOOLS_FILES = \ + atiode \ + atiodcli \ + fgl_glxgears \ + aticonfig \ + amd-console-helper \ + fglrxinfo + +define AMD_CATALYST_INSTALL_CMDLINE_TOOLS + $(INSTALL) -m 0755 $(AMD_CATALYST_ARCH_DIR)/usr/sbin/atieventsd \
Ah, here you are using AMD_CATALYST_ARCH_DIR directly, so forget about my comment in the previous patch: you need it as-is.
Still maybe you could have an option to refer to that long path, like:
AMD_CATALYST_ARCH_LIB_DIR = $(AMD_CATALYST_ARCH_DIR)/usr/X11R6/lib$(AMD_CATALYST_LIB_SUFFIX)
Regards,
Yann E. MORIN.
Quoted 21 lines
package/amd-catalyst/amd-catalyst.mk +9
-0+ $(TARGET_DIR)/usr/sbin + $(foreach f,$(AMD_CATALYST_CMDLINE_TOOLS_FILES), \ + $(INSTALL) -D -m 0755 $(AMD_CATALYST_ARCH_DIR)/usr/X11R6/bin/$(f) \ + $(TARGET_DIR)/usr/bin/$(f) + ) +endef +endif + define AMD_CATALYST_INSTALL_STAGING_CMDS $(call AMD_CATALYST_INSTALL_STAGING_XORG) endef define AMD_CATALYST_INSTALL_TARGET_CMDS $(call AMD_CATALYST_INSTALL_XORG) + $(call AMD_CATALYST_INSTALL_CMDLINE_TOOLS) endef $(eval $(generic-package))Signature · 1 line
2.8.1
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v4 6/7 package/amd-catalyst: Add support AMD CCCLE
In reply to Romain PerierThe AMD Catalyst Linux driver includes a graphical controler center for AMD graphics accelerators, called Catalyst Controler Center. This commits adds support to install this tool by adding a separated prompt.
--- package/amd-catalyst/Config.in | 13 +++++++++++++ package/amd-catalyst/amd-catalyst.mk | 10 ++++++++++ 2 files changed, 23 insertions(+)
package/amd-catalyst/Config.in +13 -0
@@ -43,6 +43,19 @@ config BR2_PACKAGE_AMD_CATALYST_CMDLINE_TOOLS help Build the amd command line tools +comment "Catalyst Control Center needs Qt4 with X11 and PNG support" + depends on !BR2_PACKAGE_QT || !BR2_PACKAGE_QT_X11 || BR2_PACKAGE_QT_NOPNG + +config BR2_PACKAGE_AMD_CATALYST_CCCLE + bool "Catalyst Control Center" + depends on BR2_USE_MMU && BR2_PACKAGE_QT && BR2_PACKAGE_QT_X11 + select BR2_PACKAGE_PROCPS_NG # runtime + select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + select BR2_PACKAGE_QT_GUI_MODULE + select BR2_PACKAGE_QT_ACCESSIBILITY + help + Installs the Catalyst Control Center, a Qt graphical tool to + control AMD graphics accelerators. endif config BR2_PACKAGE_AMD_CATALYST_MODULE
package/amd-catalyst/amd-catalyst.mk +10 -0
@@ -122,6 +122,15 @@ define AMD_CATALYST_INSTALL_CMDLINE_TOOLS endef endif +ifeq ($(BR2_PACKAGE_AMD_CATALYST_CCCLE), y) +define AMD_CATALYST_INSTALL_CCCLE + $(INSTALL) -m 0755 $(AMD_CATALYST_ARCH_DIR)/usr/X11R6/bin/amdcccle \ + $(TARGET_DIR)/usr/bin/amdcccle + $(INSTALL) -m 0755 $(AMD_CATALYST_ARCH_DIR)/usr/sbin/amdnotifyui \ + $(TARGET_DIR)/usr/sbin/amdnotifyui +endef +endif + define AMD_CATALYST_INSTALL_STAGING_CMDS $(call AMD_CATALYST_INSTALL_STAGING_XORG) endef
@@ -129,6 +138,7 @@ endef define AMD_CATALYST_INSTALL_TARGET_CMDS $(call AMD_CATALYST_INSTALL_XORG) $(call AMD_CATALYST_INSTALL_CMDLINE_TOOLS) + $(call AMD_CATALYST_INSTALL_CCCLE) endef $(eval $(generic-package))
Signature · 1 line
2.8.1
PATCH v4 6/7 package/amd-catalyst: Add support AMD CCCLE
Romain, All,
On 2016-08-05 16:53 +0200, Romain Perier spake thusly:
Quoted 15 lines
The AMD Catalyst Linux driver includes a graphical controler center for AMD graphics accelerators, called Catalyst Controler Center. This commits adds support to install this tool by adding a separated prompt.
Signed-off-by Romain Perier <[email protected]>--- package/amd-catalyst/Config.in | 13 +++++++++++++ package/amd-catalyst/amd-catalyst.mk | 10 ++++++++++ 2 files changed, 23 insertions(+)package/amd-catalyst/Config.in +0
-0
package/amd-catalyst/Config.in config BR2_PACKAGE_AMD_CATALYST_CMDLINE_TOOLS · line 51
Quoted 9 lines
package/amd-catalyst/Config.in +6
-0@@ -43,6 +43,19 @@ config BR2_PACKAGE_AMD_CATALYST_CMDLINE_TOOLS help Build the amd command line tools +comment "Catalyst Control Center needs Qt4 with X11 and PNG support" + depends on !BR2_PACKAGE_QT || !BR2_PACKAGE_QT_X11 || BR2_PACKAGE_QT_NOPNG + +config BR2_PACKAGE_AMD_CATALYST_CCCLE + bool "Catalyst Control Center" + depends on BR2_USE_MMU && BR2_PACKAGE_QT && BR2_PACKAGE_QT_X11
Please, do not mix architecture-related dependencies (MMU) with package dependencies. Besides, you forgot to depend on !QT_NO_PNG:
depends on BR2_USE_MMU
depends on BR2_PACKAGE_QT
depends on BR2_PACKAGE_QT_X11
depends on !BR2_PACKAGE_QT_NOPNG
However, for the MMU stuff, I wonder if it is really needed, as the whole stuff depends on glibc, which is MMU-only anyway.
package/amd-catalyst/Config.in config BR2_PACKAGE_AMD_CATALYST_CMDLINE_TOOLS · line 53
Quoted 2 lines
package/amd-catalyst/Config.in +2
-0+ select BR2_PACKAGE_PROCPS_NG # runtime + select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
I prefer when dependencies are logically ordered. Here, we need BB_SHOW_OTHERS becasue we want to selec procps-ng, so:
select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # procps-ng select BR2_PACKAGE_PROCPS_NG # runtime
(Technically, there is *no* difference; it's just easier to follow for us mere humans. ;-) )
(Oh, did you add the MMU dependency because of procps-ng? Not needed, since glibc is MMU-only.)
Except for those minor nits, that looks good! :-)
Regards,
Yann E. MORIN.
Quoted 39 lines
package/amd-catalyst/Config.in +5
-0+ select BR2_PACKAGE_QT_GUI_MODULE + select BR2_PACKAGE_QT_ACCESSIBILITY + help + Installs the Catalyst Control Center, a Qt graphical tool to + control AMD graphics accelerators. endif config BR2_PACKAGE_AMD_CATALYST_MODULEpackage/amd-catalyst/amd-catalyst.mk +10
-0@@ -122,6 +122,15 @@ define AMD_CATALYST_INSTALL_CMDLINE_TOOLS endef endif +ifeq ($(BR2_PACKAGE_AMD_CATALYST_CCCLE), y) +define AMD_CATALYST_INSTALL_CCCLE + $(INSTALL) -m 0755 $(AMD_CATALYST_ARCH_DIR)/usr/X11R6/bin/amdcccle \ + $(TARGET_DIR)/usr/bin/amdcccle + $(INSTALL) -m 0755 $(AMD_CATALYST_ARCH_DIR)/usr/sbin/amdnotifyui \ + $(TARGET_DIR)/usr/sbin/amdnotifyui +endef +endif + define AMD_CATALYST_INSTALL_STAGING_CMDS $(call AMD_CATALYST_INSTALL_STAGING_XORG) endef@@ -129,6 +138,7 @@ endef define AMD_CATALYST_INSTALL_TARGET_CMDS $(call AMD_CATALYST_INSTALL_XORG) $(call AMD_CATALYST_INSTALL_CMDLINE_TOOLS) + $(call AMD_CATALYST_INSTALL_CCCLE) endef $(eval $(generic-package))Signature · 1 line
2.8.1
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v4 7/7 package/amd-catalyst: Add support for OpenCL
In reply to Romain PerierThe AMD Catalyst Linux driver includes OpenCL libraries for GPGPU computing. This commits adds support to install the binary blobs and ICD profiles.
--- package/amd-catalyst/Config.in | 6 ++++++ package/amd-catalyst/amd-catalyst.mk | 24 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+)
package/amd-catalyst/Config.in +6 -0
@@ -64,4 +64,10 @@ config BR2_PACKAGE_AMD_CATALYST_MODULE help Builds and install the fglrx kernel module +config BR2_PACKAGE_AMD_CATALYST_OPENCL + bool "OpenCL support" + help + Installs the OpenCL binary blobs and the ICD profile + for GPGPU computing. + endif # BR2_PACKAGE_AMD_CATALYST
package/amd-catalyst/amd-catalyst.mk +24 -0
@@ -39,6 +39,29 @@ endef $(eval $(kernel-module)) endif +ifeq ($(BR2_PACKAGE_AMD_CATALYST_OPENCL),y) + +AMD_CATALYST_OCL_SUFFIX = $(if $(BR2_x86_64),64,32) +AMD_CATALYST_OPENCL_FILES = \ + usr/lib$(AMD_CATALYST_LIB_SUFFIX)/libOpenCL.so.1 \ + usr/lib$(AMD_CATALYST_LIB_SUFFIX)/libaticalcl.so \ + usr/lib$(AMD_CATALYST_LIB_SUFFIX)/libamdocl$(AMD_CATALYST_OCL_SUFFIX).so \ + usr/lib$(AMD_CATALYST_LIB_SUFFIX)/libamdocl12cl$(AMD_CATALYST_OCL_SUFFIX).so + +define AMD_CATALYST_INSTALL_OPENCL + $(foreach f,$(AMD_CATALYST_OPENCL_FILES), \ + $(INSTALL) -D -m 0755 $(AMD_CATALYST_ARCH_DIR)/$(f) $(TARGET_DIR)/$(f) + ) + ln -sf libOpenCL.so.1 \ + $(TARGET_DIR)/usr/lib/libOpenCL.so + $(INSTALL) -m 0755 $(AMD_CATALYST_ARCH_DIR)/usr/bin/clinfo \ + $(TARGET_DIR)/usr/bin + $(INSTALL) -D -m 0644 $(AMD_CATALYST_ARCH_DIR)/etc/OpenCL/vendors/amdocl$(AMD_CATALYST_OCL_SUFFIX).icd \ + $(TARGET_DIR)/etc/OpenCL/vendors/amdocl$(AMD_CATALYST_OCL_SUFFIX).icd +endef + +endif + ifeq ($(BR2_PACKAGE_AMD_CATALYST_XORG), y) AMD_CATALYST_DEPENDENCIES += mesa3d-headers
@@ -139,6 +162,7 @@ define AMD_CATALYST_INSTALL_TARGET_CMDS $(call AMD_CATALYST_INSTALL_XORG) $(call AMD_CATALYST_INSTALL_CMDLINE_TOOLS) $(call AMD_CATALYST_INSTALL_CCCLE) + $(call AMD_CATALYST_INSTALL_OPENCL) endef $(eval $(generic-package))
Signature · 1 line
2.8.1
PATCH v4 7/7 package/amd-catalyst: Add support for OpenCL
Romain, All,
On 2016-08-05 16:54 +0200, Romain Perier spake thusly:
Quoted 31 lines
The AMD Catalyst Linux driver includes OpenCL libraries for GPGPU computing. This commits adds support to install the binary blobs and ICD profiles.
Signed-off-by Romain Perier <[email protected]>--- package/amd-catalyst/Config.in | 6 ++++++ package/amd-catalyst/amd-catalyst.mk | 24 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+)package/amd-catalyst/Config.in +6
-0@@ -64,4 +64,10 @@ config BR2_PACKAGE_AMD_CATALYST_MODULE help Builds and install the fglrx kernel module +config BR2_PACKAGE_AMD_CATALYST_OPENCL + bool "OpenCL support" + help + Installs the OpenCL binary blobs and the ICD profile + for GPGPU computing. + endif # BR2_PACKAGE_AMD_CATALYSTpackage/amd-catalyst/amd-catalyst.mk +0
-0@@ -39,6 +39,29 @@ endef $(eval $(kernel-module))
package/amd-catalyst/amd-catalyst.mk endef · line 49
Quoted 10 lines
package/amd-catalyst/amd-catalyst.mk +8
-0endif +ifeq ($(BR2_PACKAGE_AMD_CATALYST_OPENCL),y) + +AMD_CATALYST_OCL_SUFFIX = $(if $(BR2_x86_64),64,32) +AMD_CATALYST_OPENCL_FILES = \ + usr/lib$(AMD_CATALYST_LIB_SUFFIX)/libOpenCL.so.1 \ + usr/lib$(AMD_CATALYST_LIB_SUFFIX)/libaticalcl.so \ + usr/lib$(AMD_CATALYST_LIB_SUFFIX)/libamdocl$(AMD_CATALYST_OCL_SUFFIX).so \ + usr/lib$(AMD_CATALYST_LIB_SUFFIX)/libamdocl12cl$(AMD_CATALYST_OCL_SUFFIX).so
So this means we're going to install files in /usr/lib32/ or /usr/lib64/ in the target. Although we do have those symlinks, I'm not a fan of it.
Why not:
AMD_CATALYST_OPENCL_FILES = \
libOpenCL.so.1 \
libaticalcl.so etc...and then...
package/amd-catalyst/amd-catalyst.mk endef · line 53
Quoted 3 lines
package/amd-catalyst/amd-catalyst.mk +3
-0+define AMD_CATALYST_INSTALL_OPENCL + $(foreach f,$(AMD_CATALYST_OPENCL_FILES), \ + $(INSTALL) -D -m 0755 $(AMD_CATALYST_ARCH_DIR)/$(f) $(TARGET_DIR)/$(f)
... have this:
$(INSTALL) -D -m 0755 \
$(AMD_CATALYST_ARCH_DIR)/usr/lib$(AMD_CATALYST_LIB_SUFFIX)/$(f) \
$(TARGET_DIR)/usr/lib/$(f)which seems cleaner to me.
package/amd-catalyst/amd-catalyst.mk endef · line 58
Quoted 5 lines
package/amd-catalyst/amd-catalyst.mk +5
-0+ ) + ln -sf libOpenCL.so.1 \ + $(TARGET_DIR)/usr/lib/libOpenCL.so + $(INSTALL) -m 0755 $(AMD_CATALYST_ARCH_DIR)/usr/bin/clinfo \ + $(TARGET_DIR)/usr/bin
When you install individual files, ensure the destination is a file:
$(INSTALL) -m 0755 $(AMD_CATALYST_ARCH_DIR)/usr/bin/clinfo \
$(TARGET_DIR)/usr/bin/clinfootherwise, if /usr/bin does not exist, it will made to be a file, with the content of clinfo. Granted, this is highly improbable in your case, if not impossible, but that's what we are doing everywhere else.
Regards,
Yann E. MORIN.
Quoted 20 lines
package/amd-catalyst/amd-catalyst.mk +7
-0+ $(INSTALL) -D -m 0644 $(AMD_CATALYST_ARCH_DIR)/etc/OpenCL/vendors/amdocl$(AMD_CATALYST_OCL_SUFFIX).icd \ + $(TARGET_DIR)/etc/OpenCL/vendors/amdocl$(AMD_CATALYST_OCL_SUFFIX).icd +endef + +endif + ifeq ($(BR2_PACKAGE_AMD_CATALYST_XORG), y) AMD_CATALYST_DEPENDENCIES += mesa3d-headers@@ -139,6 +162,7 @@ define AMD_CATALYST_INSTALL_TARGET_CMDS $(call AMD_CATALYST_INSTALL_XORG) $(call AMD_CATALYST_INSTALL_CMDLINE_TOOLS) $(call AMD_CATALYST_INSTALL_CCCLE) + $(call AMD_CATALYST_INSTALL_OPENCL) endef $(eval $(generic-package))Signature · 1 line
2.8.1
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'