Skip to contentSkip to conversation

sunxi-mali-driver-mainline: new package

PATCH New Giulio Benetti 3 participants 7 messages Nov 21, 2017 – Nov 25, 2017 Arm/Allwinner sunXi SoC support

lore
Share & tools
lore
#0 lore raw

PATCH v5 1/1 sunxi-mali-driver-mainline: new package

Added kernel allwinner mali driver package. Used combined with userspace Allwinner openGL blob, it gives possibility to use 3D openGL SoC acceleration.

---
Changes v4 -> v5:
* prevent build twice

 DEVELOPERS                                         |  3 +++
 package/Config.in                                  |  1 +
 package/sunxi-mali-driver-mainline/Config.in       | 22 ++++++++++++++++++
 .../sunxi-mali-driver-mainline.mk                  | 26 ++++++++++++++++++++++
 4 files changed, 52 insertions(+)
 create mode 100644 package/sunxi-mali-driver-mainline/Config.in
 create mode 100644 package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk
DEVELOPERS +3 -0
index bb81a19..3fdb28b 100644
@@ -695,6 +695,9 @@ F:	package/ocrad/
 F:	package/tesseract-ocr/
 F:	package/webp/
 
+N:	Giulio Benetti <[email protected]>
+F:	package/sunxi-mali-driver-mainline/
+
 N:	Gregory Dymarek <[email protected]>
 F:	package/ding-libs/
 F:	package/gengetopt/
package/Config.in +1 -0
index fe5ccc4..8de2227 100644
@@ -496,6 +496,7 @@ endmenu
 	source "package/statserial/Config.in"
 	source "package/stm32flash/Config.in"
 	source "package/sunxi-cedarx/Config.in"
+	source "package/sunxi-mali-driver-mainline/Config.in"
 	source "package/sunxi-mali/Config.in"
 	source "package/sysstat/Config.in"
 	source "package/targetcli-fb/Config.in"
package/sunxi-mali-driver-mainline/Config.in new file +22 -0
new file mode 100644
index 0000000..5b7b2ba
@@ -0,0 +1,22 @@
+comment "sunxi-mali-driver-mainline needs a Linux kernel to be built"
+	depends on !BR2_LINUX_KERNEL
+
+config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE
+	bool "sunxi-mali-driver-mainline"
+	depends on BR2_LINUX_KERNEL
+	select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra
+	help
+	  This package builds and installs the Linux kernel driver for
+	  the Mali GPU on Allwinner platforms, compatible with recent
+	  Linux kernels (>= 4.4). Note that it should be installed
+	  together with the corresponding userspace binary blobs to
+	  provide complete OpenGL functionality.
+
+	  sunxi-mali-driver-mainline requires a Linux kernel >= 4.4 with the
+	  following options enabled:
+
+	  - CONFIG_CMA
+	  - CONFIG_DMA_CMA
+	  - CONFIG_DRM_FBDEV_OVERALLOC >= 200 for double buffer or more
+
+	  https://github.com/mripard/sunxi-mali/blob/master/README.md
package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk new file +26 -0
new file mode 100644
index 0000000..1692646
@@ -0,0 +1,26 @@
+################################################################################
+#
+# sunxi-mali-driver-mainline
+#
+################################################################################
+
+SUNXI_MALI_DRIVER_MAINLINE_VERSION = 5b7b3c0b6e1736676c90928816d271debbb09d95
+SUNXI_MALI_DRIVER_MAINLINE_SITE = $(call github,mripard,sunxi-mali,$(SUNXI_MALI_DRIVER_MAINLINE_VERSION))
+SUNXI_MALI_DRIVER_MAINLINE_DEPENDENCIES = linux
+
+SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS = \
+	KDIR=$(LINUX_DIR) \
+	CROSS_COMPILE=$(TARGET_CROSS) \
+	INSTALL_MOD_PATH=$(TARGET_DIR)
+
+define SUNXI_MALI_DRIVER_MAINLINE_BUILD_CMDS
+	cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \
+		$(SHELL) ./build.sh -r r6p2 -a
+endef
+
+define SUNXI_MALI_DRIVER_MAINLINE_INSTALL_TARGET_CMDS
+	cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \
+		$(SHELL) ./build.sh -r r6p2 -i
+endef
+
+$(eval $(generic-package))
Signature · 1 line
2.7.4
#1 lore raw

PATCH v5 1/1 sunxi-mali-driver-mainline: new package

