Skip to contentSkip to conversation

.bb script file for auto tools

DISCUSSION Ugesh Reddy 4 participants 6 messages May 9, 2018 – May 10, 2018 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hello All,
 I am new to bitbake and having the basic understanding on bitbake. My project uses auto tools and it has Makefile.am and configure.ac when it runs with autogen.sh it could able to generate Makefile and configure with generated files the bin program is generated. I would like to do the same with bitbake. The below are the structure As mentioned in the below linkhttps://github.com/DynamicDevices/bbexample

When it executed like below it works fine $ cd bbexample $ ./autogen.sh $ ./configure $ make How can i write the .bb file for the same ?
Regards,Ugesh


|             |

#2 lore raw

The easy way is to just use devtool to create the recipe for you. The important bit is just "inherit autotools" to handle autoreconf/configure/make/make install for you.

Ross

Quoted 36 lines · Ugesh Reddy via bitbake-devel

Hello All,

I am new to bitbake and having the basic understanding on bitbake. My
project uses auto tools and it has Makefile.am and configure.ac when it runs with autogen.sh it could able to generate Makefile and configure with generated files the bin program is generated. I would like to do the same with bitbake. The below are the structure

As mentioned in the below link
https://github.com/DynamicDevices/bbexample

When it executed like below it works fine

 $ cd bbexample
 $ ./autogen.sh
 $ ./configure
 $ make

How can i write the .bb file for the same ?

Regards,
Ugesh

--
_______________________________________________
bitbake-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/bitbake-devel

#3 lore raw

Hello, The devtool hides out the information and trying to learn bitbake and wanted understand each entry in the .BB files.So I would to write it instead of tool. Could you guide me?
On Wed, 9 May 2018 at 5:14 p.m., Burton, Ross<[email protected]> wrote: The easy way is to just use devtool to create the recipe for you.  The important bit is just "inherit autotools" to handle autoreconf/configure/make/make install for you.
Ross
On 9 May 2018 at 03:18, Ugesh Reddy via bitbake-devel <[email protected]> wrote:

Hello All,
 I am new to bitbake and having the basic understanding on bitbake. My project uses auto tools and it has Makefile.am and configure.ac when it runs with autogen.sh it could able to generate Makefile and configure with generated files the bin program is generated. I would like to do the same with bitbake. The below are the structure As mentioned in the below linkhttps://github.com/ DynamicDevices/bbexample

When it executed like below it works fine $ cd bbexample $ ./autogen.sh $ ./configure $ make How can i write the .bb file for the same ?
Regards,Ugesh


|             |

Signature · 4 lines
______________________________ _________________
bitbake-devel mailing list
bitbake-devel@lists. openembedded.org
http://lists.openembedded.org/ mailman/listinfo/bitbake-devel
#4 lore raw
Quoted 7 lines · Ugesh Reddy via bitbake-devel

Hello,
The devtool hides out the information and trying to learn bitbake and
wanted understand each entry in the .BB files.So I would to write it instead of tool.

Could you guide me?

How to write a recipe is well documented:

https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#new-recipe-writing-a-new-recipe

https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#new-recipe-autotooled-package

You can also learn a lot by reviewing and understanding the recipes in oe-core.

#5 lore raw

Hello,

Thanks a lot for the reference manual.

I have created example recipe.

The content of the .bb file:

#

# This file was derived from the 'Hello World!' example recipe in the

# Yocto Project Development Manual.

#

DESCRIPTION = "Simple helloworld application"

SECTION = "examples"

DEPENDS = ""

LICENSE = "MIT"

#LIC_FILES_CHKSUM = "file://LICENSE;md5=0835ade698e0bcf8506ecda2f7b4f302"

LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

#FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"

SRCREV = "4ec84957442182f36351f94c0626560ec3ffd487"

#SRC_URI = "https://github.com/DynamicDevices/bbexample.git"

SRC_URI = "file://bbexample-0.1.tar.gz"

S = "${WORKDIR}/bbexample"

do_configure_prepend () {

  ${S}/autogen.sh

}

inherit autotools

Sources

-rwxr-xr-x 1 umn5cob umn5cob   294 May 10 01:41 autogen.sh

-rw-r--r-- 1 umn5cob umn5cob   274 May 10 01:41 bbexample.c

-rw-r--r-- 1 umn5cob umn5cob   259 May 10 01:41 bbexample.h

