Community
cancel
Showing results for 
Search instead for 
Did you mean: 
VADĂS
Novice
1,665 Views

Build custom package in a new Yocto layer

Hi guys,

Suppose I want to build a new Edison Yocto image with the http://www.nano-editor.org/ nano editor made available through a new, custom layer. I want the layer to be custom for educational reasons, otherwise I would have used /docs/DOC-23159 Edison's BSP doc and added the nano recipe to meta-edison-distro as suggested. Let's call this layer myLayer (meta-edison-mylayer, to be conformant with the other layer's names). Since nano is not provided through http://packages.yoctoproject.org/ Yocto's package repository, it makes a little bit more sense to have it's own recipe.

I added the new layer to build/conf/bblayers.conf :

BBLAYERS ?= " \ [...]

/device-software/meta-edison-mylayer \

[...]"

The contents of the new layer is as follows :

conf/

layer.conf

recipes-core/images/

edison-image.bbapend

recipes-devtools/nano/

nano.2.2.6.bb

Now, I know the nano recipe file (nano.2.2.6.bb) is written right because I have no problems running the bitbake nano command. Therefore, I don't think that it's worth dumping here (please say otherwise).

layer.conf is standard and looks good to me:

# We have a conf and classes directory, add to BBPATH

BBPATH := "${BBPATH}:${LAYERDIR}"

# We have a recipes-* directories, add to BBFILES

BBFILES := "${BBFILES} ${LAYERDIR}/recipes-*/*/*.bb \