Quoted 86 lines · Giulio Benetti

Added kernel allwinner mali driver package. Used combined with userspace Allwinner openGL blob, it gives possibility to use 3D openGL SoC acceleration.

---
Changes v4 -> v5:
* prevent build twice

 DEVELOPERS                                         |  3 +++
 package/Config.in                                  |  1 +
 package/sunxi-mali-driver-mainline/Config.in       | 22 ++++++++++++++++++
 .../sunxi-mali-driver-mainline.mk                  | 26 ++++++++++++++++++++++
 4 files changed, 52 insertions(+)
 create mode 100644 package/sunxi-mali-driver-mainline/Config.in
 create mode 100644 package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk
DEVELOPERS +3 -0
index bb81a19..3fdb28b 100644
@@ -695,6 +695,9 @@ F:	package/ocrad/
 F:	package/tesseract-ocr/
 F:	package/webp/
 
+N:	Giulio Benetti <[email protected]>
+F:	package/sunxi-mali-driver-mainline/
+
 N:	Gregory Dymarek <[email protected]>
 F:	package/ding-libs/
 F:	package/gengetopt/
package/Config.in +1 -0
index fe5ccc4..8de2227 100644
@@ -496,6 +496,7 @@ endmenu
 	source "package/statserial/Config.in"
 	source "package/stm32flash/Config.in"
 	source "package/sunxi-cedarx/Config.in"
+	source "package/sunxi-mali-driver-mainline/Config.in"
 	source "package/sunxi-mali/Config.in"
 	source "package/sysstat/Config.in"
 	source "package/targetcli-fb/Config.in"
package/sunxi-mali-driver-mainline/Config.in new file +22 -0
new file mode 100644
index 0000000..5b7b2ba
@@ -0,0 +1,22 @@
+comment "sunxi-mali-driver-mainline needs a Linux kernel to be built"
+	depends on !BR2_LINUX_KERNEL
+
+config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE
+	bool "sunxi-mali-driver-mainline"
+	depends on BR2_LINUX_KERNEL
+	select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra
+	help
+	  This package builds and installs the Linux kernel driver for
+	  the Mali GPU on Allwinner platforms, compatible with recent
+	  Linux kernels (>= 4.4). Note that it should be installed
+	  together with the corresponding userspace binary blobs to
+	  provide complete OpenGL functionality.
+
+	  sunxi-mali-driver-mainline requires a Linux kernel >= 4.4 with the
+	  following options enabled:
+
+	  - CONFIG_CMA
+	  - CONFIG_DMA_CMA
+	  - CONFIG_DRM_FBDEV_OVERALLOC >= 200 for double buffer or more
+
+	  https://github.com/mripard/sunxi-mali/blob/master/README.md
package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk new file +9 -0
new file mode 100644
index 0000000..1692646
@@ -0,0 +1,26 @@
+################################################################################
+#
+# sunxi-mali-driver-mainline
+#
+################################################################################
+
+SUNXI_MALI_DRIVER_MAINLINE_VERSION = 5b7b3c0b6e1736676c90928816d271debbb09d95
+SUNXI_MALI_DRIVER_MAINLINE_SITE = $(call github,mripard,sunxi-mali,$(SUNXI_MALI_DRIVER_MAINLINE_VERSION))
+SUNXI_MALI_DRIVER_MAINLINE_DEPENDENCIES = linux

package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk line 19

Quoted 10 lines
package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk new file +10 -0
+
+SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS = \
+	KDIR=$(LINUX_DIR) \
+	CROSS_COMPILE=$(TARGET_CROSS) \
+	INSTALL_MOD_PATH=$(TARGET_DIR)
+
+define SUNXI_MALI_DRIVER_MAINLINE_BUILD_CMDS
+	cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \
+		$(SHELL) ./build.sh -r r6p2 -a
+endef

This doesn't build anything, this will just apply the patches, you should use -b.

Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20171125/21ffe270/attachment.asc>
#2 lore raw

PATCH v5 1/1 sunxi-mali-driver-mainline: new package

Hi Maxime,

Il 25/11/2017 16:50, Maxime Ripard ha scritto:

Quoted 92 lines · Giulio Benetti
Quoted 91 lines

Added kernel allwinner mali driver package. Used combined with userspace Allwinner openGL blob, it gives possibility to use 3D openGL SoC acceleration.

