[yocto] how to copy a tar file to Root file system

Paul Eggleton paul.eggleton at linux.intel.com
Mon Oct 31 20:34:39 PDT 2016


On Tue, 01 Nov 2016 03:12:15 Swapna.Gurumani at microchip.com wrote:
> Thank you so much for your speedy response!!! Actually I ended up attaching
> an older bb file. I had some more modifications as attached. I changed
> license to close per your suggestion. Should I change FILES_${PN} to look
> like this:
> 
> FILES_${PN} = "/opt/crank/"

Yes that would be a lot simpler.

> Actually to be honest I took inspiration from another recipe to make mine.
> All I want to do it take a locally stored .tar.gz file, untar it and put it
> in the /opt folder of my RFS. I notice that the tar file has been extracted
> and I see it in the
> /home/swapna/workspace/work/yocto/poky/build-atmel/tmp/work/cortexa5hf-neon-
> poky-linux-gnueabi/crank/1.0-r0/crank Folder.
> Do I need a makefile? I don't know what a .po file is..

No, for something simple like this you can do everything you need from the 
recipe.

> How do I install the files "manually" within do_install using install and/or
> cp commands? Like this?:
> 
> do_install() {
>         make INSTALL_ROOT=${D} install    << what does this do>>
>         cp -ar ${B}/crank/ ${D}/opt/
> }
> 

I think you want:

do_install() {
    cp -a --no-preserve=ownership ${WORKDIR}/crank ${D}/opt/
}

You don't need the "make install" line.

Cheers,
Paul

PS: please keep the mailing list on CC. Thanks.





More information about the yocto mailing list