summaryrefslogtreecommitdiffstats
path: root/meta/classes/image.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* Rename PACKAGE_GROUP variable to FEATURE_PACKAGESPaul Eggleton2014-03-071-2/+5
| | | | | | | | | | | | | Since tasks were renamed to packagegroups some time ago, this variable name implies that its usage is necessarily related to them which is not the case. Rename the variable to more closely represent what it does (whilst still providing backwards-compatibility with a warning for PACKAGE_GROUP). (From OE-Core rev: d703e07ea5056624101e1bc48f10d25b602635e9) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/image: support package-management in IMAGE_FEATURESPaul Eggleton2014-03-071-1/+2
| | | | | | | | | | | | | | Previously the "package-management" feature was only fully supported when inheriting core-image.bbclass, which is not really ideal given that this is the standard way of adding runtime packaging to an image in OE-Core. Part of the fix for [YOCTO #5424]. (From OE-Core rev: 18b8e526570b347d269fa47140949e4ea4800ac5) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: add BAD_RECOMMENDATIONS/NO_RECOMMENDATIONS rootfs vardepsJonathan Liu2014-03-051-0/+1
| | | | | | | | | | | | Changes to BAD_RECOMMENDATIONS or NO_RECOMMENDATIONS require the rootfs for the image to be rebuilt. [YOCTO #5898] (From OE-Core rev: f271ec4748d604d956f2d011af1deb7f7e3a68f9) Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* (image|rootfs_ipk).bbclass, rootfs.py: ipk multilib fixesLaurentiu Palcu2014-02-131-1/+1
| | | | | | | | | | | This commit whitelists some common directories, so the multilib sanity checks pass and also fixes an issue in lib/oe/rootfs.py when the compared files do not exist. (From OE-Core rev: 4615ac771175cd413f461c081f7d3191c49ccc4b) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass/populate_sdk_base.bbclass: shift position of sdk complementary ↵Hongxu Jia2014-02-111-19/+0
| | | | | | | | | | | | | | | | install definition The sdk complementary install operation was defined in image.bbclass, but the sdk recipe (such as meta-toolchain.bb) didn't inherit this bbclass but populate_sdk, and both of image and populate_sdk bbclass inherited populate_sdk_base bbclass, so move the sdk complementary install definition to populate_sdk_base bbclass fixed this issue. (From OE-Core rev: 907458935bab391f5bfba8f581ea9835078548d9) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass/license.bbclass: ajustment list_installed_packages invokingHongxu Jia2014-02-111-2/+4
| | | | | | | | | | | | | Since the list_installed_packages() function has refactored in python, do the necessary adjustments to license_create_manifes- t() and write_image_manifest() in license.bbclass and image.bb- class respectively; (From OE-Core rev: 4477991633d2971c17afbd0874b1ab2efb7d6eef) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: change POPULATE_SDK_POST_TARGET_COMMANDLaurentiu Palcu2014-02-111-1/+1
| | | | | | | | | | | Since rootfs_install_complementary() is now implemented in python for each backend, remove it from POPULATE_SDK_POST_TARGET_COMMAND. Call it directly in python. (From OE-Core rev: c941fce37eb1ca7b77e5885c3e3e776f9538754b) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass, lib/oe/rootfs.py: remove intercept_scripts directoryLaurentiu Palcu2014-02-111-1/+1
| | | | | | | | | Remove the directory, manually, in the Rootfs.create() function. (From OE-Core rev: 37a9dc05272e7e49c8a475ccb3d10880dcee4763) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Cleanup image,rootfs_ipk,package_ipk bbclass filesLaurentiu Palcu2014-02-111-38/+0
| | | | | | | | | This commit cleans up the functions that were ported to python. (From OE-Core rev: d950ef40a3eae4b54cc62828e66d84a62d78c447) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Activate the new python rootfs/image creation routinesLaurentiu Palcu2014-02-111-251/+11
| | | | | | | | | | | | | | This commit will: * remove old bash code common to all backends; * create a new do_rootfs() python function that will use the new rootfs/image creation routines; * allow creation of dpkg based images; * fail for rpm/opkg (not implemented yet); (From OE-Core rev: a83144bac8d67704ff66f5dc0fc56f5b63979694) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: Also uninstall update-alternatives and shadow for ↵Phil Blundell2014-02-021-1/+1
| | | | | | | | | | | | | | | | read-only-rootfs If the rootfs is read-only then we aren't going to be updating any alternatives or modifying the password file and these binaries will be redundant. In an ideal world we would be able to stop them from being installed in the first place but this is non-trivial to arrange. As a workaround in the meantime, let's just uninstall them once image construction is finished. (From OE-Core rev: d41097a970e9bfa553cd4bc3c9fad4b9073d7bd5) Signed-off-by: Phil Blundell <pb@pbcl.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: fix paths to run-postinstsRoss Burton2014-01-281-2/+2
| | | | | | | | | | | | The run-postinsts script has been moved to ${sbindir}. [YOCTO #5719] (From OE-Core rev: 2c8dc1b00c0cf83da106ef9544cd11cde7ce43a1) 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>
* image.bbclass: add ability to set systemd default targetChen Qi2014-01-061-0/+10
| | | | | | | | | | | | | | | | | | | Add ability to set the default target for systemd images. The default target for system is controlled by SYSTEMD_DEFAULT_TARGET. The default value for this variable is derived from checking whether IMAGE_FEATURES contains 'x11-base' or not. Each image could override this value in its own recipe. For now, we don't need to do any change, because all images that support graphical environment has 'x11-base' in its IMAGE_FEATURES. [YOCTO #3816] (From OE-Core rev: 049f89155b1e80875aad6e53b21808b827c06915) 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>
* image.bbclass: fix for zap_root_passwordChen Qi2013-12-141-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | Previously, this function replaces the root password with '*' if 'debug-tweaks' is not in IMAGE_FEATURES. It not only zaps empty root password, but also zaps non-empty root password. That means, if the user uses a bbappend file for base-passwd to set the root password, he would not be able to login as root; if the user uses 'EXTRA_USERS_PARAMS' to set the root password, he would still not be able to login as root. What we really want from this function is to disallow empty root password if 'debug-tweaks' is not in IMAGE_FEATURES. This function should not remove non-empty root password because that password is usually deliberately set by the user. This patch renames zap_root_password to zap_empty_root_password to better reflect the intent of this function. It also modifies the code to make this function work correctly. (From OE-Core rev: c1037a74f934966a0df8c85138b09d672b9f8b36) 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>
* image.bbclass: default USE_DEVFS to '1'Chen Qi2013-12-141-1/+1
| | | | | | | | | | | | | | | | | Default USE_DEVFS to "1" so that the `makedevs' command is not run at rootfs time by default. There are mainly two reasons to do so. 1. This will fix a build failure with initramfs-kexecboot-klibc-image. "makedevs: No entry for root in search list " 2. Most of our images use a filesystem over /dev. Most of the time, it's just devtmpfs. So we actually are using a filesystem over /dev. (From OE-Core rev: f54fdd6673a136ee1cee1f3263a8a7820de43ca3) 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>
* buildhistory.bbclass/image.bbclass: remove obsolete codesRoy Li2013-12-091-3/+1
| | | | | | | | | | | | After 1b8e4abd2d9c0 [bitbake.conf/package: Collapse PKGDATA_DIR into a single machine specific directory], oe-pkgdata-util does not use target_suffix parameter, so do not need to loop the vendor (From OE-Core rev: 03c5f39b4d7dd8c81e0a130b7d5884e5af039a24) Signed-off-by: Roy Li <rongqing.li@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: Depend on virtual/kernel:do_deployRichard Purdie2013-11-291-0/+2
| | | | | | | | | | | | | | | | | Now that none of the packagegroups depend on virtual/kernel, we have the problem that MACHINE=qemumips bitbake core-image-minimal doesn't put a kernel into the deploy directory. This breaks many common usecases and user expectations. To avoid this, add a dependency on the kernel deploy to image do_build tasks. This should avoid any circular dependency issues but equally ensure users have their expectations met. [YOCTO #5581] (From OE-Core rev: fe26b2379ecdbdb56acde8592bc0c2d95092a207) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/image: write image manifestPaul Eggleton2013-11-261-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Write a list of installed packages to a .manifest file next to the image, so we can find out what went into the image after it has been constructed without necessarily having to have buildhistory enabled (although that will provide more detail.) We can make use of this for example in the testimage class associated code that checks for installed packages for determining whether or not to run specific tests. Note: this replaces the previous ipk-specific manifest code with something that works for ipk, rpm and deb, and instead of a pruned status file, packages are listed one per line, in the following format: <packagename> <packagearch> <version> Tests for all three backends have shown that the performance impact of this change is negligible (about 1.5s max). Implements [YOCTO #5410] (From OE-Core rev: 2978d1f2617a33e2e3a77e249d73e998d79b4ec9) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/image-empty: removePaul Eggleton2013-11-141-6/+6
| | | | | | | | | | We don't actually need this dummy class; "inherit" can be used with an expression that evaluates to nothing with current BitBake. (From OE-Core rev: f312eb2d2a2715e772ed9e8afc7aea326d8079ec) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image types: split live into iso and hddimgValentin Popa2013-10-141-1/+11
| | | | | | | | | | | | | | Changes to split live into iso and hddimg without adding a new image type class. This patch has only a visible effect on HOB and solves part 2 of #3197 [YOCTO #3197] (From OE-Core rev: f05ae5f57d9d1bd839fae0e3f353d4e0e303a183) Signed-off-by: Valentin Popa <valentin.popa@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: uninstall package only if it's already installedChen Qi2013-09-241-1/+11
| | | | | | | | | | | | | Remove a package from rootfs only if it's already installed. Also, if a package is uninstalled, remove it from installed_pkgs.txt. [YOCTO #5169] (From OE-Core rev: b86dc63bc87763119fce8286f37f44361da824d0) 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>
* classes/testimage-auto: add class to allow automatically running image testsPaul Eggleton2013-09-221-0/+3
| | | | | | | | | | | | | Setting TEST_IMAGE = "1" alone will now automatically run tests on the image immediately after the image is built instead of having to add INHERIT += "testimage" and run bitbake -c testimage <image> manually (but that will still work). This restores functionality that was present in the older imagetest-qemu class with IMAGETEST. (From OE-Core rev: 72269a8fbec35c39af30fbabb1fa9ca7c5ee8d69) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf/package: Collapse PKGDATA_DIR into a single machine specific ↵Richard Purdie2013-09-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | directory Currently we have a hierarchy of pkgdata directories and the code has to put together a search path and look through each in turn until it finds the data it needs. This has lead to a number of hardcoded paths and file globing which is unpredictable and undesirable. Worse, certain tricks that should be easy like a GL specific package architecture become problematic with the curretn search paths. With the modern sstate code, we can do better and construct a single pkgdata directory for each machine in just the same way as we do for the sysroot. This is already tried and well tested. With such a single directory, all the code that iterated through multiple pkgdata directories and simply be removed and give a significant simplification of the code. Even existing build directories adapt to the change well since the package contents doesn't change, just the location they're installed to and the stamp for them. The only complication is the we need a different shlibs directory for each multilib. These are only used by package.bbclass and the simple fix is to add MLPREFIX to the shlib directory name. This means the multilib packages will repackage and the sstate checksum will change but an existing build directory will adapt to the changes safely. It is close to release however I believe the benefits this patch give us are worth consideration for inclusion and give us more options for dealing with problems like the GL one. It also sets the ground work well for shlibs improvements in 1.6. (From OE-Core rev: 1b8e4abd2d9c0901d38d89d0f944fe1ffd019379) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image/populate_sdk: Ensure symlinks in target sysroot are relativeRichard Purdie2013-09-111-1/+6
| | | | | | | | | | | | In the target sysroot of an SDK we can have target system absolute links which don't make sense. This adds a script which fixes them up to become relative paths instead. [YOCTO #5020] (From OE-Core rev: 57d6bdcad55c119e9ab8089d23d462436a0e4440) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass, image.bbclass: Implement kernel INITRAMFS dependency and ↵Jason Wessel2013-09-061-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bundling This patch aims to fix the following two cases for the INITRAMFS generation. 1) Allow an image recipe to specify a paired INITRAMFS recipe such as core-image-minimal-initramfs. This allows building a base image which always generates the needed initramfs image in one step 2) Allow building a single binary which contains a kernel and the initramfs. A key requirement of the initramfs is to be able to add kernel modules. The current implementation of the INITRAMFS_IMAGE variable has a circular dependency when using kernel modules in the initramfs image.bb file that is caused by kernel.bbclass trying to build the initramfs before the kernel's do_install rule. The solution for this problem is to have the kernel's do_bundle_initramfs_image task depend on the do_rootfs from the INITRAMFS_IMAGE and not some intermediate point. The image.bbclass will also sets up dependencies to make the initramfs creation task run last. The code to bundle the kernel and initramfs together has been added. At a high level, all it is doing is invoking a second compilation of the kernel but changing the value of CONFIG_INITRAMFS_SOURCE to point to the generated initramfs from the image recipe. [YOCTO #4072] (From OE-Core rev: 609d5a9ab9e58bb1c2bcc2145399fbc8b701b85a) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Acked-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>
* meta: Don't use deprecated bitbake APIRichard Purdie2013-09-011-1/+1
| | | | | | | | | | These have been deprecated for a long time, convert the remaining references to the correct modules and prepare for removal of the compatibility support from bitbake. (From OE-Core rev: 6a39835af2b2b3c7797fe05479341d71a3f3aaf6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Remove references to _remove in function names since this may ↵Richard Purdie2013-08-261-3/+3
| | | | | | | | | | | | | | become a bitbake keyword There is a good chance we might want to support a bitbake operator "_remove" which works in a similar way to _append and _prepend. As such, we can't use those keywords in function or variable names. (From OE-Core rev: 491fde8cd3fd493f9fec2fd434fe1be547f66148) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: Add basic support for PACKAGE_EXCLUDEMark Hatle2013-08-221-12/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add the foundation for the PACKAGE_EXCLUDE support. As part of this work, it was noticed that the PACKAGE_INSTALL and PACKAGE_INSTALL_ATTEMPTONLY were still using he 'normal' version for dependencies. This should no longer be necessary as of the change in the way the complementary package groups (dev, dbg, ptest and others) are defined. By making this change the dependency tree is more correct than before, and gives the ability for manipulating PACKAGE_INSTALL and PACKAGE_INSTALL_ATTEMPTONLY, while adjusting the dependencies at the same time. Warning messages will be generated if the user is trying to exclude a package that was previously in the PACKAGE_INSTALL or PACKAGE_INSTALL_ATTEMPTONLY variables. (See additional commits for package manager specific support.) Add documentation on PACKAGE_EXCLUDE and related variables. (From OE-Core rev: 208d4d5ef7c5ead35dc27b7808f92ed377377aa4) 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>
* openssh: fix for read-only rootfsChen Qi2013-08-161-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | If the rootfs is read-only and the ssh keys are not available at system start-up, the init script will generate ssh keys into /etc/ssh, thus causing a 'read-only file system' error. In order for Yocto based image to work correctly for read-only rootfs, we use the following logic for openssh. If the rootfs is read-only and there are pre-generated keys under /etc/ssh, we use the pre-generated keys. Note the pre-generated keys are mainly for debugging or development purpose. If the rootfs is read-only and there are no pre-generated keys under /etc/ssh, we use /var/run/ssh as the location for ssh keys. That is, at system boot-up, the generated ssh keys will put into /var/run/ssh. [YOCTO #4887] (From OE-Core rev: 2ed44745024f04aa4e00ddba3009153c6b47c8e9) 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>
* image.bbclass: create device table after package installationChen Qi2013-08-161-5/+3
| | | | | | | | | | | | | | | | | | | | | | Now that the makedevs supports using user/group names in the devcie table files, and it uses passwd and group files under the rootfs which is provided by the base-passwd package, we should let package installation finish first, so that makedevs can get a correct mapping from user/group names to uid/gid. The check for existence of ${IMAGE_ROOTFS}/dev is removed. This is because do_rootfs doesn't have 'nostamp' flag any more, so the do_rootfs task will not be rerun for every build. Checking for the existence of ${IMAGE_ROOTFS}/dev is not necessary any more. Besides, as base-files package also installs the /dev directory, this checking does not serve as a good criteria. [YOCTO #1159] (From OE-Core rev: d073ca77ba886c7912abd3ec0640881c00aea3bb) 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>
* image.bbclass: Move runtime_mapping_rename to avoid conflict w/ multilibMark Hatle2013-08-131-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [YOCTO #4993] Move the runtime_mapping_rename into a prefunc for the do_rootfs function. Otherwise doing it in the python section could occur BEFORE the multilib classes renaming. If the package 'b' is a kernel module, then lib32-b and b should both point to the same package. The runtime_mapping code will do this automatically. Before if you ran: bitbake lib32-<image> It may do: start PACKAGE_INSTALL (a b c) remap (a b c) MULTILIB naming (lib32-a lib32-b lib32-c) What we want is: start PACKAGE_INSTALL (a b c) MULTILIB naming (lib32-a lib32-b lib32-c) remap (lib32-a b lib32-c) (From OE-Core rev: 836662c9a9c175521dbcd29cdfc0a7c144d8770f) 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>
* classes/image: ensure BAD_RECOMMENDATIONS supports pre-renamed package namesPaul Eggleton2013-07-291-0/+1
| | | | | | | | | | | | | | | Use runtime remapping on BAD_RECOMMENDATIONS just as we do with variables such as IMAGE_INSTALL, so that we're specifying the name prior to any renaming e.g. that done by debian.bbclass. Note that this is a change in behaviour for renamed packages, however this is the correct thing to be doing; a search of existing layers suggests this shouldn't cause widespread incompatibilities. (From OE-Core rev: aea9d379ea217c78b64a81853ec3744188158008) 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>
* image.bbclass: remove unneeded files from the imageLaurentiu Palcu2013-06-111-0/+33
| | | | | | | | | | | | | This patch creates a new function, rootfs_remove_unneeded(), that will be called after rootfs_*_do_rootfs is called and which will handle delayed postinstalls in a generic fashion, for all backends in the same way. (From OE-Core rev: d3d810faf8e93ce2d3faaa70da6deeb25b1cec26) 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>
* image.bbclass: add postinst_enable_loggingChen Qi2013-05-231-0/+11
| | | | | | | | | | | | | | Add a function postinst_enable_logging, so that when 'debug-tweaks' is in IMAGE_FEATURES, we create ${sysconfdir}/default/postinst config file, which is sourced by run-postinst scripts to determine whether to log or not, and where to log. [YOCTO #4262] (From OE-Core rev: 99175cabc3936733dd92fac5ebc6f865b864fe92) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: Add package-management image feature to validitemsKhem Raj2013-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Some images dont use core-image bbclass and add this feature directly Fixes parsing errors like /builds1/angstrom/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 34734, PID: 24551 Parsing recipes...ERROR: Unable to parse /builds1/angstrom/sources/meta-kde/recipes-images/angstrom-kde-desktop-imag e.bb: Exited with "1" ERROR: 'package-management' in IMAGE_FEATURES is not a valid image feature. Valid features: dbg-pkgs debug-tweaks dev-pkgs doc-pkgs ptest-pkgs read-only-rootfs splash staticdev-pkgs ERROR: 'package-management' in IMAGE_FEATURES is not a valid image feature. Valid features: dbg-pkgs debug-tweaks dev-pkgs doc-pkgs ptest-pkgs read-only-rootfs splash staticdev-pkgs ERROR: Command execution failed: Exited with 1 (From OE-Core rev: f9f1397d688cc4eb8d736066b1280bee40a8916a) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/image: show an error on invalid IMAGE_FEATURESPaul Eggleton2013-05-121-0/+16
| | | | | | | | | | | | | | | | If the user specifies an invalid feature in IMAGE_FEATURES, show an error during parsing. Valid IMAGE_FEATURES are drawn from PACKAGE_GROUP_ definitions, COMPLEMENTARY_GLOBS and a new 'validitems' varflag on IMAGE_FEATURES (so that additional non-package group features can be added elsewhere.) Implements [YOCTO #3308]. (From OE-Core rev: 8d25442ab795ff0f8e072da2022108eff128e2b2) 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>
* image/kernel-module-split/eglibc-ld.inc: Remove has_key() usageRichard Purdie2013-05-091-1/+1
| | | | | | | | | The has_key() attribute has been removed in python 3 since there is better syntax available. Use the improved syntax. (From OE-Core rev: 3dff13793e875ff58cc38c4a960caca9b6969843) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: Don't mark do_rootfs and do_build as nostampPhil Blundell2013-05-031-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When image.bbclass was first conceived (as rootfs_ipk.bbclass), oemake was unable to figure out when the inputs to do_rootfs had changed in such a way that it would need to be rerun. Absent any reliable information of this kind, it was necessary to adopt the conservative assumption that images always needed rebuilding and, to this end, do_rootfs and do_build in image recipes were marked as nostamp. (The nostamp annotation for do_build was added in oe-classic commit 80d622e0c1dbc284858e01d3eb670303a6d8cdf9 from January 2005; the exact point at which do_rootfs was made nostamp is obscure, but it predates oe-classic revision 63fad339e01d4b16105146c32a61f24460397126.) This situation persisted for the following eight years but, during that period, oemake evolved into today's sstate-enabled bitbake, oe itself gained the OEBasicHash algorithm which can reliably detect changes to the input data for do_rootfs or any other task, and OEBasicHash was made the default for oe-core in 4199efed48005a62267fa3374c33b13627d85f44 (June 2012). Given these various changes in the wider landscape, there is no longer any obvious benefit to having these two tasks marked as nostamp, and indeed having them so marked causes needless rebuilds which can be annoying. Anybody who does genuinely wish to rerun these tasks when nothing in the input has changed can run "bitbake -f", just like with any other task. So, let's remove the nostamp annotations and just let bitbake figure out when to rerun them. (From OE-Core rev: 8505008c115efb54d18e5f25441c7a938a32ffaf) Signed-off-by: Phil Blundell <philb@gnu.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/image: allow complementary package globs to be extendedPaul Eggleton2013-05-031-12/+11
| | | | | | | | | | | | | | | | | Make it easy for the wildcard specifications for complementary package features to be extended outside of image.bbclass. For example, to add a new "foo-pkgs" item that could be added to IMAGE_FEATURES that would cause *-foo packages to be installed for all packages currently in the image, you can now use this line at the global level: COMPLEMENTARY_GLOB[foo-pkgs] = "*-foo" Implements [YOCTO #4228]. (From OE-Core rev: 4e39c1b9dbba1d2b07ffc2c6a1a252fc8f7680ee) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: change the logic when intercepts failLaurentiu Palcu2013-04-221-10/+22
| | | | | | | | | | | Due to some issues with postinstalls that register hooks, we changed the logic a bit. Now, all postinstalls that register hooks will return successfully and only after, if hooks fail, mark the package as unpacked. (From OE-Core rev: 82dae98d0eb771c05e57635f0f8763b118d8177e) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package/image.bbclass: Fix multilib rprovidesRichard Purdie2013-04-131-2/+3
| | | | | | | | | | | | | | | | 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>
* image.bbclass: fix postinstall intercepts fallbackLaurentiu Palcu2013-04-081-1/+1
| | | | | | | | | | 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>
* image.bbclass: Drop legacy export of IMAGE_BASENAMERichard Purdie2013-03-181-2/+0
| | | | | | | | | | 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>
* image.bbclass: add a hook funtion to support readonly rootfsChen Qi2013-03-071-0/+18
| | | | | | | | | | | | | | | | 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>
* populate_sdk_base/image: Fix races for variable mappingsRichard Purdie2013-03-051-13/+4
| | | | | | | | | | | | | | | | 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>
* module.bbclass: Create a new depmodwrapper to assist cross-installsMark Hatle2013-03-011-2/+2
| | | | | | | | | | | | | | | | | 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>
* image.bbclass: add fall-back functionality when running interceptsLaurentiu Palcu2013-02-131-6/+37
| | | | | | | | | | | | | | | | | | | 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>
* image.bbclass: Add MLPREFIX to DEPENDSRichard Purdie2013-02-071-1/+1
| | | | | | | | | 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>
* image.bbclass: add a proper error message if hook script failsLaurentiu Palcu2013-02-061-0/+4
| | | | | | | | (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>
* Split do_packagedata task from do_packageRichard Purdie2013-01-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 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>