All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Running Weston on stm32mp157c-dk2
@ 2020-09-09 16:08 Andrey Nechypurenko
  2020-09-09 20:11 ` Thomas Petazzoni
  0 siblings, 1 reply; 9+ messages in thread
From: Andrey Nechypurenko @ 2020-09-09 16:08 UTC (permalink / raw)
  To: buildroot

Hi Folks,

I am just wondering if anybody tried and managed to run Weston on
stm32mp157c-dk2 using Buildroot? If yes, I would appreciate any
details on what should be done for it.

My attempts lead me to the point where the following output comes from
weston-launch:

# openvt -c 3 -v weston-launch -- --log=weston.log

# cat weston.log
Date: 2000-01-01 UTC
[05:08:08.782] weston 8.0.0
               https://wayland.freedesktop.org
               Bug reports to:
https://gitlab.freedesktop.org/wayland/weston/issues/
               Build: 8.0.0
[05:08:08.783] Command line: /usr/bin/weston --log=weston.log
[05:08:08.783] OS: Linux, 5.4.26, #1 SMP PREEMPT Thu Aug 27 17:02:16
CEST 2020, armv7l
[05:08:08.784] Using config file '/root/.config/weston.ini'
[05:08:08.784] Output repaint window is 100 ms maximum.
[05:08:08.785] Loading module '/usr/lib/libweston-8/drm-backend.so'
[05:08:08.789] initializing drm backend
[05:08:08.793] using /dev/dri/card0
[05:08:08.793] DRM: supports universal planes
[05:08:08.793] DRM: supports atomic modesetting
[05:08:08.793] DRM: supports picture aspect ratio
[05:08:08.793] Loading module '/usr/lib/libweston-8/gl-renderer.so'
[05:08:08.806] failed to initialize egl
[05:08:08.806] fatal: failed to create compositor backend

Since there is /dev/dri/card0 I assume that the kernel recognized the
hardware. Also, there is /usr/lib/libweston-8/gl-renderer.so , so
probably Weston & Co. is also compiled correctly. But something is
obviously missing and I have no idea what it might be.

Best regards,
Andrey.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] Running Weston on stm32mp157c-dk2
  2020-09-09 16:08 [Buildroot] Running Weston on stm32mp157c-dk2 Andrey Nechypurenko
@ 2020-09-09 20:11 ` Thomas Petazzoni
  2020-09-10  9:40   ` Andrey Nechypurenko
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2020-09-09 20:11 UTC (permalink / raw)
  To: buildroot

Hello Andrey,

On Wed, 9 Sep 2020 18:08:08 +0200
Andrey Nechypurenko <andreynech@gmail.com> wrote:

> I am just wondering if anybody tried and managed to run Weston on
> stm32mp157c-dk2 using Buildroot? If yes, I would appreciate any
> details on what should be done for it.
> 
> My attempts lead me to the point where the following output comes from
> weston-launch:
> 
> # openvt -c 3 -v weston-launch -- --log=weston.log

Which OpenGL implementation are you trying to use? The proprietary
blobs from Vivante, or the open-source Etnaviv implementation? I don't
know if the latter was tested on STM32MP157.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] Running Weston on stm32mp157c-dk2
  2020-09-09 20:11 ` Thomas Petazzoni
@ 2020-09-10  9:40   ` Andrey Nechypurenko
  2020-09-10  9:41     ` Thomas Petazzoni
  0 siblings, 1 reply; 9+ messages in thread
From: Andrey Nechypurenko @ 2020-09-10  9:40 UTC (permalink / raw)
  To: buildroot

Hello Thomas,

> > I am just wondering if anybody tried and managed to run Weston on
> > stm32mp157c-dk2 using Buildroot? If yes, I would appreciate any
> > details on what should be done for it.
> >
> > My attempts lead me to the point where the following output comes from
> > weston-launch:
> >
> > # openvt -c 3 -v weston-launch -- --log=weston.log
>
> Which OpenGL implementation are you trying to use? The proprietary
> blobs from Vivante, or the open-source Etnaviv implementation? I don't
> know if the latter was tested on STM32MP157.