-rw-r--r-- 1 umn5cob umn5cob   374 May 10 01:41 bbexamplelib.c

-rw-r--r-- 1 umn5cob umn5cob   659 May 10 01:41 configure.ac

-rw-r--r-- 1 umn5cob umn5cob   303 May 10 01:41 Makefile.am

-rw-rw-r-- 1 umn5cob umn5cob 30416 May 10 02:02 Makefile.in

Error:

NOTE: Preparing RunQueue

NOTE: Executing SetScene Tasks

NOTE: Executing RunQueue Tasks

ERROR: Function failed: do_configure (log file is located at /home/umn5cob/yocto/poky/build/tmp/work/core2-64-poky-linux/bbexample/1.0-r0/temp/log.do_configure.24121)

ERROR: Logfile of failure stored in: /home/umn5cob/yocto/poky/build/tmp/work/core2-64-poky-linux/bbexample/1.0-r0/temp/log.do_configure.24121

Log data follows:

| DEBUG: Executing python function sysroot_cleansstate

| DEBUG: Python function sysroot_cleansstate finished

| DEBUG: SITE files ['endian-little', 'common-linux', 'common-glibc', 'bit-64', 'x86_64-linux', 'common']

| DEBUG: Executing shell function autotools_preconfigure

| Previously configured separate build directory detected, cleaning /home/umn5cob/yocto/poky/build/tmp/work/core2-64-poky-linux/bbexample/1.0-r0/build

| DEBUG: Shell function autotools_preconfigure finished

| DEBUG: Executing python function autotools_copy_aclocals

| DEBUG: SITE files ['endian-little', 'common-linux', 'common-glibc', 'bit-64', 'x86_64-linux', 'common']

| DEBUG: Python function autotools_copy_aclocals finished

| DEBUG: Executing shell function do_configure

| Generating configure files... may take a while.

| autoreconf: 'configure.ac' or 'configure.in' is required

| WARNING: exit code 1 from a shell command.

| ERROR: Function failed: do_configure (log file is located at /home/umn5cob/yocto/poky/build/tmp/work/core2-64-poky-linux/bbexample/1.0-r0/temp/log.do_configure.24121)

ERROR: Task 5 (/home/umn5cob/yocto/poky/meta-yocto-bsp/recipes-bbexample_1.0/bbexample/bbexample_1.0.bb, do_configure) failed with exit code '1'

NOTE: Tasks Summary: Attempted 533 tasks of which 532 didn't need to be rerun and 1 failed.

No currently running tasks (510 of 543)

Summary: 1 task failed:

  /home/umn5cob/yocto/poky/meta-yocto-bsp/recipes-bbexample_1.0/bbexample/bbexample_1.0.bb, do_configure

Summary: There was 1 WARNING message shown.

Summary: There was 1 ERROR message shown, returning a non-zero exit code.

Someone please guide me what is missed and error?


On Thu, 10 May 2018 at 5:59 a.m., Andre McCurdy<[email protected]> wrote: On Wed, May 9, 2018 at 8:59 AM, Ugesh Reddy via bitbake-devel <[email protected]> wrote:

Hello, The devtool hides out the information and trying to learn bitbake and wanted understand each entry in the .BB files.So I would to write it instead of tool. Could you guide me?

How to write a recipe is well documented:

  https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#new-recipe-writing-a-new-recipe
  https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#new-recipe-autotooled-package

You can also learn a lot by reviewing and understanding the recipes in oe-core.

#6 lore raw
Quoted 51 lines · On Thu, May 10, 2018 at 01:54 Ugesh Reddy via bitbake-devel <…

Hello,

Thanks a lot for the reference manual.

I have created example recipe.

*The content of the .bb file:*

#

# This file was derived from the 'Hello World!' example recipe in the

# Yocto Project Development Manual.

#

DESCRIPTION = "Simple helloworld application"

SECTION = "examples"

DEPENDS = ""

LICENSE = "MIT"

#LIC_FILES_CHKSUM = "file://LICENSE;md5=0835ade698e0bcf8506ecda2f7b4f302"

LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

#FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"

SRCREV = "4ec84957442182f36351f94c0626560ec3ffd487"

#SRC_URI = "https://github.com/DynamicDevices/bbexample.git"

SRC_URI = "file://bbexample-0.1.tar.gz"

