Bug 7056

Summary: prelink does not support armhf
Product: [Yocto Project Subprojects] Cross-prelink Reporter: Qiang Yu <yuq825>
Component: cross-prelinkAssignee: Robert Yang <liezhi.yang>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: Medium CC: mark.hatle, yp.cp.watcher, yp.watcher
Version: 1.7   
Target Milestone: 2.0   
Hardware: Other   
OS: arm   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Qiang Yu 2014-12-10 02:38:20 UTC
I'm building a image with local.conf:
USER_CLASSES ?= "buildstats image-mklibs image-prelink"

but I think prelink does nothing on my image, because the MD5SUM is the same before and after the prelink stage.

Discussion can be found at:
http://www.mail-archive.com/yocto@yoctoproject.org/msg21950.html

Here is the log of log.do_rootfs:

NOTE: ###### Generate images #######
NOTE: Executing mklibs_optimize_image ...
DEBUG: Executing shell function mklibs_optimize_image
DEBUG: Shell function mklibs_optimize_image finished
NOTE: Executing prelink_image ...
DEBUG: Executing shell function prelink_image
Size before prelinking 49304.
/opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink: /sbin/fstab-decode: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3 as dynamic linker
/opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink: /sbin/bootlogd: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3 as dynamic linker
/opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink: /sbin/killall5: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3 as dynamic linker
/opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink: /sbin/init.sysvinit: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3 as dynamic linker
/opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink: /sbin/halt.sysvinit: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3 as dynamic linker
/opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink: /sbin/shutdown.sysvinit: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3 as dynamic linker
/opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink: /sbin/runlevel.sysvinit: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3 as dynamic linker
/opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink: /usr/sbin/dropbearmulti: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3 as dynamic linker
/opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink: /bin/mountpoint.sysvinit: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3 as dynamic linker
/opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink: /bin/busybox.suid: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3 as dynamic linker
/opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink: /bin/busybox.nosuid: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3 as dynamic linker
/opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink: /usr/bin/utmpdump.sysvinit: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3 as dynamic linker
/opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink: /usr/bin/mesg.sysvinit: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3 as dynamic linker
/opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink: /usr/bin/last.sysvinit: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3 as dynamic linker
/opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink: /usr/bin/opkg-cl: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3 as dynamic linker
/opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink: /usr/bin/bmw: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3 as dynamic linker
/opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink: /usr/bin/wall.sysvinit: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3 as dynamic linker
Size after prelinking 49304.
DEBUG: Shell function prelink_image finished
Comment 1 Mark Hatle 2014-12-10 02:59:32 UTC
A test version of the prelink is available in the git repository.

Can you try your test with it, to enable it put the following in your local.conf:

SRCREV_pn-prelink = "2cde4ff118b5244f5577d9bc585c1ee521740af0"

Run the build again and see if the issue goes away (and importantly, that the results boot and execute properly.)

Thanks!
Comment 2 Mark Hatle 2014-12-10 23:11:00 UTC
New version:

SRCREV_pn-prelink = "81bab23a4661fdaaa859325d6d3603811ecf1849"

Fixes non-hf ARM, adds the ld-linux-armhf.so.3 to the ldso list in the prelink-rtld.
Comment 3 Mark Hatle 2015-02-19 16:15:57 UTC
Upstream cross-prelink project is working.  We just need to get the update into oe-core.
Comment 4 Mark Hatle 2015-08-31 14:51:35 UTC
Commit checked in to enable the latest code:

c9e4867a605a8007f569ed6ec4cf445111a533c1

(Note there are some reports of failures with the latest glibc ld-so.  I'd like to track those in a separate defect as I believe it's unrelated to this issue.)