buildroot.busybox.net archive mirror
 help / color / mirror / Atom feed
From: Andreas Dannenberg via buildroot <buildroot@buildroot.org>
To: "François Perrad" <francois.perrad@gadz.org>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v9 10/11] package/ti-rogue-um: new package
Date: Tue, 27 Jun 2023 17:48:33 -0500	[thread overview]
Message-ID: <20230627224833.un2a3d2lkrbzjzjv@dasso> (raw)
In-Reply-To: <20230623145945.kvxhcdbf2kycdyk5@dasso>

Hi François,

On Fri, Jun 23, 2023 at 09:59:45AM -0500, Andreas Dannenberg via buildroot wrote:
> Hi François,
> 
> On Fri, Jun 23, 2023 at 09:30:39AM +0200, François Perrad wrote:
> > Le jeu. 22 juin 2023 à 18:07, Andreas Dannenberg via buildroot <
> > buildroot@buildroot.org> a écrit :
> > 
> > > This package adds the userspace libraries for the Rogue graphics
> > > accelerator of the following Texas Instruments SoCs: AM62, J721E,
> > > J721S2, and J784S4.
> > >
> > > Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
> > > ---
> > >  package/Config.in                             |   1 +
> > >  .../0001-all-drop-the-init-script.patch       | 832 ++++++++++++++++++
> > >  package/ti-rogue-um/Config.in                 |  52 ++
> > >  package/ti-rogue-um/ti-rogue-um.hash          |   3 +
> > >  package/ti-rogue-um/ti-rogue-um.mk            |  38 +
> > >  5 files changed, 926 insertions(+)
> > >  create mode 100644 package/ti-rogue-um/0001-all-drop-the-init-script.patch
> > >  create mode 100644 package/ti-rogue-um/Config.in
> > >  create mode 100644 package/ti-rogue-um/ti-rogue-um.hash
> > >  create mode 100644 package/ti-rogue-um/ti-rogue-um.mk
> > >
> > > diff --git a/package/Config.in b/package/Config.in
> > > index 96ef0d72de..0bff1135aa 100644
> > > --- a/package/Config.in
> > > +++ b/package/Config.in
> > > @@ -614,6 +614,7 @@ endmenu
> > >         source "package/targetcli-fb/Config.in"
> > >         source "package/ti-gfx/Config.in"
> > >         source "package/ti-rogue-km/Config.in"
> > > +       source "package/ti-rogue-um/Config.in"
> > >         source "package/ti-sgx-demos/Config.in"
> > >         source "package/ti-sgx-km/Config.in"
> > >         source "package/ti-sgx-um/Config.in"
> > > diff --git a/package/ti-rogue-um/0001-all-drop-the-init-script.patch
> > > b/package/ti-rogue-um/0001-all-drop-the-init-script.patch
> > > new file mode 100644
> > > index 0000000000..4f3dd1cbb1
> > > --- /dev/null
> > > +++ b/package/ti-rogue-um/0001-all-drop-the-init-script.patch
> > > @@ -0,0 +1,832 @@
> > > +From 99e0da8a1c08818c59680f726e11a84b26daf29f Mon Sep 17 00:00:00 2001
> > > +From: Randolph Sapp <rs@ti.com>
> > > +Date: Thu, 25 May 2023 18:59:26 -0500
> > > +Subject: [PATCH] all: drop the init script
> > > +
> > > +Nobody should be using this anymore. It's sysVinit and it's just a fancy
> > > +wrapper around modprobe anyway. We'll be dropping it from our build
> > > +tools soon.
> > > +
> > > +Signed-off-by: Randolph Sapp <rs@ti.com>
> > > +---
> > > + .../wayland/release/etc/init.d/rc.pvr         | 196 ------------------
> > > + .../wayland/release/etc/init.d/rc.pvr         | 196 ------------------
> > > + .../wayland/release/etc/init.d/rc.pvr         | 196 ------------------
> > > + .../wayland/release/etc/init.d/rc.pvr         | 196 ------------------
> > > + 4 files changed, 784 deletions(-)
> > > + delete mode 100755 targetfs/am62_linux/wayland/release/etc/init.d/rc.pvr
> > > + delete mode 100755 targetfs/j721e_linux/wayland/release/etc/init.d/rc.pvr
> > > + delete mode 100755
> > > targetfs/j721s2_linux/wayland/release/etc/init.d/rc.pvr
> > > + delete mode 100755
> > > targetfs/j784s4_linux/wayland/release/etc/init.d/rc.pvr
> > > +
> > > +diff --git a/targetfs/am62_linux/wayland/release/etc/init.d/rc.pvr
> > > b/targetfs/am62_linux/wayland/release/etc/init.d/rc.pvr
> > > +deleted file mode 100755
> > > +index 428cd86..0000000
> > > +--- a/targetfs/am62_linux/wayland/release/etc/init.d/rc.pvr
> > > ++++ /dev/null
> > > +2.34.1
> > > +
> > > diff --git a/package/ti-rogue-um/Config.in b/package/ti-rogue-um/Config.in
> > > new file mode 100644
> > > index 0000000000..15257858c2
> > > --- /dev/null
> > > +++ b/package/ti-rogue-um/Config.in
> > > @@ -0,0 +1,52 @@
> > > +comment "ti-rogue-um needs udev and a glibc toolchain w/ threads"
> > > +       depends on BR2_aarch64
> > > +       depends on !BR2_PACKAGE_HAS_UDEV || !BR2_TOOLCHAIN_USES_GLIBC \
> > > +               || !BR2_TOOLCHAIN_HAS_THREADS
> > > +
> > > +config BR2_PACKAGE_TI_ROGUE_UM
> > > +       bool "ti-rogue-um"
> > > +       depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm
> > > +       depends on BR2_PACKAGE_HAS_UDEV
> > > +       # pre-built binaries
> > > +       depends on BR2_TOOLCHAIN_USES_GLIBC
> > > +       depends on BR2_aarch64
> > > +       select BR2_PACKAGE_LIBDRM
> > > +       select BR2_PACKAGE_HAS_LIBEGL
> > > +       select BR2_PACKAGE_HAS_LIBGBM
> > > +       select BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF
> > > +       select BR2_PACKAGE_HAS_LIBGLES
> > > +       select BR2_PACKAGE_HAS_POWERVR
> > > +       select BR2_PACKAGE_LIBFFI
> > > +       select BR2_PACKAGE_WAYLAND
> > > +       select BR2_PACKAGE_HAS_LIBEGL_WAYLAND
> > > +       select BR2_PACKAGE_TI_ROGUE_KM if BR2_LINUX_KERNEL
> > > +       help
> > > +         Graphics libraries for TI SoCs with Rogue GPU.
> > > +         This package supports AM62, J721E, J721S2, and J784S4
> > > +         SoCs only.
> > > +
> > > +         https://git.ti.com/cgit/graphics/ti-img-rogue-umlibs
> > > +
> > > +if BR2_PACKAGE_TI_ROGUE_UM
> > > +
> > > +config BR2_PACKAGE_PROVIDES_LIBEGL
> > > +       default "ti-rogue-um"
> > > +
> > > +config BR2_PACKAGE_PROVIDES_LIBGBM
> > > +       default "ti-rogue-um"
> > > +
> > > +config BR2_PACKAGE_PROVIDES_LIBGLES
> > > +       default "ti-rogue-um"
> > > +
> > > +config BR2_PACKAGE_PROVIDES_POWERVR
> > > +       default "ti-rogue-um"
> > > +
> > > +config BR2_TARGET_TI_ROGUE_UM_TARGET_PRODUCT
> > > +       string "UM driver target product"
> > > +       default "am62_linux"
> > > +       help
> > > +         Select target product to be used for UM libraries. This needs to
> > > +         match one of the SoC-specific folders within the root/targetfs
> > > +         folder of the ti-img-rogue-umlibs Git repository.
> > > +
> > > +endif
> > > diff --git a/package/ti-rogue-um/ti-rogue-um.hash
> > > b/package/ti-rogue-um/ti-rogue-um.hash
> > > new file mode 100644
> > > index 0000000000..a41bf33145
> > > --- /dev/null
> > > +++ b/package/ti-rogue-um/ti-rogue-um.hash
> > > @@ -0,0 +1,3 @@
> > > +# Locally calculated
> > > +sha256  2e1bd1a5ab0ad2db1b9164d028a94f8f9d20743131f337a817fd1c8f9ddd4cbe
> > > ti-rogue-um-5977e82b96028f783d39c7219f016c1faf8dc5f5-br1.tar.gz
> > > +sha256  37507b462edf97b59717d2d144daaac85fbca6080c3602b5128e446e97f9ad47
> > > LICENSE
> > > diff --git a/package/ti-rogue-um/ti-rogue-um.mk b/package/ti-rogue-um/
> > > ti-rogue-um.mk
> > > new file mode 100644
> > > index 0000000000..fa29638fa7
> > > --- /dev/null
> > > +++ b/package/ti-rogue-um/ti-rogue-um.mk
> > > @@ -0,0 +1,38 @@
> > >
> > > +################################################################################
> > > +#
> > > +# ti-rogue-um
> > > +#
> > >
> > > +################################################################################
> > > +
> > > +# This corresponds to SDK 08.06.00
> > > +TI_ROGUE_UM_VERSION = 5977e82b96028f783d39c7219f016c1faf8dc5f5
> > > +TI_ROGUE_UM_SITE =
> > > https://git.ti.com/git/graphics/ti-img-rogue-umlibs.git
> > > +TI_ROGUE_UM_SITE_METHOD = git
> > > +TI_ROGUE_UM_LICENSE = TI TSPA License
> > > +TI_ROGUE_UM_LICENSE_FILES = LICENSE
> > > +TI_ROGUE_UM_INSTALL_STAGING = YES
> > > +TI_ROGUE_UM_PROVIDES = libegl libgbm libgles powervr
> > > +
> > > +# ti-rogue-um is a egl/gles provider only if libdrm is installed
> > > +TI_ROGUE_UM_DEPENDENCIES = libdrm wayland
> > >
> > 
> > useless built dependencies (nothing is built, blobs are copied), runtime
> > dependencies in Config.in are enough.
> 
> Understood, will fix it. Btw this was a carry-over from
> package/ti-sgx-um/ti-sgx-um.mk which I used to model this new package
> after, so opportunity for improvement there as well...

