summaryrefslogtreecommitdiffstats
path: root/meta/classes/image-prelink.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* image-prelink: remove assumption of sysconfdir presenceChristopher Clark2020-03-111-0/+17
| | | | | | | | | | | | | | If sysconfdir is not present in the image filesystem then the temporary creation of a prelink.conf will fail. Fix this by creating sysconfdir temporarily if needed beforehand and then remove any directories that were created afterwards. fixes: OpenXT OXT-1751 (From OE-Core rev: 6bf3e3db355643c4b2e20346230c09e45e519035) Signed-off-by: Christopher Clark <christopher.w.clark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* linuxloader: Convert to python functionRichard Purdie2018-08-231-1/+1
| | | | | | | | | | | We could do with one decent general purpose python function to query the path to the dynamic loader. Convert the shell code into python. Also correct baremetal to return "None", not musl loaders. (From OE-Core rev: 73fab4ede12d8ae31be72b5cb4ab29d7ef7dae17) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/recipes: Use expanded BUILD_REPRODUCIBLE_BINARIES valueJuro Bystricky2018-03-121-1/+1
| | | | | | | | | | | Replace the occurences of BUILD_REPRODUCIBLE_BINARIES with expanded values ${BUILD_REPRODUCIBLE_BINARIES} so the variable does not need to be exported. (From OE-Core rev: 27f87bbc8395a2481ef808465a62d213a6b678ac) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-prelink.bbclass: support binary reproducibilityJuro Bystricky2017-08-161-1/+11
| | | | | | | | | | | | | | | Conditionally support binary reproducibility in built images. If BUILD_REPRODUCIBLE_BINARIES = 1 then: 1. Do not randomize library addresses 2. Set/export PRELINK_TIMESTAMP to a reproducible value. If REPRODUCIBLE_TIMESTAMP_ROOTFS is specified, then the value will be used. Otherwise the timestamp will be derived from the top git commit. (From OE-Core rev: 40ce3db222f8557a01d041f8115d531cc90a54e8) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-prelink: Disable for musl imagesRichard Purdie2017-08-131-1/+1
| | | | | | | | | | | | | | For some reason prelink was refusing to prelink musl images but now sometimes does modify the binaries. Since musl has no support for this, such images end up broken and unable to boot. To avoid this, be explicit and only apply prelinking for libc-glibc. [YOCTO #11913] (From OE-Core rev: 5a25ed1071f0d9b7d95edcc2b5b4545f960d5f95) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-prelink: use STAGING_*_NATIVE variablesRoss Burton2016-03-091-2/+2
| | | | | | | (From OE-Core rev: d78921e91ea1caf0154d544496a8aeabc2ec543d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* linuxloader/image-prelink/image-mklibs: Fix non-standard path prelinkingRichard Purdie2016-03-071-1/+5
| | | | | | | | | | | | | | | | | | Prelinking on x86-64 wasn't working out the box as it uses /lib and not /lib64 for libs. Prelink was refusing to link as the dynamic loader didn't match its idea of the right path. Passing in the --dyanmic-linker option avoids this. We can share code from image-mklibs so abstract that into a new class, linuxloader.bbclass. This does break prelinking of multilib images, I've opened a bug so we can loop back and fix that problem, the code would need to iterate the dynamic loaders (and setup ld.so.conf files for it). (From OE-Core rev: 7c3f2f61536cc8e0322087558cdcfe29ee2fac6d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane/prelink: Handle nonstandard library pathsRichard Purdie2016-03-071-1/+18
| | | | | | | | | | | | | | | | | | | | | | Prelink contains some hardcoded assumptions about the path layout of the target system. Unfortunately if the system doesn't match, prelink doesn't work. This breaks: a) prelink of those images b) the unsafe-references-in-binaries QA test (which uses prelink-rtld) One way to work around this is to construct an ld.so.conf file which lists the library paths in question. We do this in sanity QA check and in the rootfs prelink code, being careful not to trample any existing target ld.so.conf. There is an additional problem that $LIB references in RPATHs won't be handled correctly, I've not see any system use these in reality though so this change at least improves things. (From OE-Core rev: 7fd1d7e639c2ed7e0699937a5cb245c187b7c811) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image/image-prelink/image-mklibs/sanity: Drop pointless EXPORT_FUNCTIONSRichard Purdie2014-04-011-2/+0
| | | | | | | | | | | | | I'm sick of seeing people adding to EXPORT_FUNCTIONS in these classes when they clearly have no idea what it does. Worse, these uses of it are all broken, the naming is incorrect and they do nothing. Lets remove them and try and preserve any remaining part of my sanity. (From OE-Core rev: 05a2fb19f722652c5d13be911b8ed45a264bbb40) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Remove various bashismsRichard Purdie2011-11-101-1/+1
| | | | | | (From OE-Core rev: a057adfbb72454e28294f00075a69e0e7c699bec) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-prelink: remove hardcoded path assumptions, don't generate cache filePhil Blundell2011-05-171-8/+5
| | | | | | | | | | | Pass -N option to prelink so that no cache file is generated (obviates need for deleting it afterwards). Use symbolic names, ${sysconfdir} et al., rather than hardcoded paths. Pass explicit -c option to prelink in case ${sysconfdir} and ${sysconfdir_native} are different. (From OE-Core rev: 78a3cc9e8588e37badcd2ea02d2cf3b5a25ee5b8) Signed-off-by: Phil Blundell <philb@gnu.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rpm: Fix rpm usage of prelink on the targetMark Hatle2011-02-251-1/+1
| | | | | | | | | | RPM has the ability to validate files that have been prelinked, however the necessary configuration and staging was not done properly. Resolve this issue by fixing the macro paths, providing the missing RPM macro, and correcting a defect in the way the prelink image class was working with the necessary configuration file. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
* prelink: Enable image wide prelinkingMark Hatle2010-08-121-0/+38
Add the ability to specify user level classes via the local.conf. Use this new capability to add an image-prelink class that does an image wide cross-prelink activity. Signed-off-by: Mark Hatle <mhatle@windriver.com>