All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Building the Rockchip libv4l plugin
@ 2018-07-02  8:22 Baruch Siach
  2018-07-02  8:43 ` Nicolas Cavallari
  2018-07-02 19:16 ` Peter Seiderer
  0 siblings, 2 replies; 7+ messages in thread
From: Baruch Siach @ 2018-07-02  8:22 UTC (permalink / raw)
  To: buildroot

Hi Buildroot list,

I'm trying to build the Rockchip libv4l2 plugin in Buildroot. The source is at

  https://chromium.googlesource.com/chromiumos/third_party/libv4lplugins/+/master/libv4l-rockchip_v2/

As upstream indicated[1], the code is meant to build as part of libv4l, not as 
a standalone library. ChromiumOS sees to copy the code into the libv4l source 
tree, and modify the relevant build configuration files[2].

What would be the best way to do that in Buildroot? A symlink to the plugin 
source tree? Copy of the code to libv4l?

Is there any other package doing something similar?

Thanks,
baruch

[1] http://lists.infradead.org/pipermail/linux-rockchip/2018-July/021107.html

[2] https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/master/media-libs/libv4lplugins/libv4lplugins-9999.ebuild

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

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

* [Buildroot] Building the Rockchip libv4l plugin
  2018-07-02  8:22 [Buildroot] Building the Rockchip libv4l plugin Baruch Siach
@ 2018-07-02  8:43 ` Nicolas Cavallari
  2018-07-03  3:34   ` Baruch Siach
  2018-07-02 19:16 ` Peter Seiderer
  1 sibling, 1 reply; 7+ messages in thread
From: Nicolas Cavallari @ 2018-07-02  8:43 UTC (permalink / raw)
  To: buildroot

On 02/07/2018 10:22, Baruch Siach wrote:
> Hi Buildroot list,
> 
> I'm trying to build the Rockchip libv4l2 plugin in Buildroot. The source is at
> 
>   https://chromium.googlesource.com/chromiumos/third_party/libv4lplugins/+/master/libv4l-rockchip_v2/
> 
> As upstream indicated[1], the code is meant to build as part of libv4l, not as 
> a standalone library. ChromiumOS sees to copy the code into the libv4l source 
> tree, and modify the relevant build configuration files[2].
> 
> What would be the best way to do that in Buildroot? A symlink to the plugin 
> source tree? Copy of the code to libv4l?
> 
> Is there any other package doing something similar?

nginx comes to mind, the nginx-dav-ext/nginx-naxsi/nginx-upload packages are
built by the nginx package.

However, the build system already supports this and the nginx module source does
not need to be moved, so it's not exactly the same thing.

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

* [Buildroot] Building the Rockchip libv4l plugin
  2018-07-02  8:22 [Buildroot] Building the Rockchip libv4l plugin Baruch Siach
  2018-07-02  8:43 ` Nicolas Cavallari
@ 2018-07-02 19:16 ` Peter Seiderer
  2018-07-03  3:37   ` Baruch Siach
  1 sibling, 1 reply; 7+ messages in thread
From: Peter Seiderer @ 2018-07-02 19:16 UTC (permalink / raw)
  To: buildroot

Hello Baruch,

On Mon, 2 Jul 2018 11:22:11 +0300, Baruch Siach <baruch@tkos.co.il> wrote:

> Hi Buildroot list,
> 
> I'm trying to build the Rockchip libv4l2 plugin in Buildroot. The source is at
> 
>   https://chromium.googlesource.com/chromiumos/third_party/libv4lplugins/+/master/libv4l-rockchip_v2/
> 
> As upstream indicated[1], the code is meant to build as part of libv4l, not as 
> a standalone library. ChromiumOS sees to copy the code into the libv4l source 
> tree, and modify the relevant build configuration files[2].
> 
> What would be the best way to do that in Buildroot? A symlink to the plugin 
> source tree? Copy of the code to libv4l?

...or add a configure.ac/configure file to the source?

Regards,
Peter

> 
> Is there any other package doing something similar?
> 
> Thanks,
> baruch
> 
> [1] http://lists.infradead.org/pipermail/linux-rockchip/2018-July/021107.html
> 
> [2] https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/master/media-libs/libv4lplugins/libv4lplugins-9999.ebuild
> 

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

