[v2,2/2] xf86-video-armada: new package

Message ID 20180202145526.20133-3-Evgeniy.Didin@synopsys.com
State Changes Requested
Headers show
Series
  • Xorg: enable Etnaviv support
Related show

Commit Message

Evgeniy Didin Feb. 2, 2018, 2:55 p.m.
From: Evgeniy Didin <didin@synopsys.com>

xf86-video-armada is a Xorg driver for Etnaviv GPU.

Signed-off-by: Evgeniy Didin <didin@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: arc-buildroot@synopsys.com
---
Changes since v1:
-Add entry in DEVELOPERS
-Some clean-up was made
-Add license file
-Use full Git hash

 DEVELOPERS                                         |  1 +
 package/x11r7/Config.in                            |  1 +
 package/x11r7/xdriver_xf86-video-armada/Config.in  | 11 +++++++
 .../xdriver_xf86-video-armada.hash                 |  6 ++++
 .../xdriver_xf86-video-armada.mk                   | 37 ++++++++++++++++++++++
 5 files changed, 56 insertions(+)
 create mode 100644 package/x11r7/xdriver_xf86-video-armada/Config.in
 create mode 100644 package/x11r7/xdriver_xf86-video-armada/xdriver_xf86-video-armada.hash
 create mode 100644 package/x11r7/xdriver_xf86-video-armada/xdriver_xf86-video-armada.mk

Comments

Fabio Estevam Feb. 6, 2018, 4:25 p.m. | #1
Hi Evgeniy,

On Fri, Feb 2, 2018 at 12:55 PM, Evgeniy Didin
<Evgeniy.Didin@synopsys.com> wrote:

> +++ b/package/x11r7/xdriver_xf86-video-armada/xdriver_xf86-video-armada.hash
> @@ -0,0 +1,6 @@
> +# Locally calculated
> +sha256 5df615507ca6579ffba6df8a2aea6f6b542aa3985598efae836f335f9752cb39        xdriver_xf86-video-armada-04748ff4fb30370086cc97b9487a32951c5600ba.tar.gz

I had to manually change the sha256 to
5df615507ca6579ffba6df8a2aea6f6b542aa3985598efae836f335f9752cb39 in
order to fix the mismatch error.

With this fixed:

Tested-by: Fabio Estevam <festevam@gmail.com>
Thomas Petazzoni Feb. 6, 2018, 8:02 p.m. | #2
Hello,

On Tue, 6 Feb 2018 14:25:46 -0200, Fabio Estevam wrote:
> Hi Evgeniy,
> 
> On Fri, Feb 2, 2018 at 12:55 PM, Evgeniy Didin
> <Evgeniy.Didin@synopsys.com> wrote:
> 
> > +++ b/package/x11r7/xdriver_xf86-video-armada/xdriver_xf86-video-armada.hash
> > @@ -0,0 +1,6 @@
> > +# Locally calculated
> > +sha256 5df615507ca6579ffba6df8a2aea6f6b542aa3985598efae836f335f9752cb39        xdriver_xf86-video-armada-04748ff4fb30370086cc97b9487a32951c5600ba.tar.gz  
> 
> I had to manually change the sha256 to
> 5df615507ca6579ffba6df8a2aea6f6b542aa3985598efae836f335f9752cb39 in
> order to fix the mismatch error.
> 
> With this fixed:
> 
> Tested-by: Fabio Estevam <festevam@gmail.com>

Which version of tar are you using? Which version of tar is Evgeniy
using?

Best regards,

Thomas
Fabio Estevam Feb. 7, 2018, 1:30 a.m. | #3
Hi Thomas,

On Tue, Feb 6, 2018 at 6:02 PM, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:

> Which version of tar are you using? Which version of tar is Evgeniy
> using?

I tested this series against master, which uses tar-1.29 version.

Thanks
Baruch Siach Feb. 7, 2018, 5:40 a.m. | #4
Hi Fabio,

