This commit is contained in:
vaughn committed 2026-09-29 21:38:21 -04:00
commit 271eb1a93f
6 files changed
+14 -167

No files matched your search

+13 -63
View File
@@ -8,11 +8,6 @@
VIRTUAL-RUNTIME_syslog ?= "${@bb.utils.contains('INCOMPATIBLE_LICENSE', 'GPL-3.0-only', 'sysklogd', 'rsyslog', d)}" VIRTUAL-RUNTIME_syslog ?= "${@bb.utils.contains('INCOMPATIBLE_LICENSE', 'GPL-3.0-only', 'sysklogd', 'rsyslog', d)}"
VIRTUAL-RUNTIME_base-utils-syslog ?= "${VIRTUAL-RUNTIME_syslog}" 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 = "" NETWORK_MANAGER = ""
# common plcos distro definitions # common plcos distro definitions
@@ -28,7 +23,6 @@ PLCOS_NAME = "PLC-OS"
PLCOS_VERSION ??= "0.1" PLCOS_VERSION ??= "0.1"
PLCOS_UPDATE_VERSION = "0" PLCOS_UPDATE_VERSION = "0"
PLCOS_BRANCH ?= "" PLCOS_BRANCH ?= ""
#this may not be necessary, but is just for parity with poky
DISTRO = "plcos" DISTRO = "plcos"
DISTRO_NAME ?= "${PLCOS_NAME}${PLCOS_VARIANT}" DISTRO_NAME ?= "${PLCOS_NAME}${PLCOS_VARIANT}"
@@ -40,37 +34,17 @@ DISTRO_PRETTY_VERSION ?= "${PLCOS_VERSION}${@' Update ${PLCOS_UPDATE_VERSION}' i
DISTRO_CODENAME ?= "wrynose" DISTRO_CODENAME ?= "wrynose"
#TODO: build own SDK #TODO: build own SDK
#SDK_VENDOR = "-wrlinuxsdk"
SDK_VENDOR = "-pokysdk" SDK_VENDOR = "-pokysdk"
#TARGET_VENDOR = "-wrs" #TARGET_VENDOR = "-wrs"
#possible issue of this making full path names too long?? #possible issue of this making full path names too long??
TARGET_VENDOR = "-poky" TARGET_VENDOR = "-poky"
# Append 'osv-wrlinux' to the DISTROOVERRIDE
DISTROOVERRIDES:append = "${@['', ':'][(d.getVar('DISTRO', True) != '')]}poky" DISTROOVERRIDES:append = "${@['', ':'][(d.getVar('DISTRO', True) != '')]}poky"
LOCALCONF_VERSION = "2" 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}" SDK_NAME = "${DISTRO}-${TCLIBC}-${SDKMACHINE}-${IMAGE_BASENAME}-${TUNE_PKGARCH}-${MACHINE}"
SDKPATHINSTALL = "/opt/${DISTRO}/${SDK_VERSION}" 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 = "multiarch ptest"
#PLCOS_DEFAULT_DISTRO_FEATURES = "largefile multiarch pulseaudio kvm virtualization" #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 packagegroup-plcos-core"
@@ -79,20 +53,9 @@ PLCOS_DEFAULT_EXTRA_RRECOMMENDS = "kernel-module-af-packet"
#DISTRO_FEATURES:append = "${DISTRO_FEATURES_DEFAULTS} ${PLCOS_DEFAULT_DISTRO_FEATURES}" #DISTRO_FEATURES:append = "${DISTRO_FEATURES_DEFAULTS} ${PLCOS_DEFAULT_DISTRO_FEATURES}"
DISTRO_FEATURES ?= "${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_RDEPENDS += " ${PLCOS_DEFAULT_EXTRA_RDEPENDS}"
DISTRO_EXTRA_RRECOMMENDS += " ${PLCOS_DEFAULT_EXTRA_RRECOMMENDS}" 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 ?= "" #IMAGE_LINGUAS ?= ""
# The CONNECTIVITY_CHECK_URI's are used to test whether we can succesfully # The CONNECTIVITY_CHECK_URI's are used to test whether we can succesfully
@@ -131,10 +94,8 @@ ERROR_QA:append = " ${WARN_TO_ERROR_QA}"
# Make sure that ldconfig is only enabled when the user has added ldconfig # Make sure that ldconfig is only enabled when the user has added ldconfig
# to the DISTRO_FEATURES # 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 #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 # Make sure that X11 is only enabled in a graphics configuration
#DISTRO_FEATURES_OPTED_OUT += "x11" #DISTRO_FEATURES_OPTED_OUT += "ldconfig x11"
# Multilib configuration # Multilib configuration
MULTILIBS ?= "" MULTILIBS ?= ""
@@ -149,8 +110,10 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt"
#SKIP_RECIPE[xyz-abc] ?= "Recipe xyz-abc is blacklisted via SKIP_RECIPE" #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 used to defined the distribution list which we used to build PLC-OS
#cachyos is NOT officially supported by yocto/bitbake, but we have personally tested it without issue
SANITY_TESTED_DISTROS ?= " \ SANITY_TESTED_DISTROS ?= " \
ubuntu-24.04 \n \ ubuntu-24.04 \n \
cachyos-260809 \n
" "
# TODO: This works, but OE documentation recommends either working with the DISTRO_FEATURES variable, or with the DISTRO_FEATURES_OPTED_OUT variable # TODO: This works, but OE documentation recommends either working with the DISTRO_FEATURES variable, or with the DISTRO_FEATURES_OPTED_OUT variable
@@ -178,33 +141,29 @@ MACHINE_FEATURES:append = " efi"
#ROOT_HOME ?= "/root" #ROOT_HOME ?= "/root"
# initramfs image for plcos distro # initramfs image for plcos distro
#TODO investigate having own initramfs image; wrlinux has its own, but this one should be the yocto one #TODO investigate having own initramfs image; some other yocto distros have their own (e.g. wrlinux), but for now we use default yocto/poky initramfs
INITRD_IMAGE_LIVE ?= "${@d.getVar('INITRAMFS_IMAGE', True) if d.getVar('INITRAMFS_IMAGE', True) else 'core-image-minimal-initramfs'}" 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 # The providers are fftwf, fftwl, fftw
PREFERRED_PROVIDER_virtual/fftw = "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 options for boot menus when using isolinux or linux live
SYSLINUX_TIMEOUT = "50" #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 = "${@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" #SYSLINUX_SPLASH = "${LAYER_PATH_meta-realtime}/recipes-extended/psplash/files/psplash-plcos-img.png"
AUTO_SYSLINUXMENU = "1" #AUTO_SYSLINUXMENU = "1"
## "1" = Have graphics and serial in the boot menu when use grub-efi in iso ## "1" = Have graphics and serial in the boot menu when use grub-efi in iso
GRUB_GFXSERIAL = "0" GRUB_GFXSERIAL = "0"
GRUB_TIMEOUT = "5"
#TODO consider handling this some other way, this seems hacky
GRUB_TIMEOUT ?= "0"
# Possibly eliminate busybox from an image. The variables defined here # Possibly eliminate busybox from an image. The variables defined here
# are used by oe-core packagegroup-core-boot.bb. The overrides are # are used by oe-core packagegroup-core-boot.bb.
# DISTRO names.
VIRTUAL-RUNTIME_login_manager = "shadow" 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 # This runs the busybox-hwclock script during systemv
# init. This does NOT supply /sbin/hwclock, only a script! # init. This does NOT supply /sbin/hwclock, only a script!
@@ -213,10 +172,9 @@ VIRTUAL-RUNTIME_base-utils-hwclock = "busybox-hwclock"
# Supply replacements for busybox functions we really, really need. # Supply replacements for busybox functions we really, really need.
# #
VIRTUAL-RUNTIME_no-busybox = "packagegroup-core-base-utils" #VIRTUAL-RUNTIME_base-utils = "packagegroup-core-base-utils"
#TODO: check if valuable, disabled for parity with poky #IMAGE_INSTALL:append = " ${VIRTUAL-RUNTIME_base-utils}"
#IMAGE_INSTALL:append = " ${VIRTUAL-RUNTIME_no-busybox}"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto-rt" PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto-rt"
@@ -227,11 +185,6 @@ INHERIT += "distrooverrides"
INHERIT += "poky-sanity" 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 ?= "6.18%"
PREFERRED_VERSION_linux-yocto-rt ?= "6.18%" PREFERRED_VERSION_linux-yocto-rt ?= "6.18%"
@@ -269,9 +222,6 @@ WKS_FILE:aarch64 = "plcos-bootdisk-arm.wks.in"
DISTRO_FEATURES:append = " pam opengl usbhost largefile " DISTRO_FEATURES:append = " pam opengl usbhost largefile "
#DISTRO_FEATURES:append = " x11 wayland virtualization " #DISTRO_FEATURES:append = " x11 wayland virtualization "
#TODO remove WRLinux
# The overrides osv-wrlinux will enable wrlinux specific bbappend
OVERRIDES:append = ":osv-wrlinux"
INHERIT += "rtopts" INHERIT += "rtopts"
APPEND += "rcu_nocb_poll nmi-watchdog=0 processor.max_cstate=1 noefi irqaffinity=0" APPEND += "rcu_nocb_poll nmi-watchdog=0 processor.max_cstate=1 noefi irqaffinity=0"
ROOTFS_POSTPROCESS_COMMAND += " set_kernel_opts;" ROOTFS_POSTPROCESS_COMMAND += " set_kernel_opts;"
@@ -1,4 +0,0 @@
# This file is generated automatically by wry
PACKAGEGROUP_BUSYBOX_REPLACEMENT_INC_WRLINUX = ""
PACKAGEGROUP_BUSYBOX_REPLACEMENT_INC_WRLINUX:osv-wrlinux = "packagegroup-core-base-utils_wrlinux.inc"
require ${PACKAGEGROUP_BUSYBOX_REPLACEMENT_INC_WRLINUX}
@@ -1,17 +0,0 @@
#
# Copyright (C) 2016 Wind River Systems Inc.
#
RDEPENDS:${PN}:append = " \
bc \
debianutils-run-parts \
dpkg-start-stop \
fbset \
kbd \
netcat \
ifupdown \
iputils-ping \
usleep \
util-linux-flock \
util-linux-mount \
"
@@ -1,3 +1,4 @@
#TODO investigate if each and every one of these is necessary or even useful
RDEPENDS:${PN}:append = " \ RDEPENDS:${PN}:append = " \
bc \ bc \
debianutils-run-parts \ debianutils-run-parts \
@@ -46,7 +46,6 @@ KBRANCH:arm = "v6.18/standard/preempt-rt/genericarm64"
#6.18 #6.18
SRCREV_machine:arm ?= "67be18a7a6b529aacdae063de37a788e498d7378" SRCREV_machine:arm ?= "67be18a7a6b529aacdae063de37a788e498d7378"
#require linux-yocto-wrlinux.inc
#include srcrev.inc #include srcrev.inc
require linux-yocto-extra-kernel-src.inc require linux-yocto-extra-kernel-src.inc
@@ -1,82 +0,0 @@
# We need to change the SRC_URI to point to the bare git report in our layer.
# Otherwise the system may decide to fall back to the yoctoproject URL in some
# cases. This would end up causing problems either due to incorrect SRCREV
# entries or by missing critical patches.
addhandler linux_yocto_rewrite_uri
linux_yocto_rewrite_uri[eventmask] = "bb.event.RecipePreFinalise"
# Disable shallow tarball for kernel
BB_GIT_SHALLOW = "0"
python linux_yocto_rewrite_uri() {
pass
}
python linux_yocto_rewrite_uri:osv-wrlinux() {
d = e.data
layer_path="${LAYER_PATH_wrlinux}"
if not d.getVar("LAYER_PATH_wrlinux"):
bb.warn("Unable to replace SRC_URI paths with wrlinux layer paths. LAYER_PATH_wrlinux is not defined.")
return
# We only care about the SRC_URI as it is defined right now. We do NOT
# want to expand it.
src_uri=d.getVar("SRC_URI", False)
# We need the -file- PV, not the actual PV...
pv = d.expand("${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[1] or 'dev'}")
# Replace the kernel URI.
if os.path.exists("%s/git/linux-yocto.git" % (d.expand(layer_path))):
src_uri = src_uri.replace("git://git.yoctoproject.org/linux-yocto.git", "git://${LAYER_PATH_wrlinux}/git/linux-yocto.git;protocol=file")
src_uri = src_uri.replace(";protocol=https", "")
if os.path.exists("%s/git/linux-yocto-dev.git" % (d.expand(layer_path))):
src_uri = src_uri.replace("git://git.yoctoproject.org/linux-yocto-dev.git", "git://${LAYER_PATH_wrlinux}/git/linux-yocto-dev.git;protocol=file")
src_uri = src_uri.replace(";protocol=https", "")
if os.path.exists("%s/git/linux-yocto-%s.git" % (d.expand(layer_path), pv)):
src_uri = src_uri.replace("git://git.yoctoproject.org/linux-yocto.git", "git://${LAYER_PATH_wrlinux}/git/linux-yocto-%s.git;protocol=file" % (pv))
src_uri = src_uri.replace("git://git.yoctoproject.org/linux-yocto-%s.git" % (pv), "git://${LAYER_PATH_wrlinux}/git/linux-yocto-%s.git;protocol=file" % (pv))
src_uri = src_uri.replace(";protocol=https", "")
# Replace the kernel-cache URI.
if os.path.exists("%s/git/yocto-kernel-cache.git" % d.expand(layer_path)):
src_uri = src_uri.replace("git://git.yoctoproject.org/yocto-kernel-cache", "git://${LAYER_PATH_wrlinux}/git/yocto-kernel-cache.git;protocol=file")
src_uri = src_uri.replace(";protocol=https", "")
# The kernel-cache branch is hard coded by oe-core. We need to make this adjutable.
if d.getVar("KERNEL_CACHE_BRANCH_%s" % pv):
import re
src_uri = re.sub('(yocto-kernel-cache.*;branch=)([^;]*)', '\\1${KERNEL_CACHE_BRANCH_%s}' % pv, src_uri)
if d.getVar("SRCREV_meta_%s" % pv):
d.setVar("SRCREV_meta", d.getVar("SRCREV_meta_%s" % pv))
if d.getVar("LINUX_VERSION_%s" % pv):
d.setVar("LINUX_VERSION", d.getVar("LINUX_VERSION_%s" % pv))
d.setVar("SRC_URI", src_uri)
}
#
# Verify that the defined KTYPE is in TARGET_SUPPORTED_KTYPES (if defined)
#
# This will help detect non-supported/non-tested configurations.
#
python () {
kernel_type = d.getVar('LINUX_KERNEL_TYPE')
supported_types = d.getVar('TARGET_SUPPORTED_KTYPES')
# Skip checking, as supported types is blank
if not supported_types or not kernel_type:
return
if kernel_type not in supported_types.split():
raise bb.parse.SkipPackage('(version %s) The defined LINUX_KERNEL_TYPE (%s) used by\
this recipe is not in TARGET_SUPPORTED_KTYPES (%s). To override add the type\
to the supported list in your local.conf, such as:\
TARGET_SUPPORTED_KTYPES:append = " %s"' % (d.getVar('PV'), kernel_type, supported_types, kernel_type))
}