summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* syslinux.bbclass: Add a default serial console option and real boot menu supportJason Wessel2013-03-181-79/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous syslinux menu code did not support using both a serial and vga console, but this has worked for years in syslinux so there is no reason not to take advantage of it. The previous menu looked like: ------------------------------------------------------- Linux Boot Menu The following targets are available on this image: boot: None install: None ------------------------------------------------------- This commit makes it look something more like a traditional grub menu on both the serial console and vga console as well as providing the option to continue on using either the serial or vga console with the correct kernel arguments. You can see the screen shots attached to the bugzilla. https://bugzilla.yoctoproject.org/show_bug.cgi?id=3944 [ YOCTO #3944 ] (From OE-Core rev: 7032d559c04bae09e6b7c39ddeb1bf35acc0584c) Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package: Add cachedpath optimisationRichard Purdie2013-03-182-25/+33
| | | | | | | | | | | | | | | | | | Currently, various standard library operations like os.walk(), os.path.isdir() and os.path.islink() each call stat or lstat which involves a syscall into the kernel. There is no caching since they could conceivably have changed on disk. The result is that for something like the do_package task of the kernel we're spending over two minutes making 868,000 individual stat calls for 23,000 files. This is suboptimal. This patch adds lib/oe/cachedpath.py which are a set of replacement functions for these operations which use cached stat data rather than hitting the kernel each time. It gives a nice performance improvement halving the build time of the kernel do_package. (From OE-Core rev: 556dee0c4d6d8a87c0cddbd2f60fe5917d009f18) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image_types.bbclass: only create links if the target existsAndreas Oberritter2013-03-181-1/+3
| | | | | | | | | | When creating images containing many partitions, rootfs.$type may not be available. (From OE-Core rev: cf8e9d8942fdddaac21fca46137120da959c814c) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* binconfig: Handle the case where ${B} != ${S}Richard Purdie2013-03-181-1/+1
| | | | | | | | This change allows ${B} != ${S} builds to work which use binconfig. (From OE-Core rev: dc175a20d3a269c08691d92ecf13afff8c1340dd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel bbclass: return to original directory in do_deployChase Maupin2013-03-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * During the base kernel_do_deploy function the directory is changed to DEPLOYDIR in order to do some cleanup and symlinking. However, the directory is not changed back to the original starting directory ${S} at the end. For append functions this means that the starting directory is not ${S} as expected but instead ${DEPLOYDIR}. For functions like the do_deploy_append in recipes-kernel/linux/linux-dtb.inc there is an assumption that you are still in the source directory and not the DEPLOYDIR. Without this change the .dtb files are not copied because the check for the existence of ${DTS_FILE} which is a relative path from the ${S} directory fails. This means that the .dtb files are not copied into the deploy directory and subsequently the deploy/images directory. In the log.do_deploy file you will see lines like: Warning: arch/arm/boot/dts/xxxxx.dts is not available! (From OE-Core rev: fd5d80ab1a405cb4ef94f2cde25f8c251da490f0) Signed-off-by: Chase Maupin <Chase.Maupin@ti.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work.bbclass: inhibit rm_work per recipeChen Qi2013-03-181-0/+13
| | | | | | | | | | | | | | | | | | | | | | Use RM_WORK_WHITELIST to inhibit rm_work per recipe. In this way, one can use rm_work for the most of the recipes but still keep the work area for the recipe(s) one is working on. As an example, the following settings in local.conf will inhibit rm_work for icu-native, icu and busybox. INHERIT += "rm_work" RM_WORK_WHITELIST += "icu-native icu busybox" If we comment out the RM_WORK_WHITELIST line and do a rebuild, the working area of these recipes will be cleaned up. [YOCTO #3675] (From OE-Core rev: 6c930c3c06f2e698540626c87bd7f7f571df35ef) 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>
* archiver: fix archive filtering behaviorKevin Strasser2013-03-184-18/+25
| | | | | | | | | | | | | | | | | | | With the addition of sstate, ensure that archiving tasks are only added to the build if they produce output in the directory specified by the 'sstate-inputdirs' flag. Move calls to 'tar_filter' and 'not_tarball' out to archive-*-source.bbclass in order to filter out packages before their archiving tasks are added to the build. Additionally, negate the return value of copyleft_should_include in tar_filter, so that packages that do not pass are in turn filtered out. (From OE-Core rev: 392562a21d9f2deb6fe6f8bb5378b09f4c5918d4) Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archive-*-source.bbclass: fix scripts_with_logs build errorKevin Strasser2013-03-183-6/+9
| | | | | | | | | | | | | | | Log and script archives are only generated when explicitly enabled by setting the environment variable SOURCE_ARCHIVE_LOG_WITH_SCRIPTS to 'logs_with_scripts'. When left disabled, the path specified to be handled by sstate is never created, resulting in a build error. Only attempt to archive scripts and logs when explicitly enabled. (From OE-Core rev: 7f1f3e6b6db9a50f5e68bc8dff95549e692153b1) Signed-off-by: Kevin Strasser <kevin.strasser@linux.intel.com> Signed-off-by: Saul Wold <sgw@linux.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>
* populate_sdk_base: search for perl scripts after symlinks are relocatedLaurentiu Palcu2013-03-161-5/+5
| | | | | | | | | | | grep will throw "No such file or directory" errors for all invalid symlinks. To overcome this, move the search after the symlinks have been changed to point to the new location. (From OE-Core rev: 239a43fc4037bfe941bb60dd077ee477de177b7c) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm: Ensure PV manipulations are correctRichard Purdie2013-03-161-1/+1
| | | | | | | | | | | | | The previous change to this function fixed one manipuation at the expense of the other, depending on ow expanded the versioned dependency string was when the AUTOINC substitution was made. This update ensures we cover both cases and ensures the classextended version works as as well as the normal case. (From OE-Core rev: 0f8447a7d99d2645b932eac1c24149f0c2d3791e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc: improve interaction with sstateMartin Jansa2013-03-151-0/+6
| | | | | | | | | | | | | | | | | | | | * exclude ICECC_PARALLEL_MAKE (like PARALLEL_MAKE is) * add ICECC_DISBLED to be able to disable whole icecc functionality while keeping icecc enabled. This is useful when you want multiple builders sharing same sstate-cache, but only some of them using icecc. * inheriting icecc changes all checksums because of do_*_prepends calls, but because icecc should not influence binary output of task we should get same checksums for tasks build with and without icecc * ICECC_DISABLED when set (to any non-empty value will disable icecc env modifications but while keeping same sstate checksum (From OE-Core rev: f46cf86d0ec3b80ce526b4dad1b1eac5995969ec) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: add debug-without-src PACKAGE_DEBUG_SPLIT_STYLEMartin Jansa2013-03-151-0/+6
| | | | | | | | | | * same as original and default version, but does not package source files in PN-dbg (From OE-Core rev: 3c8452c3abae74a42989c0fbd5ba303788528750) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm: Ensure package dependencies have correct version numbersRichard Purdie2013-03-141-2/+3
| | | | | | | | | | | | | | | | | | | | If a recipe has versioned dependencies on another package within the same recipe, there are potentially races where the version remapping may not happen correctly. This issue triggered with neard in multilib builds since it uses a "-" character in its PV which is illegal in an rpm version field. The remapping to "+" was not occuring. It only triggers in the multilib case since in this case, expansion of the datastore happens at slightly different points. The correct fix is to search for PV, not PKGV but substitute the PV value. (From OE-Core rev: bd03014c8fd080e04dd0a96a6b4b9211568c1cf1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs_xxx.bbclass: fix bitbake -S hashes mismatch errorRobert Yang2013-03-123-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bitbake -S <image> has errors, e.g.: NOTE: Reparsing files to collect dependency data ERROR: Bitbake's cached basehash does not match the one we just generated (/buildarea/lyang1/poky/meta/recipes-core/images/core-image-minimal.bb.do_rootfs)! ERROR: The mismatched hashes were 8e44f2296f2d6cdf2ccb0236910ef59b and 46357d5e36713646b47b0fe2233e3c8c This is caused by the BUILDNAME which is defined in cooker.py: if not self.configuration.data.getVar("BUILDNAME"): self.configuration.data.setVar("BUILDNAME", time.strftime('%Y%m%d%H%M')) The time changes during the first parsing and reparsing, so there is the error, we already have: do_rootfs[vardepsexclude] += "BUILDNAME" but what we need is rootfs_xxx_do_rootfs[vardepsexclude] += "BUILDNAME" The do_rootfs doesn't depend on BUILDNAME directly, but indirectly, the depends tree is: do_rootfs -> rootfs_xxx_do_rootfs -> BUILDNAME So add BUILDNAME to rootfs_xxx_do_rootfs[vardepsexclude] would fix the problem. [YOCTO #3299] (From OE-Core rev: 9d039f482c84dde264564fde93f39764113cc0d3) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* base.bbclass: don't backfill features that already existRoss Burton2013-03-101-2/+2
| | | | | | | | | | | It's too easy to cause rebuilds because the DISTRO_FEATURES have changed in meaningless ways (such as re-ordering or duplicate items). Help stop this by checking if the feature to be back-filled is already present. (From OE-Core rev: 63c7192119d54b92d908441109ed4e4fff761cba) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb.bbclass: set DPKG_ARCH_arm to "armel"Constantin Musca2013-03-101-0/+1
| | | | | | | | | | | - the system should be using "armel" by default, not "arm" [YOCTO #3741] (From OE-Core rev: 74c671a609172a3801e53fe93e2853c4f0eb93b1) Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* core-image.bbclass: support read-only rootfsChen Qi2013-03-071-0/+4
| | | | | | | | | | | | | The hook function is appended to ROOTFS_POSTPROCESS_COMMAND properly to support the 'read-only-rootfs' image feature. [YOCTO #3406] (From OE-Core rev: 05182ee354a9f773c8ab2f4cd7f1fdf552e7fcda) 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 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>
* kernel-module-split: append space to RDEPENDSMartin Jansa2013-03-071-1/+1
| | | | | | | | | | | * it was generating invalid RDEPENDS when KERNEL_MODULES_META_PACKAGE had RDEPENDS set already without trailing space (From OE-Core rev: 5ff26f61b6860e56c255b2b6a2b0215be75b1db9) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ptest: Move ptest checks from recipes to ptest.bbclassBjörn Stenberg2013-03-071-6/+29
| | | | | | | | | | | This patch cleans up ptest implementation in recipes by moving ptest specific code parts into dedicated *_ptest functions. (From OE-Core rev: 1e4d267a3cbd2135a5de10519814087050b766b7) 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>
* buildhistory.bbclass: add support for SRCREV loggingConstantin Musca2013-03-071-1/+22
| | | | | | | | | | | | | - create "latest_srcrev" for each recipe with the following format: ${BB_FILENAME},${SRC_URI},${SRCREV},${FROM_AUTOREV} [YOCTO #3041] (From OE-Core rev: f9acd756746e61b82b58d300f3ab13f3b086787d) Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass:check if necessary to add march to BUILD_CFLAGSHongxu Jia2013-03-071-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1, There are a set of GCC built-in functions for atomic memory access. The definition given in the Intel documentation allows only for the use of the types int, long, long long as well as their unsigned counterparts. GCC will allow any integral scalar or pointer type that is 1, 2, 4, 8 or 16 bytes in length, suffix `_n' where n is the size of the data type.Such as: __sync_fetch_and_add_n __sync_fetch_and_sub_n __sync_fetch_and_or_n __sync_fetch_and_and_n __sync_fetch_and_xor_n __sync_fetch_and_nand_n The above builtins are intended to be compatible with those described in the Intel Itanium Processor-specific Application Binary Interface, section 7.4. 2, The glib-2.0-native and qemu-native invoke the above builtin function with suffix `_4', and glib-2.0-native uses __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 to test the existance. 3, Not all above builtin functions are supported by all target processors.Such as i386 does not support the functions with suffix `_4', but i486 or later support. 4, Prior to GCC 4.5, on the Intel's processor, the default arch is i386 unless GCC is built with the --with-arch switch. Since GCC 4.5 the default arch is implied by the target. 5, If your host GCC is older than 4.5 and it is built without the --with-arch switch, when you use the GCC to compile target, you should specify -march to tell GCC what the target's arch is, otherwise i386 is used as default. Above all, when use older GCC to compile glib-2.0-native or glib-2.0-native, and the GCC incorrectly uses i386 as default, the above builtin function with suffix `_4' is not referenced. We should have a check in sanity.bbclass to tell the user if necessary to add march to BUILD_CFLAGS in this situation. http://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/_005f_005fsync-Builtins.html#_005f_005fsync-Builtins http://gcc.gnu.org/ml/gcc-help/2009-06/msg00037.html http://gcc.gnu.org/gcc-4.5/changes.html http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47460 http://llvm.org/bugs/show_bug.cgi?id=11174 http://download.intel.com/design/itanium/downloads/245370.pdf [YOCTO #3563] (From OE-Core rev: 38042ed8586b3abe427af33debc2402caeca52cb) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gtk-doc: Fix B verses S issuesRichard Purdie2013-03-051-2/+2
| | | | | | | | Fic the class to handle recipes which set B to somewhere other than S. (From OE-Core rev: 9d88baea4f3668612c76201c306ec6efe72c281e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: Enclose sstate search parameter with quotesLeonardo Sandoval2013-03-051-1/+1
| | | | | | | | | | | In case filenames have spaces, execution of the function sstater_install will hang, so the print parameter %s must be enclosed with quotes. (From OE-Core rev: 545d7aa26dfefdc927e0f4e2cc37398ef2c63fa6) Signed-off-by: Leonardo Sandoval <leonardo.sandoval@freescale.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane.bbclass: Add ALLOW_EMPTY to list of package specific variablesRichard Purdie2013-03-051-1/+1
| | | | | | | | | ALLOW_EMPTY should have a package specified so extend sanity checks to cover it. (From OE-Core rev: 02849a54d38c0b98db7ff6b52b4974ee0d88bfb4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* packagegroup: Set ALLOW_EMPTY on a per package basisRichard Purdie2013-03-051-8/+4
| | | | | | | | | ALLOW_EMPTY should be set on a per package basis, this updates the code to do this, avoiding warnings. (From OE-Core rev: 8981ed20234c42dc1f5cdef802ebe7214bd55238) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Ensure all .so files get strippedRichard Purdie2013-03-051-1/+4
| | | | | | | | | | | | It was realised that .so files which were not marked as executable were not gettings stripped. This was wasting space in images. This patch ensures they do get processed by the code correctly. [YOCTO #3973] (From OE-Core rev: 725354886ae3650a7a4875d4c0bffcfab7e8cc40) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: Fix do_package variable dependenciesRichard Purdie2013-03-051-1/+1
| | | | | | | | | | | | When the do_package function was split into different sections, the vardeps were not updated to match meaning some function changes weren't reflected in the sstate checksums. Fix this. [YOCTO #3980] (From OE-Core rev: 2e7ddbcca3f613c3b5725dcc3d457985d41e5f16) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_base/image: Fix races for variable mappingsRichard Purdie2013-03-052-20/+6
| | | | | | | | | | | | | | | | 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>
* sstate: Add gtk-update-icon-cache-native to postinst recipes listRichard Purdie2013-03-051-1/+1
| | | | | | (From OE-Core rev: 59cd32a6661d76ee070810823614eb797d6cc153) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* gtk-icon-cache: use virtual/gtk-update-icon-cache-native instead of gtk+-nativeRoss Burton2013-03-051-1/+1
| | | | | | | (From OE-Core rev: 135e512c09710d65155e345033e93f905de42b0d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstate.bbclass: consider postinstall dependencies tooLaurentiu Palcu2013-03-051-1/+7
| | | | | | | | | | | | | When checking the dependencies in setscene_depvalid(), make sure we also consider those dependencies needed when running the postinstalls on host. [YOCTO #3918] (From OE-Core rev: 8de0616825ed1b238b3486077af6897834bcb62d) Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: Allow the version backwards check to be disabledRichard Purdie2013-03-051-8/+10
| | | | | | | | | | When the PR service is not enabled, the versions can go backwards and there are cases we don't want to know about this. This patch adds a variable allowing these checks to be turned off whilst still using buildhistory. (From OE-Core rev: 49f33a42e93711c96fbb099f3e6ee7f092d7b356) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel-arch.bbclass: don't pass extra args to KERNEL_{CC, LD, AR}Matthew McClintock2013-03-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit a3ca06c3b45c791dd38dbf154ad0fc62b4063475 added extra args to KERNEL_CC, these revert that bit while maintaining machine additions in TARGET_??_KERNEL_ARCH Producing incorrect instructions and generating the following errors: CC arch/powerpc/kernel/init_task.o | {standard input}: Assembler messages: | {standard input}:384: Error: junk at end of line: `1' | {standard input}:949: Error: junk at end of line: `1' | {standard input}:1428: Error: junk at end of line: `1' | {standard input}:1526: Error: junk at end of line: `1' | {standard input}:1626: Error: junk at end of line: `1' | {standard input}:1685: Error: junk at end of line: `1' | {standard input}:1973: Error: junk at end of line: `1' | {standard input}:2001: Error: junk at end of line: `1' | {standard input}:2100: Error: junk at end of line: `1' | {standard input}:2168: Error: junk at end of line: `1' | {standard input}:2520: Error: junk at end of line: `1' | CC arch/powerpc/lib/locks.o (From OE-Core rev: 6ed278ab93e9c3bb291dd37837c27e120954afc7) Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: Optimise per file dependency handlingRichard Purdie2013-03-051-65/+104
| | | | | | | | | | | | | | | | | | | | | | | Currently the process for injecting the per file rpm dependencies into rpmbuild is painfully slow. Its done through the repeated execution of a script which has to return the correct value in each case. This continual execution means the CPU usage of rpmbuild is low. This patch allows the option of collapsing the per file dependencies to a per package basis and injecting them through the .spec file. This removes the execution overhead and allows rpmbuild to run at 100% of cpu. Ultimately it would be nice to inject the per file dependencies through the .spec file however that is not currently possible. Since few people use the per file dependency information, this patch goes for the faster approach. It can be enabled if anyone needs it although I'd mention that its being used to us as this code may well go away in the future if nobody complains. (From OE-Core rev: be40f6d0bb80274366af00461112af65687a4de8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel: extract functions for kernel modules to separate bbclassMartin Jansa2013-03-053-209/+191
| | | | | | | | | | | | | | | | * this way we can reuse the same functionality also for external modules including module_autoload_foo and module_conf_foo functionality * MODULE_PACKAGES variable was removed (splited modules are now returned by do_split_packages * KERNEL_MODULES_META_PACKAGE is used to append all splitted packages to RDEPENDS. In kernel.bbclass it's old "kernel-modules" in module.bbclass it defaults to ${PN} for upgrade path from single PN with all modules to PN depending on all new kernel-module-* (From OE-Core rev: 51928b6b5ca0a46a9dcd754483a19af58b95fa18) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sanity.bbclass: always use oe.lsb.distro_identifier methodMartin Jansa2013-03-021-32/+4
| | | | | | | | | | | * even when /etc/redhat-release or /etc/SuSE-release exists * don't read /etc/lsb-release manually, NATIVELSBSTRING is not reading it too (From OE-Core rev: 3dba05d74821f08cd96a18351805c8812ddd626c) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb.bbclass:fix meta-toolchain-sdk fail on do_populate_sdkHongxu Jia2013-03-021-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | When build meta-toolchain-sdk in a newly created environment, there is an error: ... packagegroup-core-standalone-gmae-sdk-target set to manually installed. You might want to run `apt-get -f install' to correct these: The following packages have unmet dependencies: avahi-dev: Depends: avahi (= 0.6.31-r6.1) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). ... In this case, avahi was installed and then removed by dpkg (the reason is unknown, only with log `Noting disappearance of avahi, which has been completely replaced'), the uninstall was done by dpkg rather than apt, and apt detected the package dependency was broken, so apt-get install failed. Use `apt-get install -f' to correct the upper broken dependencies in place. The removed avahi will be reinstalled. [YOCTO #3720] (From OE-Core rev: a66ed54490305380c549838f9a580528d5b49275) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_deb.bbclass:fix the arch (replace "_" with "-") in deb package controlHongxu Jia2013-03-021-0/+8
| | | | | | | | | | | | | | | | | | | | | when build deb image, such as building meta-toolchain-sdk in x86_64 host, there is warning like that: ... 'x86_64' is not a valid architecture name: character `_' not allowed (only letters, digits and characters `-') ... The params in deb package control file don't allow character `_', only letters, digits and characters `-' allowed. Change the arch's "_" to "-" in the deb package's control file at the control file creation time. Such as `x86_64'-->`x86-64' [YOCTO #3721] (From OE-Core rev: 8487b352cabd8c8ae8a7d9e7e66489e4e964bd50) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: Fix translate_smart_to_oe arch comparisonMark Hatle2013-03-021-2/+3
| | | | | | | | | | | | | | When the OE arch is of the format "foo_bar-foobar" the previous comparison routine did not selectively translate the '-' causing a failed comparison. In order to work around this issue, we -always- compare the RPM translated version of the package architectures. (From OE-Core rev: caf798da9502c1c4967d13a4450fe02b1e7b4850) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work: remove package and packages-split dirsMartin Jansa2013-03-021-7/+13
| | | | | | | | | | | * as described in http://git.openembedded.org/openembedded-core/commit/?id=6107ee294afde395e39d084c33e8e94013c625a9 (From OE-Core rev: 4067afcda78d17058f2aa8d7f82173d181e0aae4) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Add KERNEL_EXTRA_ARGS parameterWolfgang Denk2013-03-011-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | With recent kernel versions, some ARM configurations need may fail to build with errors like this: multiple load addresses: 0x80008000 0x80008000 This is incompatible with uImages Specify LOADADDR on the commandline to build an uImage We cannot pass this information in EXTRA_OEMAKE, as "meta/classes/kernel.bbclass" explicitly ignores all EXTRA_OEMAKE settings. So add KERNEL_EXTRA_ARGS parameter so affected boards can add for example KERNEL_EXTRA_ARGS = "LOADADDR=0x80008000" to their configuration. We make this general enough so other needed command line options can be passed as well when compiling the kernel. (From OE-Core rev: e3cdd0aafb9081cd7f1f98490087c1157a3d7403) Signed-off-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* module.bbclass: Create a new depmodwrapper to assist cross-installsMark Hatle2013-03-013-8/+8
| | | | | | | | | | | | | | | | | 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>
* sanity: use lsb distro_identifierMartin Jansa2013-03-011-4/+1
| | | | | | | | | | | | | | | | | | | | | * distro_identifier returns lsb_data['Distributor ID']-lsb_data['Release'] which in some cases is different then lsb_release -d -s, e.g. Distributor ID: Ubuntu Description: Ubuntu 12.04 LTS Release: 12.04 Codename: precise But we probably don't need to sanity list each point release in LTS and sstate is already using distro_identifier as prefix for native sstate archives * This will need update to SANITY_TESTED_DISTROS (at least s/Ubuntu 12.04 LTS/Ubuntu-12.04/g etc), that's why sending as RFC first. (From OE-Core rev: a32ea459ca168792161af2d521a14fe00cffb4b3) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: add more description for pre/post scriptletsKang Kai2013-03-011-0/+4
| | | | | | | | | | | | | | | | | When write rpm spec file, one description line "# pkgname - script_type" is added to pre/post scriptlets for base package but no such line writted for subpackage. Add similiar line to subpackage to facilitate handling the pre/post scriptlets. (From OE-Core rev: 34f3926f1787f9a2efa2257a2aaea6ee92adf8a3) Signed-off-by: Kang Kai <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_rpm.bbclass: name postinst files with package nameKang Kai2013-03-011-6/+5
| | | | | | | | | | | | | | | | When create rootfs, some post install scripts need be run on device. They are saved under directory /etc/rpm-postinst and named with numbers such as 100, 101 etc. Update to name the postinst script file with its package name instead of just number. That may be more easy to debug when there is a error. [YOCTO #3218] (From OE-Core rev: 9b2a008c25a7a3152ae2d8c64ae8de2534471d47) Signed-off-by: Kang Kai <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_base.bbclass:fix toolchain relocation issuesHongxu Jia2013-03-011-0/+7
| | | | | | | | | | | | | | | | | | | When run "autoreconf" in toolchain, there is an error if the host's perl's version is not the same as the one in the SDK, the error says that the executable perl mismatches the perl lib's version. This is because most of the autotools' scripts use the "#!/usr/bin/perl -w" which is host perl, but the gnu-configize uses "#! /usr/bin/env perl" which invokes the perl wrapper in the SDK, and the wrapper will set the PERL5LIB to the SDK which causes the mismatch. We can make all the perl scripts to use the host perl or the SDK perl to fix this problem. [YOCTO #3338] (From OE-Core rev: 365aa1412a3d31128cb3df02959acdc7df5f2ebc) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* kernel.bbclass: Add missing modules.order and modules.builtinsMark Hatle2013-03-011-2/+1
| | | | | | | | | | | | | | | | | | When running depmod, from kmod, warnings about missing modules.order and modules.builtins occur. Looking back it is not clear why these files were being ignored, other then nobody knew what to do with them. Add the files into the kernel-base package, if they exist, ensuring they will always get installed if at least one module is installed. [ YOCTO #3963 ] (From OE-Core rev: bff4bda1fe86ddd218a192a14605924205a5300b) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-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>
* kernel-yocto: allow building from fetcher source dirBruce Ashfield2013-03-011-17/+22
| | | | | | | | | | | | | | | | | | | | | | | The linux-yocto recipes themselves always set S="${WORKDIR}/linux" and arrange for the fetcher default of ${WORKDIR}/git to be renamed before building. Part of this rename involves an assumption that the directory used by the fetcher can be removed as part of the renaming process, or in fact that renaming is required. If a derived recipe uses S="${WORKDIR}/git", the checkout phase fails since the kernel source is removed as part of the processing. To fix this the code now detects this situation and does not clean the source directory before renaming the fetcher default (and in fact does not rename it at all). (From OE-Core rev: e4ab5efea1a41297f63c96de97270136535b5f0b) Signed-off-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>