---
Changes v4 -> v5:
* prevent build twice

  DEVELOPERS                                         |  3 +++
  package/Config.in                                  |  1 +
  package/sunxi-mali-driver-mainline/Config.in       | 22 ++++++++++++++++++
  .../sunxi-mali-driver-mainline.mk                  | 26 ++++++++++++++++++++++
  4 files changed, 52 insertions(+)

create mode 100644 package/sunxi-mali-driver-mainline/Config.in create mode 100644 package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk

DEVELOPERS +3 -0
index bb81a19..3fdb28b 100644
@@ -695,6 +695,9 @@ F:	package/ocrad/
  F:	package/tesseract-ocr/
  F:	package/webp/
 
+N:	Giulio Benetti <[email protected]>
+F:	package/sunxi-mali-driver-mainline/
+
  N:	Gregory Dymarek <[email protected]>
  F:	package/ding-libs/
  F:	package/gengetopt/
package/Config.in +1 -0
index fe5ccc4..8de2227 100644
@@ -496,6 +496,7 @@ endmenu
  	source "package/statserial/Config.in"
  	source "package/stm32flash/Config.in"
  	source "package/sunxi-cedarx/Config.in"
+	source "package/sunxi-mali-driver-mainline/Config.in"
  	source "package/sunxi-mali/Config.in"
  	source "package/sysstat/Config.in"
  	source "package/targetcli-fb/Config.in"
package/sunxi-mali-driver-mainline/Config.in new file +22 -0
new file mode 100644
index 0000000..5b7b2ba
@@ -0,0 +1,22 @@
+comment "sunxi-mali-driver-mainline needs a Linux kernel to be built"
+	depends on !BR2_LINUX_KERNEL
+
+config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE
+	bool "sunxi-mali-driver-mainline"
+	depends on BR2_LINUX_KERNEL
+	select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra
+	help
+	  This package builds and installs the Linux kernel driver for
+	  the Mali GPU on Allwinner platforms, compatible with recent
+	  Linux kernels (>= 4.4). Note that it should be installed
+	  together with the corresponding userspace binary blobs to
+	  provide complete OpenGL functionality.
+
+	  sunxi-mali-driver-mainline requires a Linux kernel >= 4.4 with the
+	  following options enabled:
+
+	  - CONFIG_CMA
+	  - CONFIG_DMA_CMA
+	  - CONFIG_DRM_FBDEV_OVERALLOC >= 200 for double buffer or more
+
+	  https://github.com/mripard/sunxi-mali/blob/master/README.md
package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk new file +14 -0
new file mode 100644
index 0000000..1692646
@@ -0,0 +1,26 @@
+################################################################################
+#
+# sunxi-mali-driver-mainline
+#
+################################################################################
+
+SUNXI_MALI_DRIVER_MAINLINE_VERSION = 5b7b3c0b6e1736676c90928816d271debbb09d95
+SUNXI_MALI_DRIVER_MAINLINE_SITE = $(call github,mripard,sunxi-mali,$(SUNXI_MALI_DRIVER_MAINLINE_VERSION))
+SUNXI_MALI_DRIVER_MAINLINE_DEPENDENCIES = linux
+
+SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS = \
+	KDIR=$(LINUX_DIR) \
+	CROSS_COMPILE=$(TARGET_CROSS) \
+	INSTALL_MOD_PATH=$(TARGET_DIR)
Quoted 8 lines

package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk line 19

Quoted 5 lines
package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk new file +5 -0
+
+define SUNXI_MALI_DRIVER_MAINLINE_BUILD_CMDS
+	cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \
+		$(SHELL) ./build.sh -r r6p2 -a
+endef

This doesn't build anything, this will just apply the patches, you should use -b.

You're right, I've tried it as a workaround to avoid compiling twice. But it's not here the problem.
I've just sent you a PR on github:
https://github.com/mripard/sunxi-mali/pull/6
This will fix the problem.

On "[PATCH v4 1/1] sunxi-mali-driver-mainline: new package" I did it right:
+define SUNXI_MALI_DRIVER_MAINLINE_BUILD_CMDS
+ cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \
+ $(SHELL) ./build.sh -r r6p2 -b
+endef
+
+define SUNXI_MALI_DRIVER_MAINLINE_INSTALL_TARGET_CMDS
+ cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \
+ $(SHELL) ./build.sh -r r6p2 -i
+endef

So v5 patch doesn't make sense if you accept my Pull Request on Github. How can I proceed?
Do I submit v6 equal to v4 with changes respect v5?

