From af2deffa61768a72142fdba7563db18759f6bde6 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Tue, 5 Mar 2019 16:04:10 +0100 Subject: populate inital distro Only adds a tdx-x11 distro. Additional flavours to follow. Signed-off-by: Max Krummenacher --- conf/distro/include/arm-defaults.inc | 31 ++++++++++++++++++++++ conf/distro/include/tdx-base.inc | 51 ++++++++++++++++++++++++++++++++++++ conf/distro/tdx-x11.conf | 13 +++++++++ conf/layer.conf | 13 +++++++++ 4 files changed, 108 insertions(+) create mode 100644 conf/distro/include/arm-defaults.inc create mode 100644 conf/distro/include/tdx-base.inc create mode 100644 conf/distro/tdx-x11.conf create mode 100644 conf/layer.conf (limited to 'conf') diff --git a/conf/distro/include/arm-defaults.inc b/conf/distro/include/arm-defaults.inc new file mode 100644 index 0000000..87f8adb --- /dev/null +++ b/conf/distro/include/arm-defaults.inc @@ -0,0 +1,31 @@ +# This function changes the default tune for machines which +# are based on armv7a or armv7ve to use common tune value, note +# that we enforce hard-float which is default on Linux microPlatform. +# If you have one of those machines which are armv7a or armv7ve but +# can't support hard-float, please change tune = 'armv7athf' to +# tune = 'armv7at' below but then this is for your own distro. + +def arm_tune_handler(d): + features = d.getVar('TUNE_FEATURES', True).split() + if 'armv7a' in features or 'armv7ve' in features: + tune = 'armv7athf' + if 'bigendian' in features: + tune += 'b' + if 'vfpv3' in features: + tune += '-vfpv3' + if 'vfpv3d16' in features: + tune += '-vfpv3d16' + if 'neon' in features: + tune += '-neon' + if 'vfpv4' in features: + tune += '-vfpv4' + else: + tune = d.getVar('DEFAULTTUNE', True) + return tune + +DEFAULTTUNE_tdx := "${@arm_tune_handler(d)}" +DEFAULTTUNE_torizon := "${@arm_tune_handler(d)}" + +DISTRO_ARM_INSTRUCTION ?= "thumb" +DISTRO_ARM_INSTRUCTION_armv5 ?= "arm" +ARM_INSTRUCTION_SET_tdx ??= "${DISTRO_ARM_INSTRUCTION}" diff --git a/conf/distro/include/tdx-base.inc b/conf/distro/include/tdx-base.inc new file mode 100644 index 0000000..6b7457e --- /dev/null +++ b/conf/distro/include/tdx-base.inc @@ -0,0 +1,51 @@ +require conf/distro/poky.conf +require conf/distro/include/arm-defaults.inc + +DISTRO = "tdx-base" +DISTRO_NAME = "Toradex Distro Base" +DISTRO_VERSION = "2.6-snapshot-${DATE}" + +# These variables are used to set image, kernel and U-Boot versions +# increment TDX_VERMINOR in meta-toradex-demos/classes/toradex-mirrors.bbclass + +TDX_VERMAJOR = "3" +TDX_VERMINOR = "0" +TDX_VERBETA = "b1" +TDX_VERPATCH = "1" +TDX_BUILDNB ?= "" +TDX_VERNIGHTLY ?= "" +TDX_VERDATE ?= "-${DATE}" +TDX_VERDATE[vardepsexclude] = "DATE" + +TDX_VER_PACKAGE_MIN = "${TDX_VERMAJOR}.${TDX_VERMINOR}${TDX_VERBETA}${TDX_BUILDNB}${TDX_VERNIGHTLY}" +TDX_VER_PACKAGE = "${TDX_VER_PACKAGE_MIN}${TDX_VERDATE}" +TDX_VER_ITEM = "${TDX_VERMAJOR}.${TDX_VERMINOR}.${TDX_VERPATCH}" + +SDK_VENDOR = "-tdxsdk" +SDK_NAME_PREFIX = "${DISTRO}" + +MAINTAINER = "Toradex " + +TARGET_VENDOR = "-tdx" + +DISTROOVERRIDES = "tdx" + +# create etc/build/* in the rootfs +INHERIT += "image-buildinfo" + +# Log information on images and packages +INHERIT += "buildhistory" +BUILDHISTORY_COMMIT = "1" + +# Use bluez5 as default. +DISTRO_FEATURES_append = " bluez5" + +IMAGE_LINGUAS ?= "en-us" + +# TODO: review default distro features +DISTRO_FEATURES_append = " pam systemd" +DISTRO_FEATURES_remove = "sysvinit" +VIRTUAL-RUNTIME_init_manager = "systemd" +PACKAGECONFIG_append_pn-qemu-native = " libusb" + +hostname_pn-base-files = "" diff --git a/conf/distro/tdx-x11.conf b/conf/distro/tdx-x11.conf new file mode 100644 index 0000000..45bc504 --- /dev/null +++ b/conf/distro/tdx-x11.conf @@ -0,0 +1,13 @@ +# Toradex Distro with X11 without wayland. +# Using the downstream kernel flavour + +require conf/distro/include/tdx-base.inc + +DISTRO = "tdx-x11" +DISTRO_NAME = "TDX X11" + +# Remove conflicting backends. +DISTRO_FEATURES_remove = "wayland " + +# These are X11 specific +DISTRO_FEATURES_append = " x11" diff --git a/conf/layer.conf b/conf/layer.conf new file mode 100644 index 0000000..95e07ea --- /dev/null +++ b/conf/layer.conf @@ -0,0 +1,13 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have a packages directory, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "meta-toradex-distro" +BBFILE_PATTERN_meta-toradex-distro = "^${LAYERDIR}/" +BBFILE_PRIORITY_meta-toradex-distro = "6" + +LAYERDEPENDS_meta-toradex-distro = "core yocto" +LAYERSERIES_COMPAT_meta-toradex-distro = "thud" -- cgit v1.2.3