Skip to contentSkip to conversation

Per-recipe sysroot + BBCLASSEXTEND=cross

DISCUSSION Enrico Scholz 1 participant 1 message May 23, 2017

lore
Share & tools
lore
#0 lore raw

Hello,

when having

--- test-a.bb ---
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-3.0;md5=c79ff39f19dfec6d293b95dea7b07891"

BBCLASSEXTEND = "cross"

do_install_forcevariable() {
    install -d ${D}
    touch ${D}/foo
}

----

and

--- test-b.bb ---
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-3.0;md5=c79ff39f19dfec6d293b95dea7b07891"

DEPENDS = "test-a-cross"
----

the sysroot of 'test-b' will not contain the files from 'test-a-cross' because the manifest could not be found:

| $ ./bitbake test-b
| WARNING: test-b-1.0-r0 do_prepare_recipe_sysroot: Manifest ... manifest-allarch-test-a-cross.populate_sysroot not found?
| ...

The sysroot code expects to find '-cross-' in the PN, so I changed test-a.bb to contain

---

python () {
    override = d.getVar("CLASSOVERRIDE", True) or ""
    if override == "class-cross":
        d.appendVar("PN", "-${TARGET_ARCH}")
        d.setVar("SPECIAL_PKGSUFFIX", "-cross-${TARGET_ARCH}")
}

---

Is there a better way to use BBCLASSEXTEND to build cross recipes?

Enrico

Signature · 3 lines
SIGMA Chemnitz GmbH       Registergericht:   Amtsgericht Chemnitz HRB 1750
Am Erlenwald 13           Geschaeftsfuehrer: Grit Freitag, Frank Pyritz
09128 Chemnitz