summaryrefslogtreecommitdiff
path: root/meta/classes/image.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* image.bbclass,kernel.bbclass: Use kmod-native instead of module-init-tools-crossKhem Raj2012-05-061-1/+1
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* 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. 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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
* 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. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
* meta: Convert getVar/getVarFlag(xxx, 1) -> (xxx, True)Richard Purdie2012-03-051-4/+4
| | | | | | | | | | | | 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>
* image-vmdk: Create image_vmdk class and setup image and image_types to use itSaul Wold2012-03-011-2/+4
| | | | | | | | | | | | 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. Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: do not create image manifest link if IMAGE_LINK_NAME is emptyOtavio Salvador2012-02-291-2/+4
| | | | | Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types: Refactor compression code into a generic compression solutionRichard Purdie2012-02-281-3/+1
| | | | | | | | | | 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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* More quoting fixesMartin Jansa2012-02-261-2/+2
| | | | | | | | * 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. Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: Ensure timestamp matches format used in initscripts after ↵Richard Purdie2012-02-241-1/+1
| | | | | | recent changes Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Incremental rpm image generationRobert Yang2012-01-111-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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] Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
* image.bbclass: Use ?= to set LINGUAS_INSTALLDongxiao Xu2012-01-061-1/+1
| | | | | | | | Hob may dynamically sets BBLAYERS to bitbake server, thus we need a flexible way to load LINGUAS_INSTALL value. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/image: implement generic locale package installationPaul Eggleton2012-01-021-0/+37
| | | | | | | | | | | | | | | | | | | 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. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
* bitbake.conf/image.bbclass: Ensure images use the correct passwd/group filesRichard Purdie2011-12-081-0/+2
| | | | | | | | | 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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Convert to use direct access to the data store (instead of bb.data.*Var*())Richard Purdie2011-11-101-10/+10
| | | | | | | | | | | | | | | 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 *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Add new IMAGE_CLASSES variable for classes for image generationMatthew McClintock2011-11-081-1/+2
| | | | | | | Allows us to import classes only for images and not to the global namespace Signed-off-by: Matthew McClintock <msm@freescale.com>
* multilib: Drop MULTILIB_IMAGE_INSTALLDongxiao Xu2011-11-081-3/+1
| | | | | | | | | | | | | 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] Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: No need to run most tasks except do_rootfsRichard Purdie2011-10-061-1/+13
| | | | | | | | | 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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: improve comments regarding exported functionsOtavio Salvador2011-10-041-4/+1
| | | | Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
* image/package.bbclass: Revise multilib support for DEBIAN_NAME.Lianhao Lu2011-09-161-12/+5
| | | | | | | | | | | [YOCTO #1486] 1. image.bbclass: In multilib_sanity_check, duplicated files except those matching to MULTILIBRE_ALLOW_REP are allowed if they're equal. 2. pacakge.bbclass: Allow DEBIAN_NOAUTONAMES variable to be automatically mapped in multilib case. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
* image.bbclass: use ${TARGET_PREFIX}depmodChris Larson2011-08-301-1/+1
| | | | | | | | | | Currently it uses ${TARGET_SYS}-. This is inconsistent, as the recipe and kernel bbclass both use the prefix. While there aren't many cases where the two differ, it is harmless to ensure that we are behaving consistently. Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass, kernel.bbclass: remove non-standard -n option from cp commandPaul Eggleton2011-08-231-1/+1
| | | | | | | | -n is not a POSIX option and does not work on some systems (e.g. Debian Lenny); in any case it is not strictly necessary here, so remove it. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass, kernel.bbclass: create warning file about deleting deploydir ↵Paul Eggleton2011-08-181-0/+2
| | | | | | | | | | | | | | | files New users sometimes delete files in tmp/deploy/images assuming they will be re-created just by re-running the build, and then are confused when this doesn't work. To discourage people from doing this, create a file called README_-_DO_NOT_DELETE_FILES_IN_THIS_DIRECTORY.txt in tmp/deploy/images containing an explanation of what needs to be done to re-create files there. Fixes [YOCTO #1315] and [YOCTO #1346]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
* image: add support for generally useful {dev,doc,dbg}-pkgs featuresChris Larson2011-08-101-2/+32
| | | | Signed-off-by: Chris Larson <chris_larson@mentor.com>
* image: implement IMAGE_FEATURESChris Larson2011-08-101-3/+14
| | | | | | | | | | | | | | IMAGE_FEATURES is analagous to DISTRO_FEATURES and MACHINE_FEATURES, for root filesystem construction. Currently, the only supported features are any defined package groups, as used by the oe.packagegroup python module. Example usage: PACKAGE_GROUP_myfeature = "vim iptables" IMAGE_FEATURES += "myfeature" Signed-off-by: Chris Larson <chris_larson@mentor.com>
* image.bbclass: Added variables for multilib support.Lianhao Lu2011-07-271-1/+53
| | | | | | | | | | | | | | | | 1. Added MULTILIB_PACKAGE_INSTALL for multilib instances of packages to be installed in the rootfs. 2. MULTILIBRE_ALLOW_REP contains the regular expression to match the files allow to be replaced by the conflicting files. 3. MULTILIBRE_FORCE_SAME contains the regular expression to match the files allow to be replaced only if the conflicting files are identical. 4. Added shell function multilib_sanity_check() to check whether the overwring for multilib situation is allowed. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
* classes/image*: Revamp creation of live imagesSaul Wold2011-07-271-0/+3
| | | | | | | | This creates a live image as an IMAGE_FSTYPES, thus removing the need to have additional -live.bb recipes. To create a live image one just needs to add live to the IMAGE_FSTYPES list Signed-off-by: Saul Wold <sgw@linux.intel.com>
* image.bbclass: Add LINGUAS_INSTALL to dependency listRichard Purdie2011-07-081-1/+1
| | | | | | | | | | | | | | | Currently if there are locales to install in the image the appropriate packages might not automatically get built since there is no dependency being exposed to bitbake. This patch exposes the missing dependencies to bitbake through the RDEPENDS field hence ensuring images build successfully when locales are added but not depended upon anywhere else in the build. [YOCTO #1215] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image|kernel.bblass|module-init-tools: do not use depmod-2.6Anders Darander2011-07-011-1/+1
| | | | | | | | | | Change to only depend on virtual/*/depmod. Change all calls to only use depmod. Do not install depmod as depmod-2.6 Bump PR in module-init-tools-cross. Signed-off-by: Anders Darander <anders@chargestorm.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Add umask task controlMark Hatle2011-06-301-0/+2
| | | | | | | | | | | | | | | | | | | Bitbake now allows the umask to be specified per task. The following tasks will have a umask of 022 set by default: do_configure do_compile do_install do_package do_populate_sysroot do_rootfs do_configure and do_compile need a umask of 022 set because -many- recipes directly copy generated files out of recipe's build directory. Instead of fixing each existing and future recipe, it was shown to be much easier to just set the umask. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
* task-core-nfs/image.bbclass: Fix some libc overridesRichard Purdie2011-05-171-2/+1
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: use soft assignment for LDCONFIGDEPENDPhil Blundell2011-05-171-1/+1
| | | | | | | This allows distros that don't want ldconfig to turn it off. Signed-off-by: Phil Blundell <philb@gnu.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Rename the remaining poky-* scripts to oe-* or runqemu-*Richard Purdie2011-04-201-1/+1
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: Disable ldconfig-native when using uclibcRichard Purdie2011-04-051-5/+11
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: make execution ldconfig verboseNitin A Kamble2011-04-041-1/+2
| | | | | | The failure of ldconfig was not getting logged anywhere before. Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
* image.bbclass: Remove uneeded do_populate_sysroot requirement for imagesRichard Purdie2011-03-291-3/+0
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: Add dependencies on native versions of update-alternatives ↵Richard Purdie2011-03-291-0/+1
| | | | | | and updated-rc.d explicitly Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base/kernel/image.bbclass: Clean up do_deploy ordering to ensure it just ↵Richard Purdie2011-03-291-1/+1
| | | | | | happens before a build completes Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf/image.bbclass: Move image type information into image_types.bbclassRichard Purdie2011-03-241-21/+1
| | | | | | | | | | | | | Image generation code in .conf files is hard to read as it needs to be single line. By moving this to a separate class, multiline functions can be used instead improving readability. It also declutters bitbake.conf. There is no real functional change with this patch but it highlights the need for improvements in places such as the IMAGE_EXTRA_OPTION ext* specific variable which makes no sense. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: Move ROOTFS_SIZE into runimagecmd() functionRichard Purdie2011-03-241-1/+1
| | | | | | | | | | Image type specific size overrides for IMAGE_ROOTFS were being ignored. Moving the size calculation to after the overide expansion point addresses this problem. [YOCTO #928] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: Improve readability of the image generation codeRichard Purdie2011-03-241-7/+13
| | | | | | | The quoting in get_imagecmds() is hard to read. We can simplify the constuction a little to make this easier to parse and reduce complexity slightly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: Disable shell debug messagesMark Hatle2011-02-161-1/+1
| | | | | | | By default image had a "set -x" to enable shell debug messages, this adds a lot of overhead to the system due to logging. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
* image/package_xx/rootfs_xx.bbclass: move rootfs_xx_log_check().Lianhao Lu2011-01-311-4/+1
| | | | | | | Move function rootfs_xx_log_check() from rootfs_xx.bbclass to relevant package_xx.bbclass. (Where xx is rpm/ipk/deb). Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
* image.bbclass: Use the dedicated BB_WORKERCONTEXT, not bitbake internals to ↵Richard Purdie2011-01-141-1/+1
| | | | | | detect context Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass/initscripts: Make /etc/timestamp usage consistent.Gary Thomas2010-11-141-7/+3
| | | | | | | | | | | | Timestamp is kept in UTC Remove superfluous 'create_etc_timestamp()' function - seems to be a duplicate of 'rootfs_update_timestamp()' Remove External function reference [sgw@linux.intel.com: merged 2 patches and cleanup commit message] Signed-off-by: Gary Thomas <gary@mlbassoc.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
* rootfs_rpm: Add lock file in the rpm deploy directory to allow mutliple ↵Richard Purdie2010-10-071-1/+1
| | | | | | rootfs creation tasks to coexist without breaking each other Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* image.bbclass: change IMAGE_EXTRA_SPACE to IMAGE_OVERHEAD_FACTORSaul Wold2010-09-081-1/+1
| | | | | | | | This change allows the IMAGE_OVERHEAD_FACTOR (default to 1.2) to adjust dynamicly how much space to add for each image, thus there is 20% overhead space by default. Signed-off-by: Saul Wold <Saul.Wold@intel.com>
* Use pseudo rather than fakeroot for fake root privilegesJoshua Lock2010-07-161-1/+1
| | | | | | | Make use of the ability to configure the fake root provider and use Wind River's pseudo utility. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* test: add automation framework and sanitytestJiajun Xu2010-07-151-0/+3
| | | | | | | | | | | | | | Automation test is disabled by default. User need set TESTCLASS to qemu in conf/local.conf and run bitbake command "bitbake poky-image-xxx" or "bitbake poky-image-xxx -c qemuimagetest" to trigger it. Currently only the sanity test with two testcases are added. To run the test, user need prepare a testing environment: 1) "expect" should be installed on system 2) NOPASSWD should be set for user to run bitbake Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
* image.bbclass: Don't perform mapping renaming until we're running the task ↵Richard Purdie2010-07-021-2/+5
| | | | | | | | | itself. Need to extend bitbake to provide this information rather than refer to a bitbake internal variable. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>