On Tue, Feb 06, 2018 at 11:30:00PM -0200, Fabio Estevam wrote:
> On Tue, Feb 6, 2018 at 6:02 PM, Thomas Petazzoni
> <thomas.petazzoni@bootlin.com> wrote:
> 
> > Which version of tar are you using? Which version of tar is Evgeniy
> > using?
> 
> I tested this series against master, which uses tar-1.29 version.

Thomas asks about your host installed tar version. Buildroot builds its own 
host-tar only when the host is missing a suitable tar.

This is related to the issue discovered with tar version 1.30 that generates 
slightly different archives.

  http://lists.busybox.net/pipermail/buildroot/2018-January/211222.html

This has also been discussed in the last developers meeting (first item):

  https://annuel2.framapad.org/p/BuildrootFosdem2018

baruch
Fabio Estevam Feb. 7, 2018, 11:44 a.m. | #5
Hi Baruch,

On Wed, Feb 7, 2018 at 3:40 AM, Baruch Siach <baruch@tkos.co.il> wrote:

> Thomas asks about your host installed tar version. Buildroot builds its own
> host-tar only when the host is missing a suitable tar.

Thanks for the clarification!

The host PC also uses tar 1.29 version:

~$ tar --version
tar (GNU tar) 1.29

Thanks
Evgeniy Didin Feb. 7, 2018, 12:22 p.m. | #6
Hi Thomas,

> > Which version of tar are you using? Which version of tar is Evgeniy
> > using?

The host PC I use has tar 1.26 version:

$ tar --version
tar (GNU tar) 1.26

-Evgeniy
Arnout Vandecappelle (Essensium/Mind) Feb. 7, 2018, 11:19 p.m. | #7
On 06-02-18 17:25, Fabio Estevam wrote:
> Hi Evgeniy,
> 
> On Fri, Feb 2, 2018 at 12:55 PM, Evgeniy Didin
> <Evgeniy.Didin@synopsys.com> wrote:
> 
>> +++ b/package/x11r7/xdriver_xf86-video-armada/xdriver_xf86-video-armada.hash
>> @@ -0,0 +1,6 @@
>> +# Locally calculated
>> +sha256 5df615507ca6579ffba6df8a2aea6f6b542aa3985598efae836f335f9752cb39        xdriver_xf86-video-armada-04748ff4fb30370086cc97b9487a32951c5600ba.tar.gz
> 
> I had to manually change the sha256 to
> 5df615507ca6579ffba6df8a2aea6f6b542aa3985598efae836f335f9752cb39 in
> order to fix the mismatch error.

 My cmp-foo may be off, but that is what is in the hash file, no?

 Regards,
 Arnout

> 
> With this fixed:
> 
> Tested-by: Fabio Estevam <festevam@gmail.com>
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
Fabio Estevam Feb. 8, 2018, 1:24 p.m. | #8
Hi Arnout,

On Wed, Feb 7, 2018 at 9:19 PM, Arnout Vandecappelle <arnout@mind.be> wrote:

>  My cmp-foo may be off, but that is what is in the hash file, no?

Sorry, I typed the sha256 incorrectly.

What I meant  to say is that I had to change it to:

# Locally calculated
sha256 6fdde0a589ae51f918a515506d425ae288116b0fc8b845e10d6fbeff75469028
xdriver_xf86-video-armada-04748ff4fb30370086cc97b9487a32951c5600ba.tar.gz
Thomas Petazzoni Feb. 14, 2018, 9:50 p.m. | #9
Hello Evgeniy,

On Fri,  2 Feb 2018 17:55:26 +0300, Evgeniy Didin wrote:


> diff --git a/package/x11r7/xdriver_xf86-video-armada/Config.in b/package/x11r7/xdriver_xf86-video-armada/Config.in
> new file mode 100644
> index 0000000000..ade8a75643
> --- /dev/null
> +++ b/package/x11r7/xdriver_xf86-video-armada/Config.in
> @@ -0,0 +1,11 @@
> +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_ARMADA
> +	bool "xf86-video-armada"
> +	depends on BR2_PACKAGE_MESA3D

It would be nice to add a comment about this dependency here, because
your package doesn't itself depend on mesa3d. I assume it's because you
need GLX support in the X.org server, but it would be nice to make this
explicit.