I experimented with this today, and removing either libdrm _or_ wayland
from TI_ROGUE_UM_DEPENDENCIES causes the build to fail in two different
ways. Note that I'm using my "test defconfig" that turns on the
following extras in configs/am62x_sk_defconfig...

+BR2_TOOLCHAIN_BUILDROOT_CXX=y
+BR2_PACKAGE_PULSEAUDIO=y
+BR2_PACKAGE_CHOCOLATE_DOOM=y
+BR2_PACKAGE_DOOM_WAD=y
+BR2_PACKAGE_SDL2_KMSDRM=y
+BR2_PACKAGE_SDL2_OPENGLES=y
+BR2_PACKAGE_WESTON=y
+BR2_PACKAGE_ALSA_LIB=y

===Test 1: Removing libdrm===
<snip>
In file included from /home/a0797059/git/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/EGL/egl.h:39,
                 from cairo-gl.h:130,
                 from cairo-gl-private.h:51,
                 from cairo-gl-traps-compositor.c:44:
/home/a0797059/git/buildroot/output/host/aarch64-buildroot-linux-gnu/sysroot/usr/include/EGL/eglplatform.h:134:10: fatal error: X11/Xlib.h: No such file or directory
  134 | #include <X11/Xlib.h>
      |          ^~~~~~~~~~~~
