Subject: [HELP] Create a new image recipe based on a (changed) existing one #yocto To: yocto@lists.yoctoproject.org From: joao.ccabral@parceiros.nos.pt X-Originating-Location: Lisbon, PT (95.92.177.196) X-Originating-Platform: Linux Chrome 79 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Mon, 10 Feb 2020 01:49:26 -0800 Message-ID: Content-Type: multipart/alternative; boundary="L4HuaaJg4EfdeI9cAJK6" --L4HuaaJg4EfdeI9cAJK6 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, I'm trying to create an image recipe based on an existing one. I've searched online, and I could find such an example. My problem is that the image I what to serve as a base is changed in another layer and I want to include those changes. Ex: (tree) Prj_root -> layer1 -> recipes-core -> images -> my-image.bb=C2=A0 [This is the base recipe] -> layer2 -> recipes-core -> images -> my-image.bbappend [This is the changed one] -> layer3 -> recipes-core -> images -> my-image-dev.bb [this is the new image, based on my- image] my-image.bbappend is something like this: --------------------- my-image.bbappend --------- PROVIDES =3D "product" IMAGE_INSTALL +=3D " \ \ " IMAGE_INSTALL_remove +=3D " \ " (+ other functions related with signing the image) _________________________________________________ The final image is created with 'bitbake product'. And, I want to create a dev image that must be based on the current "product" image (my-image.bb + my-image.bbappend) with some dev packages. So, I need to include the changes that my-image.bbapend does to this dev image I'm trying to create. Tried simply creating a new image that should be a copy of the working one, and then add the needed packages for development. So I did the following... ---------------- my-image-dev.bbappend ---------- SUMMARY =3D "dev Image" require layer1/recipes-core/images/my-image.bb ------------------------------------------------ I can run 'bitbake my-image-dev' and it runs, but doesn't produce the same output as 'bitbake product'. Also, If I run 'bitbake my-image-dev' 1st, it finishes fine. Running 'bitbake product' after makes a bunch of other tasks and finishes fine. Running again 'bitbake my-image-dev' finishes with an error on a specific task. ( It shows that they are not building the same thing) How can I do what I need? NOTE: I can't change anything in the layer1 and layer2. PS. Also tried to require the bbappend file, but bitbake fails saying that it's not a bitbake file. Thanks in advance. Jo=C3=A3o Cabral --L4HuaaJg4EfdeI9cAJK6 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi, 

I'm trying to create an image recipe based on an existing one.
I've searched online, and I could find such an example.

My= problem is that the image I what to serve as a base is changed inanother layer and I want to include those changes.

Ex= :

(tree)

Prj_root
  &nb= sp; -> layer1
        -&g= t; recipes-core
        = ;    -> images
     =            -> my-image= .bb  [This is the base recipe]
    -> la= yer2
        -> recipes-c= ore
          = ;  -> images
       =          -> my-image.bbappend [T= his is the changed one]
    -> layer3<= br style=3D"caret-color: #4c4c4c; color: #4c4c4c; font-family: 'Ubuntu Mono= '; font-size: 17.3333px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4);" = />        -> recipes-core            ->= ; images
         =        -> my-image-dev.bb [this is the new= image, based on my-
image]

my-image.bbappend is= something like this:

--------------------- my-image.bbappen= d ---------
PROVIDES =3D "product"

IMAGE_INSTALL= +=3D " \
        <s= ome_packages> \
"
IMAGE_INSTALL_remove +=3D " \<= /span>
        <other-packeges&g= t;
"

(+ other functions related with signing the= image)
_________________________________________________

The final image is created with 'bitbake product'.
An= d, I want to create a dev image that must be based on the current= "product" image (my-image.bb + my-image.bbappend) with some devpackages.
So, I need to include the changes that my-image.b= bapend does to this
dev image I'm trying to create.

Tried simply creating a new image that should be a copy of the worki= ng
one, and then add the needed packages for development.

So I did the following...

---------------- my-image-d= ev.bbappend ----------

SUMMARY =3D "dev Image"

<= span style=3D"caret-color: #4c4c4c; color: #4c4c4c; font-family: 'Ubuntu Mo= no'; font-size: 17.3333px; -webkit-tap-highlight-color: rgba(0, 0, 0, 0.4);= ">require layer1/recipes-core/images/my-image.bb
--------------= ----------------------------------

I can run 'bitbake my-ima= ge-dev' and it runs, but doesn't produce the
same output as 'bi= tbake product'.

Also, If I run 'bitbake my-image-dev' 1st, i= t finishes fine. Running
'bitbake product' after makes a bunch = of other tasks and finishes fine.
Running again 'bitbake my-ima= ge-dev' finishes with an error on a
specific task. ( It shows t= hat they are not building the same thing)

How can I do what = I need? 
NO= TE: I can't change anything in the layer1 and layer2.

PS. Al= so tried to require the bbappend file, but bitbake fails saying
that it's not a bitbake file.
     &n= bsp;  
Thanks in advance.

João = Cabral --L4HuaaJg4EfdeI9cAJK6--