Skip to contentSkip to conversation

Add support for AMD Catalyst graphics driver

PATCH Superseded Romain Perier 3 participants 19 messages Jul 26, 2016 – Aug 5, 2016

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

v3 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 (6):
support/download: Add support for the referer option to wget
pkg-download: Allow packages to pass an URL referer to the wget method docs/manual: Document the variable $(PKG)_DL_REFERER package/xserver_xorg-server: add version 1.17.4
qt: Add option for enabling the accessibility support package/amd-catalyst-driver: Add AMD proprietary graphic stack support

 docs/manual/adding-packages-generic.txt            |  75 +++++----
 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-driver/20-fglrx.conf          |   4 +
 package/amd-catalyst-driver/Config.in              |  89 +++++++++++
 .../amd-catalyst-driver/amd-catalyst-driver.hash   |   2 +
 package/amd-catalyst-driver/amd-catalyst-driver.mk | 175 +++++++++++++++++++++
 package/amd-catalyst-driver/gl.pc                  |  12 ++
 package/pkg-download.mk                            |   3 +-
 package/qt/Config.in                               |   5 +
 package/qt/qt.mk                                   |   7 +-
 package/x11r7/xserver_xorg-server/Config.in        |  10 ++
 .../xserver_xorg-server/xserver_xorg-server.hash   |   2 +
 support/download/wget                              |  10 +-
 19 files changed, 744 insertions(+), 38 deletions(-)
 create mode 100644 package/amd-catalyst-driver/0001-Add-support-for-Linux-4.0.patch
 create mode 100644 package/amd-catalyst-driver/0002-Add-support-for-Linux-4.1.patch
 create mode 100644 package/amd-catalyst-driver/0003-Add-support-for-Linux-4.2.patch
 create mode 100644 package/amd-catalyst-driver/0004-Use-fpregs_active-instead-of-has_fpu.patch
 create mode 100644 package/amd-catalyst-driver/0005-Use-a-local-copy-of-copy_xregs_to_kernel.patch
 create mode 100644 package/amd-catalyst-driver/0006-Add-support-for-Linux-4.4.patch
 create mode 100644 package/amd-catalyst-driver/20-fglrx.conf
 create mode 100644 package/amd-catalyst-driver/Config.in
 create mode 100644 package/amd-catalyst-driver/amd-catalyst-driver.hash
 create mode 100644 package/amd-catalyst-driver/amd-catalyst-driver.mk
 create mode 100644 package/amd-catalyst-driver/gl.pc
Signature · 1 line
2.8.1
#1 lore raw

PATCH v3 1/6 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 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  | 4 +++-
 support/download/hg   | 4 +++-
 support/download/scp  | 4 +++-
 support/download/svn  | 4 +++-
 support/download/wget | 4 +++-
 8 files changed, 24 insertions(+), 8 deletions(-)
support/download/bzr +3 -1
index e18b01f..75b7b41 100755
@@ -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
index 09ce3d1..0ee1f3b 100755
@@ -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
index 7980389..50050ab 100755
@@ -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 +3 -1
index 314b388..686c26f 100755
@@ -25,6 +25,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() {
@@ -49,7 +51,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} --mirror "'${repo}'" "'${basename}'"
+    _git clone ${verbose} "${@}" --mirror "'${repo}'" "'${basename}'"
 fi
 
 GIT_DIR="${basename}" \
support/download/hg +3 -1
index 25cb4e9..3af0169 100755
@@ -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
index 95cf502..825fd41 100755
@@ -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
index 4dcdd06..77abf3d 100755
@@ -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
index 0fc7ffa..768de90 100755
@@ -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
#2 lore raw

PATCH v3 1/6 support/download: Add support to pass options directly to downloaders

Romain, All,

On 2016-07-26 10:21 +0200, Romain Perier spake thusly:

Quoted 4 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.

Almost good, see below...

Quoted 1 line

[--SNIP--]

Quoted 14 lines
support/download/git +2 -0
index 314b388..686c26f 100755
@@ -25,6 +25,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() {

support/download/git if [ -n "$(_git ls-remote "'${repo}'" "'${cset}'" 2>&1)" ]; then · line 54

Quoted 5 lines
support/download/git +1 -1
@@ -49,7 +51,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} --mirror "'${repo}'" "'${basename}'"
+    _git clone ${verbose} "${@}" --mirror "'${repo}'" "'${basename}'"

As I already said in the previous review [0], you forgot the git clone just a few lines above, where we try with --depth 1.

[0] http://lists.busybox.net/pipermail/buildroot/2016-July/167691.html

Otherwise, looks good.

Regards,
Yann E. MORIN.

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.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH v3 2/6 pkg-download: Allow packages to pass generic options to download methods

In reply to Romain Perier

Introduce 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 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
index a0f694d..00fbe6c 100644
@@ -80,7 +80,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
@@ -96,7 +97,8 @@ define DOWNLOAD_BZR
 		-- \
 		$($(PKG)_SITE) \
 		$($(PKG)_DL_VERSION) \
-		$($(PKG)_BASE_NAME)
+		$($(PKG)_BASE_NAME) \
+		$($(PKG)_DL_OPTS)
 endef
 
 define SOURCE_CHECK_BZR
@@ -111,7 +113,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
@@ -126,7 +129,8 @@ define DOWNLOAD_SVN
 		-- \
 		$($(PKG)_SITE) \
 		$($(PKG)_DL_VERSION) \
-		$($(PKG)_BASE_NAME)
+		$($(PKG)_BASE_NAME) \
+		$($(PKG)_DL_OPTS)
 endef
 
 define SOURCE_CHECK_SVN
@@ -142,7 +146,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
@@ -156,7 +161,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
@@ -171,7 +177,8 @@ define DOWNLOAD_WGET
 		-H $(PKGDIR)/$($(PKG)_RAWNAME).hash \
 		$(QUIET) \
 		-- \
-		'$(call qstrip,$(1))'
+		'$(call qstrip,$(1))' \
+		$($(PKG)_DL_OPTS)
 endef
 
 define SOURCE_CHECK_WGET
@@ -184,7 +191,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
#4 lore raw

PATCH v3 2/6 pkg-download: Allow packages to pass generic options to download methods

Romain, All,

On 2016-07-26 10:21 +0200, Romain Perier spake thusly:

Quoted 7 lines

Introduce 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.

You forgot to add my Reviewed-by tag from the previous review:
http://lists.busybox.net/pipermail/buildroot/2016-July/167658.html

Here it is again, just for you! ;-)

Regards,
Yann E. MORIN.

Quoted 100 lines

---

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
index a0f694d..00fbe6c 100644
@@ -80,7 +80,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
@@ -96,7 +97,8 @@ define DOWNLOAD_BZR
 		-- \
 		$($(PKG)_SITE) \
 		$($(PKG)_DL_VERSION) \
-		$($(PKG)_BASE_NAME)
+		$($(PKG)_BASE_NAME) \
+		$($(PKG)_DL_OPTS)
 endef
 
 define SOURCE_CHECK_BZR
@@ -111,7 +113,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
@@ -126,7 +129,8 @@ define DOWNLOAD_SVN
 		-- \
 		$($(PKG)_SITE) \
 		$($(PKG)_DL_VERSION) \
-		$($(PKG)_BASE_NAME)
+		$($(PKG)_BASE_NAME) \
+		$($(PKG)_DL_OPTS)
 endef
 
 define SOURCE_CHECK_SVN
@@ -142,7 +146,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
@@ -156,7 +161,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
@@ -171,7 +177,8 @@ define DOWNLOAD_WGET
 		-H $(PKGDIR)/$($(PKG)_RAWNAME).hash \
 		$(QUIET) \
 		-- \
-		'$(call qstrip,$(1))'
+		'$(call qstrip,$(1))' \
+		$($(PKG)_DL_OPTS)
 endef
 
 define SOURCE_CHECK_WGET
@@ -184,7 +191,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 · 6 lines
2.8.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
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.  |
'------------------------------^-------^------------------^--------------------'
#5 lore raw

PATCH v3 3/6 docs/manual: Document the variable $(PKG)_DL_OPTS

In reply to Romain Perier

This adds a description of the optional variable $(PKG)_DL_OPTS. When it is set, this option passes additional options to the downloader.

---

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
index 8ed7fe8..ced5b30 100644
@@ -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
#6 lore raw

PATCH v3 3/6 docs/manual: Document the variable $(PKG)_DL_OPTS

Romain, All,

On 2016-07-26 10:21 +0200, Romain Perier spake thusly:

Quoted 4 lines

This adds a description of the optional variable $(PKG)_DL_OPTS. When it is set, this option passes additional options to the downloader.

Regards,
Yann E. MORIN.

Quoted 37 lines

---

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
index 8ed7fe8..ced5b30 100644
@@ -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 · 6 lines
2.8.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
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.  |
'------------------------------^-------^------------------^--------------------'
#7 lore raw

PATCH v3 4/6 package/xserver_xorg-server: add version 1.17.4

In reply to Romain Perier

