Skip to content

Commit

Permalink
Merge branch 'metayoe-tweak' into kraj/master
Browse files Browse the repository at this point in the history
  • Loading branch information
kraj committed Sep 5, 2020
2 parents 9e32b36 + 4d552fe commit 9624d71
Show file tree
Hide file tree
Showing 105 changed files with 8,668 additions and 0 deletions.
1 change: 1 addition & 0 deletions sources/meta-yoe/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
YOE Distribution Policy Layer based on OpenEmbedded Build Infrastructure
43 changes: 43 additions & 0 deletions sources/meta-yoe/classes/bec-image.bbclass
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
IMAGE_FEATURES += "empty-root-password allow-empty-password"

IMAGE_PREPROCESS_COMMAND += "do_systemd_network ; "

do_systemd_network () {
install -d ${IMAGE_ROOTFS}${sysconfdir}/systemd/network
cat << EOF > ${IMAGE_ROOTFS}${sysconfdir}/systemd/network/10-en.network
[Match]
Name=en*

[Network]
DHCP=yes

[DHCP]
RouteMetric=10
ClientIdentifier=mac
EOF

cat << EOF > ${IMAGE_ROOTFS}${sysconfdir}/systemd/network/11-eth.network
[Match]
Name=eth*

[Network]
DHCP=yes

[DHCP]
RouteMetric=10
ClientIdentifier=mac
EOF

cat << EOF > ${IMAGE_ROOTFS}${sysconfdir}/systemd/network/12-wl.network
[Match]
Name=wl*

[Network]
DHCP=yes

[DHCP]
RouteMetric=20
ClientIdentifier=mac
EOF

}
2 changes: 2 additions & 0 deletions sources/meta-yoe/conf/distro/baremetal.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
TCLIBC = "baremetal"

7 changes: 7 additions & 0 deletions sources/meta-yoe/conf/distro/busyboxinit.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# enable mdev/busybox for init
DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
VIRTUAL-RUNTIME_dev_manager = "busybox-mdev"
VIRTUAL-RUNTIME_init_manager = "busybox"
VIRTUAL-RUNTIME_initscripts = "initscripts"
VIRTUAL-RUNTIME_keymaps = "keymaps"
VIRTUAL-RUNTIME_login_manager = "busybox"
9 changes: 9 additions & 0 deletions sources/meta-yoe/conf/distro/eglfs.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
DISTRO_FEATURES_remove = " x11 wayland"

# Use bcm userland graphics driver
DISABLE_VC4GRAPHICS = "1"

# Use rdk backend for eglfs
PREFERRED_PROVIDER_virtual/wpebackend = "wpebackend-rdk"

PACKAGECONFIG_pn-wpebackend-rdk_rpi = "rpi"
1 change: 1 addition & 0 deletions sources/meta-yoe/conf/distro/glibc.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TCLIBC = "glibc"
1 change: 1 addition & 0 deletions sources/meta-yoe/conf/distro/musl.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TCLIBC = "musl"
2 changes: 2 additions & 0 deletions sources/meta-yoe/conf/distro/newlib.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
TCLIBC = "newlib"

6 changes: 6 additions & 0 deletions sources/meta-yoe/conf/distro/systemd.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Use systemd for system initialization
DISTRO_FEATURES_append = " systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " sysvinit"
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = "systemd-compat-units"
VIRTUAL-RUNTIME_login_manager = "shadow-base"
6 changes: 6 additions & 0 deletions sources/meta-yoe/conf/distro/sysvinit.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Use sysvinit for system initialization
DISTRO_FEATURES_append = " sysvinit"
DISTRO_FEATURES_BACKFILL_CONSIDERED_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "sysvinit"
VIRTUAL-RUNTIME_initscripts = "initscripts"
VIRTUAL-RUNTIME_login_manager = "busybox"
1 change: 1 addition & 0 deletions sources/meta-yoe/conf/distro/tiny.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DISTRO_FEATURES_remove = "pam"
3 changes: 3 additions & 0 deletions sources/meta-yoe/conf/distro/wayland.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DISTRO_FEATURES_append = " wayland"

