builds and runs on intel-x86 and rpi4 with acceptable realtime performance
This commit is contained in:
1 parent
2bce6fa556
commit
3faf544f0b
120 files changed
+6317
-1
No files matched your search
@@ -0,0 +1,281 @@
|
||||
|
||||
#@TYPE: Distro
|
||||
#@NAME: PLC-OS
|
||||
#@DESCRIPTION: Open Source Realtime OS for running PLC logic (Full Featured Distribution)
|
||||
|
||||
# we want to use rsyslog as the default syslog, but it's GPLv3, so need this
|
||||
# check to switch to sysklogd if GLPv3 is blacklisted.
|
||||
VIRTUAL-RUNTIME_syslog ?= "${@bb.utils.contains('INCOMPATIBLE_LICENSE', 'GPL-3.0-only', 'sysklogd', 'rsyslog', d)}"
|
||||
VIRTUAL-RUNTIME_base-utils-syslog ?= "${VIRTUAL-RUNTIME_syslog}"
|
||||
|
||||
# 1. for xfce, The networkmanager is required by xfce4-power-manager,
|
||||
# and it conflicts with connman. The setting can avoid connman-gnome
|
||||
# be added to packagegroup-core-x11-sato's RDEPENDS (when build image plcos-image-glibc-std-sato).
|
||||
# 2. for std-sato image, bind also conflicts with connman, this can avoid
|
||||
# connman-gnome be added to packagegroup-core-x11-sato's RDEPENDS
|
||||
NETWORK_MANAGER = ""
|
||||
|
||||
# common plcos distro definitions
|
||||
#
|
||||
#############################################################################################################
|
||||
# We need this to add multilib support to the built-in QEMU BSPs
|
||||
include conf/distro/include/plcos-bsp-${MACHINE}.inc
|
||||
|
||||
MAINTAINER = "Vaughn Varma <vaughnvarma@gmail.com>"
|
||||
|
||||
PLCOS_VARIANT ??= ""
|
||||
PLCOS_NAME = "PLC-OS"
|
||||
PLCOS_VERSION ??= "0.1"
|
||||
PLCOS_UPDATE_VERSION = "0"
|
||||
PLCOS_BRANCH ?= ""
|
||||
#this may not be necessary, but is just for parity with poky
|
||||
DISTRO = "plcos"
|
||||
DISTRO_NAME ?= "${PLCOS_NAME}${PLCOS_VARIANT}"
|
||||
|
||||
DISTRO_VERSION ?= "${PLCOS_VERSION}"
|
||||
SDK_VERSION ?= "${PLCOS_VERSION}"
|
||||
SDK_VERSION[vardepvalue] = "${SDK_VERSION}"
|
||||
DISTRO_PRETTY_VERSION ?= "${PLCOS_VERSION}${@' Update ${PLCOS_UPDATE_VERSION}' if d.getVar('PLCOS_UPDATE_VERSION') != '0' else ''}"
|
||||
#TODO release own distro codename
|
||||
DISTRO_CODENAME ?= "wrynose"
|
||||
|
||||
#TODO: build own SDK
|
||||
#SDK_VENDOR = "-wrlinuxsdk"
|
||||
SDK_VENDOR = "-pokysdk"
|
||||
#TARGET_VENDOR = "-wrs"
|
||||
#possible issue of this making full path names too long??
|
||||
TARGET_VENDOR = "-poky"
|
||||
|
||||
# Append 'osv-wrlinux' to the DISTROOVERRIDE
|
||||
DISTROOVERRIDES:append = "${@['', ':'][(d.getVar('DISTRO', True) != '')]}poky"
|
||||
|
||||
LOCALCONF_VERSION = "2"
|
||||
|
||||
#from wrlinux
|
||||
#SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${TARGET_ARCH}"
|
||||
#SDK_PS1 ??= "(wrlinuxsdk-${SDK_ARCH}-${TARGET_ARCH}) \${PS1#(wrlinuxsdk-${SDK_ARCH}-${TARGET_ARCH}) }"
|
||||
#from poky
|
||||
SDK_NAME = "${DISTRO}-${TCLIBC}-${SDKMACHINE}-${IMAGE_BASENAME}-${TUNE_PKGARCH}-${MACHINE}"
|
||||
SDKPATHINSTALL = "/opt/${DISTRO}/${SDK_VERSION}"
|
||||
#TCSDKMACH = "${@['', '_${SDK_OS}']['${SDK_OS}' != 'linux']}"
|
||||
#TOOLCHAIN_OUTPUTNAME = "${DISTRO}-${DISTRO_VERSION}-${TCLIBC}-${SDK_ARCH}${TCSDKMACH}-${MACHINE_ARCH}-${PN}-sdk"
|
||||
#TOOLCHAINEXT_OUTPUTNAME = "${DISTRO}-${DISTRO_VERSION}-${TCLIBC}-${SDK_ARCH}${TCSDKMACH}-${MACHINE_ARCH}-${PN}-sdk-ext"
|
||||
|
||||
#TOOLCHAIN_OUTPUTNAME:pn-buildtools-tarball:forcevariable = "${SDK_ARCH}-buildtools-nativesdk-standalone-${DISTRO_VERSION}"
|
||||
|
||||
# Workaround for extensible SDK
|
||||
#TOOLCHAIN_OUTPUTNAME:pn-uninative-tarball = "${SDK_ARCH}-nativesdk-libc"
|
||||
#ESDK_CLASS_INHERIT_DISABLE:append = " packagefeed-stability"
|
||||
|
||||
# Override these in wrlinux based distros to modify DISTRO_*
|
||||
|
||||
|
||||
#CORE_IMAGE_BASE_INSTALL:append = " packagegroup-core-boot-wrs "
|
||||
PLCOS_DEFAULT_DISTRO_FEATURES = "multiarch ptest"
|
||||
#PLCOS_DEFAULT_DISTRO_FEATURES = "largefile multiarch pulseaudio kvm virtualization"
|
||||
PLCOS_DEFAULT_EXTRA_RDEPENDS = "packagegroup-core-boot packagegroup-plcos-core"
|
||||
#PLCOS_DEFAULT_EXTRA_RDEPENDS += " packagegroup-core-boot-wrs"
|
||||
PLCOS_DEFAULT_EXTRA_RRECOMMENDS = "kernel-module-af-packet"
|
||||
|
||||
#DISTRO_FEATURES:append = "${DISTRO_FEATURES_DEFAULTS} ${PLCOS_DEFAULT_DISTRO_FEATURES}"
|
||||
DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULTS} ${PLCOS_DEFAULT_DISTRO_FEATURES}"
|
||||
#DISTRO_FEATURES:class-native ?= "${DISTRO_FEATURES_DEFAULTS} ${PLCOS_DEFAULT_DISTRO_FEATURES}"
|
||||
#DISTRO_FEATURES:class-nativesdk ?= "${DISTRO_FEATURES_DEFAULTS} ${PLCOS_DEFAULT_DISTRO_FEATURES}"
|
||||
DISTRO_EXTRA_RDEPENDS += " ${PLCOS_DEFAULT_EXTRA_RDEPENDS}"
|
||||
DISTRO_EXTRA_RRECOMMENDS += " ${PLCOS_DEFAULT_EXTRA_RRECOMMENDS}"
|
||||
|
||||
# do not include qemu-config by default
|
||||
#WRLINUXQEMUDEPS = "${@bb.utils.contains("INCOMPATIBLE_LICENSE", "GPL-3.0-only", "", "qemu-config",d)}"
|
||||
#WRLINUXQEMUDEPS = ""
|
||||
|
||||
#DISTRO_EXTRA_RDEPENDS:append:qemuall = " ${WRLINUXQEMUDEPS}"
|
||||
|
||||
#TCLIBCAPPEND = ""
|
||||
|
||||
#default locale / local language processing settings
|
||||
#IMAGE_LINGUAS ?= ""
|
||||
|
||||
# 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.
|
||||
#CONNECTIVITY_CHECK_URIS ?= "https://www.example.com/"
|
||||
|
||||
|
||||
#TODO evaluate which of these are necessary, modify or replace them to ensure full open source compliance
|
||||
#currently some of these files are from wrlinux
|
||||
#require conf/distro/include/poky-world-exclude.inc
|
||||
#require conf/distro/include/no-static-libs.inc
|
||||
#require conf/distro/include/plcos-uninative.inc
|
||||
#require packagegroup-core-base-utils.inc
|
||||
#require conf/distro/include/plcos_security_flags.inc
|
||||
#require conf/distro/include/plcos-space-optimize.inc
|
||||
|
||||
# Default hash policy for distro
|
||||
#BB_SIGNATURE_HANDLER ?= 'OEBasicHash'
|
||||
BB_SIGNATURE_HANDLER ?= "OEEquivHash"
|
||||
BB_HASHSERVE ??= "auto"
|
||||
INIT_MANAGER ?= "systemd"
|
||||
|
||||
# QA check settings - a little stricter than the OE-Core defaults
|
||||
WARN_TO_ERROR_QA ?= "already-stripped compile-host-path install-host-path \
|
||||
installed-vs-shipped ldflags pn-overrides rpaths staticdev \
|
||||
unknown-configure-option useless-rpaths"
|
||||
WARN_QA:remove = "${WARN_TO_ERROR_QA}"
|
||||
ERROR_QA:append = " ${WARN_TO_ERROR_QA}"
|
||||
|
||||
# Change base package dependency in -dbg packages from recommends to suggests
|
||||
#RRECOMMENDS:${PN}-dbg = ""
|
||||
#RSUGGESTS:${PN}-dbg = "${PN} (= ${EXTENDPKGV})"
|
||||
|
||||
|
||||
# Make sure that ldconfig is only enabled when the user has added ldconfig
|
||||
# to the DISTRO_FEATURES
|
||||
#This was set to BACKFILL_CONSIDERED in previous yocto versions, it seems the change may be breaking something for intel-x86
|
||||
#DISTRO_FEATURES_OPTED_OUT += "ldconfig"
|
||||
|
||||
# Make sure that X11 is only enabled in a graphics configuration
|
||||
#DISTRO_FEATURES_OPTED_OUT += "x11"
|
||||
|
||||
# Multilib configuration
|
||||
MULTILIBS ?= ""
|
||||
MULTILIB_CONF = "${@'conf/multilib.conf' if d.getVar('MULTILIBS') and d.getVar('PACKAGE_CLASSES').split()[0] != 'package_deb' else ''}"
|
||||
require ${MULTILIB_CONF}
|
||||
|
||||
# only support realtime kernels. This OS is focused on realtime performance
|
||||
TARGET_SUPPORTED_KTYPES = "preempt-rt"
|
||||
PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt"
|
||||
|
||||
# Blacklisted Packages
|
||||
#SKIP_RECIPE[xyz-abc] ?= "Recipe xyz-abc is blacklisted via SKIP_RECIPE"
|
||||
|
||||
# SANITY_TESTED_DISTROS used to defined the distribution list which we used to build PLC-OS
|
||||
SANITY_TESTED_DISTROS ?= " \
|
||||
ubuntu-24.04 \n \
|
||||
"
|
||||
|
||||
# TODO: This works, but OE documentation recommends either working with the DISTRO_FEATURES variable, or with the DISTRO_FEATURES_OPTED_OUT variable
|
||||
#Same with the MACHINE_FEATURES_OPTED_OUT
|
||||
DISTRO_FEATURES_DEFAULTS:remove:class-target = "x11"
|
||||
DISTRO_FEATURES_DEFAULTS:remove:class-target = "wayland"
|
||||
DISTRO_FEATURES_DEFAULTS:remove:class-target = "vulkan"
|
||||
DISTRO_FEATURES_DEFAULTS:remove:class-target = "3g"
|
||||
DISTRO_FEATURES_DEFAULTS:remove:class-target = "nfc"
|
||||
DISTRO_FEATURES_DEFAULTS:remove:class-target = "nfs"
|
||||
MACHINE_FEATURES:remove:class-target = "3g"
|
||||
MACHINE_FEATURES:remove:class-target = "nfc"
|
||||
|
||||
#ran into an issue where leaving pcbios on meant that the installed EFI would boot into the installer USB by default, despite BIOS settings
|
||||
MACHINE_FEATURES:remove:class-target = "pcbios"
|
||||
#we are using grub-efi for tuned; this is automatically included in x86 and SystemReady ARM configurations, but must be included for *all* architectures, including non-SystemReady ARM devices such as raspberry pi, which must chain-load u-boot into efi
|
||||
MACHINE_FEATURES:append = " efi"
|
||||
|
||||
#PLCOS_DEFAULT_DISTRO_FEATURES += "pam"
|
||||
|
||||
# Native sstate should not depend on multilib provider whitelist
|
||||
#BB_MULTI_PROVIDER_ALLOWED:class-native:forcevariable = ""
|
||||
|
||||
# Configure the root user's home directory
|
||||
#ROOT_HOME ?= "/root"
|
||||
|
||||
# initramfs image for plcos distro
|
||||
#TODO investigate having own initramfs image; wrlinux has its own, but this one should be the yocto one
|
||||
INITRD_IMAGE_LIVE ?= "${@d.getVar('INITRAMFS_IMAGE', True) if d.getVar('INITRAMFS_IMAGE', True) else 'core-image-minimal-initramfs'}"
|
||||
|
||||
# The providers are fftwf, fftwl, fftw
|
||||
PREFERRED_PROVIDER_virtual/fftw = "fftw"
|
||||
|
||||
# Set the default psplash from psplash-default to psplash-windriver
|
||||
|
||||
## Syslinux options for boot menus when using isolinux or linux live
|
||||
SYSLINUX_TIMEOUT = "50"
|
||||
#SYSLINUX_SPLASH = "${@oe.utils.conditional('WRLINUX_BRANCH', 'LTS', '${LAYER_PATH_plcos}/files/syslinux/bootloading-blue-wrl.png', '${LAYER_PATH_plcos}/files/syslinux/bootloading-gray-wrl.png', d)}"
|
||||
SYSLINUX_SPLASH = "${LAYER_PATH_meta-realtime}/recipes-extended/psplash/files/psplash-plcos-img.png"
|
||||
AUTO_SYSLINUXMENU = "1"
|
||||
|
||||
## "1" = Have graphics and serial in the boot menu when use grub-efi in iso
|
||||
GRUB_GFXSERIAL = "0"
|
||||
GRUB_TIMEOUT = "5"
|
||||
|
||||
# Possibly eliminate busybox from an image. The variables defined here
|
||||
# are used by oe-core packagegroup-core-boot.bb. The overrides are
|
||||
# DISTRO names.
|
||||
VIRTUAL-RUNTIME_login_manager = "shadow"
|
||||
|
||||
# We assume that we provide base-utils. This variable must
|
||||
# empty or one item.
|
||||
#
|
||||
#VIRTUAL-RUNTIME_base-utils = "packagegroup-core-base-utils"
|
||||
|
||||
# This runs the busybox-hwclock script during systemv
|
||||
# init. This does NOT supply /sbin/hwclock, only a script!
|
||||
#
|
||||
VIRTUAL-RUNTIME_base-utils-hwclock = "busybox-hwclock"
|
||||
|
||||
# Supply replacements for busybox functions we really, really need.
|
||||
#
|
||||
VIRTUAL-RUNTIME_no-busybox = "packagegroup-core-base-utils"
|
||||
|
||||
#TODO: check if valuable, disabled for parity with poky
|
||||
#IMAGE_INSTALL:append = " ${VIRTUAL-RUNTIME_no-busybox}"
|
||||
|
||||
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto-rt"
|
||||
|
||||
INHERIT += "ext_secure_cflags wrlinux-metadata_scm"
|
||||
|
||||
# Support distro features override
|
||||
INHERIT += "distrooverrides"
|
||||
|
||||
INHERIT += "poky-sanity"
|
||||
|
||||
# Define WR sample keys directory
|
||||
#WR_SAMPLE_KEYS_DIR ?= "${LAYER_PATH_plcos-distro}/files/sample-keys"
|
||||
|
||||
# By default the sample keys are used
|
||||
#WR_KEYS_DIR ?= "${WR_SAMPLE_KEYS_DIR}"
|
||||
|
||||
PREFERRED_VERSION_linux-yocto ?= "6.18%"
|
||||
PREFERRED_VERSION_linux-yocto-rt ?= "6.18%"
|
||||
PREFERRED_VERSION_linux-yocto-tiny ?= "6.18%"
|
||||
|
||||
# Third party download notice
|
||||
#INHERIT += "third-party-dl"
|
||||
|
||||
|
||||
# Enable VENDOR REVISION for CVE patches
|
||||
#VENDOR_REVISION_PREFIX ?= ".wr"
|
||||
#INHERIT += "enable-vendor-revision"
|
||||
|
||||
# Extend CLANG_EXTRA_OE_DISTRO to make clang work well on plcos host. See usage in meta-clang.
|
||||
# TODO: check if needed or helpful. removed for parity with poky
|
||||
#CLANG_EXTRA_OE_DISTRO:append = " plcos-graphics:poky plcos:poky"
|
||||
|
||||
#INHERIT += "uninative"
|
||||
#INHERIT += "create-spdx"
|
||||
# We need debug symbols so that SPDX license manifests for the kernel work
|
||||
KERNEL_EXTRA_FEATURES:append = " features/debug/debug-kernel.scc"
|
||||
KERNEL_FEATURES:append = " ${KERNEL_EXTRA_FEATURES}"
|
||||
KERNEL_FEATURES:append = " tuning-and-support.scc"
|
||||
|
||||
EFI_PROVIDER = "grub-efi"
|
||||
|
||||
#default device hostname
|
||||
hostname:pn-base-files = "plc"
|
||||
WKS_FILE:x86 = "plcos-bootdisk-x86.wks.in"
|
||||
WKS_FILE:x86-64 = "plcos-bootdisk-x86.wks.in"
|
||||
WKS_FILE:intel-x86-common = "plcos-bootdisk-intel.wks.in"
|
||||
|
||||
WKS_FILE:aarch64 = "plcos-bootdisk-arm.wks.in"
|
||||
|
||||
DISTRO_FEATURES:append = " pam opengl usbhost largefile "
|
||||
#DISTRO_FEATURES:append = " x11 wayland virtualization "
|
||||
|
||||
#TODO remove WRLinux
|
||||
# The overrides osv-wrlinux will enable wrlinux specific bbappend
|
||||
OVERRIDES:append = ":osv-wrlinux"
|
||||
INHERIT += "rtopts"
|
||||
APPEND += "rcu_nocb_poll nmi-watchdog=0 processor.max_cstate=1 noefi irqaffinity=0"
|
||||
ROOTFS_POSTPROCESS_COMMAND += " set_kernel_opts;"
|
||||
TARGET_SUPPORTED_KTYPES:append = " preempt-rt"
|
||||
DISTRO_FEATURES_DEFAULTS:append = " usbhost"
|
||||
# use systemd as the default init manager
|
||||
INIT_MANAGER = "systemd"
|
||||
Reference in new issue
Block a user