Kompatibilität mit ZSH und Python 3.10 verbessern
Ein Kunde setzt Arch Linux als Buildsystem ein und hat gefragt ob sich das Yocto verbessern ließe, so dass es auch mit ZSH und Python 3.10 funktioniert.
Dies waren die Feststellungen:
-
Python script uses old “Exception, e” Syntax that is deprecated and fails on newer Python versions: https://git.kontron-electronics.de/sw/yocto/yocto-ktn/-/blob/master/scripts/lib/get-default-build.py
-> Should be “Exception as e”
-> Fails in Python 3.9.9 -
Guide and init-env script are not compatible with ZSH
-> Step int the link fails because it has to be “. ./init-env -m kontron-mx8mm build-ktn-imx” https://docs.kontron-electronics.de/sw/yocto/build-ktn-imx/getting-started-mx8mm.html#initializing-the-build-environment
-> Executing command results in: “./init-env:shift:65: argument to shift must be non-negative”
-> Executing command also results in: “Error: Failed to clone repo: https://git.kontron-electronics.de”
-> Executing command in bash works without a problem -
Following Yocto recipe fails: yocto-ktn/build-ktn-imx/../layers/poky/meta/recipes-kernel/dtc/dtc_1.6.0.bb:do_compile
-> Error message:
libfdt/libfdt.h:251:28: error: array subscript ‘struct fdt_header[0]’ is partly outside array bounds of ‘unsigned char[4]’ [-Werror=array-bounds] 251 | fdth->name = cpu_to_fdt32(val); libfdt/libfdt.h:253:1: note: in expansion of macro ‘fdt_set_hdr_’ 253 | fdt_set_hdr_(magic);
fdtdump.c:216:31: note: while referencing ‘smagic’ 216 | unsigned char smagic[FDT_MAGIC_SIZE];
-> Using: gcc (GCC) 11.1.0
Eventuell machen die Anpassungen Sinn, nicht nur für diesen einen Fall, sondern auch für neuere Ubuntu Versionen, falls diese unterstützt werden sollen.