Commit Graph

124 Commits

Author SHA1 Message Date
Richard Purdie 093dec12e6 package/image.bbclass: Fix multilib rprovides
allarch multilib recipes are meant to provide a list of different multilib variants.
Unfortunately since the pkgdata also has mappings for these, they get mapped back to
the original package name which means the effect is undone at package creation time
when the remapping code is called.

This patch adds in a conditional to break that chain meaning the packages get
the correct RPROVIDES and image builds work correctly with opkg.

[YOCTO #3453]

(From OE-Core rev: 1a1927f8a04fe0a2b3b853ebdd33ccb807f00b59)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-13 23:49:28 +01:00
Laurentiu Palcu 51f8dffecc image.bbclass: fix postinstall intercepts fallback
The wrong type of paranthesis was used so 'continue' did nothing (was in
another context) and the packages were marked as installed.

(From OE-Core rev: 0bdde53e885aae3506c7b070b6e21f64a7cd4115)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-08 16:56:46 +01:00
Richard Purdie 354bb63f02 image.bbclass: Drop legacy export of IMAGE_BASENAME
We used to export this in the days an external script handled the image
generation. This is no longer the case and hence we no longer need this
export.

(From OE-Core rev: 919613c0e75362ee0eace99b51cc77d34a05372f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-18 13:18:21 +00:00
Chen Qi 142ae3bb06 image.bbclass: add a hook funtion to support readonly rootfs
read_only_rootfs_hook: this funtion is invoked only if 'read-only-rootfs'
is in IMAGE_FEATURES. It tweaks some basic files and makes populate-
volatile.sh script run at rootfs time.

For now, it has real effect only if the init system is sysvinit.

[YOCTO #3406]

(From OE-Core rev: cae51a169e37b54becc08162aaa643acd53ffe2f)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-07 11:20:02 +00:00
Richard Purdie 44260c2c48 populate_sdk_base/image: Fix races for variable mappings
When using the -c populate_sdk option, images are not generated quite as
they should be under certain circumstances. For example the dropbear
feature may not get replaced with openssh, leading to both being installed
with an appropriate rootfs failure.

This patch moves the remapping logic to later points in the code, ensuring
there is no conflict. The result is slightly simpler too as an added bonus.

[YOCTO #3749]

(From OE-Core rev: 90cfa16bd4a02ada84ef94f6ae6f182beb8bdc01)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-05 13:14:57 +00:00
Mark Hatle 86d6ec51f0 module.bbclass: Create a new depmodwrapper to assist cross-installs
Previously the build path to STAGING_KERNEL_DIR was being embedded into the
package post install scripts.  We avoid this behavior by generating a special
depmodwrapper script.  This script contains that hard-coded path, ensuring
that re-use of the sstate-cache (and/or packages) will always run through the
wrapper generated by the current build with a checksum that includes
STAGING_KERNEL_DIR.

[ YOCTO #3962 ]

(From OE-Core rev: b18c61bae4d7161c087a004bba3c696006f7a2f6)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-01 14:44:40 +00:00
Laurentiu Palcu 6cca7efa6f image.bbclass: add fall-back functionality when running intercepts
If an intercept script fails, it would be helpful to fall-back to
running the postinstall on target's first boot. In order to achieve
that, the postinstalls that install a host intercept hook will have to
return 1, so that the postinstall is marked as unpacked only. If the
intercept hook fails, then we're ok, the postinstalls will be run on
target anyway. If it succeeds, then mark the packages as installed.

This logic was chosen mainly because of rpm backend which saves the
failed postinstalls in /etc/rpm-postinsts. Hence, in order to mark the
packages as installed, all we have to do is delete the scriptlets from
there.

(From OE-Core rev: ed8ac4ee43132ae974794038821f7ca5465ae556)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-13 16:52:28 +00:00
Richard Purdie c920f1a7cc image.bbclass: Add MLPREFIX to DEPENDS
Add MLPREFIX to DEPENDS to ensure the correct qemuwrapper is dependended upon. Its searched
for in PATH so we need to do this to ensure the correct version is present.

(From OE-Core rev: 41163fc5e6662251ec264fd5194a649342d11de1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-07 15:25:06 +00:00
Laurentiu Palcu 5479aa4869 image.bbclass: add a proper error message if hook script fails
(From OE-Core rev: 5e737d3c6e6546c1368e804f4c45ab25d8791ea3)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-06 09:37:24 +00:00
Richard Purdie 3247292683 Split do_packagedata task from do_package
Currently, do_rootfs has a dependency on all the do_package output being present
due to its usage of the pkgdata directories. This means that if you run:

bitbake xxxx-image -c rootfs

you end up having to fetch and unpack all the do_package data which is usually
large and inefficient. It also means rm_work has to leave all the do_package
data lying around so rootfs works.

This patch splits the actual creation of the pkgdata directory off into a separate
task, "packagedata" which happens immediately after do_package. We can then remap
the dependencies so this task is depended upon, not do_package. Sstate can then be
programmed not to require do_package at the appropriate times.

Whilst this patch doesn't do so, it opens the possibility of rm_work wiping
out the do_package output from WORKDIR as long as it also removed the do_package
stamp (both normal and setscene variants) and allowing more space savings
with rm_work which has been regularly requested.

(From OE-Core rev: 6107ee294afde395e39d084c33e8e94013c625a9)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 12:42:47 +00:00
Paul Eggleton 411413aa28 classes/image: improve debug-tweaks ssh server configuration
Create a single postprocessing function that enables no-password logins
for both openssh and dropbear when debug-tweaks is in IMAGE_FEATURES,
changing its behaviour slightly:
* Run it regardless of whether ssh-server-* are in IMAGE_FEATURES so
  that it still takes effect if these are installed by adding
  dropbear/openssh to IMAGE_INSTALL.
* Enable it to be run from image.bbclass rather than core-image.bbclass
  so that it works for images that are using the former.

Second half of the fix for [YOCTO #2578].

(From OE-Core rev: 0937054e6e3e02565f57e60a8bdc14b0ad62e249)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-18 13:28:05 +00:00
Enrico Scholz 41a15a9af9 image.bbclass: quote TARGET_VENDOR
The buildsystem does not install locale files anymore, when
TARGET_VENDOR is empty.  This regression was introduced by
ff01518c6667e1b6e87df4e5a435a701d0f38fa7

(From OE-Core rev: 7d64232f370817c0536412589bd4ed612f214e18)

Signed-off-by: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-07 13:50:39 +00:00
Björn Stenberg 1d2c6833ae Add a new distro feature "ptest".
This patch creates a new distro feature "ptest", which creates -ptest
packages containing the test suite of the package for running on the
target. Test files are installed in /usr/lib/<pkg>/ptest.

The patch also includes a change to automake, splitting the "make check"
target into separate steps for building and running the tests.

(From OE-Core rev: 6f92e7f8891008dd3c89325d3fbe2da853372326)

Signed-off-by: Björn Stenberg <bjst@enea.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-26 11:34:04 +00:00
Paul Eggleton 84a5c63a57 classes/image: handle multilibs in complementary package lookup
For multilib the vendor string is altered, so we need to iterate over
all of the multilib vendors when we do the glob processing for
complementary packages.

(From OE-Core rev: ff01518c6667e1b6e87df4e5a435a701d0f38fa7)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>

In addition, the RPM package arch have been munged by adding the multilib
identifier.  This identifier needs to be stripped when generating the
installed_packages list for the complementary lookup code to work.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-19 17:55:00 +00:00
Richard Purdie 0e486c7112 image/populate_sdk: Simplify imagetest inclusion and drop dummy class file
Having to include some dummy class is suboptimal and we no longer need to
do this. Also move this check to populate_sdk_base since we then don't
need to include it in toolchains specifically.

(From OE-Core rev: 2ee979ff71d31e497be856ea1443667c6d799d34)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-07 17:13:12 +00:00
Laurentiu Palcu 6b76f04195 image.bbclass: run postinst scripts once, at rootfs time
This patch will allow the repeating postinst scriptlets to be run
only once, on host, at do_rootfs time. This will lower the time for
rootfs generation and, also, instead of running some time consuming
scriptlets at target's first boot, we will do on the host.

(From OE-Core rev: 0d239328b1c6b9e4afadad75972d359181fbe1a5)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-12-06 12:31:08 +00:00
Richard Purdie 265f69a593 image.bbclass: Add missing dependency on do_package data
Since the packaging functions now reference the pkgdata files written out during
do_package, we need to reference this dependency explicitly.

(From OE-Core rev: 1e9c9d164f8d12c8de205e04bf7c1dae3660f12a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-20 15:31:49 +00:00
Mark Hatle a6359e9710 image.bbclass: Enable the complementary install to be called w/ globbing params
If the image.bbclass is called with arguments, and these arguments are not
"populate_sdk", they will be passed in as the expected GLOBS.

This enables external components and scripting to use the
rootfs_install_complementary code.

(From OE-Core rev: f44c5f227a170290f567d0a0a24baaa870048788)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-12 15:13:35 +01:00
Saul Wold 24288740d0 core-image: allow root login when debug-tweaks is enabled
This allows root to login over ssh with an empty password just like
dropbear when the debug-tweaks are enabled, it's important to disable
debug-tweaks for a production system as this will leave open a security
hole!

Thanks to Marc for the settings.
Cc: Marc Ferland <marc.ferland@gmail.com>

[Yocto #3078]

(From OE-Core rev: 13e6aa8bba6ab1ebba1efa23f94af379a8fcb6a9)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-10 13:01:52 +01:00
Paul Eggleton 2a21c83300 packagegroup-core-console: remove
This provides one package group, packagegroup-core-apps-console, which
is usually brought in by adding "apps-console-core" to IMAGE_FEATURES.
Aside from the naming inconsistencies, this is a group of mostly
unrelated packages, none of which are actually "apps". Handling each
one:

* dbus: should mostly be brought in by package runtime dependencies
* avahi-daemon: if you are using packagegroup-base (as all images that
  inherit from core-image do) this is brought in by having "zeroconf" in
  DISTRO_FEATURES.
* portmap: not very useful by itself; should be brought in by selecting
  NFS server/client through other means.
* psplash (or whatever SPLASH is set to): this has been changed to be
  an explicit item "splash" in IMAGE_FEATURES. Since this is a fairly
  fundamental feature, a piece of code has been added to automatically
  handle this for images still using apps-console-core (and show a
  warning).

(From OE-Core rev: 592d6e602466628d10704835a7b07d3d713f58e1)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-04 12:53:00 +01:00
Richard Purdie 8cb5c02167 image.bbclass: Convert runtime_mapping_rename to event handler
(From OE-Core rev: 05e67417ca3174d1f9279f0de308a9d40933b461)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-02 05:52:11 -07:00
Paul Eggleton 98b0f956e7 classes/image: add staticdev-pkgs IMAGE_FEATURES feature
Add a staticdev-pkgs feature that can be added to IMAGE_FEATURES in
order to install all staticdev packages.

Fixes [YOCTO #2531].

(From OE-Core rev: 3ba9c0757eb51a0bb5873f4faae023587a33cc1d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-29 10:16:14 +01:00
Paul Eggleton fa5640d143 Rework installation of dev, dbg, doc, and locale packages
Use a similar mechanism that was previously used to install locales at
rootfs generation time to install other "complementary" packages (e.g.
*-dev packages) - i.e. install all of the explicitly requested packages
and their dependencies, then get a list of the packages that were
installed, and use that list to install the complementary packages. This
has been implemented by using a list of globs which should make it
easier to extend in future.

The previous locale package installation code assumed that the locale
packages did not have any dependencies that were not already installed;
now that we are installing non-locale packages this is no longer
correct. In practice only the rpm backend actually made use of this
assumption, so it needed to be changed to call into the existing package
backend code to do the complementary package installation rather than
calling rpm directly.

This fixes the doc-pkgs IMAGE_FEATURES feature to work correctly, and
also ensures that all dev/dbg packages get installed for
dev-pkgs/dbg-pkgs respectively even if the dependency chains between
those packages was not ensuring that already.

The code has also been adapted to work correctly with the new
SDK-from-image functionality. To that end, an SDKIMAGE_FEATURES variable
has been added to allow specifying what extra image features should go
into the SDK (extra, because by virtue of installing all of the packages
in the image into the target part of the SDK, we already include all of
IMAGE_FEATURES) with a default value of "dev-pkgs dbg-pkgs".

Fixes [YOCTO #2614].

(From OE-Core rev: 72d1048a8381fa4a8c4c0d082047536727b4be47)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-29 10:16:14 +01:00
Robert P. J. Day 6c93f7095e image.bbclass: Fix a couple innocuous typoes, should cause no functional change
"error_promt" -> "error_prompt" changed in both places
"subfolers" -> "subfolders" since it's not referenced anyway

(From OE-Core rev: cc1f824778c023686b4ea75c64a182a138ff2267)

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-28 09:20:52 +01:00
Richard Purdie bfd279de32 Convert tab indentation in python functions into four-space
(From OE-Core rev: 604d46c686d06d62d5a07b9c7f4fa170f99307d8)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-19 10:24:50 +01:00
Lianhao Lu 286b2666dc image/core-image: Handle conflicting IMAGE_FEATURES.
IMAGE_FEATURES such as 'ssh-server-dropbear' and 'ssh-server-openssh'
can't be both enabled. User can use the following variables to define
the relationship of image features:

IMAGE_FEATURES_REPLACES_foo = "bar" means including image feature "foo"
would replace the image feature "bar".

IMAGE_FEATURES_CONFLICTS_foo = "bar" means including both image features
"foo" and "bar" would cause an parsing error.

(From OE-Core rev: e36d12a9c1cf69540079e48a1dfadbc343758e48)

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-03 14:55:01 +01:00
Mark Hatle b70c9154e4 image.bbclass: Add support to build the SDK in parallel with the image
When building an image recipe, you can now build a companion SDK by
calling the populate_sdk task:
  bitbake -c populate_sdk core-image-minimal

Note: there are still issues w/ the SDK not working completely with
multilibs.

A lock is required between rootfs and populate_sdk activities to prevent
configuration file clashes and similar package management problems in ipk
and deb based systems.  (RPM already had a lock for a different reason.)

(From OE-Core rev: a0de2a56f19ae4d8cd88e46e96917a7a019fe1ab)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-03 14:55:00 +01:00
Mark Hatle 9870fbc9f8 Fix manual log file paths
When a recent change, the path to log files may be contained within an
arbitrary directory.  To generate the manual log files in the correct path
we should be using the ${BB_LOGFILE}'s path instead of always assuming the
logs go into ${WORKDIR}/temp.

(From OE-Core rev: 779db325d407f0bade84572ef99fdad4d0c88011)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-03 14:54:57 +01:00
Richard Purdie 4147d2e52f EXTRA_IMAGEDEPENDS is used to ensure things like qemu-native are built and these are not strictly dependencies of the do_rootfs task. This patch moves them to the do_build task allowing bitbake a little more flexibility about when things need to get built by.
I noticed this when qemu-native failed to build and a rootfs was not generated
which is not the intended behaviour.

Also update the syntax to use appendVarFlag instead of get/setVarFlag

(From OE-Core rev: fa13e83ec3f91dce866ac212e91b62db24b6486d)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-02 16:47:45 +01:00
Lianhao Lu 41ed2e6532 classes/image: Allow openssh empty passwords login.
Allow empty passwords login so that the default root user can login in
through openssh.

(From OE-Core rev: 39ef0a705ca059f9a7c68aa1710c81411fb7c762)

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-28 16:26:42 +01:00
Robert Yang ea2a85035a rootfs_rpm.bbclass: save rpmlib rather than remove it
The rpmlib was removed when images that add
"remove_packaging_data_files" to ROOTFS_POSTPROCESS_COMMAND, which would
make the increment rpm image generation doesn't work in the second
build, since list_installed_packages would get incorrect value in the
second build, move the rpmlib to ${T} rather than remove it, and move it
back when INC_RPM_IMAGE_GEN =1.

[YOCTO #2440]

(From OE-Core rev: c30e79510c06701f10f659eedaa0fe785538ac17)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 11:43:23 +01:00
Richard Purdie fcd8021409 image.bbclass: Ensure ${S} is cleaned at the start of rootfs generation
Some image classes such as bootimg save files into ${S} as part of rootfs
generation. For correctness we should therefore clean this at the start of
image generation to ensure reproducibility.

I found this issue when some files I thought should disappear from my rootfs
would not disappear.

(From OE-Core rev: 363424cdc78cafa278008f973c2b4288297ebf8c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-25 11:28:49 +01:00
Khem Raj f22cf1bedf image.bbclass,kernel.bbclass: Use kmod-native instead of module-init-tools-cross
(From OE-Core rev: 74fcf61224dc3e12e753c5de793591677275dffd)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-07 16:42:47 +01:00
Richard Purdie 40f95685e6 gzip/pigz-native: Install into a prefix to avoid clashing with system binaries
Due to the system providing a copy of gzip, we face some issues when we
'shadow' that copy with our own leading to a varient of race type bugs,
and issues for example if a dependency such as libz is missing but the
binary is still present. We usually rely on our dependency logic to protect
us from this but for gzip, we don't have this protection since its not listed
by all its users (and doing so would be impractical).

This patch installed pigz and gzip into their own directory which we only
add to PATH when we explictly want these binaries in much the same way we do
with perl-native. This means dependency logic is correct when we use the binary
and everything should work well.

The patch adds an explict dependency into image.bbclass since the accelerated
speed of compression is most appreciated at rootfs time.

(From OE-Core rev: 7a98c0ef28822ae1fcee45b14db3edcfd4c7ad8f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-21 15:33:07 +00:00
Paul Eggleton c569fcee08 classes/image: avoid cp race condition when building multiple images
Avoid a race condition when building multiple images by ignoring a
failure to copy the README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt
to DEPLOY_DIR_IMAGE.

(From OE-Core rev: 5a321f5840d4ed813e2a768871b33eff433d748c)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-19 14:37:41 +00:00
Otavio Salvador f9bdcb2eb1 image.bbclass: fix rootfs generation without package management tools
When building without package management tools the
ROOTFS_BOOTSTRAP_INSTALL packages need to be available to provide the
bare minimal for rootfs unconfigure postinsts to be on first boot.

Those packages where being include in core-image.bbclass' based images
however every image needs those available for proper rootfs generation.

(From OE-Core rev: 4f2845739fc7a1f2c784f4d3be048ee111e7d093)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-13 11:45:08 +00:00
Richard Purdie 06f2f8ce0a meta: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)
Using "1" with getVar is bad coding style and "True" is preferred.
This patch is a sed over the meta directory of the form:

sed \
 -e 's:\(\.getVar([^,()]*, \)1 *):\1True):g' \
 -e 's:\(\.getVarFlag([^,()]*, [^,()]*, \)1 *):\1True):g' \
 -i `grep -ril getVar *`

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-05 10:22:56 -08:00
Saul Wold 0e56519b33 image-vmdk: Create image_vmdk class and setup image and image_types to use it
This creates a new image_vmdk class similar to live. The image_vmdk
class needs to have a hddimg created by the image-live class, so it
inherits it directly.

The changes to image_types is to ensure that both live and vmdk images
get the ext3 tools and dependencies.

(From OE-Core rev: aa961e112b07d42c272e01f2d69f3c139e9ae70f)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-01 15:51:40 +00:00
Otavio Salvador 05c7d5d512 image.bbclass: do not create image manifest link if IMAGE_LINK_NAME is empty
(From OE-Core rev: d0f1ae1f8cf8ef4e5adc24cc6246d3849e51aa98)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-29 12:56:44 +00:00
Richard Purdie 126f634207 image_types: Refactor compression code into a generic compression solution
The current approach of adding each different compressed image type doesn't
scale. This patch changes the code so compressed images for each form are
automatically available using the form <type>.<compression type> in
IMAGE_FSTYPES. This doesn't change any existing externally visible behaviour
and the image generation process becomes more efficient as a result too.

(From OE-Core rev: b7e4ed41ee480f00b7265341e9e2d2c2b9135143)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-28 12:27:53 +00:00
Martin Jansa 3349b88a76 More quoting fixes
* We have various variables which are either not quoted at all or are half
  quoted. This patch fixes the bad exmaples so everything is consistent.

(From OE-Core rev: 960ee8076e860353a05eb2eb7f825a455c54698d)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-26 22:51:58 +00:00
Richard Purdie e6230da00e image.bbclass: Ensure timestamp matches format used in initscripts after recent changes
(From OE-Core rev: 173a48f79f8f2f18737f1901fc5992223d456348)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-24 10:25:40 +00:00
Robert Yang 9d1823b2a0 Incremental rpm image generation
Incremental rpm image generation, the rootfs would be totally removed and
re-created in the second generation by default, but with
INC_RPM_IMAGE_GEN = "1", the rpm based rootfs would be kept, and will do
update(remove/add some pkgs) on it.

NOTE: This is not suggested when you want to create a productive rootfs

For example:
  1) Add the follow config option to a conf file:
     INC_RPM_IMAGE_GEN = "1"

  2) bitbake core-image-sato
     modify a package
     bitbake core-image-sato

The rootfs would not be totally removed and re-created in the second
generation, it would be simply updated based on the "package".

Implatation:
1) Figure out the pkg which need to be removed or re-installed, then use
'rpm -e to remove the old one. Use the rpm's BUILDTIME to determine
which pkg has been rebuilt.

2) Figure out the pkg which is newly added, and use 'rpm -U' to install
it.

This only for the rpm based rootfs, the deb and ipk based rootfs would
be done later.

[YOCTO #1651]

(From OE-Core rev: 575ba3c9e153a1d8ac228a99a03ca2df5fbca151)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-11 10:36:22 +00:00
Dongxiao Xu 5a03cf2ba2 image.bbclass: Use ?= to set LINGUAS_INSTALL
Hob may dynamically sets BBLAYERS to bitbake server, thus we need a
flexible way to load LINGUAS_INSTALL value.

(From OE-Core rev: c5c3689b7102cc0c281de736c215d66dd4f1e874)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-06 12:11:36 +00:00
Paul Eggleton 38c2f66ea7 classes/image: implement generic locale package installation
Let each package-specific rootfs implementation provide basic functions
to query the existence of a package and install a list of packages and
then have a generic install function so this logic is in one place.

Note: unlike previous versions of this code in OE-Core this uses the
IMAGE_LINGUAS variable and not IMAGE_LOCALES - note that IMAGE_LINGUAS
was what was used in OE-Classic and it is already used in OE-Core in
order to install locale-base-*. This will mean that if IMAGE_LINGUAS is
left at the default you will now get more packages installed. If you
don't want these language support packages then you should set
IMAGE_LINGUAS explicitly.

This restores locale installation to the same state as OE-Classic, only
we now support all the packaging backends.

(From OE-Core rev: c0fc36f8629a6abb9a7b542df8a2857526547a31)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-03 12:14:26 +00:00
Richard Purdie 2e02727860 bitbake.conf/image.bbclass: Ensure images use the correct passwd/group files
We need pseudo to use the rootfs passwd/group files belonging to the
rootfs when building images. This patch ensures that we use the rootfs
files instead of those in the sysroot which can lead to incorrect file
ownership issues.

(From OE-Core rev: c4da803ef78322b758380eb0af0dcb73cae6553c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-08 15:24:27 +00:00
Richard Purdie c8dee9b92d Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:

sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`

(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-10 11:51:19 +00:00
Matthew McClintock 4115f94f22 Add new IMAGE_CLASSES variable for classes for image generation
Allows us to import classes only for images and not to the global
namespace

(From OE-Core rev: 49dcb301ab39327554d86d23cf6f8d435d7a7351)

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-08 21:48:18 +00:00
Dongxiao Xu 1ef442561d multilib: Drop MULTILIB_IMAGE_INSTALL
There should just be a single IMAGE_INSTALL variable. If the package
backends need this split into different multilib components they should
be responsible for doing this, not the user.

This commit removes the MULTILIB_IMAGE_INSTALL variable.

[YOCTO #1564]

(From OE-Core rev: 7736862a74c92fe1afe42e170822be13117575c2)

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-08 14:32:55 +00:00
Richard Purdie 6706c7bdd2 image.bbclass: No need to run most tasks except do_rootfs
Running fetch/unpack/patch/compile/install etc. is pointless
since the only image task that does anything is the rootfs task.

Hence mark the useless tasks as noexec so we don't bother running them.

(From OE-Core rev: b3d1c440feb7fd7b3e3374ca528195ab9bd3a7ce)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-07 11:35:42 +01:00