Some old binary blobs drivers only implement an old VIDEODRV ABI. This is the case for the AMD Catalyst driver for example.

Such a situation already exists with the nvidia-tegra23, that only support the VIDEODRV ABI 14.

Since VIDEODRV ABIs are not backward compatible [0], lets introduce an older Xserver version that supports such an old ABI.

0. https://www.x.org/wiki/XorgModuleABIVersions/

---
 package/x11r7/xserver_xorg-server/Config.in                | 10 ++++++++++
 package/x11r7/xserver_xorg-server/xserver_xorg-server.hash |  2 ++
 2 files changed, 12 insertions(+)
package/x11r7/xserver_xorg-server/Config.in +10 -0
index 26b9c8e..af1bac9 100644
@@ -58,12 +58,16 @@ if BR2_PACKAGE_XSERVER_XORG_SERVER
 config BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_14
 	bool
 
+config BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_19
+	bool
+
 config BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_20
 	bool
 
 config BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI
 	int
 	default 14 if BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_14
+	default 19 if BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_19
 	default 20 if BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_20
 
 choice
@@ -74,6 +78,11 @@ config BR2_PACKAGE_XSERVER_XORG_SERVER_V_1_18
 	select BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_20
 	select BR2_PACKAGE_XPROTO_PRESENTPROTO
 
+config BR2_PACKAGE_XSERVER_XORG_SERVER_V_1_17
+	bool "1.17.4"
+	select BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_19
+	select BR2_PACKAGE_XPROTO_PRESENTPROTO
+
 config BR2_PACKAGE_XSERVER_XORG_SERVER_V_1_14
 	bool "1.14.7"
 	select BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_14
@@ -83,6 +92,7 @@ endchoice
 config BR2_PACKAGE_XSERVER_XORG_SERVER_VERSION
 	string
 	default "1.18.3" if BR2_PACKAGE_XSERVER_XORG_SERVER_V_1_18
+	default "1.17.4" if BR2_PACKAGE_XSERVER_XORG_SERVER_V_1_17
 	default "1.14.7" if BR2_PACKAGE_XSERVER_XORG_SERVER_V_1_14
 
 choice
package/x11r7/xserver_xorg-server/xserver_xorg-server.hash +2 -0
index 2172c89..abd1589 100644
@@ -1,5 +1,7 @@
 # From http://lists.x.org/archives/xorg-announce/2014-June/002440.html
 sha1   7a95765e56b124758fcd7b609589e65b8870880b                                xorg-server-1.14.7.tar.bz2
 sha256 fcf66fa6ad86227613d2d3e8ae13ded297e2a1e947e9060a083eaf80d323451f        xorg-server-1.14.7.tar.bz2
+# From https://lists.x.org/archives/xorg-announce/2015-October/002650.html
+sha256 0c4b45c116a812a996eb432d8508cf26c2ec8c3916ff2a50781796882f8d6457        xorg-server-1.17.4.tar.bz2
 # From https://lists.freedesktop.org/archives/xorg-announce/2016-April/002683.html
 sha256	ea739c22517cdbe2b5f7c0a5fd05fe8a10ac0629003e71c0c7862f4bb60142cd	xorg-server-1.18.3.tar.bz2
Signature · 1 line
2.8.1
#8 lore raw

PATCH v3 5/6 qt: Add option for enabling the accessibility support

In reply to Romain Perier

This adds an entry in the configuration menu in order to enable or disable the accessibility support.

---
 package/qt/Config.in | 5 +++++
 package/qt/qt.mk     | 7 ++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)
package/qt/Config.in +5 -0
index 0ab8417..2523276 100644
@@ -302,6 +302,11 @@ config BR2_PACKAGE_QT_QTTIFF
 	bool "Use Qt bundled libtiff"
 endchoice
 
+config BR2_PACKAGE_QT_ACCESSIBILITY
+	bool "Enable accessibility support"
+	help
+	  This enables and compile the accessibility support.
+
 endif # BR2_PACKAGE_QT_GUI_MODULE
 
 choice
package/qt/qt.mk +6 -1
index f29a671..fa9dbf9 100644
@@ -258,6 +258,12 @@ else
 QT_CONFIGURE_OPTS += -no-libmng
 endif
 
+ifeq ($(BR2_PACKAGE_QT_ACCESSIBILITY),y)
+QT_CONFIGURE_OPTS += -accessibility
+else
+QT_CONFIGURE_OPTS += -no-accessibility
+endif
+
 ifeq ($(BR2_PACKAGE_QT_QTZLIB),y)
 QT_CONFIGURE_OPTS += -qt-zlib
 else
@@ -517,7 +523,6 @@ define QT_CONFIGURE_CMDS
 		-no-xinerama \
 		-no-cups \
 		-no-nis \
-		-no-accessibility \
 		-no-separate-debug-info \
 		-prefix /usr \
 		-plugindir /usr/lib/qt/plugins \
Signature · 1 line
2.8.1
#9 lore raw

PATCH v3 6/6 package/amd-catalyst-driver: Add AMD proprietary graphic stack support

In reply to Romain Perier

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 and OpenCL binary blobs and the most commonly used cmdline tools.

---

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-driver/20-fglrx.conf          |   4 +
 package/amd-catalyst-driver/Config.in              |  90 +++++++++++
 .../amd-catalyst-driver/amd-catalyst-driver.hash   |   2 +
 package/amd-catalyst-driver/amd-catalyst-driver.mk | 175 +++++++++++++++++++++
 package/amd-catalyst-driver/gl.pc                  |  12 ++
 12 files changed, 671 insertions(+)
 create mode 100644 package/amd-catalyst-driver/0001-Add-support-for-Linux-4.0.patch
 create mode 100644 package/amd-catalyst-driver/0002-Add-support-for-Linux-4.1.patch
 create mode 100644 package/amd-catalyst-driver/0003-Add-support-for-Linux-4.2.patch
 create mode 100644 package/amd-catalyst-driver/0004-Use-fpregs_active-instead-of-has_fpu.patch
 create mode 100644 package/amd-catalyst-driver/0005-Use-a-local-copy-of-copy_xregs_to_kernel.patch
 create mode 100644 package/amd-catalyst-driver/0006-Add-support-for-Linux-4.4.patch
 create mode 100644 package/amd-catalyst-driver/20-fglrx.conf
 create mode 100644 package/amd-catalyst-driver/Config.in
 create mode 100644 package/amd-catalyst-driver/amd-catalyst-driver.hash
 create mode 100644 package/amd-catalyst-driver/amd-catalyst-driver.mk
 create mode 100644 package/amd-catalyst-driver/gl.pc
package/Config.in +1 -0
index 9d668bf..7aa1e3c 100644
@@ -344,6 +344,7 @@ endmenu
 	source "package/acpid/Config.in"
 	source "package/aer-inject/Config.in"
 	source "package/am335x-pru-package/Config.in"
+	source "package/amd-catalyst-driver/Config.in"
 	source "package/avrdude/Config.in"
 	source "package/bcache-tools/Config.in"
 	source "package/biosdevname/Config.in"
package/amd-catalyst-driver/0001-Add-support-for-Linux-4.0.patch new file +45 -0

45 lines not on this page · raw message

package/amd-catalyst-driver/0002-Add-support-for-Linux-4.1.patch new file +31 -0
new file mode 100644
index 0000000..cc95916
@@ -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-driver/0003-Add-support-for-Linux-4.2.patch new file +121 -0

121 lines not on this page · raw message

package/amd-catalyst-driver/0004-Use-fpregs_active-instead-of-has_fpu.patch new file +33 -0
new file mode 100644
index 0000000..4d375b8
@@ -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-driver/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-driver/0006-Add-support-for-Linux-4.4.patch new file +78 -0

78 lines not on this page · raw message

package/amd-catalyst-driver/20-fglrx.conf new file +4 -0
new file mode 100644
index 0000000..1186ed1
@@ -0,0 +1,4 @@
+Section "Device"
+	Identifier "AMD Radeon GPU"
+        Driver "fglrx"
+EndSection
package/amd-catalyst-driver/Config.in new file +90 -0

90 lines not on this page · raw message

package/amd-catalyst-driver/amd-catalyst-driver.hash new file +2 -0
new file mode 100644
index 0000000..9f9b0a3
@@ -0,0 +1,2 @@
+# Locally computed
+sha256	bf3e6e7d5c51db3d075410a3f116f865b82823debc1d66698d187249feec6a91	amd-catalyst-15.9-linux-installer-15.201.1151-x86.x86_64.zip
package/amd-catalyst-driver/amd-catalyst-driver.mk new file +175 -0

175 lines not on this page · raw message

package/amd-catalyst-driver/gl.pc new file +12 -0
new file mode 100644
index 0000000..8729271
@@ -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
#10 lore raw

PATCH v3 6/6 package/amd-catalyst-driver: Add AMD proprietary graphic stack support

Romain, All,

On 2016-07-26 10:21 +0200, Romain Perier spake thusly:

Quoted 4 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 and OpenCL binary blobs and the most commonly used cmdline tools.