Thank you
Regards

Quoted 3 lines

Maxime

Signature · 11 lines
Giulio Benetti
R&D Manager &
Advanced Research

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale ? 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642
#3 lore raw

PATCH v5 1/1 sunxi-mali-driver-mainline: new package

In reply to Giulio Benetti

Hi Giulio,

Quoted 3 lines · Giulio Benetti

Added kernel allwinner mali driver package. Used combined with userspace Allwinner openGL blob, it gives possibility to use 3D openGL SoC acceleration.

I should have asked before, but: where do those binaries come from? Are they
from the mali-sunxi package? Or not yet packaged in Buildroot?

[snip]

package/Config.in endmenu · line 500

Quoted 9 lines

index fe5ccc4..8de2227 100644

package/Config.in +1 -0
@@ -496,6 +496,7 @@ endmenu
 	source "package/statserial/Config.in"
 	source "package/stm32flash/Config.in"
 	source "package/sunxi-cedarx/Config.in"
+	source "package/sunxi-mali-driver-mainline/Config.in"
 	source "package/sunxi-mali/Config.in"

foo-bar sorts after foo, so swap these two lines.

Quoted 10 lines
package/Config.in +0 -0
 	source "package/sysstat/Config.in"
 	source "package/targetcli-fb/Config.in"
package/sunxi-mali-driver-mainline/Config.in new file +2 -0
new file mode 100644
index 0000000..5b7b2ba
@@ -0,0 +1,22 @@
+comment "sunxi-mali-driver-mainline needs a Linux kernel to be built"
+	depends on !BR2_LINUX_KERNEL

package/sunxi-mali-driver-mainline/Config.in line 12

Quoted 10 lines
package/sunxi-mali-driver-mainline/Config.in new file +10 -0
+
+config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE
+	bool "sunxi-mali-driver-mainline"
+	depends on BR2_LINUX_KERNEL
+	select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra
+	help
+	  This package builds and installs the Linux kernel driver for
+	  the Mali GPU on Allwinner platforms, compatible with recent
+	  Linux kernels (>= 4.4). Note that it should be installed
+	  together with the corresponding userspace binary blobs to

I guess with 'binary blobs' you mean the OpenGL libraries, which are only
provided as binaries? 'binary blobs' to me sounds like something like firmware
blobs: is put in your rootfs but doesn't run on the target processor. So I'd rephrase as: ... together with the corresponding userspace OpenGL libraries, which are provided as binaries only.

And preferably also explain where you can get those.

Quoted 24 lines
package/sunxi-mali-driver-mainline/Config.in new file +10 -0
+	  provide complete OpenGL functionality.
+
+	  sunxi-mali-driver-mainline requires a Linux kernel >= 4.4 with the
+	  following options enabled:
+
+	  - CONFIG_CMA
+	  - CONFIG_DMA_CMA
+	  - CONFIG_DRM_FBDEV_OVERALLOC >= 200 for double buffer or more
+
+	  https://github.com/mripard/sunxi-mali/blob/master/README.md
package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk new file +8 -0
new file mode 100644
index 0000000..1692646
@@ -0,0 +1,26 @@
+################################################################################
+#
+# sunxi-mali-driver-mainline
+#
+################################################################################
+
+SUNXI_MALI_DRIVER_MAINLINE_VERSION = 5b7b3c0b6e1736676c90928816d271debbb09d95
+SUNXI_MALI_DRIVER_MAINLINE_SITE = $(call github,mripard,sunxi-mali,$(SUNXI_MALI_DRIVER_MAINLINE_VERSION))

package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk line 18

Quoted 10 lines
package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk new file +10 -0
+SUNXI_MALI_DRIVER_MAINLINE_DEPENDENCIES = linux
+
+SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS = \
+	KDIR=$(LINUX_DIR) \
+	CROSS_COMPILE=$(TARGET_CROSS) \
+	INSTALL_MOD_PATH=$(TARGET_DIR)
+
+define SUNXI_MALI_DRIVER_MAINLINE_BUILD_CMDS
+	cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \
+		$(SHELL) ./build.sh -r r6p2 -a

Shouldn't the r6p2 be configurable? That can be done in a later patch, though.

Regards,
Arnout

