]> code.ossystems Code Review - meta-freescale.git/commit
fsl-dynamic-packagearch.bbclass: Dynamically set package architecture
authorOtavio Salvador <otavio@ossystems.com.br>
Sun, 22 Sep 2013 23:12:55 +0000 (20:12 -0300)
committerOtavio Salvador <otavio@ossystems.com.br>
Wed, 25 Sep 2013 18:28:34 +0000 (15:28 -0300)
commit2513a370804a628c72a57b873e09a071d77f5e8a
treeefc7648137b2c5adc32763849410525baab52328
parentc49a12d28c76139e3c4a1f2f0ca0e32bf663b0a4
fsl-dynamic-packagearch.bbclass: Dynamically set package architecture

This allow to easy reuse of binary packages among similar SoCs. The
usual use for this is to share SoC specific packages among different
boards. The class can be used to share GPU packages for i.MX53 boards
(as all them share the AMD GPU) and i.MX6 based boards (as all them
share Vivante GPU).

It inspects the database and identify if the package provides or
depends on one of subarch provided values and if it does, it sets the
PACKAGE_ARCH for MACHINE_SUBARCH value otherwise if it matches in the
machine specific filter, it sets it to MACHINE_ARCH.

This reduces the amount of packages we build, for example in case of
core-image-x11 we:

$ ls -l tmp/deploy/rpm/cortexa9hf_vfp_neon_mx6/*.rpm | wc -l
75

So we reuse 75 binaries; these would be build otherwise.

It being dynamically set or statically set it has following benefits:

* correctness: it is easier to ensure the system behaves as expected
* correctness for non-tracked recipes: new recipes, if depending on
  virtual/kernel or GPU has the right architecture choosen, without a
  .bbappend file for them
* safeness: non-expert users get a more adequate behavior as the
  complexity of choosing the right architecture is simplified for them
* easy maintenance: it is easier for me, as maintainer, to maintain a
  code which decides what to do than having hundreds of bbappend files
  for it

Change-Id: Icb0a8060e862c8eeb166c45d1b39c40de07b01d8
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
meta-fsl-arm/classes/fsl-dynamic-packagearch.bbclass [new file with mode: 0644]