Skip to contentSkip to conversation

best way to add conditional configure option

DISCUSSION Neuer User 3 participants 8 messages Jun 4, 2014

lore
Share & tools
lore

Neuer User

author
#0 lore raw

Hi

I have a simple recipe (libcec) that I would like to add an additional configure option to, depending if the machine is an imx6 based one.

How would I do that best?

Here is the recipe:

---------------------------------------------
SUMMARY = "USB CEC Adaptor communication Library with patches for imx6" HOMEPAGE = "http://libcec.pulse-eight.com/"

LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=5e8e16396992369f73f3d28875f846da"

DEPENDS = "udev lockdev"

PV = "2.4.1"

SRCREV = "42c3c07a79b8155635851c2eed9558b221b89047" SRC_URI = "git://github.com/xbmc-imx6/libcec.git"

S = "${WORKDIR}/git"

inherit autotools pkgconfig

# cec-client and xbmc need the .so present to work :(
FILES_${PN} += "${libdir}/*.so"
INSANE_SKIP_${PN} = "dev-so"
---------------------------------------------

The conditional configure option is "--enable-imx6".

Thanks for helping

Michael

#1 lore raw
Quoted 1 line · Neuer User

The conditional configure option is "--enable-imx6".

You can use a machine override, along the lines of:

EXTRA_OECONF_ixm6 = "--enable-imx6"

This will set EXTRA_OECONF to --enable-imx6 if the MACHINE is ixm6. It gets a little complicated when you've general and machine-specific options but for a single option that works just fine.

Ross

author
#2 lore raw

Hmm, like this?

-----------------------------
SUMMARY = "USB CEC Adaptor communication Library with patches for imx6" HOMEPAGE = "http://libcec.pulse-eight.com/"

LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=5e8e16396992369f73f3d28875f846da"

DEPENDS = "udev lockdev"

PV = "2.4.1"

SRCREV = "42c3c07a79b8155635851c2eed9558b221b89047" SRC_URI = "git://github.com/xbmc-imx6/libcec.git"

S = "${WORKDIR}/git"

inherit autotools pkgconfig

# cec-client and xbmc need the .so present to work :(
FILES_${PN} += "${libdir}/*.so"
INSANE_SKIP_${PN} = "dev-so"

EXTRA_OECONF_imx6 = "--enable-imx6"
-------------------------------

That doesn't seem to work?!

Extracts from log.do_configure:

...
autoreconf: Leaving directory `.'
NOTE: Running /home/ubuntu/yocto/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/libcec/2.4.1-r0/git/configure
--build=i686-linux --host=arm-poky-linux-gnueabi

             --target=arm-poky-linux-gnueabi                 --prefix=/usr
                  --exec_prefix=/usr              --bindir=/usr/bin
          --sbindir=/usr/sbin             --libexecdir=/usr/lib/libcec
          --datadir=/usr/share            --sysconfdir=/etc

--sharedstatedir=/com --localstatedir=/var
--libdir=/usr/lib --includedir=/usr/include
--oldincludedir=/usr/include
--infodir=/usr/share/info
--mandir=/usr/share/man --disable-silent-rules
--disable-dependency-tracking
--with-libtool-sysroot=/home/ubuntu/yocto/build/tmp/sysroots/cubox-i
configure: loading site script /home/ubuntu/yocto/sources/poky/meta/site/endian-little
...

...
libCEC version 2:1:0 configured

Compilation flags:
CXXFLAGS : -O2 -pipe -g -feliminate-unused-debug-types
-fvisibility-inlines-hidden -fPIC -Wall -Wextra -Wno-missing-field-initializers -Wno-psabi
libCEC LDFLAGS : -llockdev -ldl -lpthread -ludev -lrt client LDFLAGS : -ldl -lpthread

Configured features:

  Pulse-Eight CEC Adapter :             yes
  Pulse-Eight CEC Adapter detection :   yes
  Raspberry Pi support :                no
  TDA995x support :                     no
  i.MX6 support :                       no

...

What am I missing?

Michael

Am 04.06.2014 10:59, schrieb Burton, Ross:

Quoted 13 lines · Neuer User
Quoted 1 line

The conditional configure option is "--enable-imx6".

You can use a machine override, along the lines of:

EXTRA_OECONF_ixm6 = "--enable-imx6"

This will set EXTRA_OECONF to --enable-imx6 if the MACHINE is ixm6. It gets a little complicated when you've general and machine-specific options but for a single option that works just fine.

Ross

author
#3 lore raw

The problem is that the MACHINE variable is "cubox-i", which is based on imx6.

Guess that should still work somehow, though...

Am 04.06.2014 11:13, schrieb Neuer User:

Quoted 91 lines

Hmm, like this?

-----------------------------
SUMMARY = "USB CEC Adaptor communication Library with patches for imx6" HOMEPAGE = "http://libcec.pulse-eight.com/"

LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=5e8e16396992369f73f3d28875f846da"

DEPENDS = "udev lockdev"

PV = "2.4.1"

SRCREV = "42c3c07a79b8155635851c2eed9558b221b89047" SRC_URI = "git://github.com/xbmc-imx6/libcec.git"

S = "${WORKDIR}/git"

inherit autotools pkgconfig

# cec-client and xbmc need the .so present to work :(
FILES_${PN} += "${libdir}/*.so"
INSANE_SKIP_${PN} = "dev-so"

EXTRA_OECONF_imx6 = "--enable-imx6"
-------------------------------

That doesn't seem to work?!

Extracts from log.do_configure:

...
autoreconf: Leaving directory `.'
NOTE: Running /home/ubuntu/yocto/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/libcec/2.4.1-r0/git/configure
--build=i686-linux --host=arm-poky-linux-gnueabi

             --target=arm-poky-linux-gnueabi                 --prefix=/usr
                  --exec_prefix=/usr              --bindir=/usr/bin
          --sbindir=/usr/sbin             --libexecdir=/usr/lib/libcec
          --datadir=/usr/share            --sysconfdir=/etc

--sharedstatedir=/com --localstatedir=/var
--libdir=/usr/lib --includedir=/usr/include
--oldincludedir=/usr/include
--infodir=/usr/share/info
--mandir=/usr/share/man --disable-silent-rules
--disable-dependency-tracking
--with-libtool-sysroot=/home/ubuntu/yocto/build/tmp/sysroots/cubox-i
configure: loading site script /home/ubuntu/yocto/sources/poky/meta/site/endian-little
...

...
libCEC version 2:1:0 configured

Compilation flags:
CXXFLAGS : -O2 -pipe -g -feliminate-unused-debug-types

(quoted diff) +0 -2
-fvisibility-inlines-hidden -fPIC -Wall -Wextra
-Wno-missing-field-initializers  -Wno-psabi
  libCEC LDFLAGS : -llockdev -ldl -lpthread  -ludev -lrt
  client LDFLAGS : -ldl -lpthread

Configured features:

  Pulse-Eight CEC Adapter :             yes
  Pulse-Eight CEC Adapter detection :   yes
  Raspberry Pi support :                no
  TDA995x support :                     no
  i.MX6 support :                       no

...

What am I missing?

Michael

Am 04.06.2014 10:59, schrieb Burton, Ross:

Quoted 13 lines · Neuer User
Quoted 1 line

The conditional configure option is "--enable-imx6".

You can use a machine override, along the lines of:

EXTRA_OECONF_ixm6 = "--enable-imx6"

This will set EXTRA_OECONF to --enable-imx6 if the MACHINE is ixm6. It gets a little complicated when you've general and machine-specific options but for a single option that works just fine.

Ross

author
#4 lore raw

I searched through other recipes for "EXTRA_OECONF_" and found somehting that worked:

EXTRA_OECONF_append_mx6 = "--enable-imx6"

Main difference is the mx6 versus imx6.

Thanks a lot

Michael

Am 04.06.2014 11:21, schrieb Neuer User:

Quoted 100 lines

The problem is that the MACHINE variable is "cubox-i", which is based on imx6.

Guess that should still work somehow, though...

Am 04.06.2014 11:13, schrieb Neuer User:

Quoted 91 lines

Hmm, like this?