Quoted 9 lines
package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk new file +8 -0
+endef
+
+define SUNXI_MALI_DRIVER_MAINLINE_INSTALL_TARGET_CMDS
+	cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \
+		$(SHELL) ./build.sh -r r6p2 -i
+endef
+
+$(eval $(generic-package))
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#4 lore raw

PATCH v5 1/1 sunxi-mali-driver-mainline: new package

Hi Arnout,

Il 25/11/2017 18:59, Arnout Vandecappelle ha scritto:

Quoted 9 lines

Hi Giulio,

Quoted 3 lines · Giulio Benetti

Added kernel allwinner mali driver package. Used combined with userspace Allwinner openGL blob, it gives possibility to use 3D openGL SoC acceleration.

I should have asked before, but: where do those binaries come from? Are they
from the mali-sunxi package? Or not yet packaged in Buildroot?

It will be combined with sunxi-mali-mainline,
I've submitted a patch still pending:
[PATCH v4 1/1] sunxi-mali-mainline: new package
http://buildroot-busybox.2317881.n4.nabble.com/PATCH-v4-1-1-sunxi-mali-mainline-new-package-td180182.html

Quoted 14 lines

[snip]

package/Config.in endmenu · line 500

Quoted 9 lines

index fe5ccc4..8de2227 100644

package/Config.in +1 -0
@@ -496,6 +496,7 @@ endmenu
  	source "package/statserial/Config.in"
  	source "package/stm32flash/Config.in"
  	source "package/sunxi-cedarx/Config.in"
+	source "package/sunxi-mali-driver-mainline/Config.in"
  	source "package/sunxi-mali/Config.in"

foo-bar sorts after foo, so swap these two lines.

Ok, on next patch I will correct it

Quoted 19 lines
Quoted 19 lines
package/Config.in +0 -0
  	source "package/sysstat/Config.in"
  	source "package/targetcli-fb/Config.in"
package/sunxi-mali-driver-mainline/Config.in new file +10 -0
new file mode 100644
index 0000000..5b7b2ba
@@ -0,0 +1,22 @@
+comment "sunxi-mali-driver-mainline needs a Linux kernel to be built"
+	depends on !BR2_LINUX_KERNEL
+
+config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE
+	bool "sunxi-mali-driver-mainline"
+	depends on BR2_LINUX_KERNEL
+	select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra
+	help
+	  This package builds and installs the Linux kernel driver for
+	  the Mali GPU on Allwinner platforms, compatible with recent
Quoted 8 lines

package/sunxi-mali-driver-mainline/Config.in line 12

Quoted 2 lines
package/sunxi-mali-driver-mainline/Config.in new file +2 -0
+	  Linux kernels (>= 4.4). Note that it should be installed
+	  together with the corresponding userspace binary blobs to

I guess with 'binary blobs' you mean the OpenGL libraries, which are only
provided as binaries? 'binary blobs' to me sounds like something like firmware
blobs: is put in your rootfs but doesn't run on the target processor. So I'd rephrase as: ... together with the corresponding userspace OpenGL libraries, which are provided as binaries only.

Ok

Quoted 2 lines

And preferably also explain where you can get those.

Ok, I will add github sunxi-mali by mripard

Quoted 29 lines
Quoted 29 lines
package/sunxi-mali-driver-mainline/Config.in new file +10 -0
+	  provide complete OpenGL functionality.
+
+	  sunxi-mali-driver-mainline requires a Linux kernel >= 4.4 with the
+	  following options enabled:
+
+	  - CONFIG_CMA
+	  - CONFIG_DMA_CMA
+	  - CONFIG_DRM_FBDEV_OVERALLOC >= 200 for double buffer or more
+
+	  https://github.com/mripard/sunxi-mali/blob/master/README.md
package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk new file +12 -0
new file mode 100644
index 0000000..1692646
@@ -0,0 +1,26 @@
+################################################################################
+#
+# sunxi-mali-driver-mainline
+#
+################################################################################
+
+SUNXI_MALI_DRIVER_MAINLINE_VERSION = 5b7b3c0b6e1736676c90928816d271debbb09d95
+SUNXI_MALI_DRIVER_MAINLINE_SITE = $(call github,mripard,sunxi-mali,$(SUNXI_MALI_DRIVER_MAINLINE_VERSION))
+SUNXI_MALI_DRIVER_MAINLINE_DEPENDENCIES = linux
+
+SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS = \
+	KDIR=$(LINUX_DIR) \
Quoted 8 lines

package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk line 18

