Code: Select all
inherit cmake externalsrc
#Defines the default configuration to use.
#May be overwritten by other scripts as well as by command line.
#Please note that the sources to be used to actually build the appl have already been checked out.
#This folder is part of the build tree.
applPreset ?= 'ARM-Yocto-release'
applFlavor ?= 'V3'
DEPENDS += " \
swupdate \
zlib \
"
EXTERNALSRC = "${TOPDIR}/applSourceDir"
EXTERNALSRC_BUILD = "${WORKDIR}/appl/${applPreset}"
vardepsexclude += "EXTERNALSRC EXTERNALSRC_BUILD"
FILES:${PN} += "usr"
#Prevents the 'already-stripped' QA error for the appl.
INSANE_SKIP:${PN} += "already-stripped"
#Replaces cmake_do_configure and performs a preset-based cmake configure.
cmake_do_configure() {
bbnote "Configuring preset ${applPreset} (${applFlavor})"
cmake --preset ${applPreset} -DBUILD_FLAVOR=${applFlavor} -DUSE_ENV_CC=TRUE -B "${B}" ${S}
}
cmake_do_compile() {
bbnote "Building ${applPreset} (${applFlavor})"
cd ${S}
cmake --build "${B}" --target clean || exit 1
cmake --build "${B}" || exit 1
}
do_install() {
cmake --install "${B}" --prefix "${D}" || exit 1
}
Code: Select all
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function:
0001:
*** 0002:do_package(d)
0003:
File: '/home/user/testBuild/Bedienteil/Yocto/layers/poky/meta/classes-global/package.bbclass', lineno: 538, function: do_package
0534: bb.build.exec_func("perform_packagecopy", d)
0535: for f in (d.getVar('PACKAGE_PREPROCESS_FUNCS') or '').split():
0536: bb.build.exec_func(f, d)
0537: oe.package.process_split_and_strip_files(d)
*** 0538: oe.package.fixup_perms(d)
0539:
0540: ###########################################################################
0541: # Split up PKGD into PKGDEST
0542: ###########################################################################
File: '/home/user/testBuild/Bedienteil/Yocto/layers/poky/meta/lib/oe/package.py', lineno: 534, function: fixup_perms
0530: origin = dvar + dir
0531: if not (cpath.exists(origin) and cpath.isdir(origin)):
0532: continue
0533:
*** 0534: fix_perms(origin, fs_perms_table[dir].mode, fs_perms_table[dir].uid, fs_perms_table[dir].gid, dir)
0535:
0536: if fs_perms_table[dir].walk == 'true':
0537: for root, dirs, files in os.walk(origin):
0538: for dr in dirs:
File: '/home/user/testBuild/Bedienteil/Yocto/layers/poky/meta/lib/oe/package.py', lineno: 421, function: fix_perms
0417: # -1 is a special value that means don't change the uid/gid
0418: # if they are BOTH -1, don't bother to lchown
0419: if not (uid == -1 and gid == -1):
0420: #bb.note("Fixup Perms: lchown %d:%d %s" % (uid, gid, dir))
*** 0421: os.lchown(path, uid, gid)
0422:
0423: # Return a list of configuration files based on either the default
0424: # files/fs-perms.txt or the contents of FILESYSTEM_PERMS_TABLES
0425: # paths are resolved via BBPATH
Exception: PermissionError: [Errno 1] Operation not permitted: '/home/user/testBuild/build/ARM/yocto-release/yoctoBuild/dev/tmp/work/armv5e-poky-linux-musleabi/appl/1.0/package/usr'
Attempting to set perms of /home/user/testBuild/build/ARM/yocto-release/yoctoBuild/dev/tmp/work/armv5e-poky-linux-musleabi/appl/1.0/package/usr to mode 493, 0:0
DEBUG: Python function do_package finished
Angeblich gibt es einen Prozess namens „Pseudo“, der diese Einschränkung umgeht, dieser Prozess funktioniert hier aber offensichtlich nicht.
Die übergeordnete Struktur sieht so aus:
- Ordner mit CMakeLists.txt
build
Yocto-Build-Ordner
- Yocto-Rezepte
Weil Yocto es WIRKLICH nicht zu mögen scheint, sein Build-Verzeichnis als untergeordneten Ordner eines Quellordners zu haben (aus welchem Grund auch immer, cmake kommt damit gut zurecht), habe ich beschlossen, es auszutricksen.
CMake (das die Konfigurationsdateien schreibt und Bitbake auslöst) erstellt einen Symlink zum Stammordner innerhalb des Build-Ordners und erzeugt im Grunde eine unendliche Rekursion.
Es hat gut funktioniert, das Rezept Da „die zu erstellenden Quellen“ in einem Ordner in seinem Arbeitsverzeichnis verfügbar waren (ähnlich wie SRC_URI), erstellte EXTERNALSRC seine Hashes usw.
Alles hätte gut sein können ... aber dann tauchte dieser Fehler auf und ich habe keine Ahnung, wie ich ihn beheben kann.
Ja?
Vielen Dank.
Mobile version