[OE-core] How do we get programs into sysroots?

Chris Larson clarson at kergoth.com
Sun Aug 28 20:45:53 UTC 2011


On Sun, Aug 28, 2011 at 1:07 PM, Joel A Fernandes <agnel.joel at gmail.com> wrote:
> DESCRIPTION = "A tool to format SD Cards correctly"
> LICENSE = "GPLv2"
> LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833"
> SECTION = "base"
> SRC_URI = "file://mkcard.txt \
>           file://COPYING.patch"
> PR = "r3"
>
> do_configure() {
>        install -m 0644 ${WORKDIR}/mkcard.txt ${S}/
> }
>
> do_install() {
>        install -d ${D}${base_sbindir}
>        install -m 0755 ${S}/mkcard.txt ${D}${base_sbindir}/mkcard
> }
>
> BBCLASSEXTEND = "native"
> ---
>
> Everything works fine, but I don't see 'mkcard' in /sbin in sysroots
> directory. I'd like to install it there. I tried looking at other
> scripts to see the right way to do it but I'm not sure of a clean way
> to do so. I looked at the staging.bbclass and it seems to only pickup
> libs and headers.

When using a custom do_install, with BBCLASSEXTEND, afaik you need to
set NATIVE_INSTALL_WORKS = "1" to get its files into the sysroot for
the native version.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics




More information about the Openembedded-core mailing list