summaryrefslogtreecommitdiffstats
path: root/meta/classes/image.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* classes/image: improve debug-tweaks ssh server configurationPaul Eggleton2013-01-181-2/+14
| | | | | | | | | | | | | | | | | | | 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>
* image.bbclass: quote TARGET_VENDOREnrico Scholz2013-01-071-1/+1
| | | | | | | | | | | 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>
* Add a new distro feature "ptest".Björn Stenberg2012-12-261-2/+4
| | | | | | | | | | | | | | | 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>
* classes/image: handle multilibs in complementary package lookupPaul Eggleton2012-12-191-1/+15
| | | | | | | | | | | | | | | | | | 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>
* image/populate_sdk: Simplify imagetest inclusion and drop dummy class fileRichard Purdie2012-12-071-3/+0
| | | | | | | | | | 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>
* image.bbclass: run postinst scripts once, at rootfs timeLaurentiu Palcu2012-12-061-3/+17
| | | | | | | | | | | | | 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>
* image.bbclass: Add missing dependency on do_package dataRichard Purdie2012-11-201-0/+1
| | | | | | | | | 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>
* image.bbclass: Enable the complementary install to be called w/ globbing paramsMark Hatle2012-09-121-1/+3
| | | | | | | | | | | | | | 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>
* core-image: allow root login when debug-tweaks is enabledSaul Wold2012-09-101-0/+1
| | | | | | | | | | | | | | | | | 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>
* packagegroup-core-console: removePaul Eggleton2012-09-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* image.bbclass: Convert runtime_mapping_rename to event handlerRichard Purdie2012-09-021-3/+10
| | | | | | (From OE-Core rev: 05e67417ca3174d1f9279f0de308a9d40933b461) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/image: add staticdev-pkgs IMAGE_FEATURES featurePaul Eggleton2012-07-291-1/+3
| | | | | | | | | | | | 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>
* Rework installation of dev, dbg, doc, and locale packagesPaul Eggleton2012-07-291-39/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* image.bbclass: Fix a couple innocuous typoes, should cause no functional changeRobert P. J. Day2012-07-281-3/+3
| | | | | | | | | | | "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>
* Convert tab indentation in python functions into four-spaceRichard Purdie2012-07-191-15/+15
| | | | | | (From OE-Core rev: 604d46c686d06d62d5a07b9c7f4fa170f99307d8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image/core-image: Handle conflicting IMAGE_FEATURES.Lianhao Lu2012-07-031-0/+17
| | | | | | | | | | | | | | | | | 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>
* image.bbclass: Add support to build the SDK in parallel with the imageMark Hatle2012-07-031-0/+5
| | | | | | | | | | | | | | | | | | 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>
* Fix manual log file pathsMark Hatle2012-07-031-1/+1
| | | | | | | | | | | | 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>
* EXTRA_IMAGEDEPENDS is used to ensure things like qemu-native are built and ↵Richard Purdie2012-07-021-3/+5
| | | | | | | | | | | | | 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>
* classes/image: Allow openssh empty passwords login.Lianhao Lu2012-06-281-0/+7
| | | | | | | | | | 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>
* rootfs_rpm.bbclass: save rpmlib rather than remove itRobert Yang2012-06-081-0/+6
| | | | | | | | | | | | | | | | | 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>
* image.bbclass: Ensure ${S} is cleaned at the start of rootfs generationRichard Purdie2012-05-251-0/+1
| | | | | | | | | | | | | 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>
* image.bbclass,kernel.bbclass: Use kmod-native instead of module-init-tools-crossKhem Raj2012-05-071-1/+1
| | | | | | | (From OE-Core rev: 74fcf61224dc3e12e753c5de793591677275dffd) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gzip/pigz-native: Install into a prefix to avoid clashing with system binariesRichard Purdie2012-03-211-0/+2
| | | | | | | | | | | | | | | | | | | | | 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>
* classes/image: avoid cp race condition when building multiple imagesPaul Eggleton2012-03-191-1/+1
| | | | | | | | | | | 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>
* image.bbclass: fix rootfs generation without package management toolsOtavio Salvador2012-03-131-2/+5
| | | | | | | | | | | | | | 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>