wic: Add RootfsPlugin

Implement RootfsPlugin class. The do_prepare_partition() method
is implemented using code in Wic_PartData class.

This class have 'rootfs' name, which is the name that should
be used in the --source parameters of the .wks partition commands.

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
wic: Hook up RootfsPlugin plugin

Remove the 'rootfs' case when internal call code is used and
replace to call the general-purpose plugin.

For now RootfsPluing class continues to invoke prepare_rootfs()
method from Wic_PartData. However RootfsPlugin could implement them.

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
wic: Add rootfs_dir argument to do_prepare_partition() method

The do_prepare_partition() method from RootfsPlugin class need
to know what will be the rootfs_dir. This makes sense when .wks
file has a partition set up like this:

  part /standby --source rootfs --rootfs=<special rootfs> ...

then do_prepare_partition() will work with the correct rootfs.

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
wic: Use partition label to be part of rootfs filename

When a partition from .wks file is set up like this:

  part /standby --source rootfs --rootfs=<special rootfs> ... --label \
    --label secondary

This means that 'rootfs' must use '<special rootfs>' as rootfs and
the default partition filename in /var/tmp/wic/build/ will be create
using the '--label' as part of the name. E.g:

  /var/tmp/wic/build/rootfs_secondary.ext3

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
wic: Add option --rootfs to --source

The '--rootfs' option is optional and only takes efect is a
partition is set up like this:

  part /standby --source rootfs --rootfs=<special rootfs> ...

So '--rootfs' is used instead of bitbake ROOTFS_DIR variable or
'-r' param.

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
acpica: Add recipe for latest version

This is now used by multiple architectures and is useful when working
with firmware. I'd love to see more BSPs shipping working firmware
builds and this should bring us a step closer to that.

(From OE-Core rev: 014b719b0a138bea2e13adb85a84497cbc2027a3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
autotools: Enable separate builddir by default

(From OE-Core rev: 4c426fe75866f9d27f84971e23440bf6c7e23fb6)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
pulseaudio: Upgrade 4.0 -> 5.0

bluetooth-proximity has been removed in 5.0

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
perf: add libexec and traceevent to packages

Recent versions of perf may install files into /usr/libexec/perf-core and in
/usr/lib/traceevent. To avoid packaging QA errors, we add these two
directories to the FILES variables.

We also add: INHIBIT_PACKAGE_DEBUG_SPLIT="1" to avoid the following issue
(due to a trailing / being removed):

   ERROR: debugedit failed with exit code 256
   ...
   debugedit: canonicalization unexpectedly shrank by one character

And finally, we must ensure that the traceevent libraries are installed to
the proper multilib library path. If building some multlibs, the incorrect
library path will be selected by perf, since it triggers via: ifeq
($(ARCH),x86_64) (or similiar mechanism per arch).

In a 32 bit build, with a 64 bit multilib, the arch won't match and the
detection of a 64 bit build (and library) are not exected. To ensure that
libraries are installed to the correct location, we can make the substitution
in the config/Makefile. For non multilib builds, this has no impact.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
classes/archive*.bbclass: remove archive-*-source.bbclass

Nearly all of the codes in the following 3 files are the same, we can
move the code to archiver.bbclass and remove them:

  archive-configured-source.bbclass
  archive-original-source.bbclass
  archive-patched-source.bbclass

[YOCTO #5113]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
archiver.bbclass: refactor it

The archiver didn't work, and there were a few problems, for example:
1) There was no src_dir.org (or orig), but the diff command still use it
2) There were a few duplicated code
3) It didn't archive the source for the native or gcc
4) The work flow is not very well
5) The "subprocess.call('fakeroot cp xxxx'" should be removed
6) And others ...

So that we have to refactor it, the benefits are:
1) Fix the problems and make it work well.
2) Reduce more than 300 lines
3) Make it easy to use.

Hre are the explanation about the bbclass:
This bbclass is used for creating archive for:
1) original (or unpacked) source: ARCHIVER_MODE[src] = "original"
2) patched source: ARCHIVER_MODE[src] = "patched" (default)
3) configured source: ARCHIVER_MODE[src] = "configured"
4) The patches between do_unpack and do_patch:
   ARCHIVER_MODE[diff] = "1"
   And you can set the one that you'd like to exclude from the diff:
   ARCHIVER_MODE[diff-exclude] ?= ".pc autom4te.cache patches"
5) The environment data, similar to 'bitbake -e recipe':
   ARCHIVER_MODE[dumpdata] = "1"
6) The recipe (.bb and .inc): ARCHIVER_MODE[recipe] = "1"

All of the above can be packed into a .src.rpm package: (when PACKAGES
!= "")
ARCHIVER_MODE[srpm] = "1"

[YOCTO #4986]
[YOCTO #5113]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package_rpm.bbclass: archive the source to srpm package

The archiver.bbclass will put the sources to ARCHIVER_OUTDIR according
to configuration, then the rpmbuild -bs will create the srpm.

[YOCTO #4986]
[YOCTO #5113]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
archiver.bbclass: move a few code to copyleft_compliance.bbclass

Move the code which is only used by copyleft_compliance.bbclass from
archiver.bbclassc, and remove the "inherit archiver" from
copyleft_compliance.bbclass.

The archiver.bbclass is used for archiving various types of sources, but
the copyleft_compliance.bbclass is used for analysing the license, they
don't have much relationships.

[YOCTO #4986]
[YOCTO #5113]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
libsdl: add missing libglu dependency for openGL

Configure checks for glu.h to determine if openGL is available.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>