Quoted 6 lines
package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk new file +6 -0
+	CROSS_COMPILE=$(TARGET_CROSS) \
+	INSTALL_MOD_PATH=$(TARGET_DIR)
+
+define SUNXI_MALI_DRIVER_MAINLINE_BUILD_CMDS
+	cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \
+		$(SHELL) ./build.sh -r r6p2 -a

Shouldn't the r6p2 be configurable? That can be done in a later patch, though.

You're right, but at this time there's only r6p2 available. Anyway I can add it parametric, so it will be ready for any next versions.

Quoted 14 lines

Regards,
Arnout

Quoted 9 lines
package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk new file +8 -0
+endef
+
+define SUNXI_MALI_DRIVER_MAINLINE_INSTALL_TARGET_CMDS
+	cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \
+		$(SHELL) ./build.sh -r r6p2 -i
+endef
+
+$(eval $(generic-package))
Signature · 11 lines
Giulio Benetti
R&D Manager &
Advanced Research

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale ? 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642
#5 lore raw

PATCH v5 1/1 sunxi-mali-driver-mainline: new package

Hello Everybody,

I was thinking about doing a unique patchset for:
sunxi-mali-driver-mainline
and
sunxi-mali-mainline

They're very connected each other. What do you think?

Il 25/11/2017 21:33, Giulio Benetti ha scritto:

Quoted 142 lines

Hi Arnout,

Il 25/11/2017 18:59, Arnout Vandecappelle ha scritto:

Quoted 10 lines

? Hi Giulio,

Quoted 3 lines · Giulio Benetti

Added kernel allwinner mali driver package. Used combined with userspace Allwinner openGL blob, it gives possibility to use 3D openGL SoC acceleration.

? I should have asked before, but: where do those binaries come from? Are they
from the mali-sunxi package? Or not yet packaged in Buildroot?

It will be combined with sunxi-mali-mainline,
I've submitted a patch still pending:
[PATCH v4 1/1] sunxi-mali-mainline: new package
http://buildroot-busybox.2317881.n4.nabble.com/PATCH-v4-1-1-sunxi-mali-mainline-new-package-td180182.html

Quoted 14 lines

[snip]

Quoted 9 lines

index fe5ccc4..8de2227 100644

package/Config.in +0 -0
@@ -496,6 +496,7 @@ endmenu

????? source "package/statserial/Config.in"
????? source "package/stm32flash/Config.in"
????? source "package/sunxi-cedarx/Config.in" +??? source "package/sunxi-mali-driver-mainline/Config.in" ????? source "package/sunxi-mali/Config.in"

? foo-bar sorts after foo, so swap these two lines.

Ok, on next patch I will correct it

Quoted 24 lines
Quoted 12 lines

????? source "package/sysstat/Config.in"
????? source "package/targetcli-fb/Config.in"

package/sunxi-mali-driver-mainline/Config.in new file +2 -0
new file mode 100644
index 0000000..5b7b2ba
@@ -0,0 +1,22 @@
+comment "sunxi-mali-driver-mainline needs a Linux kernel to be built"
+??? depends on !BR2_LINUX_KERNEL

package/sunxi-mali-driver-mainline/Config.in line 12

Quoted 10 lines
package/sunxi-mali-driver-mainline/Config.in new file +10 -0
+
+config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE
+??? bool "sunxi-mali-driver-mainline"
+??? depends on BR2_LINUX_KERNEL
+??? select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra
+??? help
+????? This package builds and installs the Linux kernel driver for
+????? the Mali GPU on Allwinner platforms, compatible with recent
+????? Linux kernels (>= 4.4). Note that it should be installed
+????? together with the corresponding userspace binary blobs to

? I guess with 'binary blobs' you mean the OpenGL libraries, which are

Quoted 8 lines

only
provided as binaries? 'binary blobs' to me sounds like something like firmware
blobs: is put in your rootfs but doesn't run on the target processor. So I'd
rephrase as: ... together with the corresponding userspace OpenGL libraries,
which are provided as binaries only.

Ok

Quoted 2 lines

? And preferably also explain where you can get those.

Ok, I will add github sunxi-mali by mripard

Quoted 37 lines
Quoted 37 lines
package/sunxi-mali-driver-mainline/Config.in new file +3 -0
+????? provide complete OpenGL functionality.
+
+????? sunxi-mali-driver-mainline requires a Linux kernel >= 4.4 with 

the
+????? following options enabled:

package/sunxi-mali-driver-mainline/Config.in new file +6 -0
+
+????? - CONFIG_CMA
+????? - CONFIG_DMA_CMA
+????? - CONFIG_DRM_FBDEV_OVERALLOC >= 200 for double buffer or more
+
+????? https://github.com/mripard/sunxi-mali/blob/master/README.md
(quoted diff) +0 -0

a/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk b/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk new file mode 100644
index 0000000..1692646

package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk new file +7 -0
@@ -0,0 +1,26 @@
+################################################################################ 
 
+#
+# sunxi-mali-driver-mainline
+#
+################################################################################ 
 
+
+SUNXI_MALI_DRIVER_MAINLINE_VERSION = 

5b7b3c0b6e1736676c90928816d271debbb09d95 +SUNXI_MALI_DRIVER_MAINLINE_SITE = $(call github,mripard,sunxi-mali,$(SUNXI_MALI_DRIVER_MAINLINE_VERSION))

package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk new file +5 -0
+SUNXI_MALI_DRIVER_MAINLINE_DEPENDENCIES = linux
+
+SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS = \
+??? KDIR=$(LINUX_DIR) \
+??? CROSS_COMPILE=$(TARGET_CROSS) \
Quoted 8 lines

package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk

Quoted 5 lines

+??? INSTALL_MOD_PATH=$(TARGET_DIR)

package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk new file +4 -0
+
+define SUNXI_MALI_DRIVER_MAINLINE_BUILD_CMDS
+??? cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \
+??????? $(SHELL) ./build.sh -r r6p2 -a

? Shouldn't the r6p2 be configurable? That can be done in a later patch, though.

You're right, but at this time there's only r6p2 available. Anyway I can add it parametric, so it will be ready for any next versions.

Quoted 14 lines

? Regards,
? Arnout

Quoted 9 lines
package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk new file +8 -0
+endef
+
+define SUNXI_MALI_DRIVER_MAINLINE_INSTALL_TARGET_CMDS
+??? cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \
+??????? $(SHELL) ./build.sh -r r6p2 -i
+endef
+
+$(eval $(generic-package))
Signature · 11 lines
Giulio Benetti
R&D Manager &
Advanced Research

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale ? 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642
#6 lore raw

PATCH v5 1/1 sunxi-mali-driver-mainline: new package

I've sent a patchset as described below. Those packaged are bound together.
In this way there's no problem on applying patches. Hope I did it well.
I was not able to keep version for each patch, but as I know it's not possible,
because version refer to other patches.

Let me know if I have to change something.

Kind regards

Il 25/11/2017 22:45, Giulio Benetti ha scritto:

Quoted 156 lines

Hello Everybody,

I was thinking about doing a unique patchset for:
sunxi-mali-driver-mainline
and
sunxi-mali-mainline

They're very connected each other.
What do you think?

Il 25/11/2017 21:33, Giulio Benetti ha scritto:

Quoted 143 lines

Hi Arnout,

Il 25/11/2017 18:59, Arnout Vandecappelle ha scritto:

Quoted 10 lines

? Hi Giulio,

Quoted 3 lines · Giulio Benetti

Added kernel allwinner mali driver package. Used combined with userspace Allwinner openGL blob, it gives possibility to use 3D openGL SoC acceleration.

? I should have asked before, but: where do those binaries come from? Are they
from the mali-sunxi package? Or not yet packaged in Buildroot?

It will be combined with sunxi-mali-mainline,
I've submitted a patch still pending:
[PATCH v4 1/1] sunxi-mali-mainline: new package
http://buildroot-busybox.2317881.n4.nabble.com/PATCH-v4-1-1-sunxi-mali-mainline-new-package-td180182.html

Quoted 14 lines

[snip]

Quoted 9 lines

index fe5ccc4..8de2227 100644

package/Config.in +0 -0
@@ -496,6 +496,7 @@ endmenu

????? source "package/statserial/Config.in"
????? source "package/stm32flash/Config.in"
????? source "package/sunxi-cedarx/Config.in" +??? source "package/sunxi-mali-driver-mainline/Config.in" ????? source "package/sunxi-mali/Config.in"

? foo-bar sorts after foo, so swap these two lines.

Ok, on next patch I will correct it

Quoted 24 lines
Quoted 12 lines

????? source "package/sysstat/Config.in"
????? source "package/targetcli-fb/Config.in"

