How to bitbake copy a prebuilt static library into the sdk

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












0















Scenario:

I am working with yocto linux recipes. I am trying to make a recipe which simply copies a prebuilt MyLibrary.a and its headers available on the built linux image. So, I have a libMyLibrary.a which I want to copy to /usr/lib. And MyLibrary's headers files MyLibrary.h and MyLibrary.hpp into /usr/include. Note that MyLibrary is already built and I just want to copy the binary and headers into desired locations of the built linux image.



So following is the recipe:



SUMMARY = "Script to make a static library available in yocto linux image"
LICENSE = "CLOSED"

FILES_$PN += "$libdir"

SRC_URI = "file://libMyLibrary.a
file://MyLibrary..hpp
file://MyLibrary..h
"

S = "$WORKDIR"

do_install ()
install -d $D$libdir
install -d $D$includedir
install -m 0644 $WORKDIR/libMyLibrary.a $D$libdir/
install -m 0644 $WORKDIR/MyLibrary.h $D$includedir/
install -m 0644 $WORKDIR/MyLibrary.hpp $D$includedir/



Initially I started with getting some errors in the do_install step. I resolved them but now the do_rootfs step is complaining about my bb file that is mylibrary_1.0.bb. I am pretty sure that the parent recipe that calls my recipe has no errors since it builds a lot of other recipes and mine is just additional to it. Also, the errors started to appear after I wrote the do_install step.



Question

Can someone point out what is wrong with my recipe above?

Or is there a simple example recipe which copies a .a and its headers into the desired location i.e. /usr/lib and /usr/include like I am doing above?










share|improve this question
























  • Looks correct to me ... you will need to provide more details on the errors you are getting. Could it be that the licence (CLOSED) is not a known one? (at least by me :-) Also, why the two dots in the header file names?

    – Murray Jensen
    Jan 8 at 1:58















0















Scenario:

I am working with yocto linux recipes. I am trying to make a recipe which simply copies a prebuilt MyLibrary.a and its headers available on the built linux image. So, I have a libMyLibrary.a which I want to copy to /usr/lib. And MyLibrary's headers files MyLibrary.h and MyLibrary.hpp into /usr/include. Note that MyLibrary is already built and I just want to copy the binary and headers into desired locations of the built linux image.



So following is the recipe:



SUMMARY = "Script to make a static library available in yocto linux image"
LICENSE = "CLOSED"

FILES_$PN += "$libdir"

SRC_URI = "file://libMyLibrary.a
file://MyLibrary..hpp
file://MyLibrary..h
"

S = "$WORKDIR"

do_install ()
install -d $D$libdir
install -d $D$includedir
install -m 0644 $WORKDIR/libMyLibrary.a $D$libdir/
install -m 0644 $WORKDIR/MyLibrary.h $D$includedir/
install -m 0644 $WORKDIR/MyLibrary.hpp $D$includedir/



Initially I started with getting some errors in the do_install step. I resolved them but now the do_rootfs step is complaining about my bb file that is mylibrary_1.0.bb. I am pretty sure that the parent recipe that calls my recipe has no errors since it builds a lot of other recipes and mine is just additional to it. Also, the errors started to appear after I wrote the do_install step.



Question

Can someone point out what is wrong with my recipe above?

Or is there a simple example recipe which copies a .a and its headers into the desired location i.e. /usr/lib and /usr/include like I am doing above?










share|improve this question
























  • Looks correct to me ... you will need to provide more details on the errors you are getting. Could it be that the licence (CLOSED) is not a known one? (at least by me :-) Also, why the two dots in the header file names?

    – Murray Jensen
    Jan 8 at 1:58













0












0








0








Scenario:

I am working with yocto linux recipes. I am trying to make a recipe which simply copies a prebuilt MyLibrary.a and its headers available on the built linux image. So, I have a libMyLibrary.a which I want to copy to /usr/lib. And MyLibrary's headers files MyLibrary.h and MyLibrary.hpp into /usr/include. Note that MyLibrary is already built and I just want to copy the binary and headers into desired locations of the built linux image.