* [Buildroot] Building the Rockchip libv4l plugin
  2018-07-02  8:43 ` Nicolas Cavallari
@ 2018-07-03  3:34   ` Baruch Siach
  0 siblings, 0 replies; 7+ messages in thread
From: Baruch Siach @ 2018-07-03  3:34 UTC (permalink / raw)
  To: buildroot

Hi Nicolas,

On Mon, Jul 02, 2018 at 10:43:25AM +0200, Nicolas Cavallari wrote:
> On 02/07/2018 10:22, Baruch Siach wrote:
> > I'm trying to build the Rockchip libv4l2 plugin in Buildroot. The source 
> > is at
> > 
> >   https://chromium.googlesource.com/chromiumos/third_party/libv4lplugins/+/master/libv4l-rockchip_v2/
> > 
> > As upstream indicated[1], the code is meant to build as part of libv4l, not as 
> > a standalone library. ChromiumOS sees to copy the code into the libv4l source 
> > tree, and modify the relevant build configuration files[2].
> > 
> > What would be the best way to do that in Buildroot? A symlink to the plugin 
> > source tree? Copy of the code to libv4l?
> > 
> > Is there any other package doing something similar?
> 
> nginx comes to mind, the nginx-dav-ext/nginx-naxsi/nginx-upload packages are
> built by the nginx package.

Thanks. I took the idea of a package that only extract sources.

> However, the build system already supports this and the nginx module source 
> does not need to be moved, so it's not exactly the same thing.

Right. libv4l does not support building plugins from out of tree directories. 
Symlink doesn't work either, because build system is looking for libtool in 
the upper directory. So in the end I had to copy to code.

Thanks,
baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

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

* [Buildroot] Building the Rockchip libv4l plugin
  2018-07-02 19:16 ` Peter Seiderer
@ 2018-07-03  3:37   ` Baruch Siach
  2018-07-03 20:37     ` Peter Seiderer
  0 siblings, 1 reply; 7+ messages in thread
From: Baruch Siach @ 2018-07-03  3:37 UTC (permalink / raw)
  To: buildroot

Hi peter,

On Mon, Jul 02, 2018 at 09:16:35PM +0200, Peter Seiderer wrote:
> On Mon, 2 Jul 2018 11:22:11 +0300, Baruch Siach <baruch@tkos.co.il> wrote:
> > I'm trying to build the Rockchip libv4l2 plugin in Buildroot. The source 
> > is at
> > 
> >   https://chromium.googlesource.com/chromiumos/third_party/libv4lplugins/+/master/libv4l-rockchip_v2/
> > 
> > As upstream indicated[1], the code is meant to build as part of libv4l, not as 
> > a standalone library. ChromiumOS sees to copy the code into the libv4l source 
> > tree, and modify the relevant build configuration files[2].
> > 
> > What would be the best way to do that in Buildroot? A symlink to the plugin 
> > source tree? Copy of the code to libv4l?
> 
> ...or add a configure.ac/configure file to the source?

Unfortunately the plugin really needs internal libv4l headers, so this is not 
possible.

Thanks,
baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

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

* [Buildroot] Building the Rockchip libv4l plugin
  2018-07-03  3:37   ` Baruch Siach
@ 2018-07-03 20:37     ` Peter Seiderer
  2018-07-04  4:16       ` Baruch Siach
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Seiderer @ 2018-07-03 20:37 UTC (permalink / raw)
  To: buildroot

Hello Baruch,

On Tue, 3 Jul 2018 06:37:09 +0300, Baruch Siach <baruch@tkos.co.il> wrote:

> Hi peter,
> 
> On Mon, Jul 02, 2018 at 09:16:35PM +0200, Peter Seiderer wrote:
> > On Mon, 2 Jul 2018 11:22:11 +0300, Baruch Siach <baruch@tkos.co.il> wrote:  
> > > I'm trying to build the Rockchip libv4l2 plugin in Buildroot. The source 
> > > is at
> > > 
> > >   https://chromium.googlesource.com/chromiumos/third_party/libv4lplugins/+/master/libv4l-rockchip_v2/
> > > 
> > > As upstream indicated[1], the code is meant to build as part of libv4l, not as 
> > > a standalone library. ChromiumOS sees to copy the code into the libv4l source 
> > > tree, and modify the relevant build configuration files[2].
> > > 
> > > What would be the best way to do that in Buildroot? A symlink to the plugin 
> > > source tree? Copy of the code to libv4l?  
> > 
> > ...or add a configure.ac/configure file to the source?  
> 
> Unfortunately the plugin really needs internal libv4l headers, so this is not 
> possible.

Something like the following (quick hack) patch, done the following first (should be added to libv4l):
 
	$ mkdir staging/usr/include/libv4l-1.14.2
	$ cp build/libv4l-1.14.2/config.h staging/usr/include/libv4l-1.14.2/

But failes with:

libv4l-encplugin-rockchip.c: In function ?ioctl_qbuf_locked?:
libv4l-encplugin-rockchip.c:392:8: error: ?struct v4l2_buffer? has no member named ?config_store?
  buffer->config_store = buffer->index + 1;
        ^~
libv4l-encplugin-rockchip.c: In function ?set_encoder_config_locked?:
libv4l-encplugin-rockchip.c:662:11: error: ?struct v4l2_ext_controls? has no member named ?config_store?
  ext_ctrls.config_store = buffer_index + 1;
           ^

Regards,
Peter

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

* [Buildroot] Building the Rockchip libv4l plugin
  2018-07-03 20:37     ` Peter Seiderer
@ 2018-07-04  4:16       ` Baruch Siach
  0 siblings, 0 replies; 7+ messages in thread
From: Baruch Siach @ 2018-07-04  4:16 UTC (permalink / raw)
  To: buildroot

Hi Peter,

On Tue, Jul 03, 2018 at 10:37:43PM +0200, Peter Seiderer wrote:
> On Tue, 3 Jul 2018 06:37:09 +0300, Baruch Siach <baruch@tkos.co.il> wrote:
> > On Mon, Jul 02, 2018 at 09:16:35PM +0200, Peter Seiderer wrote:
> > > On Mon, 2 Jul 2018 11:22:11 +0300, Baruch Siach <baruch@tkos.co.il> wrote:  
> > > > I'm trying to build the Rockchip libv4l2 plugin in Buildroot. The source 
> > > > is at
> > > > 
> > > >   https://chromium.googlesource.com/chromiumos/third_party/libv4lplugins/+/master/libv4l-rockchip_v2/
> > > > 
> > > > As upstream indicated[1], the code is meant to build as part of libv4l, not as 
> > > > a standalone library. ChromiumOS sees to copy the code into the libv4l source 
> > > > tree, and modify the relevant build configuration files[2].
> > > > 
> > > > What would be the best way to do that in Buildroot? A symlink to the plugin 
> > > > source tree? Copy of the code to libv4l?  
> > > 
> > > ...or add a configure.ac/configure file to the source?  
> > 
> > Unfortunately the plugin really needs internal libv4l headers, so this is not 
> > possible.
> 
> Something like the following (quick hack) patch, done the following first (should be added to libv4l):

Thanks for doing that. You can see my solution below. The libv4l patch fixes 
the build issue that you encountered. Not sure which solution is cleaner. The 
libv4l patch looks problematic, unless we apply it conditionally. Not good.

I'm not sure I'll continue pursuing this path. Upstream response[1] means that 
some non trivial kernel change are required to make it work with anything 
other than ChromeOS kernels.

baruch

[1] http://lists.infradead.org/pipermail/linux-rockchip/2018-July/021133.html

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

end of thread, other threads:[~2018-07-04  4:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-02  8:22 [Buildroot] Building the Rockchip libv4l plugin Baruch Siach
2018-07-02  8:43 ` Nicolas Cavallari
2018-07-03  3:34   ` Baruch Siach
2018-07-02 19:16 ` Peter Seiderer
2018-07-03  3:37   ` Baruch Siach
2018-07-03 20:37     ` Peter Seiderer
2018-07-04  4:16       ` Baruch Siach

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.