> +XDRIVER_XF86_VIDEO_ARMADA_VERSION = 04748ff4fb30370086cc97b9487a32951c5600ba
> +XDRIVER_XF86_VIDEO_ARMADA_SITE = http://git.arm.linux.org.uk/cgit/xf86-video-armada.git
> +XDRIVER_XF86_VIDEO_ARMADA_SITE_METHOD = git
> +XDRIVER_XF86_VIDEO_ARMADA_AUTORECONF = YES
> +XDRIVER_XF86_VIDEO_ARMADA_DEPENDENCIES = \
> +	libdrm-armada \
> +	xserver_xorg-server
> +
> +XDRIVER_XF86_VIDEO_ARMADA_LICENSE_FILES= README etna_viv/LICENSE

Space before =, and please put the LICENSE_FILES variable after the
LICENSE variable.

> +XDRIVER_XF86_VIDEO_ARMADA_LICENSE = BSD

BSD is not a license. See https://spdx.org/licenses/ for a list of
license codes.

> +#Need etna_viv source files for driver
> +define XDRIVER_XF86_VIDEO_ARMADA_ETNASRC
> +	git clone https://github.com/laanwj/etna_viv.git $(@D)/etna_viv

This is not acceptable, as it completely works around the Buildroot
download infrastructure, preventing offline builds. Why do we need
this ? Why isn't the upstream version of etnaviv sufficient ?

If it's really needed, a separate package will have to be created.

> +        mkdir $(@D)/m4
> +endef
> +
> +XDRIVER_XF86_VIDEO_ARMADA_POST_PATCH_HOOKS += XDRIVER_XF86_VIDEO_ARMADA_ETNASRC
> +
> +define XDRIVER_XF86_VIDEO_ARMADA_INSTALL_CONF_FILE
> +        $(INSTALL) -m 0644 -D $(@D)/conf/xorg-sample.conf $(TARGET_DIR)/etc/X11/xorg.conf
> +endef
> +
> +XDRIVER_XF86_VIDEO_ARMADA_POST_INSTALL_TARGET_HOOKS += XDRIVER_XF86_VIDEO_ARMADA_INSTALL_CONF_FILE
> +
> +
> +XDRIVER_XF86_VIDEO_ARMADA_CONF_OPTS = \
> +  --prefix=/usr --disable-vivante --disable-etnaviv \

--prefix=/usr is already passed by the autotools-package
infrastructure. Why do you disable vivante and etnaviv ?

Thanks,

Thomas

Patch

diff --git a/DEVELOPERS b/DEVELOPERS
index f38ce61966..da41a28793 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -154,6 +154,7 @@  F:	package/wf111/
 N:	ARC Maintainers <arc-buildroot@synopsys.com>
 F:	arch/Config.in.arc
 F:	package/libdrm-armada
+F:	package/x11r7/xdriver_xf86-video-armada
 
 N:	Ariel D'Alessandro <ariel@vanguardiasur.com.ar>
 F:	package/axfsutils/
diff --git a/package/x11r7/Config.in b/package/x11r7/Config.in
index ddceaa407f..e791419083 100644
--- a/package/x11r7/Config.in
+++ b/package/x11r7/Config.in
@@ -157,6 +157,7 @@  if BR2_PACKAGE_XORG7
 		source package/x11r7/xdriver_xf86-input-vmmouse/Config.in
 		source package/x11r7/xdriver_xf86-video-amdgpu/Config.in
 		source package/x11r7/xdriver_xf86-video-ark/Config.in
+		source package/x11r7/xdriver_xf86-video-armada/Config.in
 		source package/x11r7/xdriver_xf86-video-ast/Config.in
 		source package/x11r7/xdriver_xf86-video-ati/Config.in
 		source package/x11r7/xdriver_xf86-video-cirrus/Config.in