PACKAGECONFIG_append_pn-cog_rpi = " drm"
2 changes: 2 additions & 0 deletions sources/meta-yoe/conf/distro/x11.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DISTRO_FEATURES_append = " x11"
DISTRO_FEATURES_remove = "wayland"
2 changes: 2 additions & 0 deletions sources/meta-yoe/conf/distro/yoe-baremetal.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require yoe.inc
require baremetal.inc
4 changes: 4 additions & 0 deletions sources/meta-yoe/conf/distro/yoe-glibc-busyboxinit-eglfs.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require yoe.inc
require glibc.inc
require busyboxinit.inc
require eglfs.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require yoe.inc
require glibc.inc
require busyboxinit.inc
require wayland.inc
4 changes: 4 additions & 0 deletions sources/meta-yoe/conf/distro/yoe-glibc-busyboxinit-x11.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require yoe.inc
require glibc.inc
require busyboxinit.inc
require x11.inc
4 changes: 4 additions & 0 deletions sources/meta-yoe/conf/distro/yoe-glibc-systemd-eglfs.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require yoe.inc
require glibc.inc
require systemd.inc
require eglfs.inc
4 changes: 4 additions & 0 deletions sources/meta-yoe/conf/distro/yoe-glibc-systemd-wayland.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require yoe.inc
require glibc.inc
require systemd.inc
require wayland.inc
4 changes: 4 additions & 0 deletions sources/meta-yoe/conf/distro/yoe-glibc-systemd-x11.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require yoe.inc
require glibc.inc
require systemd.inc
require x11.inc
4 changes: 4 additions & 0 deletions sources/meta-yoe/conf/distro/yoe-glibc-sysvinit-eglfs.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require yoe.inc
require glibc.inc
require sysvinit.inc
require eglfs.inc
4 changes: 4 additions & 0 deletions sources/meta-yoe/conf/distro/yoe-glibc-sysvinit-wayland.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require yoe.inc
require glibc.inc
require sysvinit.inc
require wayland.inc
4 changes: 4 additions & 0 deletions sources/meta-yoe/conf/distro/yoe-glibc-sysvinit-x11.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require yoe.inc
require glibc.inc
require sysvinit.inc
require x11.inc
4 changes: 4 additions & 0 deletions sources/meta-yoe/conf/distro/yoe-musl-busyboxinit-eglfs.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require yoe.inc
require musl.inc
require busyboxinit.inc
require eglfs.inc
4 changes: 4 additions & 0 deletions sources/meta-yoe/conf/distro/yoe-musl-busyboxinit-wayland.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require yoe.inc
require musl.inc
require busyboxinit.inc
require wayland.inc
4 changes: 4 additions & 0 deletions sources/meta-yoe/conf/distro/yoe-musl-busyboxinit-x11.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require yoe.inc
require musl.inc
require busyboxinit.inc
require x11.inc
4 changes: 4 additions & 0 deletions sources/meta-yoe/conf/distro/yoe-musl-systemd-eglfs.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require yoe.inc
require musl.inc
require systemd.inc
require eglfs.inc
4 changes: 4 additions & 0 deletions sources/meta-yoe/conf/distro/yoe-musl-systemd-wayland.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require yoe.inc
require musl.inc
require systemd.inc
require wayland.inc
4 changes: 4 additions & 0 deletions sources/meta-yoe/conf/distro/yoe-musl-systemd-x11.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require yoe.inc
require musl.inc
require systemd.inc
require x11.inc
4 changes: 4 additions & 0 deletions sources/meta-yoe/conf/distro/yoe-musl-sysvinit-eglfs.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require yoe.inc
require musl.inc
require sysvinit.inc
require eglfs.inc
4 changes: 4 additions & 0 deletions sources/meta-yoe/conf/distro/yoe-musl-sysvinit-wayland.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require yoe.inc
require musl.inc
require sysvinit.inc
require wayland.inc
4 changes: 4 additions & 0 deletions sources/meta-yoe/conf/distro/yoe-musl-sysvinit-x11.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require yoe.inc
require musl.inc
require sysvinit.inc
require x11.inc
2 changes: 2 additions & 0 deletions sources/meta-yoe/conf/distro/yoe-newlib.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require yoe.inc
require newlib.inc
2 changes: 2 additions & 0 deletions sources/meta-yoe/conf/distro/yoe.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
YOE_PROFILE ??= "yoe-glibc-sysvinit-wayland"
require ${YOE_PROFILE}.inc
172 changes: 172 additions & 0 deletions sources/meta-yoe/conf/distro/yoe.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
#
# Distro Settings
#
DISTRO_NAME = "Yoe Linux"
MAINTAINER = "Yoe Distro Community <http://yoedistro.org>"
TARGET_VENDOR = "-yoe"
SDK_VENDOR = "-yoesdk"
# Distro version keep it up with Yocto release
DISTRO_VERSION = "3.1"
DISTRO_CODENAME = "argali"
SDK_VERSION := "${DISTRO_VERSION}"

