All of lore.kernel.org
 help / color / mirror / Atom feed
From: jfabernathy <jfabernathy@gmail.com>
To: Autif Khan <autif.mlist@gmail.com>
Cc: "yocto@yoctoproject.org" <yocto@yoctoproject.org>
Subject: Re: Adding test files to an image
Date: Thu, 08 Mar 2012 15:44:19 -0500	[thread overview]
Message-ID: <4F591A23.3050908@gmail.com> (raw)
In-Reply-To: <CADzUK1K0BTWTm8kfto2SZGpv7Q6sSGcCKggCHXeaconFKR9xcg@mail.gmail.com>

On 03/08/2012 11:57 AM, Autif Khan wrote:
>> Suppose I want to build the meta-intel/meta-sugarbay image and also include
>> some video and audio files into the /home/root directory to facilitate
>> testing of the video and audio players.
>>
>> Can I include these files in a recipe somewhere?
> I use the recipe at the end of this message to include whatever I
> want. This recipe has to be added to the image - I have a custom
> image, so it goes in there. I am sure a recipe can be added to
> something in local.conf - I just do not know that variable. My guess
> it is IMAGE_IMSTALL += "mypics".
>
> Regardless ...
>
> mypics-1.0.tar.gz contains a file called COPYING and its mds5um on the
> 2nd line. It can be replaced with a license from common licenses
> directory - but at the time when I wrote this recipe, I did not know
> how to do that. Anything that goes in there ends up in
> /home/root/mypics.
>
> It can probably be tweaked to look better - I am sure SRC_URI line is
> not perfect. But it seems to work between Edison to master
>
> For larger files - like video worth 200MB or so, I just store them on
> a hard disk and mount manually on /media/hdd or where-ever. Not that
> it wont work in this recipe, just that it would take longer to build
> the image etc.
>
> All the best. Hopefully, this will get you started in the right direction.
>
> LICENSE = "MyLic"
> LIC_FILES_CHKSUM = "file://COPYING;md5=697172b05e4bff0a2421579697ba5653"
>
> MY_DESTINATION = "/home/root/mypics"
>
> SRC_URI = "file://mypics-1.0/mypics-1.0.tar.gz"
>
> do_install_append() {
>          install -d ${D}${MY_DESTINATION}
>          install -m 0644  ${S}/* ${D}${MY_DESTINATION}
> }
>
> PR = "r0"
>
> FILES_${PN} += "${MY_DESTINATION}/*"
I have some issues that seem to be related to where everything gets 
unpacked and where it thinks it needs to install from.

Below is my recipe file name "myvideos_1.0.bb"

DESCRIPTION = "my video test files"
SECTION = "examples"
LICENSE = "CLOSED"

MY_DESTINATION = "/home/root/myvideos"

SRC_URI = "file://myvideos_1.0/myvideos-1.0.tar.gz"

do_install_append() {
         install -d ${D}${MY_DESTINATION}
         install -m 0644  ${S}/* ${D}${MY_DESTINATION}
}

PR = "r0"

FILES_${PN} += "${MY_DESTINATION}/*"


I have the myvideo-1.0.tar.gz file in the myvideos_1.0 directory, same 
level as the recipe in a directory call myvideos.

The error I'm getting is :
Log data follows:
| ERROR: Function failed: do_install (see 
/build/sugarbay-master/tmp/work/x86_64-poky-linux/myvideos-1.0-r0/temp/log.do_install.9051 
for further information)
| install: cannot stat 
`/build/sugarbay-master/tmp/work/x86_64-poky-linux/myvideos-1.0-r0/myvideos-1.0/*': 
No such file or directory
NOTE: package myvideos-1.0-r0: task do_install: Failed
ERROR: Task 2 
(/home/jim/poky/meta-jfa/recipes-jfa/myvideos/myvideos_1.0.bb, 
do_install) failed with exit code '1'
NOTE: Tasks Summary: Attempted 651 tasks of which 644 didn't need to be 
rerun and 1 failed.


The tar.gz is getting unpacked in the 
..tmp/work/x86_64-poky-linux/myvideos-1.0-r0 directory per the unpack 
log file below:

NOTE: Unpacking 
/home/jim/poky/meta-jfa/recipes-jfa/myvideos/myvideos_1.0/myvideos-1.0.tar.gz 
to /build/sugarbay-master/tmp/work/x86_64-poky-linux/myvideos-1.0-r0/

The critical parts of the run.do_install is below:

do_install() {
     base_do_install
         install -d 
/build/sugarbay-master/tmp/work/x86_64-poky-linux/myvideos-1.0-r0/image/home/root/myvideos
         install -m 0644  
/build/sugarbay-master/tmp/work/x86_64-poky-linux/myvideos-1.0-r0/myvideos-1.0/* 
/build/sugarbay-master/tmp/work/x86_64-poky-linux/myvideos-1.0-r0/image/home/root/myvideos

}

base_do_install() {
     :

}

cd 
/build/sugarbay-master/tmp/work/x86_64-poky-linux/myvideos-1.0-r0/myvideos-1.0
do_install

-------------------------
So it looks like it unpacks it one place, but is looking to install from 
somewhere else. I'm just not sure how all the S and D variables are set 
and what they do.

Jim A



  reply	other threads:[~2012-03-08 20:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-08 15:34 Adding test files to an image jfabernathy
2012-03-08 16:57 ` Autif Khan
2012-03-08 20:44   ` jfabernathy [this message]
2012-03-08 21:33     ` Rudolf Streif
2012-03-08 21:43       ` jfabernathy
2012-03-08 22:07         ` Autif Khan
2012-03-08 22:26           ` jfabernathy
2012-03-08 22:32             ` Gary Thomas
2012-03-08 22:35               ` jfabernathy
2012-03-09  6:48                 ` Khem Raj
2012-03-08 22:38               ` jfabernathy
2012-03-09  1:04                 ` Eric Bénard
2012-03-09 13:22                   ` jfabernathy
2012-03-09  7:38 ` Lauri Hintsala

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F591A23.3050908@gmail.com \
    --to=jfabernathy@gmail.com \
    --cc=autif.mlist@gmail.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.