${LAYERDIR}/recipes-*/*/*.bbappend"

BBFILE_COLLECTIONS += "edison-mylayer"

BBFILE_PATTERN_edison-mylayer = "^${LAYERDIR}/"

BBFILE_PRIORITY_edison-mylayer = "6"

edison-image.bbapend was based on the one found in the meta-edison-arduino layer with a little bit more conformity towards the Yocto specifications:

IMAGE_INSTALL_append = " nano"

So everything looks good to me, but when I do a bitbake edison-image command, I get the following screen:

Can anyone tell me what am I doing wrong? What am I missing?
15 Replies
Juan_M_Intel
Employee
155 Views

Hi 3Nigma,

I'd suggest you to try using Ubuntu 12.10 64bit edition, make sure you have enough space and resources to do the build. Also what files did you modify / create for this build? Could you please specify which changes did you do, so we can try to replicate this?

Regards,

 

JPMontero_Intel
VADĂS
Novice
155 Views

Hi Montero,

I'm using a fresh Ubuntu 14.04 64bit Server hosted on a VirtualBox VM (I know this is not recommended, but my i7 compiled the original Yocto distribution in about 4 hours). The only files that I've touched were the setup.sh script (the region that generated the build/conf/bblayers.conf) as I've described in my initial post and the personal layer (still covered by my first post).

I've https://dl.dropboxusercontent.com/u/24768763/intel-yocto-issue-pack.zip made an archive with the setup patch and the new layer to ease up things.

Please tell me what else can I do to assist,

Thank you,

Vic

Juan_M_Intel
Employee
155 Views

Hi 3Nigma,

Thank you for the information we will look into it. Could you also provide the file /home/vic/tuscale-alva/build/tmp/work/edison-poky-linux/edison-image/1.0-r0/temp/log.do_rootfs.380?

Regards,

 

JPMontero_Intel
VADĂS
Novice
155 Views

Your wish is my lunch . Just joking ...

So https://dl.dropboxusercontent.com/u/24768763/log.do_rootfs.380 here it is. If you need anything else, just type.

Thank you JP,

Vic

Brendan_L_Intel
Employee
155 Views

To start with try `bitbake nano` and see if the ipk builds in tmp/deploy. I'm not entirely sure on your problem but I'd start with renaming your nano.2.26.bb to follow the nomenclature nano_2.26.bb as all the other recipes. Hopefully it's that easy

VADĂS
Novice
155 Views

Thank you arfoll for your suggestions.

The bitbake nano command passes fine, but upon searching for the ipk inside the tmp/deploy directory structure, I can only find the nano-dbg and nano-dev ipks ... no nano realease it seems. How is this possible?

Sorry for the recipe name in the topic-starter, it was a typo. You are right, the original recipe name is in fact nano_2.2.6.bb. Thank you for pointing this out.

Brendan_L_Intel
Employee
155 Views

In that case can you share your nano recipe? It sounds like make install didn't put the right bits in the right place, have a look at the tmp build directory hopefully everything is in the build dir but the split build dir is wrong.

Juan_M_Intel
Employee
155 Views

Also in case this is an option for you I was able to install nano into the image provided in /thread/58011 https://communities.intel.com/thread/58011, I used the package in AlexT repo. These are the steps I used:

  1. Add the repo of AlexT to the opkg base feeds. Type the command: echo "src/gz core2-32 http://repo.opkg.net/edison/repo/core2-32 http://repo.opkg.net/edison/repo/core2-32"
  2. Update list of packages. Type: opkg update
  3. To install nano type: opkg install nano

There are other packages you can install as well like the docs, debugging and development packages for nano.

Regards,

 

JPMontero_Intel
VADĂS
Novice
155 Views

Hey JPMontero_Intel,

That's good and all that, but I would have liked to build the program as part of my own layer.

In the worst case scenario (nothing else is working), I will resort to this solution.

Thank you once again,

Vic

AT9
Honored Contributor II
155 Views

It says in that error log

Package python-image (2.7.3-r0.3) installed in root is up to date.

Unknown package 'nano'.

Package libe2p2 (1.42.9-r0) installed in root is up to date.

which, coupled with the information about nano package not being there makes me think the nano recipe must be the reason. So please post it and let's see.

Your layer.conf and the directory stucture looks ok, so I don't think it has any relation to the problem.

VADĂS
Novice
155 Views

Hey Alex,

Thank you for your reply.

I packed everything in https://dl.dropboxusercontent.com/u/24768763/intel-yocto-issue-pack.zip my layer archive that I previously posted, but I'll write the nano recipe here for clarity:

DESCRIPTION = "The GNU nano text editor"

HOMEPAGE = "http://nano-editor.org http://nano-editor.org"

LICENSE = "GNU GPL"

LIC_FILES_CHKSUM="file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"

SRC_URI = "http://ftp.gnu.org/gnu/nano/nano-$ http://ftp.gnu.org/gnu/nano/nano-${PV}.tar.gz"

SRC_URI[md5sum] = "03233ae480689a008eb98feb1b599807"

SRC_URI[sha256sum] = "be68e133b5e81df41873d32c517b3e5950770c00fc5f4dd23810cd635abce67a"

inherit gettext

It looks ok to me.

I hope this somehow helps,

Happy new year,

Vic

AT9
Honored Contributor II
155 Views

Ok, missed the link to your layer

Anyway, I think I see the reason - the recipe actually doesn't have any compilation instructions for bitbake

You need to "include autotools" for bitbake to do the standard "configure && make && make install" stanza for you using its magic, or specify these steps manually in the recipe.

In its current form, the recipe just... succeeds because all it instructs bitbake to do is to download the sources tarball and unpack it. But no packages being generated, so your image recipe legitimately fails, because you've instructed bitbake to include a nano package.

So just add "autotools" to your "include" directive to get basic flow executed. And then I'd suggest you to take a look at this meta-openembedded nano recipe to see what else you can add and tweak in your one: https://github.com/openembedded/meta-openembedded/tree/master/meta-oe/recipes-support/nano meta-openembedded/meta-oe/recipes-support/nano at master · openembedded/meta-openembedded · GitHub

VADĂS
Novice
155 Views

Hey Alex,

You were right. That was it! Thank you very much!

Best wishes,

Vic

AT9
Honored Contributor II
155 Views

Cool, glad to help

ZIDONG_J_Intel
Employee
155 Views

I met the similar problem while add my own package into the image. I create a discussion: Intel_Alvarado

Reply