SDK_NAME_PREFIX = "yoe"
SDK_NAME = "${SDK_NAME_PREFIX}-${SDKMACHINE}-${IMAGE_BASENAME}-${TUNE_PKGARCH}-${MACHINE}"
SDKPATH = "/opt/${SDK_NAME_PREFIX}/${SDK_VERSION}"
SDKEXTPATH = "~/${SDK_NAME_PREFIX}_sdk/${DISTRO_VERSION}"
SDK_INCLUDE_NATIVESDK = "1"

DISTRO_VERSION[vardepsexclude] = "DATE"
SDK_VERSION[vardepsexclude] = "DATE"

PREMIRRORS ??= "\
bzr://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
cvs://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
git://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
gitsm://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
hg://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
osc://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
p4://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
svn://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n"

MIRRORS =+ "\
ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
http://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
https://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n"

# Allow reusing DL_DIR from the current build as a mirror for other builds.
BB_GENERATE_MIRROR_TARBALLS = "1"

# The CONNECTIVITY_CHECK_URI's are used to test whether we can succesfully
# fetch from the network (and warn you if not). To disable the test set
# the variable to be empty.
# Git example url: git://git.yoctoproject.org/yocto-firewall-test;protocol=git;rev=master
CONNECTIVITY_CHECK_URIS ?= "https://www.example.com/"

PRSERV_HOST = "localhost:0"
TCLIBCAPPEND = ""

BUILDHISTORY_COMMIT ?= "1"

# Do not use verbose logs for cmake, this reduces build logs significantly, for recipes
# e.g. qtwebkit from 163M down to < 1M
CMAKE_VERBOSE ?= ""

# the following is required because some BSP layers (fsl) don't set this, and then
# other BSP layers fail bitbake parsing (ti).
MACHINE_KERNEL_PR ??= "0"

# accound for some layers which have bbappends for layers we dont include
BB_DANGLINGAPPENDS_WARNONLY = "1"

# Poky goodness
# QA check settings - a little stricter than the OE-Core defaults