package/sunxi-mali-driver-mainline/Config.in new file +2 -0
new file mode 100644
index 0000000..5b7b2ba
@@ -0,0 +1,22 @@
+comment "sunxi-mali-driver-mainline needs a Linux kernel to be built"
+??? depends on !BR2_LINUX_KERNEL

package/sunxi-mali-driver-mainline/Config.in line 12

Quoted 10 lines
package/sunxi-mali-driver-mainline/Config.in new file +10 -0
+
+config BR2_PACKAGE_SUNXI_MALI_DRIVER_MAINLINE
+??? bool "sunxi-mali-driver-mainline"
+??? depends on BR2_LINUX_KERNEL
+??? select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra
+??? help
+????? This package builds and installs the Linux kernel driver for
+????? the Mali GPU on Allwinner platforms, compatible with recent
+????? Linux kernels (>= 4.4). Note that it should be installed
+????? together with the corresponding userspace binary blobs to

? I guess with 'binary blobs' you mean the OpenGL libraries, which

Quoted 8 lines

are only
provided as binaries? 'binary blobs' to me sounds like something like firmware
blobs: is put in your rootfs but doesn't run on the target processor. So I'd
rephrase as: ... together with the corresponding userspace OpenGL libraries,
which are provided as binaries only.

Ok

Quoted 2 lines

? And preferably also explain where you can get those.

Ok, I will add github sunxi-mali by mripard

Quoted 37 lines
Quoted 37 lines
package/sunxi-mali-driver-mainline/Config.in new file +3 -0
+????? provide complete OpenGL functionality.
+
+????? sunxi-mali-driver-mainline requires a Linux kernel >= 4.4 

with the
+????? following options enabled:

package/sunxi-mali-driver-mainline/Config.in new file +6 -0
+
+????? - CONFIG_CMA
+????? - CONFIG_DMA_CMA
+????? - CONFIG_DRM_FBDEV_OVERALLOC >= 200 for double buffer or more
+
+????? https://github.com/mripard/sunxi-mali/blob/master/README.md
(quoted diff) +0 -0

a/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk b/package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk new file mode 100644
index 0000000..1692646

package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk new file +7 -0
@@ -0,0 +1,26 @@
+################################################################################ 
 
+#
+# sunxi-mali-driver-mainline
+#
+################################################################################ 
 
+
+SUNXI_MALI_DRIVER_MAINLINE_VERSION = 

5b7b3c0b6e1736676c90928816d271debbb09d95 +SUNXI_MALI_DRIVER_MAINLINE_SITE = $(call github,mripard,sunxi-mali,$(SUNXI_MALI_DRIVER_MAINLINE_VERSION))

package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk new file +5 -0
+SUNXI_MALI_DRIVER_MAINLINE_DEPENDENCIES = linux
+
+SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS = \
+??? KDIR=$(LINUX_DIR) \
+??? CROSS_COMPILE=$(TARGET_CROSS) \
Quoted 8 lines

package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk

Quoted 5 lines

+??? INSTALL_MOD_PATH=$(TARGET_DIR)

package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk new file +4 -0
+
+define SUNXI_MALI_DRIVER_MAINLINE_BUILD_CMDS
+??? cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \
+??????? $(SHELL) ./build.sh -r r6p2 -a

? Shouldn't the r6p2 be configurable? That can be done in a later patch, though.

You're right, but at this time there's only r6p2 available. Anyway I can add it parametric, so it will be ready for any next versions.

Quoted 14 lines

? Regards,
? Arnout

Quoted 9 lines
package/sunxi-mali-driver-mainline/sunxi-mali-driver-mainline.mk new file +8 -0
+endef
+
+define SUNXI_MALI_DRIVER_MAINLINE_INSTALL_TARGET_CMDS
+??? cd $(@D) && $(SUNXI_MALI_DRIVER_MAINLINE_MAKE_OPTS) \
+??????? $(SHELL) ./build.sh -r r6p2 -i
+endef
+
+$(eval $(generic-package))
Signature · 11 lines
Giulio Benetti
R&D Manager &
Advanced Research

MICRONOVA SRL
Sede: Via A. Niedda 3 - 35010 Vigonza (PD)
Tel. 049/8931563 - Fax 049/8931346
Cod.Fiscale - P.IVA 02663420285
Capitale Sociale ? 26.000 i.v.
Iscritta al Reg. Imprese di Padova N. 02663420285
Numero R.E.A. 258642