mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 13:46:32 +00:00
manual: update the virtual package section with the new infrastructure
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr> Cc: Samuel Martin <s.martin49@gmail.com> Reviewed-by: Samuel Martin <s.martin49@gmail.com> Acked-by: Eric Le Bihan <eric.le.bihan.dev@free.fr> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
7439824412
commit
e92e0fd347
@ -1,10 +1,10 @@
|
|||||||
// -*- mode:doc; -*-
|
// -*- mode:doc; -*-
|
||||||
// vim: set syntax=asciidoc:
|
// vim: set syntax=asciidoc:
|
||||||
|
|
||||||
[[virtual-package-tutorial]]
|
Infrastructure for virtual packages
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Virtual package tutorial
|
[[virtual-package-tutorial]]
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
In Buildroot, a virtual package is a package whose functionalities are
|
In Buildroot, a virtual package is a package whose functionalities are
|
||||||
provided by one or more packages, referred to as 'providers'. The virtual
|
provided by one or more packages, referred to as 'providers'. The virtual
|
||||||
@ -16,6 +16,9 @@ The implementation of this API is different for the 'Allwinner Tech Sunxi' and
|
|||||||
the 'Texas Instruments OMAP35xx' plaftorms. So +libgles+ will be a virtual
|
the 'Texas Instruments OMAP35xx' plaftorms. So +libgles+ will be a virtual
|
||||||
package and +sunxi-mali+ and +ti-gfx+ will be the providers.
|
package and +sunxi-mali+ and +ti-gfx+ will be the providers.
|
||||||
|
|
||||||
|
+virtual-package+ tutorial
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
In the following example, we will explain how to add a new virtual package
|
In the following example, we will explain how to add a new virtual package
|
||||||
('something-virtual') and a provider for it ('some-provider').
|
('something-virtual') and a provider for it ('some-provider').
|
||||||
|
|
||||||
@ -42,7 +45,7 @@ providers.
|
|||||||
Virtual package's +*.mk+ file
|
Virtual package's +*.mk+ file
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
The Makefile +package/something-virtual/something-virtual.mk+ should contain:
|
The +.mk+ for the virtual package should just evaluate the +virtual-package+ macro:
|
||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
01: ################################################################################
|
01: ################################################################################
|
||||||
@ -51,20 +54,11 @@ The Makefile +package/something-virtual/something-virtual.mk+ should contain:
|
|||||||
04: #
|
04: #
|
||||||
05: ################################################################################
|
05: ################################################################################
|
||||||
06:
|
06:
|
||||||
07: SOMETHING_VIRTUAL_SOURCE =
|
07: $(eval $(virtual-package))
|
||||||
08: SOMETHING_VIRTUAL_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_SOMETHING_VIRTUAL))
|
|
||||||
09:
|
|
||||||
10: ifeq ($(BR2_PACKAGE_HAS_SOMETHING_VIRTUAL),y)
|
|
||||||
11: ifeq ($(SOMETHING_VIRTUAL_DEPENDENCIES),)
|
|
||||||
12: $(error No something-virtual implementation selected. Configuration error.)
|
|
||||||
13: endif
|
|
||||||
14: endif
|
|
||||||
15:
|
|
||||||
16: $(eval $(generic-package))
|
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
The Makefile is quite small as it will only check if a provider for the
|
The ability to have target and host packages is also available, with the
|
||||||
virtual package has been selected.
|
+host-virtual-package+ macro.
|
||||||
|
|
||||||
Provider's +Config.in+ file
|
Provider's +Config.in+ file
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
Loading…
x
Reference in New Issue
Block a user