Hi Romain, On Fri, Jan 27, 2017 at 10:01 AM, Romain Perier <[email protected]> wrote: > Hi all, > > It remembers me a discussion that I wanted to have with Trevor: do we want > specific TUNES (like these ones) in the machines files ? it is distro > specific ?
Awesome! I'm happy to see we're both thinking along the same lines! That was exactly the same thought I had too :-) I even had a couple private conversations with some other BSP maintainers I know to ask them about this, and I spent some time surveying other BSP layers to see what other people are doing. Unfortunately there's no consensus, which means that there is no absolute right or wrong. I personally do feel that a good BSP layer should not be providing a DEFAULTTUNE, this decision should be up to the user and/or a DISTRO layer. In practice, however, this topic is complicated (especially in the ARM world) by the existence of the binaries for things like MALI (accelerated graphics). Other devices could potentially have binary blobs for various other reasons. BSPs which provide support for aarch64 devices are lucky because they can skirt this entire issue; aarch64 implies hard float, so the default tunes are always going to enable hard float and therefore work with binaries. 32-bit BSPs are going to have this problem. Looking at other BSP layers many specify a DEFAULTTUNE: - meta-raspberrypi - meta-xilinx - meta-gumstix - meta-intel - meta-odroid (akuster) - meta-freescale - meta-sunxi Most of these DEFAULTTUNE suggestions, however, are found in conf/machine/include/<processor>.inc files, not in conf/machine/<board>.bb files directly. Looking closely, however, in many cases a BSP layer might have configurations for many different devices, only some of which have DEFAULTTUNEs (this is true for meta-sunxi, for example). BSP layers that I can find that don't have DEFAULTTUNES are: - meta-qcom - meta-beaglebone (koen) - meta-exynos - meta-ettus In meta-beaglebone's case, it requires conf/machine/include/ti33x.inc (which comes from meta-ti), that file then has a "DEFAULTTUNE ?=" but it could be argued that meta-ti is a chip layer and not a BSP layer. At the very least, it should not be something that is provided with an equals sign, it should be specified in a BSP layer with ?=. Also, the general consensus is that a DEFAULTTUNE should not be given in a machine file directly. Most BSP layers have a "chip include file" in which a DEFAULTTUNE is given. Many layers don't include DEFAULTTUNE but have notes in their README files that explain this to the user and give suggestions for what they might put in their conf/local.conf files. meta-sunxi, for example, doesn't give DEFAULTTUNEs for all their machine files, but they do provide recipes for mali. They handle this in the mali recipe by checking to see if the user has enabled hf. If the user is trying to use mali but hasn't enabled hf then that recipe will error out and let the user know they have to enable hf if they want mali or they have to not try to use mali if they prefer to use soft-float. I think that's a good way of handling this situation (see meta-sunxi/recipes-graphics/libgles/sunxi-mali_git.bb). There is some debate on whether a default tune should point to a specific chip (e.g. cortexa17) or whether it should only specify an ABI (e.g. armv7a). Overwhelmingly in the ARM BSPs specific chips are used. -- _______________________________________________ yocto mailing list [email protected] https://lists.yoctoproject.org/listinfo/yocto