You forgot to decribe a *very* important piece of the change in the commit log: that it needs patching because it needs symbols that are GPL-only.

But see below about that...

Quoted 1 line

[--SNIP--]

Quoted 6 lines
package/amd-catalyst-driver/0004-Use-fpregs_active-instead-of-has_fpu.patch new file +0 -0
new file mode 100644
index 0000000..4d375b8

package/amd-catalyst-driver/0004-Use-fpregs_active-instead-of-has_fpu.patch line 8

Quoted 8 lines
package/amd-catalyst-driver/0004-Use-fpregs_active-instead-of-has_fpu.patch new file +8 -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.

Is Tim the original author? If so, you should maintain his own authorship of the patch and carry his SoB-line plus yours.

If not, then you could at least Cc-tag him:

package/amd-catalyst-driver/0004-Use-fpregs_active-instead-of-has_fpu.patch line 9

Quoted 1 line
package/amd-catalyst-driver/0004-Use-fpregs_active-instead-of-has_fpu.patch new file +1 -0
+Signed-off-by: Romain Perier <[email protected]>
Cc Tiom Grdner <email>

[--SNIP--]

Quoted 6 lines
package/amd-catalyst-driver/0005-Use-a-local-copy-of-copy_xregs_to_kernel.patch new file +0 -0
new file mode 100644
index 0000000..c9513ef

package/amd-catalyst-driver/0005-Use-a-local-copy-of-copy_xregs_to_kernel.patch line 8

Quoted 8 lines
package/amd-catalyst-driver/0005-Use-a-local-copy-of-copy_xregs_to_kernel.patch new file +8 -0
@@ -0,0 +1,79 @@
+From eb703737be5c91c1a0817351db8ec152c523c85d Mon Sep 17 00:00:00 2001
+From: Alberto Milone <[email protected]>
+Date: Thu, 17 Sep 2015 15:49:46 +0200
+Subject: [PATCH] Use a local copy of copy_xregs_to_kernel
+
+This is needed for Linux 4.2.
+
+Thanks to Tim Gardner for the patch.

Ditto.

[--SNIP--]

package/amd-catalyst-driver/20-fglrx.conf line 3

Quoted 9 lines
package/amd-catalyst-driver/20-fglrx.conf new file +3 -0
new file mode 100644
index 0000000..1186ed1
@@ -0,0 +1,4 @@
+Section "Device"
+	Identifier "AMD Radeon GPU"
+        Driver "fglrx"

Indent with either TABs or spaces, not both.

package/amd-catalyst-driver/20-fglrx.conf line 4

Quoted 1 line
package/amd-catalyst-driver/20-fglrx.conf new file +1 -0
+EndSection

I seem to recall that Xorg no longer needs those pesky conf files nowadays... I'm not sure how Xorg decides what driver to load, but if we could use that, it would really be better (well, given that sore state of this driver, not much better, but still... ;-/ ).

package/amd-catalyst-driver/Config.in line 6

Quoted 12 lines
package/amd-catalyst-driver/Config.in new file +6 -0
new file mode 100644
index 0000000..2dbecaa
@@ -0,0 +1,90 @@
+comment "amd-catalyst-driver needs a glibc toolchain"
+	depends on BR2_i386 || BR2_x86_64
+	depends on !BR2_TOOLCHAIN_USES_GLIBC
+
+config BR2_PACKAGE_AMD_CATALYST_DRIVER
+	bool "amd-catalyst-driver"

Ues, I know we have nvidia-driver. But we also have nvidia-tegra23-binaries and rpi-userland. So maybe we can just call it "amd-catalyst". Thoughts?

Quoted 7 lines
package/amd-catalyst-driver/Config.in new file +7 -0
+	depends on BR2_i386 || BR2_x86_64
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	help
+	  The binary-only driver blob for AMD cards.
+	  This driver supports AMD Radeon HD 5xxx and newer graphics
+	  cards.
+

package/amd-catalyst-driver/Config.in line 23

Quoted 10 lines
package/amd-catalyst-driver/Config.in new file +10 -0
+	  http://www.amd.com/
+
+if BR2_PACKAGE_AMD_CATALYST_DRIVER
+
+comment "amd-catalyst-driver needs a modular Xorg <= 1.17"
+	depends on !BR2_PACKAGE_XORG7 || !BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR || !BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_19
+
+config BR2_PACKAGE_AMD_CATALYST_DRIVER_XORG
+	bool "X.org drivers"
+	default y

What good is this package if the Xorg drivers are disabled?

Note that in the NVidia driver, they are optional, becasue they can be used to do just CUDA (GPGPU computing). For the AMD CAtalyst, I did not see that this was possible.

Then, all the "depends on" and "select" done below should be moved to the main symbol.

Unless there is the equivalent to CUDA here...

Quoted 7 lines
package/amd-catalyst-driver/Config.in new file +7 -0
+	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

package/amd-catalyst-driver/Config.in line 40

Quoted 10 lines
package/amd-catalyst-driver/Config.in new file +10 -0
+	select BR2_PACKAGE_XLIB_LIBX11
+	select BR2_PACKAGE_XLIB_LIBXEXT
+	select BR2_PACKAGE_XLIB_LIBXCOMPOSITE
+	select BR2_PACKAGE_HAS_LIBGL
+	select BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE
+
+if BR2_PACKAGE_AMD_CATALYST_DRIVER_XORG
+
+config BR2_PACKAGE_PROVIDES_LIBGL
+	default "amd-catalyst-driver"

So it only provides OpenGL, and no EGL/GLES, OpenMAX or OpenVG?

package/amd-catalyst-driver/Config.in line 52

Quoted 11 lines
package/amd-catalyst-driver/Config.in new file +11 -0
+config BR2_PACKAGE_AMD_CATALYST_DRIVER_CMDLINE_TOOLS
+	bool "command-line configuration tools and utilities"
+	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_DRIVER_CCCLE
+	bool "Catalyst Control Center"
+	depends on BR2_USE_MMU && BR2_PACKAGE_QT && BR2_PACKAGE_QT_X11

I think it is better not to mix architectural dependencies and package dependencies. And anyway, the MMU dependency is useless, since the driver depends on i386 || x86_64, that both have an MMU.

Besides, you can safely select BR2_PACKAGE_QT_X11, since you know Xorh is enabled because you have BR2_PACKAGE_XORG7 above.

depends on BR2_PACKAGE_QT
select BR2_PACKAGE_QT_X11

package/amd-catalyst-driver/Config.in line 64

Quoted 12 lines
package/amd-catalyst-driver/Config.in new file +12 -0
+	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_DRIVER_MODULE
+	bool

Why this blind symbol, when there is only one that selects it?

Maybe we would want to add a prompt to that symbol, to decide whther or not to build the driver.

Speaking of which... Maybe this patch should have been split in at least two changes:

- one patch to add support for the userland stuff,

- one patch to add support for biulding the kernel module.

This would make it easier to review and merge, because the kernel module is for now a big no-no fropm me (see below).

package/amd-catalyst-driver/Config.in line 68

Quoted 3 lines
package/amd-catalyst-driver/Config.in new file +3 -0
+config BR2_PACKAGE_AMD_CATALYST_DRIVER_OPENCL
+	bool "OpenCL support"
+	select BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE

And this symbol would depend on BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE once it has a prompt, instead of selecting it.

Quoted 8 lines
package/amd-catalyst-driver/Config.in new file +8 -0
+	help
+	  Installs the OpenCL binary blobs and the ICD profile
+	  for GPGPU computing.
+
+config BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE_LICENSE_GPL
+	bool "fglrx module export GPL license"
+	help
+	  If enabled, you accept that the driver will be patched locally

package/amd-catalyst-driver/Config.in line 88

Quoted 10 lines
package/amd-catalyst-driver/Config.in new file +10 -0
+	  in order to export itself as a GPL module to the Linux kernel.
+	  This is required as the module uses some GPL-compatible
+	  symbols. Without this fix, the module won't build properly
+	  because the Linux kernel build system does not allow to link a
+	  non GPL module, if this one tries to use GPL-only symbols. It
+	  is worth mentioning that from a legal point of view, you are
+	  most likely not allowed to redistribute such a kernel module,
+	  in a pre-built form. The author and the buildroot project
+	  disclaim any responsibility in case these terms are not
+	  respected.

OK, so this one is definitely a NAK from me. This is definitely not acceptable. We can not go like that and just change the licensing
information: this is legally questionable that we even provide such an option, even with the legal blurb you wrote, which is by far not explicit enough either, but I won't comment on it because I argue that this option should jsut go away with the code it protects.

Instead I suggest the following:

config BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE
bool "fglrx kernel module"
depends on BR2_KERNEL_LINUX
depends on whatever is needed
help
The kernel driver will build properly, but fail to work at runtime because it uses Linux kernel symbols exposed only to GPL-licensed modules.

config BR2_PACKAGE_AMD_CATALYST_DRIVER_OPENCL
bool "OpenCL support"
depends on BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE depends on whatever is needed
help
Blabla OpenCL

Note: the blurb about BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE was suggested by Thomas while fdiscussing the issue with him on IRC.