diff --git a/package/x11r7/xdriver_xf86-video-armada/Config.in b/package/x11r7/xdriver_xf86-video-armada/Config.in
new file mode 100644
index 0000000000..ade8a75643
--- /dev/null
+++ b/package/x11r7/xdriver_xf86-video-armada/Config.in
@@ -0,0 +1,11 @@ 
+config BR2_PACKAGE_XDRIVER_XF86_VIDEO_ARMADA
+	bool "xf86-video-armada"
+	depends on BR2_PACKAGE_MESA3D
+	select BR2_PACKAGE_LIBDRM_ARMADA
+	help
+	 Xorg driver for Etnaviv GPU.
+
+	 http://git.arm.linux.org.uk/cgit/xf86-video-armada.git
+
+comment "xf86-video-armada needs mesa3d"
+        depends on !BR2_PACKAGE_MESA3D
diff --git a/package/x11r7/xdriver_xf86-video-armada/xdriver_xf86-video-armada.hash b/package/x11r7/xdriver_xf86-video-armada/xdriver_xf86-video-armada.hash
new file mode 100644
index 0000000000..7fa0f525ed
--- /dev/null
+++ b/package/x11r7/xdriver_xf86-video-armada/xdriver_xf86-video-armada.hash
@@ -0,0 +1,6 @@ 
+# Locally calculated
+sha256	5df615507ca6579ffba6df8a2aea6f6b542aa3985598efae836f335f9752cb39	xdriver_xf86-video-armada-04748ff4fb30370086cc97b9487a32951c5600ba.tar.gz
+
+# Hashes for license files:
+sha256  57ed74a42ee9ea913ae81c5bac498340ade4ef1e70e9007f39b2da3de952e597	README
+sha256  9d8facadc083641f71b8bcf9f078bd53f27aba3545b170f100c38f07cf3a42a2	etna_viv/LICENSE
diff --git a/package/x11r7/xdriver_xf86-video-armada/xdriver_xf86-video-armada.mk b/package/x11r7/xdriver_xf86-video-armada/xdriver_xf86-video-armada.mk
new file mode 100644
index 0000000000..7cac256241
--- /dev/null
+++ b/package/x11r7/xdriver_xf86-video-armada/xdriver_xf86-video-armada.mk
@@ -0,0 +1,37 @@ 
+################################################################################
+#
+# xdriver_xf86-video-armada
+#
+################################################################################
+
+XDRIVER_XF86_VIDEO_ARMADA_VERSION = 04748ff4fb30370086cc97b9487a32951c5600ba
+XDRIVER_XF86_VIDEO_ARMADA_SITE = http://git.arm.linux.org.uk/cgit/xf86-video-armada.git
+XDRIVER_XF86_VIDEO_ARMADA_SITE_METHOD = git
+XDRIVER_XF86_VIDEO_ARMADA_AUTORECONF = YES
+XDRIVER_XF86_VIDEO_ARMADA_DEPENDENCIES = \
+	libdrm-armada \
+	xserver_xorg-server
+
+XDRIVER_XF86_VIDEO_ARMADA_LICENSE_FILES= README etna_viv/LICENSE
+XDRIVER_XF86_VIDEO_ARMADA_LICENSE = BSD
+
+#Need etna_viv source files for driver
+define XDRIVER_XF86_VIDEO_ARMADA_ETNASRC
+	git clone https://github.com/laanwj/etna_viv.git $(@D)/etna_viv
+        mkdir $(@D)/m4
+endef
+
+XDRIVER_XF86_VIDEO_ARMADA_POST_PATCH_HOOKS += XDRIVER_XF86_VIDEO_ARMADA_ETNASRC
+
+define XDRIVER_XF86_VIDEO_ARMADA_INSTALL_CONF_FILE
+        $(INSTALL) -m 0644 -D $(@D)/conf/xorg-sample.conf $(TARGET_DIR)/etc/X11/xorg.conf
+endef
+
+XDRIVER_XF86_VIDEO_ARMADA_POST_INSTALL_TARGET_HOOKS += XDRIVER_XF86_VIDEO_ARMADA_INSTALL_CONF_FILE
+
+
+XDRIVER_XF86_VIDEO_ARMADA_CONF_OPTS = \
+  --prefix=/usr --disable-vivante --disable-etnaviv \
+  --with-etnaviv-source=$(@D)/etna_viv
+
+$(eval $(autotools-package))