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,68 @@
|
||||
# Add profiling optimization type
|
||||
PROFILING_OPTIMIZATION = "${FULL_OPTIMIZATION} -fno-omit-frame-pointer -fvisibility=default"
|
||||
SELECTED_OPTIMIZATION[vardeps] += "PROFILING_OPTIMIZATION"
|
||||
|
||||
# Some packages have problems with PROFILING_OPTIMIZATION
|
||||
#
|
||||
# fix linking/relocating error
|
||||
PROFILING_OPTIMIZATION:remove:pn-llvm:powerpc = "-fno-omit-frame-pointer"
|
||||
# fix error: r7 cannot be used in asm here
|
||||
PROFILING_OPTIMIZATION:remove:pn-pulseaudio:arm = "-fno-omit-frame-pointer"
|
||||
# gcc-sanitizers makes extensive use of hidden visibility and frame pointer omission.
|
||||
# Trying to override that can cause build failures.
|
||||
PROFILING_OPTIMIZATION:pn-gcc-sanitizers = "${FULL_OPTIMIZATION}"
|
||||
# Fix traps: python[550] trap invalid opcode ip:b7f80f00 sp:bfb09a10 error:0 in ld-2.30.so[b7f7b000+1c000]
|
||||
PROFILING_OPTIMIZATION:remove:pn-glibc:x86 = "-fno-omit-frame-pointer"
|
||||
# Fix | stress-enosys.c: In function 'exercise_syscall':
|
||||
# | stress-enosys.c:230:1: error: bp cannot be used in 'asm' here
|
||||
# | 230 | }
|
||||
PROFILING_OPTIMIZATION:remove:pn-stress-ng:x86-64 = "-fno-omit-frame-pointer"
|
||||
PROFILING_OPTIMIZATION:remove:pn-stress-ng:x86 = "-fno-omit-frame-pointer"
|
||||
|
||||
# Set for SPDX 3
|
||||
SPDX_AUTHORS_openembedded_comment ??= "${DISTRO_NAME} ${DISTRO_VERSION}"
|
||||
SPDX_PACKAGE_VERSION ?= "${EXTENDPKGV}"
|
||||
|
||||
# PACKAGECONFIG settings for WRLinux
|
||||
include conf/distro/include/wrlinux-packageconfigs.inc
|
||||
|
||||
# MIRRORS are used only if we don't have a local copy, and the stated upstream
|
||||
# is no longer available.
|
||||
MIRRORS =+ "\
|
||||
git://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
|
||||
gitsm://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
|
||||
hg://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
|
||||
p4://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
|
||||
svn://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
|
||||
ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
|
||||
http://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n \
|
||||
https://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \n"
|
||||
|
||||
# dnsmasq and named (provided by bind) use the same default port 53:
|
||||
# | dnsmasq: failed to create listening socket for port 53: Address already in use
|
||||
# So disable the service by default, and if the user want to use both of them,
|
||||
# it need to be set to a different port in dnsmasq.conf before starting the service.
|
||||
INITSCRIPT_PARAMS:pn-dnsmasq = "stop 20 0 1 6 ."
|
||||
SYSTEMD_AUTO_ENABLE:pn-dnsmasq = "disable"
|
||||
|
||||
# Exclude download layers from eSDK.
|
||||
SDK_LAYERS_EXCLUDE_PATTERN ?= ".*-dl$ .*-dl-[0-9.]+$"
|
||||
|
||||
# do_kernel_version_sanity_check in oe-core checks if the defined version in
|
||||
# metadata(LINUX_VERSION) matches the version written in the source code. For
|
||||
# release branches we have Jenkins to take care of the version updating. For
|
||||
# CI/CD branch we aim to use the latest source and directly use Yocto kernel
|
||||
# source code which frequently gets updated. But oe-core does not tightly follow
|
||||
# the latest version. We don't necessarily frequently manually bump up the
|
||||
# version.
|
||||
KERNEL_VERSION_SANITY_SKIP = "1"
|
||||
|
||||
require conf/distro/include/plcos_security_flags.inc
|
||||
|
||||
# Enable predictable network interface names. This was intentionally
|
||||
# not supported in 10.22.33.x and earlier releases.
|
||||
#
|
||||
PNI_NAMES_FEATURES ??= "pni-names"
|
||||
DISTRO_FEATURES:append = " ${PNI_NAMES_FEATURES}"
|
||||
|
||||
EXTRA_IMAGEDEPENDS:remove:qemuriscv64:pn-${INITRAMFS_IMAGE} = "opensbi"
|
||||
@@ -0,0 +1,4 @@
|
||||
MAX_PAGE_SIZE_FLAGS ?= " -Wl,-z,max-page-size=0x10000"
|
||||
MAX_PAGE_SIZE_FLAGS:pn-lib32-systemd-boot = ""
|
||||
CFLAGS:append:virtclass-multilib-lib32 = "${MAX_PAGE_SIZE_FLAGS}"
|
||||
LDFLAGS:append:virtclass-multilib-lib32 = "${MAX_PAGE_SIZE_FLAGS}"
|
||||
@@ -0,0 +1,139 @@
|
||||
OSTREE_INITRAMFS_IMAGE ?= "initramfs-ostree-image"
|
||||
OSTREE_REPO ??= "${DEPLOY_DIR_IMAGE}/ostree_repo"
|
||||
|
||||
OSTREE_BRANCHNAME ??= "${IMAGE_BASENAME}"
|
||||
|
||||
# This is set to the name of the loader to include into a disk image
|
||||
# Not all BSPs will need this, so it can be unset by the BSP
|
||||
OSTREE_BOOTLOADER_INCLUDE ??= "${OSTREE_BOOTLOADER}"
|
||||
OSTREE_KERNEL_ARGS ??= "devmd=0"
|
||||
OSTREE_INST_ARGS ??= "devmd=0"
|
||||
|
||||
# The OSTREE_SKIP_BOOT_DIFF can be one of the following:
|
||||
# 0 = Perform a full fsck and boot diff
|
||||
# 1 = Skip the FSCK check
|
||||
# 2 = Skip the FSCK and the boot
|
||||
OSTREE_SKIP_BOOT_DIFF ??= "2"
|
||||
|
||||
# Generate rootfs.ostree.tar.bz2 files which could be used to build a new repo
|
||||
# OSTREE_CREATE_TARBALL = "1"
|
||||
|
||||
# Configuration of image upgrade and install variables
|
||||
|
||||
OSTREE_USE_AB ??= "0"
|
||||
OSTREE_REMOTE_NAME ??= "${OSTREE_OSNAME}"
|
||||
OSTREE_REMOTE_URL ??= ""
|
||||
|
||||
# WIC wks configuration variables follow
|
||||
# The selection of the wks file is:
|
||||
# Bootloader - ab/noab
|
||||
|
||||
OSTREE_ARCH_WKS:x86 ??= "ostree-grub"
|
||||
OSTREE_ARCH_WKS:x86-64 ??= "ostree-grub"
|
||||
|
||||
OSTREE_ARCH_WKS:arm ??= "ostree-uboot-sd"
|
||||
OSTREE_ARCH_WKS:armv7 ??= "ostree-uboot-sd"
|
||||
OSTREE_ARCH_WKS:armv7ve ??= "ostree-uboot-sd"
|
||||
OSTREE_ARCH_WKS:aarch64 ??= "ostree-uboot-sd"
|
||||
|
||||
OSTREE_AB_WKS ??= "${@oe.utils.conditional('OSTREE_USE_AB', '1', '-ab', '-noab', d)}"
|
||||
|
||||
OSTREE_USE_FIT ??= "0"
|
||||
|
||||
# Set a fixed size in the wks file for the various partitions from local.conf e.g.
|
||||
#OSTREE_WKS_EFI_SIZE = "--size=32M --overhead-factor 1"
|
||||
#OSTREE_WKS_BOOT_SIZE = "--size=300M --overhead-factor 1"
|
||||
#OSTREE_WKS_ROOT_SIZE = "--size=1024M --overhead-factor 1"
|
||||
#OSTREE_WKS_FLUX_SIZE = "--size=1024M --overhead-factor 1"
|
||||
|
||||
OSTREE_WKS_EFI_SIZE ??= "--size=32M"
|
||||
OSTREE_WKS_BOOT_SIZE ??= ""
|
||||
OSTREE_WKS_ROOT_SIZE ??= ""
|
||||
OSTREE_WKS_FLUX_SIZE ??= ""
|
||||
|
||||
# Parition type for /var
|
||||
OSTREE_FLUX_PART ??= "${@bb.utils.contains('DISTRO_FEATURES', 'luks', 'luksfluxdata', 'fluxdata',d)}"
|
||||
|
||||
# Name of the boot loader to include in the file system
|
||||
OSTREE_BOOTLOADER:x86 ??= 'grub'
|
||||
OSTREE_BOOTLOADER:x86-64 ??= 'grub'
|
||||
OSTREE_BOOTLOADER:arm ??= 'u-boot'
|
||||
OSTREE_BOOTLOADER:armv7 ??= 'u-boot'
|
||||
OSTREE_BOOTLOADER:armv7ve ??= 'u-boot'
|
||||
OSTREE_BOOTLOADER:aarch64 ??= 'u-boot'
|
||||
|
||||
# Define any special partitions required where loaders, firmware etc
|
||||
# live It is intended that these are defined by the BSP as needed
|
||||
OSTREE_SD_UBOOT_WIC1 ??= "part / --source rawcopy --sourceparams="file=${UBOOT_BINARY}" --ondisk mmcblk --no-table --align 1 --size 1"
|
||||
OSTREE_SD_UBOOT_WIC2 ??= ""
|
||||
OSTREE_SD_UBOOT_WIC3 ??= ""
|
||||
OSTREE_SD_UBOOT_WIC4 ??= ""
|
||||
|
||||
# The OSTREE_CONSOLE variable will control what kernel command line
|
||||
# parameters are passed for the console these should be formatted for
|
||||
# the boot loader specific to the BSP and the OSTREE_CONSOLE_AUX
|
||||
# should end with a SPACE
|
||||
OSTREE_CONSOLE_PRI ??= "console=tty1"
|
||||
OSTREE_CONSOLE_PRI:arm ??= "console=\${console},\${baudrate}"
|
||||
OSTREE_CONSOLE_PRI:armv7 ??= "console=\${console},\${baudrate}"
|
||||
OSTREE_CONSOLE_PRI:armv7ve ??= "console=\${console},\${baudrate}"
|
||||
OSTREE_CONSOLE_PRI:aarch64 ??= "console=\${console},\${baudrate}"
|
||||
|
||||
OSTREE_CONSOLE_AUX ??= "console=ttyS0,115200 "
|
||||
OSTREE_CONSOLE_AUX:x86 ??= "console=ttyS0,115200 "
|
||||
OSTREE_CONSOLE_AUX:x86-64 ??= "console=ttyS0,115200 "
|
||||
OSTREE_CONSOLE_AUX:arm ??= "console=tty0 "
|
||||
OSTREE_CONSOLE_AUX:armv7 ??= "console=tty0 "
|
||||
OSTREE_CONSOLE_AUX:armv7ve ??= "console=tty0 "
|
||||
OSTREE_CONSOLE_AUX:aarch64 ??= "console=tty0 "
|
||||
|
||||
OSTREE_CONSOLE ??= "${OSTREE_CONSOLE_AUX}${OSTREE_CONSOLE_PRI}"
|
||||
|
||||
# This is set to the name of the loader to include into a disk image
|
||||
# Not all BSPs will need this, so it can be unset by the BSP
|
||||
OSTREE_SD_BOOT_ALIGN ??= "4"
|
||||
|
||||
# Copy the IMAGE_BOOT_FILES when generating the ostree boot partition
|
||||
OSTREE_COPY_IMAGE_BOOT_FILES ??= "0"
|
||||
|
||||
# Use this WKS file with wic (WKS_FILE = "${OSTREE_WKS_FILE}" should be set in the feature
|
||||
# template or local.conf
|
||||
OSTREE_WKS_FILE ??= "${OSTREE_ARCH_WKS}${OSTREE_AB_WKS}.wks.in"
|
||||
|
||||
# Below are additional variables that can be set in local.conf which are the
|
||||
# defaults for the network installer
|
||||
|
||||
# Boot Loader Magic block offset (where the first partition should start in sectors)
|
||||
# NOTE: The FSZ, BSZ and RSZ are numeric in MB only e.g. OSTREE_FDISK_FSZ = "64"
|
||||
OSTREE_FDISK_BLM ??= "2506"
|
||||
# Size of the Fat / EFI partition
|
||||
OSTREE_FDISK_FSZ ??= "32"
|
||||
# Size of the Boot partition
|
||||
OSTREE_FDISK_BSZ ??= "200"
|
||||
# Size of the Root partition
|
||||
OSTREE_FDISK_RSZ ??= "1400"
|
||||
# Size of the /var partition 0 for fill disk
|
||||
OSTREE_FDISK_VSZ ??= "0"
|
||||
|
||||
# Allow the var directory to be erased via the initramfs boot, when
|
||||
# using "ostree_upgrade.sh -e". The default is 1, but for very secure
|
||||
# targets this could be a dangerous operation so it is configurable.
|
||||
# OSTREE_ALLOW_RM_VAR = "0"
|
||||
|
||||
# What uboot command should be used to start the kernel in the boot.scr file
|
||||
# OSTREE_UBOOT_CMD ??= "bootz"
|
||||
|
||||
# Use file system links for the ostree boot mounts (more secure and the default)
|
||||
# OSTREE_BOOTSCR ??= "fs_links"
|
||||
# Or read a uEnv.txt file from the disk which allows kernel args
|
||||
# to be controlled via ostree (less secure)
|
||||
# OSTREE_BOOTSCR ??= "env_import"
|
||||
|
||||
# Allow a BSP to specify extra cmds in the boot.scr if needed
|
||||
OSTREE_BOOTSCR_PRECMD ??= ""
|
||||
|
||||
# Grub settings for ostree
|
||||
OSTREE_GRUB_USER ??= "root"
|
||||
|
||||
OSTREE_KERNEL ??= "${KERNEL_IMAGETYPE}"
|
||||
RAMDISK_EXT ?= ".${INITRAMFS_FSTYPES}"
|
||||
@@ -0,0 +1,2 @@
|
||||
MULTILIBS ?= "multilib:lib32"
|
||||
DEFAULTTUNE:virtclass-multilib-lib32 ?= "armv7vethf"
|
||||
@@ -0,0 +1,3 @@
|
||||
MULTILIBS ?= "multilib:lib32"
|
||||
DEFAULTTUNE:virtclass-multilib-lib32 ?= "core2-32"
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
# The recipes which are needed adjust during the build
|
||||
@@ -0,0 +1,20 @@
|
||||
# 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"
|
||||
@@ -0,0 +1,17 @@
|
||||
# Base on oe-core security flags
|
||||
#include conf/distro/include/security_flags.inc
|
||||
|
||||
# To override for multilib, use SECURITY_CFLAGS:pn-<pkg>_pn-<mlib>-<pkg>.
|
||||
# If just SECURITY_CFLAGS:pn-<pkg> is defined, it will be used for all
|
||||
# multilib variants, too.
|
||||
|
||||
# Reason: The recipe vdso-test located in wrlinux which has assemble code
|
||||
SECURITY_CFLAGS:pn-vdso-test = ""
|
||||
|
||||
# Reason:
|
||||
# upstream meta-secure-core refuse to set var-SECURITY_STACK_PROTECTOR to
|
||||
# LDFLAGS and upstream oe-core refuse to remove var-SECURITY_STACK_PROTECTOR
|
||||
# from LDFLAGS
|
||||
SECURITY_LDFLAGS:remove:pn-libsign = "-fstack-protector-strong"
|
||||
SECURITY_LDFLAGS:remove:pn-cryptfs-tpm2 = "-fstack-protector-strong"
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# PACKAGECONFIG settings of recipes for WRLinux
|
||||
|
||||
# Workaround for nmap possibly requiring python-pygtk which is not available
|
||||
PACKAGECONFIG:remove:pn-nmap = "zenmap"
|
||||
|
||||
# we usually use gnutls as the default PACKAGECONFIG of wpa-supplicant, but its sub-packege gnutls-openssl
|
||||
# is GPLv3, so need this check to switch to openssl if GLPv3 is blacklisted.
|
||||
PACKAGECONFIG:pn-wpa-supplicant ?= "${@bb.utils.contains('INCOMPATIBLE_LICENSE', 'GPL-3.0-only', 'openssl', 'gnutls', d)}"
|
||||
|
||||
PACKAGECONFIG:pn-sysstat ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} lm-sensors cron"
|
||||
|
||||
PACKAGECONFIG:append:pn-mesa-demos = "${@bb.utils.contains('DISTRO_FEATURES', 'weston-demo', ' wayland ', ' ', d)}"
|
||||
Reference in new issue
Block a user