We should *not* even hint at what should be done to overcome this. This is not a technical issue, so there is no technical fix.

[--SNIP--]

Quoted 18 lines
package/amd-catalyst-driver/amd-catalyst-driver.mk new file +12 -0
new file mode 100644
index 0000000..cfad4ee
@@ -0,0 +1,175 @@
+################################################################################
+#
+# amd-catalyst-driver
+#
+################################################################################
+
+AMD_CATALYST_DRIVER_VERSION = 15.9
+AMD_CATALYST_DRIVER_VERBOSE_VER = 15.201.1151
+AMD_CATALYST_DRIVER_SITE = http://www2.ati.com/drivers/linux
+AMD_CATALYST_DRIVER_DL_OPTS = --referer='http://support.amd.com/en-us/kb-articles/Pages/latest-linux-beta-driver.aspx'
+AMD_CATALYST_DRIVER_SOURCE = amd-catalyst-$(AMD_CATALYST_DRIVER_VERSION)-linux-installer-$(AMD_CATALYST_DRIVER_VERBOSE_VER)-x86.x86_64.zip
+AMD_CATALYST_DRIVER_LICENSE = AMD Software License 

package/amd-catalyst-driver/amd-catalyst-driver.mk line 22

Quoted 10 lines
package/amd-catalyst-driver/amd-catalyst-driver.mk new file +10 -0
+AMD_CATALYST_DRIVER_LICENSE_FILES = LICENSE.txt
+AMD_CATALYST_DRIVER_INSTALL_STAGING = YES
+AMD_CATALYST_DRIVER_SUFFIX = $(if $(BR2_x86_64),_64)
+AMD_CATALYST_DRIVER_ARCH_DIR = $(@D)/arch/x86$(AMD_CATALYST_DRIVER_SUFFIX)
+AMD_CATALYST_DRIVER_LIB_SUFFIX = $(if $(BR2_x86_64),64)
+
+
+define AMD_CATALYST_DRIVER_EXTRACT_CMDS
+	unzip -q $(DL_DIR)/$(AMD_CATALYST_DRIVER_SOURCE) -d $(@D)
+	$(SHELL) $(@D)/AMD-Catalyst-$(AMD_CATALYST_DRIVER_VERSION)-Linux-installer-$(AMD_CATALYST_DRIVER_VERBOSE_VER)-x86.x86_64.run --extract $(@D)

So, this is a self-extracting archive in a shell script, right?

package/amd-catalyst-driver/amd-catalyst-driver.mk line 35

Quoted 13 lines
package/amd-catalyst-driver/amd-catalyst-driver.mk new file +13 -0
+endef
+
+ifeq ($(BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE),y)
+AMD_CATALYST_DRIVER_MODULE_SUBDIRS = common/lib/modules/fglrx/build_mod/2.6.x
+AMD_CATALYST_DRIVER_MODULE_MAKE_OPTS =  \
+	CFLAGS_MODULE="-DCOMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space"
+
+ifeq ($(BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE_LICENSE_GPL),y)
+define AMD_CATALYST_DRIVER_POST_PATCH_LICENSE_FIXUP
+	sed 's/^MODULE_LICENSE("\(.*\)")/MODULE_LICENSE("GPL\\0\1")/' -i $(@D)/common/lib/modules/fglrx/build_mod/firegl_public.c
+endef
+AMD_CATALYST_DRIVER_POST_PATCH_HOOKS += AMD_CATALYST_DRIVER_POST_PATCH_LICENSE_FIXUP
+endif

This block should just go away, we should not try to fix a non-technical issue. Especially not a legal one. The dangers of doing so are way top big to take the chance.

Indeed, the driver won't work. We can't do much about it.

package/amd-catalyst-driver/amd-catalyst-driver.mk line 43

Quoted 7 lines
package/amd-catalyst-driver/amd-catalyst-driver.mk new file +7 -0
+define AMD_CATALYST_DRIVER_CONFIGURE_CMDS
+	# 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
+	cp $(@D)/arch/x86$(AMD_CATALYST_DRIVER_SUFFIX)/lib/modules/fglrx/build_mod/libfglrx_ip.a \
+		$(@D)/common/lib/modules/fglrx/build_mod/2.6.x

This should be a post-extract hook (or a post-patch hook).

package/amd-catalyst-driver/amd-catalyst-driver.mk line 47

Quoted 4 lines
package/amd-catalyst-driver/amd-catalyst-driver.mk new file +4 -0
+endef
+
+$(eval $(kernel-module))
+endif

Since you are defining large if-block, please add the condition as a comment to each endif, like so:

endif # BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE

(note: if the if-bock just encloses one or two lines, that's OK not to do so, but it should be done for more than three or four lines, especially when there are nested if-bloc. Use your own judgemnent to adapt the rule, of course. ;-) )

package/amd-catalyst-driver/amd-catalyst-driver.mk line 49

Quoted 1 line
package/amd-catalyst-driver/amd-catalyst-driver.mk new file +1 -0
+ifeq ($(BR2_PACKAGE_AMD_CATALYST_DRIVER_OPENCL),y)

Since this needs the kernel module, this should go in the same if-block.

package/amd-catalyst-driver/amd-catalyst-driver.mk line 61

Quoted 11 lines
package/amd-catalyst-driver/amd-catalyst-driver.mk new file +11 -0
+AMD_CATALYST_DRIVER_OCL_SUFFIX = $(if $(BR2_x86_64),64,32)
+AMD_CATALYST_DRIVER_OPENCL_FILES = \
+	usr/lib$(AMD_CATALYST_DRIVER_LIB_SUFFIX)/libOpenCL.so.1 \
+	usr/lib$(AMD_CATALYST_DRIVER_LIB_SUFFIX)/libaticalcl.so \
+	usr/lib$(AMD_CATALYST_DRIVER_LIB_SUFFIX)/libamdocl$(AMD_CATALYST_DRIVER_OCL_SUFFIX).so \
+	usr/lib$(AMD_CATALYST_DRIVER_LIB_SUFFIX)/libamdocl12cl$(AMD_CATALYST_DRIVER_OCL_SUFFIX).so
+
+define AMD_CATALYST_DRIVER_INSTALL_OPENCL
+	$(foreach f,$(AMD_CATALYST_DRIVER_OPENCL_FILES), \
+		$(INSTALL) -D -m 0755 $(AMD_CATALYST_DRIVER_ARCH_DIR)/$(f) $(TARGET_DIR)/$(f)
+	)

Although I personally prefer the way you did, we usually close the foreach on the last code line, not on its own line. You have many of them, below, don;t forget to fix those as well.

package/amd-catalyst-driver/amd-catalyst-driver.mk line 65

Quoted 4 lines
package/amd-catalyst-driver/amd-catalyst-driver.mk new file +4 -0
+	ln -sf libOpenCL.so.1 \
+		$(TARGET_DIR)/usr/lib/libOpenCL.so
+	$(INSTALL) -m 0755 $(AMD_CATALYST_DRIVER_ARCH_DIR)/usr/bin/clinfo \
+		$(TARGET_DIR)/usr/bin

If /usr/bin does not exist, then this will create a file named /usr/bin So you need to state the full path to the destination:

    $(INSTALL) -m 0755 $(AMD_CATALYST_DRIVER_ARCH_DIR)/usr/bin/clinfo \
        $(TARGET_DIR)/usr/bin/clinfo

(this is anyway inconsistent: you did it correctly for _FILES and for the icd file, below.)

package/amd-catalyst-driver/amd-catalyst-driver.mk line 70

Quoted 5 lines
package/amd-catalyst-driver/amd-catalyst-driver.mk new file +5 -0
+	$(INSTALL) -D -m 0644 $(AMD_CATALYST_DRIVER_ARCH_DIR)/etc/OpenCL/vendors/amdocl$(AMD_CATALYST_DRIVER_OCL_SUFFIX).icd \
+		$(TARGET_DIR)/etc/OpenCL/vendors/amdocl$(AMD_CATALYST_DRIVER_OCL_SUFFIX).icd
+endef
+
+endif

endif # BR2_PACKAGE_AMD_CATALYST_DRIVER_OPENCL

;-)

package/amd-catalyst-driver/amd-catalyst-driver.mk line 72

Quoted 1 line
package/amd-catalyst-driver/amd-catalyst-driver.mk new file +1 -0
+ifeq ($(BR2_PACKAGE_AMD_CATALYST_DRIVER_XORG), y)

As questioned earlier, I wonder what good it is to have this be conditional. Can't we just always build the Xorj driver?