Good question. In fact, I am not sure :-) . So I guess it is Etnaviv
because I did nothing to add proprietary blobs. I will check it out
and see what is used by Yocto-based distribution provided by STM where
Weston works.

Thank you,
Andrey.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] Running Weston on stm32mp157c-dk2
  2020-09-10  9:40   ` Andrey Nechypurenko
@ 2020-09-10  9:41     ` Thomas Petazzoni
  2020-09-10  9:44       ` Andrey Nechypurenko
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2020-09-10  9:41 UTC (permalink / raw)
  To: buildroot

On Thu, 10 Sep 2020 11:40:29 +0200
Andrey Nechypurenko <andreynech@gmail.com> wrote:

> > Which OpenGL implementation are you trying to use? The proprietary
> > blobs from Vivante, or the open-source Etnaviv implementation? I don't
> > know if the latter was tested on STM32MP157.  
> 
> Good question. In fact, I am not sure :-) . So I guess it is Etnaviv
> because I did nothing to add proprietary blobs. I will check it out
> and see what is used by Yocto-based distribution provided by STM where
> Weston works.

In Buildroot, the package package/gcnano-binaries/ will give you the
proprietary OpenGL blobs provided by ST.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] Running Weston on stm32mp157c-dk2
  2020-09-10  9:41     ` Thomas Petazzoni
@ 2020-09-10  9:44       ` Andrey Nechypurenko
  2020-09-14  9:10         ` Andrey Nechypurenko
  0 siblings, 1 reply; 9+ messages in thread
From: Andrey Nechypurenko @ 2020-09-10  9:44 UTC (permalink / raw)
  To: buildroot

On Thu, 10 Sep 2020 at 11:41, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> On Thu, 10 Sep 2020 11:40:29 +0200
> Andrey Nechypurenko <andreynech@gmail.com> wrote:
>
> > > Which OpenGL implementation are you trying to use? The proprietary
> > > blobs from Vivante, or the open-source Etnaviv implementation? I don't
> > > know if the latter was tested on STM32MP157.
> >
> > Good question. In fact, I am not sure :-) . So I guess it is Etnaviv
> > because I did nothing to add proprietary blobs. I will check it out
> > and see what is used by Yocto-based distribution provided by STM where
> > Weston works.
>
> In Buildroot, the package package/gcnano-binaries/ will give you the
> proprietary OpenGL blobs provided by ST.