So following is the recipe:



SUMMARY = "Script to make a static library available in yocto linux image"
LICENSE = "CLOSED"

FILES_$PN += "$libdir"

SRC_URI = "file://libMyLibrary.a
file://MyLibrary..hpp
file://MyLibrary..h
"

S = "$WORKDIR"

do_install ()
install -d $D$libdir
install -d $D$includedir
install -m 0644 $WORKDIR/libMyLibrary.a $D$libdir/
install -m 0644 $WORKDIR/MyLibrary.h $D$includedir/
install -m 0644 $WORKDIR/MyLibrary.hpp $D$includedir/



Initially I started with getting some errors in the do_install step. I resolved them but now the do_rootfs step is complaining about my bb file that is mylibrary_1.0.bb. I am pretty sure that the parent recipe that calls my recipe has no errors since it builds a lot of other recipes and mine is just additional to it. Also, the errors started to appear after I wrote the do_install step.



Question

Can someone point out what is wrong with my recipe above?

Or is there a simple example recipe which copies a .a and its headers into the desired location i.e. /usr/lib and /usr/include like I am doing above?










share|improve this question
















Scenario:

I am working with yocto linux recipes. I am trying to make a recipe which simply copies a prebuilt MyLibrary.a and its headers available on the built linux image. So, I have a libMyLibrary.a which I want to copy to /usr/lib. And MyLibrary's headers files MyLibrary.h and MyLibrary.hpp into /usr/include. Note that MyLibrary is already built and I just want to copy the binary and headers into desired locations of the built linux image.



So following is the recipe:



SUMMARY = "Script to make a static library available in yocto linux image"
LICENSE = "CLOSED"

FILES_$PN += "$libdir"

SRC_URI = "file://libMyLibrary.a
file://MyLibrary..hpp
file://MyLibrary..h
"

S = "$WORKDIR"

do_install ()
install -d $D$libdir
install -d $D$includedir
install -m 0644 $WORKDIR/libMyLibrary.a $D$libdir/
install -m 0644 $WORKDIR/MyLibrary.h $D$includedir/
install -m 0644 $WORKDIR/MyLibrary.hpp $D$includedir/



Initially I started with getting some errors in the do_install step. I resolved them but now the do_rootfs step is complaining about my bb file that is mylibrary_1.0.bb. I am pretty sure that the parent recipe that calls my recipe has no errors since it builds a lot of other recipes and mine is just additional to it. Also, the errors started to appear after I wrote the do_install step.



Question

Can someone point out what is wrong with my recipe above?

Or is there a simple example recipe which copies a .a and its headers into the desired location i.e. /usr/lib and /usr/include like I am doing above?







linux embedded yocto bitbake






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 9 at 10:32







Game_Of_Threads

















asked Jan 7 at 13:04









Game_Of_ThreadsGame_Of_Threads

1012




1012












  • Looks correct to me ... you will need to provide more details on the errors you are getting. Could it be that the licence (CLOSED) is not a known one? (at least by me :-) Also, why the two dots in the header file names?

    – Murray Jensen
    Jan 8 at 1:58

















  • Looks correct to me ... you will need to provide more details on the errors you are getting. Could it be that the licence (CLOSED) is not a known one? (at least by me :-) Also, why the two dots in the header file names?

    – Murray Jensen
    Jan 8 at 1:58
















Looks correct to me ... you will need to provide more details on the errors you are getting. Could it be that the licence (CLOSED) is not a known one? (at least by me :-) Also, why the two dots in the header file names?

– Murray Jensen
Jan 8 at 1:58





Looks correct to me ... you will need to provide more details on the errors you are getting. Could it be that the licence (CLOSED) is not a known one? (at least by me :-) Also, why the two dots in the header file names?

– Murray Jensen
Jan 8 at 1:58










0






active

oldest

votes











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f492992%2fhow-to-bitbake-copy-a-prebuilt-static-library-into-the-sdk%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f492992%2fhow-to-bitbake-copy-a-prebuilt-static-library-into-the-sdk%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay