[yocto] Enable chroot for nativesdk
Oleksandr Poznyak
oleksandr.poznyak at gmail.com
Thu Jun 2 10:41:23 PDT 2016
Hi,
Currently, nativesdk doesn't support "chroot". It would be great to enable
it for packages support at least.
This will allow us to install packages directly into our sdk, try them and
eventually add to Yocto if needed.
Here might be valid steps to achive this:
1) Add coreutils to nativesdk:
TOOLCHAIN_HOST_TASK += nativesdk-coreutils
2) Fix packagemanager support for chrooted nativesdk
1) Create unique symlink to dynamic loader located in nativesdk:
Add something like this to POPULATE_SDK_POST_HOST_COMMAND
ln -s ld-linux-x86-64.so.2 ld-yocto-nativesdk-x86-64.so.2
and
ln -s /opt/poky/1.8/sysroots/x86_64-pokysdk-linux/lib/ld-linux-x86-64.so.2
/lib/ld-yocto-nativesdk-x86-64.so.2
2) patch binaries in nativesdk to set new dynamic loader
patchelf --set-interpreter /lib/ld-yocto-nativesdk-x86-64.so.2 <some_binary>
3) patch binaries in nativesdk to add RPATH:
patchelf --set-rpath
/opt/poky/1.8/sysroots/x86_64-pokysdk-linux/usr/lib:/opt/poky/1.8/sysroots/x86_64-pokysdk-linux/lib:/lib:/usr/lib
<some_binary>
Thanks,
Oleksandr Poznyak!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160602/285e9b5d/attachment.html>
More information about the yocto
mailing list