compilation terminated.
make[5]: *** [Makefile:2358: cairo-gl-shaders.lo] Error 1
make[5]: *** [Makefile:2358: cairo-gl-traps-compositor.lo] Error 1
make[4]: *** [Makefile:1955: all] Error 2
make[3]: *** [Makefile:910: all-recursive] Error 1
make[2]: *** [Makefile:761: all] Error 2
make[1]: *** [package/pkg-generic.mk:293: /home/a0797059/git/buildroot/output/build/cairo-1.16.0/.stamp_built] Error 2
make: *** [Makefile:82: _all] Error 2

===Test 2: Removing wayland===
<snip>
/home/a0797059/git/buildroot/output/host/lib/gcc/aarch64-buildroot-linux-gnu/11.4.0/../../../../aarch64-buildroot-linux-gnu/bin/ld: /home/a0797059/git/buildroot/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libEGL.so: undefined reference to `wl_display_roundtrip_queue'
/home/a0797059/git/buildroot/output/host/lib/gcc/aarch64-buildroot-linux-gnu/11.4.0/../../../../aarch64-buildroot-linux-gnu/bin/ld: /home/a0797059/git/buildroot/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libEGL.so: undefined reference to `wl_proxy_marshal_constructor_versioned'
/home/a0797059/git/buildroot/output/host/lib/gcc/aarch64-buildroot-linux-gnu/11.4.0/../../../../aarch64-buildroot-linux-gnu/bin/ld: /home/a0797059/git/buildroot/output/host/bin/../aarch64-buildroot-linux-gnu/sysroot/usr/lib/libEGL.so: undefined reference to `wl_display_create_queue'
collect2: error: ld returned 1 exit status
make[6]: *** [Makefile:1795: cairo-test-suite] Error 1
make[5]: *** [Makefile:8375: all-recursive] Error 1
make[4]: *** [Makefile:1736: all] Error 2
make[3]: *** [Makefile:910: all-recursive] Error 1
make[2]: *** [Makefile:761: all] Error 2
make[1]: *** [package/pkg-generic.mk:293: /home/a0797059/git/buildroot/output/build/cairo-1.16.0/.stamp_built] Error 2
make: *** [Makefile:82: _all] Error 2

Note that for the tests I did a full build, starting out with a completely
clean state (rm -rf output/* before the build).

With this finding, I'm inclined to leave TI_ROGUE_UM_DEPENDENCIES as I
had it, unless there's a better way to deal with this build dependency?

Thanks, Andreas


--
Andreas Dannenberg
Texas Instruments Inc

>  
> > +
> > > +PVR_BUILD = "release"
> > > +PVR_WS = "wayland"
> > > +
> > >
> > 
> > TI_ROGUE_UM_MAKE_OPTS = \
> >       TARGET_PRODUCT=$(BR2_TARGET_TI_ROGUE_UM_TARGET_PRODUCT) \
> >       BUILD=release \
> >       WINDOW_SYSTEM=wayland
> > 
> > define TI_ROGUE_UM_INSTALL_STAGING_CMDS
> >      $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
> >           $(TI_ROGUE_UM_MAKE_OPTS) \
> >           DESTDIR=$(STAGING_DIR) \
> >           install
> > endef
> > by this way, all variables are prefixed by TI_ROGUE_UM_.
> 
> Good idea, will factor-out the make options. Thanks for taking the time
> to review & improve this patch.
> 
> --
> Andreas Dannenberg
> Texas Instruments Inc
> 
> 
> 
> > 
> > François
> > 
> > 
> > > +define TI_ROGUE_UM_INSTALL_STAGING_CMDS
> > > +       $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
> > > +               DESTDIR=$(STAGING_DIR) \
> > > +               TARGET_PRODUCT=$(BR2_TARGET_TI_ROGUE_UM_TARGET_PRODUCT) \
> > > +               BUILD=$(PVR_BUILD) WINDOW_SYSTEM=$(PVR_WS) \
> > > +               install
> > > +endef
> > > +
> > > +define TI_ROGUE_UM_INSTALL_TARGET_CMDS
> > > +       $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \
> > > +               DESTDIR=$(TARGET_DIR) \
> > > +               TARGET_PRODUCT=$(BR2_TARGET_TI_ROGUE_UM_TARGET_PRODUCT) \
> > > +               BUILD=$(PVR_BUILD) WINDOW_SYSTEM=$(PVR_WS) \
> > > +               install
> > > +endef
> > > +
> > > +$(eval $(generic-package))
> > > --
> > > 2.34.1
> > >
> > > _______________________________________________
> > > buildroot mailing list
> > > buildroot@buildroot.org
> > > https://lists.buildroot.org/mailman/listinfo/buildroot
> > >
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2023-06-27 22:48 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-22 16:02 [Buildroot] [PATCH v9 00/11] add support for TI's AM64x and AM62x boards Andreas Dannenberg via buildroot
2023-06-22 16:02 ` [Buildroot] [PATCH v9 01/11] boot/ti-k3-r5-loader: allow for full build source customization Andreas Dannenberg via buildroot
2023-06-24 21:23   ` Yann E. MORIN
2023-06-25 13:21     ` Arnout Vandecappelle via buildroot
2023-06-25 13:35       ` Yann E. MORIN
2023-06-26 19:44   ` Julien Olivain
2023-06-26 19:53   ` Julien Olivain
2023-06-22 16:02 ` [Buildroot] [PATCH v9 02/11] boot/ti-k3-image-gen: new package Andreas Dannenberg via buildroot
2023-06-24 22:28   ` Yann E. MORIN
2023-08-08 23:38   ` Bryce Johnson
2023-08-15  7:15     ` Andreas Dannenberg via buildroot
2023-08-15 22:54       ` Bryce Johnson
2023-06-22 16:02 ` [Buildroot] [PATCH v9 03/11] boot/uboot: add support for building the TI K3 DM into U-Boot Andreas Dannenberg via buildroot
2023-06-25  7:02   ` Yann E. MORIN
2023-06-25  7:08     ` Yann E. MORIN
2023-06-22 16:02 ` [Buildroot] [PATCH v9 04/11] board/ti/am64x_sk: add new board Andreas Dannenberg via buildroot
2023-06-25  5:41   ` François Perrad
2023-06-25 13:43   ` Yann E. MORIN
2023-06-22 16:02 ` [Buildroot] [PATCH v9 05/11] board/ti/am62x_sk: " Andreas Dannenberg via buildroot
2023-06-25  5:42   ` François Perrad
2023-08-15  7:21     ` Andreas Dannenberg via buildroot
2023-06-22 16:02 ` [Buildroot] [PATCH v9 06/11] board/ti/am62x_sk|am64x_sk: switch to TI SDK v8.6 sources Andreas Dannenberg via buildroot
2023-06-25 13:54   ` Yann E. MORIN
2023-06-25 14:33     ` Arnout Vandecappelle via buildroot
2023-06-25 15:22       ` Peter Korsgaard
2023-06-25 18:59         ` Arnout Vandecappelle via buildroot
2023-06-25 19:14           ` Peter Korsgaard
2023-06-25 19:36       ` Yann E. MORIN
2023-06-22 16:02 ` [Buildroot] [PATCH v9 07/11] package/ti-core-secdev-k3: new package Andreas Dannenberg via buildroot
2023-06-23  3:48   ` Patrick Oppenlander
2023-06-23 14:53     ` Andreas Dannenberg via buildroot
2023-06-24  0:32       ` Patrick Oppenlander
2023-06-24  1:11         ` Andreas Dannenberg via buildroot
2023-06-24  4:09           ` Patrick Oppenlander
2023-06-25  7:55       ` Yann E. MORIN
2023-06-25 13:26         ` Arnout Vandecappelle via buildroot
2023-06-22 16:02 ` [Buildroot] [PATCH v9 08/11] board/ti/am62x_sk|am64x_sk: switch to HS-FS device variants Andreas Dannenberg via buildroot
2023-06-22 16:02 ` [Buildroot] [PATCH v9 09/11] package/ti-rogue-km: new package Andreas Dannenberg via buildroot
2023-06-25  8:59   ` Yann E. MORIN
2023-08-18 17:30     ` Bryce Johnson
2023-06-22 16:02 ` [Buildroot] [PATCH v9 10/11] package/ti-rogue-um: " Andreas Dannenberg via buildroot
2023-06-23  7:30   ` François Perrad
2023-06-23 14:59     ` Andreas Dannenberg via buildroot
2023-06-25  5:37       ` François Perrad
2023-06-25 10:15         ` Yann E. MORIN
2023-06-27  2:02           ` Andreas Dannenberg via buildroot
2023-08-22 15:15           ` Thomas Petazzoni via buildroot
2023-06-27 22:48       ` Andreas Dannenberg via buildroot [this message]
2023-08-22 10:40     ` Thomas Petazzoni via buildroot
2023-06-22 16:02 ` [Buildroot] [PATCH v9 11/11] configs/am62x_sk_defconfig: enable IMG Rogue graphics driver Andreas Dannenberg via buildroot
2023-06-23  4:02 ` [Buildroot] [PATCH v9 00/11] add support for TI's AM64x and AM62x boards Patrick Oppenlander
2023-06-23 15:04   ` Andreas Dannenberg via buildroot
2023-08-22 10:14 ` Thomas Petazzoni via buildroot
2023-08-22 18:05   ` Thomas Petazzoni via buildroot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230627224833.un2a3d2lkrbzjzjv@dasso \
    --to=buildroot@buildroot.org \
    --cc=dannenberg@ti.com \
    --cc=francois.perrad@gadz.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).