Quoted 14 lines
package/amd-catalyst-driver/amd-catalyst-driver.mk new file +14 -0
+AMD_CATALYST_DRIVER_DEPENDENCIES += mesa3d-headers
+AMD_CATALYST_DRIVER_PROVIDES = libgl
+AMD_CATALYST_DRIVER_XPIC_DIR = $(@D)/xpic$(if $(BR2_x86_64),_64a)
+
+define AMD_CATALYST_DRIVER_INSTALL_GL_LIBS
+	$(INSTALL) -m 0644 $(AMD_CATALYST_DRIVER_ARCH_DIR)/usr/X11R6/lib$(AMD_CATALYST_DRIVER_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_DRIVER_INSTALL_STAGING_XORG
+	$(call AMD_CATALYST_DRIVER_INSTALL_GL_LIBS,$(STAGING_DIR))

package/amd-catalyst-driver/amd-catalyst-driver.mk line 97

Quoted 10 lines
package/amd-catalyst-driver/amd-catalyst-driver.mk new file +10 -0
+	$(INSTALL) -D -m 0644 package/amd-catalyst-driver/gl.pc \
+		$(STAGING_DIR)/usr/lib/pkgconfig/gl.pc
+endef
+
+AMD_CATALYST_DRIVER_XORG_DRIVERS_FILES = modules/amdxmm.so \
+	modules/drivers/fglrx_drv.so \
+	modules/linux/libfglrxdrm.so
+
+define AMD_CATALYST_DRIVER_INSTALL_XORG
+# Xorg drivers

Comments in defines should be indented.

Quoted 4 lines
package/amd-catalyst-driver/amd-catalyst-driver.mk new file +4 -0
+	$(foreach f,$(AMD_CATALYST_DRIVER_XORG_DRIVERS_FILES), \
+		$(INSTALL) -D -m 0755 $(AMD_CATALYST_DRIVER_XPIC_DIR)/usr/X11R6/lib$(AMD_CATALYST_DRIVER_LIB_SUFFIX)/$(f) \
+		$(TARGET_DIR)/usr/lib/xorg/$(f)
+	)

package/amd-catalyst-driver/amd-catalyst-driver.mk line 111

Quoted 10 lines
package/amd-catalyst-driver/amd-catalyst-driver.mk new file +10 -0
+
+# Xorg is not able to detect the driver automatically
+	$(INSTALL) -D -m 0644 package/amd-catalyst-driver/20-fglrx.conf \
+		$(TARGET_DIR)/etc/X11/xorg.conf.d/20-fglrx.conf
+
+
+# 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/

Space-before-TAB. TABs-and-spaces indentation mismatch.

Quoted 10 lines
package/amd-catalyst-driver/amd-catalyst-driver.mk new file +10 -0
+# 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_DRIVER_ARCH_DIR)/usr/X11R6/lib$(AMD_CATALYST_DRIVER_LIB_SUFFIX)/modules/dri/fglrx_dri.so \
+		$(TARGET_DIR)/usr/lib/dri/fglrx_dri.so
+	$(INSTALL) -D -m 0644 $(AMD_CATALYST_DRIVER_XPIC_DIR)/usr/X11R6/lib$(AMD_CATALYST_DRIVER_LIB_SUFFIX)/modules/extensions/fglrx/fglrx-libglx.so \
+		$(TARGET_DIR)/usr/lib/xorg/modules/extensions/libglx.so
+	$(INSTALL) -D -m 0644 $(AMD_CATALYST_DRIVER_XPIC_DIR)/usr/X11R6/lib$(AMD_CATALYST_DRIVER_LIB_SUFFIX)/modules/glesx.so \
+		$(TARGET_DIR)/usr/lib/xorg/modules/glesx.so
+
+# Userspace GL libraries, also runtime dependency of most of the cmdline tools

package/amd-catalyst-driver/amd-catalyst-driver.mk line 132

Quoted 10 lines
package/amd-catalyst-driver/amd-catalyst-driver.mk new file +10 -0
+	$(INSTALL) -m 0644 $(AMD_CATALYST_DRIVER_ARCH_DIR)/usr/X11R6/lib$(AMD_CATALYST_DRIVER_LIB_SUFFIX)/*.so \
+		$(TARGET_DIR)/usr/lib/
+	$(call AMD_CATALYST_DRIVER_INSTALL_GL_LIBS,$(TARGET_DIR))
+
+# Runtime depedency required by libfglrxdrm.so
+	$(INSTALL) -m 0644 $(AMD_CATALYST_DRIVER_ARCH_DIR)/usr/lib$(AMD_CATALYST_DRIVER_LIB_SUFFIX)/libatiuki.so.1.0 \
+		$(TARGET_DIR)/usr/lib/
+	ln -sf libatiuki.so.1.0 \
+		$(TARGET_DIR)/usr/lib/libatiuki.so.1
+endef

endef # AMD_CATALYST_DRIVER_INSTALL_XORG

package/amd-catalyst-driver/amd-catalyst-driver.mk line 127

Quoted 1 line
package/amd-catalyst-driver/amd-catalyst-driver.mk new file +1 -0
+endif

endif # BR2_PACKAGE_AMD_CATALYST_DRIVER_XORG

(well, I wrote those to split the if-blocks so I could more easily review the patch. I'm not getting senile just yet. Or so I think. ;-) )

package/amd-catalyst-driver/amd-catalyst-driver.mk line 147

Quoted 12 lines
package/amd-catalyst-driver/amd-catalyst-driver.mk new file +12 -0
+ifeq ($(BR2_PACKAGE_AMD_CATALYST_DRIVER_CMDLINE_TOOLS), y)
+AMD_CATALYST_DRIVER_CMDLINE_TOOLS_FILES = \
+	atiode \
+	atiodcli \
+	fgl_glxgears \
+	aticonfig \
+	amd-console-helper \
+	fglrxinfo
+
+define  AMD_CATALYST_DRIVER_INSTALL_CMDLINE_TOOLS
+	$(INSTALL) -m 0755 $(AMD_CATALYST_DRIVER_ARCH_DIR)/usr/sbin/atieventsd \
+		$(TARGET_DIR)/usr/sbin

Full path to the destination file, please.

Quoted 18 lines
package/amd-catalyst-driver/amd-catalyst-driver.mk new file +16 -0
+	$(foreach f,$(AMD_CATALYST_DRIVER_CMDLINE_TOOLS_FILES), \
+		$(INSTALL) -D -m 0755 $(AMD_CATALYST_DRIVER_ARCH_DIR)/usr/X11R6/bin/$(f) \
+			$(TARGET_DIR)/usr/bin/$(f)
+	)
+endef
+endif
 
+ifeq ($(BR2_PACKAGE_AMD_CATALYST_DRIVER_CCCLE), y)
+define AMD_CATALYST_DRIVER_INSTALL_CCCLE
+	$(INSTALL) -m 0755 $(AMD_CATALYST_DRIVER_ARCH_DIR)/usr/X11R6/bin/amdcccle \
+		$(TARGET_DIR)/usr/bin/amdcccle
+	$(INSTALL) -m 0755 $(AMD_CATALYST_DRIVER_ARCH_DIR)/usr/sbin/amdnotifyui \
+		$(TARGET_DIR)/usr/sbin/amdnotifyui
+endef
+endif
 
+define AMD_CATALYST_DRIVER_INSTALL_STAGING_CMDS
+	$(call AMD_CATALYST_DRIVER_INSTALL_STAGING_XORG)

package/amd-catalyst-driver/amd-catalyst-driver.mk line 175

Quoted 10 lines
package/amd-catalyst-driver/amd-catalyst-driver.mk new file +10 -0
+endef
+
+define AMD_CATALYST_DRIVER_INSTALL_TARGET_CMDS
+	$(call AMD_CATALYST_DRIVER_INSTALL_XORG)
+	$(call AMD_CATALYST_DRIVER_INSTALL_CMDLINE_TOOLS)
+	$(call AMD_CATALYST_DRIVER_INSTALL_CCCLE)
+	$(call AMD_CATALYST_DRIVER_INSTALL_OPENCL)
+endef
+
+$(eval $(generic-package))

OK, I may have missed quite a few things.

Would it be possible that you split this patch in a few patches;

- basic package that just installs the userland stuff (Xorg drivers),
- add the command-line tools
- then the CCCLE GUI,
- the kernel module,
- finally, add OpenCV.

Thanks! :-)

Regards,
Yann E. MORIN.

Quoted 25 lines
package/amd-catalyst-driver/gl.pc new file +12 -0
new file mode 100644
index 0000000..8729271
@@ -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 · 6 lines
2.8.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
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.  |
'------------------------------^-------^------------------^--------------------'
#11 lore raw

PATCH v3 6/6 package/amd-catalyst-driver: Add AMD proprietary graphic stack support

Hello,

Quoted 6 lines · Yann E. MORIN

package/amd-catalyst-driver/Config.in line 6

Quoted 2 lines
package/amd-catalyst-driver/Config.in new file +2 -0
+config BR2_PACKAGE_AMD_CATALYST_DRIVER
+	bool "amd-catalyst-driver"  

Ues, I know we have nvidia-driver. But we also have nvidia-tegra23-binaries and rpi-userland. So maybe we can just call it "amd-catalyst". Thoughts?

Indeed. It also makes all the variable names a bit shorter everywhere in the package, which would be nice.

Quoted 20 lines
Quoted 7 lines
package/amd-catalyst-driver/Config.in new file +7 -0
+	depends on BR2_i386 || BR2_x86_64
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	help
+	  The binary-only driver blob for AMD cards.
+	  This driver supports AMD Radeon HD 5xxx and newer graphics
+	  cards.
+

package/amd-catalyst-driver/Config.in line 23

Quoted 10 lines
package/amd-catalyst-driver/Config.in new file +10 -0
+	  http://www.amd.com/
+
+if BR2_PACKAGE_AMD_CATALYST_DRIVER
+
+comment "amd-catalyst-driver needs a modular Xorg <= 1.17"
+	depends on !BR2_PACKAGE_XORG7 || !BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR || !BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_19
+
+config BR2_PACKAGE_AMD_CATALYST_DRIVER_XORG
+	bool "X.org drivers"
+	default y  

What good is this package if the Xorg drivers are disabled?

Quoted 8 lines

Note that in the NVidia driver, they are optional, becasue they can be used to do just CUDA (GPGPU computing). For the AMD CAtalyst, I did not see that this was possible.

Then, all the "depends on" and "select" done below should be moved to the main symbol.

Unless there is the equivalent to CUDA here...

OpenCL support is independent from the X.org support, i.e you can enable BR2_PACKAGE_AMD_CATALYST_DRIVER_OPENCL without X.org support. So it's pretty much exactly like the NVidia driver: GPGPU support is independent from graphics support.

Quoted 8 lines

package/amd-catalyst-driver/Config.in line 52

Quoted 3 lines
package/amd-catalyst-driver/Config.in new file +3 -0
+config BR2_PACKAGE_AMD_CATALYST_DRIVER_CCCLE
+	bool "Catalyst Control Center"
+	depends on BR2_USE_MMU && BR2_PACKAGE_QT && BR2_PACKAGE_QT_X11  

I think it is better not to mix architectural dependencies and package dependencies. And anyway, the MMU dependency is useless, since the driver depends on i386 || x86_64, that both have an MMU.

Quoted 5 lines

Besides, you can safely select BR2_PACKAGE_QT_X11, since you know Xorh is enabled because you have BR2_PACKAGE_XORG7 above.

depends on BR2_PACKAGE_QT
select BR2_PACKAGE_QT_X11

BR2_PACKAGE_QT_X11 is in a choice, so it cannot be selected. That's the very reason why a "depends on" is used.

Quoted 4 lines

package/amd-catalyst-driver/Config.in line 64

Quoted 2 lines
package/amd-catalyst-driver/Config.in new file +2 -0
+config BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE
+	bool  

Why this blind symbol, when there is only one that selects it?

Both BR2_PACKAGE_AMD_CATALYST_DRIVER_XORG and BR2_PACKAGE_AMD_CATALYST_DRIVER_OPENCL are selecting it.

Quoted 6 lines

Speaking of which... Maybe this patch should have been split in at least two changes:

- one patch to add support for the userland stuff,

- one patch to add support for biulding the kernel module.

I disagree, there is really no point for such a split. Both are part of the same package, and both are needed for the thing to do anything useful.

Quoted 6 lines

package/amd-catalyst-driver/Config.in line 68

Quoted 3 lines
package/amd-catalyst-driver/Config.in new file +3 -0
+config BR2_PACKAGE_AMD_CATALYST_DRIVER_OPENCL
+	bool "OpenCL support"
+	select BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE  

And this symbol would depend on BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE once it has a prompt, instead of selecting it.

Why? This is really pointless. Why would BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE need to have a prompt? The kernel module is needed either when OpenGL/X.org support is enabled or when OpenCL support is enabled. So we simply implicitly select it.

However, what is true is that a dependency on BR2_LINUX_KERNEL is missing from this package, for the features that require building the kernel module.

Quoted 40 lines
Quoted 4 lines
package/amd-catalyst-driver/Config.in new file +4 -0
+config BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE_LICENSE_GPL
+	bool "fglrx module export GPL license"
+	help
+	  If enabled, you accept that the driver will be patched locally

package/amd-catalyst-driver/Config.in line 88

Quoted 10 lines
package/amd-catalyst-driver/Config.in new file +10 -0
+	  in order to export itself as a GPL module to the Linux kernel.
+	  This is required as the module uses some GPL-compatible
+	  symbols. Without this fix, the module won't build properly
+	  because the Linux kernel build system does not allow to link a
+	  non GPL module, if this one tries to use GPL-only symbols. It
+	  is worth mentioning that from a legal point of view, you are
+	  most likely not allowed to redistribute such a kernel module,
+	  in a pre-built form. The author and the buildroot project
+	  disclaim any responsibility in case these terms are not
+	  respected.  

OK, so this one is definitely a NAK from me. This is definitely not acceptable. We can not go like that and just change the licensing
information: this is legally questionable that we even provide such an option, even with the legal blurb you wrote, which is by far not explicit enough either, but I won't comment on it because I argue that this option should jsut go away with the code it protects.

Instead I suggest the following:

config BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE
bool "fglrx kernel module"
depends on BR2_KERNEL_LINUX
depends on whatever is needed
help
The kernel driver will build properly, but fail to work at runtime because it uses Linux kernel symbols exposed only to GPL-licensed modules.

config BR2_PACKAGE_AMD_CATALYST_DRIVER_OPENCL
bool "OpenCL support"
depends on BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE depends on whatever is needed
help
Blabla OpenCL

Quoted 5 lines

Note: the blurb about BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE was suggested by Thomas while fdiscussing the issue with him on IRC.

We should *not* even hint at what should be done to overcome this. This is not a technical issue, so there is no technical fix.

I agree with this, it's probably the best trade-off. I discussed it with Romain prior to the submission of his patches, and we hesitated a bit between various options. I think Yann's suggestion is good, and people who need the kernel driver to actually work can take the responsibility on their side to do whatever is needed.

However, I'm still unsure I want to see the kernel module option having a prompt. But that's more an implementation detail: the Config.in help text that Yann suggested to add can also just as well be added to the top-level option, and the "module" option kept prompt-less.

Quoted 8 lines

package/amd-catalyst-driver/amd-catalyst-driver.mk line 61

Quoted 4 lines
package/amd-catalyst-driver/amd-catalyst-driver.mk new file +4 -0
+define AMD_CATALYST_DRIVER_INSTALL_OPENCL
+	$(foreach f,$(AMD_CATALYST_DRIVER_OPENCL_FILES), \
+		$(INSTALL) -D -m 0755 $(AMD_CATALYST_DRIVER_ARCH_DIR)/$(f) $(TARGET_DIR)/$(f)
+	)  

Although I personally prefer the way you did, we usually close the foreach on the last code line, not on its own line. You have many of them, below, don;t forget to fix those as well.

I agree that's the way we typically do it, but in fact I'm not sure it's the best way. If you keep the closing parenthesis on the last line, you must add $(sep).

Having the closing parenthesis like Romain did:

1/ Avoids the need of $(sep)

2/ Make the all thing clearer and easier to read

So just like you prefer the way Romain did it, I also prefer, so I'd like to keep it as Romain did, and maybe migrate other parts of Buildroot to use this in the future.

Quoted 5 lines

OK, I may have missed quite a few things.

Would it be possible that you split this patch in a few patches;

- basic package that just installs the userland stuff (Xorg drivers),

This basic package doesn't make much sense, as the userland stuff is not functioning with the kernel driver.

Quoted 4 lines

- add the command-line tools
- then the CCCLE GUI,
- the kernel module,
- finally, add OpenCV.

However, I agree that there could be a first patch adding just Xorg+kernel, and follow-up patches for command-line tools, CCCLE and OpenCV.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#12 lore raw

PATCH v3 6/6 package/amd-catalyst-driver: Add AMD proprietary graphic stack support

Thomas, Romain, All,

On 2016-07-27 09:35 +0200, Thomas Petazzoni spake thusly:

Quoted 39 lines · Yann E. MORIN
Quoted 7 lines

package/amd-catalyst-driver/Config.in line 6

Quoted 3 lines
package/amd-catalyst-driver/Config.in new file +2 -0
+config BR2_PACKAGE_AMD_CATALYST_DRIVER
+	bool "amd-catalyst-driver"  

Ues, I know we have nvidia-driver. But we also have nvidia-tegra23-binaries and rpi-userland. So maybe we can just call it "amd-catalyst". Thoughts?

Indeed. It also makes all the variable names a bit shorter everywhere in the package, which would be nice.

Quoted 27 lines
Quoted 7 lines
package/amd-catalyst-driver/Config.in new file +7 -0
+	depends on BR2_i386 || BR2_x86_64
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	help
+	  The binary-only driver blob for AMD cards.
+	  This driver supports AMD Radeon HD 5xxx and newer graphics
+	  cards.
+

package/amd-catalyst-driver/Config.in line 23

Quoted 10 lines
package/amd-catalyst-driver/Config.in new file +10 -0
+	  http://www.amd.com/
+
+if BR2_PACKAGE_AMD_CATALYST_DRIVER
+
+comment "amd-catalyst-driver needs a modular Xorg <= 1.17"
+	depends on !BR2_PACKAGE_XORG7 || !BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR || !BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_19
+
+config BR2_PACKAGE_AMD_CATALYST_DRIVER_XORG
+	bool "X.org drivers"
+	default y  

What good is this package if the Xorg drivers are disabled?

Note that in the NVidia driver, they are optional, becasue they can be used to do just CUDA (GPGPU computing). For the AMD CAtalyst, I did not see that this was possible.

Then, all the "depends on" and "select" done below should be moved to the main symbol.

Quoted 6 lines
Quoted 1 line

Unless there is the equivalent to CUDA here...

OpenCL support is independent from the X.org support, i.e you can enable BR2_PACKAGE_AMD_CATALYST_DRIVER_OPENCL without X.org support. So it's pretty much exactly like the NVidia driver: GPGPU support is independent from graphics support.

OK, makes sense.

Quoted 8 lines
Quoted 8 lines

package/amd-catalyst-driver/Config.in line 52

Quoted 3 lines
package/amd-catalyst-driver/Config.in new file +3 -0
+config BR2_PACKAGE_AMD_CATALYST_DRIVER_CCCLE
+	bool "Catalyst Control Center"
+	depends on BR2_USE_MMU && BR2_PACKAGE_QT && BR2_PACKAGE_QT_X11  

I think it is better not to mix architectural dependencies and package dependencies. And anyway, the MMU dependency is useless, since the driver depends on i386 || x86_64, that both have an MMU.

Quoted 8 lines
Quoted 5 lines

Besides, you can safely select BR2_PACKAGE_QT_X11, since you know Xorh is enabled because you have BR2_PACKAGE_XORG7 above.

depends on BR2_PACKAGE_QT
select BR2_PACKAGE_QT_X11

BR2_PACKAGE_QT_X11 is in a choice, so it cannot be selected. That's the very reason why a "depends on" is used.

Damn, I missed that it was in a choice. Indeed, select is what we must use here.

Quoted 7 lines
Quoted 4 lines

package/amd-catalyst-driver/Config.in line 64

Quoted 2 lines
package/amd-catalyst-driver/Config.in new file +2 -0
+config BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE
+	bool  

Why this blind symbol, when there is only one that selects it?

Both BR2_PACKAGE_AMD_CATALYST_DRIVER_XORG and BR2_PACKAGE_AMD_CATALYST_DRIVER_OPENCL are selecting it.

Yes, I missed it about the Xorg driver.

However, I still wonder why it is a blind option. For example, in nvidia-driver, we have these prompts:

[*] nvidia-driver
[*] X.org drivers
[*] Install private libraries
[*] CUDA support
[*] OpenCL support
[*] CUDA MPS server and control
[*] nvidia kernel module

So, it is possible to not build the kernel driver, if a kernel is built outside of Buildroot.

I would like we have the same possibility for amd-catalyst.

Quoted 10 lines
Quoted 6 lines

Speaking of which... Maybe this patch should have been split in at least two changes:

- one patch to add support for the userland stuff,

- one patch to add support for biulding the kernel module.

I disagree, there is really no point for such a split. Both are part of the same package, and both are needed for the thing to do anything useful.

What if the kernel is built outside of Buildroot? We can't build the kernel module in that case, but we still want to be able to build the userland. So, the split *does* make sense.

Unless of course the buildsystem of this package is so fscked-up that it is not possible to build one but not the other. But it does not seem to be the case, as Romain is using the kernel-module infra to build the kernel module.

And anyway, if that were the case, then this would be missing a dependency on BR2_KERNEL_LINUX.

Quoted 11 lines
Quoted 6 lines

package/amd-catalyst-driver/Config.in line 68

Quoted 3 lines
package/amd-catalyst-driver/Config.in new file +3 -0
+config BR2_PACKAGE_AMD_CATALYST_DRIVER_OPENCL
+	bool "OpenCL support"
+	select BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE  

And this symbol would depend on BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE once it has a prompt, instead of selecting it.

Why? This is really pointless. Why would BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE need to have a prompt? The kernel module is needed either when OpenGL/X.org support is enabled or when OpenCL support is enabled. So we simply implicitly select it.

Again, what about a kernel built outside of Buildroot?

Quoted 3 lines

However, what is true is that a dependency on BR2_LINUX_KERNEL is missing from this package, for the features that require building the kernel module.

Yep. But really, I stand that we should be able to build only the userland stuff, if at least because those do not have the licensing issue the kernel module has.

Quoted 52 lines
Quoted 40 lines
Quoted 4 lines
package/amd-catalyst-driver/Config.in new file +4 -0
+config BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE_LICENSE_GPL
+	bool "fglrx module export GPL license"
+	help
+	  If enabled, you accept that the driver will be patched locally

package/amd-catalyst-driver/Config.in line 88

Quoted 10 lines
package/amd-catalyst-driver/Config.in new file +10 -0
+	  in order to export itself as a GPL module to the Linux kernel.
+	  This is required as the module uses some GPL-compatible
+	  symbols. Without this fix, the module won't build properly
+	  because the Linux kernel build system does not allow to link a
+	  non GPL module, if this one tries to use GPL-only symbols. It
+	  is worth mentioning that from a legal point of view, you are
+	  most likely not allowed to redistribute such a kernel module,
+	  in a pre-built form. The author and the buildroot project
+	  disclaim any responsibility in case these terms are not
+	  respected.  

OK, so this one is definitely a NAK from me. This is definitely not acceptable. We can not go like that and just change the licensing
information: this is legally questionable that we even provide such an option, even with the legal blurb you wrote, which is by far not explicit enough either, but I won't comment on it because I argue that this option should jsut go away with the code it protects.

Instead I suggest the following:

config BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE
bool "fglrx kernel module"
depends on BR2_KERNEL_LINUX
depends on whatever is needed
help
The kernel driver will build properly, but fail to work at runtime because it uses Linux kernel symbols exposed only to GPL-licensed modules.

config BR2_PACKAGE_AMD_CATALYST_DRIVER_OPENCL
bool "OpenCL support"
depends on BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE depends on whatever is needed
help
Blabla OpenCL

Quoted 5 lines

Note: the blurb about BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE was suggested by Thomas while fdiscussing the issue with him on IRC.

We should *not* even hint at what should be done to overcome this. This is not a technical issue, so there is no technical fix.

I agree with this, it's probably the best trade-off. I discussed it with Romain prior to the submission of his patches, and we hesitated a bit between various options. I think Yann's suggestion is good, and people who need the kernel driver to actually work can take the responsibility on their side to do whatever is needed.

Quoted 4 lines

However, I'm still unsure I want to see the kernel module option having a prompt. But that's more an implementation detail: the Config.in help text that Yann suggested to add can also just as well be added to the top-level option, and the "module" option kept prompt-less.

"Kernel built outside of Buildroot". ;-)"

Quoted 15 lines
Quoted 8 lines

package/amd-catalyst-driver/amd-catalyst-driver.mk line 61

Quoted 4 lines
package/amd-catalyst-driver/amd-catalyst-driver.mk new file +4 -0
+define AMD_CATALYST_DRIVER_INSTALL_OPENCL
+	$(foreach f,$(AMD_CATALYST_DRIVER_OPENCL_FILES), \
+		$(INSTALL) -D -m 0755 $(AMD_CATALYST_DRIVER_ARCH_DIR)/$(f) $(TARGET_DIR)/$(f)
+	)  

Although I personally prefer the way you did, we usually close the foreach on the last code line, not on its own line. You have many of them, below, don;t forget to fix those as well.

I agree that's the way we typically do it, but in fact I'm not sure it's the best way. If you keep the closing parenthesis on the last line, you must add $(sep).

Having the closing parenthesis like Romain did:

Quoted 7 lines

1/ Avoids the need of $(sep)

2/ Make the all thing clearer and easier to read

So just like you prefer the way Romain did it, I also prefer, so I'd like to keep it as Romain did, and maybe migrate other parts of Buildroot to use this in the future.

Perfectly fine with me.

Quoted 8 lines
Quoted 5 lines

OK, I may have missed quite a few things.

Would it be possible that you split this patch in a few patches;

- basic package that just installs the userland stuff (Xorg drivers),

This basic package doesn't make much sense, as the userland stuff is not functioning with the kernel driver.

Err... No, I won't state it again! ;-)

Quoted 4 lines
Quoted 4 lines

- add the command-line tools
- then the CCCLE GUI,
- the kernel module,
- finally, add OpenCV.

SO I still think the split makes sense (at least semantically; it may be a single patch if the build is easier to do, of course).

Quoted 3 lines

However, I agree that there could be a first patch adding just Xorg+kernel, and follow-up patches for command-line tools, CCCLE and OpenCV.

ACK.

Regards,
Yann E. MORIN.

Quoted 7 lines

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
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.  |
'------------------------------^-------^------------------^--------------------'
#13 lore raw

PATCH v3 6/6 package/amd-catalyst-driver: Add AMD proprietary graphic stack support

Hello,

Quoted 3 lines · Yann E. MORIN

What if the kernel is built outside of Buildroot? We can't build the kernel module in that case, but we still want to be able to build the userland. So, the split *does* make sense.

Yes, it does, you are completely right. Romain is reworking the patch series to take this aspect into account. I originally asked him to make the kernel module option a blind one, but I forgot about the use case of "I build my kernel outside of Buildroot", which is a perfectly valid use case.

Thanks for your feedback!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#14 lore raw

PATCH v3 6/6 package/amd-catalyst-driver: Add AMD proprietary graphic stack support

In reply to Yann E. MORIN

Hello,

Le 26/07/2016 22:39, Yann E. MORIN a ?crit :

Quoted 28 lines
Quoted 8 lines
package/amd-catalyst-driver/Config.in new file +8 -0
+	help
+	  Installs the OpenCL binary blobs and the ICD profile
+	  for GPGPU computing.
+
+config BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE_LICENSE_GPL
+	bool "fglrx module export GPL license"
+	help
+	  If enabled, you accept that the driver will be patched locally

package/amd-catalyst-driver/Config.in line 88

Quoted 10 lines
package/amd-catalyst-driver/Config.in new file +10 -0
+	  in order to export itself as a GPL module to the Linux kernel.
+	  This is required as the module uses some GPL-compatible
+	  symbols. Without this fix, the module won't build properly
+	  because the Linux kernel build system does not allow to link a
+	  non GPL module, if this one tries to use GPL-only symbols. It
+	  is worth mentioning that from a legal point of view, you are
+	  most likely not allowed to redistribute such a kernel module,
+	  in a pre-built form. The author and the buildroot project
+	  disclaim any responsibility in case these terms are not
+	  respected.

OK, so this one is definitely a NAK from me. This is definitely not acceptable. We can not go like that and just change the licensing
information: this is legally questionable that we even provide such an option, even with the legal blurb you wrote, which is by far not explicit enough either, but I won't comment on it because I argue that this option should jsut go away with the code it protects.

Instead I suggest the following:

Quoted 8 lines

config BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE
bool "fglrx kernel module"
depends on BR2_KERNEL_LINUX
depends on whatever is needed
help
The kernel driver will build properly, but fail to work at runtime because it uses Linux kernel symbols exposed only to GPL-licensed modules.

The problem is that without this local fix, the module *does not* build. Because the link phase does not pass. This is why I proposed something like that. So, either you merge a package containing a module which won't build or you ask the user to patch manually his kernel...

Romain,

Signature · 3 lines
Romain Perier, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#15 lore raw

PATCH v3 6/6 package/amd-catalyst-driver: Add AMD proprietary graphic stack support

Romain, All,

On 2016-07-27 10:15 +0200, Romain Perier spake thusly:

Quoted 39 lines

Le 26/07/2016 22:39, Yann E. MORIN a ?crit :

Quoted 28 lines
Quoted 8 lines
package/amd-catalyst-driver/Config.in new file +8 -0
+	help
+	  Installs the OpenCL binary blobs and the ICD profile
+	  for GPGPU computing.
+
+config BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE_LICENSE_GPL
+	bool "fglrx module export GPL license"
+	help
+	  If enabled, you accept that the driver will be patched locally

package/amd-catalyst-driver/Config.in line 88

Quoted 10 lines
package/amd-catalyst-driver/Config.in new file +10 -0
+	  in order to export itself as a GPL module to the Linux kernel.
+	  This is required as the module uses some GPL-compatible
+	  symbols. Without this fix, the module won't build properly
+	  because the Linux kernel build system does not allow to link a
+	  non GPL module, if this one tries to use GPL-only symbols. It
+	  is worth mentioning that from a legal point of view, you are
+	  most likely not allowed to redistribute such a kernel module,
+	  in a pre-built form. The author and the buildroot project
+	  disclaim any responsibility in case these terms are not
+	  respected.

OK, so this one is definitely a NAK from me. This is definitely not acceptable. We can not go like that and just change the licensing
information: this is legally questionable that we even provide such an option, even with the legal blurb you wrote, which is by far not explicit enough either, but I won't comment on it because I argue that this option should jsut go away with the code it protects.

Instead I suggest the following:

Quoted 8 lines

config BR2_PACKAGE_AMD_CATALYST_DRIVER_MODULE
bool "fglrx kernel module"
depends on BR2_KERNEL_LINUX
depends on whatever is needed
help
The kernel driver will build properly, but fail to work at runtime because it uses Linux kernel symbols exposed only to GPL-licensed modules.

Quoted 1 line

The problem is that without this local fix, the module *does not* build.

Whether the failure is at runtime or build-time is irrelevant to me. We *cannot* change the licensing info. That is just *not* acceptable.

If a user wants to workaround the licensing issue, that is his own prerogative, but we should *not* provide such a mean. We should not even hint at the mean.

Quoted 2 lines

Because the link phase does not pass. This is why I proposed something like that.

Yes, I do understand your motivation. This is not a technical issue, so we can not fix it with a technical solution. :-/

Quoted 2 lines

So, either you merge a package containing a module which won't build or you ask the user to patch manually his kernel...

And this is exactly what we should not even mention, IMHO.

So, my deepest opinion is that we should *not* have that package at all, given that it can't build/run.

However, as Thomas said and as you will have experienced, this is not something that is easy to package, and some people need it. We can at least provide the recipe to build it; this is obviously not the best solution, as it won't work out-of-the-box.

Yes, we will provide a package that cannot build and, even if it would, would not run. No, we can't do anything about it. No, we should *not* try to do anything about it.

Regards,
Yann E. MORIN.

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.  |
'------------------------------^-------^------------------^--------------------'
#16 lore raw

PATCH v3 6/6 package/amd-catalyst-driver: Add AMD proprietary graphic stack support

Hello,

Quoted 8 lines · Yann E. MORIN
Quoted 2 lines

So, either you merge a package containing a module which won't build or you ask the user to patch manually his kernel...

And this is exactly what we should not even mention, IMHO.

So, my deepest opinion is that we should *not* have that package at all, given that it can't build/run.

Quoted 8 lines

However, as Thomas said and as you will have experienced, this is not something that is easy to package, and some people need it. We can at least provide the recipe to build it; this is obviously not the best solution, as it won't work out-of-the-box.

Yes, we will provide a package that cannot build and, even if it would, would not run. No, we can't do anything about it. No, we should *not* try to do anything about it.

I discussed it with Romain today and here is my proposal: we simply don't do anything to try to fix this problem. It is up to the user to figure out what is the most acceptable solution (if any).

This way, the most complicated packaging part is in Buildroot upstream, which makes 99% of the work simpler for our users, they "simply" have to deal with this licensing oddity.

We can simply add a warning in the Config.in help text of the package that it may not build due to the proprietary kernel module using kernel symbols not exposed to proprietary modules.

How does that sound?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#17 lore raw

PATCH v3 6/6 package/amd-catalyst-driver: Add AMD proprietary graphic stack support

Thomas, Romain, All,

On 2016-07-27 21:36 +0200, Thomas Petazzoni spake thusly:

Quoted 15 lines · Yann E. MORIN
Quoted 14 lines
Quoted 3 lines

So, either you merge a package containing a module which won't build or you ask the user to patch manually his kernel...

And this is exactly what we should not even mention, IMHO.

So, my deepest opinion is that we should *not* have that package at all, given that it can't build/run.

However, as Thomas said and as you will have experienced, this is not something that is easy to package, and some people need it. We can at least provide the recipe to build it; this is obviously not the best solution, as it won't work out-of-the-box.

Quoted 7 lines
Quoted 3 lines

Yes, we will provide a package that cannot build and, even if it would, would not run. No, we can't do anything about it. No, we should *not* try to do anything about it.

I discussed it with Romain today and here is my proposal: we simply don't do anything to try to fix this problem. It is up to the user to figure out what is the most acceptable solution (if any).

Agreed.

Quoted 3 lines

This way, the most complicated packaging part is in Buildroot upstream, which makes 99% of the work simpler for our users, they "simply" have to deal with this licensing oddity.

Agreed.

Quoted 3 lines

We can simply add a warning in the Config.in help text of the package that it may not build due to the proprietary kernel module using kernel symbols not exposed to proprietary modules.

Agreed.

Quoted 1 line

How does that sound?

I thought I was explicit in my inital review (where I suggested your own blurb for the help text), and in my subsequent reply (where I said "Yes, we will provide a package that cannot build").

To clarify: I am OK with the proposal to add the package with a help text that explains (briefly) why "the package may not build or run", but that does not offer any hint as to how this can be circumvented.

(I was a bit busy tonight, so I could not reply to your other comments about my review; I'll do so tomorrow or during the WE.)

Regards,
Yann E. MORIN.

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.  |
'------------------------------^-------^------------------^--------------------'
#18 lore raw

v3 cover Add support for AMD Catalyst graphics driver

In reply to Romain Perier

Hello,

Quoted 2 lines · Romain Perier

package/xserver_xorg-server: add version 1.17.4
qt: Add option for enabling the accessibility support

Those patches have already been applied in master, so I'm surprised to still see them in your v3. Is your v3 really based on master?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com