Skip to contentSkip to conversation

Can a .bbappend introduce a different PACKAGE_ARCH ?

DISCUSSION Carlos Rafael Giani 2 participants 2 messages Apr 6, 2013

lore
Share & tools
lore
#0 lore raw

Hello,

assume there is package foo, which is normally not dependent on a specific machine. It is built with default, machine independent configuration options. But then I want to add a .bbappend to it, which add some configuration options that make it machine dependent (imagine something like --device=beagleboard). I then add PACKAGE_ARCH=${MACHINE_ARCH} to the .bbappend file. Is this actually okay to do? Or does it break something?

#1 lore raw
Quoted 5 lines · Carlos Rafael Giani

Hello,

assume there is package foo, which is normally not dependent on a specific machine. It is built with default, machine independent configuration options. But then I want to add a .bbappend to it, which add some configuration options that make it machine dependent (imagine something like --device=beagleboard). I then add PACKAGE_ARCH=${MACHINE_ARCH} to the .bbappend file. Is this actually okay to do? Or does it break something?

You can do this and it will work fine.

However, if your .bbappend file forces the use of any override directories/files, I believe it will happen automatically. For example, my BSP layers have their own network configuration files which I do like this:

gthomas@zeus:/local/poky-multi$ tree -S meta-cobra4430p82/recipes-core/netbase/
meta-cobra4430p82/recipes-core/netbase/
   netbase-5.0
      cobra4430p82
         interfaces
         modem.py
   netbase_5.0.bbappend

2 directories, 4 files

gthomas@zeus:/local/poky-multi$ cat meta-cobra4430p82/packages/netbase/netbase_5.0.bbappend
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:${THISDIR}/${PN}:"

SRC_URI_append = " file://modem.py"

do_install_append() {
    install -m 0755 ${WORKDIR}/modem.py ${D}/etc
}

This setup generates a machine dependent package.

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------