some cleanup of unused recipes, and some adjustments to assist with ARM testing

This commit is contained in:
vaughn committed 2026-10-08 23:40:14 -04:00
1 parent 271eb1a93f
commit 0b0b033991
18 files changed
+111 -273

No files matched your search

@@ -1,20 +0,0 @@
# copied from meta-mentor/conf/distro/include/sstate.inc
def lsb_distro_adjust(distro_id, ver):
"""This hook ensures that RHEL server, RHEL client, and CentOS all return
'RedHat' for distro, and '5' for the version, as we know minor
versions for these distros are compatible, and these distros are
compatible with one another."""
if distro_id in ('RedHatEnterpriseClient', 'RedHatEnterpriseServer',
'CentOS'):
distro_id = 'RedHat'
try:
major_ver, _ = ver.split('.', 1)
except ValueError:
pass
else:
ver = major_ver
return distro_id, ver
LSB_DISTRO_ADJUST = "lsb_distro_adjust"
+12 -2
View File
@@ -113,7 +113,7 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt"
#cachyos is NOT officially supported by yocto/bitbake, but we have personally tested it without issue
SANITY_TESTED_DISTROS ?= " \
ubuntu-24.04 \n \
cachyos-260809 \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
@@ -217,15 +217,25 @@ 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"
WKS_FILE:aarch64 ?= "plcos-bootdisk-arm-uboot.wks.in"
DISTRO_FEATURES:append = " pam opengl usbhost largefile "
#DISTRO_FEATURES:append = " x11 wayland virtualization "
INHERIT += "rtopts"
#TODO take the ones of these that tuned doesn't already modify, and add them to the additional tuned parameters
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"
IMAGE_INSTALL:append = " sudo \
vim \
trace-cmd \
uftrace \
avahi-daemon \
"
Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

-79
View File
@@ -1,79 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="1280mm"
height="800mm"
viewBox="0 0 1280 800"
version="1.1"
id="svg5"
inkscape:version="1.4.4 (dcaf3e7d9e, 2026-05-05)"
sodipodi:docname="psplash-plcos-img.svg"
inkscape:export-filename="psplash-poky-img.png"
inkscape:export-xdpi="25.4"
inkscape:export-ydpi="25.4"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#ecece1"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:document-units="mm"
showgrid="false"
units="mm"
inkscape:zoom="0.1767767"
inkscape:cx="1561.2917"
inkscape:cy="760.84688"
inkscape:window-width="2560"
inkscape:window-height="1372"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1"
inkscape:showpageshadow="2"
inkscape:deskcolor="#d1d1d1" />
<defs
id="defs2">
<rect
x="1636.3861"
y="1993.7577"
width="1960.7313"
height="754.86579"
id="rect1" />
</defs>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1" />
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 2">
<text
xml:space="preserve"
transform="matrix(0.26509751,0,0,0.26716234,25.935831,-186.76745)"
id="text1"
style="font-size:366.667px;writing-mode:lr-tb;direction:ltr;white-space:pre;shape-inside:url(#rect1);display:inline;fill:#afdde9;stroke-width:0.967559;stroke-dasharray:none"><tspan
x="1636.3867"
y="2327.379"
id="tspan4"><tspan
style="font-weight:bold"
id="tspan2">PLC OS</tspan></tspan></text>
</g>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="Layer 3">
<path
style="fill:#ffff00;stroke-width:0.276323"
d="m 664.52086,436.84985 -13.16951,-43.05816 9.95281,4.37141 -6.28075,-31.75662 14.11952,40.77449 -9.68909,-4.20408 z"
id="path1"
sodipodi:nodetypes="ccccccc" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.4 KiB