WARN_TO_ERROR_QA = "ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi \
textrel already-stripped incompatible-license files-invalid \
installed-vs-shipped compile-host-path install-host-path \
pn-overrides infodir build-deps src-uri-bad \
unknown-configure-option symlink-to-sysroot multilib \
invalid-packageconfig host-user-contaminated uppercase-pn patch-fuzz \
mime mime-xdg \
"
WARN_QA_remove = "${WARN_TO_ERROR_QA}"
ERROR_QA_append = " ${WARN_TO_ERROR_QA}"
#ERROR_QA_remove = "split-strip"
#
# Additional image features
#
# The following is a list of additional classes to use when building images which
# enable extra features. Some available options which can be included in this variable
# are:
# - 'buildstats' collect build statistics
# - 'image-mklibs' to reduce shared library files size for an image
# - 'image-prelink' in order to prelink the filesystem image
# - 'image-swab' to perform host system intrusion detection
# NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink
# NOTE: mklibs also needs to be explicitly enabled for a given image, see local.conf.extended
# image-prelink sometimes disabled due to issues with IFUNC symbol relocation
USER_CLASSES ?= "buildstats buildhistory buildstats-summary image-mklibs image-prelink"

IMAGE_CLASSES += "testimage testsdk"

require conf/distro/include/no-static-libs.inc
require conf/distro/include/yocto-uninative.inc
require conf/distro/include/security_flags.inc

INHERIT += "${@bb.utils.contains('BUILD_ARCH', 'ppc64le', '', 'uninative', d)}"

# Add /etc/build to every image
INHERIT += "image-buildinfo"

DISTRO_FEATURES_append = " largefile opengl multiarch wayland pam polkit "

#PREFERRED_PROVIDER_pkgconfig = "pkgconf"
#PREFERRED_PROVIDER_pkgconfig-native = "pkgconf-native"
#PREFERRED_PROVIDER_nativesdk-pkgconfig = "nativesdk-pkgconf"

PREFERRED_PROVIDER_virtual/libgl ??= "mesa"
PREFERRED_PROVIDER_virtual/libgl-native ?= "mesa-native"
PREFERRED_PROVIDER_libgl-native = "mesa-native"
PREFERRED_PROVIDER_virtual/psplash ??= "psplash"
PREFERRED_PROVIDER_psplash-support ??= "psplash"
PREFERRED_PROVIDER_jpeg ??= "libjpeg-turbo"
PREFERRED_PROVIDER_jpeg-native ??= "libjpeg-turbo-native"
PREFERRED_PROVIDER_grub-efi-native ??= "grub-efi-native"
PREFERRED_PROVIDER_u-boot-fw-utils ??= "libubootenv"
PREFERRED_PROVIDER_u-boot ??= "u-boot"

# This helps in using imx specific provider when building for imx platforms, otherwise
# it uses the oe-core versions
IMX_DEFAULT_BOOTLOADER ??= "u-boot"
PREFERRED_PROVIDER_u-boot-tools-native ??= "${IMX_DEFAULT_BOOTLOADER}-tools-native"
PREDERRED_PROVIDED_nativesdk-u-boot-tools ??= "${IMX_DEFAULT_BOOTLOADER}-tools-native"
PREFERRED_PROVIDER_u-boot-mkimage-native ??= "${IMX_DEFAULT_BOOTLOADER}-tools-native"
PREFERRED_PROVIDER_nativesdk-u-boot-mkimage ??= "nativesdk-${IMX_DEFAULT_BOOTLOADER}-tools"

# wpe backend selection, wpebackend-fdo, wpebackend-mesa, wpebackend-rdk
#
PREFERRED_PROVIDER_virtual/wpebackend ??= "wpebackend-fdo"

# Disable qt in wpe
PACKAGECONFIG_remove_pn-wpewebkit = "qtwpe"

# Pin versions, some BSP layers are housing older versions and have higher BBFILE_PRIORITY
# as a result DEFAULT_PREFERENCE = "-1" does not help either so pin it here
PREFERRED_VERSION_swig = "3.0.12"
PREFERRED_VERSION_swig-native = "3.0.12"
PREFERRED_VERSION_swig-nativesdk = "3.0.12"

# the following is required because some BSP layers (fsl) don't set this, and then
# other BSP layers fail bitbake parsing (ti).
MACHINE_KERNEL_PR = "0"

# Enable u-boot for RPI
RPI_USE_U_BOOT = "1"