-----------------------------
SUMMARY = "USB CEC Adaptor communication Library with patches for imx6" HOMEPAGE = "http://libcec.pulse-eight.com/"

LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=5e8e16396992369f73f3d28875f846da"

DEPENDS = "udev lockdev"

PV = "2.4.1"

SRCREV = "42c3c07a79b8155635851c2eed9558b221b89047" SRC_URI = "git://github.com/xbmc-imx6/libcec.git"

S = "${WORKDIR}/git"

inherit autotools pkgconfig

# cec-client and xbmc need the .so present to work :(
FILES_${PN} += "${libdir}/*.so"
INSANE_SKIP_${PN} = "dev-so"

EXTRA_OECONF_imx6 = "--enable-imx6"
-------------------------------

That doesn't seem to work?!

Extracts from log.do_configure:

...
autoreconf: Leaving directory `.'
NOTE: Running /home/ubuntu/yocto/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/libcec/2.4.1-r0/git/configure
--build=i686-linux --host=arm-poky-linux-gnueabi

             --target=arm-poky-linux-gnueabi                 --prefix=/usr
                  --exec_prefix=/usr              --bindir=/usr/bin
          --sbindir=/usr/sbin             --libexecdir=/usr/lib/libcec
          --datadir=/usr/share            --sysconfdir=/etc

--sharedstatedir=/com --localstatedir=/var
--libdir=/usr/lib --includedir=/usr/include
--oldincludedir=/usr/include
--infodir=/usr/share/info
--mandir=/usr/share/man --disable-silent-rules
--disable-dependency-tracking
--with-libtool-sysroot=/home/ubuntu/yocto/build/tmp/sysroots/cubox-i
configure: loading site script /home/ubuntu/yocto/sources/poky/meta/site/endian-little
...

...
libCEC version 2:1:0 configured

Compilation flags:
CXXFLAGS : -O2 -pipe -g -feliminate-unused-debug-types

(quoted diff) +0 -2
-fvisibility-inlines-hidden -fPIC -Wall -Wextra
-Wno-missing-field-initializers  -Wno-psabi
  libCEC LDFLAGS : -llockdev -ldl -lpthread  -ludev -lrt
  client LDFLAGS : -ldl -lpthread

Configured features:

  Pulse-Eight CEC Adapter :             yes
  Pulse-Eight CEC Adapter detection :   yes
  Raspberry Pi support :                no
  TDA995x support :                     no
  i.MX6 support :                       no

...

What am I missing?

Michael

Am 04.06.2014 10:59, schrieb Burton, Ross:

Quoted 13 lines · Neuer User
Quoted 1 line

The conditional configure option is "--enable-imx6".

You can use a machine override, along the lines of:

EXTRA_OECONF_ixm6 = "--enable-imx6"

This will set EXTRA_OECONF to --enable-imx6 if the MACHINE is ixm6. It gets a little complicated when you've general and machine-specific options but for a single option that works just fine.

Ross

#5 lore raw
Quoted 3 lines · Neuer User

EXTRA_OECONF_append_mx6 = "--enable-imx6"

Main difference is the mx6 versus imx6.

Yeah I didn't know what your machine type is, so was guessing.

Ross

#6 lore raw
In reply to Neuer User
Quoted 4 lines · On Wednesday 04 June 2014 11:24:36 Neuer User wrote:

I searched through other recipes for "EXTRA_OECONF_" and found somehting that worked:

EXTRA_OECONF_append_mx6 = "--enable-imx6"

BTW I'd suggest a leading space in the value, since _append won't add one for you. You might have got away with not adding one this time if the original value already had a trailing space, but it's good practice to add one.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
author
#7 lore raw

Am 04.06.2014 11:59, schrieb Paul Eggleton:

Quoted 13 lines · On Wednesday 04 June 2014 11:24:36 Neuer User wrote:
Quoted 4 lines

I searched through other recipes for "EXTRA_OECONF_" and found somehting that worked:

EXTRA_OECONF_append_mx6 = "--enable-imx6"

BTW I'd suggest a leading space in the value, since _append won't add one for you. You might have got away with not adding one this time if the original value already had a trailing space, but it's good practice to add one.

Cheers,
Paul

Thanks, will add that :-)