+13
View File
@@ -0,0 +1,13 @@
# short-description: Create an EFI disk image with grub-efi
# long-description: Creates a partitioned EFI disk image that the user
# can directly dd to boot media. The selected bootloader is grub-efi.
# It also includes intel-microcode as an initrd for early update support.
part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --label boot --active --align 4096 --use-uuid
#part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4096 --size 100
part / --source rootfs --fstype=ext4 --ondisk mmcblk0 --label root --align 4096
#part swap --ondisk sda --size 44 --label swap1 --fstype=swap --use-uuid
bootloader --ptable gpt --timeout=5 --append=" rootfstype=ext4 "
+13
View File
@@ -0,0 +1,13 @@
# short-description: Create an EFI disk image with grub-efi
# long-description: Creates a partitioned EFI disk image that the user
# can directly dd to boot media. The selected bootloader is grub-efi.
# It also includes intel-microcode as an initrd for early update support.
#part /boot --source bootimg-efi --sourceparams="loader=grub-efi,initrd=microcode.cpio" --label boot --active --align 1024 --use-uuid
part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --active --align 4096 --size 100
part / --source rootfs --fstype=ext4 --ondisk mmcblk0 --label root --align 4096
#part swap --ondisk sda --size 44 --label swap1 --fstype=swap --use-uuid
#bootloader --ptable gpt --timeout=5 --append=" rootfstype=ext4 "
+58 -27
View File
@@ -14,7 +14,11 @@ IMAGE_INSTALL = " \
packagegroup-wr-base-discrete-tools \
packagegroup-core-boot \
packagegroup-plcos-core \
rt-tests \
hwlatdetect \
grub-efi \
grub \
grub-bootconf \
tuned \
openplc \
rt-setup \
@@ -29,9 +33,10 @@ IMAGE_INSTALL = " \
LABELS_LIVE = "install boot"
inherit wrlinux-image
inherit rtopts
inherit grub-efi
#inherit image_types
#############################################################
#IMAGE_FEATURES += " package-management wr-core-db wr-core-interactive wr-core-net wr-core-perl wr-core-python wr-core-sys-util wr-core-util wr-core-mail wr-bsps "
# ssh-server-openssh
@@ -39,7 +44,6 @@ DISTRO_FEATURES += " polkit "
IMAGE_FEATURES += " splash package-management"
#IMAGE_FEATURES += " ssh-server-dropbear hwcodecs "
#CORE_IMAGE_BASE_INSTALL += " openssh"
#linuxcnc linuxcnc-doc"
#DEPENDS += " cdrtools-native"
@@ -50,17 +54,61 @@ IMAGE_FSTYPES += "wic wic.bmap"
inherit extrausers
IMAGE_EFI_BOOT_FILES:append := "${KERNEL_IMAGETYPE}-*"
IMAGE_BOOT_FILES:append := "${KERNEL_IMAGETYPE}-*"
IMAGE_EFI_BOOT_FILES:append := " ${KERNEL_IMAGETYPE}-*"
#IMAGE_EFI_BOOT_FILES:append := "${KERNEL_IMAGETYPE}-*"
IMAGE_BOOT_FILES:append := " ${KERNEL_IMAGETYPE}-*"
IMAGE_BOOT_FILES:append := " startup.nsh"
#TODO reference GRUB_IMAGE destination name via variables, otherwise this could break possible future 32 bit builds
#BOOT_EFI =
IMAGE_BOOT_FILES:append:rpi = " \
grub.cfg;EFI/BOOT/grub.cfg \
bootaa64.efi;EFI/BOOT/bootaa64.efi \
${EFI_PROVIDER}-bootaa64.efi;EFI/BOOT/bootaa64.efi \
"
# ${EFI_PROVIDER}-bootaa64.efi:EFI/BOOT/bootaa64.efi
#IMAGE_EFI_BOOT_FILES:append := " boot"
do_bootimg[depends] += "dosfstools-native:do_populate_sysroot \
mtools-native:do_populate_sysroot \
cdrtools-native:do_populate_sysroot \
virtual/kernel:do_deploy \
"
#${@'%s:do_image_%s' % (d.getVar('PN'), d.getVar('LIVE_ROOTFS_TYPE').replace('-', '_').split('.')[0]) if d.getVar('ROOTFS') else ''}
python do_bootimg:prepend() {
build_efi() {
#populate_kernel ${EFIIMGDIR}
#if [ "${EFI}" = "1" ]; then
# efi_populate ${EFIIMGDIR}
#fi
EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
printf 'fs0:%s\%s\n' "$EFIPATH" "${EFI_BOOT_IMAGE}" >${DEPLOY_DIR_IMAGE}/startup.nsh
}
python do_bootimg:rpi() {
pass
}
#python do_bootimg:arm-uefi() {
# bb.build.exec_func('build_efi_cfg', d)
# bb.build.exec_func('build_efi', d)
# bb.build.exec_func('create_symlinks', d)
#}
#for some reason, adding my override (arm-uefi) to "python do_bootimg" causes bitbake to interpret the function as shell script, not as python.
#Since I don't have time for none of that, I'm just doing this in my own python function for non-x86 architectures
#(x86 is the only one that supports syslinux, which is a build requirement for OE's 'live' image classes, even for EFI-only images)
python do_build_boot() {
pass
}
python do_build_boot:arm-uefi() {
bb.build.exec_func('build_efi_cfg', d)
bb.build.exec_func('build_efi', d)
bb.build.exec_func('create_symlinks', d)
}
python do_bootimg:prepend:x86-64() {
#import os
import glob
deploy_dir = d.getVar("DEPLOY_DIR_IMAGE")
@@ -74,25 +122,8 @@ python do_bootimg:prepend() {
for file in files:
os.system("install -m 644 -t " + iso_dir + " " + file + " | install -m 644 -t " + hdd_dir + " " + file )
}
python do_image:append() {
# try:
# os.system("ln -s /boot/EFI/BOOT " + d.getVar("ROOTFS") + "/boot/grub")
# except E:
# pass
}
efi_iso_populate:append() {
# if [ ! -e "${EFIIMGDIR}/grub" ] ; then
# ln -s /boot/EFI/BOOT "${EFIIMGDIR}/grub"
# fi
}
addtask build_boot before do_image_complete after do_rootfs
#do_image_wic[recrdeptask] += " do_bootimg"
#do_bootimg[depends] += " ${INITRD_IMAGE_LIVE}:do_image_complete"
#below breaks something, it tries to make the file even when it already exists
efi_populate:append() {
# if [ ! -e "${DEST}/grub" ] ; then
# ln -s /boot/EFI/BOOT "${DEST}/grub"
# fi
}
populate_kernel:append() {
#mv $dest/${KERNEL_IMAGETYPE} $dest/${KERNEL_IMAGETYPE}-
}
#hostname:pn-base-files = "plc"
-10
View File
@@ -35,16 +35,6 @@ DISTRO = "plcos-graphics"
IMAGE_FEATURES += " \
hwcodecs \
ssh-server-openssh \
wr-core-db \
wr-core-interactive \
wr-core-net \
wr-core-perl \
wr-core-python \
wr-core-sys-util \
wr-core-util \
wr-core-mail \
wr-bsps \
"
@@ -21,15 +21,6 @@ inherit rtopts
IMAGE_FEATURES += " \
package-management \
ssh-server-openssh \
wr-core-db \
wr-core-interactive \
wr-core-net \
wr-core-perl \
wr-core-python \
wr-core-sys-util \
wr-core-util \
wr-core-mail \
wr-bsps \
"
@@ -24,15 +24,6 @@ PACKAGES = "\
"
RDEPENDS:packagegroup-core-boot-wrs = "\
base-files \
base-passwd \
busybox \
${@bb.utils.contains("DISTRO_FEATURES", "sysvinit", "${VIRTUAL-RUNTIME_initscripts}", "", d)} \
${@bb.utils.contains("MACHINE_FEATURES", "keyboard", "${VIRTUAL-RUNTIME_keymaps}", "", d)} \
modutils-initscripts \
netbase \
${VIRTUAL-RUNTIME_login_manager} \
${VIRTUAL-RUNTIME_init_manager} \
${VIRTUAL-RUNTIME_dev_manager} \
${VIRTUAL-RUNTIME_update-alternatives} \
"
@@ -5,13 +5,10 @@ WR_MACHINE_ESSENTIAL_EXTRA_RDEPENDS ?= ""
ALLOW_EMPTY:packagegroup-wr-boot = "1"
RDEPENDS:packagegroup-wr-boot = "${PN} ${WR_MACHINE_ESSENTIAL_EXTRA_RDEPENDS}"
# add wr-init
RDEPENDS:${PN}:append = " ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','wr-init','',d)}"
# Need these, but images may choose to pull them from various
# packages, e.g. busybox or bash+busybox-oe-min.
# The following only works with the RPM backend...
FILERDEPENDS_${PN} = "/bin/sh /usr/bin/run-parts /sbin/start-stop-daemon /sbin/ifup"
# override the default in package-core-boot.bb
EFI_PROVIDER ??= "${@bb.utils.contains('INCOMPATIBLE_LICENSE', 'GPL-3.0-only', '', 'grub-efi', d)}"
#EFI_PROVIDER ??= "${@bb.utils.contains('INCOMPATIBLE_LICENSE', 'GPL-3.0-only', '', 'grub-efi', d)}"
@@ -18,7 +18,6 @@ PACKAGES += "${PN}-discrete-tools ${PN}-discrete-tools-dbg ${PN}-discrete-tools-
# packagegroup-core-initscripts and packagegroup-core-basic-utils:
VIRTUAL-RUNTIME_syslog ?= "sysklogd"
RDEPENDS:${PN} = "\
acl \
attr \
bash \
bc \
@@ -37,7 +36,6 @@ RDEPENDS:${PN} = "\
procps \
psmisc \
sed \
sudo \
${VIRTUAL-RUNTIME_syslog} \
tar \
time \
@@ -48,9 +46,11 @@ RDEPENDS:${PN} = "\
util-linux-fstrim \
util-linux-hwclock \
util-linux-logger \
vim \
which \
"
# acl
# sudo
# vim
# Minimal network environment
RDEPENDS:${PN}-net = "\
@@ -1,65 +0,0 @@
SUMMARY = "Packages required by bsp"
#
# packages which content depend on MACHINE_FEATURES need to be MACHINE_ARCH
#
ALLOW_EMPTY:${PN} = "1"
PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit packagegroup
BSP_EXTRAS_PACKAGES ?= ""
PROVIDES = "${PACKAGES}"
PACKAGES = ' \
packagegroup-wr-bsps \
${@bb.utils.contains("MACHINE_FEATURES", "parser", "packagegroup-wr-bsps-parser", "", d)} \
${@bb.utils.contains("MACHINE_FEATURES", "shell-tools", "packagegroup-wr-bsps-shell-tools", "", d)} \
${@bb.utils.contains("MACHINE_FEATURES", "filesystem", "packagegroup-wr-bsps-filesystem-tools", "", d)} \
${@bb.utils.contains("MACHINE_FEATURES", "profile", "packagegroup-wr-bsps-profile-tools", "", d)} \
${@bb.utils.contains("MACHINE_FEATURES", "network", "packagegroup-wr-bsps-network-tools", "", d)} \
\
${@bb.utils.contains("DISTRO_FEATURES", "bsp-extras", "packagegroup-wr-bsps-bsp-extras", "", d)} \
'
#
# packagegroup-wr-bsps contain stuff needed by BSPs (machine related)
#
RDEPENDS:packagegroup-wr-bsps = "\
${@bb.utils.contains("MACHINE_FEATURES", "parser", "packagegroup-wr-bsps-parser", "", d)} \
${@bb.utils.contains("MACHINE_FEATURES", "shell-tools", "packagegroup-wr-bsps-shell-tools", "", d)} \
${@bb.utils.contains("MACHINE_FEATURES", "filesystem", "packagegroup-wr-bsps-filesystem-tools", "", d)} \
${@bb.utils.contains("MACHINE_FEATURES", "profile", "packagegroup-wr-bsps-profile-tools", "", d)} \
${@bb.utils.contains("MACHINE_FEATURES", "network", "packagegroup-wr-bsps-network-tools", "", d)} \
\
${@bb.utils.contains("DISTRO_FEATURES", "bsp-extras", "packagegroup-wr-bsps-bsp-extras", "", d)} \
"
SUMMARY:packagegroup-wr-bsps-parser = "Parser Generator Support"
RDEPENDS:packagegroup-wr-bsps-parser = "\
flex \
bison"
SUMMARY:packagegroup-wr-bsps-shell-tools = "Shell tools support"
RDEPENDS:packagegroup-wr-bsps-shell-tools = "\
dialog"
SUMMARY:packagegroup-wr-bsps-filesystem-tools = "Filesystem tools support"
RDEPENDS:packagegroup-wr-bsps-filesystem-tools = "\
fio \
smartmontools"
SUMMARY:packagegroup-wr-bsps-profile-tools = "Profile tools support"
RDEPENDS:packagegroup-wr-bsps-profile-tools = "\
${@bb.utils.contains('INCOMPATIBLE_LICENSE', 'GPL-3.0-only', '', 'perf', d)}"
SUMMARY:packagegroup-wr-bsps-network-tools = "Network tools support"
RDEPENDS:packagegroup-wr-bsps-network-tools = "\
iperf3"
SUMMARY:packagegroup-wr-bsps-bsp-extras = "BSP related extras devices tools"
RDEPENDS:packagegroup-wr-bsps-bsp-extras = "\
${BSP_EXTRAS_PACKAGES} \
"
@@ -1,19 +0,0 @@
#
# Copyright (C) 2012-2013 Wind River Systems Inc.
#
# This package matches a FEATURE_PACKAGES_packagegroup-wr-core-db definition in
# wrlinux-image.bbclass that may be used to customize an image by
# adding "wr-core-db" to IMAGE_FEATURES.
#
DESCRIPTION = "Wind River Linux core package group: db"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
ALLOW_EMPTY:${PN} = "1"
RDEPENDS:${PN} = " \
db \
sqlite3 \
"
@@ -1,23 +0,0 @@
#
# Copyright (C) 2012-2013 Wind River Systems Inc.
#
# This package matches a FEATURE_PACKAGES_packagegroup-wr-core-perl definition in
# wrlinux-image.bbclass that may be used to customize an image by
# adding "wr-core-perl" to IMAGE_FEATURES.
#
DESCRIPTION = "Wind River Linux core package group: perl"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
PR = "r1"
ALLOW_EMPTY:${PN} = "1"
RDEPENDS:${PN} = " \
perl \
perl-misc \
perl-modules \
perl-pod \
"
@@ -1,7 +1,14 @@
ROOT = "root=/dev/mmcblk0p2"
#TODO clean this mess up
ROOT:rpi = "root=/dev/mmcblk0p2"
ROOT:arm = "root=/dev/mmcblk0p2"
inherit deploy
addtask do_deploy after do_install before do_build
do_deploy() {
}
do_deploy:aarch64() {
install -m 644 ${S}/grub-bootconf ${DEPLOY_DIR_IMAGE}/grub.cfg
}
do_deploy:rpi() {
install -m 644 ${S}/grub-bootconf ${DEPLOY_DIR_IMAGE}/grub.cfg
}
#not sure why this is necessary as a result of the above
+3 -2
View File
@@ -57,8 +57,9 @@ rm ${PKGD}/var/volatile -rf
PYVER=$(find ${RECIPE_SYSROOT}/usr/${BASELIB} -maxdepth 1 -type d -name python3\.* -exec basename {} \;)
mkdir -p ${D}/usr/${BASELIB}/${PYVER}/site-packages
#PYTHON_SITELIB might break on a future update to tuned; this line is copied manually from the makefile
PYTHON_SITELIB=$(python3 -c 'from sysconfig import get_path; print(get_path("purelib"));')
mv ${D}${PYTHON_SITELIB}/${PN} ${D}/usr/${BASELIB}/${PYVER}/site-packages
#PYTHON_SITELIB=$(python3 -c 'from sysconfig import get_path; print(get_path("purelib"));')
TUNED_ORIG=$(find ${D} -wholename "*/${PYVER}/site-packages/${PN}" -type d -maxdepth 5)
mv $TUNED_ORIG ${D}/usr/${BASELIB}/${PYVER}/site-packages
ln -s /boot/EFI/BOOT/grub.cfg ${D}/etc/grub2.cfg
ln -s grub-editenv ${D}/usr/bin/grub2-editenv
ln -s grub-mkconfig ${D}/usr/bin/grub2-mkconfig