S = "${WORKDIR}/bbexample"

Quoted 6 lines

do_configure_prepend () {

  ${S}/autogen.sh

}

The equivalent of autogen.sh is already done for you in autotools.bbclass's do_configure(). I'd suggest removing this.

inherit autotools

Quoted 128 lines

*Sources*

(quoted diff) +0 -7
-rwxr-xr-x 1 umn5cob umn5cob   294 May 10 01:41 autogen.sh
 
-rw-r--r-- 1 umn5cob umn5cob   274 May 10 01:41 bbexample.c
 
-rw-r--r-- 1 umn5cob umn5cob   259 May 10 01:41 bbexample.h
 
-rw-r--r-- 1 umn5cob umn5cob   374 May 10 01:41 bbexamplelib.c
 
-rw-r--r-- 1 umn5cob umn5cob   659 May 10 01:41 configure.ac
 
-rw-r--r-- 1 umn5cob umn5cob   303 May 10 01:41 Makefile.am
 
-rw-rw-r-- 1 umn5cob umn5cob 30416 May 10 02:02 Makefile.in

*Error:*

NOTE: Preparing RunQueue

NOTE: Executing SetScene Tasks

NOTE: Executing RunQueue Tasks

*ERROR: Function failed: do_configure (log file is located at /home/umn5cob/yocto/poky/build/tmp/work/core2-64-poky-linux/bbexample/1.0-r0/temp/log.do_configure.24121)*

*ERROR: Logfile of failure stored in:
/home/umn5cob/yocto/poky/build/tmp/work/core2-64-poky-linux/bbexample/1.0-r0/temp/log.do_configure.24121*

Log data follows:

| DEBUG: Executing python function sysroot_cleansstate

| DEBUG: Python function sysroot_cleansstate finished

| DEBUG: SITE files ['endian-little', 'common-linux', 'common-glibc', 'bit-64', 'x86_64-linux', 'common']

| DEBUG: Executing shell function autotools_preconfigure

| Previously configured separate build directory detected, cleaning /home/umn5cob/yocto/poky/build/tmp/work/core2-64-poky-linux/bbexample/1.0-r0/build

| DEBUG: Shell function autotools_preconfigure finished

| DEBUG: Executing python function autotools_copy_aclocals

| DEBUG: SITE files ['endian-little', 'common-linux', 'common-glibc', 'bit-64', 'x86_64-linux', 'common']

| DEBUG: Python function autotools_copy_aclocals finished

| DEBUG: Executing shell function do_configure

| Generating configure files... may take a while.

| autoreconf: 'configure.ac' or 'configure.in' is required

| WARNING: exit code 1 from a shell command.

*| ERROR: Function failed: do_configure (log file is located at /home/umn5cob/yocto/poky/build/tmp/work/core2-64-poky-linux/bbexample/1.0-r0/temp/log.do_configure.24121)*

*ERROR: Task 5 (/home/umn5cob/yocto/poky/meta-yocto-bsp/recipes-bbexample_1.0/bbexample/bbexample_1.0.bb
<http://bbexample_1.0.bb>, do_configure) failed with exit code '1'*

NOTE: Tasks Summary: Attempted 533 tasks of which 532 didn't need to be rerun and 1 failed.

No currently running tasks (510 of 543)

Summary: 1 task failed:

/home/umn5cob/yocto/poky/meta-yocto-bsp/recipes-bbexample_1.0/bbexample/
bbexample_1.0.bb, do_configure

Summary: There was 1 WARNING message shown.

Summary: There was 1 ERROR message shown, returning a non-zero exit code.

Someone please guide me what is missed and error?

Sent from Yahoo Mail on Android
<https://overview.mail.yahoo.com/mobile/?.src=Android>

On Thu, 10 May 2018 at 5:59 a.m., Andre McCurdy <[email protected]> wrote:
On Wed, May 9, 2018 at 8:59 AM, Ugesh Reddy via bitbake-devel < [email protected]> wrote:

Hello,
The devtool hides out the information and trying to learn bitbake and
wanted understand each entry in the .BB files.So I would to write it instead of tool.

Could you guide me?

How to write a recipe is well documented:

https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#new-recipe-writing-a-new-recipe

https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#new-recipe-autotooled-package

You can also learn a lot by reviewing and understanding the recipes in oe-core.

--
_______________________________________________
bitbake-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/bitbake-devel