# Disable rpi raimbow screen
DISABLE_SPLASH = "1"

# swupdate initramfs init system
SWUPDATE_INIT = "tiny"

# we want to have boot + rootfs ( that can grow )
WKS_FILE_beaglebone = "sdimage-bootpart.wks"

INHERIT += "blacklist"
PNBLACKLIST[build-appliance-image] = "tries to include whole downloads directory in /home/builder/poky :/"
PNBLACKLIST[smartrefrigerator] = "Needs porting to QT > 5.6"
PNBLACKLIST[qmlbrowser] = "Needs porting to QT > 5.6"
PNBLACKLIST[minehunt] = "Needs porting to QT > 5.6"
PNBLACKLIST[homeautomation] = "Needs porting to QT > 5.6"
PNBLACKLIST[samegame] = "Needs porting to QT > 5.6"
PNBLACKLIST[applicationlauncher] = "Needs porting to QT > 5.6"
PNBLACKLIST[spacetouch] = "Needs porting to libplanes 1.0"
PNBLACKLIST[qtviewplanes] = "Needs porting to libplanes 1.0"
PNBLACKLIST[egt-thermostat] = "Needs porting to egt 0.8.2+"
PNBLACKLIST[bigbuckbunny-1080p] = "big and doesn't really need to be tested so much"
PNBLACKLIST[bigbuckbunny-480p] = "big and doesn't really need to be tested so much"
PNBLACKLIST[bigbuckbunny-720p] = "big and doesn't really need to be tested so much"
PNBLACKLIST[tearsofsteel-1080p] = "big and doesn't really need to be tested so much"
RDEPENDS_packagegroup-meta-multimedia_remove_pn-packagegroup-meta-multimedia = "bigbuckbunny-1080p bigbuckbunny-480p bigbuckbunny-720p tearsofsteel-1080p"
PNBLACKLIST[build-appliance-image] = "tries to include whole downloads directory in /home/builder/poky :/"
26 changes: 26 additions & 0 deletions sources/meta-yoe/conf/layer.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# We have a conf and classes directory, append to BBPATH
BBPATH .= ":${LAYERDIR}"

# We have a recipes directory, add to BBFILES
BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"

BBFILE_COLLECTIONS += "meta-yoe"
BBFILE_PATTERN_meta-yoe := "^${LAYERDIR}/"
BBFILE_PRIORITY_meta-yoe = "99"
LAYERSERIES_COMPAT_meta-yoe = "sumo thud warrior zeus dunfell"
LAYERDEPENDS_meta-yoe = "core elm-binary-layer"

BBFILES_DYNAMIC += " \
qt4-layer:${LAYERDIR}/dynamic-layers/qt4-layer/*/*/*.bb \
qt4-layer:${LAYERDIR}/dynamic-layers/qt4-layer/*/*/*.bbappend \
qt5-layer:${LAYERDIR}/dynamic-layers/qt5-layer/*/*/*.bb \
qt5-layer:${LAYERDIR}/dynamic-layers/qt5-layer/*/*/*.bbappend \
meta-96boards:${LAYERDIR}/dynamic-layers/meta-96boards/*/*/*.bb \
meta-96boards:${LAYERDIR}/dynamic-layers/meta-96boards/*/*/*.bbappend \
meta-ti:${LAYERDIR}/dynamic-layers/meta-ti/*/*/*.bb \
meta-ti:${LAYERDIR}/dynamic-layers/meta-ti/*/*/*.bbappend \
swupdate:${LAYERDIR}/dynamic-layers/swupdate/*/*/*.bb \
swupdate:${LAYERDIR}/dynamic-layers/swupdate/*/*/*.bbappend \
webkit:${LAYERDIR}/dynamic-layers/webkit/*/*/*.bb \
webkit:${LAYERDIR}/dynamic-layers/webkit/*/*/*.bbappend \
"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
Loading

0 comments on commit 9624d71

Please sign in to comment.