Cool! Thanks for the hint! Would probably never find it on my own :-)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] Running Weston on stm32mp157c-dk2
  2020-09-10  9:44       ` Andrey Nechypurenko
@ 2020-09-14  9:10         ` Andrey Nechypurenko
  2020-09-14 11:21           ` Thomas Petazzoni
  0 siblings, 1 reply; 9+ messages in thread
From: Andrey Nechypurenko @ 2020-09-14  9:10 UTC (permalink / raw)
  To: buildroot

On Thu, 10 Sep 2020 at 11:44, Andrey Nechypurenko <andreynech@gmail.com> wrote:
>
> On Thu, 10 Sep 2020 at 11:41, Thomas Petazzoni
> <thomas.petazzoni@bootlin.com> wrote:
> >
> > On Thu, 10 Sep 2020 11:40:29 +0200
> > Andrey Nechypurenko <andreynech@gmail.com> wrote:
> >
> > > > Which OpenGL implementation are you trying to use? The proprietary
> > > > blobs from Vivante, or the open-source Etnaviv implementation? I don't
> > > > know if the latter was tested on STM32MP157.
> > >
> > > Good question. In fact, I am not sure :-) . So I guess it is Etnaviv
> > > because I did nothing to add proprietary blobs. I will check it out
> > > and see what is used by Yocto-based distribution provided by STM where
> > > Weston works.
> >
> > In Buildroot, the package package/gcnano-binaries/ will give you the
> > proprietary OpenGL blobs provided by ST.

Selecting the gcnano-binaries package leads to the following compile errors.
This time "make clean" does not help unfortunately :-) .
If someone has an idea how to fix these errors, I would appreciate the hint.

  CC [M]  /home/andreynech/p2_build/build/gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed/./hal/os/linux/kernel/gc_hal_kernel_device.o
  CC [M]  /home/andreynech/p2_build/build/gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed/./hal/os/linux/kernel/gc_hal_kernel_linux.o
  CC [M]  /home/andreynech/p2_build/build/gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed/./hal/os/linux/kernel/gc_hal_kernel_math.o
  CC [M]  /home/andreynech/p2_build/build/gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed/./hal/os/linux/kernel/gc_hal_kernel_os.o
  CC [M]  /home/andreynech/p2_build/build/gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed/./hal/os/linux/kernel/gc_hal_kernel_debugfs.o
  CC [M]  /home/andreynech/p2_build/build/gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed/./hal/os/linux/kernel/gc_hal_kernel_allocator.o
  CC [M]  /home/andreynech/p2_build/build/gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed/./hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_user_memory.o
  CC [M]  /home/andreynech/p2_build/build/gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed/./hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_dma.o
  CC [M]  /home/andreynech/p2_build/build/gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed/./hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_gfp.o
  CC [M]  /home/andreynech/p2_build/build/gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed/./hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_reserved_mem.o
  CC [M]  /home/andreynech/p2_build/build/gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed/./hal/os/linux/kernel/gc_hal_kernel_driver.o
/home/andreynech/p2_build/build/gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed/./hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_dma.c:
In function ?_DmaAlloc?:
/home/andreynech/p2_build/build/gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed/./hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_dma.c:167:11:
error: implicit declaration of function ?dma_alloc_writecombine?; did
you mean ?pgprot_writecombine??
[-Werror=implicit-function-declaration]
  167 |         = dma_alloc_writecombine(galcore_device, NumPages *
PAGE_SIZE,  &mdlPriv->dmaHandle, gfp);
      |           ^~~~~~~~~~~~~~~~~~~~~~
      |           pgprot_writecombine
/home/andreynech/p2_build/build/gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed/./hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_dma.c:167:9:
error: assignment to ?gctPOINTER? {aka ?void *?} from ?int? makes
pointer from integer without a cast [-Werror=int-conversion]
  167 |         = dma_alloc_writecombine(galcore_device, NumPages *
PAGE_SIZE,  &mdlPriv->dmaHandle, gfp);
      |         ^
/home/andreynech/p2_build/build/gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed/./hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_dma.c:
In function ?_DmaFree?:
/home/andreynech/p2_build/build/gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed/./hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_dma.c:288:5:
error: implicit declaration of function ?dma_free_writecombine?; did
you mean ?pgprot_writecombine??
[-Werror=implicit-function-declaration]
  288 |     dma_free_writecombine(galcore_device, Mdl->numPages *
PAGE_SIZE, mdlPriv->kvaddr, mdlPriv->dmaHandle);
      |     ^~~~~~~~~~~~~~~~~~~~~
      |     pgprot_writecombine
/home/andreynech/p2_build/build/gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed/./hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_dma.c:
In function ?_DmaMmap?:
/home/andreynech/p2_build/build/gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed/./hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_dma.c:324:9:
error: implicit declaration of function ?dma_mmap_writecombine?
[-Werror=implicit-function-declaration]
  324 |     if (dma_mmap_writecombine(gcvNULL,
      |         ^~~~~~~~~~~~~~~~~~~~~
  CC [M]  /home/andreynech/p2_build/build/gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed/./hal/os/linux/kernel/platform/st/gc_hal_kernel_platform_st.o
cc1: all warnings being treated as errors
make[3]: *** [scripts/Makefile.build:265:
/home/andreynech/p2_build/build/gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed/./hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_dma.o]
Error 1
make[3]: *** Waiting for unfinished jobs....
  CC [M]  /home/andreynech/p2_build/build/gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed/./hal/os/linux/kernel/allocator/default/gc_hal_kernel_allocator_dmabuf.o
make[2]: *** [Makefile:1690:
/home/andreynech/p2_build/build/gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed/.]
Error 2
make[1]: *** [package/pkg-generic.mk:270:
/home/andreynech/p2_build/build/gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed/.stamp_built]
Error 2
make: *** [Makefile:23: _all] Error 2

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] Running Weston on stm32mp157c-dk2
  2020-09-14  9:10         ` Andrey Nechypurenko
