summaryrefslogtreecommitdiffstats
path: root/meta/classes/image.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* classes: Update classes to match new bitbake class scope functionalityRichard Purdie2022-08-121-684/+0
| | | | | | | | | Move classes to classes-global or classes-recipe as appropriate to take advantage of new bitbake functionality to check class scope/usage. (From OE-Core rev: f5c128008365e141082c129417eb72d2751e8045) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Add SPDX license identifiersRichard Purdie2022-08-121-0/+2
| | | | | | | | | | | | As stated in our top level license files, the license is MIT unless otherwise stated. Add SPDX identifers accordingly. Replace older license statementa with the standardised syntax. Also drop "All Rights Reserved" expression as it isn't used now, doesn't mean anything and is confusing. (From OE-Core rev: 081a391fe09a21265881e39a2a496e4e10b4f80b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Add copyright statements to files without oneRichard Purdie2022-08-121-0/+3
| | | | | | | | | Where there isn't a copyright statement, add one to make it explicit. Also drop editor config lines where they were present. (From OE-Core rev: 880c1ea3edc8edef974e65b2d424fc36809ea034) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: allow overriding dependency on virtual/kernel:do_deployDmitry Baryshkov2022-05-111-1/+6
| | | | | | | | | | | | | | Since the commit fe26b2379ecd ("image.bbclass: Depend on virtual/kernel:do_deploy"), the image.bbclass made building images depend on virtual/kernel. For some images, including small initramfs, this is not the case. Allow overriding this dependency in case developers knows what they are doing. (From OE-Core rev: 55875f68212657167ac6dc26f5fd93eac24b098e) Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Revert "image.bbclass: allow overriding dependency on virtual/kernel:do_deploy"Jacob Kroon2022-05-091-6/+1
| | | | | | | | | | | | | | | | | | | As pointed out in https://lists.openembedded.org/g/openembedded-core/message/165058 https://lists.openembedded.org/g/openembedded-core/message/165216 this patch sets KERNELDEPLOYDEPEND but then uses KERNELDEPMODDEPEND. Revert the changes since no one seems interested enough to fix it. If someone wants this then make the variable name readable by adding underscores where appropriate, for example by calling it KERNEL_DEPLOY_DEPEND. This reverts commit dcf9dfa4e6305786cd713aa28deda94a50bd6635. (From OE-Core rev: f0bd9e5d10dc86d7b2639a31ab12728ab67bebd5) Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: allow overriding dependency on virtual/kernel:do_deployDmitry Baryshkov2022-04-291-1/+6
| | | | | | | | | | | | | | Since the commit fe26b2379ecd ("image.bbclass: Depend on virtual/kernel:do_deploy"), the image.bbclass made building images depend on virtual/kernel. For some images, including small initramfs, this is not the case. Allow overriding this dependency in case developers knows what they are doing. (From OE-Core rev: dcf9dfa4e6305786cd713aa28deda94a50bd6635) Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: Remove two unnecessary paths from do_rootfs[dirs]Peter Kjellerstedt2022-03-151-1/+1
| | | | | | | | | | There is no reason to include a path in foo[dirs] if it is also in foo[cleandirs] (except if it is the last path in foo[dirs]). (From OE-Core rev: d76a31a37c3b2253a6a8fdffd8581fc88987857d) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: make sure do_rootfs run from a clean workspaceMing Liu2022-03-131-2/+2
| | | | | | | | | | | | Add ${IMAGE_ROOTFS} and ${IMGDEPLOYDIR} to do_rootfs[dirs] and do_rootfs[cleandirs], this ensures do_rootfs run from a clean workspace, with this change, we can now remove two bb.utils.mkdirhier lines from meta/lib/oe/rootfs.py. (From OE-Core rev: cb8b6f7eee4e059bb311330c57068e11bc477366) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: add overlayfs-etc image featureVyacheslav Yurkov2021-12-121-1/+2
| | | | | | | (From OE-Core rev: e105ee47c5f57a22029e611c7ff9c2376bee9ecb) Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Include psplash only when screen machine feature is enabledKhem Raj2021-11-241-1/+1
| | | | | | | | | | | | | base-image boots in degraded mode when using systems without display system since there is no fb device detected and pslash service would fail to start. Removing this image feature means that core-image-base is complete for headless devices [RP: tweak the false case so it builds] (From OE-Core rev: 7a6dbad7bf12d2f27f21a81a31a5173cacb49228) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: use ln -rs instead of lnrRoss Burton2021-11-101-5/+5
| | | | | | | | | | | | | | | | | lnr is a script in oe-core that creates relative symlinks, with the same behaviour as `ln --relative --symlink`. It was added back in 2014[1] as not all of the supported host distributions at the time shipped coreutils 8.16, the first release with --relative. However the oldest coreutils release in the supported distributions is now 8.22 in CentOS 7, so lnr can be deprecated and users switched to ln. [1] 6ae3b85eaffd1b0b6914422e8de7c1230723157d (From OE-Core rev: 1ca455a98de4c713f58df0a537d4c982d256cd68) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* reproducible: Drop BUILD_REPRODUCIBLE_BINARIES variableRichard Purdie2021-10-161-8/+6
| | | | | | | | | | We want things to be reproduicble and the variable doesn't really change much any more. Drop the remaining uses and make those code paths always active. (From OE-Core rev: d15fb02c7ee7da50e322d74bc6a545234e20c7f3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Exclude IMAGE_VERSION_SUFFIX from expansion in image tasksRichard Purdie2021-10-021-0/+1
| | | | | | | | | Similarly to DATETIME, exclude IMAGE_VERSION_SUFFIX from expansion in image tasks to ensure the sstate signatures are calculated correctly. (From OE-Core rev: ceabe8b89f8a0b75d22a286e6f86d260f7e2fd3b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image/qemu: Add explict depends for qemu-helper addto_recipe_sysroot taskRichard Purdie2021-09-231-1/+4
| | | | | | | | | | The populate_sysroot task isn't enough for qemu-helper-native, we need it's addto_recipe_sysroot task. This corrects what amounts to bad dependency information to be explicit. (From OE-Core rev: 55623420208bc4c77a61492d2bbcbc71d3123acd) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Drop COMPRESS_CMDRichard Purdie2021-08-041-2/+1
| | | | | | | | | This was replaced by CONVERSION_CMD a long time ago and is no longer referenced in core. Remove the references to it. (From OE-Core rev: 576d52cdaca047d290c3b10b26aa2244da230dbb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image/image_types: Convert CONVERSION_CMD/COMPRESS_CMD to new override syntaxRichard Purdie2021-08-041-3/+3
| | | | | | | | | | For consistency, use override syntax for these variables as well since it is more consistent with the rest of the image code. We may be able to use these as proper overrides in due course. (From OE-Core rev: 52674c4b1fdf79829095031b2e342d44fb0dc181) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: Convert IMAGE_TYPEDEP to use override syntaxRichard Purdie2021-08-041-2/+2
| | | | | | | | | The IMAGE_TYPEDEP variable would make more sense to match the form of the other image override variables, convert it to use the overrides format. (From OE-Core rev: 8573f6b2a7af9867da0b21936ffd2cd2a417de1d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Convert to new override syntaxRichard Purdie2021-08-021-10/+10
| | | | | | | | | | | | This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". (From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: fix comment "pacackages" -> "packages"Robert P. J. Day2021-05-131-1/+1
| | | | | | | (From OE-Core rev: 5c5f0d21799c2bff6875ef9fdc22d11035ea3320) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/image: Use xargs to set file timestampsJoshua Watt2021-05-061-1/+1
| | | | | | | | | | | | | | | | | | Instead of having find directly invoke touch for each file in the root file system, pass a list to xargs for batching. This significantly reduces the number of times the touch program is invoked and speeds up the do_image task time: PKG TASK ABSDIFF RELDIFF CPUTIME1 -> CPUTIME2 my-image do_image -45.3s -94.2% 48.1s -> 2.8s Cumulative cputime: -44.3s -92.3% 00:48.1 (48.1s) -> 00:03.7 (3.7s) (From OE-Core rev: 15c65f90a3aa1e98c2beab2539403157df1fca08) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image,populate_sdk_base: move 'func' flag setting for sdk command varsChristopher Larson2021-03-311-1/+1
| | | | | | | | | | | | | | | Setting the 'func' flag on the commands variables ensures that they are parsed as shell, and therefore that the referenced commands contents are included in checksums. Doing this only in image.bbclass means that this is missing in recipes that are not images, but which inherit populate_sdk or populate_sdk_base directly, so move it to the latter. [YOCTO #13998] (From OE-Core rev: edc28907ce19a7298059dd388933c58a9c6c28b9) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/image: use oe.utils.directory_size() instead of duRoss Burton2021-03-281-4/+2
| | | | | | | | | | Instead of using du (which has issues as disussed in the previous commit), use the new oe.utils.directory_size() function. (From OE-Core rev: d8f1f3a6b024a2ae6631d1ce25421e8d94b69a12) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: deltask do_packagedataRobert Yang2021-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can fix a do_package error when compile with meta-secure-core layer: http://layers.openembedded.org/layerindex/branch/master/layer/meta-secure-core/ $ bitbake kernel-initramfs [snip] WARNING:kernel-initramfs-1.0-r0 do_package: Manifest build/tmp-glibc/sstate-control/manifest-x86_64_x86_64-nativesdk-secure-core-image-initramfs.packagedata not found in intel_x86_64 corei7-64 core2-64 x86_64 allarch x86_64_x86_64-nativesdk (variant '')? [snip] This is because kernel-initramfs wants to pack an initramfs image into kernel-initramfs.rpm which adds a dependency in kernel-initramfs.bb to do this: d.appendVarFlag('do_install', 'depends', ' ${INITRAMFS_IMAGE}:do_image_complete') This causes kernel-initramfs' do_package depends on ${INITRAMFS_IMAGE}:do_image_complete's do_packagedata, then we will get the error. Delete do_packagedata as other do_package relelated tasks for the image recipe will fix the error. RP: There is a side effect from this change which means that image tasks will no longer run their fetch/unpack/configure/compile/install tasks as these become detached from the dependency chain. The standard tasks are noexec or deleted anyway already so this shouldn't be a significant change. (From OE-Core rev: 0eb95212a7e6b6bdc1243094072dea432cb48f0f) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf/image: Move image specific PSEUDO_IGNORE_PATHS to image classRichard Purdie2021-02-271-1/+1
| | | | | | | | | This path is image specific so we can move to the image class definition of PSEUDO_IGNORE_PATHS. (From OE-Core rev: 66a8ca0f206434e0b301a8fdc90f062750d6d118) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Add directories to PSEUDO_IGNORE_PATHSRichard Purdie2021-02-271-0/+2
| | | | | | | | | Some paths used in image construction shouldn't be tracked under pseudo so list these. (From OE-Core rev: 9463be2292b942a1072eea88881b9644e55aadb9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Drop now unneeded umask flagsRichard Purdie2021-02-161-3/+0
| | | | | | | | | Now that 022 is the default in BB_DEFAULT_UMASK in bitbake.conf, we don't need any of these task flags, clean up. (From OE-Core rev: 816fca781943a7dbf40391d9db34c7bf12711962) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs: add option to allow delayed postinsts on read-only rootfsAnton Kachalov2021-01-161-1/+1
| | | | | | | | | | | | | | Example use case in OpenBMC: rootfs is squashfs and the system has either overlayfs for whole rootfs or for some parts (e.g. /etc). This option will allow to create migration one-shot postinsts using "pkg_postinst_ontarget_${PN}" routines defined in recipes to fix files under upper workdir in overlayfs. (From OE-Core rev: 0977204e16279b117811b5d5cdac5918287e95ac) Signed-off-by: Anton D. Kachalov <rnouse@google.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* IMAGE_LOCALES_ARCHIVE: add option to prevent locale archive creationMichael Thalmeier2020-10-131-1/+4
| | | | | | | | | | | | Under some circumstances it is not desirable to create a combined locale archive (/usr/lib/locale/locale-archive). The new variable IMAGE_LOCALES_ARCHIVE defaults to '1', so the default behaviour is not changed. (From OE-Core rev: 8d78b819c2ec33fce3a34254fa90864ee5fa7617) Signed-off-by: Michael Thalmeier <michael.thalmeier@hale.at> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: fix REPRODUCIBLE_TIMESTAMP_ROOTFS referenceMatt Madison2020-09-081-1/+1
| | | | | | | | | | | | | | | Commit 97b439469a45a089431ca9c31893288c855045f4 added a fallback mechanism for getting the rootfs timestamp. However, it uses curly braces around the variable name, which causes bitbake resolve the variable reference, rather than the shell, so the git timestamp never gets used. Fix the reference to restore the intent of making it a fallback for when there is no git timestamp to retrieve. (From OE-Core rev: fbcf2c1c255b0c61a795c032cf7b67f5db41baa8) Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: improve wording when image size exceeds the specified limitDaniel Ammann2020-07-221-2/+2
| | | | | | | (From OE-Core rev: fcaab9d686a4afe53a4693f3b30634215d682389) Signed-off-by: Daniel Ammann <daniel.ammann@bytesatwork.ch> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image/packagegroup: Remove PACKAGE_GROUP_*, long since deprecatedRichard Purdie2020-04-291-4/+1
| | | | | | | | This was deprecated in 2014 so we can safely remove the old code now. (From OE-Core rev: fe1b79188cbe8159a0950f0c02d7f476a6694a04) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass, package-index.bb: Delete do_populate_lic taskKhem Raj2020-02-151-0/+1
| | | | | | | | | These are meta packages (From OE-Core rev: e6ea95ae85763670aef35f7cb025eea693138d07) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* IMAGE_LINGUAS_COMPLEMENTARY: auto-add language packages other than localesAndreas Müller2019-10-311-1/+1
| | | | | | | | | | | | | | | | | | | This change allows layers adding packages other than locales automatically to images based on languages selected in IMAGE_LINGUAS. E.g if a layer has recipes creating packages as: | ${PN}-foo-en / ${PN}-foo-de / ${PN}-foo-it / .. it would set | IMAGE_LINGUAS_COMPLEMENTARY_append = " *-foo-%s" in its layer.conf to enable auto-adding. (From OE-Core rev: 3a9e9585aeb67234901b2f842113dbe20c3801b3) Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: Fix debug output for rootfs sizeDaniel Klauer2019-09-011-1/+1
| | | | | | | | | The debug output showed the wrong variable. (From OE-Core rev: 9b404c24ddc6212576b78c9fc56c57baa0fb3745) Signed-off-by: Daniel Klauer <daniel.klauer@gin.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib: Remove bb.build.FuncFailedRichard Purdie2019-08-061-5/+2
| | | | | | | | | | | | | Whilst seemingly a good idea, this exception doesn't really serve any purpose that bb.fatal() doesn't cover. Wrapping exceptions within exceptions isn't pythonic. Its not used in many places, lets clean up those and remove usage of it entirely. It may ultimately be dropped form bitbake entirely. (From OE-Core rev: efe87ce4b2154c6f1c591ed9d8f770c229b044ad) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: Only append to IMAGE_LINK_NAME if it was already setMike Crowe2019-07-101-1/+2
| | | | | | | | | | | | create_symlinks does not create any links if IMAGE_LINK_NAME is empty. Unfortunately, setup_debugfs_variables unconditionally appends '-dbg' which results in a previously-empty IMAGE_LINK_NAME containing just '-dbg'. Let's check that it's not empty before appending. (From OE-Core rev: e529c45f29bd9a1de21f31fef7acb23eb6e8ebdd) Signed-off-by: Mike Crowe <mac@mcrowe.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: fix systemd_preset_allChen Qi2019-07-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | Check the existence of systemd before using systemctl to preset units. This is because even if 'systemd' is in DISTRO_FEATURES, it's possible that systemd is not even installed. e.g. container-test-image in meta-selftest layer. As systemd DEPENDS on systemd-systemctl-native, the existence of systemd also ensures the existence of systemd-systemctl-native. This would fix the following test case when using systemd as the init manager. containerimage.ContainerImageTests.test_expected_files Also remove the IMAGE_EXTRADEPENDS setting, as nothing references this variable. (From OE-Core rev: c9854a4ab6af9e60b1a588a87b9a062624af6fae) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* systemd: Default to non-stateless imagesAlex Kiernan2019-05-091-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | When creating images, for anything other than the explicitly stateless case, touch /etc/machine-id so that the images can be booted without an initramfs and with `ro` set on the kernel command line, otherwise system refuses to start: [ 7.222134] systemd[1]: No hostname configured. [ 7.227266] systemd[1]: Set hostname to <localhost>. [ 7.232622] systemd[1]: System cannot boot: Missing /etc/machine-id and /etc is mounted read-only. [ 7.241750] systemd[1]: Booting up is supported only when: [ 7.247362] systemd[1]: 1) /etc/machine-id exists and is populated. [ 7.253752] systemd[1]: 2) /etc/machine-id exists and is empty. [ 7.259757] systemd[1]: 3) /etc/machine-id is missing and /etc is writable. If IMAGE_FEATURES includes `stateless-rootfs` then systemctl-native is not run on the image leaving the image for population at runtime by systemd. (From OE-Core rev: c5fb399f5894c16cf8eeadd507dc38c29b0fd657) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: call systemctl preset-all for imagesAlex Kiernan2019-05-031-1/+8
| | | | | | | | | | | | | | | Rather than rely on systemd's default invocation of preset-all at runtime, we pre-populate the symlink tree as part of of the image. This is done late so any overrides of presets during rootfs construction should already have happened. Whilst we don't strictly need this for the read-write root case, it avoids boot time churn; for read-only root we have to do it here. (From OE-Core rev: a57678a076109c42fbdf7531e90ff4491b387d53) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* default-distrovars: Drop DISTRO_FEATURES_LIBCKhem Raj2019-02-281-5/+0
| | | | | | | | | | | After eglibc was merged into glibc, Kconfig support was also dropped so these libc features therefore are not effective anymore and can be removed (From OE-Core rev: c62b1cc06613a4cdddf53290e6203559f43fc62d) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: respect PACKAGE_NO_GCONVKai Kang2018-12-051-0/+5
| | | | | | | | | | | | | | | It installs locale-base-* packages according to var IMAGE_LINGUAS. Packages locale-base-* are split in libc-package.bbclass if variable PACKAGE_NO_GCONV is not set. When none of ditro features libc-charsets libc-locales and libc-locale-code is set, PACKAGE_NO_GCONV is set. Then no locale-base-* is created and fails to create image. Clear IMAGE_LINGUAS in such situation. (From OE-Core rev: 85240094175a8ea726bfba19c00d4556a62862fc) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: fix a wrong position blankMing Liu2018-11-271-1/+1
| | | | | | | | | | | | | A flaw was introduced by commit c5fa6034: [ image.bbclass: use prependVarFlag for postfuncs ] it changed to use prependVarFlag instead of appendVarFlag, then the blank also needs change to adapt it. (From OE-Core rev: 6085023158ffbfbaf0f3d65ef18054c003d3f463) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: add a missing blankMing Liu2018-11-161-1/+1
| | | | | | | | | | | When calling d.appendVarFlag, a blank is needed or else it could mess up the later appended variables. Reported-by: Stefan Agner <stefan.agner@toradex.com> (From OE-Core rev: 8b2df6e5874b932b356847c5bde10d5b31d67213) Signed-off-by: Ming Liu <liu.ming50@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs: ensure that packages in IMAGE_INSTALL_DEBUGFS are existingAndrej Valek2018-11-141-1/+1
| | | | | | | | | | Ensure that additional packages in IMAGE_INSTALL_DEBUGFS are available before installation. (From OE-Core rev: 06a1bbea67a7233deff80ebe3681b4e0cca6817a) Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs: possibility to add packages to debug rootfsAndrej Valek2018-10-181-1/+3
| | | | | | | | | | | Static libraries are not included in rootfs, it means, that sources are not going into debug rootfs. This option enables to install additional packages even if the standard package is not installed. (From OE-Core rev: 708fe1df3d3e22dd693ae7bbfdd3e5af1a1b0bdc) Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image.bbclass: inherit and use image-postinst-interceptsChristopher Larson2018-08-161-0/+2
| | | | | | | (From OE-Core rev: 73cccdb6942404961415e5939263686719b24061) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Use ${COREBASE}/meta for timestamp, fallback to bitbake.confAlex Kiernan2018-08-151-1/+4
| | | | | | | | | | | To handle the case where ${COREBASE} isn't the git directory, avoid erroring out when the git command fails. If we don't have a timestamp after this, fall back to the timestamp from conf/bitbake.conf. (From OE-Core rev: 97b439469a45a089431ca9c31893288c855045f4) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Add locale archive optimisationRichard Purdie2018-08-151-1/+1
| | | | | | | | | | | | | Refactor the locale archive function from the SDK to also make it work during general image creation. This reduces the size of the locales from 900MB to 220MB in core-image-lsb-sdk. The exception handling around subprocess was dropped as the standard subprocess exception printing is better handled than the catchall exception. (From OE-Core rev: 8ffd93bdb09b0a4a84b27dafcd684c6abba392ed) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* license_image: Fix raceRichard Purdie2018-07-251-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code pokes into do_deploy manifests from do_image_complete when the do_image_complete task may or may not depend upon the do_deploy tasks in question. Often it gets lucky, sometimes it results in build failures. To fix this, split the functionality to its own task which can have the correct task dependencies. This means the data in BB_TASKDEPDATA is definitive, the other code can be dropped, as can the IMAGE_EXTRATYPES do_populate_lic dependencies from image.bbclass. This fixes bugs which show up as: NOTE: recipe linux-yocto-4.14.48+gitAUTOINC+d64aec9793_97c8063d2d-r0: task do_deploy: Started ERROR: core-image-minimal-1.0-r0 do_image_complete: Error executing a python function in exec_python_func() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: <module> 0001: *** 0002:write_deploy_manifest(d) 0003: File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/classes/license.bbclass', lineno: 33, function: write_deploy_manifest 0029: 'w+').write(output) 0030:} 0031: 0032:python write_deploy_manifest() { *** 0033: license_deployed_manifest(d) 0034:} 0035: 0036:python license_create_manifest() { 0037: import oe.packagedata File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/classes/license.bbclass', lineno: 191, function: license_deployed_manifest 0187: # It is necessary to mark this will be used for image manifest 0188: man_dic[dep]["IMAGE_MANIFEST"] = True 0189: man_dic[dep]["PN"] = dep 0190: man_dic[dep]["FILES"] = \ *** 0191: " ".join(get_deployed_files(dep_dic[dep])) 0192: with open(os.path.join(lic_dir, dep, "recipeinfo"), "r") as f: 0193: for line in f.readlines(): 0194: key,val = line.split(": ", 1) 0195: man_dic[dep][key] = val[:-1] File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/classes/license.bbclass', lineno: 289, function: get_deployed_files 0285: """ 0286: 0287: dep_files = [] 0288: excluded_files = [] *** 0289: with open(man_file, "r") as manifest: 0290: all_files = manifest.read() 0291: for f in all_files.splitlines(): 0292: if ((not (os.path.islink(f) or os.path.isdir(f))) and 0293: not os.path.basename(f) in excluded_files): Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build-st-730/tmp/sstate-control/manifest-qemux86_64-linux-yocto.deploy' ERROR: core-image-minimal-1.0-r0 do_image_complete: Function failed: write_deploy_manifest ERROR: Logfile of failure stored in: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build-st-730/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp/log.do_image_complete.50537 NOTE: recipe core-image-minimal-1.0-r0: task do_image_complete: Failed ERROR: Task (/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/recipes-core/images/core-image-minimal.bb:do_image_complete) failed with exit code '1' NOTE: recipe linux-yocto-4.14.48+gitAUTOINC+d64aec9793_97c8063d2d-r0: task do_deploy: Succeeded (From OE-Core rev: b54cdaea7844ee3bf0c39eb97cc7c4c17ed5818c) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs-postcommands: split ssh_allow_empty_passwordJackie Huang2018-07-091-1/+1
| | | | | | | | | | | | | "allow root login" should not be bundled in ssh_allow_empty_password, because some distro may want only one of "allow root login" and "allow empty password", so split it out into ssh_allow_root_login and add new imagefeature allow-root-login so they can be controlled separately, debug-tweaks will still include both of them. (From OE-Core rev: 1ab494f06a12548a902298afabd0a842161ef10d) Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>