@ 2020-09-14 11:21           ` Thomas Petazzoni
  2020-09-15 19:32             ` Andrey Nechypurenko
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2020-09-14 11:21 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 14 Sep 2020 11:10:41 +0200
Andrey Nechypurenko <andreynech@gmail.com> wrote:

> Selecting the gcnano-binaries package leads to the following compile errors.
> This time "make clean" does not help unfortunately :-) .
> If someone has an idea how to fix these errors, I would appreciate the hint.

Which Linux kernel are you using ?

Indeed, the gcnano-binaries kernel module is tested by ST to work with
the ST-provided kernel.

However, Buildroot's stm32mp157c_dk2_defconfig uses the upstream Linux
kernel. With some effort, it should be possible to get the
gcnano-binaries kernel module to build/work with the upstream kernel,
but I'm not too surprised it is not "immediate".

Otherwise, you can switch to the ST-provided kernel.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] Running Weston on stm32mp157c-dk2
  2020-09-14 11:21           ` Thomas Petazzoni
@ 2020-09-15 19:32             ` Andrey Nechypurenko
  2020-09-15 19:41               ` Thomas Petazzoni
  0 siblings, 1 reply; 9+ messages in thread
From: Andrey Nechypurenko @ 2020-09-15 19:32 UTC (permalink / raw)
  To: buildroot

Hello Thomas,

On Mon, 14 Sep 2020 at 13:21, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello,
>
> On Mon, 14 Sep 2020 11:10:41 +0200
> Andrey Nechypurenko <andreynech@gmail.com> wrote:
>
> > Selecting the gcnano-binaries package leads to the following compile errors.
> > This time "make clean" does not help unfortunately :-) .
> > If someone has an idea how to fix these errors, I would appreciate the hint.
>
> Which Linux kernel are you using ?

I am using my defconfig which is slightly modified
stm32mp157c_dk2_defconfig (mainly added some packages). Kernel-related
things are the same as in original stm32mp157c_dk2_defconfig:

BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.26"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_P2_PATH)/board/stm32mp157c-dk2-dev/linux.config"

So it is vanilla kernel.

Are you eventually aware about any activities from STM or whoever else
to integrate required changes in mainline kernel/Buildroot? I would be
glad to help but not sure that I have enough knowledge to do it on my
own.

Regards,
Andrey.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] Running Weston on stm32mp157c-dk2
  2020-09-15 19:32             ` Andrey Nechypurenko
@ 2020-09-15 19:41               ` Thomas Petazzoni
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2020-09-15 19:41 UTC (permalink / raw)
  To: buildroot

On Tue, 15 Sep 2020 21:32:46 +0200
Andrey Nechypurenko <andreynech@gmail.com> wrote:

> I am using my defconfig which is slightly modified
> stm32mp157c_dk2_defconfig (mainly added some packages). Kernel-related
> things are the same as in original stm32mp157c_dk2_defconfig:
> 
> BR2_LINUX_KERNEL=y
> BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.26"
> BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
> BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL_P2_PATH)/board/stm32mp157c-dk2-dev/linux.config"
> 
> So it is vanilla kernel.
> 
> Are you eventually aware about any activities from STM or whoever else
> to integrate required changes in mainline kernel/Buildroot? I would be
> glad to help but not sure that I have enough knowledge to do it on my
> own.

It's not about "integrating changes in mainline kernel", because the
mainline kernel doesn't accept kernel code to support closed-source
OpenGL implementations.

What however could be done is to fix the build of the out-of-tree
kernel module that is provided in gcnano-binaries, so that it works
with an upstream kernel.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-09-15 19:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-09 16:08 [Buildroot] Running Weston on stm32mp157c-dk2 Andrey Nechypurenko
2020-09-09 20:11 ` Thomas Petazzoni
2020-09-10  9:40   ` Andrey Nechypurenko
2020-09-10  9:41     ` Thomas Petazzoni
2020-09-10  9:44       ` Andrey Nechypurenko
2020-09-14  9:10         ` Andrey Nechypurenko
2020-09-14 11:21           ` Thomas Petazzoni
2020-09-15 19:32             ` Andrey Nechypurenko
2020-09-15 19:41               ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.