diff --git a/.gitignore b/.gitignore index 9d289f2..4ba1eb5 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,14 @@ build/bitbake build/bitbake.lock build/cache +# Per-machine bitbake overrides, included by build/meta/conf/bitbake.conf +/build/conf/site.conf + +# TEZI HTTP feed published by deploy.sh, plus the feed server's pid/log. +# Deliberately outside build/tmp so a clean does not wipe a feed a board +# may be installing from. +/build/deploy/ + **/doxy/** **/generated/** **/rootfs/build/** @@ -70,3 +78,16 @@ filesystem/work # GitHub Actions workflows !.github !.github/** + +# do_attach_infrabase manifests (build artifacts) +*.attach.sha256 +*.back/ + +# --- Build-generated / attached at build time (materialized from patch sets / fetch) --- +/linux/usr/src/graphic/ +/linux/usr/src/lvgl/ +/filesystem/u-boot.bin + +# Rendered ITS + .itb output (do_render_its), regenerated each build +linux/images/ +so3/images/ diff --git a/build/.gitignore b/build/.gitignore new file mode 100644 index 0000000..d52b37f --- /dev/null +++ b/build/.gitignore @@ -0,0 +1,4 @@ +tmp +# Generated by bblayers.sh:regen_boot_chain, loaded after local.conf +conf/auto.conf + diff --git a/build/conf/bblayers.conf b/build/conf/bblayers.conf index 045f91d..5bfd4a2 100644 --- a/build/conf/bblayers.conf +++ b/build/conf/bblayers.conf @@ -1,5 +1,6 @@ - -# All layers managed by Infrabase +# Auto-generated by scripts/build.sh — regenerated by +# scripts/common/bblayers.sh:regen_bblayers(). Hand edits will be +# overwritten on the next build.sh invocation. BBPATH := "${TOPDIR}" BBFILES ?= "" @@ -14,4 +15,5 @@ BBLAYERS = " \ ${TOPDIR}/meta-bsp \ ${TOPDIR}/meta-so3 \ ${TOPDIR}/meta-atf \ + ${TOPDIR}/meta-toolchain \ " diff --git a/build/conf/local.conf b/build/conf/local.conf index 29a5e75..6457b90 100644 --- a/build/conf/local.conf +++ b/build/conf/local.conf @@ -1,140 +1,235 @@ # Infrabase - Main configuration +# +# MICOFE virt64 default: AVZ (CONFIG_SOO=y) + Linux agency + SO3 capsule, +# with the virtualized framebuffer / LVGL stack (EXTRA_OVERRIDES :lvgl:soo). +# See doc/source/{architecture,lvgl,emiso}.rst. Adjust the virt64 selections +# below to build the plain (non-SOO) contexts. BB_NUMBER_THREADS = "20" # Main target physical/emulated hardware - # IB_PLATFORM ?= "virt32" -# IB_PLATFORM ?= "virt64" -# IB_PLATFORM ?= "rpi4" -IB_PLATFORM ?= "rpi4_64" - -# IB_PLATFORM ?= "x86-qemu" - -# Linux General Configuration - -# Available configurations -IB_CONFIG:linux:x86-pc ?= "x86_defconfig" -IB_CONFIG:linux:x86-qemu ?= "x86_qemu_defconfig" - -# QEMU/virt64 configuration - -# This configuration is used to start Linux alone, or on top AVZ -# IB_CONFIG:linux:virt64 ?= "virt64_defconfig" -# IB_CONFIG:linux:rpi4_64 ?= "rpi4_64_defconfig" -# IB_CONFIG:linux:rpi4_64 ?= "rpi4_64_nomodules_defconfig" -IB_CONFIG:linux:rpi4_64 ?= "rpi4_64_nomodules_soo_defconfig" - -# Configuration to start Linux as agency to support SO3 capsules -IB_CONFIG:linux:virt64 ?= "virt64_soo_defconfig" - -PREFERRED_VERSION_linux:virt32 = "6.12" -PREFERRED_VERSION_linux:virt64 = "6.12" -PREFERRED_VERSION_linux:rpi4_64 = "6.12-rpi4" -PREFERRED_VERSION_linux:x86-qemu = "6.12" - -# Preferred version for rootfs - -# When the rootfs is fully built and user apps are deployed in it +IB_PLATFORM ?= "virt64" +# IB_PLATFORM ?= "rpi4_64" +# IB_PLATFORM ?= "verdin-imx8mp" + +# ============================================================================ +# LINUX +# ============================================================================ +# Like SO3, Linux builds in several contexts on the current IB_PLATFORM, +# selected by the CONFIG and the ITS below, not by the platform: +# +# alone Linux alone (or directly on AVZ). ITS = virt64 +# guest Linux as a guest on the AVZ hypervisor. ITS = virt64_avz +# agency Linux as the agency that hosts SO3 capsules +# (config virt64_soo_defconfig). + +# --- Versions --- +PREFERRED_VERSION_linux:virt32 = "6.12" +PREFERRED_VERSION_linux:virt64 = "6.12" +PREFERRED_VERSION_linux:rpi4_64 = "6.12-rpi4" +PREFERRED_VERSION_linux:verdin-imx8mp = "6.6-verdin" +PREFERRED_VERSION_linux = "${PREFERRED_VERSION_linux:${IB_PLATFORM}}" -PREFERRED_VERSION_rootfs-linux:virt64 = "1.0" +# --- Configs (kernel defconfig) --- +# IB_CONFIG:linux:virt64 ?= "virt64_defconfig" +IB_CONFIG:linux:virt64 ?= "virt64_soo_defconfig" +# On the QEMU-emulated platforms (virt32/virt64) a full BSP build +# (build.sh bsp-so3 / bsp-linux) also builds the QEMU emulator when its binary +# is still missing, so a fresh tree is runnable (st.sh) without a separate +# `build.sh qemu`. Set to "0" to skip that (e.g. CI that only builds+deploys and +# never runs the emulator). Ignored on hardware platforms (verdin, rpi4). +IB_BUILD_QEMU ?= "1" + +# IB_CONFIG:linux:rpi4_64 ?= "rpi4_64_defconfig" +IB_CONFIG:linux:rpi4_64 ?= "rpi4_64_nomodules_soo_defconfig" +IB_CONFIG:linux:verdin-imx8mp ?= "verdin_imx8mp_defconfig" + +# --- ITS (boot-image selection) --- +# Linux alone: +# IB_TARGET_ITS:linux:virt64 ?= "virt64" +# Linux as agency/guest on AVZ (MICOFE default — hosts the SO3 capsules): +IB_TARGET_ITS:linux:virt64 ?= "virt64_avz" +IB_TARGET_ITS:linux:rpi4_64 ?= "rpi4_64_avz" + + +# ============================================================================ +# Component versions (per platform) +# ============================================================================ +# rootfs (built once the user apps are deployed into it) +PREFERRED_VERSION_rootfs-linux:virt64 = "1.0" PREFERRED_VERSION_rootfs-linux:rpi4_64 = "1.0" -PREFERRED_VERSION_rootfs-linux:x86-qemu = "1.0" -PREFERRED_VERSION_buildroot:virt64 = "2024.11" +PREFERRED_VERSION_buildroot:virt64 = "2024.11" PREFERRED_VERSION_buildroot:rpi4_64 = "2024.11" -# Main ITS configuration -IB_TARGET_ITS:linux:virt64 ?= "virt64" -# IB_TARGET_ITS:linux:rpi4_64 ?= "rpi4" - -# This version to have only Linux standalone booting on RPi4 -# IB_TARGET_ITS:linux:rpi4_64 ?= "rpi4_64_linux" - -# Required to boot Linux on AVZ -IB_TARGET_ITS:linux:rpi4_64 ?= "rpi4_64_avz" - -# ITS used to run Linux on AVZ -IB_TARGET_ITS:linux:virt64 ?= "virt64_avz" - -# Preferred version for bsp - -# To deploy from the host to the target via ssh/scp -PREFERRED_VERSION_bsp-linux:x86-qemu = "1.0" -PREFERRED_VERSION_bsp-linux:virt64 = "1.0" +# bsp (deployed from the host to the target via ssh/scp) +PREFERRED_VERSION_bsp-linux:virt64 = "1.0" PREFERRED_VERSION_bsp-linux:rpi4_64 = "1.0" -# U-boot bootloader -PREFERRED_VERSION_uboot:virt64 = "2022.04" -PREFERRED_VERSION_uboot:rpi4_64 = "2022.04" +# U-Boot bootloader +PREFERRED_VERSION_uboot:virt64 = "2022.04" +PREFERRED_VERSION_uboot:rpi4_64 = "2022.04" +PREFERRED_VERSION_uboot:verdin-imx8mp = "2024.07" -PREFERRED_VERSION_usr-linux:x86-qemu = "1.0" -PREFERRED_VERSION_usr-linux:virt64 = "1.0" +# user-space apps +PREFERRED_VERSION_usr-linux:virt64 = "1.0" PREFERRED_VERSION_usr-linux:rpi4_64 = "1.0" -PREFERRED_VERSION_linux = "${PREFERRED_VERSION_linux:${IB_PLATFORM}}" - -# *************** SO3 *************** - -# Using the most recent version -PREFERRED_VERSION_so3:virt64 = "6.1.0" -PREFERRED_VERSION_so3:rpi4_64 = "6.1.0" - -# Configuration for SO3 - -# IB_PLATFORM:so3 ?= "virt64" -# IB_PLATFORM:so3 ?= "virt32" -# IB_PLATFORM:so3 ?= "rpi4" -# IB_PLATFORM:so3 ?= "rpi4_64" - -# IB_CONFIG:so3:virt64 ?= "virt64_defconfig" -IB_CONFIG:so3:virt64 ?= "virt64_capsule_defconfig" -# IB_CONFIG:so3:rpi4_64 ?= "rpi4_64_defconfig" -IB_CONFIG:so3:rpi4_64 ?= "virt64_capsule_defconfig" - -# Main ITS configuration - -# virt64 - -# IB_TARGET_ITS:so3:virt64 ?= "virt64_so3" - -# This ITS is used to use SO3 as capsule +# ============================================================================ +# SO3 +# ============================================================================ +# SO3 builds in one of three contexts, all on the current IB_PLATFORM (there is +# intentionally NO IB_PLATFORM:so3 override — a divergent one used to silently +# build SO3 for the wrong arch). What selects the context is the CONFIG and the +# ITS below, not the platform: +# +# standalone SO3 alone, bare metal at EL1. ITS = virt64_so3 +# guest SO3 as a guest on the AVZ hypervisor. ITS = virt64_avz +# Two-ITB boot: the AVZ ITB (virt64_avz.its = hypervisor + +# avz_dt) and the SO3 guest ITB (auto-derived virt64_so3_guest.its) +# are loaded together by U-Boot's e1c-boot command. Requires the +# AVZ config + version from the AVZ section below. +# Build: select the ITS here, then `build.sh -x avz`, then deploy +# bsp-so3 (do_itb mkimage's both ITBs; usr-so3 fills the guest +# rootfs.fat). +# capsule SO3 as a migratable capsule. ITS = virt64_capsule + +# --- Versions --- +PREFERRED_VERSION_so3:virt32 = "6.3.0" +PREFERRED_VERSION_so3:virt64 = "6.3.0" +PREFERRED_VERSION_so3:rpi4_64 = "6.3.0" + +# --- Configs (kernel defconfig) --- +# standalone and guest share the plain defconfig; capsule has its own. +# IB_CONFIG:so3:virt64 ?= "virt64_defconfig" +IB_CONFIG:so3:virt64 ?= "virt64_capsule_defconfig" +# IB_CONFIG:so3:virt64 ?= "virt64_lvperf_defconfig" +# IB_CONFIG:so3:virt64 ?= "virt64_fb_defconfig" +IB_CONFIG:so3:virt32 ?= "virt32_fb_defconfig" +IB_CONFIG:so3:rpi4_64 ?= "rpi4_64_defconfig" + +# --- ITS (boot-image selection) --- +# virt64: pick exactly ONE of standalone / guest / capsule. +# standalone (EL1, bare metal): +# IB_TARGET_ITS:so3:virt64 = "virt64_so3" +# guest on AVZ (auto-derives virt64_so3_guest): +# IB_TARGET_ITS:so3:virt64 = "virt64_avz" +# capsule (MICOFE default): IB_TARGET_ITS:so3:virt64 = "virt64_capsule" +IB_TARGET_ITS:so3:virt32 ?= "virt32_so3" +# rpi4_64 standalone: +IB_TARGET_ITS:so3:rpi4_64 ?= "rpi4_64_so3" +# rpi4_64 guest on AVZ (two-ITB): +# IB_TARGET_ITS:so3:rpi4_64 ?= "rpi4_64_avz" + + +# ============================================================================ +# AVZ +# ============================================================================ +# AVZ hypervisor — used by the SO3 "guest" context above (and by capsules). +# The AVZ ITB itself is selected through IB_TARGET_ITS:so3 = "_avz" in +# the SO3 section; here we set only the hypervisor version and build config. + +# --- Versions --- +PREFERRED_VERSION_avz:virt64 = "6.3.0" +PREFERRED_VERSION_avz:rpi4_64 = "6.3.0" +PREFERRED_VERSION_avz:verdin-imx8mp = "6.3.0" + +# --- Configs --- +# IB_CONFIG:avz:virt64 ?= "virt64_avz_defconfig" +IB_CONFIG:avz:verdin-imx8mp ?= "verdin-imx8mp_avz_defconfig" +IB_CONFIG:avz:virt64 ?= "virt64_avz_soo_defconfig" +IB_CONFIG:avz:rpi4_64 ?= "rpi4_64_avz_soo_defconfig" + +# *************** Boot chain *************** +# +# IB_BOOT_CHAIN selects how the platform firmware is brought up. It is set +# here as the SO3 default; a capsule layer may override it (edgem1 model: +# the e1c capsule sets it to "full"). Hence "?=" (weak) so the override +# wins. Values: +# "" bare U-Boot (virt64_defconfig), no ATF. SO3 standalone (EL1) +# and SO3-on-AVZ without ATF — st.sh enables QEMU EL2 +# (virtualization=on) when the avz ITS is selected. SO3 default. +# "uboot" bare U-Boot, qemu_arm64_defconfig (EL1, position-independent): +# the bare-Linux variant (kept for edgem1 alignment). +# "atf+uboot" ATF in flash0.img (BL1 + FIP[BL2+BL31+U-Boot]), no OP-TEE. +# "full" ATF + OP-TEE (BL32) + U-Boot in flash0.img — secure world. +# The flash0.img assembly lives in meta-bsp/.../bsp_virt64.inc +# (__do_platform_boot_chain); st.sh picks ATF vs bare from its presence. +IB_BOOT_CHAIN = "" + +# ATF / OP-TEE platform identifiers for QEMU virt (used when IB_BOOT_CHAIN +# is "atf+uboot" or "full"). Mirrors edgem1's virt64 settings. +IB_ATF_PLAT:virt64 = "qemu" +IB_OPTEE_PLAT:virt64 = "vexpress-qemu_armv8a" +IB_ATF_EXTRA_OPTS:virt64 = "${@bb.utils.contains('IB_BOOT_CHAIN', 'full', 'SPD=opteed ', '', d)}LOG_LEVEL=40" + +# *************** Verdin iMX8MP (SO3 guest on AVZ) *************** +# SO3 runs as an AVZ guest on the Toradex Verdin iMX8MP. The firmware chain is +# always ATF (EL3) + OP-TEE + U-Boot (the imx-boot/flash.bin), independent of +# Torizon and the e1c capsules. Select the board with IB_PLATFORM="verdin-imx8mp". +# AVZ + bundled u-boot + the imx8mp ATF/OP-TEE settings mirror edgem1's verdin +# build; the SO3 guest replaces the Linux guest. Two-ITB boot like virt64: the +# AVZ ITB (verdin_imx8mp_avz.its) and the SO3 guest ITB +# (verdin_imx8mp_so3_guest.its), loaded by U-Boot's e1c-boot command. +# SO3 as an AVZ guest (default). For SO3 standalone (bare-metal, no AVZ) select +# the standalone config + ITS, and build U-Boot with the EL1 switch so it hands +# SO3 off at EL1 (SO3 standalone is EL1-native; AVZ instead needs EL2): +# IB_CONFIG:so3:verdin-imx8mp ?= "verdin-imx8mp_defconfig" +# IB_TARGET_ITS:so3:verdin-imx8mp ?= "verdin_imx8mp_so3" +# IB_UBOOT_SWITCH_EL1 = "1" +IB_CONFIG:so3:verdin-imx8mp ?= "verdin-imx8mp_avz_defconfig" +IB_TARGET_ITS:so3:verdin-imx8mp ?= "verdin_imx8mp_avz" +# NOTE: the virt64 SO3 ITS is set once, in the SO3 section above — do not +# re-assign IB_TARGET_ITS:so3:virt64 here (a stray "= virt64_avz" used to live +# at this spot and silently overrode the SO3 section). + +# imx-boot's U-Boot hands the OS off at EL2 by default (AVZ). Set to "1" for the +# standalone variant so U-Boot switches to EL1 first (CONFIG_ARMV8_SWITCH_TO_EL1). +IB_UBOOT_SWITCH_EL1 ?= "0" + +PREFERRED_VERSION_avz:verdin-imx8mp = "6.3.0" +IB_CONFIG:avz:verdin-imx8mp ?= "verdin-imx8mp_avz_defconfig" + +# Verdin U-Boot 2024.07 assembles imx-boot/flash.bin (SPL + ATF + OP-TEE + U-Boot). +PREFERRED_VERSION_uboot:verdin-imx8mp = "2024.07" +# NXP lpddr4 DDR training firmware (vendored capsule-free, one flat directory). +IB_IMX_FIRMWARE_PATH = "${IB_DIR}/build/meta-bsp/recipes-bsp/bsp/verdin-imx8mp" + +IB_PLAT_CPU:verdin-imx8mp = "aarch64" +IB_TOOLCHAIN:verdin-imx8mp = "aarch64-none-linux-gnu" + +IB_ATF_PLAT:verdin-imx8mp = "imx8mp" +IB_ATF_EXTRA_OPTS:verdin-imx8mp = "IMX_BOOT_UART_BASE=0x30880000 SPD=opteed BL32_BASE=0xbe000000 BL32_SIZE=0x2000000 DEBUG=0 LOG_LEVEL=20" +IB_OPTEE_PLAT:verdin-imx8mp = "imx-mx8mpevk" +IB_OPTEE_EXTRA_OPTS:verdin-imx8mp = "CFG_TZDRAM_START=0xbe000000 CFG_DDR_SIZE=0x80000000 CFG_TEE_CORE_LOG_LEVEL=3 CFG_UART_BASE=0x30880000" -# rpi4 - -# IB_TARGET_ITS:so3:rpi4_64 ?= "rpi4_64_so3" -IB_TARGET_ITS:so3:rpi4_64 ?= "rpi4_64_capsule" - -# This ITS enables running SO3 on top of AVZ -#IB_TARGET_ITS:so3:virt64 = "virt64_avz_guest" +# Type of deployment (soft for virtual storage, hard for target hardware) -# *************** AVZ *************** -# AVZ hypervisor General Configuration -PREFERRED_VERSION_avz:virt64 = "6.1.0" +IB_STORAGE_MODE:virt64 ?= "soft" +# IB_STORAGE_MODE:verdin-imx8mp ?= "hard" -# Configuration for AVZ -# IB_CONFIG:avz:virt64 ?= "virt64_avz_defconfig" -IB_CONFIG:avz:virt64 ?= "virt64_avz_soo_defconfig" -IB_CONFIG:avz:rpi4_64 ?= "rpi4_64_avz_soo_defconfig" +IB_STORAGE_MODE:virt32 ?= "soft" +IB_STORAGE_MODE:rpi4_64 ?= "hard" -# Type of deployment (soft for virtual storage, hard for target hardware) +# Verdin: deploy the imx-boot + SO3 ITB via a TEZI image set (see bsp_verdin-imx8mp.inc) +IB_STORAGE_MODE:verdin-imx8mp ?= "http" -IB_STORAGE:virt64 ?= "soft" -IB_STORAGE:rpi4_64 ?= "hard" -# IB_STORAGE ?= "remote" +# IB_STORAGE_MODE ?= "remote" -# When deployed locally (for example on the PC where the build system is running) -# IB_STORAGE ?= "local" +# Physical device used when IB_STORAGE_MODE = "hard" +IB_STORAGE_DEVICE:rpi4 = "mmcblk0" +IB_STORAGE_DEVICE:rpi4_64 = "mmcblk0" +IB_STORAGE_DEVICE:verdin-imx8mp = "sda" -# Possible hardware device for deployment -# !! BE VERY CAREFUL WITH THIS VARIABLE !! +# HTTP deploy path: TEZI files are placed here for TEZI network auto-install +IB_HTTP_DEPLOY_PATH ?= "${IB_DIR}/build/deploy/tezi/${IB_PLATFORM}" -IB_STORAGE_DEVICE:rpi4 = "mmcblk0" -# IB_STORAGE_DEVICE:rpi4_64 = "mmcblk0" -IB_STORAGE_DEVICE:rpi4_64 = "sda" -# IB_STORAGE_DEVICE:rpi4_64 = "sdc" +# Port scripts/tezi-feed-serve.sh listens on. Unprivileged so the feed server +# runs as your user; override in site.conf when two trees share a machine. +IB_HTTP_FEED_PORT ?= "8080" # Size of the rootfs partition IB_ROOTFS_SIZE ?= "2G" @@ -143,11 +238,8 @@ IB_ROOTFS_SIZE ?= "2G" IB_ROOTFS_PARTITION:virt32 = "p2" IB_ROOTFS_PARTITION:virt64 = "p2" -IB_ROOTFS_PARTITION:rpi4 = "p2" IB_ROOTFS_PARTITION:rpi4_64 = "p2" -IB_ROOTFS_PARTITION:x86-qemu = "p1" - IB_ROOTFS_PATH:linux = "${IB_DIR}/linux/rootfs" IB_ROOTFS_PATH:so3 = "${IB_DIR}/so3/rootfs" @@ -157,17 +249,23 @@ IB_ROOTFS_METHOD ?= "buildroot" # CPU core and toolchain according to the platform IB_PLAT_CPU:virt32 = "arm" -IB_PLAT_CPU:rpi4 = "arm" IB_PLAT_CPU:virt64 = "aarch64" IB_PLAT_CPU:rpi4_64 = "aarch64" -IB_PLAT_CPU:x86-qemu = "x86" - IB_TOOLCHAIN:arm = "arm-linux-gnueabihf" IB_TOOLCHAIN:virt64 = "aarch64-none-linux-gnu" IB_TOOLCHAIN:rpi4_64 = "aarch64-none-linux-gnu" +# SO3 user-space MUSL cross toolchain, built by the musl-toolchain +# recipe (meta-toolchain) into the bitbake-managed build/tmp area. +# IB_MUSL_TARGET (selected per IB_PLAT_CPU below) names the +# sub-directory, e.g. ${IB_MUSL_TOOLCHAIN_DIR}/aarch64-linux-musl/bin. +# Only the toolchain for the configured arch is built. +IB_MUSL_TOOLCHAIN_DIR = "${TMPDIR}/toolchains" +IB_MUSL_TARGET:aarch64 = "aarch64-linux-musl" +IB_MUSL_TARGET:arm = "arm-linux-musleabihf" + # Debug options # IB_USR_BUILD_TYPE = "Release" IB_USR_BUILD_TYPE = "Debug" @@ -180,6 +278,17 @@ BB_NO_NETWORK_SANDBOX = "1" BB_WARN_ONLY = "true" # EXTRA_OVERRIDES enables fine-grained customization for the various IB recipes. -EXTRA_OVERRIDES .= ":soo" +# EXTRA_OVERRIDES .= ":soo" +# :lvgl activates the lvgl bbappend which FETCHES lvgl (release/v9.3) into +# usr/lib/lvgl at build time # EXTRA_OVERRIDES .= ":lvgl" -# EXTRA_OVERRIDES .= ":lvgl:soo" +EXTRA_OVERRIDES .= ":lvgl:soo" + + +# Which cpio becomes the ITB-embedded ramfs (do_prepare_initrd): +# "rootfs" - the full buildroot rootfs.cpio (run-from-RAM). +# "initrd" - the static git-tracked board//initrd.cpio +# (small busybox ramfs); p2 still gets the full rootfs. +# MICOFE uses the 2-stage boot: small ramdisk then switch_root to p2. +# IB_RAMFS_SOURCE = "rootfs" +IB_RAMFS_SOURCE = "initrd" diff --git a/build/meta-atf/classes/atf.bbclass b/build/meta-atf/classes/atf.bbclass index e6e2593..7879d12 100644 --- a/build/meta-atf/classes/atf.bbclass +++ b/build/meta-atf/classes/atf.bbclass @@ -1,13 +1,63 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD -# Class for building U-boot in infrabase +# Class for building ATF/OP-TEE in infrabase IB_ATF_PATH = "${IB_DIR}/atf" +IB_OPTEE_PATH = "${IB_DIR}/atf/optee" + +# Platform-specific extra options for ATF build (e.g. IMX_BOOT_UART_BASE for imx8mp) +IB_ATF_EXTRA_OPTS ?= "" + +# OP-TEE platform identifier (e.g. vexpress-qemu_armv8a) +IB_OPTEE_PLAT ?= "" + +# Platform-specific extra options for OP-TEE build (e.g. CFG_TZDRAM_START) +IB_OPTEE_EXTRA_OPTS ?= "" + +# Detect IB_ATF_EXTRA_OPTS changes between invocations and force a clean +# rebuild when they differ — make's per-file dependency tracking does NOT +# pick up changes to compile-time flags like SPD= , so otherwise BL2 keeps +# the OP-TEE-loading code (or vice versa) when switching between +# IB_BOOT_CHAIN=full and IB_BOOT_CHAIN=atf+uboot. + +__ib_atf_clean_if_opts_changed () { + _marker="${IB_TARGET}/build/.ib-atf-extra-opts" + _prev="" + if [ -f "${_marker}" ]; then + _prev="$(cat "${_marker}")" + fi + if [ "${_prev}" != "${IB_ATF_EXTRA_OPTS}" ]; then + echo "IB_ATF_EXTRA_OPTS changed (was '${_prev}', now '${IB_ATF_EXTRA_OPTS}') — running make realclean" + make CROSS_COMPILE=${IB_TOOLCHAIN}- PLAT=${IB_ATF_PLAT} realclean || true + mkdir -p "${IB_TARGET}/build" + printf '%s' "${IB_ATF_EXTRA_OPTS}" > "${_marker}" + fi +} do_build_bl31 () { echo "Building ARM Trusted Firmware with ${CORES} cores..." cd ${IB_TARGET} - make CROSS_COMPILE=${IB_TOOLCHAIN}- PLAT=${IB_ATF_PLAT} IMX_BOOT_UART_BASE=0x30880000 bl31 -j${CORES} + __ib_atf_clean_if_opts_changed + make CROSS_COMPILE=${IB_TOOLCHAIN}- PLAT=${IB_ATF_PLAT} ${IB_ATF_EXTRA_OPTS} bl31 -j${CORES} +} + +do_build_all_fiptool () { + + echo "Building ARM Trusted Firmware (all stages + fiptool) with ${CORES} cores..." + cd ${IB_TARGET} + __ib_atf_clean_if_opts_changed + make CROSS_COMPILE=${IB_TOOLCHAIN}- PLAT=${IB_ATF_PLAT} ${IB_ATF_EXTRA_OPTS} all fiptool -j${CORES} +} + +do_build_optee () { + + echo "Building OP-TEE OS with ${CORES} cores..." + cd ${IB_TARGET} + make CROSS_COMPILE64=${IB_TOOLCHAIN}- \ + PLATFORM=${IB_OPTEE_PLAT} CFG_ARM64_core=y CFG_USER_TA_TARGETS=ta_arm64 \ + ${IB_OPTEE_EXTRA_OPTS} -j${CORES} } -EXPORT_FUNCTIONS do_build_bl31 +EXPORT_FUNCTIONS do_build_bl31 do_build_all_fiptool do_build_optee diff --git a/build/meta-atf/conf/layer.conf b/build/meta-atf/conf/layer.conf index 7506aa8..8cc9f4f 100644 --- a/build/meta-atf/conf/layer.conf +++ b/build/meta-atf/conf/layer.conf @@ -1,3 +1,6 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + BBPATH .= ":${LAYERDIR}" BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend" diff --git a/build/meta-atf/recipes-atf/atf/atf_1.5.bb b/build/meta-atf/recipes-atf/atf/atf_1.5.bb index 92b6681..bc90686 100644 --- a/build/meta-atf/recipes-atf/atf/atf_1.5.bb +++ b/build/meta-atf/recipes-atf/atf/atf_1.5.bb @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD SUMMARY = "ATF firmware" DESCRIPTION = "ARM Trusted Firmware (ATF)" @@ -10,12 +12,29 @@ inherit atf PR = "r0" PV = "1.5" + +SRC_URI = "git://git.trustedfirmware.org/TF-A/trusted-firmware-a.git;nobranch=1;protocol=https" +SRC_URI += "file://0001-atf-imx8mp-avz.patch" + +FILESPATH:prepend = "${THISDIR}/files:" + SRCREV = "78b1610e31d9a5dbd16553b8a2ac99000a7379f7" -SRC_URI = "git://git.trustedfirmware.org/TF-A/trusted-firmware-a.git;branch=master;protocol=https" +# do_patch uses the standard OE patch flow (applies to ${S} via SRC_URI). +# The patch uses git-style a/ b/ labels and applies cleanly with +# the default -p1 strip level. do_attach_infrabase later copies ${S} into +# ${IB_TARGET} (= ${IB_ATF_PATH}) so the local working tree gets the patch. # To force the task to be re-executed do_build[nostamp] = "1" + +# OP-TEE must be built before ATF — but only in "full" mode, where +# bsp_virt64.inc:__do_platform_boot_chain later bundles OP-TEE into the +# FIP via fiptool. In "atf+uboot" mode the FIP carries BL31+U-Boot +# only (no --tos-fw), and "uboot" mode never reaches this recipe. So +# gating on IB_BOOT_CHAIN=="full" avoids unnecessary OP-TEE builds. + +do_build[depends] = "${@bb.utils.contains('IB_BOOT_CHAIN', 'full', 'optee:do_build', '', d)}" do_configure[noexec] = "1" # Where the working directory will be placed in infrabase root dir @@ -23,12 +42,29 @@ IB_TARGET = "${IB_ATF_PATH}" do_build () { - # Currently, only imx8mp-verdin is supported. - if [ "${IB_PLATFORM}" = "verdin-imx8mp" ]; then - do_build_bl31 + BL31="${IB_ATF_PATH}/build/imx8mp/release/bl31.bin" + HASH_FILE="${BL31}.sha256" + OLD_HASH="$(cat $HASH_FILE 2>/dev/null || true)" + NEW_HASH="$(sha256sum $BL31 2>/dev/null | cut -d' ' -f1 || true)" + if [ -f "$BL31" ] && [ -n "$NEW_HASH" ] && [ "$OLD_HASH" = "$NEW_HASH" ]; then + echo "ATF bl31.bin is up to date, skipping rebuild" + else + do_build_bl31 + sha256sum "$BL31" | cut -d' ' -f1 > "$HASH_FILE" + fi + elif [ "${IB_PLATFORM}" = "virt64" ]; then + do_build_all_fiptool + mkdir -p ${IB_DIR}/filesystem + cp ${IB_ATF_PATH}/build/qemu/release/bl1.bin ${IB_DIR}/filesystem/ + cp ${IB_ATF_PATH}/build/qemu/release/bl31.bin ${IB_DIR}/filesystem/ fi } addtask do_build +do_clean[nostamp] = "1" +do_clean () { + rm -rf ${IB_ATF_PATH}/build/${IB_ATF_PLAT} +} +addtask do_clean \ No newline at end of file diff --git a/build/meta-atf/recipes-atf/atf/files/0001-atf-imx8mp-avz.patch b/build/meta-atf/recipes-atf/atf/files/0001-atf-imx8mp-avz.patch new file mode 100644 index 0000000..3dae636 --- /dev/null +++ b/build/meta-atf/recipes-atf/atf/files/0001-atf-imx8mp-avz.patch @@ -0,0 +1,49 @@ +ATF imx8mp adjustments for AVZ on EDGE-M1 +========================================== + +Two changes needed to run AVZ over OP-TEE on Verdin iMX8MP: + + - plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c + Configure TZC380 region 0 as SP_S_RW so OP-TEE's + CFG_TZASC_REGION0_SECURE startup check passes. SPL enables TZASC + via GPR10 but leaves region 0 NS-accessible; OP-TEE adds proper + NS DRAM carve-outs after BL31 runs. + + - plat/imx/imx8m/imx8m_psci_common.c + Relax imx_validate_ns_entrypoint to accept any DRAM address. AVZ's + secondary_startup lives below PLAT_NS_IMAGE_OFFSET, so the + stock check rejects it and PSCI_CPU_ON returns INVALID_PARAMS. + +Signed-off-by: EDGEMTech +--- +--- a/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c ++++ b/plat/imx/imx8m/imx8mp/imx8mp_bl31_setup.c +@@ -252,6 +252,15 @@ + plat_gic_init(); + + imx_gpc_init(); ++ ++ /* Configure TZASC region 0 as secure-only so OP-TEE passes its startup ++ * security check (CFG_TZASC_REGION0_SECURE). SPL enables TZASC via GPR10 ++ * but leaves region 0 NS-accessible; OP-TEE adds proper NS DRAM regions ++ * after this. */ ++ tzc380_init(IMX_TZASC_BASE); ++ tzc380_configure_region(0, 0x00000000, ++ TZC_ATTR_REGION_SIZE(TZC_REGION_SIZE_4G) | ++ TZC_ATTR_REGION_EN_MASK | TZC_ATTR_SP_S_RW); + } + + entry_point_info_t *bl31_plat_get_next_image_ep_info(unsigned int type) +--- a/plat/imx/imx8m/imx8m_psci_common.c ++++ b/plat/imx/imx8m/imx8m_psci_common.c +@@ -31,8 +31,8 @@ + + int imx_validate_ns_entrypoint(uintptr_t ns_entrypoint) + { +- /* The non-secure entrypoint should be in RAM space */ +- if (ns_entrypoint < PLAT_NS_IMAGE_OFFSET) ++ /* Accept any address in DRAM; AVZ secondary_startup lives below PLAT_NS_IMAGE_OFFSET */ ++ if (ns_entrypoint < IMX_DRAM_BASE) + return PSCI_E_INVALID_PARAMS; + + return PSCI_E_SUCCESS; diff --git a/build/meta-atf/recipes-atf/optee/optee_1.5.bb b/build/meta-atf/recipes-atf/optee/optee_1.5.bb new file mode 100644 index 0000000..6448b0d --- /dev/null +++ b/build/meta-atf/recipes-atf/optee/optee_1.5.bb @@ -0,0 +1,57 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + +SUMMARY = "OPTEE-OS firmware" +DESCRIPTION = "Open Trusted Execution Environment OS" + +LICENSE = "GPLv2" + +inherit atf + +# Version and revision +PR = "r0" +PV = "1.5" + +SRC_URI = "git://github.com/OP-TEE/optee_os.git;nobranch=1;protocol=https" + +SRCREV = "cf2504f5f89ef97c7ed7b04b3c0f639f0b014fbb" + +# Make sure atf is attached before attaching optee, since optee is +# a sub-directory of atf + +do_attach_infrabase[depends] = "atf:do_attach_infrabase" + +# To force the task to be re-executed +do_build[nostamp] = "1" +do_configure[noexec] = "1" + +# Where the working directory will be placed in infrabase root dir +IB_TARGET = "${IB_OPTEE_PATH}" + +do_build () { + + if [ "${IB_PLATFORM}" = "verdin-imx8mp" ]; then + TEE_ELF="${IB_OPTEE_PATH}/out/arm-plat-imx/core/tee.elf" + HASH_FILE="${TEE_ELF}.sha256" + OLD_HASH="$(cat $HASH_FILE 2>/dev/null || true)" + NEW_HASH="$(sha256sum $TEE_ELF 2>/dev/null | cut -d' ' -f1 || true)" + if [ -f "$TEE_ELF" ] && [ -n "$NEW_HASH" ] && [ "$OLD_HASH" = "$NEW_HASH" ]; then + echo "OP-TEE tee.elf is up to date, skipping rebuild" + else + do_build_optee + sha256sum "$TEE_ELF" | cut -d' ' -f1 > "$HASH_FILE" + fi + elif [ "${IB_PLATFORM}" = "virt64" ]; then + do_build_optee + mkdir -p ${IB_DIR}/filesystem + cp ${IB_OPTEE_PATH}/out/arm-plat-vexpress/core/tee-pager_v2.bin ${IB_DIR}/filesystem/ + fi +} + +addtask do_build + +do_clean[nostamp] = "1" +do_clean () { + rm -rf ${IB_OPTEE_PATH}/out +} +addtask do_clean diff --git a/build/meta-bsp/classes/bsp.bbclass b/build/meta-bsp/classes/bsp.bbclass index 54ab3bd..aa51e73 100644 --- a/build/meta-bsp/classes/bsp.bbclass +++ b/build/meta-bsp/classes/bsp.bbclass @@ -1,32 +1,191 @@ -# Copyright (c) 2023-2025 EDGEMTech Ltd +# Copyright (c) 2023-2026 EDGEMTech Ltd +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD # Class for BSP - Main recipe # The link to the firmwares of all boards IB_BSP_PATH = "${IB_DIR}/build/meta-bsp/recipes-bsp/bsp" -# Path to the ITB files +# Standard tree locations for the boot-chain components. atf.bbclass sets +# the same values, but BSP recipes that don't `inherit atf` still need +# these to assemble flash0.img / flash.bin in do_deploy_boot_chain. + +IB_ATF_PATH = "${IB_DIR}/atf" +IB_OPTEE_PATH = "${IB_DIR}/atf/optee" + +# ITB build/output directory (gitignored). The ITS *sources* live in each +# BSP recipe's files/its/ (IB_ITS_SRC) and reference the component trees via +# ${IB_*_PATH} variables; do_itb renders them here (bsp_render_its) before +# mkimage and writes the resulting .itb here too. +IB_ITB_PATH:so3 = "${IB_DIR}/so3/images" +IB_ITB_PATH:linux = "${IB_DIR}/linux/images" + +# Component tree locations referenced from the ITS templates. Provided here +# (?=) so every BSP recipe can render any ITS regardless of which classes it +# inherits; the real definitions in so3/avz/linux .bbclass take precedence. +IB_SO3_PATH ?= "${IB_DIR}/so3" +IB_AVZ_PATH ?= "${IB_DIR}/avz" +IB_LINUX_PATH ?= "${IB_DIR}/linux/linux" + +# AVZ two-ITB boot: the guest ITB basename is + +# this suffix. SO3 guests use _so3_guest (default); the Linux agency overrides +# it to _linux_guest in bsp-linux. +IB_GUEST_SUFFIX ?= "_so3_guest" + +# Which cpio feeds the embedded ramfs (the initrd.cpio.gz that the ITS +# /incbin/'s into the guest ITB). Both modes run-from-RAM; only the source +# differs: +# "rootfs" (default) - the freshly built board//rootfs.cpio (~30 MB, +# full buildroot rootfs). p2 holds the same content. +# "initrd" - the static, git-tracked board//initrd.cpio +# (small busybox ramfs). p2 still receives the full +# rootfs.cpio; the kernel just boots the small initrd. +# Override per build in conf/local.conf, e.g. IB_RAMFS_SOURCE = "initrd". +IB_RAMFS_SOURCE ?= "rootfs" + +# Render an ITS template from IB_ITS_SRC into IB_ITB_PATH, expanding the +# ${IB_*_PATH} / ${IB_PLATFORM} placeholders to absolute build paths. The sed +# patterns use char classes ([$][{]...[}]) so bitbake leaves them untouched +# and only the replacement side is expanded. +bsp_render_its() { + mkdir -p "${IB_ITB_PATH}" + sed -e "s|[$][{]IB_SO3_PATH[}]|${IB_SO3_PATH}|g" \ + -e "s|[$][{]IB_AVZ_PATH[}]|${IB_AVZ_PATH}|g" \ + -e "s|[$][{]IB_LINUX_PATH[}]|${IB_LINUX_PATH}|g" \ + -e "s|[$][{]IB_ROOTFS_PATH[}]|${IB_ROOTFS_PATH}|g" \ + -e "s|[$][{]IB_PLATFORM[}]|${IB_PLATFORM}|g" \ + "${IB_ITS_SRC}/$1.its" > "${IB_ITB_PATH}/$1.its" +} + +# Default ITS source dir for the generic (AVZ / bare linux) templates. The +# Linux-agency BSP (bsp-linux) renders from here; bsp-so3 / bsp-capsules +# override IB_ITS_SRC to their own files/its. +IB_ITS_SRC ?= "${IB_DIR}/build/meta-bsp/recipes-bsp/linux/files/its" + +# Python counterpart of bsp_render_its, used by do_render_its below. Renders +# IB_ITS_SRC/.its into IB_ITB_PATH, expanding the same placeholders. +# Returns False (a no-op) when IB_ITS_SRC has no .its template, so +# callers can offer a superset of candidate names and let missing ones skip. + +def bsp_render_its_py(d, name): + import os + src = os.path.join(d.getVar('IB_ITS_SRC') or '', name + '.its') + if not os.path.isfile(src): + return False + repl = { + '${IB_SO3_PATH}': d.getVar('IB_SO3_PATH') or '', + '${IB_AVZ_PATH}': d.getVar('IB_AVZ_PATH') or '', + '${IB_LINUX_PATH}': d.getVar('IB_LINUX_PATH') or '', + '${IB_ROOTFS_PATH}': d.getVar('IB_ROOTFS_PATH') or '', + '${IB_PLATFORM}': d.getVar('IB_PLATFORM') or '', + } + with open(src) as f: + text = f.read() + for k, v in repl.items(): + text = text.replace(k, v) + dst_dir = d.getVar('IB_ITB_PATH') + os.makedirs(dst_dir, exist_ok=True) + with open(os.path.join(dst_dir, name + '.its'), 'w') as f: + f.write(text) + return True + +# Generic ITS render step, shared by EVERY BSP recipe (bsp-so3, bsp-linux, +# bsp-capsules) and their per-platform do_itb includes. Renders all the +# generic (placeholder) ITS a do_itb may mkimage — bare (IB_PLATFORM), the +# AVZ ITB (IB_TARGET_ITS) and, for the two-ITB AVZ case, the guest — from +# IB_ITS_SRC into IB_ITB_PATH, ONCE, before do_itb. Doing it here (not inline +# in each do_itb) means adding a platform or variant never needs to re-add +# render calls; bsp_render_its_py just skips the names that have no template. +# do_itb then only reads + mkimage's. + +python do_render_its() { + plat = d.getVar('IB_PLATFORM') or '' + target_its = d.getVar('IB_TARGET_ITS') or '' + suffix = d.getVar('IB_GUEST_SUFFIX') or '_so3_guest' + names = [plat, target_its] + if target_its.endswith('_avz'): + names.append(target_its[:-len('_avz')] + suffix) + seen = set() + for n in names: + if n and n not in seen: + seen.add(n) + bsp_render_its_py(d, n) +} +do_render_its[nostamp] = "1" +addtask do_render_its before do_itb -IB_ITB_PATH:so3 = "${IB_DIR}/so3/target" -IB_ITB_PATH:linux = "${IB_DIR}/linux/target" - # This is the uEnv.txt file related to U-boot depending on the BSP IB_UENV = "${FILE_DIRNAME}/files/uEnv_${IB_PLATFORM}.txt" -inherit logging inherit filesystem +# Platform boot chain — produces the bootloader-side artefacts (flash0.img +# + FIP for virt64) AND the AVZ ITB. Lives at the BSP class level so it is +# shared across every BSP recipe (bsp-linux, bsp-so3) and stays +# capsule-agnostic. AVZ is part of the boot chain by design — the +# hypervisor runs underneath every capsule, and its ITB is identical +# regardless of which capsule sits on top. +# +# Per-platform bootloader assembly lives in bsp_.inc as +# __do_platform_boot_chain(d). The AVZ ITB build is generic: mkimage on +# ${IB_DIR}/linux/images/${IB_PLATFORM}_avz.its. + +# Boot-chain dependencies gate on IB_BOOT_CHAIN: +# "uboot" → only u-boot (no ATF, OP-TEE, AVZ pulled in) +# "atf+uboot" → ATF + u-boot, no OP-TEE, no AVZ +# "full" → ATF + OP-TEE + u-boot + AVZ (capsule builds) +# +# Deps are wired into BOTH do_build (so `build.sh -a` actually compiles +# every source artefact) AND do_deploy_boot_chain (so a standalone +# `deploy.sh -a` without a prior build still pulls them through sstate). + +do_deploy_boot_chain[nostamp] = "1" +do_deploy_boot_chain[depends] = "uboot:do_build" + +python () { + chain = d.getVar('IB_BOOT_CHAIN') or "" + extra = [] + if chain in ("atf+uboot", "full"): + extra.append("atf:do_build") + if chain == "full": + extra += ["optee:do_build", "avz:do_build"] + if extra: + deps = ' ' + ' '.join(extra) + d.appendVarFlag('do_deploy_boot_chain', 'depends', deps) + d.appendVarFlag('do_build', 'depends', deps) +} + +python do_deploy_boot_chain () { + plat = d.getVar('IB_PLATFORM') or '?' + chain = d.getVar('IB_BOOT_CHAIN') or '?' + bb.plain(f"Deploy boot chain for platform {plat} (chain={chain})") + + try: + __do_platform_boot_chain(d) + except NameError: + bb.note(f"No __do_platform_boot_chain defined for {plat} — skipping") + + # The AVZ ITB is produced by per-platform do_itb + # (bsp_.inc) which is wired `before do_build`, so they + # exist by the time do_deploy_boot_chain runs. +} +addtask do_deploy_boot_chain before do_deploy + def __do_deploy_boot(d): - if d.getVar('IB_STORAGE') != "remote": - bb.warn("Now mounting") + if d.getVar('IB_STORAGE_MODE') not in ("remote", "http"): + # Make deploy depend on an initialised storage. In "soft" mode this + # creates sdcard.img. on the fly when it is missing (the + # same work as scripts/init_storage.sh), so a fresh tree can deploy + # without a separate manual init step. deploy.sh already opened a + # sudo session, so the losetup/mkfs done here via `sudo -n` succeeds. + __do_fs_check(d) + bb.plain("Mounting storage") __do_fs_mount(d) __do_platform_deploy(d) - if d.getVar('IB_STORAGE') != "remote": + if d.getVar('IB_STORAGE_MODE') not in ("remote", "http"): __do_fs_umount(d) - - utils_restore_user_ownership(d) diff --git a/build/meta-bsp/conf/layer.conf b/build/meta-bsp/conf/layer.conf index a97103b..b333c69 100644 --- a/build/meta-bsp/conf/layer.conf +++ b/build/meta-bsp/conf/layer.conf @@ -1,3 +1,6 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + BBPATH .= ":${LAYERDIR}" BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend" diff --git a/build/meta-bsp/recipes-bsp/bsp/files/bsp_arm_common.inc b/build/meta-bsp/recipes-bsp/bsp/files/bsp_arm_common.inc index 138ced3..27fe7f5 100644 --- a/build/meta-bsp/recipes-bsp/bsp/files/bsp_arm_common.inc +++ b/build/meta-bsp/recipes-bsp/bsp/files/bsp_arm_common.inc @@ -1,24 +1,56 @@ - -# Deployment of ITB for all ARM platforms +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + +# Deployment of ITB for all ARM platforms (FAT boot partition p1). +# +# Two deployment shapes, selected by the chosen ITS: +# * AVZ two-ITB boot (IB_TARGET_ITS ends in "_avz"): stage the AVZ ITB +# (_avz.itb) AND the SO3 guest ITB (_guest.itb) plus the +# uEnv__avz.txt that loads both and jumps via U-Boot's guest-boot +# command (AVZ FIT in x0, guest ITB in x1). The guest ITB is derived +# from IB_TARGET_ITS: _so3_guest.itb. +# * Single-ITB bootm (any other ITS): the standalone SO3 / Linux image. def __deploy_arm_common(d): import os import subprocess + p1 = d.getVar('IB_FILESYSTEM_PATH') + "/p1" + itb_dir = d.getVar('IB_ITB_PATH') + plat = d.getVar('IB_PLATFORM') + its = d.getVar('IB_TARGET_ITS') or "" IB_UENV = d.getVar("IB_UENV") - filesys_path = d.getVar('IB_FILESYSTEM_PATH') + "/p1" - itb_path = d.getVar('IB_ITB_PATH') + "/" + d.getVar('IB_TARGET_ITS') + ".itb" + + if its.endswith("_avz"): + # Two-ITB AVZ boot. The guest ITB basename is OS-specific + # (_so3_guest for SO3, _linux_guest for the Linux agency). + guest_suffix = d.getVar('IB_GUEST_SUFFIX') or "_so3_guest" + avz_itb = f"{itb_dir}/{its}.itb" + guest_itb = f"{itb_dir}/{its[:-len('_avz')]}{guest_suffix}.itb" + avz_uenv = os.path.join(os.path.dirname(IB_UENV), f"uEnv_{plat}_avz.txt") + + for f in (avz_itb, guest_itb, avz_uenv): + if not os.path.isfile(f): + bb.fatal(f + " is missing ...") + + subprocess.run(['cp', avz_uenv, p1 + "/uEnv.txt"], check=True) + subprocess.run(['cp', avz_itb, f"{p1}/{plat}_avz.itb"], check=True) + subprocess.run(['cp', guest_itb, f"{p1}/{plat}_guest.itb"], check=True) + return + + # Single-ITB bootm. + itb_path = f"{itb_dir}/{its}.itb" if not os.path.isfile(IB_UENV): - bb.fatal(uenv_path + " is missing ...") + bb.fatal(IB_UENV + " is missing ...") - subprocess.run(['cp', IB_UENV, filesys_path + "/uEnv.txt"]) + subprocess.run(['cp', IB_UENV, p1 + "/uEnv.txt"]) if not os.path.isfile(itb_path): bb.fatal(itb_path + " is missing ...") # The target ITB loaded by U-boot has the name of the target platform - subprocess.run(['cp', itb_path, filesys_path + "/" + d.getVar('IB_PLATFORM') + ".itb"]) + subprocess.run(['cp', itb_path, p1 + "/" + plat + ".itb"]) do_build_firmware () { diff --git a/build/meta-bsp/recipes-bsp/bsp/files/bsp_rpi4.inc b/build/meta-bsp/recipes-bsp/bsp/files/bsp_rpi4.inc index 022b298..0ff5221 100644 --- a/build/meta-bsp/recipes-bsp/bsp/files/bsp_rpi4.inc +++ b/build/meta-bsp/recipes-bsp/bsp/files/bsp_rpi4.inc @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD # Deployment on RPi4 (32-bit) platform @@ -19,4 +21,4 @@ def __do_platform_deploy(d): cmd = f"cp -${u_boot_path}/u-boot.bin ${dst_dir}/p1/kernel7.img" result = subprocess.run(cmd, shell=True, check=True) - \ No newline at end of file + diff --git a/build/meta-bsp/recipes-bsp/bsp/files/bsp_rpi4_64.inc b/build/meta-bsp/recipes-bsp/bsp/files/bsp_rpi4_64.inc index 8773116..aed40d5 100644 --- a/build/meta-bsp/recipes-bsp/bsp/files/bsp_rpi4_64.inc +++ b/build/meta-bsp/recipes-bsp/bsp/files/bsp_rpi4_64.inc @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD # Deployment on RPi4_64 (64-bit) platform @@ -15,6 +17,13 @@ def __do_platform_deploy(d): uboot_path = d.getVar('IB_UBOOT_PATH') run(f"cp -r {filedirname}/../bsp/rpi4/* {dst}/p1") + + # bsp/rpi4/config.txt is shared with the 32-bit BSP and deliberately holds + # no arm_64bit/kernel setting; append the 64-bit half of the chain. + # FILE_DIRNAME is the *recipe's* directory (recipes-bsp/so3), not this + # include's — hence the ../bsp hop, as in the copy above. + run(f"cat {filedirname}/../bsp/files/config_rpi4_arm64.txt >> {dst}/p1/config.txt") + run(f"cp {uboot_path}/u-boot.bin {dst}/p1/kernel8.img") __deploy_arm_common(d) diff --git a/build/meta-bsp/recipes-bsp/bsp/files/bsp_verdin-imx8mp.inc b/build/meta-bsp/recipes-bsp/bsp/files/bsp_verdin-imx8mp.inc index d0554e9..e6ceb8e 100644 --- a/build/meta-bsp/recipes-bsp/bsp/files/bsp_verdin-imx8mp.inc +++ b/build/meta-bsp/recipes-bsp/bsp/files/bsp_verdin-imx8mp.inc @@ -1,257 +1,199 @@ - -# Recipe to deploy on the specific Toradex Verdin iMX8 MP board - -def modify_image_json(input_file, output_file, files_to_add=None): +# Copyright (c) 2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD +# +# Toradex Verdin iMX8MP platform glue for SO3-as-an-AVZ-guest. It runs no +# TorizonOS / capsule userspace; the Toradex TEZI image is fetched only to +# obtain the imx-boot firmware (see __fetch_torizon_tezi_image below). +# +# Boot image: do_itb (bsp-so3) mkimage's two ITBs — the AVZ ITB +# (verdin_imx8mp_avz.its = AVZ + avz_dt) and the SO3 guest ITB +# (verdin_imx8mp_so3_guest.its = guest + dtb + rootfs.fat). The firmware +# imx-boot (flash.bin = SPL + ATF(BL31) + OP-TEE + U-Boot) is built by the +# uboot recipe. +# +# Deploy: assemble a Toradex TEZI image set (the official base image provides +# image.json + the partition layout; we replace imx-boot with our flash.bin and +# add a boot.scr that loads both ITBs and jumps via the guest-boot U-Boot command). +# For SO3 standalone (non-AVZ ITS) a single ITB is staged and bootm'd instead. +# No capsule / OSTree rootfs — SO3's rootfs rides inside the guest ITB. + +# Path to the SO3 boot scripts and the U-Boot bootcmd that sources them. +# boot.scr.txt single-ITB bootm (SO3 standalone) +# boot_avz.scr.txt two-ITB AVZ boot (AVZ ITB + SO3 guest ITB via guest-boot) +IB_VERDIN_BOOTSCR = "${IB_DIR}/build/meta-bsp/recipes-bsp/bsp/verdin-imx8mp/boot.scr.txt" +IB_VERDIN_BOOTSCR_AVZ = "${IB_DIR}/build/meta-bsp/recipes-bsp/bsp/verdin-imx8mp/boot_avz.scr.txt" +IB_VERDIN_BOOTCMD = "mmc dev 2; ext4load mmc 2:1 0x48200000 /boot.scr; source 0x48200000" + +# Official Toradex TEZI image used as the deploy base (provides image.json + +# the eMMC partition layout). scarthgap-7.x.y release 36, verdin-imx8mp. +IB_TORIZON_TEZI_URL = "https://tezi.toradex.com/artifactory/torizoncore-oe-prod-frankfurt/scarthgap-7.x.y/release/36/verdin-imx8mp/torizon/torizon-docker-evaluation/teziimage/TDX1ba81320635b006931a43b5700e5492aTDX" +IB_TORIZON_TEZI_VERSION = "7.6.0+build.36" +IB_TORIZON_TEZI_FILES = "image.json imx-boot u-boot-initial-env-sd" +IB_TORIZON_TEZI_CACHE = "${IB_DIR}/build/tmp/torizon-tezi" + + +def __do_platform_boot_chain(d): + """imx-boot (flash.bin) is built by the uboot recipe and staged by the + deploy step below — nothing to assemble here (unlike the QEMU flash0.img).""" + bb.note("verdin: boot chain (imx-boot) is built by the uboot recipe") + + +# Trim the Toradex image.json to auto-install our files onto the boot/rootfs +# partition (no capsule, no OSTree rootfs tarball). +def modify_image_json(input_file, output_file, files_to_add): import json - import sys - """ - Modify image.json to add filelist and set autoinstall to true - - Args: - input_file: Path to input image.json - output_file: Path to output image.json - files_to_add: List of files to add to filelist (default: verdin-imx8mp.itb, boot.scr) - """ - if files_to_add is None: - files_to_add = ["verdin-imx8mp.itb", "boot.scr"] - - # Read the original JSON + with open(input_file, 'r') as f: data = json.load(f) - # Set autoinstall to true data['autoinstall'] = True - # Navigate to the partition content and add filelist - for blockdev in data.get('blockdevs', []): - if blockdev.get('name') == 'emmc': - for partition in blockdev.get('partitions', []): - content = partition.get('content', {}) - if content.get('label') == 'otaroot': - # Add filelist to content - content['filelist'] = files_to_add - print(f"Added filelist: {files_to_add}") - - # Write the modified JSON - with open(output_file, 'w') as f: - json.dump(data, f, indent=4) - - print(f"Modified JSON written to: {output_file}") - -def parse_overlays_file(overlays_file): - import re - """Parse overlays.txt and extract overlay file names""" - with open(overlays_file, 'r') as f: - content = f.read().strip() - - # Extract the overlay names from fdt_overlays=overlay1.dtbo overlay2.dtbo - match = re.search(r'fdt_overlays\s*=\s*(.+)', content) - if not match: - print("Error: No fdt_overlays line found in overlays.txt") - return [] - - overlays = match.group(1).strip().split() - return overlays - - -def generate_overlay_entries(overlays, overlays_path, base_load_addr=0x52200000): - """Generate ITS entries for each overlay""" - entries = [] - - for idx, overlay in enumerate(overlays): - overlay_name = overlay.replace('.dtbo', '').replace('_overlay', '') - entry = f''' - fdt-{idx} {{ - description = "{overlay_name} overlay"; - data = /incbin/("{overlays_path}/{overlay}"); - type = "flat_dt"; - arch = "arm64"; - compression = "none"; - load = <{hex(base_load_addr)}>; - }};''' - entries.append(entry) - - return '\n'.join(entries) - - -def generate_fdt_list(overlays): - """Generate the FDT list for configuration section""" - fdt_refs = ['fdt_linux'] + [f'fdt-{idx}' for idx in range(len(overlays))] - return ', '.join(f'"{ref}"' for ref in fdt_refs) - + # Drop Torizon-only metadata that references files we don't ship. + for field in ('prepare_script', 'wrapup_script', 'marketing', 'icon'): + data.pop(field, None) -def process_its_template(template_file, output_file, overlays_file, overlays_path): - import sys - import re - from pathlib import Path - - # Parse overlays - overlays = parse_overlays_file(overlays_file) + for blockdev in data.get('blockdevs', []): + if blockdev.get('name') != 'emmc': + continue + for partition in blockdev.get('partitions', []): + content = partition.get('content', {}) + if content.get('label') == 'otaroot': + # rootfs is embedded in the ITB initramfs — no tarball. + content.pop('filename', None) + content.pop('uncompressed_size', None) + content['filelist'] = files_to_add + break - if not overlays: - print("Warning: No overlays found, generating ITS without overlays") - else: - print(f"Found {len(overlays)} overlays: {', '.join(overlays)}") - - # Read template - with open(template_file, 'r') as f: - template_content = f.read() - - # Generate overlay entries - overlay_entries = generate_overlay_entries(overlays, overlays_path) - - # Replace placeholder with overlay entries - modified_content = re.sub( - r'/\* FDT_OVERLAYS_PLACEHOLDER_START \*/.*?/\* FDT_OVERLAYS_PLACEHOLDER_END \*/', - f'/* FDT_OVERLAYS_PLACEHOLDER_START */{overlay_entries}\n\t\t/* FDT_OVERLAYS_PLACEHOLDER_END */', - template_content, - flags=re.DOTALL - ) - - # Update FDT configuration - if overlays: - fdt_list = generate_fdt_list(overlays) - # Replace the simple fdt line with the expanded list - modified_content = re.sub( - r'(\s+)fdt = "fdt_linux";', - f'\\1fdt = {fdt_list};', - modified_content - ) - - # Write output with open(output_file, 'w') as f: - f.write(modified_content) - - print(f"Generated ITS file: {output_file}") - print(f"Overlays included: {len(overlays)}") + json.dump(data, f, indent=4) -def do_itb_verdin_imx8mp(d): - """Generate ITB with overlays""" - import subprocess +def __fetch_torizon_tezi_image(d, dest_dir): + """Download the Toradex TEZI base files for this platform into dest_dir, + caching under IB_TORIZON_TEZI_CACHE// (re-fetch only if missing or + size-mismatched).""" import os + import subprocess + import urllib.request - IB_PLATFORM = d.getVar("IB_PLATFORM") - IB_ITB_PATH = d.getVar("IB_ITB_PATH") - IB_TARGET_ITS = d.getVar("IB_TARGET_ITS") or f"{IB_PLATFORM}_torizon" - IB_TORIZON_DIR_PATH = d.getVar("IB_TORIZON_DIR_PATH") - - # Get the base directory for deploy images - DEPLOY_DIR_IMAGE = f"{IB_TORIZON_DIR_PATH}/build/deploy/images/{IB_PLATFORM}" + base_url = d.getVar("IB_TORIZON_TEZI_URL") + version = d.getVar("IB_TORIZON_TEZI_VERSION") or "unversioned" + files = (d.getVar("IB_TORIZON_TEZI_FILES") or "").split() + cache_root = d.getVar("IB_TORIZON_TEZI_CACHE") - # Paths for overlays - overlays_path = f"{DEPLOY_DIR_IMAGE}/overlays" - overlays_txt_path = f"{DEPLOY_DIR_IMAGE}/overlays.txt" + if not base_url or not files or not cache_root: + bb.fatal("verdin: IB_TORIZON_TEZI_URL/FILES/CACHE must be set to fetch the TEZI base image") - its_template = f"{IB_ITB_PATH}/{IB_TARGET_ITS}.its" - its_output = f"{IB_ITB_PATH}/{IB_TARGET_ITS}_generated.its" - itb_output = f"{IB_ITB_PATH}/{IB_TARGET_ITS}.itb" + cache_dir = os.path.join(cache_root, version) + os.makedirs(cache_dir, exist_ok=True) + os.makedirs(dest_dir, exist_ok=True) - # Check if template exists - if not os.path.isfile(its_template): - bb.fatal(f"No corresponding ITS found for platform {IB_PLATFORM}_torizon at {its_template}") + for fname in files: + url = f"{base_url}/{fname}" + cached = os.path.join(cache_dir, fname) - # Check if overlays.txt exists - if os.path.isfile(overlays_txt_path): - # Process the template with overlays - process_its_template(its_template, its_output, overlays_txt_path, overlays_path) - its_to_use = its_output - else: - bb.warn(f"No overlays.txt found at {overlays_txt_path}, building ITB without overlays") - its_to_use = its_template + remote_size = None + try: + req = urllib.request.Request(url, method="HEAD") + with urllib.request.urlopen(req, timeout=30) as resp: + cl = resp.headers.get("Content-Length") + remote_size = int(cl) if cl else None + except Exception as e: + bb.warn(f"HEAD {url} failed: {e} (will attempt download anyway)") - # Build the ITB - try: - subprocess.run( - ["mkimage", "-f", its_to_use, itb_output], - check=True, - capture_output=True, - text=True - ) - except subprocess.CalledProcessError as e: - bb.fatal(f"Failed to create ITB: {e.stderr}") + if not (os.path.isfile(cached) and (remote_size is None or os.path.getsize(cached) == remote_size)): + bb.note(f"Fetching {url} -> {cached}") + subprocess.run(["curl", "-fSL", "--retry", "3", "-o", cached, url], check=True) + subprocess.run(["cp", cached, os.path.join(dest_dir, fname)], check=True) def __do_platform_deploy(d): - + """Stage a flashable TEZI image: our imx-boot (flash.bin) + boot.scr + the + AVZ+SO3 ITB, with image.json patched to auto-install them.""" + import json import os import subprocess - IB_UBOOT_PATH = d.getVar("IB_UBOOT_PATH") - IB_DIR = d.getVar("IB_DIR") - IB_PLATFORM = d.getVar("IB_PLATFORM") - IB_ITB_PATH = d.getVar("IB_ITB_PATH") - IB_BSP_PATH = d.getVar("IB_BSP_PATH") - IB_FILESYSTEM_PATH = d.getVar("IB_FILESYSTEM_PATH") - IB_TORIZON_DIR_PATH = d.getVar("IB_TORIZON_DIR_PATH") - DEPLOY_DIR_IMAGE = f"{IB_TORIZON_DIR_PATH}/build/deploy/images/{IB_PLATFORM}" - - torizon_rootfs_ar_path = __torizon_rootfs_archive_path(d) - tezi_img_name = f"torizon-docker-{IB_PLATFORM}-Tezi" - tezi_ar_name = f"torizon-docker-{IB_PLATFORM}-Tezi.tar" - tezi_ar_path = f"{DEPLOY_DIR_IMAGE}/{tezi_ar_name}" - itb_path = f"{IB_ITB_PATH}/{IB_PLATFORM}.itb" - boot_edgem_scr_txt_path = f"{IB_BSP_PATH}/{IB_PLATFORM}/boot.edgem.scr.txt" - bootcmd_txt_path = f"{IB_BSP_PATH}/{IB_PLATFORM}/bootcmd.txt" - deploy_path = f"{IB_FILESYSTEM_PATH}/work/usb" - - #if not os.path.exists(deploy_path): - # subprocess.run(["mkdir", "-p", deploy_path]) - - cmd = (f"tar -tf {torizon_rootfs_ar_path} | grep ^\./ostree/boot.1.1 | " - f"grep -o /[a-f0-9]*/$ | sed 's/\///g\'") - - res = subprocess.run(cmd, shell=True, capture_output=True, text=True) - deployment_id = res.stdout.strip() - - if not os.path.isfile(itb_path): - bb.fatal(itb_path + " is missing ...") - - # Read our custom bootcmd line to be appended to the initial env later - with open(bootcmd_txt_path) as bootcmd_txt_file: - bootcmd_txt_content = bootcmd_txt_file.read() - bootcmd_txt_file.close() - - # Copy the TEZI ready image tar to the deploy folder - tezi_ar_deployed_path = f"{deploy_path}/{tezi_ar_name}" - tezi_deployed_path = f"{deploy_path}/{tezi_img_name}" - subprocess.run(["cp", tezi_ar_path, deploy_path]) - - # Extract the tar into a known folder - if not os.path.exists(tezi_deployed_path): - subprocess.run(["mkdir", "-p", tezi_deployed_path]) - subprocess.run(["tar", "-p", "-xf", tezi_ar_deployed_path, "-C", tezi_deployed_path, "--strip-components=1"]) - - # Copy the custom ITB - subprocess.run(["cp", itb_path, tezi_deployed_path]) - - # Copy u-boot's flash.bin to the deploy path as imx-boot - flash_bin_path = f"{IB_UBOOT_PATH}/flash.bin" - imx_boot_path = f"{tezi_deployed_path}/imx-boot" - subprocess.run(["cp", flash_bin_path, imx_boot_path]) - - # Directly convert the text based boot.scr into the deploy partition - subprocess.run(["mkimage", "-A", "arm64", "-T", "script", "-C", "none", "-d", boot_edgem_scr_txt_path, f"{tezi_deployed_path}/boot.edgem.scr"]) - - # Add our custom bootcmd at the end of the initial env to be imported by TEZI - try: - with open(f"{tezi_deployed_path}/u-boot-initial-env-sd", "a+") as dest_init_env_file: - dest_init_env_file.write(bootcmd_txt_content) - except Exception as e: - __do_fs_umount(d) - bb.fatal(f"An error has occurred: {e}") + IB_ITB_PATH = d.getVar('IB_ITB_PATH') + IB_UBOOT_PATH = d.getVar('IB_UBOOT_PATH') + IB_TARGET_ITS = d.getVar('IB_TARGET_ITS') + IB_STORAGE_MODE = d.getVar('IB_STORAGE_MODE') or "" + WORKDIR = d.getVar('WORKDIR') + + itb = f"{IB_ITB_PATH}/{IB_TARGET_ITS}.itb" + flashbin = f"{IB_UBOOT_PATH}/flash.bin" + if not os.path.isfile(itb): + bb.fatal(f"verdin: ITB not found at {itb} (run do_itb first)") + if not os.path.isfile(flashbin): + bb.fatal(f"verdin: imx-boot (flash.bin) not found at {flashbin} (build uboot first)") + + staging = os.path.join(WORKDIR, "tezi-staging") + os.makedirs(staging, exist_ok=True) + + # Base TEZI image (image.json + the stock imx-boot/env we overwrite). + __fetch_torizon_tezi_image(d, staging) + + # Our firmware, boot script and ITB(s). + # * AVZ two-ITB boot (ITS ends in "_avz"): stage the AVZ ITB as + # boot_avz.itb and the SO3 guest ITB (derived _so3_guest) + # as boot_guest.itb; boot_avz.scr.txt loads both and jumps via guest-boot. + # * Single-ITB bootm (any other ITS): stage it as boot.itb. + subprocess.run(['cp', flashbin, f"{staging}/imx-boot"], check=True) + + if IB_TARGET_ITS.endswith("_avz"): + guest_itb = f"{IB_ITB_PATH}/{IB_TARGET_ITS[:-len('_avz')]}_so3_guest.itb" + if not os.path.isfile(guest_itb): + bb.fatal(f"verdin: guest ITB not found at {guest_itb} (run do_itb first)") + subprocess.run(['cp', itb, f"{staging}/boot_avz.itb"], check=True) + subprocess.run(['cp', guest_itb, f"{staging}/boot_guest.itb"], check=True) + bootscr_src = d.getVar('IB_VERDIN_BOOTSCR_AVZ') + files_to_add = ["boot.scr", "boot_avz.itb", "boot_guest.itb"] + else: + subprocess.run(['cp', itb, f"{staging}/boot.itb"], check=True) + bootscr_src = d.getVar('IB_VERDIN_BOOTSCR') + files_to_add = ["boot.scr", "boot.itb"] - # Modify the image.json to enable autoinstall and add our custom files - image_json_path = f"{tezi_deployed_path}/image.json" - itb_file = f"{IB_PLATFORM}.itb" - files_to_add = [itb_file, "boot.edgem.scr"] - modify_image_json(image_json_path, image_json_path, files_to_add) + subprocess.run(['mkimage', '-A', 'arm64', '-T', 'script', '-C', 'none', + '-d', bootscr_src, f"{staging}/boot.scr"], check=True) - # Finally, remove the base archive - subprocess.run(["rm", tezi_ar_deployed_path]) + # U-Boot env: bootcmd sources boot.scr (text format, as TEZI imports it). + with open(f"{staging}/u-boot-initial-env-sd", "w") as f: + f.write(f"bootcmd={d.getVar('IB_VERDIN_BOOTCMD')}\nbootdelay=1\n") + modify_image_json(f"{staging}/image.json", f"{staging}/image.json", + files_to_add=files_to_add) -python do_itb() { - do_itb_verdin_imx8mp(d) -} \ No newline at end of file + if IB_STORAGE_MODE == "http": + final_dest = d.getVar('IB_HTTP_DEPLOY_PATH') + else: + final_dest = os.path.join(d.getVar('IB_FILESYSTEM_PATH'), "work", "verdin-tezi") + if not final_dest: + bb.fatal("verdin: no deploy destination (set IB_HTTP_DEPLOY_PATH or use the default)") + + # TEZI feed index. Written next to image.json so the feed directory is + # self-contained: whatever serves it (scripts/tezi-feed-serve.sh, or a + # web server on another machine) can use it as its document root, and + # the board's feed URL is always /image_list.json. Kept relative + # for the same reason — no absolute path, no directory prefix. + with open(f"{staging}/image_list.json", "w") as f: + json.dump({"config_format": 1, + "autoinstall": "image.json", + "images": ["image.json"]}, f, indent=4) + + # Publish. The default IB_HTTP_DEPLOY_PATH lives inside the tree and is + # owned by the calling user, so no privilege is needed; a site.conf that + # points somewhere root-owned (e.g. a web server document root) still + # works through the sudo fallback. + try: + os.makedirs(final_dest, exist_ok=True) + subprocess.run(["rsync", "-a", "--delete", + f"{staging}/", f"{final_dest}/"], check=True) + except (PermissionError, subprocess.CalledProcessError) as e: + bb.note(f"publishing to {final_dest} unprivileged failed ({e}); retrying with sudo") + utils_sudo(["mkdir", "-p", final_dest], check=True) + utils_sudo(["rsync", "-a", "--delete", + f"{staging}/", f"{final_dest}/"], check=True) + + bb.plain("verdin: TEZI image staged at %s (imx-boot + boot.scr + ITB(s) for %s)" + % (final_dest, IB_TARGET_ITS)) diff --git a/build/meta-bsp/recipes-bsp/bsp/files/bsp_virt32.inc b/build/meta-bsp/recipes-bsp/bsp/files/bsp_virt32.inc index 744b537..0dbc161 100644 --- a/build/meta-bsp/recipes-bsp/bsp/files/bsp_virt32.inc +++ b/build/meta-bsp/recipes-bsp/bsp/files/bsp_virt32.inc @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD require bsp_arm_common.inc diff --git a/build/meta-bsp/recipes-bsp/bsp/files/bsp_virt64.inc b/build/meta-bsp/recipes-bsp/bsp/files/bsp_virt64.inc index 3a750ce..de39d91 100644 --- a/build/meta-bsp/recipes-bsp/bsp/files/bsp_virt64.inc +++ b/build/meta-bsp/recipes-bsp/bsp/files/bsp_virt64.inc @@ -1,63 +1,87 @@ -require bsp_arm_common.inc - -do_itb () { - if [ ! -f ${IB_ITB_PATH}/${IB_TARGET_ITS}.its ]; then - bbfatal "${IB_DIR} No corresponding ITS found for platform ${IB_PLATFORM} ${IB_ITB_PATH}/${IB_TARGET_ITS}.its" - else - mkimage -f ${IB_ITB_PATH}/${IB_TARGET_ITS}.its ${IB_ITB_PATH}/${IB_TARGET_ITS}.itb - fi -} +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD +# +# virt64 (QEMU armv8) platform glue. The ITB and uEnv.txt are copied onto +# the boot partition (p1) by __deploy_arm_common (bsp_arm_common.inc). +# __do_platform_boot_chain assembles the optional ATF/OP-TEE firmware +# (flash0.img) — generic and product-agnostic. Any capsule/OSTree +# specifics live in a downstream layer, not here. +require bsp_arm_common.inc def __do_platform_deploy(d): + # Both shapes (two-ITB AVZ boot when the ITS ends in "_avz", single-ITB + # bootm otherwise) are handled generically by __deploy_arm_common. + __deploy_arm_common(d) + + +def __do_platform_boot_chain(d): + """Assemble the virt64 QEMU boot firmware in ${IB_DIR}/filesystem/. + + Selected by IB_BOOT_CHAIN (see local.conf): + "" / "uboot" bare U-Boot — no flash0.img. The QEMU launcher boots + U-Boot directly (st.sh: -kernel u-boot, EL1 standalone + or EL2/virtualization=on for the avz ITS). Any stale + flash0.img is removed so the launcher picks the bare + path. + "atf+uboot" flash0.img = BL1 @ 0 + FIP @ 256K, FIP = BL2 + BL31 + + U-Boot (no OP-TEE). ATF gives EL3 -> EL2. + "full" flash0.img = BL1 + FIP[BL2 + BL31 + OP-TEE(3-part) + + U-Boot] — secure world (S-EL1 OP-TEE). + Invoked from bsp.bbclass:do_deploy_boot_chain (which has already pulled + in atf/optee builds when the chain requires them).""" + import os import subprocess - - print("Platorm " + d.getVar('IB_PLATFORM')) - - ovrs = (d.getVar('OVERRIDES') or '').replace(' ', '').split(':') - - # Are we in Torizon recipes? - if 'torizon' not in ovrs: - - __deploy_arm_common(d) - - else: - - IB_UBOOT_PATH = d.getVar("IB_UBOOT_PATH") - IB_PLATFORM = d.getVar("IB_PLATFORM") - IB_ITB_PATH = d.getVar("IB_ITB_PATH") - IB_FILESYSTEM_PATH = d.getVar("IB_FILESYSTEM_PATH") - IB_UENV = d.getVar("IB_UENV") - - torizon_rootfs_ar_path = __torizon_rootfs_archive_path(d) - filesys_path = f"{IB_FILESYSTEM_PATH}/p1" - itb_path = f"{IB_ITB_PATH}/{IB_PLATFORM}.itb" - - cmd = (f"tar -tf {torizon_rootfs_ar_path} | grep ^\./ostree/boot.1.1 | " - f"grep -o /[a-f0-9]*/$ | sed 's/\///g\'") - - res = subprocess.run(cmd, shell=True, capture_output=True, text=True) - deployment_id = res.stdout.strip() - - if not os.path.isfile(IB_UENV): - bb.fatal(IB_UENV + " is missing ...") - - # Read the uEnv file perform the substitution - with open(IB_UENV) as uenv_file: - uenv_content = uenv_file.read() - uenv_file.close() - - uenv_content = uenv_content.replace("${OSTREE_DEPLOYMENT_ID}", deployment_id) - - if not os.path.isfile(itb_path): - bb.fatal(itb_path + " is missing ...") - - try: - with open(f"{filesys_path}/uEnv.txt", "w") as dest_uenv_file: - dest_uenv_file.write(uenv_content) - - except Exception as e: - __do_fs_umount(d) - bb.fatal(f"An error has occurred: {e}") - subprocess.run(["cp", itb_path, filesys_path]) + chain = d.getVar('IB_BOOT_CHAIN') or "" + uboot_path = d.getVar('IB_UBOOT_PATH') + fs_dir = os.path.join(d.getVar('IB_DIR'), "filesystem") + os.makedirs(fs_dir, exist_ok=True) + + flash_path = os.path.join(fs_dir, "flash0.img") + + # U-Boot is needed in every mode (as -kernel/-bios payload, and as the + # FIP's BL33 in the ATF chains). + subprocess.run(['cp', f"{uboot_path}/u-boot.bin", + os.path.join(fs_dir, "u-boot.bin")], check=True) + + if chain in ("", "uboot"): + # Bare U-Boot: drop any stale flash0.img from a prior ATF deploy. + if os.path.exists(flash_path): + os.remove(flash_path) + return + + # ATF chains: build flash0.img. "atf+uboot" and "full" differ only by + # whether the FIP carries the OP-TEE (BL32) entries. + atf_path = d.getVar('IB_ATF_PATH') + atf_release = f"{atf_path}/build/qemu/release" + subprocess.run(['cp', f"{atf_release}/bl31.bin", + os.path.join(fs_dir, "bl31.bin")], check=True) + + fip_args = [ + '--tb-fw', f'{atf_release}/bl2.bin', + '--soc-fw', f'{atf_release}/bl31.bin', + '--nt-fw', f'{uboot_path}/u-boot.bin', + ] + + if chain == "full": + optee_core = f"{d.getVar('IB_OPTEE_PATH')}/out/arm-plat-vexpress/core" + for src, name in [ + (f"{optee_core}/tee-header_v2.bin", "tee-header_v2.bin"), + (f"{optee_core}/tee-pager_v2.bin", "tee-pager_v2.bin"), + (f"{optee_core}/tee-pageable_v2.bin", "tee-pageable_v2.bin"), + ]: + subprocess.run(['cp', src, os.path.join(fs_dir, name)], check=True) + fip_args += [ + '--tos-fw', f'{optee_core}/tee-header_v2.bin', + '--tos-fw-extra1', f'{optee_core}/tee-pager_v2.bin', + '--tos-fw-extra2', f'{optee_core}/tee-pageable_v2.bin', + ] + + fiptool = f"{atf_path}/tools/fiptool/fiptool" + fip_path = os.path.join(fs_dir, "fip.bin") + subprocess.run([fiptool, 'create'] + fip_args + [fip_path], check=True) + + subprocess.run(['dd', 'if=/dev/zero', f'of={flash_path}', 'bs=1M', 'count=64'], check=True) + subprocess.run(['dd', f'if={atf_release}/bl1.bin', f'of={flash_path}', 'conv=notrunc'], check=True) + subprocess.run(['dd', f'if={fip_path}', f'of={flash_path}', 'bs=1k', 'seek=256', 'conv=notrunc'], check=True) diff --git a/build/meta-bsp/recipes-bsp/bsp/files/bsp_x86-qemu.inc b/build/meta-bsp/recipes-bsp/bsp/files/bsp_x86-qemu.inc index 70db929..0bd6d48 100644 --- a/build/meta-bsp/recipes-bsp/bsp/files/bsp_x86-qemu.inc +++ b/build/meta-bsp/recipes-bsp/bsp/files/bsp_x86-qemu.inc @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD # Deployment on a QEMU/x86 PC compatible platform diff --git a/build/meta-bsp/recipes-bsp/bsp/files/config_rpi4_arm32.txt b/build/meta-bsp/recipes-bsp/bsp/files/config_rpi4_arm32.txt new file mode 100644 index 0000000..3526a07 --- /dev/null +++ b/build/meta-bsp/recipes-bsp/bsp/files/config_rpi4_arm32.txt @@ -0,0 +1,7 @@ + +# --- 32-bit boot chain (appended by bsp_rpi4.inc) --- +# The deploy installs the arm32 U-Boot as kernel7l.img. arm_64bit=0 is the +# firmware default, but state both explicitly so the loaded file never depends +# on the firmware's 32/64-bit filename default. +arm_64bit=0 +kernel=kernel7l.img diff --git a/build/meta-bsp/recipes-bsp/bsp/files/config_rpi4_arm64.txt b/build/meta-bsp/recipes-bsp/bsp/files/config_rpi4_arm64.txt new file mode 100644 index 0000000..11a03f0 --- /dev/null +++ b/build/meta-bsp/recipes-bsp/bsp/files/config_rpi4_arm64.txt @@ -0,0 +1,9 @@ + +# --- 64-bit boot chain (appended by bsp_rpi4_64.inc) --- +# The deploy installs the aarch64 U-Boot as kernel8.img. This firmware +# (bcm2711, Aug 2021) defaults arm_64bit to 0, so without this it starts the +# cores in 32-bit mode and looks for kernel7l.img, never finds it, and boots +# nothing at all — no serial output whatsoever. kernel= is stated explicitly so +# the loaded file never depends on the firmware's filename default. +arm_64bit=1 +kernel=kernel8.img diff --git a/build/meta-bsp/recipes-bsp/bsp/imx8_colibri/mx8qxc0-ahab-container.img b/build/meta-bsp/recipes-bsp/bsp/imx8_colibri/mx8qxc0-ahab-container.img new file mode 100644 index 0000000..73d28d4 Binary files /dev/null and b/build/meta-bsp/recipes-bsp/bsp/imx8_colibri/mx8qxc0-ahab-container.img differ diff --git a/build/meta-bsp/recipes-bsp/bsp/rpi4/config.txt b/build/meta-bsp/recipes-bsp/bsp/rpi4/config.txt index 4161991..002f7c7 100644 --- a/build/meta-bsp/recipes-bsp/bsp/rpi4/config.txt +++ b/build/meta-bsp/recipes-bsp/bsp/rpi4/config.txt @@ -58,10 +58,31 @@ dtparam=audio=on [pi4] # Enable DRM VC4 V3D driver on top of the dispmanx display stack -dtoverlay=vc4-kms-v3d +dtoverlay=vc4-fkms-v3d max_framebuffers=2 [all] #dtoverlay=vc4-fkms-v3d enable_uart=1 + +# Don't read an attached HAT's EEPROM. The firmware would merge the HAT's own +# overlay into the device tree it hands to U-Boot, and that DT carries no +# /chosen/stdout-path — so U-Boot picks its console by DT node order, which the +# merge perturbs: with a Sense HAT fitted, U-Boot drives the wrong UART and +# boots in complete silence. SO3 talks to the HAT through its own rpisense +# driver and never needs the overlay. Applies to both 32- and 64-bit. +force_eeprom_read=0 + +# The 32/64-bit boot settings are NOT here: this file is shared by every rpi4 +# BSP, and the two chains need opposite values (kernel7l.img vs kernel8.img). +# bsp_rpi4.inc / bsp_rpi4_64.inc append the right config_rpi4_arm{32,64}.txt +# fragment after copying this directory. + +# Diagnostic only — echoes the firmware's own boot stage on the UART, which is +# how you tell a failure *before* U-Boot from a dead board. Leave it OFF for +# normal boots: to print, the firmware muxes GPIO14/15 to the PL011 and resets +# its baud, while the DT gives serial0 = the mini-UART (7e215040, the one SO3 +# drives). The pins then stay on the wrong peripheral and U-Boot's output never +# reaches the wire. +#uart_2ndstage=1 diff --git a/build/meta-bsp/recipes-bsp/bsp/verdin-imx8mp/boot.scr.txt b/build/meta-bsp/recipes-bsp/bsp/verdin-imx8mp/boot.scr.txt new file mode 100644 index 0000000..02dedef --- /dev/null +++ b/build/meta-bsp/recipes-bsp/bsp/verdin-imx8mp/boot.scr.txt @@ -0,0 +1,16 @@ +# U-Boot boot script for SO3-on-AVZ on the Toradex Verdin iMX8MP. +# +# Loads the single AVZ+SO3 FIT image and boots it. bootm parses the FIT and +# copies each sub-image to its load address (AVZ -> 0x40080000, SO3 guest -> +# 0x48000000, dtbs, rootfs.fat), then enters AVZ which in turn starts the SO3 +# guest. The ITB is loaded high (0x90000000) so it never overlaps the +# 0x40080000-0x50c00000 sub-image range during extraction. + +echo "=== SO3 on AVZ (Verdin iMX8MP) ===" + +env set itb_addr 0x90000000 + +# The deploy stages the selected ITB (AVZ+SO3 guest *or* SO3 standalone) under +# the fixed name boot.itb, so this script is the same for both variants. +ext4load mmc 2:1 ${itb_addr} /boot.itb +bootm ${itb_addr} diff --git a/build/meta-bsp/recipes-bsp/bsp/verdin-imx8mp/boot_avz.scr.txt b/build/meta-bsp/recipes-bsp/bsp/verdin-imx8mp/boot_avz.scr.txt new file mode 100644 index 0000000..98911ee --- /dev/null +++ b/build/meta-bsp/recipes-bsp/bsp/verdin-imx8mp/boot_avz.scr.txt @@ -0,0 +1,16 @@ +# U-Boot boot script for SO3-on-AVZ on the Toradex Verdin iMX8MP (two-ITB). +# +# Loads the AVZ ITB and the SO3 guest ITB to staging addresses (above the +# 0x40080000-0x50c00000 sub-image extraction range), then jumps via the +# guest-boot U-Boot command which passes the AVZ FIT in x0 and the guest ITB +# in x1. AVZ extracts its sub-images (AVZ -> 0x40080000, avz_dt) and its +# loadAgency() loads the SO3 guest (-> 0x48000000, dtb, rootfs.fat) from x1. + +echo "=== SO3 on AVZ (Verdin iMX8MP, two-ITB) ===" + +env set avz_addr 0x60000000 +env set guest_addr 0x90000000 + +ext4load mmc 2:1 ${avz_addr} /boot_avz.itb +ext4load mmc 2:1 ${guest_addr} /boot_guest.itb +guest-boot ${avz_addr} ${guest_addr} diff --git a/build/meta-bsp/recipes-bsp/bsp/verdin-imx8mp/lpddr4_pmu_train_1d_dmem_202006.bin b/build/meta-bsp/recipes-bsp/bsp/verdin-imx8mp/lpddr4_pmu_train_1d_dmem_202006.bin new file mode 100644 index 0000000..72be947 Binary files /dev/null and b/build/meta-bsp/recipes-bsp/bsp/verdin-imx8mp/lpddr4_pmu_train_1d_dmem_202006.bin differ diff --git a/build/meta-bsp/recipes-bsp/bsp/verdin-imx8mp/lpddr4_pmu_train_1d_imem_202006.bin b/build/meta-bsp/recipes-bsp/bsp/verdin-imx8mp/lpddr4_pmu_train_1d_imem_202006.bin new file mode 100644 index 0000000..9ebb7a0 Binary files /dev/null and b/build/meta-bsp/recipes-bsp/bsp/verdin-imx8mp/lpddr4_pmu_train_1d_imem_202006.bin differ diff --git a/build/meta-bsp/recipes-bsp/bsp/verdin-imx8mp/lpddr4_pmu_train_2d_dmem_202006.bin b/build/meta-bsp/recipes-bsp/bsp/verdin-imx8mp/lpddr4_pmu_train_2d_dmem_202006.bin new file mode 100644 index 0000000..dd94e26 Binary files /dev/null and b/build/meta-bsp/recipes-bsp/bsp/verdin-imx8mp/lpddr4_pmu_train_2d_dmem_202006.bin differ diff --git a/build/meta-bsp/recipes-bsp/bsp/verdin-imx8mp/lpddr4_pmu_train_2d_imem_202006.bin b/build/meta-bsp/recipes-bsp/bsp/verdin-imx8mp/lpddr4_pmu_train_2d_imem_202006.bin new file mode 100644 index 0000000..1340657 Binary files /dev/null and b/build/meta-bsp/recipes-bsp/bsp/verdin-imx8mp/lpddr4_pmu_train_2d_imem_202006.bin differ diff --git a/build/meta-bsp/recipes-bsp/bsp/x86/boot/grub/i386-pc/modinfo.sh b/build/meta-bsp/recipes-bsp/bsp/x86/boot/grub/i386-pc/modinfo.sh index cb6012e..e29cc2a 100755 --- a/build/meta-bsp/recipes-bsp/bsp/x86/boot/grub/i386-pc/modinfo.sh +++ b/build/meta-bsp/recipes-bsp/bsp/x86/boot/grub/i386-pc/modinfo.sh @@ -1,5 +1,7 @@ #!/bin/sh +# Copyright (c) 2025-2026 EDGEMTech SA + # User-controllable options grub_modinfo_target_cpu=i386 grub_modinfo_platform=pc diff --git a/build/meta-bsp/recipes-bsp/capsule/bsp-capsules_1.0.0.bb b/build/meta-bsp/recipes-bsp/capsule/bsp-capsules_1.0.0.bb index 6f67930..62d2e3c 100644 --- a/build/meta-bsp/recipes-bsp/capsule/bsp-capsules_1.0.0.bb +++ b/build/meta-bsp/recipes-bsp/capsule/bsp-capsules_1.0.0.bb @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD SUMMARY = "SO3 capsule Deployment" DESCRIPTION = "SO3 capsules are aimed to run with Linux as guest on top of the AVZ hypervisor." @@ -10,10 +12,15 @@ PR = "r0" inherit filesystem inherit uboot -inherit logging inherit bsp -OVERRIDES += ":so3" +# Capsules reuse the SO3 ITS templates (e.g. _capsule.its) +IB_ITS_SRC = "${THISDIR}/../so3/files/its" + +# :append (not +=) so no space is inserted before ":so3" — otherwise the +# preceding CPU token parses as "arm "/"aarch64 " and : overrides +# stop matching. See usr-so3_1.0.bb for the full rationale. +OVERRIDES:append = ":so3" do_configure[noexec] = "1" do_attach_infrabase[noexec] = "1" @@ -32,26 +39,27 @@ addtask do_build def __do_platform_deploy(d): import os - import subprocess capsule_path = d.getVar('IB_FILESYSTEM_PATH') + "/p2/mnt/capsules/image" itb_path = d.getVar('IB_ITB_PATH') + "/" + d.getVar('IB_TARGET_ITS') + ".itb" if not os.path.isfile(itb_path): bb.fatal(itb_path + " is missing ...") - - subprocess.run(['mkdir', '-p', capsule_path]) - subprocess.run(['cp', itb_path, capsule_path]) + + # The p2 rootfs is extracted as root, so any write into it must be + # escalated (bitbake itself runs unprivileged) and must fail loudly. + utils_sudo(['mkdir', '-p', capsule_path], check=True) + utils_sudo(['cp', itb_path, capsule_path], check=True) do_itb[nostamp] = "1" do_itb[depends] = "usr-so3:do_deploy" do_itb () { + # ITS rendered into IB_ITB_PATH by the shared do_render_its (before do_itb). if [ ! -f ${IB_ITB_PATH}/${IB_TARGET_ITS}.its ]; then bbfatal "No corresponding ITS found for container ${IB_TARGET_ITS}" - else - mkimage -f ${IB_ITB_PATH}/${IB_TARGET_ITS}.its ${IB_ITB_PATH}/${IB_TARGET_ITS}.itb fi + mkimage -f ${IB_ITB_PATH}/${IB_TARGET_ITS}.its ${IB_ITB_PATH}/${IB_TARGET_ITS}.itb } diff --git a/build/meta-bsp/recipes-bsp/linux/bsp-linux_1.0.bb b/build/meta-bsp/recipes-bsp/linux/bsp-linux_1.0.bb index 95bcc39..664fac8 100644 --- a/build/meta-bsp/recipes-bsp/linux/bsp-linux_1.0.bb +++ b/build/meta-bsp/recipes-bsp/linux/bsp-linux_1.0.bb @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD SUMMARY = "Linux Board Support Package" DESCRIPTION = "Linux Board Support Package (BSP) which builds the whole set of software components \ @@ -11,17 +13,25 @@ PR = "r0" inherit filesystem inherit linux -inherit logging inherit bsp inherit uboot +inherit atf + +# ITS templates live in the layer (rendered into IB_ITB_PATH by do_itb) +IB_ITS_SRC = "${THISDIR}/files/its" + +# AVZ two-ITB boot: the Linux agency guest ITB is _linux_guest.itb +# (the AVZ ITB carries only the hypervisor, like the SO3 case). +IB_GUEST_SUFFIX = "_linux_guest" OVERRIDES += ":linux" -COMPATIBLE_PLATFORM = "virt32|virt64|rpi4_64|x86_qemu" +COMPATIBLE_PLATFORM = "virt32|virt64|rpi4_64" do_attach_infrabase[noexec] = "1" -include ../bsp/files/bsp_${IB_PLATFORM}.inc +# Platform-specific deploy logic (__do_platform_deploy). +include recipes-bsp/bsp/files/bsp_${IB_PLATFORM}.inc do_configure[noexec] = "1" @@ -40,17 +50,114 @@ do_itb[nostamp] = "1" do_itb () { + # ITS are rendered into IB_ITB_PATH by the shared do_render_its (before + # do_itb); this task only mkimage's them. The boot shape is selected by + # the ITS name (mirroring bsp-so3 and __deploy_arm_common), NOT by + # IB_BOOT_CHAIN — AVZ boots fine on the bare U-Boot chain (EL2 via + # QEMU virtualization=on), ATF/OP-TEE is an independent choice. if [ ! -f ${IB_ITB_PATH}/${IB_TARGET_ITS}.its ]; then bbfatal "No corresponding ITS found (${IB_TARGET_ITS})" - else - mkimage -f ${IB_ITB_PATH}/${IB_TARGET_ITS}.its ${IB_ITB_PATH}/${IB_TARGET_ITS}.itb fi + mkimage -f ${IB_ITB_PATH}/${IB_TARGET_ITS}.its ${IB_ITB_PATH}/${IB_TARGET_ITS}.itb + + # AVZ boot uses a SEPARATE guest ITB (loaded alongside the AVZ ITB by + # the guest-boot U-Boot command). The guest ITS (_avz -> + + # IB_GUEST_SUFFIX) is rendered by do_render_its. + case "${IB_TARGET_ITS}" in + *_avz) + guest_its="$(echo "${IB_TARGET_ITS}" | sed 's/_avz$//')${IB_GUEST_SUFFIX}" + if [ ! -f ${IB_ITB_PATH}/${guest_its}.its ]; then + bbfatal "No Linux guest ITS found (${guest_its})" + fi + mkimage -f ${IB_ITB_PATH}/${guest_its}.its ${IB_ITB_PATH}/${guest_its}.itb + ;; + esac +} +# do_prepare_initrd: gzip the selected cpio into initrd.cpio.gz so do_itb +# /incbin/'s it. Lived in the FC capsule bbappend originally; moved here so +# bare bsp-linux (no capsule layer loaded) still gets a fresh initrd in the +# bare ITB. The FC bbappend's do_inject_kernel_modules still runs before +# this, editing rootfs.cpio in place — the content-hash guard below picks +# up the new content and regenerates initrd.cpio.gz. +# +# IB_RAMFS_SOURCE selects which cpio becomes the embedded ramfs (default in +# bsp.bbclass): +# "rootfs" - board//rootfs.cpio, the freshly built full rootfs. +# "initrd" - board//initrd.cpio, a static git-tracked busybox ramfs. +# Either way the result is gzipped straight into initrd.cpio.gz; we never +# overwrite the (now meaningful) static initrd.cpio. + +do_prepare_initrd[nostamp] = "1" +do_prepare_initrd[depends] = "usr-linux:do_deploy" + +python do_prepare_initrd () { + import hashlib + import shutil + import gzip + import os + + IB_ROOTFS_PATH = d.getVar('IB_ROOTFS_PATH') + IB_PLATFORM = d.getVar('IB_PLATFORM') + ramfs_source = (d.getVar('IB_RAMFS_SOURCE') or "rootfs").strip() + + board_dir = os.path.join(IB_ROOTFS_PATH, "board", IB_PLATFORM) + initrd_gz = os.path.join(board_dir, "initrd.cpio.gz") + + if ramfs_source == "rootfs": + src = os.path.join(board_dir, "rootfs.cpio") + elif ramfs_source == "initrd": + src = os.path.join(board_dir, "initrd.cpio") + else: + bb.fatal("IB_RAMFS_SOURCE must be 'rootfs' or 'initrd', got '{}'".format(ramfs_source)) + + if not os.path.exists(src): + bb.fatal("ramfs source not found: {} (IB_RAMFS_SOURCE={})".format(src, ramfs_source)) + + # Guard against rebuilds. Content hash instead of mtime: __do_rootfs_umount + # always rewrites rootfs.cpio with a fresh mtime even when content is + # unchanged, so mtime would force false rebuilds. The mode is folded into + # the stored value so toggling IB_RAMFS_SOURCE always invalidates the gz, + # even if the new source happens to hash to a previously seen value. + + h = hashlib.sha256() + with open(src, 'rb') as f: + for chunk in iter(lambda: f.read(65536), b''): + h.update(chunk) + current_hash = "{}:{}".format(ramfs_source, h.hexdigest()) + + # Single mode-aware guard file, decoupled from the source filename. + src_hash_file = initrd_gz + ".srchash" + + if os.path.exists(initrd_gz) and os.path.exists(src_hash_file): + with open(src_hash_file, 'r') as f: + stored_hash = f.read().strip() + if stored_hash == current_hash: + bb.plain("initrd.cpio.gz is up to date, skipping") + return + + bb.plain("Prepare initrd.cpio.gz from {} (IB_RAMFS_SOURCE={})".format( + os.path.basename(src), ramfs_source)) + with open(src, 'rb') as f_in, gzip.open(initrd_gz, 'wb') as f_out: + shutil.copyfileobj(f_in, f_out) + with open(src_hash_file, 'w') as f: + f.write(current_hash) } -# Deploy everything +addtask do_prepare_initrd before do_itb -do_deploy[depends] = "filesystem:do_fs_check usr-linux:do_deploy" +# Deploy everything +# +# Deploy is decoupled from the build: it writes the already-built artefacts +# onto the boot media WITHOUT recompiling. It pulls rootfs-linux:do_deploy +# (which extracts the final rootfs.cpio — apps baked in at build time — onto +# p2) and writes the .itb produced by do_itb during `build.sh -a` onto p1 +# (__do_platform_deploy). It does NOT pull do_build / do_itb / usr-linux's +# rootfs.cpio populate — those belong to `build.sh -a`. Workflow: +# edit -> build.sh -> deploy.sh. A deploy with no prior build fails clearly +# (missing rootfs.cpio / .itb) rather than silently rebuilding. + +do_deploy[depends] = "filesystem:do_fs_check rootfs-linux:do_deploy" do_deploy[nostamp] = "1" python do_deploy() { @@ -60,7 +167,9 @@ python do_deploy() { __do_deploy_boot(d); } -addtask do_itb before do_deploy +# do_itb runs in the BUILD chain only (it produces the .itb that deploy +# consumes); deploy must not re-trigger it. +addtask do_itb before do_build addtask do_deploy do_deploy_boot[nostamp] = "1" @@ -72,10 +181,13 @@ python do_deploy_boot() { __do_deploy_boot(d) } -addtask do_itb before do_deploy_boot addtask do_deploy_boot -do_clean[depends] = "usr-linux:do_clean linux:do_clean uboot:do_clean" +do_clean[depends] = "usr-linux:do_clean rootfs-linux:do_clean linux:do_clean uboot:do_clean" +python () { + if d.getVar('IB_PLATFORM') == 'virt64': + d.appendVarFlag('do_clean', 'depends', ' atf:do_clean optee:do_clean avz:do_clean') +} do_clean[nostamp] = "1" do_clean () { rm -f ${TMPDIR}/stamps/bsp-linux* diff --git a/linux/target/virt64_standalone.its b/build/meta-bsp/recipes-bsp/linux/files/its/rpi4.its similarity index 59% rename from linux/target/virt64_standalone.its rename to build/meta-bsp/recipes-bsp/linux/files/its/rpi4.its index f56b262..b595deb 100644 --- a/linux/target/virt64_standalone.its +++ b/build/meta-bsp/recipes-bsp/linux/files/its/rpi4.its @@ -19,50 +19,52 @@ /dts-v1/; / { - description = "Kernel and rootfs components for virt64 (armv8) environment"; + description = "Kernel and rootfs components for Raspberry Pi 4 environment"; images { - + linux { - description = "Linux kernel"; - data = /incbin/("../linux/arch/arm64/boot/Image"); + description = "Linux kernel 64-bits"; + data = /incbin/("${IB_LINUX_PATH}/arch/arm64/boot/Image"); type = "kernel"; arch = "arm64"; os = "linux"; compression = "none"; - load = <0x41000000>; - entry = <0x41000000>; + load = <0x01000000>; + entry = <0x01000000>; + }; - fdt_linux { - description = "Linux device tree blob"; - data = /incbin/("../linux/arch/arm64/boot/dts/arm/virt64.dtb"); + fdt_linux { + description = "Linux device tree 64-bits blob"; + data = /incbin/("${IB_LINUX_PATH}/arch/arm64/boot/dts/broadcom/bcm2711-rpi-4-b.dtb"); type = "flat_dt"; arch = "arm64"; compression = "none"; - load = <0x50000000>; + load = <0x10a00000>; }; - + initrd { - description = "Initial rootfs (initrd)"; - data = /incbin/("../rootfs/board/virt64/initrd.cpio"); + description = "Initial rootfs 64-bits (initrd)"; + data = /incbin/("${IB_ROOTFS_PATH}/board/rpi4_64/initrd.cpio.gz"); type = "ramdisk"; arch = "arm64"; - os = "linux"; + os = "linux"; compression = "none"; - load = <0x50c00000>; + load = <0x10c00000>; }; }; - + configurations { default = "conf_linux"; conf_linux { - description = "Linux on virt64"; - kernel = "linux"; - fdt = "fdt_linux"; - ramdisk = "initrd"; + description = "Linux on Raspberry Pi 4 64-bits"; + kernel = "linux"; + fdt = "fdt_linux"; + ramdisk = "initrd"; }; + }; }; diff --git a/build/meta-bsp/recipes-bsp/linux/files/its/rpi4_64.its b/build/meta-bsp/recipes-bsp/linux/files/its/rpi4_64.its new file mode 100644 index 0000000..9d2bdce --- /dev/null +++ b/build/meta-bsp/recipes-bsp/linux/files/its/rpi4_64.its @@ -0,0 +1,84 @@ +/* + * Copyright (C) 2020-2026 EDGEMTech SA + * + * Bare bsp-linux ITS for the Raspberry Pi 4 (64-bit). Standalone Linux + * booted by U-Boot's bootm from a single ITB (no ATF, no AVZ). Pairs + * with IB_TARGET_ITS:linux:rpi4_64="rpi4_64". + * + * Kernel + DTB: the raspberrypi/linux build (arch/arm64/boot/Image and + * the real board DTB bcm2711-rpi-4-b.dtb — Linux drives the full Pi + * hardware here, unlike the minimal SO3 rpi4_64.dts). + * Initrd: linux/rootfs's board/rpi4_64 buildroot output, gzipped at + * deploy time into initrd.cpio.gz (root=/dev/ram). + * + * Template: ${IB_*_PATH} / ${IB_PLATFORM} placeholders are expanded to + * absolute build paths by bsp_render_its (bsp.bbclass) at do_itb time. + * + * The AVZ two-ITB path uses rpi4_64_avz.its + the guest ITB instead + * (rpi4_64_linux_guest.its for the Linux agency) — see those files. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +/dts-v1/; + +/ { + description = "Kernel and rootfs components for Raspberry Pi 4 (64-bit) environment"; + + images { + + linux { + description = "Linux kernel"; + data = /incbin/("${IB_LINUX_PATH}/arch/arm64/boot/Image"); + type = "kernel"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <0x01000000>; + entry = <0x01000000>; + }; + + fdt_linux { + description = "Linux device tree blob"; + data = /incbin/("${IB_LINUX_PATH}/arch/arm64/boot/dts/broadcom/bcm2711-rpi-4-b.dtb"); + type = "flat_dt"; + arch = "arm64"; + compression = "none"; + load = <0x10a00000>; + }; + + initrd { + description = "Initial rootfs (initrd)"; + data = /incbin/("${IB_ROOTFS_PATH}/board/${IB_PLATFORM}/initrd.cpio.gz"); + type = "ramdisk"; + arch = "arm64"; + os = "linux"; + compression = "gzip"; + load = <0x10c00000>; + }; + }; + + configurations { + default = "conf_linux"; + + conf_linux { + description = "Linux on Raspberry Pi 4 (64-bit)"; + kernel = "linux"; + fdt = "fdt_linux"; + ramdisk = "initrd"; + }; + }; + +}; diff --git a/build/meta-bsp/recipes-bsp/linux/files/its/rpi4_64_avz.its b/build/meta-bsp/recipes-bsp/linux/files/its/rpi4_64_avz.its new file mode 100644 index 0000000..fef0ed3 --- /dev/null +++ b/build/meta-bsp/recipes-bsp/linux/files/its/rpi4_64_avz.its @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2020-2026 Daniel Rossier + * + * AVZ ITB for RPi4 (64-bit). Carries only the AVZ hypervisor binary + * (so3.bin) + the AVZ device tree. The guest (SO3) lives in a SEPARATE + * ITB (rpi4_64_so3_guest.its); both are loaded by U-Boot's guest-boot + * command, which passes the AVZ FIT in x0 and the guest ITB in x1. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +/dts-v1/; + +/ { + description = "AVZ Hypervisor bundle for RPi4 (64-bit)"; + + images { + + avz { + description = "AVZ Hypervisor (64-bit) Polymorphic SO3"; + data = /incbin/("${IB_AVZ_PATH}/so3.bin"); + type = "kernel"; + os = "linux"; + arch = "arm64"; + compression = "none"; + load = <0x00080000>; + entry = <0x00080000>; + }; + + avz_dt { + description = "AVZ device tree"; + data = /incbin/("${IB_AVZ_PATH}/dts/rpi4_64_avz.dtb"); + type = "avz_dt"; + arch = "arm64"; + compression = "none"; + load = <0x03000000>; + }; + }; + + configurations { + default = "avz"; + + avz { + description = "AVZ hypervisor on RPi4 64-bit"; + kernel = "avz"; + loadables = "avz_dt"; + fdt = "avz_dt"; + }; + }; +}; diff --git a/build/meta-bsp/recipes-bsp/linux/files/its/rpi4_64_linux_guest.its b/build/meta-bsp/recipes-bsp/linux/files/its/rpi4_64_linux_guest.its new file mode 100644 index 0000000..7d44f71 --- /dev/null +++ b/build/meta-bsp/recipes-bsp/linux/files/its/rpi4_64_linux_guest.its @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2020-2026 Daniel Rossier + * + * Linux guest ITB for rpi4_64. Carries the Linux (agency) kernel + * + its guest device tree + initrd. Paired with rpi4_64_avz.itb and loaded + * by U-Boot's guest-boot command, which passes this ITB to AVZ in x1; AVZ's + * loadAgency() loads the agency guest from it. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +/dts-v1/; + +/ { + description = "Linux guest bundle for rpi4_64"; + + images { + + linux { + description = "Linux kernel (guest)"; + data = /incbin/("${IB_LINUX_PATH}/arch/arm64/boot/Image"); + type = "guest"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <0x01000000>; + entry = <0x01000000>; + }; + + fdt { + description = "Linux guest device tree"; + data = /incbin/("${IB_LINUX_PATH}/arch/arm64/boot/dts/broadcom/bcm2711-rpi-4-b.dtb"); + type = "flat_dt"; + arch = "arm64"; + compression = "none"; + load = <0x10000000>; + }; + + initrd { + description = "Linux initrd"; + data = /incbin/("${IB_ROOTFS_PATH}/board/rpi4_64/initrd.cpio.gz"); + type = "ramdisk"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <0x10c00000>; + }; + }; + + configurations { + default = "capsule"; + + capsule { + description = "Linux agency guest on rpi4_64"; + loadables = "linux"; + fdt = "fdt"; + ramdisk = "initrd"; + }; + }; +}; diff --git a/linux/target/virt64_avz.its b/build/meta-bsp/recipes-bsp/linux/files/its/virt32.its similarity index 50% rename from linux/target/virt64_avz.its rename to build/meta-bsp/recipes-bsp/linux/files/its/virt32.its index 63d2c77..e7ef4ff 100644 --- a/linux/target/virt64_avz.its +++ b/build/meta-bsp/recipes-bsp/linux/files/its/virt32.its @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020 Daniel Rossier + * Copyright (C) 2014-2023 Daniel Rossier * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -19,77 +19,73 @@ /dts-v1/; / { - description = "Kernel and rootfs components for virt64 (armv8) environment"; + description = "Linx running on AVZ in virt32 environment"; images { - avz { - description = "AVZ Hypervisor (64-bit) Polymorphic SO3"; - data = /incbin/("../../avz/so3.bin"); + avz { + description = "AVZ Hypervisor (32-bit) Polymorphic SO3"; + data = /incbin/("${IB_AVZ_PATH}/so3.bin"); type = "kernel"; - os = "linux"; - arch = "arm64"; + os = "linux"; + arch = "arm"; compression = "none"; - load = <0x40080000>; - entry = <0x40080000>; + load = <0x40008000>; + entry = <0x40008000>; }; -/* The location of the linux guest is the same than in the DTS - so that we avoid to use the IOMMU -*/ - - linux { - description = "Linux kernel"; - data = /incbin/("../linux/arch/arm64/boot/Image"); - type = "guest"; - arch = "arm64"; - os = "linux"; - compression = "none"; - load = <0x41000000>; - entry = <0x41000000>; - }; - - avz_dt { + avz_dt { description = "Flattened Device Tree blob"; - data = /incbin/("../../avz/dts/virt64_avz.dtb"); + data = /incbin/("${IB_AVZ_PATH}/dts/virt32_avz.dtb"); type = "avz_dt"; - arch = "arm64"; + arch = "arm"; compression = "none"; - /* Find a region above the heap to preserve the DT */ - load = <0x46000000>; + load = <0x40f00000>; }; - fdt { + linux { + description = "Linux kernel"; + data = /incbin/("${IB_LINUX_PATH}/linux/arch/arm/boot/Image"); + type = "avz"; + arch = "arm"; + os = "linux"; + compression = "none"; + load = <0x41008000>; + entry = <0x41008000>; + }; + + fdt_linux { description = "Linux device tree blob"; - data = /incbin/("../linux/arch/arm64/boot/dts/arm/virt64_guest.dtb"); + data = /incbin/("${IB_LINUX_PATH}/linux/arch/arm/boot/dts/virt32.dtb"); type = "flat_dt"; - arch = "arm64"; + arch = "arm"; compression = "none"; - load = <0x50000000>; + load = <0x5a000000>; }; initrd { description = "Initial rootfs (initrd)"; - data = /incbin/("../rootfs/board/virt64/initrd.cpio"); + data = /incbin/("${IB_ROOTFS_PATH}/board/virt32/initrd.cpio.gz"); type = "ramdisk"; - arch = "arm64"; + arch = "arm"; os = "linux"; compression = "none"; load = <0x50c00000>; }; - }; - configurations { - default = "agency"; - - agency { - description = "SOO Agency on virt64"; - kernel = "avz"; - loadables = "avz_dt", "linux"; - fdt = "fdt"; - ramdisk = "initrd"; - }; + }; + configurations { + default = "conf_linux_avz"; + + conf_linux_avz { + description = "Linux/AVZ on virt32"; + kernel = "avz"; + fdt = "fdt_linux"; + loadables = "avz_dt", "linux"; + ramdisk = "initrd"; + }; + }; }; diff --git a/linux/target/virt32_avz.its b/build/meta-bsp/recipes-bsp/linux/files/its/virt32_avz.its similarity index 85% rename from linux/target/virt32_avz.its rename to build/meta-bsp/recipes-bsp/linux/files/its/virt32_avz.its index dc5e96e..e7ef4ff 100644 --- a/linux/target/virt32_avz.its +++ b/build/meta-bsp/recipes-bsp/linux/files/its/virt32_avz.its @@ -25,7 +25,7 @@ avz { description = "AVZ Hypervisor (32-bit) Polymorphic SO3"; - data = /incbin/("../avz/so3.bin"); + data = /incbin/("${IB_AVZ_PATH}/so3.bin"); type = "kernel"; os = "linux"; arch = "arm"; @@ -36,7 +36,7 @@ avz_dt { description = "Flattened Device Tree blob"; - data = /incbin/("../avz/dts/virt32_avz.dtb"); + data = /incbin/("${IB_AVZ_PATH}/dts/virt32_avz.dtb"); type = "avz_dt"; arch = "arm"; compression = "none"; @@ -45,7 +45,7 @@ linux { description = "Linux kernel"; - data = /incbin/("../linux/linux/arch/arm/boot/Image"); + data = /incbin/("${IB_LINUX_PATH}/linux/arch/arm/boot/Image"); type = "avz"; arch = "arm"; os = "linux"; @@ -56,7 +56,7 @@ fdt_linux { description = "Linux device tree blob"; - data = /incbin/("../linux/linux/arch/arm/boot/dts/virt32.dtb"); + data = /incbin/("${IB_LINUX_PATH}/linux/arch/arm/boot/dts/virt32.dtb"); type = "flat_dt"; arch = "arm"; compression = "none"; @@ -65,7 +65,7 @@ initrd { description = "Initial rootfs (initrd)"; - data = /incbin/("../rootfs/board/virt32/initrd.cpio"); + data = /incbin/("${IB_ROOTFS_PATH}/board/virt32/initrd.cpio.gz"); type = "ramdisk"; arch = "arm"; os = "linux"; diff --git a/linux/target/virt32_standalone.its b/build/meta-bsp/recipes-bsp/linux/files/its/virt32_standalone.its similarity index 86% rename from linux/target/virt32_standalone.its rename to build/meta-bsp/recipes-bsp/linux/files/its/virt32_standalone.its index 94ceb0a..94199bc 100644 --- a/linux/target/virt32_standalone.its +++ b/build/meta-bsp/recipes-bsp/linux/files/its/virt32_standalone.its @@ -26,7 +26,7 @@ /* avz { description = "AVZ Hypervisor (32-bit) Polymorphic SO3"; - data = /incbin/("../avz/so3.bin"); + data = /incbin/("${IB_AVZ_PATH}/so3.bin"); type = "kernel"; os = "linux"; arch = "arm"; @@ -37,7 +37,7 @@ avz_dt { description = "Flattened Device Tree blob"; - data = /incbin/("../avz/dts/virt32_avz.dtb"); + data = /incbin/("${IB_AVZ_PATH}/dts/virt32_avz.dtb"); type = "avz_dt"; arch = "arm"; compression = "none"; @@ -47,7 +47,7 @@ */ linux { description = "Linux kernel"; - data = /incbin/("../linux/linux/arch/arm/boot/Image"); + data = /incbin/("${IB_LINUX_PATH}/linux/arch/arm/boot/Image"); /* type = "avz" */ type = "kernel"; arch = "arm"; @@ -59,7 +59,7 @@ fdt_linux { description = "Linux device tree blob"; - data = /incbin/("../linux/linux/arch/arm/boot/dts/virt32.dtb"); + data = /incbin/("${IB_LINUX_PATH}/linux/arch/arm/boot/dts/virt32.dtb"); type = "flat_dt"; arch = "arm"; compression = "none"; @@ -68,7 +68,7 @@ initrd { description = "Initial rootfs (initrd)"; - data = /incbin/("../rootfs/board/virt32/initrd.cpio"); + data = /incbin/("${IB_ROOTFS_PATH}/board/virt32/initrd.cpio.gz"); type = "ramdisk"; arch = "arm"; os = "linux"; diff --git a/build/meta-bsp/recipes-bsp/linux/files/its/virt64.its b/build/meta-bsp/recipes-bsp/linux/files/its/virt64.its new file mode 100644 index 0000000..6ab8375 --- /dev/null +++ b/build/meta-bsp/recipes-bsp/linux/files/its/virt64.its @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2020-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + * + * Bare bsp-linux ITS for QEMU virt64. Pairs with IB_BOOT_CHAIN= + * "uboot": QEMU loads the U-Boot ELF directly via `-kernel` (no ATF, + * no OP-TEE, no AVZ — purest dev path). U-Boot bootm's this ITB; the + * buildroot initrd is the rootfs (root=/dev/ram). + * + * Kernel + DTB: the outer-linux build (arch/arm64/.../${IB_PLATFORM}.dtb, + * the customised virt DT — see the virt64.dts patch in meta-linux). + * Initrd: linux/rootfs's board/${IB_PLATFORM}/rootfs.cpio (buildroot + * output gzipped at deploy time into initrd.cpio.gz). + * + * Template: ${IB_*_PATH} / ${IB_PLATFORM} placeholders are expanded to + * absolute build paths by bsp_render_its (bsp.bbclass) at do_itb time. + * + * The AVZ two-ITB path uses virt64_avz.its + the guest ITB instead + * (virt64_so3_guest.its for bsp-so3, virt64_linux_guest.its for the + * Linux agency) — see those files for the guest-boot variant. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +/dts-v1/; + +/ { + description = "Kernel and rootfs components for virt64 (armv8) environment"; + + images { + + linux { + description = "Linux kernel"; + data = /incbin/("${IB_LINUX_PATH}/arch/arm64/boot/Image"); + type = "kernel"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <0x41000000>; + entry = <0x41000000>; + }; + + fdt_linux { + description = "Linux device tree blob"; + data = /incbin/("${IB_LINUX_PATH}/arch/arm64/boot/dts/arm/${IB_PLATFORM}.dtb"); + type = "flat_dt"; + arch = "arm64"; + compression = "none"; + load = <0x50000000>; + }; + + initrd { + description = "Initial rootfs (initrd)"; + data = /incbin/("${IB_ROOTFS_PATH}/board/${IB_PLATFORM}/initrd.cpio.gz"); + type = "ramdisk"; + arch = "arm64"; + os = "linux"; + compression = "gzip"; + load = <0x50c00000>; + }; + }; + + configurations { + default = "conf_linux"; + + conf_linux { + description = "Linux on virt64"; + kernel = "linux"; + fdt = "fdt_linux"; + ramdisk = "initrd"; + }; + }; + +}; diff --git a/build/meta-bsp/recipes-bsp/linux/files/its/virt64_avz.its b/build/meta-bsp/recipes-bsp/linux/files/its/virt64_avz.its new file mode 100644 index 0000000..7ad5e43 --- /dev/null +++ b/build/meta-bsp/recipes-bsp/linux/files/its/virt64_avz.its @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2020-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + * + * AVZ ITS for QEMU virt64 (armv8). Carries only the AVZ hypervisor + * binary (so3.bin) + the AVZ device tree. The guest lives in a SEPARATE + * ITB (virt64_so3_guest.its for bsp-so3, virt64_linux_guest.its for the + * Linux agency); both are loaded by U-Boot's guest-boot command, which + * passes the AVZ FIT in x0 and the guest ITB in x1. + * + * Template: ${IB_*_PATH} placeholders are expanded to absolute build + * paths by bsp_render_its (bsp.bbclass) at do_itb time. + * + * The bare path uses virt64.its (bsp-linux, IB_BOOT_CHAIN="uboot") + * instead — see that file for the single-ITB bootm variant without AVZ. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +/dts-v1/; + +/ { + description = "AVZ Hypervisor bundle for virt64 (armv8)"; + + images { + + avz { + description = "AVZ Hypervisor (64-bit) Polymorphic SO3"; + data = /incbin/("${IB_AVZ_PATH}/so3.bin"); + type = "kernel"; + os = "linux"; + arch = "arm64"; + compression = "none"; + load = <0x40080000>; + entry = <0x40080000>; + }; + + avz_dt { + description = "AVZ device tree"; + data = /incbin/("${IB_AVZ_PATH}/dts/virt64_avz.dtb"); + type = "avz_dt"; + arch = "arm64"; + compression = "none"; + load = <0x46000000>; + }; + }; + + configurations { + default = "avz"; + + avz { + description = "AVZ hypervisor on virt64"; + kernel = "avz"; + loadables = "avz_dt"; + fdt = "avz_dt"; + }; + }; +}; diff --git a/build/meta-bsp/recipes-bsp/linux/files/its/virt64_linux_guest.its b/build/meta-bsp/recipes-bsp/linux/files/its/virt64_linux_guest.its new file mode 100644 index 0000000..f26b20c --- /dev/null +++ b/build/meta-bsp/recipes-bsp/linux/files/its/virt64_linux_guest.its @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2020-2026 Daniel Rossier + * + * Linux guest ITB for virt64 (armv8). Carries the Linux (agency) kernel + * + its guest device tree + initrd. Paired with virt64_avz.itb and loaded + * by U-Boot's guest-boot command, which passes this ITB to AVZ in x1; AVZ's + * loadAgency() loads the agency guest from it. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +/dts-v1/; + +/ { + description = "Linux guest bundle for virt64 (armv8)"; + + images { + + linux { + description = "Linux kernel (guest)"; + data = /incbin/("${IB_LINUX_PATH}/arch/arm64/boot/Image"); + type = "guest"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <0x41000000>; + entry = <0x41000000>; + }; + + fdt { + description = "Linux guest device tree"; + data = /incbin/("${IB_LINUX_PATH}/arch/arm64/boot/dts/arm/virt64_guest.dtb"); + type = "flat_dt"; + arch = "arm64"; + compression = "none"; + load = <0x50000000>; + }; + + initrd { + description = "Linux initrd"; + data = /incbin/("${IB_ROOTFS_PATH}/board/virt64/initrd.cpio.gz"); + type = "ramdisk"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <0x50c00000>; + }; + }; + + configurations { + default = "capsule"; + + capsule { + description = "Linux agency guest on virt64"; + loadables = "linux"; + fdt = "fdt"; + ramdisk = "initrd"; + }; + }; +}; diff --git a/build/meta-bsp/recipes-bsp/linux/files/uEnv_rpi4_64.txt b/build/meta-bsp/recipes-bsp/linux/files/uEnv_rpi4_64.txt index 546ecc5..c4f37bb 100644 --- a/build/meta-bsp/recipes-bsp/linux/files/uEnv_rpi4_64.txt +++ b/build/meta-bsp/recipes-bsp/linux/files/uEnv_rpi4_64.txt @@ -2,4 +2,4 @@ fdt_high=ffffffffffffffff initrd_high=ffffffffffffffff start=fatload mmc 0 0x30000000 rpi4_64.itb; bootm 0x30000000 -bootargs=console=ttyS0,115200 root=/dev/ram coherent_pool=1M 8250.nr_uarts=1 smsc95xx.macaddr=DC:A6:32:18:DD:95 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 fsck.repair=yes rootwait cma=96M net.ifnames=0 +bootargs=console=ttyS0,115200 root=/dev/ram coherent_pool=1M 8250.nr_uarts=1 cma=64M cma=256M smsc95xx.macaddr=DC:A6:32:18:DD:95 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 fsck.repair=yes rootwait diff --git a/build/meta-bsp/recipes-bsp/linux/files/uEnv_rpi4_64_avz.txt b/build/meta-bsp/recipes-bsp/linux/files/uEnv_rpi4_64_avz.txt new file mode 100644 index 0000000..958a796 --- /dev/null +++ b/build/meta-bsp/recipes-bsp/linux/files/uEnv_rpi4_64_avz.txt @@ -0,0 +1,18 @@ +fdt_high=ffffffffffffffff +initrd_high=ffffffffffffffff + +# Linux (agency) guest kernel cmdline for the RPi4. Propagated into the +# guest FDT /chosen/bootargs by the guest-boot command (env_get("bootargs") +# + fdt_chosen()). console=ttyS0 binds the log to the BCM283x mini-UART +# (same as the standalone rpi4 boot). root=/dev/ram: the kernel boots the +# embedded initramfs; in IB_RAMFS_SOURCE="initrd" mode the busybox /init +# then switch_root's into the ext4 rootfs on p2. + +bootargs=console=ttyS0,115200 earlycon=uart8250,mmio32,0xfe215040 loglevel=8 root=/dev/ram coherent_pool=1M 8250.nr_uarts=1 cma=160M smsc95xx.macaddr=DC:A6:32:18:DD:95 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 fsck.repair=yes rootwait + +# AVZ boot on RPi4 64-bit: two ITBs (AVZ + Linux guest) loaded to staging +# addresses (above the 0x00080000-0x17c00000 sub-image extraction range), +# then jumped via the guest-boot U-Boot command which passes the AVZ FIT in +# x0 and the guest ITB in x1 (AVZ loadAgency loads the guest from x1). + +start=fatload mmc 0 0x20000000 rpi4_64_avz.itb; fatload mmc 0 0x30000000 rpi4_64_guest.itb; guest-boot 0x20000000 0x30000000 diff --git a/build/meta-bsp/recipes-bsp/linux/files/uEnv_virt64.txt b/build/meta-bsp/recipes-bsp/linux/files/uEnv_virt64.txt index 7442db2..7ce9ef0 100644 --- a/build/meta-bsp/recipes-bsp/linux/files/uEnv_virt64.txt +++ b/build/meta-bsp/recipes-bsp/linux/files/uEnv_virt64.txt @@ -1,8 +1,12 @@ fdt_high=ffffffffffffffff initrd_high=ffffffffffffffff -start=load virtio 0 0x70000000 virt64.itb; bootm 0x70000000 -bootargs=console=ttyAMA0,115200n8 root=/dev/ram rw slub_debug=PUZ +# Bare bsp-linux on virt64: U-Boot bootm's a single ITB carrying kernel +# + DTB + buildroot initrd. No AVZ. QEMU loads U-Boot directly via +# -bios filesystem/u-boot.bin (no flash0.img in this mode). -# Uncomment if there is no initrd -# bootargs=console=ttyAMA0,115200n8 root=/dev/mmcblk0p1 rw slub_debug=PUZ +LOAD_ADDR=0x65000000 + +start=load virtio 0:1 ${LOAD_ADDR} virt64.itb; bootm ${LOAD_ADDR} + +bootargs=earlycon=pl011,mmio32,0x09000000 console=ttyAMA0,115200n8 root=/dev/ram rw diff --git a/build/meta-bsp/recipes-bsp/linux/files/uEnv_virt64_avz.txt b/build/meta-bsp/recipes-bsp/linux/files/uEnv_virt64_avz.txt new file mode 100644 index 0000000..a88af13 --- /dev/null +++ b/build/meta-bsp/recipes-bsp/linux/files/uEnv_virt64_avz.txt @@ -0,0 +1,19 @@ +fdt_high=ffffffffffffffff +initrd_high=ffffffffffffffff + +# Linux (agency) guest kernel cmdline. Propagated into the guest FDT +# /chosen/bootargs by the guest-boot command (env_get("bootargs") + +# fdt_chosen()). console=ttyAMA0 + earlycon bind the kernel log to the +# PL011 UART so the full boot is visible; loglevel=8 keeps debug output. +# root=/dev/ram: the kernel always boots the embedded initramfs. In +# IB_RAMFS_SOURCE="initrd" mode the small busybox /init then mounts the +# ext4 rootfs on p2 (/dev/vda2, virtio-blk) and switch_root's into it — +# the kernel never mounts a disk root itself. Harmless in "rootfs" mode. +bootargs=console=ttyAMA0 earlycon=pl011,0x9000000 loglevel=8 root=/dev/ram + +# AVZ boot on virt64: two ITBs (AVZ + SO3 guest) loaded to staging +# addresses, then jumped via the guest-boot U-Boot command which passes the +# AVZ FIT in x0 and the guest ITB in x1 (AVZ loadAgency loads the guest +# from x1). EL2 is required (st.sh enables -M virt,virtualization=on). + +start=load virtio 0 0x65000000 virt64_avz.itb; load virtio 0 0x70000000 virt64_guest.itb; guest-boot 0x65000000 0x70000000 diff --git a/build/meta-bsp/recipes-bsp/so3/bsp-so3_1.0.0.bb b/build/meta-bsp/recipes-bsp/so3/bsp-so3_1.0.0.bb index 198c885..e841fb8 100644 --- a/build/meta-bsp/recipes-bsp/so3/bsp-so3_1.0.0.bb +++ b/build/meta-bsp/recipes-bsp/so3/bsp-so3_1.0.0.bb @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD SUMMARY = "SO3 Board Support Package" DESCRIPTION = "SO3 Board Support Package (BSP) which builds the whole set of software components \ @@ -11,19 +13,30 @@ PR = "r0" inherit filesystem inherit uboot -inherit logging inherit bsp -OVERRIDES += ":so3" +# ITS templates live in the layer (rendered into IB_ITB_PATH by do_itb) +IB_ITS_SRC = "${THISDIR}/files/its" + +# :append (not +=) so no space is inserted before ":so3" — otherwise the +# preceding CPU token parses as "arm "/"aarch64 " and : overrides +# stop matching. See usr-so3_1.0.bb for the full rationale. +OVERRIDES:append = ":so3" include ../bsp/files/bsp_${IB_PLATFORM}.inc do_configure[noexec] = "1" do_attach_infrabase[noexec] = "1" -# Building all components - -do_build[depends] = "usr-so3:do_build uboot:do_build" +# Building all components. +# +# Every platform needs U-Boot: on QEMU it is the bare U-Boot payload, on +# verdin-imx8mp it is U-Boot wrapped into imx-boot/flash.bin (ATF + OP-TEE + +# U-Boot) by the uboot recipe. verdin additionally needs the AVZ hypervisor +# (bundled by the AVZ+SO3 ITS), so its dependency set is overridden to add it. +IB_BSP_BUILD_DEPENDS = "usr-so3:do_build uboot:do_build" +IB_BSP_BUILD_DEPENDS:verdin-imx8mp = "usr-so3:do_build uboot:do_build avz:do_build" +do_build[depends] = "${IB_BSP_BUILD_DEPENDS}" do_build () { bbplain "Everything built OK ..." @@ -36,12 +49,25 @@ do_itb[nostamp] = "1" do_itb[depends] = "usr-so3:do_deploy" do_itb () { + # ITS are rendered into IB_ITB_PATH by the shared do_render_its (before + # do_itb); this task only mkimage's them. if [ ! -f ${IB_ITB_PATH}/${IB_TARGET_ITS}.its ]; then bbfatal "No corresponding ITS found (${IB_TARGET_ITS})" - else - mkimage -f ${IB_ITB_PATH}/${IB_TARGET_ITS}.its ${IB_ITB_PATH}/${IB_TARGET_ITS}.itb fi - + mkimage -f ${IB_ITB_PATH}/${IB_TARGET_ITS}.its ${IB_ITB_PATH}/${IB_TARGET_ITS}.itb + + # AVZ boot uses a SEPARATE guest ITB (loaded alongside the AVZ ITB by + # the guest-boot U-Boot command). The guest ITS (_avz -> + + # IB_GUEST_SUFFIX) is rendered by do_render_its; mkimage it if present. + case "${IB_TARGET_ITS}" in + *_avz) + guest_its="$(echo "${IB_TARGET_ITS}" | sed 's/_avz$//')${IB_GUEST_SUFFIX}" + if [ -f ${IB_ITB_PATH}/${guest_its}.its ]; then + mkimage -f ${IB_ITB_PATH}/${guest_its}.its ${IB_ITB_PATH}/${guest_its}.itb + fi + ;; + esac + } do_deploy[depends] = "usr-so3:do_deploy" diff --git a/build/meta-bsp/recipes-bsp/so3/files/its/rpi4_64_avz.its b/build/meta-bsp/recipes-bsp/so3/files/its/rpi4_64_avz.its new file mode 100644 index 0000000..fef0ed3 --- /dev/null +++ b/build/meta-bsp/recipes-bsp/so3/files/its/rpi4_64_avz.its @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2020-2026 Daniel Rossier + * + * AVZ ITB for RPi4 (64-bit). Carries only the AVZ hypervisor binary + * (so3.bin) + the AVZ device tree. The guest (SO3) lives in a SEPARATE + * ITB (rpi4_64_so3_guest.its); both are loaded by U-Boot's guest-boot + * command, which passes the AVZ FIT in x0 and the guest ITB in x1. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +/dts-v1/; + +/ { + description = "AVZ Hypervisor bundle for RPi4 (64-bit)"; + + images { + + avz { + description = "AVZ Hypervisor (64-bit) Polymorphic SO3"; + data = /incbin/("${IB_AVZ_PATH}/so3.bin"); + type = "kernel"; + os = "linux"; + arch = "arm64"; + compression = "none"; + load = <0x00080000>; + entry = <0x00080000>; + }; + + avz_dt { + description = "AVZ device tree"; + data = /incbin/("${IB_AVZ_PATH}/dts/rpi4_64_avz.dtb"); + type = "avz_dt"; + arch = "arm64"; + compression = "none"; + load = <0x03000000>; + }; + }; + + configurations { + default = "avz"; + + avz { + description = "AVZ hypervisor on RPi4 64-bit"; + kernel = "avz"; + loadables = "avz_dt"; + fdt = "avz_dt"; + }; + }; +}; diff --git a/build/meta-bsp/recipes-bsp/so3/files/its/rpi4_64_capsule.its b/build/meta-bsp/recipes-bsp/so3/files/its/rpi4_64_capsule.its new file mode 100644 index 0000000..1788053 --- /dev/null +++ b/build/meta-bsp/recipes-bsp/so3/files/its/rpi4_64_capsule.its @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2020 Daniel Rossier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +/dts-v1/; + +/ { + description = "Kernel and rootfs components for rpi4_64 (armv8) environment"; + + images { + + so3 { + description = "SO3 OS kernel"; + data = /incbin/("${IB_SO3_PATH}/so3/so3.bin"); + type = "guest"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <0x41080000>; + entry = <0x41080000>; + }; + + fdt { + description = "Flattened Device Tree blob"; + data = /incbin/("${IB_SO3_PATH}/so3/dts/rpi4_64_capsule.dtb"); + type = "flat_dt"; + arch = "arm64"; + compression = "none"; + load = <0x43000000>; + }; + + ramfs { + description = "SO3 environment minimal rootfs"; + data = /incbin/("${IB_ROOTFS_PATH}/rootfs.fat"); + type = "ramdisk"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <0x43500000>; + }; + +}; + + configurations { + default = "so3_ramfs"; + + so3_ramfs { + description = "SO3 kernel image including device tree"; + kernel = "so3"; + fdt = "fdt"; + ramdisk = "ramfs"; + }; + + so3_mmc { + description = "SO3 kernel image including device tree"; + kernel = "so3"; + fdt = "fdt"; + }; + }; + +}; diff --git a/build/meta-bsp/recipes-bsp/so3/files/its/rpi4_64_so3.its b/build/meta-bsp/recipes-bsp/so3/files/its/rpi4_64_so3.its new file mode 100644 index 0000000..ada5eca --- /dev/null +++ b/build/meta-bsp/recipes-bsp/so3/files/its/rpi4_64_so3.its @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2020 Daniel Rossier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +/dts-v1/; + +/ { + description = "Kernel and rootfs components for Raspberry Pi 4 (armv8) environment"; + + images { + + so3 { + description = "SO3 OS kernel"; + data = /incbin/("${IB_SO3_PATH}/so3/so3.bin"); + type = "kernel"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <0x01080000>; + entry = <0x01080000>; + }; + + fdt { + description = "Flattened Device Tree blob"; + data = /incbin/("${IB_SO3_PATH}/so3/dts/rpi4_64.dtb"); + type = "flat_dt"; + arch = "arm64"; + compression = "none"; + load = <0x04a00000>; + + }; + + ramfs { + description = "SO3 environment minimal rootfs"; + data = /incbin/("${IB_ROOTFS_PATH}/rootfs.fat"); + type = "ramdisk"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <0x04c00000>; + }; + + }; + + configurations { + default = "so3"; + + so3 { + description = "SO3 on RPi4/64-bit"; + kernel = "so3"; + fdt = "fdt"; + ramdisk = "ramfs"; + }; + }; + +}; diff --git a/build/meta-bsp/recipes-bsp/so3/files/its/rpi4_64_so3_guest.its b/build/meta-bsp/recipes-bsp/so3/files/its/rpi4_64_so3_guest.its new file mode 100644 index 0000000..1ceb1db --- /dev/null +++ b/build/meta-bsp/recipes-bsp/so3/files/its/rpi4_64_so3_guest.its @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2020-2026 Daniel Rossier + * + * SO3 guest ITB for RPi4 (64-bit). Carries the SO3 OS kernel (guest) + + * its device tree + minimal rootfs. Paired with rpi4_64_avz.itb and + * loaded by U-Boot's guest-boot command, which passes this ITB to AVZ in + * x1; AVZ's loadAgency() loads the agency guest from it. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +/dts-v1/; + +/ { + description = "SO3 guest bundle for RPi4 (64-bit)"; + + images { + + so3 { + description = "SO3 OS kernel (guest)"; + data = /incbin/("${IB_SO3_PATH}/so3/so3.bin"); + type = "guest"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <0x10080000>; + entry = <0x10080000>; + }; + + fdt { + description = "SO3 guest device tree (AVZ-exposed)"; + data = /incbin/("${IB_SO3_PATH}/so3/dts/rpi4_64.dtb"); + type = "flat_dt"; + arch = "arm64"; + compression = "none"; + load = <0x15000000>; + }; + + ramfs { + description = "SO3 environment minimal rootfs"; + data = /incbin/("${IB_ROOTFS_PATH}/rootfs.fat"); + type = "ramdisk"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <0x15c00000>; + }; + }; + + configurations { + default = "capsule"; + + capsule { + description = "SO3 guest on RPi4 64-bit"; + loadables = "so3"; + fdt = "fdt"; + ramdisk = "ramfs"; + }; + }; +}; diff --git a/build/meta-bsp/recipes-bsp/so3/files/its/verdin_imx8mp_avz.its b/build/meta-bsp/recipes-bsp/so3/files/its/verdin_imx8mp_avz.its new file mode 100644 index 0000000..6f938c2 --- /dev/null +++ b/build/meta-bsp/recipes-bsp/so3/files/its/verdin_imx8mp_avz.its @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + * + * AVZ ITB for the Toradex Verdin iMX8MP. Carries only the AVZ hypervisor + * binary (so3.bin) + the AVZ device tree. The guest (SO3) lives in a + * SEPARATE ITB (verdin_imx8mp_so3_guest.its); both are loaded by U-Boot's + * guest-boot command, which passes the AVZ FIT in x0 and the guest ITB in x1. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +/dts-v1/; + +/ { + description = "AVZ Hypervisor bundle for the Toradex Verdin iMX8MP"; + + images { + avz { + description = "AVZ Hypervisor (64-bit) Polymorphic SO3"; + data = /incbin/("${IB_AVZ_PATH}/so3.bin"); + type = "kernel"; + os = "linux"; + arch = "arm64"; + compression = "none"; + load = <0x40080000>; + entry = <0x40080000>; + }; + + avz_dt { + description = "AVZ flattened device tree blob"; + data = /incbin/("${IB_AVZ_PATH}/dts/verdin-imx8mp_avz.dtb"); + type = "avz_dt"; + arch = "arm64"; + compression = "none"; + load = <0x46000000>; + }; + }; + + configurations { + default = "avz"; + + avz { + description = "AVZ hypervisor on Verdin iMX8MP"; + kernel = "avz"; + loadables = "avz_dt"; + fdt = "avz_dt"; + }; + }; +}; diff --git a/build/meta-bsp/recipes-bsp/so3/files/its/verdin_imx8mp_so3.its b/build/meta-bsp/recipes-bsp/so3/files/its/verdin_imx8mp_so3.its new file mode 100644 index 0000000..46504af --- /dev/null +++ b/build/meta-bsp/recipes-bsp/so3/files/its/verdin_imx8mp_so3.its @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +/dts-v1/; + +/ { + description = "SO3 standalone (bare-metal) for the Toradex Verdin iMX8MP"; + + images { + so3 { + description = "SO3 OS kernel"; + data = /incbin/("${IB_SO3_PATH}/so3/so3.bin"); + type = "kernel"; + os = "linux"; + arch = "arm64"; + compression = "none"; + load = <0x41080000>; + entry = <0x41080000>; + }; + + fdt { + description = "Flattened Device Tree blob"; + data = /incbin/("${IB_SO3_PATH}/so3/dts/verdin-imx8mp_standalone.dtb"); + type = "flat_dt"; + arch = "arm64"; + compression = "none"; + load = <0x44a00000>; + }; + + ramfs { + description = "SO3 environment minimal rootfs"; + data = /incbin/("${IB_ROOTFS_PATH}/rootfs.fat"); + type = "ramdisk"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <0x44c00000>; + }; + }; + + configurations { + default = "so3_ramfs"; + + so3_ramfs { + description = "SO3 kernel image including device tree"; + kernel = "so3"; + fdt = "fdt"; + ramdisk = "ramfs"; + }; + }; +}; diff --git a/build/meta-bsp/recipes-bsp/so3/files/its/verdin_imx8mp_so3_guest.its b/build/meta-bsp/recipes-bsp/so3/files/its/verdin_imx8mp_so3_guest.its new file mode 100644 index 0000000..661f611 --- /dev/null +++ b/build/meta-bsp/recipes-bsp/so3/files/its/verdin_imx8mp_so3_guest.its @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + * + * SO3 guest ITB for the Toradex Verdin iMX8MP. Carries the SO3 OS kernel + * (guest) + its device tree + minimal rootfs. Paired with + * verdin_imx8mp_avz.itb and loaded by U-Boot's guest-boot command, which + * passes this ITB to AVZ in x1; AVZ's loadAgency() loads the agency guest + * from it. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +/dts-v1/; + +/ { + description = "SO3 guest bundle for the Toradex Verdin iMX8MP"; + + images { + so3 { + description = "SO3 OS kernel (guest)"; + data = /incbin/("${IB_SO3_PATH}/so3/so3.bin"); + type = "guest"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <0x48000000>; + entry = <0x48000000>; + }; + + fdt { + description = "SO3 guest flattened device tree blob"; + data = /incbin/("${IB_SO3_PATH}/so3/dts/verdin-imx8mp.dtb"); + type = "flat_dt"; + arch = "arm64"; + compression = "none"; + load = <0x50200000>; + }; + + ramfs { + description = "SO3 environment minimal rootfs"; + data = /incbin/("${IB_ROOTFS_PATH}/rootfs.fat"); + type = "ramdisk"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <0x50c00000>; + }; + }; + + configurations { + default = "capsule"; + + capsule { + description = "SO3 guest on Verdin iMX8MP"; + loadables = "so3"; + fdt = "fdt"; + ramdisk = "ramfs"; + }; + }; +}; diff --git a/build/meta-bsp/recipes-bsp/so3/files/its/virt32_lvperf.its b/build/meta-bsp/recipes-bsp/so3/files/its/virt32_lvperf.its new file mode 100644 index 0000000..c88526d --- /dev/null +++ b/build/meta-bsp/recipes-bsp/so3/files/its/virt32_lvperf.its @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2025 André Costa + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * +*/ + + +/dts-v1/; + +/ { + description = "Kernel and rootfs components for virt32 environment"; + + images { + + so3 { + description = "SO3 OS kernel"; + data = /incbin/("${IB_SO3_PATH}/so3/so3.bin"); + type = "kernel"; + arch = "arm"; + os = "linux"; + compression = "none"; + load = <0x41008000>; + entry = <0x41008000>; + }; + + lvperf_fdt { + description = "Flattened Device Tree blob"; + data = /incbin/("${IB_SO3_PATH}/so3/dts/virt32_lvperf.dtb"); + type = "flat_dt"; + arch = "arm"; + compression = "none"; + load = <0x44a00000>; + + }; + + ramfs { + description = "SO3 environment minimal rootfs"; + data = /incbin/("${IB_ROOTFS_PATH}/rootfs.fat"); + type = "ramdisk"; + arch = "arm"; + os = "linux"; + compression = "none"; + load = <0x44c00000>; + }; + + + }; + + configurations { + default = "so3_lvperf_ramfs"; + so3_lvperf_ramfs { + description = "SO3 kernel image including device tree"; + kernel = "so3"; + fdt = "lvperf_fdt"; + ramdisk = "ramfs"; + }; + }; +}; diff --git a/build/meta-bsp/recipes-bsp/so3/files/its/virt32_so3.its b/build/meta-bsp/recipes-bsp/so3/files/its/virt32_so3.its new file mode 100644 index 0000000..45b89d1 --- /dev/null +++ b/build/meta-bsp/recipes-bsp/so3/files/its/virt32_so3.its @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2014-2023 Daniel Rossier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * +*/ + +/dts-v1/; + +/ { + description = "Kernel and rootfs components for virt32 environment"; + + images { + + so3 { + description = "SO3 OS kernel"; + data = /incbin/("${IB_SO3_PATH}/so3/so3.bin"); + type = "kernel"; + arch = "arm"; + os = "linux"; + compression = "none"; + load = <0x41008000>; + entry = <0x41008000>; + }; + + fdt { + description = "Flattened Device Tree blob"; + data = /incbin/("${IB_SO3_PATH}/so3/dts/virt32.dtb"); + type = "flat_dt"; + arch = "arm"; + compression = "none"; + load = <0x44a00000>; + + }; + + ramfs { + description = "SO3 environment minimal rootfs"; + data = /incbin/("${IB_ROOTFS_PATH}/rootfs.fat"); + type = "ramdisk"; + arch = "arm"; + os = "linux"; + compression = "none"; + load = <0x44c00000>; + }; + + + }; + + configurations { + default = "so3_ramfs"; + + so3_ramfs { + description = "SO3 kernel image including device tree"; + kernel = "so3"; + fdt = "fdt"; + ramdisk = "ramfs"; + }; + }; +}; diff --git a/build/meta-bsp/recipes-bsp/so3/files/its/virt64_avz.its b/build/meta-bsp/recipes-bsp/so3/files/its/virt64_avz.its new file mode 100644 index 0000000..c423256 --- /dev/null +++ b/build/meta-bsp/recipes-bsp/so3/files/its/virt64_avz.its @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2020-2026 Daniel Rossier + * + * AVZ ITB for virt64 (armv8). Carries only the AVZ hypervisor binary + * (so3.bin) + the AVZ device tree. The guest (SO3) lives in a SEPARATE + * ITB (virt64_so3_guest.its); both are loaded by U-Boot's guest-boot + * command, which passes the AVZ FIT in x0 and the guest ITB in x1. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +/dts-v1/; + +/ { + description = "AVZ Hypervisor bundle for virt64 (armv8)"; + + images { + + avz { + description = "AVZ Hypervisor (64-bit) Polymorphic SO3"; + data = /incbin/("${IB_AVZ_PATH}/so3.bin"); + type = "kernel"; + os = "linux"; + arch = "arm64"; + compression = "none"; + load = <0x40080000>; + entry = <0x40080000>; + }; + + avz_dt { + description = "AVZ device tree"; + data = /incbin/("${IB_AVZ_PATH}/dts/virt64_avz.dtb"); + type = "avz_dt"; + arch = "arm64"; + compression = "none"; + load = <0x46000000>; + }; + }; + + configurations { + default = "avz"; + + avz { + description = "AVZ hypervisor on virt64"; + kernel = "avz"; + loadables = "avz_dt"; + fdt = "avz_dt"; + }; + }; +}; diff --git a/build/meta-bsp/recipes-bsp/so3/files/its/virt64_capsule.its b/build/meta-bsp/recipes-bsp/so3/files/its/virt64_capsule.its new file mode 100644 index 0000000..4b23034 --- /dev/null +++ b/build/meta-bsp/recipes-bsp/so3/files/its/virt64_capsule.its @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2020 Daniel Rossier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +/dts-v1/; + +/ { + description = "Kernel and rootfs components for virt64 (armv8) environment"; + + images { + + so3 { + description = "SO3 OS kernel"; + data = /incbin/("${IB_SO3_PATH}/so3/so3.bin"); + type = "guest"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <0x41080000>; + entry = <0x41080000>; + }; + + fdt { + description = "Flattened Device Tree blob"; + data = /incbin/("${IB_SO3_PATH}/so3/dts/virt64_capsule.dtb"); + type = "flat_dt"; + arch = "arm64"; + compression = "none"; + load = <0x43000000>; + }; + + ramfs { + description = "SO3 environment minimal rootfs"; + data = /incbin/("${IB_ROOTFS_PATH}/rootfs.fat"); + type = "ramdisk"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <0x43500000>; + }; + +}; + + configurations { + default = "so3_ramfs"; + + so3_ramfs { + description = "SO3 kernel image including device tree"; + kernel = "so3"; + fdt = "fdt"; + ramdisk = "ramfs"; + }; + + so3_mmc { + description = "SO3 kernel image including device tree"; + kernel = "so3"; + fdt = "fdt"; + }; + }; + +}; diff --git a/build/meta-bsp/recipes-bsp/so3/files/its/virt64_lvperf.its b/build/meta-bsp/recipes-bsp/so3/files/its/virt64_lvperf.its new file mode 100644 index 0000000..f993f80 --- /dev/null +++ b/build/meta-bsp/recipes-bsp/so3/files/its/virt64_lvperf.its @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2025 André Costa + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +/* Based on virt64_so3_standalone.its */ + +/dts-v1/; + +/ { + description = "Kernel and rootfs components for virt64 (armv8) environment"; + + images { + so3 { + description = "SO3 OS kernel"; + data = /incbin/("${IB_SO3_PATH}/so3/so3.bin"); + type = "kernel"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <0x41080000>; + entry = <0x41080000>; + }; + + lvperf_fdt { + description = "Flattened Device Tree blob"; + data = /incbin/("${IB_SO3_PATH}/so3/dts/virt64_lvperf.dtb"); + type = "flat_dt"; + arch = "arm64"; + compression = "none"; + load = <0x44a00000>; + }; + + ramfs { + description = "SO3 environment minimal rootfs"; + data = /incbin/("${IB_ROOTFS_PATH}/rootfs.fat"); + type = "ramdisk"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <0x44c00000>; + }; + + }; + + configurations { + default = "so3_lvperf_ramfs"; + + so3_lvperf_ramfs { + description = "SO3 kernel image for lvgl perfomance tests"; + kernel = "so3"; + fdt = "lvperf_fdt"; + ramdisk = "ramfs"; + }; + }; + +}; diff --git a/build/meta-bsp/recipes-bsp/so3/files/its/virt64_so3.its b/build/meta-bsp/recipes-bsp/so3/files/its/virt64_so3.its new file mode 100644 index 0000000..cb0d4f4 --- /dev/null +++ b/build/meta-bsp/recipes-bsp/so3/files/its/virt64_so3.its @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2020-2025 Daniel Rossier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +/dts-v1/; + +/ { + description = "Kernel and rootfs components for virt64 (armv8) environment"; + + images { + so3 { + description = "SO3 OS kernel"; + data = /incbin/("${IB_SO3_PATH}/so3/so3.bin"); + type = "kernel"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <0x41080000>; + entry = <0x41080000>; + }; + + fdt { + description = "Flattened Device Tree blob"; + data = /incbin/("${IB_SO3_PATH}/so3/dts/virt64.dtb"); + type = "flat_dt"; + arch = "arm64"; + compression = "none"; + load = <0x44a00000>; + }; + + ramfs { + description = "SO3 environment minimal rootfs"; + data = /incbin/("${IB_ROOTFS_PATH}/rootfs.fat"); + type = "ramdisk"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <0x44c00000>; + }; + + }; + + configurations { + default = "so3_ramfs"; + + so3_ramfs { + description = "SO3 kernel image including device tree"; + kernel = "so3"; + fdt = "fdt"; + ramdisk = "ramfs"; + }; + + so3_mmc { + description = "SO3 kernel image including device tree"; + kernel = "so3"; + fdt = "fdt"; + }; + }; + +}; diff --git a/build/meta-bsp/recipes-bsp/so3/files/its/virt64_so3_guest.its b/build/meta-bsp/recipes-bsp/so3/files/its/virt64_so3_guest.its new file mode 100644 index 0000000..20777ef --- /dev/null +++ b/build/meta-bsp/recipes-bsp/so3/files/its/virt64_so3_guest.its @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2020-2026 Daniel Rossier + * + * SO3 guest ITB for virt64 (armv8). Carries the SO3 OS kernel (guest) + + * its device tree + minimal rootfs. Paired with virt64_avz.itb and + * loaded by U-Boot's guest-boot command, which passes this ITB to AVZ in + * x1; AVZ's loadAgency() loads the agency guest from it. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + */ + +/dts-v1/; + +/ { + description = "SO3 guest bundle for virt64 (armv8)"; + + images { + + so3 { + description = "SO3 OS kernel (guest)"; + data = /incbin/("${IB_SO3_PATH}/so3/so3.bin"); + type = "guest"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <0x41080000>; + entry = <0x41080000>; + }; + + fdt { + description = "SO3 guest device tree (AVZ-exposed)"; + data = /incbin/("${IB_SO3_PATH}/so3/dts/virt64.dtb"); + type = "flat_dt"; + arch = "arm64"; + compression = "none"; + load = <0x50000000>; + }; + + ramfs { + description = "SO3 environment minimal rootfs"; + data = /incbin/("${IB_ROOTFS_PATH}/rootfs.fat"); + type = "ramdisk"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <0x50c00000>; + }; + }; + + configurations { + default = "capsule"; + + capsule { + description = "SO3 guest on virt64"; + loadables = "so3"; + fdt = "fdt"; + ramdisk = "ramfs"; + }; + }; +}; diff --git a/build/meta-bsp/recipes-bsp/so3/files/uEnv_rpi4_64_avz.txt b/build/meta-bsp/recipes-bsp/so3/files/uEnv_rpi4_64_avz.txt new file mode 100644 index 0000000..9049988 --- /dev/null +++ b/build/meta-bsp/recipes-bsp/so3/files/uEnv_rpi4_64_avz.txt @@ -0,0 +1,9 @@ +fdt_high=ffffffffffffffff +initrd_high=ffffffffffffffff + +# AVZ boot on RPi4 64-bit: two ITBs (AVZ + SO3 guest) loaded to staging +# addresses (above the 0x00080000-0x17c00000 sub-image extraction range), +# then jumped via the guest-boot U-Boot command which passes the AVZ FIT in +# x0 and the guest ITB in x1 (AVZ loadAgency loads the guest from x1). + +start=fatload mmc 0 0x20000000 rpi4_64_avz.itb; fatload mmc 0 0x30000000 rpi4_64_guest.itb; guest-boot 0x20000000 0x30000000 diff --git a/build/meta-bsp/recipes-bsp/so3/files/uEnv_virt64_avz.txt b/build/meta-bsp/recipes-bsp/so3/files/uEnv_virt64_avz.txt new file mode 100644 index 0000000..e36a575 --- /dev/null +++ b/build/meta-bsp/recipes-bsp/so3/files/uEnv_virt64_avz.txt @@ -0,0 +1,9 @@ +fdt_high=ffffffffffffffff +initrd_high=ffffffffffffffff + +# AVZ boot on virt64: two ITBs (AVZ + SO3 guest) loaded to staging +# addresses, then jumped via the guest-boot U-Boot command which passes the +# AVZ FIT in x0 and the guest ITB in x1 (AVZ loadAgency loads the guest +# from x1). EL2 is required (st.sh enables -M virt,virtualization=on). + +start=load virtio 0 0x65000000 virt64_avz.itb; load virtio 0 0x70000000 virt64_guest.itb; guest-boot 0x65000000 0x70000000 diff --git a/build/meta-filesystem/classes/filesystem.bbclass b/build/meta-filesystem/classes/filesystem.bbclass index 85a8b4d..da8b82b 100644 --- a/build/meta-filesystem/classes/filesystem.bbclass +++ b/build/meta-filesystem/classes/filesystem.bbclass @@ -1,22 +1,23 @@ +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD ################################################################### # # The filesystem creation class -# IB_STORAGE = soft create .img disk image +# IB_STORAGE_MODE = soft create .img disk image # Prepares a flashable filesystem image containing # two partitions one for the bootloader and one for the rootfs # using losetup(8) to mount the image on a loop device /dev/loopXX # -# IB_STORAGE = hard write to a real disk device +# IB_STORAGE_MODE = hard write to a real disk device # Writes to actual disk device, please double check config! # # this class is inherited by platform-specific filesystem creation # classes init_storage_XX # -# Also see the IB_STORAGE_*, IB_ROOTFS_* +# Also see the IB_STORAGE_MODE, IB_STORAGE_DEVICE, IB_ROOTFS_* # options in local.conf # -# Copyright (c) 2014-2023 REDS Institute, HEIG-VD -# Copyright (c) 2023-2025 EDGEMTech Ltd +# Copyright (c) 2014-2026 REDS Institute, HEIG-VD +# Copyright (c) 2023-2026 EDGEMTech Ltd # # Authors: # EDGEMTech Ltd, Daniel Rossier (daniel.rossier@edgemtech.ch) @@ -24,32 +25,37 @@ # ################################################################### -inherit logging inherit utils inherit fs_${IB_PLATFORM} IB_FILESYSTEM_PATH = "${IB_DIR}/filesystem" -# Create and initialize the storage (including formatting partitions) +# __do_fs_mount and __do_fs_umount must be implemented +# in the specific board class. + +# Create and initialize the storage (including formatting partitions). +# bitbake runs as the unprivileged user; privileged ops inside +# __platform_init_storage escalate via `utils_sudo` and rely on the +# caller having opened a sudo session (scripts/common/sudo_session.sh). def __do_fs_init_storage(d): - IB_STORAGE = d.getVar('IB_STORAGE') + IB_STORAGE_MODE = d.getVar('IB_STORAGE_MODE') IB_STORAGE_DEVICE = d.getVar('IB_STORAGE_DEVICE') WORKDIR = d.getVar("WORKDIR") - # Perform the check as this task can also be executed from a - # script or directly using bitbake - if utils_chk_is_root_user(d) == False: - bb.fatal(("Please re-run the task/script as root - " - "It is required to access loop devices")) - - if IB_STORAGE == "remote": + if IB_STORAGE_MODE == "remote": return None - if IB_STORAGE == "hard" and IB_STORAGE_DEVICE == "": - bb.fatal(("No device found; please edit conf/local.conf" - " IB_STORAGE_DEVICE is not set")) + # `not` catches both unset (commented out in local.conf -> None) and empty. + # IB_STORAGE_DEVICE has no default ON PURPOSE: a wrong/default device (e.g. + # /dev/sda) on a mechanical deploy could overwrite a host disk. + if IB_STORAGE_MODE == "hard" and not IB_STORAGE_DEVICE: + bb.fatal("IB_STORAGE_MODE is 'hard' for platform '%s' but IB_STORAGE_DEVICE " + "is not set. Refusing to initialise storage: writing to a wrong or " + "default device (e.g. /dev/sda) could overwrite a host disk. " + "Uncomment and set IB_STORAGE_DEVICE for this platform in " + "conf/local.conf before deploying." % (d.getVar('IB_PLATFORM') or '?')) # Perform the tasks specific to the platform __platform_init_storage(d) @@ -69,18 +75,15 @@ def __do_fs_init_storage(d): # Check the presence of the virtual disk image # if the deployment is done on the virtual ("soft") storage # and call filesystem:fs_init_storage() if it does not exist + def __do_fs_check(d): import subprocess IB_PLATFORM = d.getVar('IB_PLATFORM') - IB_STORAGE = d.getVar('IB_STORAGE') + IB_STORAGE_MODE = d.getVar('IB_STORAGE_MODE') IB_FILESYSTEM_PATH = d.getVar('IB_FILESYSTEM_PATH') - # Check if the user is running the filesystem recipe as root - if utils_chk_is_root_user(d) == False: - bb.fatal("Please re-run the task/script as root") - - if IB_STORAGE == "soft": + if IB_STORAGE_MODE == "soft": image_path = os.path.join(IB_FILESYSTEM_PATH , "work", f"sdcard.img.{IB_PLATFORM}") if not os.path.isfile(image_path): bb.plain((f"The filesystem image: sdcard.img.{IB_PLATFORM} " @@ -88,106 +91,6 @@ def __do_fs_check(d): __do_fs_init_storage(d) -# Mount the partitions to p1, p2 respectively -def __do_fs_mount(d): - import os - import subprocess - import json - import errno - - WORKDIR = d.getVar('IB_FILESYSTEM_PATH') + "/work" - IB_STORAGE = d.getVar('IB_STORAGE') - IB_PLATFORM = d.getVar('IB_PLATFORM') - IB_STORAGE_DEVICE = d.getVar('IB_STORAGE_DEVICE') - IB_FILESYSTEM_PATH = d.getVar('IB_FILESYSTEM_PATH') - TMPDIR = d.getVar("TMPDIR") - - # Check if the user is running the filesystem recipe as root - if utils_chk_is_root_user(d) == False: - bb.fatal("Please re-run the task/script as root") - - if IB_STORAGE == "soft": - img_path = f"{WORKDIR}/sdcard.img.{IB_PLATFORM}" - - # Check if image exists before running losetup - try: - os.stat(img_path) - except OSError as e: - if e.errno == errno.ENOENT: - bb.fatal(f"{img_path} does not exist") - - p1 = os.path.join(WORKDIR, "p1") - p2 = os.path.join(WORKDIR, "p2") - - if os.path.ismount(p1): - bb.warn(f"{p1} is already mounted - avoid remount") - return - - if os.path.ismount(p2): - bb.warn(f"{p2} is already mounted - avoid remount") - return - - os.makedirs(p1, exist_ok=True) - os.makedirs(p2, exist_ok=True) - - if IB_STORAGE == "soft": - - try: - devname = subprocess.check_output( - f"losetup --partscan --find --show {img_path}", shell=True, - text=True).strip() - except Exception as e: - bb.fatal((f"Could not attach image: {img_path}" - f" to a loop device error: {e}")) - - # Keep device name only without /dev/ - devname = devname.replace("/dev/", "") - else: - devname = d.getVar('IB_STORAGE_DEVICE') - - shdata = { - 'IB_FILESYSTEM_DEVNAME': devname - } - - # NOTE: Currently this file is only written too - path = os.path.join(TMPDIR, "global_datastore.json") - with open(path, "w") as f: - json.dump(shdata, f) - - f.close() - utils_chown_file(d, path) - - if devname[-1].isdigit(): - devname += "p" - - # TODO: handle more than 2 partitions - try: - subprocess.run(['mount', f'/dev/{devname}1', os.path.join(WORKDIR, 'p1')], check=True) - - except Exception as e: - bb.fatal((f"Could not mount image: {IB_FILESYSTEM_PATH}" - f" on /dev/{devname}1 error: {e}")) - - try: - subprocess.run(['mount', f'/dev/{devname}2', os.path.join(WORKDIR, 'p2')], check=True) - - except Exception as e: - bb.fatal((f"Could not mount image: {IB_FILESYSTEM_PATH}" - f" on /dev/{devname}2 error: {e}")) - - bb.note(f"Mounted filesystem at: {IB_FILESYSTEM_PATH}/p1,p2") - - if os.path.ismount(os.path.join(WORKDIR, 'p1')): - if os.path.lexists(IB_FILESYSTEM_PATH + "/p1"): - os.remove(IB_FILESYSTEM_PATH + "/p1") - os.symlink(os.path.join(WORKDIR, 'p1'), IB_FILESYSTEM_PATH+"/p1") - - if os.path.ismount(os.path.join(WORKDIR, 'p2')): - if os.path.lexists(IB_FILESYSTEM_PATH + "/p2"): - os.remove(IB_FILESYSTEM_PATH + "/p2") - os.symlink(os.path.join(WORKDIR, 'p2'), IB_FILESYSTEM_PATH+"/p2") - - def __do_main_umount(d, partition_number): import os @@ -207,41 +110,16 @@ def __do_main_umount(d, partition_number): time.sleep(1) # Unmount the source directory - os.system(f"umount '{directory}'") + utils_sudo(["umount", directory]) else: bb.warn(f"{directory} wasn't mounted - will remove mount point dir") - # Remove the mountpoint dir and the symlink in the fs staging area - os.system(f"rm -rf '{directory}'") - os.system(f"rm '{IB_FILESYSTEM_PATH}/p{partition_number}'") - - utils_restore_user_ownership(d) - -def __do_fs_umount(d): - import subprocess - - IB_FILESYSTEM_PATH = d.getVar('IB_FILESYSTEM_PATH') - WORKDIR = d.getVar('WORKDIR') - - # Check if the user is running the filesystem recipe as root - if utils_chk_is_root_user(d) == False: - bb.fatal("Please re-run the task/script as root") - - __do_main_umount(d, 1) - __do_main_umount(d, 2) - - try: - subprocess.run(['losetup', '-D'], check=True) - - except Exception as e: - bb.fatal(f"Failed during losetup -D operation, could not unmount all devices: {e}") - - # Change ownership of filesystem/sdcard.img.* and filesystem/work - utils_chown_dir(d, f"{IB_FILESYSTEM_PATH}", follow_symlinks=False, recursive=True) - - # And of the filesystem/ dir itself - utils_chown_dir(d, f"{IB_FILESYSTEM_PATH}", follow_symlinks=False, recursive=False) + # Remove the mountpoint dir (root-owned because mount populated it) + # and the symlink in the fs staging area (user-owned). + utils_sudo(["rm", "-rf", directory]) + if os.path.lexists(f"{IB_FILESYSTEM_PATH}/p{partition_number}"): + os.remove(f"{IB_FILESYSTEM_PATH}/p{partition_number}") python do_fs_mount () { @@ -272,5 +150,3 @@ do_fs_check[nostamp] = "1" do_fs_init_storage[nostamp] = "1" do_fs_mount[nostamp] = "1" do_fs_umount[nostamp] = "1" - - diff --git a/build/meta-filesystem/classes/fs_arm_common.bbclass b/build/meta-filesystem/classes/fs_arm_common.bbclass index 8104d70..c50066f 100644 --- a/build/meta-filesystem/classes/fs_arm_common.bbclass +++ b/build/meta-filesystem/classes/fs_arm_common.bbclass @@ -1,18 +1,23 @@ - -# Specific task description for formatting -# the storage of ARM platform with 3 partitions - -# Partition layout is as follows: -# - Partition #1: 128 MB (u-boot, kernel, etc.) -# - Partition #2: 400 MB (Main rootfs) -# - Partition #3: 100 MB (A data partition used for SO3 capsules for example) +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + +# Storage layout for ARM platforms (sdcard.img, IB_ROOTFS_SIZE total). +# +# Two partitions: +# - p1, FAT, 128 MiB — boot partition +# uEnv.txt, AVZ ITB (small), legacy firmware artefacts +# - p2, ext4, ~rest of IB_ROOTFS_SIZE — rootfs partition (label "rootfs1") +# / — Linux rootfs proper (deployed by rootfs-linux). +# +# bitbake itself runs as the unprivileged user. Each privileged op +# (losetup/fdisk/mkfs/mount/umount) goes through utils_sudo (`sudo -n`) +# and assumes the caller pre-opened a sudo session. def __platform_init_storage(d): import os import subprocess - from bb.process import run - IB_STORAGE = d.getVar('IB_STORAGE') + IB_STORAGE_MODE = d.getVar('IB_STORAGE_MODE') IB_ROOTFS_SIZE = d.getVar('IB_ROOTFS_SIZE') IB_PLATFORM = d.getVar('IB_PLATFORM') IB_STORAGE_DEVICE = d.getVar('IB_STORAGE_DEVICE') @@ -24,9 +29,9 @@ def __platform_init_storage(d): store_path = os.path.join(WORKDIR, store_filename) devname = IB_STORAGE_DEVICE - if IB_STORAGE == "soft": - # Make sure the filesystem dir exists - run(f"sudo mkdir -p {IB_FILESYSTEM_PATH}") + if IB_STORAGE_MODE == "soft": + # Make sure the filesystem dir exists (user-owned) + os.makedirs(IB_FILESYSTEM_PATH, exist_ok=True) # Create image first print(f"Creating {store_path}") @@ -34,7 +39,7 @@ def __platform_init_storage(d): dd_size = IB_ROOTFS_SIZE subprocess.run(["truncate", "-s", dd_size, store_path]) - devname = subprocess.run(["losetup", "--partscan", "--find", "--show", store_path], + devname = utils_sudo(["losetup", "--partscan", "--find", "--show", store_path], capture_output=True, text=True).stdout.strip() print(devname) @@ -67,7 +72,7 @@ def __platform_init_storage(d): # Create the partition layout this way # TODO: use sfdisk(8) which is more suitable for scripting fdisk_input = "o\nn\np\n\n\n+128M\nt\nc\na\nn\np\n\n\n+1600M\nw\n" - subprocess.run(["fdisk", f"/dev/{devname}"], input=fdisk_input.encode()) + utils_sudo(["fdisk", f"/dev/{devname}"], input=fdisk_input.encode()) print("Waiting ...") @@ -78,11 +83,11 @@ def __platform_init_storage(d): if devname[-1].isdigit(): devname += "p" - subprocess.run(["mkfs.fat", "-F32", "-a", "-v", "-n", "boot", f"/dev/{devname}1"]) - subprocess.run(["mkfs.ext4", "-L", "rootfs1", f"/dev/{devname}2"]) + utils_sudo(["mkfs.fat", "-F32", "-a", "-v", "-n", "boot", f"/dev/{devname}1"]) + utils_sudo(["mkfs.ext4", "-L", "rootfs1", f"/dev/{devname}2"]) - if IB_STORAGE == "soft": - subprocess.run(["losetup", "-D"]) + if IB_STORAGE_MODE == "soft": + utils_sudo(["losetup", "-D"]) print("Done! The storage is now initialized") @@ -91,23 +96,23 @@ def __platform_init_storage(d): # Create and initialize the storage (including formatting partitions) def __do_fs_init_storage(d): - IB_STORAGE = d.getVar('IB_STORAGE') + IB_STORAGE_MODE = d.getVar('IB_STORAGE_MODE') IB_STORAGE_DEVICE = d.getVar('IB_STORAGE_DEVICE') WORKDIR = d.getVar("WORKDIR") - # Perform the check as this task can also be executed from a - # script or directly using bitbake - if utils_chk_is_root_user(d) == False: - bb.fatal(("Please re-run the task/script as root - " - "It is required to access loop devices")) - - if IB_STORAGE == "remote": + if IB_STORAGE_MODE == "remote": return None - if IB_STORAGE == "hard" and IB_STORAGE_DEVICE == "": - bb.fatal(("No device found; please edit conf/local.conf" - " IB_STORAGE_DEVICE is not set")) + # `not` catches both unset (commented out in local.conf -> None) and empty. + # IB_STORAGE_DEVICE has no default ON PURPOSE: a wrong/default device (e.g. + # /dev/sda) on a mechanical deploy could overwrite a host disk. + if IB_STORAGE_MODE == "hard" and not IB_STORAGE_DEVICE: + bb.fatal("IB_STORAGE_MODE is 'hard' for platform '%s' but IB_STORAGE_DEVICE " + "is not set. Refusing to initialise storage: writing to a wrong or " + "default device (e.g. /dev/sda) could overwrite a host disk. " + "Uncomment and set IB_STORAGE_DEVICE for this platform in " + "conf/local.conf before deploying." % (d.getVar('IB_PLATFORM') or '?')) # Perform the tasks specific to the platform __platform_init_storage(d) @@ -121,40 +126,27 @@ def __do_fs_init_storage(d): # Remove the existing symbolic link os.unlink(target_link) - # Restore the ownership of the filesystem workdir to - # the user that ran the task - note that this is done before the filesystem - # is mounted to avoid touching the mounted rootfs - utils_chown_dir(d, WORKDIR) - os.symlink(WORKDIR, target_link) - utils_restore_user_ownership(d) - # Check the presence of the virtual disk image # if the deployment is done on the virtual ("soft") storage # and call filesystem:fs_init_storage() if it does not exist + def __do_fs_check(d): import subprocess IB_PLATFORM = d.getVar('IB_PLATFORM') - IB_STORAGE = d.getVar('IB_STORAGE') + IB_STORAGE_MODE = d.getVar('IB_STORAGE_MODE') IB_FILESYSTEM_PATH = d.getVar('IB_FILESYSTEM_PATH') - uid = utils_get_user_uid(d) - - # Check if the user is running the filesystem recipe as root - if utils_chk_is_root_user(d) == False: - bb.fatal("Please re-run the task/script as root") - - if IB_STORAGE == "soft": + if IB_STORAGE_MODE == "soft": image_path = os.path.join(IB_FILESYSTEM_PATH , "work", f"sdcard.img.{IB_PLATFORM}") if not os.path.isfile(image_path): bb.plain((f"The filesystem image: sdcard.img.{IB_PLATFORM} " "does not exist - creating it")) __do_fs_init_storage(d) - utils_restore_user_ownership(d) # Mount the partitions to p1, p2 respectively def __do_fs_mount(d): @@ -164,17 +156,13 @@ def __do_fs_mount(d): import errno WORKDIR = d.getVar('IB_FILESYSTEM_PATH') + "/work" - IB_STORAGE = d.getVar('IB_STORAGE') + IB_STORAGE_MODE = d.getVar('IB_STORAGE_MODE') IB_PLATFORM = d.getVar('IB_PLATFORM') IB_STORAGE_DEVICE = d.getVar('IB_STORAGE_DEVICE') IB_FILESYSTEM_PATH = d.getVar('IB_FILESYSTEM_PATH') TMPDIR = d.getVar("TMPDIR") - # Check if the user is running the filesystem recipe as root - if utils_chk_is_root_user(d) == False: - bb.fatal("Please re-run the task/script as root") - - if IB_STORAGE == "soft": + if IB_STORAGE_MODE == "soft": img_path = f"{WORKDIR}/sdcard.img.{IB_PLATFORM}" # Check if image exists before running losetup @@ -182,30 +170,33 @@ def __do_fs_mount(d): os.stat(img_path) except OSError as e: if e.errno == errno.ENOENT: - bb.fatal(f"{img_path} does not exist") + bb.fatal( + f"Storage image '{img_path}' does not exist: the filesystem " + f"for platform '{IB_PLATFORM}' has not been initialised yet.\n" + f"Deploy normally creates it automatically; if you reach this, " + f"initialise the storage explicitly by running:\n" + f" ./scripts/init_storage.sh\n" + f"then run the deploy again.") p1 = os.path.join(WORKDIR, "p1") p2 = os.path.join(WORKDIR, "p2") if os.path.ismount(p1): bb.warn(f"{p1} is already mounted - avoid remount") - utils_restore_user_ownership(d) return if os.path.ismount(p2): bb.warn(f"{p2} is already mounted - avoid remount") - utils_restore_user_ownership(d) return os.makedirs(p1, exist_ok=True) os.makedirs(p2, exist_ok=True) - if IB_STORAGE == "soft": + if IB_STORAGE_MODE == "soft": try: - devname = subprocess.check_output( - f"losetup --partscan --find --show {img_path}", shell=True, - text=True).strip() + devname = utils_sudo(["losetup", "--partscan", "--find", "--show", img_path], + capture_output=True, text=True, check=True).stdout.strip() except Exception as e: bb.fatal((f"Could not attach image: {img_path}" f" to a loop device error: {e}")) @@ -214,6 +205,15 @@ def __do_fs_mount(d): devname = devname.replace("/dev/", "") else: devname = d.getVar('IB_STORAGE_DEVICE') + # IB_STORAGE_DEVICE has no default ON PURPOSE (a wrong device could + # overwrite a host disk). Fail with an actionable message instead of + # crashing on `devname[-1]` below when it is unset. + if not devname: + bb.fatal("IB_STORAGE_DEVICE is not set for platform '%s' (IB_STORAGE_MODE='%s'). " + "Set it to the target device without /dev/ — e.g. " + "IB_STORAGE_DEVICE:%s = \"sda\" — in build/conf/local.conf, or use " + "IB_STORAGE_MODE:%s = \"soft\" to build a flashable sdcard.img instead." + % (IB_PLATFORM, IB_STORAGE_MODE, IB_PLATFORM, IB_PLATFORM)) shdata = { 'IB_FILESYSTEM_DEVNAME': devname @@ -225,21 +225,34 @@ def __do_fs_mount(d): json.dump(shdata, f); f.close() - utils_chown_file(d, path) if devname[-1].isdigit(): devname += "p" + # bitbake runs unprivileged in the post-refactor architecture (cf. + # utils_sudo). The subsequent __do_platform_deploy needs to write + # uEnv.txt, ITBs and rootfs payloads to both partitions WITHOUT + # escalating each cp/tar call. Make the mounts user-writable: + # - FAT (p1): pass uid=/gid= mount opts so every file appears + # owned by the invoking user (vfat has no on-disk uid/gid). + # - ext4 (p2): mount normally, then chown the root inode to the + # user (mkfs.ext4 sets / to root:root by default; chowning just + # the top inode is enough — children inherit the new owner). + uid = os.getuid() + gid = os.getgid() + # TODO: handle more than 2 partitions try: - subprocess.run(['mount', f'/dev/{devname}1', os.path.join(WORKDIR, 'p1')], check=True) + utils_sudo(['mount', '-o', f'uid={uid},gid={gid}', + f'/dev/{devname}1', os.path.join(WORKDIR, 'p1')], check=True) except Exception as e: bb.fatal((f"Could not mount image: {IB_FILESYSTEM_PATH}" f" on /dev/{devname}1 error: {e}")) try: - subprocess.run(['mount', f'/dev/{devname}2', os.path.join(WORKDIR, 'p2')], check=True) + utils_sudo(['mount', f'/dev/{devname}2', os.path.join(WORKDIR, 'p2')], check=True) + utils_sudo(['chown', f'{uid}:{gid}', os.path.join(WORKDIR, 'p2')], check=True) except Exception as e: bb.fatal((f"Could not mount image: {IB_FILESYSTEM_PATH}" @@ -257,21 +270,13 @@ def __do_fs_mount(d): os.remove(IB_FILESYSTEM_PATH + "/p2") os.symlink(os.path.join(WORKDIR, 'p2'), IB_FILESYSTEM_PATH+"/p2") - utils_restore_user_ownership(d) - def __do_fs_umount(d): IB_FILESYSTEM_PATH = d.getVar('IB_FILESYSTEM_PATH') WORKDIR = d.getVar('WORKDIR') - # Check if the user is running the filesystem recipe as root - if utils_chk_is_root_user(d) == False: - bb.fatal("Please re-run the task/script as root") - __do_main_umount(d, 1) __do_main_umount(d, 2) - os.system("losetup -D") - - utils_restore_user_ownership(d) + utils_sudo(["losetup", "-D"]) diff --git a/build/meta-filesystem/classes/fs_rpi4.bbclass b/build/meta-filesystem/classes/fs_rpi4.bbclass index bbc7c4e..0805ac4 100644 --- a/build/meta-filesystem/classes/fs_rpi4.bbclass +++ b/build/meta-filesystem/classes/fs_rpi4.bbclass @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD # Specific task description for formatting # the storage of Raspberry Pi 4 (32-bit) (rpi4) platform diff --git a/build/meta-filesystem/classes/fs_rpi4_64.bbclass b/build/meta-filesystem/classes/fs_rpi4_64.bbclass index fbac171..e970fb4 100644 --- a/build/meta-filesystem/classes/fs_rpi4_64.bbclass +++ b/build/meta-filesystem/classes/fs_rpi4_64.bbclass @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD # Specific task description for formatting # the storage of Raspberry Pi 4 (64-bit) (rpi4_64) platform diff --git a/build/meta-filesystem/classes/fs_verdin-imx8mp.bbclass b/build/meta-filesystem/classes/fs_verdin-imx8mp.bbclass index 2eb4b68..a7249aa 100644 --- a/build/meta-filesystem/classes/fs_verdin-imx8mp.bbclass +++ b/build/meta-filesystem/classes/fs_verdin-imx8mp.bbclass @@ -1,7 +1,13 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD # Specific task description for formatting -# the storage of imx8mp-verdin platform -inherit logging +# the storage of imx8mp-verdin platform. +# +# bitbake runs unprivileged; root ops go through utils_sudo (`sudo -n`). +# The caller (deploy.sh / build.sh / mount.sh / umount.sh) is expected +# to have opened a sudo session beforehand. + inherit utils IB_FILESYSTEM_PATH = "${IB_DIR}/filesystem" @@ -10,9 +16,8 @@ IB_FILESYSTEM_PATH = "${IB_DIR}/filesystem" def __platform_init_storage(d): import os import subprocess - from bb.process import run - IB_STORAGE = d.getVar('IB_STORAGE') + IB_STORAGE_MODE = d.getVar('IB_STORAGE_MODE') IB_ROOTFS_SIZE = d.getVar('IB_ROOTFS_SIZE') IB_PLATFORM = d.getVar('IB_PLATFORM') IB_STORAGE_DEVICE = d.getVar('IB_STORAGE_DEVICE') @@ -30,9 +35,8 @@ def __platform_init_storage(d): print(f"Partitioning and formatting: {devname}") - subprocess.run(["parted", f"/dev/{devname}", "--script", "mklabel", "msdos"]) - subprocess.run(["parted", f"/dev/{devname}", "--script", "mkpart", "primary", "ext4", "2048s", "100%"]) - + utils_sudo(["parted", f"/dev/{devname}", "--script", "mklabel", "msdos"]) + utils_sudo(["parted", f"/dev/{devname}", "--script", "mkpart", "primary", "ext4", "2048s", "100%"]) print("Waiting ...") @@ -40,7 +44,7 @@ def __platform_init_storage(d): # Give a chance to the USB drive to be sync'd time.sleep(2) - subprocess.run(["mkfs.ext4", "-L", "TEZI", f"/dev/{devname}1"]) + utils_sudo(["mkfs.ext4", "-L", "TEZI", f"/dev/{devname}1"]) print("Done! The storage is now initialized") @@ -49,16 +53,20 @@ def __platform_init_storage(d): # Create and initialize the storage (including formatting partitions) def __do_fs_init_storage(d): - IB_STORAGE = d.getVar('IB_STORAGE') + IB_STORAGE_MODE = d.getVar('IB_STORAGE_MODE') IB_STORAGE_DEVICE = d.getVar('IB_STORAGE_DEVICE') WORKDIR = d.getVar("WORKDIR") - # Perform the check as this task can also be executed from a - # script or directly using bitbake - if utils_chk_is_root_user(d) == False: - bb.fatal(("Please re-run the task/script as root - " - "It is required to access loop devices")) + # __platform_init_storage partitions/formats /dev/${IB_STORAGE_DEVICE} + # unconditionally, so refuse if it is unset (commented out -> None) or empty. + # IB_STORAGE_DEVICE has no default ON PURPOSE: a wrong/default device (e.g. + # /dev/sda) on a mechanical deploy could overwrite a host disk. + if not IB_STORAGE_DEVICE: + bb.fatal("IB_STORAGE_DEVICE is not set for platform '%s'. Refusing to " + "partition/format: a wrong or default device (e.g. /dev/sda) could " + "overwrite a host disk. Uncomment and set IB_STORAGE_DEVICE in " + "conf/local.conf before deploying to hardware." % (d.getVar('IB_PLATFORM') or '?')) # Perform the tasks specific to the platform __platform_init_storage(d) @@ -72,24 +80,16 @@ def __do_fs_init_storage(d): # Remove the existing symbolic link os.unlink(target_link) - # Restore the ownership of the filesystem workdir to - # the user that ran the task - note that this is done before the filesystem - # is mounted to avoid touching the mounted rootfs - utils_chown_dir(d, WORKDIR) - os.symlink(WORKDIR, target_link) - utils_restore_user_ownership(d) - # Check the presence of the virtual disk image # if the deployment is done on the virtual ("soft") storage # and call filesystem:fs_init_storage() if it does not exist + def __do_fs_check(d): import subprocess - utils_restore_user_ownership(d) - def __do_fs_mount(d): import os @@ -99,26 +99,21 @@ def __do_fs_mount(d): IB_STORAGE_DEVICE = d.getVar('IB_STORAGE_DEVICE') IB_FILESYSTEM_PATH = d.getVar('IB_FILESYSTEM_PATH') - if utils_chk_is_root_user(d) == False: - bb.fatal("Please re-run the task/script as root") - usb_mountpoint = os.path.join(WORKDIR, "usb") if os.path.ismount(usb_mountpoint): bb.warn(f"{usb_mountpoint} is already mounted - avoid remount") - utils_restore_user_ownership(d) return os.makedirs(usb_mountpoint, exist_ok=True) try: - subprocess.run(['mount', f'/dev/{IB_STORAGE_DEVICE}1', - os.path.join(WORKDIR, 'usb')], check=True) + utils_sudo(['mount', f'/dev/{IB_STORAGE_DEVICE}1', + os.path.join(WORKDIR, 'usb')], check=True) except Exception as e: bb.fatal(f"Could not mount USB: {e}") bb.plain(f"Mounted USB at: {WORKDIR}/usb") - utils_restore_user_ownership(d) def __do_fs_umount(d): @@ -126,9 +121,6 @@ def __do_fs_umount(d): IB_FILESYSTEM_PATH = d.getVar('IB_FILESYSTEM_PATH') - if utils_chk_is_root_user(d) == False: - bb.fatal("Please re-run the task/script as root") - usb_mountpoint = f"{IB_FILESYSTEM_PATH}/work/usb" if os.path.ismount(usb_mountpoint): @@ -138,10 +130,8 @@ def __do_fs_umount(d): os.sync() time.sleep(1) - os.system(f"umount '{usb_mountpoint}'") + utils_sudo(["umount", usb_mountpoint]) else: bb.warn(f"{usb_mountpoint} wasn't mounted") - os.system(f"rm -rf '{usb_mountpoint}'") - - utils_restore_user_ownership(d) \ No newline at end of file + utils_sudo(["rm", "-rf", usb_mountpoint]) diff --git a/build/meta-filesystem/classes/fs_virt32.bbclass b/build/meta-filesystem/classes/fs_virt32.bbclass index ae6be4e..4a13093 100644 --- a/build/meta-filesystem/classes/fs_virt32.bbclass +++ b/build/meta-filesystem/classes/fs_virt32.bbclass @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD # Specific task description for formatting # the storage of virt32 platform diff --git a/build/meta-filesystem/classes/fs_virt64.bbclass b/build/meta-filesystem/classes/fs_virt64.bbclass index e8d9cb1..7b7dfc1 100644 --- a/build/meta-filesystem/classes/fs_virt64.bbclass +++ b/build/meta-filesystem/classes/fs_virt64.bbclass @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD # Specific task description for formatting # the storage of virt64 platform diff --git a/build/meta-filesystem/classes/fs_x86-pc.bbclass b/build/meta-filesystem/classes/fs_x86-pc.bbclass index 9cf9e5a..8859fc8 100644 --- a/build/meta-filesystem/classes/fs_x86-pc.bbclass +++ b/build/meta-filesystem/classes/fs_x86-pc.bbclass @@ -1,15 +1,20 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD # TODO: move to a Python function # Specific task description for formatting -# the storage of x86 platform with one partition +# the storage of x86 platform with one partition. +# +# bitbake runs unprivileged; each privileged tool is invoked with +# `sudo -n` and assumes the caller pre-opened a sudo session. do_filesystem_platform_init_storage () { # Partition layout is as follows: # - Partition #1: 8 GB with rootfs including kernel image and GRUB - if [ "${IB_STORAGE}" = "soft" ]; then + if [ "${IB_STORAGE_MODE}" = "soft" ]; then # Create image first bbnote "Creating sdcard.img.${IB_PLATFORM} ..." @@ -17,7 +22,7 @@ do_filesystem_platform_init_storage () { truncate -s $dd_size ${WORKDIR}/sdcard.img.${IB_PLATFORM} - devname=$(losetup --partscan --find --show ${WORKDIR}/sdcard.img.${IB_PLATFORM}) + devname=$(sudo -n losetup --partscan --find --show ${WORKDIR}/sdcard.img.${IB_PLATFORM}) # Keep device name only without /dev/ devname=${devname#"/dev/"} @@ -36,7 +41,7 @@ do_filesystem_platform_init_storage () { # Create the partition layout this way - parted -s /dev/"$devname" mklabel msdos mkpart primary ext4 1MiB 100% + sudo -n parted -s /dev/"$devname" mklabel msdos mkpart primary ext4 1MiB 100% bbnote Waiting... @@ -49,13 +54,13 @@ do_filesystem_platform_init_storage () { set +e - mke2fs -F -t ext4 /dev/"$devname"1 - e2label /dev/"$devname"1 rootfs + sudo -n mke2fs -F -t ext4 /dev/"$devname"1 + sudo -n e2label /dev/"$devname"1 rootfs set -e - if [ "${IB_STORAGE}" = "soft" ]; then - losetup -D + if [ "${IB_STORAGE_MODE}" = "soft" ]; then + sudo -n losetup -D fi bbnote "Done! The storage is now initialized" diff --git a/build/meta-filesystem/classes/fs_x86-qemu.bbclass b/build/meta-filesystem/classes/fs_x86-qemu.bbclass index 5d650d2..7092fb7 100644 --- a/build/meta-filesystem/classes/fs_x86-qemu.bbclass +++ b/build/meta-filesystem/classes/fs_x86-qemu.bbclass @@ -1,13 +1,17 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD # Specific task description for formatting -# the storage of QEMU/x86 platform with one partition +# the storage of QEMU/x86 platform with one partition. +# +# bitbake runs unprivileged; root ops go through utils_sudo (`sudo -n`). def do_filesystem_platform_init_storage(d): import os import subprocess - IB_STORAGE = d.getVar('IB_STORAGE') + IB_STORAGE_MODE = d.getVar('IB_STORAGE_MODE') IB_PLATFORM = d.getVar('IB_PLATFORM') IB_DIR = d.getVar('IB_DIR') WORKDIR = d.getVar('WORKDIR') @@ -17,7 +21,7 @@ def do_filesystem_platform_init_storage(d): # Partition layout is as follows: # - Partition #1: 8 GB with rootfs including kernel image and GRUB - if IB_STORAGE != "soft": + if IB_STORAGE_MODE != "soft": raise ValueError("Cannot be a hard storage deployment ...") # Create image first @@ -27,7 +31,9 @@ def do_filesystem_platform_init_storage(d): subprocess.run(["truncate", "-s", dd_size, os.path.join(WORKDIR, store_filename)]) - devname = subprocess.check_output(["losetup", "--partscan", "--find", "--show", os.path.join(WORKDIR, "sdcard.img.{}".format(IB_PLATFORM))], text=True).strip() + devname = utils_sudo(["losetup", "--partscan", "--find", "--show", + os.path.join(WORKDIR, "sdcard.img.{}".format(IB_PLATFORM))], + capture_output=True, text=True).stdout.strip() # Keep device name only without /dev/ devname = devname.replace("/dev/", "") @@ -50,7 +56,7 @@ def do_filesystem_platform_init_storage(d): # Create the partition layout this way fdisk_input = "o\nn\np\n\n\n\n\n\nw\n" - subprocess.run(["fdisk", "/dev/{}".format(devname)], input=fdisk_input.encode()) + utils_sudo(["fdisk", "/dev/{}".format(devname)], input=fdisk_input.encode()) print("Waiting ...") @@ -60,12 +66,9 @@ def do_filesystem_platform_init_storage(d): if devname[-1].isdigit(): devname += "p" - subprocess.run(["mke2fs", "-F", "-t", "ext4", "/dev/{}1".format(devname)]) - subprocess.run(["e2label", "/dev/{}1".format(devname), "rootfs"]) + utils_sudo(["mke2fs", "-F", "-t", "ext4", "/dev/{}1".format(devname)]) + utils_sudo(["e2label", "/dev/{}1".format(devname), "rootfs"]) - subprocess.run(["losetup", "-D"]) + utils_sudo(["losetup", "-D"]) print("Done! The storage is now initialized") - - - diff --git a/build/meta-filesystem/conf/layer.conf b/build/meta-filesystem/conf/layer.conf index 0275b1b..59cf96a 100644 --- a/build/meta-filesystem/conf/layer.conf +++ b/build/meta-filesystem/conf/layer.conf @@ -1,3 +1,6 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + BBPATH .= ":${LAYERDIR}" BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend" diff --git a/build/meta-filesystem/recipes-filesystem/generic/filesystem_1.0.0.bb b/build/meta-filesystem/recipes-filesystem/generic/filesystem_1.0.0.bb index 18e5d03..a1efe0f 100644 --- a/build/meta-filesystem/recipes-filesystem/generic/filesystem_1.0.0.bb +++ b/build/meta-filesystem/recipes-filesystem/generic/filesystem_1.0.0.bb @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD SUMMARY = "Filesystem management" DESCRIPTION = "This is the core filesystem recipe to create a virtual or physical \ @@ -9,7 +11,6 @@ PV = "1.0.0" PR = "r0" inherit filesystem -inherit logging do_configure[noexec] = "1" do_attach_infrabase[noexec] = "1" diff --git a/build/meta-linux/classes/linux.bbclass b/build/meta-linux/classes/linux.bbclass index cd07919..4754896 100644 --- a/build/meta-linux/classes/linux.bbclass +++ b/build/meta-linux/classes/linux.bbclass @@ -1,7 +1,8 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD # Class of Linux layer -inherit logging IB_LINUX_PATH = "${IB_DIR}/linux/linux" diff --git a/build/meta-linux/conf/layer.conf b/build/meta-linux/conf/layer.conf index 5a8dc05..62ead72 100644 --- a/build/meta-linux/conf/layer.conf +++ b/build/meta-linux/conf/layer.conf @@ -1,3 +1,6 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + BBPATH .= ":${LAYERDIR}" BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend" diff --git a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-r0-patches.inc b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-r0-patches.inc index 187f046..1576bdb 100644 --- a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-r0-patches.inc +++ b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-r0-patches.inc @@ -1,7 +1,8 @@ SRC_URI += "\ - file://0011-Makefile.patch \ - file://0003-virt64_defconfig.patch \ file://0002-virt64_guest.dts.patch \ + file://0003-virt64_defconfig.patch \ file://0004-virt64.dts.patch \ file://0005-Makefile.patch \ + file://0011-Makefile.patch \ + file://0053-virt64_defconfig.patch \ " diff --git a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-r0/0002-virt64_guest.dts.patch b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-r0/0002-virt64_guest.dts.patch index 7408499..25cbdf3 100644 --- a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-r0/0002-virt64_guest.dts.patch +++ b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-r0/0002-virt64_guest.dts.patch @@ -1,6 +1,6 @@ ---- /home/rossierd/soo/infrabase/build/tmp/work/linux-6.12-r0/linux-6.12/arch/arm64/boot/dts/arm/virt64_guest.dts 1970-01-01 01:00:00.000000000 +0100 -+++ ./arch/arm64/boot/dts/arm/virt64_guest.dts 2025-08-27 08:31:08.947351137 +0200 -@@ -0,0 +1,406 @@ +--- /dev/null 2026-03-20 16:30:38.468300202 +0100 ++++ ./arch/arm64/boot/dts/arm/virt64_guest.dts 2026-03-20 16:55:19.220277261 +0100 +@@ -0,0 +1,425 @@ +/dts-v1/; + +/ { @@ -16,7 +16,7 @@ + linux,cma { + compatible = "shared-dma-pool"; + reusable; -+ size = <0x0 0x6000000>; ++ size = <0x0 0xa000000>; + alignment = <0x0 0x1000>; + linux,cma-default; + }; @@ -278,28 +278,6 @@ + compatible = "virtio,mmio"; + }; + -+ gpio-keys { -+ #address-cells = <0x01>; -+ #size-cells = <0x00>; -+ compatible = "gpio-keys"; -+ -+ poweroff { -+ gpios = <&pl061 0x03 0x00>; -+ linux,code = <0x74>; -+ label = "GPIO Key Poweroff"; -+ }; -+ }; -+ -+ pl061: pl061@9030000 { -+ clock-names = "apb_pclk"; -+ clocks = <&apb_clk>; -+ interrupts = <0x00 0x07 0x04>; -+ gpio-controller; -+ #gpio-cells = <0x02>; -+ compatible = "arm,pl061\0arm,primecell"; -+ reg = <0x00 0x9030000 0x00 0x1000>; -+ }; -+ + pcie@10000000 { + interrupt-map-mask = <0x1800 0x00 0x00 0x07>; + interrupt-map = <0x00 0x00 0x00 0x01 0x8001 0x00 0x00 0x00 0x03 0x04 0x00 0x00 0x00 0x02 0x8001 0x00 0x00 0x00 0x04 0x04 0x00 0x00 0x00 0x03 0x8001 0x00 0x00 0x00 0x05 0x04 0x00 0x00 0x00 0x04 0x8001 0x00 0x00 0x00 0x06 0x04 0x800 0x00 0x00 0x01 0x8001 0x00 0x00 0x00 0x04 0x04 0x800 0x00 0x00 0x02 0x8001 0x00 0x00 0x00 0x05 0x04 0x800 0x00 0x00 0x03 0x8001 0x00 0x00 0x00 0x06 0x04 0x800 0x00 0x00 0x04 0x8001 0x00 0x00 0x00 0x03 0x04 0x1000 0x00 0x00 0x01 0x8001 0x00 0x00 0x00 0x05 0x04 0x1000 0x00 0x00 0x02 0x8001 0x00 0x00 0x00 0x06 0x04 0x1000 0x00 0x00 0x03 0x8001 0x00 0x00 0x00 0x03 0x04 0x1000 0x00 0x00 0x04 0x8001 0x00 0x00 0x00 0x04 0x04 0x1800 0x00 0x00 0x01 0x8001 0x00 0x00 0x00 0x06 0x04 0x1800 0x00 0x00 0x02 0x8001 0x00 0x00 0x00 0x03 0x04 0x1800 0x00 0x00 0x03 0x8001 0x00 0x00 0x00 0x04 0x04 0x1800 0x00 0x00 0x04 0x8001 0x00 0x00 0x00 0x05 0x04>; @@ -316,14 +294,6 @@ + compatible = "pci-host-ecam-generic"; + }; + -+ pl031@9010000 { -+ clock-names = "apb_pclk"; -+ clocks = <&apb_clk>; -+ interrupts = <0x00 0x02 0x04>; -+ reg = <0x00 0x9010000 0x00 0x1000>; -+ compatible = "arm,pl031\0arm,primecell"; -+ }; -+ + pl011@9000000 { + clock-names = "uartclk\0apb_pclk"; + clocks = <&apb_clk &apb_clk>; @@ -406,4 +376,53 @@ + compatible = "fixed-clock"; + }; + ++ clcd_clk: clcd-clk { ++ compatible = "fixed-clock"; ++ #clock-cells = <0x00>; ++ clock-frequency = <25175000>; ++ clock-output-names = "clcdclk"; ++ }; ++ ++ panel: panel { ++ compatible = "panel-dpi"; ++ width-mm = <152>; ++ height-mm = <91>; ++ ++ panel-timing { ++ clock-frequency = <25175000>; ++ hactive = <640>; ++ vactive = <480>; ++ hback-porch = <48>; ++ hfront-porch = <16>; ++ hsync-len = <96>; ++ vback-porch = <33>; ++ vfront-porch = <10>; ++ vsync-len = <2>; ++ hsync-active = <0>; ++ vsync-active = <0>; ++ de-active = <1>; ++ pixelclk-active = <0>; ++ }; ++ ++ port { ++ panel_in: endpoint { ++ remote-endpoint = <&clcd_out>; ++ }; ++ }; ++ }; ++ ++ clcd@8800000 { ++ compatible = "arm,pl111", "arm,primecell"; ++ reg = <0x00 0x8800000 0x00 0x1000>; ++ interrupts = <0x00 0x0a 0x04>; ++ clocks = <&clcd_clk>, <&apb_clk>; ++ clock-names = "clcdclk", "apb_pclk"; ++ ++ port { ++ clcd_out: endpoint { ++ remote-endpoint = <&panel_in>; ++ }; ++ }; ++ }; ++ +}; diff --git a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-r0/0003-virt64_defconfig.patch b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-r0/0003-virt64_defconfig.patch index 184c56b..3722811 100644 --- a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-r0/0003-virt64_defconfig.patch +++ b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-r0/0003-virt64_defconfig.patch @@ -1,6 +1,6 @@ --- /home/rossierd/soo/infrabase/build/tmp/work/linux-6.12-r0/linux-6.12/arch/arm64/configs/virt64_defconfig 1970-01-01 01:00:00.000000000 +0100 +++ ./arch/arm64/configs/virt64_defconfig 2025-05-27 18:49:40.454170662 +0200 -@@ -0,0 +1,9021 @@ +@@ -0,0 +1,9028 @@ +# +# Automatically generated file; DO NOT EDIT. +# Linux/arm64 6.12.0 Kernel Configuration @@ -4417,6 +4417,7 @@ +# +# CONFIG_DRM_PANEL_ABT_Y030XX067A is not set +# CONFIG_DRM_PANEL_ARM_VERSATILE is not set ++CONFIG_DRM_PANEL_SIMPLE=y +# CONFIG_DRM_PANEL_AUO_A030JTN01 is not set +# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set +# CONFIG_DRM_PANEL_INNOLUX_EJ030NA is not set @@ -4511,7 +4512,7 @@ +# CONFIG_TINYDRM_REPAPER is not set +# CONFIG_TINYDRM_ST7586 is not set +# CONFIG_TINYDRM_ST7735R is not set -+# CONFIG_DRM_PL111 is not set ++CONFIG_DRM_PL111=y +# CONFIG_DRM_XEN_FRONTEND is not set +# CONFIG_DRM_LIMA is not set +# CONFIG_DRM_PANFROST is not set @@ -4591,7 +4592,7 @@ +# Backlight & LCD device support +# +# CONFIG_LCD_CLASS_DEVICE is not set -+# CONFIG_BACKLIGHT_CLASS_DEVICE is not set ++CONFIG_BACKLIGHT_CLASS_DEVICE=y +# end of Backlight & LCD device support + +CONFIG_HDMI=y @@ -8867,10 +8868,17 @@ +# CONFIG_PANIC_ON_OOPS is not set +CONFIG_PANIC_ON_OOPS_VALUE=0 +CONFIG_PANIC_TIMEOUT=0 -+# CONFIG_SOFTLOCKUP_DETECTOR is not set ++CONFIG_LOCKUP_DETECTOR=y ++CONFIG_SOFTLOCKUP_DETECTOR=y ++CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=0 +CONFIG_HAVE_HARDLOCKUP_DETECTOR_BUDDY=y -+# CONFIG_HARDLOCKUP_DETECTOR is not set -+# CONFIG_DETECT_HUNG_TASK is not set ++CONFIG_HARDLOCKUP_DETECTOR_BUDDY=y ++CONFIG_HARDLOCKUP_DETECTOR=y ++CONFIG_HARDLOCKUP_DETECTOR_COUNTS_HRTIMER=y ++CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=0 ++CONFIG_DETECT_HUNG_TASK=y ++CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10 ++CONFIG_BOOTPARAM_HUNG_TASK_PANIC=0 +# CONFIG_WQ_WATCHDOG is not set +# CONFIG_WQ_CPU_INTENSIVE_REPORT is not set +# CONFIG_TEST_LOCKUP is not set diff --git a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-r0/0022-virt64.dts.patch b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-r0/0022-virt64.dts.patch new file mode 100644 index 0000000..4c08dc8 --- /dev/null +++ b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-r0/0022-virt64.dts.patch @@ -0,0 +1,392 @@ +--- a/arch/arm64/boot/dts/arm/virt64.dts ++++ b/arch/arm64/boot/dts/arm/virt64.dts +@@ -0,0 +1,389 @@ ++/dts-v1/; ++ ++/ { ++ interrupt-parent = <0x8001>; ++ #size-cells = <0x02>; ++ #address-cells = <0x02>; ++ compatible = "linux,dummy-virt"; ++ ++ psci { ++ migrate = <0xc4000005>; ++ cpu_on = <0xc4000003>; ++ cpu_off = <0x84000002>; ++ cpu_suspend = <0xc4000001>; ++ method = "hvc"; ++ compatible = "arm,psci-0.2\0arm,psci"; ++ }; ++ ++ memory@40000000 { ++ reg = <0x00 0x40000000 0x0 0x40000000>; ++ device_type = "memory"; ++ }; ++ ++ platform@c000000 { ++ interrupt-parent = <0x8001>; ++ ranges = <0x00 0x00 0xc000000 0x2000000>; ++ #address-cells = <0x01>; ++ #size-cells = <0x01>; ++ compatible = "qemu,platform\0simple-bus"; ++ }; ++ ++ fw-cfg@9020000 { ++ dma-coherent; ++ reg = <0x00 0x9020000 0x00 0x18>; ++ compatible = "qemu,fw-cfg-mmio"; ++ }; ++ ++ virtio_mmio@a000000 { ++ dma-coherent; ++ interrupts = <0x00 0x10 0x01>; ++ reg = <0x00 0xa000000 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a000200 { ++ dma-coherent; ++ interrupts = <0x00 0x11 0x01>; ++ reg = <0x00 0xa000200 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a000400 { ++ dma-coherent; ++ interrupts = <0x00 0x12 0x01>; ++ reg = <0x00 0xa000400 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a000600 { ++ dma-coherent; ++ interrupts = <0x00 0x13 0x01>; ++ reg = <0x00 0xa000600 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a000800 { ++ dma-coherent; ++ interrupts = <0x00 0x14 0x01>; ++ reg = <0x00 0xa000800 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a000a00 { ++ dma-coherent; ++ interrupts = <0x00 0x15 0x01>; ++ reg = <0x00 0xa000a00 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a000c00 { ++ dma-coherent; ++ interrupts = <0x00 0x16 0x01>; ++ reg = <0x00 0xa000c00 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a000e00 { ++ dma-coherent; ++ interrupts = <0x00 0x17 0x01>; ++ reg = <0x00 0xa000e00 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a001000 { ++ dma-coherent; ++ interrupts = <0x00 0x18 0x01>; ++ reg = <0x00 0xa001000 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a001200 { ++ dma-coherent; ++ interrupts = <0x00 0x19 0x01>; ++ reg = <0x00 0xa001200 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a001400 { ++ dma-coherent; ++ interrupts = <0x00 0x1a 0x01>; ++ reg = <0x00 0xa001400 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a001600 { ++ dma-coherent; ++ interrupts = <0x00 0x1b 0x01>; ++ reg = <0x00 0xa001600 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a001800 { ++ dma-coherent; ++ interrupts = <0x00 0x1c 0x01>; ++ reg = <0x00 0xa001800 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a001a00 { ++ dma-coherent; ++ interrupts = <0x00 0x1d 0x01>; ++ reg = <0x00 0xa001a00 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a001c00 { ++ dma-coherent; ++ interrupts = <0x00 0x1e 0x01>; ++ reg = <0x00 0xa001c00 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a001e00 { ++ dma-coherent; ++ interrupts = <0x00 0x1f 0x01>; ++ reg = <0x00 0xa001e00 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a002000 { ++ dma-coherent; ++ interrupts = <0x00 0x20 0x01>; ++ reg = <0x00 0xa002000 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a002200 { ++ dma-coherent; ++ interrupts = <0x00 0x21 0x01>; ++ reg = <0x00 0xa002200 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a002400 { ++ dma-coherent; ++ interrupts = <0x00 0x22 0x01>; ++ reg = <0x00 0xa002400 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a002600 { ++ dma-coherent; ++ interrupts = <0x00 0x23 0x01>; ++ reg = <0x00 0xa002600 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a002800 { ++ dma-coherent; ++ interrupts = <0x00 0x24 0x01>; ++ reg = <0x00 0xa002800 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a002a00 { ++ dma-coherent; ++ interrupts = <0x00 0x25 0x01>; ++ reg = <0x00 0xa002a00 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a002c00 { ++ dma-coherent; ++ interrupts = <0x00 0x26 0x01>; ++ reg = <0x00 0xa002c00 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a002e00 { ++ dma-coherent; ++ interrupts = <0x00 0x27 0x01>; ++ reg = <0x00 0xa002e00 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a003000 { ++ dma-coherent; ++ interrupts = <0x00 0x28 0x01>; ++ reg = <0x00 0xa003000 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a003200 { ++ dma-coherent; ++ interrupts = <0x00 0x29 0x01>; ++ reg = <0x00 0xa003200 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a003400 { ++ dma-coherent; ++ interrupts = <0x00 0x2a 0x01>; ++ reg = <0x00 0xa003400 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a003600 { ++ dma-coherent; ++ interrupts = <0x00 0x2b 0x01>; ++ reg = <0x00 0xa003600 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a003800 { ++ dma-coherent; ++ interrupts = <0x00 0x2c 0x01>; ++ reg = <0x00 0xa003800 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a003a00 { ++ dma-coherent; ++ interrupts = <0x00 0x2d 0x01>; ++ reg = <0x00 0xa003a00 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a003c00 { ++ dma-coherent; ++ interrupts = <0x00 0x2e 0x01>; ++ reg = <0x00 0xa003c00 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a003e00 { ++ dma-coherent; ++ interrupts = <0x00 0x2f 0x01>; ++ reg = <0x00 0xa003e00 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ gpio-keys { ++ #address-cells = <0x01>; ++ #size-cells = <0x00>; ++ compatible = "gpio-keys"; ++ ++ poweroff { ++ gpios = <&pl061 0x03 0x00>; ++ linux,code = <0x74>; ++ label = "GPIO Key Poweroff"; ++ }; ++ }; ++ ++ pl061: pl061@9030000 { ++ clock-names = "apb_pclk"; ++ clocks = <&apb_clk>; ++ interrupts = <0x00 0x07 0x04>; ++ gpio-controller; ++ #gpio-cells = <0x02>; ++ compatible = "arm,pl061\0arm,primecell"; ++ reg = <0x00 0x9030000 0x00 0x1000>; ++ }; ++ ++ pcie@10000000 { ++ interrupt-map-mask = <0x1800 0x00 0x00 0x07>; ++ interrupt-map = <0x00 0x00 0x00 0x01 0x8001 0x00 0x00 0x00 0x03 0x04 0x00 0x00 0x00 0x02 0x8001 0x00 0x00 0x00 0x04 0x04 0x00 0x00 0x00 0x03 0x8001 0x00 0x00 0x00 0x05 0x04 0x00 0x00 0x00 0x04 0x8001 0x00 0x00 0x00 0x06 0x04 0x800 0x00 0x00 0x01 0x8001 0x00 0x00 0x00 0x04 0x04 0x800 0x00 0x00 0x02 0x8001 0x00 0x00 0x00 0x05 0x04 0x800 0x00 0x00 0x03 0x8001 0x00 0x00 0x00 0x06 0x04 0x800 0x00 0x00 0x04 0x8001 0x00 0x00 0x00 0x03 0x04 0x1000 0x00 0x00 0x01 0x8001 0x00 0x00 0x00 0x05 0x04 0x1000 0x00 0x00 0x02 0x8001 0x00 0x00 0x00 0x06 0x04 0x1000 0x00 0x00 0x03 0x8001 0x00 0x00 0x00 0x03 0x04 0x1000 0x00 0x00 0x04 0x8001 0x00 0x00 0x00 0x04 0x04 0x1800 0x00 0x00 0x01 0x8001 0x00 0x00 0x00 0x06 0x04 0x1800 0x00 0x00 0x02 0x8001 0x00 0x00 0x00 0x03 0x04 0x1800 0x00 0x00 0x03 0x8001 0x00 0x00 0x00 0x04 0x04 0x1800 0x00 0x00 0x04 0x8001 0x00 0x00 0x00 0x05 0x04>; ++ #interrupt-cells = <0x01>; ++ ranges = <0x1000000 0x00 0x00 0x00 0x3eff0000 0x00 0x10000 0x2000000 0x00 0x10000000 0x00 0x10000000 0x00 0x2eff0000 0x3000000 0x80 0x00 0x80 0x00 0x80 0x00>; ++ reg = <0x40 0x10000000 0x00 0x10000000>; ++ msi-parent = <&v2m>; ++ dma-coherent; ++ bus-range = <0x00 0xff>; ++ linux,pci-domain = <0x00>; ++ #size-cells = <0x02>; ++ #address-cells = <0x03>; ++ device_type = "pci"; ++ compatible = "pci-host-ecam-generic"; ++ }; ++ ++ pl031@9010000 { ++ clock-names = "apb_pclk"; ++ clocks = <&apb_clk>; ++ interrupts = <0x00 0x02 0x04>; ++ reg = <0x00 0x9010000 0x00 0x1000>; ++ compatible = "arm,pl031\0arm,primecell"; ++ }; ++ ++ pl011@9000000 { ++ clock-names = "uartclk\0apb_pclk"; ++ clocks = <&apb_clk &apb_clk>; ++ interrupts = <0x00 0x01 0x04>; ++ reg = <0x00 0x9000000 0x00 0x1000>; ++ compatible = "arm,pl011\0arm,primecell"; ++ }; ++ ++ pmu { ++ interrupts = <0x01 0x07 0xf04>; ++ compatible = "arm,armv8-pmuv3"; ++ }; ++ ++ intc@8000000 { ++ phandle = <0x8001>; ++ reg = <0x00 0x8000000 0x00 0x10000 0x00 0x8010000 0x00 0x10000>; ++ compatible = "arm,cortex-a15-gic"; ++ ranges; ++ #size-cells = <0x02>; ++ #address-cells = <0x02>; ++ interrupt-controller; ++ #interrupt-cells = <0x03>; ++ ++ v2m: v2m@8020000 { ++ reg = <0x00 0x8020000 0x00 0x1000>; ++ msi-controller; ++ compatible = "arm,gic-v2m-frame"; ++ }; ++ }; ++ ++ flash@0 { ++ bank-width = <0x04>; ++ reg = <0x00 0x00 0x00 0x4000000 0x00 0x4000000 0x00 0x4000000>; ++ compatible = "cfi-flash"; ++ }; ++ ++ cpus { ++ #size-cells = <0x00>; ++ #address-cells = <0x01>; ++ ++ cpu@0 { ++ reg = <0x00>; ++ enable-method = "psci"; ++ compatible = "arm,cortex-a72"; ++ device_type = "cpu"; ++ }; ++ ++ cpu@1 { ++ reg = <0x01>; ++ enable-method = "psci"; ++ compatible = "arm,cortex-a72"; ++ device_type = "cpu"; ++ }; ++ ++ cpu@2 { ++ reg = <0x02>; ++ enable-method = "psci"; ++ compatible = "arm,cortex-a72"; ++ device_type = "cpu"; ++ }; ++ ++ cpu@3 { ++ reg = <0x03>; ++ enable-method = "psci"; ++ compatible = "arm,cortex-a72"; ++ device_type = "cpu"; ++ }; ++ }; ++ ++ timer { ++ interrupts = <0x01 0x0d 0xf04 0x01 0x0e 0xf04 0x01 0x0b 0xf04 0x01 0x0a 0xf04>; ++ always-on; ++ compatible = "arm,armv8-timer\0arm,armv7-timer"; ++ }; ++ ++ apb_clk: apb-pclk { ++ clock-output-names = "clk24mhz"; ++ clock-frequency = <0x16e3600>; ++ #clock-cells = <0x00>; ++ compatible = "fixed-clock"; ++ }; ++ ++}; diff --git a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-r0/0023-virt64_guest.dts.patch b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-r0/0023-virt64_guest.dts.patch new file mode 100644 index 0000000..ef33a72 --- /dev/null +++ b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-r0/0023-virt64_guest.dts.patch @@ -0,0 +1,428 @@ +--- a/arch/arm64/boot/dts/arm/virt64_guest.dts ++++ b/arch/arm64/boot/dts/arm/virt64_guest.dts +@@ -0,0 +1,425 @@ ++/dts-v1/; ++ ++/ { ++ interrupt-parent = <0x8001>; ++ #size-cells = <0x02>; ++ #address-cells = <0x02>; ++ compatible = "linux,dummy-virt"; ++ ++ reserved-memory { ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ranges; ++ linux,cma { ++ compatible = "shared-dma-pool"; ++ reusable; ++ size = <0x0 0x6000000>; ++ alignment = <0x0 0x1000>; ++ linux,cma-default; ++ }; ++ }; ++ ++ console { ++ focus-dom-max = <3>; ++ }; ++ ++ psci { ++ migrate = <0xc4000005>; ++ cpu_on = <0xc4000003>; ++ cpu_off = <0x84000002>; ++ cpu_suspend = <0xc4000001>; ++ method = "hvc"; ++ compatible = "arm,psci-0.2\0arm,psci"; ++ }; ++ ++ memory@41000000 { ++ reg = <0x00 0x41000000 0x00 0x20000000>; ++ device_type = "memory"; ++ }; ++ ++ platform@c000000 { ++ interrupt-parent = <0x8001>; ++ ranges = <0x00 0x00 0xc000000 0x2000000>; ++ #address-cells = <0x01>; ++ #size-cells = <0x01>; ++ compatible = "qemu,platform\0simple-bus"; ++ }; ++ ++ fw-cfg@9020000 { ++ dma-coherent; ++ reg = <0x00 0x9020000 0x00 0x18>; ++ compatible = "qemu,fw-cfg-mmio"; ++ }; ++ ++ virtio_mmio@a000000 { ++ dma-coherent; ++ interrupts = <0x00 0x10 0x01>; ++ reg = <0x00 0xa000000 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a000200 { ++ dma-coherent; ++ interrupts = <0x00 0x11 0x01>; ++ reg = <0x00 0xa000200 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a000400 { ++ dma-coherent; ++ interrupts = <0x00 0x12 0x01>; ++ reg = <0x00 0xa000400 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a000600 { ++ dma-coherent; ++ interrupts = <0x00 0x13 0x01>; ++ reg = <0x00 0xa000600 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a000800 { ++ dma-coherent; ++ interrupts = <0x00 0x14 0x01>; ++ reg = <0x00 0xa000800 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a000a00 { ++ dma-coherent; ++ interrupts = <0x00 0x15 0x01>; ++ reg = <0x00 0xa000a00 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a000c00 { ++ dma-coherent; ++ interrupts = <0x00 0x16 0x01>; ++ reg = <0x00 0xa000c00 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a000e00 { ++ dma-coherent; ++ interrupts = <0x00 0x17 0x01>; ++ reg = <0x00 0xa000e00 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a001000 { ++ dma-coherent; ++ interrupts = <0x00 0x18 0x01>; ++ reg = <0x00 0xa001000 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a001200 { ++ dma-coherent; ++ interrupts = <0x00 0x19 0x01>; ++ reg = <0x00 0xa001200 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a001400 { ++ dma-coherent; ++ interrupts = <0x00 0x1a 0x01>; ++ reg = <0x00 0xa001400 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a001600 { ++ dma-coherent; ++ interrupts = <0x00 0x1b 0x01>; ++ reg = <0x00 0xa001600 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a001800 { ++ dma-coherent; ++ interrupts = <0x00 0x1c 0x01>; ++ reg = <0x00 0xa001800 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a001a00 { ++ dma-coherent; ++ interrupts = <0x00 0x1d 0x01>; ++ reg = <0x00 0xa001a00 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a001c00 { ++ dma-coherent; ++ interrupts = <0x00 0x1e 0x01>; ++ reg = <0x00 0xa001c00 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a001e00 { ++ dma-coherent; ++ interrupts = <0x00 0x1f 0x01>; ++ reg = <0x00 0xa001e00 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a002000 { ++ dma-coherent; ++ interrupts = <0x00 0x20 0x01>; ++ reg = <0x00 0xa002000 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a002200 { ++ dma-coherent; ++ interrupts = <0x00 0x21 0x01>; ++ reg = <0x00 0xa002200 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a002400 { ++ dma-coherent; ++ interrupts = <0x00 0x22 0x01>; ++ reg = <0x00 0xa002400 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a002600 { ++ dma-coherent; ++ interrupts = <0x00 0x23 0x01>; ++ reg = <0x00 0xa002600 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a002800 { ++ dma-coherent; ++ interrupts = <0x00 0x24 0x01>; ++ reg = <0x00 0xa002800 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a002a00 { ++ dma-coherent; ++ interrupts = <0x00 0x25 0x01>; ++ reg = <0x00 0xa002a00 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a002c00 { ++ dma-coherent; ++ interrupts = <0x00 0x26 0x01>; ++ reg = <0x00 0xa002c00 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a002e00 { ++ dma-coherent; ++ interrupts = <0x00 0x27 0x01>; ++ reg = <0x00 0xa002e00 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a003000 { ++ dma-coherent; ++ interrupts = <0x00 0x28 0x01>; ++ reg = <0x00 0xa003000 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a003200 { ++ dma-coherent; ++ interrupts = <0x00 0x29 0x01>; ++ reg = <0x00 0xa003200 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a003400 { ++ dma-coherent; ++ interrupts = <0x00 0x2a 0x01>; ++ reg = <0x00 0xa003400 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a003600 { ++ dma-coherent; ++ interrupts = <0x00 0x2b 0x01>; ++ reg = <0x00 0xa003600 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a003800 { ++ dma-coherent; ++ interrupts = <0x00 0x2c 0x01>; ++ reg = <0x00 0xa003800 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a003a00 { ++ dma-coherent; ++ interrupts = <0x00 0x2d 0x01>; ++ reg = <0x00 0xa003a00 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a003c00 { ++ dma-coherent; ++ interrupts = <0x00 0x2e 0x01>; ++ reg = <0x00 0xa003c00 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ virtio_mmio@a003e00 { ++ dma-coherent; ++ interrupts = <0x00 0x2f 0x01>; ++ reg = <0x00 0xa003e00 0x00 0x200>; ++ compatible = "virtio,mmio"; ++ }; ++ ++ pcie@10000000 { ++ interrupt-map-mask = <0x1800 0x00 0x00 0x07>; ++ interrupt-map = <0x00 0x00 0x00 0x01 0x8001 0x00 0x00 0x00 0x03 0x04 0x00 0x00 0x00 0x02 0x8001 0x00 0x00 0x00 0x04 0x04 0x00 0x00 0x00 0x03 0x8001 0x00 0x00 0x00 0x05 0x04 0x00 0x00 0x00 0x04 0x8001 0x00 0x00 0x00 0x06 0x04 0x800 0x00 0x00 0x01 0x8001 0x00 0x00 0x00 0x04 0x04 0x800 0x00 0x00 0x02 0x8001 0x00 0x00 0x00 0x05 0x04 0x800 0x00 0x00 0x03 0x8001 0x00 0x00 0x00 0x06 0x04 0x800 0x00 0x00 0x04 0x8001 0x00 0x00 0x00 0x03 0x04 0x1000 0x00 0x00 0x01 0x8001 0x00 0x00 0x00 0x05 0x04 0x1000 0x00 0x00 0x02 0x8001 0x00 0x00 0x00 0x06 0x04 0x1000 0x00 0x00 0x03 0x8001 0x00 0x00 0x00 0x03 0x04 0x1000 0x00 0x00 0x04 0x8001 0x00 0x00 0x00 0x04 0x04 0x1800 0x00 0x00 0x01 0x8001 0x00 0x00 0x00 0x06 0x04 0x1800 0x00 0x00 0x02 0x8001 0x00 0x00 0x00 0x03 0x04 0x1800 0x00 0x00 0x03 0x8001 0x00 0x00 0x00 0x04 0x04 0x1800 0x00 0x00 0x04 0x8001 0x00 0x00 0x00 0x05 0x04>; ++ #interrupt-cells = <0x01>; ++ ranges = <0x1000000 0x00 0x00 0x00 0x3eff0000 0x00 0x10000 0x2000000 0x00 0x10000000 0x00 0x10000000 0x00 0x2eff0000 0x3000000 0x80 0x00 0x80 0x00 0x80 0x00>; ++ reg = <0x40 0x10000000 0x00 0x10000000>; ++ msi-parent = <&v2m>; ++ dma-coherent; ++ bus-range = <0x00 0xff>; ++ linux,pci-domain = <0x00>; ++ #size-cells = <0x02>; ++ #address-cells = <0x03>; ++ device_type = "pci"; ++ compatible = "pci-host-ecam-generic"; ++ }; ++ ++ pl011@9000000 { ++ clock-names = "uartclk\0apb_pclk"; ++ clocks = <&apb_clk &apb_clk>; ++ interrupts = <0x00 0x01 0x04>; ++ reg = <0x00 0x9000000 0x00 0x1000>; ++ compatible = "arm,pl011\0arm,primecell"; ++ }; ++ ++ pmu { ++ interrupts = <0x01 0x07 0xf04>; ++ compatible = "arm,armv8-pmuv3"; ++ }; ++ ++ intc@8000000 { ++ phandle = <0x8001>; ++ reg = <0x00 0x8000000 0x00 0x10000 0x00 0x8010000 0x00 0x10000>; ++ compatible = "arm,cortex-a15-gic"; ++ ranges; ++ #size-cells = <0x02>; ++ #address-cells = <0x02>; ++ interrupt-controller; ++ #interrupt-cells = <0x03>; ++ ++ v2m: v2m@8020000 { ++ reg = <0x00 0x8020000 0x00 0x1000>; ++ msi-controller; ++ compatible = "arm,gic-v2m-frame"; ++ }; ++ }; ++ ++ flash@0 { ++ bank-width = <0x04>; ++ reg = <0x00 0x00 0x00 0x4000000 0x00 0x4000000 0x00 0x4000000>; ++ compatible = "cfi-flash"; ++ }; ++ ++ cpus { ++ #size-cells = <0x00>; ++ #address-cells = <0x01>; ++ ++ cpu@0 { ++ reg = <0x00>; ++ enable-method = "psci"; ++ compatible = "arm,cortex-a72"; ++ device_type = "cpu"; ++ }; ++ ++ cpu@1 { ++ reg = <0x01>; ++ enable-method = "psci"; ++ compatible = "arm,cortex-a72"; ++ device_type = "cpu"; ++ }; ++ ++ cpu@2 { ++ reg = <0x02>; ++ enable-method = "psci"; ++ compatible = "arm,cortex-a72"; ++ device_type = "cpu"; ++ }; ++ ++ cpu@3 { ++ reg = <0x03>; ++ enable-method = "psci"; ++ compatible = "arm,cortex-a72"; ++ device_type = "cpu"; ++ }; ++ }; ++ ++ timer { ++ interrupts = <0x01 0x0d 0xf04 0x01 0x0e 0xf04 0x01 0x0b 0xf04 0x01 0x0a 0xf04>; ++ always-on; ++ compatible = "arm,armv8-timer\0arm,armv7-timer"; ++ }; ++ ++ apb_clk: apb-pclk { ++ clock-output-names = "clk24mhz"; ++ clock-frequency = <0x16e3600>; ++ #clock-cells = <0x00>; ++ compatible = "fixed-clock"; ++ }; ++ ++ clcd_clk: clcd-clk { ++ compatible = "fixed-clock"; ++ #clock-cells = <0x00>; ++ clock-frequency = <25175000>; ++ clock-output-names = "clcdclk"; ++ }; ++ ++ panel: panel { ++ compatible = "panel-dpi"; ++ width-mm = <152>; ++ height-mm = <91>; ++ ++ panel-timing { ++ clock-frequency = <25175000>; ++ hactive = <640>; ++ vactive = <480>; ++ hback-porch = <48>; ++ hfront-porch = <16>; ++ hsync-len = <96>; ++ vback-porch = <33>; ++ vfront-porch = <10>; ++ vsync-len = <2>; ++ hsync-active = <0>; ++ vsync-active = <0>; ++ de-active = <1>; ++ pixelclk-active = <0>; ++ }; ++ ++ port { ++ panel_in: endpoint { ++ remote-endpoint = <&clcd_out>; ++ }; ++ }; ++ }; ++ ++ clcd@8800000 { ++ compatible = "arm,pl111", "arm,primecell"; ++ reg = <0x00 0x8800000 0x00 0x1000>; ++ interrupts = <0x00 0x0a 0x04>; ++ clocks = <&clcd_clk>, <&apb_clk>; ++ clock-names = "clcdclk", "apb_pclk"; ++ ++ port { ++ clcd_out: endpoint { ++ remote-endpoint = <&panel_in>; ++ }; ++ }; ++ }; ++ ++}; diff --git a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-r0/0053-virt64_defconfig.patch b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-r0/0053-virt64_defconfig.patch new file mode 100644 index 0000000..7b3e5e7 --- /dev/null +++ b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-r0/0053-virt64_defconfig.patch @@ -0,0 +1,9031 @@ +--- a/arch/arm64/configs/virt64_defconfig ++++ b/arch/arm64/configs/virt64_defconfig +@@ -0,0 +1,9028 @@ ++# ++# Automatically generated file; DO NOT EDIT. ++# Linux/arm64 6.12.0 Kernel Configuration ++# ++CONFIG_CC_VERSION_TEXT="aarch64-none-linux-gnu-gcc (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24)) 12.2.1 20221205" ++CONFIG_CC_IS_GCC=y ++CONFIG_GCC_VERSION=120201 ++CONFIG_CLANG_VERSION=0 ++CONFIG_AS_IS_GNU=y ++CONFIG_AS_VERSION=23900 ++CONFIG_LD_IS_BFD=y ++CONFIG_LD_VERSION=23900 ++CONFIG_LLD_VERSION=0 ++CONFIG_RUSTC_VERSION=0 ++CONFIG_RUSTC_LLVM_VERSION=0 ++CONFIG_CC_CAN_LINK=y ++CONFIG_CC_CAN_LINK_STATIC=y ++CONFIG_GCC_ASM_GOTO_OUTPUT_BROKEN=y ++CONFIG_CC_HAS_ASM_INLINE=y ++CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y ++CONFIG_PAHOLE_VERSION=0 ++CONFIG_IRQ_WORK=y ++CONFIG_BUILDTIME_TABLE_SORT=y ++CONFIG_THREAD_INFO_IN_TASK=y ++ ++# ++# General setup ++# ++CONFIG_INIT_ENV_ARG_LIMIT=32 ++# CONFIG_COMPILE_TEST is not set ++# CONFIG_WERROR is not set ++CONFIG_LOCALVERSION="" ++CONFIG_LOCALVERSION_AUTO=y ++CONFIG_BUILD_SALT="" ++CONFIG_DEFAULT_INIT="" ++CONFIG_DEFAULT_HOSTNAME="(none)" ++CONFIG_SYSVIPC=y ++CONFIG_SYSVIPC_SYSCTL=y ++CONFIG_SYSVIPC_COMPAT=y ++CONFIG_POSIX_MQUEUE=y ++CONFIG_POSIX_MQUEUE_SYSCTL=y ++# CONFIG_WATCH_QUEUE is not set ++CONFIG_CROSS_MEMORY_ATTACH=y ++# CONFIG_USELIB is not set ++CONFIG_AUDIT=y ++CONFIG_HAVE_ARCH_AUDITSYSCALL=y ++CONFIG_AUDITSYSCALL=y ++ ++# ++# IRQ subsystem ++# ++CONFIG_GENERIC_IRQ_PROBE=y ++CONFIG_GENERIC_IRQ_SHOW=y ++CONFIG_GENERIC_IRQ_SHOW_LEVEL=y ++CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y ++CONFIG_GENERIC_IRQ_MIGRATION=y ++CONFIG_HARDIRQS_SW_RESEND=y ++CONFIG_GENERIC_IRQ_CHIP=y ++CONFIG_IRQ_DOMAIN=y ++CONFIG_IRQ_DOMAIN_HIERARCHY=y ++CONFIG_IRQ_FASTEOI_HIERARCHY_HANDLERS=y ++CONFIG_GENERIC_IRQ_IPI=y ++CONFIG_GENERIC_IRQ_IPI_MUX=y ++CONFIG_GENERIC_MSI_IRQ=y ++CONFIG_IRQ_MSI_IOMMU=y ++CONFIG_IRQ_FORCED_THREADING=y ++CONFIG_SPARSE_IRQ=y ++# CONFIG_GENERIC_IRQ_DEBUGFS is not set ++# end of IRQ subsystem ++ ++CONFIG_GENERIC_TIME_VSYSCALL=y ++CONFIG_GENERIC_CLOCKEVENTS=y ++CONFIG_ARCH_HAS_TICK_BROADCAST=y ++CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y ++CONFIG_HAVE_POSIX_CPU_TIMERS_TASK_WORK=y ++CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y ++CONFIG_CONTEXT_TRACKING=y ++CONFIG_CONTEXT_TRACKING_IDLE=y ++ ++# ++# Timers subsystem ++# ++CONFIG_TICK_ONESHOT=y ++CONFIG_NO_HZ_COMMON=y ++# CONFIG_HZ_PERIODIC is not set ++CONFIG_NO_HZ_IDLE=y ++# CONFIG_NO_HZ_FULL is not set ++# CONFIG_NO_HZ is not set ++CONFIG_HIGH_RES_TIMERS=y ++# end of Timers subsystem ++ ++CONFIG_BPF=y ++CONFIG_HAVE_EBPF_JIT=y ++CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y ++ ++# ++# BPF subsystem ++# ++CONFIG_BPF_SYSCALL=y ++CONFIG_BPF_JIT=y ++# CONFIG_BPF_JIT_ALWAYS_ON is not set ++CONFIG_BPF_JIT_DEFAULT_ON=y ++CONFIG_BPF_UNPRIV_DEFAULT_OFF=y ++# CONFIG_BPF_PRELOAD is not set ++# end of BPF subsystem ++ ++CONFIG_PREEMPT_BUILD=y ++# CONFIG_PREEMPT_NONE is not set ++# CONFIG_PREEMPT_VOLUNTARY is not set ++CONFIG_PREEMPT=y ++CONFIG_PREEMPT_COUNT=y ++CONFIG_PREEMPTION=y ++# CONFIG_PREEMPT_DYNAMIC is not set ++# CONFIG_SCHED_CORE is not set ++ ++# ++# CPU/Task time and stats accounting ++# ++CONFIG_TICK_CPU_ACCOUNTING=y ++# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set ++CONFIG_IRQ_TIME_ACCOUNTING=y ++CONFIG_HAVE_SCHED_AVG_IRQ=y ++CONFIG_SCHED_HW_PRESSURE=y ++CONFIG_BSD_PROCESS_ACCT=y ++CONFIG_BSD_PROCESS_ACCT_V3=y ++CONFIG_TASKSTATS=y ++# CONFIG_TASK_DELAY_ACCT is not set ++CONFIG_TASK_XACCT=y ++CONFIG_TASK_IO_ACCOUNTING=y ++# CONFIG_PSI is not set ++# end of CPU/Task time and stats accounting ++ ++CONFIG_CPU_ISOLATION=y ++ ++# ++# RCU Subsystem ++# ++CONFIG_TREE_RCU=y ++CONFIG_PREEMPT_RCU=y ++# CONFIG_RCU_EXPERT is not set ++CONFIG_TREE_SRCU=y ++CONFIG_TASKS_RCU_GENERIC=y ++CONFIG_NEED_TASKS_RCU=y ++CONFIG_TASKS_RCU=y ++CONFIG_TASKS_TRACE_RCU=y ++CONFIG_RCU_STALL_COMMON=y ++CONFIG_RCU_NEED_SEGCBLIST=y ++# end of RCU Subsystem ++ ++CONFIG_IKCONFIG=y ++CONFIG_IKCONFIG_PROC=y ++# CONFIG_IKHEADERS is not set ++CONFIG_LOG_BUF_SHIFT=17 ++CONFIG_LOG_CPU_MAX_BUF_SHIFT=12 ++# CONFIG_PRINTK_INDEX is not set ++CONFIG_GENERIC_SCHED_CLOCK=y ++ ++# ++# Scheduler features ++# ++# CONFIG_UCLAMP_TASK is not set ++# end of Scheduler features ++ ++CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y ++CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y ++CONFIG_CC_HAS_INT128=y ++CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5" ++CONFIG_GCC10_NO_ARRAY_BOUNDS=y ++CONFIG_CC_NO_ARRAY_BOUNDS=y ++CONFIG_GCC_NO_STRINGOP_OVERFLOW=y ++CONFIG_CC_NO_STRINGOP_OVERFLOW=y ++CONFIG_ARCH_SUPPORTS_INT128=y ++CONFIG_NUMA_BALANCING=y ++CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y ++CONFIG_SLAB_OBJ_EXT=y ++CONFIG_CGROUPS=y ++CONFIG_PAGE_COUNTER=y ++# CONFIG_CGROUP_FAVOR_DYNMODS is not set ++CONFIG_MEMCG=y ++# CONFIG_MEMCG_V1 is not set ++CONFIG_BLK_CGROUP=y ++CONFIG_CGROUP_WRITEBACK=y ++CONFIG_CGROUP_SCHED=y ++CONFIG_GROUP_SCHED_WEIGHT=y ++CONFIG_FAIR_GROUP_SCHED=y ++# CONFIG_CFS_BANDWIDTH is not set ++# CONFIG_RT_GROUP_SCHED is not set ++CONFIG_SCHED_MM_CID=y ++CONFIG_CGROUP_PIDS=y ++# CONFIG_CGROUP_RDMA is not set ++CONFIG_CGROUP_FREEZER=y ++CONFIG_CGROUP_HUGETLB=y ++CONFIG_CPUSETS=y ++# CONFIG_CPUSETS_V1 is not set ++CONFIG_PROC_PID_CPUSET=y ++CONFIG_CGROUP_DEVICE=y ++CONFIG_CGROUP_CPUACCT=y ++CONFIG_CGROUP_PERF=y ++CONFIG_CGROUP_BPF=y ++# CONFIG_CGROUP_MISC is not set ++# CONFIG_CGROUP_DEBUG is not set ++CONFIG_SOCK_CGROUP_DATA=y ++CONFIG_NAMESPACES=y ++CONFIG_UTS_NS=y ++CONFIG_TIME_NS=y ++CONFIG_IPC_NS=y ++CONFIG_USER_NS=y ++CONFIG_PID_NS=y ++CONFIG_NET_NS=y ++# CONFIG_CHECKPOINT_RESTORE is not set ++CONFIG_SCHED_AUTOGROUP=y ++# CONFIG_RELAY is not set ++CONFIG_BLK_DEV_INITRD=y ++CONFIG_INITRAMFS_SOURCE="" ++CONFIG_RD_GZIP=y ++CONFIG_RD_BZIP2=y ++CONFIG_RD_LZMA=y ++CONFIG_RD_XZ=y ++CONFIG_RD_LZO=y ++CONFIG_RD_LZ4=y ++CONFIG_RD_ZSTD=y ++# CONFIG_BOOT_CONFIG is not set ++CONFIG_INITRAMFS_PRESERVE_MTIME=y ++CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y ++# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set ++CONFIG_LD_ORPHAN_WARN=y ++CONFIG_LD_ORPHAN_WARN_LEVEL="warn" ++CONFIG_SYSCTL=y ++CONFIG_HAVE_UID16=y ++CONFIG_SYSCTL_EXCEPTION_TRACE=y ++# CONFIG_EXPERT is not set ++CONFIG_UID16=y ++CONFIG_MULTIUSER=y ++CONFIG_SYSFS_SYSCALL=y ++CONFIG_FHANDLE=y ++CONFIG_POSIX_TIMERS=y ++CONFIG_PRINTK=y ++CONFIG_BUG=y ++CONFIG_ELF_CORE=y ++CONFIG_FUTEX=y ++CONFIG_FUTEX_PI=y ++CONFIG_EPOLL=y ++CONFIG_SIGNALFD=y ++CONFIG_TIMERFD=y ++CONFIG_EVENTFD=y ++CONFIG_SHMEM=y ++CONFIG_AIO=y ++CONFIG_IO_URING=y ++CONFIG_ADVISE_SYSCALLS=y ++CONFIG_MEMBARRIER=y ++CONFIG_KCMP=y ++CONFIG_RSEQ=y ++CONFIG_CACHESTAT_SYSCALL=y ++CONFIG_KALLSYMS=y ++# CONFIG_KALLSYMS_SELFTEST is not set ++CONFIG_KALLSYMS_ALL=y ++CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y ++CONFIG_HAVE_PERF_EVENTS=y ++CONFIG_GUEST_PERF_EVENTS=y ++ ++# ++# Kernel Performance Events And Counters ++# ++CONFIG_PERF_EVENTS=y ++# CONFIG_DEBUG_PERF_USE_VMALLOC is not set ++# end of Kernel Performance Events And Counters ++ ++CONFIG_PROFILING=y ++ ++# ++# Kexec and crash features ++# ++CONFIG_CRASH_RESERVE=y ++CONFIG_VMCORE_INFO=y ++CONFIG_KEXEC_CORE=y ++CONFIG_KEXEC=y ++CONFIG_KEXEC_FILE=y ++# CONFIG_KEXEC_SIG is not set ++CONFIG_CRASH_DUMP=y ++# end of Kexec and crash features ++# end of General setup ++ ++CONFIG_ARM64=y ++CONFIG_RUSTC_SUPPORTS_ARM64=y ++CONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_ARGS=y ++CONFIG_64BIT=y ++CONFIG_MMU=y ++CONFIG_ARM64_CONT_PTE_SHIFT=4 ++CONFIG_ARM64_CONT_PMD_SHIFT=4 ++CONFIG_ARCH_MMAP_RND_BITS_MIN=18 ++CONFIG_ARCH_MMAP_RND_BITS_MAX=33 ++CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11 ++CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16 ++CONFIG_STACKTRACE_SUPPORT=y ++CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 ++CONFIG_LOCKDEP_SUPPORT=y ++CONFIG_GENERIC_BUG=y ++CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y ++CONFIG_GENERIC_HWEIGHT=y ++CONFIG_GENERIC_CSUM=y ++CONFIG_GENERIC_CALIBRATE_DELAY=y ++CONFIG_SMP=y ++CONFIG_KERNEL_MODE_NEON=y ++CONFIG_FIX_EARLYCON_MEM=y ++CONFIG_PGTABLE_LEVELS=4 ++CONFIG_ARCH_SUPPORTS_UPROBES=y ++CONFIG_ARCH_PROC_KCORE_TEXT=y ++CONFIG_BUILTIN_RETURN_ADDRESS_STRIPS_PAC=y ++ ++# ++# Platform selection ++# ++CONFIG_ARCH_ACTIONS=y ++# CONFIG_ARCH_AIROHA is not set ++CONFIG_ARCH_SUNXI=y ++CONFIG_ARCH_ALPINE=y ++CONFIG_ARCH_APPLE=y ++CONFIG_ARCH_BCM=y ++CONFIG_ARCH_BCM2835=y ++CONFIG_ARCH_BCM_IPROC=y ++CONFIG_ARCH_BCMBCA=y ++CONFIG_ARCH_BRCMSTB=y ++CONFIG_ARCH_BERLIN=y ++# CONFIG_ARCH_BITMAIN is not set ++CONFIG_ARCH_EXYNOS=y ++CONFIG_ARCH_SPARX5=y ++CONFIG_ARCH_K3=y ++CONFIG_ARCH_LG1K=y ++CONFIG_ARCH_HISI=y ++CONFIG_ARCH_KEEMBAY=y ++CONFIG_ARCH_MEDIATEK=y ++CONFIG_ARCH_MESON=y ++CONFIG_ARCH_MVEBU=y ++CONFIG_ARCH_NXP=y ++CONFIG_ARCH_LAYERSCAPE=y ++CONFIG_ARCH_MXC=y ++CONFIG_ARCH_S32=y ++CONFIG_ARCH_MA35=y ++CONFIG_ARCH_NPCM=y ++# CONFIG_ARCH_PENSANDO is not set ++CONFIG_ARCH_QCOM=y ++CONFIG_ARCH_REALTEK=y ++CONFIG_ARCH_RENESAS=y ++CONFIG_ARCH_ROCKCHIP=y ++CONFIG_ARCH_SEATTLE=y ++CONFIG_ARCH_INTEL_SOCFPGA=y ++CONFIG_ARCH_STM32=y ++CONFIG_ARCH_SYNQUACER=y ++CONFIG_ARCH_TEGRA=y ++CONFIG_ARCH_TESLA_FSD=y ++CONFIG_ARCH_SPRD=y ++CONFIG_ARCH_THUNDER=y ++CONFIG_ARCH_THUNDER2=y ++CONFIG_ARCH_UNIPHIER=y ++CONFIG_ARCH_VEXPRESS=y ++CONFIG_ARCH_VISCONTI=y ++CONFIG_ARCH_XGENE=y ++CONFIG_ARCH_ZYNQMP=y ++# end of Platform selection ++ ++# ++# Kernel Features ++# ++ ++# ++# ARM errata workarounds via the alternatives framework ++# ++CONFIG_AMPERE_ERRATUM_AC03_CPU_38=y ++CONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y ++CONFIG_ARM64_ERRATUM_826319=y ++CONFIG_ARM64_ERRATUM_827319=y ++CONFIG_ARM64_ERRATUM_824069=y ++CONFIG_ARM64_ERRATUM_819472=y ++CONFIG_ARM64_ERRATUM_832075=y ++CONFIG_ARM64_ERRATUM_834220=y ++CONFIG_ARM64_ERRATUM_1742098=y ++CONFIG_ARM64_ERRATUM_845719=y ++CONFIG_ARM64_ERRATUM_843419=y ++CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y ++CONFIG_ARM64_ERRATUM_1024718=y ++CONFIG_ARM64_ERRATUM_1418040=y ++CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y ++CONFIG_ARM64_ERRATUM_1165522=y ++CONFIG_ARM64_ERRATUM_1319367=y ++CONFIG_ARM64_ERRATUM_1530923=y ++CONFIG_ARM64_WORKAROUND_REPEAT_TLBI=y ++CONFIG_ARM64_ERRATUM_2441007=y ++CONFIG_ARM64_ERRATUM_1286807=y ++CONFIG_ARM64_ERRATUM_1463225=y ++CONFIG_ARM64_ERRATUM_1542419=y ++CONFIG_ARM64_ERRATUM_1508412=y ++CONFIG_ARM64_ERRATUM_2051678=y ++CONFIG_ARM64_ERRATUM_2077057=y ++CONFIG_ARM64_ERRATUM_2658417=y ++CONFIG_ARM64_WORKAROUND_TSB_FLUSH_FAILURE=y ++CONFIG_ARM64_ERRATUM_2054223=y ++CONFIG_ARM64_ERRATUM_2067961=y ++CONFIG_ARM64_ERRATUM_2441009=y ++CONFIG_ARM64_ERRATUM_2457168=y ++CONFIG_ARM64_ERRATUM_2645198=y ++CONFIG_ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD=y ++CONFIG_ARM64_ERRATUM_2966298=y ++CONFIG_ARM64_ERRATUM_3117295=y ++CONFIG_ARM64_ERRATUM_3194386=y ++CONFIG_CAVIUM_ERRATUM_22375=y ++CONFIG_CAVIUM_ERRATUM_23144=y ++CONFIG_CAVIUM_ERRATUM_23154=y ++CONFIG_CAVIUM_ERRATUM_27456=y ++CONFIG_CAVIUM_ERRATUM_30115=y ++CONFIG_CAVIUM_TX2_ERRATUM_219=y ++CONFIG_FUJITSU_ERRATUM_010001=y ++CONFIG_HISILICON_ERRATUM_161600802=y ++CONFIG_QCOM_FALKOR_ERRATUM_1003=y ++CONFIG_QCOM_FALKOR_ERRATUM_1009=y ++CONFIG_QCOM_QDF2400_ERRATUM_0065=y ++CONFIG_QCOM_FALKOR_ERRATUM_E1041=y ++CONFIG_NVIDIA_CARMEL_CNP_ERRATUM=y ++CONFIG_ROCKCHIP_ERRATUM_3588001=y ++CONFIG_SOCIONEXT_SYNQUACER_PREITS=y ++# end of ARM errata workarounds via the alternatives framework ++ ++CONFIG_ARM64_4K_PAGES=y ++# CONFIG_ARM64_16K_PAGES is not set ++# CONFIG_ARM64_64K_PAGES is not set ++# CONFIG_ARM64_VA_BITS_39 is not set ++CONFIG_ARM64_VA_BITS_48=y ++# CONFIG_ARM64_VA_BITS_52 is not set ++CONFIG_ARM64_VA_BITS=48 ++CONFIG_ARM64_PA_BITS_48=y ++CONFIG_ARM64_PA_BITS=48 ++# CONFIG_CPU_BIG_ENDIAN is not set ++CONFIG_CPU_LITTLE_ENDIAN=y ++CONFIG_SCHED_MC=y ++# CONFIG_SCHED_CLUSTER is not set ++CONFIG_SCHED_SMT=y ++CONFIG_NR_CPUS=256 ++CONFIG_HOTPLUG_CPU=y ++CONFIG_NUMA=y ++CONFIG_NODES_SHIFT=4 ++# CONFIG_HZ_100 is not set ++CONFIG_HZ_250=y ++# CONFIG_HZ_300 is not set ++# CONFIG_HZ_1000 is not set ++CONFIG_HZ=250 ++CONFIG_SCHED_HRTICK=y ++CONFIG_ARCH_SPARSEMEM_ENABLE=y ++CONFIG_HW_PERF_EVENTS=y ++CONFIG_CC_HAVE_SHADOW_CALL_STACK=y ++CONFIG_PARAVIRT=y ++# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set ++CONFIG_ARCH_SUPPORTS_KEXEC=y ++CONFIG_ARCH_SUPPORTS_KEXEC_FILE=y ++CONFIG_ARCH_SELECTS_KEXEC_FILE=y ++CONFIG_ARCH_SUPPORTS_KEXEC_SIG=y ++CONFIG_ARCH_SUPPORTS_KEXEC_IMAGE_VERIFY_SIG=y ++CONFIG_ARCH_DEFAULT_KEXEC_IMAGE_VERIFY_SIG=y ++CONFIG_ARCH_SUPPORTS_CRASH_DUMP=y ++CONFIG_ARCH_DEFAULT_CRASH_DUMP=y ++CONFIG_ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION=y ++CONFIG_TRANS_TABLE=y ++CONFIG_XEN_DOM0=y ++CONFIG_XEN=y ++CONFIG_ARCH_FORCE_MAX_ORDER=10 ++CONFIG_UNMAP_KERNEL_AT_EL0=y ++CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY=y ++CONFIG_RODATA_FULL_DEFAULT_ENABLED=y ++# CONFIG_ARM64_SW_TTBR0_PAN is not set ++CONFIG_ARM64_TAGGED_ADDR_ABI=y ++CONFIG_COMPAT=y ++CONFIG_KUSER_HELPERS=y ++# CONFIG_COMPAT_ALIGNMENT_FIXUPS is not set ++# CONFIG_ARMV8_DEPRECATED is not set ++ ++# ++# ARMv8.1 architectural features ++# ++CONFIG_ARM64_HW_AFDBM=y ++CONFIG_ARM64_PAN=y ++CONFIG_AS_HAS_LSE_ATOMICS=y ++CONFIG_ARM64_LSE_ATOMICS=y ++CONFIG_ARM64_USE_LSE_ATOMICS=y ++# end of ARMv8.1 architectural features ++ ++# ++# ARMv8.2 architectural features ++# ++CONFIG_AS_HAS_ARMV8_2=y ++CONFIG_AS_HAS_SHA3=y ++# CONFIG_ARM64_PMEM is not set ++CONFIG_ARM64_RAS_EXTN=y ++CONFIG_ARM64_CNP=y ++# end of ARMv8.2 architectural features ++ ++# ++# ARMv8.3 architectural features ++# ++CONFIG_ARM64_PTR_AUTH=y ++CONFIG_ARM64_PTR_AUTH_KERNEL=y ++CONFIG_CC_HAS_BRANCH_PROT_PAC_RET=y ++CONFIG_CC_HAS_SIGN_RETURN_ADDRESS=y ++CONFIG_AS_HAS_ARMV8_3=y ++CONFIG_AS_HAS_CFI_NEGATE_RA_STATE=y ++CONFIG_AS_HAS_LDAPR=y ++# end of ARMv8.3 architectural features ++ ++# ++# ARMv8.4 architectural features ++# ++CONFIG_ARM64_AMU_EXTN=y ++CONFIG_AS_HAS_ARMV8_4=y ++CONFIG_ARM64_TLB_RANGE=y ++# end of ARMv8.4 architectural features ++ ++# ++# ARMv8.5 architectural features ++# ++CONFIG_AS_HAS_ARMV8_5=y ++CONFIG_ARM64_BTI=y ++CONFIG_CC_HAS_BRANCH_PROT_PAC_RET_BTI=y ++CONFIG_ARM64_E0PD=y ++CONFIG_ARM64_AS_HAS_MTE=y ++CONFIG_ARM64_MTE=y ++# end of ARMv8.5 architectural features ++ ++# ++# ARMv8.7 architectural features ++# ++CONFIG_ARM64_EPAN=y ++# end of ARMv8.7 architectural features ++ ++# ++# ARMv8.9 architectural features ++# ++CONFIG_ARM64_POE=y ++CONFIG_ARCH_PKEY_BITS=3 ++# end of ARMv8.9 architectural features ++ ++CONFIG_ARM64_SVE=y ++# CONFIG_ARM64_PSEUDO_NMI is not set ++CONFIG_RELOCATABLE=y ++CONFIG_RANDOMIZE_BASE=y ++CONFIG_RANDOMIZE_MODULE_REGION_FULL=y ++CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y ++CONFIG_STACKPROTECTOR_PER_TASK=y ++CONFIG_ARM64_CONTPTE=y ++# end of Kernel Features ++ ++# ++# Boot options ++# ++# CONFIG_ARM64_ACPI_PARKING_PROTOCOL is not set ++CONFIG_CMDLINE="" ++CONFIG_EFI_STUB=y ++CONFIG_EFI=y ++# CONFIG_COMPRESSED_INSTALL is not set ++CONFIG_DMI=y ++# end of Boot options ++ ++# ++# Power management options ++# ++CONFIG_SUSPEND=y ++CONFIG_SUSPEND_FREEZER=y ++CONFIG_HIBERNATE_CALLBACKS=y ++CONFIG_HIBERNATION=y ++CONFIG_HIBERNATION_SNAPSHOT_DEV=y ++CONFIG_HIBERNATION_COMP_LZO=y ++CONFIG_HIBERNATION_DEF_COMP="lzo" ++CONFIG_PM_STD_PARTITION="" ++CONFIG_PM_SLEEP=y ++CONFIG_PM_SLEEP_SMP=y ++# CONFIG_PM_AUTOSLEEP is not set ++# CONFIG_PM_USERSPACE_AUTOSLEEP is not set ++# CONFIG_PM_WAKELOCKS is not set ++CONFIG_PM=y ++# CONFIG_PM_DEBUG is not set ++CONFIG_PM_CLK=y ++CONFIG_PM_GENERIC_DOMAINS=y ++CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y ++CONFIG_PM_GENERIC_DOMAINS_SLEEP=y ++CONFIG_PM_GENERIC_DOMAINS_OF=y ++CONFIG_CPU_PM=y ++CONFIG_ENERGY_MODEL=y ++CONFIG_ARCH_HIBERNATION_POSSIBLE=y ++CONFIG_ARCH_HIBERNATION_HEADER=y ++CONFIG_ARCH_SUSPEND_POSSIBLE=y ++# end of Power management options ++ ++# ++# CPU Power Management ++# ++ ++# ++# CPU Idle ++# ++CONFIG_CPU_IDLE=y ++CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y ++# CONFIG_CPU_IDLE_GOV_LADDER is not set ++CONFIG_CPU_IDLE_GOV_MENU=y ++# CONFIG_CPU_IDLE_GOV_TEO is not set ++CONFIG_DT_IDLE_STATES=y ++CONFIG_DT_IDLE_GENPD=y ++ ++# ++# ARM CPU Idle Drivers ++# ++CONFIG_ARM_PSCI_CPUIDLE=y ++CONFIG_ARM_PSCI_CPUIDLE_DOMAIN=y ++# end of ARM CPU Idle Drivers ++# end of CPU Idle ++ ++# ++# CPU Frequency scaling ++# ++CONFIG_CPU_FREQ=y ++CONFIG_CPU_FREQ_GOV_ATTR_SET=y ++CONFIG_CPU_FREQ_GOV_COMMON=y ++CONFIG_CPU_FREQ_STAT=y ++# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set ++# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set ++# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set ++# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set ++# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set ++CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y ++CONFIG_CPU_FREQ_GOV_PERFORMANCE=y ++# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set ++CONFIG_CPU_FREQ_GOV_USERSPACE=y ++CONFIG_CPU_FREQ_GOV_ONDEMAND=y ++# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set ++CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y ++ ++# ++# CPU frequency scaling drivers ++# ++CONFIG_CPUFREQ_DT=y ++CONFIG_CPUFREQ_DT_PLATDEV=y ++# CONFIG_ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM is not set ++CONFIG_ARM_APPLE_SOC_CPUFREQ=y ++CONFIG_ARM_ARMADA_37XX_CPUFREQ=y ++# CONFIG_ARM_ARMADA_8K_CPUFREQ is not set ++CONFIG_ARM_SCPI_CPUFREQ=y ++# CONFIG_ARM_IMX_CPUFREQ_DT is not set ++CONFIG_ARM_MEDIATEK_CPUFREQ=y ++# CONFIG_ARM_MEDIATEK_CPUFREQ_HW is not set ++CONFIG_ARM_QCOM_CPUFREQ_NVMEM=y ++CONFIG_ARM_QCOM_CPUFREQ_HW=y ++CONFIG_ARM_SCMI_CPUFREQ=y ++CONFIG_ARM_TEGRA20_CPUFREQ=y ++CONFIG_ARM_TEGRA124_CPUFREQ=y ++CONFIG_ARM_TEGRA186_CPUFREQ=y ++CONFIG_ARM_TEGRA194_CPUFREQ=y ++CONFIG_ARM_TI_CPUFREQ=y ++CONFIG_QORIQ_CPUFREQ=y ++# CONFIG_ACPI_CPPC_CPUFREQ is not set ++# end of CPU Frequency scaling ++# end of CPU Power Management ++ ++CONFIG_ARCH_SUPPORTS_ACPI=y ++CONFIG_ACPI=y ++CONFIG_ACPI_GENERIC_GSI=y ++CONFIG_ACPI_CCA_REQUIRED=y ++CONFIG_ACPI_THERMAL_LIB=y ++# CONFIG_ACPI_DEBUGGER is not set ++CONFIG_ACPI_SPCR_TABLE=y ++# CONFIG_ACPI_FPDT is not set ++# CONFIG_ACPI_EC_DEBUGFS is not set ++CONFIG_ACPI_AC=y ++CONFIG_ACPI_BATTERY=y ++CONFIG_ACPI_BUTTON=y ++CONFIG_ACPI_FAN=y ++# CONFIG_ACPI_TAD is not set ++# CONFIG_ACPI_DOCK is not set ++CONFIG_ACPI_PROCESSOR_IDLE=y ++CONFIG_ACPI_MCFG=y ++CONFIG_ACPI_PROCESSOR=y ++CONFIG_ACPI_HOTPLUG_CPU=y ++CONFIG_ACPI_THERMAL=y ++CONFIG_ARCH_HAS_ACPI_TABLE_UPGRADE=y ++CONFIG_ACPI_TABLE_UPGRADE=y ++# CONFIG_ACPI_DEBUG is not set ++# CONFIG_ACPI_PCI_SLOT is not set ++CONFIG_ACPI_CONTAINER=y ++CONFIG_ACPI_HOTPLUG_MEMORY=y ++CONFIG_ACPI_HED=y ++# CONFIG_ACPI_BGRT is not set ++CONFIG_ACPI_REDUCED_HARDWARE_ONLY=y ++CONFIG_ACPI_NUMA=y ++CONFIG_ACPI_HMAT=y ++CONFIG_HAVE_ACPI_APEI=y ++CONFIG_ACPI_APEI=y ++CONFIG_ACPI_APEI_GHES=y ++CONFIG_ACPI_APEI_PCIEAER=y ++CONFIG_ACPI_APEI_SEA=y ++CONFIG_ACPI_APEI_MEMORY_FAILURE=y ++CONFIG_ACPI_APEI_EINJ=y ++# CONFIG_ACPI_APEI_ERST_DEBUG is not set ++# CONFIG_ACPI_CONFIGFS is not set ++# CONFIG_ACPI_PFRUT is not set ++CONFIG_ACPI_IORT=y ++CONFIG_ACPI_GTDT=y ++CONFIG_ACPI_APMT=y ++CONFIG_ACPI_PPTT=y ++CONFIG_ACPI_PCC=y ++# CONFIG_ACPI_FFH is not set ++# CONFIG_PMIC_OPREGION is not set ++CONFIG_ACPI_PRMT=y ++CONFIG_KVM_COMMON=y ++CONFIG_HAVE_KVM_IRQCHIP=y ++CONFIG_HAVE_KVM_IRQ_ROUTING=y ++CONFIG_HAVE_KVM_DIRTY_RING=y ++CONFIG_HAVE_KVM_DIRTY_RING_ACQ_REL=y ++CONFIG_NEED_KVM_DIRTY_RING_WITH_BITMAP=y ++CONFIG_KVM_MMIO=y ++CONFIG_HAVE_KVM_MSI=y ++CONFIG_HAVE_KVM_READONLY_MEM=y ++CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y ++CONFIG_KVM_VFIO=y ++CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y ++CONFIG_HAVE_KVM_IRQ_BYPASS=y ++CONFIG_HAVE_KVM_VCPU_RUN_PID_CHANGE=y ++CONFIG_KVM_XFER_TO_GUEST_WORK=y ++CONFIG_KVM_GENERIC_HARDWARE_ENABLING=y ++CONFIG_KVM_GENERIC_MMU_NOTIFIER=y ++CONFIG_VIRTUALIZATION=y ++CONFIG_KVM=y ++# CONFIG_NVHE_EL2_DEBUG is not set ++# CONFIG_PTDUMP_STAGE2_DEBUGFS is not set ++CONFIG_CPU_MITIGATIONS=y ++CONFIG_ARCH_HAS_DMA_OPS=y ++ ++# ++# General architecture-dependent options ++# ++CONFIG_ARCH_HAS_SUBPAGE_FAULTS=y ++CONFIG_HOTPLUG_CORE_SYNC=y ++CONFIG_HOTPLUG_CORE_SYNC_DEAD=y ++# CONFIG_KPROBES is not set ++CONFIG_JUMP_LABEL=y ++# CONFIG_STATIC_KEYS_SELFTEST is not set ++CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y ++CONFIG_HAVE_IOREMAP_PROT=y ++CONFIG_HAVE_KPROBES=y ++CONFIG_HAVE_KRETPROBES=y ++CONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y ++CONFIG_HAVE_FUNCTION_ERROR_INJECTION=y ++CONFIG_HAVE_NMI=y ++CONFIG_TRACE_IRQFLAGS_SUPPORT=y ++CONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y ++CONFIG_HAVE_ARCH_TRACEHOOK=y ++CONFIG_HAVE_DMA_CONTIGUOUS=y ++CONFIG_GENERIC_SMP_IDLE_THREAD=y ++CONFIG_GENERIC_IDLE_POLL_SETUP=y ++CONFIG_ARCH_HAS_FORTIFY_SOURCE=y ++CONFIG_ARCH_HAS_KEEPINITRD=y ++CONFIG_ARCH_HAS_SET_MEMORY=y ++CONFIG_ARCH_HAS_SET_DIRECT_MAP=y ++CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y ++CONFIG_ARCH_WANTS_NO_INSTR=y ++CONFIG_HAVE_ASM_MODVERSIONS=y ++CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y ++CONFIG_HAVE_RSEQ=y ++CONFIG_HAVE_RUST=y ++CONFIG_HAVE_FUNCTION_ARG_ACCESS_API=y ++CONFIG_HAVE_HW_BREAKPOINT=y ++CONFIG_HAVE_PERF_REGS=y ++CONFIG_HAVE_PERF_USER_STACK_DUMP=y ++CONFIG_HAVE_ARCH_JUMP_LABEL=y ++CONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE=y ++CONFIG_MMU_GATHER_TABLE_FREE=y ++CONFIG_MMU_GATHER_RCU_TABLE_FREE=y ++CONFIG_MMU_LAZY_TLB_REFCOUNT=y ++CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y ++CONFIG_ARCH_HAS_NMI_SAFE_THIS_CPU_OPS=y ++CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y ++CONFIG_HAVE_CMPXCHG_LOCAL=y ++CONFIG_HAVE_CMPXCHG_DOUBLE=y ++CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y ++CONFIG_HAVE_ARCH_SECCOMP=y ++CONFIG_HAVE_ARCH_SECCOMP_FILTER=y ++CONFIG_SECCOMP=y ++CONFIG_SECCOMP_FILTER=y ++# CONFIG_SECCOMP_CACHE_DEBUG is not set ++CONFIG_HAVE_ARCH_STACKLEAK=y ++CONFIG_HAVE_STACKPROTECTOR=y ++CONFIG_STACKPROTECTOR=y ++CONFIG_STACKPROTECTOR_STRONG=y ++CONFIG_ARCH_SUPPORTS_SHADOW_CALL_STACK=y ++# CONFIG_SHADOW_CALL_STACK is not set ++CONFIG_ARCH_SUPPORTS_LTO_CLANG=y ++CONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y ++CONFIG_LTO_NONE=y ++CONFIG_ARCH_SUPPORTS_CFI_CLANG=y ++CONFIG_HAVE_CONTEXT_TRACKING_USER=y ++CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y ++CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y ++CONFIG_HAVE_MOVE_PUD=y ++CONFIG_HAVE_MOVE_PMD=y ++CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y ++CONFIG_HAVE_ARCH_HUGE_VMAP=y ++CONFIG_HAVE_ARCH_HUGE_VMALLOC=y ++CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y ++CONFIG_ARCH_WANT_PMD_MKWRITE=y ++CONFIG_HAVE_MOD_ARCH_SPECIFIC=y ++CONFIG_MODULES_USE_ELF_RELA=y ++CONFIG_ARCH_WANTS_EXECMEM_LATE=y ++CONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=y ++CONFIG_SOFTIRQ_ON_OWN_STACK=y ++CONFIG_ARCH_HAS_ELF_RANDOMIZE=y ++CONFIG_HAVE_ARCH_MMAP_RND_BITS=y ++CONFIG_ARCH_MMAP_RND_BITS=18 ++CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y ++CONFIG_ARCH_MMAP_RND_COMPAT_BITS=11 ++CONFIG_HAVE_PAGE_SIZE_4KB=y ++CONFIG_PAGE_SIZE_4KB=y ++CONFIG_PAGE_SIZE_LESS_THAN_64KB=y ++CONFIG_PAGE_SIZE_LESS_THAN_256KB=y ++CONFIG_PAGE_SHIFT=12 ++CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y ++CONFIG_CLONE_BACKWARDS=y ++CONFIG_OLD_SIGSUSPEND3=y ++CONFIG_COMPAT_OLD_SIGACTION=y ++CONFIG_COMPAT_32BIT_TIME=y ++CONFIG_ARCH_SUPPORTS_RT=y ++CONFIG_HAVE_ARCH_VMAP_STACK=y ++CONFIG_VMAP_STACK=y ++CONFIG_HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET=y ++CONFIG_RANDOMIZE_KSTACK_OFFSET=y ++# CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT is not set ++CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y ++CONFIG_STRICT_KERNEL_RWX=y ++CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y ++CONFIG_STRICT_MODULE_RWX=y ++CONFIG_HAVE_ARCH_COMPILER_H=y ++CONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y ++CONFIG_ARCH_USE_MEMREMAP_PROT=y ++# CONFIG_LOCK_EVENT_COUNTS is not set ++CONFIG_ARCH_HAS_RELR=y ++CONFIG_ARCH_HAS_MEM_ENCRYPT=y ++CONFIG_HAVE_PREEMPT_DYNAMIC=y ++CONFIG_HAVE_PREEMPT_DYNAMIC_KEY=y ++CONFIG_ARCH_WANT_LD_ORPHAN_WARN=y ++CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y ++CONFIG_ARCH_SUPPORTS_PAGE_TABLE_CHECK=y ++CONFIG_ARCH_HAVE_TRACE_MMIO_ACCESS=y ++CONFIG_ARCH_HAS_HW_PTE_YOUNG=y ++CONFIG_ARCH_HAS_KERNEL_FPU_SUPPORT=y ++ ++# ++# GCOV-based kernel profiling ++# ++# CONFIG_GCOV_KERNEL is not set ++CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y ++# end of GCOV-based kernel profiling ++ ++CONFIG_HAVE_GCC_PLUGINS=y ++CONFIG_GCC_PLUGINS=y ++# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set ++CONFIG_FUNCTION_ALIGNMENT_4B=y ++CONFIG_FUNCTION_ALIGNMENT=4 ++# end of General architecture-dependent options ++ ++CONFIG_RT_MUTEXES=y ++CONFIG_MODULES=y ++# CONFIG_MODULE_DEBUG is not set ++# CONFIG_MODULE_FORCE_LOAD is not set ++CONFIG_MODULE_UNLOAD=y ++# CONFIG_MODULE_FORCE_UNLOAD is not set ++# CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set ++# CONFIG_MODVERSIONS is not set ++# CONFIG_MODULE_SRCVERSION_ALL is not set ++# CONFIG_MODULE_SIG is not set ++# CONFIG_MODULE_COMPRESS is not set ++# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set ++CONFIG_MODPROBE_PATH="/sbin/modprobe" ++# CONFIG_TRIM_UNUSED_KSYMS is not set ++CONFIG_MODULES_TREE_LOOKUP=y ++CONFIG_BLOCK=y ++CONFIG_BLOCK_LEGACY_AUTOLOAD=y ++CONFIG_BLK_CGROUP_RWSTAT=y ++CONFIG_BLK_DEV_BSG_COMMON=y ++CONFIG_BLK_ICQ=y ++CONFIG_BLK_DEV_BSGLIB=y ++CONFIG_BLK_DEV_INTEGRITY=y ++CONFIG_BLK_DEV_WRITE_MOUNTED=y ++# CONFIG_BLK_DEV_ZONED is not set ++# CONFIG_BLK_DEV_THROTTLING is not set ++# CONFIG_BLK_WBT is not set ++# CONFIG_BLK_CGROUP_IOLATENCY is not set ++# CONFIG_BLK_CGROUP_IOCOST is not set ++# CONFIG_BLK_CGROUP_IOPRIO is not set ++CONFIG_BLK_DEBUG_FS=y ++# CONFIG_BLK_SED_OPAL is not set ++# CONFIG_BLK_INLINE_ENCRYPTION is not set ++ ++# ++# Partition Types ++# ++# CONFIG_PARTITION_ADVANCED is not set ++CONFIG_MSDOS_PARTITION=y ++CONFIG_EFI_PARTITION=y ++# end of Partition Types ++ ++CONFIG_BLK_MQ_PCI=y ++CONFIG_BLK_MQ_VIRTIO=y ++CONFIG_BLK_PM=y ++ ++# ++# IO Schedulers ++# ++CONFIG_MQ_IOSCHED_DEADLINE=y ++CONFIG_MQ_IOSCHED_KYBER=y ++CONFIG_IOSCHED_BFQ=y ++CONFIG_BFQ_GROUP_IOSCHED=y ++# CONFIG_BFQ_CGROUP_DEBUG is not set ++# end of IO Schedulers ++ ++CONFIG_PREEMPT_NOTIFIERS=y ++CONFIG_PADATA=y ++CONFIG_ASN1=y ++CONFIG_UNINLINE_SPIN_UNLOCK=y ++CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y ++CONFIG_MUTEX_SPIN_ON_OWNER=y ++CONFIG_RWSEM_SPIN_ON_OWNER=y ++CONFIG_LOCK_SPIN_ON_OWNER=y ++CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y ++CONFIG_QUEUED_SPINLOCKS=y ++CONFIG_ARCH_USE_QUEUED_RWLOCKS=y ++CONFIG_QUEUED_RWLOCKS=y ++CONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y ++CONFIG_ARCH_HAS_SYSCALL_WRAPPER=y ++CONFIG_FREEZER=y ++ ++# ++# Executable file formats ++# ++CONFIG_BINFMT_ELF=y ++CONFIG_COMPAT_BINFMT_ELF=y ++CONFIG_ARCH_BINFMT_ELF_STATE=y ++CONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y ++CONFIG_ARCH_HAVE_ELF_PROT=y ++CONFIG_ARCH_USE_GNU_PROPERTY=y ++CONFIG_ELFCORE=y ++# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set ++CONFIG_BINFMT_SCRIPT=y ++# CONFIG_BINFMT_MISC is not set ++CONFIG_COREDUMP=y ++# end of Executable file formats ++ ++# ++# Memory Management options ++# ++CONFIG_SWAP=y ++# CONFIG_ZSWAP is not set ++ ++# ++# Slab allocator options ++# ++CONFIG_SLUB=y ++CONFIG_SLAB_MERGE_DEFAULT=y ++# CONFIG_SLAB_FREELIST_RANDOM is not set ++# CONFIG_SLAB_FREELIST_HARDENED is not set ++# CONFIG_SLAB_BUCKETS is not set ++# CONFIG_SLUB_STATS is not set ++CONFIG_SLUB_CPU_PARTIAL=y ++# CONFIG_RANDOM_KMALLOC_CACHES is not set ++# end of Slab allocator options ++ ++# CONFIG_SHUFFLE_PAGE_ALLOCATOR is not set ++# CONFIG_COMPAT_BRK is not set ++CONFIG_SPARSEMEM=y ++CONFIG_SPARSEMEM_EXTREME=y ++CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y ++CONFIG_SPARSEMEM_VMEMMAP=y ++CONFIG_HAVE_GUP_FAST=y ++CONFIG_ARCH_KEEP_MEMBLOCK=y ++CONFIG_NUMA_KEEP_MEMINFO=y ++CONFIG_MEMORY_ISOLATION=y ++CONFIG_EXCLUSIVE_SYSTEM_RAM=y ++CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y ++CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y ++CONFIG_MEMORY_HOTPLUG=y ++# CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE is not set ++CONFIG_MEMORY_HOTREMOVE=y ++CONFIG_MHP_MEMMAP_ON_MEMORY=y ++CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y ++CONFIG_SPLIT_PTE_PTLOCKS=y ++CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y ++CONFIG_SPLIT_PMD_PTLOCKS=y ++CONFIG_MEMORY_BALLOON=y ++CONFIG_BALLOON_COMPACTION=y ++CONFIG_COMPACTION=y ++CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1 ++CONFIG_PAGE_REPORTING=y ++CONFIG_MIGRATION=y ++CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION=y ++CONFIG_ARCH_ENABLE_THP_MIGRATION=y ++CONFIG_CONTIG_ALLOC=y ++CONFIG_PCP_BATCH_SCALE_MAX=5 ++CONFIG_PHYS_ADDR_T_64BIT=y ++CONFIG_MMU_NOTIFIER=y ++CONFIG_KSM=y ++CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 ++CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y ++CONFIG_MEMORY_FAILURE=y ++# CONFIG_HWPOISON_INJECT is not set ++CONFIG_ARCH_WANTS_THP_SWAP=y ++CONFIG_TRANSPARENT_HUGEPAGE=y ++CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y ++# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set ++# CONFIG_TRANSPARENT_HUGEPAGE_NEVER is not set ++CONFIG_THP_SWAP=y ++# CONFIG_READ_ONLY_THP_FOR_FS is not set ++CONFIG_PGTABLE_HAS_HUGE_LEAVES=y ++CONFIG_ARCH_SUPPORTS_HUGE_PFNMAP=y ++CONFIG_ARCH_SUPPORTS_PMD_PFNMAP=y ++CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y ++CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y ++CONFIG_USE_PERCPU_NUMA_NODE_ID=y ++CONFIG_HAVE_SETUP_PER_CPU_AREA=y ++CONFIG_CMA=y ++# CONFIG_CMA_DEBUGFS is not set ++# CONFIG_CMA_SYSFS is not set ++CONFIG_CMA_AREAS=19 ++CONFIG_GENERIC_EARLY_IOREMAP=y ++# CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set ++# CONFIG_IDLE_PAGE_TRACKING is not set ++CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y ++CONFIG_ARCH_HAS_CURRENT_STACK_POINTER=y ++CONFIG_ARCH_HAS_PTE_DEVMAP=y ++CONFIG_ZONE_DMA=y ++CONFIG_ZONE_DMA32=y ++# CONFIG_ZONE_DEVICE is not set ++CONFIG_ARCH_USES_HIGH_VMA_FLAGS=y ++CONFIG_ARCH_HAS_PKEYS=y ++CONFIG_ARCH_USES_PG_ARCH_2=y ++CONFIG_ARCH_USES_PG_ARCH_3=y ++CONFIG_VM_EVENT_COUNTERS=y ++# CONFIG_PERCPU_STATS is not set ++# CONFIG_GUP_TEST is not set ++# CONFIG_DMAPOOL_TEST is not set ++CONFIG_ARCH_HAS_PTE_SPECIAL=y ++CONFIG_MEMFD_CREATE=y ++CONFIG_SECRETMEM=y ++# CONFIG_ANON_VMA_NAME is not set ++# CONFIG_USERFAULTFD is not set ++# CONFIG_LRU_GEN is not set ++CONFIG_ARCH_SUPPORTS_PER_VMA_LOCK=y ++CONFIG_PER_VMA_LOCK=y ++CONFIG_LOCK_MM_AND_FIND_VMA=y ++CONFIG_EXECMEM=y ++CONFIG_NUMA_MEMBLKS=y ++# CONFIG_NUMA_EMU is not set ++ ++# ++# Data Access Monitoring ++# ++# CONFIG_DAMON is not set ++# end of Data Access Monitoring ++# end of Memory Management options ++ ++CONFIG_NET=y ++CONFIG_NET_INGRESS=y ++CONFIG_NET_EGRESS=y ++CONFIG_NET_XGRESS=y ++CONFIG_NET_DEVMEM=y ++ ++# ++# Networking options ++# ++CONFIG_PACKET=y ++# CONFIG_PACKET_DIAG is not set ++CONFIG_UNIX=y ++CONFIG_AF_UNIX_OOB=y ++# CONFIG_UNIX_DIAG is not set ++# CONFIG_TLS is not set ++# CONFIG_XFRM_USER is not set ++# CONFIG_NET_KEY is not set ++# CONFIG_XDP_SOCKETS is not set ++CONFIG_NET_HANDSHAKE=y ++CONFIG_INET=y ++CONFIG_IP_MULTICAST=y ++# CONFIG_IP_ADVANCED_ROUTER is not set ++CONFIG_IP_PNP=y ++CONFIG_IP_PNP_DHCP=y ++CONFIG_IP_PNP_BOOTP=y ++# CONFIG_IP_PNP_RARP is not set ++# CONFIG_NET_IPIP is not set ++# CONFIG_NET_IPGRE_DEMUX is not set ++# CONFIG_IP_MROUTE is not set ++# CONFIG_SYN_COOKIES is not set ++# CONFIG_NET_IPVTI is not set ++# CONFIG_NET_FOU is not set ++# CONFIG_INET_AH is not set ++# CONFIG_INET_ESP is not set ++# CONFIG_INET_IPCOMP is not set ++CONFIG_INET_TABLE_PERTURB_ORDER=16 ++CONFIG_INET_DIAG=y ++CONFIG_INET_TCP_DIAG=y ++# CONFIG_INET_UDP_DIAG is not set ++# CONFIG_INET_RAW_DIAG is not set ++# CONFIG_INET_DIAG_DESTROY is not set ++# CONFIG_TCP_CONG_ADVANCED is not set ++CONFIG_TCP_CONG_CUBIC=y ++CONFIG_DEFAULT_TCP_CONG="cubic" ++# CONFIG_TCP_AO is not set ++# CONFIG_TCP_MD5SIG is not set ++# CONFIG_IPV6 is not set ++# CONFIG_NETLABEL is not set ++# CONFIG_MPTCP is not set ++# CONFIG_NETWORK_SECMARK is not set ++CONFIG_NET_PTP_CLASSIFY=y ++# CONFIG_NETWORK_PHY_TIMESTAMPING is not set ++CONFIG_NETFILTER=y ++CONFIG_NETFILTER_ADVANCED=y ++ ++# ++# Core Netfilter Configuration ++# ++CONFIG_NETFILTER_INGRESS=y ++CONFIG_NETFILTER_EGRESS=y ++CONFIG_NETFILTER_SKIP_EGRESS=y ++CONFIG_NETFILTER_BPF_LINK=y ++# CONFIG_NETFILTER_NETLINK_ACCT is not set ++# CONFIG_NETFILTER_NETLINK_QUEUE is not set ++# CONFIG_NETFILTER_NETLINK_LOG is not set ++# CONFIG_NETFILTER_NETLINK_OSF is not set ++# CONFIG_NF_CONNTRACK is not set ++# CONFIG_NF_LOG_SYSLOG is not set ++# CONFIG_NF_TABLES is not set ++# CONFIG_NETFILTER_XTABLES is not set ++# end of Core Netfilter Configuration ++ ++# CONFIG_IP_SET is not set ++# CONFIG_IP_VS is not set ++ ++# ++# IP: Netfilter Configuration ++# ++# CONFIG_NF_SOCKET_IPV4 is not set ++# CONFIG_NF_TPROXY_IPV4 is not set ++# CONFIG_NF_DUP_IPV4 is not set ++# CONFIG_NF_LOG_ARP is not set ++# CONFIG_NF_LOG_IPV4 is not set ++# CONFIG_NF_REJECT_IPV4 is not set ++# CONFIG_IP_NF_IPTABLES is not set ++# end of IP: Netfilter Configuration ++ ++# CONFIG_IP_DCCP is not set ++# CONFIG_IP_SCTP is not set ++# CONFIG_RDS is not set ++# CONFIG_TIPC is not set ++# CONFIG_ATM is not set ++# CONFIG_L2TP is not set ++# CONFIG_BRIDGE is not set ++# CONFIG_NET_DSA is not set ++# CONFIG_VLAN_8021Q is not set ++# CONFIG_LLC2 is not set ++# CONFIG_ATALK is not set ++# CONFIG_X25 is not set ++# CONFIG_LAPB is not set ++# CONFIG_PHONET is not set ++# CONFIG_IEEE802154 is not set ++CONFIG_NET_SCHED=y ++ ++# ++# Queueing/Scheduling ++# ++# CONFIG_NET_SCH_HTB is not set ++# CONFIG_NET_SCH_HFSC is not set ++# CONFIG_NET_SCH_PRIO is not set ++# CONFIG_NET_SCH_MULTIQ is not set ++# CONFIG_NET_SCH_RED is not set ++# CONFIG_NET_SCH_SFB is not set ++# CONFIG_NET_SCH_SFQ is not set ++# CONFIG_NET_SCH_TEQL is not set ++# CONFIG_NET_SCH_TBF is not set ++# CONFIG_NET_SCH_CBS is not set ++# CONFIG_NET_SCH_ETF is not set ++# CONFIG_NET_SCH_TAPRIO is not set ++# CONFIG_NET_SCH_GRED is not set ++# CONFIG_NET_SCH_NETEM is not set ++# CONFIG_NET_SCH_DRR is not set ++# CONFIG_NET_SCH_MQPRIO is not set ++# CONFIG_NET_SCH_SKBPRIO is not set ++# CONFIG_NET_SCH_CHOKE is not set ++# CONFIG_NET_SCH_QFQ is not set ++# CONFIG_NET_SCH_CODEL is not set ++# CONFIG_NET_SCH_FQ_CODEL is not set ++# CONFIG_NET_SCH_CAKE is not set ++# CONFIG_NET_SCH_FQ is not set ++# CONFIG_NET_SCH_HHF is not set ++# CONFIG_NET_SCH_PIE is not set ++# CONFIG_NET_SCH_INGRESS is not set ++# CONFIG_NET_SCH_PLUG is not set ++# CONFIG_NET_SCH_ETS is not set ++# CONFIG_NET_SCH_DEFAULT is not set ++ ++# ++# Classification ++# ++CONFIG_NET_CLS=y ++# CONFIG_NET_CLS_BASIC is not set ++# CONFIG_NET_CLS_ROUTE4 is not set ++# CONFIG_NET_CLS_FW is not set ++# CONFIG_NET_CLS_U32 is not set ++# CONFIG_NET_CLS_FLOW is not set ++# CONFIG_NET_CLS_CGROUP is not set ++# CONFIG_NET_CLS_BPF is not set ++# CONFIG_NET_CLS_FLOWER is not set ++# CONFIG_NET_CLS_MATCHALL is not set ++# CONFIG_NET_EMATCH is not set ++CONFIG_NET_CLS_ACT=y ++# CONFIG_NET_ACT_POLICE is not set ++# CONFIG_NET_ACT_GACT is not set ++# CONFIG_NET_ACT_MIRRED is not set ++# CONFIG_NET_ACT_SAMPLE is not set ++# CONFIG_NET_ACT_NAT is not set ++# CONFIG_NET_ACT_PEDIT is not set ++# CONFIG_NET_ACT_SIMP is not set ++# CONFIG_NET_ACT_SKBEDIT is not set ++# CONFIG_NET_ACT_CSUM is not set ++# CONFIG_NET_ACT_MPLS is not set ++# CONFIG_NET_ACT_VLAN is not set ++# CONFIG_NET_ACT_BPF is not set ++# CONFIG_NET_ACT_SKBMOD is not set ++# CONFIG_NET_ACT_IFE is not set ++# CONFIG_NET_ACT_TUNNEL_KEY is not set ++# CONFIG_NET_ACT_GATE is not set ++# CONFIG_NET_TC_SKB_EXT is not set ++CONFIG_NET_SCH_FIFO=y ++# CONFIG_DCB is not set ++CONFIG_DNS_RESOLVER=y ++# CONFIG_BATMAN_ADV is not set ++# CONFIG_OPENVSWITCH is not set ++# CONFIG_VSOCKETS is not set ++# CONFIG_NETLINK_DIAG is not set ++# CONFIG_MPLS is not set ++# CONFIG_NET_NSH is not set ++# CONFIG_HSR is not set ++CONFIG_NET_SWITCHDEV=y ++# CONFIG_NET_L3_MASTER_DEV is not set ++# CONFIG_QRTR is not set ++# CONFIG_NET_NCSI is not set ++CONFIG_PCPU_DEV_REFCNT=y ++CONFIG_MAX_SKB_FRAGS=17 ++CONFIG_RPS=y ++CONFIG_RFS_ACCEL=y ++CONFIG_SOCK_RX_QUEUE_MAPPING=y ++CONFIG_XPS=y ++# CONFIG_CGROUP_NET_PRIO is not set ++# CONFIG_CGROUP_NET_CLASSID is not set ++CONFIG_NET_RX_BUSY_POLL=y ++CONFIG_BQL=y ++# CONFIG_BPF_STREAM_PARSER is not set ++CONFIG_NET_FLOW_LIMIT=y ++ ++# ++# Network testing ++# ++# CONFIG_NET_PKTGEN is not set ++# end of Network testing ++# end of Networking options ++ ++# CONFIG_HAMRADIO is not set ++# CONFIG_CAN is not set ++# CONFIG_BT is not set ++# CONFIG_AF_RXRPC is not set ++# CONFIG_AF_KCM is not set ++# CONFIG_MCTP is not set ++CONFIG_WIRELESS=y ++# CONFIG_CFG80211 is not set ++ ++# ++# CFG80211 needs to be enabled for MAC80211 ++# ++CONFIG_MAC80211_STA_HASH_MAX_SIZE=0 ++# CONFIG_RFKILL is not set ++CONFIG_NET_9P=y ++CONFIG_NET_9P_FD=y ++CONFIG_NET_9P_VIRTIO=y ++# CONFIG_NET_9P_XEN is not set ++# CONFIG_NET_9P_USBG is not set ++# CONFIG_NET_9P_DEBUG is not set ++# CONFIG_CAIF is not set ++# CONFIG_CEPH_LIB is not set ++# CONFIG_NFC is not set ++# CONFIG_PSAMPLE is not set ++# CONFIG_NET_IFE is not set ++# CONFIG_LWTUNNEL is not set ++CONFIG_NET_SELFTESTS=y ++CONFIG_NET_SOCK_MSG=y ++CONFIG_NET_DEVLINK=y ++CONFIG_PAGE_POOL=y ++CONFIG_PAGE_POOL_STATS=y ++CONFIG_FAILOVER=y ++CONFIG_ETHTOOL_NETLINK=y ++ ++# ++# Device Drivers ++# ++CONFIG_ARM_AMBA=y ++CONFIG_TEGRA_AHB=y ++CONFIG_HAVE_PCI=y ++CONFIG_GENERIC_PCI_IOMAP=y ++CONFIG_PCI=y ++CONFIG_PCI_DOMAINS=y ++CONFIG_PCI_DOMAINS_GENERIC=y ++CONFIG_PCI_SYSCALL=y ++CONFIG_PCIEPORTBUS=y ++# CONFIG_HOTPLUG_PCI_PCIE is not set ++CONFIG_PCIEAER=y ++# CONFIG_PCIEAER_INJECT is not set ++# CONFIG_PCIE_ECRC is not set ++CONFIG_PCIEASPM=y ++CONFIG_PCIEASPM_DEFAULT=y ++# CONFIG_PCIEASPM_POWERSAVE is not set ++# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set ++# CONFIG_PCIEASPM_PERFORMANCE is not set ++CONFIG_PCIE_PME=y ++# CONFIG_PCIE_DPC is not set ++# CONFIG_PCIE_PTM is not set ++CONFIG_PCI_MSI=y ++CONFIG_PCI_QUIRKS=y ++# CONFIG_PCI_DEBUG is not set ++# CONFIG_PCI_REALLOC_ENABLE_AUTO is not set ++# CONFIG_PCI_STUB is not set ++# CONFIG_PCI_PF_STUB is not set ++CONFIG_PCI_ATS=y ++CONFIG_PCI_ECAM=y ++CONFIG_PCI_BRIDGE_EMUL=y ++CONFIG_PCI_IOV=y ++# CONFIG_PCI_NPEM is not set ++# CONFIG_PCI_PRI is not set ++CONFIG_PCI_PASID=y ++CONFIG_PCI_LABEL=y ++# CONFIG_PCI_DYNAMIC_OF_NODES is not set ++CONFIG_VGA_ARB=y ++CONFIG_VGA_ARB_MAX_GPUS=16 ++CONFIG_HOTPLUG_PCI=y ++CONFIG_HOTPLUG_PCI_ACPI=y ++# CONFIG_HOTPLUG_PCI_ACPI_AMPERE_ALTRA is not set ++# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set ++# CONFIG_HOTPLUG_PCI_CPCI is not set ++# CONFIG_HOTPLUG_PCI_SHPC is not set ++ ++# ++# PCI controller drivers ++# ++CONFIG_PCI_AARDVARK=y ++CONFIG_PCIE_ALTERA=y ++CONFIG_PCIE_ALTERA_MSI=y ++# CONFIG_PCIE_APPLE is not set ++# CONFIG_PCIE_BRCMSTB is not set ++CONFIG_PCIE_IPROC=y ++CONFIG_PCIE_IPROC_PLATFORM=y ++CONFIG_PCIE_IPROC_MSI=y ++CONFIG_PCI_HOST_THUNDER_PEM=y ++CONFIG_PCI_HOST_THUNDER_ECAM=y ++# CONFIG_PCI_FTPCI100 is not set ++CONFIG_PCI_HOST_COMMON=y ++CONFIG_PCI_HOST_GENERIC=y ++# CONFIG_PCIE_HISI_ERR is not set ++# CONFIG_PCIE_MEDIATEK is not set ++# CONFIG_PCIE_MEDIATEK_GEN3 is not set ++CONFIG_PCI_TEGRA=y ++CONFIG_PCIE_RCAR_HOST=y ++CONFIG_PCIE_RCAR_EP=y ++# CONFIG_PCIE_ROCKCHIP_HOST is not set ++# CONFIG_PCIE_ROCKCHIP_EP is not set ++CONFIG_PCI_XGENE=y ++CONFIG_PCI_XGENE_MSI=y ++# CONFIG_PCIE_XILINX is not set ++# CONFIG_PCIE_XILINX_DMA_PL is not set ++# CONFIG_PCIE_XILINX_NWL is not set ++# CONFIG_PCIE_XILINX_CPM is not set ++ ++# ++# Cadence-based PCIe controllers ++# ++# CONFIG_PCIE_CADENCE_PLAT_HOST is not set ++# CONFIG_PCIE_CADENCE_PLAT_EP is not set ++# CONFIG_PCI_J721E_HOST is not set ++# CONFIG_PCI_J721E_EP is not set ++# end of Cadence-based PCIe controllers ++ ++# ++# DesignWare-based PCIe controllers ++# ++CONFIG_PCIE_DW=y ++CONFIG_PCIE_DW_HOST=y ++# CONFIG_PCIE_AL is not set ++# CONFIG_PCI_MESON is not set ++CONFIG_PCI_IMX6=y ++CONFIG_PCI_IMX6_HOST=y ++# CONFIG_PCI_IMX6_EP is not set ++CONFIG_PCI_LAYERSCAPE=y ++# CONFIG_PCI_LAYERSCAPE_EP is not set ++CONFIG_PCI_HISI=y ++CONFIG_PCIE_KIRIN=y ++CONFIG_PCIE_HISI_STB=y ++# CONFIG_PCIE_KEEMBAY_HOST is not set ++# CONFIG_PCIE_KEEMBAY_EP is not set ++CONFIG_PCIE_ARMADA_8K=y ++# CONFIG_PCIE_TEGRA194_HOST is not set ++# CONFIG_PCIE_TEGRA194_EP is not set ++# CONFIG_PCIE_DW_PLAT_HOST is not set ++# CONFIG_PCIE_DW_PLAT_EP is not set ++CONFIG_PCIE_QCOM_COMMON=y ++CONFIG_PCIE_QCOM=y ++# CONFIG_PCIE_QCOM_EP is not set ++# CONFIG_PCIE_RCAR_GEN4_HOST is not set ++# CONFIG_PCIE_RCAR_GEN4_EP is not set ++CONFIG_PCIE_ROCKCHIP_DW=y ++CONFIG_PCIE_ROCKCHIP_DW_HOST=y ++# CONFIG_PCIE_ROCKCHIP_DW_EP is not set ++# CONFIG_PCI_EXYNOS is not set ++# CONFIG_PCIE_UNIPHIER is not set ++# CONFIG_PCIE_UNIPHIER_EP is not set ++# CONFIG_PCI_KEYSTONE_HOST is not set ++# CONFIG_PCI_KEYSTONE_EP is not set ++CONFIG_PCIE_VISCONTI_HOST=y ++# end of DesignWare-based PCIe controllers ++ ++# ++# Mobiveil-based PCIe controllers ++# ++CONFIG_PCIE_MOBIVEIL=y ++CONFIG_PCIE_MOBIVEIL_HOST=y ++CONFIG_PCIE_LAYERSCAPE_GEN4=y ++# CONFIG_PCIE_MOBIVEIL_PLAT is not set ++# end of Mobiveil-based PCIe controllers ++ ++# ++# PLDA-based PCIe controllers ++# ++# CONFIG_PCIE_MICROCHIP_HOST is not set ++# end of PLDA-based PCIe controllers ++# end of PCI controller drivers ++ ++# ++# PCI Endpoint ++# ++CONFIG_PCI_ENDPOINT=y ++CONFIG_PCI_ENDPOINT_CONFIGFS=y ++# CONFIG_PCI_EPF_TEST is not set ++# CONFIG_PCI_EPF_NTB is not set ++# end of PCI Endpoint ++ ++# ++# PCI switch controller drivers ++# ++# CONFIG_PCI_SW_SWITCHTEC is not set ++# end of PCI switch controller drivers ++ ++CONFIG_HAVE_PWRCTL=y ++# CONFIG_CXL_BUS is not set ++# CONFIG_PCCARD is not set ++# CONFIG_RAPIDIO is not set ++ ++# ++# Generic Driver Options ++# ++CONFIG_AUXILIARY_BUS=y ++# CONFIG_UEVENT_HELPER is not set ++CONFIG_DEVTMPFS=y ++CONFIG_DEVTMPFS_MOUNT=y ++# CONFIG_DEVTMPFS_SAFE is not set ++CONFIG_STANDALONE=y ++CONFIG_PREVENT_FIRMWARE_BUILD=y ++ ++# ++# Firmware loader ++# ++CONFIG_FW_LOADER=y ++CONFIG_FW_LOADER_PAGED_BUF=y ++CONFIG_FW_LOADER_SYSFS=y ++CONFIG_EXTRA_FIRMWARE="" ++CONFIG_FW_LOADER_USER_HELPER=y ++# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set ++# CONFIG_FW_LOADER_COMPRESS is not set ++CONFIG_FW_CACHE=y ++# CONFIG_FW_UPLOAD is not set ++# end of Firmware loader ++ ++CONFIG_WANT_DEV_COREDUMP=y ++CONFIG_ALLOW_DEV_COREDUMP=y ++CONFIG_DEV_COREDUMP=y ++# CONFIG_DEBUG_DRIVER is not set ++# CONFIG_DEBUG_DEVRES is not set ++# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set ++CONFIG_HMEM_REPORTING=y ++# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set ++CONFIG_SYS_HYPERVISOR=y ++CONFIG_GENERIC_CPU_DEVICES=y ++CONFIG_GENERIC_CPU_AUTOPROBE=y ++CONFIG_GENERIC_CPU_VULNERABILITIES=y ++CONFIG_SOC_BUS=y ++CONFIG_REGMAP=y ++CONFIG_REGMAP_I2C=y ++CONFIG_REGMAP_SPI=y ++CONFIG_REGMAP_SPMI=y ++CONFIG_REGMAP_MMIO=y ++CONFIG_REGMAP_IRQ=y ++CONFIG_DMA_SHARED_BUFFER=y ++# CONFIG_DMA_FENCE_TRACE is not set ++CONFIG_GENERIC_ARCH_TOPOLOGY=y ++CONFIG_GENERIC_ARCH_NUMA=y ++# CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT is not set ++# end of Generic Driver Options ++ ++# ++# Bus devices ++# ++CONFIG_BRCMSTB_GISB_ARB=y ++# CONFIG_MOXTET is not set ++CONFIG_HISILICON_LPC=y ++# CONFIG_IMX_WEIM is not set ++CONFIG_QCOM_EBI2=y ++# CONFIG_QCOM_SSC_BLOCK_BUS is not set ++CONFIG_STM32_FIREWALL=y ++CONFIG_SUN50I_DE2_BUS=y ++CONFIG_SUNXI_RSB=y ++# CONFIG_TEGRA_ACONNECT is not set ++# CONFIG_TEGRA_GMI is not set ++CONFIG_TI_SYSC=y ++CONFIG_UNIPHIER_SYSTEM_BUS=y ++CONFIG_VEXPRESS_CONFIG=y ++CONFIG_FSL_MC_BUS=y ++# CONFIG_FSL_MC_UAPI_SUPPORT is not set ++# CONFIG_MHI_BUS is not set ++# CONFIG_MHI_BUS_EP is not set ++# end of Bus devices ++ ++# ++# Cache Drivers ++# ++# end of Cache Drivers ++ ++# CONFIG_CONNECTOR is not set ++ ++# ++# Firmware Drivers ++# ++ ++# ++# ARM System Control and Management Interface Protocol ++# ++CONFIG_ARM_SCMI_PROTOCOL=y ++# CONFIG_ARM_SCMI_RAW_MODE_SUPPORT is not set ++# CONFIG_ARM_SCMI_DEBUG_COUNTERS is not set ++ ++# ++# SCMI Transport Drivers ++# ++CONFIG_ARM_SCMI_HAVE_TRANSPORT=y ++CONFIG_ARM_SCMI_HAVE_SHMEM=y ++CONFIG_ARM_SCMI_HAVE_MSG=y ++CONFIG_ARM_SCMI_TRANSPORT_MAILBOX=y ++CONFIG_ARM_SCMI_TRANSPORT_SMC=y ++# CONFIG_ARM_SCMI_TRANSPORT_SMC_ATOMIC_ENABLE is not set ++CONFIG_ARM_SCMI_TRANSPORT_OPTEE=y ++# CONFIG_ARM_SCMI_TRANSPORT_VIRTIO is not set ++# end of SCMI Transport Drivers ++ ++# ++# ARM SCMI NXP i.MX Vendor Protocols ++# ++CONFIG_IMX_SCMI_BBM_EXT=y ++CONFIG_IMX_SCMI_MISC_EXT=y ++# end of ARM SCMI NXP i.MX Vendor Protocols ++ ++# CONFIG_ARM_SCMI_POWER_CONTROL is not set ++# end of ARM System Control and Management Interface Protocol ++ ++CONFIG_ARM_SCPI_PROTOCOL=y ++# CONFIG_ARM_SDE_INTERFACE is not set ++CONFIG_DMIID=y ++# CONFIG_DMI_SYSFS is not set ++# CONFIG_ISCSI_IBFT is not set ++CONFIG_RASPBERRYPI_FIRMWARE=y ++# CONFIG_FW_CFG_SYSFS is not set ++CONFIG_INTEL_STRATIX10_SERVICE=y ++# CONFIG_INTEL_STRATIX10_RSU is not set ++CONFIG_SYSFB=y ++# CONFIG_SYSFB_SIMPLEFB is not set ++CONFIG_TI_SCI_PROTOCOL=y ++# CONFIG_TURRIS_MOX_RWTM is not set ++# CONFIG_ARM_FFA_TRANSPORT is not set ++CONFIG_TEE_BNXT_FW=y ++# CONFIG_GOOGLE_FIRMWARE is not set ++ ++# ++# EFI (Extensible Firmware Interface) Support ++# ++CONFIG_EFI_ESRT=y ++CONFIG_EFI_VARS_PSTORE=y ++# CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE is not set ++CONFIG_EFI_SOFT_RESERVE=y ++CONFIG_EFI_PARAMS_FROM_FDT=y ++CONFIG_EFI_RUNTIME_WRAPPERS=y ++CONFIG_EFI_GENERIC_STUB=y ++# CONFIG_EFI_ZBOOT is not set ++CONFIG_EFI_ARMSTUB_DTB_LOADER=y ++# CONFIG_EFI_BOOTLOADER_CONTROL is not set ++CONFIG_EFI_CAPSULE_LOADER=y ++# CONFIG_EFI_TEST is not set ++# CONFIG_RESET_ATTACK_MITIGATION is not set ++# CONFIG_EFI_DISABLE_PCI_DMA is not set ++CONFIG_EFI_EARLYCON=y ++CONFIG_EFI_CUSTOM_SSDT_OVERLAYS=y ++# CONFIG_EFI_DISABLE_RUNTIME is not set ++# CONFIG_EFI_COCO_SECRET is not set ++# end of EFI (Extensible Firmware Interface) Support ++ ++CONFIG_UEFI_CPER=y ++CONFIG_UEFI_CPER_ARM=y ++# CONFIG_TEE_STMM_EFI is not set ++# CONFIG_IMX_DSP is not set ++CONFIG_IMX_SCU=y ++CONFIG_IMX_SCMI_MISC_DRV=y ++CONFIG_MESON_SM=y ++CONFIG_ARM_PSCI_FW=y ++# CONFIG_ARM_PSCI_CHECKER is not set ++ ++# ++# Qualcomm firmware drivers ++# ++CONFIG_QCOM_SCM=y ++CONFIG_QCOM_TZMEM=y ++CONFIG_QCOM_TZMEM_MODE_GENERIC=y ++# CONFIG_QCOM_TZMEM_MODE_SHMBRIDGE is not set ++# CONFIG_QCOM_QSEECOM is not set ++# end of Qualcomm firmware drivers ++ ++CONFIG_HAVE_ARM_SMCCC=y ++CONFIG_HAVE_ARM_SMCCC_DISCOVERY=y ++CONFIG_ARM_SMCCC_SOC_ID=y ++ ++# ++# Tegra firmware driver ++# ++CONFIG_TEGRA_IVC=y ++CONFIG_TEGRA_BPMP=y ++# end of Tegra firmware driver ++ ++# ++# Zynq MPSoC Firmware Drivers ++# ++CONFIG_ZYNQMP_FIRMWARE=y ++# CONFIG_ZYNQMP_FIRMWARE_DEBUG is not set ++# end of Zynq MPSoC Firmware Drivers ++# end of Firmware Drivers ++ ++# CONFIG_GNSS is not set ++CONFIG_MTD=y ++# CONFIG_MTD_TESTS is not set ++ ++# ++# Partition parsers ++# ++# CONFIG_MTD_BRCM_U_BOOT is not set ++# CONFIG_MTD_CMDLINE_PARTS is not set ++CONFIG_MTD_OF_PARTS=y ++CONFIG_MTD_OF_PARTS_BCM4908=y ++# CONFIG_MTD_OF_PARTS_LINKSYS_NS is not set ++# CONFIG_MTD_AFS_PARTS is not set ++# CONFIG_MTD_PARSER_TRX is not set ++# CONFIG_MTD_REDBOOT_PARTS is not set ++# CONFIG_MTD_QCOMSMEM_PARTS is not set ++# end of Partition parsers ++ ++# ++# User Modules And Translation Layers ++# ++CONFIG_MTD_BLKDEVS=y ++CONFIG_MTD_BLOCK=y ++ ++# ++# Note that in some cases UBI block is preferred. See MTD_UBI_BLOCK. ++# ++# CONFIG_FTL is not set ++# CONFIG_NFTL is not set ++# CONFIG_INFTL is not set ++# CONFIG_RFD_FTL is not set ++# CONFIG_SSFDC is not set ++# CONFIG_SM_FTL is not set ++# CONFIG_MTD_OOPS is not set ++# CONFIG_MTD_SWAP is not set ++# CONFIG_MTD_PARTITIONED_MASTER is not set ++ ++# ++# RAM/ROM/Flash chip drivers ++# ++CONFIG_MTD_CFI=y ++# CONFIG_MTD_JEDECPROBE is not set ++CONFIG_MTD_GEN_PROBE=y ++CONFIG_MTD_CFI_ADV_OPTIONS=y ++CONFIG_MTD_CFI_NOSWAP=y ++# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set ++# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set ++# CONFIG_MTD_CFI_GEOMETRY is not set ++CONFIG_MTD_MAP_BANK_WIDTH_1=y ++CONFIG_MTD_MAP_BANK_WIDTH_2=y ++CONFIG_MTD_MAP_BANK_WIDTH_4=y ++CONFIG_MTD_CFI_I1=y ++CONFIG_MTD_CFI_I2=y ++# CONFIG_MTD_OTP is not set ++CONFIG_MTD_CFI_INTELEXT=y ++CONFIG_MTD_CFI_AMDSTD=y ++CONFIG_MTD_CFI_STAA=y ++CONFIG_MTD_CFI_UTIL=y ++# CONFIG_MTD_RAM is not set ++# CONFIG_MTD_ROM is not set ++# CONFIG_MTD_ABSENT is not set ++# end of RAM/ROM/Flash chip drivers ++ ++# ++# Mapping drivers for chip access ++# ++# CONFIG_MTD_COMPLEX_MAPPINGS is not set ++CONFIG_MTD_PHYSMAP=y ++# CONFIG_MTD_PHYSMAP_COMPAT is not set ++CONFIG_MTD_PHYSMAP_OF=y ++# CONFIG_MTD_PHYSMAP_VERSATILE is not set ++# CONFIG_MTD_PHYSMAP_GEMINI is not set ++# CONFIG_MTD_PLATRAM is not set ++# end of Mapping drivers for chip access ++ ++# ++# Self-contained MTD device drivers ++# ++# CONFIG_MTD_PMC551 is not set ++CONFIG_MTD_DATAFLASH=y ++# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set ++# CONFIG_MTD_DATAFLASH_OTP is not set ++# CONFIG_MTD_MCHP23K256 is not set ++# CONFIG_MTD_MCHP48L640 is not set ++CONFIG_MTD_SST25L=y ++# CONFIG_MTD_SLRAM is not set ++# CONFIG_MTD_PHRAM is not set ++# CONFIG_MTD_MTDRAM is not set ++# CONFIG_MTD_BLOCK2MTD is not set ++ ++# ++# Disk-On-Chip Device Drivers ++# ++# CONFIG_MTD_DOCG3 is not set ++# end of Self-contained MTD device drivers ++ ++# ++# NAND ++# ++CONFIG_MTD_NAND_CORE=y ++# CONFIG_MTD_ONENAND is not set ++CONFIG_MTD_RAW_NAND=y ++ ++# ++# Raw/parallel NAND flash controllers ++# ++CONFIG_MTD_NAND_DENALI=y ++# CONFIG_MTD_NAND_DENALI_PCI is not set ++CONFIG_MTD_NAND_DENALI_DT=y ++# CONFIG_MTD_NAND_CAFE is not set ++CONFIG_MTD_NAND_MARVELL=y ++# CONFIG_MTD_NAND_BRCMNAND is not set ++CONFIG_MTD_NAND_FSL_IFC=y ++# CONFIG_MTD_NAND_MXC is not set ++# CONFIG_MTD_NAND_SUNXI is not set ++# CONFIG_MTD_NAND_HISI504 is not set ++CONFIG_MTD_NAND_QCOM=y ++# CONFIG_MTD_NAND_MXIC is not set ++# CONFIG_MTD_NAND_TEGRA is not set ++# CONFIG_MTD_NAND_STM32_FMC2 is not set ++# CONFIG_MTD_NAND_MESON is not set ++# CONFIG_MTD_NAND_GPIO is not set ++# CONFIG_MTD_NAND_PLATFORM is not set ++# CONFIG_MTD_NAND_CADENCE is not set ++# CONFIG_MTD_NAND_ARASAN is not set ++# CONFIG_MTD_NAND_INTEL_LGM is not set ++# CONFIG_MTD_NAND_ROCKCHIP is not set ++# CONFIG_MTD_NAND_RENESAS is not set ++ ++# ++# Misc ++# ++# CONFIG_MTD_NAND_NANDSIM is not set ++# CONFIG_MTD_NAND_RICOH is not set ++# CONFIG_MTD_NAND_DISKONCHIP is not set ++# CONFIG_MTD_SPI_NAND is not set ++ ++# ++# ECC engine support ++# ++CONFIG_MTD_NAND_ECC=y ++CONFIG_MTD_NAND_ECC_SW_HAMMING=y ++# CONFIG_MTD_NAND_ECC_SW_HAMMING_SMC is not set ++# CONFIG_MTD_NAND_ECC_SW_BCH is not set ++# CONFIG_MTD_NAND_ECC_MXIC is not set ++# CONFIG_MTD_NAND_ECC_MEDIATEK is not set ++# end of ECC engine support ++# end of NAND ++ ++# ++# LPDDR & LPDDR2 PCM memory drivers ++# ++# CONFIG_MTD_LPDDR is not set ++# end of LPDDR & LPDDR2 PCM memory drivers ++ ++CONFIG_MTD_SPI_NOR=y ++CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y ++# CONFIG_MTD_SPI_NOR_SWP_DISABLE is not set ++CONFIG_MTD_SPI_NOR_SWP_DISABLE_ON_VOLATILE=y ++# CONFIG_MTD_SPI_NOR_SWP_KEEP is not set ++# CONFIG_SPI_HISI_SFC is not set ++# CONFIG_MTD_UBI is not set ++# CONFIG_MTD_HYPERBUS is not set ++CONFIG_DTC=y ++CONFIG_OF=y ++# CONFIG_OF_UNITTEST is not set ++CONFIG_OF_FLATTREE=y ++CONFIG_OF_EARLY_FLATTREE=y ++CONFIG_OF_KOBJ=y ++CONFIG_OF_DYNAMIC=y ++CONFIG_OF_ADDRESS=y ++CONFIG_OF_IRQ=y ++CONFIG_OF_RESERVED_MEM=y ++# CONFIG_OF_OVERLAY is not set ++CONFIG_OF_NUMA=y ++# CONFIG_PARPORT is not set ++CONFIG_PNP=y ++CONFIG_PNP_DEBUG_MESSAGES=y ++ ++# ++# Protocols ++# ++CONFIG_PNPACPI=y ++CONFIG_BLK_DEV=y ++# CONFIG_BLK_DEV_NULL_BLK is not set ++# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set ++# CONFIG_ZRAM is not set ++CONFIG_ZRAM_DEF_COMP="unset-value" ++CONFIG_BLK_DEV_LOOP=y ++CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 ++# CONFIG_BLK_DEV_DRBD is not set ++# CONFIG_BLK_DEV_NBD is not set ++# CONFIG_BLK_DEV_RAM is not set ++# CONFIG_CDROM_PKTCDVD is not set ++# CONFIG_ATA_OVER_ETH is not set ++CONFIG_XEN_BLKDEV_FRONTEND=y ++# CONFIG_XEN_BLKDEV_BACKEND is not set ++CONFIG_VIRTIO_BLK=y ++# CONFIG_BLK_DEV_RBD is not set ++# CONFIG_BLK_DEV_UBLK is not set ++ ++# ++# NVME Support ++# ++# CONFIG_BLK_DEV_NVME is not set ++# CONFIG_NVME_FC is not set ++# CONFIG_NVME_TCP is not set ++# CONFIG_NVME_APPLE is not set ++# CONFIG_NVME_TARGET is not set ++# end of NVME Support ++ ++# ++# Misc devices ++# ++# CONFIG_AD525X_DPOT is not set ++# CONFIG_DUMMY_IRQ is not set ++# CONFIG_PHANTOM is not set ++# CONFIG_RPMB is not set ++# CONFIG_TIFM_CORE is not set ++# CONFIG_ICS932S401 is not set ++# CONFIG_ENCLOSURE_SERVICES is not set ++# CONFIG_HI6421V600_IRQ is not set ++# CONFIG_HP_ILO is not set ++# CONFIG_QCOM_COINCELL is not set ++# CONFIG_QCOM_FASTRPC is not set ++# CONFIG_APDS9802ALS is not set ++# CONFIG_ISL29003 is not set ++# CONFIG_ISL29020 is not set ++# CONFIG_SENSORS_TSL2550 is not set ++# CONFIG_SENSORS_BH1770 is not set ++# CONFIG_SENSORS_APDS990X is not set ++# CONFIG_HMC6352 is not set ++# CONFIG_DS1682 is not set ++# CONFIG_LATTICE_ECP3_CONFIG is not set ++CONFIG_SRAM=y ++# CONFIG_DW_XDATA_PCIE is not set ++# CONFIG_PCI_ENDPOINT_TEST is not set ++# CONFIG_XILINX_SDFEC is not set ++# CONFIG_HISI_HIKEY_USB is not set ++# CONFIG_OPEN_DICE is not set ++# CONFIG_VCPU_STALL_DETECTOR is not set ++# CONFIG_NSM is not set ++# CONFIG_MARVELL_CN10K_DPI is not set ++# CONFIG_C2PORT is not set ++ ++# ++# EEPROM support ++# ++# CONFIG_EEPROM_AT24 is not set ++# CONFIG_EEPROM_AT25 is not set ++# CONFIG_EEPROM_MAX6875 is not set ++# CONFIG_EEPROM_93CX6 is not set ++# CONFIG_EEPROM_93XX46 is not set ++# CONFIG_EEPROM_IDT_89HPESX is not set ++# CONFIG_EEPROM_EE1004 is not set ++# end of EEPROM support ++ ++# CONFIG_CB710_CORE is not set ++ ++# ++# Texas Instruments shared transport line discipline ++# ++# CONFIG_TI_ST is not set ++# end of Texas Instruments shared transport line discipline ++ ++# CONFIG_SENSORS_LIS3_I2C is not set ++# CONFIG_ALTERA_STAPL is not set ++# CONFIG_VMWARE_VMCI is not set ++# CONFIG_GENWQE is not set ++# CONFIG_ECHO is not set ++# CONFIG_BCM_VK is not set ++# CONFIG_MISC_ALCOR_PCI is not set ++# CONFIG_MISC_RTSX_PCI is not set ++# CONFIG_MISC_RTSX_USB is not set ++# CONFIG_UACCE is not set ++# CONFIG_PVPANIC is not set ++# CONFIG_GP_PCI1XXXX is not set ++# CONFIG_KEBA_CP500 is not set ++# end of Misc devices ++ ++# ++# SCSI device support ++# ++CONFIG_SCSI_MOD=y ++# CONFIG_RAID_ATTRS is not set ++CONFIG_SCSI_COMMON=y ++CONFIG_SCSI=y ++CONFIG_SCSI_DMA=y ++# CONFIG_SCSI_PROC_FS is not set ++ ++# ++# SCSI support type (disk, tape, CD-ROM) ++# ++CONFIG_BLK_DEV_SD=y ++# CONFIG_CHR_DEV_ST is not set ++# CONFIG_BLK_DEV_SR is not set ++# CONFIG_CHR_DEV_SG is not set ++CONFIG_BLK_DEV_BSG=y ++# CONFIG_CHR_DEV_SCH is not set ++# CONFIG_SCSI_CONSTANTS is not set ++# CONFIG_SCSI_LOGGING is not set ++# CONFIG_SCSI_SCAN_ASYNC is not set ++ ++# ++# SCSI Transports ++# ++# CONFIG_SCSI_SPI_ATTRS is not set ++# CONFIG_SCSI_FC_ATTRS is not set ++# CONFIG_SCSI_ISCSI_ATTRS is not set ++CONFIG_SCSI_SAS_ATTRS=y ++CONFIG_SCSI_SAS_LIBSAS=y ++CONFIG_SCSI_SAS_ATA=y ++CONFIG_SCSI_SAS_HOST_SMP=y ++# CONFIG_SCSI_SRP_ATTRS is not set ++# end of SCSI Transports ++ ++CONFIG_SCSI_LOWLEVEL=y ++# CONFIG_ISCSI_TCP is not set ++# CONFIG_ISCSI_BOOT_SYSFS is not set ++# CONFIG_SCSI_CXGB3_ISCSI is not set ++# CONFIG_SCSI_CXGB4_ISCSI is not set ++# CONFIG_SCSI_BNX2_ISCSI is not set ++# CONFIG_BE2ISCSI is not set ++# CONFIG_BLK_DEV_3W_XXXX_RAID is not set ++# CONFIG_SCSI_HPSA is not set ++# CONFIG_SCSI_3W_9XXX is not set ++# CONFIG_SCSI_3W_SAS is not set ++# CONFIG_SCSI_ACARD is not set ++# CONFIG_SCSI_AACRAID is not set ++# CONFIG_SCSI_AIC7XXX is not set ++# CONFIG_SCSI_AIC79XX is not set ++# CONFIG_SCSI_AIC94XX is not set ++CONFIG_SCSI_HISI_SAS=y ++CONFIG_SCSI_HISI_SAS_PCI=y ++# CONFIG_SCSI_HISI_SAS_DEBUGFS_DEFAULT_ENABLE is not set ++# CONFIG_SCSI_MVSAS is not set ++# CONFIG_SCSI_MVUMI is not set ++# CONFIG_SCSI_ADVANSYS is not set ++# CONFIG_SCSI_ARCMSR is not set ++# CONFIG_SCSI_ESAS2R is not set ++# CONFIG_MEGARAID_NEWGEN is not set ++# CONFIG_MEGARAID_LEGACY is not set ++CONFIG_MEGARAID_SAS=y ++# CONFIG_SCSI_MPT3SAS is not set ++# CONFIG_SCSI_MPT2SAS is not set ++# CONFIG_SCSI_MPI3MR is not set ++# CONFIG_SCSI_SMARTPQI is not set ++# CONFIG_SCSI_HPTIOP is not set ++# CONFIG_SCSI_BUSLOGIC is not set ++# CONFIG_SCSI_MYRB is not set ++# CONFIG_SCSI_MYRS is not set ++# CONFIG_XEN_SCSI_FRONTEND is not set ++# CONFIG_SCSI_SNIC is not set ++# CONFIG_SCSI_DMX3191D is not set ++# CONFIG_SCSI_FDOMAIN_PCI is not set ++# CONFIG_SCSI_IPS is not set ++# CONFIG_SCSI_INITIO is not set ++# CONFIG_SCSI_INIA100 is not set ++# CONFIG_SCSI_STEX is not set ++# CONFIG_SCSI_SYM53C8XX_2 is not set ++# CONFIG_SCSI_IPR is not set ++# CONFIG_SCSI_QLOGIC_1280 is not set ++# CONFIG_SCSI_QLA_ISCSI is not set ++# CONFIG_SCSI_DC395x is not set ++# CONFIG_SCSI_AM53C974 is not set ++# CONFIG_SCSI_WD719X is not set ++# CONFIG_SCSI_DEBUG is not set ++# CONFIG_SCSI_PMCRAID is not set ++# CONFIG_SCSI_PM8001 is not set ++# CONFIG_SCSI_VIRTIO is not set ++# CONFIG_SCSI_DH is not set ++# end of SCSI device support ++ ++CONFIG_ATA=y ++CONFIG_SATA_HOST=y ++CONFIG_PATA_TIMINGS=y ++CONFIG_ATA_VERBOSE_ERROR=y ++CONFIG_ATA_FORCE=y ++CONFIG_ATA_ACPI=y ++# CONFIG_SATA_ZPODD is not set ++CONFIG_SATA_PMP=y ++ ++# ++# Controllers with non-SFF native interface ++# ++CONFIG_SATA_AHCI=y ++CONFIG_SATA_MOBILE_LPM_POLICY=0 ++CONFIG_SATA_AHCI_PLATFORM=y ++# CONFIG_AHCI_BRCM is not set ++# CONFIG_AHCI_DWC is not set ++# CONFIG_AHCI_IMX is not set ++CONFIG_AHCI_CEVA=y ++# CONFIG_AHCI_MTK is not set ++CONFIG_AHCI_MVEBU=y ++# CONFIG_AHCI_SUNXI is not set ++# CONFIG_AHCI_TEGRA is not set ++CONFIG_AHCI_XGENE=y ++CONFIG_AHCI_QORIQ=y ++# CONFIG_SATA_AHCI_SEATTLE is not set ++# CONFIG_SATA_INIC162X is not set ++# CONFIG_SATA_ACARD_AHCI is not set ++CONFIG_SATA_SIL24=y ++CONFIG_ATA_SFF=y ++ ++# ++# SFF controllers with custom DMA interface ++# ++# CONFIG_PDC_ADMA is not set ++# CONFIG_SATA_QSTOR is not set ++# CONFIG_SATA_SX4 is not set ++CONFIG_ATA_BMDMA=y ++ ++# ++# SATA SFF controllers with BMDMA ++# ++# CONFIG_ATA_PIIX is not set ++# CONFIG_SATA_DWC is not set ++# CONFIG_SATA_MV is not set ++# CONFIG_SATA_NV is not set ++# CONFIG_SATA_PROMISE is not set ++CONFIG_SATA_RCAR=y ++# CONFIG_SATA_SIL is not set ++# CONFIG_SATA_SIS is not set ++# CONFIG_SATA_SVW is not set ++# CONFIG_SATA_ULI is not set ++# CONFIG_SATA_VIA is not set ++# CONFIG_SATA_VITESSE is not set ++ ++# ++# PATA SFF controllers with BMDMA ++# ++# CONFIG_PATA_ALI is not set ++# CONFIG_PATA_AMD is not set ++# CONFIG_PATA_ARTOP is not set ++# CONFIG_PATA_ATIIXP is not set ++# CONFIG_PATA_ATP867X is not set ++# CONFIG_PATA_CMD64X is not set ++# CONFIG_PATA_CYPRESS is not set ++# CONFIG_PATA_EFAR is not set ++# CONFIG_PATA_HPT366 is not set ++# CONFIG_PATA_HPT37X is not set ++# CONFIG_PATA_HPT3X2N is not set ++# CONFIG_PATA_HPT3X3 is not set ++# CONFIG_PATA_IMX is not set ++# CONFIG_PATA_IT8213 is not set ++# CONFIG_PATA_IT821X is not set ++# CONFIG_PATA_JMICRON is not set ++# CONFIG_PATA_MARVELL is not set ++# CONFIG_PATA_NETCELL is not set ++# CONFIG_PATA_NINJA32 is not set ++# CONFIG_PATA_NS87415 is not set ++# CONFIG_PATA_OLDPIIX is not set ++# CONFIG_PATA_OPTIDMA is not set ++# CONFIG_PATA_PDC2027X is not set ++# CONFIG_PATA_PDC_OLD is not set ++# CONFIG_PATA_RADISYS is not set ++# CONFIG_PATA_RDC is not set ++# CONFIG_PATA_SCH is not set ++# CONFIG_PATA_SERVERWORKS is not set ++# CONFIG_PATA_SIL680 is not set ++# CONFIG_PATA_SIS is not set ++# CONFIG_PATA_TOSHIBA is not set ++# CONFIG_PATA_TRIFLEX is not set ++# CONFIG_PATA_VIA is not set ++# CONFIG_PATA_WINBOND is not set ++ ++# ++# PIO-only SFF controllers ++# ++# CONFIG_PATA_CMD640_PCI is not set ++# CONFIG_PATA_MPIIX is not set ++# CONFIG_PATA_NS87410 is not set ++# CONFIG_PATA_OPTI is not set ++CONFIG_PATA_PLATFORM=y ++CONFIG_PATA_OF_PLATFORM=y ++# CONFIG_PATA_RZ1000 is not set ++ ++# ++# Generic fallback / legacy drivers ++# ++# CONFIG_PATA_ACPI is not set ++# CONFIG_ATA_GENERIC is not set ++# CONFIG_PATA_LEGACY is not set ++CONFIG_MD=y ++# CONFIG_BLK_DEV_MD is not set ++CONFIG_MD_BITMAP_FILE=y ++# CONFIG_BCACHE is not set ++# CONFIG_BLK_DEV_DM is not set ++# CONFIG_TARGET_CORE is not set ++# CONFIG_FUSION is not set ++ ++# ++# IEEE 1394 (FireWire) support ++# ++# CONFIG_FIREWIRE is not set ++# CONFIG_FIREWIRE_NOSY is not set ++# end of IEEE 1394 (FireWire) support ++ ++CONFIG_NETDEVICES=y ++CONFIG_MII=y ++CONFIG_NET_CORE=y ++# CONFIG_BONDING is not set ++# CONFIG_DUMMY is not set ++# CONFIG_WIREGUARD is not set ++# CONFIG_EQUALIZER is not set ++# CONFIG_NET_FC is not set ++# CONFIG_NET_TEAM is not set ++CONFIG_MACVLAN=y ++# CONFIG_MACVTAP is not set ++# CONFIG_IPVLAN is not set ++# CONFIG_VXLAN is not set ++# CONFIG_GENEVE is not set ++# CONFIG_BAREUDP is not set ++# CONFIG_GTP is not set ++# CONFIG_PFCP is not set ++# CONFIG_AMT is not set ++# CONFIG_MACSEC is not set ++# CONFIG_NETCONSOLE is not set ++CONFIG_TUN=y ++# CONFIG_TUN_VNET_CROSS_LE is not set ++# CONFIG_VETH is not set ++CONFIG_VIRTIO_NET=y ++CONFIG_NLMON=y ++# CONFIG_NETKIT is not set ++# CONFIG_ARCNET is not set ++CONFIG_ETHERNET=y ++CONFIG_NET_VENDOR_3COM=y ++# CONFIG_VORTEX is not set ++# CONFIG_TYPHOON is not set ++CONFIG_NET_VENDOR_ACTIONS=y ++# CONFIG_OWL_EMAC is not set ++CONFIG_NET_VENDOR_ADAPTEC=y ++# CONFIG_ADAPTEC_STARFIRE is not set ++CONFIG_NET_VENDOR_AGERE=y ++# CONFIG_ET131X is not set ++CONFIG_NET_VENDOR_ALACRITECH=y ++# CONFIG_SLICOSS is not set ++CONFIG_NET_VENDOR_ALLWINNER=y ++# CONFIG_SUN4I_EMAC is not set ++CONFIG_NET_VENDOR_ALTEON=y ++# CONFIG_ACENIC is not set ++# CONFIG_ALTERA_TSE is not set ++CONFIG_NET_VENDOR_AMAZON=y ++# CONFIG_ENA_ETHERNET is not set ++CONFIG_NET_VENDOR_AMD=y ++# CONFIG_AMD8111_ETH is not set ++# CONFIG_PCNET32 is not set ++CONFIG_AMD_XGBE=y ++# CONFIG_PDS_CORE is not set ++CONFIG_NET_XGENE=y ++# CONFIG_NET_XGENE_V2 is not set ++CONFIG_NET_VENDOR_AQUANTIA=y ++# CONFIG_AQTION is not set ++CONFIG_NET_VENDOR_ARC=y ++# CONFIG_EMAC_ROCKCHIP is not set ++CONFIG_NET_VENDOR_ASIX=y ++# CONFIG_SPI_AX88796C is not set ++CONFIG_NET_VENDOR_ATHEROS=y ++# CONFIG_ATL2 is not set ++# CONFIG_ATL1 is not set ++# CONFIG_ATL1E is not set ++# CONFIG_ATL1C is not set ++# CONFIG_ALX is not set ++CONFIG_NET_VENDOR_BROADCOM=y ++# CONFIG_B44 is not set ++CONFIG_BCM4908_ENET=y ++# CONFIG_BCMGENET is not set ++# CONFIG_BNX2 is not set ++# CONFIG_CNIC is not set ++# CONFIG_TIGON3 is not set ++# CONFIG_BNX2X is not set ++CONFIG_BGMAC=y ++CONFIG_BGMAC_PLATFORM=y ++# CONFIG_SYSTEMPORT is not set ++# CONFIG_BNXT is not set ++CONFIG_BCMASP=y ++CONFIG_NET_VENDOR_CADENCE=y ++CONFIG_MACB=y ++CONFIG_MACB_USE_HWSTAMP=y ++# CONFIG_MACB_PCI is not set ++CONFIG_NET_VENDOR_CAVIUM=y ++CONFIG_THUNDER_NIC_PF=y ++# CONFIG_THUNDER_NIC_VF is not set ++CONFIG_THUNDER_NIC_BGX=y ++CONFIG_THUNDER_NIC_RGX=y ++# CONFIG_CAVIUM_PTP is not set ++# CONFIG_LIQUIDIO is not set ++# CONFIG_LIQUIDIO_VF is not set ++CONFIG_NET_VENDOR_CHELSIO=y ++# CONFIG_CHELSIO_T1 is not set ++# CONFIG_CHELSIO_T3 is not set ++# CONFIG_CHELSIO_T4 is not set ++# CONFIG_CHELSIO_T4VF is not set ++CONFIG_NET_VENDOR_CISCO=y ++# CONFIG_ENIC is not set ++CONFIG_NET_VENDOR_CORTINA=y ++# CONFIG_GEMINI_ETHERNET is not set ++CONFIG_NET_VENDOR_DAVICOM=y ++# CONFIG_DM9051 is not set ++# CONFIG_DNET is not set ++CONFIG_NET_VENDOR_DEC=y ++# CONFIG_NET_TULIP is not set ++CONFIG_NET_VENDOR_DLINK=y ++# CONFIG_DL2K is not set ++# CONFIG_SUNDANCE is not set ++CONFIG_NET_VENDOR_EMULEX=y ++# CONFIG_BE2NET is not set ++CONFIG_NET_VENDOR_ENGLEDER=y ++# CONFIG_TSNEP is not set ++CONFIG_NET_VENDOR_EZCHIP=y ++# CONFIG_EZCHIP_NPS_MANAGEMENT_ENET is not set ++CONFIG_NET_VENDOR_FREESCALE=y ++CONFIG_FEC=y ++CONFIG_FSL_FMAN=y ++CONFIG_DPAA_ERRATUM_A050385=y ++# CONFIG_FSL_PQ_MDIO is not set ++CONFIG_FSL_XGMAC_MDIO=y ++# CONFIG_GIANFAR is not set ++CONFIG_FSL_DPAA_ETH=y ++CONFIG_FSL_DPAA2_ETH=y ++CONFIG_FSL_DPAA2_PTP_CLOCK=y ++# CONFIG_FSL_DPAA2_SWITCH is not set ++CONFIG_FSL_ENETC_CORE=y ++CONFIG_FSL_ENETC=y ++CONFIG_FSL_ENETC_VF=y ++CONFIG_FSL_ENETC_IERB=y ++CONFIG_FSL_ENETC_MDIO=y ++CONFIG_FSL_ENETC_PTP_CLOCK=y ++CONFIG_NET_VENDOR_FUNGIBLE=y ++# CONFIG_FUN_ETH is not set ++CONFIG_NET_VENDOR_GOOGLE=y ++# CONFIG_GVE is not set ++CONFIG_NET_VENDOR_HISILICON=y ++CONFIG_HIX5HD2_GMAC=y ++# CONFIG_HISI_FEMAC is not set ++# CONFIG_HIP04_ETH is not set ++CONFIG_HNS_MDIO=y ++CONFIG_HNS=y ++CONFIG_HNS_DSAF=y ++CONFIG_HNS_ENET=y ++CONFIG_HNS3=y ++CONFIG_HNS3_HCLGE=y ++# CONFIG_HNS3_HCLGEVF is not set ++CONFIG_HNS3_ENET=y ++CONFIG_NET_VENDOR_HUAWEI=y ++# CONFIG_HINIC is not set ++CONFIG_NET_VENDOR_I825XX=y ++CONFIG_NET_VENDOR_INTEL=y ++# CONFIG_E100 is not set ++CONFIG_E1000=y ++CONFIG_E1000E=y ++CONFIG_IGB=y ++CONFIG_IGB_HWMON=y ++CONFIG_IGBVF=y ++# CONFIG_IXGBE is not set ++# CONFIG_IXGBEVF is not set ++# CONFIG_I40E is not set ++# CONFIG_I40EVF is not set ++# CONFIG_ICE is not set ++# CONFIG_FM10K is not set ++# CONFIG_IGC is not set ++# CONFIG_IDPF is not set ++# CONFIG_JME is not set ++CONFIG_NET_VENDOR_ADI=y ++# CONFIG_ADIN1110 is not set ++CONFIG_NET_VENDOR_LITEX=y ++# CONFIG_LITEX_LITEETH is not set ++CONFIG_NET_VENDOR_MARVELL=y ++CONFIG_MVMDIO=y ++CONFIG_MVNETA=y ++CONFIG_MVPP2=y ++# CONFIG_MVPP2_PTP is not set ++# CONFIG_PXA168_ETH is not set ++# CONFIG_SKGE is not set ++CONFIG_SKY2=y ++# CONFIG_SKY2_DEBUG is not set ++# CONFIG_OCTEONTX2_AF is not set ++# CONFIG_OCTEONTX2_PF is not set ++# CONFIG_OCTEON_EP is not set ++# CONFIG_OCTEON_EP_VF is not set ++# CONFIG_NET_VENDOR_MEDIATEK is not set ++CONFIG_NET_VENDOR_MELLANOX=y ++# CONFIG_MLX4_EN is not set ++# CONFIG_MLX5_CORE is not set ++# CONFIG_MLXSW_CORE is not set ++# CONFIG_MLXFW is not set ++# CONFIG_MLXBF_GIGE is not set ++CONFIG_NET_VENDOR_META=y ++CONFIG_NET_VENDOR_MICREL=y ++# CONFIG_KS8842 is not set ++# CONFIG_KS8851 is not set ++# CONFIG_KS8851_MLL is not set ++# CONFIG_KSZ884X_PCI is not set ++CONFIG_NET_VENDOR_MICROCHIP=y ++# CONFIG_ENC28J60 is not set ++# CONFIG_ENCX24J600 is not set ++# CONFIG_LAN743X is not set ++# CONFIG_LAN865X is not set ++# CONFIG_LAN966X_SWITCH is not set ++# CONFIG_SPARX5_SWITCH is not set ++# CONFIG_VCAP is not set ++CONFIG_NET_VENDOR_MICROSEMI=y ++# CONFIG_MSCC_OCELOT_SWITCH is not set ++CONFIG_NET_VENDOR_MICROSOFT=y ++CONFIG_NET_VENDOR_MYRI=y ++# CONFIG_MYRI10GE is not set ++# CONFIG_FEALNX is not set ++CONFIG_NET_VENDOR_NI=y ++# CONFIG_NI_XGE_MANAGEMENT_ENET is not set ++CONFIG_NET_VENDOR_NATSEMI=y ++# CONFIG_NATSEMI is not set ++# CONFIG_NS83820 is not set ++CONFIG_NET_VENDOR_NETERION=y ++# CONFIG_S2IO is not set ++CONFIG_NET_VENDOR_NETRONOME=y ++# CONFIG_NFP is not set ++CONFIG_NET_VENDOR_8390=y ++# CONFIG_NE2K_PCI is not set ++CONFIG_NET_VENDOR_NVIDIA=y ++# CONFIG_FORCEDETH is not set ++CONFIG_NET_VENDOR_OKI=y ++# CONFIG_ETHOC is not set ++# CONFIG_OA_TC6 is not set ++CONFIG_NET_VENDOR_PACKET_ENGINES=y ++# CONFIG_HAMACHI is not set ++# CONFIG_YELLOWFIN is not set ++CONFIG_NET_VENDOR_PENSANDO=y ++# CONFIG_IONIC is not set ++CONFIG_NET_VENDOR_QLOGIC=y ++# CONFIG_QLA3XXX is not set ++# CONFIG_QLCNIC is not set ++# CONFIG_NETXEN_NIC is not set ++# CONFIG_QED is not set ++CONFIG_NET_VENDOR_BROCADE=y ++# CONFIG_BNA is not set ++CONFIG_NET_VENDOR_QUALCOMM=y ++# CONFIG_QCA7000_SPI is not set ++# CONFIG_QCA7000_UART is not set ++# CONFIG_QCOM_EMAC is not set ++# CONFIG_RMNET is not set ++CONFIG_NET_VENDOR_RDC=y ++# CONFIG_R6040 is not set ++CONFIG_NET_VENDOR_REALTEK=y ++# CONFIG_8139CP is not set ++# CONFIG_8139TOO is not set ++# CONFIG_R8169 is not set ++# CONFIG_RTASE is not set ++CONFIG_NET_VENDOR_RENESAS=y ++CONFIG_SH_ETH=y ++CONFIG_RAVB=y ++CONFIG_RENESAS_ETHER_SWITCH=y ++CONFIG_RENESAS_GEN4_PTP=y ++# CONFIG_RTSN is not set ++CONFIG_NET_VENDOR_ROCKER=y ++CONFIG_NET_VENDOR_SAMSUNG=y ++# CONFIG_SXGBE_ETH is not set ++CONFIG_NET_VENDOR_SEEQ=y ++CONFIG_NET_VENDOR_SILAN=y ++# CONFIG_SC92031 is not set ++CONFIG_NET_VENDOR_SIS=y ++# CONFIG_SIS900 is not set ++# CONFIG_SIS190 is not set ++CONFIG_NET_VENDOR_SOLARFLARE=y ++# CONFIG_SFC is not set ++# CONFIG_SFC_FALCON is not set ++# CONFIG_SFC_SIENA is not set ++CONFIG_NET_VENDOR_SMSC=y ++CONFIG_SMC91X=y ++# CONFIG_EPIC100 is not set ++CONFIG_SMSC911X=y ++# CONFIG_SMSC9420 is not set ++CONFIG_NET_VENDOR_SOCIONEXT=y ++CONFIG_SNI_AVE=y ++CONFIG_SNI_NETSEC=y ++CONFIG_NET_VENDOR_STMICRO=y ++# CONFIG_STMMAC_ETH is not set ++CONFIG_NET_VENDOR_SUN=y ++# CONFIG_HAPPYMEAL is not set ++# CONFIG_SUNGEM is not set ++# CONFIG_CASSINI is not set ++# CONFIG_NIU is not set ++CONFIG_NET_VENDOR_SYNOPSYS=y ++# CONFIG_DWC_XLGMAC is not set ++CONFIG_NET_VENDOR_TEHUTI=y ++# CONFIG_TEHUTI is not set ++# CONFIG_TEHUTI_TN40 is not set ++CONFIG_NET_VENDOR_TI=y ++CONFIG_TI_DAVINCI_MDIO=y ++# CONFIG_TI_CPSW_PHY_SEL is not set ++CONFIG_TI_K3_CPPI_DESC_POOL=y ++CONFIG_TI_K3_AM65_CPSW_NUSS=y ++# CONFIG_TI_K3_AM65_CPSW_SWITCHDEV is not set ++# CONFIG_TI_K3_AM65_CPTS is not set ++# CONFIG_TLAN is not set ++CONFIG_NET_VENDOR_VERTEXCOM=y ++# CONFIG_MSE102X is not set ++CONFIG_NET_VENDOR_VIA=y ++# CONFIG_VIA_RHINE is not set ++# CONFIG_VIA_VELOCITY is not set ++CONFIG_NET_VENDOR_WANGXUN=y ++# CONFIG_NGBE is not set ++# CONFIG_TXGBE is not set ++CONFIG_NET_VENDOR_WIZNET=y ++# CONFIG_WIZNET_W5100 is not set ++# CONFIG_WIZNET_W5300 is not set ++CONFIG_NET_VENDOR_XILINX=y ++# CONFIG_XILINX_EMACLITE is not set ++# CONFIG_XILINX_LL_TEMAC is not set ++# CONFIG_FDDI is not set ++# CONFIG_HIPPI is not set ++CONFIG_PHYLINK=y ++CONFIG_PHYLIB=y ++CONFIG_SWPHY=y ++# CONFIG_LED_TRIGGER_PHY is not set ++CONFIG_PHYLIB_LEDS=y ++CONFIG_FIXED_PHY=y ++# CONFIG_SFP is not set ++ ++# ++# MII PHY device drivers ++# ++# CONFIG_AIR_EN8811H_PHY is not set ++# CONFIG_AMD_PHY is not set ++# CONFIG_MESON_GXL_PHY is not set ++# CONFIG_ADIN_PHY is not set ++# CONFIG_ADIN1100_PHY is not set ++CONFIG_AQUANTIA_PHY=y ++# CONFIG_AX88796B_PHY is not set ++# CONFIG_BROADCOM_PHY is not set ++# CONFIG_BCM54140_PHY is not set ++# CONFIG_BCM7XXX_PHY is not set ++# CONFIG_BCM84881_PHY is not set ++# CONFIG_BCM87XX_PHY is not set ++# CONFIG_BCM_CYGNUS_PHY is not set ++# CONFIG_CICADA_PHY is not set ++# CONFIG_CORTINA_PHY is not set ++# CONFIG_DAVICOM_PHY is not set ++# CONFIG_ICPLUS_PHY is not set ++# CONFIG_LXT_PHY is not set ++# CONFIG_INTEL_XWAY_PHY is not set ++# CONFIG_LSI_ET1011C_PHY is not set ++# CONFIG_MARVELL_PHY is not set ++CONFIG_MARVELL_10G_PHY=y ++# CONFIG_MARVELL_88Q2XXX_PHY is not set ++# CONFIG_MARVELL_88X2222_PHY is not set ++# CONFIG_MAXLINEAR_GPHY is not set ++# CONFIG_MEDIATEK_GE_PHY is not set ++# CONFIG_MEDIATEK_GE_SOC_PHY is not set ++CONFIG_MICREL_PHY=y ++# CONFIG_MICROCHIP_T1S_PHY is not set ++# CONFIG_MICROCHIP_PHY is not set ++# CONFIG_MICROCHIP_T1_PHY is not set ++CONFIG_MICROSEMI_PHY=y ++# CONFIG_MOTORCOMM_PHY is not set ++# CONFIG_NATIONAL_PHY is not set ++# CONFIG_NXP_CBTX_PHY is not set ++# CONFIG_NXP_C45_TJA11XX_PHY is not set ++# CONFIG_NXP_TJA11XX_PHY is not set ++# CONFIG_NCN26000_PHY is not set ++CONFIG_QCOM_NET_PHYLIB=y ++CONFIG_AT803X_PHY=y ++# CONFIG_QCA83XX_PHY is not set ++# CONFIG_QCA808X_PHY is not set ++# CONFIG_QCA807X_PHY is not set ++# CONFIG_QSEMI_PHY is not set ++CONFIG_REALTEK_PHY=y ++# CONFIG_RENESAS_PHY is not set ++CONFIG_ROCKCHIP_PHY=y ++# CONFIG_SMSC_PHY is not set ++# CONFIG_STE10XP is not set ++# CONFIG_TERANETICS_PHY is not set ++# CONFIG_DP83822_PHY is not set ++# CONFIG_DP83TC811_PHY is not set ++# CONFIG_DP83848_PHY is not set ++CONFIG_DP83867_PHY=y ++# CONFIG_DP83869_PHY is not set ++CONFIG_DP83TD510_PHY=y ++# CONFIG_DP83TG720_PHY is not set ++CONFIG_VITESSE_PHY=y ++# CONFIG_XILINX_GMII2RGMII is not set ++# CONFIG_MICREL_KS8995MA is not set ++# CONFIG_PSE_CONTROLLER is not set ++CONFIG_MDIO_DEVICE=y ++CONFIG_MDIO_BUS=y ++CONFIG_FWNODE_MDIO=y ++CONFIG_OF_MDIO=y ++CONFIG_ACPI_MDIO=y ++CONFIG_MDIO_DEVRES=y ++# CONFIG_MDIO_SUN4I is not set ++CONFIG_MDIO_XGENE=y ++CONFIG_MDIO_BITBANG=y ++CONFIG_MDIO_BCM_IPROC=y ++CONFIG_MDIO_BCM_UNIMAC=y ++CONFIG_MDIO_CAVIUM=y ++CONFIG_MDIO_GPIO=y ++# CONFIG_MDIO_HISI_FEMAC is not set ++# CONFIG_MDIO_MVUSB is not set ++# CONFIG_MDIO_MSCC_MIIM is not set ++# CONFIG_MDIO_OCTEON is not set ++# CONFIG_MDIO_IPQ4019 is not set ++# CONFIG_MDIO_IPQ8064 is not set ++CONFIG_MDIO_THUNDER=y ++ ++# ++# MDIO Multiplexers ++# ++CONFIG_MDIO_BUS_MUX=y ++# CONFIG_MDIO_BUS_MUX_MESON_G12A is not set ++# CONFIG_MDIO_BUS_MUX_MESON_GXL is not set ++CONFIG_MDIO_BUS_MUX_BCM_IPROC=y ++# CONFIG_MDIO_BUS_MUX_GPIO is not set ++CONFIG_MDIO_BUS_MUX_MULTIPLEXER=y ++CONFIG_MDIO_BUS_MUX_MMIOREG=y ++ ++# ++# PCS device drivers ++# ++# CONFIG_PCS_XPCS is not set ++CONFIG_PCS_LYNX=y ++# end of PCS device drivers ++ ++# CONFIG_PPP is not set ++# CONFIG_SLIP is not set ++CONFIG_USB_NET_DRIVERS=y ++# CONFIG_USB_CATC is not set ++# CONFIG_USB_KAWETH is not set ++# CONFIG_USB_PEGASUS is not set ++# CONFIG_USB_RTL8150 is not set ++# CONFIG_USB_RTL8152 is not set ++# CONFIG_USB_LAN78XX is not set ++# CONFIG_USB_USBNET is not set ++# CONFIG_USB_IPHETH is not set ++CONFIG_WLAN=y ++CONFIG_WLAN_VENDOR_ADMTEK=y ++CONFIG_WLAN_VENDOR_ATH=y ++# CONFIG_ATH_DEBUG is not set ++# CONFIG_ATH5K_PCI is not set ++CONFIG_WLAN_VENDOR_ATMEL=y ++CONFIG_WLAN_VENDOR_BROADCOM=y ++CONFIG_WLAN_VENDOR_INTEL=y ++CONFIG_WLAN_VENDOR_INTERSIL=y ++CONFIG_WLAN_VENDOR_MARVELL=y ++CONFIG_WLAN_VENDOR_MEDIATEK=y ++CONFIG_WLAN_VENDOR_MICROCHIP=y ++CONFIG_WLAN_VENDOR_PURELIFI=y ++CONFIG_WLAN_VENDOR_RALINK=y ++CONFIG_WLAN_VENDOR_REALTEK=y ++CONFIG_WLAN_VENDOR_RSI=y ++CONFIG_WLAN_VENDOR_SILABS=y ++CONFIG_WLAN_VENDOR_ST=y ++CONFIG_WLAN_VENDOR_TI=y ++CONFIG_WLAN_VENDOR_ZYDAS=y ++CONFIG_WLAN_VENDOR_QUANTENNA=y ++# CONFIG_WAN is not set ++ ++# ++# Wireless WAN ++# ++# CONFIG_WWAN is not set ++# end of Wireless WAN ++ ++CONFIG_XEN_NETDEV_FRONTEND=y ++# CONFIG_XEN_NETDEV_BACKEND is not set ++# CONFIG_VMXNET3 is not set ++# CONFIG_FUJITSU_ES is not set ++# CONFIG_NETDEVSIM is not set ++CONFIG_NET_FAILOVER=y ++# CONFIG_ISDN is not set ++ ++# ++# Input device support ++# ++CONFIG_INPUT=y ++CONFIG_INPUT_LEDS=y ++CONFIG_INPUT_FF_MEMLESS=y ++# CONFIG_INPUT_SPARSEKMAP is not set ++CONFIG_INPUT_MATRIXKMAP=y ++CONFIG_INPUT_VIVALDIFMAP=y ++ ++# ++# Userland interfaces ++# ++# CONFIG_INPUT_MOUSEDEV is not set ++# CONFIG_INPUT_JOYDEV is not set ++CONFIG_INPUT_EVDEV=y ++# CONFIG_INPUT_EVBUG is not set ++ ++# ++# Input Device Drivers ++# ++CONFIG_INPUT_KEYBOARD=y ++# CONFIG_KEYBOARD_ADC is not set ++# CONFIG_KEYBOARD_ADP5588 is not set ++# CONFIG_KEYBOARD_ADP5589 is not set ++CONFIG_KEYBOARD_ATKBD=y ++# CONFIG_KEYBOARD_QT1050 is not set ++# CONFIG_KEYBOARD_QT1070 is not set ++# CONFIG_KEYBOARD_QT2160 is not set ++# CONFIG_KEYBOARD_DLINK_DIR685 is not set ++# CONFIG_KEYBOARD_LKKBD is not set ++CONFIG_KEYBOARD_GPIO=y ++# CONFIG_KEYBOARD_GPIO_POLLED is not set ++# CONFIG_KEYBOARD_TCA6416 is not set ++# CONFIG_KEYBOARD_TCA8418 is not set ++# CONFIG_KEYBOARD_MATRIX is not set ++# CONFIG_KEYBOARD_LM8323 is not set ++# CONFIG_KEYBOARD_LM8333 is not set ++# CONFIG_KEYBOARD_MAX7359 is not set ++# CONFIG_KEYBOARD_MPR121 is not set ++# CONFIG_KEYBOARD_SNVS_PWRKEY is not set ++# CONFIG_KEYBOARD_IMX is not set ++CONFIG_KEYBOARD_IMX_BBM_SCMI=y ++# CONFIG_KEYBOARD_IMX_SC_KEY is not set ++# CONFIG_KEYBOARD_NEWTON is not set ++# CONFIG_KEYBOARD_TEGRA is not set ++# CONFIG_KEYBOARD_OPENCORES is not set ++# CONFIG_KEYBOARD_PINEPHONE is not set ++# CONFIG_KEYBOARD_SAMSUNG is not set ++# CONFIG_KEYBOARD_STOWAWAY is not set ++# CONFIG_KEYBOARD_SUNKBD is not set ++# CONFIG_KEYBOARD_SUN4I_LRADC is not set ++# CONFIG_KEYBOARD_OMAP4 is not set ++# CONFIG_KEYBOARD_TM2_TOUCHKEY is not set ++# CONFIG_KEYBOARD_XTKBD is not set ++CONFIG_KEYBOARD_CROS_EC=y ++# CONFIG_KEYBOARD_CAP11XX is not set ++# CONFIG_KEYBOARD_BCM is not set ++# CONFIG_KEYBOARD_MT6779 is not set ++# CONFIG_KEYBOARD_MTK_PMIC is not set ++# CONFIG_KEYBOARD_CYPRESS_SF is not set ++CONFIG_INPUT_MOUSE=y ++CONFIG_MOUSE_PS2=y ++CONFIG_MOUSE_PS2_ALPS=y ++CONFIG_MOUSE_PS2_BYD=y ++CONFIG_MOUSE_PS2_LOGIPS2PP=y ++CONFIG_MOUSE_PS2_SYNAPTICS=y ++CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y ++CONFIG_MOUSE_PS2_CYPRESS=y ++CONFIG_MOUSE_PS2_TRACKPOINT=y ++# CONFIG_MOUSE_PS2_ELANTECH is not set ++# CONFIG_MOUSE_PS2_SENTELIC is not set ++# CONFIG_MOUSE_PS2_TOUCHKIT is not set ++CONFIG_MOUSE_PS2_FOCALTECH=y ++CONFIG_MOUSE_PS2_SMBUS=y ++# CONFIG_MOUSE_SERIAL is not set ++# CONFIG_MOUSE_APPLETOUCH is not set ++# CONFIG_MOUSE_BCM5974 is not set ++# CONFIG_MOUSE_CYAPA is not set ++# CONFIG_MOUSE_ELAN_I2C is not set ++# CONFIG_MOUSE_VSXXXAA is not set ++# CONFIG_MOUSE_GPIO is not set ++# CONFIG_MOUSE_SYNAPTICS_I2C is not set ++# CONFIG_MOUSE_SYNAPTICS_USB is not set ++# CONFIG_INPUT_JOYSTICK is not set ++# CONFIG_INPUT_TABLET is not set ++CONFIG_INPUT_TOUCHSCREEN=y ++# CONFIG_TOUCHSCREEN_ADS7846 is not set ++# CONFIG_TOUCHSCREEN_AD7877 is not set ++# CONFIG_TOUCHSCREEN_AD7879 is not set ++# CONFIG_TOUCHSCREEN_ADC is not set ++# CONFIG_TOUCHSCREEN_AR1021_I2C is not set ++# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set ++# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set ++# CONFIG_TOUCHSCREEN_BU21013 is not set ++# CONFIG_TOUCHSCREEN_BU21029 is not set ++# CONFIG_TOUCHSCREEN_CHIPONE_ICN8318 is not set ++# CONFIG_TOUCHSCREEN_CHIPONE_ICN8505 is not set ++# CONFIG_TOUCHSCREEN_CY8CTMA140 is not set ++# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set ++# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set ++# CONFIG_TOUCHSCREEN_CYTTSP5 is not set ++# CONFIG_TOUCHSCREEN_DYNAPRO is not set ++# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set ++# CONFIG_TOUCHSCREEN_EETI is not set ++# CONFIG_TOUCHSCREEN_EGALAX is not set ++# CONFIG_TOUCHSCREEN_EGALAX_SERIAL is not set ++# CONFIG_TOUCHSCREEN_EXC3000 is not set ++# CONFIG_TOUCHSCREEN_FUJITSU is not set ++# CONFIG_TOUCHSCREEN_GOODIX is not set ++# CONFIG_TOUCHSCREEN_GOODIX_BERLIN_I2C is not set ++# CONFIG_TOUCHSCREEN_GOODIX_BERLIN_SPI is not set ++# CONFIG_TOUCHSCREEN_HIDEEP is not set ++# CONFIG_TOUCHSCREEN_HYCON_HY46XX is not set ++# CONFIG_TOUCHSCREEN_HYNITRON_CSTXXX is not set ++# CONFIG_TOUCHSCREEN_ILI210X is not set ++# CONFIG_TOUCHSCREEN_ILITEK is not set ++# CONFIG_TOUCHSCREEN_IPROC is not set ++# CONFIG_TOUCHSCREEN_S6SY761 is not set ++# CONFIG_TOUCHSCREEN_GUNZE is not set ++# CONFIG_TOUCHSCREEN_EKTF2127 is not set ++# CONFIG_TOUCHSCREEN_ELAN is not set ++# CONFIG_TOUCHSCREEN_ELO is not set ++# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set ++# CONFIG_TOUCHSCREEN_WACOM_I2C is not set ++# CONFIG_TOUCHSCREEN_MAX11801 is not set ++# CONFIG_TOUCHSCREEN_MMS114 is not set ++# CONFIG_TOUCHSCREEN_MELFAS_MIP4 is not set ++# CONFIG_TOUCHSCREEN_MSG2638 is not set ++# CONFIG_TOUCHSCREEN_MTOUCH is not set ++# CONFIG_TOUCHSCREEN_NOVATEK_NVT_TS is not set ++# CONFIG_TOUCHSCREEN_IMAGIS is not set ++# CONFIG_TOUCHSCREEN_IMX6UL_TSC is not set ++# CONFIG_TOUCHSCREEN_INEXIO is not set ++# CONFIG_TOUCHSCREEN_PENMOUNT is not set ++# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set ++# CONFIG_TOUCHSCREEN_RASPBERRYPI_FW is not set ++# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set ++# CONFIG_TOUCHSCREEN_TOUCHWIN is not set ++# CONFIG_TOUCHSCREEN_PIXCIR is not set ++# CONFIG_TOUCHSCREEN_WDT87XX_I2C is not set ++# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set ++# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set ++# CONFIG_TOUCHSCREEN_TSC_SERIO is not set ++# CONFIG_TOUCHSCREEN_TSC2004 is not set ++# CONFIG_TOUCHSCREEN_TSC2005 is not set ++# CONFIG_TOUCHSCREEN_TSC2007 is not set ++# CONFIG_TOUCHSCREEN_RM_TS is not set ++# CONFIG_TOUCHSCREEN_SILEAD is not set ++# CONFIG_TOUCHSCREEN_SIS_I2C is not set ++# CONFIG_TOUCHSCREEN_ST1232 is not set ++# CONFIG_TOUCHSCREEN_STMFTS is not set ++# CONFIG_TOUCHSCREEN_SUN4I is not set ++# CONFIG_TOUCHSCREEN_SURFACE3_SPI is not set ++# CONFIG_TOUCHSCREEN_SX8654 is not set ++# CONFIG_TOUCHSCREEN_TPS6507X is not set ++# CONFIG_TOUCHSCREEN_ZET6223 is not set ++# CONFIG_TOUCHSCREEN_ZFORCE is not set ++# CONFIG_TOUCHSCREEN_COLIBRI_VF50 is not set ++# CONFIG_TOUCHSCREEN_ROHM_BU21023 is not set ++# CONFIG_TOUCHSCREEN_IQS5XX is not set ++# CONFIG_TOUCHSCREEN_IQS7211 is not set ++# CONFIG_TOUCHSCREEN_ZINITIX is not set ++# CONFIG_TOUCHSCREEN_HIMAX_HX83112B is not set ++CONFIG_INPUT_MISC=y ++# CONFIG_INPUT_AD714X is not set ++# CONFIG_INPUT_ATMEL_CAPTOUCH is not set ++# CONFIG_INPUT_BBNSM_PWRKEY is not set ++# CONFIG_INPUT_BMA150 is not set ++# CONFIG_INPUT_E3X0_BUTTON is not set ++CONFIG_INPUT_PM8941_PWRKEY=y ++# CONFIG_INPUT_PM8XXX_VIBRATOR is not set ++# CONFIG_INPUT_MMA8450 is not set ++# CONFIG_INPUT_GPIO_BEEPER is not set ++# CONFIG_INPUT_GPIO_DECODER is not set ++# CONFIG_INPUT_GPIO_VIBRA is not set ++# CONFIG_INPUT_ATI_REMOTE2 is not set ++# CONFIG_INPUT_KEYSPAN_REMOTE is not set ++# CONFIG_INPUT_KXTJ9 is not set ++# CONFIG_INPUT_POWERMATE is not set ++# CONFIG_INPUT_YEALINK is not set ++# CONFIG_INPUT_CM109 is not set ++# CONFIG_INPUT_REGULATOR_HAPTIC is not set ++# CONFIG_INPUT_TPS65219_PWRBUTTON is not set ++# CONFIG_INPUT_AXP20X_PEK is not set ++# CONFIG_INPUT_UINPUT is not set ++# CONFIG_INPUT_PCF8574 is not set ++# CONFIG_INPUT_PWM_BEEPER is not set ++# CONFIG_INPUT_PWM_VIBRA is not set ++# CONFIG_INPUT_RK805_PWRKEY is not set ++# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set ++# CONFIG_INPUT_DA7280_HAPTICS is not set ++# CONFIG_INPUT_ADXL34X is not set ++# CONFIG_INPUT_IBM_PANEL is not set ++# CONFIG_INPUT_IMS_PCU is not set ++# CONFIG_INPUT_IQS269A is not set ++# CONFIG_INPUT_IQS626A is not set ++# CONFIG_INPUT_IQS7222 is not set ++# CONFIG_INPUT_CMA3000 is not set ++CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y ++# CONFIG_INPUT_SOC_BUTTON_ARRAY is not set ++# CONFIG_INPUT_DRV260X_HAPTICS is not set ++# CONFIG_INPUT_DRV2665_HAPTICS is not set ++# CONFIG_INPUT_DRV2667_HAPTICS is not set ++CONFIG_INPUT_HISI_POWERKEY=y ++# CONFIG_RMI4_CORE is not set ++ ++# ++# Hardware I/O ports ++# ++CONFIG_SERIO=y ++# CONFIG_SERIO_SERPORT is not set ++CONFIG_SERIO_AMBAKMI=y ++# CONFIG_SERIO_PCIPS2 is not set ++CONFIG_SERIO_LIBPS2=y ++# CONFIG_SERIO_RAW is not set ++# CONFIG_SERIO_ALTERA_PS2 is not set ++# CONFIG_SERIO_PS2MULT is not set ++# CONFIG_SERIO_ARC_PS2 is not set ++# CONFIG_SERIO_APBPS2 is not set ++# CONFIG_SERIO_SUN4I_PS2 is not set ++# CONFIG_SERIO_GPIO_PS2 is not set ++# CONFIG_USERIO is not set ++# CONFIG_GAMEPORT is not set ++# end of Hardware I/O ports ++# end of Input device support ++ ++# ++# Character devices ++# ++CONFIG_TTY=y ++CONFIG_VT=y ++CONFIG_CONSOLE_TRANSLATIONS=y ++CONFIG_VT_CONSOLE=y ++CONFIG_VT_CONSOLE_SLEEP=y ++CONFIG_VT_HW_CONSOLE_BINDING=y ++CONFIG_UNIX98_PTYS=y ++CONFIG_LEGACY_PTYS=y ++CONFIG_LEGACY_PTY_COUNT=16 ++CONFIG_LEGACY_TIOCSTI=y ++CONFIG_LDISC_AUTOLOAD=y ++ ++# ++# Serial drivers ++# ++CONFIG_SERIAL_EARLYCON=y ++CONFIG_SERIAL_8250=y ++CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y ++CONFIG_SERIAL_8250_PNP=y ++CONFIG_SERIAL_8250_16550A_VARIANTS=y ++# CONFIG_SERIAL_8250_FINTEK is not set ++CONFIG_SERIAL_8250_CONSOLE=y ++CONFIG_SERIAL_8250_DMA=y ++CONFIG_SERIAL_8250_PCILIB=y ++CONFIG_SERIAL_8250_PCI=y ++CONFIG_SERIAL_8250_EXAR=y ++CONFIG_SERIAL_8250_NR_UARTS=4 ++CONFIG_SERIAL_8250_RUNTIME_UARTS=4 ++CONFIG_SERIAL_8250_EXTENDED=y ++# CONFIG_SERIAL_8250_MANY_PORTS is not set ++# CONFIG_SERIAL_8250_PCI1XXXX is not set ++CONFIG_SERIAL_8250_SHARE_IRQ=y ++# CONFIG_SERIAL_8250_DETECT_IRQ is not set ++# CONFIG_SERIAL_8250_RSA is not set ++CONFIG_SERIAL_8250_DWLIB=y ++CONFIG_SERIAL_8250_BCM2835AUX=y ++CONFIG_SERIAL_8250_FSL=y ++CONFIG_SERIAL_8250_DW=y ++CONFIG_SERIAL_8250_EM=y ++# CONFIG_SERIAL_8250_RT288X is not set ++CONFIG_SERIAL_8250_OMAP=y ++CONFIG_SERIAL_8250_OMAP_TTYO_FIXUP=y ++CONFIG_SERIAL_8250_MT6577=y ++CONFIG_SERIAL_8250_UNIPHIER=y ++CONFIG_SERIAL_8250_PERICOM=y ++CONFIG_SERIAL_8250_TEGRA=y ++CONFIG_SERIAL_8250_BCM7271=y ++CONFIG_SERIAL_OF_PLATFORM=y ++ ++# ++# Non-8250 serial port support ++# ++# CONFIG_SERIAL_AMBA_PL010 is not set ++CONFIG_SERIAL_AMBA_PL011=y ++CONFIG_SERIAL_AMBA_PL011_CONSOLE=y ++# CONFIG_SERIAL_EARLYCON_SEMIHOST is not set ++CONFIG_SERIAL_MESON=y ++CONFIG_SERIAL_MESON_CONSOLE=y ++CONFIG_SERIAL_SAMSUNG=y ++CONFIG_SERIAL_SAMSUNG_UARTS=4 ++CONFIG_SERIAL_SAMSUNG_CONSOLE=y ++CONFIG_SERIAL_TEGRA=y ++CONFIG_SERIAL_TEGRA_TCU=y ++CONFIG_SERIAL_TEGRA_TCU_CONSOLE=y ++# CONFIG_SERIAL_MAX3100 is not set ++# CONFIG_SERIAL_MAX310X is not set ++CONFIG_SERIAL_IMX=y ++CONFIG_SERIAL_IMX_CONSOLE=y ++CONFIG_SERIAL_IMX_EARLYCON=y ++# CONFIG_SERIAL_UARTLITE is not set ++CONFIG_SERIAL_SH_SCI=y ++CONFIG_SERIAL_SH_SCI_NR_UARTS=18 ++CONFIG_SERIAL_SH_SCI_CONSOLE=y ++CONFIG_SERIAL_SH_SCI_EARLYCON=y ++CONFIG_SERIAL_SH_SCI_DMA=y ++CONFIG_SERIAL_CORE=y ++CONFIG_SERIAL_CORE_CONSOLE=y ++# CONFIG_SERIAL_JSM is not set ++CONFIG_SERIAL_MSM=y ++CONFIG_SERIAL_MSM_CONSOLE=y ++CONFIG_SERIAL_QCOM_GENI=y ++CONFIG_SERIAL_QCOM_GENI_CONSOLE=y ++# CONFIG_SERIAL_SIFIVE is not set ++# CONFIG_SERIAL_SCCNXP is not set ++# CONFIG_SERIAL_SC16IS7XX is not set ++CONFIG_SERIAL_BCM63XX=y ++# CONFIG_SERIAL_BCM63XX_CONSOLE is not set ++# CONFIG_SERIAL_ALTERA_JTAGUART is not set ++# CONFIG_SERIAL_ALTERA_UART is not set ++CONFIG_SERIAL_XILINX_PS_UART=y ++CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y ++# CONFIG_SERIAL_ARC is not set ++# CONFIG_SERIAL_RP2 is not set ++CONFIG_SERIAL_FSL_LPUART=y ++CONFIG_SERIAL_FSL_LPUART_CONSOLE=y ++CONFIG_SERIAL_FSL_LINFLEXUART=y ++CONFIG_SERIAL_FSL_LINFLEXUART_CONSOLE=y ++# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set ++# CONFIG_SERIAL_SPRD is not set ++CONFIG_SERIAL_STM32=y ++CONFIG_SERIAL_STM32_CONSOLE=y ++CONFIG_SERIAL_MVEBU_UART=y ++CONFIG_SERIAL_MVEBU_CONSOLE=y ++CONFIG_SERIAL_OWL=y ++CONFIG_SERIAL_OWL_CONSOLE=y ++# CONFIG_SERIAL_NUVOTON_MA35D1 is not set ++# end of Serial drivers ++ ++CONFIG_SERIAL_MCTRL_GPIO=y ++# CONFIG_SERIAL_NONSTANDARD is not set ++# CONFIG_N_GSM is not set ++# CONFIG_NOZOMI is not set ++# CONFIG_NULL_TTY is not set ++CONFIG_HVC_DRIVER=y ++CONFIG_HVC_IRQ=y ++CONFIG_HVC_XEN=y ++CONFIG_HVC_XEN_FRONTEND=y ++# CONFIG_HVC_DCC is not set ++# CONFIG_RPMSG_TTY is not set ++CONFIG_SERIAL_DEV_BUS=y ++CONFIG_SERIAL_DEV_CTRL_TTYPORT=y ++CONFIG_VIRTIO_CONSOLE=y ++# CONFIG_IPMI_HANDLER is not set ++# CONFIG_NPCM7XX_KCS_IPMI_BMC is not set ++# CONFIG_SSIF_IPMI_BMC is not set ++# CONFIG_IPMB_DEVICE_INTERFACE is not set ++CONFIG_HW_RANDOM=y ++# CONFIG_HW_RANDOM_TIMERIOMEM is not set ++# CONFIG_HW_RANDOM_BA431 is not set ++CONFIG_HW_RANDOM_BCM2835=y ++CONFIG_HW_RANDOM_IPROC_RNG200=y ++CONFIG_HW_RANDOM_OMAP=y ++CONFIG_HW_RANDOM_VIRTIO=y ++CONFIG_HW_RANDOM_HISI=y ++CONFIG_HW_RANDOM_HISTB=y ++CONFIG_HW_RANDOM_XGENE=y ++CONFIG_HW_RANDOM_STM32=y ++CONFIG_HW_RANDOM_MESON=y ++CONFIG_HW_RANDOM_CAVIUM=y ++CONFIG_HW_RANDOM_MTK=y ++CONFIG_HW_RANDOM_EXYNOS=y ++CONFIG_HW_RANDOM_OPTEE=y ++CONFIG_HW_RANDOM_NPCM=y ++# CONFIG_HW_RANDOM_CCTRNG is not set ++# CONFIG_HW_RANDOM_XIPHERA is not set ++CONFIG_HW_RANDOM_ARM_SMCCC_TRNG=y ++CONFIG_HW_RANDOM_CN10K=y ++CONFIG_HW_RANDOM_ROCKCHIP=y ++# CONFIG_APPLICOM is not set ++CONFIG_DEVMEM=y ++CONFIG_DEVPORT=y ++CONFIG_TCG_TPM=y ++# CONFIG_TCG_TPM2_HMAC is not set ++CONFIG_HW_RANDOM_TPM=y ++# CONFIG_TCG_TIS is not set ++# CONFIG_TCG_TIS_SPI is not set ++# CONFIG_TCG_TIS_I2C is not set ++# CONFIG_TCG_TIS_SYNQUACER is not set ++# CONFIG_TCG_TIS_I2C_CR50 is not set ++# CONFIG_TCG_TIS_I2C_ATMEL is not set ++CONFIG_TCG_TIS_I2C_INFINEON=y ++# CONFIG_TCG_TIS_I2C_NUVOTON is not set ++# CONFIG_TCG_ATMEL is not set ++# CONFIG_TCG_INFINEON is not set ++# CONFIG_TCG_XEN is not set ++# CONFIG_TCG_CRB is not set ++# CONFIG_TCG_VTPM_PROXY is not set ++# CONFIG_TCG_FTPM_TEE is not set ++# CONFIG_TCG_TIS_ST33ZP24_I2C is not set ++# CONFIG_TCG_TIS_ST33ZP24_SPI is not set ++# CONFIG_XILLYBUS is not set ++# CONFIG_XILLYUSB is not set ++# end of Character devices ++ ++# ++# I2C support ++# ++CONFIG_I2C=y ++CONFIG_ACPI_I2C_OPREGION=y ++CONFIG_I2C_BOARDINFO=y ++CONFIG_I2C_CHARDEV=y ++CONFIG_I2C_MUX=y ++ ++# ++# Multiplexer I2C Chip support ++# ++# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set ++# CONFIG_I2C_MUX_GPIO is not set ++# CONFIG_I2C_MUX_GPMUX is not set ++# CONFIG_I2C_MUX_LTC4306 is not set ++# CONFIG_I2C_MUX_PCA9541 is not set ++CONFIG_I2C_MUX_PCA954x=y ++# CONFIG_I2C_MUX_PINCTRL is not set ++# CONFIG_I2C_MUX_REG is not set ++# CONFIG_I2C_DEMUX_PINCTRL is not set ++# CONFIG_I2C_MUX_MLXCPLD is not set ++# end of Multiplexer I2C Chip support ++ ++CONFIG_I2C_HELPER_AUTO=y ++CONFIG_I2C_SMBUS=y ++CONFIG_I2C_ALGOBIT=y ++ ++# ++# I2C Hardware Bus support ++# ++ ++# ++# PC SMBus host controller drivers ++# ++# CONFIG_I2C_ALI1535 is not set ++# CONFIG_I2C_ALI1563 is not set ++# CONFIG_I2C_ALI15X3 is not set ++# CONFIG_I2C_AMD756 is not set ++# CONFIG_I2C_AMD8111 is not set ++# CONFIG_I2C_AMD_MP2 is not set ++# CONFIG_I2C_HIX5HD2 is not set ++# CONFIG_I2C_I801 is not set ++# CONFIG_I2C_ISCH is not set ++# CONFIG_I2C_PIIX4 is not set ++# CONFIG_I2C_NFORCE2 is not set ++# CONFIG_I2C_NVIDIA_GPU is not set ++# CONFIG_I2C_SIS5595 is not set ++# CONFIG_I2C_SIS630 is not set ++# CONFIG_I2C_SIS96X is not set ++# CONFIG_I2C_VIA is not set ++# CONFIG_I2C_VIAPRO is not set ++# CONFIG_I2C_ZHAOXIN is not set ++ ++# ++# ACPI drivers ++# ++# CONFIG_I2C_SCMI is not set ++ ++# ++# I2C system bus drivers (mostly embedded / system-on-chip) ++# ++# CONFIG_I2C_ALTERA is not set ++# CONFIG_I2C_BCM2835 is not set ++CONFIG_I2C_BCM_IPROC=y ++CONFIG_I2C_BRCMSTB=y ++# CONFIG_I2C_CADENCE is not set ++# CONFIG_I2C_CBUS_GPIO is not set ++CONFIG_I2C_DESIGNWARE_CORE=y ++# CONFIG_I2C_DESIGNWARE_SLAVE is not set ++CONFIG_I2C_DESIGNWARE_PLATFORM=y ++# CONFIG_I2C_DESIGNWARE_PCI is not set ++# CONFIG_I2C_EMEV2 is not set ++CONFIG_I2C_EXYNOS5=y ++# CONFIG_I2C_GPIO is not set ++# CONFIG_I2C_HISI is not set ++CONFIG_I2C_IMX=y ++CONFIG_I2C_IMX_LPI2C=y ++CONFIG_I2C_MESON=y ++CONFIG_I2C_MT65XX=y ++CONFIG_I2C_MV64XXX=y ++# CONFIG_I2C_NOMADIK is not set ++# CONFIG_I2C_NPCM is not set ++# CONFIG_I2C_OCORES is not set ++CONFIG_I2C_OMAP=y ++CONFIG_I2C_OWL=y ++CONFIG_I2C_APPLE=y ++# CONFIG_I2C_PCA_PLATFORM is not set ++CONFIG_I2C_PXA=y ++# CONFIG_I2C_PXA_SLAVE is not set ++# CONFIG_I2C_QCOM_CCI is not set ++# CONFIG_I2C_QCOM_GENI is not set ++CONFIG_I2C_QUP=y ++CONFIG_I2C_RIIC=y ++CONFIG_I2C_RK3X=y ++# CONFIG_I2C_RZV2M is not set ++CONFIG_I2C_S3C2410=y ++CONFIG_I2C_SH_MOBILE=y ++# CONFIG_I2C_SIMTEC is not set ++# CONFIG_I2C_SPRD is not set ++# CONFIG_I2C_STM32F4 is not set ++# CONFIG_I2C_STM32F7 is not set ++# CONFIG_I2C_SYNQUACER is not set ++CONFIG_I2C_TEGRA=y ++CONFIG_I2C_TEGRA_BPMP=y ++# CONFIG_I2C_UNIPHIER is not set ++CONFIG_I2C_UNIPHIER_F=y ++# CONFIG_I2C_VERSATILE is not set ++# CONFIG_I2C_THUNDERX is not set ++# CONFIG_I2C_XILINX is not set ++# CONFIG_I2C_XLP9XX is not set ++CONFIG_I2C_RCAR=y ++ ++# ++# External I2C/SMBus adapter drivers ++# ++# CONFIG_I2C_DIOLAN_U2C is not set ++# CONFIG_I2C_CP2615 is not set ++# CONFIG_I2C_PCI1XXXX is not set ++# CONFIG_I2C_ROBOTFUZZ_OSIF is not set ++# CONFIG_I2C_TAOS_EVM is not set ++# CONFIG_I2C_TINY_USB is not set ++ ++# ++# Other I2C/SMBus bus drivers ++# ++# CONFIG_I2C_MLXCPLD is not set ++CONFIG_I2C_CROS_EC_TUNNEL=y ++# CONFIG_I2C_XGENE_SLIMPRO is not set ++# CONFIG_I2C_VIRTIO is not set ++# end of I2C Hardware Bus support ++ ++# CONFIG_I2C_STUB is not set ++CONFIG_I2C_SLAVE=y ++# CONFIG_I2C_SLAVE_EEPROM is not set ++# CONFIG_I2C_SLAVE_TESTUNIT is not set ++# CONFIG_I2C_DEBUG_CORE is not set ++# CONFIG_I2C_DEBUG_ALGO is not set ++# CONFIG_I2C_DEBUG_BUS is not set ++# end of I2C support ++ ++# CONFIG_I3C is not set ++CONFIG_SPI=y ++# CONFIG_SPI_DEBUG is not set ++CONFIG_SPI_MASTER=y ++CONFIG_SPI_MEM=y ++ ++# ++# SPI Master Controller Drivers ++# ++# CONFIG_SPI_ALTERA is not set ++# CONFIG_SPI_AMLOGIC_SPIFC_A1 is not set ++CONFIG_SPI_ARMADA_3700=y ++# CONFIG_SPI_AXI_SPI_ENGINE is not set ++# CONFIG_SPI_BCM2835 is not set ++# CONFIG_SPI_BCM2835AUX is not set ++# CONFIG_SPI_BCM63XX_HSSPI is not set ++CONFIG_SPI_BCM_QSPI=y ++# CONFIG_SPI_BCMBCA_HSSPI is not set ++# CONFIG_SPI_BITBANG is not set ++# CONFIG_SPI_CADENCE is not set ++CONFIG_SPI_CADENCE_QUADSPI=y ++# CONFIG_SPI_CADENCE_XSPI is not set ++# CONFIG_SPI_CH341 is not set ++# CONFIG_SPI_DESIGNWARE is not set ++CONFIG_SPI_FSL_LPSPI=y ++CONFIG_SPI_FSL_QUADSPI=y ++# CONFIG_SPI_HISI_KUNPENG is not set ++# CONFIG_SPI_HISI_SFC_V3XX is not set ++CONFIG_SPI_NXP_FLEXSPI=y ++# CONFIG_SPI_GPIO is not set ++# CONFIG_SPI_IMX is not set ++# CONFIG_SPI_FSL_SPI is not set ++CONFIG_SPI_FSL_DSPI=y ++# CONFIG_SPI_MESON_SPICC is not set ++# CONFIG_SPI_MESON_SPIFC is not set ++# CONFIG_SPI_MICROCHIP_CORE is not set ++# CONFIG_SPI_MICROCHIP_CORE_QSPI is not set ++CONFIG_SPI_MT65XX=y ++# CONFIG_SPI_MTK_NOR is not set ++# CONFIG_SPI_WPCM_FIU is not set ++# CONFIG_SPI_NPCM_FIU is not set ++# CONFIG_SPI_NPCM_PSPI is not set ++# CONFIG_SPI_OC_TINY is not set ++# CONFIG_SPI_OMAP24XX is not set ++CONFIG_SPI_ORION=y ++# CONFIG_SPI_PCI1XXXX is not set ++CONFIG_SPI_PL022=y ++CONFIG_SPI_ROCKCHIP=y ++# CONFIG_SPI_ROCKCHIP_SFC is not set ++# CONFIG_SPI_RSPI is not set ++# CONFIG_SPI_RZV2M_CSI is not set ++# CONFIG_SPI_QCOM_QSPI is not set ++CONFIG_SPI_QUP=y ++# CONFIG_SPI_QCOM_GENI is not set ++CONFIG_SPI_S3C64XX=y ++# CONFIG_SPI_SC18IS602 is not set ++# CONFIG_SPI_SH_MSIOF is not set ++# CONFIG_SPI_SH_HSPI is not set ++# CONFIG_SPI_SIFIVE is not set ++# CONFIG_SPI_SN_F_OSPI is not set ++# CONFIG_SPI_SPRD is not set ++# CONFIG_SPI_SPRD_ADI is not set ++# CONFIG_SPI_STM32 is not set ++# CONFIG_SPI_STM32_QSPI is not set ++# CONFIG_SPI_SUN4I is not set ++CONFIG_SPI_SUN6I=y ++# CONFIG_SPI_SYNQUACER is not set ++# CONFIG_SPI_MXIC is not set ++# CONFIG_SPI_TEGRA210_QUAD is not set ++# CONFIG_SPI_TEGRA114 is not set ++# CONFIG_SPI_TEGRA20_SFLASH is not set ++# CONFIG_SPI_TEGRA20_SLINK is not set ++# CONFIG_SPI_THUNDERX is not set ++# CONFIG_SPI_UNIPHIER is not set ++# CONFIG_SPI_XCOMM is not set ++# CONFIG_SPI_XILINX is not set ++# CONFIG_SPI_XLP is not set ++# CONFIG_SPI_ZYNQMP_GQSPI is not set ++# CONFIG_SPI_AMD is not set ++ ++# ++# SPI Multiplexer support ++# ++# CONFIG_SPI_MUX is not set ++ ++# ++# SPI Protocol Masters ++# ++# CONFIG_SPI_SPIDEV is not set ++# CONFIG_SPI_LOOPBACK_TEST is not set ++# CONFIG_SPI_TLE62X0 is not set ++# CONFIG_SPI_SLAVE is not set ++CONFIG_SPI_DYNAMIC=y ++CONFIG_SPMI=y ++# CONFIG_SPMI_HISI3670 is not set ++CONFIG_SPMI_MSM_PMIC_ARB=y ++# CONFIG_SPMI_MTK_PMIF is not set ++# CONFIG_HSI is not set ++CONFIG_PPS=y ++# CONFIG_PPS_DEBUG is not set ++ ++# ++# PPS clients support ++# ++# CONFIG_PPS_CLIENT_KTIMER is not set ++# CONFIG_PPS_CLIENT_LDISC is not set ++# CONFIG_PPS_CLIENT_GPIO is not set ++ ++# ++# PPS generators support ++# ++ ++# ++# PTP clock support ++# ++CONFIG_PTP_1588_CLOCK=y ++CONFIG_PTP_1588_CLOCK_OPTIONAL=y ++CONFIG_PTP_1588_CLOCK_DTE=y ++CONFIG_PTP_1588_CLOCK_QORIQ=y ++ ++# ++# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. ++# ++CONFIG_PTP_1588_CLOCK_KVM=y ++# CONFIG_PTP_1588_CLOCK_IDT82P33 is not set ++# CONFIG_PTP_1588_CLOCK_IDTCM is not set ++# CONFIG_PTP_1588_CLOCK_FC3W is not set ++# CONFIG_PTP_1588_CLOCK_MOCK is not set ++# CONFIG_PTP_1588_CLOCK_OCP is not set ++# end of PTP clock support ++ ++CONFIG_PINCTRL=y ++CONFIG_GENERIC_PINCTRL_GROUPS=y ++CONFIG_PINMUX=y ++CONFIG_GENERIC_PINMUX_FUNCTIONS=y ++CONFIG_PINCONF=y ++CONFIG_GENERIC_PINCONF=y ++# CONFIG_DEBUG_PINCTRL is not set ++# CONFIG_PINCTRL_AMD is not set ++# CONFIG_PINCTRL_APPLE_GPIO is not set ++# CONFIG_PINCTRL_AXP209 is not set ++# CONFIG_PINCTRL_AW9523 is not set ++# CONFIG_PINCTRL_CY8C95X0 is not set ++# CONFIG_PINCTRL_KEEMBAY is not set ++CONFIG_PINCTRL_MAX77620=y ++# CONFIG_PINCTRL_MCP23S08 is not set ++# CONFIG_PINCTRL_MICROCHIP_SGPIO is not set ++# CONFIG_PINCTRL_OCELOT is not set ++# CONFIG_PINCTRL_RK805 is not set ++CONFIG_PINCTRL_ROCKCHIP=y ++# CONFIG_PINCTRL_SCMI is not set ++CONFIG_PINCTRL_SINGLE=y ++# CONFIG_PINCTRL_STMFX is not set ++# CONFIG_PINCTRL_SX150X is not set ++CONFIG_PINCTRL_ZYNQMP=y ++CONFIG_PINCTRL_OWL=y ++CONFIG_PINCTRL_S700=y ++CONFIG_PINCTRL_S900=y ++CONFIG_PINCTRL_BCM2835=y ++CONFIG_PINCTRL_BCM4908=y ++CONFIG_PINCTRL_IPROC_GPIO=y ++CONFIG_PINCTRL_NS2_MUX=y ++# CONFIG_PINCTRL_AS370 is not set ++# CONFIG_PINCTRL_BERLIN_BG4CT is not set ++CONFIG_PINCTRL_IMX=y ++# CONFIG_PINCTRL_IMX_SCMI is not set ++CONFIG_PINCTRL_IMX_SCU=y ++CONFIG_PINCTRL_IMX8MM=y ++CONFIG_PINCTRL_IMX8MN=y ++CONFIG_PINCTRL_IMX8MP=y ++CONFIG_PINCTRL_IMX8MQ=y ++CONFIG_PINCTRL_IMX8QM=y ++CONFIG_PINCTRL_IMX8QXP=y ++CONFIG_PINCTRL_IMX8DXL=y ++CONFIG_PINCTRL_IMX8ULP=y ++# CONFIG_PINCTRL_IMXRT1050 is not set ++# CONFIG_PINCTRL_IMX91 is not set ++CONFIG_PINCTRL_IMX93=y ++# CONFIG_PINCTRL_IMXRT1170 is not set ++ ++# ++# MediaTek pinctrl drivers ++# ++CONFIG_EINT_MTK=y ++CONFIG_PINCTRL_MTK=y ++CONFIG_PINCTRL_MTK_V2=y ++CONFIG_PINCTRL_MTK_MOORE=y ++CONFIG_PINCTRL_MTK_PARIS=y ++CONFIG_PINCTRL_MT2712=y ++CONFIG_PINCTRL_MT6765=y ++CONFIG_PINCTRL_MT6779=y ++CONFIG_PINCTRL_MT6795=y ++CONFIG_PINCTRL_MT6797=y ++CONFIG_PINCTRL_MT7622=y ++CONFIG_PINCTRL_MT7981=y ++CONFIG_PINCTRL_MT7986=y ++CONFIG_PINCTRL_MT8167=y ++CONFIG_PINCTRL_MT8173=y ++CONFIG_PINCTRL_MT8183=y ++CONFIG_PINCTRL_MT8186=y ++CONFIG_PINCTRL_MT8188=y ++CONFIG_PINCTRL_MT8192=y ++CONFIG_PINCTRL_MT8195=y ++CONFIG_PINCTRL_MT8365=y ++CONFIG_PINCTRL_MT8516=y ++CONFIG_PINCTRL_MT6397=y ++# end of MediaTek pinctrl drivers ++ ++CONFIG_PINCTRL_MESON=y ++CONFIG_PINCTRL_MESON_GXBB=y ++CONFIG_PINCTRL_MESON_GXL=y ++CONFIG_PINCTRL_MESON8_PMX=y ++CONFIG_PINCTRL_MESON_AXG=y ++CONFIG_PINCTRL_MESON_AXG_PMX=y ++CONFIG_PINCTRL_MESON_G12A=y ++CONFIG_PINCTRL_MESON_A1=y ++CONFIG_PINCTRL_MESON_S4=y ++CONFIG_PINCTRL_AMLOGIC_C3=y ++CONFIG_PINCTRL_AMLOGIC_T7=y ++CONFIG_PINCTRL_MVEBU=y ++CONFIG_PINCTRL_ARMADA_AP806=y ++CONFIG_PINCTRL_ARMADA_CP110=y ++CONFIG_PINCTRL_AC5=y ++CONFIG_PINCTRL_ARMADA_37XX=y ++# CONFIG_PINCTRL_NPCM8XX is not set ++# CONFIG_PINCTRL_MA35D1 is not set ++# CONFIG_PINCTRL_S32G2 is not set ++CONFIG_PINCTRL_MSM=y ++CONFIG_PINCTRL_IPQ5018=y ++CONFIG_PINCTRL_IPQ5332=y ++CONFIG_PINCTRL_IPQ8074=y ++CONFIG_PINCTRL_IPQ6018=y ++CONFIG_PINCTRL_IPQ9574=y ++# CONFIG_PINCTRL_MDM9607 is not set ++CONFIG_PINCTRL_MSM8916=y ++CONFIG_PINCTRL_MSM8953=y ++CONFIG_PINCTRL_MSM8976=y ++CONFIG_PINCTRL_MSM8994=y ++CONFIG_PINCTRL_MSM8996=y ++CONFIG_PINCTRL_MSM8998=y ++CONFIG_PINCTRL_QCM2290=y ++CONFIG_PINCTRL_QCS404=y ++CONFIG_PINCTRL_QDF2XXX=y ++CONFIG_PINCTRL_QDU1000=y ++CONFIG_PINCTRL_SA8775P=y ++CONFIG_PINCTRL_SC7180=y ++CONFIG_PINCTRL_SC7280=y ++CONFIG_PINCTRL_SC8180X=y ++CONFIG_PINCTRL_SC8280XP=y ++CONFIG_PINCTRL_SDM660=y ++CONFIG_PINCTRL_SDM670=y ++CONFIG_PINCTRL_SDM845=y ++# CONFIG_PINCTRL_SDX75 is not set ++# CONFIG_PINCTRL_SM4450 is not set ++CONFIG_PINCTRL_SM6115=y ++CONFIG_PINCTRL_SM6125=y ++CONFIG_PINCTRL_SM6350=y ++CONFIG_PINCTRL_SM6375=y ++# CONFIG_PINCTRL_SM7150 is not set ++CONFIG_PINCTRL_SM8150=y ++CONFIG_PINCTRL_SM8250=y ++CONFIG_PINCTRL_SM8350=y ++CONFIG_PINCTRL_SM8450=y ++CONFIG_PINCTRL_SM8550=y ++# CONFIG_PINCTRL_SM8650 is not set ++# CONFIG_PINCTRL_X1E80100 is not set ++CONFIG_PINCTRL_QCOM_SPMI_PMIC=y ++# CONFIG_PINCTRL_QCOM_SSBI_PMIC is not set ++# CONFIG_PINCTRL_LPASS_LPI is not set ++CONFIG_PINCTRL_RTD=y ++CONFIG_PINCTRL_RTD1619B=y ++CONFIG_PINCTRL_RTD1319D=y ++CONFIG_PINCTRL_RTD1315E=y ++ ++# ++# Renesas pinctrl drivers ++# ++CONFIG_PINCTRL_RENESAS=y ++CONFIG_PINCTRL_SH_PFC=y ++CONFIG_PINCTRL_PFC_R8A77995=y ++CONFIG_PINCTRL_PFC_R8A77990=y ++CONFIG_PINCTRL_PFC_R8A77951=y ++CONFIG_PINCTRL_PFC_R8A77965=y ++CONFIG_PINCTRL_PFC_R8A77960=y ++CONFIG_PINCTRL_PFC_R8A77961=y ++CONFIG_PINCTRL_PFC_R8A779F0=y ++CONFIG_PINCTRL_PFC_R8A77980=y ++CONFIG_PINCTRL_PFC_R8A77970=y ++CONFIG_PINCTRL_PFC_R8A779A0=y ++CONFIG_PINCTRL_PFC_R8A779G0=y ++CONFIG_PINCTRL_RZG2L=y ++CONFIG_PINCTRL_PFC_R8A774C0=y ++CONFIG_PINCTRL_PFC_R8A774E1=y ++CONFIG_PINCTRL_PFC_R8A774A1=y ++CONFIG_PINCTRL_PFC_R8A774B1=y ++CONFIG_PINCTRL_RZV2M=y ++# end of Renesas pinctrl drivers ++ ++CONFIG_PINCTRL_SAMSUNG=y ++CONFIG_PINCTRL_EXYNOS=y ++CONFIG_PINCTRL_EXYNOS_ARM64=y ++# CONFIG_PINCTRL_SPRD_SC9860 is not set ++CONFIG_PINCTRL_STM32=y ++CONFIG_PINCTRL_STM32MP257=y ++CONFIG_PINCTRL_SUNXI=y ++# CONFIG_PINCTRL_SUN4I_A10 is not set ++# CONFIG_PINCTRL_SUN5I is not set ++# CONFIG_PINCTRL_SUN6I_A31 is not set ++# CONFIG_PINCTRL_SUN6I_A31_R is not set ++# CONFIG_PINCTRL_SUN8I_A23 is not set ++# CONFIG_PINCTRL_SUN8I_A33 is not set ++# CONFIG_PINCTRL_SUN8I_A83T is not set ++# CONFIG_PINCTRL_SUN8I_A83T_R is not set ++# CONFIG_PINCTRL_SUN8I_A23_R is not set ++# CONFIG_PINCTRL_SUN8I_H3 is not set ++CONFIG_PINCTRL_SUN8I_H3_R=y ++# CONFIG_PINCTRL_SUN8I_V3S is not set ++# CONFIG_PINCTRL_SUN9I_A80 is not set ++# CONFIG_PINCTRL_SUN9I_A80_R is not set ++# CONFIG_PINCTRL_SUN20I_D1 is not set ++CONFIG_PINCTRL_SUN50I_A64=y ++CONFIG_PINCTRL_SUN50I_A64_R=y ++CONFIG_PINCTRL_SUN50I_A100=y ++CONFIG_PINCTRL_SUN50I_A100_R=y ++CONFIG_PINCTRL_SUN50I_H5=y ++CONFIG_PINCTRL_SUN50I_H6=y ++CONFIG_PINCTRL_SUN50I_H6_R=y ++CONFIG_PINCTRL_SUN50I_H616=y ++CONFIG_PINCTRL_SUN50I_H616_R=y ++CONFIG_PINCTRL_TEGRA=y ++CONFIG_PINCTRL_TEGRA124=y ++CONFIG_PINCTRL_TEGRA210=y ++CONFIG_PINCTRL_TEGRA194=y ++CONFIG_PINCTRL_TEGRA234=y ++CONFIG_PINCTRL_TEGRA_XUSB=y ++CONFIG_PINCTRL_UNIPHIER=y ++# CONFIG_PINCTRL_UNIPHIER_LD4 is not set ++# CONFIG_PINCTRL_UNIPHIER_PRO4 is not set ++# CONFIG_PINCTRL_UNIPHIER_SLD8 is not set ++# CONFIG_PINCTRL_UNIPHIER_PRO5 is not set ++# CONFIG_PINCTRL_UNIPHIER_PXS2 is not set ++# CONFIG_PINCTRL_UNIPHIER_LD6B is not set ++CONFIG_PINCTRL_UNIPHIER_LD11=y ++CONFIG_PINCTRL_UNIPHIER_LD20=y ++CONFIG_PINCTRL_UNIPHIER_PXS3=y ++CONFIG_PINCTRL_UNIPHIER_NX1=y ++CONFIG_PINCTRL_VISCONTI=y ++CONFIG_PINCTRL_TMPV7700=y ++CONFIG_GPIOLIB=y ++CONFIG_GPIOLIB_FASTPATH_LIMIT=512 ++CONFIG_OF_GPIO=y ++CONFIG_GPIO_ACPI=y ++CONFIG_GPIOLIB_IRQCHIP=y ++# CONFIG_DEBUG_GPIO is not set ++CONFIG_GPIO_CDEV=y ++CONFIG_GPIO_CDEV_V1=y ++CONFIG_GPIO_GENERIC=y ++ ++# ++# Memory mapped GPIO drivers ++# ++# CONFIG_GPIO_74XX_MMIO is not set ++# CONFIG_GPIO_ALTERA is not set ++# CONFIG_GPIO_AMDPT is not set ++CONFIG_GPIO_RASPBERRYPI_EXP=y ++CONFIG_GPIO_BCM_XGS_IPROC=y ++CONFIG_GPIO_BRCMSTB=y ++# CONFIG_GPIO_CADENCE is not set ++CONFIG_GPIO_DAVINCI=y ++CONFIG_GPIO_DWAPB=y ++# CONFIG_GPIO_EIC_SPRD is not set ++# CONFIG_GPIO_EXAR is not set ++# CONFIG_GPIO_FTGPIO010 is not set ++CONFIG_GPIO_GENERIC_PLATFORM=y ++# CONFIG_GPIO_GRGPIO is not set ++# CONFIG_GPIO_HISI is not set ++# CONFIG_GPIO_HLWD is not set ++CONFIG_GPIO_IMX_SCU=y ++# CONFIG_GPIO_LOGICVC is not set ++CONFIG_GPIO_MB86S7X=y ++CONFIG_GPIO_MPC8XXX=y ++CONFIG_GPIO_MVEBU=y ++CONFIG_GPIO_MXC=y ++# CONFIG_GPIO_NPCM_SGPIO is not set ++CONFIG_GPIO_PL061=y ++CONFIG_GPIO_RCAR=y ++CONFIG_GPIO_ROCKCHIP=y ++CONFIG_GPIO_RTD=y ++# CONFIG_GPIO_SIFIVE is not set ++# CONFIG_GPIO_SPRD is not set ++CONFIG_GPIO_SYSCON=y ++CONFIG_GPIO_TEGRA=y ++CONFIG_GPIO_TEGRA186=y ++# CONFIG_GPIO_THUNDERX is not set ++CONFIG_GPIO_UNIPHIER=y ++# CONFIG_GPIO_VF610 is not set ++CONFIG_GPIO_VISCONTI=y ++CONFIG_GPIO_XGENE=y ++CONFIG_GPIO_XGENE_SB=y ++# CONFIG_GPIO_XILINX is not set ++# CONFIG_GPIO_XLP is not set ++# CONFIG_GPIO_ZYNQ is not set ++CONFIG_GPIO_ZYNQMP_MODEPIN=y ++# CONFIG_GPIO_AMD_FCH is not set ++# end of Memory mapped GPIO drivers ++ ++# ++# I2C GPIO expanders ++# ++# CONFIG_GPIO_ADNP is not set ++# CONFIG_GPIO_FXL6408 is not set ++# CONFIG_GPIO_DS4520 is not set ++# CONFIG_GPIO_GW_PLD is not set ++# CONFIG_GPIO_MAX7300 is not set ++CONFIG_GPIO_MAX732X=y ++# CONFIG_GPIO_MAX732X_IRQ is not set ++CONFIG_GPIO_PCA953X=y ++CONFIG_GPIO_PCA953X_IRQ=y ++# CONFIG_GPIO_PCA9570 is not set ++# CONFIG_GPIO_PCF857X is not set ++# CONFIG_GPIO_TPIC2810 is not set ++# end of I2C GPIO expanders ++ ++# ++# MFD GPIO expanders ++# ++# CONFIG_GPIO_BD9571MWV is not set ++# CONFIG_GPIO_CROS_EC is not set ++CONFIG_GPIO_MAX77620=y ++# CONFIG_GPIO_SL28CPLD is not set ++CONFIG_GPIO_TPS65219=y ++# end of MFD GPIO expanders ++ ++# ++# PCI GPIO expanders ++# ++# CONFIG_GPIO_BT8XX is not set ++# CONFIG_GPIO_PCI_IDIO_16 is not set ++# CONFIG_GPIO_PCIE_IDIO_24 is not set ++# CONFIG_GPIO_RDC321X is not set ++# end of PCI GPIO expanders ++ ++# ++# SPI GPIO expanders ++# ++# CONFIG_GPIO_74X164 is not set ++# CONFIG_GPIO_MAX3191X is not set ++# CONFIG_GPIO_MAX7301 is not set ++# CONFIG_GPIO_MC33880 is not set ++# CONFIG_GPIO_PISOSR is not set ++# CONFIG_GPIO_XRA1403 is not set ++# end of SPI GPIO expanders ++ ++# ++# USB GPIO expanders ++# ++# end of USB GPIO expanders ++ ++# ++# Virtual GPIO drivers ++# ++# CONFIG_GPIO_AGGREGATOR is not set ++# CONFIG_GPIO_LATCH is not set ++# CONFIG_GPIO_MOCKUP is not set ++# CONFIG_GPIO_VIRTIO is not set ++# CONFIG_GPIO_SIM is not set ++# end of Virtual GPIO drivers ++ ++# ++# GPIO Debugging utilities ++# ++# CONFIG_GPIO_VIRTUSER is not set ++# end of GPIO Debugging utilities ++ ++# CONFIG_W1 is not set ++CONFIG_POWER_RESET=y ++CONFIG_POWER_RESET_BRCMSTB=y ++# CONFIG_POWER_RESET_GPIO is not set ++# CONFIG_POWER_RESET_GPIO_RESTART is not set ++# CONFIG_POWER_RESET_HISI is not set ++# CONFIG_POWER_RESET_LINKSTATION is not set ++CONFIG_POWER_RESET_MSM=y ++# CONFIG_POWER_RESET_QCOM_PON is not set ++# CONFIG_POWER_RESET_OCELOT_RESET is not set ++# CONFIG_POWER_RESET_ODROID_GO_ULTRA_POWEROFF is not set ++# CONFIG_POWER_RESET_LTC2952 is not set ++# CONFIG_POWER_RESET_MT6323 is not set ++# CONFIG_POWER_RESET_REGULATOR is not set ++# CONFIG_POWER_RESET_RESTART is not set ++# CONFIG_POWER_RESET_VEXPRESS is not set ++CONFIG_POWER_RESET_XGENE=y ++CONFIG_POWER_RESET_SYSCON=y ++CONFIG_POWER_RESET_SYSCON_POWEROFF=y ++CONFIG_REBOOT_MODE=y ++CONFIG_SYSCON_REBOOT_MODE=y ++# CONFIG_NVMEM_REBOOT_MODE is not set ++# CONFIG_POWER_SEQUENCING is not set ++CONFIG_POWER_SUPPLY=y ++# CONFIG_POWER_SUPPLY_DEBUG is not set ++CONFIG_POWER_SUPPLY_HWMON=y ++# CONFIG_GENERIC_ADC_BATTERY is not set ++# CONFIG_IP5XXX_POWER is not set ++# CONFIG_TEST_POWER is not set ++# CONFIG_CHARGER_ADP5061 is not set ++# CONFIG_BATTERY_CW2015 is not set ++# CONFIG_BATTERY_DS2780 is not set ++# CONFIG_BATTERY_DS2781 is not set ++# CONFIG_BATTERY_DS2782 is not set ++# CONFIG_BATTERY_SAMSUNG_SDI is not set ++# CONFIG_BATTERY_SBS is not set ++# CONFIG_CHARGER_SBS is not set ++# CONFIG_MANAGER_SBS is not set ++CONFIG_BATTERY_BQ27XXX=y ++CONFIG_BATTERY_BQ27XXX_I2C=y ++# CONFIG_BATTERY_BQ27XXX_DT_UPDATES_NVM is not set ++# CONFIG_AXP20X_POWER is not set ++# CONFIG_BATTERY_MAX17040 is not set ++# CONFIG_BATTERY_MAX17042 is not set ++# CONFIG_BATTERY_MAX1720X is not set ++# CONFIG_CHARGER_ISP1704 is not set ++# CONFIG_CHARGER_MAX8903 is not set ++# CONFIG_CHARGER_LP8727 is not set ++# CONFIG_CHARGER_GPIO is not set ++# CONFIG_CHARGER_MANAGER is not set ++# CONFIG_CHARGER_LT3651 is not set ++# CONFIG_CHARGER_LTC4162L is not set ++# CONFIG_CHARGER_DETECTOR_MAX14656 is not set ++# CONFIG_CHARGER_MAX77976 is not set ++# CONFIG_CHARGER_MT6360 is not set ++# CONFIG_CHARGER_QCOM_SMBB is not set ++# CONFIG_BATTERY_PM8916_BMS_VM is not set ++# CONFIG_CHARGER_PM8916_LBC is not set ++# CONFIG_CHARGER_BQ2415X is not set ++# CONFIG_CHARGER_BQ24190 is not set ++# CONFIG_CHARGER_BQ24257 is not set ++# CONFIG_CHARGER_BQ24735 is not set ++# CONFIG_CHARGER_BQ2515X is not set ++# CONFIG_CHARGER_BQ25890 is not set ++# CONFIG_CHARGER_BQ25980 is not set ++# CONFIG_CHARGER_BQ256XX is not set ++# CONFIG_CHARGER_RK817 is not set ++# CONFIG_CHARGER_SMB347 is not set ++# CONFIG_BATTERY_GAUGE_LTC2941 is not set ++# CONFIG_BATTERY_GOLDFISH is not set ++# CONFIG_BATTERY_RT5033 is not set ++# CONFIG_CHARGER_RT9455 is not set ++# CONFIG_CHARGER_RT9467 is not set ++# CONFIG_CHARGER_RT9471 is not set ++# CONFIG_CHARGER_CROS_USBPD is not set ++CONFIG_CHARGER_CROS_PCHG=y ++CONFIG_CHARGER_CROS_CONTROL=y ++# CONFIG_CHARGER_UCS1002 is not set ++# CONFIG_CHARGER_BD99954 is not set ++# CONFIG_BATTERY_UG3105 is not set ++# CONFIG_CHARGER_QCOM_SMB2 is not set ++# CONFIG_FUEL_GAUGE_MM8013 is not set ++CONFIG_HWMON=y ++# CONFIG_HWMON_DEBUG_CHIP is not set ++ ++# ++# Native drivers ++# ++# CONFIG_SENSORS_AD7314 is not set ++# CONFIG_SENSORS_AD7414 is not set ++# CONFIG_SENSORS_AD7418 is not set ++# CONFIG_SENSORS_ADM1025 is not set ++# CONFIG_SENSORS_ADM1026 is not set ++# CONFIG_SENSORS_ADM1029 is not set ++# CONFIG_SENSORS_ADM1031 is not set ++# CONFIG_SENSORS_ADM1177 is not set ++# CONFIG_SENSORS_ADM9240 is not set ++# CONFIG_SENSORS_ADT7310 is not set ++# CONFIG_SENSORS_ADT7410 is not set ++# CONFIG_SENSORS_ADT7411 is not set ++# CONFIG_SENSORS_ADT7462 is not set ++# CONFIG_SENSORS_ADT7470 is not set ++# CONFIG_SENSORS_ADT7475 is not set ++# CONFIG_SENSORS_AHT10 is not set ++# CONFIG_SENSORS_AQUACOMPUTER_D5NEXT is not set ++# CONFIG_SENSORS_AS370 is not set ++# CONFIG_SENSORS_ASC7621 is not set ++# CONFIG_SENSORS_ASUS_ROG_RYUJIN is not set ++# CONFIG_SENSORS_AXI_FAN_CONTROL is not set ++CONFIG_SENSORS_ARM_SCMI=y ++CONFIG_SENSORS_ARM_SCPI=y ++# CONFIG_SENSORS_ATXP1 is not set ++# CONFIG_SENSORS_CHIPCAP2 is not set ++# CONFIG_SENSORS_CORSAIR_CPRO is not set ++# CONFIG_SENSORS_CORSAIR_PSU is not set ++CONFIG_SENSORS_CROS_EC=y ++# CONFIG_SENSORS_DRIVETEMP is not set ++# CONFIG_SENSORS_DS620 is not set ++# CONFIG_SENSORS_DS1621 is not set ++# CONFIG_SENSORS_I5K_AMB is not set ++# CONFIG_SENSORS_SPARX5 is not set ++# CONFIG_SENSORS_F71805F is not set ++# CONFIG_SENSORS_F71882FG is not set ++# CONFIG_SENSORS_F75375S is not set ++# CONFIG_SENSORS_FTSTEUTATES is not set ++# CONFIG_SENSORS_GIGABYTE_WATERFORCE is not set ++# CONFIG_SENSORS_GL518SM is not set ++# CONFIG_SENSORS_GL520SM is not set ++# CONFIG_SENSORS_G760A is not set ++# CONFIG_SENSORS_G762 is not set ++# CONFIG_SENSORS_GPIO_FAN is not set ++# CONFIG_SENSORS_HIH6130 is not set ++# CONFIG_SENSORS_HS3001 is not set ++# CONFIG_SENSORS_IIO_HWMON is not set ++# CONFIG_SENSORS_IT87 is not set ++# CONFIG_SENSORS_JC42 is not set ++# CONFIG_SENSORS_POWERZ is not set ++# CONFIG_SENSORS_POWR1220 is not set ++# CONFIG_SENSORS_LINEAGE is not set ++# CONFIG_SENSORS_LTC2945 is not set ++# CONFIG_SENSORS_LTC2947_I2C is not set ++# CONFIG_SENSORS_LTC2947_SPI is not set ++# CONFIG_SENSORS_LTC2990 is not set ++# CONFIG_SENSORS_LTC2991 is not set ++# CONFIG_SENSORS_LTC2992 is not set ++# CONFIG_SENSORS_LTC4151 is not set ++# CONFIG_SENSORS_LTC4215 is not set ++# CONFIG_SENSORS_LTC4222 is not set ++# CONFIG_SENSORS_LTC4245 is not set ++# CONFIG_SENSORS_LTC4260 is not set ++# CONFIG_SENSORS_LTC4261 is not set ++# CONFIG_SENSORS_LTC4282 is not set ++# CONFIG_SENSORS_MAX1111 is not set ++# CONFIG_SENSORS_MAX127 is not set ++# CONFIG_SENSORS_MAX16065 is not set ++# CONFIG_SENSORS_MAX1619 is not set ++# CONFIG_SENSORS_MAX1668 is not set ++# CONFIG_SENSORS_MAX197 is not set ++# CONFIG_SENSORS_MAX31722 is not set ++# CONFIG_SENSORS_MAX31730 is not set ++# CONFIG_SENSORS_MAX31760 is not set ++# CONFIG_MAX31827 is not set ++# CONFIG_SENSORS_MAX6620 is not set ++# CONFIG_SENSORS_MAX6621 is not set ++# CONFIG_SENSORS_MAX6639 is not set ++# CONFIG_SENSORS_MAX6650 is not set ++# CONFIG_SENSORS_MAX6697 is not set ++# CONFIG_SENSORS_MAX31790 is not set ++# CONFIG_SENSORS_MC34VR500 is not set ++# CONFIG_SENSORS_MCP3021 is not set ++# CONFIG_SENSORS_TC654 is not set ++# CONFIG_SENSORS_TPS23861 is not set ++# CONFIG_SENSORS_MR75203 is not set ++# CONFIG_SENSORS_ADCXX is not set ++# CONFIG_SENSORS_LM63 is not set ++# CONFIG_SENSORS_LM70 is not set ++# CONFIG_SENSORS_LM73 is not set ++# CONFIG_SENSORS_LM75 is not set ++# CONFIG_SENSORS_LM77 is not set ++# CONFIG_SENSORS_LM78 is not set ++# CONFIG_SENSORS_LM80 is not set ++# CONFIG_SENSORS_LM83 is not set ++# CONFIG_SENSORS_LM85 is not set ++# CONFIG_SENSORS_LM87 is not set ++# CONFIG_SENSORS_LM90 is not set ++# CONFIG_SENSORS_LM92 is not set ++# CONFIG_SENSORS_LM93 is not set ++# CONFIG_SENSORS_LM95234 is not set ++# CONFIG_SENSORS_LM95241 is not set ++# CONFIG_SENSORS_LM95245 is not set ++# CONFIG_SENSORS_PC87360 is not set ++# CONFIG_SENSORS_PC87427 is not set ++# CONFIG_SENSORS_NTC_THERMISTOR is not set ++# CONFIG_SENSORS_NCT6683 is not set ++# CONFIG_SENSORS_NCT6775 is not set ++# CONFIG_SENSORS_NCT6775_I2C is not set ++# CONFIG_SENSORS_NCT7802 is not set ++# CONFIG_SENSORS_NCT7904 is not set ++# CONFIG_SENSORS_NPCM7XX is not set ++# CONFIG_SENSORS_NZXT_KRAKEN2 is not set ++# CONFIG_SENSORS_NZXT_KRAKEN3 is not set ++# CONFIG_SENSORS_NZXT_SMART2 is not set ++# CONFIG_SENSORS_OCC_P8_I2C is not set ++# CONFIG_SENSORS_PCF8591 is not set ++# CONFIG_PMBUS is not set ++# CONFIG_SENSORS_PT5161L is not set ++# CONFIG_SENSORS_PWM_FAN is not set ++# CONFIG_SENSORS_RASPBERRYPI_HWMON is not set ++# CONFIG_SENSORS_SL28CPLD is not set ++# CONFIG_SENSORS_SBTSI is not set ++# CONFIG_SENSORS_SBRMI is not set ++# CONFIG_SENSORS_SHT15 is not set ++# CONFIG_SENSORS_SHT21 is not set ++# CONFIG_SENSORS_SHT3x is not set ++# CONFIG_SENSORS_SHT4x is not set ++# CONFIG_SENSORS_SHTC1 is not set ++# CONFIG_SENSORS_SIS5595 is not set ++# CONFIG_SENSORS_DME1737 is not set ++# CONFIG_SENSORS_EMC1403 is not set ++# CONFIG_SENSORS_EMC2103 is not set ++# CONFIG_SENSORS_EMC2305 is not set ++# CONFIG_SENSORS_EMC6W201 is not set ++# CONFIG_SENSORS_SMSC47M1 is not set ++# CONFIG_SENSORS_SMSC47M192 is not set ++# CONFIG_SENSORS_SMSC47B397 is not set ++# CONFIG_SENSORS_SCH5627 is not set ++# CONFIG_SENSORS_SCH5636 is not set ++# CONFIG_SENSORS_STTS751 is not set ++# CONFIG_SENSORS_ADC128D818 is not set ++# CONFIG_SENSORS_ADS7828 is not set ++# CONFIG_SENSORS_ADS7871 is not set ++# CONFIG_SENSORS_AMC6821 is not set ++# CONFIG_SENSORS_INA209 is not set ++# CONFIG_SENSORS_INA2XX is not set ++# CONFIG_SENSORS_INA238 is not set ++# CONFIG_SENSORS_INA3221 is not set ++# CONFIG_SENSORS_SPD5118 is not set ++# CONFIG_SENSORS_TC74 is not set ++# CONFIG_SENSORS_THMC50 is not set ++# CONFIG_SENSORS_TMP102 is not set ++# CONFIG_SENSORS_TMP103 is not set ++# CONFIG_SENSORS_TMP108 is not set ++# CONFIG_SENSORS_TMP401 is not set ++# CONFIG_SENSORS_TMP421 is not set ++# CONFIG_SENSORS_TMP464 is not set ++# CONFIG_SENSORS_TMP513 is not set ++# CONFIG_SENSORS_VEXPRESS is not set ++# CONFIG_SENSORS_VIA686A is not set ++# CONFIG_SENSORS_VT1211 is not set ++# CONFIG_SENSORS_VT8231 is not set ++# CONFIG_SENSORS_W83773G is not set ++# CONFIG_SENSORS_W83781D is not set ++# CONFIG_SENSORS_W83791D is not set ++# CONFIG_SENSORS_W83792D is not set ++# CONFIG_SENSORS_W83793 is not set ++# CONFIG_SENSORS_W83795 is not set ++# CONFIG_SENSORS_W83L785TS is not set ++# CONFIG_SENSORS_W83L786NG is not set ++# CONFIG_SENSORS_W83627HF is not set ++# CONFIG_SENSORS_W83627EHF is not set ++# CONFIG_SENSORS_XGENE is not set ++ ++# ++# ACPI drivers ++# ++# CONFIG_SENSORS_ACPI_POWER is not set ++CONFIG_THERMAL=y ++# CONFIG_THERMAL_NETLINK is not set ++# CONFIG_THERMAL_STATISTICS is not set ++# CONFIG_THERMAL_DEBUGFS is not set ++# CONFIG_THERMAL_CORE_TESTING is not set ++CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0 ++CONFIG_THERMAL_HWMON=y ++CONFIG_THERMAL_OF=y ++CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y ++# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set ++# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set ++# CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR is not set ++# CONFIG_THERMAL_GOV_FAIR_SHARE is not set ++CONFIG_THERMAL_GOV_STEP_WISE=y ++# CONFIG_THERMAL_GOV_BANG_BANG is not set ++# CONFIG_THERMAL_GOV_USER_SPACE is not set ++CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y ++CONFIG_CPU_THERMAL=y ++CONFIG_CPU_FREQ_THERMAL=y ++CONFIG_DEVFREQ_THERMAL=y ++CONFIG_THERMAL_EMULATION=y ++# CONFIG_THERMAL_MMIO is not set ++CONFIG_HISI_THERMAL=y ++# CONFIG_IMX_THERMAL is not set ++# CONFIG_IMX_SC_THERMAL is not set ++# CONFIG_IMX8MM_THERMAL is not set ++# CONFIG_K3_THERMAL is not set ++# CONFIG_MAX77620_THERMAL is not set ++# CONFIG_QORIQ_THERMAL is not set ++CONFIG_SUN8I_THERMAL=y ++# CONFIG_ROCKCHIP_THERMAL is not set ++CONFIG_ARMADA_THERMAL=y ++ ++# ++# Mediatek thermal drivers ++# ++# CONFIG_MTK_THERMAL is not set ++# end of Mediatek thermal drivers ++ ++CONFIG_AMLOGIC_THERMAL=y ++ ++# ++# Broadcom thermal drivers ++# ++# CONFIG_BCM2711_THERMAL is not set ++# CONFIG_BCM2835_THERMAL is not set ++# CONFIG_BRCMSTB_THERMAL is not set ++CONFIG_BCM_NS_THERMAL=y ++CONFIG_BCM_SR_THERMAL=y ++# end of Broadcom thermal drivers ++ ++# ++# Samsung thermal drivers ++# ++CONFIG_EXYNOS_THERMAL=y ++# end of Samsung thermal drivers ++ ++# ++# STMicroelectronics thermal drivers ++# ++# CONFIG_ST_THERMAL is not set ++# CONFIG_ST_THERMAL_MEMMAP is not set ++# end of STMicroelectronics thermal drivers ++ ++CONFIG_RCAR_THERMAL=y ++CONFIG_RCAR_GEN3_THERMAL=y ++CONFIG_RZG2L_THERMAL=y ++ ++# ++# NVIDIA Tegra thermal drivers ++# ++# CONFIG_TEGRA_SOCTHERM is not set ++# CONFIG_TEGRA_BPMP_THERMAL is not set ++# end of NVIDIA Tegra thermal drivers ++ ++# CONFIG_GENERIC_ADC_THERMAL is not set ++ ++# ++# Qualcomm thermal drivers ++# ++CONFIG_QCOM_TSENS=y ++# CONFIG_QCOM_SPMI_ADC_TM5 is not set ++# CONFIG_QCOM_SPMI_TEMP_ALARM is not set ++# CONFIG_QCOM_LMH is not set ++# end of Qualcomm thermal drivers ++ ++CONFIG_UNIPHIER_THERMAL=y ++# CONFIG_SPRD_THERMAL is not set ++CONFIG_WATCHDOG=y ++CONFIG_WATCHDOG_CORE=y ++# CONFIG_WATCHDOG_NOWAYOUT is not set ++CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y ++CONFIG_WATCHDOG_OPEN_TIMEOUT=0 ++# CONFIG_WATCHDOG_SYSFS is not set ++# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set ++ ++# ++# Watchdog Pretimeout Governors ++# ++# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set ++ ++# ++# Watchdog Device Drivers ++# ++# CONFIG_SOFT_WATCHDOG is not set ++# CONFIG_CROS_EC_WATCHDOG is not set ++# CONFIG_GPIO_WATCHDOG is not set ++# CONFIG_WDAT_WDT is not set ++# CONFIG_XILINX_WATCHDOG is not set ++# CONFIG_XILINX_WINDOW_WATCHDOG is not set ++# CONFIG_ZIIRAVE_WATCHDOG is not set ++# CONFIG_SL28CPLD_WATCHDOG is not set ++CONFIG_ARM_SP805_WATCHDOG=y ++CONFIG_ARM_SBSA_WATCHDOG=y ++# CONFIG_ARMADA_37XX_WATCHDOG is not set ++# CONFIG_CADENCE_WATCHDOG is not set ++CONFIG_S3C2410_WATCHDOG=y ++CONFIG_DW_WATCHDOG=y ++# CONFIG_K3_RTI_WATCHDOG is not set ++# CONFIG_SUNXI_WATCHDOG is not set ++CONFIG_NPCM7XX_WATCHDOG=y ++# CONFIG_MAX63XX_WATCHDOG is not set ++# CONFIG_MAX77620_WATCHDOG is not set ++CONFIG_IMX2_WDT=y ++# CONFIG_IMX_SC_WDT is not set ++# CONFIG_IMX7ULP_WDT is not set ++# CONFIG_TEGRA_WATCHDOG is not set ++# CONFIG_QCOM_WDT is not set ++# CONFIG_MESON_GXBB_WATCHDOG is not set ++# CONFIG_MESON_WATCHDOG is not set ++CONFIG_MEDIATEK_WATCHDOG=y ++CONFIG_ARM_SMC_WATCHDOG=y ++CONFIG_RENESAS_WDT=y ++# CONFIG_RENESAS_RZAWDT is not set ++# CONFIG_RENESAS_RZN1WDT is not set ++CONFIG_RENESAS_RZG2LWDT=y ++CONFIG_STM32_WATCHDOG=y ++CONFIG_UNIPHIER_WATCHDOG=y ++CONFIG_RTD119X_WATCHDOG=y ++# CONFIG_SPRD_WATCHDOG is not set ++# CONFIG_PM8916_WATCHDOG is not set ++# CONFIG_VISCONTI_WATCHDOG is not set ++# CONFIG_APPLE_WATCHDOG is not set ++# CONFIG_ALIM7101_WDT is not set ++# CONFIG_I6300ESB_WDT is not set ++# CONFIG_HP_WATCHDOG is not set ++CONFIG_MARVELL_GTI_WDT=y ++CONFIG_BCM2835_WDT=y ++# CONFIG_BCM7038_WDT is not set ++# CONFIG_MEN_A21_WDT is not set ++# CONFIG_XEN_WDT is not set ++ ++# ++# PCI-based Watchdog Cards ++# ++# CONFIG_PCIPCWATCHDOG is not set ++# CONFIG_WDTPCI is not set ++ ++# ++# USB-based Watchdog Cards ++# ++# CONFIG_USBPCWATCHDOG is not set ++# CONFIG_KEEMBAY_WATCHDOG is not set ++CONFIG_SSB_POSSIBLE=y ++# CONFIG_SSB is not set ++CONFIG_BCMA_POSSIBLE=y ++# CONFIG_BCMA is not set ++ ++# ++# Multifunction device drivers ++# ++CONFIG_MFD_CORE=y ++# CONFIG_MFD_ADP5585 is not set ++# CONFIG_MFD_ALTERA_A10SR is not set ++CONFIG_MFD_ALTERA_SYSMGR=y ++# CONFIG_MFD_ACT8945A is not set ++# CONFIG_MFD_SUN4I_GPADC is not set ++# CONFIG_MFD_AS3711 is not set ++# CONFIG_MFD_SMPRO is not set ++# CONFIG_MFD_AS3722 is not set ++# CONFIG_PMIC_ADP5520 is not set ++# CONFIG_MFD_AAT2870_CORE is not set ++# CONFIG_MFD_ATMEL_FLEXCOM is not set ++# CONFIG_MFD_ATMEL_HLCDC is not set ++# CONFIG_MFD_BCM590XX is not set ++CONFIG_MFD_BD9571MWV=y ++# CONFIG_MFD_AC100 is not set ++CONFIG_MFD_AXP20X=y ++CONFIG_MFD_AXP20X_I2C=y ++CONFIG_MFD_AXP20X_RSB=y ++CONFIG_MFD_CROS_EC_DEV=y ++# CONFIG_MFD_CS42L43_I2C is not set ++# CONFIG_MFD_MADERA is not set ++# CONFIG_MFD_MAX5970 is not set ++# CONFIG_PMIC_DA903X is not set ++# CONFIG_MFD_DA9052_SPI is not set ++# CONFIG_MFD_DA9052_I2C is not set ++# CONFIG_MFD_DA9055 is not set ++# CONFIG_MFD_DA9062 is not set ++# CONFIG_MFD_DA9063 is not set ++# CONFIG_MFD_DA9150 is not set ++# CONFIG_MFD_DLN2 is not set ++# CONFIG_MFD_EXYNOS_LPASS is not set ++# CONFIG_MFD_GATEWORKS_GSC is not set ++# CONFIG_MFD_MC13XXX_SPI is not set ++# CONFIG_MFD_MC13XXX_I2C is not set ++# CONFIG_MFD_MP2629 is not set ++CONFIG_MFD_HI6421_PMIC=y ++# CONFIG_MFD_HI6421_SPMI is not set ++CONFIG_MFD_HI655X_PMIC=y ++# CONFIG_LPC_ICH is not set ++# CONFIG_LPC_SCH is not set ++# CONFIG_MFD_IQS62X is not set ++# CONFIG_MFD_JANZ_CMODIO is not set ++# CONFIG_MFD_KEMPLD is not set ++# CONFIG_MFD_88PM800 is not set ++# CONFIG_MFD_88PM805 is not set ++# CONFIG_MFD_88PM860X is not set ++# CONFIG_MFD_88PM886_PMIC is not set ++# CONFIG_MFD_MAX14577 is not set ++# CONFIG_MFD_MAX77541 is not set ++CONFIG_MFD_MAX77620=y ++# CONFIG_MFD_MAX77650 is not set ++# CONFIG_MFD_MAX77686 is not set ++# CONFIG_MFD_MAX77693 is not set ++# CONFIG_MFD_MAX77714 is not set ++# CONFIG_MFD_MAX77843 is not set ++# CONFIG_MFD_MAX8907 is not set ++# CONFIG_MFD_MAX8925 is not set ++# CONFIG_MFD_MAX8997 is not set ++# CONFIG_MFD_MAX8998 is not set ++CONFIG_MFD_MT6360=y ++# CONFIG_MFD_MT6370 is not set ++CONFIG_MFD_MT6397=y ++# CONFIG_MFD_MENF21BMC is not set ++# CONFIG_MFD_OCELOT is not set ++# CONFIG_EZX_PCAP is not set ++# CONFIG_MFD_CPCAP is not set ++# CONFIG_MFD_VIPERBOARD is not set ++# CONFIG_MFD_NTXEC is not set ++# CONFIG_MFD_RETU is not set ++# CONFIG_MFD_PCF50633 is not set ++# CONFIG_MFD_QCOM_RPM is not set ++CONFIG_MFD_SPMI_PMIC=y ++# CONFIG_MFD_SY7636A is not set ++# CONFIG_MFD_RDC321X is not set ++# CONFIG_MFD_RT4831 is not set ++# CONFIG_MFD_RT5033 is not set ++# CONFIG_MFD_RT5120 is not set ++# CONFIG_MFD_RC5T583 is not set ++CONFIG_MFD_RK8XX=y ++CONFIG_MFD_RK8XX_I2C=y ++CONFIG_MFD_RK8XX_SPI=y ++# CONFIG_MFD_RN5T618 is not set ++CONFIG_MFD_SEC_CORE=y ++# CONFIG_MFD_SI476X_CORE is not set ++CONFIG_MFD_SIMPLE_MFD_I2C=y ++CONFIG_MFD_SL28CPLD=y ++# CONFIG_MFD_SM501 is not set ++# CONFIG_MFD_SKY81452 is not set ++# CONFIG_MFD_SC27XX_PMIC is not set ++CONFIG_RZ_MTU3=y ++# CONFIG_MFD_STMPE is not set ++# CONFIG_MFD_SUN6I_PRCM is not set ++CONFIG_MFD_SYSCON=y ++# CONFIG_MFD_TI_AM335X_TSCADC is not set ++# CONFIG_MFD_LP3943 is not set ++# CONFIG_MFD_LP8788 is not set ++# CONFIG_MFD_TI_LMU is not set ++# CONFIG_MFD_PALMAS is not set ++# CONFIG_TPS6105X is not set ++# CONFIG_TPS65010 is not set ++# CONFIG_TPS6507X is not set ++# CONFIG_MFD_TPS65086 is not set ++# CONFIG_MFD_TPS65090 is not set ++# CONFIG_MFD_TPS65217 is not set ++# CONFIG_MFD_TI_LP873X is not set ++# CONFIG_MFD_TI_LP87565 is not set ++# CONFIG_MFD_TPS65218 is not set ++CONFIG_MFD_TPS65219=y ++# CONFIG_MFD_TPS6586X is not set ++# CONFIG_MFD_TPS65910 is not set ++# CONFIG_MFD_TPS65912_I2C is not set ++# CONFIG_MFD_TPS65912_SPI is not set ++# CONFIG_MFD_TPS6594_I2C is not set ++# CONFIG_MFD_TPS6594_SPI is not set ++# CONFIG_TWL4030_CORE is not set ++# CONFIG_TWL6040_CORE is not set ++# CONFIG_MFD_WL1273_CORE is not set ++# CONFIG_MFD_LM3533 is not set ++# CONFIG_MFD_TC3589X is not set ++# CONFIG_MFD_TQMX86 is not set ++# CONFIG_MFD_VX855 is not set ++# CONFIG_MFD_LOCHNAGAR is not set ++# CONFIG_MFD_ARIZONA_I2C is not set ++# CONFIG_MFD_ARIZONA_SPI is not set ++# CONFIG_MFD_WM8400 is not set ++# CONFIG_MFD_WM831X_I2C is not set ++# CONFIG_MFD_WM831X_SPI is not set ++# CONFIG_MFD_WM8350_I2C is not set ++# CONFIG_MFD_WM8994 is not set ++CONFIG_MFD_ROHM_BD718XX=y ++# CONFIG_MFD_ROHM_BD71828 is not set ++# CONFIG_MFD_ROHM_BD957XMUF is not set ++# CONFIG_MFD_ROHM_BD96801 is not set ++# CONFIG_MFD_STM32_LPTIMER is not set ++# CONFIG_MFD_STM32_TIMERS is not set ++# CONFIG_MFD_STPMIC1 is not set ++# CONFIG_MFD_STMFX is not set ++# CONFIG_MFD_ATC260X_I2C is not set ++# CONFIG_MFD_KHADAS_MCU is not set ++# CONFIG_MFD_QCOM_PM8008 is not set ++# CONFIG_MFD_CS40L50_I2C is not set ++# CONFIG_MFD_CS40L50_SPI is not set ++CONFIG_MFD_VEXPRESS_SYSREG=y ++# CONFIG_RAVE_SP_CORE is not set ++# CONFIG_MFD_INTEL_M10_BMC_SPI is not set ++# CONFIG_MFD_RSMU_I2C is not set ++# CONFIG_MFD_RSMU_SPI is not set ++# end of Multifunction device drivers ++ ++CONFIG_REGULATOR=y ++# CONFIG_REGULATOR_DEBUG is not set ++CONFIG_REGULATOR_FIXED_VOLTAGE=y ++# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set ++# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set ++# CONFIG_REGULATOR_NETLINK_EVENTS is not set ++# CONFIG_REGULATOR_88PG86X is not set ++# CONFIG_REGULATOR_ACT8865 is not set ++# CONFIG_REGULATOR_AD5398 is not set ++# CONFIG_REGULATOR_ANATOP is not set ++CONFIG_REGULATOR_ARM_SCMI=y ++# CONFIG_REGULATOR_AW37503 is not set ++CONFIG_REGULATOR_AXP20X=y ++CONFIG_REGULATOR_BD718XX=y ++CONFIG_REGULATOR_BD9571MWV=y ++CONFIG_REGULATOR_CROS_EC=y ++# CONFIG_REGULATOR_DA9121 is not set ++# CONFIG_REGULATOR_DA9210 is not set ++# CONFIG_REGULATOR_DA9211 is not set ++CONFIG_REGULATOR_FAN53555=y ++# CONFIG_REGULATOR_FAN53880 is not set ++CONFIG_REGULATOR_GPIO=y ++# CONFIG_REGULATOR_HI6421 is not set ++CONFIG_REGULATOR_HI6421V530=y ++CONFIG_REGULATOR_HI655X=y ++# CONFIG_REGULATOR_ISL9305 is not set ++# CONFIG_REGULATOR_ISL6271A is not set ++# CONFIG_REGULATOR_LP3971 is not set ++# CONFIG_REGULATOR_LP3972 is not set ++# CONFIG_REGULATOR_LP872X is not set ++# CONFIG_REGULATOR_LP8755 is not set ++# CONFIG_REGULATOR_LTC3589 is not set ++# CONFIG_REGULATOR_LTC3676 is not set ++# CONFIG_REGULATOR_MAX1586 is not set ++# CONFIG_REGULATOR_MAX77503 is not set ++CONFIG_REGULATOR_MAX77620=y ++# CONFIG_REGULATOR_MAX77857 is not set ++# CONFIG_REGULATOR_MAX8649 is not set ++# CONFIG_REGULATOR_MAX8660 is not set ++# CONFIG_REGULATOR_MAX8893 is not set ++# CONFIG_REGULATOR_MAX8952 is not set ++CONFIG_REGULATOR_MAX8973=y ++# CONFIG_REGULATOR_MAX20086 is not set ++# CONFIG_REGULATOR_MAX20411 is not set ++# CONFIG_REGULATOR_MAX77826 is not set ++# CONFIG_REGULATOR_MCP16502 is not set ++# CONFIG_REGULATOR_MP5416 is not set ++CONFIG_REGULATOR_MP8859=y ++# CONFIG_REGULATOR_MP886X is not set ++# CONFIG_REGULATOR_MPQ7920 is not set ++# CONFIG_REGULATOR_MT6311 is not set ++# CONFIG_REGULATOR_MT6315 is not set ++# CONFIG_REGULATOR_MT6323 is not set ++# CONFIG_REGULATOR_MT6331 is not set ++# CONFIG_REGULATOR_MT6332 is not set ++CONFIG_REGULATOR_MT6357=y ++CONFIG_REGULATOR_MT6358=y ++CONFIG_REGULATOR_MT6359=y ++CONFIG_REGULATOR_MT6360=y ++# CONFIG_REGULATOR_MT6380 is not set ++CONFIG_REGULATOR_MT6397=y ++CONFIG_REGULATOR_PCA9450=y ++CONFIG_REGULATOR_PF8X00=y ++CONFIG_REGULATOR_PFUZE100=y ++# CONFIG_REGULATOR_PV88060 is not set ++# CONFIG_REGULATOR_PV88080 is not set ++# CONFIG_REGULATOR_PV88090 is not set ++CONFIG_REGULATOR_PWM=y ++# CONFIG_REGULATOR_QCOM_REFGEN is not set ++CONFIG_REGULATOR_QCOM_RPMH=y ++CONFIG_REGULATOR_QCOM_SMD_RPM=y ++CONFIG_REGULATOR_QCOM_SPMI=y ++# CONFIG_REGULATOR_QCOM_USB_VBUS is not set ++CONFIG_REGULATOR_RAA215300=y ++CONFIG_REGULATOR_RK808=y ++CONFIG_REGULATOR_ROHM=y ++# CONFIG_REGULATOR_RT4801 is not set ++# CONFIG_REGULATOR_RT4803 is not set ++# CONFIG_REGULATOR_RT5190A is not set ++# CONFIG_REGULATOR_RT5739 is not set ++# CONFIG_REGULATOR_RT5759 is not set ++# CONFIG_REGULATOR_RT6160 is not set ++# CONFIG_REGULATOR_RT6190 is not set ++# CONFIG_REGULATOR_RT6245 is not set ++# CONFIG_REGULATOR_RTQ2134 is not set ++# CONFIG_REGULATOR_RTMV20 is not set ++# CONFIG_REGULATOR_RTQ6752 is not set ++# CONFIG_REGULATOR_RTQ2208 is not set ++# CONFIG_REGULATOR_S2MPA01 is not set ++CONFIG_REGULATOR_S2MPS11=y ++# CONFIG_REGULATOR_S5M8767 is not set ++# CONFIG_REGULATOR_SLG51000 is not set ++# CONFIG_REGULATOR_STM32_BOOSTER is not set ++# CONFIG_REGULATOR_STM32_VREFBUF is not set ++# CONFIG_REGULATOR_STM32_PWR is not set ++CONFIG_REGULATOR_SUN20I=y ++# CONFIG_REGULATOR_SY8106A is not set ++# CONFIG_REGULATOR_SY8824X is not set ++# CONFIG_REGULATOR_SY8827N is not set ++# CONFIG_REGULATOR_TPS51632 is not set ++# CONFIG_REGULATOR_TPS62360 is not set ++# CONFIG_REGULATOR_TPS6286X is not set ++# CONFIG_REGULATOR_TPS6287X is not set ++# CONFIG_REGULATOR_TPS65023 is not set ++# CONFIG_REGULATOR_TPS6507X is not set ++# CONFIG_REGULATOR_TPS65132 is not set ++CONFIG_REGULATOR_TPS65219=y ++# CONFIG_REGULATOR_TPS6524X is not set ++CONFIG_REGULATOR_UNIPHIER=y ++CONFIG_REGULATOR_RZG2L_VBCTRL=y ++# CONFIG_REGULATOR_VCTRL is not set ++# CONFIG_REGULATOR_VEXPRESS is not set ++# CONFIG_REGULATOR_VQMMC_IPQ4019 is not set ++# CONFIG_REGULATOR_QCOM_LABIBB is not set ++# CONFIG_RC_CORE is not set ++ ++# ++# CEC support ++# ++# CONFIG_MEDIA_CEC_SUPPORT is not set ++# end of CEC support ++ ++# CONFIG_MEDIA_SUPPORT is not set ++ ++# ++# Graphics support ++# ++CONFIG_APERTURE_HELPERS=y ++CONFIG_SCREEN_INFO=y ++CONFIG_VIDEO=y ++# CONFIG_AUXDISPLAY is not set ++# CONFIG_TEGRA_HOST1X is not set ++CONFIG_DRM=y ++# CONFIG_DRM_DEBUG_MM is not set ++CONFIG_DRM_KMS_HELPER=y ++# CONFIG_DRM_PANIC is not set ++CONFIG_DRM_FBDEV_EMULATION=y ++CONFIG_DRM_FBDEV_OVERALLOC=100 ++# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set ++CONFIG_DRM_GEM_SHMEM_HELPER=y ++ ++# ++# I2C encoder or helper chips ++# ++# CONFIG_DRM_I2C_CH7006 is not set ++# CONFIG_DRM_I2C_SIL164 is not set ++# CONFIG_DRM_I2C_NXP_TDA998X is not set ++# CONFIG_DRM_I2C_NXP_TDA9950 is not set ++# end of I2C encoder or helper chips ++ ++# ++# ARM devices ++# ++# CONFIG_DRM_HDLCD is not set ++# CONFIG_DRM_MALI_DISPLAY is not set ++# CONFIG_DRM_KOMEDA is not set ++# end of ARM devices ++ ++# CONFIG_DRM_RADEON is not set ++# CONFIG_DRM_AMDGPU is not set ++# CONFIG_DRM_NOUVEAU is not set ++# CONFIG_DRM_XE is not set ++# CONFIG_DRM_KMB_DISPLAY is not set ++# CONFIG_DRM_VGEM is not set ++# CONFIG_DRM_VKMS is not set ++# CONFIG_DRM_EXYNOS is not set ++# CONFIG_DRM_ROCKCHIP is not set ++# CONFIG_DRM_VMWGFX is not set ++# CONFIG_DRM_UDL is not set ++# CONFIG_DRM_AST is not set ++# CONFIG_DRM_MGAG200 is not set ++# CONFIG_DRM_RCAR_DU is not set ++# CONFIG_DRM_RZG2L_MIPI_DSI is not set ++# CONFIG_DRM_SHMOBILE is not set ++# CONFIG_DRM_SUN4I is not set ++# CONFIG_DRM_QXL is not set ++CONFIG_DRM_VIRTIO_GPU=y ++CONFIG_DRM_VIRTIO_GPU_KMS=y ++# CONFIG_DRM_MSM is not set ++# CONFIG_DRM_TEGRA is not set ++# CONFIG_DRM_STM is not set ++CONFIG_DRM_PANEL=y ++ ++# ++# Display Panels ++# ++# CONFIG_DRM_PANEL_ABT_Y030XX067A is not set ++# CONFIG_DRM_PANEL_ARM_VERSATILE is not set ++CONFIG_DRM_PANEL_SIMPLE=y ++# CONFIG_DRM_PANEL_AUO_A030JTN01 is not set ++# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set ++# CONFIG_DRM_PANEL_INNOLUX_EJ030NA is not set ++# CONFIG_DRM_PANEL_LG_LB035Q02 is not set ++# CONFIG_DRM_PANEL_LG_LG4573 is not set ++# CONFIG_DRM_PANEL_NEC_NL8048HL11 is not set ++# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 is not set ++# CONFIG_DRM_PANEL_SAMSUNG_S6D27A1 is not set ++# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set ++# CONFIG_DRM_PANEL_SHARP_LS037V7DW01 is not set ++# CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set ++# end of Display Panels ++ ++CONFIG_DRM_BRIDGE=y ++CONFIG_DRM_PANEL_BRIDGE=y ++ ++# ++# Display Interface Bridges ++# ++# CONFIG_DRM_CHIPONE_ICN6211 is not set ++# CONFIG_DRM_CHRONTEL_CH7033 is not set ++# CONFIG_DRM_CROS_EC_ANX7688 is not set ++# CONFIG_DRM_DISPLAY_CONNECTOR is not set ++# CONFIG_DRM_FSL_LDB is not set ++# CONFIG_DRM_ITE_IT6505 is not set ++# CONFIG_DRM_LONTIUM_LT8912B is not set ++# CONFIG_DRM_LONTIUM_LT9211 is not set ++# CONFIG_DRM_LONTIUM_LT9611 is not set ++# CONFIG_DRM_LONTIUM_LT9611UXC is not set ++# CONFIG_DRM_ITE_IT66121 is not set ++# CONFIG_DRM_LVDS_CODEC is not set ++# CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set ++# CONFIG_DRM_NWL_MIPI_DSI is not set ++# CONFIG_DRM_NXP_PTN3460 is not set ++# CONFIG_DRM_PARADE_PS8622 is not set ++# CONFIG_DRM_PARADE_PS8640 is not set ++# CONFIG_DRM_SAMSUNG_DSIM is not set ++# CONFIG_DRM_SIL_SII8620 is not set ++# CONFIG_DRM_SII902X is not set ++# CONFIG_DRM_SII9234 is not set ++# CONFIG_DRM_SIMPLE_BRIDGE is not set ++# CONFIG_DRM_THINE_THC63LVD1024 is not set ++# CONFIG_DRM_TOSHIBA_TC358762 is not set ++# CONFIG_DRM_TOSHIBA_TC358764 is not set ++# CONFIG_DRM_TOSHIBA_TC358767 is not set ++# CONFIG_DRM_TOSHIBA_TC358768 is not set ++# CONFIG_DRM_TOSHIBA_TC358775 is not set ++# CONFIG_DRM_TI_DLPC3433 is not set ++# CONFIG_DRM_TI_TFP410 is not set ++# CONFIG_DRM_TI_SN65DSI83 is not set ++# CONFIG_DRM_TI_SN65DSI86 is not set ++# CONFIG_DRM_TI_TPD12S015 is not set ++# CONFIG_DRM_ANALOGIX_ANX6345 is not set ++# CONFIG_DRM_ANALOGIX_ANX78XX is not set ++# CONFIG_DRM_ANALOGIX_ANX7625 is not set ++# CONFIG_DRM_I2C_ADV7511 is not set ++# CONFIG_DRM_CDNS_DSI is not set ++# CONFIG_DRM_CDNS_MHDP8546 is not set ++# CONFIG_DRM_IMX8MP_DW_HDMI_BRIDGE is not set ++# CONFIG_DRM_IMX8MP_HDMI_PVI is not set ++# CONFIG_DRM_IMX8QM_LDB is not set ++# CONFIG_DRM_IMX8QXP_LDB is not set ++# CONFIG_DRM_IMX8QXP_PIXEL_COMBINER is not set ++# CONFIG_DRM_IMX8QXP_PIXEL_LINK is not set ++# CONFIG_DRM_IMX8QXP_PIXEL_LINK_TO_DPI is not set ++# CONFIG_DRM_IMX93_MIPI_DSI is not set ++# end of Display Interface Bridges ++ ++# CONFIG_DRM_IMX_DCSS is not set ++# CONFIG_DRM_IMX_LCDC is not set ++# CONFIG_DRM_V3D is not set ++# CONFIG_DRM_VC4 is not set ++# CONFIG_DRM_ETNAVIV is not set ++# CONFIG_DRM_HISI_HIBMC is not set ++# CONFIG_DRM_HISI_KIRIN is not set ++# CONFIG_DRM_LOGICVC is not set ++# CONFIG_DRM_MXSFB is not set ++# CONFIG_DRM_IMX_LCDIF is not set ++# CONFIG_DRM_MESON is not set ++# CONFIG_DRM_ARCPGU is not set ++# CONFIG_DRM_BOCHS is not set ++# CONFIG_DRM_CIRRUS_QEMU is not set ++# CONFIG_DRM_GM12U320 is not set ++# CONFIG_DRM_PANEL_MIPI_DBI is not set ++# CONFIG_DRM_SIMPLEDRM is not set ++# CONFIG_TINYDRM_HX8357D is not set ++# CONFIG_TINYDRM_ILI9163 is not set ++# CONFIG_TINYDRM_ILI9225 is not set ++# CONFIG_TINYDRM_ILI9341 is not set ++# CONFIG_TINYDRM_ILI9486 is not set ++# CONFIG_TINYDRM_MI0283QT is not set ++# CONFIG_TINYDRM_REPAPER is not set ++# CONFIG_TINYDRM_ST7586 is not set ++# CONFIG_TINYDRM_ST7735R is not set ++CONFIG_DRM_PL111=y ++# CONFIG_DRM_XEN_FRONTEND is not set ++# CONFIG_DRM_LIMA is not set ++# CONFIG_DRM_PANFROST is not set ++# CONFIG_DRM_PANTHOR is not set ++# CONFIG_DRM_TIDSS is not set ++# CONFIG_DRM_GUD is not set ++# CONFIG_DRM_SSD130X is not set ++# CONFIG_DRM_SPRD is not set ++# CONFIG_DRM_POWERVR is not set ++CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y ++ ++# ++# Frame buffer Devices ++# ++CONFIG_FB=y ++# CONFIG_FB_CIRRUS is not set ++# CONFIG_FB_PM2 is not set ++# CONFIG_FB_IMX is not set ++# CONFIG_FB_CYBER2000 is not set ++# CONFIG_FB_ASILIANT is not set ++# CONFIG_FB_IMSTT is not set ++CONFIG_FB_EFI=y ++# CONFIG_FB_OPENCORES is not set ++# CONFIG_FB_S1D13XXX is not set ++# CONFIG_FB_NVIDIA is not set ++# CONFIG_FB_RIVA is not set ++# CONFIG_FB_I740 is not set ++# CONFIG_FB_MATROX is not set ++# CONFIG_FB_RADEON is not set ++# CONFIG_FB_ATY128 is not set ++# CONFIG_FB_ATY is not set ++# CONFIG_FB_S3 is not set ++# CONFIG_FB_SAVAGE is not set ++# CONFIG_FB_SIS is not set ++# CONFIG_FB_NEOMAGIC is not set ++# CONFIG_FB_KYRO is not set ++# CONFIG_FB_3DFX is not set ++# CONFIG_FB_VOODOO1 is not set ++# CONFIG_FB_VT8623 is not set ++# CONFIG_FB_TRIDENT is not set ++# CONFIG_FB_ARK is not set ++# CONFIG_FB_PM3 is not set ++# CONFIG_FB_CARMINE is not set ++# CONFIG_FB_SMSCUFX is not set ++# CONFIG_FB_UDL is not set ++# CONFIG_FB_IBM_GXT4500 is not set ++# CONFIG_FB_XILINX is not set ++# CONFIG_FB_VIRTUAL is not set ++CONFIG_XEN_FBDEV_FRONTEND=y ++# CONFIG_FB_METRONOME is not set ++# CONFIG_FB_MB862XX is not set ++# CONFIG_FB_SIMPLE is not set ++# CONFIG_FB_SSD1307 is not set ++# CONFIG_FB_SM712 is not set ++CONFIG_FB_CORE=y ++CONFIG_FB_NOTIFY=y ++# CONFIG_FIRMWARE_EDID is not set ++CONFIG_FB_DEVICE=y ++CONFIG_FB_CFB_FILLRECT=y ++CONFIG_FB_CFB_COPYAREA=y ++CONFIG_FB_CFB_IMAGEBLIT=y ++CONFIG_FB_SYS_FILLRECT=y ++CONFIG_FB_SYS_COPYAREA=y ++CONFIG_FB_SYS_IMAGEBLIT=y ++# CONFIG_FB_FOREIGN_ENDIAN is not set ++CONFIG_FB_SYSMEM_FOPS=y ++CONFIG_FB_DEFERRED_IO=y ++CONFIG_FB_IOMEM_FOPS=y ++CONFIG_FB_IOMEM_HELPERS=y ++CONFIG_FB_SYSMEM_HELPERS=y ++CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y ++CONFIG_FB_MODE_HELPERS=y ++# CONFIG_FB_TILEBLITTING is not set ++# end of Frame buffer Devices ++ ++# ++# Backlight & LCD device support ++# ++# CONFIG_LCD_CLASS_DEVICE is not set ++CONFIG_BACKLIGHT_CLASS_DEVICE=y ++# end of Backlight & LCD device support ++ ++CONFIG_HDMI=y ++ ++# ++# Console display driver support ++# ++CONFIG_DUMMY_CONSOLE=y ++CONFIG_DUMMY_CONSOLE_COLUMNS=80 ++CONFIG_DUMMY_CONSOLE_ROWS=25 ++CONFIG_FRAMEBUFFER_CONSOLE=y ++# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set ++CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y ++# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set ++# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set ++# end of Console display driver support ++ ++CONFIG_LOGO=y ++# CONFIG_LOGO_LINUX_MONO is not set ++# CONFIG_LOGO_LINUX_VGA16 is not set ++CONFIG_LOGO_LINUX_CLUT224=y ++# end of Graphics support ++ ++# CONFIG_DRM_ACCEL is not set ++CONFIG_SOUND=y ++CONFIG_SND=y ++CONFIG_SND_TIMER=y ++CONFIG_SND_PCM=y ++CONFIG_SND_DMAENGINE_PCM=y ++CONFIG_SND_JACK=y ++CONFIG_SND_JACK_INPUT_DEV=y ++# CONFIG_SND_OSSEMUL is not set ++CONFIG_SND_PCM_TIMER=y ++# CONFIG_SND_HRTIMER is not set ++CONFIG_SND_DYNAMIC_MINORS=y ++CONFIG_SND_MAX_CARDS=32 ++CONFIG_SND_SUPPORT_OLD_API=y ++CONFIG_SND_PROC_FS=y ++CONFIG_SND_VERBOSE_PROCFS=y ++CONFIG_SND_CTL_FAST_LOOKUP=y ++# CONFIG_SND_DEBUG is not set ++# CONFIG_SND_CTL_INPUT_VALIDATION is not set ++# CONFIG_SND_UTIMER is not set ++# CONFIG_SND_SEQUENCER is not set ++CONFIG_SND_DRIVERS=y ++# CONFIG_SND_DUMMY is not set ++# CONFIG_SND_ALOOP is not set ++# CONFIG_SND_PCMTEST is not set ++# CONFIG_SND_MTPAV is not set ++# CONFIG_SND_SERIAL_U16550 is not set ++# CONFIG_SND_SERIAL_GENERIC is not set ++# CONFIG_SND_MPU401 is not set ++CONFIG_SND_PCI=y ++# CONFIG_SND_AD1889 is not set ++# CONFIG_SND_ALS300 is not set ++# CONFIG_SND_ALI5451 is not set ++# CONFIG_SND_ATIIXP is not set ++# CONFIG_SND_ATIIXP_MODEM is not set ++# CONFIG_SND_AU8810 is not set ++# CONFIG_SND_AU8820 is not set ++# CONFIG_SND_AU8830 is not set ++# CONFIG_SND_AW2 is not set ++# CONFIG_SND_AZT3328 is not set ++# CONFIG_SND_BT87X is not set ++# CONFIG_SND_CA0106 is not set ++# CONFIG_SND_CMIPCI is not set ++# CONFIG_SND_OXYGEN is not set ++# CONFIG_SND_CS4281 is not set ++# CONFIG_SND_CS46XX is not set ++# CONFIG_SND_CTXFI is not set ++# CONFIG_SND_DARLA20 is not set ++# CONFIG_SND_GINA20 is not set ++# CONFIG_SND_LAYLA20 is not set ++# CONFIG_SND_DARLA24 is not set ++# CONFIG_SND_GINA24 is not set ++# CONFIG_SND_LAYLA24 is not set ++# CONFIG_SND_MONA is not set ++# CONFIG_SND_MIA is not set ++# CONFIG_SND_ECHO3G is not set ++# CONFIG_SND_INDIGO is not set ++# CONFIG_SND_INDIGOIO is not set ++# CONFIG_SND_INDIGODJ is not set ++# CONFIG_SND_INDIGOIOX is not set ++# CONFIG_SND_INDIGODJX is not set ++# CONFIG_SND_EMU10K1 is not set ++# CONFIG_SND_EMU10K1X is not set ++# CONFIG_SND_ENS1370 is not set ++# CONFIG_SND_ENS1371 is not set ++# CONFIG_SND_ES1938 is not set ++# CONFIG_SND_ES1968 is not set ++# CONFIG_SND_FM801 is not set ++# CONFIG_SND_HDSP is not set ++# CONFIG_SND_HDSPM is not set ++# CONFIG_SND_ICE1712 is not set ++# CONFIG_SND_ICE1724 is not set ++# CONFIG_SND_INTEL8X0 is not set ++# CONFIG_SND_INTEL8X0M is not set ++# CONFIG_SND_KORG1212 is not set ++# CONFIG_SND_LOLA is not set ++# CONFIG_SND_LX6464ES is not set ++# CONFIG_SND_MAESTRO3 is not set ++# CONFIG_SND_MIXART is not set ++# CONFIG_SND_NM256 is not set ++# CONFIG_SND_PCXHR is not set ++# CONFIG_SND_RIPTIDE is not set ++# CONFIG_SND_RME32 is not set ++# CONFIG_SND_RME96 is not set ++# CONFIG_SND_RME9652 is not set ++# CONFIG_SND_SE6X is not set ++# CONFIG_SND_SONICVIBES is not set ++# CONFIG_SND_TRIDENT is not set ++# CONFIG_SND_VIA82XX is not set ++# CONFIG_SND_VIA82XX_MODEM is not set ++# CONFIG_SND_VIRTUOSO is not set ++# CONFIG_SND_VX222 is not set ++# CONFIG_SND_YMFPCI is not set ++ ++# ++# HD-Audio ++# ++# CONFIG_SND_HDA_INTEL is not set ++# CONFIG_SND_HDA_TEGRA is not set ++# end of HD-Audio ++ ++CONFIG_SND_HDA_PREALLOC_SIZE=64 ++CONFIG_SND_SPI=y ++CONFIG_SND_USB=y ++# CONFIG_SND_USB_AUDIO is not set ++# CONFIG_SND_USB_UA101 is not set ++# CONFIG_SND_USB_CAIAQ is not set ++# CONFIG_SND_USB_6FIRE is not set ++# CONFIG_SND_USB_HIFACE is not set ++# CONFIG_SND_BCD2000 is not set ++# CONFIG_SND_USB_POD is not set ++# CONFIG_SND_USB_PODHD is not set ++# CONFIG_SND_USB_TONEPORT is not set ++# CONFIG_SND_USB_VARIAX is not set ++CONFIG_SND_SOC=y ++CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y ++# CONFIG_SND_SOC_ADI is not set ++# CONFIG_SND_SOC_AMD_ACP is not set ++# CONFIG_SND_AMD_ACP_CONFIG is not set ++CONFIG_SND_SOC_APPLE_MCA=y ++# CONFIG_SND_ATMEL_SOC is not set ++# CONFIG_SND_BCM2835_SOC_I2S is not set ++# CONFIG_SND_BCM63XX_I2S_WHISTLER is not set ++# CONFIG_SND_DESIGNWARE_I2S is not set ++ ++# ++# SoC Audio for Freescale CPUs ++# ++ ++# ++# Common SoC Audio options for Freescale CPUs: ++# ++# CONFIG_SND_SOC_FSL_ASRC is not set ++# CONFIG_SND_SOC_FSL_SAI is not set ++# CONFIG_SND_SOC_FSL_AUDMIX is not set ++# CONFIG_SND_SOC_FSL_SSI is not set ++# CONFIG_SND_SOC_FSL_SPDIF is not set ++# CONFIG_SND_SOC_FSL_ESAI is not set ++# CONFIG_SND_SOC_FSL_MICFIL is not set ++# CONFIG_SND_SOC_FSL_XCVR is not set ++# CONFIG_SND_SOC_FSL_AUD2HTX is not set ++# CONFIG_SND_SOC_FSL_RPMSG is not set ++# CONFIG_SND_SOC_IMX_AUDMUX is not set ++# CONFIG_SND_IMX_SOC is not set ++# end of SoC Audio for Freescale CPUs ++ ++# CONFIG_SND_SOC_CHV3_I2S is not set ++# CONFIG_SND_I2S_HI6210_I2S is not set ++# CONFIG_SND_KIRKWOOD_SOC is not set ++# CONFIG_SND_SOC_IMG is not set ++# CONFIG_SND_SOC_INTEL_KEEMBAY is not set ++# CONFIG_SND_SOC_MT2701 is not set ++# CONFIG_SND_SOC_MT6797 is not set ++# CONFIG_SND_SOC_MT7986 is not set ++# CONFIG_SND_SOC_MT8173 is not set ++# CONFIG_SND_SOC_MT8183 is not set ++# CONFIG_SND_SOC_MT8186 is not set ++# CONFIG_SND_SOC_MTK_BTCVSD is not set ++# CONFIG_SND_SOC_MT8188 is not set ++# CONFIG_SND_SOC_MT8192 is not set ++# CONFIG_SND_SOC_MT8195 is not set ++# CONFIG_SND_SOC_MT8365 is not set ++ ++# ++# ASoC support for Amlogic platforms ++# ++# CONFIG_SND_MESON_AIU is not set ++# CONFIG_SND_MESON_AXG_FRDDR is not set ++# CONFIG_SND_MESON_AXG_TODDR is not set ++# CONFIG_SND_MESON_AXG_TDMIN is not set ++# CONFIG_SND_MESON_AXG_TDMOUT is not set ++# CONFIG_SND_MESON_AXG_SOUND_CARD is not set ++# CONFIG_SND_MESON_AXG_SPDIFOUT is not set ++# CONFIG_SND_MESON_AXG_SPDIFIN is not set ++# CONFIG_SND_MESON_AXG_PDM is not set ++# CONFIG_SND_MESON_GX_SOUND_CARD is not set ++# CONFIG_SND_MESON_G12A_TOACODEC is not set ++# CONFIG_SND_MESON_G12A_TOHDMITX is not set ++# CONFIG_SND_SOC_MESON_T9015 is not set ++# end of ASoC support for Amlogic platforms ++ ++# CONFIG_SND_SOC_QCOM is not set ++# CONFIG_SND_SOC_ROCKCHIP is not set ++CONFIG_SND_SOC_SAMSUNG=y ++# CONFIG_SND_SAMSUNG_PCM is not set ++# CONFIG_SND_SAMSUNG_SPDIF is not set ++# CONFIG_SND_SAMSUNG_I2S is not set ++# CONFIG_SND_SOC_SAMSUNG_SMDK_WM8994 is not set ++# CONFIG_SND_SOC_SAMSUNG_SMDK_SPDIF is not set ++# CONFIG_SND_SOC_SMDK_WM8994_PCM is not set ++# CONFIG_SND_SOC_SNOW is not set ++# CONFIG_SND_SOC_ODROID is not set ++# CONFIG_SND_SOC_ARNDALE is not set ++# CONFIG_SND_SOC_SAMSUNG_MIDAS_WM1811 is not set ++ ++# ++# SoC Audio support for Renesas SoCs ++# ++# CONFIG_SND_SOC_SH4_FSI is not set ++# CONFIG_SND_SOC_RCAR is not set ++# CONFIG_SND_SOC_RZ is not set ++# end of SoC Audio support for Renesas SoCs ++ ++# CONFIG_SND_SOC_SOF_TOPLEVEL is not set ++# CONFIG_SND_SOC_SPRD is not set ++ ++# ++# STMicroelectronics STM32 SOC audio support ++# ++# CONFIG_SND_SOC_STM32_SAI is not set ++# CONFIG_SND_SOC_STM32_I2S is not set ++# CONFIG_SND_SOC_STM32_SPDIFRX is not set ++# end of STMicroelectronics STM32 SOC audio support ++ ++# ++# Allwinner SoC Audio support ++# ++# CONFIG_SND_SUN4I_CODEC is not set ++# CONFIG_SND_SUN8I_CODEC is not set ++# CONFIG_SND_SUN8I_CODEC_ANALOG is not set ++# CONFIG_SND_SUN50I_CODEC_ANALOG is not set ++# CONFIG_SND_SUN4I_I2S is not set ++# CONFIG_SND_SUN4I_SPDIF is not set ++# CONFIG_SND_SUN50I_DMIC is not set ++# end of Allwinner SoC Audio support ++ ++# CONFIG_SND_SOC_TEGRA is not set ++ ++# ++# Audio support for Texas Instruments SoCs ++# ++ ++# ++# Texas Instruments DAI support for: ++# ++# CONFIG_SND_SOC_DAVINCI_MCASP is not set ++ ++# ++# Audio support for boards with Texas Instruments SoCs ++# ++# CONFIG_SND_SOC_J721E_EVM is not set ++# end of Audio support for Texas Instruments SoCs ++ ++# CONFIG_SND_SOC_UNIPHIER is not set ++# CONFIG_SND_SOC_XILINX_I2S is not set ++# CONFIG_SND_SOC_XILINX_AUDIO_FORMATTER is not set ++# CONFIG_SND_SOC_XILINX_SPDIF is not set ++# CONFIG_SND_SOC_XTFPGA_I2S is not set ++CONFIG_SND_SOC_I2C_AND_SPI=y ++ ++# ++# CODEC drivers ++# ++# CONFIG_SND_SOC_AC97_CODEC is not set ++# CONFIG_SND_SOC_ADAU1372_I2C is not set ++# CONFIG_SND_SOC_ADAU1372_SPI is not set ++# CONFIG_SND_SOC_ADAU1701 is not set ++# CONFIG_SND_SOC_ADAU1761_I2C is not set ++# CONFIG_SND_SOC_ADAU1761_SPI is not set ++# CONFIG_SND_SOC_ADAU7002 is not set ++# CONFIG_SND_SOC_ADAU7118_HW is not set ++# CONFIG_SND_SOC_ADAU7118_I2C is not set ++# CONFIG_SND_SOC_AK4104 is not set ++# CONFIG_SND_SOC_AK4118 is not set ++# CONFIG_SND_SOC_AK4375 is not set ++# CONFIG_SND_SOC_AK4458 is not set ++# CONFIG_SND_SOC_AK4554 is not set ++# CONFIG_SND_SOC_AK4613 is not set ++# CONFIG_SND_SOC_AK4619 is not set ++# CONFIG_SND_SOC_AK4642 is not set ++# CONFIG_SND_SOC_AK5386 is not set ++# CONFIG_SND_SOC_AK5558 is not set ++# CONFIG_SND_SOC_ALC5623 is not set ++# CONFIG_SND_SOC_AUDIO_IIO_AUX is not set ++# CONFIG_SND_SOC_AW8738 is not set ++# CONFIG_SND_SOC_AW88395 is not set ++# CONFIG_SND_SOC_AW88261 is not set ++# CONFIG_SND_SOC_AW87390 is not set ++# CONFIG_SND_SOC_AW88399 is not set ++# CONFIG_SND_SOC_BD28623 is not set ++# CONFIG_SND_SOC_BT_SCO is not set ++# CONFIG_SND_SOC_CHV3_CODEC is not set ++# CONFIG_SND_SOC_CROS_EC_CODEC is not set ++# CONFIG_SND_SOC_CS35L32 is not set ++# CONFIG_SND_SOC_CS35L33 is not set ++# CONFIG_SND_SOC_CS35L34 is not set ++# CONFIG_SND_SOC_CS35L35 is not set ++# CONFIG_SND_SOC_CS35L36 is not set ++# CONFIG_SND_SOC_CS35L41_SPI is not set ++# CONFIG_SND_SOC_CS35L41_I2C is not set ++# CONFIG_SND_SOC_CS35L45_SPI is not set ++# CONFIG_SND_SOC_CS35L45_I2C is not set ++# CONFIG_SND_SOC_CS35L56_I2C is not set ++# CONFIG_SND_SOC_CS35L56_SPI is not set ++# CONFIG_SND_SOC_CS42L42 is not set ++# CONFIG_SND_SOC_CS42L51_I2C is not set ++# CONFIG_SND_SOC_CS42L52 is not set ++# CONFIG_SND_SOC_CS42L56 is not set ++# CONFIG_SND_SOC_CS42L73 is not set ++# CONFIG_SND_SOC_CS42L83 is not set ++# CONFIG_SND_SOC_CS4234 is not set ++# CONFIG_SND_SOC_CS4265 is not set ++# CONFIG_SND_SOC_CS4270 is not set ++# CONFIG_SND_SOC_CS4271_I2C is not set ++# CONFIG_SND_SOC_CS4271_SPI is not set ++# CONFIG_SND_SOC_CS42XX8_I2C is not set ++# CONFIG_SND_SOC_CS43130 is not set ++# CONFIG_SND_SOC_CS4341 is not set ++# CONFIG_SND_SOC_CS4349 is not set ++# CONFIG_SND_SOC_CS53L30 is not set ++# CONFIG_SND_SOC_CS530X_I2C is not set ++# CONFIG_SND_SOC_CX2072X is not set ++# CONFIG_SND_SOC_DA7213 is not set ++# CONFIG_SND_SOC_DMIC is not set ++# CONFIG_SND_SOC_ES7134 is not set ++# CONFIG_SND_SOC_ES7241 is not set ++# CONFIG_SND_SOC_ES8311 is not set ++# CONFIG_SND_SOC_ES8316 is not set ++# CONFIG_SND_SOC_ES8326 is not set ++# CONFIG_SND_SOC_ES8328_I2C is not set ++# CONFIG_SND_SOC_ES8328_SPI is not set ++# CONFIG_SND_SOC_GTM601 is not set ++# CONFIG_SND_SOC_HDA is not set ++# CONFIG_SND_SOC_ICS43432 is not set ++# CONFIG_SND_SOC_IDT821034 is not set ++# CONFIG_SND_SOC_INNO_RK3036 is not set ++# CONFIG_SND_SOC_MAX98088 is not set ++# CONFIG_SND_SOC_MAX98090 is not set ++# CONFIG_SND_SOC_MAX98357A is not set ++# CONFIG_SND_SOC_MAX98504 is not set ++# CONFIG_SND_SOC_MAX9867 is not set ++# CONFIG_SND_SOC_MAX98927 is not set ++# CONFIG_SND_SOC_MAX98520 is not set ++# CONFIG_SND_SOC_MAX98373_I2C is not set ++# CONFIG_SND_SOC_MAX98388 is not set ++# CONFIG_SND_SOC_MAX98390 is not set ++# CONFIG_SND_SOC_MAX98396 is not set ++# CONFIG_SND_SOC_MAX9860 is not set ++# CONFIG_SND_SOC_MSM8916_WCD_ANALOG is not set ++# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set ++# CONFIG_SND_SOC_PCM1681 is not set ++# CONFIG_SND_SOC_PCM1789_I2C is not set ++# CONFIG_SND_SOC_PCM179X_I2C is not set ++# CONFIG_SND_SOC_PCM179X_SPI is not set ++# CONFIG_SND_SOC_PCM186X_I2C is not set ++# CONFIG_SND_SOC_PCM186X_SPI is not set ++# CONFIG_SND_SOC_PCM3060_I2C is not set ++# CONFIG_SND_SOC_PCM3060_SPI is not set ++# CONFIG_SND_SOC_PCM3168A_I2C is not set ++# CONFIG_SND_SOC_PCM3168A_SPI is not set ++# CONFIG_SND_SOC_PCM5102A is not set ++# CONFIG_SND_SOC_PCM512x_I2C is not set ++# CONFIG_SND_SOC_PCM512x_SPI is not set ++# CONFIG_SND_SOC_PCM6240 is not set ++# CONFIG_SND_SOC_PEB2466 is not set ++# CONFIG_SND_SOC_RK3308 is not set ++# CONFIG_SND_SOC_RK3328 is not set ++# CONFIG_SND_SOC_RK817 is not set ++# CONFIG_SND_SOC_RT5616 is not set ++# CONFIG_SND_SOC_RT5631 is not set ++# CONFIG_SND_SOC_RT5640 is not set ++# CONFIG_SND_SOC_RT5659 is not set ++# CONFIG_SND_SOC_RT9120 is not set ++# CONFIG_SND_SOC_RTQ9128 is not set ++# CONFIG_SND_SOC_SGTL5000 is not set ++# CONFIG_SND_SOC_SIMPLE_AMPLIFIER is not set ++# CONFIG_SND_SOC_SIMPLE_MUX is not set ++# CONFIG_SND_SOC_SMA1303 is not set ++# CONFIG_SND_SOC_SPDIF is not set ++# CONFIG_SND_SOC_SRC4XXX_I2C is not set ++# CONFIG_SND_SOC_SSM2305 is not set ++# CONFIG_SND_SOC_SSM2518 is not set ++# CONFIG_SND_SOC_SSM2602_SPI is not set ++# CONFIG_SND_SOC_SSM2602_I2C is not set ++# CONFIG_SND_SOC_SSM3515 is not set ++# CONFIG_SND_SOC_SSM4567 is not set ++# CONFIG_SND_SOC_STA32X is not set ++# CONFIG_SND_SOC_STA350 is not set ++# CONFIG_SND_SOC_STI_SAS is not set ++# CONFIG_SND_SOC_TAS2552 is not set ++# CONFIG_SND_SOC_TAS2562 is not set ++# CONFIG_SND_SOC_TAS2764 is not set ++# CONFIG_SND_SOC_TAS2770 is not set ++# CONFIG_SND_SOC_TAS2780 is not set ++# CONFIG_SND_SOC_TAS2781_I2C is not set ++# CONFIG_SND_SOC_TAS5086 is not set ++# CONFIG_SND_SOC_TAS571X is not set ++# CONFIG_SND_SOC_TAS5720 is not set ++# CONFIG_SND_SOC_TAS5805M is not set ++# CONFIG_SND_SOC_TAS6424 is not set ++# CONFIG_SND_SOC_TDA7419 is not set ++# CONFIG_SND_SOC_TFA9879 is not set ++# CONFIG_SND_SOC_TFA989X is not set ++# CONFIG_SND_SOC_TLV320ADC3XXX is not set ++# CONFIG_SND_SOC_TLV320AIC23_I2C is not set ++# CONFIG_SND_SOC_TLV320AIC23_SPI is not set ++# CONFIG_SND_SOC_TLV320AIC31XX is not set ++# CONFIG_SND_SOC_TLV320AIC32X4_I2C is not set ++# CONFIG_SND_SOC_TLV320AIC32X4_SPI is not set ++# CONFIG_SND_SOC_TLV320AIC3X_I2C is not set ++# CONFIG_SND_SOC_TLV320AIC3X_SPI is not set ++# CONFIG_SND_SOC_TLV320ADCX140 is not set ++# CONFIG_SND_SOC_TS3A227E is not set ++# CONFIG_SND_SOC_TSCS42XX is not set ++# CONFIG_SND_SOC_TSCS454 is not set ++# CONFIG_SND_SOC_UDA1334 is not set ++# CONFIG_SND_SOC_WM8510 is not set ++# CONFIG_SND_SOC_WM8523 is not set ++# CONFIG_SND_SOC_WM8524 is not set ++# CONFIG_SND_SOC_WM8580 is not set ++# CONFIG_SND_SOC_WM8711 is not set ++# CONFIG_SND_SOC_WM8728 is not set ++# CONFIG_SND_SOC_WM8731_I2C is not set ++# CONFIG_SND_SOC_WM8731_SPI is not set ++# CONFIG_SND_SOC_WM8737 is not set ++# CONFIG_SND_SOC_WM8741 is not set ++# CONFIG_SND_SOC_WM8750 is not set ++# CONFIG_SND_SOC_WM8753 is not set ++# CONFIG_SND_SOC_WM8770 is not set ++# CONFIG_SND_SOC_WM8776 is not set ++# CONFIG_SND_SOC_WM8782 is not set ++# CONFIG_SND_SOC_WM8804_I2C is not set ++# CONFIG_SND_SOC_WM8804_SPI is not set ++# CONFIG_SND_SOC_WM8903 is not set ++# CONFIG_SND_SOC_WM8904 is not set ++# CONFIG_SND_SOC_WM8940 is not set ++# CONFIG_SND_SOC_WM8960 is not set ++# CONFIG_SND_SOC_WM8961 is not set ++# CONFIG_SND_SOC_WM8962 is not set ++# CONFIG_SND_SOC_WM8974 is not set ++# CONFIG_SND_SOC_WM8978 is not set ++# CONFIG_SND_SOC_WM8985 is not set ++# CONFIG_SND_SOC_ZL38060 is not set ++# CONFIG_SND_SOC_MAX9759 is not set ++# CONFIG_SND_SOC_MT6351 is not set ++# CONFIG_SND_SOC_MT6357 is not set ++# CONFIG_SND_SOC_MT6358 is not set ++# CONFIG_SND_SOC_MT6359 is not set ++# CONFIG_SND_SOC_MT6359_ACCDET is not set ++# CONFIG_SND_SOC_MT6660 is not set ++# CONFIG_SND_SOC_NAU8315 is not set ++# CONFIG_SND_SOC_NAU8540 is not set ++# CONFIG_SND_SOC_NAU8810 is not set ++# CONFIG_SND_SOC_NAU8821 is not set ++# CONFIG_SND_SOC_NAU8822 is not set ++# CONFIG_SND_SOC_NAU8824 is not set ++# CONFIG_SND_SOC_TPA6130A2 is not set ++# CONFIG_SND_SOC_LPASS_WSA_MACRO is not set ++# CONFIG_SND_SOC_LPASS_VA_MACRO is not set ++# CONFIG_SND_SOC_LPASS_RX_MACRO is not set ++# CONFIG_SND_SOC_LPASS_TX_MACRO is not set ++# end of CODEC drivers ++ ++# CONFIG_SND_SIMPLE_CARD is not set ++# CONFIG_SND_AUDIO_GRAPH_CARD is not set ++# CONFIG_SND_AUDIO_GRAPH_CARD2 is not set ++# CONFIG_SND_TEST_COMPONENT is not set ++# CONFIG_SND_XEN_FRONTEND is not set ++# CONFIG_SND_VIRTIO is not set ++CONFIG_HID_SUPPORT=y ++CONFIG_HID=y ++# CONFIG_HID_BATTERY_STRENGTH is not set ++# CONFIG_HIDRAW is not set ++# CONFIG_UHID is not set ++CONFIG_HID_GENERIC=y ++ ++# ++# Special HID drivers ++# ++CONFIG_HID_A4TECH=y ++# CONFIG_HID_ACCUTOUCH is not set ++# CONFIG_HID_ACRUX is not set ++CONFIG_HID_APPLE=y ++# CONFIG_HID_APPLEIR is not set ++# CONFIG_HID_ASUS is not set ++# CONFIG_HID_AUREAL is not set ++CONFIG_HID_BELKIN=y ++# CONFIG_HID_BETOP_FF is not set ++# CONFIG_HID_BIGBEN_FF is not set ++CONFIG_HID_CHERRY=y ++CONFIG_HID_CHICONY=y ++# CONFIG_HID_CORSAIR is not set ++# CONFIG_HID_COUGAR is not set ++# CONFIG_HID_MACALLY is not set ++# CONFIG_HID_PRODIKEYS is not set ++# CONFIG_HID_CMEDIA is not set ++# CONFIG_HID_CREATIVE_SB0540 is not set ++CONFIG_HID_CYPRESS=y ++# CONFIG_HID_DRAGONRISE is not set ++# CONFIG_HID_EMS_FF is not set ++# CONFIG_HID_ELAN is not set ++# CONFIG_HID_ELECOM is not set ++# CONFIG_HID_ELO is not set ++# CONFIG_HID_EVISION is not set ++CONFIG_HID_EZKEY=y ++# CONFIG_HID_GEMBIRD is not set ++# CONFIG_HID_GFRM is not set ++# CONFIG_HID_GLORIOUS is not set ++# CONFIG_HID_HOLTEK is not set ++# CONFIG_HID_GOODIX_SPI is not set ++# CONFIG_HID_GOOGLE_HAMMER is not set ++# CONFIG_HID_GOOGLE_STADIA_FF is not set ++# CONFIG_HID_VIVALDI is not set ++# CONFIG_HID_GT683R is not set ++# CONFIG_HID_KEYTOUCH is not set ++# CONFIG_HID_KYE is not set ++# CONFIG_HID_UCLOGIC is not set ++# CONFIG_HID_WALTOP is not set ++# CONFIG_HID_VIEWSONIC is not set ++# CONFIG_HID_VRC2 is not set ++# CONFIG_HID_XIAOMI is not set ++# CONFIG_HID_GYRATION is not set ++# CONFIG_HID_ICADE is not set ++CONFIG_HID_ITE=y ++# CONFIG_HID_JABRA is not set ++# CONFIG_HID_TWINHAN is not set ++CONFIG_HID_KENSINGTON=y ++# CONFIG_HID_LCPOWER is not set ++# CONFIG_HID_LED is not set ++# CONFIG_HID_LENOVO is not set ++# CONFIG_HID_LETSKETCH is not set ++CONFIG_HID_LOGITECH=y ++# CONFIG_HID_LOGITECH_HIDPP is not set ++# CONFIG_LOGITECH_FF is not set ++# CONFIG_LOGIRUMBLEPAD2_FF is not set ++# CONFIG_LOGIG940_FF is not set ++# CONFIG_LOGIWHEELS_FF is not set ++# CONFIG_HID_MAGICMOUSE is not set ++# CONFIG_HID_MALTRON is not set ++# CONFIG_HID_MAYFLASH is not set ++# CONFIG_HID_MEGAWORLD_FF is not set ++CONFIG_HID_REDRAGON=y ++CONFIG_HID_MICROSOFT=y ++CONFIG_HID_MONTEREY=y ++# CONFIG_HID_MULTITOUCH is not set ++# CONFIG_HID_NINTENDO is not set ++# CONFIG_HID_NTI is not set ++# CONFIG_HID_NTRIG is not set ++# CONFIG_HID_ORTEK is not set ++# CONFIG_HID_PANTHERLORD is not set ++# CONFIG_HID_PENMOUNT is not set ++# CONFIG_HID_PETALYNX is not set ++# CONFIG_HID_PICOLCD is not set ++# CONFIG_HID_PLANTRONICS is not set ++# CONFIG_HID_PXRC is not set ++# CONFIG_HID_RAZER is not set ++# CONFIG_HID_PRIMAX is not set ++# CONFIG_HID_RETRODE is not set ++# CONFIG_HID_ROCCAT is not set ++# CONFIG_HID_SAITEK is not set ++# CONFIG_HID_SAMSUNG is not set ++# CONFIG_HID_SEMITEK is not set ++# CONFIG_HID_SIGMAMICRO is not set ++# CONFIG_HID_SONY is not set ++# CONFIG_HID_SPEEDLINK is not set ++# CONFIG_HID_STEAM is not set ++# CONFIG_HID_STEELSERIES is not set ++# CONFIG_HID_SUNPLUS is not set ++# CONFIG_HID_RMI is not set ++# CONFIG_HID_GREENASIA is not set ++# CONFIG_HID_SMARTJOYPLUS is not set ++# CONFIG_HID_TIVO is not set ++# CONFIG_HID_TOPSEED is not set ++# CONFIG_HID_TOPRE is not set ++# CONFIG_HID_THINGM is not set ++# CONFIG_HID_THRUSTMASTER is not set ++# CONFIG_HID_UDRAW_PS3 is not set ++# CONFIG_HID_U2FZERO is not set ++# CONFIG_HID_WACOM is not set ++# CONFIG_HID_WIIMOTE is not set ++# CONFIG_HID_WINWING is not set ++# CONFIG_HID_XINMO is not set ++# CONFIG_HID_ZEROPLUS is not set ++# CONFIG_HID_ZYDACRON is not set ++# CONFIG_HID_SENSOR_HUB is not set ++# CONFIG_HID_ALPS is not set ++# CONFIG_HID_MCP2200 is not set ++# CONFIG_HID_MCP2221 is not set ++# end of Special HID drivers ++ ++# ++# HID-BPF support ++# ++# end of HID-BPF support ++ ++# ++# USB HID support ++# ++CONFIG_USB_HID=y ++# CONFIG_HID_PID is not set ++# CONFIG_USB_HIDDEV is not set ++# end of USB HID support ++ ++CONFIG_I2C_HID=y ++# CONFIG_I2C_HID_ACPI is not set ++# CONFIG_I2C_HID_OF is not set ++# CONFIG_I2C_HID_OF_ELAN is not set ++# CONFIG_I2C_HID_OF_GOODIX is not set ++CONFIG_USB_OHCI_LITTLE_ENDIAN=y ++CONFIG_USB_SUPPORT=y ++CONFIG_USB_COMMON=y ++# CONFIG_USB_LED_TRIG is not set ++CONFIG_USB_ULPI_BUS=y ++CONFIG_USB_CONN_GPIO=y ++CONFIG_USB_ARCH_HAS_HCD=y ++CONFIG_USB=y ++CONFIG_USB_PCI=y ++# CONFIG_USB_PCI_AMD is not set ++# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set ++ ++# ++# Miscellaneous USB options ++# ++CONFIG_USB_DEFAULT_PERSIST=y ++# CONFIG_USB_FEW_INIT_RETRIES is not set ++# CONFIG_USB_DYNAMIC_MINORS is not set ++CONFIG_USB_OTG=y ++# CONFIG_USB_OTG_PRODUCTLIST is not set ++# CONFIG_USB_OTG_DISABLE_EXTERNAL_HUB is not set ++# CONFIG_USB_OTG_FSM is not set ++# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set ++CONFIG_USB_AUTOSUSPEND_DELAY=2 ++CONFIG_USB_DEFAULT_AUTHORIZATION_MODE=1 ++# CONFIG_USB_MON is not set ++ ++# ++# USB Host Controller Drivers ++# ++# CONFIG_USB_C67X00_HCD is not set ++CONFIG_USB_XHCI_HCD=y ++# CONFIG_USB_XHCI_DBGCAP is not set ++CONFIG_USB_XHCI_PCI=y ++# CONFIG_USB_XHCI_PCI_RENESAS is not set ++CONFIG_USB_XHCI_PLATFORM=y ++# CONFIG_USB_XHCI_HISTB is not set ++CONFIG_USB_XHCI_MTK=y ++# CONFIG_USB_XHCI_MVEBU is not set ++CONFIG_USB_XHCI_RCAR=y ++CONFIG_USB_XHCI_RZV2M=y ++CONFIG_USB_XHCI_TEGRA=y ++# CONFIG_USB_BRCMSTB is not set ++CONFIG_USB_EHCI_HCD=y ++CONFIG_USB_EHCI_ROOT_HUB_TT=y ++CONFIG_USB_EHCI_TT_NEWSCHED=y ++CONFIG_USB_EHCI_PCI=y ++# CONFIG_USB_EHCI_FSL is not set ++CONFIG_USB_EHCI_HCD_NPCM7XX=y ++CONFIG_USB_EHCI_HCD_ORION=y ++# CONFIG_USB_EHCI_TEGRA is not set ++CONFIG_USB_EHCI_EXYNOS=y ++CONFIG_USB_EHCI_HCD_PLATFORM=y ++# CONFIG_USB_OXU210HP_HCD is not set ++# CONFIG_USB_ISP116X_HCD is not set ++# CONFIG_USB_MAX3421_HCD is not set ++CONFIG_USB_OHCI_HCD=y ++CONFIG_USB_OHCI_HCD_PCI=y ++CONFIG_USB_OHCI_EXYNOS=y ++CONFIG_USB_OHCI_HCD_PLATFORM=y ++# CONFIG_USB_UHCI_HCD is not set ++# CONFIG_USB_SL811_HCD is not set ++# CONFIG_USB_R8A66597_HCD is not set ++# CONFIG_USB_HCD_TEST_MODE is not set ++# CONFIG_USB_XEN_HCD is not set ++# CONFIG_USB_RENESAS_USBHS is not set ++ ++# ++# USB Device Class drivers ++# ++# CONFIG_USB_ACM is not set ++# CONFIG_USB_PRINTER is not set ++# CONFIG_USB_WDM is not set ++# CONFIG_USB_TMC is not set ++ ++# ++# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may ++# ++ ++# ++# also be needed; see USB_STORAGE Help for more info ++# ++CONFIG_USB_STORAGE=y ++# CONFIG_USB_STORAGE_DEBUG is not set ++# CONFIG_USB_STORAGE_REALTEK is not set ++# CONFIG_USB_STORAGE_DATAFAB is not set ++# CONFIG_USB_STORAGE_FREECOM is not set ++# CONFIG_USB_STORAGE_ISD200 is not set ++# CONFIG_USB_STORAGE_USBAT is not set ++# CONFIG_USB_STORAGE_SDDR09 is not set ++# CONFIG_USB_STORAGE_SDDR55 is not set ++# CONFIG_USB_STORAGE_JUMPSHOT is not set ++# CONFIG_USB_STORAGE_ALAUDA is not set ++# CONFIG_USB_STORAGE_ONETOUCH is not set ++# CONFIG_USB_STORAGE_KARMA is not set ++# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set ++# CONFIG_USB_STORAGE_ENE_UB6250 is not set ++# CONFIG_USB_UAS is not set ++ ++# ++# USB Imaging devices ++# ++# CONFIG_USB_MDC800 is not set ++# CONFIG_USB_MICROTEK is not set ++# CONFIG_USBIP_CORE is not set ++ ++# ++# USB dual-mode controller drivers ++# ++# CONFIG_USB_CDNS_SUPPORT is not set ++CONFIG_USB_MTU3=y ++# CONFIG_USB_MTU3_HOST is not set ++# CONFIG_USB_MTU3_GADGET is not set ++CONFIG_USB_MTU3_DUAL_ROLE=y ++# CONFIG_USB_MTU3_DEBUG is not set ++CONFIG_USB_MUSB_HDRC=y ++# CONFIG_USB_MUSB_HOST is not set ++# CONFIG_USB_MUSB_GADGET is not set ++CONFIG_USB_MUSB_DUAL_ROLE=y ++ ++# ++# Platform Glue Layer ++# ++CONFIG_USB_MUSB_SUNXI=y ++# CONFIG_USB_MUSB_MEDIATEK is not set ++ ++# ++# MUSB DMA mode ++# ++# CONFIG_MUSB_PIO_ONLY is not set ++CONFIG_USB_DWC3=y ++# CONFIG_USB_DWC3_ULPI is not set ++# CONFIG_USB_DWC3_HOST is not set ++# CONFIG_USB_DWC3_GADGET is not set ++CONFIG_USB_DWC3_DUAL_ROLE=y ++ ++# ++# Platform Glue Driver Support ++# ++CONFIG_USB_DWC3_EXYNOS=y ++CONFIG_USB_DWC3_PCI=y ++CONFIG_USB_DWC3_HAPS=y ++CONFIG_USB_DWC3_KEYSTONE=y ++CONFIG_USB_DWC3_MESON_G12A=y ++CONFIG_USB_DWC3_OF_SIMPLE=y ++CONFIG_USB_DWC3_QCOM=y ++CONFIG_USB_DWC3_IMX8MP=y ++CONFIG_USB_DWC3_XILINX=y ++CONFIG_USB_DWC3_AM62=y ++CONFIG_USB_DWC3_RTK=y ++CONFIG_USB_DWC2=y ++# CONFIG_USB_DWC2_HOST is not set ++ ++# ++# Gadget/Dual-role mode requires USB Gadget support to be enabled ++# ++# CONFIG_USB_DWC2_PERIPHERAL is not set ++CONFIG_USB_DWC2_DUAL_ROLE=y ++# CONFIG_USB_DWC2_PCI is not set ++# CONFIG_USB_DWC2_DEBUG is not set ++# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set ++CONFIG_USB_CHIPIDEA=y ++CONFIG_USB_CHIPIDEA_UDC=y ++CONFIG_USB_CHIPIDEA_HOST=y ++CONFIG_USB_CHIPIDEA_PCI=y ++CONFIG_USB_CHIPIDEA_MSM=y ++CONFIG_USB_CHIPIDEA_NPCM=y ++CONFIG_USB_CHIPIDEA_IMX=y ++CONFIG_USB_CHIPIDEA_GENERIC=y ++CONFIG_USB_CHIPIDEA_TEGRA=y ++CONFIG_USB_ISP1760=y ++CONFIG_USB_ISP1760_HCD=y ++CONFIG_USB_ISP1761_UDC=y ++# CONFIG_USB_ISP1760_HOST_ROLE is not set ++# CONFIG_USB_ISP1760_GADGET_ROLE is not set ++CONFIG_USB_ISP1760_DUAL_ROLE=y ++ ++# ++# USB port drivers ++# ++# CONFIG_USB_SERIAL is not set ++ ++# ++# USB Miscellaneous drivers ++# ++# CONFIG_USB_EMI62 is not set ++# CONFIG_USB_EMI26 is not set ++# CONFIG_USB_ADUTUX is not set ++# CONFIG_USB_SEVSEG is not set ++# CONFIG_USB_LEGOTOWER is not set ++# CONFIG_USB_LCD is not set ++# CONFIG_USB_CYPRESS_CY7C63 is not set ++# CONFIG_USB_CYTHERM is not set ++# CONFIG_USB_IDMOUSE is not set ++# CONFIG_USB_APPLEDISPLAY is not set ++# CONFIG_USB_QCOM_EUD is not set ++# CONFIG_APPLE_MFI_FASTCHARGE is not set ++# CONFIG_USB_LJCA is not set ++# CONFIG_USB_SISUSBVGA is not set ++# CONFIG_USB_LD is not set ++# CONFIG_USB_TRANCEVIBRATOR is not set ++# CONFIG_USB_IOWARRIOR is not set ++# CONFIG_USB_TEST is not set ++# CONFIG_USB_EHSET_TEST_FIXTURE is not set ++# CONFIG_USB_ISIGHTFW is not set ++# CONFIG_USB_YUREX is not set ++# CONFIG_USB_EZUSB_FX2 is not set ++# CONFIG_USB_HUB_USB251XB is not set ++CONFIG_USB_HSIC_USB3503=y ++# CONFIG_USB_HSIC_USB4604 is not set ++# CONFIG_USB_LINK_LAYER_TEST is not set ++# CONFIG_USB_CHAOSKEY is not set ++CONFIG_BRCM_USB_PINMAP=y ++# CONFIG_USB_ONBOARD_DEV is not set ++ ++# ++# USB Physical Layer drivers ++# ++CONFIG_USB_PHY=y ++CONFIG_NOP_USB_XCEIV=y ++# CONFIG_USB_ISP1301 is not set ++# CONFIG_USB_MXS_PHY is not set ++CONFIG_USB_TEGRA_PHY=y ++CONFIG_USB_ULPI=y ++CONFIG_USB_ULPI_VIEWPORT=y ++# end of USB Physical Layer drivers ++ ++CONFIG_USB_GADGET=y ++# CONFIG_USB_GADGET_DEBUG is not set ++# CONFIG_USB_GADGET_DEBUG_FILES is not set ++# CONFIG_USB_GADGET_DEBUG_FS is not set ++CONFIG_USB_GADGET_VBUS_DRAW=2 ++CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 ++ ++# ++# USB Peripheral Controller ++# ++# CONFIG_USB_GR_UDC is not set ++# CONFIG_USB_R8A66597 is not set ++CONFIG_USB_RZV2M_USB3DRD=y ++# CONFIG_USB_RENESAS_USB3 is not set ++# CONFIG_USB_RENESAS_USBF is not set ++# CONFIG_USB_PXA27X is not set ++# CONFIG_USB_MV_UDC is not set ++# CONFIG_USB_MV_U3D is not set ++CONFIG_USB_SNP_CORE=y ++CONFIG_USB_SNP_UDC_PLAT=y ++# CONFIG_USB_M66592 is not set ++CONFIG_USB_BDC_UDC=y ++# CONFIG_USB_AMD5536UDC is not set ++# CONFIG_USB_NET2272 is not set ++# CONFIG_USB_NET2280 is not set ++# CONFIG_USB_GOKU is not set ++# CONFIG_USB_EG20T is not set ++# CONFIG_USB_GADGET_XILINX is not set ++# CONFIG_USB_MAX3420_UDC is not set ++# CONFIG_USB_TEGRA_XUDC is not set ++# CONFIG_USB_CDNS2_UDC is not set ++# CONFIG_USB_DUMMY_HCD is not set ++# end of USB Peripheral Controller ++ ++# CONFIG_USB_CONFIGFS is not set ++ ++# ++# USB Gadget precomposed configurations ++# ++# CONFIG_USB_ZERO is not set ++# CONFIG_USB_AUDIO is not set ++# CONFIG_USB_ETH is not set ++# CONFIG_USB_G_NCM is not set ++# CONFIG_USB_GADGETFS is not set ++# CONFIG_USB_FUNCTIONFS is not set ++# CONFIG_USB_MASS_STORAGE is not set ++# CONFIG_USB_G_SERIAL is not set ++# CONFIG_USB_MIDI_GADGET is not set ++# CONFIG_USB_G_PRINTER is not set ++# CONFIG_USB_CDC_COMPOSITE is not set ++# CONFIG_USB_G_ACM_MS is not set ++# CONFIG_USB_G_MULTI is not set ++# CONFIG_USB_G_HID is not set ++# CONFIG_USB_G_DBGP is not set ++# CONFIG_USB_RAW_GADGET is not set ++# end of USB Gadget precomposed configurations ++ ++# CONFIG_TYPEC is not set ++CONFIG_USB_ROLE_SWITCH=y ++CONFIG_MMC=y ++CONFIG_PWRSEQ_EMMC=y ++CONFIG_PWRSEQ_SIMPLE=y ++CONFIG_MMC_BLOCK=y ++CONFIG_MMC_BLOCK_MINORS=32 ++# CONFIG_SDIO_UART is not set ++# CONFIG_MMC_TEST is not set ++ ++# ++# MMC/SD/SDIO Host Controller Drivers ++# ++# CONFIG_MMC_DEBUG is not set ++CONFIG_MMC_ARMMMCI=y ++CONFIG_MMC_QCOM_DML=y ++CONFIG_MMC_STM32_SDMMC=y ++CONFIG_MMC_SDHCI=y ++CONFIG_MMC_SDHCI_IO_ACCESSORS=y ++# CONFIG_MMC_SDHCI_PCI is not set ++CONFIG_MMC_SDHCI_ACPI=y ++CONFIG_MMC_SDHCI_PLTFM=y ++CONFIG_MMC_SDHCI_OF_ARASAN=y ++# CONFIG_MMC_SDHCI_OF_AT91 is not set ++CONFIG_MMC_SDHCI_OF_ESDHC=y ++CONFIG_MMC_SDHCI_OF_DWCMSHC=y ++CONFIG_MMC_SDHCI_OF_SPARX5=y ++# CONFIG_MMC_SDHCI_OF_MA35D1 is not set ++CONFIG_MMC_SDHCI_CADENCE=y ++CONFIG_MMC_SDHCI_ESDHC_IMX=y ++CONFIG_MMC_SDHCI_TEGRA=y ++# CONFIG_MMC_SDHCI_S3C is not set ++# CONFIG_MMC_SDHCI_PXAV3 is not set ++CONFIG_MMC_SDHCI_F_SDH30=y ++# CONFIG_MMC_SDHCI_MILBEAUT is not set ++CONFIG_MMC_SDHCI_IPROC=y ++# CONFIG_MMC_SDHCI_NPCM is not set ++CONFIG_MMC_MESON_GX=y ++# CONFIG_MMC_MESON_MX_SDIO is not set ++CONFIG_MMC_SDHCI_MSM=y ++# CONFIG_MMC_MXC is not set ++# CONFIG_MMC_TIFM_SD is not set ++CONFIG_MMC_SPI=y ++# CONFIG_MMC_SDHCI_SPRD is not set ++CONFIG_MMC_TMIO_CORE=y ++CONFIG_MMC_SDHI=y ++# CONFIG_MMC_SDHI_SYS_DMAC is not set ++CONFIG_MMC_SDHI_INTERNAL_DMAC=y ++CONFIG_MMC_UNIPHIER=y ++# CONFIG_MMC_CB710 is not set ++# CONFIG_MMC_VIA_SDMMC is not set ++CONFIG_MMC_DW=y ++CONFIG_MMC_DW_PLTFM=y ++# CONFIG_MMC_DW_BLUEFIELD is not set ++CONFIG_MMC_DW_EXYNOS=y ++CONFIG_MMC_DW_HI3798CV200=y ++# CONFIG_MMC_DW_HI3798MV200 is not set ++CONFIG_MMC_DW_K3=y ++# CONFIG_MMC_DW_PCI is not set ++CONFIG_MMC_DW_ROCKCHIP=y ++# CONFIG_MMC_SH_MMCIF is not set ++# CONFIG_MMC_VUB300 is not set ++# CONFIG_MMC_USHC is not set ++# CONFIG_MMC_USDHI6ROL0 is not set ++CONFIG_MMC_SUNXI=y ++CONFIG_MMC_CQHCI=y ++# CONFIG_MMC_HSQ is not set ++# CONFIG_MMC_TOSHIBA_PCI is not set ++CONFIG_MMC_BCM2835=y ++CONFIG_MMC_MTK=y ++CONFIG_MMC_SDHCI_BRCMSTB=y ++CONFIG_MMC_SDHCI_XENON=y ++CONFIG_MMC_SDHCI_AM654=y ++CONFIG_MMC_OWL=y ++CONFIG_SCSI_UFSHCD=y ++CONFIG_SCSI_UFS_BSG=y ++# CONFIG_SCSI_UFS_HWMON is not set ++# CONFIG_SCSI_UFSHCD_PCI is not set ++CONFIG_SCSI_UFSHCD_PLATFORM=y ++# CONFIG_SCSI_UFS_CDNS_PLATFORM is not set ++# CONFIG_SCSI_UFS_DWC_TC_PLATFORM is not set ++# CONFIG_SCSI_UFS_QCOM is not set ++# CONFIG_SCSI_UFS_MEDIATEK is not set ++CONFIG_SCSI_UFS_HISI=y ++# CONFIG_SCSI_UFS_RENESAS is not set ++# CONFIG_SCSI_UFS_TI_J721E is not set ++CONFIG_SCSI_UFS_EXYNOS=y ++# CONFIG_SCSI_UFS_SPRD is not set ++# CONFIG_MEMSTICK is not set ++CONFIG_NEW_LEDS=y ++CONFIG_LEDS_CLASS=y ++# CONFIG_LEDS_CLASS_FLASH is not set ++# CONFIG_LEDS_CLASS_MULTICOLOR is not set ++# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set ++ ++# ++# LED drivers ++# ++# CONFIG_LEDS_AN30259A is not set ++# CONFIG_LEDS_AW200XX is not set ++# CONFIG_LEDS_AW2013 is not set ++# CONFIG_LEDS_BCM6328 is not set ++# CONFIG_LEDS_BCM6358 is not set ++# CONFIG_LEDS_CR0014114 is not set ++# CONFIG_LEDS_EL15203000 is not set ++# CONFIG_LEDS_LM3530 is not set ++# CONFIG_LEDS_LM3532 is not set ++# CONFIG_LEDS_LM3642 is not set ++# CONFIG_LEDS_LM3692X is not set ++# CONFIG_LEDS_MT6323 is not set ++# CONFIG_LEDS_PCA9532 is not set ++CONFIG_LEDS_GPIO=y ++# CONFIG_LEDS_LP3944 is not set ++# CONFIG_LEDS_LP3952 is not set ++# CONFIG_LEDS_LP8860 is not set ++# CONFIG_LEDS_PCA955X is not set ++# CONFIG_LEDS_PCA963X is not set ++# CONFIG_LEDS_PCA995X is not set ++# CONFIG_LEDS_DAC124S085 is not set ++CONFIG_LEDS_PWM=y ++# CONFIG_LEDS_REGULATOR is not set ++# CONFIG_LEDS_BD2606MVV is not set ++# CONFIG_LEDS_BD2802 is not set ++# CONFIG_LEDS_LT3593 is not set ++# CONFIG_LEDS_TCA6507 is not set ++# CONFIG_LEDS_TLC591XX is not set ++# CONFIG_LEDS_LM355x is not set ++# CONFIG_LEDS_IS31FL319X is not set ++# CONFIG_LEDS_IS31FL32XX is not set ++ ++# ++# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM) ++# ++# CONFIG_LEDS_BLINKM is not set ++CONFIG_LEDS_SYSCON=y ++# CONFIG_LEDS_MLXREG is not set ++# CONFIG_LEDS_USER is not set ++# CONFIG_LEDS_SPI_BYTE is not set ++# CONFIG_LEDS_LM3697 is not set ++CONFIG_LEDS_BCM63138=y ++ ++# ++# Flash and Torch LED drivers ++# ++ ++# ++# RGB LED drivers ++# ++ ++# ++# LED Triggers ++# ++CONFIG_LEDS_TRIGGERS=y ++CONFIG_LEDS_TRIGGER_TIMER=y ++# CONFIG_LEDS_TRIGGER_ONESHOT is not set ++CONFIG_LEDS_TRIGGER_DISK=y ++# CONFIG_LEDS_TRIGGER_MTD is not set ++CONFIG_LEDS_TRIGGER_HEARTBEAT=y ++# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set ++CONFIG_LEDS_TRIGGER_CPU=y ++# CONFIG_LEDS_TRIGGER_ACTIVITY is not set ++# CONFIG_LEDS_TRIGGER_GPIO is not set ++CONFIG_LEDS_TRIGGER_DEFAULT_ON=y ++ ++# ++# iptables trigger is under Netfilter config (LED target) ++# ++# CONFIG_LEDS_TRIGGER_TRANSIENT is not set ++# CONFIG_LEDS_TRIGGER_CAMERA is not set ++CONFIG_LEDS_TRIGGER_PANIC=y ++# CONFIG_LEDS_TRIGGER_NETDEV is not set ++# CONFIG_LEDS_TRIGGER_PATTERN is not set ++# CONFIG_LEDS_TRIGGER_TTY is not set ++# CONFIG_LEDS_TRIGGER_INPUT_EVENTS is not set ++ ++# ++# Simple LED drivers ++# ++# CONFIG_ACCESSIBILITY is not set ++# CONFIG_INFINIBAND is not set ++CONFIG_EDAC_SUPPORT=y ++CONFIG_EDAC=y ++CONFIG_EDAC_LEGACY_SYSFS=y ++# CONFIG_EDAC_DEBUG is not set ++CONFIG_EDAC_GHES=y ++# CONFIG_EDAC_AL_MC is not set ++# CONFIG_EDAC_LAYERSCAPE is not set ++# CONFIG_EDAC_THUNDERX is not set ++# CONFIG_EDAC_ALTERA is not set ++# CONFIG_EDAC_SYNOPSYS is not set ++# CONFIG_EDAC_XGENE is not set ++# CONFIG_EDAC_DMC520 is not set ++# CONFIG_EDAC_ZYNQMP is not set ++# CONFIG_EDAC_NPCM is not set ++# CONFIG_EDAC_VERSAL is not set ++CONFIG_RTC_LIB=y ++CONFIG_RTC_CLASS=y ++CONFIG_RTC_HCTOSYS=y ++CONFIG_RTC_HCTOSYS_DEVICE="rtc0" ++CONFIG_RTC_SYSTOHC=y ++CONFIG_RTC_SYSTOHC_DEVICE="rtc0" ++# CONFIG_RTC_DEBUG is not set ++CONFIG_RTC_NVMEM=y ++ ++# ++# RTC interfaces ++# ++CONFIG_RTC_INTF_SYSFS=y ++CONFIG_RTC_INTF_PROC=y ++CONFIG_RTC_INTF_DEV=y ++# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set ++# CONFIG_RTC_DRV_TEST is not set ++ ++# ++# I2C RTC drivers ++# ++# CONFIG_RTC_DRV_ABB5ZES3 is not set ++# CONFIG_RTC_DRV_ABEOZ9 is not set ++# CONFIG_RTC_DRV_ABX80X is not set ++CONFIG_RTC_DRV_BRCMSTB=y ++# CONFIG_RTC_DRV_DS1307 is not set ++# CONFIG_RTC_DRV_DS1374 is not set ++# CONFIG_RTC_DRV_DS1672 is not set ++# CONFIG_RTC_DRV_HYM8563 is not set ++# CONFIG_RTC_DRV_MAX6900 is not set ++# CONFIG_RTC_DRV_MAX31335 is not set ++CONFIG_RTC_DRV_MAX77686=y ++# CONFIG_RTC_DRV_NCT3018Y is not set ++# CONFIG_RTC_DRV_RK808 is not set ++# CONFIG_RTC_DRV_RS5C372 is not set ++# CONFIG_RTC_DRV_ISL1208 is not set ++# CONFIG_RTC_DRV_ISL12022 is not set ++# CONFIG_RTC_DRV_ISL12026 is not set ++# CONFIG_RTC_DRV_X1205 is not set ++# CONFIG_RTC_DRV_PCF8523 is not set ++# CONFIG_RTC_DRV_PCF85063 is not set ++# CONFIG_RTC_DRV_PCF85363 is not set ++# CONFIG_RTC_DRV_PCF8563 is not set ++# CONFIG_RTC_DRV_PCF8583 is not set ++# CONFIG_RTC_DRV_M41T80 is not set ++# CONFIG_RTC_DRV_BQ32K is not set ++# CONFIG_RTC_DRV_S35390A is not set ++# CONFIG_RTC_DRV_FM3130 is not set ++# CONFIG_RTC_DRV_RX8010 is not set ++# CONFIG_RTC_DRV_RX8111 is not set ++# CONFIG_RTC_DRV_RX8581 is not set ++# CONFIG_RTC_DRV_RX8025 is not set ++# CONFIG_RTC_DRV_EM3027 is not set ++# CONFIG_RTC_DRV_RV3028 is not set ++# CONFIG_RTC_DRV_RV3032 is not set ++# CONFIG_RTC_DRV_RV8803 is not set ++CONFIG_RTC_DRV_S5M=y ++# CONFIG_RTC_DRV_SD2405AL is not set ++# CONFIG_RTC_DRV_SD3078 is not set ++ ++# ++# SPI RTC drivers ++# ++# CONFIG_RTC_DRV_M41T93 is not set ++# CONFIG_RTC_DRV_M41T94 is not set ++# CONFIG_RTC_DRV_DS1302 is not set ++# CONFIG_RTC_DRV_DS1305 is not set ++# CONFIG_RTC_DRV_DS1343 is not set ++# CONFIG_RTC_DRV_DS1347 is not set ++# CONFIG_RTC_DRV_DS1390 is not set ++# CONFIG_RTC_DRV_MAX6916 is not set ++# CONFIG_RTC_DRV_R9701 is not set ++# CONFIG_RTC_DRV_RX4581 is not set ++# CONFIG_RTC_DRV_RS5C348 is not set ++# CONFIG_RTC_DRV_MAX6902 is not set ++# CONFIG_RTC_DRV_PCF2123 is not set ++# CONFIG_RTC_DRV_MCP795 is not set ++CONFIG_RTC_I2C_AND_SPI=y ++ ++# ++# SPI and I2C RTC drivers ++# ++CONFIG_RTC_DRV_DS3232=y ++CONFIG_RTC_DRV_DS3232_HWMON=y ++# CONFIG_RTC_DRV_PCF2127 is not set ++# CONFIG_RTC_DRV_RV3029C2 is not set ++# CONFIG_RTC_DRV_RX6110 is not set ++ ++# ++# Platform RTC drivers ++# ++# CONFIG_RTC_DRV_DS1286 is not set ++# CONFIG_RTC_DRV_DS1511 is not set ++# CONFIG_RTC_DRV_DS1553 is not set ++# CONFIG_RTC_DRV_DS1685_FAMILY is not set ++# CONFIG_RTC_DRV_DS1742 is not set ++# CONFIG_RTC_DRV_DS2404 is not set ++CONFIG_RTC_DRV_EFI=y ++# CONFIG_RTC_DRV_STK17TA8 is not set ++# CONFIG_RTC_DRV_M48T86 is not set ++# CONFIG_RTC_DRV_M48T35 is not set ++# CONFIG_RTC_DRV_M48T59 is not set ++# CONFIG_RTC_DRV_MSM6242 is not set ++# CONFIG_RTC_DRV_RP5C01 is not set ++# CONFIG_RTC_DRV_OPTEE is not set ++# CONFIG_RTC_DRV_ZYNQMP is not set ++CONFIG_RTC_DRV_CROS_EC=y ++ ++# ++# on-CPU RTC drivers ++# ++# CONFIG_RTC_DRV_IMXDI is not set ++# CONFIG_RTC_DRV_FSL_FTM_ALARM is not set ++# CONFIG_RTC_DRV_MESON_VRTC is not set ++CONFIG_RTC_DRV_S3C=y ++# CONFIG_RTC_DRV_SH is not set ++# CONFIG_RTC_DRV_PL030 is not set ++CONFIG_RTC_DRV_PL031=y ++CONFIG_RTC_DRV_SUN6I=y ++# CONFIG_RTC_DRV_MV is not set ++CONFIG_RTC_DRV_ARMADA38X=y ++# CONFIG_RTC_DRV_CADENCE is not set ++# CONFIG_RTC_DRV_FTRTC010 is not set ++# CONFIG_RTC_DRV_PM8XXX is not set ++CONFIG_RTC_DRV_TEGRA=y ++# CONFIG_RTC_DRV_MXC is not set ++# CONFIG_RTC_DRV_MXC_V2 is not set ++# CONFIG_RTC_DRV_SNVS is not set ++# CONFIG_RTC_DRV_BBNSM is not set ++CONFIG_RTC_DRV_IMX_BBM_SCMI=y ++# CONFIG_RTC_DRV_IMX_SC is not set ++# CONFIG_RTC_DRV_MT2712 is not set ++# CONFIG_RTC_DRV_MT6397 is not set ++# CONFIG_RTC_DRV_MT7622 is not set ++CONFIG_RTC_DRV_XGENE=y ++# CONFIG_RTC_DRV_R7301 is not set ++# CONFIG_RTC_DRV_STM32 is not set ++CONFIG_RTC_DRV_RTD119X=y ++# CONFIG_RTC_DRV_TI_K3 is not set ++# CONFIG_RTC_DRV_MA35D1 is not set ++ ++# ++# HID Sensor RTC drivers ++# ++# CONFIG_RTC_DRV_GOLDFISH is not set ++CONFIG_DMADEVICES=y ++# CONFIG_DMADEVICES_DEBUG is not set ++ ++# ++# DMA Devices ++# ++CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH=y ++CONFIG_DMA_ENGINE=y ++CONFIG_DMA_VIRTUAL_CHANNELS=y ++CONFIG_DMA_ACPI=y ++CONFIG_DMA_OF=y ++# CONFIG_ALTERA_MSGDMA is not set ++# CONFIG_AMBA_PL08X is not set ++CONFIG_APPLE_ADMAC=y ++# CONFIG_AXI_DMAC is not set ++CONFIG_DMA_BCM2835=y ++# CONFIG_DMA_SUN6I is not set ++# CONFIG_DW_AXI_DMAC is not set ++CONFIG_FSL_EDMA=y ++# CONFIG_FSL_QDMA is not set ++# CONFIG_HISI_DMA is not set ++# CONFIG_IMX_DMA is not set ++# CONFIG_IMX_SDMA is not set ++# CONFIG_INTEL_IDMA64 is not set ++CONFIG_K3_DMA=y ++CONFIG_MV_XOR=y ++CONFIG_MV_XOR_V2=y ++# CONFIG_MXS_DMA is not set ++CONFIG_OWL_DMA=y ++CONFIG_PL330_DMA=y ++# CONFIG_PLX_DMA is not set ++# CONFIG_SPRD_DMA is not set ++CONFIG_TEGRA186_GPC_DMA=y ++CONFIG_TEGRA20_APB_DMA=y ++# CONFIG_TEGRA210_ADMA is not set ++# CONFIG_UNIPHIER_MDMAC is not set ++# CONFIG_UNIPHIER_XDMAC is not set ++# CONFIG_XGENE_DMA is not set ++# CONFIG_XILINX_DMA is not set ++# CONFIG_XILINX_XDMA is not set ++# CONFIG_XILINX_ZYNQMP_DMA is not set ++# CONFIG_XILINX_ZYNQMP_DPDMA is not set ++# CONFIG_AMD_QDMA is not set ++# CONFIG_MTK_HSDMA is not set ++# CONFIG_MTK_CQDMA is not set ++# CONFIG_MTK_UART_APDMA is not set ++CONFIG_QCOM_BAM_DMA=y ++# CONFIG_QCOM_GPI_DMA is not set ++CONFIG_QCOM_HIDMA_MGMT=y ++CONFIG_QCOM_HIDMA=y ++# CONFIG_DW_DMAC is not set ++# CONFIG_DW_DMAC_PCI is not set ++# CONFIG_DW_EDMA is not set ++# CONFIG_SF_PDMA is not set ++CONFIG_RENESAS_DMA=y ++CONFIG_RCAR_DMAC=y ++# CONFIG_RENESAS_USB_DMAC is not set ++CONFIG_RZ_DMAC=y ++CONFIG_TI_K3_UDMA=y ++CONFIG_TI_K3_UDMA_GLUE_LAYER=y ++CONFIG_TI_K3_PSIL=y ++# CONFIG_FSL_DPAA2_QDMA is not set ++# CONFIG_STM32_DMA is not set ++# CONFIG_STM32_MDMA is not set ++# CONFIG_STM32_DMA3 is not set ++ ++# ++# DMA Clients ++# ++# CONFIG_ASYNC_TX_DMA is not set ++# CONFIG_DMATEST is not set ++CONFIG_DMA_ENGINE_RAID=y ++ ++# ++# DMABUF options ++# ++CONFIG_SYNC_FILE=y ++# CONFIG_SW_SYNC is not set ++# CONFIG_UDMABUF is not set ++# CONFIG_DMABUF_MOVE_NOTIFY is not set ++# CONFIG_DMABUF_DEBUG is not set ++# CONFIG_DMABUF_SELFTESTS is not set ++# CONFIG_DMABUF_HEAPS is not set ++# CONFIG_DMABUF_SYSFS_STATS is not set ++# end of DMABUF options ++ ++# CONFIG_UIO is not set ++CONFIG_VFIO=y ++CONFIG_VFIO_GROUP=y ++CONFIG_VFIO_CONTAINER=y ++CONFIG_VFIO_IOMMU_TYPE1=y ++# CONFIG_VFIO_NOIOMMU is not set ++CONFIG_VFIO_VIRQFD=y ++# CONFIG_VFIO_DEBUGFS is not set ++ ++# ++# VFIO support for PCI devices ++# ++CONFIG_VFIO_PCI_CORE=y ++CONFIG_VFIO_PCI_MMAP=y ++CONFIG_VFIO_PCI_INTX=y ++CONFIG_VFIO_PCI=y ++# CONFIG_NVGRACE_GPU_VFIO_PCI is not set ++# end of VFIO support for PCI devices ++ ++# ++# VFIO support for platform devices ++# ++# CONFIG_VFIO_PLATFORM is not set ++# CONFIG_VFIO_AMBA is not set ++# end of VFIO support for platform devices ++ ++# ++# VFIO support for FSL_MC bus devices ++# ++# CONFIG_VFIO_FSL_MC is not set ++# end of VFIO support for FSL_MC bus devices ++ ++CONFIG_IRQ_BYPASS_MANAGER=y ++CONFIG_VIRT_DRIVERS=y ++CONFIG_VMGENID=y ++# CONFIG_NITRO_ENCLAVES is not set ++# CONFIG_ARM_PKVM_GUEST is not set ++CONFIG_VIRTIO_ANCHOR=y ++CONFIG_VIRTIO=y ++CONFIG_VIRTIO_PCI_LIB=y ++CONFIG_VIRTIO_PCI_LIB_LEGACY=y ++CONFIG_VIRTIO_MENU=y ++CONFIG_VIRTIO_PCI=y ++CONFIG_VIRTIO_PCI_LEGACY=y ++CONFIG_VIRTIO_BALLOON=y ++CONFIG_VIRTIO_MEM=y ++CONFIG_VIRTIO_INPUT=y ++CONFIG_VIRTIO_MMIO=y ++CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y ++CONFIG_VIRTIO_DMA_SHARED_BUFFER=y ++# CONFIG_VIRTIO_DEBUG is not set ++# CONFIG_VDPA is not set ++CONFIG_VHOST_MENU=y ++# CONFIG_VHOST_NET is not set ++# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set ++ ++# ++# Microsoft Hyper-V guest support ++# ++# CONFIG_HYPERV is not set ++# end of Microsoft Hyper-V guest support ++ ++# ++# Xen driver support ++# ++CONFIG_XEN_BALLOON=y ++CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y ++CONFIG_XEN_SCRUB_PAGES_DEFAULT=y ++CONFIG_XEN_DEV_EVTCHN=y ++CONFIG_XEN_BACKEND=y ++CONFIG_XENFS=y ++CONFIG_XEN_COMPAT_XENFS=y ++CONFIG_XEN_SYS_HYPERVISOR=y ++CONFIG_XEN_XENBUS_FRONTEND=y ++CONFIG_XEN_GNTDEV=y ++CONFIG_XEN_GRANT_DEV_ALLOC=y ++# CONFIG_XEN_GRANT_DMA_ALLOC is not set ++CONFIG_SWIOTLB_XEN=y ++# CONFIG_XEN_PCIDEV_STUB is not set ++# CONFIG_XEN_PVCALLS_FRONTEND is not set ++# CONFIG_XEN_PVCALLS_BACKEND is not set ++CONFIG_XEN_PRIVCMD=y ++CONFIG_XEN_EFI=y ++CONFIG_XEN_AUTO_XLATE=y ++# CONFIG_XEN_VIRTIO is not set ++# end of Xen driver support ++ ++# CONFIG_GREYBUS is not set ++# CONFIG_COMEDI is not set ++CONFIG_STAGING=y ++# CONFIG_RTLLIB is not set ++# CONFIG_RTS5208 is not set ++ ++# ++# IIO staging drivers ++# ++ ++# ++# Accelerometers ++# ++# CONFIG_ADIS16203 is not set ++# CONFIG_ADIS16240 is not set ++# end of Accelerometers ++ ++# ++# Analog to digital converters ++# ++# CONFIG_AD7816 is not set ++# end of Analog to digital converters ++ ++# ++# Analog digital bi-direction converters ++# ++# CONFIG_ADT7316 is not set ++# end of Analog digital bi-direction converters ++ ++# ++# Direct Digital Synthesis ++# ++# CONFIG_AD9832 is not set ++# CONFIG_AD9834 is not set ++# end of Direct Digital Synthesis ++ ++# ++# Network Analyzer, Impedance Converters ++# ++# CONFIG_AD5933 is not set ++# end of Network Analyzer, Impedance Converters ++# end of IIO staging drivers ++ ++# CONFIG_FB_SM750 is not set ++# CONFIG_MFD_NVEC is not set ++CONFIG_STAGING_MEDIA=y ++# CONFIG_LTE_GDM724X is not set ++# CONFIG_FB_TFT is not set ++CONFIG_BCM_VIDEOCORE=y ++# CONFIG_BCM2835_VCHIQ is not set ++# CONFIG_SND_BCM2835 is not set ++# CONFIG_XIL_AXIS_FIFO is not set ++# CONFIG_FIELDBUS_DEV is not set ++# CONFIG_VME_BUS is not set ++# CONFIG_GOLDFISH is not set ++CONFIG_CHROME_PLATFORMS=y ++# CONFIG_CHROMEOS_ACPI is not set ++# CONFIG_CHROMEOS_TBMC is not set ++CONFIG_CROS_EC=y ++CONFIG_CROS_EC_I2C=y ++# CONFIG_CROS_EC_RPMSG is not set ++CONFIG_CROS_EC_SPI=y ++# CONFIG_CROS_EC_UART is not set ++CONFIG_CROS_EC_PROTO=y ++# CONFIG_CROS_KBD_LED_BACKLIGHT is not set ++# CONFIG_CROS_EC_CHARDEV is not set ++CONFIG_CROS_EC_LIGHTBAR=y ++CONFIG_CROS_EC_VBC=y ++CONFIG_CROS_EC_DEBUGFS=y ++CONFIG_CROS_EC_SENSORHUB=y ++CONFIG_CROS_EC_SYSFS=y ++# CONFIG_CROS_HPS_I2C is not set ++CONFIG_CROS_USBPD_NOTIFY=y ++# CONFIG_CHROMEOS_PRIVACY_SCREEN is not set ++# CONFIG_CZNIC_PLATFORMS is not set ++# CONFIG_MELLANOX_PLATFORM is not set ++CONFIG_SURFACE_PLATFORMS=y ++# CONFIG_SURFACE_3_POWER_OPREGION is not set ++# CONFIG_SURFACE_GPE is not set ++# CONFIG_SURFACE_HOTPLUG is not set ++# CONFIG_SURFACE_PRO3_BUTTON is not set ++# CONFIG_SURFACE_AGGREGATOR is not set ++CONFIG_ARM64_PLATFORM_DEVICES=y ++# CONFIG_EC_ACER_ASPIRE1 is not set ++# CONFIG_EC_LENOVO_YOGA_C630 is not set ++CONFIG_HAVE_CLK=y ++CONFIG_HAVE_CLK_PREPARE=y ++CONFIG_COMMON_CLK=y ++ ++# ++# Clock driver for ARM Reference designs ++# ++# CONFIG_CLK_ICST is not set ++# CONFIG_CLK_SP810 is not set ++CONFIG_CLK_VEXPRESS_OSC=y ++# end of Clock driver for ARM Reference designs ++ ++# CONFIG_LMK04832 is not set ++CONFIG_COMMON_CLK_APPLE_NCO=y ++# CONFIG_COMMON_CLK_MAX77686 is not set ++# CONFIG_COMMON_CLK_MAX9485 is not set ++CONFIG_COMMON_CLK_RK808=y ++CONFIG_COMMON_CLK_HI655X=y ++CONFIG_COMMON_CLK_SCMI=y ++CONFIG_COMMON_CLK_SCPI=y ++# CONFIG_COMMON_CLK_SI5341 is not set ++# CONFIG_COMMON_CLK_SI5351 is not set ++# CONFIG_COMMON_CLK_SI514 is not set ++# CONFIG_COMMON_CLK_SI544 is not set ++# CONFIG_COMMON_CLK_SI570 is not set ++# CONFIG_COMMON_CLK_CDCE706 is not set ++# CONFIG_COMMON_CLK_CDCE925 is not set ++CONFIG_COMMON_CLK_CS2000_CP=y ++CONFIG_COMMON_CLK_FSL_FLEXSPI=y ++CONFIG_COMMON_CLK_FSL_SAI=y ++CONFIG_COMMON_CLK_S2MPS11=y ++# CONFIG_COMMON_CLK_AXI_CLKGEN is not set ++CONFIG_CLK_QORIQ=y ++CONFIG_CLK_LS1028A_PLLDIG=y ++CONFIG_COMMON_CLK_XGENE=y ++CONFIG_COMMON_CLK_PWM=y ++CONFIG_COMMON_CLK_RS9_PCIE=y ++# CONFIG_COMMON_CLK_SI521XX is not set ++# CONFIG_COMMON_CLK_VC3 is not set ++CONFIG_COMMON_CLK_VC5=y ++# CONFIG_COMMON_CLK_VC7 is not set ++# CONFIG_COMMON_CLK_BD718XX is not set ++# CONFIG_COMMON_CLK_FIXED_MMIO is not set ++CONFIG_CLK_ACTIONS=y ++CONFIG_CLK_OWL_S500=y ++CONFIG_CLK_OWL_S700=y ++CONFIG_CLK_OWL_S900=y ++CONFIG_CLK_BCM2711_DVP=y ++CONFIG_CLK_BCM2835=y ++CONFIG_CLK_BCM_63XX=y ++CONFIG_COMMON_CLK_IPROC=y ++CONFIG_CLK_BCM_NS2=y ++CONFIG_CLK_BCM_SR=y ++# CONFIG_CLK_RASPBERRYPI is not set ++CONFIG_COMMON_CLK_HI3516CV300=y ++CONFIG_COMMON_CLK_HI3519=y ++CONFIG_COMMON_CLK_HI3559A=y ++CONFIG_COMMON_CLK_HI3660=y ++CONFIG_COMMON_CLK_HI3670=y ++CONFIG_COMMON_CLK_HI3798CV200=y ++CONFIG_COMMON_CLK_HI6220=y ++CONFIG_RESET_HISI=y ++CONFIG_STUB_CLK_HI6220=y ++CONFIG_STUB_CLK_HI3660=y ++CONFIG_MXC_CLK=y ++CONFIG_MXC_CLK_SCU=y ++CONFIG_CLK_IMX8MM=y ++CONFIG_CLK_IMX8MN=y ++CONFIG_CLK_IMX8MP=y ++CONFIG_CLK_IMX8MQ=y ++CONFIG_CLK_IMX8QXP=y ++CONFIG_CLK_IMX8ULP=y ++CONFIG_CLK_IMX93=y ++# CONFIG_CLK_IMX95_BLK_CTL is not set ++CONFIG_TI_SCI_CLK=y ++# CONFIG_TI_SCI_CLK_PROBE_FROM_FW is not set ++CONFIG_TI_SYSCON_CLK=y ++ ++# ++# Clock driver for MediaTek SoC ++# ++CONFIG_COMMON_CLK_MEDIATEK=y ++CONFIG_COMMON_CLK_MEDIATEK_FHCTL=y ++CONFIG_COMMON_CLK_MT2712=y ++# CONFIG_COMMON_CLK_MT2712_BDPSYS is not set ++# CONFIG_COMMON_CLK_MT2712_IMGSYS is not set ++# CONFIG_COMMON_CLK_MT2712_JPGDECSYS is not set ++# CONFIG_COMMON_CLK_MT2712_MFGCFG is not set ++# CONFIG_COMMON_CLK_MT2712_MMSYS is not set ++# CONFIG_COMMON_CLK_MT2712_VDECSYS is not set ++# CONFIG_COMMON_CLK_MT2712_VENCSYS is not set ++CONFIG_COMMON_CLK_MT6765=y ++# CONFIG_COMMON_CLK_MT6765_AUDIOSYS is not set ++# CONFIG_COMMON_CLK_MT6765_CAMSYS is not set ++# CONFIG_COMMON_CLK_MT6765_GCESYS is not set ++# CONFIG_COMMON_CLK_MT6765_MMSYS is not set ++# CONFIG_COMMON_CLK_MT6765_IMGSYS is not set ++# CONFIG_COMMON_CLK_MT6765_VCODECSYS is not set ++# CONFIG_COMMON_CLK_MT6765_MFGSYS is not set ++# CONFIG_COMMON_CLK_MT6765_MIPI0ASYS is not set ++# CONFIG_COMMON_CLK_MT6765_MIPI0BSYS is not set ++# CONFIG_COMMON_CLK_MT6765_MIPI1ASYS is not set ++# CONFIG_COMMON_CLK_MT6765_MIPI1BSYS is not set ++# CONFIG_COMMON_CLK_MT6765_MIPI2ASYS is not set ++# CONFIG_COMMON_CLK_MT6765_MIPI2BSYS is not set ++CONFIG_COMMON_CLK_MT6779=y ++# CONFIG_COMMON_CLK_MT6779_MMSYS is not set ++# CONFIG_COMMON_CLK_MT6779_IMGSYS is not set ++# CONFIG_COMMON_CLK_MT6779_IPESYS is not set ++# CONFIG_COMMON_CLK_MT6779_CAMSYS is not set ++# CONFIG_COMMON_CLK_MT6779_VDECSYS is not set ++# CONFIG_COMMON_CLK_MT6779_VENCSYS is not set ++# CONFIG_COMMON_CLK_MT6779_MFGCFG is not set ++# CONFIG_COMMON_CLK_MT6779_AUDSYS is not set ++CONFIG_COMMON_CLK_MT6795=y ++CONFIG_COMMON_CLK_MT6795_MFGCFG=y ++CONFIG_COMMON_CLK_MT6795_MMSYS=y ++CONFIG_COMMON_CLK_MT6795_VDECSYS=y ++CONFIG_COMMON_CLK_MT6795_VENCSYS=y ++CONFIG_COMMON_CLK_MT6797=y ++# CONFIG_COMMON_CLK_MT6797_MMSYS is not set ++# CONFIG_COMMON_CLK_MT6797_IMGSYS is not set ++# CONFIG_COMMON_CLK_MT6797_VDECSYS is not set ++# CONFIG_COMMON_CLK_MT6797_VENCSYS is not set ++CONFIG_COMMON_CLK_MT7622=y ++# CONFIG_COMMON_CLK_MT7622_ETHSYS is not set ++# CONFIG_COMMON_CLK_MT7622_HIFSYS is not set ++# CONFIG_COMMON_CLK_MT7622_AUDSYS is not set ++CONFIG_COMMON_CLK_MT7981=y ++CONFIG_COMMON_CLK_MT7981_ETHSYS=y ++CONFIG_COMMON_CLK_MT7986=y ++CONFIG_COMMON_CLK_MT7986_ETHSYS=y ++CONFIG_COMMON_CLK_MT7988=y ++CONFIG_COMMON_CLK_MT8167=y ++CONFIG_COMMON_CLK_MT8167_AUDSYS=y ++CONFIG_COMMON_CLK_MT8167_IMGSYS=y ++CONFIG_COMMON_CLK_MT8167_MFGCFG=y ++CONFIG_COMMON_CLK_MT8167_MMSYS=y ++CONFIG_COMMON_CLK_MT8167_VDECSYS=y ++CONFIG_COMMON_CLK_MT8173=y ++CONFIG_COMMON_CLK_MT8173_IMGSYS=y ++CONFIG_COMMON_CLK_MT8173_MMSYS=y ++CONFIG_COMMON_CLK_MT8173_VDECSYS=y ++CONFIG_COMMON_CLK_MT8173_VENCSYS=y ++CONFIG_COMMON_CLK_MT8183=y ++CONFIG_COMMON_CLK_MT8183_AUDIOSYS=y ++CONFIG_COMMON_CLK_MT8183_CAMSYS=y ++CONFIG_COMMON_CLK_MT8183_IMGSYS=y ++CONFIG_COMMON_CLK_MT8183_IPU_CORE0=y ++CONFIG_COMMON_CLK_MT8183_IPU_CORE1=y ++CONFIG_COMMON_CLK_MT8183_IPU_ADL=y ++CONFIG_COMMON_CLK_MT8183_IPU_CONN=y ++CONFIG_COMMON_CLK_MT8183_MFGCFG=y ++CONFIG_COMMON_CLK_MT8183_MMSYS=y ++CONFIG_COMMON_CLK_MT8183_VDECSYS=y ++CONFIG_COMMON_CLK_MT8183_VENCSYS=y ++CONFIG_COMMON_CLK_MT8186=y ++CONFIG_COMMON_CLK_MT8186_CAMSYS=y ++CONFIG_COMMON_CLK_MT8186_IMGSYS=y ++CONFIG_COMMON_CLK_MT8186_IPESYS=y ++CONFIG_COMMON_CLK_MT8186_WPESYS=y ++CONFIG_COMMON_CLK_MT8186_IMP_IIC_WRAP=y ++CONFIG_COMMON_CLK_MT8186_MCUSYS=y ++CONFIG_COMMON_CLK_MT8186_MDPSYS=y ++CONFIG_COMMON_CLK_MT8186_MFGCFG=y ++CONFIG_COMMON_CLK_MT8186_MMSYS=y ++CONFIG_COMMON_CLK_MT8186_VDECSYS=y ++CONFIG_COMMON_CLK_MT8186_VENCSYS=y ++CONFIG_COMMON_CLK_MT8188=y ++CONFIG_COMMON_CLK_MT8188_ADSP_AUDIO26M=y ++CONFIG_COMMON_CLK_MT8188_CAMSYS=y ++CONFIG_COMMON_CLK_MT8188_IMGSYS=y ++CONFIG_COMMON_CLK_MT8188_IMP_IIC_WRAP=y ++CONFIG_COMMON_CLK_MT8188_IPESYS=y ++CONFIG_COMMON_CLK_MT8188_MFGCFG=y ++CONFIG_COMMON_CLK_MT8188_VDECSYS=y ++CONFIG_COMMON_CLK_MT8188_VDOSYS=y ++CONFIG_COMMON_CLK_MT8188_VENCSYS=y ++CONFIG_COMMON_CLK_MT8188_VPPSYS=y ++CONFIG_COMMON_CLK_MT8188_WPESYS=y ++CONFIG_COMMON_CLK_MT8192=y ++CONFIG_COMMON_CLK_MT8192_AUDSYS=y ++CONFIG_COMMON_CLK_MT8192_CAMSYS=y ++CONFIG_COMMON_CLK_MT8192_IMGSYS=y ++CONFIG_COMMON_CLK_MT8192_IMP_IIC_WRAP=y ++CONFIG_COMMON_CLK_MT8192_IPESYS=y ++CONFIG_COMMON_CLK_MT8192_MDPSYS=y ++CONFIG_COMMON_CLK_MT8192_MFGCFG=y ++CONFIG_COMMON_CLK_MT8192_MMSYS=y ++CONFIG_COMMON_CLK_MT8192_MSDC=y ++CONFIG_COMMON_CLK_MT8192_SCP_ADSP=y ++CONFIG_COMMON_CLK_MT8192_VDECSYS=y ++CONFIG_COMMON_CLK_MT8192_VENCSYS=y ++CONFIG_COMMON_CLK_MT8195=y ++CONFIG_COMMON_CLK_MT8195_APUSYS=y ++CONFIG_COMMON_CLK_MT8195_AUDSYS=y ++CONFIG_COMMON_CLK_MT8195_IMP_IIC_WRAP=y ++CONFIG_COMMON_CLK_MT8195_MFGCFG=y ++CONFIG_COMMON_CLK_MT8195_MSDC=y ++CONFIG_COMMON_CLK_MT8195_SCP_ADSP=y ++CONFIG_COMMON_CLK_MT8195_VDOSYS=y ++CONFIG_COMMON_CLK_MT8195_VPPSYS=y ++CONFIG_COMMON_CLK_MT8195_CAMSYS=y ++CONFIG_COMMON_CLK_MT8195_IMGSYS=y ++CONFIG_COMMON_CLK_MT8195_IPESYS=y ++CONFIG_COMMON_CLK_MT8195_WPESYS=y ++CONFIG_COMMON_CLK_MT8195_VDECSYS=y ++CONFIG_COMMON_CLK_MT8195_VENCSYS=y ++CONFIG_COMMON_CLK_MT8365=y ++CONFIG_COMMON_CLK_MT8365_APU=y ++CONFIG_COMMON_CLK_MT8365_CAM=y ++CONFIG_COMMON_CLK_MT8365_MFG=y ++CONFIG_COMMON_CLK_MT8365_MMSYS=y ++CONFIG_COMMON_CLK_MT8365_VDEC=y ++CONFIG_COMMON_CLK_MT8365_VENC=y ++CONFIG_COMMON_CLK_MT8516=y ++# CONFIG_COMMON_CLK_MT8516_AUDSYS is not set ++# end of Clock driver for MediaTek SoC ++ ++# ++# Clock support for Amlogic platforms ++# ++CONFIG_COMMON_CLK_MESON_REGMAP=y ++CONFIG_COMMON_CLK_MESON_DUALDIV=y ++CONFIG_COMMON_CLK_MESON_MPLL=y ++CONFIG_COMMON_CLK_MESON_PLL=y ++CONFIG_COMMON_CLK_MESON_VID_PLL_DIV=y ++CONFIG_COMMON_CLK_MESON_VCLK=y ++CONFIG_COMMON_CLK_MESON_CLKC_UTILS=y ++CONFIG_COMMON_CLK_MESON_AO_CLKC=y ++CONFIG_COMMON_CLK_MESON_EE_CLKC=y ++CONFIG_COMMON_CLK_MESON_CPU_DYNDIV=y ++CONFIG_COMMON_CLK_GXBB=y ++CONFIG_COMMON_CLK_AXG=y ++# CONFIG_COMMON_CLK_AXG_AUDIO is not set ++# CONFIG_COMMON_CLK_A1_PLL is not set ++# CONFIG_COMMON_CLK_A1_PERIPHERALS is not set ++CONFIG_COMMON_CLK_C3_PLL=y ++CONFIG_COMMON_CLK_C3_PERIPHERALS=y ++CONFIG_COMMON_CLK_G12A=y ++CONFIG_COMMON_CLK_S4_PLL=y ++CONFIG_COMMON_CLK_S4_PERIPHERALS=y ++# end of Clock support for Amlogic platforms ++ ++CONFIG_ARMADA_AP_CP_HELPER=y ++CONFIG_ARMADA_37XX_CLK=y ++CONFIG_ARMADA_AP806_SYSCON=y ++CONFIG_ARMADA_CP110_SYSCON=y ++CONFIG_COMMON_CLK_NUVOTON=y ++CONFIG_CLK_MA35D1=y ++CONFIG_QCOM_GDSC=y ++CONFIG_COMMON_CLK_QCOM=y ++# CONFIG_CLK_X1E80100_CAMCC is not set ++# CONFIG_CLK_X1E80100_DISPCC is not set ++# CONFIG_CLK_X1E80100_GCC is not set ++# CONFIG_CLK_X1E80100_GPUCC is not set ++# CONFIG_CLK_X1E80100_TCSRCC is not set ++# CONFIG_CLK_QCM2290_GPUCC is not set ++CONFIG_QCOM_A53PLL=y ++# CONFIG_QCOM_A7PLL is not set ++CONFIG_QCOM_CLK_APCS_MSM8916=y ++CONFIG_QCOM_CLK_APCC_MSM8996=y ++CONFIG_QCOM_CLK_SMD_RPM=y ++CONFIG_QCOM_CLK_RPMH=y ++CONFIG_IPQ_APSS_PLL=y ++CONFIG_IPQ_APSS_6018=y ++# CONFIG_IPQ_GCC_4019 is not set ++CONFIG_IPQ_GCC_5018=y ++CONFIG_IPQ_GCC_5332=y ++CONFIG_IPQ_GCC_6018=y ++CONFIG_IPQ_GCC_8074=y ++CONFIG_IPQ_GCC_9574=y ++# CONFIG_IPQ_NSSCC_QCA8K is not set ++CONFIG_MSM_GCC_8916=y ++# CONFIG_MSM_GCC_8917 is not set ++# CONFIG_MSM_GCC_8939 is not set ++# CONFIG_MSM_GCC_8953 is not set ++# CONFIG_MSM_GCC_8976 is not set ++# CONFIG_MSM_MMCC_8994 is not set ++CONFIG_MSM_GCC_8994=y ++CONFIG_MSM_GCC_8996=y ++# CONFIG_MSM_MMCC_8996 is not set ++CONFIG_MSM_GCC_8998=y ++# CONFIG_MSM_GPUCC_8998 is not set ++# CONFIG_MSM_MMCC_8998 is not set ++CONFIG_QCM_GCC_2290=y ++# CONFIG_QCM_DISPCC_2290 is not set ++CONFIG_QCS_GCC_404=y ++# CONFIG_SC_CAMCC_7180 is not set ++# CONFIG_SC_CAMCC_7280 is not set ++# CONFIG_SC_CAMCC_8280XP is not set ++# CONFIG_SC_DISPCC_7180 is not set ++# CONFIG_SC_DISPCC_7280 is not set ++# CONFIG_SC_DISPCC_8280XP is not set ++CONFIG_SA_GCC_8775P=y ++# CONFIG_SA_GPUCC_8775P is not set ++CONFIG_SC_GCC_7180=y ++CONFIG_SC_GCC_7280=y ++CONFIG_SC_GCC_8180X=y ++CONFIG_SC_GCC_8280XP=y ++# CONFIG_SC_GPUCC_7180 is not set ++# CONFIG_SC_GPUCC_7280 is not set ++# CONFIG_SC_GPUCC_8280XP is not set ++# CONFIG_SC_LPASSCC_7280 is not set ++# CONFIG_SC_LPASSCC_8280XP is not set ++# CONFIG_SC_LPASS_CORECC_7180 is not set ++# CONFIG_SC_LPASS_CORECC_7280 is not set ++# CONFIG_SC_VIDEOCC_7180 is not set ++# CONFIG_SC_VIDEOCC_7280 is not set ++# CONFIG_SDM_CAMCC_845 is not set ++# CONFIG_SDM_GCC_660 is not set ++# CONFIG_SDM_MMCC_660 is not set ++# CONFIG_SDM_GPUCC_660 is not set ++# CONFIG_QCS_TURING_404 is not set ++# CONFIG_QCS_Q6SSTOP_404 is not set ++# CONFIG_QDU_GCC_1000 is not set ++# CONFIG_QDU_ECPRICC_1000 is not set ++CONFIG_SDM_GCC_845=y ++CONFIG_SDM_GPUCC_845=y ++CONFIG_SDM_VIDEOCC_845=y ++CONFIG_SDM_DISPCC_845=y ++# CONFIG_SDM_LPASSCC_845 is not set ++# CONFIG_SDX_GCC_75 is not set ++# CONFIG_SM_CAMCC_4450 is not set ++# CONFIG_SM_CAMCC_6350 is not set ++# CONFIG_SM_CAMCC_7150 is not set ++# CONFIG_SM_CAMCC_8150 is not set ++# CONFIG_SM_CAMCC_8250 is not set ++# CONFIG_SM_CAMCC_8450 is not set ++# CONFIG_SM_CAMCC_8550 is not set ++# CONFIG_SM_CAMCC_8650 is not set ++# CONFIG_SM_DISPCC_6115 is not set ++CONFIG_SM_DISPCC_8250=y ++# CONFIG_SM_DISPCC_8450 is not set ++# CONFIG_SM_DISPCC_8550 is not set ++# CONFIG_SM_GCC_4450 is not set ++CONFIG_SM_GCC_6115=y ++# CONFIG_SM_GCC_6125 is not set ++# CONFIG_SM_GCC_6350 is not set ++# CONFIG_SM_GCC_6375 is not set ++# CONFIG_SM_GCC_7150 is not set ++CONFIG_SM_GCC_8150=y ++CONFIG_SM_GCC_8250=y ++CONFIG_SM_GCC_8350=y ++CONFIG_SM_GCC_8450=y ++CONFIG_SM_GCC_8550=y ++# CONFIG_SM_GCC_8650 is not set ++# CONFIG_SM_GPUCC_4450 is not set ++# CONFIG_SM_GPUCC_6115 is not set ++# CONFIG_SM_GPUCC_6125 is not set ++# CONFIG_SM_GPUCC_6375 is not set ++# CONFIG_SM_GPUCC_6350 is not set ++CONFIG_SM_GPUCC_8150=y ++CONFIG_SM_GPUCC_8250=y ++# CONFIG_SM_GPUCC_8350 is not set ++# CONFIG_SM_GPUCC_8450 is not set ++# CONFIG_SM_GPUCC_8550 is not set ++# CONFIG_SM_GPUCC_8650 is not set ++CONFIG_SM_TCSRCC_8550=y ++# CONFIG_SM_TCSRCC_8650 is not set ++# CONFIG_SM_VIDEOCC_7150 is not set ++# CONFIG_SM_VIDEOCC_8150 is not set ++CONFIG_SM_VIDEOCC_8250=y ++# CONFIG_SM_VIDEOCC_8350 is not set ++# CONFIG_SM_VIDEOCC_8550 is not set ++# CONFIG_SPMI_PMIC_CLKDIV is not set ++CONFIG_QCOM_HFPLL=y ++# CONFIG_KPSS_XCC is not set ++# CONFIG_CLK_GFM_LPASS_SM8250 is not set ++# CONFIG_SM_VIDEOCC_8450 is not set ++CONFIG_CLK_RENESAS=y ++CONFIG_CLK_R8A774A1=y ++CONFIG_CLK_R8A774B1=y ++CONFIG_CLK_R8A774C0=y ++CONFIG_CLK_R8A774E1=y ++CONFIG_CLK_R8A7795=y ++CONFIG_CLK_R8A77960=y ++CONFIG_CLK_R8A77961=y ++CONFIG_CLK_R8A77965=y ++CONFIG_CLK_R8A77970=y ++CONFIG_CLK_R8A77980=y ++CONFIG_CLK_R8A77990=y ++CONFIG_CLK_R8A77995=y ++CONFIG_CLK_R8A779A0=y ++CONFIG_CLK_R8A779F0=y ++CONFIG_CLK_R8A779G0=y ++CONFIG_CLK_R9A07G043=y ++CONFIG_CLK_R9A07G044=y ++CONFIG_CLK_R9A07G054=y ++CONFIG_CLK_R9A09G011=y ++CONFIG_CLK_RCAR_CPG_LIB=y ++CONFIG_CLK_RCAR_GEN3_CPG=y ++CONFIG_CLK_RCAR_GEN4_CPG=y ++CONFIG_CLK_RCAR_USB2_CLOCK_SEL=y ++CONFIG_CLK_RZG2L=y ++CONFIG_CLK_RENESAS_CPG_MSSR=y ++CONFIG_CLK_RENESAS_DIV6=y ++CONFIG_COMMON_CLK_ROCKCHIP=y ++CONFIG_CLK_PX30=y ++CONFIG_CLK_RK3308=y ++CONFIG_CLK_RK3328=y ++CONFIG_CLK_RK3368=y ++CONFIG_CLK_RK3399=y ++CONFIG_CLK_RK3568=y ++CONFIG_CLK_RK3576=y ++CONFIG_CLK_RK3588=y ++CONFIG_COMMON_CLK_SAMSUNG=y ++CONFIG_EXYNOS_ARM64_COMMON_CLK=y ++CONFIG_EXYNOS_AUDSS_CLK_CON=y ++CONFIG_EXYNOS_CLKOUT=y ++CONFIG_TESLA_FSD_COMMON_CLK=y ++CONFIG_CLK_INTEL_SOCFPGA=y ++CONFIG_CLK_INTEL_SOCFPGA64=y ++CONFIG_SPRD_COMMON_CLK=y ++CONFIG_SPRD_SC9860_CLK=y ++CONFIG_SPRD_SC9863A_CLK=y ++CONFIG_SPRD_UMS512_CLK=y ++CONFIG_SUNXI_CCU=y ++CONFIG_SUN50I_A64_CCU=y ++CONFIG_SUN50I_A100_CCU=y ++CONFIG_SUN50I_A100_R_CCU=y ++CONFIG_SUN50I_H6_CCU=y ++CONFIG_SUN50I_H616_CCU=y ++CONFIG_SUN50I_H6_R_CCU=y ++CONFIG_SUN6I_RTC_CCU=y ++CONFIG_SUN8I_H3_CCU=y ++CONFIG_SUN8I_DE2_CCU=y ++CONFIG_SUN8I_R_CCU=y ++CONFIG_CLK_TEGRA_BPMP=y ++CONFIG_TEGRA_CLK_DFLL=y ++CONFIG_COMMON_CLK_STM32MP=y ++CONFIG_COMMON_CLK_STM32MP257=y ++CONFIG_CLK_UNIPHIER=y ++CONFIG_COMMON_CLK_VISCONTI=y ++# CONFIG_XILINX_VCU is not set ++# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set ++CONFIG_COMMON_CLK_ZYNQMP=y ++CONFIG_HWSPINLOCK=y ++# CONFIG_HWSPINLOCK_OMAP is not set ++CONFIG_HWSPINLOCK_QCOM=y ++# CONFIG_HWSPINLOCK_SPRD is not set ++# CONFIG_HWSPINLOCK_SUN6I is not set ++ ++# ++# Clock Source drivers ++# ++CONFIG_TIMER_OF=y ++CONFIG_TIMER_ACPI=y ++CONFIG_TIMER_PROBE=y ++CONFIG_CLKSRC_MMIO=y ++CONFIG_OMAP_DM_TIMER=y ++CONFIG_DW_APB_TIMER=y ++CONFIG_DW_APB_TIMER_OF=y ++CONFIG_ROCKCHIP_TIMER=y ++CONFIG_OWL_TIMER=y ++CONFIG_SUN4I_TIMER=y ++CONFIG_TEGRA_TIMER=y ++CONFIG_TEGRA186_TIMER=y ++CONFIG_NPCM7XX_TIMER=y ++CONFIG_ARM_ARCH_TIMER=y ++CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y ++CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y ++CONFIG_FSL_ERRATUM_A008585=y ++CONFIG_HISILICON_ERRATUM_161010101=y ++CONFIG_ARM64_ERRATUM_858921=y ++CONFIG_SUN50I_ERRATUM_UNKNOWN1=y ++CONFIG_ARM_TIMER_SP804=y ++CONFIG_CLKSRC_EXYNOS_MCT=y ++CONFIG_SYS_SUPPORTS_SH_CMT=y ++CONFIG_MTK_TIMER=y ++CONFIG_MTK_CPUX_TIMER=y ++CONFIG_SPRD_TIMER=y ++CONFIG_SYS_SUPPORTS_SH_TMU=y ++CONFIG_SH_TIMER_CMT=y ++CONFIG_RENESAS_OSTM=y ++CONFIG_SH_TIMER_TMU=y ++CONFIG_TIMER_IMX_SYS_CTR=y ++# end of Clock Source drivers ++ ++CONFIG_MAILBOX=y ++CONFIG_ARM_MHU=y ++# CONFIG_ARM_MHU_V2 is not set ++# CONFIG_ARM_MHU_V3 is not set ++CONFIG_IMX_MBOX=y ++CONFIG_PLATFORM_MHU=y ++# CONFIG_PL320_MBOX is not set ++# CONFIG_ARMADA_37XX_RWTM_MBOX is not set ++# CONFIG_OMAP2PLUS_MBOX is not set ++# CONFIG_ROCKCHIP_MBOX is not set ++CONFIG_PCC=y ++# CONFIG_ALTERA_MBOX is not set ++CONFIG_BCM2835_MBOX=y ++CONFIG_TI_MESSAGE_MANAGER=y ++CONFIG_HI3660_MBOX=y ++CONFIG_HI6220_MBOX=y ++# CONFIG_MAILBOX_TEST is not set ++CONFIG_QCOM_APCS_IPC=y ++CONFIG_TEGRA_HSP_MBOX=y ++# CONFIG_XGENE_SLIMPRO_MBOX is not set ++# CONFIG_BCM_PDC_MBOX is not set ++# CONFIG_BCM_FLEXRM_MBOX is not set ++# CONFIG_MTK_ADSP_MBOX is not set ++# CONFIG_MTK_CMDQ_MBOX is not set ++CONFIG_ZYNQMP_IPI_MBOX=y ++CONFIG_SUN6I_MSGBOX=y ++# CONFIG_SPRD_MBOX is not set ++# CONFIG_QCOM_CPUCP_MBOX is not set ++CONFIG_QCOM_IPCC=y ++CONFIG_IOMMU_IOVA=y ++CONFIG_IOMMU_API=y ++CONFIG_IOMMU_SUPPORT=y ++ ++# ++# Generic IOMMU Pagetable Support ++# ++CONFIG_IOMMU_IO_PGTABLE=y ++CONFIG_IOMMU_IO_PGTABLE_LPAE=y ++# CONFIG_IOMMU_IO_PGTABLE_LPAE_SELFTEST is not set ++CONFIG_IOMMU_IO_PGTABLE_ARMV7S=y ++# CONFIG_IOMMU_IO_PGTABLE_ARMV7S_SELFTEST is not set ++CONFIG_IOMMU_IO_PGTABLE_DART=y ++# end of Generic IOMMU Pagetable Support ++ ++# CONFIG_IOMMU_DEBUGFS is not set ++CONFIG_IOMMU_DEFAULT_DMA_STRICT=y ++# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set ++# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set ++CONFIG_OF_IOMMU=y ++CONFIG_IOMMU_DMA=y ++# CONFIG_IOMMUFD is not set ++CONFIG_ROCKCHIP_IOMMU=y ++# CONFIG_SUN50I_IOMMU is not set ++CONFIG_TEGRA_IOMMU_SMMU=y ++# CONFIG_EXYNOS_IOMMU is not set ++# CONFIG_IPMMU_VMSA is not set ++CONFIG_APPLE_DART=y ++CONFIG_ARM_SMMU=y ++# CONFIG_ARM_SMMU_LEGACY_DT_BINDINGS is not set ++CONFIG_ARM_SMMU_DISABLE_BYPASS_BY_DEFAULT=y ++CONFIG_ARM_SMMU_QCOM=y ++# CONFIG_ARM_SMMU_QCOM_DEBUG is not set ++CONFIG_ARM_SMMU_V3=y ++# CONFIG_ARM_SMMU_V3_SVA is not set ++# CONFIG_TEGRA241_CMDQV is not set ++CONFIG_MTK_IOMMU=y ++CONFIG_QCOM_IOMMU=y ++# CONFIG_VIRTIO_IOMMU is not set ++# CONFIG_SPRD_IOMMU is not set ++ ++# ++# Remoteproc drivers ++# ++CONFIG_REMOTEPROC=y ++# CONFIG_REMOTEPROC_CDEV is not set ++CONFIG_IMX_REMOTEPROC=y ++# CONFIG_IMX_DSP_REMOTEPROC is not set ++# CONFIG_MTK_SCP is not set ++# CONFIG_QCOM_Q6V5_ADSP is not set ++# CONFIG_QCOM_Q6V5_MSS is not set ++# CONFIG_QCOM_Q6V5_PAS is not set ++# CONFIG_QCOM_Q6V5_WCSS is not set ++# CONFIG_QCOM_SYSMON is not set ++# CONFIG_QCOM_WCNSS_PIL is not set ++# CONFIG_RCAR_REMOTEPROC is not set ++# CONFIG_STM32_RPROC is not set ++# CONFIG_TI_K3_M4_REMOTEPROC is not set ++# CONFIG_XLNX_R5_REMOTEPROC is not set ++# end of Remoteproc drivers ++ ++# ++# Rpmsg drivers ++# ++CONFIG_RPMSG=y ++# CONFIG_RPMSG_CHAR is not set ++# CONFIG_RPMSG_CTRL is not set ++CONFIG_RPMSG_NS=y ++CONFIG_RPMSG_QCOM_GLINK=y ++CONFIG_RPMSG_QCOM_GLINK_RPM=y ++# CONFIG_RPMSG_QCOM_GLINK_SMEM is not set ++CONFIG_RPMSG_QCOM_SMD=y ++CONFIG_RPMSG_VIRTIO=y ++# end of Rpmsg drivers ++ ++# CONFIG_SOUNDWIRE is not set ++ ++# ++# SOC (System On Chip) specific Drivers ++# ++ ++# ++# Amlogic SoC drivers ++# ++# CONFIG_MESON_CANVAS is not set ++CONFIG_MESON_CLK_MEASURE=y ++CONFIG_MESON_GX_SOCINFO=y ++# end of Amlogic SoC drivers ++ ++# ++# Apple SoC drivers ++# ++CONFIG_APPLE_MAILBOX=y ++CONFIG_APPLE_RTKIT=y ++CONFIG_APPLE_SART=y ++# end of Apple SoC drivers ++ ++# ++# Broadcom SoC drivers ++# ++CONFIG_SOC_BRCMSTB=y ++# end of Broadcom SoC drivers ++ ++# ++# NXP/Freescale QorIQ SoC drivers ++# ++CONFIG_FSL_DPAA=y ++# CONFIG_FSL_DPAA_CHECKING is not set ++# CONFIG_FSL_BMAN_TEST is not set ++# CONFIG_FSL_QMAN_TEST is not set ++# CONFIG_QUICC_ENGINE is not set ++CONFIG_FSL_GUTS=y ++CONFIG_FSL_MC_DPIO=y ++CONFIG_DPAA2_CONSOLE=y ++CONFIG_FSL_RCPM=y ++# end of NXP/Freescale QorIQ SoC drivers ++ ++# ++# fujitsu SoC drivers ++# ++# CONFIG_A64FX_DIAG is not set ++# end of fujitsu SoC drivers ++ ++# ++# Hisilicon SoC drivers ++# ++# CONFIG_KUNPENG_HCCS is not set ++# end of Hisilicon SoC drivers ++ ++# ++# i.MX SoC drivers ++# ++CONFIG_SOC_IMX8M=y ++CONFIG_SOC_IMX9=y ++# end of i.MX SoC drivers ++ ++# ++# Enable LiteX SoC Builder specific drivers ++# ++# CONFIG_LITEX_SOC_CONTROLLER is not set ++# end of Enable LiteX SoC Builder specific drivers ++ ++# ++# MediaTek SoC drivers ++# ++# CONFIG_MTK_CMDQ is not set ++# CONFIG_MTK_DEVAPC is not set ++CONFIG_MTK_INFRACFG=y ++CONFIG_MTK_PMIC_WRAP=y ++CONFIG_MTK_REGULATOR_COUPLER=y ++# CONFIG_MTK_MMSYS is not set ++# CONFIG_MTK_SVS is not set ++CONFIG_MTK_SOCINFO=y ++# end of MediaTek SoC drivers ++ ++# CONFIG_WPCM450_SOC is not set ++ ++# ++# Qualcomm SoC drivers ++# ++CONFIG_QCOM_AOSS_QMP=y ++CONFIG_QCOM_COMMAND_DB=y ++CONFIG_QCOM_GENI_SE=y ++# CONFIG_QCOM_GSBI is not set ++# CONFIG_QCOM_LLCC is not set ++CONFIG_QCOM_KRYO_L2_ACCESSORS=y ++# CONFIG_QCOM_OCMEM is not set ++# CONFIG_QCOM_RAMP_CTRL is not set ++# CONFIG_QCOM_RMTFS_MEM is not set ++# CONFIG_QCOM_RPM_MASTER_STATS is not set ++CONFIG_QCOM_RPMH=y ++CONFIG_QCOM_SMEM=y ++CONFIG_QCOM_SMD_RPM=y ++CONFIG_QCOM_SMEM_STATE=y ++CONFIG_QCOM_SMP2P=y ++CONFIG_QCOM_SMSM=y ++# CONFIG_QCOM_SOCINFO is not set ++# CONFIG_QCOM_SPM is not set ++# CONFIG_QCOM_STATS is not set ++# CONFIG_QCOM_WCNSS_CTRL is not set ++# CONFIG_QCOM_APR is not set ++# CONFIG_QCOM_ICC_BWMON is not set ++# CONFIG_QCOM_PBS is not set ++# end of Qualcomm SoC drivers ++ ++CONFIG_SOC_RENESAS=y ++CONFIG_ARCH_RCAR_GEN3=y ++CONFIG_ARCH_RCAR_GEN4=y ++CONFIG_ARCH_RZG2L=y ++CONFIG_ARCH_R8A77995=y ++CONFIG_ARCH_R8A77990=y ++CONFIG_ARCH_R8A77951=y ++CONFIG_ARCH_R8A77965=y ++CONFIG_ARCH_R8A77960=y ++CONFIG_ARCH_R8A77961=y ++CONFIG_ARCH_R8A779F0=y ++CONFIG_ARCH_R8A77980=y ++CONFIG_ARCH_R8A77970=y ++CONFIG_ARCH_R8A779A0=y ++CONFIG_ARCH_R8A779G0=y ++# CONFIG_ARCH_R8A779H0 is not set ++CONFIG_ARCH_R8A774C0=y ++CONFIG_ARCH_R8A774E1=y ++CONFIG_ARCH_R8A774A1=y ++CONFIG_ARCH_R8A774B1=y ++CONFIG_ARCH_R9A07G043=y ++CONFIG_ARCH_R9A07G044=y ++CONFIG_ARCH_R9A07G054=y ++# CONFIG_ARCH_R9A08G045 is not set ++CONFIG_ARCH_R9A09G011=y ++# CONFIG_ARCH_R9A09G057 is not set ++CONFIG_PWC_RZV2M=y ++CONFIG_RST_RCAR=y ++CONFIG_ROCKCHIP_GRF=y ++CONFIG_ROCKCHIP_IODOMAIN=y ++CONFIG_SOC_SAMSUNG=y ++CONFIG_EXYNOS_CHIPID=y ++CONFIG_EXYNOS_USI=y ++CONFIG_EXYNOS_PMU=y ++CONFIG_SUNXI_MBUS=y ++CONFIG_SUNXI_SRAM=y ++CONFIG_ARCH_TEGRA_132_SOC=y ++CONFIG_ARCH_TEGRA_210_SOC=y ++CONFIG_ARCH_TEGRA_186_SOC=y ++CONFIG_ARCH_TEGRA_194_SOC=y ++CONFIG_ARCH_TEGRA_234_SOC=y ++# CONFIG_ARCH_TEGRA_241_SOC is not set ++CONFIG_SOC_TEGRA_FUSE=y ++CONFIG_SOC_TEGRA_FLOWCTRL=y ++CONFIG_SOC_TEGRA_PMC=y ++CONFIG_SOC_TEGRA_CBB=y ++CONFIG_SOC_TI=y ++CONFIG_TI_K3_RINGACC=y ++CONFIG_TI_K3_SOCINFO=y ++# CONFIG_TI_PRUSS is not set ++CONFIG_TI_SCI_INTA_MSI_DOMAIN=y ++ ++# ++# Xilinx SoC drivers ++# ++CONFIG_ZYNQMP_POWER=y ++CONFIG_XLNX_EVENT_MANAGER=y ++# end of Xilinx SoC drivers ++# end of SOC (System On Chip) specific Drivers ++ ++# ++# PM Domains ++# ++CONFIG_OWL_PM_DOMAINS_HELPER=y ++CONFIG_OWL_PM_DOMAINS=y ++ ++# ++# Amlogic PM Domains ++# ++CONFIG_MESON_EE_PM_DOMAINS=y ++CONFIG_MESON_SECURE_PM_DOMAINS=y ++# end of Amlogic PM Domains ++ ++CONFIG_APPLE_PMGR_PWRSTATE=y ++CONFIG_ARM_SCMI_PERF_DOMAIN=y ++CONFIG_ARM_SCMI_POWER_DOMAIN=y ++CONFIG_ARM_SCPI_POWER_DOMAIN=y ++ ++# ++# Broadcom PM Domains ++# ++CONFIG_BCM2835_POWER=y ++CONFIG_RASPBERRYPI_POWER=y ++CONFIG_BCM_PMB=y ++# end of Broadcom PM Domains ++ ++# ++# i.MX PM Domains ++# ++CONFIG_IMX_GPCV2_PM_DOMAINS=y ++CONFIG_IMX8M_BLK_CTRL=y ++CONFIG_IMX9_BLK_CTRL=y ++CONFIG_IMX_SCU_PD=y ++# end of i.MX PM Domains ++ ++# ++# MediaTek PM Domains ++# ++CONFIG_MTK_SCPSYS=y ++CONFIG_MTK_SCPSYS_PM_DOMAINS=y ++# end of MediaTek PM Domains ++ ++# ++# Qualcomm PM Domains ++# ++CONFIG_QCOM_CPR=y ++CONFIG_QCOM_RPMHPD=y ++CONFIG_QCOM_RPMPD=y ++# end of Qualcomm PM Domains ++ ++CONFIG_SYSC_RCAR=y ++CONFIG_SYSC_RCAR_GEN4=y ++CONFIG_SYSC_R8A77995=y ++CONFIG_SYSC_R8A77990=y ++CONFIG_SYSC_R8A7795=y ++CONFIG_SYSC_R8A77965=y ++CONFIG_SYSC_R8A77960=y ++CONFIG_SYSC_R8A77961=y ++CONFIG_SYSC_R8A779F0=y ++CONFIG_SYSC_R8A77980=y ++CONFIG_SYSC_R8A77970=y ++CONFIG_SYSC_R8A779A0=y ++CONFIG_SYSC_R8A779G0=y ++CONFIG_SYSC_R8A774C0=y ++CONFIG_SYSC_R8A774E1=y ++CONFIG_SYSC_R8A774A1=y ++CONFIG_SYSC_R8A774B1=y ++CONFIG_ROCKCHIP_PM_DOMAINS=y ++CONFIG_EXYNOS_PM_DOMAINS=y ++# CONFIG_SUN20I_PPU is not set ++CONFIG_SOC_TEGRA_POWERGATE_BPMP=y ++CONFIG_TI_SCI_PM_DOMAINS=y ++CONFIG_ZYNQMP_PM_DOMAINS=y ++# end of PM Domains ++ ++CONFIG_PM_DEVFREQ=y ++ ++# ++# DEVFREQ Governors ++# ++CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y ++# CONFIG_DEVFREQ_GOV_PERFORMANCE is not set ++# CONFIG_DEVFREQ_GOV_POWERSAVE is not set ++CONFIG_DEVFREQ_GOV_USERSPACE=y ++# CONFIG_DEVFREQ_GOV_PASSIVE is not set ++ ++# ++# DEVFREQ Drivers ++# ++# CONFIG_ARM_EXYNOS_BUS_DEVFREQ is not set ++CONFIG_ARM_IMX_BUS_DEVFREQ=y ++# CONFIG_ARM_IMX8M_DDRC_DEVFREQ is not set ++# CONFIG_ARM_TEGRA_DEVFREQ is not set ++# CONFIG_ARM_MEDIATEK_CCI_DEVFREQ is not set ++# CONFIG_ARM_RK3399_DMC_DEVFREQ is not set ++# CONFIG_ARM_SUN8I_A33_MBUS_DEVFREQ is not set ++# CONFIG_PM_DEVFREQ_EVENT is not set ++CONFIG_EXTCON=y ++ ++# ++# Extcon Device Drivers ++# ++# CONFIG_EXTCON_ADC_JACK is not set ++# CONFIG_EXTCON_FSA9480 is not set ++# CONFIG_EXTCON_GPIO is not set ++# CONFIG_EXTCON_LC824206XA is not set ++# CONFIG_EXTCON_MAX3355 is not set ++# CONFIG_EXTCON_PTN5150 is not set ++# CONFIG_EXTCON_QCOM_SPMI_MISC is not set ++# CONFIG_EXTCON_RT8973A is not set ++# CONFIG_EXTCON_SM5502 is not set ++CONFIG_EXTCON_USB_GPIO=y ++CONFIG_EXTCON_USBC_CROS_EC=y ++CONFIG_MEMORY=y ++# CONFIG_ARM_PL172_MPMC is not set ++CONFIG_BRCMSTB_DPFE=y ++CONFIG_BRCMSTB_MEMC=y ++# CONFIG_OMAP_GPMC is not set ++CONFIG_FSL_IFC=y ++CONFIG_MTK_SMI=y ++# CONFIG_RENESAS_RPCIF is not set ++# CONFIG_STM32_FMC2_EBI is not set ++CONFIG_TEGRA_MC=y ++# CONFIG_TEGRA210_EMC is not set ++CONFIG_IIO=y ++CONFIG_IIO_BUFFER=y ++# CONFIG_IIO_BUFFER_CB is not set ++# CONFIG_IIO_BUFFER_DMA is not set ++# CONFIG_IIO_BUFFER_DMAENGINE is not set ++# CONFIG_IIO_BUFFER_HW_CONSUMER is not set ++# CONFIG_IIO_KFIFO_BUF is not set ++# CONFIG_IIO_TRIGGERED_BUFFER is not set ++# CONFIG_IIO_CONFIGFS is not set ++CONFIG_IIO_TRIGGER=y ++CONFIG_IIO_CONSUMERS_PER_TRIGGER=2 ++# CONFIG_IIO_SW_DEVICE is not set ++# CONFIG_IIO_SW_TRIGGER is not set ++# CONFIG_IIO_TRIGGERED_EVENT is not set ++ ++# ++# Accelerometers ++# ++# CONFIG_ADIS16201 is not set ++# CONFIG_ADIS16209 is not set ++# CONFIG_ADXL313_I2C is not set ++# CONFIG_ADXL313_SPI is not set ++# CONFIG_ADXL345_I2C is not set ++# CONFIG_ADXL345_SPI is not set ++# CONFIG_ADXL355_I2C is not set ++# CONFIG_ADXL355_SPI is not set ++# CONFIG_ADXL367_SPI is not set ++# CONFIG_ADXL367_I2C is not set ++# CONFIG_ADXL372_SPI is not set ++# CONFIG_ADXL372_I2C is not set ++# CONFIG_ADXL380_SPI is not set ++# CONFIG_ADXL380_I2C is not set ++# CONFIG_BMA180 is not set ++# CONFIG_BMA220 is not set ++# CONFIG_BMA400 is not set ++# CONFIG_BMC150_ACCEL is not set ++# CONFIG_BMI088_ACCEL is not set ++# CONFIG_DA280 is not set ++# CONFIG_DA311 is not set ++# CONFIG_DMARD06 is not set ++# CONFIG_DMARD09 is not set ++# CONFIG_DMARD10 is not set ++# CONFIG_FXLS8962AF_I2C is not set ++# CONFIG_FXLS8962AF_SPI is not set ++# CONFIG_IIO_ST_ACCEL_3AXIS is not set ++# CONFIG_IIO_KX022A_SPI is not set ++# CONFIG_IIO_KX022A_I2C is not set ++# CONFIG_KXSD9 is not set ++# CONFIG_KXCJK1013 is not set ++# CONFIG_MC3230 is not set ++# CONFIG_MMA7455_I2C is not set ++# CONFIG_MMA7455_SPI is not set ++# CONFIG_MMA7660 is not set ++# CONFIG_MMA8452 is not set ++# CONFIG_MMA9551 is not set ++# CONFIG_MMA9553 is not set ++# CONFIG_MSA311 is not set ++# CONFIG_MXC4005 is not set ++# CONFIG_MXC6255 is not set ++# CONFIG_SCA3000 is not set ++# CONFIG_SCA3300 is not set ++# CONFIG_STK8312 is not set ++# CONFIG_STK8BA50 is not set ++# end of Accelerometers ++ ++# ++# Analog to digital converters ++# ++# CONFIG_AD4000 is not set ++# CONFIG_AD4130 is not set ++# CONFIG_AD4695 is not set ++# CONFIG_AD7091R5 is not set ++# CONFIG_AD7091R8 is not set ++# CONFIG_AD7124 is not set ++# CONFIG_AD7173 is not set ++# CONFIG_AD7192 is not set ++# CONFIG_AD7266 is not set ++# CONFIG_AD7280 is not set ++# CONFIG_AD7291 is not set ++# CONFIG_AD7292 is not set ++# CONFIG_AD7298 is not set ++# CONFIG_AD7380 is not set ++# CONFIG_AD7476 is not set ++# CONFIG_AD7606_IFACE_PARALLEL is not set ++# CONFIG_AD7606_IFACE_SPI is not set ++# CONFIG_AD7766 is not set ++# CONFIG_AD7768_1 is not set ++# CONFIG_AD7780 is not set ++# CONFIG_AD7791 is not set ++# CONFIG_AD7793 is not set ++# CONFIG_AD7887 is not set ++# CONFIG_AD7923 is not set ++# CONFIG_AD7944 is not set ++# CONFIG_AD7949 is not set ++# CONFIG_AD799X is not set ++# CONFIG_AD9467 is not set ++# CONFIG_ADI_AXI_ADC is not set ++# CONFIG_AXP20X_ADC is not set ++# CONFIG_AXP288_ADC is not set ++# CONFIG_BCM_IPROC_ADC is not set ++# CONFIG_BERLIN2_ADC is not set ++# CONFIG_CC10001_ADC is not set ++# CONFIG_ENVELOPE_DETECTOR is not set ++CONFIG_EXYNOS_ADC=y ++# CONFIG_HI8435 is not set ++# CONFIG_HX711 is not set ++# CONFIG_INA2XX_ADC is not set ++# CONFIG_IMX7D_ADC is not set ++# CONFIG_IMX8QXP_ADC is not set ++# CONFIG_IMX93_ADC is not set ++# CONFIG_LTC2309 is not set ++# CONFIG_LTC2471 is not set ++# CONFIG_LTC2485 is not set ++# CONFIG_LTC2496 is not set ++# CONFIG_LTC2497 is not set ++# CONFIG_MAX1027 is not set ++# CONFIG_MAX11100 is not set ++# CONFIG_MAX1118 is not set ++# CONFIG_MAX11205 is not set ++# CONFIG_MAX11410 is not set ++# CONFIG_MAX1241 is not set ++# CONFIG_MAX1363 is not set ++# CONFIG_MAX34408 is not set ++# CONFIG_MAX9611 is not set ++# CONFIG_MCP320X is not set ++# CONFIG_MCP3422 is not set ++# CONFIG_MCP3564 is not set ++# CONFIG_MCP3911 is not set ++# CONFIG_MEDIATEK_MT6359_AUXADC is not set ++# CONFIG_MEDIATEK_MT6360_ADC is not set ++# CONFIG_MEDIATEK_MT6577_AUXADC is not set ++CONFIG_MESON_SARADC=y ++# CONFIG_NAU7802 is not set ++# CONFIG_NPCM_ADC is not set ++# CONFIG_PAC1921 is not set ++# CONFIG_PAC1934 is not set ++# CONFIG_QCOM_SPMI_RRADC is not set ++# CONFIG_QCOM_SPMI_IADC is not set ++# CONFIG_QCOM_SPMI_VADC is not set ++# CONFIG_QCOM_SPMI_ADC5 is not set ++# CONFIG_ROCKCHIP_SARADC is not set ++# CONFIG_RICHTEK_RTQ6056 is not set ++# CONFIG_RZG2L_ADC is not set ++# CONFIG_SD_ADC_MODULATOR is not set ++# CONFIG_STM32_ADC_CORE is not set ++# CONFIG_STM32_DFSDM_CORE is not set ++# CONFIG_STM32_DFSDM_ADC is not set ++# CONFIG_SUN20I_GPADC is not set ++# CONFIG_TI_ADC081C is not set ++# CONFIG_TI_ADC0832 is not set ++# CONFIG_TI_ADC084S021 is not set ++# CONFIG_TI_ADC12138 is not set ++# CONFIG_TI_ADC108S102 is not set ++# CONFIG_TI_ADC128S052 is not set ++# CONFIG_TI_ADC161S626 is not set ++# CONFIG_TI_ADS1015 is not set ++# CONFIG_TI_ADS1119 is not set ++# CONFIG_TI_ADS7924 is not set ++# CONFIG_TI_ADS1100 is not set ++# CONFIG_TI_ADS1298 is not set ++# CONFIG_TI_ADS7950 is not set ++# CONFIG_TI_ADS8344 is not set ++# CONFIG_TI_ADS8688 is not set ++# CONFIG_TI_ADS124S08 is not set ++# CONFIG_TI_ADS131E08 is not set ++# CONFIG_TI_LMP92064 is not set ++# CONFIG_TI_TLC4541 is not set ++# CONFIG_TI_TSC2046 is not set ++# CONFIG_VF610_ADC is not set ++# CONFIG_XILINX_XADC is not set ++# CONFIG_XILINX_AMS is not set ++# end of Analog to digital converters ++ ++# ++# Analog to digital and digital to analog converters ++# ++# CONFIG_AD74115 is not set ++# CONFIG_AD74413R is not set ++# end of Analog to digital and digital to analog converters ++ ++# ++# Analog Front Ends ++# ++# CONFIG_IIO_RESCALE is not set ++# end of Analog Front Ends ++ ++# ++# Amplifiers ++# ++# CONFIG_AD8366 is not set ++# CONFIG_ADA4250 is not set ++# CONFIG_HMC425 is not set ++# end of Amplifiers ++ ++# ++# Capacitance to digital converters ++# ++# CONFIG_AD7150 is not set ++# CONFIG_AD7746 is not set ++# end of Capacitance to digital converters ++ ++# ++# Chemical Sensors ++# ++# CONFIG_AOSONG_AGS02MA is not set ++# CONFIG_ATLAS_PH_SENSOR is not set ++# CONFIG_ATLAS_EZO_SENSOR is not set ++# CONFIG_BME680 is not set ++# CONFIG_CCS811 is not set ++# CONFIG_ENS160 is not set ++# CONFIG_IAQCORE is not set ++# CONFIG_PMS7003 is not set ++# CONFIG_SCD30_CORE is not set ++# CONFIG_SCD4X is not set ++# CONFIG_SENSIRION_SGP30 is not set ++# CONFIG_SENSIRION_SGP40 is not set ++# CONFIG_SPS30_I2C is not set ++# CONFIG_SPS30_SERIAL is not set ++# CONFIG_SENSEAIR_SUNRISE_CO2 is not set ++# CONFIG_VZ89X is not set ++# end of Chemical Sensors ++ ++# CONFIG_IIO_CROS_EC_SENSORS_CORE is not set ++ ++# ++# Hid Sensor IIO Common ++# ++# end of Hid Sensor IIO Common ++ ++# ++# IIO SCMI Sensors ++# ++# CONFIG_IIO_SCMI is not set ++# end of IIO SCMI Sensors ++ ++# ++# SSP Sensor Common ++# ++# CONFIG_IIO_SSP_SENSORHUB is not set ++# end of SSP Sensor Common ++ ++# ++# Digital to analog converters ++# ++# CONFIG_AD3552R is not set ++# CONFIG_AD5064 is not set ++# CONFIG_AD5360 is not set ++# CONFIG_AD5380 is not set ++# CONFIG_AD5421 is not set ++# CONFIG_AD5446 is not set ++# CONFIG_AD5449 is not set ++# CONFIG_AD5592R is not set ++# CONFIG_AD5593R is not set ++# CONFIG_AD5504 is not set ++# CONFIG_AD5624R_SPI is not set ++# CONFIG_AD9739A is not set ++# CONFIG_ADI_AXI_DAC is not set ++# CONFIG_LTC2688 is not set ++# CONFIG_AD5686_SPI is not set ++# CONFIG_AD5696_I2C is not set ++# CONFIG_AD5755 is not set ++# CONFIG_AD5758 is not set ++# CONFIG_AD5761 is not set ++# CONFIG_AD5764 is not set ++# CONFIG_AD5766 is not set ++# CONFIG_AD5770R is not set ++# CONFIG_AD5791 is not set ++# CONFIG_AD7293 is not set ++# CONFIG_AD7303 is not set ++# CONFIG_AD8801 is not set ++# CONFIG_DPOT_DAC is not set ++# CONFIG_DS4424 is not set ++# CONFIG_LTC1660 is not set ++# CONFIG_LTC2632 is not set ++# CONFIG_LTC2664 is not set ++# CONFIG_M62332 is not set ++# CONFIG_MAX517 is not set ++# CONFIG_MAX5522 is not set ++# CONFIG_MAX5821 is not set ++# CONFIG_MCP4725 is not set ++# CONFIG_MCP4728 is not set ++# CONFIG_MCP4821 is not set ++# CONFIG_MCP4922 is not set ++# CONFIG_STM32_DAC is not set ++# CONFIG_TI_DAC082S085 is not set ++# CONFIG_TI_DAC5571 is not set ++# CONFIG_TI_DAC7311 is not set ++# CONFIG_TI_DAC7612 is not set ++# CONFIG_VF610_DAC is not set ++# end of Digital to analog converters ++ ++# ++# IIO dummy driver ++# ++# end of IIO dummy driver ++ ++# ++# Filters ++# ++# CONFIG_ADMV8818 is not set ++# end of Filters ++ ++# ++# Frequency Synthesizers DDS/PLL ++# ++ ++# ++# Clock Generator/Distribution ++# ++# CONFIG_AD9523 is not set ++# end of Clock Generator/Distribution ++ ++# ++# Phase-Locked Loop (PLL) frequency synthesizers ++# ++# CONFIG_ADF4350 is not set ++# CONFIG_ADF4371 is not set ++# CONFIG_ADF4377 is not set ++# CONFIG_ADMFM2000 is not set ++# CONFIG_ADMV1013 is not set ++# CONFIG_ADMV1014 is not set ++# CONFIG_ADMV4420 is not set ++# CONFIG_ADRF6780 is not set ++# end of Phase-Locked Loop (PLL) frequency synthesizers ++# end of Frequency Synthesizers DDS/PLL ++ ++# ++# Digital gyroscope sensors ++# ++# CONFIG_ADIS16080 is not set ++# CONFIG_ADIS16130 is not set ++# CONFIG_ADIS16136 is not set ++# CONFIG_ADIS16260 is not set ++# CONFIG_ADXRS290 is not set ++# CONFIG_ADXRS450 is not set ++# CONFIG_BMG160 is not set ++# CONFIG_FXAS21002C is not set ++# CONFIG_MPU3050_I2C is not set ++# CONFIG_IIO_ST_GYRO_3AXIS is not set ++# CONFIG_ITG3200 is not set ++# end of Digital gyroscope sensors ++ ++# ++# Health Sensors ++# ++ ++# ++# Heart Rate Monitors ++# ++# CONFIG_AFE4403 is not set ++# CONFIG_AFE4404 is not set ++# CONFIG_MAX30100 is not set ++# CONFIG_MAX30102 is not set ++# end of Heart Rate Monitors ++# end of Health Sensors ++ ++# ++# Humidity sensors ++# ++# CONFIG_AM2315 is not set ++# CONFIG_DHT11 is not set ++# CONFIG_ENS210 is not set ++# CONFIG_HDC100X is not set ++# CONFIG_HDC2010 is not set ++# CONFIG_HDC3020 is not set ++# CONFIG_HTS221 is not set ++# CONFIG_HTU21 is not set ++# CONFIG_SI7005 is not set ++# CONFIG_SI7020 is not set ++# end of Humidity sensors ++ ++# ++# Inertial measurement units ++# ++# CONFIG_ADIS16400 is not set ++# CONFIG_ADIS16460 is not set ++# CONFIG_ADIS16475 is not set ++# CONFIG_ADIS16480 is not set ++# CONFIG_BMI160_I2C is not set ++# CONFIG_BMI160_SPI is not set ++# CONFIG_BMI323_I2C is not set ++# CONFIG_BMI323_SPI is not set ++# CONFIG_BOSCH_BNO055_SERIAL is not set ++# CONFIG_BOSCH_BNO055_I2C is not set ++# CONFIG_FXOS8700_I2C is not set ++# CONFIG_FXOS8700_SPI is not set ++# CONFIG_KMX61 is not set ++# CONFIG_INV_ICM42600_I2C is not set ++# CONFIG_INV_ICM42600_SPI is not set ++# CONFIG_INV_MPU6050_I2C is not set ++# CONFIG_INV_MPU6050_SPI is not set ++# CONFIG_IIO_ST_LSM6DSX is not set ++# CONFIG_IIO_ST_LSM9DS0 is not set ++# end of Inertial measurement units ++ ++# ++# Light sensors ++# ++# CONFIG_ACPI_ALS is not set ++# CONFIG_ADJD_S311 is not set ++# CONFIG_ADUX1020 is not set ++# CONFIG_AL3010 is not set ++# CONFIG_AL3320A is not set ++# CONFIG_APDS9300 is not set ++# CONFIG_APDS9306 is not set ++# CONFIG_APDS9960 is not set ++# CONFIG_AS73211 is not set ++# CONFIG_BH1745 is not set ++# CONFIG_BH1750 is not set ++# CONFIG_BH1780 is not set ++# CONFIG_CM32181 is not set ++# CONFIG_CM3232 is not set ++# CONFIG_CM3323 is not set ++# CONFIG_CM3605 is not set ++# CONFIG_CM36651 is not set ++# CONFIG_GP2AP002 is not set ++# CONFIG_GP2AP020A00F is not set ++# CONFIG_SENSORS_ISL29018 is not set ++# CONFIG_SENSORS_ISL29028 is not set ++# CONFIG_ISL29125 is not set ++# CONFIG_ISL76682 is not set ++# CONFIG_JSA1212 is not set ++# CONFIG_ROHM_BU27008 is not set ++# CONFIG_ROHM_BU27034 is not set ++# CONFIG_RPR0521 is not set ++# CONFIG_LTR390 is not set ++# CONFIG_LTR501 is not set ++# CONFIG_LTRF216A is not set ++# CONFIG_LV0104CS is not set ++# CONFIG_MAX44000 is not set ++# CONFIG_MAX44009 is not set ++# CONFIG_NOA1305 is not set ++# CONFIG_OPT3001 is not set ++# CONFIG_OPT4001 is not set ++# CONFIG_PA12203001 is not set ++# CONFIG_SI1133 is not set ++# CONFIG_SI1145 is not set ++# CONFIG_STK3310 is not set ++# CONFIG_ST_UVIS25 is not set ++# CONFIG_TCS3414 is not set ++# CONFIG_TCS3472 is not set ++# CONFIG_SENSORS_TSL2563 is not set ++# CONFIG_TSL2583 is not set ++# CONFIG_TSL2591 is not set ++# CONFIG_TSL2772 is not set ++# CONFIG_TSL4531 is not set ++# CONFIG_US5182D is not set ++# CONFIG_VCNL4000 is not set ++# CONFIG_VCNL4035 is not set ++# CONFIG_VEML6030 is not set ++# CONFIG_VEML6040 is not set ++# CONFIG_VEML6070 is not set ++# CONFIG_VEML6075 is not set ++# CONFIG_VL6180 is not set ++# CONFIG_ZOPT2201 is not set ++# end of Light sensors ++ ++# ++# Magnetometer sensors ++# ++# CONFIG_AF8133J is not set ++# CONFIG_AK8974 is not set ++# CONFIG_AK8975 is not set ++# CONFIG_AK09911 is not set ++# CONFIG_BMC150_MAGN_I2C is not set ++# CONFIG_BMC150_MAGN_SPI is not set ++# CONFIG_MAG3110 is not set ++# CONFIG_MMC35240 is not set ++# CONFIG_IIO_ST_MAGN_3AXIS is not set ++# CONFIG_SENSORS_HMC5843_I2C is not set ++# CONFIG_SENSORS_HMC5843_SPI is not set ++# CONFIG_SENSORS_RM3100_I2C is not set ++# CONFIG_SENSORS_RM3100_SPI is not set ++# CONFIG_TI_TMAG5273 is not set ++# CONFIG_YAMAHA_YAS530 is not set ++# end of Magnetometer sensors ++ ++# ++# Multiplexers ++# ++# CONFIG_IIO_MUX is not set ++# end of Multiplexers ++ ++# ++# Inclinometer sensors ++# ++# end of Inclinometer sensors ++ ++# ++# Triggers - standalone ++# ++# CONFIG_IIO_INTERRUPT_TRIGGER is not set ++# CONFIG_IIO_SYSFS_TRIGGER is not set ++# end of Triggers - standalone ++ ++# ++# Linear and angular position sensors ++# ++# end of Linear and angular position sensors ++ ++# ++# Digital potentiometers ++# ++# CONFIG_AD5110 is not set ++# CONFIG_AD5272 is not set ++# CONFIG_DS1803 is not set ++# CONFIG_MAX5432 is not set ++# CONFIG_MAX5481 is not set ++# CONFIG_MAX5487 is not set ++# CONFIG_MCP4018 is not set ++# CONFIG_MCP4131 is not set ++# CONFIG_MCP4531 is not set ++# CONFIG_MCP41010 is not set ++# CONFIG_TPL0102 is not set ++# CONFIG_X9250 is not set ++# end of Digital potentiometers ++ ++# ++# Digital potentiostats ++# ++# CONFIG_LMP91000 is not set ++# end of Digital potentiostats ++ ++# ++# Pressure sensors ++# ++# CONFIG_ABP060MG is not set ++# CONFIG_ROHM_BM1390 is not set ++# CONFIG_BMP280 is not set ++# CONFIG_DLHL60D is not set ++# CONFIG_DPS310 is not set ++# CONFIG_HP03 is not set ++# CONFIG_HSC030PA is not set ++# CONFIG_ICP10100 is not set ++# CONFIG_MPL115_I2C is not set ++# CONFIG_MPL115_SPI is not set ++# CONFIG_MPL3115 is not set ++# CONFIG_MPRLS0025PA is not set ++# CONFIG_MS5611 is not set ++# CONFIG_MS5637 is not set ++# CONFIG_SDP500 is not set ++# CONFIG_IIO_ST_PRESS is not set ++# CONFIG_T5403 is not set ++# CONFIG_HP206C is not set ++# CONFIG_ZPA2326 is not set ++# end of Pressure sensors ++ ++# ++# Lightning sensors ++# ++# CONFIG_AS3935 is not set ++# end of Lightning sensors ++ ++# ++# Proximity and distance sensors ++# ++# CONFIG_CROS_EC_MKBP_PROXIMITY is not set ++# CONFIG_HX9023S is not set ++# CONFIG_IRSD200 is not set ++# CONFIG_ISL29501 is not set ++# CONFIG_LIDAR_LITE_V2 is not set ++# CONFIG_MB1232 is not set ++# CONFIG_PING is not set ++# CONFIG_RFD77402 is not set ++# CONFIG_SRF04 is not set ++# CONFIG_SX9310 is not set ++# CONFIG_SX9324 is not set ++# CONFIG_SX9360 is not set ++# CONFIG_SX9500 is not set ++# CONFIG_SRF08 is not set ++# CONFIG_VCNL3020 is not set ++# CONFIG_VL53L0X_I2C is not set ++# CONFIG_AW96103 is not set ++# end of Proximity and distance sensors ++ ++# ++# Resolver to digital converters ++# ++# CONFIG_AD2S90 is not set ++# CONFIG_AD2S1200 is not set ++# CONFIG_AD2S1210 is not set ++# end of Resolver to digital converters ++ ++# ++# Temperature sensors ++# ++# CONFIG_LTC2983 is not set ++# CONFIG_MAXIM_THERMOCOUPLE is not set ++# CONFIG_MLX90614 is not set ++# CONFIG_MLX90632 is not set ++# CONFIG_MLX90635 is not set ++# CONFIG_TMP006 is not set ++# CONFIG_TMP007 is not set ++# CONFIG_TMP117 is not set ++# CONFIG_TSYS01 is not set ++# CONFIG_TSYS02D is not set ++# CONFIG_MAX30208 is not set ++# CONFIG_MAX31856 is not set ++# CONFIG_MAX31865 is not set ++# CONFIG_MCP9600 is not set ++# end of Temperature sensors ++ ++# CONFIG_NTB is not set ++CONFIG_PWM=y ++# CONFIG_PWM_DEBUG is not set ++# CONFIG_PWM_APPLE is not set ++# CONFIG_PWM_ATMEL_TCB is not set ++# CONFIG_PWM_AXI_PWMGEN is not set ++CONFIG_PWM_BCM_IPROC=y ++# CONFIG_PWM_BCM2835 is not set ++# CONFIG_PWM_BERLIN is not set ++# CONFIG_PWM_BRCMSTB is not set ++# CONFIG_PWM_CLK is not set ++# CONFIG_PWM_CROS_EC is not set ++# CONFIG_PWM_DWC is not set ++# CONFIG_PWM_FSL_FTM is not set ++# CONFIG_PWM_GPIO is not set ++# CONFIG_PWM_HIBVT is not set ++# CONFIG_PWM_IMX1 is not set ++# CONFIG_PWM_IMX27 is not set ++# CONFIG_PWM_IMX_TPM is not set ++# CONFIG_PWM_KEEMBAY is not set ++# CONFIG_PWM_MESON is not set ++# CONFIG_PWM_MTK_DISP is not set ++# CONFIG_PWM_MEDIATEK is not set ++# CONFIG_PWM_OMAP_DMTIMER is not set ++# CONFIG_PWM_PCA9685 is not set ++# CONFIG_PWM_RASPBERRYPI_POE is not set ++# CONFIG_PWM_RCAR is not set ++# CONFIG_PWM_RENESAS_TPU is not set ++CONFIG_PWM_ROCKCHIP=y ++# CONFIG_PWM_RZ_MTU3 is not set ++CONFIG_PWM_SAMSUNG=y ++# CONFIG_PWM_SL28CPLD is not set ++# CONFIG_PWM_SPRD is not set ++# CONFIG_PWM_SUN4I is not set ++# CONFIG_PWM_TEGRA is not set ++# CONFIG_PWM_TIECAP is not set ++# CONFIG_PWM_TIEHRPWM is not set ++# CONFIG_PWM_VISCONTI is not set ++# CONFIG_PWM_XILINX is not set ++ ++# ++# IRQ chip support ++# ++CONFIG_IRQCHIP=y ++CONFIG_ARM_GIC=y ++CONFIG_ARM_GIC_PM=y ++CONFIG_ARM_GIC_MAX_NR=1 ++CONFIG_ARM_GIC_V2M=y ++CONFIG_ARM_GIC_V3=y ++CONFIG_ARM_GIC_V3_ITS=y ++CONFIG_ARM_GIC_V3_ITS_FSL_MC=y ++CONFIG_IRQ_MSI_LIB=y ++CONFIG_ALPINE_MSI=y ++# CONFIG_AL_FIC is not set ++CONFIG_BCM7038_L1_IRQ=y ++CONFIG_BCM7120_L2_IRQ=y ++CONFIG_BRCMSTB_L2_IRQ=y ++CONFIG_DW_APB_ICTL=y ++CONFIG_HISILICON_IRQ_MBIGEN=y ++# CONFIG_LAN966X_OIC is not set ++CONFIG_RENESAS_IRQC=y ++CONFIG_RENESAS_RZG2L_IRQC=y ++CONFIG_SL28CPLD_INTC=y ++CONFIG_SUN6I_R_INTC=y ++CONFIG_SUNXI_NMI_INTC=y ++# CONFIG_XILINX_INTC is not set ++CONFIG_IMX_GPCV2=y ++CONFIG_MVEBU_GICP=y ++CONFIG_MVEBU_ICU=y ++CONFIG_MVEBU_ODMI=y ++CONFIG_MVEBU_PIC=y ++CONFIG_MVEBU_SEI=y ++CONFIG_LS_EXTIRQ=y ++CONFIG_LS_SCFG_MSI=y ++CONFIG_PARTITION_PERCPU=y ++CONFIG_STM32MP_EXTI=y ++CONFIG_QCOM_IRQ_COMBINER=y ++CONFIG_IRQ_UNIPHIER_AIDET=y ++CONFIG_MESON_IRQ_GPIO=y ++CONFIG_QCOM_PDC=y ++CONFIG_QCOM_MPM=y ++CONFIG_IMX_IRQSTEER=y ++CONFIG_IMX_INTMUX=y ++# CONFIG_IMX_MU_MSI is not set ++CONFIG_TI_SCI_INTR_IRQCHIP=y ++CONFIG_TI_SCI_INTA_IRQCHIP=y ++CONFIG_MST_IRQ=y ++CONFIG_APPLE_AIC=y ++# end of IRQ chip support ++ ++# CONFIG_IPACK_BUS is not set ++CONFIG_ARCH_HAS_RESET_CONTROLLER=y ++CONFIG_RESET_CONTROLLER=y ++# CONFIG_RESET_BERLIN is not set ++CONFIG_RESET_BRCMSTB=y ++CONFIG_RESET_BRCMSTB_RESCAL=y ++# CONFIG_RESET_GPIO is not set ++CONFIG_RESET_IMX7=y ++CONFIG_RESET_IMX8MP_AUDIOMIX=y ++# CONFIG_RESET_MCHP_SPARX5 is not set ++CONFIG_RESET_MESON=y ++# CONFIG_RESET_MESON_AUDIO_ARB is not set ++CONFIG_RESET_NPCM=y ++CONFIG_RESET_NUVOTON_MA35D1=y ++CONFIG_RESET_QCOM_AOSS=y ++# CONFIG_RESET_QCOM_PDC is not set ++# CONFIG_RESET_RASPBERRYPI is not set ++CONFIG_RESET_RZG2L_USBPHY_CTRL=y ++CONFIG_RESET_SCMI=y ++CONFIG_RESET_SIMPLE=y ++CONFIG_RESET_SUNXI=y ++CONFIG_RESET_TI_SCI=y ++# CONFIG_RESET_TI_SYSCON is not set ++# CONFIG_RESET_TI_TPS380X is not set ++CONFIG_RESET_UNIPHIER=y ++CONFIG_RESET_UNIPHIER_GLUE=y ++CONFIG_RESET_ZYNQMP=y ++CONFIG_COMMON_RESET_HI3660=y ++CONFIG_COMMON_RESET_HI6220=y ++CONFIG_RESET_TEGRA_BPMP=y ++ ++# ++# PHY Subsystem ++# ++CONFIG_GENERIC_PHY=y ++CONFIG_GENERIC_PHY_MIPI_DPHY=y ++CONFIG_PHY_XGENE=y ++# CONFIG_PHY_CAN_TRANSCEIVER is not set ++CONFIG_PHY_SUN4I_USB=y ++# CONFIG_PHY_SUN6I_MIPI_DPHY is not set ++# CONFIG_PHY_SUN9I_USB is not set ++# CONFIG_PHY_SUN50I_USB3 is not set ++CONFIG_PHY_MESON8B_USB2=y ++CONFIG_PHY_MESON_GXL_USB2=y ++CONFIG_PHY_MESON_G12A_MIPI_DPHY_ANALOG=y ++CONFIG_PHY_MESON_G12A_USB2=y ++CONFIG_PHY_MESON_G12A_USB3_PCIE=y ++CONFIG_PHY_MESON_AXG_PCIE=y ++CONFIG_PHY_MESON_AXG_MIPI_PCIE_ANALOG=y ++CONFIG_PHY_MESON_AXG_MIPI_DPHY=y ++ ++# ++# PHY drivers for Broadcom platforms ++# ++CONFIG_PHY_BCM_SR_USB=y ++# CONFIG_BCM_KONA_USB2_PHY is not set ++# CONFIG_PHY_BCM_NS_USB2 is not set ++# CONFIG_PHY_BCM_NS_USB3 is not set ++CONFIG_PHY_NS2_PCIE=y ++CONFIG_PHY_NS2_USB_DRD=y ++CONFIG_PHY_BRCM_SATA=y ++CONFIG_PHY_BRCM_USB=y ++CONFIG_PHY_BCM_SR_PCIE=y ++# end of PHY drivers for Broadcom platforms ++ ++# CONFIG_PHY_CADENCE_TORRENT is not set ++# CONFIG_PHY_CADENCE_DPHY is not set ++# CONFIG_PHY_CADENCE_DPHY_RX is not set ++# CONFIG_PHY_CADENCE_SIERRA is not set ++# CONFIG_PHY_CADENCE_SALVO is not set ++CONFIG_PHY_FSL_IMX8MQ_USB=y ++# CONFIG_PHY_MIXEL_LVDS_PHY is not set ++# CONFIG_PHY_MIXEL_MIPI_DPHY is not set ++CONFIG_PHY_FSL_IMX8M_PCIE=y ++# CONFIG_PHY_FSL_IMX8QM_HSIO is not set ++# CONFIG_PHY_FSL_SAMSUNG_HDMI_PHY is not set ++# CONFIG_PHY_FSL_LYNX_28G is not set ++CONFIG_PHY_HI6220_USB=y ++# CONFIG_PHY_HI3660_USB is not set ++# CONFIG_PHY_HI3670_USB is not set ++# CONFIG_PHY_HI3670_PCIE is not set ++CONFIG_PHY_HISTB_COMBPHY=y ++CONFIG_PHY_HISI_INNO_USB2=y ++# CONFIG_PHY_BERLIN_SATA is not set ++# CONFIG_PHY_BERLIN_USB is not set ++CONFIG_PHY_MVEBU_A3700_COMPHY=y ++CONFIG_PHY_MVEBU_A3700_UTMI=y ++# CONFIG_PHY_MVEBU_A38X_COMPHY is not set ++CONFIG_PHY_MVEBU_CP110_COMPHY=y ++# CONFIG_PHY_MVEBU_CP110_UTMI is not set ++# CONFIG_PHY_PXA_28NM_HSIC is not set ++# CONFIG_PHY_PXA_28NM_USB2 is not set ++# CONFIG_PHY_MTK_PCIE is not set ++# CONFIG_PHY_MTK_XFI_TPHY is not set ++CONFIG_PHY_MTK_TPHY=y ++# CONFIG_PHY_MTK_UFS is not set ++# CONFIG_PHY_MTK_XSPHY is not set ++# CONFIG_PHY_MTK_HDMI is not set ++# CONFIG_PHY_MTK_MIPI_CSI_0_5 is not set ++# CONFIG_PHY_MTK_MIPI_DSI is not set ++# CONFIG_PHY_MTK_DP is not set ++# CONFIG_PHY_SPARX5_SERDES is not set ++# CONFIG_PHY_LAN966X_SERDES is not set ++# CONFIG_PHY_CPCAP_USB is not set ++# CONFIG_PHY_MAPPHONE_MDM6600 is not set ++# CONFIG_PHY_OCELOT_SERDES is not set ++# CONFIG_PHY_MA35_USB is not set ++# CONFIG_PHY_QCOM_APQ8064_SATA is not set ++# CONFIG_PHY_QCOM_EDP is not set ++# CONFIG_PHY_QCOM_IPQ4019_USB is not set ++# CONFIG_PHY_QCOM_IPQ806X_SATA is not set ++# CONFIG_PHY_QCOM_PCIE2 is not set ++# CONFIG_PHY_QCOM_QMP is not set ++# CONFIG_PHY_QCOM_QUSB2 is not set ++# CONFIG_PHY_QCOM_SNPS_EUSB2 is not set ++# CONFIG_PHY_QCOM_EUSB2_REPEATER is not set ++# CONFIG_PHY_QCOM_M31_USB is not set ++# CONFIG_PHY_QCOM_USB_HS is not set ++# CONFIG_PHY_QCOM_USB_SNPS_FEMTO_V2 is not set ++# CONFIG_PHY_QCOM_USB_HSIC is not set ++# CONFIG_PHY_QCOM_USB_HS_28NM is not set ++# CONFIG_PHY_QCOM_USB_SS is not set ++# CONFIG_PHY_QCOM_IPQ806X_USB is not set ++# CONFIG_PHY_QCOM_SGMII_ETH is not set ++# CONFIG_PHY_RTK_RTD_USB2PHY is not set ++# CONFIG_PHY_RTK_RTD_USB3PHY is not set ++CONFIG_PHY_R8A779F0_ETHERNET_SERDES=y ++# CONFIG_PHY_RCAR_GEN2 is not set ++CONFIG_PHY_RCAR_GEN3_PCIE=y ++CONFIG_PHY_RCAR_GEN3_USB2=y ++# CONFIG_PHY_RCAR_GEN3_USB3 is not set ++# CONFIG_PHY_ROCKCHIP_DP is not set ++# CONFIG_PHY_ROCKCHIP_DPHY_RX0 is not set ++CONFIG_PHY_ROCKCHIP_EMMC=y ++# CONFIG_PHY_ROCKCHIP_INNO_HDMI is not set ++CONFIG_PHY_ROCKCHIP_INNO_USB2=y ++# CONFIG_PHY_ROCKCHIP_INNO_CSIDPHY is not set ++# CONFIG_PHY_ROCKCHIP_INNO_DSIDPHY is not set ++# CONFIG_PHY_ROCKCHIP_NANENG_COMBO_PHY is not set ++# CONFIG_PHY_ROCKCHIP_PCIE is not set ++# CONFIG_PHY_ROCKCHIP_SAMSUNG_HDPTX is not set ++CONFIG_PHY_ROCKCHIP_SNPS_PCIE3=y ++CONFIG_PHY_ROCKCHIP_TYPEC=y ++# CONFIG_PHY_ROCKCHIP_USB is not set ++CONFIG_PHY_EXYNOS_DP_VIDEO=y ++CONFIG_PHY_EXYNOS_MIPI_VIDEO=y ++# CONFIG_PHY_EXYNOS_PCIE is not set ++CONFIG_PHY_SAMSUNG_UFS=y ++CONFIG_PHY_SAMSUNG_USB2=y ++CONFIG_PHY_EXYNOS5_USBDRD=y ++CONFIG_PHY_UNIPHIER_USB2=y ++CONFIG_PHY_UNIPHIER_USB3=y ++# CONFIG_PHY_UNIPHIER_PCIE is not set ++CONFIG_PHY_UNIPHIER_AHCI=y ++# CONFIG_PHY_STM32_USBPHYC is not set ++CONFIG_PHY_TEGRA_XUSB=y ++# CONFIG_PHY_TEGRA194_P2U is not set ++# CONFIG_PHY_AM654_SERDES is not set ++# CONFIG_PHY_J721E_WIZ is not set ++# CONFIG_OMAP_USB2 is not set ++# CONFIG_PHY_TUSB1210 is not set ++CONFIG_PHY_TI_GMII_SEL=y ++# CONFIG_PHY_INTEL_KEEMBAY_EMMC is not set ++# CONFIG_PHY_INTEL_KEEMBAY_USB is not set ++# CONFIG_PHY_XILINX_ZYNQMP is not set ++# end of PHY Subsystem ++ ++# CONFIG_POWERCAP is not set ++# CONFIG_MCB is not set ++ ++# ++# Performance monitor support ++# ++# CONFIG_ARM_CCI_PMU is not set ++# CONFIG_ARM_CCN is not set ++# CONFIG_ARM_CMN is not set ++# CONFIG_ARM_NI is not set ++CONFIG_ARM_PMU=y ++CONFIG_ARM_PMU_ACPI=y ++# CONFIG_ARM_SMMU_V3_PMU is not set ++CONFIG_ARM_PMUV3=y ++# CONFIG_ARM_DSU_PMU is not set ++# CONFIG_FSL_IMX8_DDR_PMU is not set ++# CONFIG_FSL_IMX9_DDR_PMU is not set ++CONFIG_QCOM_L2_PMU=y ++CONFIG_QCOM_L3_PMU=y ++# CONFIG_THUNDERX2_PMU is not set ++# CONFIG_XGENE_PMU is not set ++# CONFIG_ARM_SPE_PMU is not set ++# CONFIG_ARM_DMC620_PMU is not set ++# CONFIG_MARVELL_CN10K_TAD_PMU is not set ++# CONFIG_APPLE_M1_CPU_PMU is not set ++# CONFIG_ALIBABA_UNCORE_DRW_PMU is not set ++CONFIG_HISI_PMU=y ++# CONFIG_HISI_PCIE_PMU is not set ++# CONFIG_HNS3_PMU is not set ++# CONFIG_MARVELL_CN10K_DDR_PMU is not set ++# CONFIG_DWC_PCIE_PMU is not set ++# CONFIG_ARM_CORESIGHT_PMU_ARCH_SYSTEM_PMU is not set ++# CONFIG_MESON_DDR_PMU is not set ++# end of Performance monitor support ++ ++CONFIG_RAS=y ++# CONFIG_USB4 is not set ++ ++# ++# Android ++# ++# CONFIG_ANDROID_BINDER_IPC is not set ++# end of Android ++ ++# CONFIG_LIBNVDIMM is not set ++# CONFIG_DAX is not set ++CONFIG_NVMEM=y ++CONFIG_NVMEM_SYSFS=y ++CONFIG_NVMEM_LAYOUTS=y ++ ++# ++# Layout Types ++# ++# CONFIG_NVMEM_LAYOUT_SL28_VPD is not set ++# CONFIG_NVMEM_LAYOUT_ONIE_TLV is not set ++# CONFIG_NVMEM_LAYOUT_U_BOOT_ENV is not set ++# end of Layout Types ++ ++CONFIG_NVMEM_APPLE_EFUSES=y ++CONFIG_NVMEM_BCM_OCOTP=y ++# CONFIG_NVMEM_IMX_IIM is not set ++CONFIG_NVMEM_IMX_OCOTP=y ++# CONFIG_NVMEM_IMX_OCOTP_ELE is not set ++CONFIG_NVMEM_IMX_OCOTP_SCU=y ++# CONFIG_NVMEM_LAYERSCAPE_SFP is not set ++# CONFIG_NVMEM_MESON_EFUSE is not set ++# CONFIG_NVMEM_MESON_MX_EFUSE is not set ++CONFIG_NVMEM_MTK_EFUSE=y ++CONFIG_NVMEM_QCOM_QFPROM=y ++# CONFIG_NVMEM_QCOM_SEC_QFPROM is not set ++# CONFIG_NVMEM_RMEM is not set ++CONFIG_NVMEM_ROCKCHIP_EFUSE=y ++CONFIG_NVMEM_ROCKCHIP_OTP=y ++CONFIG_NVMEM_SNVS_LPGPR=y ++# CONFIG_NVMEM_SPMI_SDAM is not set ++# CONFIG_NVMEM_SPRD_EFUSE is not set ++# CONFIG_NVMEM_STM32_ROMEM is not set ++CONFIG_NVMEM_SUNXI_SID=y ++# CONFIG_NVMEM_U_BOOT_ENV is not set ++CONFIG_NVMEM_UNIPHIER_EFUSE=y ++# CONFIG_NVMEM_ZYNQMP is not set ++ ++# ++# HW tracing support ++# ++# CONFIG_STM is not set ++# CONFIG_INTEL_TH is not set ++# CONFIG_HISI_PTT is not set ++# end of HW tracing support ++ ++CONFIG_FPGA=y ++# CONFIG_FPGA_MGR_SOCFPGA is not set ++# CONFIG_FPGA_MGR_SOCFPGA_A10 is not set ++# CONFIG_ALTERA_PR_IP_CORE is not set ++# CONFIG_FPGA_MGR_ALTERA_PS_SPI is not set ++# CONFIG_FPGA_MGR_ALTERA_CVP is not set ++# CONFIG_FPGA_MGR_STRATIX10_SOC is not set ++# CONFIG_FPGA_MGR_XILINX_SELECTMAP is not set ++# CONFIG_FPGA_MGR_XILINX_SPI is not set ++# CONFIG_FPGA_MGR_ICE40_SPI is not set ++# CONFIG_FPGA_MGR_MACHXO2_SPI is not set ++# CONFIG_FPGA_BRIDGE is not set ++# CONFIG_FPGA_DFL is not set ++# CONFIG_FPGA_MGR_ZYNQMP_FPGA is not set ++# CONFIG_FPGA_MGR_VERSAL_FPGA is not set ++# CONFIG_FPGA_MGR_MICROCHIP_SPI is not set ++# CONFIG_FPGA_MGR_LATTICE_SYSCONFIG_SPI is not set ++# CONFIG_FSI is not set ++CONFIG_TEE=y ++CONFIG_OPTEE=y ++# CONFIG_OPTEE_INSECURE_LOAD_IMAGE is not set ++CONFIG_MULTIPLEXER=y ++ ++# ++# Multiplexer drivers ++# ++# CONFIG_MUX_ADG792A is not set ++# CONFIG_MUX_ADGS1408 is not set ++# CONFIG_MUX_GPIO is not set ++CONFIG_MUX_MMIO=y ++# end of Multiplexer drivers ++ ++CONFIG_PM_OPP=y ++# CONFIG_SIOX is not set ++# CONFIG_SLIMBUS is not set ++CONFIG_INTERCONNECT=y ++CONFIG_INTERCONNECT_IMX=y ++# CONFIG_INTERCONNECT_IMX8MM is not set ++# CONFIG_INTERCONNECT_IMX8MN is not set ++# CONFIG_INTERCONNECT_IMX8MQ is not set ++CONFIG_INTERCONNECT_IMX8MP=y ++# CONFIG_INTERCONNECT_MTK is not set ++CONFIG_INTERCONNECT_QCOM=y ++CONFIG_INTERCONNECT_QCOM_BCM_VOTER=y ++# CONFIG_INTERCONNECT_QCOM_MSM8909 is not set ++# CONFIG_INTERCONNECT_QCOM_MSM8916 is not set ++# CONFIG_INTERCONNECT_QCOM_MSM8937 is not set ++# CONFIG_INTERCONNECT_QCOM_MSM8939 is not set ++# CONFIG_INTERCONNECT_QCOM_MSM8953 is not set ++# CONFIG_INTERCONNECT_QCOM_MSM8974 is not set ++# CONFIG_INTERCONNECT_QCOM_MSM8976 is not set ++# CONFIG_INTERCONNECT_QCOM_MSM8996 is not set ++# CONFIG_INTERCONNECT_QCOM_OSM_L3 is not set ++# CONFIG_INTERCONNECT_QCOM_QCM2290 is not set ++# CONFIG_INTERCONNECT_QCOM_QCS404 is not set ++# CONFIG_INTERCONNECT_QCOM_QDU1000 is not set ++CONFIG_INTERCONNECT_QCOM_RPMH_POSSIBLE=y ++CONFIG_INTERCONNECT_QCOM_RPMH=y ++CONFIG_INTERCONNECT_QCOM_SA8775P=y ++CONFIG_INTERCONNECT_QCOM_SC7180=y ++CONFIG_INTERCONNECT_QCOM_SC7280=y ++CONFIG_INTERCONNECT_QCOM_SC8180X=y ++CONFIG_INTERCONNECT_QCOM_SC8280XP=y ++# CONFIG_INTERCONNECT_QCOM_SDM660 is not set ++# CONFIG_INTERCONNECT_QCOM_SDM670 is not set ++CONFIG_INTERCONNECT_QCOM_SDM845=y ++# CONFIG_INTERCONNECT_QCOM_SDX55 is not set ++# CONFIG_INTERCONNECT_QCOM_SDX65 is not set ++# CONFIG_INTERCONNECT_QCOM_SDX75 is not set ++# CONFIG_INTERCONNECT_QCOM_SM6115 is not set ++# CONFIG_INTERCONNECT_QCOM_SM6350 is not set ++# CONFIG_INTERCONNECT_QCOM_SM7150 is not set ++# CONFIG_INTERCONNECT_QCOM_SM8150 is not set ++# CONFIG_INTERCONNECT_QCOM_SM8250 is not set ++# CONFIG_INTERCONNECT_QCOM_SM8350 is not set ++CONFIG_INTERCONNECT_QCOM_SM8450=y ++CONFIG_INTERCONNECT_QCOM_SM8550=y ++# CONFIG_INTERCONNECT_QCOM_SM8650 is not set ++# CONFIG_INTERCONNECT_QCOM_X1E80100 is not set ++# CONFIG_INTERCONNECT_SAMSUNG is not set ++CONFIG_INTERCONNECT_CLK=y ++# CONFIG_COUNTER is not set ++# CONFIG_MOST is not set ++# CONFIG_PECI is not set ++CONFIG_HTE=y ++CONFIG_HTE_TEGRA194=y ++# CONFIG_HTE_TEGRA194_TEST is not set ++# CONFIG_CDX_BUS is not set ++# end of Device Drivers ++ ++# ++# File systems ++# ++CONFIG_DCACHE_WORD_ACCESS=y ++# CONFIG_VALIDATE_FS_PARSER is not set ++CONFIG_FS_IOMAP=y ++CONFIG_BUFFER_HEAD=y ++CONFIG_LEGACY_DIRECT_IO=y ++CONFIG_EXT2_FS=y ++# CONFIG_EXT2_FS_XATTR is not set ++CONFIG_EXT3_FS=y ++# CONFIG_EXT3_FS_POSIX_ACL is not set ++# CONFIG_EXT3_FS_SECURITY is not set ++CONFIG_EXT4_FS=y ++CONFIG_EXT4_FS_POSIX_ACL=y ++# CONFIG_EXT4_FS_SECURITY is not set ++# CONFIG_EXT4_DEBUG is not set ++CONFIG_JBD2=y ++# CONFIG_JBD2_DEBUG is not set ++CONFIG_FS_MBCACHE=y ++# CONFIG_REISERFS_FS is not set ++# CONFIG_JFS_FS is not set ++# CONFIG_XFS_FS is not set ++# CONFIG_GFS2_FS is not set ++# CONFIG_OCFS2_FS is not set ++# CONFIG_BTRFS_FS is not set ++# CONFIG_NILFS2_FS is not set ++# CONFIG_F2FS_FS is not set ++# CONFIG_BCACHEFS_FS is not set ++CONFIG_FS_POSIX_ACL=y ++CONFIG_EXPORTFS=y ++# CONFIG_EXPORTFS_BLOCK_OPS is not set ++CONFIG_FILE_LOCKING=y ++# CONFIG_FS_ENCRYPTION is not set ++# CONFIG_FS_VERITY is not set ++CONFIG_FSNOTIFY=y ++CONFIG_DNOTIFY=y ++CONFIG_INOTIFY_USER=y ++CONFIG_FANOTIFY=y ++CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y ++CONFIG_QUOTA=y ++# CONFIG_QUOTA_NETLINK_INTERFACE is not set ++# CONFIG_QUOTA_DEBUG is not set ++# CONFIG_QFMT_V1 is not set ++# CONFIG_QFMT_V2 is not set ++CONFIG_QUOTACTL=y ++CONFIG_AUTOFS_FS=y ++# CONFIG_FUSE_FS is not set ++# CONFIG_OVERLAY_FS is not set ++ ++# ++# Caches ++# ++CONFIG_NETFS_SUPPORT=y ++# CONFIG_NETFS_STATS is not set ++# CONFIG_NETFS_DEBUG is not set ++# CONFIG_FSCACHE is not set ++# end of Caches ++ ++# ++# CD-ROM/DVD Filesystems ++# ++# CONFIG_ISO9660_FS is not set ++# CONFIG_UDF_FS is not set ++# end of CD-ROM/DVD Filesystems ++ ++# ++# DOS/FAT/EXFAT/NT Filesystems ++# ++CONFIG_FAT_FS=y ++# CONFIG_MSDOS_FS is not set ++CONFIG_VFAT_FS=y ++CONFIG_FAT_DEFAULT_CODEPAGE=437 ++CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" ++# CONFIG_FAT_DEFAULT_UTF8 is not set ++# CONFIG_EXFAT_FS is not set ++# CONFIG_NTFS3_FS is not set ++# CONFIG_NTFS_FS is not set ++# end of DOS/FAT/EXFAT/NT Filesystems ++ ++# ++# Pseudo filesystems ++# ++CONFIG_PROC_FS=y ++# CONFIG_PROC_KCORE is not set ++CONFIG_PROC_VMCORE=y ++# CONFIG_PROC_VMCORE_DEVICE_DUMP is not set ++CONFIG_PROC_SYSCTL=y ++CONFIG_PROC_PAGE_MONITOR=y ++# CONFIG_PROC_CHILDREN is not set ++CONFIG_KERNFS=y ++CONFIG_SYSFS=y ++CONFIG_TMPFS=y ++CONFIG_TMPFS_POSIX_ACL=y ++CONFIG_TMPFS_XATTR=y ++# CONFIG_TMPFS_INODE64 is not set ++# CONFIG_TMPFS_QUOTA is not set ++CONFIG_ARCH_SUPPORTS_HUGETLBFS=y ++CONFIG_HUGETLBFS=y ++CONFIG_HUGETLB_PAGE=y ++CONFIG_HUGETLB_PMD_PAGE_TABLE_SHARING=y ++CONFIG_ARCH_HAS_GIGANTIC_PAGE=y ++CONFIG_CONFIGFS_FS=y ++CONFIG_EFIVAR_FS=y ++# end of Pseudo filesystems ++ ++CONFIG_MISC_FILESYSTEMS=y ++# CONFIG_ORANGEFS_FS is not set ++# CONFIG_ADFS_FS is not set ++# CONFIG_AFFS_FS is not set ++# CONFIG_ECRYPT_FS is not set ++# CONFIG_HFS_FS is not set ++# CONFIG_HFSPLUS_FS is not set ++# CONFIG_BEFS_FS is not set ++# CONFIG_BFS_FS is not set ++# CONFIG_EFS_FS is not set ++# CONFIG_JFFS2_FS is not set ++# CONFIG_CRAMFS is not set ++CONFIG_SQUASHFS=y ++CONFIG_SQUASHFS_FILE_CACHE=y ++# CONFIG_SQUASHFS_FILE_DIRECT is not set ++CONFIG_SQUASHFS_DECOMP_SINGLE=y ++# CONFIG_SQUASHFS_CHOICE_DECOMP_BY_MOUNT is not set ++CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE=y ++# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI is not set ++# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU is not set ++# CONFIG_SQUASHFS_XATTR is not set ++CONFIG_SQUASHFS_ZLIB=y ++# CONFIG_SQUASHFS_LZ4 is not set ++# CONFIG_SQUASHFS_LZO is not set ++# CONFIG_SQUASHFS_XZ is not set ++# CONFIG_SQUASHFS_ZSTD is not set ++# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set ++# CONFIG_SQUASHFS_EMBEDDED is not set ++CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 ++# CONFIG_VXFS_FS is not set ++# CONFIG_MINIX_FS is not set ++# CONFIG_OMFS_FS is not set ++# CONFIG_HPFS_FS is not set ++# CONFIG_QNX4FS_FS is not set ++# CONFIG_QNX6FS_FS is not set ++# CONFIG_ROMFS_FS is not set ++CONFIG_PSTORE=y ++CONFIG_PSTORE_DEFAULT_KMSG_BYTES=10240 ++CONFIG_PSTORE_COMPRESS=y ++# CONFIG_PSTORE_CONSOLE is not set ++# CONFIG_PSTORE_PMSG is not set ++# CONFIG_PSTORE_RAM is not set ++# CONFIG_PSTORE_BLK is not set ++# CONFIG_SYSV_FS is not set ++# CONFIG_UFS_FS is not set ++# CONFIG_EROFS_FS is not set ++CONFIG_NETWORK_FILESYSTEMS=y ++CONFIG_NFS_FS=y ++CONFIG_NFS_V2=y ++CONFIG_NFS_V3=y ++# CONFIG_NFS_V3_ACL is not set ++CONFIG_NFS_V4=y ++# CONFIG_NFS_SWAP is not set ++CONFIG_NFS_V4_1=y ++CONFIG_NFS_V4_2=y ++CONFIG_PNFS_FILE_LAYOUT=y ++CONFIG_PNFS_FLEXFILE_LAYOUT=y ++CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org" ++# CONFIG_NFS_V4_1_MIGRATION is not set ++CONFIG_NFS_V4_SECURITY_LABEL=y ++CONFIG_ROOT_NFS=y ++# CONFIG_NFS_FSCACHE is not set ++# CONFIG_NFS_USE_LEGACY_DNS is not set ++CONFIG_NFS_USE_KERNEL_DNS=y ++CONFIG_NFS_DISABLE_UDP_SUPPORT=y ++CONFIG_NFS_V4_2_READ_PLUS=y ++# CONFIG_NFSD is not set ++CONFIG_GRACE_PERIOD=y ++CONFIG_LOCKD=y ++CONFIG_LOCKD_V4=y ++CONFIG_NFS_COMMON=y ++CONFIG_NFS_V4_2_SSC_HELPER=y ++CONFIG_SUNRPC=y ++CONFIG_SUNRPC_GSS=y ++CONFIG_SUNRPC_BACKCHANNEL=y ++CONFIG_RPCSEC_GSS_KRB5=y ++# CONFIG_SUNRPC_DEBUG is not set ++# CONFIG_CEPH_FS is not set ++# CONFIG_CIFS is not set ++# CONFIG_SMB_SERVER is not set ++# CONFIG_CODA_FS is not set ++# CONFIG_AFS_FS is not set ++CONFIG_9P_FS=y ++# CONFIG_9P_FS_POSIX_ACL is not set ++# CONFIG_9P_FS_SECURITY is not set ++CONFIG_NLS=y ++CONFIG_NLS_DEFAULT="iso8859-1" ++CONFIG_NLS_CODEPAGE_437=y ++# CONFIG_NLS_CODEPAGE_737 is not set ++# CONFIG_NLS_CODEPAGE_775 is not set ++# CONFIG_NLS_CODEPAGE_850 is not set ++# CONFIG_NLS_CODEPAGE_852 is not set ++# CONFIG_NLS_CODEPAGE_855 is not set ++# CONFIG_NLS_CODEPAGE_857 is not set ++# CONFIG_NLS_CODEPAGE_860 is not set ++# CONFIG_NLS_CODEPAGE_861 is not set ++# CONFIG_NLS_CODEPAGE_862 is not set ++# CONFIG_NLS_CODEPAGE_863 is not set ++# CONFIG_NLS_CODEPAGE_864 is not set ++# CONFIG_NLS_CODEPAGE_865 is not set ++# CONFIG_NLS_CODEPAGE_866 is not set ++# CONFIG_NLS_CODEPAGE_869 is not set ++# CONFIG_NLS_CODEPAGE_936 is not set ++# CONFIG_NLS_CODEPAGE_950 is not set ++# CONFIG_NLS_CODEPAGE_932 is not set ++# CONFIG_NLS_CODEPAGE_949 is not set ++# CONFIG_NLS_CODEPAGE_874 is not set ++# CONFIG_NLS_ISO8859_8 is not set ++# CONFIG_NLS_CODEPAGE_1250 is not set ++# CONFIG_NLS_CODEPAGE_1251 is not set ++# CONFIG_NLS_ASCII is not set ++CONFIG_NLS_ISO8859_1=y ++# CONFIG_NLS_ISO8859_2 is not set ++# CONFIG_NLS_ISO8859_3 is not set ++# CONFIG_NLS_ISO8859_4 is not set ++# CONFIG_NLS_ISO8859_5 is not set ++# CONFIG_NLS_ISO8859_6 is not set ++# CONFIG_NLS_ISO8859_7 is not set ++# CONFIG_NLS_ISO8859_9 is not set ++# CONFIG_NLS_ISO8859_13 is not set ++# CONFIG_NLS_ISO8859_14 is not set ++# CONFIG_NLS_ISO8859_15 is not set ++# CONFIG_NLS_KOI8_R is not set ++# CONFIG_NLS_KOI8_U is not set ++# CONFIG_NLS_MAC_ROMAN is not set ++# CONFIG_NLS_MAC_CELTIC is not set ++# CONFIG_NLS_MAC_CENTEURO is not set ++# CONFIG_NLS_MAC_CROATIAN is not set ++# CONFIG_NLS_MAC_CYRILLIC is not set ++# CONFIG_NLS_MAC_GAELIC is not set ++# CONFIG_NLS_MAC_GREEK is not set ++# CONFIG_NLS_MAC_ICELAND is not set ++# CONFIG_NLS_MAC_INUIT is not set ++# CONFIG_NLS_MAC_ROMANIAN is not set ++# CONFIG_NLS_MAC_TURKISH is not set ++# CONFIG_NLS_UTF8 is not set ++# CONFIG_DLM is not set ++# CONFIG_UNICODE is not set ++CONFIG_IO_WQ=y ++# end of File systems ++ ++# ++# Security options ++# ++CONFIG_KEYS=y ++# CONFIG_KEYS_REQUEST_CACHE is not set ++# CONFIG_PERSISTENT_KEYRINGS is not set ++# CONFIG_TRUSTED_KEYS is not set ++# CONFIG_ENCRYPTED_KEYS is not set ++# CONFIG_KEY_DH_OPERATIONS is not set ++# CONFIG_SECURITY_DMESG_RESTRICT is not set ++CONFIG_PROC_MEM_ALWAYS_FORCE=y ++# CONFIG_PROC_MEM_FORCE_PTRACE is not set ++# CONFIG_PROC_MEM_NO_FORCE is not set ++CONFIG_SECURITY=y ++CONFIG_SECURITYFS=y ++# CONFIG_SECURITY_NETWORK is not set ++# CONFIG_SECURITY_PATH is not set ++# CONFIG_HARDENED_USERCOPY is not set ++# CONFIG_FORTIFY_SOURCE is not set ++# CONFIG_STATIC_USERMODEHELPER is not set ++# CONFIG_SECURITY_SMACK is not set ++# CONFIG_SECURITY_TOMOYO is not set ++# CONFIG_SECURITY_APPARMOR is not set ++# CONFIG_SECURITY_LOADPIN is not set ++# CONFIG_SECURITY_YAMA is not set ++# CONFIG_SECURITY_SAFESETID is not set ++# CONFIG_SECURITY_LOCKDOWN_LSM is not set ++# CONFIG_SECURITY_LANDLOCK is not set ++# CONFIG_SECURITY_IPE is not set ++CONFIG_INTEGRITY=y ++# CONFIG_INTEGRITY_SIGNATURE is not set ++CONFIG_INTEGRITY_AUDIT=y ++# CONFIG_IMA is not set ++# CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set ++# CONFIG_EVM is not set ++CONFIG_DEFAULT_SECURITY_DAC=y ++CONFIG_LSM="landlock,lockdown,yama,loadpin,safesetid,bpf" ++ ++# ++# Kernel hardening options ++# ++ ++# ++# Memory initialization ++# ++CONFIG_CC_HAS_AUTO_VAR_INIT_PATTERN=y ++CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO_BARE=y ++CONFIG_CC_HAS_AUTO_VAR_INIT_ZERO=y ++# CONFIG_INIT_STACK_NONE is not set ++# CONFIG_INIT_STACK_ALL_PATTERN is not set ++CONFIG_INIT_STACK_ALL_ZERO=y ++# CONFIG_GCC_PLUGIN_STACKLEAK is not set ++# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set ++# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set ++CONFIG_CC_HAS_ZERO_CALL_USED_REGS=y ++# CONFIG_ZERO_CALL_USED_REGS is not set ++# end of Memory initialization ++ ++# ++# Hardening of kernel data structures ++# ++# CONFIG_LIST_HARDENED is not set ++# CONFIG_BUG_ON_DATA_CORRUPTION is not set ++# end of Hardening of kernel data structures ++ ++CONFIG_RANDSTRUCT_NONE=y ++# CONFIG_RANDSTRUCT_FULL is not set ++# CONFIG_RANDSTRUCT_PERFORMANCE is not set ++# end of Kernel hardening options ++# end of Security options ++ ++CONFIG_CRYPTO=y ++ ++# ++# Crypto core or helper ++# ++CONFIG_CRYPTO_ALGAPI=y ++CONFIG_CRYPTO_ALGAPI2=y ++CONFIG_CRYPTO_AEAD=y ++CONFIG_CRYPTO_AEAD2=y ++CONFIG_CRYPTO_SIG=y ++CONFIG_CRYPTO_SIG2=y ++CONFIG_CRYPTO_SKCIPHER=y ++CONFIG_CRYPTO_SKCIPHER2=y ++CONFIG_CRYPTO_HASH=y ++CONFIG_CRYPTO_HASH2=y ++CONFIG_CRYPTO_RNG=y ++CONFIG_CRYPTO_RNG2=y ++CONFIG_CRYPTO_RNG_DEFAULT=y ++CONFIG_CRYPTO_AKCIPHER2=y ++CONFIG_CRYPTO_AKCIPHER=y ++CONFIG_CRYPTO_KPP2=y ++CONFIG_CRYPTO_ACOMP2=y ++CONFIG_CRYPTO_MANAGER=y ++CONFIG_CRYPTO_MANAGER2=y ++CONFIG_CRYPTO_USER=y ++CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y ++CONFIG_CRYPTO_NULL=y ++CONFIG_CRYPTO_NULL2=y ++# CONFIG_CRYPTO_PCRYPT is not set ++# CONFIG_CRYPTO_CRYPTD is not set ++# CONFIG_CRYPTO_AUTHENC is not set ++# CONFIG_CRYPTO_TEST is not set ++# end of Crypto core or helper ++ ++# ++# Public-key cryptography ++# ++CONFIG_CRYPTO_RSA=y ++# CONFIG_CRYPTO_DH is not set ++# CONFIG_CRYPTO_ECDH is not set ++# CONFIG_CRYPTO_ECDSA is not set ++# CONFIG_CRYPTO_ECRDSA is not set ++# CONFIG_CRYPTO_CURVE25519 is not set ++# end of Public-key cryptography ++ ++# ++# Block ciphers ++# ++CONFIG_CRYPTO_AES=y ++# CONFIG_CRYPTO_AES_TI is not set ++# CONFIG_CRYPTO_ARIA is not set ++# CONFIG_CRYPTO_BLOWFISH is not set ++# CONFIG_CRYPTO_CAMELLIA is not set ++# CONFIG_CRYPTO_CAST5 is not set ++# CONFIG_CRYPTO_CAST6 is not set ++# CONFIG_CRYPTO_DES is not set ++# CONFIG_CRYPTO_FCRYPT is not set ++# CONFIG_CRYPTO_SERPENT is not set ++# CONFIG_CRYPTO_SM4_GENERIC is not set ++# CONFIG_CRYPTO_TWOFISH is not set ++# end of Block ciphers ++ ++# ++# Length-preserving ciphers and modes ++# ++# CONFIG_CRYPTO_ADIANTUM is not set ++# CONFIG_CRYPTO_CHACHA20 is not set ++# CONFIG_CRYPTO_CBC is not set ++# CONFIG_CRYPTO_CTR is not set ++# CONFIG_CRYPTO_CTS is not set ++CONFIG_CRYPTO_ECB=y ++# CONFIG_CRYPTO_HCTR2 is not set ++# CONFIG_CRYPTO_KEYWRAP is not set ++# CONFIG_CRYPTO_LRW is not set ++# CONFIG_CRYPTO_PCBC is not set ++# CONFIG_CRYPTO_XTS is not set ++# end of Length-preserving ciphers and modes ++ ++# ++# AEAD (authenticated encryption with associated data) ciphers ++# ++# CONFIG_CRYPTO_AEGIS128 is not set ++# CONFIG_CRYPTO_CHACHA20POLY1305 is not set ++# CONFIG_CRYPTO_CCM is not set ++# CONFIG_CRYPTO_GCM is not set ++CONFIG_CRYPTO_GENIV=y ++# CONFIG_CRYPTO_SEQIV is not set ++CONFIG_CRYPTO_ECHAINIV=y ++# CONFIG_CRYPTO_ESSIV is not set ++# end of AEAD (authenticated encryption with associated data) ciphers ++ ++# ++# Hashes, digests, and MACs ++# ++# CONFIG_CRYPTO_BLAKE2B is not set ++# CONFIG_CRYPTO_CMAC is not set ++# CONFIG_CRYPTO_GHASH is not set ++CONFIG_CRYPTO_HMAC=y ++# CONFIG_CRYPTO_MD4 is not set ++# CONFIG_CRYPTO_MD5 is not set ++# CONFIG_CRYPTO_MICHAEL_MIC is not set ++# CONFIG_CRYPTO_POLY1305 is not set ++# CONFIG_CRYPTO_RMD160 is not set ++CONFIG_CRYPTO_SHA1=y ++CONFIG_CRYPTO_SHA256=y ++CONFIG_CRYPTO_SHA512=y ++CONFIG_CRYPTO_SHA3=y ++# CONFIG_CRYPTO_SM3_GENERIC is not set ++# CONFIG_CRYPTO_STREEBOG is not set ++# CONFIG_CRYPTO_VMAC is not set ++# CONFIG_CRYPTO_WP512 is not set ++# CONFIG_CRYPTO_XCBC is not set ++# CONFIG_CRYPTO_XXHASH is not set ++# end of Hashes, digests, and MACs ++ ++# ++# CRCs (cyclic redundancy checks) ++# ++CONFIG_CRYPTO_CRC32C=y ++# CONFIG_CRYPTO_CRC32 is not set ++CONFIG_CRYPTO_CRCT10DIF=y ++CONFIG_CRYPTO_CRC64_ROCKSOFT=y ++# end of CRCs (cyclic redundancy checks) ++ ++# ++# Compression ++# ++# CONFIG_CRYPTO_DEFLATE is not set ++CONFIG_CRYPTO_LZO=y ++# CONFIG_CRYPTO_842 is not set ++# CONFIG_CRYPTO_LZ4 is not set ++# CONFIG_CRYPTO_LZ4HC is not set ++# CONFIG_CRYPTO_ZSTD is not set ++# end of Compression ++ ++# ++# Random number generation ++# ++CONFIG_CRYPTO_ANSI_CPRNG=y ++CONFIG_CRYPTO_DRBG_MENU=y ++CONFIG_CRYPTO_DRBG_HMAC=y ++# CONFIG_CRYPTO_DRBG_HASH is not set ++# CONFIG_CRYPTO_DRBG_CTR is not set ++CONFIG_CRYPTO_DRBG=y ++CONFIG_CRYPTO_JITTERENTROPY=y ++CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKS=64 ++CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE=32 ++CONFIG_CRYPTO_JITTERENTROPY_OSR=1 ++# end of Random number generation ++ ++# ++# Userspace interface ++# ++# CONFIG_CRYPTO_USER_API_HASH is not set ++# CONFIG_CRYPTO_USER_API_SKCIPHER is not set ++# CONFIG_CRYPTO_USER_API_RNG is not set ++# CONFIG_CRYPTO_USER_API_AEAD is not set ++# end of Userspace interface ++ ++CONFIG_CRYPTO_HASH_INFO=y ++# CONFIG_CRYPTO_NHPOLY1305_NEON is not set ++# CONFIG_CRYPTO_CHACHA20_NEON is not set ++ ++# ++# Accelerated Cryptographic Algorithms for CPU (arm64) ++# ++CONFIG_CRYPTO_GHASH_ARM64_CE=y ++# CONFIG_CRYPTO_POLY1305_NEON is not set ++CONFIG_CRYPTO_SHA1_ARM64_CE=y ++CONFIG_CRYPTO_SHA256_ARM64=y ++CONFIG_CRYPTO_SHA2_ARM64_CE=y ++# CONFIG_CRYPTO_SHA512_ARM64 is not set ++# CONFIG_CRYPTO_SHA512_ARM64_CE is not set ++# CONFIG_CRYPTO_SHA3_ARM64 is not set ++# CONFIG_CRYPTO_SM3_NEON is not set ++# CONFIG_CRYPTO_SM3_ARM64_CE is not set ++# CONFIG_CRYPTO_POLYVAL_ARM64_CE is not set ++# CONFIG_CRYPTO_AES_ARM64 is not set ++CONFIG_CRYPTO_AES_ARM64_CE=y ++CONFIG_CRYPTO_AES_ARM64_CE_BLK=y ++# CONFIG_CRYPTO_AES_ARM64_NEON_BLK is not set ++# CONFIG_CRYPTO_AES_ARM64_BS is not set ++# CONFIG_CRYPTO_SM4_ARM64_CE is not set ++# CONFIG_CRYPTO_SM4_ARM64_CE_BLK is not set ++# CONFIG_CRYPTO_SM4_ARM64_NEON_BLK is not set ++CONFIG_CRYPTO_AES_ARM64_CE_CCM=y ++# CONFIG_CRYPTO_SM4_ARM64_CE_CCM is not set ++# CONFIG_CRYPTO_SM4_ARM64_CE_GCM is not set ++# CONFIG_CRYPTO_CRCT10DIF_ARM64_CE is not set ++# end of Accelerated Cryptographic Algorithms for CPU (arm64) ++ ++CONFIG_CRYPTO_HW=y ++CONFIG_CRYPTO_DEV_ALLWINNER=y ++# CONFIG_CRYPTO_DEV_SUN4I_SS is not set ++# CONFIG_CRYPTO_DEV_SUN8I_CE is not set ++# CONFIG_CRYPTO_DEV_SUN8I_SS is not set ++# CONFIG_CRYPTO_DEV_FSL_CAAM is not set ++# CONFIG_CRYPTO_DEV_FSL_DPAA2_CAAM is not set ++# CONFIG_CRYPTO_DEV_SAHARA is not set ++# CONFIG_CRYPTO_DEV_EXYNOS_RNG is not set ++# CONFIG_CRYPTO_DEV_S5P is not set ++# CONFIG_CRYPTO_DEV_ATMEL_ECC is not set ++# CONFIG_CRYPTO_DEV_ATMEL_SHA204A is not set ++# CONFIG_CRYPTO_DEV_CCP is not set ++# CONFIG_CRYPTO_DEV_MXS_DCP is not set ++# CONFIG_CAVIUM_CPT is not set ++# CONFIG_CRYPTO_DEV_NITROX_CNN55XX is not set ++# CONFIG_CRYPTO_DEV_MARVELL_CESA is not set ++# CONFIG_CRYPTO_DEV_OCTEONTX_CPT is not set ++# CONFIG_CRYPTO_DEV_OCTEONTX2_CPT is not set ++# CONFIG_CRYPTO_DEV_KEEMBAY_OCS_AES_SM4 is not set ++# CONFIG_CRYPTO_DEV_KEEMBAY_OCS_ECC is not set ++# CONFIG_CRYPTO_DEV_KEEMBAY_OCS_HCU is not set ++# CONFIG_CRYPTO_DEV_QAT_DH895xCC is not set ++# CONFIG_CRYPTO_DEV_QAT_C3XXX is not set ++# CONFIG_CRYPTO_DEV_QAT_C62X is not set ++# CONFIG_CRYPTO_DEV_QAT_4XXX is not set ++# CONFIG_CRYPTO_DEV_QAT_420XX is not set ++# CONFIG_CRYPTO_DEV_QAT_DH895xCCVF is not set ++# CONFIG_CRYPTO_DEV_QAT_C3XXXVF is not set ++# CONFIG_CRYPTO_DEV_QAT_C62XVF is not set ++# CONFIG_CRYPTO_DEV_CAVIUM_ZIP is not set ++# CONFIG_CRYPTO_DEV_QCE is not set ++# CONFIG_CRYPTO_DEV_QCOM_RNG is not set ++# CONFIG_CRYPTO_DEV_ROCKCHIP is not set ++# CONFIG_CRYPTO_DEV_ZYNQMP_AES is not set ++# CONFIG_CRYPTO_DEV_ZYNQMP_SHA3 is not set ++# CONFIG_CRYPTO_DEV_VIRTIO is not set ++# CONFIG_CRYPTO_DEV_BCM_SPU is not set ++# CONFIG_CRYPTO_DEV_STM32_CRC is not set ++# CONFIG_CRYPTO_DEV_STM32_HASH is not set ++# CONFIG_CRYPTO_DEV_STM32_CRYP is not set ++# CONFIG_CRYPTO_DEV_SAFEXCEL is not set ++# CONFIG_CRYPTO_DEV_CCREE is not set ++# CONFIG_CRYPTO_DEV_HISI_SEC is not set ++# CONFIG_CRYPTO_DEV_HISI_SEC2 is not set ++# CONFIG_CRYPTO_DEV_HISI_ZIP is not set ++# CONFIG_CRYPTO_DEV_HISI_HPRE is not set ++# CONFIG_CRYPTO_DEV_HISI_TRNG is not set ++# CONFIG_CRYPTO_DEV_AMLOGIC_GXL is not set ++# CONFIG_CRYPTO_DEV_SA2UL is not set ++CONFIG_ASYMMETRIC_KEY_TYPE=y ++CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y ++CONFIG_X509_CERTIFICATE_PARSER=y ++# CONFIG_PKCS8_PRIVATE_KEY_PARSER is not set ++CONFIG_PKCS7_MESSAGE_PARSER=y ++# CONFIG_FIPS_SIGNATURE_SELFTEST is not set ++ ++# ++# Certificates for signature checking ++# ++CONFIG_SYSTEM_TRUSTED_KEYRING=y ++CONFIG_SYSTEM_TRUSTED_KEYS="" ++# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set ++# CONFIG_SECONDARY_TRUSTED_KEYRING is not set ++# CONFIG_SYSTEM_BLACKLIST_KEYRING is not set ++# end of Certificates for signature checking ++ ++CONFIG_BINARY_PRINTF=y ++ ++# ++# Library routines ++# ++CONFIG_LINEAR_RANGES=y ++CONFIG_PACKING=y ++CONFIG_BITREVERSE=y ++CONFIG_HAVE_ARCH_BITREVERSE=y ++CONFIG_GENERIC_STRNCPY_FROM_USER=y ++CONFIG_GENERIC_STRNLEN_USER=y ++CONFIG_GENERIC_NET_UTILS=y ++# CONFIG_CORDIC is not set ++# CONFIG_PRIME_NUMBERS is not set ++CONFIG_RATIONAL=y ++CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y ++CONFIG_ARCH_HAS_FAST_MULTIPLIER=y ++CONFIG_ARCH_USE_SYM_ANNOTATIONS=y ++CONFIG_INDIRECT_PIO=y ++ ++# ++# Crypto library routines ++# ++CONFIG_CRYPTO_LIB_UTILS=y ++CONFIG_CRYPTO_LIB_AES=y ++CONFIG_CRYPTO_LIB_GF128MUL=y ++CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y ++# CONFIG_CRYPTO_LIB_CHACHA is not set ++# CONFIG_CRYPTO_LIB_CURVE25519 is not set ++CONFIG_CRYPTO_LIB_POLY1305_RSIZE=9 ++# CONFIG_CRYPTO_LIB_POLY1305 is not set ++# CONFIG_CRYPTO_LIB_CHACHA20POLY1305 is not set ++CONFIG_CRYPTO_LIB_SHA1=y ++CONFIG_CRYPTO_LIB_SHA256=y ++# end of Crypto library routines ++ ++# CONFIG_CRC_CCITT is not set ++CONFIG_CRC16=y ++CONFIG_CRC_T10DIF=y ++CONFIG_CRC64_ROCKSOFT=y ++CONFIG_CRC_ITU_T=y ++CONFIG_CRC32=y ++# CONFIG_CRC32_SELFTEST is not set ++CONFIG_CRC32_SLICEBY8=y ++# CONFIG_CRC32_SLICEBY4 is not set ++# CONFIG_CRC32_SARWATE is not set ++# CONFIG_CRC32_BIT is not set ++CONFIG_CRC64=y ++# CONFIG_CRC4 is not set ++CONFIG_CRC7=y ++# CONFIG_LIBCRC32C is not set ++CONFIG_CRC8=y ++CONFIG_XXHASH=y ++CONFIG_AUDIT_GENERIC=y ++CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y ++CONFIG_AUDIT_COMPAT_GENERIC=y ++# CONFIG_RANDOM32_SELFTEST is not set ++CONFIG_ZLIB_INFLATE=y ++CONFIG_ZLIB_DEFLATE=y ++CONFIG_LZO_COMPRESS=y ++CONFIG_LZO_DECOMPRESS=y ++CONFIG_LZ4_DECOMPRESS=y ++CONFIG_ZSTD_COMMON=y ++CONFIG_ZSTD_DECOMPRESS=y ++CONFIG_XZ_DEC=y ++CONFIG_XZ_DEC_X86=y ++CONFIG_XZ_DEC_POWERPC=y ++CONFIG_XZ_DEC_ARM=y ++CONFIG_XZ_DEC_ARMTHUMB=y ++CONFIG_XZ_DEC_ARM64=y ++CONFIG_XZ_DEC_SPARC=y ++CONFIG_XZ_DEC_RISCV=y ++# CONFIG_XZ_DEC_MICROLZMA is not set ++CONFIG_XZ_DEC_BCJ=y ++# CONFIG_XZ_DEC_TEST is not set ++CONFIG_DECOMPRESS_GZIP=y ++CONFIG_DECOMPRESS_BZIP2=y ++CONFIG_DECOMPRESS_LZMA=y ++CONFIG_DECOMPRESS_XZ=y ++CONFIG_DECOMPRESS_LZO=y ++CONFIG_DECOMPRESS_LZ4=y ++CONFIG_DECOMPRESS_ZSTD=y ++CONFIG_GENERIC_ALLOCATOR=y ++CONFIG_INTERVAL_TREE=y ++CONFIG_XARRAY_MULTI=y ++CONFIG_ASSOCIATIVE_ARRAY=y ++CONFIG_HAS_IOMEM=y ++CONFIG_HAS_IOPORT=y ++CONFIG_HAS_IOPORT_MAP=y ++CONFIG_HAS_DMA=y ++CONFIG_DMA_OPS_HELPERS=y ++CONFIG_NEED_SG_DMA_FLAGS=y ++CONFIG_NEED_SG_DMA_LENGTH=y ++CONFIG_NEED_DMA_MAP_STATE=y ++CONFIG_ARCH_DMA_ADDR_T_64BIT=y ++CONFIG_DMA_DECLARE_COHERENT=y ++CONFIG_ARCH_HAS_SETUP_DMA_OPS=y ++CONFIG_ARCH_HAS_SYNC_DMA_FOR_DEVICE=y ++CONFIG_ARCH_HAS_SYNC_DMA_FOR_CPU=y ++CONFIG_ARCH_HAS_DMA_PREP_COHERENT=y ++CONFIG_SWIOTLB=y ++# CONFIG_SWIOTLB_DYNAMIC is not set ++CONFIG_DMA_BOUNCE_UNALIGNED_KMALLOC=y ++CONFIG_DMA_NEED_SYNC=y ++CONFIG_DMA_RESTRICTED_POOL=y ++CONFIG_DMA_NONCOHERENT_MMAP=y ++CONFIG_DMA_COHERENT_POOL=y ++CONFIG_DMA_DIRECT_REMAP=y ++CONFIG_DMA_CMA=y ++# CONFIG_DMA_NUMA_CMA is not set ++ ++# ++# Default contiguous memory area size: ++# ++CONFIG_CMA_SIZE_MBYTES=32 ++CONFIG_CMA_SIZE_SEL_MBYTES=y ++# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set ++# CONFIG_CMA_SIZE_SEL_MIN is not set ++# CONFIG_CMA_SIZE_SEL_MAX is not set ++CONFIG_CMA_ALIGNMENT=8 ++# CONFIG_DMA_API_DEBUG is not set ++# CONFIG_DMA_MAP_BENCHMARK is not set ++CONFIG_SGL_ALLOC=y ++CONFIG_CPU_RMAP=y ++CONFIG_DQL=y ++CONFIG_GLOB=y ++# CONFIG_GLOB_SELFTEST is not set ++CONFIG_NLATTR=y ++CONFIG_CLZ_TAB=y ++CONFIG_IRQ_POLL=y ++CONFIG_MPILIB=y ++CONFIG_DIMLIB=y ++CONFIG_LIBFDT=y ++CONFIG_OID_REGISTRY=y ++CONFIG_UCS2_STRING=y ++CONFIG_HAVE_GENERIC_VDSO=y ++CONFIG_GENERIC_GETTIMEOFDAY=y ++CONFIG_GENERIC_VDSO_TIME_NS=y ++CONFIG_VDSO_GETRANDOM=y ++CONFIG_FONT_SUPPORT=y ++# CONFIG_FONTS is not set ++CONFIG_FONT_8x8=y ++CONFIG_FONT_8x16=y ++CONFIG_SG_POOL=y ++CONFIG_MEMREGION=y ++CONFIG_ARCH_STACKWALK=y ++CONFIG_STACKDEPOT=y ++CONFIG_STACKDEPOT_MAX_FRAMES=64 ++CONFIG_SBITMAP=y ++# CONFIG_LWQ_TEST is not set ++# end of Library routines ++ ++CONFIG_GENERIC_IOREMAP=y ++CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y ++CONFIG_FIRMWARE_TABLE=y ++ ++# ++# Kernel hacking ++# ++ ++# ++# printk and dmesg options ++# ++CONFIG_PRINTK_TIME=y ++# CONFIG_PRINTK_CALLER is not set ++# CONFIG_STACKTRACE_BUILD_ID is not set ++CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7 ++CONFIG_CONSOLE_LOGLEVEL_QUIET=4 ++CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 ++# CONFIG_BOOT_PRINTK_DELAY is not set ++# CONFIG_DYNAMIC_DEBUG is not set ++# CONFIG_DYNAMIC_DEBUG_CORE is not set ++CONFIG_SYMBOLIC_ERRNAME=y ++CONFIG_DEBUG_BUGVERBOSE=y ++# end of printk and dmesg options ++ ++CONFIG_DEBUG_KERNEL=y ++CONFIG_DEBUG_MISC=y ++ ++# ++# Compile-time checks and compiler options ++# ++CONFIG_DEBUG_INFO=y ++CONFIG_AS_HAS_NON_CONST_ULEB128=y ++# CONFIG_DEBUG_INFO_NONE is not set ++CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y ++# CONFIG_DEBUG_INFO_DWARF4 is not set ++# CONFIG_DEBUG_INFO_DWARF5 is not set ++CONFIG_DEBUG_INFO_REDUCED=y ++CONFIG_DEBUG_INFO_COMPRESSED_NONE=y ++# CONFIG_DEBUG_INFO_COMPRESSED_ZLIB is not set ++# CONFIG_DEBUG_INFO_SPLIT is not set ++# CONFIG_GDB_SCRIPTS is not set ++CONFIG_FRAME_WARN=2048 ++# CONFIG_STRIP_ASM_SYMS is not set ++# CONFIG_READABLE_ASM is not set ++# CONFIG_HEADERS_INSTALL is not set ++# CONFIG_DEBUG_SECTION_MISMATCH is not set ++CONFIG_SECTION_MISMATCH_WARN_ONLY=y ++CONFIG_ARCH_WANT_FRAME_POINTERS=y ++CONFIG_FRAME_POINTER=y ++# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set ++# end of Compile-time checks and compiler options ++ ++# ++# Generic Kernel Debugging Instruments ++# ++CONFIG_MAGIC_SYSRQ=y ++CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1 ++CONFIG_MAGIC_SYSRQ_SERIAL=y ++CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE="" ++CONFIG_DEBUG_FS=y ++CONFIG_DEBUG_FS_ALLOW_ALL=y ++# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set ++# CONFIG_DEBUG_FS_ALLOW_NONE is not set ++CONFIG_HAVE_ARCH_KGDB=y ++# CONFIG_KGDB is not set ++CONFIG_ARCH_HAS_UBSAN=y ++# CONFIG_UBSAN is not set ++CONFIG_HAVE_KCSAN_COMPILER=y ++# end of Generic Kernel Debugging Instruments ++ ++# ++# Networking Debugging ++# ++# CONFIG_NET_DEV_REFCNT_TRACKER is not set ++# CONFIG_NET_NS_REFCNT_TRACKER is not set ++# CONFIG_DEBUG_NET is not set ++# end of Networking Debugging ++ ++# ++# Memory Debugging ++# ++# CONFIG_PAGE_EXTENSION is not set ++# CONFIG_DEBUG_PAGEALLOC is not set ++CONFIG_SLUB_DEBUG=y ++# CONFIG_SLUB_DEBUG_ON is not set ++# CONFIG_PAGE_OWNER is not set ++# CONFIG_PAGE_TABLE_CHECK is not set ++# CONFIG_PAGE_POISONING is not set ++# CONFIG_DEBUG_RODATA_TEST is not set ++CONFIG_ARCH_HAS_DEBUG_WX=y ++# CONFIG_DEBUG_WX is not set ++CONFIG_GENERIC_PTDUMP=y ++# CONFIG_PTDUMP_DEBUGFS is not set ++CONFIG_HAVE_DEBUG_KMEMLEAK=y ++# CONFIG_DEBUG_KMEMLEAK is not set ++# CONFIG_PER_VMA_LOCK_STATS is not set ++# CONFIG_DEBUG_OBJECTS is not set ++# CONFIG_SHRINKER_DEBUG is not set ++# CONFIG_DEBUG_STACK_USAGE is not set ++# CONFIG_SCHED_STACK_END_CHECK is not set ++CONFIG_ARCH_HAS_DEBUG_VM_PGTABLE=y ++# CONFIG_DEBUG_VM is not set ++# CONFIG_DEBUG_VM_PGTABLE is not set ++CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y ++# CONFIG_DEBUG_VIRTUAL is not set ++CONFIG_DEBUG_MEMORY_INIT=y ++# CONFIG_DEBUG_PER_CPU_MAPS is not set ++# CONFIG_MEM_ALLOC_PROFILING is not set ++CONFIG_HAVE_ARCH_KASAN=y ++CONFIG_HAVE_ARCH_KASAN_SW_TAGS=y ++CONFIG_HAVE_ARCH_KASAN_HW_TAGS=y ++CONFIG_HAVE_ARCH_KASAN_VMALLOC=y ++CONFIG_CC_HAS_KASAN_GENERIC=y ++CONFIG_CC_HAS_KASAN_SW_TAGS=y ++CONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y ++# CONFIG_KASAN is not set ++CONFIG_HAVE_ARCH_KFENCE=y ++# CONFIG_KFENCE is not set ++# end of Memory Debugging ++ ++# CONFIG_DEBUG_SHIRQ is not set ++ ++# ++# Debug Oops, Lockups and Hangs ++# ++# CONFIG_PANIC_ON_OOPS is not set ++CONFIG_PANIC_ON_OOPS_VALUE=0 ++CONFIG_PANIC_TIMEOUT=0 ++CONFIG_LOCKUP_DETECTOR=y ++CONFIG_SOFTLOCKUP_DETECTOR=y ++CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=0 ++CONFIG_HAVE_HARDLOCKUP_DETECTOR_BUDDY=y ++CONFIG_HARDLOCKUP_DETECTOR_BUDDY=y ++CONFIG_HARDLOCKUP_DETECTOR=y ++CONFIG_HARDLOCKUP_DETECTOR_COUNTS_HRTIMER=y ++CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=0 ++CONFIG_DETECT_HUNG_TASK=y ++CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10 ++CONFIG_BOOTPARAM_HUNG_TASK_PANIC=0 ++# CONFIG_WQ_WATCHDOG is not set ++# CONFIG_WQ_CPU_INTENSIVE_REPORT is not set ++# CONFIG_TEST_LOCKUP is not set ++# end of Debug Oops, Lockups and Hangs ++ ++# ++# Scheduler Debugging ++# ++# CONFIG_SCHED_DEBUG is not set ++CONFIG_SCHED_INFO=y ++# CONFIG_SCHEDSTATS is not set ++# end of Scheduler Debugging ++ ++# CONFIG_DEBUG_TIMEKEEPING is not set ++# CONFIG_DEBUG_PREEMPT is not set ++ ++# ++# Lock Debugging (spinlocks, mutexes, etc...) ++# ++CONFIG_LOCK_DEBUGGING_SUPPORT=y ++# CONFIG_PROVE_LOCKING is not set ++# CONFIG_LOCK_STAT is not set ++# CONFIG_DEBUG_RT_MUTEXES is not set ++# CONFIG_DEBUG_SPINLOCK is not set ++# CONFIG_DEBUG_MUTEXES is not set ++# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set ++# CONFIG_DEBUG_RWSEMS is not set ++# CONFIG_DEBUG_LOCK_ALLOC is not set ++# CONFIG_DEBUG_ATOMIC_SLEEP is not set ++# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set ++# CONFIG_LOCK_TORTURE_TEST is not set ++# CONFIG_WW_MUTEX_SELFTEST is not set ++# CONFIG_SCF_TORTURE_TEST is not set ++# CONFIG_CSD_LOCK_WAIT_DEBUG is not set ++# end of Lock Debugging (spinlocks, mutexes, etc...) ++ ++# CONFIG_DEBUG_IRQFLAGS is not set ++CONFIG_STACKTRACE=y ++# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set ++# CONFIG_DEBUG_KOBJECT is not set ++ ++# ++# Debug kernel data structures ++# ++# CONFIG_DEBUG_LIST is not set ++# CONFIG_DEBUG_PLIST is not set ++# CONFIG_DEBUG_SG is not set ++# CONFIG_DEBUG_NOTIFIERS is not set ++# CONFIG_DEBUG_MAPLE_TREE is not set ++# end of Debug kernel data structures ++ ++# ++# RCU Debugging ++# ++# CONFIG_RCU_SCALE_TEST is not set ++# CONFIG_RCU_TORTURE_TEST is not set ++# CONFIG_RCU_REF_SCALE_TEST is not set ++CONFIG_RCU_CPU_STALL_TIMEOUT=21 ++CONFIG_RCU_EXP_CPU_STALL_TIMEOUT=0 ++# CONFIG_RCU_CPU_STALL_CPUTIME is not set ++CONFIG_RCU_TRACE=y ++# CONFIG_RCU_EQS_DEBUG is not set ++# end of RCU Debugging ++ ++# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set ++# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set ++# CONFIG_LATENCYTOP is not set ++CONFIG_USER_STACKTRACE_SUPPORT=y ++CONFIG_HAVE_FUNCTION_TRACER=y ++CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y ++CONFIG_HAVE_FUNCTION_GRAPH_RETVAL=y ++CONFIG_HAVE_DYNAMIC_FTRACE=y ++CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS=y ++CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y ++CONFIG_HAVE_SYSCALL_TRACEPOINTS=y ++CONFIG_HAVE_C_RECORDMCOUNT=y ++CONFIG_TRACE_CLOCK=y ++CONFIG_TRACING_SUPPORT=y ++# CONFIG_FTRACE is not set ++# CONFIG_SAMPLES is not set ++CONFIG_HAVE_SAMPLE_FTRACE_DIRECT=y ++CONFIG_HAVE_SAMPLE_FTRACE_DIRECT_MULTI=y ++CONFIG_STRICT_DEVMEM=y ++# CONFIG_IO_STRICT_DEVMEM is not set ++ ++# ++# arm64 Debugging ++# ++# CONFIG_PID_IN_CONTEXTIDR is not set ++# CONFIG_DEBUG_EFI is not set ++# CONFIG_ARM64_RELOC_TEST is not set ++# CONFIG_CORESIGHT is not set ++# end of arm64 Debugging ++ ++# ++# Kernel Testing and Coverage ++# ++# CONFIG_KUNIT is not set ++# CONFIG_NOTIFIER_ERROR_INJECTION is not set ++# CONFIG_FAULT_INJECTION is not set ++CONFIG_ARCH_HAS_KCOV=y ++CONFIG_CC_HAS_SANCOV_TRACE_PC=y ++# CONFIG_KCOV is not set ++CONFIG_RUNTIME_TESTING_MENU=y ++# CONFIG_TEST_DHRY is not set ++# CONFIG_LKDTM is not set ++# CONFIG_TEST_MIN_HEAP is not set ++# CONFIG_TEST_DIV64 is not set ++# CONFIG_TEST_MULDIV64 is not set ++# CONFIG_BACKTRACE_SELF_TEST is not set ++# CONFIG_TEST_REF_TRACKER is not set ++# CONFIG_RBTREE_TEST is not set ++# CONFIG_REED_SOLOMON_TEST is not set ++# CONFIG_INTERVAL_TREE_TEST is not set ++# CONFIG_PERCPU_TEST is not set ++# CONFIG_ATOMIC64_SELFTEST is not set ++# CONFIG_TEST_HEXDUMP is not set ++# CONFIG_TEST_KSTRTOX is not set ++# CONFIG_TEST_PRINTF is not set ++# CONFIG_TEST_SCANF is not set ++# CONFIG_TEST_BITMAP is not set ++# CONFIG_TEST_UUID is not set ++# CONFIG_TEST_XARRAY is not set ++# CONFIG_TEST_MAPLE_TREE is not set ++# CONFIG_TEST_RHASHTABLE is not set ++# CONFIG_TEST_IDA is not set ++# CONFIG_TEST_LKM is not set ++# CONFIG_TEST_BITOPS is not set ++# CONFIG_TEST_VMALLOC is not set ++# CONFIG_TEST_BPF is not set ++# CONFIG_TEST_BLACKHOLE_DEV is not set ++# CONFIG_FIND_BIT_BENCHMARK is not set ++# CONFIG_TEST_FIRMWARE is not set ++# CONFIG_TEST_SYSCTL is not set ++# CONFIG_TEST_UDELAY is not set ++# CONFIG_TEST_STATIC_KEYS is not set ++# CONFIG_TEST_KMOD is not set ++# CONFIG_TEST_MEMCAT_P is not set ++# CONFIG_TEST_MEMINIT is not set ++# CONFIG_TEST_FREE_PAGES is not set ++# CONFIG_TEST_FPU is not set ++# CONFIG_TEST_OBJPOOL is not set ++CONFIG_ARCH_USE_MEMTEST=y ++CONFIG_MEMTEST=y ++# end of Kernel Testing and Coverage ++ ++# ++# Rust hacking ++# ++# end of Rust hacking diff --git a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0-patches.inc b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0-patches.inc index 5b26ee4..f3621a9 100644 --- a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0-patches.inc +++ b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0-patches.inc @@ -1,6 +1,21 @@ -SRC_URI += "\ - file://0016-Makefile.patch \ - file://0005-bcm2711-rpi-4-b.dts.patch \ - file://0014-rpi4_64_defconfig.patch \ - file://0015-rpi4_64_nomodules_defconfig.patch \ -" +# Copyright (c) 2025-2026 EDGEMTech SA + +SRC_URI += "\ + file://0012-bcm283x-rpi-i2c0mux_0_44.dtsi.patch \ + file://0008-bcm2835-rpi.dtsi.patch \ + file://0007-bcm271x-rpi-bt.dtsi.patch \ + file://0011-bcm283x-rpi-csi1-2lane.dtsi.patch \ + file://0006-bcm2711-rpi.dtsi.patch \ + file://0015-Makefile.patch \ + file://0010-bcm283x-rpi-cam1-regulator.dtsi.patch \ + file://0005-bcm2711-rpi-4-b.dts.patch \ + file://0009-bcm283x.dtsi.patch \ + file://0002-bcm270x.dtsi.patch \ + file://0001-bcm2711-rpi-4-b.dts.patch \ + file://0014-rpi4_64_defconfig.patch \ + file://0003-bcm270x-rpi.dtsi.patch \ + file://0004-bcm2711.dtsi.patch \ + file://0013-bcm283x-rpi-usb-peripheral.dtsi.patch \ + file://0016-rpi4_64_nomodules_defconfig.patch \ + file://0017-rpi4_64_nomodules_soo_defconfig.patch \ +" \ No newline at end of file diff --git a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0001-bcm2711-rpi-4-b.dts.patch b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0001-bcm2711-rpi-4-b.dts.patch new file mode 100644 index 0000000..98e6ac6 --- /dev/null +++ b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0001-bcm2711-rpi-4-b.dts.patch @@ -0,0 +1,16 @@ +--- /home/rossierd/soo/infrabase/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts 2025-09-03 20:23:08.000000000 +0200 ++++ ./arch/arm/boot/dts/broadcom/bcm2711-rpi-4-b.dts 2025-09-04 17:36:47.567576517 +0200 +@@ -19,11 +19,12 @@ + compatible = "raspberrypi,4-model-b", "brcm,bcm2711"; + model = "Raspberry Pi 4 Model B"; + ++#if 0 + chosen { + /* 8250 auxiliary UART instead of pl011 */ + stdout-path = "serial1:115200n8"; + }; +- ++#endif + cam1_reg: regulator-cam1 { + compatible = "regulator-fixed"; + regulator-name = "cam1-reg"; diff --git a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0002-bcm270x.dtsi.patch b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0002-bcm270x.dtsi.patch new file mode 100644 index 0000000..8ee5f97 --- /dev/null +++ b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0002-bcm270x.dtsi.patch @@ -0,0 +1,206 @@ +--- /home/rossierd/soo/infrabase/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/arch/arm64/boot/dts/broadcom/bcm270x.dtsi 1970-01-01 01:00:00.000000000 +0100 ++++ ./arch/arm64/boot/dts/broadcom/bcm270x.dtsi 2025-05-05 20:19:23.871333855 +0200 +@@ -0,0 +1,203 @@ ++/* Downstream bcm283x.dtsi diff */ ++#include ++ ++/ { ++ chosen { ++ bootargs = "coherent_pool=1M snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1"; ++ /delete-property/ stdout-path; ++ }; ++ ++ soc: soc { ++ ++ watchdog: watchdog@7e100000 { ++ /* Add label */ ++ }; ++ ++ random: rng@7e104000 { ++ /* Add label */ ++ }; ++ ++ spi0: spi@7e204000 { ++ /* Add label */ ++ }; ++ ++#ifndef BCM2711 ++ pixelvalve0: pixelvalve@7e206000 { ++ /* Add label */ ++ status = "disabled"; ++ }; ++ ++ pixelvalve1: pixelvalve@7e207000 { ++ /* Add label */ ++ status = "disabled"; ++ }; ++#endif ++ ++ /delete-node/ sdhci@7e300000; ++ ++ sdhci: mmc: mmc@7e300000 { ++ compatible = "brcm,bcm2835-mmc", "brcm,bcm2835-sdhci"; ++ reg = <0x7e300000 0x100>; ++ interrupts = <2 30>; ++ clocks = <&clocks BCM2835_CLOCK_EMMC>; ++ dmas = <&dma 11>; ++ dma-names = "rx-tx"; ++ brcm,overclock-50 = <0>; ++ status = "disabled"; ++ }; ++ ++ /* A clone of mmc but with non-removable set */ ++ mmcnr: mmcnr@7e300000 { ++ compatible = "brcm,bcm2835-mmc", "brcm,bcm2835-sdhci"; ++ reg = <0x7e300000 0x100>; ++ interrupts = <2 30>; ++ clocks = <&clocks BCM2835_CLOCK_EMMC>; ++ dmas = <&dma 11>; ++ dma-names = "rx-tx"; ++ brcm,overclock-50 = <0>; ++ non-removable; ++ status = "disabled"; ++ }; ++ ++ hvs: hvs@7e400000 { ++ /* Add label */ ++ status = "disabled"; ++ }; ++ ++ firmwarekms: firmwarekms@7e600000 { ++ compatible = "raspberrypi,rpi-firmware-kms"; ++ /* SMI interrupt reg */ ++ reg = <0x7e600000 0x100>; ++ interrupts = <2 16>; ++ brcm,firmware = <&firmware>; ++ status = "disabled"; ++ }; ++ ++ smi: smi@7e600000 { ++ compatible = "brcm,bcm2835-smi"; ++ reg = <0x7e600000 0x100>; ++ interrupts = <2 16>; ++ clocks = <&clocks BCM2835_CLOCK_SMI>; ++ assigned-clocks = <&clocks BCM2835_CLOCK_SMI>; ++ assigned-clock-rates = <125000000>; ++ dmas = <&dma 4>; ++ dma-names = "rx-tx"; ++ status = "disabled"; ++ }; ++ ++ csi0: csi@7e800000 { ++ compatible = "brcm,bcm2835-unicam"; ++ reg = <0x7e800000 0x800>, ++ <0x7e802000 0x4>; ++ interrupts = <2 6>; ++ clocks = <&clocks BCM2835_CLOCK_CAM0>, ++ <&firmware_clocks 4>; ++ clock-names = "lp", "vpu"; ++ power-domains = <&power RPI_POWER_DOMAIN_UNICAM0>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ #clock-cells = <1>; ++ status = "disabled"; ++ }; ++ ++ csi1: csi@7e801000 { ++ compatible = "brcm,bcm2835-unicam"; ++ reg = <0x7e801000 0x800>, ++ <0x7e802004 0x4>; ++ interrupts = <2 7>; ++ clocks = <&clocks BCM2835_CLOCK_CAM1>, ++ <&firmware_clocks 4>; ++ clock-names = "lp", "vpu"; ++ power-domains = <&power RPI_POWER_DOMAIN_UNICAM1>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ #clock-cells = <1>; ++ status = "disabled"; ++ }; ++ ++#ifndef BCM2711 ++ pixelvalve2: pixelvalve@7e807000 { ++ /* Add label */ ++ status = "disabled"; ++ }; ++#endif ++ ++ hdmi@7e902000 { /* hdmi */ ++ status = "disabled"; ++ }; ++ ++ usb@7e980000 { /* usb */ ++ compatible = "brcm,bcm2708-usb"; ++ reg = <0x7e980000 0x10000>, ++ <0x7e006000 0x1000>; ++ interrupt-names = "usb", ++ "soft"; ++ interrupts = <1 9>, ++ <2 0>; ++ }; ++ ++#ifndef BCM2711 ++ v3d@7ec00000 { /* vd3 */ ++ compatible = "brcm,vc4-v3d"; ++ power-domains = <&power RPI_POWER_DOMAIN_V3D>; ++ status = "disabled"; ++ }; ++#endif ++ ++ axiperf: axiperf { ++ compatible = "brcm,bcm2835-axiperf"; ++ reg = <0x7e009800 0x100>, ++ <0x7ee08000 0x100>; ++ firmware = <&firmware>; ++ status = "disabled"; ++ }; ++ }; ++ ++ __overrides__ { ++ cam0-pwdn-ctrl; ++ cam0-pwdn; ++ cam0-led-ctrl; ++ cam0-led; ++ }; ++}; ++ ++&gpio { ++ interrupts = <2 17>, <2 18>; ++ ++ dpi_18bit_gpio0: dpi_18bit_gpio0 { ++ brcm,pins = <0 1 2 3 4 5 6 7 8 9 10 11 ++ 12 13 14 15 16 17 18 19 ++ 20 21>; ++ brcm,function = ; ++ }; ++ dpi_18bit_gpio2: dpi_18bit_gpio2 { ++ brcm,pins = <2 3 4 5 6 7 8 9 10 11 ++ 12 13 14 15 16 17 18 19 ++ 20 21>; ++ brcm,function = ; ++ }; ++}; ++ ++&uart0 { ++ /* Enable CTS bug workaround */ ++ cts-event-workaround; ++}; ++ ++&i2s { ++ #sound-dai-cells = <0>; ++ dmas = <&dma 2>, <&dma 3>; ++ dma-names = "tx", "rx"; ++}; ++ ++&sdhost { ++ dmas = <&dma (13|(1<<29))>; ++ dma-names = "rx-tx"; ++ bus-width = <4>; ++ brcm,overclock-50 = <0>; ++ brcm,pio-limit = <1>; ++}; ++ ++&spi0 { ++ dmas = <&dma 6>, <&dma 7>; ++ dma-names = "tx", "rx"; ++}; diff --git a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0003-bcm270x-rpi.dtsi.patch b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0003-bcm270x-rpi.dtsi.patch new file mode 100644 index 0000000..72ae72d --- /dev/null +++ b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0003-bcm270x-rpi.dtsi.patch @@ -0,0 +1,129 @@ +--- /home/rossierd/soo/infrabase/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/arch/arm64/boot/dts/broadcom/bcm270x-rpi.dtsi 1970-01-01 01:00:00.000000000 +0100 ++++ ./arch/arm64/boot/dts/broadcom/bcm270x-rpi.dtsi 2025-05-05 20:19:23.871333855 +0200 +@@ -0,0 +1,126 @@ ++/* Downstream modifications to bcm2835-rpi.dtsi */ ++ ++/ { ++ aliases { ++ audio = &audio; ++ aux = &aux; ++ sound = &sound; ++ dma = &dma; ++ mailbox = &mailbox; ++ ++ /* SOO.tech - avoid a compilation warning */ ++ /*gpio = &gpio;*/ ++ ++ uart0 = &uart0; ++ uart1 = &uart1; ++ sdhost = &sdhost; ++ mmc0 = &sdhost; ++ i2s = &i2s; ++ i2c0 = &i2c0; ++ i2c1 = &i2c1; ++ i2c10 = &i2c_csi_dsi; ++ spi1 = &spi1; ++ spi2 = &spi2; ++ usb = &usb; ++ leds = &leds; ++ fb = &fb; ++ thermal = &thermal; ++ }; ++ ++ /* Define these notional regulators for use by overlays */ ++ vdd_3v3_reg: fixedregulator_3v3 { ++ compatible = "regulator-fixed"; ++ regulator-always-on; ++ regulator-max-microvolt = <3300000>; ++ regulator-min-microvolt = <3300000>; ++ regulator-name = "3v3"; ++ }; ++ ++ vdd_5v0_reg: fixedregulator_5v0 { ++ compatible = "regulator-fixed"; ++ regulator-always-on; ++ regulator-max-microvolt = <5000000>; ++ regulator-min-microvolt = <5000000>; ++ regulator-name = "5v0"; ++ }; ++ ++ leds: leds { ++ compatible = "gpio-leds"; ++ }; ++ ++ soc { ++ gpiomem { ++ compatible = "brcm,bcm2835-gpiomem"; ++ reg = <0x7e200000 0x1000>; ++ }; ++ ++ fb: fb { ++ compatible = "brcm,bcm2708-fb"; ++ firmware = <&firmware>; ++ status = "okay"; ++ }; ++ ++ vcsm: vcsm { ++ compatible = "raspberrypi,bcm2835-vcsm"; ++ firmware = <&firmware>; ++ status = "okay"; ++ }; ++ ++ /* External sound card */ ++ sound: sound { ++ status = "disabled"; ++ }; ++ }; ++ ++}; ++ ++&uart0 { ++ skip-init; ++}; ++ ++&uart1 { ++ skip-init; ++}; ++ ++&txp { ++ status = "disabled"; ++}; ++ ++&i2c0if { ++ status = "disabled"; ++}; ++ ++&i2c0mux { ++ status = "disabled"; ++}; ++ ++&i2c1 { ++ status = "disabled"; ++}; ++ ++&clocks { ++ firmware = <&firmware>; ++}; ++ ++&sdhci { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&emmc_gpio48>; ++ bus-width = <4>; ++}; ++ ++&cpu_thermal { ++ /delete-node/ trips; ++}; ++ ++&vec { ++ status = "disabled"; ++}; ++ ++&vchiq { ++ /* Onboard audio */ ++ audio: bcm2835_audio { ++ compatible = "brcm,bcm2835-audio"; ++ brcm,pwm-channels = <8>; ++ status = "disabled"; ++ }; ++}; diff --git a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0004-bcm2711.dtsi.patch b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0004-bcm2711.dtsi.patch new file mode 100644 index 0000000..30cc855 --- /dev/null +++ b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0004-bcm2711.dtsi.patch @@ -0,0 +1,1164 @@ +--- /home/rossierd/soo/infrabase/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/arch/arm64/boot/dts/broadcom/bcm2711.dtsi 1970-01-01 01:00:00.000000000 +0100 ++++ ./arch/arm64/boot/dts/broadcom/bcm2711.dtsi 2025-05-05 20:19:23.871333855 +0200 +@@ -0,0 +1,1161 @@ ++// SPDX-License-Identifier: GPL-2.0 ++#include "bcm283x.dtsi" ++ ++#include ++#include ++ ++/ { ++ compatible = "brcm,bcm2711"; ++ ++ #address-cells = <2>; ++ #size-cells = <1>; ++ ++ interrupt-parent = <&gicv2>; ++ ++ vc4: gpu { ++ compatible = "brcm,bcm2711-vc5"; ++ status = "disabled"; ++ }; ++ ++ clk_27MHz: clk-27M { ++ #clock-cells = <0>; ++ compatible = "fixed-clock"; ++ clock-frequency = <27000000>; ++ clock-output-names = "27MHz-clock"; ++ }; ++ ++ clk_108MHz: clk-108M { ++ #clock-cells = <0>; ++ compatible = "fixed-clock"; ++ clock-frequency = <108000000>; ++ clock-output-names = "108MHz-clock"; ++ }; ++ ++ soc { ++ /* ++ * Defined ranges: ++ * Common BCM283x peripherals ++ * BCM2711-specific peripherals ++ * ARM-local peripherals ++ */ ++ ranges = <0x7e000000 0x0 0xfe000000 0x01800000>, ++ <0x7c000000 0x0 0xfc000000 0x02000000>, ++ <0x40000000 0x0 0xff800000 0x00800000>; ++ /* Emulate a contiguous 30-bit address range for DMA */ ++ dma-ranges = <0xc0000000 0x0 0x00000000 0x40000000>; ++ ++ /* ++ * This node is the provider for the enable-method for ++ * bringing up secondary cores. ++ */ ++ local_intc: local_intc@40000000 { ++ compatible = "brcm,bcm2836-l1-intc"; ++ reg = <0x40000000 0x100>; ++ }; ++ ++ gicv2: interrupt-controller@40041000 { ++ interrupt-controller; ++ #interrupt-cells = <3>; ++ compatible = "arm,gic-400"; ++ reg = <0x40041000 0x1000>, ++ <0x40042000 0x2000>, ++ <0x40044000 0x2000>, ++ <0x40046000 0x2000>; ++ interrupts = ; ++ }; ++ ++ avs_monitor: avs-monitor@7d5d2000 { ++ compatible = "brcm,bcm2711-avs-monitor", ++ "syscon", "simple-mfd"; ++ reg = <0x7d5d2000 0xf00>; ++ ++ thermal: thermal { ++ compatible = "brcm,bcm2711-thermal"; ++ #thermal-sensor-cells = <0>; ++ }; ++ }; ++ ++ dma: dma@7e007000 { ++ compatible = "brcm,bcm2835-dma"; ++ reg = <0x7e007000 0xb00>; ++ interrupts = , ++ , ++ , ++ , ++ , ++ , ++ , ++ /* DMA lite 7 - 10 */ ++ , ++ , ++ , ++ ; ++ interrupt-names = "dma0", ++ "dma1", ++ "dma2", ++ "dma3", ++ "dma4", ++ "dma5", ++ "dma6", ++ "dma7", ++ "dma8", ++ "dma9", ++ "dma10"; ++ #dma-cells = <1>; ++ brcm,dma-channel-mask = <0x07f5>; ++ }; ++ ++ pm: watchdog@7e100000 { ++ compatible = "brcm,bcm2835-pm", "brcm,bcm2835-pm-wdt"; ++ #power-domain-cells = <1>; ++ #reset-cells = <1>; ++ reg = <0x7e100000 0x114>, ++ <0x7e00a000 0x24>, ++ <0x7ec11000 0x20>; ++ clocks = <&clocks BCM2835_CLOCK_V3D>, ++ <&clocks BCM2835_CLOCK_PERI_IMAGE>, ++ <&clocks BCM2835_CLOCK_H264>, ++ <&clocks BCM2835_CLOCK_ISP>; ++ clock-names = "v3d", "peri_image", "h264", "isp"; ++ system-power-controller; ++ }; ++ ++ rng@7e104000 { ++ compatible = "brcm,bcm2711-rng200"; ++ reg = <0x7e104000 0x28>; ++ }; ++ ++ uart2: serial@7e201400 { ++ compatible = "arm,pl011", "arm,primecell"; ++ reg = <0x7e201400 0x200>; ++ interrupts = ; ++ clocks = <&clocks BCM2835_CLOCK_UART>, ++ <&clocks BCM2835_CLOCK_VPU>; ++ clock-names = "uartclk", "apb_pclk"; ++ arm,primecell-periphid = <0x00241011>; ++ status = "disabled"; ++ }; ++ ++ uart3: serial@7e201600 { ++ compatible = "arm,pl011", "arm,primecell"; ++ reg = <0x7e201600 0x200>; ++ interrupts = ; ++ clocks = <&clocks BCM2835_CLOCK_UART>, ++ <&clocks BCM2835_CLOCK_VPU>; ++ clock-names = "uartclk", "apb_pclk"; ++ arm,primecell-periphid = <0x00241011>; ++ status = "disabled"; ++ }; ++ ++ uart4: serial@7e201800 { ++ compatible = "arm,pl011", "arm,primecell"; ++ reg = <0x7e201800 0x200>; ++ interrupts = ; ++ clocks = <&clocks BCM2835_CLOCK_UART>, ++ <&clocks BCM2835_CLOCK_VPU>; ++ clock-names = "uartclk", "apb_pclk"; ++ arm,primecell-periphid = <0x00241011>; ++ status = "disabled"; ++ }; ++ ++ uart5: serial@7e201a00 { ++ compatible = "arm,pl011", "arm,primecell"; ++ reg = <0x7e201a00 0x200>; ++ interrupts = ; ++ clocks = <&clocks BCM2835_CLOCK_UART>, ++ <&clocks BCM2835_CLOCK_VPU>; ++ clock-names = "uartclk", "apb_pclk"; ++ arm,primecell-periphid = <0x00241011>; ++ status = "disabled"; ++ }; ++ ++ spi3: spi@7e204600 { ++ compatible = "brcm,bcm2835-spi"; ++ reg = <0x7e204600 0x0200>; ++ interrupts = ; ++ clocks = <&clocks BCM2835_CLOCK_VPU>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi4: spi@7e204800 { ++ compatible = "brcm,bcm2835-spi"; ++ reg = <0x7e204800 0x0200>; ++ interrupts = ; ++ clocks = <&clocks BCM2835_CLOCK_VPU>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi5: spi@7e204a00 { ++ compatible = "brcm,bcm2835-spi"; ++ reg = <0x7e204a00 0x0200>; ++ interrupts = ; ++ clocks = <&clocks BCM2835_CLOCK_VPU>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi6: spi@7e204c00 { ++ compatible = "brcm,bcm2835-spi"; ++ reg = <0x7e204c00 0x0200>; ++ interrupts = ; ++ clocks = <&clocks BCM2835_CLOCK_VPU>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c3: i2c@7e205600 { ++ compatible = "brcm,bcm2711-i2c", "brcm,bcm2835-i2c"; ++ reg = <0x7e205600 0x200>; ++ interrupts = ; ++ clocks = <&clocks BCM2835_CLOCK_VPU>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c4: i2c@7e205800 { ++ compatible = "brcm,bcm2711-i2c", "brcm,bcm2835-i2c"; ++ reg = <0x7e205800 0x200>; ++ interrupts = ; ++ clocks = <&clocks BCM2835_CLOCK_VPU>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c5: i2c@7e205a00 { ++ compatible = "brcm,bcm2711-i2c", "brcm,bcm2835-i2c"; ++ reg = <0x7e205a00 0x200>; ++ interrupts = ; ++ clocks = <&clocks BCM2835_CLOCK_VPU>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c6: i2c@7e205c00 { ++ compatible = "brcm,bcm2711-i2c", "brcm,bcm2835-i2c"; ++ reg = <0x7e205c00 0x200>; ++ interrupts = ; ++ clocks = <&clocks BCM2835_CLOCK_VPU>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ pixelvalve0: pixelvalve@7e206000 { ++ compatible = "brcm,bcm2711-pixelvalve0"; ++ reg = <0x7e206000 0x100>; ++ interrupts = ; ++ status = "disabled"; ++ }; ++ ++ pixelvalve1: pixelvalve@7e207000 { ++ compatible = "brcm,bcm2711-pixelvalve1"; ++ reg = <0x7e207000 0x100>; ++ interrupts = ; ++ status = "disabled"; ++ }; ++ ++ pixelvalve2: pixelvalve@7e20a000 { ++ compatible = "brcm,bcm2711-pixelvalve2"; ++ reg = <0x7e20a000 0x100>; ++ interrupts = ; ++ status = "disabled"; ++ }; ++ ++ pwm1: pwm@7e20c800 { ++ compatible = "brcm,bcm2835-pwm"; ++ reg = <0x7e20c800 0x28>; ++ clocks = <&clocks BCM2835_CLOCK_PWM>; ++ assigned-clocks = <&clocks BCM2835_CLOCK_PWM>; ++ assigned-clock-rates = <10000000>; ++ #pwm-cells = <2>; ++ status = "disabled"; ++ }; ++ ++ pixelvalve4: pixelvalve@7e216000 { ++ compatible = "brcm,bcm2711-pixelvalve4"; ++ reg = <0x7e216000 0x100>; ++ interrupts = ; ++ status = "disabled"; ++ }; ++ ++ hvs: hvs@7e400000 { ++ compatible = "brcm,bcm2711-hvs"; ++ interrupts = ; ++ }; ++ ++ pixelvalve3: pixelvalve@7ec12000 { ++ compatible = "brcm,bcm2711-pixelvalve3"; ++ reg = <0x7ec12000 0x100>; ++ interrupts = ; ++ status = "disabled"; ++ }; ++ ++ dvp: clock@7ef00000 { ++ compatible = "brcm,brcm2711-dvp"; ++ reg = <0x7ef00000 0x10>; ++ clocks = <&clk_108MHz>; ++ #clock-cells = <1>; ++ #reset-cells = <1>; ++ }; ++ ++ aon_intr: interrupt-controller@7ef00100 { ++ compatible = "brcm,bcm2711-l2-intc", "brcm,l2-intc"; ++ reg = <0x7ef00100 0x30>; ++ interrupts = ; ++ interrupt-controller; ++ #interrupt-cells = <1>; ++ status = "disabled"; ++ }; ++ ++ hdmi0: hdmi@7ef00700 { ++ compatible = "brcm,bcm2711-hdmi0"; ++ reg = <0x7ef00700 0x300>, ++ <0x7ef00300 0x200>, ++ <0x7ef00f00 0x80>, ++ <0x7ef00f80 0x80>, ++ <0x7ef01b00 0x200>, ++ <0x7ef01f00 0x400>, ++ <0x7ef00200 0x80>, ++ <0x7ef04300 0x100>, ++ <0x7ef20000 0x100>, ++ <0x7ef00100 0x30>; ++ reg-names = "hdmi", ++ "dvp", ++ "phy", ++ "rm", ++ "packet", ++ "metadata", ++ "csc", ++ "cec", ++ "hd", ++ "intr2"; ++ clocks = <&firmware_clocks 13>, ++ <&firmware_clocks 14>, ++ <&dvp 0>, ++ <&clk_27MHz>; ++ clock-names = "hdmi", "bvb", "audio", "cec"; ++ resets = <&dvp 0>; ++ interrupt-parent = <&aon_intr>; ++ interrupts = <0>, <1>, <2>, ++ <3>, <4>, <5>; ++ interrupt-names = "cec-tx", "cec-rx", "cec-low", ++ "wakeup", "hpd-connected", "hpd-removed"; ++ ddc = <&ddc0>; ++ dmas = <&dma 10>; ++ dma-names = "audio-rx"; ++ status = "disabled"; ++ }; ++ ++ ddc0: i2c@7ef04500 { ++ compatible = "brcm,bcm2711-hdmi-i2c"; ++ reg = <0x7ef04500 0x100>, <0x7ef00b00 0x300>; ++ reg-names = "bsc", "auto-i2c"; ++ clock-frequency = <97500>; ++ status = "disabled"; ++ }; ++ ++ hdmi1: hdmi@7ef05700 { ++ compatible = "brcm,bcm2711-hdmi1"; ++ reg = <0x7ef05700 0x300>, ++ <0x7ef05300 0x200>, ++ <0x7ef05f00 0x80>, ++ <0x7ef05f80 0x80>, ++ <0x7ef06b00 0x200>, ++ <0x7ef06f00 0x400>, ++ <0x7ef00280 0x80>, ++ <0x7ef09300 0x100>, ++ <0x7ef20000 0x100>, ++ <0x7ef00100 0x30>; ++ reg-names = "hdmi", ++ "dvp", ++ "phy", ++ "rm", ++ "packet", ++ "metadata", ++ "csc", ++ "cec", ++ "hd", ++ "intr2"; ++ ddc = <&ddc1>; ++ clock-names = "hdmi", "bvb", "audio", "cec"; ++ clocks = <&firmware_clocks 13>, ++ <&firmware_clocks 14>, ++ <&dvp 0>, ++ <&clk_27MHz>; ++ resets = <&dvp 1>; ++ interrupt-parent = <&aon_intr>; ++ interrupts = <8>, <7>, <6>, ++ <9>, <10>, <11>; ++ interrupt-names = "cec-tx", "cec-rx", "cec-low", ++ "wakeup", "hpd-connected", "hpd-removed"; ++ dmas = <&dma 17>; ++ dma-names = "audio-rx"; ++ status = "disabled"; ++ }; ++ ++ ddc1: i2c@7ef09500 { ++ compatible = "brcm,bcm2711-hdmi-i2c"; ++ reg = <0x7ef09500 0x100>, <0x7ef05b00 0x300>; ++ reg-names = "bsc", "auto-i2c"; ++ clock-frequency = <97500>; ++ status = "disabled"; ++ }; ++ }; ++ ++ /* ++ * emmc2 has different DMA constraints based on SoC revisions. It was ++ * moved into its own bus, so as for RPi4's firmware to update them. ++ * The firmware will find whether the emmc2bus alias is defined, and if ++ * so, it'll edit the dma-ranges property below accordingly. ++ */ ++ emmc2bus: emmc2bus { ++ compatible = "simple-bus"; ++ #address-cells = <2>; ++ #size-cells = <1>; ++ ++ ranges = <0x0 0x7e000000 0x0 0xfe000000 0x01800000>; ++ dma-ranges = <0x0 0xc0000000 0x0 0x00000000 0x40000000>; ++ ++ emmc2: emmc2@7e340000 { ++ compatible = "brcm,bcm2711-emmc2"; ++ reg = <0x0 0x7e340000 0x100>; ++ interrupts = ; ++ clocks = <&clocks BCM2711_CLOCK_EMMC2>; ++ status = "disabled"; ++ }; ++ }; ++ ++ arm-pmu { ++ compatible = "arm,cortex-a72-pmu", "arm,armv8-pmuv3"; ++ interrupts = , ++ , ++ , ++ ; ++ interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>; ++ }; ++ ++ timer { ++ compatible = "arm,armv8-timer"; ++ interrupts = , ++ , ++ , ++ ; ++ /* This only applies to the ARMv7 stub */ ++ arm,cpu-registers-not-fw-configured; ++ }; ++ ++ cpus: cpus { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ enable-method = "brcm,bcm2836-smp"; // for ARM 32-bit ++ ++ cpu0: cpu@0 { ++ device_type = "cpu"; ++ compatible = "arm,cortex-a72"; ++ reg = <0>; ++ enable-method = "spin-table"; ++ cpu-release-addr = <0x0 0x000000d8>; ++ }; ++ ++ cpu1: cpu@1 { ++ device_type = "cpu"; ++ compatible = "arm,cortex-a72"; ++ reg = <1>; ++ enable-method = "spin-table"; ++ cpu-release-addr = <0x0 0x000000e0>; ++ }; ++ ++ cpu2: cpu@2 { ++ device_type = "cpu"; ++ compatible = "arm,cortex-a72"; ++ reg = <2>; ++ enable-method = "spin-table"; ++ cpu-release-addr = <0x0 0x000000e8>; ++ }; ++ ++ cpu3: cpu@3 { ++ device_type = "cpu"; ++ compatible = "arm,cortex-a72"; ++ reg = <3>; ++ enable-method = "spin-table"; ++ cpu-release-addr = <0x0 0x000000f0>; ++ }; ++ }; ++ ++ scb { ++ compatible = "simple-bus"; ++ #address-cells = <2>; ++ #size-cells = <2>; ++ ++ ranges = <0x0 0x7c000000 0x0 0xfc000000 0x0 0x03800000>, ++ <0x6 0x00000000 0x6 0x00000000 0x0 0x40000000>; ++ ++ pcie0: pcie@7d500000 { ++ compatible = "brcm,bcm2711-pcie"; ++ reg = <0x0 0x7d500000 0x0 0x9310>; ++ device_type = "pci"; ++ #address-cells = <3>; ++ #interrupt-cells = <1>; ++ #size-cells = <2>; ++ interrupts = , ++ ; ++ interrupt-names = "pcie", "msi"; ++ interrupt-map-mask = <0x0 0x0 0x0 0x7>; ++ interrupt-map = <0 0 0 1 &gicv2 GIC_SPI 143 ++ IRQ_TYPE_LEVEL_HIGH>; ++ msi-controller; ++ msi-parent = <&pcie0>; ++ ++ ranges = <0x02000000 0x0 0xc0000000 0x6 0x00000000 ++ 0x0 0x40000000>; ++ /* ++ * The wrapper around the PCIe block has a bug ++ * preventing it from accessing beyond the first 3GB of ++ * memory. ++ */ ++ dma-ranges = <0x02000000 0x0 0x00000000 0x0 0x00000000 ++ 0x0 0xc0000000>; ++ brcm,enable-ssc; ++ }; ++ ++#if 1 /* OpenCN */ ++ genet: ethernet@7d580000 { ++ compatible = "brcm,bcm2711-genet-v5"; ++ reg = <0x00 0x7d580000 0x00 0x10000>; ++ #address-cells = <0x01>; ++ #size-cells = <0x01>; ++ interrupts = <0x00 0x9d 0x04 0x00 0x9e 0x04>; ++ status = "okay"; ++ phy-handle = <&phy1>; ++ phy-mode = "rgmii-rxid"; ++ ++ genet_mdio: mdio@e14 { ++ compatible = "brcm,genet-mdio-v5"; ++ reg = <0xe14 0x08>; ++ reg-names = "mdio"; ++ #address-cells = <0x00>; ++ #size-cells = <0x01>; ++ ++ phy1: genet-phy@0 { ++ ++ reg = <0x01>; ++ led-modes = <0x00 0x08>; ++ ++ ++ }; ++ }; ++ }; ++#if 0 ++ genet: ethernet@7d580000 { ++ compatible = "brcm,bcm2711-genet-v5"; ++ reg = <0x0 0x7d580000 0x0 0x10000>; ++ #address-cells = <0x1>; ++ #size-cells = <0x1>; ++ interrupts = , ++ ; ++ status = "okay"; ++ ++ genet_mdio: mdio@e14 { ++ compatible = "brcm,genet-mdio-v5"; ++ reg = <0xe14 0x8>; ++ reg-names = "mdio"; ++ #address-cells = <0x0>; ++ #size-cells = <0x1>; ++ }; ++ }; ++#endif ++#else ++ genet: genet@7d580000 { ++ compatible = "brcm,bcm2711-genet-v5"; ++ reg = <0x0 0x7d580000 0x0 0x10000>; ++ #address-cells = <0x1>; ++ #size-cells = <0x1>; ++ interrupts = , ++ ; ++ status = "okay"; ++ ++ phy-handle = <&phy1>; ++ phy-mode = "rgmii"; ++ mdio@e14 { ++ #address-cells = <0x0>; ++ #size-cells = <0x1>; ++ compatible = "brcm,genet-mdio-v5"; ++ reg = <0xe14 0x8>; ++ reg-names = "mdio"; ++ phy1: genet-phy@0 { ++ compatible = "ethernet-phy-ieee802.3-c22"; ++ /* No interrupts - use PHY_POLL */ ++ max-speed = <1000>; ++ reg = <0x1>; ++ led-modes = <0x00 0x08>; /* link/activity link */ ++ }; ++ }; ++ }; ++#endif ++ }; ++}; ++ ++&clk_osc { ++ clock-frequency = <54000000>; ++}; ++ ++&clocks { ++ compatible = "brcm,bcm2711-cprman"; ++}; ++ ++&cpu_thermal { ++ coefficients = <(-487) 410040>; ++ thermal-sensors = <&thermal>; ++}; ++ ++&dsi0 { ++ interrupts = ; ++}; ++ ++&dsi1 { ++ interrupts = ; ++ compatible = "brcm,bcm2711-dsi1"; ++}; ++ ++&gpio { ++ compatible = "brcm,bcm2711-gpio"; ++ interrupts = , ++ , ++ , ++ ; ++ ++ gpclk0_gpio49: gpclk0_gpio49 { ++ pin-gpclk { ++ pins = "gpio49"; ++ function = "alt1"; ++ bias-disable; ++ }; ++ }; ++ gpclk1_gpio50: gpclk1_gpio50 { ++ pin-gpclk { ++ pins = "gpio50"; ++ function = "alt1"; ++ bias-disable; ++ }; ++ }; ++ gpclk2_gpio51: gpclk2_gpio51 { ++ pin-gpclk { ++ pins = "gpio51"; ++ function = "alt1"; ++ bias-disable; ++ }; ++ }; ++ ++ i2c0_gpio46: i2c0_gpio46 { ++ pin-sda { ++ function = "alt0"; ++ pins = "gpio46"; ++ bias-pull-up; ++ }; ++ pin-scl { ++ function = "alt0"; ++ pins = "gpio47"; ++ bias-disable; ++ }; ++ }; ++ i2c1_gpio46: i2c1_gpio46 { ++ pin-sda { ++ function = "alt1"; ++ pins = "gpio46"; ++ bias-pull-up; ++ }; ++ pin-scl { ++ function = "alt1"; ++ pins = "gpio47"; ++ bias-disable; ++ }; ++ }; ++ i2c3_gpio2: i2c3_gpio2 { ++ pin-sda { ++ function = "alt5"; ++ pins = "gpio2"; ++ bias-pull-up; ++ }; ++ pin-scl { ++ function = "alt5"; ++ pins = "gpio3"; ++ bias-disable; ++ }; ++ }; ++ i2c3_gpio4: i2c3_gpio4 { ++ pin-sda { ++ function = "alt5"; ++ pins = "gpio4"; ++ bias-pull-up; ++ }; ++ pin-scl { ++ function = "alt5"; ++ pins = "gpio5"; ++ bias-disable; ++ }; ++ }; ++ i2c4_gpio6: i2c4_gpio6 { ++ pin-sda { ++ function = "alt5"; ++ pins = "gpio6"; ++ bias-pull-up; ++ }; ++ pin-scl { ++ function = "alt5"; ++ pins = "gpio7"; ++ bias-disable; ++ }; ++ }; ++ i2c4_gpio8: i2c4_gpio8 { ++ pin-sda { ++ function = "alt5"; ++ pins = "gpio8"; ++ bias-pull-up; ++ }; ++ pin-scl { ++ function = "alt5"; ++ pins = "gpio9"; ++ bias-disable; ++ }; ++ }; ++ i2c5_gpio10: i2c5_gpio10 { ++ pin-sda { ++ function = "alt5"; ++ pins = "gpio10"; ++ bias-pull-up; ++ }; ++ pin-scl { ++ function = "alt5"; ++ pins = "gpio11"; ++ bias-disable; ++ }; ++ }; ++ i2c5_gpio12: i2c5_gpio12 { ++ pin-sda { ++ function = "alt5"; ++ pins = "gpio12"; ++ bias-pull-up; ++ }; ++ pin-scl { ++ function = "alt5"; ++ pins = "gpio13"; ++ bias-disable; ++ }; ++ }; ++ i2c6_gpio0: i2c6_gpio0 { ++ pin-sda { ++ function = "alt5"; ++ pins = "gpio0"; ++ bias-pull-up; ++ }; ++ pin-scl { ++ function = "alt5"; ++ pins = "gpio1"; ++ bias-disable; ++ }; ++ }; ++ i2c6_gpio22: i2c6_gpio22 { ++ pin-sda { ++ function = "alt5"; ++ pins = "gpio22"; ++ bias-pull-up; ++ }; ++ pin-scl { ++ function = "alt5"; ++ pins = "gpio23"; ++ bias-disable; ++ }; ++ }; ++ i2c_slave_gpio8: i2c_slave_gpio8 { ++ pins-i2c-slave { ++ pins = "gpio8", ++ "gpio9", ++ "gpio10", ++ "gpio11"; ++ function = "alt3"; ++ }; ++ }; ++ ++ jtag_gpio48: jtag_gpio48 { ++ pins-jtag { ++ pins = "gpio48", ++ "gpio49", ++ "gpio50", ++ "gpio51", ++ "gpio52", ++ "gpio53"; ++ function = "alt4"; ++ }; ++ }; ++ ++ mii_gpio28: mii_gpio28 { ++ pins-mii { ++ pins = "gpio28", ++ "gpio29", ++ "gpio30", ++ "gpio31"; ++ function = "alt4"; ++ }; ++ }; ++ mii_gpio36: mii_gpio36 { ++ pins-mii { ++ pins = "gpio36", ++ "gpio37", ++ "gpio38", ++ "gpio39"; ++ function = "alt5"; ++ }; ++ }; ++ ++ pcm_gpio50: pcm_gpio50 { ++ pins-pcm { ++ pins = "gpio50", ++ "gpio51", ++ "gpio52", ++ "gpio53"; ++ function = "alt2"; ++ }; ++ }; ++ ++ pwm0_0_gpio12: pwm0_0_gpio12 { ++ pin-pwm { ++ pins = "gpio12"; ++ function = "alt0"; ++ bias-disable; ++ }; ++ }; ++ pwm0_0_gpio18: pwm0_0_gpio18 { ++ pin-pwm { ++ pins = "gpio18"; ++ function = "alt5"; ++ bias-disable; ++ }; ++ }; ++ pwm1_0_gpio40: pwm1_0_gpio40 { ++ pin-pwm { ++ pins = "gpio40"; ++ function = "alt0"; ++ bias-disable; ++ }; ++ }; ++ pwm0_1_gpio13: pwm0_1_gpio13 { ++ pin-pwm { ++ pins = "gpio13"; ++ function = "alt0"; ++ bias-disable; ++ }; ++ }; ++ pwm0_1_gpio19: pwm0_1_gpio19 { ++ pin-pwm { ++ pins = "gpio19"; ++ function = "alt5"; ++ bias-disable; ++ }; ++ }; ++ pwm1_1_gpio41: pwm1_1_gpio41 { ++ pin-pwm { ++ pins = "gpio41"; ++ function = "alt0"; ++ bias-disable; ++ }; ++ }; ++ pwm0_1_gpio45: pwm0_1_gpio45 { ++ pin-pwm { ++ pins = "gpio45"; ++ function = "alt0"; ++ bias-disable; ++ }; ++ }; ++ pwm0_0_gpio52: pwm0_0_gpio52 { ++ pin-pwm { ++ pins = "gpio52"; ++ function = "alt1"; ++ bias-disable; ++ }; ++ }; ++ pwm0_1_gpio53: pwm0_1_gpio53 { ++ pin-pwm { ++ pins = "gpio53"; ++ function = "alt1"; ++ bias-disable; ++ }; ++ }; ++ ++ rgmii_gpio35: rgmii_gpio35 { ++ pin-start-stop { ++ pins = "gpio35"; ++ function = "alt4"; ++ }; ++ pin-rx-ok { ++ pins = "gpio36"; ++ function = "alt4"; ++ }; ++ }; ++ rgmii_irq_gpio34: rgmii_irq_gpio34 { ++ pin-irq { ++ pins = "gpio34"; ++ function = "alt5"; ++ }; ++ }; ++ rgmii_irq_gpio39: rgmii_irq_gpio39 { ++ pin-irq { ++ pins = "gpio39"; ++ function = "alt4"; ++ }; ++ }; ++ rgmii_mdio_gpio28: rgmii_mdio_gpio28 { ++ pins-mdio { ++ pins = "gpio28", ++ "gpio29"; ++ function = "alt5"; ++ }; ++ }; ++ rgmii_mdio_gpio37: rgmii_mdio_gpio37 { ++ pins-mdio { ++ pins = "gpio37", ++ "gpio38"; ++ function = "alt4"; ++ }; ++ }; ++ ++ spi0_gpio46: spi0_gpio46 { ++ pins-spi { ++ pins = "gpio46", ++ "gpio47", ++ "gpio48", ++ "gpio49"; ++ function = "alt2"; ++ }; ++ }; ++ spi2_gpio46: spi2_gpio46 { ++ pins-spi { ++ pins = "gpio46", ++ "gpio47", ++ "gpio48", ++ "gpio49", ++ "gpio50"; ++ function = "alt5"; ++ }; ++ }; ++ spi3_gpio0: spi3_gpio0 { ++ pins-spi { ++ pins = "gpio0", ++ "gpio1", ++ "gpio2", ++ "gpio3"; ++ function = "alt3"; ++ }; ++ }; ++ spi4_gpio4: spi4_gpio4 { ++ pins-spi { ++ pins = "gpio4", ++ "gpio5", ++ "gpio6", ++ "gpio7"; ++ function = "alt3"; ++ }; ++ }; ++ spi5_gpio12: spi5_gpio12 { ++ pins-spi { ++ pins = "gpio12", ++ "gpio13", ++ "gpio14", ++ "gpio15"; ++ function = "alt3"; ++ }; ++ }; ++ spi6_gpio18: spi6_gpio18 { ++ pins-spi { ++ pins = "gpio18", ++ "gpio19", ++ "gpio20", ++ "gpio21"; ++ function = "alt3"; ++ }; ++ }; ++ ++ uart2_gpio0: uart2_gpio0 { ++ pin-tx { ++ pins = "gpio0"; ++ function = "alt4"; ++ bias-disable; ++ }; ++ pin-rx { ++ pins = "gpio1"; ++ function = "alt4"; ++ bias-pull-up; ++ }; ++ }; ++ uart2_ctsrts_gpio2: uart2_ctsrts_gpio2 { ++ pin-cts { ++ pins = "gpio2"; ++ function = "alt4"; ++ bias-pull-up; ++ }; ++ pin-rts { ++ pins = "gpio3"; ++ function = "alt4"; ++ bias-disable; ++ }; ++ }; ++ uart3_gpio4: uart3_gpio4 { ++ pin-tx { ++ pins = "gpio4"; ++ function = "alt4"; ++ bias-disable; ++ }; ++ pin-rx { ++ pins = "gpio5"; ++ function = "alt4"; ++ bias-pull-up; ++ }; ++ }; ++ uart3_ctsrts_gpio6: uart3_ctsrts_gpio6 { ++ pin-cts { ++ pins = "gpio6"; ++ function = "alt4"; ++ bias-pull-up; ++ }; ++ pin-rts { ++ pins = "gpio7"; ++ function = "alt4"; ++ bias-disable; ++ }; ++ }; ++ uart4_gpio8: uart4_gpio8 { ++ pin-tx { ++ pins = "gpio8"; ++ function = "alt4"; ++ bias-disable; ++ }; ++ pin-rx { ++ pins = "gpio9"; ++ function = "alt4"; ++ bias-pull-up; ++ }; ++ }; ++ uart4_ctsrts_gpio10: uart4_ctsrts_gpio10 { ++ pin-cts { ++ pins = "gpio10"; ++ function = "alt4"; ++ bias-pull-up; ++ }; ++ pin-rts { ++ pins = "gpio11"; ++ function = "alt4"; ++ bias-disable; ++ }; ++ }; ++ uart5_gpio12: uart5_gpio12 { ++ pin-tx { ++ pins = "gpio12"; ++ function = "alt4"; ++ bias-disable; ++ }; ++ pin-rx { ++ pins = "gpio13"; ++ function = "alt4"; ++ bias-pull-up; ++ }; ++ }; ++ uart5_ctsrts_gpio14: uart5_ctsrts_gpio14 { ++ pin-cts { ++ pins = "gpio14"; ++ function = "alt4"; ++ bias-pull-up; ++ }; ++ pin-rts { ++ pins = "gpio15"; ++ function = "alt4"; ++ bias-disable; ++ }; ++ }; ++}; ++ ++&rmem { ++ #address-cells = <2>; ++}; ++ ++&cma { ++ /* ++ * arm64 reserves the CMA by default somewhere in ZONE_DMA32, ++ * that's not good enough for the BCM2711 as some devices can ++ * only address the lower 1G of memory (ZONE_DMA). ++ */ ++ alloc-ranges = <0x0 0x00000000 0x40000000>; ++}; ++ ++&i2c0if { ++ compatible = "brcm,bcm2711-i2c", "brcm,bcm2835-i2c"; ++ interrupts = ; ++}; ++ ++&i2c1 { ++ compatible = "brcm,bcm2711-i2c", "brcm,bcm2835-i2c"; ++ interrupts = ; ++}; ++ ++&mailbox { ++ interrupts = ; ++}; ++ ++&sdhci { ++ interrupts = ; ++}; ++ ++&sdhost { ++ interrupts = ; ++}; ++ ++&spi { ++ interrupts = ; ++}; ++ ++&spi1 { ++ interrupts = ; ++}; ++ ++&spi2 { ++ interrupts = ; ++}; ++ ++&system_timer { ++ interrupts = , ++ , ++ , ++ ; ++}; ++ ++&txp { ++ interrupts = ; ++}; ++ ++&uart0 { ++ interrupts = ; ++}; ++ ++&uart1 { ++ interrupts = ; ++}; ++ ++&usb { ++ interrupts = ; ++}; ++ ++&vec { ++ interrupts = ; ++}; diff --git a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0005-bcm2711-rpi-4-b.dts.patch b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0005-bcm2711-rpi-4-b.dts.patch index ba73f8c..d76fe1b 100644 --- a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0005-bcm2711-rpi-4-b.dts.patch +++ b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0005-bcm2711-rpi-4-b.dts.patch @@ -1,39 +1,385 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/arch/arm64/boot/dts/broadcom/bcm2711-rpi-4-b.dts 2026-02-08 10:06:33.373477030 +0100 -+++ ./arch/arm64/boot/dts/broadcom/bcm2711-rpi-4-b.dts 2026-02-08 09:43:34.340984648 +0100 -@@ -1,2 +1,87 @@ +--- /home/rossierd/soo/infrabase/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/arch/arm64/boot/dts/broadcom/bcm2711-rpi-4-b.dts 2025-09-03 20:23:08.000000000 +0200 ++++ ./arch/arm64/boot/dts/broadcom/bcm2711-rpi-4-b.dts 2025-09-04 17:39:05.169281153 +0200 +@@ -1,2 +1,451 @@ // SPDX-License-Identifier: GPL-2.0 - #include "arm/broadcom/bcm2711-rpi-4-b.dts" +-#include "arm/broadcom/bcm2711-rpi-4-b.dts" ++/* SOO.tech */ ++ ++/dts-v1/; ++#include "bcm2711.dtsi" ++#include "bcm2835-rpi.dtsi" ++#include "bcm2711-rpi.dtsi" ++#include "bcm283x-rpi-usb-peripheral.dtsi" ++ ++#include + +/ { ++ compatible = "raspberrypi,4-model-b", "brcm,bcm2711"; ++ model = "Raspberry Pi 4 Model B"; ++ + chosen { -+ bootargs = "coherent_pool=1M 8250.nr_uarts=1 cma=64M smsc95xx.macaddr=DC:A6:32:18:DD:95 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=ttyS0,115200 root=/dev/ram fsck.repair=yes rootwait"; ++ /* bootargs = "console=ttyAMA0,115200n8 root=/dev/ram rw slub_debug=PUZ"; */ ++ /* bootargs = "coherent_pool=1M 8250.nr_uarts=1 cma=64M cma=256M smsc95xx.macaddr=DC:A6:32:18:DD:95 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=serial0,115200 console=tty1 root=/dev/ram elevator=deadline fsck.repair=yes rootwait"; */ ++ /* bootargs = "initcall_debug=1 ignore_loglevel coherent_pool=1M 8250.nr_uarts=1 cma=64M cma=256M smsc95xx.macaddr=DC:A6:32:18:DD:95 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=ttyS0,115200 root=/dev/ram fsck.repair=yes rootwait"; */ ++ ++ bootargs = "coherent_pool=1M 8250.nr_uarts=1 cma=64M cma=256M smsc95xx.macaddr=DC:A6:32:18:DD:95 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 console=ttyS0,115200 root=/dev/ram fsck.repair=yes rootwait"; ++ ++ /* 8250 auxiliary UART instead of pl011 */ ++ /* stdout-path = "serial1:115200n8"; */ ++ ++ }; ++ ++ /* Identity IPA=PA under AVZ: base = the agency load PA (0x1000000), ++ * so passthrough DMA masters (VC mailbox, ...) get real PAs. */ ++ memory@1000000 { ++ device_type = "memory"; ++ reg = <0 0x1000000 0x20000000>; ++ }; ++ ++ agency { ++ domain-size = <0x20000000>; ++ ++ backends { ++ vdummy { ++ compatible = "vdummy,backend"; ++ status = "disabled"; ++ }; ++ vuart { ++ compatible = "vuart,backend"; ++ status = "ok"; ++ }; + -+ /delete-property/ stdout-path; ++ vfbdev { ++ compatible = "vfbdev,backend"; ++ status = "ok"; ++ }; ++ ++ vinput { ++ compatible = "vinput,backend"; ++ status = "ok"; ++ }; ++ vsenseled { ++ compatible = "vsenseled,backend"; ++ status = "disabled"; ++ }; ++ vsensej { ++ compatible = "vsensej,backend"; ++ status = "disabled"; ++ }; ++ vlogs { ++ compatible = "vlogs,backend"; ++ status = "ok"; ++ }; ++ }; ++ }; ++ ++ aliases { ++ serial0 = &uart1; ++ serial1 = &uart0; ++ mmc0 = &emmc2; ++ mmc2 = &sdhost; ++ i2c3 = &i2c3; ++ i2c4 = &i2c4; ++ i2c5 = &i2c5; ++ i2c6 = &i2c6; ++ /delete-property/ ethernet; ++ /delete-property/ intc; ++ ethernet0 = &genet; ++ pcie0 = &pcie0; + }; + -+ /* Normally filled by the bootloader, but AVZ doesn't */ -+ memory@0 { -+ device_type = "memory"; -+ reg = <0x0 0x10000000 0x20000000>; ++ leds { ++ act { ++ gpios = <&gpio 42 GPIO_ACTIVE_HIGH>; ++ }; ++ ++ pwr { ++ label = "PWR"; ++ gpios = <&expgpio 2 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ wifi_pwrseq: wifi-pwrseq { ++ compatible = "mmc-pwrseq-simple"; ++ reset-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>; ++ }; ++ ++ sd_io_1v8_reg: sd_io_1v8_reg { ++ compatible = "regulator-gpio"; ++ regulator-name = "vdd-sd-io"; ++ regulator-min-microvolt = <1800000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-boot-on; ++ regulator-always-on; ++ regulator-settling-time-us = <5000>; ++ gpios = <&expgpio 4 GPIO_ACTIVE_HIGH>; ++ states = <1800000 0x1 ++ 3300000 0x0>; ++ status = "okay"; + }; +}; + -+/* SOO.tech */ ++&pcie0 { ++ pci@1,0 { ++ #address-cells = <3>; ++ #size-cells = <2>; ++ ranges; ++ ++ reg = <0 0 0 0 0>; ++ ++ usb@1,0 { ++ reg = <0x10000 0 0 0 0>; ++ resets = <&reset RASPBERRYPI_FIRMWARE_RESET_ID_USB>; ++ }; ++ }; ++}; ++ ++&gpio { ++ spi0_pins: spi0_pins { ++ brcm,pins = <9 10 11>; ++ brcm,function = ; ++ }; ++ ++ spi0_cs_pins: spi0_cs_pins { ++ brcm,pins = <8 7>; ++ brcm,function = ; ++ }; ++ ++ spi3_pins: spi3_pins { ++ brcm,pins = <1 2 3>; ++ brcm,function = ; ++ }; ++ ++ spi3_cs_pins: spi3_cs_pins { ++ brcm,pins = <0 24>; ++ brcm,function = ; ++ }; ++ ++ spi4_pins: spi4_pins { ++ brcm,pins = <5 6 7>; ++ brcm,function = ; ++ }; ++ ++ spi4_cs_pins: spi4_cs_pins { ++ brcm,pins = <4 25>; ++ brcm,function = ; ++ }; ++ ++ spi5_pins: spi5_pins { ++ brcm,pins = <13 14 15>; ++ brcm,function = ; ++ }; ++ ++ spi5_cs_pins: spi5_cs_pins { ++ brcm,pins = <12 26>; ++ brcm,function = ; ++ }; ++ ++ spi6_pins: spi6_pins { ++ brcm,pins = <19 20 21>; ++ brcm,function = ; ++ }; ++ ++ spi6_cs_pins: spi6_cs_pins { ++ brcm,pins = <18 27>; ++ brcm,function = ; ++ }; ++ ++ i2c0_pins: i2c0 { ++ brcm,pins = <0 1>; ++ brcm,function = ; ++ brcm,pull = ; ++ }; ++ ++ i2c1_pins: i2c1 { ++ brcm,pins = <2 3>; ++ brcm,function = ; ++ brcm,pull = ; ++ }; ++ ++ i2c3_pins: i2c3 { ++ brcm,pins = <4 5>; ++ brcm,function = ; ++ brcm,pull = ; ++ }; ++ ++ i2c4_pins: i2c4 { ++ brcm,pins = <8 9>; ++ brcm,function = ; ++ brcm,pull = ; ++ }; ++ ++ i2c5_pins: i2c5 { ++ brcm,pins = <12 13>; ++ brcm,function = ; ++ brcm,pull = ; ++ }; ++ ++ i2c6_pins: i2c6 { ++ brcm,pins = <22 23>; ++ brcm,function = ; ++ brcm,pull = ; ++ }; ++ ++ i2s_pins: i2s { ++ brcm,pins = <18 19 20 21>; ++ brcm,function = ; ++ }; ++ ++ sdio_pins: sdio_pins { ++ brcm,pins = <34 35 36 37 38 39>; ++ brcm,function = ; // alt3 = SD1 ++ brcm,pull = <0 2 2 2 2 2>; ++ }; ++ ++ bt_pins: bt_pins { ++ brcm,pins = "-"; // non-empty to keep btuart happy, //4 = 0 ++ // to fool pinctrl ++ brcm,function = <0>; ++ brcm,pull = <2>; ++ }; ++ ++ uart0_pins: uart0_pins { ++ brcm,pins = <32 33>; ++ brcm,function = ; ++ brcm,pull = <0 2>; ++ }; ++ ++ uart1_pins: uart1_pins { ++ brcm,pins; ++ brcm,function; ++ brcm,pull; ++ }; ++ ++ uart2_pins: uart2_pins { ++ brcm,pins = <0 1>; ++ brcm,function = ; ++ brcm,pull = <0 2>; ++ }; ++ ++ uart3_pins: uart3_pins { ++ brcm,pins = <4 5>; ++ brcm,function = ; ++ brcm,pull = <0 2>; ++ }; ++ ++ uart4_pins: uart4_pins { ++ brcm,pins = <8 9>; ++ brcm,function = ; ++ brcm,pull = <0 2>; ++ }; ++ ++ uart5_pins: uart5_pins { ++ brcm,pins = <12 13>; ++ brcm,function = ; ++ brcm,pull = <0 2>; ++ }; ++ ++ audio_pins: audio_pins { ++ brcm,pins = <40 41>; ++ brcm,function = <4>; ++ }; ++}; ++ ++/* +&soc { -+ virtgpio: virtgpio { -+ compatible = "brcm,bcm2835-virtgpio"; ++ virtgpio: virtgpio { ++ compatible = "brcm,bcm2835-virtgpio"; ++ gpio-controller; ++ #gpio-cells = <2>; ++ firmware = <&firmware>; ++ status = "okay"; ++ }; ++}; ++*/ ++/* ++&mmcnr { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&sdio_pins>; ++ bus-width = <4>; ++ status = "disabled"; ++};*/ ++ ++&firmware { ++ expgpio: gpio { ++ compatible = "raspberrypi,firmware-gpio"; + gpio-controller; + #gpio-cells = <2>; -+ firmware = <&firmware>; ++ gpio-line-names = "BT_ON", ++ "WL_ON", ++ "PWR_LED_OFF", ++ "GLOBAL_RESET", ++ "VDD_SD_IO_SEL", ++ "CAM_GPIO", ++ "", ++ ""; + status = "okay"; + }; ++ ++ reset: reset { ++ compatible = "raspberrypi,firmware-reset"; ++ #reset-cells = <1>; ++ }; ++}; ++ ++&pwm1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pwm1_0_gpio40 &pwm1_1_gpio41>; ++ status = "okay"; ++}; ++ ++/* SDHCI is used to control the SDIO for wireless */ ++&sdhci { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&emmc_gpio34>; ++ bus-width = <4>; ++ non-removable; ++ mmc-pwrseq = <&wifi_pwrseq>; ++ status = "okay"; ++ ++ brcmf: wifi@1 { ++ reg = <1>; ++ compatible = "brcm,bcm4329-fmac"; ++ }; ++}; ++ ++/* EMMC2 is used to drive the SD card */ ++&emmc2 { ++ vqmmc-supply = <&sd_io_1v8_reg>; ++ broken-cd; ++ status = "okay"; +}; + ++/* uart0 communicates with the BT module */ ++&uart0 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart0_ctsrts_gpio30 &uart0_gpio32>; ++ uart-has-rtscts; ++ status = "okay"; ++ ++ bluetooth { ++ compatible = "brcm,bcm43438-bt"; ++ max-speed = <2000000>; ++ shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>; ++ }; ++}; ++ ++/* uart1 is mapped to the pin header */ ++&uart1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart1_gpio14>; ++ status = "okay"; ++}; ++ ++ +&spi1 { + status = "okay"; + cs-gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + num-cs = <1>; + ++ /* SOO.tech */ + drv8703q1@0 { + compatible = "ti,drv8703q1"; + status = "okay"; @@ -44,8 +390,33 @@ + }; +}; + ++/* SOO.tech */ ++&i2c4 { ++ status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c4_pins>; ++ clock-frequency = <100000>; ++ ++ ds1050@28 { ++ compatible = "maxim,ds1050"; ++ reg = <0x28>; /* This is due to the control byte (101) + A2, A1, A0 (000) combination (101000 = 0x28) */ ++ }; ++}; ++ ++ ++ +&i2c1 { ++ compatible = "brcm,bcm2711-i2c", "brcm,bcm2835-i2c"; ++ interrupts = ; ++ + status = "okay"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c1_pins>; ++ clock-frequency = <100000>; ++ ++ ++ #address-cells = <1>; ++ #size-cells = <0>; + + rpi-sense@46 { + compatible = "rpi,rpi-sense"; @@ -79,12 +450,6 @@ + }; +}; + -+&i2c4 { -+ status = "okay"; -+ clock-frequency = <100000>; -+ -+ ds1050@28 { -+ compatible = "maxim,ds1050"; -+ reg = <0x28>; /* This is due to the control byte (101) + A2, A1, A0 (000) combination (101000 = 0x28) */ -+ }; ++&vchiq { ++ interrupts = ; +}; diff --git a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0006-bcm2711-rpi.dtsi.patch b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0006-bcm2711-rpi.dtsi.patch new file mode 100644 index 0000000..ff77511 --- /dev/null +++ b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0006-bcm2711-rpi.dtsi.patch @@ -0,0 +1,170 @@ +--- /home/rossierd/soo/infrabase/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/arch/arm64/boot/dts/broadcom/bcm2711-rpi.dtsi 1970-01-01 01:00:00.000000000 +0100 ++++ ./arch/arm64/boot/dts/broadcom/bcm2711-rpi.dtsi 2025-05-05 20:19:23.871333855 +0200 +@@ -0,0 +1,167 @@ ++// SPDX-License-Identifier: GPL-2.0 ++#include "bcm270x-rpi.dtsi" ++ ++/ { ++ v3dbus: v3dbus { ++ compatible = "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <2>; ++ ranges = <0x7c500000 0x0 0xfc500000 0x0 0x03300000>, ++ <0x40000000 0x0 0xff800000 0x0 0x00800000>; ++ dma-ranges = <0x00000000 0x0 0x00000000 0x4 0x00000000>; ++ ++ v3d: v3d@7ec04000 { ++ compatible = "brcm,2711-v3d"; ++ reg = ++ <0x7ec00000 0x0 0x4000>, ++ <0x7ec04000 0x0 0x4000>; ++ reg-names = "hub", "core0"; ++ ++ power-domains = <&pm BCM2835_POWER_DOMAIN_GRAFX_V3D>; ++ resets = <&pm BCM2835_RESET_V3D>; ++ clocks = <&firmware_clocks 5>; ++ clocks-names = "v3d"; ++ interrupts = ; ++ status = "disabled"; ++ }; ++ }; ++ ++ scb: scb { ++ /* Add a label */ ++ }; ++}; ++ ++&cma { ++ /* Limit cma to the lower 768MB to allow room for HIGHMEM on 32-bit */ ++ alloc-ranges = <0x0 0x00000000 0x30000000>; ++}; ++ ++&scb { ++ ranges = <0x0 0x7c000000 0x0 0xfc000000 0x0 0x03800000>, ++ <0x0 0x40000000 0x0 0xff800000 0x0 0x00800000>, ++ <0x6 0x00000000 0x6 0x00000000 0x0 0x40000000>, ++ <0x0 0x00000000 0x0 0x00000000 0x0 0xfc000000>; ++ dma-ranges = <0x0 0x00000000 0x0 0x00000000 0x4 0x00000000>; ++ ++ dma40: dma@7e007b00 { ++ compatible = "brcm,bcm2711-dma"; ++ reg = <0x0 0x7e007b00 0x0 0x400>; ++ interrupts = ++ , /* dma4 11 */ ++ , /* dma4 12 */ ++ , /* dma4 13 */ ++ ; /* dma4 14 */ ++ interrupt-names = "dma11", ++ "dma12", ++ "dma13", ++ "dma14"; ++ #dma-cells = <1>; ++ brcm,dma-channel-mask = <0x7800>; ++ }; ++ ++ xhci: xhci@7e9c0000 { ++ compatible = "generic-xhci"; ++ status = "disabled"; ++ reg = <0x0 0x7e9c0000 0x0 0x100000>; ++ interrupts = ; ++ power-domains = <&power RPI_POWER_DOMAIN_USB>; ++ }; ++ ++ hevc-decoder@7eb00000 { ++ compatible = "raspberrypi,rpivid-hevc-decoder"; ++ reg = <0x0 0x7eb00000 0x0 0x10000>; ++ status = "okay"; ++ }; ++ ++ rpivid-local-intc@7eb10000 { ++ compatible = "raspberrypi,rpivid-local-intc"; ++ reg = <0x0 0x7eb10000 0x0 0x1000>; ++ status = "okay"; ++ interrupts = ; ++ }; ++ ++ h264-decoder@7eb20000 { ++ compatible = "raspberrypi,rpivid-h264-decoder"; ++ reg = <0x0 0x7eb20000 0x0 0x10000>; ++ status = "okay"; ++ }; ++ ++ vp9-decoder@7eb30000 { ++ compatible = "raspberrypi,rpivid-vp9-decoder"; ++ reg = <0x0 0x7eb30000 0x0 0x10000>; ++ status = "okay"; ++ }; ++}; ++ ++&dma40 { ++ /* The VPU firmware uses DMA channel 11 for VCHIQ */ ++ brcm,dma-channel-mask = <0x7000>; ++}; ++ ++&vchiq { ++ compatible = "brcm,bcm2711-vchiq"; ++}; ++ ++&usb { ++ /* Enable the FIQ support */ ++ reg = <0x7e980000 0x10000>, ++ <0x7e00b200 0x200>; ++ interrupts = , ++ ; ++ status = "disabled"; ++}; ++ ++&gpio { ++ interrupts = , ++ ; ++}; ++ ++&emmc2 { ++ mmc-ddr-3_3v; ++}; ++ ++&vc4 { ++ status = "disabled"; ++}; ++ ++&pixelvalve0 { ++ status = "disabled"; ++}; ++ ++&pixelvalve1 { ++ status = "disabled"; ++}; ++ ++&pixelvalve2 { ++ status = "disabled"; ++}; ++ ++&pixelvalve3 { ++ status = "disabled"; ++}; ++ ++&pixelvalve4 { ++ status = "disabled"; ++}; ++ ++&hdmi0 { ++ dmas = <&dma (10|(1<<27)|(1<<24)|(10<<16)|(15<<20))>; ++ status = "disabled"; ++}; ++ ++&ddc0 { ++ status = "disabled"; ++}; ++ ++&hdmi1 { ++ dmas = <&dma (17|(1<<27)|(1<<24)|(10<<16)|(15<<20))>; ++ status = "disabled"; ++}; ++ ++&ddc1 { ++ status = "disabled"; ++}; ++ ++&dvp { ++ status = "disabled"; ++}; diff --git a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0007-bcm271x-rpi-bt.dtsi.patch b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0007-bcm271x-rpi-bt.dtsi.patch new file mode 100644 index 0000000..fad7b39 --- /dev/null +++ b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0007-bcm271x-rpi-bt.dtsi.patch @@ -0,0 +1,29 @@ +--- /home/rossierd/soo/infrabase/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/arch/arm64/boot/dts/broadcom/bcm271x-rpi-bt.dtsi 1970-01-01 01:00:00.000000000 +0100 ++++ ./arch/arm64/boot/dts/broadcom/bcm271x-rpi-bt.dtsi 2025-05-05 20:19:23.871333855 +0200 +@@ -0,0 +1,26 @@ ++// SPDX-License-Identifier: GPL-2.0 ++ ++&uart0 { ++ bt: bluetooth { ++ compatible = "brcm,bcm43438-bt"; ++ max-speed = <3000000>; ++ shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>; ++ status = "disabled"; ++ }; ++}; ++ ++&uart1 { ++ minibt: bluetooth { ++ compatible = "brcm,bcm43438-bt"; ++ max-speed = <460800>; ++ shutdown-gpios = <&expgpio 0 GPIO_ACTIVE_HIGH>; ++ status = "disabled"; ++ }; ++}; ++ ++/ { ++ __overrides__ { ++ krnbt = <&bt>,"status"; ++ krnbt_baudrate = <&bt>,"max-speed:0"; ++ }; ++}; diff --git a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0008-bcm2835-rpi.dtsi.patch b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0008-bcm2835-rpi.dtsi.patch new file mode 100644 index 0000000..dd0f892 --- /dev/null +++ b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0008-bcm2835-rpi.dtsi.patch @@ -0,0 +1,93 @@ +--- /home/rossierd/soo/infrabase/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi 1970-01-01 01:00:00.000000000 +0100 ++++ ./arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi 2025-05-05 20:19:23.871333855 +0200 +@@ -0,0 +1,90 @@ ++#include ++ ++/ { ++ leds { ++ compatible = "gpio-leds"; ++ ++ act { ++ label = "ACT"; ++ default-state = "keep"; ++ linux,default-trigger = "heartbeat"; ++ }; ++ }; ++ ++ soc { ++ firmware: firmware { ++ compatible = "raspberrypi,bcm2835-firmware", "simple-mfd"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ mboxes = <&mailbox>; ++ dma-ranges; ++ ++ firmware_clocks: clocks { ++ compatible = "raspberrypi,firmware-clocks"; ++ #clock-cells = <1>; ++ }; ++ }; ++ ++ power: power { ++ compatible = "raspberrypi,bcm2835-power"; ++ firmware = <&firmware>; ++ #power-domain-cells = <1>; ++ }; ++ ++ vchiq: mailbox@7e00b840 { ++ compatible = "brcm,bcm2835-vchiq"; ++ reg = <0x7e00b840 0x3c>; ++ interrupts = <0 2>; ++ }; ++ }; ++}; ++ ++&gpio { ++ pinctrl-names = "default"; ++ ++ gpioout: gpioout { ++ brcm,pins = <6>; ++ brcm,function = ; ++ }; ++ ++ alt0: alt0 { ++ brcm,pins = <4 5 7 8 9 10 11>; ++ brcm,function = ; ++ }; ++}; ++ ++&i2c0if { ++ status = "okay"; ++ clock-frequency = <100000>; ++}; ++ ++&i2c0mux { ++ pinctrl-0 = <&i2c0_gpio0>; ++ /* pinctrl-1 varies based on platform */ ++ status = "okay"; ++}; ++ ++&i2c1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&i2c1_gpio2>; ++ status = "okay"; ++ clock-frequency = <100000>; ++}; ++ ++&usb { ++ power-domains = <&power RPI_POWER_DOMAIN_USB>; ++}; ++ ++&vec { ++ power-domains = <&power RPI_POWER_DOMAIN_VEC>; ++ status = "okay"; ++}; ++ ++&dsi0 { ++ power-domains = <&power RPI_POWER_DOMAIN_DSI0>; ++}; ++ ++&dsi1 { ++ power-domains = <&power RPI_POWER_DOMAIN_DSI1>; ++}; diff --git a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0009-bcm283x.dtsi.patch b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0009-bcm283x.dtsi.patch new file mode 100644 index 0000000..8f5b057 --- /dev/null +++ b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0009-bcm283x.dtsi.patch @@ -0,0 +1,536 @@ +--- /home/rossierd/soo/infrabase/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/arch/arm64/boot/dts/broadcom/bcm283x.dtsi 1970-01-01 01:00:00.000000000 +0100 ++++ ./arch/arm64/boot/dts/broadcom/bcm283x.dtsi 2025-05-05 20:19:23.872333877 +0200 +@@ -0,0 +1,533 @@ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* firmware-provided startup stubs live here, where the secondary CPUs are ++ * spinning. ++ */ ++/memreserve/ 0x00000000 0x00001000; ++ ++/* This include file covers the common peripherals and configuration between ++ * bcm2835 and bcm2836 implementations, leaving the CPU configuration to ++ * bcm2835.dtsi and bcm2836.dtsi. ++ */ ++ ++/ { ++ compatible = "brcm,bcm2835"; ++ model = "BCM2835"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ aliases { ++ serial0 = &uart0; ++ serial1 = &uart1; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:115200n8"; ++ }; ++ ++ rmem: reserved-memory { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ranges; ++ ++ cma: linux,cma { ++ compatible = "shared-dma-pool"; ++ size = <0x4000000>; /* 64MB */ ++ reusable; ++ linux,cma-default; ++ }; ++ }; ++ ++ thermal-zones { ++ cpu_thermal: cpu-thermal { ++ polling-delay-passive = <0>; ++ polling-delay = <1000>; ++ ++ trips { ++ cpu-crit { ++ temperature = <90000>; ++ hysteresis = <0>; ++ type = "critical"; ++ }; ++ }; ++ ++ cooling-maps { ++ }; ++ }; ++ }; ++ ++ soc { ++ compatible = "simple-bus"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ system_timer: timer@7e003000 { ++ compatible = "brcm,bcm2835-system-timer"; ++ reg = <0x7e003000 0x1000>; ++ interrupts = <1 0>, <1 1>, <1 2>, <1 3>; ++ /* This could be a reference to BCM2835_CLOCK_TIMER, ++ * but we don't have the driver using the common clock ++ * support yet. ++ */ ++ clock-frequency = <1000000>; ++ }; ++ ++ txp: txp@7e004000 { ++ compatible = "brcm,bcm2835-txp"; ++ reg = <0x7e004000 0x20>; ++ interrupts = <1 11>; ++ }; ++ ++ clocks: cprman@7e101000 { ++ compatible = "brcm,bcm2835-cprman"; ++ #clock-cells = <1>; ++ reg = <0x7e101000 0x2000>; ++ ++ /* CPRMAN derives almost everything from the ++ * platform's oscillator. However, the DSI ++ * pixel clocks come from the DSI analog PHY. ++ */ ++ clocks = <&clk_osc>, ++ <&dsi0 0>, <&dsi0 1>, <&dsi0 2>, ++ <&dsi1 0>, <&dsi1 1>, <&dsi1 2>; ++ }; ++ ++ mailbox: mailbox@7e00b880 { ++ compatible = "brcm,bcm2835-mbox"; ++ reg = <0x7e00b880 0x40>; ++ interrupts = <0 1>; ++ #mbox-cells = <0>; ++ }; ++ ++ gpio: gpio@7e200000 { ++ compatible = "brcm,bcm2835-gpio"; ++ reg = <0x7e200000 0xb4>; ++ /* ++ * The GPIO IP block is designed for 3 banks of GPIOs. ++ * Each bank has a GPIO interrupt for itself. ++ * There is an overall "any bank" interrupt. ++ * In order, these are GIC interrupts 17, 18, 19, 20. ++ * Since the BCM2835 only has 2 banks, the 2nd bank ++ * interrupt output appears to be mirrored onto the ++ * 3rd bank's interrupt signal. ++ * So, a bank0 interrupt shows up on 17, 20, and ++ * a bank1 interrupt shows up on 18, 19, 20! ++ */ ++ interrupts = <2 17>, <2 18>, <2 19>, <2 20>; ++ ++ gpio-controller; ++ #gpio-cells = <2>; ++ ++ interrupt-controller; ++ #interrupt-cells = <2>; ++ ++ /* Defines common pin muxing groups ++ * ++ * While each pin can have its mux selected ++ * for various functions individually, some ++ * groups only make sense to switch to a ++ * particular function together. ++ */ ++ dpi_gpio0: dpi_gpio0 { ++ brcm,pins = <0 1 2 3 4 5 6 7 8 9 10 11 ++ 12 13 14 15 16 17 18 19 ++ 20 21 22 23 24 25 26 27>; ++ brcm,function = ; ++ }; ++ emmc_gpio22: emmc_gpio22 { ++ brcm,pins = <22 23 24 25 26 27>; ++ brcm,function = ; ++ }; ++ emmc_gpio34: emmc_gpio34 { ++ brcm,pins = <34 35 36 37 38 39>; ++ brcm,function = ; ++ brcm,pull = ; ++ }; ++ emmc_gpio48: emmc_gpio48 { ++ brcm,pins = <48 49 50 51 52 53>; ++ brcm,function = ; ++ }; ++ ++ gpclk0_gpio4: gpclk0_gpio4 { ++ brcm,pins = <4>; ++ brcm,function = ; ++ }; ++ gpclk1_gpio5: gpclk1_gpio5 { ++ brcm,pins = <5>; ++ brcm,function = ; ++ }; ++ gpclk1_gpio42: gpclk1_gpio42 { ++ brcm,pins = <42>; ++ brcm,function = ; ++ }; ++ gpclk1_gpio44: gpclk1_gpio44 { ++ brcm,pins = <44>; ++ brcm,function = ; ++ }; ++ gpclk2_gpio6: gpclk2_gpio6 { ++ brcm,pins = <6>; ++ brcm,function = ; ++ }; ++ gpclk2_gpio43: gpclk2_gpio43 { ++ brcm,pins = <43>; ++ brcm,function = ; ++ brcm,pull = ; ++ }; ++ ++ i2c0_gpio0: i2c0_gpio0 { ++ brcm,pins = <0 1>; ++ brcm,function = ; ++ }; ++ i2c0_gpio28: i2c0_gpio28 { ++ brcm,pins = <28 29>; ++ brcm,function = ; ++ }; ++ i2c0_gpio44: i2c0_gpio44 { ++ brcm,pins = <44 45>; ++ brcm,function = ; ++ }; ++ i2c1_gpio2: i2c1_gpio2 { ++ brcm,pins = <2 3>; ++ brcm,function = ; ++ }; ++ i2c1_gpio44: i2c1_gpio44 { ++ brcm,pins = <44 45>; ++ brcm,function = ; ++ }; ++ ++ jtag_gpio22: jtag_gpio22 { ++ brcm,pins = <22 23 24 25 26 27>; ++ brcm,function = ; ++ }; ++ ++ pcm_gpio18: pcm_gpio18 { ++ brcm,pins = <18 19 20 21>; ++ brcm,function = ; ++ }; ++ pcm_gpio28: pcm_gpio28 { ++ brcm,pins = <28 29 30 31>; ++ brcm,function = ; ++ }; ++ ++ sdhost_gpio48: sdhost_gpio48 { ++ brcm,pins = <48 49 50 51 52 53>; ++ brcm,function = ; ++ }; ++ ++ spi0_gpio7: spi0_gpio7 { ++ brcm,pins = <7 8 9 10 11>; ++ brcm,function = ; ++ }; ++ spi0_gpio35: spi0_gpio35 { ++ brcm,pins = <35 36 37 38 39>; ++ brcm,function = ; ++ }; ++ spi1_gpio16: spi1_gpio16 { ++ brcm,pins = <16 17 18 19 20 21>; ++ brcm,function = ; ++ }; ++ spi2_gpio40: spi2_gpio40 { ++ brcm,pins = <40 41 42 43 44 45>; ++ brcm,function = ; ++ }; ++ ++ uart0_gpio14: uart0_gpio14 { ++ brcm,pins = <14 15>; ++ brcm,function = ; ++ }; ++ /* Separate from the uart0_gpio14 group ++ * because it conflicts with spi1_gpio16, and ++ * people often run uart0 on the two pins ++ * without flow control. ++ */ ++ uart0_ctsrts_gpio16: uart0_ctsrts_gpio16 { ++ brcm,pins = <16 17>; ++ brcm,function = ; ++ }; ++ uart0_ctsrts_gpio30: uart0_ctsrts_gpio30 { ++ brcm,pins = <30 31>; ++ brcm,function = ; ++ brcm,pull = ; ++ }; ++ uart0_gpio32: uart0_gpio32 { ++ brcm,pins = <32 33>; ++ brcm,function = ; ++ brcm,pull = ; ++ }; ++ uart0_gpio36: uart0_gpio36 { ++ brcm,pins = <36 37>; ++ brcm,function = ; ++ }; ++ uart0_ctsrts_gpio38: uart0_ctsrts_gpio38 { ++ brcm,pins = <38 39>; ++ brcm,function = ; ++ }; ++ ++ uart1_gpio14: uart1_gpio14 { ++ brcm,pins = <14 15>; ++ brcm,function = ; ++ }; ++ uart1_ctsrts_gpio16: uart1_ctsrts_gpio16 { ++ brcm,pins = <16 17>; ++ brcm,function = ; ++ }; ++ uart1_gpio32: uart1_gpio32 { ++ brcm,pins = <32 33>; ++ brcm,function = ; ++ }; ++ uart1_ctsrts_gpio30: uart1_ctsrts_gpio30 { ++ brcm,pins = <30 31>; ++ brcm,function = ; ++ }; ++ uart1_gpio40: uart1_gpio40 { ++ brcm,pins = <40 41>; ++ brcm,function = ; ++ }; ++ uart1_ctsrts_gpio42: uart1_ctsrts_gpio42 { ++ brcm,pins = <42 43>; ++ brcm,function = ; ++ }; ++ }; ++ ++ uart0: serial@7e201000 { ++ compatible = "arm,pl011", "arm,primecell"; ++ reg = <0x7e201000 0x200>; ++ interrupts = <2 25>; ++ clocks = <&clocks BCM2835_CLOCK_UART>, ++ <&clocks BCM2835_CLOCK_VPU>; ++ clock-names = "uartclk", "apb_pclk"; ++ arm,primecell-periphid = <0x00241011>; ++ }; ++ ++ sdhost: mmc@7e202000 { ++ compatible = "brcm,bcm2835-sdhost"; ++ reg = <0x7e202000 0x100>; ++ interrupts = <2 24>; ++ clocks = <&clocks BCM2835_CLOCK_VPU>; ++ status = "disabled"; ++ }; ++ ++ i2s: i2s@7e203000 { ++ compatible = "brcm,bcm2835-i2s"; ++ reg = <0x7e203000 0x24>; ++ clocks = <&clocks BCM2835_CLOCK_PCM>; ++ status = "disabled"; ++ }; ++ ++ spi: spi@7e204000 { ++ compatible = "brcm,bcm2835-spi"; ++ reg = <0x7e204000 0x200>; ++ interrupts = <2 22>; ++ clocks = <&clocks BCM2835_CLOCK_VPU>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c0if: i2c@7e205000 { ++ compatible = "brcm,bcm2835-i2c"; ++ reg = <0x7e205000 0x200>; ++ interrupts = <2 21>; ++ clocks = <&clocks BCM2835_CLOCK_VPU>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ i2c0mux: i2c0mux { ++ compatible = "i2c-mux-pinctrl"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ i2c-parent = <&i2c0if>; ++ ++ pinctrl-names = "i2c0", "i2c_csi_dsi"; ++ ++ status = "disabled"; ++ ++ i2c0: i2c@0 { ++ reg = <0>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ }; ++ ++ i2c_csi_dsi: i2c@1 { ++ reg = <1>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ }; ++ }; ++ ++ dpi: dpi@7e208000 { ++ compatible = "brcm,bcm2835-dpi"; ++ reg = <0x7e208000 0x8c>; ++ clocks = <&clocks BCM2835_CLOCK_VPU>, ++ <&clocks BCM2835_CLOCK_DPI>; ++ clock-names = "core", "pixel"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ dsi0: dsi@7e209000 { ++ compatible = "brcm,bcm2835-dsi0"; ++ reg = <0x7e209000 0x78>; ++ interrupts = <2 4>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ #clock-cells = <1>; ++ ++ clocks = <&clocks BCM2835_PLLA_DSI0>, ++ <&clocks BCM2835_CLOCK_DSI0E>, ++ <&clocks BCM2835_CLOCK_DSI0P>; ++ clock-names = "phy", "escape", "pixel"; ++ ++ clock-output-names = "dsi0_byte", ++ "dsi0_ddr2", ++ "dsi0_ddr"; ++ ++ status = "disabled"; ++ }; ++ ++ aux: aux@7e215000 { ++ compatible = "brcm,bcm2835-aux"; ++ #clock-cells = <1>; ++ reg = <0x7e215000 0x8>; ++ clocks = <&clocks BCM2835_CLOCK_VPU>; ++ }; ++ ++ uart1: serial@7e215040 { ++ compatible = "brcm,bcm2835-aux-uart"; ++ reg = <0x7e215040 0x40>; ++ interrupts = <1 29>; ++ clocks = <&aux BCM2835_AUX_CLOCK_UART>; ++ status = "disabled"; ++ }; ++ ++ spi1: spi@7e215080 { ++ compatible = "brcm,bcm2835-aux-spi"; ++ reg = <0x7e215080 0x40>; ++ interrupts = <1 29>; ++ clocks = <&aux BCM2835_AUX_CLOCK_SPI1>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ spi2: spi@7e2150c0 { ++ compatible = "brcm,bcm2835-aux-spi"; ++ reg = <0x7e2150c0 0x40>; ++ interrupts = <1 29>; ++ clocks = <&aux BCM2835_AUX_CLOCK_SPI2>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ pwm: pwm@7e20c000 { ++ compatible = "brcm,bcm2835-pwm"; ++ reg = <0x7e20c000 0x28>; ++ clocks = <&clocks BCM2835_CLOCK_PWM>; ++ assigned-clocks = <&clocks BCM2835_CLOCK_PWM>; ++ assigned-clock-rates = <10000000>; ++ #pwm-cells = <2>; ++ status = "disabled"; ++ }; ++ ++ sdhci: sdhci@7e300000 { ++ compatible = "brcm,bcm2835-sdhci"; ++ reg = <0x7e300000 0x100>; ++ interrupts = <2 30>; ++ clocks = <&clocks BCM2835_CLOCK_EMMC>; ++ status = "disabled"; ++ }; ++ ++ hvs@7e400000 { ++ compatible = "brcm,bcm2835-hvs"; ++ reg = <0x7e400000 0x6000>; ++ interrupts = <2 1>; ++ }; ++ ++ dsi1: dsi@7e700000 { ++ compatible = "brcm,bcm2835-dsi1"; ++ reg = <0x7e700000 0x8c>; ++ interrupts = <2 12>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ #clock-cells = <1>; ++ ++ clocks = <&clocks BCM2835_PLLD_DSI1>, ++ <&clocks BCM2835_CLOCK_DSI1E>, ++ <&clocks BCM2835_CLOCK_DSI1P>; ++ clock-names = "phy", "escape", "pixel"; ++ ++ clock-output-names = "dsi1_byte", ++ "dsi1_ddr2", ++ "dsi1_ddr"; ++ ++ status = "disabled"; ++ }; ++ ++ i2c1: i2c@7e804000 { ++ compatible = "brcm,bcm2835-i2c"; ++ reg = <0x7e804000 0x1000>; ++ interrupts = <2 21>; ++ clocks = <&clocks BCM2835_CLOCK_VPU>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ status = "disabled"; ++ }; ++ ++ vec: vec@7e806000 { ++ compatible = "brcm,bcm2835-vec"; ++ reg = <0x7e806000 0x1000>; ++ clocks = <&clocks BCM2835_CLOCK_VEC>; ++ interrupts = <2 27>; ++ status = "disabled"; ++ }; ++ ++ usb: usb@7e980000 { ++ compatible = "brcm,bcm2835-usb"; ++ reg = <0x7e980000 0x10000>; ++ interrupts = <1 9>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ clocks = <&clk_usb>; ++ clock-names = "otg"; ++ phys = <&usbphy>; ++ phy-names = "usb2-phy"; ++ }; ++ }; ++ ++ clocks { ++ /* The oscillator is the root of the clock tree. */ ++ clk_osc: clk-osc { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-output-names = "osc"; ++ clock-frequency = <19200000>; ++ }; ++ ++ clk_usb: clk-usb { ++ compatible = "fixed-clock"; ++ #clock-cells = <0>; ++ clock-output-names = "otg"; ++ clock-frequency = <480000000>; ++ }; ++ }; ++ ++ usbphy: phy { ++ compatible = "usb-nop-xceiv"; ++ #phy-cells = <0>; ++ }; ++}; diff --git a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0010-bcm283x-rpi-cam1-regulator.dtsi.patch b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0010-bcm283x-rpi-cam1-regulator.dtsi.patch new file mode 100644 index 0000000..e6b664a --- /dev/null +++ b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0010-bcm283x-rpi-cam1-regulator.dtsi.patch @@ -0,0 +1,13 @@ +--- /home/rossierd/soo/infrabase/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/arch/arm64/boot/dts/broadcom/bcm283x-rpi-cam1-regulator.dtsi 1970-01-01 01:00:00.000000000 +0100 ++++ ./arch/arm64/boot/dts/broadcom/bcm283x-rpi-cam1-regulator.dtsi 2025-05-05 20:19:23.872333877 +0200 +@@ -0,0 +1,10 @@ ++// SPDX-License-Identifier: GPL-2.0 ++ ++/ { ++ cam1_reg: cam1_reg { ++ compatible = "regulator-fixed"; ++ regulator-name = "cam1-reg"; ++ enable-active-high; ++ status = "disabled"; ++ }; ++}; diff --git a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0011-bcm283x-rpi-csi1-2lane.dtsi.patch b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0011-bcm283x-rpi-csi1-2lane.dtsi.patch new file mode 100644 index 0000000..ee7c55f --- /dev/null +++ b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0011-bcm283x-rpi-csi1-2lane.dtsi.patch @@ -0,0 +1,7 @@ +--- /home/rossierd/soo/infrabase/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/arch/arm64/boot/dts/broadcom/bcm283x-rpi-csi1-2lane.dtsi 1970-01-01 01:00:00.000000000 +0100 ++++ ./arch/arm64/boot/dts/broadcom/bcm283x-rpi-csi1-2lane.dtsi 2025-05-05 20:19:23.872333877 +0200 +@@ -0,0 +1,4 @@ ++// SPDX-License-Identifier: GPL-2.0-only ++&csi1 { ++ brcm,num-data-lanes = <2>; ++}; diff --git a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0012-bcm283x-rpi-i2c0mux_0_44.dtsi.patch b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0012-bcm283x-rpi-i2c0mux_0_44.dtsi.patch new file mode 100644 index 0000000..b3d47ae --- /dev/null +++ b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0012-bcm283x-rpi-i2c0mux_0_44.dtsi.patch @@ -0,0 +1,7 @@ +--- /home/rossierd/soo/infrabase/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/arch/arm64/boot/dts/broadcom/bcm283x-rpi-i2c0mux_0_44.dtsi 1970-01-01 01:00:00.000000000 +0100 ++++ ./arch/arm64/boot/dts/broadcom/bcm283x-rpi-i2c0mux_0_44.dtsi 2025-05-05 20:19:23.872333877 +0200 +@@ -0,0 +1,4 @@ ++&i2c0mux { ++ pinctrl-0 = <&i2c0_gpio0>; ++ pinctrl-1 = <&i2c0_gpio44>; ++}; diff --git a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0013-bcm283x-rpi-usb-peripheral.dtsi.patch b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0013-bcm283x-rpi-usb-peripheral.dtsi.patch new file mode 100644 index 0000000..844c43a --- /dev/null +++ b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0013-bcm283x-rpi-usb-peripheral.dtsi.patch @@ -0,0 +1,10 @@ +--- /home/rossierd/soo/infrabase/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/arch/arm64/boot/dts/broadcom/bcm283x-rpi-usb-peripheral.dtsi 1970-01-01 01:00:00.000000000 +0100 ++++ ./arch/arm64/boot/dts/broadcom/bcm283x-rpi-usb-peripheral.dtsi 2025-05-05 20:19:23.872333877 +0200 +@@ -0,0 +1,7 @@ ++// SPDX-License-Identifier: GPL-2.0 ++&usb { ++ dr_mode = "peripheral"; ++ g-rx-fifo-size = <256>; ++ g-np-tx-fifo-size = <32>; ++ g-tx-fifo-size = <256 256 512 512 512 768 768>; ++}; diff --git a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0014-rpi4_64_defconfig.patch b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0014-rpi4_64_defconfig.patch index 5ce299c..e3a4bae 100644 --- a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0014-rpi4_64_defconfig.patch +++ b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0014-rpi4_64_defconfig.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/arch/arm64/configs/rpi4_64_defconfig 1970-01-01 01:00:00.000000000 +0100 -+++ ./arch/arm64/configs/rpi4_64_defconfig 2026-02-08 09:42:02.565101571 +0100 +--- /home/rossierd/soo/infrabase/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/arch/arm64/configs/rpi4_64_defconfig 1970-01-01 01:00:00.000000000 +0100 ++++ ./arch/arm64/configs/rpi4_64_defconfig 2025-09-04 17:52:33.604603312 +0200 @@ -0,0 +1,9567 @@ +# +# Automatically generated file; DO NOT EDIT. diff --git a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0016-Makefile.patch b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0015-Makefile.patch similarity index 67% rename from build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0016-Makefile.patch rename to build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0015-Makefile.patch index 7a95a91..b3115e1 100644 --- a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0016-Makefile.patch +++ b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0015-Makefile.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/Makefile 2026-02-08 10:06:33.204423353 +0100 -+++ ./Makefile 2026-02-08 10:09:07.512920271 +0100 +--- /home/rossierd/soo/infrabase/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/Makefile 2025-09-03 20:23:08.000000000 +0200 ++++ ./Makefile 2025-09-04 17:09:43.485709002 +0200 @@ -378,7 +378,8 @@ # Alternatively CROSS_COMPILE can be set in the environment. # Default value for CROSS_COMPILE is not to prefix executables diff --git a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0015-rpi4_64_nomodules_defconfig.patch b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0016-rpi4_64_nomodules_defconfig.patch similarity index 99% rename from build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0015-rpi4_64_nomodules_defconfig.patch rename to build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0016-rpi4_64_nomodules_defconfig.patch index fc6c539..dc44b58 100644 --- a/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0015-rpi4_64_nomodules_defconfig.patch +++ b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0016-rpi4_64_nomodules_defconfig.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/arch/arm64/configs/rpi4_64_nomodules_defconfig 1970-01-01 01:00:00.000000000 +0100 -+++ ./arch/arm64/configs/rpi4_64_nomodules_defconfig 2026-02-08 09:42:02.565309479 +0100 +--- /home/rossierd/soo/infrabase/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/arch/arm64/configs/rpi4_64_nomodules_defconfig 1970-01-01 01:00:00.000000000 +0100 ++++ ./arch/arm64/configs/rpi4_64_nomodules_defconfig 2025-09-06 10:06:10.623846119 +0200 @@ -0,0 +1,5421 @@ +# +# Automatically generated file; DO NOT EDIT. diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0002-rpi4_64_nomodules_soo_defconfig.patch b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0017-rpi4_64_nomodules_soo_defconfig.patch similarity index 85% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0002-rpi4_64_nomodules_soo_defconfig.patch rename to build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0017-rpi4_64_nomodules_soo_defconfig.patch index ba3a9c4..84ad440 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0002-rpi4_64_nomodules_soo_defconfig.patch +++ b/build/meta-linux/recipes-linux/linux/files/0001-linux-6.12-rpi4-r0/0017-rpi4_64_nomodules_soo_defconfig.patch @@ -1,9 +1,9 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/arch/arm64/configs/rpi4_64_nomodules_soo_defconfig 1970-01-01 01:00:00.000000000 +0100 -+++ ./arch/arm64/configs/rpi4_64_nomodules_soo_defconfig 2026-03-21 13:02:28.838899612 +0100 -@@ -0,0 +1,6140 @@ +--- /home/rossierd/soo/micofe/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/arch/arm64/configs/rpi4_64_nomodules_soo_defconfig 1970-01-01 01:00:00.000000000 +0100 ++++ ./arch/arm64/configs/rpi4_64_nomodules_soo_defconfig 2026-02-13 12:39:28.107216945 +0100 +@@ -0,0 +1,5439 @@ +# +# Automatically generated file; DO NOT EDIT. -+# Linux/arm64 6.12.47 Kernel Configuration ++# Linux/arm64 6.12.34 Kernel Configuration +# +CONFIG_CC_VERSION_TEXT="aarch64-none-linux-gnu-gcc (Arm GNU Toolchain 12.2.Rel1 (Build arm-12.24)) 12.2.1 20221205" +CONFIG_CC_IS_GCC=y @@ -22,6 +22,7 @@ +CONFIG_CC_HAS_ASM_INLINE=y +CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y +CONFIG_LD_CAN_USE_KEEP_IN_OVERLAY=y ++CONFIG_RUSTC_HAS_UNNECESSARY_TRANSMUTES=y +CONFIG_PAHOLE_VERSION=0 +CONFIG_IRQ_WORK=y +CONFIG_BUILDTIME_TABLE_SORT=y @@ -430,7 +431,7 @@ +# CONFIG_SCHED_MC is not set +# CONFIG_SCHED_CLUSTER is not set +# CONFIG_SCHED_SMT is not set -+CONFIG_NR_CPUS=2 ++CONFIG_NR_CPUS=3 +CONFIG_HOTPLUG_CPU=y +CONFIG_NUMA=y +CONFIG_NODES_SHIFT=4 @@ -936,7 +937,9 @@ +CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y +# CONFIG_MEMORY_HOTPLUG is not set +CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y ++CONFIG_SPLIT_PTE_PTLOCKS=y +CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y ++CONFIG_SPLIT_PMD_PTLOCKS=y +CONFIG_COMPACTION=y +CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1 +# CONFIG_PAGE_REPORTING is not set @@ -1397,8 +1400,6 @@ +CONFIG_GENERIC_CPU_VULNERABILITIES=y +CONFIG_SOC_BUS=y +CONFIG_REGMAP=y -+CONFIG_REGMAP_I2C=y -+CONFIG_REGMAP_SPI=y +CONFIG_REGMAP_MMIO=y +CONFIG_DMA_SHARED_BUFFER=y +# CONFIG_DMA_FENCE_TRACE is not set @@ -2210,11 +2211,11 @@ +# CONFIG_JOYSTICK_SEESAW is not set +# CONFIG_INPUT_TABLET is not set +CONFIG_INPUT_TOUCHSCREEN=y -+CONFIG_TOUCHSCREEN_ADS7846=y ++# CONFIG_TOUCHSCREEN_ADS7846 is not set +# CONFIG_TOUCHSCREEN_AD7877 is not set +# CONFIG_TOUCHSCREEN_AD7879 is not set +# CONFIG_TOUCHSCREEN_AR1021_I2C is not set -+CONFIG_TOUCHSCREEN_ATMEL_MXT=y ++# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set +# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set +# CONFIG_TOUCHSCREEN_BU21013 is not set +# CONFIG_TOUCHSCREEN_BU21029 is not set @@ -2226,17 +2227,17 @@ +# CONFIG_TOUCHSCREEN_DYNAPRO is not set +# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set +# CONFIG_TOUCHSCREEN_EETI is not set -+CONFIG_TOUCHSCREEN_EGALAX=y ++# CONFIG_TOUCHSCREEN_EGALAX is not set +# CONFIG_TOUCHSCREEN_EGALAX_SERIAL is not set -+CONFIG_TOUCHSCREEN_EXC3000=y ++# CONFIG_TOUCHSCREEN_EXC3000 is not set +# CONFIG_TOUCHSCREEN_FUJITSU is not set -+CONFIG_TOUCHSCREEN_GOODIX=y ++# CONFIG_TOUCHSCREEN_GOODIX is not set +# CONFIG_TOUCHSCREEN_GOODIX_BERLIN_I2C is not set +# CONFIG_TOUCHSCREEN_GOODIX_BERLIN_SPI is not set +# CONFIG_TOUCHSCREEN_HIDEEP is not set +# CONFIG_TOUCHSCREEN_HYCON_HY46XX is not set +# CONFIG_TOUCHSCREEN_HYNITRON_CSTXXX is not set -+CONFIG_TOUCHSCREEN_ILI210X=y ++# CONFIG_TOUCHSCREEN_ILI210X is not set +# CONFIG_TOUCHSCREEN_ILITEK is not set +# CONFIG_TOUCHSCREEN_S6SY761 is not set +# CONFIG_TOUCHSCREEN_GUNZE is not set @@ -2255,49 +2256,31 @@ +# CONFIG_TOUCHSCREEN_IMX6UL_TSC is not set +# CONFIG_TOUCHSCREEN_INEXIO is not set +# CONFIG_TOUCHSCREEN_PENMOUNT is not set -+CONFIG_TOUCHSCREEN_EDT_FT5X06=y -+CONFIG_TOUCHSCREEN_RASPBERRYPI_FW=y ++# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set ++# CONFIG_TOUCHSCREEN_RASPBERRYPI_FW is not set +# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set +# CONFIG_TOUCHSCREEN_TOUCHWIN is not set +# CONFIG_TOUCHSCREEN_PIXCIR is not set +# CONFIG_TOUCHSCREEN_WDT87XX_I2C is not set -+CONFIG_TOUCHSCREEN_USB_COMPOSITE=y -+CONFIG_TOUCHSCREEN_USB_EGALAX=y -+CONFIG_TOUCHSCREEN_USB_PANJIT=y -+CONFIG_TOUCHSCREEN_USB_3M=y -+CONFIG_TOUCHSCREEN_USB_ITM=y -+CONFIG_TOUCHSCREEN_USB_ETURBO=y -+CONFIG_TOUCHSCREEN_USB_GUNZE=y -+CONFIG_TOUCHSCREEN_USB_DMC_TSC10=y -+CONFIG_TOUCHSCREEN_USB_IRTOUCH=y -+CONFIG_TOUCHSCREEN_USB_IDEALTEK=y -+CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=y -+CONFIG_TOUCHSCREEN_USB_GOTOP=y -+CONFIG_TOUCHSCREEN_USB_JASTEC=y -+CONFIG_TOUCHSCREEN_USB_ELO=y -+CONFIG_TOUCHSCREEN_USB_E2I=y -+CONFIG_TOUCHSCREEN_USB_ZYTRONIC=y -+CONFIG_TOUCHSCREEN_USB_ETT_TC45USB=y -+CONFIG_TOUCHSCREEN_USB_NEXIO=y -+CONFIG_TOUCHSCREEN_USB_EASYTOUCH=y ++# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set +# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set +# CONFIG_TOUCHSCREEN_TSC_SERIO is not set +# CONFIG_TOUCHSCREEN_TSC2004 is not set +# CONFIG_TOUCHSCREEN_TSC2005 is not set -+CONFIG_TOUCHSCREEN_TSC2007=y ++# CONFIG_TOUCHSCREEN_TSC2007 is not set +# CONFIG_TOUCHSCREEN_RM_TS is not set +# CONFIG_TOUCHSCREEN_SILEAD is not set +# CONFIG_TOUCHSCREEN_SIS_I2C is not set +# CONFIG_TOUCHSCREEN_ST1232 is not set +# CONFIG_TOUCHSCREEN_STMFTS is not set -+CONFIG_TOUCHSCREEN_STMPE=y ++# CONFIG_TOUCHSCREEN_STMPE is not set +# CONFIG_TOUCHSCREEN_SURFACE3_SPI is not set +# CONFIG_TOUCHSCREEN_SX8654 is not set +# CONFIG_TOUCHSCREEN_TPS6507X is not set +# CONFIG_TOUCHSCREEN_ZET6223 is not set +# CONFIG_TOUCHSCREEN_ZFORCE is not set +# CONFIG_TOUCHSCREEN_ROHM_BU21023 is not set -+CONFIG_TOUCHSCREEN_IQS5XX=y ++# CONFIG_TOUCHSCREEN_IQS5XX is not set +# CONFIG_TOUCHSCREEN_IQS7211 is not set +# CONFIG_TOUCHSCREEN_ZINITIX is not set +# CONFIG_TOUCHSCREEN_HIMAX_HX83112B is not set @@ -2483,8 +2466,8 @@ +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# -+CONFIG_I2C_BCM2835=y -+CONFIG_I2C_BRCMSTB=y ++# CONFIG_I2C_BCM2835 is not set ++# CONFIG_I2C_BRCMSTB is not set +# CONFIG_I2C_CADENCE is not set +# CONFIG_I2C_CBUS_GPIO is not set +# CONFIG_I2C_DESIGNWARE_CORE is not set @@ -3108,7 +3091,6 @@ +# CONFIG_MFD_RN5T618 is not set +# CONFIG_MFD_SEC_CORE is not set +# CONFIG_MFD_SI476X_CORE is not set -+CONFIG_MFD_SIMPLE_MFD_I2C=y +# CONFIG_MFD_SM501 is not set +# CONFIG_MFD_SKY81452 is not set +CONFIG_MFD_STMPE=y @@ -3222,9 +3204,6 @@ +# CONFIG_REGULATOR_PV88090 is not set +# CONFIG_REGULATOR_PWM is not set +# CONFIG_REGULATOR_RAA215300 is not set -+CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY=y -+CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_V2=y -+CONFIG_REGULATOR_WAVESHARE_TOUCHSCREEN=y +# CONFIG_REGULATOR_RT4801 is not set +# CONFIG_REGULATOR_RT4803 is not set +# CONFIG_REGULATOR_RT5190A is not set @@ -3285,12 +3264,10 @@ +# CONFIG_RC_ATI_REMOTE is not set +# CONFIG_RC_LOOPBACK is not set +# CONFIG_RC_XBOX_DVD is not set -+CONFIG_CEC_CORE=y + +# +# CEC support +# -+# CONFIG_MEDIA_CEC_RC is not set +CONFIG_MEDIA_CEC_SUPPORT=y +# CONFIG_CEC_CH7322 is not set +# CONFIG_CEC_GPIO is not set @@ -3315,250 +3292,7 @@ +# CONFIG_HT16K33 is not set +# CONFIG_MAX6959 is not set +# CONFIG_SEG_LED_GPIO is not set -+CONFIG_DRM=y -+CONFIG_DRM_MIPI_DBI=y -+CONFIG_DRM_MIPI_DSI=y -+# CONFIG_DRM_DEBUG_MM is not set -+CONFIG_DRM_KMS_HELPER=y -+# CONFIG_DRM_PANIC is not set -+# CONFIG_DRM_DEBUG_DP_MST_TOPOLOGY_REFS is not set -+# CONFIG_DRM_DEBUG_MODESET_LOCK is not set -+CONFIG_DRM_CLIENT_SELECTION=y -+CONFIG_DRM_CLIENT_SETUP=y -+CONFIG_DRM_FBDEV_EMULATION=y -+CONFIG_DRM_FBDEV_OVERALLOC=100 -+# CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM is not set -+CONFIG_DRM_LOAD_EDID_FIRMWARE=y -+CONFIG_DRM_DISPLAY_HELPER=y -+# CONFIG_DRM_DISPLAY_DP_AUX_CEC is not set -+# CONFIG_DRM_DISPLAY_DP_AUX_CHARDEV is not set -+CONFIG_DRM_DISPLAY_HDMI_HELPER=y -+CONFIG_DRM_DISPLAY_HDMI_STATE_HELPER=y -+CONFIG_DRM_GEM_DMA_HELPER=y -+CONFIG_DRM_GEM_SHMEM_HELPER=y -+CONFIG_DRM_SCHED=y -+ -+# -+# I2C encoder or helper chips -+# -+# CONFIG_DRM_I2C_CH7006 is not set -+# CONFIG_DRM_I2C_SIL164 is not set -+# CONFIG_DRM_I2C_NXP_TDA998X is not set -+# CONFIG_DRM_I2C_NXP_TDA9950 is not set -+# end of I2C encoder or helper chips -+ -+# -+# ARM devices -+# -+# CONFIG_DRM_HDLCD is not set -+# CONFIG_DRM_MALI_DISPLAY is not set -+# CONFIG_DRM_KOMEDA is not set -+# end of ARM devices -+ -+# CONFIG_DRM_RADEON is not set -+# CONFIG_DRM_AMDGPU is not set -+# CONFIG_DRM_NOUVEAU is not set -+# CONFIG_DRM_XE is not set -+# CONFIG_DRM_VGEM is not set -+# CONFIG_DRM_VKMS is not set -+# CONFIG_DRM_VMWGFX is not set -+CONFIG_DRM_UDL=y -+# CONFIG_DRM_AST is not set -+# CONFIG_DRM_MGAG200 is not set -+# CONFIG_DRM_QXL is not set -+# CONFIG_DRM_VIRTIO_GPU is not set -+CONFIG_DRM_PANEL=y -+ -+# -+# Display Panels -+# -+# CONFIG_DRM_PANEL_ABT_Y030XX067A is not set -+# CONFIG_DRM_PANEL_ARM_VERSATILE is not set -+# CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596 is not set -+# CONFIG_DRM_PANEL_AUO_A030JTN01 is not set -+# CONFIG_DRM_PANEL_BOE_BF060Y8M_AJ0 is not set -+# CONFIG_DRM_PANEL_BOE_HIMAX8279D is not set -+# CONFIG_DRM_PANEL_BOE_TH101MB31UIG002_28A is not set -+# CONFIG_DRM_PANEL_BOE_TV101WUM_NL6 is not set -+# CONFIG_DRM_PANEL_BOE_TV101WUM_LL2 is not set -+# CONFIG_DRM_PANEL_EBBG_FT8719 is not set -+# CONFIG_DRM_PANEL_ELIDA_KD35T133 is not set -+# CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02 is not set -+# CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D is not set -+# CONFIG_DRM_PANEL_DSI_CM is not set -+CONFIG_DRM_PANEL_LVDS=y -+# CONFIG_DRM_PANEL_HIMAX_HX83102 is not set -+# CONFIG_DRM_PANEL_HIMAX_HX83112A is not set -+# CONFIG_DRM_PANEL_HIMAX_HX8394 is not set -+# CONFIG_DRM_PANEL_ILITEK_IL9322 is not set -+# CONFIG_DRM_PANEL_ILITEK_ILI9341 is not set -+# CONFIG_DRM_PANEL_ILITEK_ILI9805 is not set -+CONFIG_DRM_PANEL_ILITEK_ILI9806E=y -+CONFIG_DRM_PANEL_ILITEK_ILI9806E_SPI=y -+CONFIG_DRM_PANEL_ILITEK_ILI9881C=y -+# CONFIG_DRM_PANEL_ILITEK_ILI9882T is not set -+# CONFIG_DRM_PANEL_INNOLUX_EJ030NA is not set -+# CONFIG_DRM_PANEL_INNOLUX_P079ZCA is not set -+# CONFIG_DRM_PANEL_JADARD_JD9365DA_H3 is not set -+# CONFIG_DRM_PANEL_JDI_LPM102A188A is not set -+CONFIG_DRM_PANEL_JDI_LT070ME05000=y -+# CONFIG_DRM_PANEL_JDI_R63452 is not set -+# CONFIG_DRM_PANEL_KHADAS_TS050 is not set -+# CONFIG_DRM_PANEL_KINGDISPLAY_KD097D04 is not set -+# CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W is not set -+# CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829 is not set -+# CONFIG_DRM_PANEL_LINCOLNTECH_LCD197 is not set -+# CONFIG_DRM_PANEL_LG_LB035Q02 is not set -+# CONFIG_DRM_PANEL_LG_LG4573 is not set -+# CONFIG_DRM_PANEL_LG_SW43408 is not set -+# CONFIG_DRM_PANEL_MAGNACHIP_D53E6EA8966 is not set -+# CONFIG_DRM_PANEL_MANTIX_MLAF057WE51 is not set -+# CONFIG_DRM_PANEL_NEC_NL8048HL11 is not set -+# CONFIG_DRM_PANEL_NEWVISION_NV3051D is not set -+# CONFIG_DRM_PANEL_NEWVISION_NV3052C is not set -+# CONFIG_DRM_PANEL_NOVATEK_NT35510 is not set -+# CONFIG_DRM_PANEL_NOVATEK_NT35560 is not set -+# CONFIG_DRM_PANEL_NOVATEK_NT35950 is not set -+# CONFIG_DRM_PANEL_NOVATEK_NT36523 is not set -+# CONFIG_DRM_PANEL_NOVATEK_NT36672A is not set -+# CONFIG_DRM_PANEL_NOVATEK_NT36672E is not set -+# CONFIG_DRM_PANEL_NOVATEK_NT39016 is not set -+# CONFIG_DRM_PANEL_OLIMEX_LCD_OLINUXINO is not set -+# CONFIG_DRM_PANEL_ORISETECH_OTA5601A is not set -+# CONFIG_DRM_PANEL_ORISETECH_OTM8009A is not set -+# CONFIG_DRM_PANEL_OSD_OSD101T2587_53TS is not set -+# CONFIG_DRM_PANEL_PANASONIC_VVX10F034N00 is not set -+CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=y -+# CONFIG_DRM_PANEL_RAYDIUM_RM67191 is not set -+# CONFIG_DRM_PANEL_RAYDIUM_RM68200 is not set -+# CONFIG_DRM_PANEL_RAYDIUM_RM692E5 is not set -+# CONFIG_DRM_PANEL_RAYDIUM_RM69380 is not set -+# CONFIG_DRM_PANEL_RONBO_RB070D30 is not set -+# CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01 is not set -+# CONFIG_DRM_PANEL_SAMSUNG_ATNA33XC20 is not set -+# CONFIG_DRM_PANEL_SAMSUNG_DB7430 is not set -+# CONFIG_DRM_PANEL_SAMSUNG_LD9040 is not set -+# CONFIG_DRM_PANEL_SAMSUNG_S6E3FA7 is not set -+# CONFIG_DRM_PANEL_SAMSUNG_S6D16D0 is not set -+# CONFIG_DRM_PANEL_SAMSUNG_S6D27A1 is not set -+# CONFIG_DRM_PANEL_SAMSUNG_S6D7AA0 is not set -+# CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2 is not set -+# CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03 is not set -+# CONFIG_DRM_PANEL_SAMSUNG_S6E63M0 is not set -+# CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0 is not set -+# CONFIG_DRM_PANEL_SAMSUNG_SOFEF00 is not set -+# CONFIG_DRM_PANEL_SEIKO_43WVF1G is not set -+# CONFIG_DRM_PANEL_SHARP_LQ101R1SX01 is not set -+# CONFIG_DRM_PANEL_SHARP_LS037V7DW01 is not set -+# CONFIG_DRM_PANEL_SHARP_LS043T1LE01 is not set -+# CONFIG_DRM_PANEL_SHARP_LS060T1SX01 is not set -+CONFIG_DRM_PANEL_SITRONIX_ST7701=y -+# CONFIG_DRM_PANEL_SITRONIX_ST7703 is not set -+# CONFIG_DRM_PANEL_SITRONIX_ST7789V is not set -+# CONFIG_DRM_PANEL_SONY_ACX565AKM is not set -+# CONFIG_DRM_PANEL_SONY_TD4353_JDI is not set -+# CONFIG_DRM_PANEL_SONY_TULIP_TRULY_NT35521 is not set -+# CONFIG_DRM_PANEL_STARTEK_KD070FHFID015 is not set -+# CONFIG_DRM_PANEL_EDP is not set -+CONFIG_DRM_PANEL_SIMPLE=y -+# CONFIG_DRM_PANEL_SYNAPTICS_R63353 is not set -+# CONFIG_DRM_PANEL_TDO_TL070WSH30 is not set -+CONFIG_DRM_PANEL_TPO_Y17P=y -+# CONFIG_DRM_PANEL_TPO_TD028TTEC1 is not set -+# CONFIG_DRM_PANEL_TPO_TD043MTEA1 is not set -+# CONFIG_DRM_PANEL_TPO_TPG110 is not set -+# CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA is not set -+# CONFIG_DRM_PANEL_VISIONOX_R66451 is not set -+# CONFIG_DRM_PANEL_VISIONOX_RM69299 is not set -+# CONFIG_DRM_PANEL_VISIONOX_VTDR6130 is not set -+CONFIG_DRM_PANEL_WAVESHARE_TOUCHSCREEN=y -+CONFIG_DRM_PANEL_WAVESHARE_TOUCHSCREEN_V2=y -+# CONFIG_DRM_PANEL_WIDECHIPS_WS2401 is not set -+# CONFIG_DRM_PANEL_XINPENG_XPP055C272 is not set -+# end of Display Panels -+ -+CONFIG_DRM_BRIDGE=y -+CONFIG_DRM_PANEL_BRIDGE=y -+ -+# -+# Display Interface Bridges -+# -+# CONFIG_DRM_CHIPONE_ICN6211 is not set -+# CONFIG_DRM_CHRONTEL_CH7033 is not set -+CONFIG_DRM_DISPLAY_CONNECTOR=y -+# CONFIG_DRM_ITE_IT6505 is not set -+# CONFIG_DRM_LONTIUM_LT8912B is not set -+# CONFIG_DRM_LONTIUM_LT9211 is not set -+# CONFIG_DRM_LONTIUM_LT9611 is not set -+# CONFIG_DRM_LONTIUM_LT9611UXC is not set -+# CONFIG_DRM_ITE_IT66121 is not set -+# CONFIG_DRM_LVDS_CODEC is not set -+# CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW is not set -+# CONFIG_DRM_NWL_MIPI_DSI is not set -+# CONFIG_DRM_NXP_PTN3460 is not set -+# CONFIG_DRM_PARADE_PS8622 is not set -+# CONFIG_DRM_PARADE_PS8640 is not set -+# CONFIG_DRM_SAMSUNG_DSIM is not set -+# CONFIG_DRM_SIL_SII8620 is not set -+# CONFIG_DRM_SII902X is not set -+# CONFIG_DRM_SII9234 is not set -+CONFIG_DRM_SIMPLE_BRIDGE=y -+# CONFIG_DRM_THINE_THC63LVD1024 is not set -+CONFIG_DRM_TOSHIBA_TC358762=y -+# CONFIG_DRM_TOSHIBA_TC358764 is not set -+# CONFIG_DRM_TOSHIBA_TC358767 is not set -+# CONFIG_DRM_TOSHIBA_TC358768 is not set -+# CONFIG_DRM_TOSHIBA_TC358775 is not set -+# CONFIG_DRM_TI_DLPC3433 is not set -+# CONFIG_DRM_TI_TFP410 is not set -+CONFIG_DRM_TI_SN65DSI83=y -+# CONFIG_DRM_TI_SN65DSI86 is not set -+# CONFIG_DRM_TI_TPD12S015 is not set -+# CONFIG_DRM_ANALOGIX_ANX6345 is not set -+# CONFIG_DRM_ANALOGIX_ANX78XX is not set -+# CONFIG_DRM_ANALOGIX_ANX7625 is not set -+# CONFIG_DRM_I2C_ADV7511 is not set -+# CONFIG_DRM_CDNS_DSI is not set -+# CONFIG_DRM_CDNS_MHDP8546 is not set -+# end of Display Interface Bridges -+ -+CONFIG_DRM_V3D=y -+CONFIG_DRM_VC4=y -+CONFIG_DRM_VC4_HDMI_CEC=y -+# CONFIG_DRM_RP1_DSI is not set -+# CONFIG_DRM_RP1_DPI is not set -+# CONFIG_DRM_RP1_VEC is not set -+# CONFIG_DRM_ETNAVIV is not set -+# CONFIG_DRM_HISI_HIBMC is not set -+# CONFIG_DRM_HISI_KIRIN is not set -+# CONFIG_DRM_LOGICVC is not set -+# CONFIG_DRM_ARCPGU is not set -+# CONFIG_DRM_BOCHS is not set -+# CONFIG_DRM_CIRRUS_QEMU is not set -+# CONFIG_DRM_GM12U320 is not set -+CONFIG_DRM_PANEL_MIPI_DBI=y -+# CONFIG_DRM_SIMPLEDRM is not set -+CONFIG_TINYDRM_HX8357D=y -+# CONFIG_TINYDRM_ILI9163 is not set -+CONFIG_TINYDRM_ILI9225=y -+CONFIG_TINYDRM_ILI9341=y -+CONFIG_TINYDRM_ILI9486=y -+CONFIG_TINYDRM_MI0283QT=y -+CONFIG_TINYDRM_REPAPER=y -+CONFIG_TINYDRM_ST7586=y -+CONFIG_TINYDRM_ST7735R=y -+# CONFIG_DRM_PL111 is not set -+# CONFIG_DRM_LIMA is not set -+# CONFIG_DRM_PANFROST is not set -+# CONFIG_DRM_PANTHOR is not set -+# CONFIG_DRM_TIDSS is not set -+CONFIG_DRM_GUD=y -+CONFIG_DRM_SSD130X=y -+CONFIG_DRM_SSD130X_I2C=y -+CONFIG_DRM_SSD130X_SPI=y -+# CONFIG_DRM_POWERVR is not set -+# CONFIG_DRM_WERROR is not set -+CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y ++# CONFIG_DRM is not set + +# +# Frame buffer Devices @@ -3599,9 +3333,9 @@ +# CONFIG_FB_METRONOME is not set +# CONFIG_FB_MB862XX is not set +CONFIG_FB_SIMPLE=y -+CONFIG_FB_SSD1307=y ++# CONFIG_FB_SSD1307 is not set +# CONFIG_FB_SM712 is not set -+CONFIG_FB_RPISENSE=y ++# CONFIG_FB_RPISENSE is not set +CONFIG_FB_CORE=y +CONFIG_FB_NOTIFY=y +# CONFIG_FIRMWARE_EDID is not set @@ -3609,19 +3343,9 @@ +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y -+CONFIG_FB_SYS_FILLRECT=y -+CONFIG_FB_SYS_COPYAREA=y -+CONFIG_FB_SYS_IMAGEBLIT=y +# CONFIG_FB_FOREIGN_ENDIAN is not set -+CONFIG_FB_SYSMEM_FOPS=y -+CONFIG_FB_DEFERRED_IO=y -+CONFIG_FB_DMAMEM_HELPERS=y -+CONFIG_FB_DMAMEM_HELPERS_DEFERRED=y +CONFIG_FB_IOMEM_FOPS=y +CONFIG_FB_IOMEM_HELPERS=y -+CONFIG_FB_SYSMEM_HELPERS=y -+CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y -+CONFIG_FB_BACKLIGHT=y +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set +# end of Frame buffer Devices @@ -3630,447 +3354,30 @@ +# Backlight & LCD device support +# +# CONFIG_LCD_CLASS_DEVICE is not set -+CONFIG_BACKLIGHT_CLASS_DEVICE=y -+# CONFIG_BACKLIGHT_KTD253 is not set -+# CONFIG_BACKLIGHT_KTD2801 is not set -+# CONFIG_BACKLIGHT_KTZ8866 is not set -+CONFIG_BACKLIGHT_PWM=y -+CONFIG_BACKLIGHT_RPI=y -+# CONFIG_BACKLIGHT_QCOM_WLED is not set -+# CONFIG_BACKLIGHT_ADP8860 is not set -+# CONFIG_BACKLIGHT_ADP8870 is not set -+# CONFIG_BACKLIGHT_LM3509 is not set -+CONFIG_BACKLIGHT_LM3630A=y -+# CONFIG_BACKLIGHT_LM3639 is not set -+# CONFIG_BACKLIGHT_LP855X is not set -+# CONFIG_BACKLIGHT_MP3309C is not set -+CONFIG_BACKLIGHT_GPIO=y -+# CONFIG_BACKLIGHT_LV5207LP is not set -+# CONFIG_BACKLIGHT_BD6107 is not set -+# CONFIG_BACKLIGHT_ARCXCNN is not set -+# CONFIG_BACKLIGHT_LED is not set ++# CONFIG_BACKLIGHT_CLASS_DEVICE is not set +# end of Backlight & LCD device support + -+CONFIG_VIDEOMODE_HELPERS=y -+CONFIG_HDMI=y -+ +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y +CONFIG_DUMMY_CONSOLE_COLUMNS=80 +CONFIG_DUMMY_CONSOLE_ROWS=25 -+# CONFIG_FRAMEBUFFER_CONSOLE is not set ++CONFIG_FRAMEBUFFER_CONSOLE=y ++# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set ++CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y ++CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y ++# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set +# end of Console display driver support + -+# CONFIG_LOGO is not set ++CONFIG_LOGO=y ++# CONFIG_LOGO_LINUX_MONO is not set ++# CONFIG_LOGO_LINUX_VGA16 is not set ++CONFIG_LOGO_LINUX_CLUT224=y +# end of Graphics support + -+# CONFIG_DRM_ACCEL is not set +CONFIG_SOUND=y -+CONFIG_SND=y -+CONFIG_SND_TIMER=y -+CONFIG_SND_PCM=y -+CONFIG_SND_PCM_ELD=y -+CONFIG_SND_PCM_IEC958=y -+CONFIG_SND_DMAENGINE_PCM=y -+CONFIG_SND_JACK=y -+CONFIG_SND_JACK_INPUT_DEV=y -+# CONFIG_SND_OSSEMUL is not set -+CONFIG_SND_PCM_TIMER=y -+# CONFIG_SND_HRTIMER is not set -+# CONFIG_SND_DYNAMIC_MINORS is not set -+CONFIG_SND_SUPPORT_OLD_API=y -+CONFIG_SND_PROC_FS=y -+CONFIG_SND_VERBOSE_PROCFS=y -+CONFIG_SND_CTL_FAST_LOOKUP=y -+# CONFIG_SND_DEBUG is not set -+# CONFIG_SND_CTL_INPUT_VALIDATION is not set -+# CONFIG_SND_UTIMER is not set -+# CONFIG_SND_SEQUENCER is not set -+CONFIG_SND_DRIVERS=y -+# CONFIG_SND_DUMMY is not set -+# CONFIG_SND_ALOOP is not set -+# CONFIG_SND_PCMTEST is not set -+# CONFIG_SND_MTPAV is not set -+# CONFIG_SND_SERIAL_U16550 is not set -+# CONFIG_SND_SERIAL_GENERIC is not set -+# CONFIG_SND_MPU401 is not set -+CONFIG_SND_PCI=y -+# CONFIG_SND_AD1889 is not set -+# CONFIG_SND_ALS300 is not set -+# CONFIG_SND_ALI5451 is not set -+# CONFIG_SND_ATIIXP is not set -+# CONFIG_SND_ATIIXP_MODEM is not set -+# CONFIG_SND_AU8810 is not set -+# CONFIG_SND_AU8820 is not set -+# CONFIG_SND_AU8830 is not set -+# CONFIG_SND_AW2 is not set -+# CONFIG_SND_AZT3328 is not set -+# CONFIG_SND_BT87X is not set -+# CONFIG_SND_CA0106 is not set -+# CONFIG_SND_CMIPCI is not set -+# CONFIG_SND_OXYGEN is not set -+# CONFIG_SND_CS4281 is not set -+# CONFIG_SND_CS46XX is not set -+# CONFIG_SND_CTXFI is not set -+# CONFIG_SND_DARLA20 is not set -+# CONFIG_SND_GINA20 is not set -+# CONFIG_SND_LAYLA20 is not set -+# CONFIG_SND_DARLA24 is not set -+# CONFIG_SND_GINA24 is not set -+# CONFIG_SND_LAYLA24 is not set -+# CONFIG_SND_MONA is not set -+# CONFIG_SND_MIA is not set -+# CONFIG_SND_ECHO3G is not set -+# CONFIG_SND_INDIGO is not set -+# CONFIG_SND_INDIGOIO is not set -+# CONFIG_SND_INDIGODJ is not set -+# CONFIG_SND_INDIGOIOX is not set -+# CONFIG_SND_INDIGODJX is not set -+# CONFIG_SND_EMU10K1 is not set -+# CONFIG_SND_EMU10K1X is not set -+# CONFIG_SND_ENS1370 is not set -+# CONFIG_SND_ENS1371 is not set -+# CONFIG_SND_ES1938 is not set -+# CONFIG_SND_ES1968 is not set -+# CONFIG_SND_FM801 is not set -+# CONFIG_SND_HDSP is not set -+# CONFIG_SND_HDSPM is not set -+# CONFIG_SND_ICE1712 is not set -+# CONFIG_SND_ICE1724 is not set -+# CONFIG_SND_INTEL8X0 is not set -+# CONFIG_SND_INTEL8X0M is not set -+# CONFIG_SND_KORG1212 is not set -+# CONFIG_SND_LOLA is not set -+# CONFIG_SND_LX6464ES is not set -+# CONFIG_SND_MAESTRO3 is not set -+# CONFIG_SND_MIXART is not set -+# CONFIG_SND_NM256 is not set -+# CONFIG_SND_PCXHR is not set -+# CONFIG_SND_RIPTIDE is not set -+# CONFIG_SND_RME32 is not set -+# CONFIG_SND_RME96 is not set -+# CONFIG_SND_RME9652 is not set -+# CONFIG_SND_SE6X is not set -+# CONFIG_SND_SONICVIBES is not set -+# CONFIG_SND_TRIDENT is not set -+# CONFIG_SND_VIA82XX is not set -+# CONFIG_SND_VIA82XX_MODEM is not set -+# CONFIG_SND_VIRTUOSO is not set -+# CONFIG_SND_VX222 is not set -+# CONFIG_SND_YMFPCI is not set -+ -+# -+# HD-Audio -+# -+# CONFIG_SND_HDA_INTEL is not set -+# end of HD-Audio -+ -+CONFIG_SND_HDA_PREALLOC_SIZE=64 -+CONFIG_SND_SPI=y -+CONFIG_SND_USB=y -+# CONFIG_SND_USB_AUDIO is not set -+# CONFIG_SND_USB_UA101 is not set -+# CONFIG_SND_USB_CAIAQ is not set -+# CONFIG_SND_USB_6FIRE is not set -+# CONFIG_SND_USB_HIFACE is not set -+# CONFIG_SND_BCD2000 is not set -+# CONFIG_SND_USB_POD is not set -+# CONFIG_SND_USB_PODHD is not set -+# CONFIG_SND_USB_TONEPORT is not set -+# CONFIG_SND_USB_VARIAX is not set -+CONFIG_SND_SOC=y -+CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y -+# CONFIG_SND_SOC_ADI is not set -+# CONFIG_SND_SOC_AMD_ACP is not set -+# CONFIG_SND_AMD_ACP_CONFIG is not set -+# CONFIG_SND_ATMEL_SOC is not set -+# CONFIG_SND_BCM2835_SOC_I2S is not set -+# CONFIG_SND_BCM63XX_I2S_WHISTLER is not set -+# CONFIG_SND_BCM2708_SOC_CHIPDIP_DAC is not set -+# CONFIG_SND_BCM2708_SOC_GOOGLEVOICEHAT_SOUNDCARD is not set -+# CONFIG_SND_BCM2708_SOC_HIFIBERRY_ADC is not set -+# CONFIG_SND_BCM2708_SOC_HIFIBERRY_ADC8X is not set -+# CONFIG_SND_BCM2708_SOC_HIFIBERRY_DAC is not set -+# CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUS is not set -+# CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSHD is not set -+# CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADC is not set -+# CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSADCPRO is not set -+# CONFIG_SND_BCM2708_SOC_HIFIBERRY_DACPLUSDSP is not set -+# CONFIG_SND_BCM2708_SOC_HIFIBERRY_DIGI is not set -+# CONFIG_SND_BCM2708_SOC_HIFIBERRY_AMP is not set -+# CONFIG_SND_BCM2708_SOC_PIFI_40 is not set -+# CONFIG_SND_BCM2708_SOC_RPI_CIRRUS is not set -+# CONFIG_SND_BCM2708_SOC_RPI_DAC is not set -+# CONFIG_SND_BCM2708_SOC_RPI_PROTO is not set -+# CONFIG_SND_BCM2708_SOC_JUSTBOOM_BOTH is not set -+# CONFIG_SND_BCM2708_SOC_JUSTBOOM_DAC is not set -+# CONFIG_SND_BCM2708_SOC_JUSTBOOM_DIGI is not set -+# CONFIG_SND_BCM2708_SOC_IQAUDIO_CODEC is not set -+# CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC is not set -+# CONFIG_SND_BCM2708_SOC_IQAUDIO_DIGI is not set -+# CONFIG_SND_BCM2708_SOC_I_SABRE_Q2M is not set -+# CONFIG_SND_BCM2708_SOC_ADAU1977_ADC is not set -+# CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD is not set -+# CONFIG_SND_AUDIOINJECTOR_OCTO_SOUNDCARD is not set -+# CONFIG_SND_AUDIOINJECTOR_ISOLATED_SOUNDCARD is not set -+# CONFIG_SND_AUDIOSENSE_PI is not set -+# CONFIG_SND_DIGIDAC1_SOUNDCARD is not set -+# CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO is not set -+# CONFIG_SND_BCM2708_SOC_DIONAUDIO_LOCO_V2 is not set -+# CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC is not set -+# CONFIG_SND_BCM2708_SOC_ALLO_PIANO_DAC_PLUS is not set -+# CONFIG_SND_BCM2708_SOC_ALLO_BOSS_DAC is not set -+# CONFIG_SND_BCM2708_SOC_ALLO_BOSS2_DAC is not set -+# CONFIG_SND_BCM2708_SOC_ALLO_DIGIONE is not set -+# CONFIG_SND_BCM2708_SOC_ALLO_KATANA_DAC is not set -+# CONFIG_SND_BCM2708_SOC_FE_PI_AUDIO is not set -+# CONFIG_SND_PISOUND is not set -+# CONFIG_SND_RPI_SIMPLE_SOUNDCARD is not set -+# CONFIG_SND_RPI_WM8804_SOUNDCARD is not set -+# CONFIG_SND_DACBERRY400 is not set -+# CONFIG_SND_DESIGNWARE_I2S is not set -+ -+# -+# SoC Audio for Freescale CPUs -+# -+ -+# -+# Common SoC Audio options for Freescale CPUs: -+# -+# CONFIG_SND_SOC_FSL_ASRC is not set -+# CONFIG_SND_SOC_FSL_SAI is not set -+# CONFIG_SND_SOC_FSL_AUDMIX is not set -+# CONFIG_SND_SOC_FSL_SSI is not set -+# CONFIG_SND_SOC_FSL_SPDIF is not set -+# CONFIG_SND_SOC_FSL_ESAI is not set -+# CONFIG_SND_SOC_FSL_MICFIL is not set -+# CONFIG_SND_SOC_FSL_XCVR is not set -+# CONFIG_SND_SOC_IMX_AUDMUX is not set -+# end of SoC Audio for Freescale CPUs -+ -+# CONFIG_SND_SOC_CHV3_I2S is not set -+# CONFIG_SND_I2S_HI6210_I2S is not set -+# CONFIG_SND_SOC_IMG is not set -+# CONFIG_SND_SOC_MTK_BTCVSD is not set -+# CONFIG_SND_RP1_AUDIO_OUT is not set -+# CONFIG_SND_SOC_SOF_TOPLEVEL is not set -+ -+# -+# STMicroelectronics STM32 SOC audio support -+# -+# end of STMicroelectronics STM32 SOC audio support -+ -+# CONFIG_SND_SOC_XILINX_I2S is not set -+# CONFIG_SND_SOC_XILINX_AUDIO_FORMATTER is not set -+# CONFIG_SND_SOC_XILINX_SPDIF is not set -+# CONFIG_SND_SOC_XTFPGA_I2S is not set -+CONFIG_SND_SOC_I2C_AND_SPI=y -+ -+# -+# CODEC drivers -+# -+# CONFIG_SND_SOC_AC97_CODEC is not set -+# CONFIG_SND_SOC_AD193X_SPI is not set -+# CONFIG_SND_SOC_AD193X_I2C is not set -+# CONFIG_SND_SOC_ADAU1372_I2C is not set -+# CONFIG_SND_SOC_ADAU1372_SPI is not set -+# CONFIG_SND_SOC_ADAU1701 is not set -+# CONFIG_SND_SOC_ADAU1761_I2C is not set -+# CONFIG_SND_SOC_ADAU1761_SPI is not set -+# CONFIG_SND_SOC_ADAU7002 is not set -+# CONFIG_SND_SOC_ADAU7118_HW is not set -+# CONFIG_SND_SOC_ADAU7118_I2C is not set -+# CONFIG_SND_SOC_AK4104 is not set -+# CONFIG_SND_SOC_AK4118 is not set -+# CONFIG_SND_SOC_AK4375 is not set -+# CONFIG_SND_SOC_AK4458 is not set -+# CONFIG_SND_SOC_AK4554 is not set -+# CONFIG_SND_SOC_AK4613 is not set -+# CONFIG_SND_SOC_AK4619 is not set -+# CONFIG_SND_SOC_AK4642 is not set -+# CONFIG_SND_SOC_AK5386 is not set -+# CONFIG_SND_SOC_AK5558 is not set -+# CONFIG_SND_SOC_ALC5623 is not set -+# CONFIG_SND_SOC_AW8738 is not set -+# CONFIG_SND_SOC_AW88395 is not set -+# CONFIG_SND_SOC_AW88261 is not set -+# CONFIG_SND_SOC_AW87390 is not set -+# CONFIG_SND_SOC_AW88399 is not set -+# CONFIG_SND_SOC_BD28623 is not set -+# CONFIG_SND_SOC_BT_SCO is not set -+# CONFIG_SND_SOC_CHV3_CODEC is not set -+# CONFIG_SND_SOC_CS35L32 is not set -+# CONFIG_SND_SOC_CS35L33 is not set -+# CONFIG_SND_SOC_CS35L34 is not set -+# CONFIG_SND_SOC_CS35L35 is not set -+# CONFIG_SND_SOC_CS35L36 is not set -+# CONFIG_SND_SOC_CS35L41_SPI is not set -+# CONFIG_SND_SOC_CS35L41_I2C is not set -+# CONFIG_SND_SOC_CS35L45_SPI is not set -+# CONFIG_SND_SOC_CS35L45_I2C is not set -+# CONFIG_SND_SOC_CS35L56_I2C is not set -+# CONFIG_SND_SOC_CS35L56_SPI is not set -+# CONFIG_SND_SOC_CS42L42 is not set -+# CONFIG_SND_SOC_CS42L51_I2C is not set -+# CONFIG_SND_SOC_CS42L52 is not set -+# CONFIG_SND_SOC_CS42L56 is not set -+# CONFIG_SND_SOC_CS42L73 is not set -+# CONFIG_SND_SOC_CS42L83 is not set -+# CONFIG_SND_SOC_CS4234 is not set -+# CONFIG_SND_SOC_CS4265 is not set -+# CONFIG_SND_SOC_CS4270 is not set -+# CONFIG_SND_SOC_CS4271_I2C is not set -+# CONFIG_SND_SOC_CS4271_SPI is not set -+# CONFIG_SND_SOC_CS42XX8_I2C is not set -+# CONFIG_SND_SOC_CS43130 is not set -+# CONFIG_SND_SOC_CS4341 is not set -+# CONFIG_SND_SOC_CS4349 is not set -+# CONFIG_SND_SOC_CS53L30 is not set -+# CONFIG_SND_SOC_CS530X_I2C is not set -+# CONFIG_SND_SOC_CX2072X is not set -+# CONFIG_SND_SOC_DA7213 is not set -+# CONFIG_SND_SOC_DMIC is not set -+CONFIG_SND_SOC_HDMI_CODEC=y -+# CONFIG_SND_SOC_ES7134 is not set -+# CONFIG_SND_SOC_ES7241 is not set -+# CONFIG_SND_SOC_ES8311 is not set -+# CONFIG_SND_SOC_ES8316 is not set -+# CONFIG_SND_SOC_ES8326 is not set -+# CONFIG_SND_SOC_ES8328_I2C is not set -+# CONFIG_SND_SOC_ES8328_SPI is not set -+# CONFIG_SND_SOC_GTM601 is not set -+# CONFIG_SND_SOC_HDA is not set -+# CONFIG_SND_SOC_ICS43432 is not set -+# CONFIG_SND_SOC_IDT821034 is not set -+# CONFIG_SND_SOC_MA120X0P is not set -+# CONFIG_SND_SOC_MAX98088 is not set -+# CONFIG_SND_SOC_MAX98090 is not set -+# CONFIG_SND_SOC_MAX98357A is not set -+# CONFIG_SND_SOC_MAX98504 is not set -+# CONFIG_SND_SOC_MAX9867 is not set -+# CONFIG_SND_SOC_MAX98927 is not set -+# CONFIG_SND_SOC_MAX98520 is not set -+# CONFIG_SND_SOC_MAX98373_I2C is not set -+# CONFIG_SND_SOC_MAX98388 is not set -+# CONFIG_SND_SOC_MAX98390 is not set -+# CONFIG_SND_SOC_MAX98396 is not set -+# CONFIG_SND_SOC_MAX9860 is not set -+# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set -+# CONFIG_SND_SOC_PCM1681 is not set -+# CONFIG_SND_SOC_PCM1789_I2C is not set -+# CONFIG_SND_SOC_PCM179X_I2C is not set -+# CONFIG_SND_SOC_PCM179X_SPI is not set -+# CONFIG_SND_SOC_PCM186X_I2C is not set -+# CONFIG_SND_SOC_PCM186X_SPI is not set -+# CONFIG_SND_SOC_PCM3060_I2C is not set -+# CONFIG_SND_SOC_PCM3060_SPI is not set -+# CONFIG_SND_SOC_PCM3168A_I2C is not set -+# CONFIG_SND_SOC_PCM3168A_SPI is not set -+# CONFIG_SND_SOC_PCM5102A is not set -+# CONFIG_SND_SOC_PCM512x_I2C is not set -+# CONFIG_SND_SOC_PCM512x_SPI is not set -+# CONFIG_SND_SOC_PCM6240 is not set -+# CONFIG_SND_SOC_PEB2466 is not set -+# CONFIG_SND_SOC_RT5616 is not set -+# CONFIG_SND_SOC_RT5631 is not set -+# CONFIG_SND_SOC_RT5640 is not set -+# CONFIG_SND_SOC_RT5659 is not set -+# CONFIG_SND_SOC_RT9120 is not set -+# CONFIG_SND_SOC_RTQ9128 is not set -+# CONFIG_SND_SOC_SGTL5000 is not set -+# CONFIG_SND_SOC_SIMPLE_AMPLIFIER is not set -+# CONFIG_SND_SOC_SIMPLE_MUX is not set -+# CONFIG_SND_SOC_SMA1303 is not set -+# CONFIG_SND_SOC_SPDIF is not set -+# CONFIG_SND_SOC_SRC4XXX_I2C is not set -+# CONFIG_SND_SOC_SSM2305 is not set -+# CONFIG_SND_SOC_SSM2518 is not set -+# CONFIG_SND_SOC_SSM2602_SPI is not set -+# CONFIG_SND_SOC_SSM2602_I2C is not set -+# CONFIG_SND_SOC_SSM3515 is not set -+# CONFIG_SND_SOC_SSM4567 is not set -+# CONFIG_SND_SOC_STA32X is not set -+# CONFIG_SND_SOC_STA350 is not set -+# CONFIG_SND_SOC_STI_SAS is not set -+# CONFIG_SND_SOC_TAS2552 is not set -+# CONFIG_SND_SOC_TAS2562 is not set -+# CONFIG_SND_SOC_TAS2764 is not set -+# CONFIG_SND_SOC_TAS2770 is not set -+# CONFIG_SND_SOC_TAS2780 is not set -+# CONFIG_SND_SOC_TAS2781_I2C is not set -+# CONFIG_SND_SOC_TAS5086 is not set -+# CONFIG_SND_SOC_TAS571X is not set -+# CONFIG_SND_SOC_TAS5720 is not set -+# CONFIG_SND_SOC_TAS5805M is not set -+# CONFIG_SND_SOC_TAS6424 is not set -+# CONFIG_SND_SOC_TDA7419 is not set -+# CONFIG_SND_SOC_TFA9879 is not set -+# CONFIG_SND_SOC_TFA989X is not set -+# CONFIG_SND_SOC_TLV320ADC3XXX is not set -+# CONFIG_SND_SOC_TLV320AIC23_I2C is not set -+# CONFIG_SND_SOC_TLV320AIC23_SPI is not set -+# CONFIG_SND_SOC_TLV320AIC31XX is not set -+# CONFIG_SND_SOC_TLV320AIC32X4_I2C is not set -+# CONFIG_SND_SOC_TLV320AIC32X4_SPI is not set -+# CONFIG_SND_SOC_TLV320AIC3X_I2C is not set -+# CONFIG_SND_SOC_TLV320AIC3X_SPI is not set -+# CONFIG_SND_SOC_TLV320ADCX140 is not set -+# CONFIG_SND_SOC_TS3A227E is not set -+# CONFIG_SND_SOC_TSCS42XX is not set -+# CONFIG_SND_SOC_TSCS454 is not set -+# CONFIG_SND_SOC_UDA1334 is not set -+# CONFIG_SND_SOC_WM8510 is not set -+# CONFIG_SND_SOC_WM8523 is not set -+# CONFIG_SND_SOC_WM8524 is not set -+# CONFIG_SND_SOC_WM8580 is not set -+# CONFIG_SND_SOC_WM8711 is not set -+# CONFIG_SND_SOC_WM8728 is not set -+# CONFIG_SND_SOC_WM8731_I2C is not set -+# CONFIG_SND_SOC_WM8731_SPI is not set -+# CONFIG_SND_SOC_WM8737 is not set -+# CONFIG_SND_SOC_WM8741 is not set -+# CONFIG_SND_SOC_WM8750 is not set -+# CONFIG_SND_SOC_WM8753 is not set -+# CONFIG_SND_SOC_WM8770 is not set -+# CONFIG_SND_SOC_WM8776 is not set -+# CONFIG_SND_SOC_WM8782 is not set -+# CONFIG_SND_SOC_WM8804_I2C is not set -+# CONFIG_SND_SOC_WM8804_SPI is not set -+# CONFIG_SND_SOC_WM8903 is not set -+# CONFIG_SND_SOC_WM8904 is not set -+# CONFIG_SND_SOC_WM8940 is not set -+# CONFIG_SND_SOC_WM8960 is not set -+# CONFIG_SND_SOC_WM8961 is not set -+# CONFIG_SND_SOC_WM8962 is not set -+# CONFIG_SND_SOC_WM8974 is not set -+# CONFIG_SND_SOC_WM8978 is not set -+# CONFIG_SND_SOC_WM8985 is not set -+# CONFIG_SND_SOC_ZL38060 is not set -+# CONFIG_SND_SOC_MAX9759 is not set -+# CONFIG_SND_SOC_MT6351 is not set -+# CONFIG_SND_SOC_MT6357 is not set -+# CONFIG_SND_SOC_MT6358 is not set -+# CONFIG_SND_SOC_MT6660 is not set -+# CONFIG_SND_SOC_NAU8315 is not set -+# CONFIG_SND_SOC_NAU8540 is not set -+# CONFIG_SND_SOC_NAU8810 is not set -+# CONFIG_SND_SOC_NAU8821 is not set -+# CONFIG_SND_SOC_NAU8822 is not set -+# CONFIG_SND_SOC_NAU8824 is not set -+# CONFIG_SND_SOC_TPA6130A2 is not set -+# CONFIG_SND_SOC_LPASS_WSA_MACRO is not set -+# CONFIG_SND_SOC_LPASS_VA_MACRO is not set -+# CONFIG_SND_SOC_LPASS_RX_MACRO is not set -+# CONFIG_SND_SOC_LPASS_TX_MACRO is not set -+# CONFIG_SND_SOC_I_SABRE_CODEC is not set -+# end of CODEC drivers -+ -+# CONFIG_SND_SIMPLE_CARD is not set -+# CONFIG_SND_AUDIO_GRAPH_CARD is not set -+# CONFIG_SND_AUDIO_GRAPH_CARD2 is not set -+# CONFIG_SND_TEST_COMPONENT is not set ++# CONFIG_SND is not set +CONFIG_HID_SUPPORT=y +CONFIG_HID=y +CONFIG_HID_BATTERY_STRENGTH=y @@ -4096,7 +3403,6 @@ +# CONFIG_HID_CORSAIR is not set +# CONFIG_HID_COUGAR is not set +# CONFIG_HID_MACALLY is not set -+# CONFIG_HID_PRODIKEYS is not set +# CONFIG_HID_CMEDIA is not set +# CONFIG_HID_CP2112 is not set +# CONFIG_HID_CREATIVE_SB0540 is not set @@ -4401,14 +3707,12 @@ +# USB Gadget precomposed configurations +# +# CONFIG_USB_ZERO is not set -+# CONFIG_USB_AUDIO is not set +# CONFIG_USB_ETH is not set +# CONFIG_USB_G_NCM is not set +# CONFIG_USB_GADGETFS is not set +# CONFIG_USB_FUNCTIONFS is not set +# CONFIG_USB_MASS_STORAGE is not set +# CONFIG_USB_G_SERIAL is not set -+# CONFIG_USB_MIDI_GADGET is not set +# CONFIG_USB_G_PRINTER is not set +# CONFIG_USB_CDC_COMPOSITE is not set +# CONFIG_USB_G_ACM_MS is not set @@ -4744,7 +4048,6 @@ +CONFIG_VHOST_MENU=y +# CONFIG_VHOST_NET is not set +CONFIG_VHOST_CROSS_ENDIAN_LEGACY=y -+CONFIG_VHOST_ENABLE_FORK_OWNER_CONTROL=y + +# +# Microsoft Hyper-V guest support @@ -4763,7 +4066,6 @@ +CONFIG_BCM_VIDEOCORE=y +CONFIG_BCM2835_VCHIQ=y +CONFIG_VCHIQ_CDEV=y -+# CONFIG_SND_BCM2835 is not set +# CONFIG_BCM_VC_SM_CMA is not set +# CONFIG_BCM2835_VCHIQ_MMAL is not set +# CONFIG_XIL_AXIS_FIFO is not set @@ -5660,7 +4962,7 @@ +CONFIG_CRYPTO_LIB_SHA256=y +# end of Crypto library routines + -+CONFIG_CRC_CCITT=y ++# CONFIG_CRC_CCITT is not set +CONFIG_CRC16=y +CONFIG_CRC_T10DIF=y +CONFIG_CRC64_ROCKSOFT=y @@ -5685,7 +4987,6 @@ +CONFIG_ZLIB_DEFLATE=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y -+CONFIG_LZ4_COMPRESS=y +CONFIG_LZ4_DECOMPRESS=y +CONFIG_ZSTD_COMMON=y +CONFIG_ZSTD_COMPRESS=y @@ -5713,7 +5014,6 @@ +CONFIG_REED_SOLOMON_ENC8=y +CONFIG_REED_SOLOMON_DEC8=y +CONFIG_INTERVAL_TREE=y -+CONFIG_XARRAY_MULTI=y +CONFIG_ASSOCIATIVE_ARRAY=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y @@ -5742,7 +5042,7 @@ +# +# Default contiguous memory area size: +# -+CONFIG_CMA_SIZE_MBYTES=32 ++CONFIG_CMA_SIZE_MBYTES=5 +CONFIG_CMA_SIZE_SEL_MBYTES=y +# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set +# CONFIG_CMA_SIZE_SEL_MIN is not set @@ -5768,8 +5068,9 @@ +CONFIG_GENERIC_VDSO_TIME_NS=y +CONFIG_VDSO_GETRANDOM=y +CONFIG_FONT_SUPPORT=y ++# CONFIG_FONTS is not set ++CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y -+CONFIG_FONT_AUTOSELECT=y +CONFIG_SG_POOL=y +CONFIG_ARCH_STACKWALK=y +CONFIG_STACKDEPOT=y @@ -6134,10 +5435,8 @@ +CONFIG_VDUMMY_BACKEND=y +CONFIG_VUART_BACKEND=y +# CONFIG_VLEDS_BACKEND is not set -+# CONFIG_VSENSELED_BACKEND is not set -+# CONFIG_VSENSEJ_BACKEND is not set +CONFIG_VLOGS_BACKEND=y -+CONFIG_VFBDEV_BACKEND=y -+CONFIG_VINPUT_BACKEND=y +# end of Smart Object Oriented subsystem +# end of SOO Framework and subsystems ++CONFIG_VFBDEV_BACKEND=y ++CONFIG_VINPUT_BACKEND=y diff --git a/build/meta-linux/recipes-linux/linux/linux_6.12-rpi4.bb b/build/meta-linux/recipes-linux/linux/linux_6.12-rpi4.bb index f271f0f..9aa7b44 100644 --- a/build/meta-linux/recipes-linux/linux/linux_6.12-rpi4.bb +++ b/build/meta-linux/recipes-linux/linux/linux_6.12-rpi4.bb @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD SUMMARY = "Linux Operating System" DESCRIPTION = "Linux OS used as main domain running on the embedded platform" @@ -11,15 +13,15 @@ OVERRIDES += ":linux" inherit linux -SRC_URI = "git://github.com/raspberrypi/linux.git;branch=rpi-6.12.y;tag=stable_20250916;protocol=https" +SRC_URI = "git://github.com/raspberrypi/linux.git;branch=rpi-6.12.y;tag=stable_20250702;protocol=https" -SRCREV = "359f37f0faefb712add32a39f98751aea67d5c1f" +SRCREV = "8f77e03530f65209a377d25023e912b288e039cd" # Set of patches to be applied # These patches contain rpi4 64-bits enhancement FILESPATH:prepend = "${THISDIR}/files/0001-${PF}:" - + require files/0001-${PF}-patches.inc # Where the working directory will be placed in infrabase root dir diff --git a/build/meta-linux/recipes-linux/linux/linux_6.12.bb b/build/meta-linux/recipes-linux/linux/linux_6.12.bb index fbeba77..7ae4b48 100644 --- a/build/meta-linux/recipes-linux/linux/linux_6.12.bb +++ b/build/meta-linux/recipes-linux/linux/linux_6.12.bb @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD SUMMARY = "Linux Operating System" DESCRIPTION = "Linux OS used as main domain running on the embedded platform" diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0-patches.inc b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0-patches.inc index dbffd2e..5ed32d6 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0-patches.inc +++ b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0-patches.inc @@ -1,130 +1,9 @@ -SRC_URI:append:soo = "\ - file://0071-asf_test.c.patch \ - file://0048-guest_api.h.patch \ - file://0052-roxml.h.patch \ - file://0066-Kconfig.patch \ - file://0104-roxml_core.c.patch \ - file://0075-lprintk.c.patch \ - file://0014-Kconfig.patch \ - file://0116-roxml_tune.h.patch \ - file://0064-vbus.h.patch \ - file://0069-asf.c.patch \ - file://0032-vuart.c.patch \ - file://0024-rpisense-joystick.c.patch \ - file://0060-debug.h.patch \ - file://0055-strtod.h.patch \ - file://0050-paging.h.patch \ - file://0056-sysfs.h.patch \ - file://0098-config.h.patch \ - file://0016-Makefile.patch \ - file://0079-Kconfig.patch \ - file://0086-setup.c.patch \ - file://0019-Makefile.patch \ - file://0002-virt64_soo_defconfig.patch \ - file://0087-soo_guest_activity.c.patch \ - file://0053-simulation.h.patch \ - file://0084-hypervisor.c.patch \ - file://0067-Makefile.patch \ - file://0018-Kconfig.patch \ - file://0094-vbus.c.patch \ - file://0117-roxml_types.h.patch \ - file://0012-tty_flip.h.patch \ - file://0022-vdummy.c.patch \ - file://0081-meminfo.c.patch \ - file://0110-roxml_internal.h.patch \ - file://0033-avz.h.patch \ - file://0059-console.h.patch \ - file://0038-vdummy.h.patch \ - file://0078-debug.c.patch \ - file://0027-Makefile.patch \ - file://0095-vbus_client.c.patch \ - file://0085-Makefile.patch \ - file://0041-vuart.h.patch \ - file://0074-console.c.patch \ - file://0047-gnttab.h.patch \ - file://0042-device_access.h.patch \ - file://0082-evtchn.c.patch \ - file://0122-Makefile.patch \ - file://0120-roxml_xpath.c.patch \ - file://0083-gnttab.c.patch \ - file://0054-soo.h.patch \ - file://0111-roxml_mem.c.patch \ - file://0080-Makefile.patch \ - file://0096-vbus_vbstore.c.patch \ - file://0001-virt64_guest.dts.patch \ - file://0028-rpisense-led.c.patch \ - file://0101-roxml_buff.h.patch \ - file://0035-avzcons.h.patch \ - file://0113-roxml_nav.c.patch \ - file://0070-asf_priv.h.patch \ - file://0107-roxml_edit.c.patch \ - file://0020-vdevback.c.patch \ - file://0045-errno.h.patch \ - file://0077-core.c.patch \ - file://0109-roxml_file.h.patch \ - file://0100-roxml_buff.c.patch \ - file://0090-vbstorage.c.patch \ - file://0099-Makefile.patch \ - file://0036-capsule.h.patch \ - file://0029-rpisense-led.h.patch \ - file://0013-main.c.patch \ - file://0061-injector.h.patch \ - file://0030-vsenseled.c.patch \ - file://0097-ctype.c.patch \ - file://0006-.clang-format.patch \ - file://0089-Makefile.patch \ - file://0102-roxml_commit.c.patch \ - file://0105-roxml_core.h.patch \ - file://0114-roxml_parser.c.patch \ - file://0004-irq.c.patch \ - file://0034-asf.h.patch \ - file://0010-.gitattributes.patch \ - file://0103-roxml_content.c.patch \ - file://0106-roxml_defines.h.patch \ - file://0003-entry.S.patch \ - file://0072-Makefile.patch \ - file://0115-roxml_parser.h.patch \ - file://0039-vsensej.h.patch \ - file://0023-Makefile.patch \ - file://0062-soo.h.patch \ - file://0058-asf.h.patch \ - file://0088-sysfs.c.patch \ - file://0091-vbstore.c.patch \ - file://0005-smp.c.patch \ - file://0044-errno-base.h.patch \ - file://0063-vbstore.h.patch \ - file://0076-Makefile.patch \ - file://0031-Makefile.patch \ - file://0025-rpisense-joystick.h.patch \ - file://0043-err.h.patch \ - file://0021-Makefile.patch \ - file://0121-roxml_xpath.h.patch \ - file://0119-roxml_win32_native.h.patch \ - file://0124-Makefile.patch \ - file://0051-ring.h.patch \ - file://0118-roxml_utils.h.patch \ - file://0026-vsensej.c.patch \ - file://0057-types.h.patch \ - file://0046-evtchn.h.patch \ - file://0068-paging.c.patch \ - file://0112-roxml_mem.h.patch \ - file://0092-Makefile.patch \ - file://0040-vsenseled.h.patch \ - file://0093-vbus_backend.c.patch \ - file://0037-debug.h.patch \ - file://0073-capsule.c.patch \ - file://0108-roxml_file.c.patch \ - file://0049-hypervisor.h.patch \ - file://0065-vdevback.h.patch \ - file://0015-.mailmap.patch \ - file://0123-strtod.c.patch \ - file://0125-Makefile.patch \ - file://0126-vlogs.c.patch \ - file://0127-vlogs.h.patch \ - file://0128-Makefile.patch \ - file://0129-vfbdev.c.patch \ - file://0130-vfbdev.h.patch \ - file://0131-Makefile.patch \ - file://0132-vinput.c.patch \ - file://0133-vinput.h.patch \ +# Copyright (c) 2025-2026 EDGEMTech SA +# +# virt64 6.12 agency specifics on top of soo-generic-patches.inc: +# the guest device tree and the SOO defconfig. + +SRC_URI:append:soo = "\ + file://0001-virt64_guest.dts.patch \ + file://0002-virt64_soo_defconfig.patch \ " diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0001-virt64_guest.dts.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0001-virt64_guest.dts.patch index df8d78d..16ffc37 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0001-virt64_guest.dts.patch +++ b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0001-virt64_guest.dts.patch @@ -1,15 +1,13 @@ --- /home/rossierd/soo/git/micofe/build/tmp/work/linux-6.12-r0/linux-6.12/arch/arm64/boot/dts/arm/virt64_guest.dts 2025-08-30 15:42:55.089796760 +0200 +++ ./arch/arm64/boot/dts/arm/virt64_guest.dts 2025-08-29 08:46:39.933578397 +0200 -@@ -367,7 +367,7 @@ +@@ -351,13 +351,15 @@ compatible = "arm,cortex-a72"; device_type = "cpu"; }; -- +#if 0 - cpu@1 { - reg = <0x01>; - enable-method = "psci"; -@@ -387,7 +387,8 @@ + + cpu@3 { + reg = <0x03>; enable-method = "psci"; compatible = "arm,cortex-a72"; device_type = "cpu"; @@ -19,10 +17,11 @@ }; timer { -@@ -403,4 +404,46 @@ - compatible = "fixed-clock"; +@@ -421,5 +423,47 @@ + }; + }; }; - ++ + + agency: agency { + @@ -37,6 +36,16 @@ + compatible = "vuart,backend"; + status = "ok"; + }; ++ ++ vfbdev { ++ compatible = "vfbdev,backend"; ++ status = "ok"; ++ }; ++ ++ vinput { ++ compatible = "vinput,backend"; ++ status = "ok"; ++ }; + + vsenseled { + compatible = "vsenseled,backend"; @@ -52,17 +61,7 @@ + compatible = "vlogs,backend"; + status = "ok"; + }; -+ -+ vfbdev { -+ compatible = "vfbdev,backend"; -+ status = "ok"; -+ }; -+ -+ vinput { -+ compatible = "vinput,backend"; -+ status = "ok"; -+ }; + }; + }; -+ + }; diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0002-virt64_soo_defconfig.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0002-virt64_soo_defconfig.patch index 9b5633c..6b1f5aa 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0002-virt64_soo_defconfig.patch +++ b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0002-virt64_soo_defconfig.patch @@ -1,6 +1,6 @@ --- /home/rossierd/soo/git/micofe/build/tmp/work/linux-6.12-r0/linux-6.12/arch/arm64/configs/virt64_soo_defconfig 1970-01-01 01:00:00.000000000 +0100 +++ ./arch/arm64/configs/virt64_soo_defconfig 2025-08-29 08:46:39.970708755 +0200 -@@ -0,0 +1,8990 @@ +@@ -0,0 +1,8997 @@ +# +# Automatically generated file; DO NOT EDIT. +# Linux/arm64 6.12.0 Kernel Configuration @@ -4585,10 +4585,17 @@ +CONFIG_DUMMY_CONSOLE=y +CONFIG_DUMMY_CONSOLE_COLUMNS=80 +CONFIG_DUMMY_CONSOLE_ROWS=25 -+# CONFIG_FRAMEBUFFER_CONSOLE is not set ++CONFIG_FRAMEBUFFER_CONSOLE=y ++# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set ++CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y ++# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set ++# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set +# end of Console display driver support + -+# CONFIG_LOGO is not set ++CONFIG_LOGO=y ++# CONFIG_LOGO_LINUX_MONO is not set ++# CONFIG_LOGO_LINUX_VGA16 is not set ++CONFIG_LOGO_LINUX_CLUT224=y +# end of Graphics support + +# CONFIG_DRM_ACCEL is not set diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0131-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0131-Makefile.patch deleted file mode 100644 index 99d2ef0..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0131-Makefile.patch +++ /dev/null @@ -1,5 +0,0 @@ ---- /home/cdk/project/micofe/micofe/build/tmp/work/linux-6.12-r0/linux-6.12/soo/drivers/vinputback/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/drivers/vinputback/Makefile 2026-04-28 16:34:33.037734565 +0200 -@@ -0,0 +1,2 @@ -+obj-y := vinput.o -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0-patches.inc b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0-patches.inc index d00435d..18e6ed5 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0-patches.inc +++ b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0-patches.inc @@ -1,132 +1,6 @@ -SRC_URI:append:soo = "\ - file://0014-parser.tab.h.patch \ - file://0071-asf_test.c.patch \ - file://0048-guest_api.h.patch \ - file://0052-roxml.h.patch \ - file://0066-Kconfig.patch \ - file://0104-roxml_core.c.patch \ - file://0075-lprintk.c.patch \ - file://0002-rpi4_64_nomodules_soo_defconfig.patch \ - file://0116-roxml_tune.h.patch \ - file://0064-vbus.h.patch \ - file://0069-asf.c.patch \ - file://0060-debug.h.patch \ - file://0055-strtod.h.patch \ - file://0050-paging.h.patch \ - file://0056-sysfs.h.patch \ - file://0098-config.h.patch \ - file://0035-capsule.h.patch \ - file://1016-Makefile.patch \ - file://0079-Kconfig.patch \ - file://0086-setup.c.patch \ - file://0010-fixdep.patch \ - file://0087-soo_guest_activity.c.patch \ - file://0053-simulation.h.patch \ - file://0012-lexer.lex.c.patch \ - file://0084-hypervisor.c.patch \ - file://0067-Makefile.patch \ - file://0094-vbus.c.patch \ - file://0021-vlogs.c.patch \ - file://0117-roxml_types.h.patch \ - file://0008-Kconfig.patch \ - file://0029-vsenseled.c.patch \ - file://0015-Kconfig.patch \ - file://0081-meminfo.c.patch \ - file://0110-roxml_internal.h.patch \ - file://0059-console.h.patch \ - file://0078-debug.c.patch \ - file://0095-vbus_client.c.patch \ - file://0085-Makefile.patch \ - file://0026-Makefile.patch \ - file://0030-Makefile.patch \ - file://0041-vuart.h.patch \ - file://0074-console.c.patch \ - file://0047-gnttab.h.patch \ - file://0042-device_access.h.patch \ - file://0082-evtchn.c.patch \ - file://0122-Makefile.patch \ - file://0120-roxml_xpath.c.patch \ - file://0083-gnttab.c.patch \ - file://0054-soo.h.patch \ - file://0111-roxml_mem.c.patch \ - file://0080-Makefile.patch \ - file://0096-vbus_vbstore.c.patch \ - file://0101-roxml_buff.h.patch \ - file://0033-asf.h.patch \ - file://0113-roxml_nav.c.patch \ - file://0070-asf_priv.h.patch \ - file://0107-roxml_edit.c.patch \ - file://0025-vsensej.c.patch \ - file://0034-avzcons.h.patch \ - file://0027-rpisense-led.c.patch \ - file://0022-Makefile.patch \ - file://0045-errno.h.patch \ - file://0017-vdevback.c.patch \ - file://0011-conf.patch \ - file://0077-core.c.patch \ - file://0109-roxml_file.h.patch \ - file://0100-roxml_buff.c.patch \ - file://0019-vdummy.c.patch \ - file://0090-vbstorage.c.patch \ - file://0007-main.c.patch \ - file://0099-Makefile.patch \ - file://0036-debug.h.patch \ - file://0032-avz.h.patch \ - file://0006-tty_flip.h.patch \ - file://0061-injector.h.patch \ - file://0097-ctype.c.patch \ - file://0009-Makefile.patch \ - file://0013-parser.tab.c.patch \ - file://0089-Makefile.patch \ - file://0102-roxml_commit.c.patch \ - file://0031-vuart.c.patch \ - file://0105-roxml_core.h.patch \ - file://0037-vdummy.h.patch \ - file://0114-roxml_parser.c.patch \ - file://0004-irq.c.patch \ - file://0103-roxml_content.c.patch \ - file://0106-roxml_defines.h.patch \ - file://0003-entry.S.patch \ - file://0072-Makefile.patch \ - file://0115-roxml_parser.h.patch \ - file://0039-vsensej.h.patch \ - file://0024-rpisense-joystick.h.patch \ - file://0023-rpisense-joystick.c.patch \ - file://0062-soo.h.patch \ - file://0058-asf.h.patch \ - file://0088-sysfs.c.patch \ - file://0091-vbstore.c.patch \ - file://0005-smp.c.patch \ - file://0044-errno-base.h.patch \ - file://0063-vbstore.h.patch \ - file://0076-Makefile.patch \ - file://1001-bcm2711-rpi-4-b.dts.patch \ - file://0043-err.h.patch \ - file://0020-Makefile.patch \ - file://0121-roxml_xpath.h.patch \ - file://0119-roxml_win32_native.h.patch \ - file://0124-Makefile.patch \ - file://0051-ring.h.patch \ - file://0118-roxml_utils.h.patch \ - file://0018-Makefile.patch \ - file://0057-types.h.patch \ - file://0046-evtchn.h.patch \ - file://0068-paging.c.patch \ - file://0112-roxml_mem.h.patch \ - file://0092-Makefile.patch \ - file://0040-vsenseled.h.patch \ - file://0093-vbus_backend.c.patch \ - file://0038-vlogs.h.patch \ - file://0073-capsule.c.patch \ - file://0108-roxml_file.c.patch \ - file://0028-rpisense-led.h.patch \ - file://0049-hypervisor.h.patch \ - file://0065-vdevback.h.patch \ - file://0123-strtod.c.patch \ - file://0125-Makefile.patch \ - file://0126-vfbdev.c.patch \ - file://0127-vfbdev.h.patch \ - file://0128-Makefile.patch \ - file://0129-vinput.c.patch \ - file://0130-vinput.h.patch \ -" \ No newline at end of file +# Copyright (c) 2025-2026 EDGEMTech SA +# +# rpi4_64 6.12 agency: fully covered by soo-generic-patches.inc (the +# agency DTS and defconfig are carried by the linux recipe patch set). +# Drop a same-named patch in 0001-linux-6.12-rpi4-r0/ to shadow a +# generic one if this kernel ever needs a divergent variant. diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0003-entry.S.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0003-entry.S.patch deleted file mode 100644 index 0c76c83..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0003-entry.S.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/arch/arm64/kernel/entry.S 2026-03-23 18:27:14.611246150 +0100 -+++ ./arch/arm64/kernel/entry.S 2026-03-13 13:24:35.771787619 +0100 -@@ -28,6 +28,11 @@ - #include - #include - #include -+#ifdef CONFIG_SOO -+#include -+ -+.extern __stack_alignment_fault -+#endif - - .macro clear_gp_regs - .irp n,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29 -@@ -1102,3 +1107,15 @@ - SYM_CODE_END(__sdei_handler_abort) - NOKPROBE(__sdei_handler_abort) - #endif /* CONFIG_ARM_SDE_INTERFACE */ -+ -+#ifdef CONFIG_SOO -+ -+.align 5 -+ -+SYM_CODE_START(__avz_hypercall) -+ -+ hvc #0 -+ ret -+ -+#endif /* CONFIG_SOO */ -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0004-irq.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0004-irq.c.patch deleted file mode 100644 index c79bcf2..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0004-irq.c.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/arch/arm64/kernel/irq.c 2026-03-23 18:27:14.611246150 +0100 -+++ ./arch/arm64/kernel/irq.c 2026-03-13 13:24:35.773049136 +0100 -@@ -27,6 +27,10 @@ - #include - #include - -+#ifdef CONFIG_SOO -+#include -+#endif /* CONFIG_SOO */ -+ - /* Only access this in an NMI enter/exit */ - DEFINE_PER_CPU(struct nmi_ctx, nmi_contexts); - -@@ -122,6 +126,10 @@ - - void __init init_IRQ(void) - { -+#ifdef CONFIG_SOO -+ virq_init(); -+#endif -+ - init_irq_stacks(); - init_irq_scs(); - irqchip_init(); diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0005-smp.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0005-smp.c.patch deleted file mode 100644 index e9e75b0..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0005-smp.c.patch +++ /dev/null @@ -1,55 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/arch/arm64/kernel/smp.c 2026-03-23 18:27:14.613246203 +0100 -+++ ./arch/arm64/kernel/smp.c 2026-03-16 21:04:48.406866037 +0100 -@@ -53,6 +53,8 @@ - #include - #include - -+#include -+#include - #include - - /* -@@ -67,7 +69,7 @@ - enum ipi_msg_type { - IPI_RESCHEDULE, - IPI_CALL_FUNC, -- IPI_CPU_STOP, -+ IPI_CPU_STOP, - IPI_CPU_STOP_NMI, - IPI_TIMER, - IPI_IRQ_WORK, -@@ -99,7 +101,6 @@ - } - #endif - -- - /* - * Boot a secondary CPU, and assign it the specified idle task. - * This also gives us the initial stack to use for this CPU. -@@ -955,7 +956,7 @@ - static void do_handle_IPI(int ipinr) - { - unsigned int cpu = smp_processor_id(); -- -+ - if ((unsigned)ipinr < NR_IPI) - trace_ipi_entry(ipi_types[ipinr]); - -@@ -969,6 +970,17 @@ - break; - - case IPI_CPU_STOP: -+ -+/* Since we do not succeed in sending IPInr > NR_IPI, we are using IPI_CPU_STOP -+ * which should never be used in our context. -+ */ -+#ifdef CONFIG_SOO -+ BUG_ON(IPI_EVENT_CHECK != IPI_CPU_STOP); -+ -+ virq_handle(0); -+ break; -+#endif /* CONFIG_SOO */ -+ - case IPI_CPU_STOP_NMI: - if (IS_ENABLED(CONFIG_KEXEC_CORE) && crash_stop) { - ipi_cpu_crash_stop(cpu, get_irq_regs()); diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0006-tty_flip.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0006-tty_flip.h.patch deleted file mode 100644 index 15feec9..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0006-tty_flip.h.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/include/linux/tty_flip.h 2026-03-23 18:27:18.051337836 +0100 -+++ ./include/linux/tty_flip.h 2026-03-13 13:24:37.106929020 +0100 -@@ -5,6 +5,10 @@ - #include - #include - -+#ifdef CONFIG_SOO -+#include -+#endif /* CONFIG_SOO */ -+ - struct tty_ldisc; - - int tty_buffer_set_limit(struct tty_port *port, int limit); -@@ -67,6 +71,12 @@ - struct tty_buffer *tb = port->buf.tail; - int change; - -+#ifdef CONFIG_SOO -+ /* Only chars issued from the main console are considered */ -+ if (port->console && avz_switch_console(ch)) -+ return 1; -+#endif -+ - change = !tb->flags && (flag != TTY_NORMAL); - if (!change && tb->used < tb->size) { - if (tb->flags) diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0007-main.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0007-main.c.patch deleted file mode 100644 index b29f282..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0007-main.c.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/init/main.c 2026-03-23 18:27:18.137885491 +0100 -+++ ./init/main.c 2026-03-13 13:24:37.036201866 +0100 -@@ -109,6 +109,10 @@ - #include - #include - -+#ifdef CONFIG_SOO -+#include -+#endif /* CONFIG_SOO */ -+ - #define CREATE_TRACE_POINTS - #include - -@@ -994,6 +998,13 @@ - */ - workqueue_init_early(); - -+#ifdef CONFIG_SOO -+ -+ /* Get the reference to the AVZ shared data */ -+ avz_get_shared(); -+ -+#endif /* CONFIG_SOO */ -+ - rcu_init(); - - /* Trace events are available after this */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0008-Kconfig.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0008-Kconfig.patch deleted file mode 100644 index 0846697..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0008-Kconfig.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/Kconfig 2026-03-23 18:27:14.360239460 +0100 -+++ ./Kconfig 2026-03-23 18:28:30.829938837 +0100 -@@ -30,3 +30,6 @@ - source "lib/Kconfig.debug" - - source "Documentation/Kconfig" -+ -+# SOO subsystems and drivers -+source "soo/Kconfig" diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0009-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0009-Makefile.patch deleted file mode 100644 index d6f28bf..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0009-Makefile.patch +++ /dev/null @@ -1,24 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/Makefile 2026-03-23 18:27:32.466964354 +0100 -+++ ./Makefile 2026-03-23 18:28:40.268531413 +0100 -@@ -744,6 +744,10 @@ - # Defaults to vmlinux, but the arch makefile usually adds further targets - all: vmlinux - -+ifdef CONFIG_SOO -+LINUXINCLUDE += -Isoo/include -+endif -+ - CFLAGS_GCOV := -fprofile-arcs -ftest-coverage - ifdef CONFIG_CC_IS_GCC - CFLAGS_GCOV += -fno-tree-loop-im -@@ -1117,6 +1121,10 @@ - export MODORDER := $(extmod_prefix)modules.order - export MODULES_NSDEPS := $(extmod_prefix)modules.nsdeps - -+ifdef CONFIG_SOO -+ core-y += soo/ -+endif -+ - ifeq ($(KBUILD_EXTMOD),) - - build-dir := . diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0010-fixdep.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0010-fixdep.patch deleted file mode 100644 index 8a876a4..0000000 Binary files a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0010-fixdep.patch and /dev/null differ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0011-conf.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0011-conf.patch deleted file mode 100644 index 829f469..0000000 Binary files a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0011-conf.patch and /dev/null differ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0012-lexer.lex.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0012-lexer.lex.c.patch deleted file mode 100644 index 3e40e04..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0012-lexer.lex.c.patch +++ /dev/null @@ -1,4043 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/scripts/kconfig/lexer.lex.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./scripts/kconfig/lexer.lex.c 2026-03-23 18:27:35.901813722 +0100 -@@ -0,0 +1,4040 @@ -+ -+#define YY_INT_ALIGNED short int -+ -+/* A lexical scanner generated by flex */ -+ -+#define FLEX_SCANNER -+#define YY_FLEX_MAJOR_VERSION 2 -+#define YY_FLEX_MINOR_VERSION 6 -+#define YY_FLEX_SUBMINOR_VERSION 4 -+#if YY_FLEX_SUBMINOR_VERSION > 0 -+#define FLEX_BETA -+#endif -+ -+/* First, we deal with platform-specific or compiler-specific issues. */ -+ -+/* begin standard C headers. */ -+#include -+#include -+#include -+#include -+ -+/* end standard C headers. */ -+ -+/* flex integer type definitions */ -+ -+#ifndef FLEXINT_H -+#define FLEXINT_H -+ -+/* C99 systems have . Non-C99 systems may or may not. */ -+ -+#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L -+ -+/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, -+ * if you want the limit (max/min) macros for int types. -+ */ -+#ifndef __STDC_LIMIT_MACROS -+#define __STDC_LIMIT_MACROS 1 -+#endif -+ -+#include -+typedef int8_t flex_int8_t; -+typedef uint8_t flex_uint8_t; -+typedef int16_t flex_int16_t; -+typedef uint16_t flex_uint16_t; -+typedef int32_t flex_int32_t; -+typedef uint32_t flex_uint32_t; -+#else -+typedef signed char flex_int8_t; -+typedef short int flex_int16_t; -+typedef int flex_int32_t; -+typedef unsigned char flex_uint8_t; -+typedef unsigned short int flex_uint16_t; -+typedef unsigned int flex_uint32_t; -+ -+/* Limits of integral types. */ -+#ifndef INT8_MIN -+#define INT8_MIN (-128) -+#endif -+#ifndef INT16_MIN -+#define INT16_MIN (-32767-1) -+#endif -+#ifndef INT32_MIN -+#define INT32_MIN (-2147483647-1) -+#endif -+#ifndef INT8_MAX -+#define INT8_MAX (127) -+#endif -+#ifndef INT16_MAX -+#define INT16_MAX (32767) -+#endif -+#ifndef INT32_MAX -+#define INT32_MAX (2147483647) -+#endif -+#ifndef UINT8_MAX -+#define UINT8_MAX (255U) -+#endif -+#ifndef UINT16_MAX -+#define UINT16_MAX (65535U) -+#endif -+#ifndef UINT32_MAX -+#define UINT32_MAX (4294967295U) -+#endif -+ -+#ifndef SIZE_MAX -+#define SIZE_MAX (~(size_t)0) -+#endif -+ -+#endif /* ! C99 */ -+ -+#endif /* ! FLEXINT_H */ -+ -+/* begin standard C++ headers. */ -+ -+/* TODO: this is always defined, so inline it */ -+#define yyconst const -+ -+#if defined(__GNUC__) && __GNUC__ >= 3 -+#define yynoreturn __attribute__((__noreturn__)) -+#else -+#define yynoreturn -+#endif -+ -+/* Returned upon end-of-file. */ -+#define YY_NULL 0 -+ -+/* Promotes a possibly negative, possibly signed char to an -+ * integer in range [0..255] for use as an array index. -+ */ -+#define YY_SC_TO_UI(c) ((YY_CHAR) (c)) -+ -+/* Enter a start condition. This macro really ought to take a parameter, -+ * but we do it the disgusting crufty way forced on us by the ()-less -+ * definition of BEGIN. -+ */ -+#define BEGIN (yy_start) = 1 + 2 * -+/* Translate the current start state into a value that can be later handed -+ * to BEGIN to return to the state. The YYSTATE alias is for lex -+ * compatibility. -+ */ -+#define YY_START (((yy_start) - 1) / 2) -+#define YYSTATE YY_START -+/* Action number for EOF rule of a given start state. */ -+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) -+/* Special action meaning "start processing a new file". */ -+#define YY_NEW_FILE yyrestart( yyin ) -+#define YY_END_OF_BUFFER_CHAR 0 -+ -+/* Size of default input buffer. */ -+#ifndef YY_BUF_SIZE -+#ifdef __ia64__ -+/* On IA-64, the buffer size is 16k, not 8k. -+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. -+ * Ditto for the __ia64__ case accordingly. -+ */ -+#define YY_BUF_SIZE 32768 -+#else -+#define YY_BUF_SIZE 16384 -+#endif /* __ia64__ */ -+#endif -+ -+/* The state buf must be large enough to hold one state per character in the main buffer. -+ */ -+#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) -+ -+#ifndef YY_TYPEDEF_YY_BUFFER_STATE -+#define YY_TYPEDEF_YY_BUFFER_STATE -+typedef struct yy_buffer_state *YY_BUFFER_STATE; -+#endif -+ -+#ifndef YY_TYPEDEF_YY_SIZE_T -+#define YY_TYPEDEF_YY_SIZE_T -+typedef size_t yy_size_t; -+#endif -+ -+extern int yyleng; -+ -+extern FILE *yyin, *yyout; -+ -+#define EOB_ACT_CONTINUE_SCAN 0 -+#define EOB_ACT_END_OF_FILE 1 -+#define EOB_ACT_LAST_MATCH 2 -+ -+ /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires -+ * access to the local variable yy_act. Since yyless() is a macro, it would break -+ * existing scanners that call yyless() from OUTSIDE yylex. -+ * One obvious solution it to make yy_act a global. I tried that, and saw -+ * a 5% performance hit in a non-yylineno scanner, because yy_act is -+ * normally declared as a register variable-- so it is not worth it. -+ */ -+ #define YY_LESS_LINENO(n) \ -+ do { \ -+ int yyl;\ -+ for ( yyl = n; yyl < yyleng; ++yyl )\ -+ if ( yytext[yyl] == '\n' )\ -+ --yylineno;\ -+ }while(0) -+ #define YY_LINENO_REWIND_TO(dst) \ -+ do {\ -+ const char *p;\ -+ for ( p = yy_cp-1; p >= (dst); --p)\ -+ if ( *p == '\n' )\ -+ --yylineno;\ -+ }while(0) -+ -+/* Return all but the first "n" matched characters back to the input stream. */ -+#define yyless(n) \ -+ do \ -+ { \ -+ /* Undo effects of setting up yytext. */ \ -+ int yyless_macro_arg = (n); \ -+ YY_LESS_LINENO(yyless_macro_arg);\ -+ *yy_cp = (yy_hold_char); \ -+ YY_RESTORE_YY_MORE_OFFSET \ -+ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ -+ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ -+ } \ -+ while ( 0 ) -+#define unput(c) yyunput( c, (yytext_ptr) ) -+ -+#ifndef YY_STRUCT_YY_BUFFER_STATE -+#define YY_STRUCT_YY_BUFFER_STATE -+struct yy_buffer_state -+ { -+ FILE *yy_input_file; -+ -+ char *yy_ch_buf; /* input buffer */ -+ char *yy_buf_pos; /* current position in input buffer */ -+ -+ /* Size of input buffer in bytes, not including room for EOB -+ * characters. -+ */ -+ int yy_buf_size; -+ -+ /* Number of characters read into yy_ch_buf, not including EOB -+ * characters. -+ */ -+ int yy_n_chars; -+ -+ /* Whether we "own" the buffer - i.e., we know we created it, -+ * and can realloc() it to grow it, and should free() it to -+ * delete it. -+ */ -+ int yy_is_our_buffer; -+ -+ /* Whether this is an "interactive" input source; if so, and -+ * if we're using stdio for input, then we want to use getc() -+ * instead of fread(), to make sure we stop fetching input after -+ * each newline. -+ */ -+ int yy_is_interactive; -+ -+ /* Whether we're considered to be at the beginning of a line. -+ * If so, '^' rules will be active on the next match, otherwise -+ * not. -+ */ -+ int yy_at_bol; -+ -+ int yy_bs_lineno; /**< The line count. */ -+ int yy_bs_column; /**< The column count. */ -+ -+ /* Whether to try to fill the input buffer when we reach the -+ * end of it. -+ */ -+ int yy_fill_buffer; -+ -+ int yy_buffer_status; -+ -+#define YY_BUFFER_NEW 0 -+#define YY_BUFFER_NORMAL 1 -+ /* When an EOF's been seen but there's still some text to process -+ * then we mark the buffer as YY_EOF_PENDING, to indicate that we -+ * shouldn't try reading from the input source any more. We might -+ * still have a bunch of tokens to match, though, because of -+ * possible backing-up. -+ * -+ * When we actually see the EOF, we change the status to "new" -+ * (via yyrestart()), so that the user can continue scanning by -+ * just pointing yyin at a new input file. -+ */ -+#define YY_BUFFER_EOF_PENDING 2 -+ -+ }; -+#endif /* !YY_STRUCT_YY_BUFFER_STATE */ -+ -+/* Stack of input buffers. */ -+static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ -+static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -+static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ -+ -+/* We provide macros for accessing buffer states in case in the -+ * future we want to put the buffer states in a more general -+ * "scanner state". -+ * -+ * Returns the top of the stack, or NULL. -+ */ -+#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ -+ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ -+ : NULL) -+/* Same as previous macro, but useful when we know that the buffer stack is not -+ * NULL or when we need an lvalue. For internal use only. -+ */ -+#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] -+ -+/* yy_hold_char holds the character lost when yytext is formed. */ -+static char yy_hold_char; -+static int yy_n_chars; /* number of characters read into yy_ch_buf */ -+int yyleng; -+ -+/* Points to current character in buffer. */ -+static char *yy_c_buf_p = NULL; -+static int yy_init = 0; /* whether we need to initialize */ -+static int yy_start = 0; /* start state number */ -+ -+/* Flag which is used to allow yywrap()'s to do buffer switches -+ * instead of setting up a fresh yyin. A bit of a hack ... -+ */ -+static int yy_did_buffer_switch_on_eof; -+ -+void yyrestart ( FILE *input_file ); -+void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer ); -+YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size ); -+void yy_delete_buffer ( YY_BUFFER_STATE b ); -+void yy_flush_buffer ( YY_BUFFER_STATE b ); -+void yypush_buffer_state ( YY_BUFFER_STATE new_buffer ); -+void yypop_buffer_state ( void ); -+ -+static void yyensure_buffer_stack ( void ); -+static void yy_load_buffer_state ( void ); -+static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file ); -+#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) -+ -+YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size ); -+YY_BUFFER_STATE yy_scan_string ( const char *yy_str ); -+YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len ); -+ -+void *yyalloc ( yy_size_t ); -+void *yyrealloc ( void *, yy_size_t ); -+void yyfree ( void * ); -+ -+#define yy_new_buffer yy_create_buffer -+#define yy_set_interactive(is_interactive) \ -+ { \ -+ if ( ! YY_CURRENT_BUFFER ){ \ -+ yyensure_buffer_stack (); \ -+ YY_CURRENT_BUFFER_LVALUE = \ -+ yy_create_buffer( yyin, YY_BUF_SIZE ); \ -+ } \ -+ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ -+ } -+#define yy_set_bol(at_bol) \ -+ { \ -+ if ( ! YY_CURRENT_BUFFER ){\ -+ yyensure_buffer_stack (); \ -+ YY_CURRENT_BUFFER_LVALUE = \ -+ yy_create_buffer( yyin, YY_BUF_SIZE ); \ -+ } \ -+ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ -+ } -+#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) -+ -+/* Begin user sect3 */ -+ -+#define yywrap() (/*CONSTCOND*/1) -+#define YY_SKIP_YYWRAP -+typedef flex_uint8_t YY_CHAR; -+ -+FILE *yyin = NULL, *yyout = NULL; -+ -+typedef int yy_state_type; -+ -+extern int yylineno; -+int yylineno = 1; -+ -+extern char *yytext; -+#ifdef yytext_ptr -+#undef yytext_ptr -+#endif -+#define yytext_ptr yytext -+ -+static const flex_int16_t yy_nxt[][42] = -+ { -+ { -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 0 -+ }, -+ -+ { -+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 14, -+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 21, -+ 21, 27, 28, 29, 30, 21, 21, 31, 32, 21, -+ 33, 21, 34, 35, 36, 37, 38, 21, 39, 21, -+ 21, 40 -+ -+ }, -+ -+ { -+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 14, -+ 18, 19, 20, 21, 22, 23, 24, 25, 26, 21, -+ 21, 27, 28, 29, 30, 21, 21, 31, 32, 21, -+ 33, 21, 34, 35, 36, 37, 38, 21, 39, 21, -+ 21, 40 -+ }, -+ -+ { -+ 9, 41, 42, 43, 41, 41, 41, 41, 41, 41, -+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, -+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, -+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, -+ 41, 41 -+ -+ }, -+ -+ { -+ 9, 41, 42, 43, 41, 41, 41, 41, 41, 41, -+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, -+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, -+ 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, -+ 41, 41 -+ }, -+ -+ { -+ 9, 44, 45, 46, 44, 44, 44, 44, 44, 44, -+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, -+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, -+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, -+ 44, 44 -+ -+ }, -+ -+ { -+ 9, 44, 45, 46, 44, 44, 44, 44, 44, 44, -+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, -+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, -+ 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, -+ 44, 44 -+ }, -+ -+ { -+ 9, 47, 47, 48, 47, 49, 47, 50, 47, 49, -+ 47, 47, 47, 47, 47, 47, 47, 47, 51, 47, -+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, -+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, -+ 47, 47 -+ -+ }, -+ -+ { -+ 9, 47, 47, 48, 47, 49, 47, 50, 47, 49, -+ 47, 47, 47, 47, 47, 47, 47, 47, 51, 47, -+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, -+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, -+ 47, 47 -+ }, -+ -+ { -+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -+ -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -+ -9, -9 -+ -+ }, -+ -+ { -+ 9, -10, -10, -10, -10, -10, -10, -10, -10, -10, -+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -+ -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -+ -10, -10 -+ }, -+ -+ { -+ 9, -11, 52, -11, -11, -11, -11, -11, -11, -11, -+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -+ -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, -+ -11, -11 -+ -+ }, -+ -+ { -+ 9, -12, -12, -12, -12, -12, -12, -12, -12, -12, -+ -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -+ -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -+ -12, -12, -12, -12, -12, -12, -12, -12, -12, -12, -+ -12, -12 -+ }, -+ -+ { -+ 9, -13, -13, -13, -13, -13, -13, -13, -13, -13, -+ -13, -13, -13, -13, -13, -13, 53, -13, -13, -13, -+ -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -+ -13, -13, -13, -13, -13, -13, -13, -13, -13, -13, -+ -13, -13 -+ -+ }, -+ -+ { -+ 9, -14, -14, -14, -14, -14, -14, -14, -14, -14, -+ -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -+ -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -+ -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -+ -14, -14 -+ }, -+ -+ { -+ 9, 54, 54, -15, 54, 54, 54, 54, 54, 54, -+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, -+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, -+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, -+ 54, 54 -+ -+ }, -+ -+ { -+ 9, -16, -16, -16, -16, -16, -16, 55, -16, -16, -+ -16, -16, -16, 55, -16, -16, -16, -16, -16, 55, -+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, -+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, -+ 55, -16 -+ }, -+ -+ { -+ 9, -17, -17, -17, -17, -17, -17, -17, 56, -17, -+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -+ -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, -+ -17, -17 -+ -+ }, -+ -+ { -+ 9, -18, -18, -18, -18, -18, -18, -18, -18, -18, -+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -+ -18, -18, -18, -18, -18, -18, -18, -18, -18, -18, -+ -18, -18 -+ }, -+ -+ { -+ 9, -19, -19, -19, -19, -19, -19, -19, -19, -19, -+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -+ -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -+ -19, -19 -+ -+ }, -+ -+ { -+ 9, -20, -20, -20, -20, -20, -20, -20, -20, -20, -+ -20, -20, -20, -20, -20, -20, 57, -20, -20, -20, -+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -+ -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -+ -20, -20 -+ }, -+ -+ { -+ 9, -21, -21, -21, -21, -21, -21, 55, -21, -21, -+ -21, -21, -21, 58, -21, -21, -21, -21, -21, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -21 -+ -+ }, -+ -+ { -+ 9, -22, -22, -22, -22, -22, -22, -22, -22, -22, -+ -22, -22, -22, -22, -22, -22, 59, -22, -22, -22, -+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -+ -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -+ -22, -22 -+ }, -+ -+ { -+ 9, -23, -23, -23, -23, -23, -23, -23, -23, -23, -+ -23, -23, -23, -23, -23, -23, 60, -23, -23, -23, -+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -+ -23, -23, -23, -23, -23, -23, -23, -23, -23, -23, -+ -23, -23 -+ -+ }, -+ -+ { -+ 9, -24, -24, -24, -24, -24, -24, -24, -24, -24, -+ -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -+ -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -+ -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -+ -24, -24 -+ }, -+ -+ { -+ 9, -25, -25, -25, -25, -25, -25, -25, -25, -25, -+ -25, -25, -25, -25, -25, -25, 61, -25, -25, -25, -+ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -+ -25, -25, -25, -25, -25, -25, -25, -25, -25, -25, -+ -25, -25 -+ -+ }, -+ -+ { -+ 9, -26, -26, 62, -26, -26, -26, -26, -26, -26, -+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -+ -26, -26, -26, -26, -26, -26, -26, -26, -26, -26, -+ -26, -26 -+ }, -+ -+ { -+ 9, -27, -27, -27, -27, -27, -27, 55, -27, -27, -+ -27, -27, -27, 58, -27, -27, -27, -27, -27, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 63, 58, 58, 58, 58, 58, 58, 58, -+ 58, -27 -+ -+ }, -+ -+ { -+ 9, -28, -28, -28, -28, -28, -28, 55, -28, -28, -+ -28, -28, -28, 58, -28, -28, -28, -28, -28, 58, -+ 58, 58, 58, 58, 58, 58, 58, 64, 58, 58, -+ 58, 58, 65, 58, 58, 58, 58, 58, 58, 58, -+ 58, -28 -+ }, -+ -+ { -+ 9, -29, -29, -29, -29, -29, -29, 55, -29, -29, -+ -29, -29, -29, 58, -29, -29, -29, -29, -29, 58, -+ 58, 58, 58, 58, 66, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -29 -+ -+ }, -+ -+ { -+ 9, -30, -30, -30, -30, -30, -30, 55, -30, -30, -+ -30, -30, -30, 58, -30, -30, -30, -30, -30, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 67, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -30 -+ }, -+ -+ { -+ 9, -31, -31, -31, -31, -31, -31, 55, -31, -31, -+ -31, -31, -31, 58, -31, -31, -31, -31, -31, 58, -+ 58, 58, 58, 58, 68, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -31 -+ -+ }, -+ -+ { -+ 9, -32, -32, -32, -32, -32, -32, 55, -32, -32, -+ -32, -32, -32, 58, -32, -32, -32, -32, -32, 58, -+ 58, 58, 58, 58, 58, 69, 58, 58, 58, 58, -+ 70, 71, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -32 -+ }, -+ -+ { -+ 9, -33, -33, -33, -33, -33, -33, 55, -33, -33, -+ -33, -33, -33, 58, -33, -33, -33, -33, -33, 58, -+ 72, 58, 58, 58, 73, 58, 58, 58, 58, 58, -+ 58, 58, 74, 58, 58, 58, 58, 58, 58, 58, -+ 58, -33 -+ -+ }, -+ -+ { -+ 9, -34, -34, -34, -34, -34, -34, 55, -34, -34, -+ -34, -34, -34, 58, -34, -34, -34, -34, -34, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 75, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -34 -+ }, -+ -+ { -+ 9, -35, -35, -35, -35, -35, -35, 55, -35, -35, -+ -35, -35, -35, 58, -35, -35, -35, -35, -35, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 76, 58, 58, 58, 58, 58, -+ 58, -35 -+ -+ }, -+ -+ { -+ 9, -36, -36, -36, -36, -36, -36, 55, -36, -36, -+ -36, -36, -36, 58, -36, -36, -36, -36, -36, 58, -+ 77, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -36 -+ }, -+ -+ { -+ 9, -37, -37, -37, -37, -37, -37, 55, -37, -37, -+ -37, -37, -37, 58, -37, -37, -37, -37, -37, 58, -+ 58, 58, 58, 58, 78, 58, 58, 58, 58, 58, -+ 58, 58, 79, 58, 58, 58, 80, 58, 58, 58, -+ 58, -37 -+ -+ }, -+ -+ { -+ 9, -38, -38, -38, -38, -38, -38, 55, -38, -38, -+ -38, -38, -38, 58, -38, -38, -38, -38, -38, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 81, 58, 58, 58, 58, 58, -+ 58, -38 -+ }, -+ -+ { -+ 9, -39, -39, -39, -39, -39, -39, 55, -39, -39, -+ -39, -39, -39, 58, -39, -39, -39, -39, -39, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 82, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -39 -+ -+ }, -+ -+ { -+ 9, -40, -40, -40, -40, -40, -40, -40, -40, -40, -+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -+ -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -+ -40, 83 -+ }, -+ -+ { -+ 9, 84, 85, -41, 84, 84, 84, 84, 84, 84, -+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, -+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, -+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, -+ 84, 84 -+ -+ }, -+ -+ { -+ 9, -42, -42, -42, -42, -42, -42, -42, -42, -42, -+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -+ -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -+ -42, -42 -+ }, -+ -+ { -+ 9, -43, -43, -43, -43, -43, -43, -43, -43, -43, -+ -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -+ -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -+ -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -+ -43, -43 -+ -+ }, -+ -+ { -+ 9, 86, 86, -44, 86, 86, 86, 86, 86, 86, -+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, -+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, -+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, -+ 86, 86 -+ }, -+ -+ { -+ 9, -45, 87, 88, -45, -45, -45, -45, -45, -45, -+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -+ -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -+ -45, -45 -+ -+ }, -+ -+ { -+ 9, 89, -46, -46, 89, 89, 89, 89, 89, 89, -+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, -+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, -+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, -+ 89, 89 -+ }, -+ -+ { -+ 9, 90, 90, -47, 90, -47, 90, -47, 90, -47, -+ 90, 90, 90, 90, 90, 90, 90, 90, -47, 90, -+ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, -+ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, -+ 90, 90 -+ -+ }, -+ -+ { -+ 9, -48, -48, -48, -48, -48, -48, -48, -48, -48, -+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -+ -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -+ -48, -48 -+ }, -+ -+ { -+ 9, -49, -49, -49, -49, -49, -49, -49, -49, -49, -+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -+ -49, -49, -49, -49, -49, -49, -49, -49, -49, -49, -+ -49, -49 -+ -+ }, -+ -+ { -+ 9, 91, 91, -50, 91, 91, 91, 91, 91, 91, -+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, -+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, -+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, -+ 91, 91 -+ }, -+ -+ { -+ 9, 92, 92, -51, 92, 92, 92, 92, 92, 92, -+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, -+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, -+ 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, -+ 92, 92 -+ -+ }, -+ -+ { -+ 9, -52, 52, -52, -52, -52, -52, -52, -52, -52, -+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -+ -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -+ -52, -52 -+ }, -+ -+ { -+ 9, -53, -53, -53, -53, -53, -53, -53, -53, -53, -+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -+ -53, -53, -53, -53, -53, -53, -53, -53, -53, -53, -+ -53, -53 -+ -+ }, -+ -+ { -+ 9, 54, 54, -54, 54, 54, 54, 54, 54, 54, -+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, -+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, -+ 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, -+ 54, 54 -+ }, -+ -+ { -+ 9, -55, -55, -55, -55, -55, -55, 55, -55, -55, -+ -55, -55, -55, 55, -55, -55, -55, -55, -55, 55, -+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, -+ 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, -+ 55, -55 -+ -+ }, -+ -+ { -+ 9, -56, -56, -56, -56, -56, -56, -56, -56, -56, -+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -+ -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -+ -56, -56 -+ }, -+ -+ { -+ 9, -57, -57, -57, -57, -57, -57, -57, -57, -57, -+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -+ -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -+ -57, -57 -+ -+ }, -+ -+ { -+ 9, -58, -58, -58, -58, -58, -58, 55, -58, -58, -+ -58, -58, -58, 58, -58, -58, -58, -58, -58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -58 -+ }, -+ -+ { -+ 9, -59, -59, -59, -59, -59, -59, -59, -59, -59, -+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -+ -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -+ -59, -59 -+ -+ }, -+ -+ { -+ 9, -60, -60, -60, -60, -60, -60, -60, -60, -60, -+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -+ -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -+ -60, -60 -+ }, -+ -+ { -+ 9, -61, -61, -61, -61, -61, -61, -61, -61, -61, -+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -+ -61, -61, -61, -61, -61, -61, -61, -61, -61, -61, -+ -61, -61 -+ -+ }, -+ -+ { -+ 9, -62, -62, -62, -62, -62, -62, -62, -62, -62, -+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -+ -62, -62, -62, -62, -62, -62, -62, -62, -62, -62, -+ -62, -62 -+ }, -+ -+ { -+ 9, -63, -63, -63, -63, -63, -63, 55, -63, -63, -+ -63, -63, -63, 58, -63, -63, -63, -63, -63, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 93, 58, 58, 58, 58, 58, 58, 58, -+ 58, -63 -+ -+ }, -+ -+ { -+ 9, -64, -64, -64, -64, -64, -64, 55, -64, -64, -+ -64, -64, -64, 58, -64, -64, -64, -64, -64, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 94, 58, 58, 58, 58, 58, 58, 58, -+ 58, -64 -+ }, -+ -+ { -+ 9, -65, -65, -65, -65, -65, -65, 55, -65, -65, -+ -65, -65, -65, 58, -65, -65, -65, -65, -65, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 95, 96, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -65 -+ -+ }, -+ -+ { -+ 9, -66, -66, -66, -66, -66, -66, 55, -66, -66, -+ -66, -66, -66, 58, -66, -66, -66, -66, -66, 58, -+ 58, 58, 58, 58, 58, 97, 58, 58, 58, 58, -+ 58, 58, 58, 98, 58, 58, 58, 58, 58, 58, -+ 58, -66 -+ }, -+ -+ { -+ 9, -67, -67, -67, -67, -67, -67, 55, -67, -67, -+ -67, -67, -67, 58, -67, -67, -67, -67, -67, 58, -+ 58, 58, 58, 99, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -67 -+ -+ }, -+ -+ { -+ 9, -68, -68, -68, -68, -68, -68, 55, -68, -68, -+ -68, -68, -68, 58, -68, -68, -68, -68, -68, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 100, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 101, -+ 58, -68 -+ }, -+ -+ { -+ 9, -69, -69, -69, -69, -69, -69, 55, -69, -69, -+ -69, -69, -69, 58, -69, -69, -69, -69, -69, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -69 -+ -+ }, -+ -+ { -+ 9, -70, -70, -70, -70, -70, -70, 55, -70, -70, -+ -70, -70, -70, 58, -70, -70, -70, -70, -70, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 102, 58, 58, 58, 58, 58, 58, -+ 58, -70 -+ }, -+ -+ { -+ 9, -71, -71, -71, -71, -71, -71, 55, -71, -71, -+ -71, -71, -71, 58, -71, -71, -71, -71, -71, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 103, 58, 58, 58, -+ 58, -71 -+ -+ }, -+ -+ { -+ 9, -72, -72, -72, -72, -72, -72, 55, -72, -72, -+ -72, -72, -72, 58, -72, -72, -72, -72, -72, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 104, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -72 -+ }, -+ -+ { -+ 9, -73, -73, -73, -73, -73, -73, 55, -73, -73, -+ -73, -73, -73, 58, -73, -73, -73, -73, -73, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 105, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -73 -+ -+ }, -+ -+ { -+ 9, -74, -74, -74, -74, -74, -74, 55, -74, -74, -+ -74, -74, -74, 58, -74, -74, -74, -74, -74, 58, -+ 58, 58, 58, 106, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -74 -+ }, -+ -+ { -+ 9, -75, -75, -75, -75, -75, -75, 55, -75, -75, -+ -75, -75, -75, 58, -75, -75, -75, -75, -75, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -75 -+ -+ }, -+ -+ { -+ 9, -76, -76, -76, -76, -76, -76, 55, -76, -76, -+ -76, -76, -76, 58, -76, -76, -76, -76, -76, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 107, 58, 58, 58, 58, 58, 58, 58, -+ 58, -76 -+ }, -+ -+ { -+ 9, -77, -77, -77, -77, -77, -77, 55, -77, -77, -+ -77, -77, -77, 58, -77, -77, -77, -77, -77, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 108, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -77 -+ -+ }, -+ -+ { -+ 9, -78, -78, -78, -78, -78, -78, 55, -78, -78, -+ -78, -78, -78, 58, -78, -78, -78, -78, -78, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 109, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -78 -+ }, -+ -+ { -+ 9, -79, -79, -79, -79, -79, -79, 55, -79, -79, -+ -79, -79, -79, 58, -79, -79, -79, -79, -79, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 110, 58, 58, -+ 58, -79 -+ -+ }, -+ -+ { -+ 9, -80, -80, -80, -80, -80, -80, 55, -80, -80, -+ -80, -80, -80, 58, -80, -80, -80, -80, -80, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 111, 58, 58, 58, 58, 58, -+ 58, -80 -+ }, -+ -+ { -+ 9, -81, -81, -81, -81, -81, -81, 55, -81, -81, -+ -81, -81, -81, 58, -81, -81, -81, -81, -81, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 112, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -81 -+ -+ }, -+ -+ { -+ 9, -82, -82, -82, -82, -82, -82, 55, -82, -82, -+ -82, -82, -82, 58, -82, -82, -82, -82, -82, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 113, 58, 58, 58, 58, -+ 58, -82 -+ }, -+ -+ { -+ 9, -83, -83, -83, -83, -83, -83, -83, -83, -83, -+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -+ -83, -83, -83, -83, -83, -83, -83, -83, -83, -83, -+ -83, -83 -+ -+ }, -+ -+ { -+ 9, 84, 85, -84, 84, 84, 84, 84, 84, 84, -+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, -+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, -+ 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, -+ 84, 84 -+ }, -+ -+ { -+ 9, 85, 85, -85, 85, 85, 85, 85, 85, 85, -+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, -+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, -+ 85, 85, 85, 85, 85, 85, 85, 85, 85, 85, -+ 85, 85 -+ -+ }, -+ -+ { -+ 9, 86, 86, -86, 86, 86, 86, 86, 86, 86, -+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, -+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, -+ 86, 86, 86, 86, 86, 86, 86, 86, 86, 86, -+ 86, 86 -+ }, -+ -+ { -+ 9, -87, 87, 88, -87, -87, -87, -87, -87, -87, -+ -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -+ -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -+ -87, -87, -87, -87, -87, -87, -87, -87, -87, -87, -+ -87, -87 -+ -+ }, -+ -+ { -+ 9, 89, -88, -88, 89, 89, 89, 89, 89, 89, -+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, -+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, -+ 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, -+ 89, 89 -+ }, -+ -+ { -+ 9, -89, -89, -89, -89, -89, -89, -89, -89, -89, -+ -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -+ -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -+ -89, -89, -89, -89, -89, -89, -89, -89, -89, -89, -+ -89, -89 -+ -+ }, -+ -+ { -+ 9, 90, 90, -90, 90, -90, 90, -90, 90, -90, -+ 90, 90, 90, 90, 90, 90, 90, 90, -90, 90, -+ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, -+ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, -+ 90, 90 -+ }, -+ -+ { -+ 9, 91, 91, -91, 91, 91, 91, 91, 91, 91, -+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, -+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, -+ 91, 91, 91, 91, 91, 91, 91, 91, 91, 91, -+ 91, 91 -+ -+ }, -+ -+ { -+ 9, -92, -92, -92, -92, -92, -92, -92, -92, -92, -+ -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -+ -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -+ -92, -92, -92, -92, -92, -92, -92, -92, -92, -92, -+ -92, -92 -+ }, -+ -+ { -+ 9, -93, -93, -93, -93, -93, -93, 55, -93, -93, -+ -93, -93, -93, 58, -93, -93, -93, -93, -93, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 114, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -93 -+ -+ }, -+ -+ { -+ 9, -94, -94, -94, -94, -94, -94, 55, -94, -94, -+ -94, -94, -94, 58, -94, -94, -94, -94, -94, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 115, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -94 -+ }, -+ -+ { -+ 9, -95, -95, -95, -95, -95, -95, 55, -95, -95, -+ -95, -95, -95, 58, -95, -95, -95, -95, -95, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 116, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -95 -+ -+ }, -+ -+ { -+ 9, -96, -96, -96, -96, -96, -96, 55, -96, -96, -+ -96, -96, -96, 58, -96, -96, -96, -96, -96, 58, -+ 58, 58, 58, 58, 58, 117, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -96 -+ }, -+ -+ { -+ 9, -97, -97, -97, -97, -97, -97, 55, -97, -97, -+ -97, -97, -97, 58, -97, -97, -97, -97, -97, 118, -+ 119, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -97 -+ -+ }, -+ -+ { -+ 9, -98, -98, -98, -98, -98, -98, 55, -98, -98, -+ -98, -98, -98, 58, -98, -98, -98, -98, -98, 58, -+ 58, 58, 58, 58, 120, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -98 -+ }, -+ -+ { -+ 9, -99, -99, -99, -99, -99, -99, 55, -99, -99, -+ -99, -99, -99, 58, -99, -99, -99, -99, -99, 58, -+ 58, 58, 121, 58, 58, 58, 58, 58, 122, 58, -+ 123, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -99 -+ -+ }, -+ -+ { -+ 9, -100, -100, -100, -100, -100, -100, 55, -100, -100, -+ -100, -100, -100, 58, -100, -100, -100, -100, -100, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 124, 58, 58, 58, 58, 58, 58, -+ 58, -100 -+ }, -+ -+ { -+ 9, -101, -101, -101, -101, -101, -101, 55, -101, -101, -+ -101, -101, -101, 58, -101, -101, -101, -101, -101, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -101 -+ -+ }, -+ -+ { -+ 9, -102, -102, -102, -102, -102, -102, 55, -102, -102, -+ -102, -102, -102, 58, -102, -102, -102, -102, -102, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 125, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -102 -+ }, -+ -+ { -+ 9, -103, -103, -103, -103, -103, -103, 55, -103, -103, -+ -103, -103, -103, 58, -103, -103, -103, -103, -103, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -103 -+ -+ }, -+ -+ { -+ 9, -104, -104, -104, -104, -104, -104, 55, -104, -104, -+ -104, -104, -104, 58, -104, -104, -104, -104, -104, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 126, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -104 -+ }, -+ -+ { -+ 9, -105, -105, -105, -105, -105, -105, 55, -105, -105, -+ -105, -105, -105, 58, -105, -105, -105, -105, -105, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 127, 58, 58, -+ 58, -105 -+ -+ }, -+ -+ { -+ 9, -106, -106, -106, -106, -106, -106, 55, -106, -106, -+ -106, -106, -106, 58, -106, -106, -106, -106, -106, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 128, 58, 58, -+ 58, -106 -+ }, -+ -+ { -+ 9, -107, -107, -107, -107, -107, -107, 55, -107, -107, -+ -107, -107, -107, 58, -107, -107, -107, -107, -107, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 129, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -107 -+ -+ }, -+ -+ { -+ 9, -108, -108, -108, -108, -108, -108, 55, -108, -108, -+ -108, -108, -108, 58, -108, -108, -108, -108, -108, 58, -+ 58, 58, 58, 58, 58, 58, 130, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -108 -+ }, -+ -+ { -+ 9, -109, -109, -109, -109, -109, -109, 55, -109, -109, -+ -109, -109, -109, 58, -109, -109, -109, -109, -109, 58, -+ 58, 58, 58, 58, 131, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -109 -+ -+ }, -+ -+ { -+ 9, -110, -110, -110, -110, -110, -110, 55, -110, -110, -+ -110, -110, -110, 58, -110, -110, -110, -110, -110, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 132, 58, 58, 58, 58, 58, -+ 58, -110 -+ }, -+ -+ { -+ 9, -111, -111, -111, -111, -111, -111, 55, -111, -111, -+ -111, -111, -111, 58, -111, -111, -111, -111, -111, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 133, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -111 -+ -+ }, -+ -+ { -+ 9, -112, -112, -112, -112, -112, -112, 55, -112, -112, -+ -112, -112, -112, 58, -112, -112, -112, -112, -112, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 134, 58, 58, 58, 58, -+ 58, -112 -+ }, -+ -+ { -+ 9, -113, -113, -113, -113, -113, -113, 55, -113, -113, -+ -113, -113, -113, 58, -113, -113, -113, -113, -113, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 135, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -113 -+ -+ }, -+ -+ { -+ 9, -114, -114, -114, -114, -114, -114, 55, -114, -114, -+ -114, -114, -114, 58, -114, -114, -114, -114, -114, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -114 -+ }, -+ -+ { -+ 9, -115, -115, -115, -115, -115, -115, 55, -115, -115, -+ -115, -115, -115, 58, -115, -115, -115, -115, -115, 58, -+ 58, 58, 136, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -115 -+ -+ }, -+ -+ { -+ 9, -116, -116, -116, -116, -116, -116, 55, -116, -116, -+ -116, -116, -116, 58, -116, -116, -116, -116, -116, 58, -+ 58, 58, 58, 58, 137, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -116 -+ }, -+ -+ { -+ 9, -117, -117, -117, -117, -117, -117, 55, -117, -117, -+ -117, -117, -117, 58, -117, -117, -117, -117, -117, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 138, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -117 -+ -+ }, -+ -+ { -+ 9, -118, -118, -118, -118, -118, -118, 55, -118, -118, -+ -118, -118, -118, 58, -118, -118, -118, -118, -118, 58, -+ 58, 139, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 140, 58, 58, 58, -+ 58, -118 -+ }, -+ -+ { -+ 9, -119, -119, -119, -119, -119, -119, 55, -119, -119, -+ -119, -119, -119, 58, -119, -119, -119, -119, -119, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 141, 58, 58, -+ 58, -119 -+ -+ }, -+ -+ { -+ 9, -120, -120, -120, -120, -120, -120, 55, -120, -120, -+ -120, -120, -120, 58, -120, -120, -120, -120, -120, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 142, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -120 -+ }, -+ -+ { -+ 9, -121, -121, -121, -121, -121, -121, 55, -121, -121, -+ -121, -121, -121, 58, -121, -121, -121, -121, -121, 58, -+ 58, 58, 58, 58, 58, 58, 58, 143, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -121 -+ -+ }, -+ -+ { -+ 9, -122, -122, -122, -122, -122, -122, 55, -122, -122, -+ -122, -122, -122, 58, -122, -122, -122, -122, -122, 58, -+ 58, 58, 58, 58, 58, 144, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -122 -+ }, -+ -+ { -+ 9, -123, -123, -123, -123, -123, -123, 55, -123, -123, -+ -123, -123, -123, 58, -123, -123, -123, -123, -123, 58, -+ 58, 58, 58, 58, 145, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -123 -+ -+ }, -+ -+ { -+ 9, -124, -124, -124, -124, -124, -124, 55, -124, -124, -+ -124, -124, -124, 58, -124, -124, -124, -124, -124, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -124 -+ }, -+ -+ { -+ 9, -125, -125, -125, -125, -125, -125, 55, -125, -125, -+ -125, -125, -125, 58, -125, -125, -125, -125, -125, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 146, -125 -+ -+ }, -+ -+ { -+ 9, -126, -126, -126, -126, -126, -126, 55, -126, -126, -+ -126, -126, -126, 58, -126, -126, -126, -126, -126, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 147, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -126 -+ }, -+ -+ { -+ 9, -127, -127, -127, -127, -127, -127, 55, -127, -127, -+ -127, -127, -127, 58, -127, -127, -127, -127, -127, 58, -+ 58, 58, 148, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -127 -+ -+ }, -+ -+ { -+ 9, -128, -128, -128, -128, -128, -128, 55, -128, -128, -+ -128, -128, -128, 58, -128, -128, -128, -128, -128, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 149, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -128 -+ }, -+ -+ { -+ 9, -129, -129, -129, -129, -129, -129, 55, -129, -129, -+ -129, -129, -129, 58, -129, -129, -129, -129, -129, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 150, 58, 58, 58, 58, 58, 58, -+ 58, -129 -+ -+ }, -+ -+ { -+ 9, -130, -130, -130, -130, -130, -130, 55, -130, -130, -+ -130, -130, -130, 58, -130, -130, -130, -130, -130, 58, -+ 58, 58, 58, 58, 151, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -130 -+ }, -+ -+ { -+ 9, -131, -131, -131, -131, -131, -131, 55, -131, -131, -+ -131, -131, -131, 58, -131, -131, -131, -131, -131, 58, -+ 58, 58, 152, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -131 -+ -+ }, -+ -+ { -+ 9, -132, -132, -132, -132, -132, -132, 55, -132, -132, -+ -132, -132, -132, 58, -132, -132, -132, -132, -132, 58, -+ 58, 58, 153, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -132 -+ }, -+ -+ { -+ 9, -133, -133, -133, -133, -133, -133, 55, -133, -133, -+ -133, -133, -133, 58, -133, -133, -133, -133, -133, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 154, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -133 -+ -+ }, -+ -+ { -+ 9, -134, -134, -134, -134, -134, -134, 55, -134, -134, -+ -134, -134, -134, 58, -134, -134, -134, -134, -134, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 155, 58, 58, 58, -+ 58, -134 -+ }, -+ -+ { -+ 9, -135, -135, -135, -135, -135, -135, 55, -135, -135, -+ -135, -135, -135, 58, -135, -135, -135, -135, -135, 58, -+ 58, 156, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -135 -+ -+ }, -+ -+ { -+ 9, -136, -136, -136, -136, -136, -136, 55, -136, -136, -+ -136, -136, -136, 58, -136, -136, -136, -136, -136, 58, -+ 58, 58, 58, 58, 157, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -136 -+ }, -+ -+ { -+ 9, -137, -137, -137, -137, -137, -137, 55, -137, -137, -+ -137, -137, -137, 58, -137, -137, -137, -137, -137, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 158, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -137 -+ -+ }, -+ -+ { -+ 9, -138, -138, -138, -138, -138, -138, 55, -138, -138, -+ -138, -138, -138, 58, -138, -138, -138, -138, -138, 58, -+ 58, 58, 58, 58, 58, 58, 159, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -138 -+ }, -+ -+ { -+ 9, -139, -139, -139, -139, -139, -139, 55, -139, -139, -+ -139, -139, -139, 58, -139, -139, -139, -139, -139, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 160, 58, 58, 58, 58, 58, 58, 58, -+ 58, -139 -+ -+ }, -+ -+ { -+ 9, -140, -140, -140, -140, -140, -140, 55, -140, -140, -+ -140, -140, -140, 58, -140, -140, -140, -140, -140, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 161, 58, 58, 58, 58, 58, -+ 58, -140 -+ }, -+ -+ { -+ 9, -141, -141, -141, -141, -141, -141, 55, -141, -141, -+ -141, -141, -141, 58, -141, -141, -141, -141, -141, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 162, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -141 -+ -+ }, -+ -+ { -+ 9, -142, -142, -142, -142, -142, -142, 55, -142, -142, -+ -142, -142, -142, 58, -142, -142, -142, -142, -142, 58, -+ 58, 58, 58, 163, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -142 -+ }, -+ -+ { -+ 9, -143, -143, -143, -143, -143, -143, 55, -143, -143, -+ -143, -143, -143, 58, -143, -143, -143, -143, -143, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 164, 58, 58, 58, 58, 58, 58, 58, -+ 58, -143 -+ -+ }, -+ -+ { -+ 9, -144, -144, -144, -144, -144, -144, 55, -144, -144, -+ -144, -144, -144, 58, -144, -144, -144, -144, -144, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -144 -+ }, -+ -+ { -+ 9, -145, -145, -145, -145, -145, -145, 55, -145, -145, -+ -145, -145, -145, 58, -145, -145, -145, -145, -145, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 165, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -145 -+ -+ }, -+ -+ { -+ 9, -146, -146, -146, -146, -146, -146, 55, -146, -146, -+ -146, -146, -146, 58, -146, -146, -146, -146, -146, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -146 -+ }, -+ -+ { -+ 9, -147, -147, -147, -147, -147, -147, 55, -147, -147, -+ -147, -147, -147, 58, -147, -147, -147, -147, -147, 58, -+ 58, 58, 58, 58, 166, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -147 -+ -+ }, -+ -+ { -+ 9, -148, -148, -148, -148, -148, -148, 55, -148, -148, -+ -148, -148, -148, 58, -148, -148, -148, -148, -148, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 167, 58, 58, 58, 58, 58, 58, 58, -+ 58, -148 -+ }, -+ -+ { -+ 9, -149, -149, -149, -149, -149, -149, 55, -149, -149, -+ -149, -149, -149, 58, -149, -149, -149, -149, -149, 58, -+ 58, 58, 58, 58, 168, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -149 -+ -+ }, -+ -+ { -+ 9, -150, -150, -150, -150, -150, -150, 55, -150, -150, -+ -150, -150, -150, 58, -150, -150, -150, -150, -150, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 169, 58, 58, 58, -+ 58, -150 -+ }, -+ -+ { -+ 9, -151, -151, -151, -151, -151, -151, 55, -151, -151, -+ -151, -151, -151, 58, -151, -151, -151, -151, -151, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -151 -+ -+ }, -+ -+ { -+ 9, -152, -152, -152, -152, -152, -152, 55, -152, -152, -+ -152, -152, -152, 58, -152, -152, -152, -152, -152, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 170, 58, 58, 58, -+ 58, -152 -+ }, -+ -+ { -+ 9, -153, -153, -153, -153, -153, -153, 55, -153, -153, -+ -153, -153, -153, 58, -153, -153, -153, -153, -153, 58, -+ 58, 58, 58, 58, 171, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -153 -+ -+ }, -+ -+ { -+ 9, -154, -154, -154, -154, -154, -154, 55, -154, -154, -+ -154, -154, -154, 58, -154, -154, -154, -154, -154, 58, -+ 58, 58, 58, 58, 58, 58, 172, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -154 -+ }, -+ -+ { -+ 9, -155, -155, -155, -155, -155, -155, 55, -155, -155, -+ -155, -155, -155, 58, -155, -155, -155, -155, -155, 58, -+ 173, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -155 -+ -+ }, -+ -+ { -+ 9, -156, -156, -156, -156, -156, -156, 55, -156, -156, -+ -156, -156, -156, 58, -156, -156, -156, -156, -156, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 174, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -156 -+ }, -+ -+ { -+ 9, -157, -157, -157, -157, -157, -157, 55, -157, -157, -+ -157, -157, -157, 58, -157, -157, -157, -157, -157, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -157 -+ -+ }, -+ -+ { -+ 9, -158, -158, -158, -158, -158, -158, 55, -158, -158, -+ -158, -158, -158, 58, -158, -158, -158, -158, -158, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 175, 58, 58, 58, -+ 58, -158 -+ }, -+ -+ { -+ 9, -159, -159, -159, -159, -159, -159, 55, -159, -159, -+ -159, -159, -159, 58, -159, -159, -159, -159, -159, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -159 -+ -+ }, -+ -+ { -+ 9, -160, -160, -160, -160, -160, -160, 55, -160, -160, -+ -160, -160, -160, 58, -160, -160, -160, -160, -160, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 176, 58, 58, 58, 58, 58, 58, 58, -+ 58, -160 -+ }, -+ -+ { -+ 9, -161, -161, -161, -161, -161, -161, 55, -161, -161, -+ -161, -161, -161, 58, -161, -161, -161, -161, -161, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 177, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -161 -+ -+ }, -+ -+ { -+ 9, -162, -162, -162, -162, -162, -162, 55, -162, -162, -+ -162, -162, -162, 58, -162, -162, -162, -162, -162, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 178, 58, 58, 58, -+ 58, -162 -+ }, -+ -+ { -+ 9, -163, -163, -163, -163, -163, -163, 55, -163, -163, -+ -163, -163, -163, 58, -163, -163, -163, -163, -163, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 179, 58, 58, 58, 58, -+ 58, -163 -+ -+ }, -+ -+ { -+ 9, -164, -164, -164, -164, -164, -164, 55, -164, -164, -+ -164, -164, -164, 58, -164, -164, -164, -164, -164, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 180, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -164 -+ }, -+ -+ { -+ 9, -165, -165, -165, -165, -165, -165, 55, -165, -165, -+ -165, -165, -165, 58, -165, -165, -165, -165, -165, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 181, 58, 58, -+ 58, -165 -+ -+ }, -+ -+ { -+ 9, -166, -166, -166, -166, -166, -166, 55, -166, -166, -+ -166, -166, -166, 58, -166, -166, -166, -166, -166, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 182, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -166 -+ }, -+ -+ { -+ 9, -167, -167, -167, -167, -167, -167, 55, -167, -167, -+ -167, -167, -167, 58, -167, -167, -167, -167, -167, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 183, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -167 -+ -+ }, -+ -+ { -+ 9, -168, -168, -168, -168, -168, -168, 55, -168, -168, -+ -168, -168, -168, 58, -168, -168, -168, -168, -168, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 184, 58, 58, 58, 58, -+ 58, -168 -+ }, -+ -+ { -+ 9, -169, -169, -169, -169, -169, -169, 55, -169, -169, -+ -169, -169, -169, 58, -169, -169, -169, -169, -169, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -169 -+ -+ }, -+ -+ { -+ 9, -170, -170, -170, -170, -170, -170, 55, -170, -170, -+ -170, -170, -170, 58, -170, -170, -170, -170, -170, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -170 -+ }, -+ -+ { -+ 9, -171, -171, -171, -171, -171, -171, 55, -171, -171, -+ -171, -171, -171, 58, -171, -171, -171, -171, -171, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -171 -+ -+ }, -+ -+ { -+ 9, -172, -172, -172, -172, -172, -172, 55, -172, -172, -+ -172, -172, -172, 58, -172, -172, -172, -172, -172, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -172 -+ }, -+ -+ { -+ 9, -173, -173, -173, -173, -173, -173, 55, -173, -173, -+ -173, -173, -173, 58, -173, -173, -173, -173, -173, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 185, 58, 58, 58, -+ 58, -173 -+ -+ }, -+ -+ { -+ 9, -174, -174, -174, -174, -174, -174, 55, -174, -174, -+ -174, -174, -174, 58, -174, -174, -174, -174, -174, 58, -+ 58, 58, 58, 58, 186, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -174 -+ }, -+ -+ { -+ 9, -175, -175, -175, -175, -175, -175, 55, -175, -175, -+ -175, -175, -175, 58, -175, -175, -175, -175, -175, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -175 -+ -+ }, -+ -+ { -+ 9, -176, -176, -176, -176, -176, -176, 55, -176, -176, -+ -176, -176, -176, 58, -176, -176, -176, -176, -176, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 187, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -176 -+ }, -+ -+ { -+ 9, -177, -177, -177, -177, -177, -177, 55, -177, -177, -+ -177, -177, -177, 58, -177, -177, -177, -177, -177, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 188, 58, 58, 58, 58, -+ 58, -177 -+ -+ }, -+ -+ { -+ 9, -178, -178, -178, -178, -178, -178, 55, -178, -178, -+ -178, -178, -178, 58, -178, -178, -178, -178, -178, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -178 -+ }, -+ -+ { -+ 9, -179, -179, -179, -179, -179, -179, 55, -179, -179, -+ -179, -179, -179, 58, -179, -179, -179, -179, -179, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -179 -+ -+ }, -+ -+ { -+ 9, -180, -180, -180, -180, -180, -180, 55, -180, -180, -+ -180, -180, -180, 58, -180, -180, -180, -180, -180, 58, -+ 58, 58, 189, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -180 -+ }, -+ -+ { -+ 9, -181, -181, -181, -181, -181, -181, 55, -181, -181, -+ -181, -181, -181, 58, -181, -181, -181, -181, -181, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -181 -+ -+ }, -+ -+ { -+ 9, -182, -182, -182, -182, -182, -182, 55, -182, -182, -+ -182, -182, -182, 58, -182, -182, -182, -182, -182, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 190, 58, 58, -+ 58, -182 -+ }, -+ -+ { -+ 9, -183, -183, -183, -183, -183, -183, 55, -183, -183, -+ -183, -183, -183, 58, -183, -183, -183, -183, -183, 58, -+ 58, 58, 58, 58, 58, 191, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -183 -+ -+ }, -+ -+ { -+ 9, -184, -184, -184, -184, -184, -184, 55, -184, -184, -+ -184, -184, -184, 58, -184, -184, -184, -184, -184, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -184 -+ }, -+ -+ { -+ 9, -185, -185, -185, -185, -185, -185, 55, -185, -185, -+ -185, -185, -185, 58, -185, -185, -185, -185, -185, 58, -+ 58, 58, 58, 58, 192, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -185 -+ -+ }, -+ -+ { -+ 9, -186, -186, -186, -186, -186, -186, 55, -186, -186, -+ -186, -186, -186, 58, -186, -186, -186, -186, -186, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -186 -+ }, -+ -+ { -+ 9, -187, -187, -187, -187, -187, -187, 55, -187, -187, -+ -187, -187, -187, 58, -187, -187, -187, -187, -187, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -187 -+ -+ }, -+ -+ { -+ 9, -188, -188, -188, -188, -188, -188, 55, -188, -188, -+ -188, -188, -188, 58, -188, -188, -188, -188, -188, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 193, 58, 58, 58, -+ 58, -188 -+ }, -+ -+ { -+ 9, -189, -189, -189, -189, -189, -189, 55, -189, -189, -+ -189, -189, -189, 58, -189, -189, -189, -189, -189, 58, -+ 58, 58, 58, 58, 194, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -189 -+ -+ }, -+ -+ { -+ 9, -190, -190, -190, -190, -190, -190, 55, -190, -190, -+ -190, -190, -190, 58, -190, -190, -190, -190, -190, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -190 -+ }, -+ -+ { -+ 9, -191, -191, -191, -191, -191, -191, 55, -191, -191, -+ -191, -191, -191, 58, -191, -191, -191, -191, -191, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 195, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -191 -+ -+ }, -+ -+ { -+ 9, -192, -192, -192, -192, -192, -192, 55, -192, -192, -+ -192, -192, -192, 58, -192, -192, -192, -192, -192, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -192 -+ }, -+ -+ { -+ 9, -193, -193, -193, -193, -193, -193, 55, -193, -193, -+ -193, -193, -193, 58, -193, -193, -193, -193, -193, 58, -+ 196, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -193 -+ -+ }, -+ -+ { -+ 9, -194, -194, -194, -194, -194, -194, 55, -194, -194, -+ -194, -194, -194, 58, -194, -194, -194, -194, -194, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -194 -+ }, -+ -+ { -+ 9, -195, -195, -195, -195, -195, -195, 55, -195, -195, -+ -195, -195, -195, 58, -195, -195, -195, -195, -195, 58, -+ 58, 58, 58, 58, 58, 58, 197, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -195 -+ -+ }, -+ -+ { -+ 9, -196, -196, -196, -196, -196, -196, 55, -196, -196, -+ -196, -196, -196, 58, -196, -196, -196, -196, -196, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 198, 58, 58, 58, -+ 58, -196 -+ }, -+ -+ { -+ 9, -197, -197, -197, -197, -197, -197, 55, -197, -197, -+ -197, -197, -197, 58, -197, -197, -197, -197, -197, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -197 -+ -+ }, -+ -+ { -+ 9, -198, -198, -198, -198, -198, -198, 55, -198, -198, -+ -198, -198, -198, 58, -198, -198, -198, -198, -198, 58, -+ 58, 58, 58, 58, 199, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -198 -+ }, -+ -+ { -+ 9, -199, -199, -199, -199, -199, -199, 55, -199, -199, -+ -199, -199, -199, 58, -199, -199, -199, -199, -199, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, -+ 58, -199 -+ -+ }, -+ -+ } ; -+ -+static yy_state_type yy_get_previous_state ( void ); -+static yy_state_type yy_try_NUL_trans ( yy_state_type current_state ); -+static int yy_get_next_buffer ( void ); -+static void yynoreturn yy_fatal_error ( const char* msg ); -+ -+/* Done after the current pattern has been matched and before the -+ * corresponding action - sets up yytext. -+ */ -+#define YY_DO_BEFORE_ACTION \ -+ (yytext_ptr) = yy_bp; \ -+ yyleng = (int) (yy_cp - yy_bp); \ -+ (yy_hold_char) = *yy_cp; \ -+ *yy_cp = '\0'; \ -+ (yy_c_buf_p) = yy_cp; -+#define YY_NUM_RULES 62 -+#define YY_END_OF_BUFFER 63 -+/* This struct is not used in this scanner, -+ but its presence is necessary. */ -+struct yy_trans_info -+ { -+ flex_int32_t yy_verify; -+ flex_int32_t yy_nxt; -+ }; -+static const flex_int16_t yy_accept[200] = -+ { 0, -+ 2, 2, 0, 0, 0, 0, 0, 0, 63, 49, -+ 2, 4, 41, 46, 1, 48, 49, 42, 43, 49, -+ 47, 49, 37, 35, 39, 49, 47, 47, 47, 47, -+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 49, -+ 50, 52, 51, 61, 58, 60, 54, 57, 56, 53, -+ 55, 2, 36, 1, 48, 34, 45, 47, 44, 38, -+ 40, 3, 47, 47, 47, 47, 47, 47, 18, 47, -+ 47, 47, 47, 47, 25, 47, 47, 47, 47, 47, -+ 47, 47, 33, 50, 50, 61, 58, 60, 59, 54, -+ 53, 55, 47, 47, 47, 47, 47, 47, 47, 47, -+ -+ 17, 47, 20, 47, 47, 47, 47, 47, 47, 47, -+ 47, 47, 47, 5, 47, 47, 47, 47, 47, 47, -+ 47, 47, 47, 16, 47, 47, 22, 47, 47, 47, -+ 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, -+ 47, 47, 47, 14, 47, 19, 47, 47, 47, 47, -+ 27, 47, 47, 47, 47, 47, 6, 47, 8, 47, -+ 47, 47, 47, 47, 47, 47, 47, 47, 26, 28, -+ 29, 30, 47, 47, 7, 47, 47, 11, 12, 47, -+ 15, 47, 47, 24, 47, 32, 9, 47, 47, 21, -+ 47, 31, 47, 13, 47, 47, 23, 47, 10 -+ -+ } ; -+ -+static const YY_CHAR yy_ec[256] = -+ { 0, -+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, -+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -+ 1, 2, 4, 5, 6, 7, 1, 8, 9, 10, -+ 11, 1, 12, 1, 13, 1, 1, 13, 13, 13, -+ 13, 13, 13, 13, 13, 13, 13, 14, 1, 15, -+ 16, 17, 1, 1, 13, 13, 13, 13, 13, 13, -+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, -+ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, -+ 1, 18, 1, 1, 19, 1, 20, 21, 22, 23, -+ -+ 24, 25, 26, 27, 28, 13, 13, 29, 30, 31, -+ 32, 33, 13, 34, 35, 36, 37, 38, 13, 39, -+ 40, 13, 1, 41, 1, 1, 1, 1, 1, 1, -+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -+ -+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -+ 1, 1, 1, 1, 1 -+ } ; -+ -+/* Table of booleans, true if rule could match eol. */ -+static const flex_int32_t yy_rule_can_match_eol[63] = -+ { 0, -+0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, -+ 1, 0, 0, }; -+ -+extern int yy_flex_debug; -+int yy_flex_debug = 0; -+ -+/* The intent behind this definition is that it'll catch -+ * any uses of REJECT which flex missed. -+ */ -+#define REJECT reject_used_but_not_detected -+#define yymore() yymore_used_but_not_detected -+#define YY_MORE_ADJ 0 -+#define YY_RESTORE_YY_MORE_OFFSET -+char *yytext; -+/* SPDX-License-Identifier: GPL-2.0 */ -+/* -+ * Copyright (C) 2002 Roman Zippel -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include "lkc.h" -+#include "preprocess.h" -+ -+#include "parser.tab.h" -+ -+#define YY_DECL static int yylex1(void) -+ -+#define START_STRSIZE 16 -+ -+/* The Kconfig file currently being parsed. */ -+const char *cur_filename; -+ -+/* -+ * The line number of the current statement. This does not match yylineno. -+ * yylineno is used by the lexer, while cur_lineno is used by the parser. -+ */ -+int cur_lineno; -+ -+static int prev_prev_token = T_EOL; -+static int prev_token = T_EOL; -+static char *text; -+static int text_size, text_asize; -+ -+struct buffer { -+ struct buffer *parent; -+ YY_BUFFER_STATE state; -+ int yylineno; -+ const char *filename; -+ int source_lineno; -+}; -+ -+static struct buffer *current_buf; -+ -+static int last_ts, first_ts; -+ -+static char *expand_token(const char *in, size_t n); -+static void append_expanded_string(const char *in); -+static void zconf_endhelp(void); -+static void zconf_endfile(void); -+ -+static void new_string(void) -+{ -+ text = xmalloc(START_STRSIZE); -+ text_asize = START_STRSIZE; -+ text_size = 0; -+ *text = 0; -+} -+ -+static void append_string(const char *str, int size) -+{ -+ int new_size = text_size + size + 1; -+ if (new_size > text_asize) { -+ new_size += START_STRSIZE - 1; -+ new_size &= -START_STRSIZE; -+ text = xrealloc(text, new_size); -+ text_asize = new_size; -+ } -+ memcpy(text + text_size, str, size); -+ text_size += size; -+ text[text_size] = 0; -+} -+ -+static void alloc_string(const char *str, int size) -+{ -+ text = xmalloc(size + 1); -+ memcpy(text, str, size); -+ text[size] = 0; -+} -+ -+static void warn_ignored_character(char chr) -+{ -+ fprintf(stderr, -+ "%s:%d:warning: ignoring unsupported character '%c'\n", -+ cur_filename, yylineno, chr); -+} -+ -+#define INITIAL 0 -+#define ASSIGN_VAL 1 -+#define HELP 2 -+#define STRING 3 -+ -+#ifndef YY_NO_UNISTD_H -+/* Special case for "unistd.h", since it is non-ANSI. We include it way -+ * down here because we want the user's section 1 to have been scanned first. -+ * The user has a chance to override it with an option. -+ */ -+#include -+#endif -+ -+#ifndef YY_EXTRA_TYPE -+#define YY_EXTRA_TYPE void * -+#endif -+ -+static int yy_init_globals ( void ); -+ -+/* Accessor methods to globals. -+ These are made visible to non-reentrant scanners for convenience. */ -+ -+int yylex_destroy ( void ); -+ -+int yyget_debug ( void ); -+ -+void yyset_debug ( int debug_flag ); -+ -+YY_EXTRA_TYPE yyget_extra ( void ); -+ -+void yyset_extra ( YY_EXTRA_TYPE user_defined ); -+ -+FILE *yyget_in ( void ); -+ -+void yyset_in ( FILE * _in_str ); -+ -+FILE *yyget_out ( void ); -+ -+void yyset_out ( FILE * _out_str ); -+ -+ int yyget_leng ( void ); -+ -+char *yyget_text ( void ); -+ -+int yyget_lineno ( void ); -+ -+void yyset_lineno ( int _line_number ); -+ -+/* Macros after this point can all be overridden by user definitions in -+ * section 1. -+ */ -+ -+#ifndef YY_SKIP_YYWRAP -+#ifdef __cplusplus -+extern "C" int yywrap ( void ); -+#else -+extern int yywrap ( void ); -+#endif -+#endif -+ -+#ifndef YY_NO_UNPUT -+ -+ static void yyunput ( int c, char *buf_ptr ); -+ -+#endif -+ -+#ifndef yytext_ptr -+static void yy_flex_strncpy ( char *, const char *, int ); -+#endif -+ -+#ifdef YY_NEED_STRLEN -+static int yy_flex_strlen ( const char * ); -+#endif -+ -+#ifndef YY_NO_INPUT -+#ifdef __cplusplus -+static int yyinput ( void ); -+#else -+static int input ( void ); -+#endif -+ -+#endif -+ -+/* Amount of stuff to slurp up with each read. */ -+#ifndef YY_READ_BUF_SIZE -+#ifdef __ia64__ -+/* On IA-64, the buffer size is 16k, not 8k */ -+#define YY_READ_BUF_SIZE 16384 -+#else -+#define YY_READ_BUF_SIZE 8192 -+#endif /* __ia64__ */ -+#endif -+ -+/* Copy whatever the last rule matched to the standard output. */ -+#ifndef ECHO -+/* This used to be an fputs(), but since the string might contain NUL's, -+ * we now use fwrite(). -+ */ -+#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) -+#endif -+ -+/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, -+ * is returned in "result". -+ */ -+#ifndef YY_INPUT -+#define YY_INPUT(buf,result,max_size) \ -+ errno=0; \ -+ while ( (result = (int) read( fileno(yyin), buf, (yy_size_t) max_size )) < 0 ) \ -+ { \ -+ if( errno != EINTR) \ -+ { \ -+ YY_FATAL_ERROR( "input in flex scanner failed" ); \ -+ break; \ -+ } \ -+ errno=0; \ -+ clearerr(yyin); \ -+ }\ -+\ -+ -+#endif -+ -+/* No semi-colon after return; correct usage is to write "yyterminate();" - -+ * we don't want an extra ';' after the "return" because that will cause -+ * some compilers to complain about unreachable statements. -+ */ -+#ifndef yyterminate -+#define yyterminate() return YY_NULL -+#endif -+ -+/* Number of entries by which start-condition stack grows. */ -+#ifndef YY_START_STACK_INCR -+#define YY_START_STACK_INCR 25 -+#endif -+ -+/* Report a fatal error. */ -+#ifndef YY_FATAL_ERROR -+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) -+#endif -+ -+/* end tables serialization structures and prototypes */ -+ -+/* Default declaration of generated scanner - a define so the user can -+ * easily add parameters. -+ */ -+#ifndef YY_DECL -+#define YY_DECL_IS_OURS 1 -+ -+extern int yylex (void); -+ -+#define YY_DECL int yylex (void) -+#endif /* !YY_DECL */ -+ -+/* Code executed at the beginning of each rule, after yytext and yyleng -+ * have been set up. -+ */ -+#ifndef YY_USER_ACTION -+#define YY_USER_ACTION -+#endif -+ -+/* Code executed at the end of each rule. */ -+#ifndef YY_BREAK -+#define YY_BREAK /*LINTED*/break; -+#endif -+ -+#define YY_RULE_SETUP \ -+ YY_USER_ACTION -+ -+/** The main scanner function which does all the work. -+ */ -+YY_DECL -+{ -+ yy_state_type yy_current_state; -+ char *yy_cp, *yy_bp; -+ int yy_act; -+ -+ if ( !(yy_init) ) -+ { -+ (yy_init) = 1; -+ -+#ifdef YY_USER_INIT -+ YY_USER_INIT; -+#endif -+ -+ if ( ! (yy_start) ) -+ (yy_start) = 1; /* first start state */ -+ -+ if ( ! yyin ) -+ yyin = stdin; -+ -+ if ( ! yyout ) -+ yyout = stdout; -+ -+ if ( ! YY_CURRENT_BUFFER ) { -+ yyensure_buffer_stack (); -+ YY_CURRENT_BUFFER_LVALUE = -+ yy_create_buffer( yyin, YY_BUF_SIZE ); -+ } -+ -+ yy_load_buffer_state( ); -+ } -+ -+ { -+ -+ char open_quote = 0; -+ -+ while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ -+ { -+ yy_cp = (yy_c_buf_p); -+ -+ /* Support of yytext. */ -+ *yy_cp = (yy_hold_char); -+ -+ /* yy_bp points to the position in yy_ch_buf of the start of -+ * the current run. -+ */ -+ yy_bp = yy_cp; -+ -+ yy_current_state = (yy_start); -+yy_match: -+ while ( (yy_current_state = yy_nxt[yy_current_state][ yy_ec[YY_SC_TO_UI(*yy_cp)] ]) > 0 ) -+ ++yy_cp; -+ -+ yy_current_state = -yy_current_state; -+ -+yy_find_action: -+ yy_act = yy_accept[yy_current_state]; -+ -+ YY_DO_BEFORE_ACTION; -+ -+ if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) -+ { -+ int yyl; -+ for ( yyl = 0; yyl < yyleng; ++yyl ) -+ if ( yytext[yyl] == '\n' ) -+ -+ yylineno++; -+; -+ } -+ -+do_action: /* This label is used only to access EOF actions. */ -+ -+ switch ( yy_act ) -+ { /* beginning of action switch */ -+case 1: -+YY_RULE_SETUP -+/* ignore comment */ -+ YY_BREAK -+case 2: -+YY_RULE_SETUP -+/* whitespaces */ -+ YY_BREAK -+case 3: -+/* rule 3 can match eol */ -+YY_RULE_SETUP -+/* escaped new line */ -+ YY_BREAK -+case 4: -+/* rule 4 can match eol */ -+YY_RULE_SETUP -+return T_EOL; -+ YY_BREAK -+case 5: -+YY_RULE_SETUP -+return T_BOOL; -+ YY_BREAK -+case 6: -+YY_RULE_SETUP -+return T_CHOICE; -+ YY_BREAK -+case 7: -+YY_RULE_SETUP -+return T_COMMENT; -+ YY_BREAK -+case 8: -+YY_RULE_SETUP -+return T_CONFIG; -+ YY_BREAK -+case 9: -+YY_RULE_SETUP -+return T_DEF_BOOL; -+ YY_BREAK -+case 10: -+YY_RULE_SETUP -+return T_DEF_TRISTATE; -+ YY_BREAK -+case 11: -+YY_RULE_SETUP -+return T_DEFAULT; -+ YY_BREAK -+case 12: -+YY_RULE_SETUP -+return T_DEPENDS; -+ YY_BREAK -+case 13: -+YY_RULE_SETUP -+return T_ENDCHOICE; -+ YY_BREAK -+case 14: -+YY_RULE_SETUP -+return T_ENDIF; -+ YY_BREAK -+case 15: -+YY_RULE_SETUP -+return T_ENDMENU; -+ YY_BREAK -+case 16: -+YY_RULE_SETUP -+return T_HELP; -+ YY_BREAK -+case 17: -+YY_RULE_SETUP -+return T_HEX; -+ YY_BREAK -+case 18: -+YY_RULE_SETUP -+return T_IF; -+ YY_BREAK -+case 19: -+YY_RULE_SETUP -+return T_IMPLY; -+ YY_BREAK -+case 20: -+YY_RULE_SETUP -+return T_INT; -+ YY_BREAK -+case 21: -+YY_RULE_SETUP -+return T_MAINMENU; -+ YY_BREAK -+case 22: -+YY_RULE_SETUP -+return T_MENU; -+ YY_BREAK -+case 23: -+YY_RULE_SETUP -+return T_MENUCONFIG; -+ YY_BREAK -+case 24: -+YY_RULE_SETUP -+return T_MODULES; -+ YY_BREAK -+case 25: -+YY_RULE_SETUP -+return T_ON; -+ YY_BREAK -+case 26: -+YY_RULE_SETUP -+return T_PROMPT; -+ YY_BREAK -+case 27: -+YY_RULE_SETUP -+return T_RANGE; -+ YY_BREAK -+case 28: -+YY_RULE_SETUP -+return T_SELECT; -+ YY_BREAK -+case 29: -+YY_RULE_SETUP -+return T_SOURCE; -+ YY_BREAK -+case 30: -+YY_RULE_SETUP -+return T_STRING; -+ YY_BREAK -+case 31: -+YY_RULE_SETUP -+return T_TRISTATE; -+ YY_BREAK -+case 32: -+YY_RULE_SETUP -+return T_VISIBLE; -+ YY_BREAK -+case 33: -+YY_RULE_SETUP -+return T_OR; -+ YY_BREAK -+case 34: -+YY_RULE_SETUP -+return T_AND; -+ YY_BREAK -+case 35: -+YY_RULE_SETUP -+return T_EQUAL; -+ YY_BREAK -+case 36: -+YY_RULE_SETUP -+return T_UNEQUAL; -+ YY_BREAK -+case 37: -+YY_RULE_SETUP -+return T_LESS; -+ YY_BREAK -+case 38: -+YY_RULE_SETUP -+return T_LESS_EQUAL; -+ YY_BREAK -+case 39: -+YY_RULE_SETUP -+return T_GREATER; -+ YY_BREAK -+case 40: -+YY_RULE_SETUP -+return T_GREATER_EQUAL; -+ YY_BREAK -+case 41: -+YY_RULE_SETUP -+return T_NOT; -+ YY_BREAK -+case 42: -+YY_RULE_SETUP -+return T_OPEN_PAREN; -+ YY_BREAK -+case 43: -+YY_RULE_SETUP -+return T_CLOSE_PAREN; -+ YY_BREAK -+case 44: -+YY_RULE_SETUP -+return T_COLON_EQUAL; -+ YY_BREAK -+case 45: -+YY_RULE_SETUP -+return T_PLUS_EQUAL; -+ YY_BREAK -+case 46: -+YY_RULE_SETUP -+{ -+ open_quote = yytext[0]; -+ new_string(); -+ BEGIN(STRING); -+ } -+ YY_BREAK -+case 47: -+YY_RULE_SETUP -+{ -+ alloc_string(yytext, yyleng); -+ yylval.string = text; -+ return T_WORD; -+ } -+ YY_BREAK -+case 48: -+YY_RULE_SETUP -+{ -+ /* this token includes at least one '$' */ -+ yylval.string = expand_token(yytext, yyleng); -+ if (strlen(yylval.string)) -+ return T_WORD; -+ free(yylval.string); -+ } -+ YY_BREAK -+case 49: -+YY_RULE_SETUP -+warn_ignored_character(*yytext); -+ YY_BREAK -+ -+case 50: -+YY_RULE_SETUP -+{ -+ alloc_string(yytext, yyleng); -+ yylval.string = text; -+ return T_ASSIGN_VAL; -+ } -+ YY_BREAK -+case 51: -+/* rule 51 can match eol */ -+YY_RULE_SETUP -+{ BEGIN(INITIAL); return T_EOL; } -+ YY_BREAK -+case 52: -+YY_RULE_SETUP -+ -+ YY_BREAK -+ -+case 53: -+YY_RULE_SETUP -+append_expanded_string(yytext); -+ YY_BREAK -+case 54: -+YY_RULE_SETUP -+{ -+ append_string(yytext, yyleng); -+ } -+ YY_BREAK -+case 55: -+YY_RULE_SETUP -+{ -+ append_string(yytext + 1, yyleng - 1); -+ } -+ YY_BREAK -+case 56: -+YY_RULE_SETUP -+{ -+ if (open_quote == yytext[0]) { -+ BEGIN(INITIAL); -+ yylval.string = text; -+ return T_WORD_QUOTE; -+ } else -+ append_string(yytext, 1); -+ } -+ YY_BREAK -+case 57: -+/* rule 57 can match eol */ -+YY_RULE_SETUP -+{ -+ fprintf(stderr, -+ "%s:%d:warning: multi-line strings not supported\n", -+ cur_filename, cur_lineno); -+ unput('\n'); -+ BEGIN(INITIAL); -+ yylval.string = text; -+ return T_WORD_QUOTE; -+ } -+ YY_BREAK -+case YY_STATE_EOF(STRING): -+{ -+ BEGIN(INITIAL); -+ yylval.string = text; -+ return T_WORD_QUOTE; -+ } -+ YY_BREAK -+ -+case 58: -+YY_RULE_SETUP -+{ -+ int ts, i; -+ -+ ts = 0; -+ for (i = 0; i < yyleng; i++) { -+ if (yytext[i] == '\t') -+ ts = (ts & ~7) + 8; -+ else -+ ts++; -+ } -+ last_ts = ts; -+ if (first_ts) { -+ if (ts < first_ts) { -+ zconf_endhelp(); -+ return T_HELPTEXT; -+ } -+ ts -= first_ts; -+ while (ts > 8) { -+ append_string(" ", 8); -+ ts -= 8; -+ } -+ append_string(" ", ts); -+ } -+ } -+ YY_BREAK -+case 59: -+/* rule 59 can match eol */ -+*yy_cp = (yy_hold_char); /* undo effects of setting up yytext */ -+YY_LINENO_REWIND_TO(yy_cp - 1); -+(yy_c_buf_p) = yy_cp -= 1; -+YY_DO_BEFORE_ACTION; /* set up yytext again */ -+YY_RULE_SETUP -+{ -+ zconf_endhelp(); -+ return T_HELPTEXT; -+ } -+ YY_BREAK -+case 60: -+/* rule 60 can match eol */ -+YY_RULE_SETUP -+{ -+ append_string("\n", 1); -+ } -+ YY_BREAK -+case 61: -+YY_RULE_SETUP -+{ -+ while (yyleng) { -+ if ((yytext[yyleng-1] != ' ') && (yytext[yyleng-1] != '\t')) -+ break; -+ yyleng--; -+ } -+ append_string(yytext, yyleng); -+ if (!first_ts) -+ first_ts = last_ts; -+ } -+ YY_BREAK -+case YY_STATE_EOF(HELP): -+{ -+ zconf_endhelp(); -+ return T_HELPTEXT; -+ } -+ YY_BREAK -+ -+case YY_STATE_EOF(INITIAL): -+case YY_STATE_EOF(ASSIGN_VAL): -+{ -+ BEGIN(INITIAL); -+ -+ if (prev_token != T_EOL && prev_token != T_HELPTEXT) -+ fprintf(stderr, "%s:%d:warning: no new line at end of file\n", -+ cur_filename, yylineno); -+ -+ if (current_buf) { -+ zconf_endfile(); -+ return T_EOL; -+ } -+ fclose(yyin); -+ yyterminate(); -+} -+ YY_BREAK -+case 62: -+YY_RULE_SETUP -+YY_FATAL_ERROR( "flex scanner jammed" ); -+ YY_BREAK -+ -+ case YY_END_OF_BUFFER: -+ { -+ /* Amount of text matched not including the EOB char. */ -+ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; -+ -+ /* Undo the effects of YY_DO_BEFORE_ACTION. */ -+ *yy_cp = (yy_hold_char); -+ YY_RESTORE_YY_MORE_OFFSET -+ -+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) -+ { -+ /* We're scanning a new file or input source. It's -+ * possible that this happened because the user -+ * just pointed yyin at a new source and called -+ * yylex(). If so, then we have to assure -+ * consistency between YY_CURRENT_BUFFER and our -+ * globals. Here is the right place to do so, because -+ * this is the first action (other than possibly a -+ * back-up) that will match for the new input source. -+ */ -+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; -+ YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; -+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; -+ } -+ -+ /* Note that here we test for yy_c_buf_p "<=" to the position -+ * of the first EOB in the buffer, since yy_c_buf_p will -+ * already have been incremented past the NUL character -+ * (since all states make transitions on EOB to the -+ * end-of-buffer state). Contrast this with the test -+ * in input(). -+ */ -+ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) -+ { /* This was really a NUL. */ -+ yy_state_type yy_next_state; -+ -+ (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; -+ -+ yy_current_state = yy_get_previous_state( ); -+ -+ /* Okay, we're now positioned to make the NUL -+ * transition. We couldn't have -+ * yy_get_previous_state() go ahead and do it -+ * for us because it doesn't know how to deal -+ * with the possibility of jamming (and we don't -+ * want to build jamming into it because then it -+ * will run more slowly). -+ */ -+ -+ yy_next_state = yy_try_NUL_trans( yy_current_state ); -+ -+ yy_bp = (yytext_ptr) + YY_MORE_ADJ; -+ -+ if ( yy_next_state ) -+ { -+ /* Consume the NUL. */ -+ yy_cp = ++(yy_c_buf_p); -+ yy_current_state = yy_next_state; -+ goto yy_match; -+ } -+ -+ else -+ { -+ yy_cp = (yy_c_buf_p); -+ goto yy_find_action; -+ } -+ } -+ -+ else switch ( yy_get_next_buffer( ) ) -+ { -+ case EOB_ACT_END_OF_FILE: -+ { -+ (yy_did_buffer_switch_on_eof) = 0; -+ -+ if ( yywrap( ) ) -+ { -+ /* Note: because we've taken care in -+ * yy_get_next_buffer() to have set up -+ * yytext, we can now set up -+ * yy_c_buf_p so that if some total -+ * hoser (like flex itself) wants to -+ * call the scanner after we return the -+ * YY_NULL, it'll still work - another -+ * YY_NULL will get returned. -+ */ -+ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; -+ -+ yy_act = YY_STATE_EOF(YY_START); -+ goto do_action; -+ } -+ -+ else -+ { -+ if ( ! (yy_did_buffer_switch_on_eof) ) -+ YY_NEW_FILE; -+ } -+ break; -+ } -+ -+ case EOB_ACT_CONTINUE_SCAN: -+ (yy_c_buf_p) = -+ (yytext_ptr) + yy_amount_of_matched_text; -+ -+ yy_current_state = yy_get_previous_state( ); -+ -+ yy_cp = (yy_c_buf_p); -+ yy_bp = (yytext_ptr) + YY_MORE_ADJ; -+ goto yy_match; -+ -+ case EOB_ACT_LAST_MATCH: -+ (yy_c_buf_p) = -+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; -+ -+ yy_current_state = yy_get_previous_state( ); -+ -+ yy_cp = (yy_c_buf_p); -+ yy_bp = (yytext_ptr) + YY_MORE_ADJ; -+ goto yy_find_action; -+ } -+ break; -+ } -+ -+ default: -+ YY_FATAL_ERROR( -+ "fatal flex scanner internal error--no action found" ); -+ } /* end of action switch */ -+ } /* end of scanning one token */ -+ } /* end of user's declarations */ -+} /* end of yylex */ -+ -+/* yy_get_next_buffer - try to read in a new buffer -+ * -+ * Returns a code representing an action: -+ * EOB_ACT_LAST_MATCH - -+ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position -+ * EOB_ACT_END_OF_FILE - end of file -+ */ -+static int yy_get_next_buffer (void) -+{ -+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; -+ char *source = (yytext_ptr); -+ int number_to_move, i; -+ int ret_val; -+ -+ if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) -+ YY_FATAL_ERROR( -+ "fatal flex scanner internal error--end of buffer missed" ); -+ -+ if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) -+ { /* Don't try to fill the buffer, so this is an EOF. */ -+ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) -+ { -+ /* We matched a single character, the EOB, so -+ * treat this as a final EOF. -+ */ -+ return EOB_ACT_END_OF_FILE; -+ } -+ -+ else -+ { -+ /* We matched some text prior to the EOB, first -+ * process it. -+ */ -+ return EOB_ACT_LAST_MATCH; -+ } -+ } -+ -+ /* Try to read more data. */ -+ -+ /* First move last chars to start of buffer. */ -+ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); -+ -+ for ( i = 0; i < number_to_move; ++i ) -+ *(dest++) = *(source++); -+ -+ if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) -+ /* don't do the read, it's not guaranteed to return an EOF, -+ * just force an EOF -+ */ -+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; -+ -+ else -+ { -+ int num_to_read = -+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; -+ -+ while ( num_to_read <= 0 ) -+ { /* Not enough room in the buffer - grow it. */ -+ -+ /* just a shorter name for the current buffer */ -+ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; -+ -+ int yy_c_buf_p_offset = -+ (int) ((yy_c_buf_p) - b->yy_ch_buf); -+ -+ if ( b->yy_is_our_buffer ) -+ { -+ int new_size = b->yy_buf_size * 2; -+ -+ if ( new_size <= 0 ) -+ b->yy_buf_size += b->yy_buf_size / 8; -+ else -+ b->yy_buf_size *= 2; -+ -+ b->yy_ch_buf = (char *) -+ /* Include room in for 2 EOB chars. */ -+ yyrealloc( (void *) b->yy_ch_buf, -+ (yy_size_t) (b->yy_buf_size + 2) ); -+ } -+ else -+ /* Can't grow it, we don't own it. */ -+ b->yy_ch_buf = NULL; -+ -+ if ( ! b->yy_ch_buf ) -+ YY_FATAL_ERROR( -+ "fatal error - scanner input buffer overflow" ); -+ -+ (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; -+ -+ num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - -+ number_to_move - 1; -+ -+ } -+ -+ if ( num_to_read > YY_READ_BUF_SIZE ) -+ num_to_read = YY_READ_BUF_SIZE; -+ -+ /* Read in more data. */ -+ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), -+ (yy_n_chars), num_to_read ); -+ -+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); -+ } -+ -+ if ( (yy_n_chars) == 0 ) -+ { -+ if ( number_to_move == YY_MORE_ADJ ) -+ { -+ ret_val = EOB_ACT_END_OF_FILE; -+ yyrestart( yyin ); -+ } -+ -+ else -+ { -+ ret_val = EOB_ACT_LAST_MATCH; -+ YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = -+ YY_BUFFER_EOF_PENDING; -+ } -+ } -+ -+ else -+ ret_val = EOB_ACT_CONTINUE_SCAN; -+ -+ if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { -+ /* Extend the array by 50%, plus the number we really need. */ -+ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); -+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( -+ (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); -+ if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) -+ YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); -+ /* "- 2" to take care of EOB's */ -+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); -+ } -+ -+ (yy_n_chars) += number_to_move; -+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; -+ YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; -+ -+ (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; -+ -+ return ret_val; -+} -+ -+/* yy_get_previous_state - get the state just before the EOB char was reached */ -+ -+ static yy_state_type yy_get_previous_state (void) -+{ -+ yy_state_type yy_current_state; -+ char *yy_cp; -+ -+ yy_current_state = (yy_start); -+ -+ for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) -+ { -+ yy_current_state = yy_nxt[yy_current_state][(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1)]; -+ } -+ -+ return yy_current_state; -+} -+ -+/* yy_try_NUL_trans - try to make a transition on the NUL character -+ * -+ * synopsis -+ * next_state = yy_try_NUL_trans( current_state ); -+ */ -+ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) -+{ -+ int yy_is_jam; -+ -+ yy_current_state = yy_nxt[yy_current_state][1]; -+ yy_is_jam = (yy_current_state <= 0); -+ -+ return yy_is_jam ? 0 : yy_current_state; -+} -+ -+#ifndef YY_NO_UNPUT -+ -+ static void yyunput (int c, char * yy_bp ) -+{ -+ char *yy_cp; -+ -+ yy_cp = (yy_c_buf_p); -+ -+ /* undo effects of setting up yytext */ -+ *yy_cp = (yy_hold_char); -+ -+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) -+ { /* need to shift things up to make room */ -+ /* +2 for EOB chars. */ -+ int number_to_move = (yy_n_chars) + 2; -+ char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ -+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; -+ char *source = -+ &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; -+ -+ while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) -+ *--dest = *--source; -+ -+ yy_cp += (int) (dest - source); -+ yy_bp += (int) (dest - source); -+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = -+ (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; -+ -+ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) -+ YY_FATAL_ERROR( "flex scanner push-back overflow" ); -+ } -+ -+ *--yy_cp = (char) c; -+ -+ if ( c == '\n' ){ -+ --yylineno; -+ } -+ -+ (yytext_ptr) = yy_bp; -+ (yy_hold_char) = *yy_cp; -+ (yy_c_buf_p) = yy_cp; -+} -+ -+#endif -+ -+#ifndef YY_NO_INPUT -+#ifdef __cplusplus -+ static int yyinput (void) -+#else -+ static int input (void) -+#endif -+ -+{ -+ int c; -+ -+ *(yy_c_buf_p) = (yy_hold_char); -+ -+ if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) -+ { -+ /* yy_c_buf_p now points to the character we want to return. -+ * If this occurs *before* the EOB characters, then it's a -+ * valid NUL; if not, then we've hit the end of the buffer. -+ */ -+ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) -+ /* This was really a NUL. */ -+ *(yy_c_buf_p) = '\0'; -+ -+ else -+ { /* need more input */ -+ int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); -+ ++(yy_c_buf_p); -+ -+ switch ( yy_get_next_buffer( ) ) -+ { -+ case EOB_ACT_LAST_MATCH: -+ /* This happens because yy_g_n_b() -+ * sees that we've accumulated a -+ * token and flags that we need to -+ * try matching the token before -+ * proceeding. But for input(), -+ * there's no matching to consider. -+ * So convert the EOB_ACT_LAST_MATCH -+ * to EOB_ACT_END_OF_FILE. -+ */ -+ -+ /* Reset buffer status. */ -+ yyrestart( yyin ); -+ -+ /*FALLTHROUGH*/ -+ -+ case EOB_ACT_END_OF_FILE: -+ { -+ if ( yywrap( ) ) -+ return 0; -+ -+ if ( ! (yy_did_buffer_switch_on_eof) ) -+ YY_NEW_FILE; -+#ifdef __cplusplus -+ return yyinput(); -+#else -+ return input(); -+#endif -+ } -+ -+ case EOB_ACT_CONTINUE_SCAN: -+ (yy_c_buf_p) = (yytext_ptr) + offset; -+ break; -+ } -+ } -+ } -+ -+ c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ -+ *(yy_c_buf_p) = '\0'; /* preserve yytext */ -+ (yy_hold_char) = *++(yy_c_buf_p); -+ -+ if ( c == '\n' ) -+ -+ yylineno++; -+; -+ -+ return c; -+} -+#endif /* ifndef YY_NO_INPUT */ -+ -+/** Immediately switch to a different input stream. -+ * @param input_file A readable stream. -+ * -+ * @note This function does not reset the start condition to @c INITIAL . -+ */ -+ void yyrestart (FILE * input_file ) -+{ -+ -+ if ( ! YY_CURRENT_BUFFER ){ -+ yyensure_buffer_stack (); -+ YY_CURRENT_BUFFER_LVALUE = -+ yy_create_buffer( yyin, YY_BUF_SIZE ); -+ } -+ -+ yy_init_buffer( YY_CURRENT_BUFFER, input_file ); -+ yy_load_buffer_state( ); -+} -+ -+/** Switch to a different input buffer. -+ * @param new_buffer The new input buffer. -+ * -+ */ -+ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) -+{ -+ -+ /* TODO. We should be able to replace this entire function body -+ * with -+ * yypop_buffer_state(); -+ * yypush_buffer_state(new_buffer); -+ */ -+ yyensure_buffer_stack (); -+ if ( YY_CURRENT_BUFFER == new_buffer ) -+ return; -+ -+ if ( YY_CURRENT_BUFFER ) -+ { -+ /* Flush out information for old buffer. */ -+ *(yy_c_buf_p) = (yy_hold_char); -+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); -+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); -+ } -+ -+ YY_CURRENT_BUFFER_LVALUE = new_buffer; -+ yy_load_buffer_state( ); -+ -+ /* We don't actually know whether we did this switch during -+ * EOF (yywrap()) processing, but the only time this flag -+ * is looked at is after yywrap() is called, so it's safe -+ * to go ahead and always set it. -+ */ -+ (yy_did_buffer_switch_on_eof) = 1; -+} -+ -+static void yy_load_buffer_state (void) -+{ -+ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; -+ (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; -+ yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; -+ (yy_hold_char) = *(yy_c_buf_p); -+} -+ -+/** Allocate and initialize an input buffer state. -+ * @param file A readable stream. -+ * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. -+ * -+ * @return the allocated buffer state. -+ */ -+ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) -+{ -+ YY_BUFFER_STATE b; -+ -+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); -+ if ( ! b ) -+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); -+ -+ b->yy_buf_size = size; -+ -+ /* yy_ch_buf has to be 2 characters longer than the size given because -+ * we need to put in 2 end-of-buffer characters. -+ */ -+ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); -+ if ( ! b->yy_ch_buf ) -+ YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); -+ -+ b->yy_is_our_buffer = 1; -+ -+ yy_init_buffer( b, file ); -+ -+ return b; -+} -+ -+/** Destroy the buffer. -+ * @param b a buffer created with yy_create_buffer() -+ * -+ */ -+ void yy_delete_buffer (YY_BUFFER_STATE b ) -+{ -+ -+ if ( ! b ) -+ return; -+ -+ if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ -+ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; -+ -+ if ( b->yy_is_our_buffer ) -+ yyfree( (void *) b->yy_ch_buf ); -+ -+ yyfree( (void *) b ); -+} -+ -+/* Initializes or reinitializes a buffer. -+ * This function is sometimes called more than once on the same buffer, -+ * such as during a yyrestart() or at EOF. -+ */ -+ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) -+ -+{ -+ int oerrno = errno; -+ -+ yy_flush_buffer( b ); -+ -+ b->yy_input_file = file; -+ b->yy_fill_buffer = 1; -+ -+ /* If b is the current buffer, then yy_init_buffer was _probably_ -+ * called from yyrestart() or through yy_get_next_buffer. -+ * In that case, we don't want to reset the lineno or column. -+ */ -+ if (b != YY_CURRENT_BUFFER){ -+ b->yy_bs_lineno = 1; -+ b->yy_bs_column = 0; -+ } -+ -+ b->yy_is_interactive = 0; -+ -+ errno = oerrno; -+} -+ -+/** Discard all buffered characters. On the next scan, YY_INPUT will be called. -+ * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. -+ * -+ */ -+ void yy_flush_buffer (YY_BUFFER_STATE b ) -+{ -+ if ( ! b ) -+ return; -+ -+ b->yy_n_chars = 0; -+ -+ /* We always need two end-of-buffer characters. The first causes -+ * a transition to the end-of-buffer state. The second causes -+ * a jam in that state. -+ */ -+ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; -+ b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; -+ -+ b->yy_buf_pos = &b->yy_ch_buf[0]; -+ -+ b->yy_at_bol = 1; -+ b->yy_buffer_status = YY_BUFFER_NEW; -+ -+ if ( b == YY_CURRENT_BUFFER ) -+ yy_load_buffer_state( ); -+} -+ -+/** Pushes the new state onto the stack. The new state becomes -+ * the current state. This function will allocate the stack -+ * if necessary. -+ * @param new_buffer The new state. -+ * -+ */ -+void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) -+{ -+ if (new_buffer == NULL) -+ return; -+ -+ yyensure_buffer_stack(); -+ -+ /* This block is copied from yy_switch_to_buffer. */ -+ if ( YY_CURRENT_BUFFER ) -+ { -+ /* Flush out information for old buffer. */ -+ *(yy_c_buf_p) = (yy_hold_char); -+ YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); -+ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); -+ } -+ -+ /* Only push if top exists. Otherwise, replace top. */ -+ if (YY_CURRENT_BUFFER) -+ (yy_buffer_stack_top)++; -+ YY_CURRENT_BUFFER_LVALUE = new_buffer; -+ -+ /* copied from yy_switch_to_buffer. */ -+ yy_load_buffer_state( ); -+ (yy_did_buffer_switch_on_eof) = 1; -+} -+ -+/** Removes and deletes the top of the stack, if present. -+ * The next element becomes the new top. -+ * -+ */ -+void yypop_buffer_state (void) -+{ -+ if (!YY_CURRENT_BUFFER) -+ return; -+ -+ yy_delete_buffer(YY_CURRENT_BUFFER ); -+ YY_CURRENT_BUFFER_LVALUE = NULL; -+ if ((yy_buffer_stack_top) > 0) -+ --(yy_buffer_stack_top); -+ -+ if (YY_CURRENT_BUFFER) { -+ yy_load_buffer_state( ); -+ (yy_did_buffer_switch_on_eof) = 1; -+ } -+} -+ -+/* Allocates the stack if it does not exist. -+ * Guarantees space for at least one push. -+ */ -+static void yyensure_buffer_stack (void) -+{ -+ yy_size_t num_to_alloc; -+ -+ if (!(yy_buffer_stack)) { -+ -+ /* First allocation is just for 2 elements, since we don't know if this -+ * scanner will even need a stack. We use 2 instead of 1 to avoid an -+ * immediate realloc on the next call. -+ */ -+ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ -+ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc -+ (num_to_alloc * sizeof(struct yy_buffer_state*) -+ ); -+ if ( ! (yy_buffer_stack) ) -+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); -+ -+ memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); -+ -+ (yy_buffer_stack_max) = num_to_alloc; -+ (yy_buffer_stack_top) = 0; -+ return; -+ } -+ -+ if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ -+ -+ /* Increase the buffer to prepare for a possible push. */ -+ yy_size_t grow_size = 8 /* arbitrary grow size */; -+ -+ num_to_alloc = (yy_buffer_stack_max) + grow_size; -+ (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc -+ ((yy_buffer_stack), -+ num_to_alloc * sizeof(struct yy_buffer_state*) -+ ); -+ if ( ! (yy_buffer_stack) ) -+ YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); -+ -+ /* zero only the new slots.*/ -+ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); -+ (yy_buffer_stack_max) = num_to_alloc; -+ } -+} -+ -+/** Setup the input buffer state to scan directly from a user-specified character buffer. -+ * @param base the character buffer -+ * @param size the size in bytes of the character buffer -+ * -+ * @return the newly allocated buffer state object. -+ */ -+YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) -+{ -+ YY_BUFFER_STATE b; -+ -+ if ( size < 2 || -+ base[size-2] != YY_END_OF_BUFFER_CHAR || -+ base[size-1] != YY_END_OF_BUFFER_CHAR ) -+ /* They forgot to leave room for the EOB's. */ -+ return NULL; -+ -+ b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); -+ if ( ! b ) -+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); -+ -+ b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ -+ b->yy_buf_pos = b->yy_ch_buf = base; -+ b->yy_is_our_buffer = 0; -+ b->yy_input_file = NULL; -+ b->yy_n_chars = b->yy_buf_size; -+ b->yy_is_interactive = 0; -+ b->yy_at_bol = 1; -+ b->yy_fill_buffer = 0; -+ b->yy_buffer_status = YY_BUFFER_NEW; -+ -+ yy_switch_to_buffer( b ); -+ -+ return b; -+} -+ -+/** Setup the input buffer state to scan a string. The next call to yylex() will -+ * scan from a @e copy of @a str. -+ * @param yystr a NUL-terminated string to scan -+ * -+ * @return the newly allocated buffer state object. -+ * @note If you want to scan bytes that may contain NUL values, then use -+ * yy_scan_bytes() instead. -+ */ -+YY_BUFFER_STATE yy_scan_string (const char * yystr ) -+{ -+ -+ return yy_scan_bytes( yystr, (int) strlen(yystr) ); -+} -+ -+/** Setup the input buffer state to scan the given bytes. The next call to yylex() will -+ * scan from a @e copy of @a bytes. -+ * @param yybytes the byte buffer to scan -+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. -+ * -+ * @return the newly allocated buffer state object. -+ */ -+YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) -+{ -+ YY_BUFFER_STATE b; -+ char *buf; -+ yy_size_t n; -+ int i; -+ -+ /* Get memory for full buffer, including space for trailing EOB's. */ -+ n = (yy_size_t) (_yybytes_len + 2); -+ buf = (char *) yyalloc( n ); -+ if ( ! buf ) -+ YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); -+ -+ for ( i = 0; i < _yybytes_len; ++i ) -+ buf[i] = yybytes[i]; -+ -+ buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; -+ -+ b = yy_scan_buffer( buf, n ); -+ if ( ! b ) -+ YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); -+ -+ /* It's okay to grow etc. this buffer, and we should throw it -+ * away when we're done. -+ */ -+ b->yy_is_our_buffer = 1; -+ -+ return b; -+} -+ -+#ifndef YY_EXIT_FAILURE -+#define YY_EXIT_FAILURE 2 -+#endif -+ -+static void yynoreturn yy_fatal_error (const char* msg ) -+{ -+ fprintf( stderr, "%s\n", msg ); -+ exit( YY_EXIT_FAILURE ); -+} -+ -+/* Redefine yyless() so it works in section 3 code. */ -+ -+#undef yyless -+#define yyless(n) \ -+ do \ -+ { \ -+ /* Undo effects of setting up yytext. */ \ -+ int yyless_macro_arg = (n); \ -+ YY_LESS_LINENO(yyless_macro_arg);\ -+ yytext[yyleng] = (yy_hold_char); \ -+ (yy_c_buf_p) = yytext + yyless_macro_arg; \ -+ (yy_hold_char) = *(yy_c_buf_p); \ -+ *(yy_c_buf_p) = '\0'; \ -+ yyleng = yyless_macro_arg; \ -+ } \ -+ while ( 0 ) -+ -+/* Accessor methods (get/set functions) to struct members. */ -+ -+/** Get the current line number. -+ * -+ */ -+int yyget_lineno (void) -+{ -+ -+ return yylineno; -+} -+ -+/** Get the input stream. -+ * -+ */ -+FILE *yyget_in (void) -+{ -+ return yyin; -+} -+ -+/** Get the output stream. -+ * -+ */ -+FILE *yyget_out (void) -+{ -+ return yyout; -+} -+ -+/** Get the length of the current token. -+ * -+ */ -+int yyget_leng (void) -+{ -+ return yyleng; -+} -+ -+/** Get the current token. -+ * -+ */ -+ -+char *yyget_text (void) -+{ -+ return yytext; -+} -+ -+/** Set the current line number. -+ * @param _line_number line number -+ * -+ */ -+void yyset_lineno (int _line_number ) -+{ -+ -+ yylineno = _line_number; -+} -+ -+/** Set the input stream. This does not discard the current -+ * input buffer. -+ * @param _in_str A readable stream. -+ * -+ * @see yy_switch_to_buffer -+ */ -+void yyset_in (FILE * _in_str ) -+{ -+ yyin = _in_str ; -+} -+ -+void yyset_out (FILE * _out_str ) -+{ -+ yyout = _out_str ; -+} -+ -+int yyget_debug (void) -+{ -+ return yy_flex_debug; -+} -+ -+void yyset_debug (int _bdebug ) -+{ -+ yy_flex_debug = _bdebug ; -+} -+ -+static int yy_init_globals (void) -+{ -+ /* Initialization is the same as for the non-reentrant scanner. -+ * This function is called from yylex_destroy(), so don't allocate here. -+ */ -+ -+ /* We do not touch yylineno unless the option is enabled. */ -+ yylineno = 1; -+ -+ (yy_buffer_stack) = NULL; -+ (yy_buffer_stack_top) = 0; -+ (yy_buffer_stack_max) = 0; -+ (yy_c_buf_p) = NULL; -+ (yy_init) = 0; -+ (yy_start) = 0; -+ -+/* Defined in main.c */ -+#ifdef YY_STDINIT -+ yyin = stdin; -+ yyout = stdout; -+#else -+ yyin = NULL; -+ yyout = NULL; -+#endif -+ -+ /* For future reference: Set errno on error, since we are called by -+ * yylex_init() -+ */ -+ return 0; -+} -+ -+/* yylex_destroy is for both reentrant and non-reentrant scanners. */ -+int yylex_destroy (void) -+{ -+ -+ /* Pop the buffer stack, destroying each element. */ -+ while(YY_CURRENT_BUFFER){ -+ yy_delete_buffer( YY_CURRENT_BUFFER ); -+ YY_CURRENT_BUFFER_LVALUE = NULL; -+ yypop_buffer_state(); -+ } -+ -+ /* Destroy the stack itself. */ -+ yyfree((yy_buffer_stack) ); -+ (yy_buffer_stack) = NULL; -+ -+ /* Reset the globals. This is important in a non-reentrant scanner so the next time -+ * yylex() is called, initialization will occur. */ -+ yy_init_globals( ); -+ -+ return 0; -+} -+ -+/* -+ * Internal utility routines. -+ */ -+ -+#ifndef yytext_ptr -+static void yy_flex_strncpy (char* s1, const char * s2, int n ) -+{ -+ -+ int i; -+ for ( i = 0; i < n; ++i ) -+ s1[i] = s2[i]; -+} -+#endif -+ -+#ifdef YY_NEED_STRLEN -+static int yy_flex_strlen (const char * s ) -+{ -+ int n; -+ for ( n = 0; s[n]; ++n ) -+ ; -+ -+ return n; -+} -+#endif -+ -+void *yyalloc (yy_size_t size ) -+{ -+ return malloc(size); -+} -+ -+void *yyrealloc (void * ptr, yy_size_t size ) -+{ -+ -+ /* The cast to (char *) in the following accommodates both -+ * implementations that use char* generic pointers, and those -+ * that use void* generic pointers. It works with the latter -+ * because both ANSI C and C++ allow castless assignment from -+ * any pointer type to void*, and deal with argument conversions -+ * as though doing an assignment. -+ */ -+ return realloc(ptr, size); -+} -+ -+void yyfree (void * ptr ) -+{ -+ free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ -+} -+ -+#define YYTABLES_NAME "yytables" -+ -+/* second stage lexer */ -+int yylex(void) -+{ -+ int token; -+ -+repeat: -+ token = yylex1(); -+ -+ if (prev_token == T_EOL || prev_token == T_HELPTEXT) { -+ if (token == T_EOL) -+ /* Do not pass unneeded T_EOL to the parser. */ -+ goto repeat; -+ else -+ /* -+ * For the parser, update lineno at the first token -+ * of each statement. Generally, \n is a statement -+ * terminator in Kconfig, but it is not always true -+ * because \n could be escaped by a backslash. -+ */ -+ cur_lineno = yylineno; -+ } -+ -+ if (prev_prev_token == T_EOL && prev_token == T_WORD && -+ (token == T_EQUAL || token == T_COLON_EQUAL || token == T_PLUS_EQUAL)) -+ BEGIN(ASSIGN_VAL); -+ -+ prev_prev_token = prev_token; -+ prev_token = token; -+ -+ return token; -+} -+ -+static char *expand_token(const char *in, size_t n) -+{ -+ char *out; -+ int c; -+ char c2; -+ const char *rest, *end; -+ -+ new_string(); -+ append_string(in, n); -+ -+ /* -+ * get the whole line because we do not know the end of token. -+ * input() returns 0 (not EOF!) when it reachs the end of file. -+ */ -+ while ((c = input()) != 0) { -+ if (c == '\n') { -+ unput(c); -+ break; -+ } -+ c2 = c; -+ append_string(&c2, 1); -+ } -+ -+ rest = text; -+ out = expand_one_token(&rest); -+ -+ /* push back unused characters to the input stream */ -+ end = rest + strlen(rest); -+ while (end > rest) -+ unput(*--end); -+ -+ free(text); -+ -+ return out; -+} -+ -+static void append_expanded_string(const char *str) -+{ -+ const char *end; -+ char *res; -+ -+ str++; -+ -+ res = expand_dollar(&str); -+ -+ /* push back unused characters to the input stream */ -+ end = str + strlen(str); -+ while (end > str) -+ unput(*--end); -+ -+ append_string(res, strlen(res)); -+ -+ free(res); -+} -+ -+void zconf_starthelp(void) -+{ -+ new_string(); -+ last_ts = first_ts = 0; -+ BEGIN(HELP); -+} -+ -+static void zconf_endhelp(void) -+{ -+ yylval.string = text; -+ BEGIN(INITIAL); -+} -+ -+/* -+ * Try to open specified file with following names: -+ * ./name -+ * $(srctree)/name -+ * The latter is used when srctree is separate from objtree -+ * when compiling the kernel. -+ * Return NULL if file is not found. -+ */ -+FILE *zconf_fopen(const char *name) -+{ -+ char *env, fullname[PATH_MAX+1]; -+ FILE *f; -+ -+ f = fopen(name, "r"); -+ if (!f && name != NULL && name[0] != '/') { -+ env = getenv(SRCTREE); -+ if (env) { -+ snprintf(fullname, sizeof(fullname), -+ "%s/%s", env, name); -+ f = fopen(fullname, "r"); -+ } -+ } -+ return f; -+} -+ -+void zconf_initscan(const char *name) -+{ -+ yyin = zconf_fopen(name); -+ if (!yyin) { -+ fprintf(stderr, "can't find file %s\n", name); -+ exit(1); -+ } -+ -+ cur_filename = file_lookup(name); -+ yylineno = 1; -+} -+ -+void zconf_nextfile(const char *name) -+{ -+ struct buffer *buf = xmalloc(sizeof(*buf)); -+ bool recur_include = false; -+ -+ buf->state = YY_CURRENT_BUFFER; -+ buf->yylineno = yylineno; -+ buf->filename = cur_filename; -+ buf->source_lineno = cur_lineno; -+ buf->parent = current_buf; -+ current_buf = buf; -+ yyin = zconf_fopen(name); -+ if (!yyin) { -+ fprintf(stderr, "%s:%d: can't open file \"%s\"\n", -+ cur_filename, cur_lineno, name); -+ exit(1); -+ } -+ yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE)); -+ -+ for (buf = current_buf; buf; buf = buf->parent) { -+ if (!strcmp(buf->filename, name)) -+ recur_include = true; -+ } -+ -+ if (recur_include) { -+ fprintf(stderr, -+ "Recursive inclusion detected.\n" -+ "Inclusion path:\n" -+ " current file : %s\n", name); -+ -+ for (buf = current_buf; buf; buf = buf->parent) -+ fprintf(stderr, " included from: %s:%d\n", -+ buf->filename, buf->source_lineno); -+ exit(1); -+ } -+ -+ yylineno = 1; -+ cur_filename = file_lookup(name); -+} -+ -+static void zconf_endfile(void) -+{ -+ struct buffer *tmp; -+ -+ fclose(yyin); -+ yy_delete_buffer(YY_CURRENT_BUFFER); -+ yy_switch_to_buffer(current_buf->state); -+ yylineno = current_buf->yylineno; -+ cur_filename = current_buf->filename; -+ tmp = current_buf; -+ current_buf = current_buf->parent; -+ free(tmp); -+} -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0013-parser.tab.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0013-parser.tab.c.patch deleted file mode 100644 index aeead48..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0013-parser.tab.c.patch +++ /dev/null @@ -1,2228 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/scripts/kconfig/parser.tab.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./scripts/kconfig/parser.tab.c 2026-03-23 18:27:35.954815135 +0100 -@@ -0,0 +1,2225 @@ -+/* A Bison parser, made by GNU Bison 3.8.2. */ -+ -+/* Bison implementation for Yacc-like parsers in C -+ -+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, -+ Inc. -+ -+ This program is free software: you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation, either version 3 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program. If not, see . */ -+ -+/* As a special exception, you may create a larger work that contains -+ part or all of the Bison parser skeleton and distribute that work -+ under terms of your choice, so long as that work isn't itself a -+ parser generator using the skeleton or a modified version thereof -+ as a parser skeleton. Alternatively, if you modify or redistribute -+ the parser skeleton itself, you may (at your option) remove this -+ special exception, which will cause the skeleton and the resulting -+ Bison output files to be licensed under the GNU General Public -+ License without this special exception. -+ -+ This special exception was added by the Free Software Foundation in -+ version 2.2 of Bison. */ -+ -+/* C LALR(1) parser skeleton written by Richard Stallman, by -+ simplifying the original so-called "semantic" parser. */ -+ -+/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, -+ especially those whose name start with YY_ or yy_. They are -+ private implementation details that can be changed or removed. */ -+ -+/* All symbols defined below should begin with yy or YY, to avoid -+ infringing on user name space. This should be done even for local -+ variables, as they might otherwise be expanded by user macros. -+ There are some unavoidable exceptions within include files to -+ define necessary library symbols; they are noted "INFRINGES ON -+ USER NAME SPACE" below. */ -+ -+/* Identify Bison output, and Bison version. */ -+#define YYBISON 30802 -+ -+/* Bison version string. */ -+#define YYBISON_VERSION "3.8.2" -+ -+/* Skeleton name. */ -+#define YYSKELETON_NAME "yacc.c" -+ -+/* Pure parsers. */ -+#define YYPURE 0 -+ -+/* Push parsers. */ -+#define YYPUSH 0 -+ -+/* Pull parsers. */ -+#define YYPULL 1 -+ -+ -+ -+ -+/* First part of user prologue. */ -+ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include "lkc.h" -+#include "internal.h" -+#include "preprocess.h" -+ -+#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) -+ -+#define PRINTD 0x0001 -+#define DEBUG_PARSE 0x0002 -+ -+int cdebug = PRINTD; -+ -+static void yyerror(const char *err); -+static void zconfprint(const char *err, ...); -+static void zconf_error(const char *err, ...); -+static bool zconf_endtoken(const char *tokenname, -+ const char *expected_tokenname); -+ -+struct menu *current_menu, *current_entry, *current_choice; -+ -+ -+ -+# ifndef YY_CAST -+# ifdef __cplusplus -+# define YY_CAST(Type, Val) static_cast (Val) -+# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) -+# else -+# define YY_CAST(Type, Val) ((Type) (Val)) -+# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) -+# endif -+# endif -+# ifndef YY_NULLPTR -+# if defined __cplusplus -+# if 201103L <= __cplusplus -+# define YY_NULLPTR nullptr -+# else -+# define YY_NULLPTR 0 -+# endif -+# else -+# define YY_NULLPTR ((void*)0) -+# endif -+# endif -+ -+#include "parser.tab.h" -+/* Symbol kind. */ -+enum yysymbol_kind_t -+{ -+ YYSYMBOL_YYEMPTY = -2, -+ YYSYMBOL_YYEOF = 0, /* "end of file" */ -+ YYSYMBOL_YYerror = 1, /* error */ -+ YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ -+ YYSYMBOL_T_HELPTEXT = 3, /* T_HELPTEXT */ -+ YYSYMBOL_T_WORD = 4, /* T_WORD */ -+ YYSYMBOL_T_WORD_QUOTE = 5, /* T_WORD_QUOTE */ -+ YYSYMBOL_T_BOOL = 6, /* T_BOOL */ -+ YYSYMBOL_T_CHOICE = 7, /* T_CHOICE */ -+ YYSYMBOL_T_CLOSE_PAREN = 8, /* T_CLOSE_PAREN */ -+ YYSYMBOL_T_COLON_EQUAL = 9, /* T_COLON_EQUAL */ -+ YYSYMBOL_T_COMMENT = 10, /* T_COMMENT */ -+ YYSYMBOL_T_CONFIG = 11, /* T_CONFIG */ -+ YYSYMBOL_T_DEFAULT = 12, /* T_DEFAULT */ -+ YYSYMBOL_T_DEF_BOOL = 13, /* T_DEF_BOOL */ -+ YYSYMBOL_T_DEF_TRISTATE = 14, /* T_DEF_TRISTATE */ -+ YYSYMBOL_T_DEPENDS = 15, /* T_DEPENDS */ -+ YYSYMBOL_T_ENDCHOICE = 16, /* T_ENDCHOICE */ -+ YYSYMBOL_T_ENDIF = 17, /* T_ENDIF */ -+ YYSYMBOL_T_ENDMENU = 18, /* T_ENDMENU */ -+ YYSYMBOL_T_HELP = 19, /* T_HELP */ -+ YYSYMBOL_T_HEX = 20, /* T_HEX */ -+ YYSYMBOL_T_IF = 21, /* T_IF */ -+ YYSYMBOL_T_IMPLY = 22, /* T_IMPLY */ -+ YYSYMBOL_T_INT = 23, /* T_INT */ -+ YYSYMBOL_T_MAINMENU = 24, /* T_MAINMENU */ -+ YYSYMBOL_T_MENU = 25, /* T_MENU */ -+ YYSYMBOL_T_MENUCONFIG = 26, /* T_MENUCONFIG */ -+ YYSYMBOL_T_MODULES = 27, /* T_MODULES */ -+ YYSYMBOL_T_ON = 28, /* T_ON */ -+ YYSYMBOL_T_OPEN_PAREN = 29, /* T_OPEN_PAREN */ -+ YYSYMBOL_T_PLUS_EQUAL = 30, /* T_PLUS_EQUAL */ -+ YYSYMBOL_T_PROMPT = 31, /* T_PROMPT */ -+ YYSYMBOL_T_RANGE = 32, /* T_RANGE */ -+ YYSYMBOL_T_SELECT = 33, /* T_SELECT */ -+ YYSYMBOL_T_SOURCE = 34, /* T_SOURCE */ -+ YYSYMBOL_T_STRING = 35, /* T_STRING */ -+ YYSYMBOL_T_TRISTATE = 36, /* T_TRISTATE */ -+ YYSYMBOL_T_VISIBLE = 37, /* T_VISIBLE */ -+ YYSYMBOL_T_EOL = 38, /* T_EOL */ -+ YYSYMBOL_T_ASSIGN_VAL = 39, /* T_ASSIGN_VAL */ -+ YYSYMBOL_T_OR = 40, /* T_OR */ -+ YYSYMBOL_T_AND = 41, /* T_AND */ -+ YYSYMBOL_T_EQUAL = 42, /* T_EQUAL */ -+ YYSYMBOL_T_UNEQUAL = 43, /* T_UNEQUAL */ -+ YYSYMBOL_T_LESS = 44, /* T_LESS */ -+ YYSYMBOL_T_LESS_EQUAL = 45, /* T_LESS_EQUAL */ -+ YYSYMBOL_T_GREATER = 46, /* T_GREATER */ -+ YYSYMBOL_T_GREATER_EQUAL = 47, /* T_GREATER_EQUAL */ -+ YYSYMBOL_T_NOT = 48, /* T_NOT */ -+ YYSYMBOL_YYACCEPT = 49, /* $accept */ -+ YYSYMBOL_input = 50, /* input */ -+ YYSYMBOL_mainmenu_stmt = 51, /* mainmenu_stmt */ -+ YYSYMBOL_stmt_list = 52, /* stmt_list */ -+ YYSYMBOL_stmt_list_in_choice = 53, /* stmt_list_in_choice */ -+ YYSYMBOL_config_entry_start = 54, /* config_entry_start */ -+ YYSYMBOL_config_stmt = 55, /* config_stmt */ -+ YYSYMBOL_menuconfig_entry_start = 56, /* menuconfig_entry_start */ -+ YYSYMBOL_menuconfig_stmt = 57, /* menuconfig_stmt */ -+ YYSYMBOL_config_option_list = 58, /* config_option_list */ -+ YYSYMBOL_config_option = 59, /* config_option */ -+ YYSYMBOL_choice = 60, /* choice */ -+ YYSYMBOL_choice_entry = 61, /* choice_entry */ -+ YYSYMBOL_choice_end = 62, /* choice_end */ -+ YYSYMBOL_choice_stmt = 63, /* choice_stmt */ -+ YYSYMBOL_choice_option_list = 64, /* choice_option_list */ -+ YYSYMBOL_choice_option = 65, /* choice_option */ -+ YYSYMBOL_type = 66, /* type */ -+ YYSYMBOL_default = 67, /* default */ -+ YYSYMBOL_if_entry = 68, /* if_entry */ -+ YYSYMBOL_if_end = 69, /* if_end */ -+ YYSYMBOL_if_stmt = 70, /* if_stmt */ -+ YYSYMBOL_if_stmt_in_choice = 71, /* if_stmt_in_choice */ -+ YYSYMBOL_menu = 72, /* menu */ -+ YYSYMBOL_menu_entry = 73, /* menu_entry */ -+ YYSYMBOL_menu_end = 74, /* menu_end */ -+ YYSYMBOL_menu_stmt = 75, /* menu_stmt */ -+ YYSYMBOL_menu_option_list = 76, /* menu_option_list */ -+ YYSYMBOL_source_stmt = 77, /* source_stmt */ -+ YYSYMBOL_comment = 78, /* comment */ -+ YYSYMBOL_comment_stmt = 79, /* comment_stmt */ -+ YYSYMBOL_comment_option_list = 80, /* comment_option_list */ -+ YYSYMBOL_help_start = 81, /* help_start */ -+ YYSYMBOL_help = 82, /* help */ -+ YYSYMBOL_depends = 83, /* depends */ -+ YYSYMBOL_visible = 84, /* visible */ -+ YYSYMBOL_prompt_stmt_opt = 85, /* prompt_stmt_opt */ -+ YYSYMBOL_end = 86, /* end */ -+ YYSYMBOL_if_expr = 87, /* if_expr */ -+ YYSYMBOL_expr = 88, /* expr */ -+ YYSYMBOL_nonconst_symbol = 89, /* nonconst_symbol */ -+ YYSYMBOL_symbol = 90, /* symbol */ -+ YYSYMBOL_assignment_stmt = 91, /* assignment_stmt */ -+ YYSYMBOL_assign_op = 92, /* assign_op */ -+ YYSYMBOL_assign_val = 93 /* assign_val */ -+}; -+typedef enum yysymbol_kind_t yysymbol_kind_t; -+ -+ -+ -+ -+#ifdef short -+# undef short -+#endif -+ -+/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure -+ and (if available) are included -+ so that the code can choose integer types of a good width. */ -+ -+#ifndef __PTRDIFF_MAX__ -+# include /* INFRINGES ON USER NAME SPACE */ -+# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -+# include /* INFRINGES ON USER NAME SPACE */ -+# define YY_STDINT_H -+# endif -+#endif -+ -+/* Narrow types that promote to a signed type and that can represent a -+ signed or unsigned integer of at least N bits. In tables they can -+ save space and decrease cache pressure. Promoting to a signed type -+ helps avoid bugs in integer arithmetic. */ -+ -+#ifdef __INT_LEAST8_MAX__ -+typedef __INT_LEAST8_TYPE__ yytype_int8; -+#elif defined YY_STDINT_H -+typedef int_least8_t yytype_int8; -+#else -+typedef signed char yytype_int8; -+#endif -+ -+#ifdef __INT_LEAST16_MAX__ -+typedef __INT_LEAST16_TYPE__ yytype_int16; -+#elif defined YY_STDINT_H -+typedef int_least16_t yytype_int16; -+#else -+typedef short yytype_int16; -+#endif -+ -+/* Work around bug in HP-UX 11.23, which defines these macros -+ incorrectly for preprocessor constants. This workaround can likely -+ be removed in 2023, as HPE has promised support for HP-UX 11.23 -+ (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of -+ . */ -+#ifdef __hpux -+# undef UINT_LEAST8_MAX -+# undef UINT_LEAST16_MAX -+# define UINT_LEAST8_MAX 255 -+# define UINT_LEAST16_MAX 65535 -+#endif -+ -+#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ -+typedef __UINT_LEAST8_TYPE__ yytype_uint8; -+#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ -+ && UINT_LEAST8_MAX <= INT_MAX) -+typedef uint_least8_t yytype_uint8; -+#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX -+typedef unsigned char yytype_uint8; -+#else -+typedef short yytype_uint8; -+#endif -+ -+#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ -+typedef __UINT_LEAST16_TYPE__ yytype_uint16; -+#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ -+ && UINT_LEAST16_MAX <= INT_MAX) -+typedef uint_least16_t yytype_uint16; -+#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX -+typedef unsigned short yytype_uint16; -+#else -+typedef int yytype_uint16; -+#endif -+ -+#ifndef YYPTRDIFF_T -+# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ -+# define YYPTRDIFF_T __PTRDIFF_TYPE__ -+# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ -+# elif defined PTRDIFF_MAX -+# ifndef ptrdiff_t -+# include /* INFRINGES ON USER NAME SPACE */ -+# endif -+# define YYPTRDIFF_T ptrdiff_t -+# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX -+# else -+# define YYPTRDIFF_T long -+# define YYPTRDIFF_MAXIMUM LONG_MAX -+# endif -+#endif -+ -+#ifndef YYSIZE_T -+# ifdef __SIZE_TYPE__ -+# define YYSIZE_T __SIZE_TYPE__ -+# elif defined size_t -+# define YYSIZE_T size_t -+# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ -+# include /* INFRINGES ON USER NAME SPACE */ -+# define YYSIZE_T size_t -+# else -+# define YYSIZE_T unsigned -+# endif -+#endif -+ -+#define YYSIZE_MAXIMUM \ -+ YY_CAST (YYPTRDIFF_T, \ -+ (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ -+ ? YYPTRDIFF_MAXIMUM \ -+ : YY_CAST (YYSIZE_T, -1))) -+ -+#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) -+ -+ -+/* Stored state numbers (used for stacks). */ -+typedef yytype_uint8 yy_state_t; -+ -+/* State numbers in computations. */ -+typedef int yy_state_fast_t; -+ -+#ifndef YY_ -+# if defined YYENABLE_NLS && YYENABLE_NLS -+# if ENABLE_NLS -+# include /* INFRINGES ON USER NAME SPACE */ -+# define YY_(Msgid) dgettext ("bison-runtime", Msgid) -+# endif -+# endif -+# ifndef YY_ -+# define YY_(Msgid) Msgid -+# endif -+#endif -+ -+ -+#ifndef YY_ATTRIBUTE_PURE -+# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) -+# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) -+# else -+# define YY_ATTRIBUTE_PURE -+# endif -+#endif -+ -+#ifndef YY_ATTRIBUTE_UNUSED -+# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) -+# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) -+# else -+# define YY_ATTRIBUTE_UNUSED -+# endif -+#endif -+ -+/* Suppress unused-variable warnings by "using" E. */ -+#if ! defined lint || defined __GNUC__ -+# define YY_USE(E) ((void) (E)) -+#else -+# define YY_USE(E) /* empty */ -+#endif -+ -+/* Suppress an incorrect diagnostic about yylval being uninitialized. */ -+#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ -+# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 -+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ -+ _Pragma ("GCC diagnostic push") \ -+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") -+# else -+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ -+ _Pragma ("GCC diagnostic push") \ -+ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ -+ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") -+# endif -+# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ -+ _Pragma ("GCC diagnostic pop") -+#else -+# define YY_INITIAL_VALUE(Value) Value -+#endif -+#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -+# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -+# define YY_IGNORE_MAYBE_UNINITIALIZED_END -+#endif -+#ifndef YY_INITIAL_VALUE -+# define YY_INITIAL_VALUE(Value) /* Nothing. */ -+#endif -+ -+#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ -+# define YY_IGNORE_USELESS_CAST_BEGIN \ -+ _Pragma ("GCC diagnostic push") \ -+ _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") -+# define YY_IGNORE_USELESS_CAST_END \ -+ _Pragma ("GCC diagnostic pop") -+#endif -+#ifndef YY_IGNORE_USELESS_CAST_BEGIN -+# define YY_IGNORE_USELESS_CAST_BEGIN -+# define YY_IGNORE_USELESS_CAST_END -+#endif -+ -+ -+#define YY_ASSERT(E) ((void) (0 && (E))) -+ -+#if !defined yyoverflow -+ -+/* The parser invokes alloca or malloc; define the necessary symbols. */ -+ -+# ifdef YYSTACK_USE_ALLOCA -+# if YYSTACK_USE_ALLOCA -+# ifdef __GNUC__ -+# define YYSTACK_ALLOC __builtin_alloca -+# elif defined __BUILTIN_VA_ARG_INCR -+# include /* INFRINGES ON USER NAME SPACE */ -+# elif defined _AIX -+# define YYSTACK_ALLOC __alloca -+# elif defined _MSC_VER -+# include /* INFRINGES ON USER NAME SPACE */ -+# define alloca _alloca -+# else -+# define YYSTACK_ALLOC alloca -+# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS -+# include /* INFRINGES ON USER NAME SPACE */ -+ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ -+# ifndef EXIT_SUCCESS -+# define EXIT_SUCCESS 0 -+# endif -+# endif -+# endif -+# endif -+# endif -+ -+# ifdef YYSTACK_ALLOC -+ /* Pacify GCC's 'empty if-body' warning. */ -+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -+# ifndef YYSTACK_ALLOC_MAXIMUM -+ /* The OS might guarantee only one guard page at the bottom of the stack, -+ and a page size can be as small as 4096 bytes. So we cannot safely -+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number -+ to allow for a few compiler-allocated temporary stack slots. */ -+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -+# endif -+# else -+# define YYSTACK_ALLOC YYMALLOC -+# define YYSTACK_FREE YYFREE -+# ifndef YYSTACK_ALLOC_MAXIMUM -+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -+# endif -+# if (defined __cplusplus && ! defined EXIT_SUCCESS \ -+ && ! ((defined YYMALLOC || defined malloc) \ -+ && (defined YYFREE || defined free))) -+# include /* INFRINGES ON USER NAME SPACE */ -+# ifndef EXIT_SUCCESS -+# define EXIT_SUCCESS 0 -+# endif -+# endif -+# ifndef YYMALLOC -+# define YYMALLOC malloc -+# if ! defined malloc && ! defined EXIT_SUCCESS -+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -+# endif -+# endif -+# ifndef YYFREE -+# define YYFREE free -+# if ! defined free && ! defined EXIT_SUCCESS -+void free (void *); /* INFRINGES ON USER NAME SPACE */ -+# endif -+# endif -+# endif -+#endif /* !defined yyoverflow */ -+ -+#if (! defined yyoverflow \ -+ && (! defined __cplusplus \ -+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) -+ -+/* A type that is properly aligned for any stack member. */ -+union yyalloc -+{ -+ yy_state_t yyss_alloc; -+ YYSTYPE yyvs_alloc; -+}; -+ -+/* The size of the maximum gap between one aligned stack and the next. */ -+# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) -+ -+/* The size of an array large to enough to hold all stacks, each with -+ N elements. */ -+# define YYSTACK_BYTES(N) \ -+ ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \ -+ + YYSTACK_GAP_MAXIMUM) -+ -+# define YYCOPY_NEEDED 1 -+ -+/* Relocate STACK from its old location to the new one. The -+ local variables YYSIZE and YYSTACKSIZE give the old and new number of -+ elements in the stack, and YYPTR gives the new location of the -+ stack. Advance YYPTR to a properly aligned location for the next -+ stack. */ -+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ -+ do \ -+ { \ -+ YYPTRDIFF_T yynewbytes; \ -+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ -+ Stack = &yyptr->Stack_alloc; \ -+ yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ -+ yyptr += yynewbytes / YYSIZEOF (*yyptr); \ -+ } \ -+ while (0) -+ -+#endif -+ -+#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -+/* Copy COUNT objects from SRC to DST. The source and destination do -+ not overlap. */ -+# ifndef YYCOPY -+# if defined __GNUC__ && 1 < __GNUC__ -+# define YYCOPY(Dst, Src, Count) \ -+ __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) -+# else -+# define YYCOPY(Dst, Src, Count) \ -+ do \ -+ { \ -+ YYPTRDIFF_T yyi; \ -+ for (yyi = 0; yyi < (Count); yyi++) \ -+ (Dst)[yyi] = (Src)[yyi]; \ -+ } \ -+ while (0) -+# endif -+# endif -+#endif /* !YYCOPY_NEEDED */ -+ -+/* YYFINAL -- State number of the termination state. */ -+#define YYFINAL 6 -+/* YYLAST -- Last index in YYTABLE. */ -+#define YYLAST 183 -+ -+/* YYNTOKENS -- Number of terminals. */ -+#define YYNTOKENS 49 -+/* YYNNTS -- Number of nonterminals. */ -+#define YYNNTS 45 -+/* YYNRULES -- Number of rules. */ -+#define YYNRULES 101 -+/* YYNSTATES -- Number of states. */ -+#define YYNSTATES 180 -+ -+/* YYMAXUTOK -- Last valid token kind. */ -+#define YYMAXUTOK 303 -+ -+ -+/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM -+ as returned by yylex, with out-of-bounds checking. */ -+#define YYTRANSLATE(YYX) \ -+ (0 <= (YYX) && (YYX) <= YYMAXUTOK \ -+ ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ -+ : YYSYMBOL_YYUNDEF) -+ -+/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM -+ as returned by yylex. */ -+static const yytype_int8 yytranslate[] = -+{ -+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, -+ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, -+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, -+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, -+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, -+ 45, 46, 47, 48 -+}; -+ -+#if YYDEBUG -+/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ -+static const yytype_int16 yyrline[] = -+{ -+ 0, 108, 108, 108, 112, 117, 119, 120, 121, 122, -+ 123, 124, 125, 126, 127, 128, 131, 133, 134, 135, -+ 136, 141, 147, 175, 181, 190, 192, 193, 194, 197, -+ 203, 209, 218, 224, 230, 236, 246, 257, 270, 280, -+ 283, 285, 286, 287, 290, 296, 302, 309, 310, 311, -+ 312, 313, 316, 317, 318, 322, 330, 338, 341, 346, -+ 353, 358, 366, 369, 371, 372, 375, 384, 391, 394, -+ 396, 401, 407, 425, 432, 439, 441, 446, 447, 448, -+ 451, 452, 455, 456, 457, 458, 459, 460, 461, 462, -+ 463, 464, 465, 469, 471, 472, 477, 480, 481, 482, -+ 486, 487 -+}; -+#endif -+ -+/** Accessing symbol of state STATE. */ -+#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) -+ -+#if YYDEBUG || 0 -+/* The user-facing name of the symbol whose (internal) number is -+ YYSYMBOL. No bounds checking. */ -+static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; -+ -+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. -+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -+static const char *const yytname[] = -+{ -+ "\"end of file\"", "error", "\"invalid token\"", "T_HELPTEXT", "T_WORD", -+ "T_WORD_QUOTE", "T_BOOL", "T_CHOICE", "T_CLOSE_PAREN", "T_COLON_EQUAL", -+ "T_COMMENT", "T_CONFIG", "T_DEFAULT", "T_DEF_BOOL", "T_DEF_TRISTATE", -+ "T_DEPENDS", "T_ENDCHOICE", "T_ENDIF", "T_ENDMENU", "T_HELP", "T_HEX", -+ "T_IF", "T_IMPLY", "T_INT", "T_MAINMENU", "T_MENU", "T_MENUCONFIG", -+ "T_MODULES", "T_ON", "T_OPEN_PAREN", "T_PLUS_EQUAL", "T_PROMPT", -+ "T_RANGE", "T_SELECT", "T_SOURCE", "T_STRING", "T_TRISTATE", "T_VISIBLE", -+ "T_EOL", "T_ASSIGN_VAL", "T_OR", "T_AND", "T_EQUAL", "T_UNEQUAL", -+ "T_LESS", "T_LESS_EQUAL", "T_GREATER", "T_GREATER_EQUAL", "T_NOT", -+ "$accept", "input", "mainmenu_stmt", "stmt_list", "stmt_list_in_choice", -+ "config_entry_start", "config_stmt", "menuconfig_entry_start", -+ "menuconfig_stmt", "config_option_list", "config_option", "choice", -+ "choice_entry", "choice_end", "choice_stmt", "choice_option_list", -+ "choice_option", "type", "default", "if_entry", "if_end", "if_stmt", -+ "if_stmt_in_choice", "menu", "menu_entry", "menu_end", "menu_stmt", -+ "menu_option_list", "source_stmt", "comment", "comment_stmt", -+ "comment_option_list", "help_start", "help", "depends", "visible", -+ "prompt_stmt_opt", "end", "if_expr", "expr", "nonconst_symbol", "symbol", -+ "assignment_stmt", "assign_op", "assign_val", YY_NULLPTR -+}; -+ -+static const char * -+yysymbol_name (yysymbol_kind_t yysymbol) -+{ -+ return yytname[yysymbol]; -+} -+#endif -+ -+#define YYPACT_NINF (-63) -+ -+#define yypact_value_is_default(Yyn) \ -+ ((Yyn) == YYPACT_NINF) -+ -+#define YYTABLE_NINF (-4) -+ -+#define yytable_value_is_error(Yyn) \ -+ 0 -+ -+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing -+ STATE-NUM. */ -+static const yytype_int16 yypact[] = -+{ -+ 4, 21, 19, -63, 32, -3, -63, 63, -1, 14, -+ 7, 42, 51, 2, 60, 51, 72, -63, -63, -63, -+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -+ -63, -63, -63, -63, -63, 30, -63, -63, -63, 44, -+ -63, 53, -63, 54, -63, 2, 2, 31, -63, 136, -+ 55, 56, 58, 117, 117, 15, 156, 101, 3, 101, -+ 83, -63, -63, 65, -63, -63, 8, -63, -63, 2, -+ 2, 71, 71, 71, 71, 71, 71, -63, -63, -63, -+ -63, -63, -63, -63, 76, 68, -63, 51, -63, 69, -+ 105, 71, 51, -63, -63, -63, 108, 2, 111, -63, -+ -63, 110, 51, 115, -63, -63, -63, 78, 86, 87, -+ 90, -63, -63, -63, -63, -63, -63, -63, -63, 100, -+ -63, -63, -63, -63, -63, -63, -63, 92, -63, -63, -+ -63, -63, -63, -63, -63, 2, -63, 100, -63, 100, -+ 71, 100, 100, 96, 20, -63, 100, 100, 100, -63, -+ -63, -63, -63, 156, 2, 103, 41, 104, 107, 100, -+ 109, -63, -63, 113, 122, 124, 130, -63, 46, -63, -+ -63, -63, -63, 131, -63, -63, -63, -63, -63, -63 -+}; -+ -+/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. -+ Performed when YYTABLE does not specify something else to do. Zero -+ means the default is an error. */ -+static const yytype_int8 yydefact[] = -+{ -+ 5, 0, 0, 5, 0, 0, 1, 0, 0, 0, -+ 0, 0, 0, 0, 0, 0, 0, 25, 9, 25, -+ 12, 40, 16, 7, 5, 10, 63, 5, 11, 13, -+ 69, 8, 6, 4, 15, 0, 98, 99, 97, 100, -+ 36, 0, 93, 0, 95, 0, 0, 0, 94, 82, -+ 0, 0, 0, 22, 24, 37, 0, 0, 60, 0, -+ 68, 14, 101, 0, 67, 21, 0, 90, 55, 0, -+ 0, 0, 0, 0, 0, 0, 0, 59, 23, 66, -+ 47, 52, 53, 54, 0, 0, 50, 0, 49, 0, -+ 0, 0, 0, 51, 48, 26, 75, 0, 0, 28, -+ 27, 0, 0, 0, 41, 43, 42, 0, 0, 0, -+ 0, 18, 39, 16, 19, 17, 38, 57, 56, 80, -+ 65, 64, 62, 61, 70, 96, 89, 91, 92, 87, -+ 88, 83, 84, 85, 86, 0, 71, 80, 35, 80, -+ 0, 80, 80, 0, 80, 72, 80, 80, 80, 20, -+ 78, 79, 77, 0, 0, 0, 0, 0, 0, 80, -+ 0, 76, 29, 0, 0, 0, 0, 58, 81, 74, -+ 73, 33, 30, 0, 32, 31, 45, 46, 44, 34 -+}; -+ -+/* YYPGOTO[NTERM-NUM]. */ -+static const yytype_int8 yypgoto[] = -+{ -+ -63, -63, -63, 35, 25, -63, -54, -63, -63, 127, -+ -63, -63, -63, -63, -63, -63, -63, -63, -63, -53, -+ -10, -63, -63, -63, -63, -63, -63, -63, -63, -63, -+ -52, -63, -63, 116, -38, -63, -63, -5, 17, -45, -+ -7, -62, -63, -63, -63 -+}; -+ -+/* YYDEFGOTO[NTERM-NUM]. */ -+static const yytype_uint8 yydefgoto[] = -+{ -+ 0, 2, 3, 4, 56, 17, 18, 19, 20, 53, -+ 95, 21, 22, 112, 23, 55, 104, 96, 97, 24, -+ 117, 25, 114, 26, 27, 122, 28, 58, 29, 30, -+ 31, 60, 98, 99, 100, 121, 143, 118, 155, 47, -+ 48, 49, 32, 39, 63 -+}; -+ -+/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If -+ positive, shift that token. If negative, reduce the rule whose -+ number is the opposite. If YYTABLE_NINF, syntax error. */ -+static const yytype_int16 yytable[] = -+{ -+ 66, 67, 111, 113, 115, 43, 42, 44, 51, 129, -+ 130, 131, 132, 133, 134, 35, 126, 106, 84, 6, -+ 120, 101, 124, 36, 127, 128, 5, 102, 1, 140, -+ 84, 45, -3, 8, 85, 33, 9, 34, 7, 10, -+ 119, 154, 11, 12, 37, 40, 103, 41, 69, 70, -+ 46, 116, 144, 13, 123, 42, 38, 14, 15, 57, -+ 69, 70, 59, -2, 8, 50, 16, 9, 61, 68, -+ 10, 69, 70, 11, 12, 42, 44, 52, 159, 170, -+ 137, 69, 70, 62, 13, 141, 69, 70, 14, 15, -+ 156, 64, 65, 77, 78, 147, 79, 16, 84, 111, -+ 113, 115, 8, 125, 135, 9, 136, 138, 10, 168, -+ 139, 11, 12, 142, 145, 146, 149, 108, 109, 110, -+ 148, 154, 13, 80, 150, 151, 14, 15, 152, 81, -+ 82, 83, 84, 70, 162, 16, 85, 86, 153, 87, -+ 88, 169, 171, 167, 89, 172, 54, 174, 90, 91, -+ 92, 175, 93, 94, 157, 0, 158, 107, 160, 161, -+ 176, 163, 177, 164, 165, 166, 11, 12, 178, 179, -+ 0, 105, 108, 109, 110, 0, 173, 13, 71, 72, -+ 73, 74, 75, 76 -+}; -+ -+static const yytype_int16 yycheck[] = -+{ -+ 45, 46, 56, 56, 56, 12, 4, 5, 15, 71, -+ 72, 73, 74, 75, 76, 1, 8, 55, 15, 0, -+ 58, 6, 60, 9, 69, 70, 5, 12, 24, 91, -+ 15, 29, 0, 1, 19, 38, 4, 38, 3, 7, -+ 37, 21, 10, 11, 30, 38, 31, 5, 40, 41, -+ 48, 56, 97, 21, 59, 4, 42, 25, 26, 24, -+ 40, 41, 27, 0, 1, 5, 34, 4, 38, 38, -+ 7, 40, 41, 10, 11, 4, 5, 5, 140, 38, -+ 87, 40, 41, 39, 21, 92, 40, 41, 25, 26, -+ 135, 38, 38, 38, 38, 102, 38, 34, 15, 153, -+ 153, 153, 1, 38, 28, 4, 38, 38, 7, 154, -+ 5, 10, 11, 5, 3, 5, 38, 16, 17, 18, -+ 5, 21, 21, 6, 38, 38, 25, 26, 38, 12, -+ 13, 14, 15, 41, 38, 34, 19, 20, 113, 22, -+ 23, 38, 38, 153, 27, 38, 19, 38, 31, 32, -+ 33, 38, 35, 36, 137, -1, 139, 1, 141, 142, -+ 38, 144, 38, 146, 147, 148, 10, 11, 38, 38, -+ -1, 55, 16, 17, 18, -1, 159, 21, 42, 43, -+ 44, 45, 46, 47 -+}; -+ -+/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of -+ state STATE-NUM. */ -+static const yytype_int8 yystos[] = -+{ -+ 0, 24, 50, 51, 52, 5, 0, 52, 1, 4, -+ 7, 10, 11, 21, 25, 26, 34, 54, 55, 56, -+ 57, 60, 61, 63, 68, 70, 72, 73, 75, 77, -+ 78, 79, 91, 38, 38, 1, 9, 30, 42, 92, -+ 38, 5, 4, 89, 5, 29, 48, 88, 89, 90, -+ 5, 89, 5, 58, 58, 64, 53, 52, 76, 52, -+ 80, 38, 39, 93, 38, 38, 88, 88, 38, 40, -+ 41, 42, 43, 44, 45, 46, 47, 38, 38, 38, -+ 6, 12, 13, 14, 15, 19, 20, 22, 23, 27, -+ 31, 32, 33, 35, 36, 59, 66, 67, 81, 82, -+ 83, 6, 12, 31, 65, 82, 83, 1, 16, 17, -+ 18, 55, 62, 68, 71, 79, 86, 69, 86, 37, -+ 83, 84, 74, 86, 83, 38, 8, 88, 88, 90, -+ 90, 90, 90, 90, 90, 28, 38, 89, 38, 5, -+ 90, 89, 5, 85, 88, 3, 5, 89, 5, 38, -+ 38, 38, 38, 53, 21, 87, 88, 87, 87, 90, -+ 87, 87, 38, 87, 87, 87, 87, 69, 88, 38, -+ 38, 38, 38, 87, 38, 38, 38, 38, 38, 38 -+}; -+ -+/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ -+static const yytype_int8 yyr1[] = -+{ -+ 0, 49, 50, 50, 51, 52, 52, 52, 52, 52, -+ 52, 52, 52, 52, 52, 52, 53, 53, 53, 53, -+ 53, 54, 55, 56, 57, 58, 58, 58, 58, 59, -+ 59, 59, 59, 59, 59, 59, 60, 61, 62, 63, -+ 64, 64, 64, 64, 65, 65, 65, 66, 66, 66, -+ 66, 66, 67, 67, 67, 68, 69, 70, 71, 72, -+ 73, 74, 75, 76, 76, 76, 77, 78, 79, 80, -+ 80, 81, 82, 83, 84, 85, 85, 86, 86, 86, -+ 87, 87, 88, 88, 88, 88, 88, 88, 88, 88, -+ 88, 88, 88, 89, 90, 90, 91, 92, 92, 92, -+ 93, 93 -+}; -+ -+/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ -+static const yytype_int8 yyr2[] = -+{ -+ 0, 2, 2, 1, 3, 0, 2, 2, 2, 2, -+ 2, 2, 2, 2, 4, 3, 0, 2, 2, 2, -+ 3, 3, 2, 3, 2, 0, 2, 2, 2, 3, -+ 4, 4, 4, 4, 5, 2, 2, 2, 1, 3, -+ 0, 2, 2, 2, 4, 4, 4, 1, 1, 1, -+ 1, 1, 1, 1, 1, 3, 1, 3, 3, 3, -+ 2, 1, 3, 0, 2, 2, 3, 3, 2, 0, -+ 2, 2, 2, 4, 3, 0, 2, 2, 2, 2, -+ 0, 2, 1, 3, 3, 3, 3, 3, 3, 3, -+ 2, 3, 3, 1, 1, 1, 4, 1, 1, 1, -+ 0, 1 -+}; -+ -+ -+enum { YYENOMEM = -2 }; -+ -+#define yyerrok (yyerrstatus = 0) -+#define yyclearin (yychar = YYEMPTY) -+ -+#define YYACCEPT goto yyacceptlab -+#define YYABORT goto yyabortlab -+#define YYERROR goto yyerrorlab -+#define YYNOMEM goto yyexhaustedlab -+ -+ -+#define YYRECOVERING() (!!yyerrstatus) -+ -+#define YYBACKUP(Token, Value) \ -+ do \ -+ if (yychar == YYEMPTY) \ -+ { \ -+ yychar = (Token); \ -+ yylval = (Value); \ -+ YYPOPSTACK (yylen); \ -+ yystate = *yyssp; \ -+ goto yybackup; \ -+ } \ -+ else \ -+ { \ -+ yyerror (YY_("syntax error: cannot back up")); \ -+ YYERROR; \ -+ } \ -+ while (0) -+ -+/* Backward compatibility with an undocumented macro. -+ Use YYerror or YYUNDEF. */ -+#define YYERRCODE YYUNDEF -+ -+ -+/* Enable debugging if requested. */ -+#if YYDEBUG -+ -+# ifndef YYFPRINTF -+# include /* INFRINGES ON USER NAME SPACE */ -+# define YYFPRINTF fprintf -+# endif -+ -+# define YYDPRINTF(Args) \ -+do { \ -+ if (yydebug) \ -+ YYFPRINTF Args; \ -+} while (0) -+ -+ -+ -+ -+# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ -+do { \ -+ if (yydebug) \ -+ { \ -+ YYFPRINTF (stderr, "%s ", Title); \ -+ yy_symbol_print (stderr, \ -+ Kind, Value); \ -+ YYFPRINTF (stderr, "\n"); \ -+ } \ -+} while (0) -+ -+ -+/*-----------------------------------. -+| Print this symbol's value on YYO. | -+`-----------------------------------*/ -+ -+static void -+yy_symbol_value_print (FILE *yyo, -+ yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) -+{ -+ FILE *yyoutput = yyo; -+ YY_USE (yyoutput); -+ if (!yyvaluep) -+ return; -+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -+ YY_USE (yykind); -+ YY_IGNORE_MAYBE_UNINITIALIZED_END -+} -+ -+ -+/*---------------------------. -+| Print this symbol on YYO. | -+`---------------------------*/ -+ -+static void -+yy_symbol_print (FILE *yyo, -+ yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) -+{ -+ YYFPRINTF (yyo, "%s %s (", -+ yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); -+ -+ yy_symbol_value_print (yyo, yykind, yyvaluep); -+ YYFPRINTF (yyo, ")"); -+} -+ -+/*------------------------------------------------------------------. -+| yy_stack_print -- Print the state stack from its BOTTOM up to its | -+| TOP (included). | -+`------------------------------------------------------------------*/ -+ -+static void -+yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) -+{ -+ YYFPRINTF (stderr, "Stack now"); -+ for (; yybottom <= yytop; yybottom++) -+ { -+ int yybot = *yybottom; -+ YYFPRINTF (stderr, " %d", yybot); -+ } -+ YYFPRINTF (stderr, "\n"); -+} -+ -+# define YY_STACK_PRINT(Bottom, Top) \ -+do { \ -+ if (yydebug) \ -+ yy_stack_print ((Bottom), (Top)); \ -+} while (0) -+ -+ -+/*------------------------------------------------. -+| Report that the YYRULE is going to be reduced. | -+`------------------------------------------------*/ -+ -+static void -+yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, -+ int yyrule) -+{ -+ int yylno = yyrline[yyrule]; -+ int yynrhs = yyr2[yyrule]; -+ int yyi; -+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", -+ yyrule - 1, yylno); -+ /* The symbols being reduced. */ -+ for (yyi = 0; yyi < yynrhs; yyi++) -+ { -+ YYFPRINTF (stderr, " $%d = ", yyi + 1); -+ yy_symbol_print (stderr, -+ YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), -+ &yyvsp[(yyi + 1) - (yynrhs)]); -+ YYFPRINTF (stderr, "\n"); -+ } -+} -+ -+# define YY_REDUCE_PRINT(Rule) \ -+do { \ -+ if (yydebug) \ -+ yy_reduce_print (yyssp, yyvsp, Rule); \ -+} while (0) -+ -+/* Nonzero means print parse trace. It is left uninitialized so that -+ multiple parsers can coexist. */ -+int yydebug; -+#else /* !YYDEBUG */ -+# define YYDPRINTF(Args) ((void) 0) -+# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) -+# define YY_STACK_PRINT(Bottom, Top) -+# define YY_REDUCE_PRINT(Rule) -+#endif /* !YYDEBUG */ -+ -+ -+/* YYINITDEPTH -- initial size of the parser's stacks. */ -+#ifndef YYINITDEPTH -+# define YYINITDEPTH 200 -+#endif -+ -+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only -+ if the built-in stack extension method is used). -+ -+ Do not make this value too large; the results are undefined if -+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) -+ evaluated with infinite-precision integer arithmetic. */ -+ -+#ifndef YYMAXDEPTH -+# define YYMAXDEPTH 10000 -+#endif -+ -+ -+ -+ -+ -+ -+/*-----------------------------------------------. -+| Release the memory associated to this symbol. | -+`-----------------------------------------------*/ -+ -+static void -+yydestruct (const char *yymsg, -+ yysymbol_kind_t yykind, YYSTYPE *yyvaluep) -+{ -+ YY_USE (yyvaluep); -+ if (!yymsg) -+ yymsg = "Deleting"; -+ YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); -+ -+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -+ switch (yykind) -+ { -+ case YYSYMBOL_choice_entry: /* choice_entry */ -+ { -+ fprintf(stderr, "%s:%d: missing end statement for this entry\n", -+ ((*yyvaluep).menu)->filename, ((*yyvaluep).menu)->lineno); -+ if (current_menu == ((*yyvaluep).menu)) -+ menu_end_menu(); -+} -+ break; -+ -+ case YYSYMBOL_if_entry: /* if_entry */ -+ { -+ fprintf(stderr, "%s:%d: missing end statement for this entry\n", -+ ((*yyvaluep).menu)->filename, ((*yyvaluep).menu)->lineno); -+ if (current_menu == ((*yyvaluep).menu)) -+ menu_end_menu(); -+} -+ break; -+ -+ case YYSYMBOL_menu_entry: /* menu_entry */ -+ { -+ fprintf(stderr, "%s:%d: missing end statement for this entry\n", -+ ((*yyvaluep).menu)->filename, ((*yyvaluep).menu)->lineno); -+ if (current_menu == ((*yyvaluep).menu)) -+ menu_end_menu(); -+} -+ break; -+ -+ default: -+ break; -+ } -+ YY_IGNORE_MAYBE_UNINITIALIZED_END -+} -+ -+ -+/* Lookahead token kind. */ -+int yychar; -+ -+/* The semantic value of the lookahead symbol. */ -+YYSTYPE yylval; -+/* Number of syntax errors so far. */ -+int yynerrs; -+ -+ -+ -+ -+/*----------. -+| yyparse. | -+`----------*/ -+ -+int -+yyparse (void) -+{ -+ yy_state_fast_t yystate = 0; -+ /* Number of tokens to shift before error messages enabled. */ -+ int yyerrstatus = 0; -+ -+ /* Refer to the stacks through separate pointers, to allow yyoverflow -+ to reallocate them elsewhere. */ -+ -+ /* Their size. */ -+ YYPTRDIFF_T yystacksize = YYINITDEPTH; -+ -+ /* The state stack: array, bottom, top. */ -+ yy_state_t yyssa[YYINITDEPTH]; -+ yy_state_t *yyss = yyssa; -+ yy_state_t *yyssp = yyss; -+ -+ /* The semantic value stack: array, bottom, top. */ -+ YYSTYPE yyvsa[YYINITDEPTH]; -+ YYSTYPE *yyvs = yyvsa; -+ YYSTYPE *yyvsp = yyvs; -+ -+ int yyn; -+ /* The return value of yyparse. */ -+ int yyresult; -+ /* Lookahead symbol kind. */ -+ yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; -+ /* The variables used to return semantic value and location from the -+ action routines. */ -+ YYSTYPE yyval; -+ -+ -+ -+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) -+ -+ /* The number of symbols on the RHS of the reduced rule. -+ Keep to zero when no symbol should be popped. */ -+ int yylen = 0; -+ -+ YYDPRINTF ((stderr, "Starting parse\n")); -+ -+ yychar = YYEMPTY; /* Cause a token to be read. */ -+ -+ goto yysetstate; -+ -+ -+/*------------------------------------------------------------. -+| yynewstate -- push a new state, which is found in yystate. | -+`------------------------------------------------------------*/ -+yynewstate: -+ /* In all cases, when you get here, the value and location stacks -+ have just been pushed. So pushing a state here evens the stacks. */ -+ yyssp++; -+ -+ -+/*--------------------------------------------------------------------. -+| yysetstate -- set current state (the top of the stack) to yystate. | -+`--------------------------------------------------------------------*/ -+yysetstate: -+ YYDPRINTF ((stderr, "Entering state %d\n", yystate)); -+ YY_ASSERT (0 <= yystate && yystate < YYNSTATES); -+ YY_IGNORE_USELESS_CAST_BEGIN -+ *yyssp = YY_CAST (yy_state_t, yystate); -+ YY_IGNORE_USELESS_CAST_END -+ YY_STACK_PRINT (yyss, yyssp); -+ -+ if (yyss + yystacksize - 1 <= yyssp) -+#if !defined yyoverflow && !defined YYSTACK_RELOCATE -+ YYNOMEM; -+#else -+ { -+ /* Get the current used size of the three stacks, in elements. */ -+ YYPTRDIFF_T yysize = yyssp - yyss + 1; -+ -+# if defined yyoverflow -+ { -+ /* Give user a chance to reallocate the stack. Use copies of -+ these so that the &'s don't force the real ones into -+ memory. */ -+ yy_state_t *yyss1 = yyss; -+ YYSTYPE *yyvs1 = yyvs; -+ -+ /* Each stack pointer address is followed by the size of the -+ data in use in that stack, in bytes. This used to be a -+ conditional around just the two extra args, but that might -+ be undefined if yyoverflow is a macro. */ -+ yyoverflow (YY_("memory exhausted"), -+ &yyss1, yysize * YYSIZEOF (*yyssp), -+ &yyvs1, yysize * YYSIZEOF (*yyvsp), -+ &yystacksize); -+ yyss = yyss1; -+ yyvs = yyvs1; -+ } -+# else /* defined YYSTACK_RELOCATE */ -+ /* Extend the stack our own way. */ -+ if (YYMAXDEPTH <= yystacksize) -+ YYNOMEM; -+ yystacksize *= 2; -+ if (YYMAXDEPTH < yystacksize) -+ yystacksize = YYMAXDEPTH; -+ -+ { -+ yy_state_t *yyss1 = yyss; -+ union yyalloc *yyptr = -+ YY_CAST (union yyalloc *, -+ YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); -+ if (! yyptr) -+ YYNOMEM; -+ YYSTACK_RELOCATE (yyss_alloc, yyss); -+ YYSTACK_RELOCATE (yyvs_alloc, yyvs); -+# undef YYSTACK_RELOCATE -+ if (yyss1 != yyssa) -+ YYSTACK_FREE (yyss1); -+ } -+# endif -+ -+ yyssp = yyss + yysize - 1; -+ yyvsp = yyvs + yysize - 1; -+ -+ YY_IGNORE_USELESS_CAST_BEGIN -+ YYDPRINTF ((stderr, "Stack size increased to %ld\n", -+ YY_CAST (long, yystacksize))); -+ YY_IGNORE_USELESS_CAST_END -+ -+ if (yyss + yystacksize - 1 <= yyssp) -+ YYABORT; -+ } -+#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ -+ -+ -+ if (yystate == YYFINAL) -+ YYACCEPT; -+ -+ goto yybackup; -+ -+ -+/*-----------. -+| yybackup. | -+`-----------*/ -+yybackup: -+ /* Do appropriate processing given the current state. Read a -+ lookahead token if we need one and don't already have one. */ -+ -+ /* First try to decide what to do without reference to lookahead token. */ -+ yyn = yypact[yystate]; -+ if (yypact_value_is_default (yyn)) -+ goto yydefault; -+ -+ /* Not known => get a lookahead token if don't already have one. */ -+ -+ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ -+ if (yychar == YYEMPTY) -+ { -+ YYDPRINTF ((stderr, "Reading a token\n")); -+ yychar = yylex (); -+ } -+ -+ if (yychar <= YYEOF) -+ { -+ yychar = YYEOF; -+ yytoken = YYSYMBOL_YYEOF; -+ YYDPRINTF ((stderr, "Now at end of input.\n")); -+ } -+ else if (yychar == YYerror) -+ { -+ /* The scanner already issued an error message, process directly -+ to error recovery. But do not keep the error token as -+ lookahead, it is too special and may lead us to an endless -+ loop in error recovery. */ -+ yychar = YYUNDEF; -+ yytoken = YYSYMBOL_YYerror; -+ goto yyerrlab1; -+ } -+ else -+ { -+ yytoken = YYTRANSLATE (yychar); -+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); -+ } -+ -+ /* If the proper action on seeing token YYTOKEN is to reduce or to -+ detect an error, take that action. */ -+ yyn += yytoken; -+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) -+ goto yydefault; -+ yyn = yytable[yyn]; -+ if (yyn <= 0) -+ { -+ if (yytable_value_is_error (yyn)) -+ goto yyerrlab; -+ yyn = -yyn; -+ goto yyreduce; -+ } -+ -+ /* Count tokens shifted since error; after three, turn off error -+ status. */ -+ if (yyerrstatus) -+ yyerrstatus--; -+ -+ /* Shift the lookahead token. */ -+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); -+ yystate = yyn; -+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -+ *++yyvsp = yylval; -+ YY_IGNORE_MAYBE_UNINITIALIZED_END -+ -+ /* Discard the shifted token. */ -+ yychar = YYEMPTY; -+ goto yynewstate; -+ -+ -+/*-----------------------------------------------------------. -+| yydefault -- do the default action for the current state. | -+`-----------------------------------------------------------*/ -+yydefault: -+ yyn = yydefact[yystate]; -+ if (yyn == 0) -+ goto yyerrlab; -+ goto yyreduce; -+ -+ -+/*-----------------------------. -+| yyreduce -- do a reduction. | -+`-----------------------------*/ -+yyreduce: -+ /* yyn is the number of a rule to reduce with. */ -+ yylen = yyr2[yyn]; -+ -+ /* If YYLEN is nonzero, implement the default value of the action: -+ '$$ = $1'. -+ -+ Otherwise, the following line sets YYVAL to garbage. -+ This behavior is undocumented and Bison -+ users should not rely upon it. Assigning to YYVAL -+ unconditionally makes the parser a bit smaller, and it avoids a -+ GCC warning that YYVAL may be used uninitialized. */ -+ yyval = yyvsp[1-yylen]; -+ -+ -+ YY_REDUCE_PRINT (yyn); -+ switch (yyn) -+ { -+ case 4: /* mainmenu_stmt: T_MAINMENU T_WORD_QUOTE T_EOL */ -+{ -+ menu_add_prompt(P_MENU, (yyvsp[-1].string), NULL); -+} -+ break; -+ -+ case 14: /* stmt_list: stmt_list T_WORD error T_EOL */ -+ { zconf_error("unknown statement \"%s\"", (yyvsp[-2].string)); } -+ break; -+ -+ case 15: /* stmt_list: stmt_list error T_EOL */ -+ { zconf_error("invalid statement"); } -+ break; -+ -+ case 20: /* stmt_list_in_choice: stmt_list_in_choice error T_EOL */ -+ { zconf_error("invalid statement"); } -+ break; -+ -+ case 21: /* config_entry_start: T_CONFIG nonconst_symbol T_EOL */ -+{ -+ menu_add_entry((yyvsp[-1].symbol)); -+ printd(DEBUG_PARSE, "%s:%d:config %s\n", cur_filename, cur_lineno, (yyvsp[-1].symbol)->name); -+} -+ break; -+ -+ case 22: /* config_stmt: config_entry_start config_option_list */ -+{ -+ if (current_choice) { -+ if (!current_entry->prompt) { -+ fprintf(stderr, "%s:%d: error: choice member must have a prompt\n", -+ current_entry->filename, current_entry->lineno); -+ yynerrs++; -+ } -+ -+ if (current_entry->sym->type != S_BOOLEAN) { -+ fprintf(stderr, "%s:%d: error: choice member must be bool\n", -+ current_entry->filename, current_entry->lineno); -+ yynerrs++; -+ } -+ -+ /* -+ * If the same symbol appears twice in a choice block, the list -+ * node would be added twice, leading to a broken linked list. -+ * list_empty() ensures that this symbol has not yet added. -+ */ -+ if (list_empty(¤t_entry->sym->choice_link)) -+ list_add_tail(¤t_entry->sym->choice_link, -+ ¤t_choice->choice_members); -+ } -+ -+ printd(DEBUG_PARSE, "%s:%d:endconfig\n", cur_filename, cur_lineno); -+} -+ break; -+ -+ case 23: /* menuconfig_entry_start: T_MENUCONFIG nonconst_symbol T_EOL */ -+{ -+ menu_add_entry((yyvsp[-1].symbol)); -+ printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", cur_filename, cur_lineno, (yyvsp[-1].symbol)->name); -+} -+ break; -+ -+ case 24: /* menuconfig_stmt: menuconfig_entry_start config_option_list */ -+{ -+ if (current_entry->prompt) -+ current_entry->prompt->type = P_MENU; -+ else -+ zconfprint("warning: menuconfig statement without prompt"); -+ printd(DEBUG_PARSE, "%s:%d:endconfig\n", cur_filename, cur_lineno); -+} -+ break; -+ -+ case 29: /* config_option: type prompt_stmt_opt T_EOL */ -+{ -+ menu_set_type((yyvsp[-2].type)); -+ printd(DEBUG_PARSE, "%s:%d:type(%u)\n", cur_filename, cur_lineno, (yyvsp[-2].type)); -+} -+ break; -+ -+ case 30: /* config_option: T_PROMPT T_WORD_QUOTE if_expr T_EOL */ -+{ -+ menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr)); -+ printd(DEBUG_PARSE, "%s:%d:prompt\n", cur_filename, cur_lineno); -+} -+ break; -+ -+ case 31: /* config_option: default expr if_expr T_EOL */ -+{ -+ menu_add_expr(P_DEFAULT, (yyvsp[-2].expr), (yyvsp[-1].expr)); -+ if ((yyvsp[-3].type) != S_UNKNOWN) -+ menu_set_type((yyvsp[-3].type)); -+ printd(DEBUG_PARSE, "%s:%d:default(%u)\n", cur_filename, cur_lineno, -+ (yyvsp[-3].type)); -+} -+ break; -+ -+ case 32: /* config_option: T_SELECT nonconst_symbol if_expr T_EOL */ -+{ -+ menu_add_symbol(P_SELECT, (yyvsp[-2].symbol), (yyvsp[-1].expr)); -+ printd(DEBUG_PARSE, "%s:%d:select\n", cur_filename, cur_lineno); -+} -+ break; -+ -+ case 33: /* config_option: T_IMPLY nonconst_symbol if_expr T_EOL */ -+{ -+ menu_add_symbol(P_IMPLY, (yyvsp[-2].symbol), (yyvsp[-1].expr)); -+ printd(DEBUG_PARSE, "%s:%d:imply\n", cur_filename, cur_lineno); -+} -+ break; -+ -+ case 34: /* config_option: T_RANGE symbol symbol if_expr T_EOL */ -+{ -+ menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[-3].symbol), (yyvsp[-2].symbol)), (yyvsp[-1].expr)); -+ printd(DEBUG_PARSE, "%s:%d:range\n", cur_filename, cur_lineno); -+} -+ break; -+ -+ case 35: /* config_option: T_MODULES T_EOL */ -+{ -+ if (modules_sym) -+ zconf_error("symbol '%s' redefines option 'modules' already defined by symbol '%s'", -+ current_entry->sym->name, modules_sym->name); -+ modules_sym = current_entry->sym; -+} -+ break; -+ -+ case 36: /* choice: T_CHOICE T_EOL */ -+{ -+ struct symbol *sym = sym_lookup(NULL, 0); -+ -+ menu_add_entry(sym); -+ menu_set_type(S_BOOLEAN); -+ INIT_LIST_HEAD(¤t_entry->choice_members); -+ -+ printd(DEBUG_PARSE, "%s:%d:choice\n", cur_filename, cur_lineno); -+} -+ break; -+ -+ case 37: /* choice_entry: choice choice_option_list */ -+{ -+ if (!current_entry->prompt) { -+ fprintf(stderr, "%s:%d: error: choice must have a prompt\n", -+ current_entry->filename, current_entry->lineno); -+ yynerrs++; -+ } -+ -+ (yyval.menu) = menu_add_menu(); -+ -+ current_choice = current_entry; -+} -+ break; -+ -+ case 38: /* choice_end: end */ -+{ -+ current_choice = NULL; -+ -+ if (zconf_endtoken((yyvsp[0].string), "choice")) { -+ menu_end_menu(); -+ printd(DEBUG_PARSE, "%s:%d:endchoice\n", cur_filename, cur_lineno); -+ } -+} -+ break; -+ -+ case 44: /* choice_option: T_PROMPT T_WORD_QUOTE if_expr T_EOL */ -+{ -+ menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr)); -+ printd(DEBUG_PARSE, "%s:%d:prompt\n", cur_filename, cur_lineno); -+} -+ break; -+ -+ case 45: /* choice_option: T_BOOL T_WORD_QUOTE if_expr T_EOL */ -+{ -+ menu_add_prompt(P_PROMPT, (yyvsp[-2].string), (yyvsp[-1].expr)); -+ printd(DEBUG_PARSE, "%s:%d:bool\n", cur_filename, cur_lineno); -+} -+ break; -+ -+ case 46: /* choice_option: T_DEFAULT nonconst_symbol if_expr T_EOL */ -+{ -+ menu_add_symbol(P_DEFAULT, (yyvsp[-2].symbol), (yyvsp[-1].expr)); -+ printd(DEBUG_PARSE, "%s:%d:default\n", cur_filename, cur_lineno); -+} -+ break; -+ -+ case 47: /* type: T_BOOL */ -+ { (yyval.type) = S_BOOLEAN; } -+ break; -+ -+ case 48: /* type: T_TRISTATE */ -+ { (yyval.type) = S_TRISTATE; } -+ break; -+ -+ case 49: /* type: T_INT */ -+ { (yyval.type) = S_INT; } -+ break; -+ -+ case 50: /* type: T_HEX */ -+ { (yyval.type) = S_HEX; } -+ break; -+ -+ case 51: /* type: T_STRING */ -+ { (yyval.type) = S_STRING; } -+ break; -+ -+ case 52: /* default: T_DEFAULT */ -+ { (yyval.type) = S_UNKNOWN; } -+ break; -+ -+ case 53: /* default: T_DEF_BOOL */ -+ { (yyval.type) = S_BOOLEAN; } -+ break; -+ -+ case 54: /* default: T_DEF_TRISTATE */ -+ { (yyval.type) = S_TRISTATE; } -+ break; -+ -+ case 55: /* if_entry: T_IF expr T_EOL */ -+{ -+ printd(DEBUG_PARSE, "%s:%d:if\n", cur_filename, cur_lineno); -+ menu_add_entry(NULL); -+ menu_add_dep((yyvsp[-1].expr)); -+ (yyval.menu) = menu_add_menu(); -+} -+ break; -+ -+ case 56: /* if_end: end */ -+{ -+ if (zconf_endtoken((yyvsp[0].string), "if")) { -+ menu_end_menu(); -+ printd(DEBUG_PARSE, "%s:%d:endif\n", cur_filename, cur_lineno); -+ } -+} -+ break; -+ -+ case 59: /* menu: T_MENU T_WORD_QUOTE T_EOL */ -+{ -+ menu_add_entry(NULL); -+ menu_add_prompt(P_MENU, (yyvsp[-1].string), NULL); -+ printd(DEBUG_PARSE, "%s:%d:menu\n", cur_filename, cur_lineno); -+} -+ break; -+ -+ case 60: /* menu_entry: menu menu_option_list */ -+{ -+ (yyval.menu) = menu_add_menu(); -+} -+ break; -+ -+ case 61: /* menu_end: end */ -+{ -+ if (zconf_endtoken((yyvsp[0].string), "menu")) { -+ menu_end_menu(); -+ printd(DEBUG_PARSE, "%s:%d:endmenu\n", cur_filename, cur_lineno); -+ } -+} -+ break; -+ -+ case 66: /* source_stmt: T_SOURCE T_WORD_QUOTE T_EOL */ -+{ -+ printd(DEBUG_PARSE, "%s:%d:source %s\n", cur_filename, cur_lineno, (yyvsp[-1].string)); -+ zconf_nextfile((yyvsp[-1].string)); -+ free((yyvsp[-1].string)); -+} -+ break; -+ -+ case 67: /* comment: T_COMMENT T_WORD_QUOTE T_EOL */ -+{ -+ menu_add_entry(NULL); -+ menu_add_prompt(P_COMMENT, (yyvsp[-1].string), NULL); -+ printd(DEBUG_PARSE, "%s:%d:comment\n", cur_filename, cur_lineno); -+} -+ break; -+ -+ case 71: /* help_start: T_HELP T_EOL */ -+{ -+ printd(DEBUG_PARSE, "%s:%d:help\n", cur_filename, cur_lineno); -+ zconf_starthelp(); -+} -+ break; -+ -+ case 72: /* help: help_start T_HELPTEXT */ -+{ -+ if (current_entry->help) { -+ free(current_entry->help); -+ zconfprint("warning: '%s' defined with more than one help text -- only the last one will be used", -+ current_entry->sym->name ?: ""); -+ } -+ -+ /* Is the help text empty or all whitespace? */ -+ if ((yyvsp[0].string)[strspn((yyvsp[0].string), " \f\n\r\t\v")] == '\0') -+ zconfprint("warning: '%s' defined with blank help text", -+ current_entry->sym->name ?: ""); -+ -+ current_entry->help = (yyvsp[0].string); -+} -+ break; -+ -+ case 73: /* depends: T_DEPENDS T_ON expr T_EOL */ -+{ -+ menu_add_dep((yyvsp[-1].expr)); -+ printd(DEBUG_PARSE, "%s:%d:depends on\n", cur_filename, cur_lineno); -+} -+ break; -+ -+ case 74: /* visible: T_VISIBLE if_expr T_EOL */ -+{ -+ menu_add_visibility((yyvsp[-1].expr)); -+} -+ break; -+ -+ case 76: /* prompt_stmt_opt: T_WORD_QUOTE if_expr */ -+{ -+ menu_add_prompt(P_PROMPT, (yyvsp[-1].string), (yyvsp[0].expr)); -+} -+ break; -+ -+ case 77: /* end: T_ENDMENU T_EOL */ -+ { (yyval.string) = "menu"; } -+ break; -+ -+ case 78: /* end: T_ENDCHOICE T_EOL */ -+ { (yyval.string) = "choice"; } -+ break; -+ -+ case 79: /* end: T_ENDIF T_EOL */ -+ { (yyval.string) = "if"; } -+ break; -+ -+ case 80: /* if_expr: %empty */ -+ { (yyval.expr) = NULL; } -+ break; -+ -+ case 81: /* if_expr: T_IF expr */ -+ { (yyval.expr) = (yyvsp[0].expr); } -+ break; -+ -+ case 82: /* expr: symbol */ -+ { (yyval.expr) = expr_alloc_symbol((yyvsp[0].symbol)); } -+ break; -+ -+ case 83: /* expr: symbol T_LESS symbol */ -+ { (yyval.expr) = expr_alloc_comp(E_LTH, (yyvsp[-2].symbol), (yyvsp[0].symbol)); } -+ break; -+ -+ case 84: /* expr: symbol T_LESS_EQUAL symbol */ -+ { (yyval.expr) = expr_alloc_comp(E_LEQ, (yyvsp[-2].symbol), (yyvsp[0].symbol)); } -+ break; -+ -+ case 85: /* expr: symbol T_GREATER symbol */ -+ { (yyval.expr) = expr_alloc_comp(E_GTH, (yyvsp[-2].symbol), (yyvsp[0].symbol)); } -+ break; -+ -+ case 86: /* expr: symbol T_GREATER_EQUAL symbol */ -+ { (yyval.expr) = expr_alloc_comp(E_GEQ, (yyvsp[-2].symbol), (yyvsp[0].symbol)); } -+ break; -+ -+ case 87: /* expr: symbol T_EQUAL symbol */ -+ { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); } -+ break; -+ -+ case 88: /* expr: symbol T_UNEQUAL symbol */ -+ { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[-2].symbol), (yyvsp[0].symbol)); } -+ break; -+ -+ case 89: /* expr: T_OPEN_PAREN expr T_CLOSE_PAREN */ -+ { (yyval.expr) = (yyvsp[-1].expr); } -+ break; -+ -+ case 90: /* expr: T_NOT expr */ -+ { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[0].expr)); } -+ break; -+ -+ case 91: /* expr: expr T_OR expr */ -+ { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[-2].expr), (yyvsp[0].expr)); } -+ break; -+ -+ case 92: /* expr: expr T_AND expr */ -+ { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[-2].expr), (yyvsp[0].expr)); } -+ break; -+ -+ case 93: /* nonconst_symbol: T_WORD */ -+ { (yyval.symbol) = sym_lookup((yyvsp[0].string), 0); free((yyvsp[0].string)); } -+ break; -+ -+ case 95: /* symbol: T_WORD_QUOTE */ -+ { (yyval.symbol) = sym_lookup((yyvsp[0].string), SYMBOL_CONST); free((yyvsp[0].string)); } -+ break; -+ -+ case 96: /* assignment_stmt: T_WORD assign_op assign_val T_EOL */ -+ { variable_add((yyvsp[-3].string), (yyvsp[-1].string), (yyvsp[-2].flavor)); free((yyvsp[-3].string)); free((yyvsp[-1].string)); } -+ break; -+ -+ case 97: /* assign_op: T_EQUAL */ -+ { (yyval.flavor) = VAR_RECURSIVE; } -+ break; -+ -+ case 98: /* assign_op: T_COLON_EQUAL */ -+ { (yyval.flavor) = VAR_SIMPLE; } -+ break; -+ -+ case 99: /* assign_op: T_PLUS_EQUAL */ -+ { (yyval.flavor) = VAR_APPEND; } -+ break; -+ -+ case 100: /* assign_val: %empty */ -+ { (yyval.string) = xstrdup(""); } -+ break; -+ -+ -+ -+ default: break; -+ } -+ /* User semantic actions sometimes alter yychar, and that requires -+ that yytoken be updated with the new translation. We take the -+ approach of translating immediately before every use of yytoken. -+ One alternative is translating here after every semantic action, -+ but that translation would be missed if the semantic action invokes -+ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or -+ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an -+ incorrect destructor might then be invoked immediately. In the -+ case of YYERROR or YYBACKUP, subsequent parser actions might lead -+ to an incorrect destructor call or verbose syntax error message -+ before the lookahead is translated. */ -+ YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); -+ -+ YYPOPSTACK (yylen); -+ yylen = 0; -+ -+ *++yyvsp = yyval; -+ -+ /* Now 'shift' the result of the reduction. Determine what state -+ that goes to, based on the state we popped back to and the rule -+ number reduced by. */ -+ { -+ const int yylhs = yyr1[yyn] - YYNTOKENS; -+ const int yyi = yypgoto[yylhs] + *yyssp; -+ yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp -+ ? yytable[yyi] -+ : yydefgoto[yylhs]); -+ } -+ -+ goto yynewstate; -+ -+ -+/*--------------------------------------. -+| yyerrlab -- here on detecting error. | -+`--------------------------------------*/ -+yyerrlab: -+ /* Make sure we have latest lookahead translation. See comments at -+ user semantic actions for why this is necessary. */ -+ yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); -+ /* If not already recovering from an error, report this error. */ -+ if (!yyerrstatus) -+ { -+ ++yynerrs; -+ yyerror (YY_("syntax error")); -+ } -+ -+ if (yyerrstatus == 3) -+ { -+ /* If just tried and failed to reuse lookahead token after an -+ error, discard it. */ -+ -+ if (yychar <= YYEOF) -+ { -+ /* Return failure if at end of input. */ -+ if (yychar == YYEOF) -+ YYABORT; -+ } -+ else -+ { -+ yydestruct ("Error: discarding", -+ yytoken, &yylval); -+ yychar = YYEMPTY; -+ } -+ } -+ -+ /* Else will try to reuse lookahead token after shifting the error -+ token. */ -+ goto yyerrlab1; -+ -+ -+/*---------------------------------------------------. -+| yyerrorlab -- error raised explicitly by YYERROR. | -+`---------------------------------------------------*/ -+yyerrorlab: -+ /* Pacify compilers when the user code never invokes YYERROR and the -+ label yyerrorlab therefore never appears in user code. */ -+ if (0) -+ YYERROR; -+ ++yynerrs; -+ -+ /* Do not reclaim the symbols of the rule whose action triggered -+ this YYERROR. */ -+ YYPOPSTACK (yylen); -+ yylen = 0; -+ YY_STACK_PRINT (yyss, yyssp); -+ yystate = *yyssp; -+ goto yyerrlab1; -+ -+ -+/*-------------------------------------------------------------. -+| yyerrlab1 -- common code for both syntax error and YYERROR. | -+`-------------------------------------------------------------*/ -+yyerrlab1: -+ yyerrstatus = 3; /* Each real token shifted decrements this. */ -+ -+ /* Pop stack until we find a state that shifts the error token. */ -+ for (;;) -+ { -+ yyn = yypact[yystate]; -+ if (!yypact_value_is_default (yyn)) -+ { -+ yyn += YYSYMBOL_YYerror; -+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) -+ { -+ yyn = yytable[yyn]; -+ if (0 < yyn) -+ break; -+ } -+ } -+ -+ /* Pop the current state because it cannot handle the error token. */ -+ if (yyssp == yyss) -+ YYABORT; -+ -+ -+ yydestruct ("Error: popping", -+ YY_ACCESSING_SYMBOL (yystate), yyvsp); -+ YYPOPSTACK (1); -+ yystate = *yyssp; -+ YY_STACK_PRINT (yyss, yyssp); -+ } -+ -+ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -+ *++yyvsp = yylval; -+ YY_IGNORE_MAYBE_UNINITIALIZED_END -+ -+ -+ /* Shift the error token. */ -+ YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); -+ -+ yystate = yyn; -+ goto yynewstate; -+ -+ -+/*-------------------------------------. -+| yyacceptlab -- YYACCEPT comes here. | -+`-------------------------------------*/ -+yyacceptlab: -+ yyresult = 0; -+ goto yyreturnlab; -+ -+ -+/*-----------------------------------. -+| yyabortlab -- YYABORT comes here. | -+`-----------------------------------*/ -+yyabortlab: -+ yyresult = 1; -+ goto yyreturnlab; -+ -+ -+/*-----------------------------------------------------------. -+| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | -+`-----------------------------------------------------------*/ -+yyexhaustedlab: -+ yyerror (YY_("memory exhausted")); -+ yyresult = 2; -+ goto yyreturnlab; -+ -+ -+/*----------------------------------------------------------. -+| yyreturnlab -- parsing is finished, clean up and return. | -+`----------------------------------------------------------*/ -+yyreturnlab: -+ if (yychar != YYEMPTY) -+ { -+ /* Make sure we have latest lookahead translation. See comments at -+ user semantic actions for why this is necessary. */ -+ yytoken = YYTRANSLATE (yychar); -+ yydestruct ("Cleanup: discarding lookahead", -+ yytoken, &yylval); -+ } -+ /* Do not reclaim the symbols of the rule whose action triggered -+ this YYABORT or YYACCEPT. */ -+ YYPOPSTACK (yylen); -+ YY_STACK_PRINT (yyss, yyssp); -+ while (yyssp != yyss) -+ { -+ yydestruct ("Cleanup: popping", -+ YY_ACCESSING_SYMBOL (+*yyssp), yyvsp); -+ YYPOPSTACK (1); -+ } -+#ifndef yyoverflow -+ if (yyss != yyssa) -+ YYSTACK_FREE (yyss); -+#endif -+ -+ return yyresult; -+} -+ -+ -+ -+/** -+ * choice_check_sanity - check sanity of a choice member -+ * -+ * @menu: menu of the choice member -+ * -+ * Return: -1 if an error is found, 0 otherwise. -+ */ -+static int choice_check_sanity(const struct menu *menu) -+{ -+ struct property *prop; -+ int ret = 0; -+ -+ for (prop = menu->sym->prop; prop; prop = prop->next) { -+ if (prop->type == P_DEFAULT) { -+ fprintf(stderr, "%s:%d: error: %s", -+ prop->filename, prop->lineno, -+ "defaults for choice values not supported\n"); -+ ret = -1; -+ } -+ -+ if (prop->menu != menu && prop->type == P_PROMPT && -+ prop->menu->parent != menu->parent) { -+ fprintf(stderr, "%s:%d: error: %s", -+ prop->filename, prop->lineno, -+ "choice value has a prompt outside its choice group\n"); -+ ret = -1; -+ } -+ } -+ -+ return ret; -+} -+ -+void conf_parse(const char *name) -+{ -+ struct menu *menu; -+ -+ autoconf_cmd = str_new(); -+ -+ str_printf(&autoconf_cmd, "\ndeps_config := \\\n"); -+ -+ zconf_initscan(name); -+ -+ _menu_init(); -+ -+ if (getenv("ZCONF_DEBUG")) -+ yydebug = 1; -+ yyparse(); -+ -+ str_printf(&autoconf_cmd, -+ "\n" -+ "$(autoconfig): $(deps_config)\n" -+ "$(deps_config): ;\n"); -+ -+ env_write_dep(&autoconf_cmd); -+ -+ /* Variables are expanded in the parse phase. We can free them here. */ -+ variable_all_del(); -+ -+ if (yynerrs) -+ exit(1); -+ if (!modules_sym) -+ modules_sym = &symbol_no; -+ -+ if (!menu_has_prompt(&rootmenu)) { -+ current_entry = &rootmenu; -+ menu_add_prompt(P_MENU, "Main menu", NULL); -+ } -+ -+ menu_finalize(); -+ -+ menu_for_each_entry(menu) { -+ struct menu *child; -+ -+ if (menu->sym && sym_check_deps(menu->sym)) -+ yynerrs++; -+ -+ if (menu->sym && sym_is_choice(menu->sym)) { -+ menu_for_each_sub_entry(child, menu) -+ if (child->sym && choice_check_sanity(child)) -+ yynerrs++; -+ } -+ } -+ -+ if (yynerrs) -+ exit(1); -+ conf_set_changed(true); -+} -+ -+static bool zconf_endtoken(const char *tokenname, -+ const char *expected_tokenname) -+{ -+ if (strcmp(tokenname, expected_tokenname)) { -+ zconf_error("unexpected '%s' within %s block", -+ tokenname, expected_tokenname); -+ yynerrs++; -+ return false; -+ } -+ if (strcmp(current_menu->filename, cur_filename)) { -+ zconf_error("'%s' in different file than '%s'", -+ tokenname, expected_tokenname); -+ fprintf(stderr, "%s:%d: location of the '%s'\n", -+ current_menu->filename, current_menu->lineno, -+ expected_tokenname); -+ yynerrs++; -+ return false; -+ } -+ return true; -+} -+ -+static void zconfprint(const char *err, ...) -+{ -+ va_list ap; -+ -+ fprintf(stderr, "%s:%d: ", cur_filename, cur_lineno); -+ va_start(ap, err); -+ vfprintf(stderr, err, ap); -+ va_end(ap); -+ fprintf(stderr, "\n"); -+} -+ -+static void zconf_error(const char *err, ...) -+{ -+ va_list ap; -+ -+ yynerrs++; -+ fprintf(stderr, "%s:%d: ", cur_filename, cur_lineno); -+ va_start(ap, err); -+ vfprintf(stderr, err, ap); -+ va_end(ap); -+ fprintf(stderr, "\n"); -+} -+ -+static void yyerror(const char *err) -+{ -+ fprintf(stderr, "%s:%d: %s\n", cur_filename, cur_lineno, err); -+} -+ -+static void print_quoted_string(FILE *out, const char *str) -+{ -+ const char *p; -+ int len; -+ -+ putc('"', out); -+ while ((p = strchr(str, '"'))) { -+ len = p - str; -+ if (len) -+ fprintf(out, "%.*s", len, str); -+ fputs("\\\"", out); -+ str = p + 1; -+ } -+ fputs(str, out); -+ putc('"', out); -+} -+ -+static void print_symbol(FILE *out, const struct menu *menu) -+{ -+ struct symbol *sym = menu->sym; -+ struct property *prop; -+ -+ if (sym_is_choice(sym)) -+ fprintf(out, "\nchoice\n"); -+ else -+ fprintf(out, "\nconfig %s\n", sym->name); -+ switch (sym->type) { -+ case S_BOOLEAN: -+ fputs(" bool\n", out); -+ break; -+ case S_TRISTATE: -+ fputs(" tristate\n", out); -+ break; -+ case S_STRING: -+ fputs(" string\n", out); -+ break; -+ case S_INT: -+ fputs(" integer\n", out); -+ break; -+ case S_HEX: -+ fputs(" hex\n", out); -+ break; -+ default: -+ fputs(" ???\n", out); -+ break; -+ } -+ for (prop = sym->prop; prop; prop = prop->next) { -+ if (prop->menu != menu) -+ continue; -+ switch (prop->type) { -+ case P_PROMPT: -+ fputs(" prompt ", out); -+ print_quoted_string(out, prop->text); -+ if (!expr_is_yes(prop->visible.expr)) { -+ fputs(" if ", out); -+ expr_fprint(prop->visible.expr, out); -+ } -+ fputc('\n', out); -+ break; -+ case P_DEFAULT: -+ fputs( " default ", out); -+ expr_fprint(prop->expr, out); -+ if (!expr_is_yes(prop->visible.expr)) { -+ fputs(" if ", out); -+ expr_fprint(prop->visible.expr, out); -+ } -+ fputc('\n', out); -+ break; -+ case P_SELECT: -+ fputs( " select ", out); -+ expr_fprint(prop->expr, out); -+ fputc('\n', out); -+ break; -+ case P_IMPLY: -+ fputs( " imply ", out); -+ expr_fprint(prop->expr, out); -+ fputc('\n', out); -+ break; -+ case P_RANGE: -+ fputs( " range ", out); -+ expr_fprint(prop->expr, out); -+ fputc('\n', out); -+ break; -+ case P_MENU: -+ fputs( " menu ", out); -+ print_quoted_string(out, prop->text); -+ fputc('\n', out); -+ break; -+ default: -+ fprintf(out, " unknown prop %d!\n", prop->type); -+ break; -+ } -+ } -+ if (menu->help) { -+ int len = strlen(menu->help); -+ while (menu->help[--len] == '\n') -+ menu->help[len] = 0; -+ fprintf(out, " help\n%s\n", menu->help); -+ } -+} -+ -+void zconfdump(FILE *out) -+{ -+ struct property *prop; -+ struct symbol *sym; -+ struct menu *menu; -+ -+ menu = rootmenu.list; -+ while (menu) { -+ if ((sym = menu->sym)) -+ print_symbol(out, menu); -+ else if ((prop = menu->prompt)) { -+ switch (prop->type) { -+ case P_COMMENT: -+ fputs("\ncomment ", out); -+ print_quoted_string(out, prop->text); -+ fputs("\n", out); -+ break; -+ case P_MENU: -+ fputs("\nmenu ", out); -+ print_quoted_string(out, prop->text); -+ fputs("\n", out); -+ break; -+ default: -+ ; -+ } -+ if (!expr_is_yes(prop->visible.expr)) { -+ fputs(" depends ", out); -+ expr_fprint(prop->visible.expr, out); -+ fputc('\n', out); -+ } -+ } -+ -+ if (menu->list) -+ menu = menu->list; -+ else if (menu->next) -+ menu = menu->next; -+ else while ((menu = menu->parent)) { -+ if (menu->prompt && menu->prompt->type == P_MENU) -+ fputs("\nendmenu\n", out); -+ if (menu->next) { -+ menu = menu->next; -+ break; -+ } -+ } -+ } -+} diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0014-parser.tab.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0014-parser.tab.h.patch deleted file mode 100644 index baf9ee1..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0014-parser.tab.h.patch +++ /dev/null @@ -1,136 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/scripts/kconfig/parser.tab.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./scripts/kconfig/parser.tab.h 2026-03-23 18:27:35.928935130 +0100 -@@ -0,0 +1,133 @@ -+/* A Bison parser, made by GNU Bison 3.8.2. */ -+ -+/* Bison interface for Yacc-like parsers in C -+ -+ Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, -+ Inc. -+ -+ This program is free software: you can redistribute it and/or modify -+ it under the terms of the GNU General Public License as published by -+ the Free Software Foundation, either version 3 of the License, or -+ (at your option) any later version. -+ -+ This program is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ GNU General Public License for more details. -+ -+ You should have received a copy of the GNU General Public License -+ along with this program. If not, see . */ -+ -+/* As a special exception, you may create a larger work that contains -+ part or all of the Bison parser skeleton and distribute that work -+ under terms of your choice, so long as that work isn't itself a -+ parser generator using the skeleton or a modified version thereof -+ as a parser skeleton. Alternatively, if you modify or redistribute -+ the parser skeleton itself, you may (at your option) remove this -+ special exception, which will cause the skeleton and the resulting -+ Bison output files to be licensed under the GNU General Public -+ License without this special exception. -+ -+ This special exception was added by the Free Software Foundation in -+ version 2.2 of Bison. */ -+ -+/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, -+ especially those whose name start with YY_ or yy_. They are -+ private implementation details that can be changed or removed. */ -+ -+#ifndef YY_YY_SCRIPTS_KCONFIG_PARSER_TAB_H_INCLUDED -+# define YY_YY_SCRIPTS_KCONFIG_PARSER_TAB_H_INCLUDED -+/* Debug traces. */ -+#ifndef YYDEBUG -+# define YYDEBUG 1 -+#endif -+#if YYDEBUG -+extern int yydebug; -+#endif -+ -+/* Token kinds. */ -+#ifndef YYTOKENTYPE -+# define YYTOKENTYPE -+ enum yytokentype -+ { -+ YYEMPTY = -2, -+ YYEOF = 0, /* "end of file" */ -+ YYerror = 256, /* error */ -+ YYUNDEF = 257, /* "invalid token" */ -+ T_HELPTEXT = 258, /* T_HELPTEXT */ -+ T_WORD = 259, /* T_WORD */ -+ T_WORD_QUOTE = 260, /* T_WORD_QUOTE */ -+ T_BOOL = 261, /* T_BOOL */ -+ T_CHOICE = 262, /* T_CHOICE */ -+ T_CLOSE_PAREN = 263, /* T_CLOSE_PAREN */ -+ T_COLON_EQUAL = 264, /* T_COLON_EQUAL */ -+ T_COMMENT = 265, /* T_COMMENT */ -+ T_CONFIG = 266, /* T_CONFIG */ -+ T_DEFAULT = 267, /* T_DEFAULT */ -+ T_DEF_BOOL = 268, /* T_DEF_BOOL */ -+ T_DEF_TRISTATE = 269, /* T_DEF_TRISTATE */ -+ T_DEPENDS = 270, /* T_DEPENDS */ -+ T_ENDCHOICE = 271, /* T_ENDCHOICE */ -+ T_ENDIF = 272, /* T_ENDIF */ -+ T_ENDMENU = 273, /* T_ENDMENU */ -+ T_HELP = 274, /* T_HELP */ -+ T_HEX = 275, /* T_HEX */ -+ T_IF = 276, /* T_IF */ -+ T_IMPLY = 277, /* T_IMPLY */ -+ T_INT = 278, /* T_INT */ -+ T_MAINMENU = 279, /* T_MAINMENU */ -+ T_MENU = 280, /* T_MENU */ -+ T_MENUCONFIG = 281, /* T_MENUCONFIG */ -+ T_MODULES = 282, /* T_MODULES */ -+ T_ON = 283, /* T_ON */ -+ T_OPEN_PAREN = 284, /* T_OPEN_PAREN */ -+ T_PLUS_EQUAL = 285, /* T_PLUS_EQUAL */ -+ T_PROMPT = 286, /* T_PROMPT */ -+ T_RANGE = 287, /* T_RANGE */ -+ T_SELECT = 288, /* T_SELECT */ -+ T_SOURCE = 289, /* T_SOURCE */ -+ T_STRING = 290, /* T_STRING */ -+ T_TRISTATE = 291, /* T_TRISTATE */ -+ T_VISIBLE = 292, /* T_VISIBLE */ -+ T_EOL = 293, /* T_EOL */ -+ T_ASSIGN_VAL = 294, /* T_ASSIGN_VAL */ -+ T_OR = 295, /* T_OR */ -+ T_AND = 296, /* T_AND */ -+ T_EQUAL = 297, /* T_EQUAL */ -+ T_UNEQUAL = 298, /* T_UNEQUAL */ -+ T_LESS = 299, /* T_LESS */ -+ T_LESS_EQUAL = 300, /* T_LESS_EQUAL */ -+ T_GREATER = 301, /* T_GREATER */ -+ T_GREATER_EQUAL = 302, /* T_GREATER_EQUAL */ -+ T_NOT = 303 /* T_NOT */ -+ }; -+ typedef enum yytokentype yytoken_kind_t; -+#endif -+ -+/* Value type. */ -+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -+union YYSTYPE -+{ -+ -+ char *string; -+ struct symbol *symbol; -+ struct expr *expr; -+ struct menu *menu; -+ enum symbol_type type; -+ enum variable_flavor flavor; -+ -+ -+}; -+typedef union YYSTYPE YYSTYPE; -+# define YYSTYPE_IS_TRIVIAL 1 -+# define YYSTYPE_IS_DECLARED 1 -+#endif -+ -+ -+extern YYSTYPE yylval; -+ -+ -+int yyparse (void); -+ -+ -+#endif /* !YY_YY_SCRIPTS_KCONFIG_PARSER_TAB_H_INCLUDED */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0015-Kconfig.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0015-Kconfig.patch deleted file mode 100644 index b21360e..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0015-Kconfig.patch +++ /dev/null @@ -1,54 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/drivers/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/drivers/Kconfig 2026-03-13 13:24:35.605124126 +0100 -@@ -0,0 +1,51 @@ -+# -+# SOO device configuration -+# -+ -+ -+menu "Smart Object Oriented subsystem" -+ -+config VDUMMY_BACKEND -+ bool "SOO (realtime and no-RT) vDummy support for debugging and testing" -+ -+config VUART_BACKEND -+ bool "vuart UART Backend support for SOO Mobile Entity consoles" -+ select SERIAL_CORE_CONSOLE -+ -+config VLEDS_BACKEND -+ bool "vleds LEDS backend driver" -+ default N -+ -+config VSENSELED_BACKEND -+ depends on FB_RPISENSE || ARCH_VEXPRESS -+ bool "vsenseled Sense-HAT led backend driver" -+ default n -+ help -+ The vsenseled driver enables 5 logical LEDs that may be used to represent the joystick movement -+ for example. -+ -+config VSENSEJ_BACKEND -+ depends on FB_RPISENSE || ARCH_VEXPRESS -+ bool "vsensej Sense-HAT joystick backend driver" -+ default n -+ help -+ The vsensej driver captures joystick movements. -+ -+config VLOGS_BACKEND -+ bool "vlogs LOGS Backend support for SOO Capsules" -+ help -+ The vlogs driver is used to logs Capsules logs - logs are store in -+ `/var/log/soo/capsule_N.log` (N corresponds to the SlotID of the capsule). -+ -+config VFBDEV_BACKEND -+ bool "vfbdev Framebuffer Backend support for SOO Capsules" -+ help -+ The vfbdev driver is used to allow capsules to access a framebuffer from Linux. -+ -+config VINPUT_BACKEND -+ bool "vinput Input support for SOO Capsules" -+ help -+ The vinput driver is used to allow capsules to access a mouse/keyboard inputs from Linux. -+ -+endmenu -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0017-vdevback.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0017-vdevback.c.patch deleted file mode 100644 index 60de69e..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0017-vdevback.c.patch +++ /dev/null @@ -1,312 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/drivers/vdevback.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/drivers/vdevback.c 2026-03-13 13:24:35.605293994 +0100 -@@ -0,0 +1,309 @@ -+ -+/* -+ * Copyright (C) 2020 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#if 0 -+#define DEBUG -+#endif -+ -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+ -+/* vdevback_processing_start() and vdevback_processing_end() will prevent against -+ * suspending/closing actions. -+ * -+ * The functions can be called in multiple execution context (threads). -+ * -+ * Return true if the frontend is connected and the processing can safely be performed. -+ * Return false *only* if the frontend is closing (and will be never connected again). -+ * -+ * The current thread is suspended until the frontend gets connected. -+ * -+ */ -+bool vdevback_processing_begin(struct vbus_device *vdev) { -+ void *priv = dev_get_drvdata(&vdev->dev); -+ vdevback_t *vdevback = (vdevback_t *) priv; -+ -+ /* Make sure we are still connected */ -+ if (vdev->fe_state == VbusStateClosing) -+ return false; -+ -+ /* Could be still being initialized... */ -+ if (vdev->fe_state != VbusStateConnected) -+ wait_for_completion(&vdevback->sync); -+ -+ if (atomic_read(&vdevback->processing_count) == 0) { -+ atomic_inc(&vdevback->processing_count); -+ -+ mutex_lock(&vdevback->processing_lock); -+ -+ /* Make sure we are still connected after a lock contention. */ -+ if (vdev->fe_state == VbusStateClosing) { -+ mutex_unlock(&vdevback->processing_lock); -+ -+ complete(&vdevback->sync); -+ return false; -+ } -+ -+ if (vdev->fe_state != VbusStateConnected) -+ wait_for_completion(&vdevback->sync); -+ -+ -+ BUG_ON(vdev->fe_state != VbusStateConnected); -+ } else -+ atomic_inc(&vdevback->processing_count); -+ -+ return true; -+} -+ -+/* -+ * Finish a processing section against suspend/close prevention -+ */ -+void vdevback_processing_end(struct vbus_device *vdev) { -+ void *priv = dev_get_drvdata(&vdev->dev); -+ vdevback_t *vdevback = (vdevback_t *) priv; -+ -+ atomic_dec(&vdevback->processing_count); -+ -+ if (atomic_read(&vdevback->processing_count) == 0) -+ mutex_unlock(&vdevback->processing_lock); -+ -+} -+ -+/* -+ * Check if the frontend state and tell whether it is connected. -+ */ -+bool vdevfront_is_connected(struct vbus_device *vdev) { -+ void *priv = dev_get_drvdata(&vdev->dev); -+ vdevback_t *vdevback = (vdevback_t *) priv; -+ -+ if (!vdev) -+ return false; -+ -+ return vdevback->vdevfront_connected; -+} -+ -+/* -+ * Probe entry point for our vbus backend. -+ * The probe is executed as soon as a frontend is showing up. -+ */ -+static void __probe(struct vbus_device *vdev) { -+ void *priv; -+ vdevback_t *vdevback; -+ vdrvback_t *vdrvback = to_vdrvback(vdev); -+ -+ DBG("%s: SOO backend driver...\n", __func__); -+ -+ vdrvback->probe(vdev); -+ -+ priv = dev_get_drvdata(&vdev->dev); -+ vdevback = (vdevback_t *) priv; -+ -+ atomic_set(&vdevback->processing_count, 0); -+ -+ mutex_init(&vdevback->processing_lock); -+ -+ init_completion(&vdevback->sync); -+ -+} -+ -+static void __remove(struct vbus_device *vdev) { -+ void *priv = dev_get_drvdata(&vdev->dev); -+ vdevback_t *vdevback = (vdevback_t *) priv; -+ vdrvback_t *vdrvback = to_vdrvback(vdev); -+ -+ /* -+ * If a processing is being started, but is locked by the processing_lock mutex, -+ * it must be first woken up to go ahead and abort the function call. -+ */ -+ -+ if (atomic_read(&vdevback->processing_count) > 0) { -+ -+ /* Release the possible waiters on the lock so that they can pursue their work */ -+ mutex_unlock(&vdevback->processing_lock); -+ -+ while (atomic_read(&vdevback->processing_count) > 0) -+ wait_for_completion(&vdevback->sync); -+ -+ } else -+ mutex_unlock(&vdevback->processing_lock); -+ -+ vdrvback->remove(vdev); -+} -+ -+/* -+ * Callback received when the frontend's state changes. -+ */ -+static void __otherend_changed(struct vbus_device *vdev, enum vbus_state frontend_state) { -+ void *priv = dev_get_drvdata(&vdev->dev); -+ vdevback_t *vdevback = (vdevback_t *) priv; -+ vdrvback_t *vdrvback = to_vdrvback(vdev); -+ -+ DBG("%s\n", vbus_strstate(frontend_state)); -+ -+ switch (frontend_state) { -+ -+ case VbusStateInitialised: -+ case VbusStateReconfigured: -+ DBG0("SOO Dummy: reconfigured...\n"); -+ -+ BUG_ON(vdev->fe_state == VbusStateConnected); -+ -+ vdrvback->reconfigured(vdev); -+ -+ mutex_unlock(&vdevback->processing_lock); -+ -+ break; -+ -+ case VbusStateConnected: -+ DBG0("vdummy frontend connected, all right.\n"); -+ -+ vdevback->vdevfront_connected = true; -+ -+ vdrvback->connected(vdev); -+ -+ complete(&vdevback->sync); -+ break; -+ -+ case VbusStateClosing: -+ DBG0("Got that the virtual dummy frontend now closing...\n"); -+ -+ BUG_ON(vdev->state != VbusStateConnected); -+ -+ /* Make sure no further processing is going on. */ -+ mutex_lock(&vdevback->processing_lock); -+ -+ /* Prepare the sync completion to coordinate the removal of device. */ -+ reinit_completion(&vdevback->sync); -+ -+ vdevback->vdevfront_connected = false; -+ -+ vdrvback->close(vdev); -+ break; -+ -+ case VbusStateSuspended: -+ /* Suspend Step 3 */ -+ DBG("frontend_suspended: %s ...\n", vdev->nodename); -+ -+ break; -+ -+ case VbusStateUnknown: -+ default: -+ break; -+ } -+} -+ -+static int __suspend(struct vbus_device *vdev) { -+ void *priv = dev_get_drvdata(&vdev->dev); -+ vdevback_t *vdevback = (vdevback_t *) priv; -+ vdrvback_t *vdrvback = to_vdrvback(vdev); -+ -+ DBG0("vdummy_suspend: wait for frontend now...\n"); -+ -+ BUG_ON(vdev->fe_state != VbusStateConnected); -+ -+ mutex_lock(&vdevback->processing_lock); -+ -+ /* Prepare the next processing activity for waiting on FE to get connected. */ -+ reinit_completion(&vdevback->sync); -+ -+ vdrvback->suspend(vdev); -+ -+ return 0; -+} -+ -+static int __resume(struct vbus_device *vdev) { -+ void *priv = dev_get_drvdata(&vdev->dev); -+ vdevback_t *vdevback = (vdevback_t *) priv; -+ vdrvback_t *vdrvback = to_vdrvback(vdev); -+ -+ /* Resume Step 1 */ -+ -+ DBG("backend resuming: %s ...\n", vdev->nodename); -+ -+ BUG_ON(vdev->fe_state == VbusStateConnected); -+ -+ vdrvback->resume(vdev); -+ -+ mutex_unlock(&vdevback->processing_lock); -+ -+ return 0; -+} -+ -+/* ** Driver Registration ** */ -+ -+void vdevback_init(char *name, vdrvback_t *vbackdrv) { -+ -+ vbackdrv->vdrv.owner = THIS_MODULE; -+ vbackdrv->vdrv.name = name; -+ strcpy(vbackdrv->vdrv.devicetype, name); -+ -+ vbackdrv->vdrv.probe = __probe; -+ vbackdrv->vdrv.remove = __remove; -+ vbackdrv->vdrv.otherend_changed = __otherend_changed; -+ vbackdrv->vdrv.suspend = __suspend; -+ vbackdrv->vdrv.resume = __resume; -+ -+ vbus_register_backend(&vbackdrv->vdrv); -+} -+ -+ -+ -+void vdevback_add_entry(struct vbus_device *vdev, struct list_head *list) { -+ vdev_entry_t *entry; -+ -+ entry = kzalloc(sizeof(vdev_entry_t), GFP_ATOMIC); -+ BUG_ON(!entry); -+ -+ entry->vdev = vdev; -+ -+ list_add(&entry->list, list); -+} -+ -+/* -+ * Search for a console related to a specific ME according to its domid. -+ */ -+struct vbus_device *vdevback_get_entry(uint32_t domid, struct list_head *_list) { -+ vdev_entry_t *entry; -+ -+ list_for_each_entry(entry, _list, list) -+ if (entry->vdev->otherend_id == domid) -+ return entry->vdev; -+ return NULL; -+} -+ -+/* -+ * Remove a console attached to a specific ME -+ */ -+void vdevback_del_entry(struct vbus_device *vdev, struct list_head *_list) { -+ vdev_entry_t *entry; -+ -+ list_for_each_entry(entry, _list, list) -+ if (entry->vdev == vdev) { -+ list_del(&entry->list); -+ kfree(entry); -+ return ; -+ } -+ BUG(); -+} diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0018-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0018-Makefile.patch deleted file mode 100644 index fc8308d..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0018-Makefile.patch +++ /dev/null @@ -1,4 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/drivers/vdummyback/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/drivers/vdummyback/Makefile 2026-03-13 13:24:35.605183303 +0100 -@@ -0,0 +1 @@ -+obj-y := vdummy.o diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0019-vdummy.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0019-vdummy.c.patch deleted file mode 100644 index 4ee36d7..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0019-vdummy.c.patch +++ /dev/null @@ -1,186 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/drivers/vdummyback/vdummy.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/drivers/vdummyback/vdummy.c 2026-03-13 13:24:35.605155010 +0100 -@@ -0,0 +1,183 @@ -+/* -+ * Copyright (C) 2016-2018 Daniel Rossier -+ * Copyright (C) 2016 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#if 0 -+#define DEBUG -+#endif -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include -+ -+#include -+ -+typedef struct { -+ -+ /* Must be the first field */ -+ vdummy_t vdummy; -+ -+ /* Reference to the ring */ -+ grant_ref_t ring_ref; -+ -+} vdummy_priv_t; -+ -+static struct vbus_device *vdummy_dev = NULL; -+ -+static irqreturn_t vdummy_interrupt(int irq, void *dev_id) -+{ -+ struct vbus_device *vdev = (struct vbus_device *) dev_id; -+ vdummy_priv_t *vdummy_priv = dev_get_drvdata(&vdev->dev); -+ vdummy_request_t *ring_req; -+ vdummy_response_t *ring_rsp; -+ -+ DBG("%d\n", vdev->otherend_id); -+ -+ while ((ring_req = vdummy_get_ring_request(&vdummy_priv->vdummy.ring)) != NULL) { -+ -+ ring_rsp = vdummy_new_ring_response(&vdummy_priv->vdummy.ring); -+ -+ memcpy(ring_rsp->buffer, ring_req->buffer, VDUMMY_PACKET_SIZE); -+ -+ vdummy_ring_response_ready(&vdummy_priv->vdummy.ring); -+ -+ notify_remote_via_virq(vdummy_priv->vdummy.irq); -+ } -+ -+ return IRQ_HANDLED; -+} -+ -+static void vdummy_probe(struct vbus_device *vdev) { -+ vdummy_priv_t *vdummy_priv; -+ -+ vdummy_priv = kzalloc(sizeof(vdummy_priv_t), GFP_ATOMIC); -+ BUG_ON(!vdummy_priv); -+ -+ dev_set_drvdata(&vdev->dev, vdummy_priv); -+ -+ vdummy_dev = vdev; -+ -+ DBG(VDUMMY_PREFIX "Backend probe: %d\n", vdev->otherend_id); -+} -+ -+static void vdummy_remove(struct vbus_device *vdev) { -+ vdummy_priv_t *vdummy_priv = dev_get_drvdata(&vdev->dev); -+ -+ DBG("%s: freeing the vdummy structure for %s\n", __func__,vdev->nodename); -+ kfree(vdummy_priv); -+} -+ -+ -+static void vdummy_close(struct vbus_device *vdev) { -+ vdummy_priv_t *vdummy_priv = dev_get_drvdata(&vdev->dev); -+ -+ DBG(VDUMMY_PREFIX "Backend close: %d\n", vdev->otherend_id); -+ -+ /* -+ * Free the ring and unbind evtchn. -+ */ -+ -+ BACK_RING_INIT(&vdummy_priv->vdummy.ring, (&vdummy_priv->vdummy.ring)->sring, PAGE_SIZE); -+ unbind_from_virqhandler(vdummy_priv->vdummy.irq, vdev); -+ -+ gnttab_unmap(vdummy_priv->vdummy.ring.sring); -+ -+ vdummy_priv->vdummy.ring.sring = NULL; -+} -+ -+static void vdummy_suspend(struct vbus_device *vdev) { -+ -+ DBG(VDUMMY_PREFIX "Backend suspend: %d\n", vdev->otherend_id); -+} -+ -+static void vdummy_resume(struct vbus_device *vdev) { -+ -+ DBG(VDUMMY_PREFIX "Backend resume: %d\n", vdev->otherend_id); -+} -+ -+static void vdummy_reconfigured(struct vbus_device *vdev) { -+ unsigned int evtchn; -+ vdummy_sring_t *sring; -+ vdummy_priv_t *vdummy_priv = dev_get_drvdata(&vdev->dev); -+ -+ DBG(VDUMMY_PREFIX "Backend reconfigured: %d\n", vdev->otherend_id); -+ -+ /* -+ * Set up a ring (shared page & event channel) between the agency and the ME. -+ */ -+ -+ vbus_gather(VBT_NIL, vdev->otherend, "ring-ref", "%lu", &vdummy_priv->ring_ref, "ring-evtchn", "%u", &evtchn, NULL); -+ -+ DBG("BE: ring-ref=%u, event-channel=%u\n", vdummy_priv->ring_ref, evtchn); -+ -+ gnttab_map(vdev->otherend_id, vdummy_priv->ring_ref, (void **) &sring); -+ -+ BACK_RING_INIT(&vdummy_priv->vdummy.ring, sring, PAGE_SIZE); -+ -+ vdummy_priv->vdummy.irq = bind_interdomain_evtchn_to_virqhandler(vdev->otherend_id, evtchn, vdummy_interrupt, NULL, 0, VDUMMY_NAME "-backend", vdev); -+} -+ -+static void vdummy_connected(struct vbus_device *vdev) { -+ -+ DBG(VDUMMY_PREFIX "Backend connected: %d\n",vdev->otherend_id); -+} -+ -+ -+static vdrvback_t vdummydrv = { -+ .probe = vdummy_probe, -+ .remove = vdummy_remove, -+ .close = vdummy_close, -+ .connected = vdummy_connected, -+ .reconfigured = vdummy_reconfigured, -+ .resume = vdummy_resume, -+ .suspend = vdummy_suspend -+}; -+ -+static int vdummy_init(void) { -+ struct device_node *np; -+ -+ np = of_find_compatible_node(NULL, NULL, "vdummy,backend"); -+ -+ /* Check if DTS has vuihandler enabled */ -+ if (!of_device_is_available(np)) -+ return 0; -+ -+#if 0 -+ kthread_run(generator_fn, NULL, "vdummy-gen"); -+#endif -+ -+ vdevback_init(VDUMMY_NAME, &vdummydrv); -+ -+ return 0; -+} -+ -+device_initcall(vdummy_init); diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0020-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0020-Makefile.patch deleted file mode 100644 index 8aac44b..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0020-Makefile.patch +++ /dev/null @@ -1,5 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/drivers/vlogsback/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/drivers/vlogsback/Makefile 2026-03-13 13:24:35.605328217 +0100 -@@ -0,0 +1,2 @@ -+obj-y := vlogs.o -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0021-vlogs.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0021-vlogs.c.patch deleted file mode 100644 index e3c231d..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0021-vlogs.c.patch +++ /dev/null @@ -1,201 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/drivers/vlogsback/vlogs.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/drivers/vlogsback/vlogs.c 2026-03-13 13:24:35.605346196 +0100 -@@ -0,0 +1,198 @@ -+/* -+ * Copyright (C) 2025 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#if 0 -+#define DEBUG -+#endif -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include -+ -+typedef struct { -+ /* Must be the first field */ -+ vlogs_t vlogs; -+ -+ /* Reference to the ring */ -+ grant_ref_t ring_ref; -+ -+} vlogs_priv_t; -+ -+ -+ -+static void process_request(struct vbus_device *vdev) -+{ -+ vlogs_priv_t *vlogs_priv = dev_get_drvdata(&vdev->dev); -+ vlogs_request_t *ring_req; -+ -+ vdevback_processing_begin(vdev); -+ -+ while ((ring_req = vlogs_get_ring_request(&vlogs_priv->vlogs.ring)) != NULL) { -+ printk("%s", ring_req->msg); -+ } -+ -+ vdevback_processing_end(vdev); -+} -+ -+ -+ -+static irqreturn_t vlogs_interrupt_bh(int irq, void *dev_id) -+{ -+ struct vbus_device *vdev = (struct vbus_device *)dev_id; -+ -+ process_request(vdev); -+ -+ return IRQ_HANDLED; -+} -+ -+ -+static irqreturn_t vlogs_interrupt(int irq, void *dev_id) -+{ -+ /* All processing in the bottom half */ -+ -+ return IRQ_WAKE_THREAD; -+} -+ -+static void vlogs_probe(struct vbus_device *vdev) -+{ -+ vlogs_priv_t *vlogs_priv; -+ -+ vlogs_priv = kzalloc(sizeof(vlogs_priv_t), GFP_ATOMIC); -+ BUG_ON(!vlogs_priv); -+ -+ spin_lock_init(&vlogs_priv->vlogs.ring_lock); -+ -+ dev_set_drvdata(&vdev->dev, vlogs_priv); -+ -+ DBG(VLOGS_PREFIX " Backend probe: %d\n", vdev->otherend_id); -+} -+ -+ -+static void vlogs_remove(struct vbus_device *vdev) -+{ -+ vlogs_priv_t *vlogs_priv = dev_get_drvdata(&vdev->dev); -+ -+ DBG("%s: freeing the vlogs structure for %s\n", __func__, vdev->nodename); -+ kfree(vlogs_priv); -+} -+ -+static void vlogs_close(struct vbus_device *vdev) -+{ -+ vlogs_priv_t *vlogs_priv = dev_get_drvdata(&vdev->dev); -+ -+ DBG(VLOGS_PREFIX " Backend close: %d\n", vdev->otherend_id); -+ -+ /* -+ * Free the ring and unbind evtchn. -+ */ -+ -+ BACK_RING_INIT(&vlogs_priv->vlogs.ring, vlogs_priv->vlogs.ring.sring, PAGE_SIZE); -+ unbind_from_virqhandler(vlogs_priv->vlogs.irq, vdev); -+ -+ gnttab_unmap(vlogs_priv->vlogs.ring.sring); -+ -+ vlogs_priv->vlogs.ring.sring = NULL; -+} -+ -+ -+static void vlogs_suspend(struct vbus_device *vdev) -+{ -+ DBG(VLOGS_PREFIX " Backend suspend: %d\n", vdev->otherend_id); -+} -+ -+static void vlogs_resume(struct vbus_device *vdev) -+{ -+ DBG(VLOGS_PREFIX " Backend resume: %d\n", vdev->otherend_id); -+} -+ -+ -+static void vlogs_reconfigured(struct vbus_device *vdev) -+{ -+ unsigned int evtchn; -+ vlogs_sring_t *sring; -+ vlogs_priv_t *vlogs_priv = dev_get_drvdata(&vdev->dev); -+ -+ DBG(VLOGS_PREFIX "Backend reconfigured: %d\n", vdev->otherend_id); -+ -+ /* -+ * Set up a ring (shared page & event channel) between the agency and the ME. -+ */ -+ -+ vbus_gather(VBT_NIL, vdev->otherend, "ring-ref", "%lu", -+ &vlogs_priv->ring_ref, "ring-evtchn", "%u", &evtchn, NULL); -+ -+ DBG("BE: ring-ref=%lu, event-channel=%u\n", ring_ref, evtchn); -+ -+ gnttab_map(vdev->otherend_id, vlogs_priv->ring_ref, (void **)&sring); -+ -+ BACK_RING_INIT(&vlogs_priv->vlogs.ring, sring, PAGE_SIZE); -+ -+ vlogs_priv->vlogs.irq = bind_interdomain_evtchn_to_virqhandler( -+ vdev->otherend_id, evtchn, vlogs_interrupt, vlogs_interrupt_bh, -+ 0, VLOGS_NAME "-backend", vdev); -+} -+ -+ -+static void vlogs_connected(struct vbus_device *vdev) -+{ -+ DBG(VLOGS_PREFIX "Backend connected: %d\n", vdev->otherend_id); -+ -+ process_request(vdev); -+} -+ -+static vdrvback_t vlogsdrv = { -+ .probe = vlogs_probe, -+ .remove = vlogs_remove, -+ .close = vlogs_close, -+ .connected = vlogs_connected, -+ .reconfigured = vlogs_reconfigured, -+ .resume = vlogs_resume, -+ .suspend = vlogs_suspend -+}; -+ -+static int vlogs_init(void) -+{ -+ struct device_node *np; -+ -+ np = of_find_compatible_node(NULL, NULL, "vlogs,backend"); -+ -+ /* Check if DTS has vlogs enabled */ -+ if (!of_device_is_available(np)) -+ return 0; -+ -+ vdevback_init(VLOGS_NAME, &vlogsdrv); -+ -+ return 0; -+} -+ -+device_initcall(vlogs_init); -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0022-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0022-Makefile.patch deleted file mode 100644 index fc149a9..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0022-Makefile.patch +++ /dev/null @@ -1,5 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/drivers/vsensejback/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/drivers/vsensejback/Makefile 2026-03-13 13:24:35.605061497 +0100 -@@ -0,0 +1,2 @@ -+obj-y := vsensej.o rpisense-joystick.o -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0023-rpisense-joystick.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0023-rpisense-joystick.c.patch deleted file mode 100644 index b928843..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0023-rpisense-joystick.c.patch +++ /dev/null @@ -1,166 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/drivers/vsensejback/rpisense-joystick.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/drivers/vsensejback/rpisense-joystick.c 2026-03-13 13:24:35.605041516 +0100 -@@ -0,0 +1,163 @@ -+/* -+ * Copyright (C) 2021 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include -+#include -+#include -+ -+#include -+ -+#include "rpisense-joystick.h" -+ -+static joystick_handler_t __joystick_handler = NULL; -+static struct vbus_device *__vdev; -+ -+#ifdef CONFIG_ARCH_VEXPRESS -+ -+#include -+ -+/* -+ * A joystick command simulation is performed via sysfs. -+ * The joystick position is given by a number between 0 and 4 as follows: -+ * - 0 for center -+ * - 1 for right -+ * - 2 for down -+ * - 3 for left -+ * - 4 for up -+ */ -+void sysfs_sensej_store(char *str) { -+ int key; -+ -+ switch (str[0]) { -+ case '0': -+ key = RPISENSE_JS_CENTER; -+ break; -+ case '1': -+ key = RPISENSE_JS_RIGHT; -+ break; -+ case '2': -+ key = RPISENSE_JS_DOWN; -+ break; -+ case '3': -+ key = RPISENSE_JS_LEFT; -+ break; -+ case '4': -+ key = RPISENSE_JS_UP; -+ break; -+ } -+ -+ __joystick_handler(__vdev, key); -+} -+ -+void rpisense_joystick_handler_register(struct vbus_device *vdev, joystick_handler_t joystick_handler) { -+ -+ __joystick_handler = joystick_handler; -+ __vdev = vdev; -+ -+} -+ -+void rpisense_joystick_handler_unregister(struct vbus_device *vdev) { -+ __joystick_handler = NULL; -+ __vdev = NULL; -+} -+EXPORT_SYMBOL(rpisense_joystick_handler_unregister); -+ -+#else -+ -+#include -+ -+#include -+ -+#include -+ -+static struct rpisense *rpisense = NULL; -+ -+static irqreturn_t keys_irq_handler_bh(int irq, void *pdev) { -+ int key; -+ -+ key = i2c_smbus_read_byte_data(rpisense->i2c_client, RPISENSE_JS_ADDR); -+ -+ if (__joystick_handler) -+ __joystick_handler((struct vbus_device *) pdev, key); -+ -+ return IRQ_HANDLED; -+} -+ -+static irqreturn_t keys_irq_handler(int irq, void *pdev) -+{ -+ /* -+ * Nothing to do in the top half. Access to i2c requires -+ * the scheduler to be not in an atomic context. -+ */ -+ -+ return IRQ_WAKE_THREAD; -+} -+ -+void rpisense_joystick_handler_register(struct vbus_device *vdev, joystick_handler_t joystick_handler) { -+ int ret; -+ -+ __joystick_handler = joystick_handler; -+ __vdev = vdev; -+ -+ ret = request_threaded_irq(rpisense->joystick.keys_irq, -+ keys_irq_handler, keys_irq_handler_bh, IRQF_TRIGGER_RISING, -+ "keys", __vdev); -+ if (ret) { -+ lprintk("IRQ request failed ret = %d.\n", ret); -+ BUG(); -+ } -+} -+ -+void rpisense_joystick_handler_unregister(struct vbus_device *vdev) { -+ __joystick_handler = NULL; -+ __vdev = NULL; -+ -+ free_irq(rpisense->joystick.keys_irq, vdev); -+} -+EXPORT_SYMBOL(rpisense_joystick_handler_unregister); -+ -+#endif /* !CONFIG_ARCH_VEXPRESS */ -+ -+EXPORT_SYMBOL(rpisense_joystick_handler_register); -+ -+void sensej_init(void) { -+ -+#ifdef CONFIG_ARCH_VEXPRESS -+ -+ soo_sysfs_register(vsensej_js, NULL, sysfs_sensej_store); -+ -+#else -+ int ret; -+ -+ rpisense = rpisense_get_dev(); -+ ret = gpiod_direction_input(rpisense->joystick.keys_desc); -+ if (ret) { -+ printk("Could not set keys-int direction.\n"); -+ BUG(); -+ } -+ -+ rpisense->joystick.keys_irq = gpiod_to_irq(rpisense->joystick.keys_desc); -+ if (rpisense->joystick.keys_irq < 0) { -+ printk("Could not determine keys-int IRQ.\n"); -+ BUG(); -+ } -+ -+#endif /* !CONFIG_ARCH_VEXPRESS */ -+ -+} -+EXPORT_SYMBOL(sensej_init); diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0024-rpisense-joystick.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0024-rpisense-joystick.h.patch deleted file mode 100644 index 4761785..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0024-rpisense-joystick.h.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/drivers/vsensejback/rpisense-joystick.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/drivers/vsensejback/rpisense-joystick.h 2026-03-13 13:24:35.605076147 +0100 -@@ -0,0 +1,40 @@ -+/* -+ * Copyright (C) 2021 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef RPISENSE_JOYSTICK_H -+#define RPISENSE_JOYSTICK_H -+ -+#include -+ -+#include -+ -+typedef void(*joystick_handler_t)(struct vbus_device *vdev, int key); -+ -+#define RPISENSE_JS_UP 0x04 -+#define RPISENSE_JS_DOWN 0x01 -+#define RPISENSE_JS_RIGHT 0x02 -+#define RPISENSE_JS_LEFT 0x10 -+#define RPISENSE_JS_CENTER 0x08 -+ -+#define RPISENSE_JS_ADDR 0xF2 -+ -+void sensej_init(void); -+void rpisense_joystick_handler_register(struct vbus_device *vdev, joystick_handler_t joystick_handler); -+void rpisense_joystick_handler_unregister(struct vbus_device *vdev); -+ -+#endif /* RPISENSE_JOYSTICK_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0025-vsensej.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0025-vsensej.c.patch deleted file mode 100644 index a9357d7..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0025-vsensej.c.patch +++ /dev/null @@ -1,219 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/drivers/vsensejback/vsensej.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/drivers/vsensejback/vsensej.c 2026-03-13 13:24:35.605091471 +0100 -@@ -0,0 +1,216 @@ -+/* -+ * Copyright (C) 2021 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#if 0 -+#define DEBUG -+#endif -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include -+ -+#include -+ -+#include "rpisense-joystick.h" -+ -+typedef struct { -+ -+ /* Must be the first field */ -+ vsensej_t vsensej; -+ -+} vsensej_priv_t; -+ -+static struct vbus_device *vsensej_dev = NULL; -+ -+void j_handler(struct vbus_device *vdev, int key) { -+ vsensej_priv_t *vsensej_priv = dev_get_drvdata(&vdev->dev); -+ vsensej_response_t *vsensej_response; -+ -+ if (vdevfront_is_connected(vdev)) { -+ -+ vdevback_processing_begin(vdev); -+ -+ vsensej_response = vsensej_new_ring_response(&vsensej_priv->vsensej.ring); -+ -+ vsensej_response->type = EV_KEY; -+ -+ switch (key) { -+ -+ case RPISENSE_JS_UP: -+ vsensej_response->code = KEY_UP; -+ break; -+ -+ case RPISENSE_JS_DOWN: -+ vsensej_response->code = KEY_DOWN; -+ break; -+ -+ case RPISENSE_JS_RIGHT: -+ vsensej_response->code = KEY_RIGHT; -+ break; -+ -+ case RPISENSE_JS_LEFT: -+ vsensej_response->code = KEY_LEFT; -+ break; -+ -+ case RPISENSE_JS_CENTER: -+ vsensej_response->code = KEY_ENTER; -+ break; -+ } -+ -+ vsensej_response->value = ((key == 0) ? 0 : 1); -+ -+ vsensej_ring_response_ready(&vsensej_priv->vsensej.ring); -+ -+ notify_remote_via_virq(vsensej_priv->vsensej.irq); -+ -+ vdevback_processing_end(vdev); -+ } -+} -+ -+void vsensej_probe(struct vbus_device *vdev) { -+ vsensej_priv_t *vsensej_priv; -+ static bool rpisense = false; -+ -+ vsensej_priv = kzalloc(sizeof(vsensej_priv_t), GFP_ATOMIC); -+ BUG_ON(!vsensej_priv); -+ -+ dev_set_drvdata(&vdev->dev, vsensej_priv); -+ -+ vsensej_dev = vdev; -+ -+ if (!rpisense) { -+ /* Initialize the RPi Sense HAT peripheral */ -+ sensej_init(); -+ -+ rpisense = true; -+ } -+ -+ rpisense_joystick_handler_register(vdev, j_handler); -+ -+ DBG(VSENSEJ_PREFIX "Backend probe: %d\n", vdev->otherend_id); -+} -+ -+void vsensej_remove(struct vbus_device *vdev) { -+ vsensej_priv_t *vsensej_priv = dev_get_drvdata(&vdev->dev); -+ -+ DBG("%s: freeing the vsensej structure for %s\n", __func__,vdev->nodename); -+ kfree(vsensej_priv); -+ -+ rpisense_joystick_handler_unregister(vdev); -+} -+ -+void vsensej_close(struct vbus_device *vdev) { -+ vsensej_priv_t *vsensej_priv = dev_get_drvdata(&vdev->dev); -+ -+ DBG(VSENSEJ_PREFIX "Backend close: %d\n", vdev->otherend_id); -+ -+ /* -+ * Free the ring. -+ */ -+ -+ BACK_RING_INIT(&vsensej_priv->vsensej.ring, (&vsensej_priv->vsensej.ring)->sring, PAGE_SIZE); -+ -+ /* Unbind the irq */ -+ unbind_from_virqhandler(vsensej_priv->vsensej.irq, vdev); -+ -+ vbus_unmap_ring_vfree(vdev, vsensej_priv->vsensej.ring.sring); -+ vsensej_priv->vsensej.ring.sring = NULL; -+} -+ -+void vsensej_suspend(struct vbus_device *vdev) { -+ -+ DBG(VSENSEJ_PREFIX "Backend suspend: %d\n", vdev->otherend_id); -+} -+ -+void vsensej_resume(struct vbus_device *vdev) { -+ -+ DBG(VSENSEJ_PREFIX "Backend resume: %d\n", vdev->otherend_id); -+} -+ -+void vsensej_reconfigured(struct vbus_device *vdev) { -+ unsigned long ring_ref; -+ unsigned int evtchn; -+ vsensej_sring_t *sring; -+ vsensej_priv_t *vsensej_priv = dev_get_drvdata(&vdev->dev); -+ -+ DBG(VSENSEJ_PREFIX "Backend reconfigured: %d\n", vdev->otherend_id); -+ -+ /* -+ * Set up a ring (shared page & event channel) between the agency and the ME. -+ */ -+ -+ vbus_gather(VBT_NIL, vdev->otherend, "ring-ref", "%lu", &ring_ref, "ring-evtchn", "%u", &evtchn, NULL); -+ -+ DBG("BE: ring-ref=%ld, event-channel=%d\n", ring_ref, evtchn); -+ -+ vbus_map_ring_valloc(vdev, ring_ref, (void **) &sring); -+ -+ BACK_RING_INIT(&vsensej_priv->vsensej.ring, sring, PAGE_SIZE); -+ -+ /* No handler required, however used to notify the remote domain */ -+ -+ vsensej_priv->vsensej.irq = bind_interdomain_evtchn_to_virqhandler(vdev->otherend_id, evtchn, NULL, NULL, 0, VSENSEJ_NAME "-backend", vdev); -+} -+ -+void vsensej_connected(struct vbus_device *vdev) { -+ -+ DBG(VSENSEJ_PREFIX "Backend connected: %d\n",vdev->otherend_id); -+} -+ -+ -+vdrvback_t vsensejdrv = { -+ .probe = vsensej_probe, -+ .remove = vsensej_remove, -+ .close = vsensej_close, -+ .connected = vsensej_connected, -+ .reconfigured = vsensej_reconfigured, -+ .resume = vsensej_resume, -+ .suspend = vsensej_suspend -+}; -+ -+int vsensej_init(void) { -+ struct device_node *np; -+ -+ np = of_find_compatible_node(NULL, NULL, "vsensej,backend"); -+ -+ /* Check if DTS has vuihandler enabled */ -+ if (!of_device_is_available(np)) -+ return 0; -+ -+ vdevback_init(VSENSEJ_NAME, &vsensejdrv); -+ -+ return 0; -+} -+ -+device_initcall(vsensej_init); diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0026-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0026-Makefile.patch deleted file mode 100644 index 575e395..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0026-Makefile.patch +++ /dev/null @@ -1,5 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/drivers/vsenseledback/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/drivers/vsenseledback/Makefile 2026-03-13 13:24:35.605215605 +0100 -@@ -0,0 +1,2 @@ -+obj-y := vsenseled.o rpisense-led.o -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0027-rpisense-led.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0027-rpisense-led.c.patch deleted file mode 100644 index 9876d24..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0027-rpisense-led.c.patch +++ /dev/null @@ -1,189 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/drivers/vsenseledback/rpisense-led.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/drivers/vsenseledback/rpisense-led.c 2026-03-13 13:24:35.605234942 +0100 -@@ -0,0 +1,186 @@ -+/* -+ * Copyright (C) 2021 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include -+#include -+#include -+ -+#include -+ -+#include -+ -+#include -+ -+#include "rpisense-led.h" -+ -+#if defined(CONFIG_ARCH_VEXPRESS) || defined(CONFIG_ARCH_VIRT64) -+ -+bool leds[5]; /* 5 LEDs state */ -+ -+#else -+ -+static struct rpisense *rpisense = NULL; -+ -+uint8_t leds_array[SIZE_FB]; -+ -+unsigned char matrix[SIZE_FB]; -+ -+extern struct rpisense *rpisense_get_dev(void); -+ -+/* 5-bit per colour */ -+#define RED { 0x00, 0xf8 } -+#define GREEN { 0xe0, 0x07 } -+#define BLUE { 0x1f, 0x00 } -+#define GRAY { 0xef, 0x3d } -+ -+#define WHITE { 0xff, 0xff } -+#define BLACK { 0x00, 0x00 } -+ -+unsigned char ledsoff[][2] = { -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+}; -+ -+unsigned char leds[][64][2] = { -+ { -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLUE, BLUE, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLUE, BLUE, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ }, -+ { -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, WHITE, WHITE, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, WHITE, WHITE, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ }, -+ { -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, GREEN, GREEN, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, GREEN, GREEN, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ }, -+ { -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, GRAY, GRAY, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, GRAY, GRAY, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ }, -+ { -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, RED, RED, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, RED, RED, BLACK, BLACK, BLACK, -+ BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, BLACK, -+ } -+}; -+ -+/* In drivers/video/fbdev/rpisense-fb.c */ -+void update_rpisense_fb_mem(uint8_t *matrix); -+ -+#endif /* !CONFIG_ARCH_VEXPRESS/VIRT64 */ -+ -+#if defined(CONFIG_ARCH_VEXPRESS) || defined(CONFIG_ARCH_VIRT64) -+ -+void display_led(int led_nr, bool on) { -+ leds[led_nr] = on; -+ -+ soo_log("[soo:backend:vsenseled] Setting LED %d to %s.\n", led_nr, (on ? "ON" : "OFF")); -+} -+ -+#else -+ -+void display_led(int led_nr, bool on) { -+ int i, j; -+ u16 *mem = (u16 *) leds[led_nr]; -+ -+ switch (on) { -+ case true: -+ for (j = 0; j < 8; j++) { -+ for (i = 0; i < 8; i++) { -+ matrix[(j * 24) + i + 1] |= (mem[(j * 8) + i] >> 11) & 0x1F; -+ matrix[(j * 24) + (i + 8) + 1] |= (mem[(j * 8) + i] >> 6) & 0x1F; -+ matrix[(j * 24) + (i + 16) + 1] |= mem[(j * 8) + i] & 0x1F; -+ } -+ } -+ break; -+ -+ -+ case false: -+ for (j = 0; j < 8; j++) { -+ for (i = 0; i < 8; i++) { -+ matrix[(j * 24) + i + 1] &= ~((mem[(j * 8) + i] >> 11) & 0x1F); -+ matrix[(j * 24) + (i + 8) + 1] &= ~((mem[(j * 8) + i] >> 6) & 0x1F); -+ matrix[(j * 24) + (i + 16) + 1] &= ~(mem[(j * 8) + i] & 0x1F); -+ } -+ } -+ } -+ -+ update_rpisense_fb_mem(matrix); -+ -+ i2c_master_send(rpisense->i2c_client, matrix, SIZE_FB); -+} -+ -+#endif /* !CONFIG_ARCH_VEXPRESS/VIRT64 */ -+ -+EXPORT_SYMBOL(display_led); -+ -+void senseled_init(void) { -+ int i; -+ -+#if defined(CONFIG_ARCH_VEXPRESS) || defined(CONFIG_ARCH_VIRT64) -+ -+ for (i = 0; i < 5; i++) -+ leds[i] = false; -+ -+#else -+ -+ for (i = 0; i < SIZE_FB; i++) -+ matrix[i] = 0; -+ -+ rpisense = rpisense_get_dev(); -+ -+#endif /* !CONFIG_ARCH_VEXPRESS */ -+ -+} -+EXPORT_SYMBOL(senseled_init); diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0028-rpisense-led.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0028-rpisense-led.h.patch deleted file mode 100644 index 0ed23d5..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0028-rpisense-led.h.patch +++ /dev/null @@ -1,36 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/drivers/vsenseledback/rpisense-led.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/drivers/vsenseledback/rpisense-led.h 2026-03-13 13:24:35.605250970 +0100 -@@ -0,0 +1,33 @@ -+/* -+ * Copyright (C) 2021 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+ -+#ifndef RPISENSE_LED_H -+#define RPISENSE_LED_H -+ -+/* 8 (row) * 8 (column) * 3 (colors) + 1 (first byte needed blank) */ -+#define SIZE_FB 193 -+ -+/* LED address on the I2C bus */ -+#define LED_ADDR 0x46 -+ -+ -+void senseled_init(void); -+void display_led(int led_nr, bool on); -+ -+#endif /* RPISENSE_LED_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0029-vsenseled.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0029-vsenseled.c.patch deleted file mode 100644 index 13bde01..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0029-vsenseled.c.patch +++ /dev/null @@ -1,189 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/drivers/vsenseledback/vsenseled.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/drivers/vsenseledback/vsenseled.c 2026-03-13 13:24:35.605273330 +0100 -@@ -0,0 +1,186 @@ -+/* -+ * Copyright (C) 2021 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#if 0 -+#define DEBUG -+#endif -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include -+ -+#include -+ -+#include "rpisense-led.h" -+ -+typedef struct { -+ -+ /* Must be the first field */ -+ vsenseled_t vsenseled; -+ -+} vsenseled_priv_t; -+ -+static struct vbus_device *vsenseled_dev = NULL; -+ -+ -+irqreturn_t vsenseled_interrupt_bh(int irq, void *dev_id) -+{ -+ struct vbus_device *vdev = (struct vbus_device *) dev_id; -+ vsenseled_priv_t *vsenseled_priv = dev_get_drvdata(&vdev->dev); -+ vsenseled_request_t *ring_req; -+ -+ vdevback_processing_begin(vdev); -+ -+ while ((ring_req = vsenseled_get_ring_request(&vsenseled_priv->vsenseled.ring)) != NULL) -+ display_led(ring_req->lednr, ring_req->ledstate); -+ -+ vdevback_processing_end(vdev); -+ -+ return IRQ_HANDLED; -+} -+ -+irqreturn_t vsenseled_interrupt(int irq, void *dev_id) -+{ -+ return IRQ_WAKE_THREAD; -+} -+ -+void vsenseled_probe(struct vbus_device *vdev) { -+ vsenseled_priv_t *vsenseled_priv; -+ static bool rpisense = false; -+ -+ vsenseled_priv = kzalloc(sizeof(vsenseled_priv_t), GFP_ATOMIC); -+ BUG_ON(!vsenseled_priv); -+ -+ dev_set_drvdata(&vdev->dev, vsenseled_priv); -+ -+ vsenseled_dev = vdev; -+ -+ if (!rpisense) { -+ /* Initialize the RPi Sense HAT peripheral */ -+ senseled_init(); -+ -+ rpisense = true; -+ } -+ -+ DBG(VSENSELED_PREFIX "Backend probe: %d\n", vdev->otherend_id); -+} -+ -+void vsenseled_remove(struct vbus_device *vdev) { -+ vsenseled_priv_t *vsenseled_priv = dev_get_drvdata(&vdev->dev); -+ -+ DBG("%s: freeing the vsenseled structure for %s\n", __func__,vdev->nodename); -+ kfree(vsenseled_priv); -+} -+ -+ -+void vsenseled_close(struct vbus_device *vdev) { -+ vsenseled_priv_t *vsenseled_priv = dev_get_drvdata(&vdev->dev); -+ -+ DBG(VSENSELED_PREFIX "Backend close: %d\n", vdev->otherend_id); -+ -+ /* -+ * Free the ring and unbind evtchn. -+ */ -+ -+ BACK_RING_INIT(&vsenseled_priv->vsenseled.ring, (&vsenseled_priv->vsenseled.ring)->sring, PAGE_SIZE); -+ unbind_from_virqhandler(vsenseled_priv->vsenseled.irq, vdev); -+ -+ vbus_unmap_ring_vfree(vdev, vsenseled_priv->vsenseled.ring.sring); -+ vsenseled_priv->vsenseled.ring.sring = NULL; -+} -+ -+void vsenseled_suspend(struct vbus_device *vdev) { -+ -+ DBG(VSENSELED_PREFIX "Backend suspend: %d\n", vdev->otherend_id); -+} -+ -+void vsenseled_resume(struct vbus_device *vdev) { -+ -+ DBG(VSENSELED_PREFIX "Backend resume: %d\n", vdev->otherend_id); -+} -+ -+void vsenseled_reconfigured(struct vbus_device *vdev) { -+ unsigned long ring_ref; -+ unsigned int evtchn; -+ vsenseled_sring_t *sring; -+ vsenseled_priv_t *vsenseled_priv = dev_get_drvdata(&vdev->dev); -+ -+ DBG(VSENSELED_PREFIX "Backend reconfigured: %d\n", vdev->otherend_id); -+ -+ /* -+ * Set up a ring (shared page & event channel) between the agency and the ME. -+ */ -+ -+ vbus_gather(VBT_NIL, vdev->otherend, "ring-ref", "%lu", &ring_ref, "ring-evtchn", "%u", &evtchn, NULL); -+ -+ DBG("BE: ring-ref=%u, event-channel=%u\n", ring_ref, evtchn); -+ -+ vbus_map_ring_valloc(vdev, ring_ref, (void **) &sring); -+ -+ BACK_RING_INIT(&vsenseled_priv->vsenseled.ring, sring, PAGE_SIZE); -+ -+ vsenseled_priv->vsenseled.irq = bind_interdomain_evtchn_to_virqhandler(vdev->otherend_id, evtchn, vsenseled_interrupt, vsenseled_interrupt_bh, -+ 0, VSENSELED_NAME "-backend", vdev); -+} -+ -+void vsenseled_connected(struct vbus_device *vdev) { -+ -+ DBG(VSENSELED_PREFIX "Backend connected: %d\n",vdev->otherend_id); -+} -+ -+ -+vdrvback_t vsenseleddrv = { -+ .probe = vsenseled_probe, -+ .remove = vsenseled_remove, -+ .close = vsenseled_close, -+ .connected = vsenseled_connected, -+ .reconfigured = vsenseled_reconfigured, -+ .resume = vsenseled_resume, -+ .suspend = vsenseled_suspend -+}; -+ -+int vsenseled_init(void) { -+ struct device_node *np; -+ -+ np = of_find_compatible_node(NULL, NULL, "vsenseled,backend"); -+ -+ /* Check if DTS has vuihandler enabled */ -+ if (!of_device_is_available(np)) -+ return 0; -+ -+ vdevback_init(VSENSELED_NAME, &vsenseleddrv); -+ -+ return 0; -+} -+ -+device_initcall(vsenseled_init); diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0030-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0030-Makefile.patch deleted file mode 100644 index d291236..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0030-Makefile.patch +++ /dev/null @@ -1,5 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/drivers/vuartback/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/drivers/vuartback/Makefile 2026-03-13 13:24:35.605009191 +0100 -@@ -0,0 +1,2 @@ -+obj-y := vuart.o -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0031-vuart.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0031-vuart.c.patch deleted file mode 100644 index 228f277..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0031-vuart.c.patch +++ /dev/null @@ -1,330 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/drivers/vuartback/vuart.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/drivers/vuartback/vuart.c 2026-03-22 19:53:57.190073788 +0100 -@@ -0,0 +1,327 @@ -+/* -+ * Copyright (C) 2016-2018 Daniel Rossier -+ * Copyright (C) 2016 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#if 0 -+#define DEBUG -+#endif -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include -+ -+typedef struct { -+ /* Must be the first field */ -+ vuart_t vuart; -+ -+ /* Reference to the ring */ -+ grant_ref_t ring_ref; -+ -+} vuart_priv_t; -+ -+/* -+ * We maintain a list of vdev_console -+ */ -+struct vdev_console { -+ struct list_head list; -+ struct vbus_device *vdev_console; -+}; -+ -+struct list_head vdev_consoles; -+ -+/** -+ * Output the character to the real console. -+ */ -+static void lprintch(char c) -+{ -+ struct console *con; -+ -+ for_each_console(con) { -+ -+ if (!(con->flags & CON_ENABLED)) -+ continue; -+ if (!con->write) -+ continue; -+ -+ con->write(con, &c, 1); -+ return ; -+ -+ } -+ BUG(); -+} -+ -+/* -+ * Add a new console for a new ME. -+ */ -+static void add_console(struct vbus_device *vdev_console) -+{ -+ struct vdev_console *console; -+ -+ console = kzalloc(sizeof(*console), GFP_ATOMIC); -+ BUG_ON(!console); -+ -+ console->vdev_console = vdev_console; -+ -+ list_add(&console->list, &vdev_consoles); -+} -+ -+/* -+ * Search for a console related to a specific ME according to its domid. -+ */ -+static struct vbus_device *get_console(uint32_t domid) -+{ -+ struct vdev_console *entry; -+ -+ list_for_each_entry(entry, &vdev_consoles, list) -+ if (entry->vdev_console->otherend_id == domid) -+ return entry->vdev_console; -+ return NULL; -+} -+ -+/* -+ * Remove a console attached to a specific ME -+ */ -+static void del_console(struct vbus_device *vdev_console) -+{ -+ struct vdev_console *entry; -+ -+ list_for_each_entry(entry, &vdev_consoles, list) -+ if (entry->vdev_console == vdev_console) { -+ list_del(&entry->list); -+ kfree(entry); -+ return; -+ } -+ BUG(); -+} -+ -+static void process_request(struct vbus_device *vdev) -+{ -+ vuart_priv_t *vuart_priv = dev_get_drvdata(&vdev->dev); -+ vuart_request_t *ring_req; -+ vuart_response_t *ring_rsp; -+ struct winsize wsz; -+ -+ vdevback_processing_begin(vdev); -+ -+ while ((ring_req = vuart_get_ring_request(&vuart_priv->vuart.ring)) != -+ NULL) { -+ if (ring_req->c == SERIAL_GWINSZ) { -+ /* Process the window size info */ -+ -+ /* At the moment, we hardcode these values */ -+ wsz.ws_col = 80; -+ wsz.ws_row = 25; -+ -+ ring_rsp = vuart_new_ring_response( -+ &vuart_priv->vuart.ring); -+ ring_rsp->c = wsz.ws_row; -+ ring_rsp = vuart_new_ring_response( -+ &vuart_priv->vuart.ring); -+ ring_rsp->c = wsz.ws_col; -+ vuart_ring_response_ready(&vuart_priv->vuart.ring); -+ -+ notify_remote_via_virq(vuart_priv->vuart.irq); -+ -+ } else -+ lprintch(ring_req->c); -+ } -+ -+ vdevback_processing_end(vdev); -+} -+ -+static irqreturn_t vuart_interrupt_bh(int irq, void *dev_id) -+{ -+ struct vbus_device *vdev = (struct vbus_device *)dev_id; -+ -+ process_request(vdev); -+ -+ return IRQ_HANDLED; -+} -+ -+static irqreturn_t vuart_interrupt(int irq, void *dev_id) -+{ -+ /* All processing in the bottom half */ -+ -+ return IRQ_WAKE_THREAD; -+} -+ -+/** -+ * This function is called in interrupt context. -+ * - If the state is Connected, the character can directly be pushed in the ring. -+ * - If the state is not Connected, the character is pushed into a circular buffer that -+ * will be flushed at the next call to the Connected callback. -+ */ -+void me_cons_sendc(domid_t domid, uint8_t ch) -+{ -+ struct vbus_device *console; -+ vuart_priv_t *vuart_priv; -+ vuart_response_t *vuart_rsp; -+ -+ console = get_console(domid); -+ -+ if (!vdevfront_is_connected(console)) -+ return; -+ -+ vdevback_processing_begin(console); -+ -+ vuart_priv = dev_get_drvdata(&console->dev); -+ -+ spin_lock(&vuart_priv->vuart.ring_lock); -+ vuart_rsp = vuart_new_ring_response(&vuart_priv->vuart.ring); -+ -+ vuart_rsp->c = ch; -+ -+ spin_unlock(&vuart_priv->vuart.ring_lock); -+ -+ vuart_ring_response_ready(&vuart_priv->vuart.ring); -+ -+ if (console->state == VbusStateConnected) -+ notify_remote_via_virq(vuart_priv->vuart.irq); -+ -+ vdevback_processing_end(console); -+} -+ -+static void vuart_probe(struct vbus_device *vdev) -+{ -+ vuart_priv_t *vuart_priv; -+ -+ vuart_priv = kzalloc(sizeof(vuart_priv_t), GFP_ATOMIC); -+ BUG_ON(!vuart_priv); -+ -+ spin_lock_init(&vuart_priv->vuart.ring_lock); -+ -+ dev_set_drvdata(&vdev->dev, vuart_priv); -+ -+ add_console(vdev); -+ -+ DBG(VUART_PREFIX "Backend probe: %d\n", vdev->otherend_id); -+} -+ -+static void vuart_remove(struct vbus_device *vdev) -+{ -+ vuart_priv_t *vuart_priv = dev_get_drvdata(&vdev->dev); -+ -+ del_console(vdev); -+ -+ DBG("%s: freeing the vuart structure for %s\n", __func__, -+ vdev->nodename); -+ kfree(vuart_priv); -+} -+ -+static void vuart_close(struct vbus_device *vdev) -+{ -+ vuart_priv_t *vuart_priv = dev_get_drvdata(&vdev->dev); -+ -+ DBG("(vuart) Backend close: %d\n", vdev->otherend_id); -+ -+ /* -+ * Free the ring and unbind evtchn. -+ */ -+ -+ BACK_RING_INIT(&vuart_priv->vuart.ring, vuart_priv->vuart.ring.sring, -+ PAGE_SIZE); -+ unbind_from_virqhandler(vuart_priv->vuart.irq, vdev); -+ -+ gnttab_unmap(vuart_priv->vuart.ring.sring); -+ -+ vuart_priv->vuart.ring.sring = NULL; -+} -+ -+static void vuart_suspend(struct vbus_device *vdev) -+{ -+ DBG("(vuart) Backend suspend: %d\n", vdev->otherend_id); -+} -+ -+static void vuart_resume(struct vbus_device *vdev) -+{ -+ DBG("(vuart) Backend resume: %d\n", vdev->otherend_id); -+} -+ -+static void vuart_reconfigured(struct vbus_device *vdev) -+{ -+ unsigned int evtchn; -+ vuart_sring_t *sring; -+ vuart_priv_t *vuart_priv = dev_get_drvdata(&vdev->dev); -+ -+ DBG(VUART_PREFIX "Backend reconfigured: %d\n", vdev->otherend_id); -+ -+ /* -+ * Set up a ring (shared page & event channel) between the agency and the ME. -+ */ -+ -+ vbus_gather(VBT_NIL, vdev->otherend, "ring-ref", "%lu", -+ &vuart_priv->ring_ref, "ring-evtchn", "%u", &evtchn, NULL); -+ -+ DBG("BE: ring-ref=%lu, event-channel=%u\n", ring_ref, evtchn); -+ -+ gnttab_map(vdev->otherend_id, vuart_priv->ring_ref, (void **)&sring); -+ -+ BACK_RING_INIT(&vuart_priv->vuart.ring, sring, PAGE_SIZE); -+ -+ vuart_priv->vuart.irq = bind_interdomain_evtchn_to_virqhandler( -+ vdev->otherend_id, evtchn, vuart_interrupt, vuart_interrupt_bh, -+ 0, VUART_NAME "-backend", vdev); -+} -+ -+static void vuart_connected(struct vbus_device *vdev) -+{ -+ DBG(VUART_PREFIX "Backend connected: %d\n", vdev->otherend_id); -+ -+ process_request(vdev); -+} -+ -+vdrvback_t vuartdrv = { .probe = vuart_probe, -+ .remove = vuart_remove, -+ .close = vuart_close, -+ .connected = vuart_connected, -+ .reconfigured = vuart_reconfigured, -+ .resume = vuart_resume, -+ .suspend = vuart_suspend }; -+ -+static int vuart_init(void) -+{ -+ struct device_node *np; -+ -+ np = of_find_compatible_node(NULL, NULL, "vuart,backend"); -+ -+ /* Check if DTS has vuart enabled */ -+ if (!of_device_is_available(np)) -+ return 0; -+ -+ INIT_LIST_HEAD(&vdev_consoles); -+ -+ vdevback_init(VUART_NAME, &vuartdrv); -+ -+ return 0; -+} -+ -+device_initcall(vuart_init); diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0032-avz.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0032-avz.h.patch deleted file mode 100644 index 18cb657..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0032-avz.h.patch +++ /dev/null @@ -1,307 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/avz/uapi/avz.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/avz/uapi/avz.h 2026-03-13 13:24:35.604235416 +0100 -@@ -0,0 +1,304 @@ -+/* -+ * Copyright (C) 2016-2022 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef UAPI_AVZ_H -+#define UAPI_AVZ_H -+ -+#ifndef __ASSEMBLY__ -+ -+#include -+ -+#endif /* __ASSEMBLY__ */ -+ -+/* -+ * VIRTUAL INTERRUPTS -+ * -+ * Virtual interrupts that a guest OS may receive from the hypervisor. -+ * -+ */ -+#define NR_VIRQS 256 -+ -+#define VIRQ_TIMER 0 /* System timer tick virtualized interrupt */ -+#define VIRQ_TIMER_RT 1 /* Timer tick issued from the oneshot timer (for RT agency and MEs */ -+ -+/**************************************************/ -+ -+/* -+ * Commands to HYPERVISOR_console_io(). -+ */ -+#define CONSOLEIO_write_string 0 -+#define CONSOLEIO_process_char 1 -+ -+/* Idle domain. */ -+#define DOMID_IDLE (0x7FFFU) -+ -+/* DOMID_SELF is used in certain contexts to refer to oneself. */ -+#define DOMID_SELF (0x7FF0U) -+ -+#define MAX_ME_DOMAINS 5 -+ -+/* We include the (non-RT & RT) agency domain */ -+#define MAX_DOMAINS (2 + MAX_ME_DOMAINS) -+ -+/* Agency */ -+#define DOMID_AGENCY 0 -+ -+/* Realtime agency subdomain */ -+#define DOMID_AGENCY_RT 1 -+ -+#define DOMID_INVALID (0x7FF4U) -+ -+#define AVZ_HYPERCALL_TRAP 0x2605 -+#define AVZ_HYPERCALL_SIGRETURN 0x2606 -+ -+#define IPI_EVENT_CHECK 2 -+ -+#ifndef __ASSEMBLY__ -+ -+/* -+ * 128 event channels per domain -+ */ -+#define NR_EVTCHN 128 -+ -+#ifndef DOMID_T -+#define DOMID_T -+typedef uint16_t domid_t; -+typedef unsigned long addr_t; -+#endif -+ -+/* -+ * Generic hypercalls -+ */ -+#define AVZ_EVENT_CHANNEL_OP 1 -+#define AVZ_CONSOLE_IO_OP 2 -+#define AVZ_DOMAIN_CONTROL_OP 3 -+ -+#define CONSOLE_STR_MAX_LEN 128 -+ -+/* Console management */ -+ -+#define CONSOLE_IO_KEYHANDLER 0 -+#define CONSOLE_IO_PRINTCH 1 -+#define CONSOLE_IO_PRINTSTR 2 -+ -+typedef struct { -+ int cmd; -+ union { -+ char c; -+ char str[CONSOLE_STR_MAX_LEN]; -+ } u; -+} console_t; -+ -+/* AVZ_CONSOLE_IO_OP */ -+typedef struct { -+ console_t console; -+} avz_console_io_t; -+ -+#define DOMCTL_pauseME 1 -+#define DOMCTL_unpauseME 2 -+#define DOMCTL_get_AVZ_shared 3 -+ -+struct domctl { -+ uint32_t cmd; -+ domid_t domain; -+ addr_t avz_shared_paddr; -+}; -+typedef struct domctl domctl_t; -+ -+/* Event channel management */ -+ -+#define ECS_FREE 0 /* Channel is available for use. */ -+#define ECS_RESERVED 1 /* Channel is reserved. */ -+#define ECS_UNBOUND 2 /* Channel is waiting to bind to a remote domain. */ -+#define ECS_INTERDOMAIN 3 /* Channel is bound to another domain. */ -+#define ECS_VIRQ 4 /* Channel is bound to a virtual IRQ line. */ -+ -+#define EVTCHNSTAT_closed 0 /* Channel is not in use. */ -+#define EVTCHNSTAT_unbound 1 /* Channel is waiting interdom connection.*/ -+#define EVTCHNSTAT_interdomain 2 /* Channel is connected to remote domain. */ -+#define EVTCHNSTAT_virq 3 /* Channel is bound to a virtual IRQ line */ -+/* -+ * EVTCHNOP_alloc_unbound: Allocate a evtchn in domain and mark as -+ * accepting interdomain bindings from domain . A fresh evtchn -+ * is allocated in and returned as . -+ * NOTES: -+ * 1. If the caller is unprivileged then must be DOMID_SELF. -+ * 2. may be DOMID_SELF, allowing loopback connections. -+ */ -+#define EVTCHNOP_alloc_unbound 6 -+struct evtchn_alloc_unbound { -+ /* IN parameters */ -+ domid_t dom, remote_dom; -+ /* OUT parameters */ -+ uint32_t evtchn; -+ uint32_t use; -+}; -+typedef struct evtchn_alloc_unbound evtchn_alloc_unbound_t; -+ -+/* -+ * EVTCHNOP_bind_interdomain: Construct an interdomain event channel between -+ * the calling domain and . must identify -+ * a evtchn that is unbound and marked as accepting bindings from the calling -+ * domain. A fresh evtchn is allocated in the calling domain and returned as -+ * . -+ * NOTES: -+ * 2. may be DOMID_SELF, allowing loopback connections. -+ */ -+#define EVTCHNOP_bind_interdomain 0 -+#define EVTCHNOP_bind_existing_interdomain 7 -+#define EVTCHNOP_unbind_domain 12 -+ -+struct evtchn_bind_interdomain { -+ /* IN parameters. */ -+ domid_t remote_dom; -+ uint32_t remote_evtchn; -+ uint32_t use; -+ /* OUT parameters. */ -+ uint32_t local_evtchn; -+}; -+typedef struct evtchn_bind_interdomain evtchn_bind_interdomain_t; -+ -+#define EVTCHNOP_bind_virq 1 -+struct evtchn_bind_virq { -+ /* IN parameters. */ -+ uint32_t virq; -+ /* OUT parameters. */ -+ uint32_t evtchn; -+}; -+typedef struct evtchn_bind_virq evtchn_bind_virq_t; -+ -+/* -+ * EVTCHNOP_close: Close a local event channel . If the channel is -+ * interdomain then the remote end is placed in the unbound state -+ * (EVTCHNSTAT_unbound), awaiting a new connection. -+ */ -+#define EVTCHNOP_close 3 -+struct evtchn_close { -+ /* IN parameters. */ -+ uint32_t evtchn; -+}; -+typedef struct evtchn_close evtchn_close_t; -+ -+/* -+ * EVTCHNOP_send: Send an event to the remote end of the channel whose local -+ * endpoint is . -+ */ -+#define EVTCHNOP_send 4 -+struct evtchn_send { -+ /* IN parameters. */ -+ uint32_t evtchn; -+}; -+typedef struct evtchn_send evtchn_send_t; -+ -+struct evtchn_op { -+ uint32_t cmd; /* EVTCHNOP_* */ -+ union { -+ struct evtchn_alloc_unbound alloc_unbound; -+ struct evtchn_bind_interdomain bind_interdomain; -+ struct evtchn_bind_virq bind_virq; -+ struct evtchn_close close; -+ struct evtchn_send send; -+ } u; -+}; -+typedef struct evtchn_op evtchn_op_t; -+ -+ -+/* AVZ_DOMAIN_CONTROL_OP */ -+typedef struct { -+ domctl_t domctl; -+} avz_domctl_t; -+ -+/* AVZ_EVENT_CHANNEL_OP */ -+typedef struct { -+ evtchn_op_t evtchn_op; -+} avz_evtchn_t; -+ -+/* Assembly low-level code to raise up hypercall */ -+extern long __avz_hypercall(int vector, long avz_hyp_args); -+ -+/* Generic function to raise up hypercall */ -+void avz_hypercall(void *avz_hyp); -+ -+/* -+ * TODO: Refactor the following declarations to have cleaner separation -+ * between AVZ and SOO. -+ */ -+#ifndef CONFIG_SOO -+ -+/* -+ * AVZ hypercall argument -+ */ -+typedef struct { -+ int cmd; -+ union { -+ avz_evtchn_t avz_evtchn; -+ avz_console_io_t avz_console_io_args; -+ avz_domctl_t avz_domctl_args; -+ } u; -+} avz_hyp_t; -+ -+/* -+ * Shared info page, shared between AVZ and the domain. -+ */ -+struct avz_shared { -+ domid_t domID; -+ -+ /* Domain related information */ -+ unsigned long nr_pages; /* Total pages allocated to this domain. */ -+ -+ addr_t fdt_paddr; -+ -+ /* Other fields related to domain life */ -+ -+ unsigned long domain_stack; -+ uint8_t evtchn_upcall_pending; -+ -+ /* -+ * A domain can create "event channels" on which it can send and receive -+ * asynchronous event notifications. -+ * Each event channel is assigned a bit in evtchn_pending and its modification has to be -+ * kept atomic. -+ */ -+ -+ volatile bool evtchn_pending[NR_EVTCHN]; -+ -+ atomic_t dc_event; -+ -+ /* This field is used when taking a snapshot of us. It will be -+ * useful to restore later. Some timer deadlines are based on it and -+ * will need to be updated accordingly. -+ */ -+ u64 current_s_time; -+ -+ /* Used to store a signature for consistency checking, for example after a migration/restoration */ -+ char signature[4]; -+}; -+ -+#endif /* !CONFIG_SOO */ -+ -+typedef struct avz_shared avz_shared_t; -+extern volatile avz_shared_t *avz_shared; -+ -+void do_avz_hypercall(void *args); -+void __sigreturn(void); -+void virq_handle(unsigned irq_nr); -+void virq_init(void); -+ -+#endif /* __ASSEMBLY__ */ -+ -+#endif /* UAPI_AVZ_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0033-asf.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0033-asf.h.patch deleted file mode 100644 index c3b4f6f..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0033-asf.h.patch +++ /dev/null @@ -1,60 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/asf.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/asf.h 2026-03-13 13:24:35.604002769 +0100 -@@ -0,0 +1,57 @@ -+/* -+ * Copyright (C) 2014-2019 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef ASF_H -+#define ASF_H -+ -+#include -+ -+typedef enum { -+ ASF_KEY_COM = 0, /* Symmetric key for the 'Communication' flow */ -+ ASF_KEY_INJECT, /* Symmetric key for the 'Injection' flow */ -+} sym_key_t; -+ -+/* Perform a buffer encryption (AES). -+ * The encrypted buffer ('enc_buf') is allocated inside ASF directly. It should -+ * be freed by the user. -+ * -+ * 'key': Symmetric key to use for the encryption. -+ * 'plain_buf': Buffer to encrypt (plains data) -+ * 'plain_buf_sz': Size of 'plain_buf' -+ * 'enc_buf': Buffer with the encrypted data. It is allocated by ASF -+ * -+ * return the size of the 'enc_buf' or -1 in case of error -+ */ -+ssize_t asf_encrypt(sym_key_t key, uint8_t *plain_buf, size_t plain_buf_sz, uint8_t **enc_buf); -+ -+ -+/* Performs a buffer decryption (AES). -+ * The decrypted buffer ('plain_buf') is allocated inside ASF directly. It should -+ * be freed by the user. -+ * -+ * 'key': Symmetric key to use for the decryption -+ * 'enc_buf': Buffer to decrypt (encrypted data) -+ * 'enc_buf_sz': Size of 'plain_buf' -+ * 'plain_buf': Buffer with the decrypted data (plain data). It is allocated by ASF -+ * -+ * return the size of the 'plain_buf' decoded buffer or -1 in case of error -+ */ -+ssize_t asf_decrypt(sym_key_t key, uint8_t *enc_buf, size_t enc_buf_sz, uint8_t **plain_buf); -+ -+ -+#endif /* ASF_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0034-avzcons.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0034-avzcons.h.patch deleted file mode 100644 index 97e6879..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0034-avzcons.h.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/avzcons.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/avzcons.h 2026-03-13 13:24:35.603944665 +0100 -@@ -0,0 +1,26 @@ -+/* -+ * Copyright (C) 2016-2018 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef __AVZCONS_H -+#define __AVZCONS_H -+ -+#include -+ -+int avz_switch_console(char ch); -+ -+#endif /* __AVZCONS_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0035-capsule.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0035-capsule.h.patch deleted file mode 100644 index e365855..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0035-capsule.h.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/capsule.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/capsule.h 2026-03-13 13:24:35.603984456 +0100 -@@ -0,0 +1,40 @@ -+/* -+ * Copyright (C) 2017-2025 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef CAPSULE_H -+#define CAPSULE_H -+ -+int inject_capsule(void *buffer, size_t size, int slotID); -+void start_capsule(int slotID); -+ -+void read_snapshot(uint32_t slotID, void *buffer, uint32_t *size); -+int write_snapshot(void *buffer); -+ -+int get_ME_state(unsigned int ME_slotID); -+void set_ME_state(unsigned int ME_slotID, ME_state_t state); -+ -+void get_ME_desc(unsigned int slotID, ME_desc_t *ME_desc); -+ -+bool get_ME_id(uint32_t slotID, ME_id_t *ME_id); -+char *xml_prepare_id_array(ME_id_t *ME_id_array); -+void get_ME_id_array(ME_id_t *ME_id_array); -+ -+void capsule_init(void); -+void capsule_exit(void); -+ -+#endif /* CAPSULE_H */ -\ No newline at end of file diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0036-debug.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0036-debug.h.patch deleted file mode 100644 index e692579..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0036-debug.h.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/debug.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/debug.h 2026-03-13 13:24:35.604137736 +0100 -@@ -0,0 +1,27 @@ -+/* -+ * Copyright (C) 2022 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef SOO_DEBUG_H -+#define SOO_DEBUG_H -+ -+#define HEXDUMP_COLS 64 -+ -+void hexdump(void *mem, unsigned int len); -+void dump_pgtable(unsigned long *l0pgtable); -+ -+#endif /* SOO_DEBUG_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0037-vdummy.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0037-vdummy.h.patch deleted file mode 100644 index 50743d6..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0037-vdummy.h.patch +++ /dev/null @@ -1,59 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/dev/vdummy.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/dev/vdummy.h 2026-03-13 13:24:35.603789768 +0100 -@@ -0,0 +1,56 @@ -+/* -+ * Copyright (C) 2014-2019 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef VDUMMY_H -+#define VDUMMY_H -+ -+#include -+#include -+ -+#define VDUMMY_PACKET_SIZE 32 -+ -+#define VDUMMY_NAME "vdummy" -+#define VDUMMY_PREFIX "[" VDUMMY_NAME "] " -+ -+typedef struct { -+ char buffer[VDUMMY_PACKET_SIZE]; -+} vdummy_request_t; -+ -+typedef struct { -+ char buffer[VDUMMY_PACKET_SIZE]; -+} vdummy_response_t; -+ -+/* -+ * Generate ring structures and types. -+ */ -+DEFINE_RING_TYPES(vdummy, vdummy_request_t, vdummy_response_t); -+ -+/* -+ * General structure for this virtual device (backend side) -+ */ -+typedef struct { -+ -+ /* Must be the first field */ -+ vdevback_t vdevback; -+ -+ vdummy_back_ring_t ring; -+ unsigned int irq; -+ -+} vdummy_t; -+ -+#endif /* VDUMMY_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0038-vlogs.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0038-vlogs.h.patch deleted file mode 100644 index 2962d1a..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0038-vlogs.h.patch +++ /dev/null @@ -1,58 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/dev/vlogs.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/dev/vlogs.h 2026-03-13 13:24:35.603867558 +0100 -@@ -0,0 +1,55 @@ -+/* -+ * Copyright (C) 2025 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef VLOGS_H -+#define VLOGS_H -+ -+#include -+#include -+ -+#include -+ -+#define VLOGS_NAME "vlogs" -+#define VLOGS_PREFIX "[" VLOGS_NAME "] " -+ -+ -+typedef struct { -+ char msg[1024]; -+} vlogs_request_t; -+ -+ -+typedef struct { -+ char c; -+} vlogs_response_t; -+ -+DEFINE_RING_TYPES(vlogs, vlogs_request_t, vlogs_response_t); -+ -+/* -+ * General structure for this virtual device (backend side) -+ */ -+ -+typedef struct { -+ vdevback_t vdevback; -+ -+ spinlock_t ring_lock; -+ vlogs_back_ring_t ring; -+ unsigned int irq; -+ -+} vlogs_t; -+ -+#endif /* VLOGS_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0039-vsensej.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0039-vsensej.h.patch deleted file mode 100644 index d721444..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0039-vsensej.h.patch +++ /dev/null @@ -1,65 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/dev/vsensej.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/dev/vsensej.h 2026-03-13 13:24:35.603829545 +0100 -@@ -0,0 +1,62 @@ -+/* -+ * Copyright (C) 2014-2019 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef VSENSEJ_H -+#define VSENSEJ_H -+ -+#include -+#include -+#include -+ -+#define VSENSEJ_PACKET_SIZE 32 -+ -+#define VSENSEJ_NAME "vsensej" -+#define VSENSEJ_PREFIX "[" VSENSEJ_NAME "] " -+ -+typedef struct { -+ /* nothing */ -+} vsensej_request_t; -+ -+typedef struct { -+ -+ uint16_t type; -+ uint16_t code; -+ int value; -+ -+} vsensej_response_t; -+ -+/* -+ * Generate ring structures and types. -+ */ -+DEFINE_RING_TYPES(vsensej, vsensej_request_t, vsensej_response_t); -+ -+/* -+ * General structure for this virtual device (backend side) -+ */ -+ -+typedef struct { -+ -+ /* Must be the first field */ -+ vdevback_t vdevback; -+ -+ vsensej_back_ring_t ring; -+ unsigned int irq; -+ -+} vsensej_t; -+ -+#endif /* VSENSEJ_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0040-vsenseled.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0040-vsenseled.h.patch deleted file mode 100644 index 577ae20..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0040-vsenseled.h.patch +++ /dev/null @@ -1,62 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/dev/vsenseled.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/dev/vsenseled.h 2026-03-13 13:24:35.603847878 +0100 -@@ -0,0 +1,59 @@ -+/* -+ * Copyright (C) 2014-2019 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef VSENSELED_H -+#define VSENSELED_H -+ -+#include -+#include -+#include -+ -+#define VSENSELED_PACKET_SIZE 32 -+ -+#define VSENSELED_NAME "vsenseled" -+#define VSENSELED_PREFIX "[" VSENSELED_NAME "] " -+ -+typedef struct { -+ int lednr; -+ bool ledstate; /* true = on, false = off */ -+} vsenseled_request_t; -+ -+typedef struct { -+ /* nothing */ -+} vsenseled_response_t; -+ -+/* -+ * Generate ring structures and types. -+ */ -+DEFINE_RING_TYPES(vsenseled, vsenseled_request_t, vsenseled_response_t); -+ -+/* -+ * General structure for this virtual device (backend side) -+ */ -+ -+typedef struct { -+ -+ /* Must be the first field */ -+ vdevback_t vdevback; -+ -+ vsenseled_back_ring_t ring; -+ unsigned int irq; -+ -+} vsenseled_t; -+ -+#endif /* VSENSELED_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0041-vuart.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0041-vuart.h.patch deleted file mode 100644 index 61a1798..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0041-vuart.h.patch +++ /dev/null @@ -1,63 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/dev/vuart.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/dev/vuart.h 2026-03-13 13:24:35.603811583 +0100 -@@ -0,0 +1,60 @@ -+/* -+ * Copyright (C) 2016-2018 Baptiste Delporte -+ * Copyright (C) 2018-2019 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef VUART_H -+#define VUART_H -+ -+#include -+#include -+ -+#include -+ -+#define VUART_NAME "vuart" -+#define VUART_PREFIX "[" VUART_NAME "] " -+ -+/* This is a reserved char code we use to query (patched) Qemu to retrieve the window size. */ -+#define SERIAL_GWINSZ '\254' -+ -+typedef struct { -+ char c; -+} vuart_request_t; -+ -+typedef struct { -+ char c; -+} vuart_response_t; -+ -+DEFINE_RING_TYPES(vuart, vuart_request_t, vuart_response_t); -+ -+/* -+ * General structure for this virtual device (backend side) -+ */ -+ -+typedef struct { -+ vdevback_t vdevback; -+ -+ spinlock_t ring_lock; -+ vuart_back_ring_t ring; -+ unsigned int irq; -+ -+} vuart_t; -+ -+bool vuart_ready(void); -+void me_cons_sendc(domid_t domid, uint8_t ch); -+ -+#endif /* VUART_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0042-device_access.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0042-device_access.h.patch deleted file mode 100644 index c9ee839..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0042-device_access.h.patch +++ /dev/null @@ -1,59 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/device_access.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/device_access.h 2026-03-13 13:24:35.603909386 +0100 -@@ -0,0 +1,56 @@ -+/* -+ * Copyright (C) 2017-2019 Baptiste Delporte -+ * Copyright (C) 2016-2019 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef DEVICE_ACCESS_H -+#define DEVICE_ACCESS_H -+ -+#include -+ -+#include -+#include -+ -+/* Helper function to display agencyUID or any 64-bit identifier */ -+static inline void soo_log_printUID(uint64_t uid) { -+ int i; -+ uint8_t *c = (uint8_t *) &uid; -+ -+ if (!uid) -+ soo_log("n/a"); -+ else -+ for (i = 0; i < 8; i++ ) { -+ soo_log("%02x ", *(c+7-i)); /* Display byte per byte arranged from little-endian */ -+ } -+} -+ -+/* Helper function to display agencyUID or any 64-bit identifier */ -+static inline void soo_log_printlnUID(uint64_t uid) { -+ soo_log_printUID(uid); -+ soo_log("\n"); -+} -+ -+void set_agencyUID(uint64_t val); -+ -+/* sysfs handlers */ -+ssize_t agencyUID_show(struct device *dev, struct device_attribute *attr, char *buf); -+ssize_t agencyUID_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t size); -+ssize_t soo_name_show(struct device *dev, struct device_attribute *attr, char *buf); -+ssize_t soo_name_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t size); -+ -+ -+#endif /* DEVICE_ACCESS_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0043-err.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0043-err.h.patch deleted file mode 100644 index 26ae691..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0043-err.h.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/err.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/err.h 2026-03-13 13:24:35.604059654 +0100 -@@ -0,0 +1,49 @@ -+/* -+ * Copyright (C) 2016-2018 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef _ERR_H -+#define _ERR_H -+ -+#include -+ -+/* -+ * Kernel pointers have redundant information, so we can use a -+ * scheme where we can return either an error code or a dentry -+ * pointer with the same return value. -+ * -+ * This should be a per-architecture thing, to allow different -+ * error and pointer decisions. -+ */ -+#define IS_ERR_VALUE(x) ((x) > (unsigned long)-1000L) -+ -+static inline void *ERR_PTR(long error) -+{ -+ return (void *) error; -+} -+ -+static inline long PTR_ERR(const void *ptr) -+{ -+ return (long) ptr; -+} -+ -+static inline long IS_ERR(const void *ptr) -+{ -+ return IS_ERR_VALUE((unsigned long)ptr); -+} -+ -+#endif /* _LINUX_ERR_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0044-errno-base.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0044-errno-base.h.patch deleted file mode 100644 index 39c1e21..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0044-errno-base.h.patch +++ /dev/null @@ -1,60 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/errno-base.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/errno-base.h 2026-03-13 13:24:35.604021853 +0100 -@@ -0,0 +1,57 @@ -+/* -+ * Copyright (C) 2016-2018 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef _ERRNO_BASE_H -+#define _ERRNO_BASE_H -+ -+#define EPERM 1 /* Operation not permitted */ -+#define ENOENT 2 /* No such file or directory */ -+#define ESRCH 3 /* No such process */ -+#define EINTR 4 /* Interrupted system call */ -+#define EIO 5 /* I/O error */ -+#define ENXIO 6 /* No such device or address */ -+#define E2BIG 7 /* Argument list too long */ -+#define ENOEXEC 8 /* Exec format error */ -+#define EBADF 9 /* Bad file number */ -+#define ECHILD 10 /* No child processes */ -+#define EAGAIN 11 /* Try again */ -+#define ENOMEM 12 /* Out of memory */ -+#define EACCES 13 /* Permission denied */ -+#define EFAULT 14 /* Bad address */ -+#define ENOTBLK 15 /* Block device required */ -+#define EBUSY 16 /* Device or resource busy */ -+#define EEXIST 17 /* File exists */ -+#define EXDEV 18 /* Cross-device link */ -+#define ENODEV 19 /* No such device */ -+#define ENOTDIR 20 /* Not a directory */ -+#define EISDIR 21 /* Is a directory */ -+#define EINVAL 22 /* Invalid argument */ -+#define ENFILE 23 /* File table overflow */ -+#define EMFILE 24 /* Too many open files */ -+#define ENOTTY 25 /* Not a typewriter */ -+#define ETXTBSY 26 /* Text file busy */ -+#define EFBIG 27 /* File too large */ -+#define ENOSPC 28 /* No space left on device */ -+#define ESPIPE 29 /* Illegal seek */ -+#define EROFS 30 /* Read-only file system */ -+#define EMLINK 31 /* Too many links */ -+#define EPIPE 32 /* Broken pipe */ -+#define EDOM 33 /* Math argument out of domain of func */ -+#define ERANGE 34 /* Math result not representable */ -+ -+#endif diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0045-errno.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0045-errno.h.patch deleted file mode 100644 index 1fc0450..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0045-errno.h.patch +++ /dev/null @@ -1,130 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/errno.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/errno.h 2026-03-13 13:24:35.603963114 +0100 -@@ -0,0 +1,127 @@ -+/* -+ * Copyright (C) 2016-2018 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef _ERRNO_H -+#define _ERRNO_H -+ -+#include -+ -+#define EDEADLK 35 /* Resource deadlock would occur */ -+#define ENAMETOOLONG 36 /* File name too long */ -+#define ENOLCK 37 /* No record locks available */ -+#define ENOSYS 38 /* Function not implemented */ -+#define ENOTEMPTY 39 /* Directory not empty */ -+#define ELOOP 40 /* Too many symbolic links encountered */ -+#define EWOULDBLOCK EAGAIN /* Operation would block */ -+#define ENOMSG 42 /* No message of desired type */ -+#define EIDRM 43 /* Identifier removed */ -+#define ECHRNG 44 /* Channel number out of range */ -+#define EL2NSYNC 45 /* Level 2 not synchronized */ -+#define EL3HLT 46 /* Level 3 halted */ -+#define EL3RST 47 /* Level 3 reset */ -+#define ELNRNG 48 /* Link number out of range */ -+#define EUNATCH 49 /* Protocol driver not attached */ -+#define ENOCSI 50 /* No CSI structure available */ -+#define EL2HLT 51 /* Level 2 halted */ -+#define EBADE 52 /* Invalid exchange */ -+#define EBADR 53 /* Invalid request descriptor */ -+#define EXFULL 54 /* Exchange full */ -+#define ENOANO 55 /* No anode */ -+#define EBADRQC 56 /* Invalid request code */ -+#define EBADSLT 57 /* Invalid slot */ -+ -+#define EDEADLOCK EDEADLK -+ -+#define EBFONT 59 /* Bad font file format */ -+#define ENOSTR 60 /* Device not a stream */ -+#define ENODATA 61 /* No data available */ -+#define ETIME 62 /* Timer expired */ -+#define ENOSR 63 /* Out of streams resources */ -+#define ENONET 64 /* Machine is not on the network */ -+#define ENOPKG 65 /* Package not installed */ -+#define EREMOTE 66 /* Object is remote */ -+#define ENOLINK 67 /* Link has been severed */ -+#define EADV 68 /* Advertise error */ -+#define ESRMNT 69 /* Srmount error */ -+#define ECOMM 70 /* Communication error on send */ -+#define EPROTO 71 /* Protocol error */ -+#define EMULTIHOP 72 /* Multihop attempted */ -+#define EDOTDOT 73 /* RFS specific error */ -+#define EBADMSG 74 /* Not a data message */ -+#define EOVERFLOW 75 /* Value too large for defined data type */ -+#define ENOTUNIQ 76 /* Name not unique on network */ -+#define EBADFD 77 /* File descriptor in bad state */ -+#define EREMCHG 78 /* Remote address changed */ -+#define ELIBACC 79 /* Can not access a needed shared library */ -+#define ELIBBAD 80 /* Accessing a corrupted shared library */ -+#define ELIBSCN 81 /* .lib section in a.out corrupted */ -+#define ELIBMAX 82 /* Attempting to link in too many shared libraries */ -+#define ELIBEXEC 83 /* Cannot exec a shared library directly */ -+#define EILSEQ 84 /* Illegal byte sequence */ -+#define ERESTART 85 /* Interrupted system call should be restarted */ -+#define ESTRPIPE 86 /* Streams pipe error */ -+#define EUSERS 87 /* Too many users */ -+#define ENOTSOCK 88 /* Socket operation on non-socket */ -+#define EDESTADDRREQ 89 /* Destination address required */ -+#define EMSGSIZE 90 /* Message too long */ -+#define EPROTOTYPE 91 /* Protocol wrong type for socket */ -+#define ENOPROTOOPT 92 /* Protocol not available */ -+#define EPROTONOSUPPORT 93 /* Protocol not supported */ -+#define ESOCKTNOSUPPORT 94 /* Socket type not supported */ -+#define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ -+#define EPFNOSUPPORT 96 /* Protocol family not supported */ -+#define EAFNOSUPPORT 97 /* Address family not supported by protocol */ -+#define EADDRINUSE 98 /* Address already in use */ -+#define EADDRNOTAVAIL 99 /* Cannot assign requested address */ -+#define ENETDOWN 100 /* Network is down */ -+#define ENETUNREACH 101 /* Network is unreachable */ -+#define ENETRESET 102 /* Network dropped connection because of reset */ -+#define ECONNABORTED 103 /* Software caused connection abort */ -+#define ECONNRESET 104 /* Connection reset by peer */ -+#define ENOBUFS 105 /* No buffer space available */ -+#define EISCONN 106 /* Transport endpoint is already connected */ -+#define ENOTCONN 107 /* Transport endpoint is not connected */ -+#define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */ -+#define ETOOMANYREFS 109 /* Too many references: cannot splice */ -+#define ETIMEDOUT 110 /* Connection timed out */ -+#define ECONNREFUSED 111 /* Connection refused */ -+#define EHOSTDOWN 112 /* Host is down */ -+#define EHOSTUNREACH 113 /* No route to host */ -+#define EALREADY 114 /* Operation already in progress */ -+#define EINPROGRESS 115 /* Operation now in progress */ -+#define ESTALE 116 /* Stale NFS file handle */ -+#define EUCLEAN 117 /* Structure needs cleaning */ -+#define ENOTNAM 118 /* Not a XENIX named type file */ -+#define ENAVAIL 119 /* No XENIX semaphores available */ -+#define EISNAM 120 /* Is a named type file */ -+#define EREMOTEIO 121 /* Remote I/O error */ -+#define EDQUOT 122 /* Quota exceeded */ -+ -+#define ENOMEDIUM 123 /* No medium found */ -+#define EMEDIUMTYPE 124 /* Wrong medium type */ -+#define ECANCELED 125 /* Operation Canceled */ -+#define ENOKEY 126 /* Required key not available */ -+#define EKEYEXPIRED 127 /* Key has expired */ -+#define EKEYREVOKED 128 /* Key has been revoked */ -+#define EKEYREJECTED 129 /* Key was rejected by service */ -+ -+/* for robust mutexes */ -+#define EOWNERDEAD 130 /* Owner died */ -+#define ENOTRECOVERABLE 131 /* State not recoverable */ -+ -+#endif diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0046-evtchn.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0046-evtchn.h.patch deleted file mode 100644 index bb693e1..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0046-evtchn.h.patch +++ /dev/null @@ -1,108 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/evtchn.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/evtchn.h 2026-03-16 21:07:27.541939519 +0100 -@@ -0,0 +1,105 @@ -+/* -+ * Copyright (C) 2016-2019 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef EVTCHN_H -+#define EVTCHN_H -+ -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include -+#include -+ -+#include -+ -+#include -+ -+#define VIRQ_BASE 256 -+ -+extern unsigned int evtchn_from_virq(int virq); -+extern unsigned int evtchn_from_irq_data(struct irq_data *irq_data); -+ -+/* Binding types. */ -+enum { -+ IRQT_UNBOUND, IRQT_PIRQ, IRQT_VIRQ, IRQT_IPI, IRQT_EVTCHN -+}; -+ -+static inline void clear_evtchn(u32 evtchn) { -+ avz_shared->evtchn_pending[evtchn] = false; -+} -+ -+static inline void notify_remote_via_evtchn(uint32_t evtchn) -+{ -+ avz_hyp_t args; -+ -+ args.cmd = AVZ_EVENT_CHANNEL_OP; -+ -+ args.u.avz_evtchn.evtchn_op.cmd = EVTCHNOP_send; -+ args.u.avz_evtchn.evtchn_op.u.send.evtchn = evtchn; -+ -+ avz_hypercall(&args); -+} -+ -+/* Entry point for notifications into Linux subsystems. */ -+void evtchn_do_upcall(void *data); -+ -+/* -+ * LOW-LEVEL DEFINITIONS -+ */ -+ -+/* -+ * Dynamically bind an event source to an IRQ-like callback handler. -+ * On some platforms this may not be implemented via the Linux IRQ subsystem. -+ * The IRQ argument passed to the callback handler is the same as returned -+ * from the bind call. It may not correspond to a Linux IRQ number. -+ * Returns IRQ or negative errno. -+ * UNBIND: Takes IRQ to unbind from; automatically closes the event channel. -+ */ -+extern int bind_evtchn_to_virq_handler(unsigned int evtchn, irq_handler_t handler, irq_handler_t thread_fn, unsigned long irqflags, const char *devname, void *dev_id); -+extern int bind_interdomain_evtchn_to_virqhandler(unsigned int remote_domain, unsigned int remote_evtchn, irq_handler_t handler, irq_handler_t thread_fn, unsigned long irqflags, const char *devname, void *dev_id); -+extern int bind_existing_interdomain_evtchn(unsigned int local_channel, unsigned int remote_domain, unsigned int remote_evtchn); -+extern int bind_virq_to_virqhandler(unsigned int virq, irq_handler_t handler, unsigned long irqflags, const char *devname, void *dev_id); -+ -+ -+void __unmask_irq(unsigned int irq, struct irq_desc *desc); -+void __ack_irq(unsigned int virq, struct irq_desc *desc); -+ -+/* -+ * Common unbind function for all event sources. Takes IRQ to unbind from. -+ * Automatically closes the underlying event channel (even for bindings -+ * made with bind_evtchn_to_irqhandler()). -+ */ -+extern void unbind_from_virqhandler(unsigned int virq, void *dev_id); -+extern void unbind_domain_evtchn(unsigned int domID, unsigned int evtchn); -+ -+extern void mask_evtchn(int ); -+extern void unmask_evtchn(int ); -+ -+/* -+ * Unlike notify_remote_via_evtchn(), this is safe to use across -+ * save/restore. Notifications on a broken connection are silently dropped. -+ */ -+extern void notify_remote_via_virq(int virq); -+ -+void virq_init(void); -+ -+#endif /* EVTCHN_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0047-gnttab.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0047-gnttab.h.patch deleted file mode 100644 index 1131c97..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0047-gnttab.h.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/gnttab.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/gnttab.h 2026-03-13 13:24:35.603890882 +0100 -@@ -0,0 +1,43 @@ -+/* -+ * Copyright (C) 2016-2019 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+/* -+ * A few words about the grant tables: -+ * -+ * Each domain has a grant table which keeps the reference to -+ * shared pages. -+ * -+ * The normal approach consists in the container domain which asks -+ * for a shared page. The container gets a grant reference which will be used -+ * by the taget domain (Linux normally). The Linux domain can then ask -+ * the hypervisor to get a physical (extra-domain) address in order to access the -+ * granted page. -+ * -+ */ -+ -+#ifndef GNTTAB_H -+#define GNTTAB_H -+ -+#include -+ -+void gnttab_map(domid_t domid, grant_ref_t grant_ref, void **vaddr); -+void gnttab_unmap(void *vaddr) ; -+ -+int gnttab_grant_foreign_access(domid_t domid, unsigned long pfn); -+ -+#endif /* GNTTAB_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0048-guest_api.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0048-guest_api.h.patch deleted file mode 100644 index a2cdb63..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0048-guest_api.h.patch +++ /dev/null @@ -1,62 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/guest_api.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/guest_api.h 2026-03-13 13:24:35.603489339 +0100 -@@ -0,0 +1,59 @@ -+/* -+ * Copyright (C) 2016-2019 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef GUEST_API_INCLUDE -+#define GUEST_API_INCLUDE -+ -+#include -+#include -+#include -+ -+#ifdef DEBUG -+ -+#include -+#include -+ -+#undef DBG -+#define DBG(fmt, ...) \ -+ do { \ -+ lprintk("(Dom#%d): %s:%i > "fmt, smp_processor_id(), __FUNCTION__, __LINE__, ##__VA_ARGS__); \ -+ } while(0) -+ -+#define DBG0(...) DBG("%s", ##__VA_ARGS__) -+ -+#else -+#define DBG(fmt, ...) -+#define DBG0(...) -+#endif -+ -+ -+/* -+ * Entry for a list of uevent which are propagated to the user space -+ */ -+typedef struct { -+ struct list_head list; -+ unsigned int uevent_type; -+ unsigned int slotID; -+} soo_uevent_t; -+ -+int soo_uevent(struct device *dev, struct kobj_uevent_env *env); -+ -+void vunmap_page_range(unsigned long addr, unsigned long end); -+ -+#endif /* GUEST_API_INCLUDE */ -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0049-hypervisor.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0049-hypervisor.h.patch deleted file mode 100644 index 8e56f75..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0049-hypervisor.h.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/hypervisor.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/hypervisor.h 2026-03-13 13:24:35.604157141 +0100 -@@ -0,0 +1,30 @@ -+/* -+ * Copyright (C) 2016-2025 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef HYPERVISOR_H_ -+#define HYPERVISOR_H_ -+ -+#include -+ -+void avz_printch(char c); -+void avz_printstr(char *s); -+ -+void avz_get_shared(void); -+void avz_gnttab(gnttab_op_t *op); -+ -+#endif /* HYPERVISOR_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0050-paging.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0050-paging.h.patch deleted file mode 100644 index 39dab3c..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0050-paging.h.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/paging.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/paging.h 2026-03-13 13:24:35.603714819 +0100 -@@ -0,0 +1,36 @@ -+/* -+ * Copyright (C) 2016-2019 Daniel Rossier -+ * Copyright (C) 2018 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef PAGING_H -+#define PAGING_H -+ -+#include -+ -+struct uncached_page { -+ void *vaddr; // uncached kernel VA from vmap() -+ struct page *pg; // backing page -+}; -+ -+void free_uncached_zeroed_page(struct uncached_page *p); -+struct uncached_page *alloc_uncached_zeroed_page(gfp_t gfp); -+ -+void *paging_remap(unsigned long phys, size_t size); -+void paging_remap_page_range(unsigned long vaddr, unsigned long end, phys_addr_t physaddr); -+ -+#endif /* PAGING_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0051-ring.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0051-ring.h.patch deleted file mode 100644 index 3a361bd..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0051-ring.h.patch +++ /dev/null @@ -1,230 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/ring.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/ring.h 2026-03-13 13:24:35.604078178 +0100 -@@ -0,0 +1,227 @@ -+ -+/* -+ * Copyright (C) 2004 Tim Deegan and Andrew Warfield -+ * Copyright (C) 2016-2019 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef __RING_H__ -+#define __RING_H__ -+ -+typedef unsigned int RING_IDX; -+ -+/* Round a 32-bit unsigned constant down to the nearest power of two. */ -+#define __RD2(_x) (((_x) & 0x00000002) ? 0x2 : ((_x) & 0x1)) -+#define __RD4(_x) (((_x) & 0x0000000c) ? __RD2((_x)>>2)<<2 : __RD2(_x)) -+#define __RD8(_x) (((_x) & 0x000000f0) ? __RD4((_x)>>4)<<4 : __RD4(_x)) -+#define __RD16(_x) (((_x) & 0x0000ff00) ? __RD8((_x)>>8)<<8 : __RD8(_x)) -+#define __RD32(_x) (((_x) & 0xffff0000) ? __RD16((_x)>>16)<<16 : __RD16(_x)) -+ -+/* -+ * Calculate size of a shared ring, given the total available space for the -+ * ring and indexes (_sz), and the name tag of the request/response structure. -+ * A ring contains as many entries as will fit, rounded down to the nearest -+ * power of two (so we can mask with (size-1) to loop around). -+ */ -+#define __CONST_RING_SIZE(_s, _sz) \ -+ (__RD32(((_sz) - offsetof(struct _s##_sring, ring)) / \ -+ sizeof(((struct _s##_sring *)0)->ring[0]))) -+ -+/* -+ * The same for passing in an actual pointer instead of a name tag. -+ */ -+#define __RING_SIZE(_s, _sz) \ -+ (__RD32(((_sz) - (long)&(_s)->ring + (long)(_s)) / sizeof((_s)->ring[0]))) -+ -+/* -+ * Macros to make the correct C datatypes for a new kind of ring. -+ * -+ * To make a new ring datatype, you need to have two message structures, -+ * let's say request_t, and response_t already defined. -+ * -+ * In a header where you want the ring datatype declared, you then do: -+ * -+ * DEFINE_RING_TYPES(mytag, request_t, response_t); -+ * -+ * These expand out to give you a set of types, as you can see below. -+ * The most important of these are: -+ * -+ * mytag_sring_t - The shared ring (found in mytag_front_ring_t/mytag_back_ring_t) -+ * mytag_front_ring_t - The 'front' half of the ring. -+ * mytag_back_ring_t - The 'back' half of the ring. -+ * -+ * To initialize a ring in your code you need to know the location and size -+ * of the shared memory area (PAGE_SIZE, for instance). To initialise -+ * the front half: -+ * -+ * mytag_front_ring_t front_ring; -+ * SHARED_RING_INIT((mytag_sring_t *)shared_page); -+ * FRONT_RING_INIT(&front_ring, (mytag_sring_t *)shared_page, PAGE_SIZE); -+ * -+ * Initializing the back follows similarly (note that only the front -+ * initializes the shared ring): -+ * -+ * mytag_back_ring_t back_ring; -+ * BACK_RING_INIT(&back_ring, (mytag_sring_t *)shared_page, PAGE_SIZE); -+ */ -+ -+#define DEFINE_RING_TYPES(__name, __req_t, __rsp_t) \ -+ \ -+/* Shared ring entry */ \ -+struct __name##_sring_entry { \ -+ __req_t req; \ -+ __rsp_t rsp; \ -+}; \ -+ \ -+/* Shared ring page */ \ -+struct __name##_sring { \ -+ RING_IDX req_prod, req_cons; \ -+ RING_IDX rsp_prod, rsp_cons; \ -+ uint8_t pad[40]; \ -+ struct __name##_sring_entry ring[1]; /* variable-length */ \ -+}; \ -+ \ -+/* "Front" end's private variables */ \ -+struct __name##_front_ring { \ -+ RING_IDX req_prod_pvt; \ -+ \ -+ unsigned int nr_ents; \ -+ struct __name##_sring *sring; \ -+}; \ -+ \ -+/* "Back" end's private variables */ \ -+struct __name##_back_ring { \ -+ RING_IDX rsp_prod_pvt; \ -+ \ -+ unsigned int nr_ents; \ -+ struct __name##_sring *sring; \ -+}; \ -+ \ -+/* Syntactic sugar */ \ -+typedef struct __name##_sring __name##_sring_t; \ -+typedef struct __name##_front_ring __name##_front_ring_t; \ -+typedef struct __name##_back_ring __name##_back_ring_t; \ -+ \ -+ static inline __req_t *__name##_new_ring_request(__name##_front_ring_t *__name##_front_ring) { \ -+ return RING_GET_REQUEST(__name##_front_ring, __name##_front_ring->req_prod_pvt++); \ -+ } \ -+ \ -+ static inline void __name##_ring_request_ready(__name##_front_ring_t *__name##_front_ring) { \ -+ RING_PUSH_REQUESTS(__name##_front_ring); \ -+ } \ -+ \ -+ static inline __rsp_t *__name##_get_ring_response(__name##_front_ring_t *__name##_front_ring) { \ -+ if (__name##_front_ring->sring->rsp_cons == __name##_front_ring->sring->rsp_prod) \ -+ return NULL; \ -+ else \ -+ return RING_GET_RESPONSE(__name##_front_ring, __name##_front_ring->sring->rsp_cons++); \ -+ } \ -+static inline __rsp_t *__name##_new_ring_response(__name##_back_ring_t *__name##_back_ring) { \ -+ return RING_GET_RESPONSE(__name##_back_ring, __name##_back_ring->rsp_prod_pvt++); \ -+} \ -+ \ -+static inline void __name##_ring_response_ready(__name##_back_ring_t *__name##_back_ring) { \ -+ RING_PUSH_RESPONSES(__name##_back_ring); \ -+} \ -+ \ -+static inline __req_t *__name##_get_ring_request(__name##_back_ring_t *__name##_back_ring) { \ -+ if (__name##_back_ring->sring->req_cons == __name##_back_ring->sring->req_prod) \ -+ return NULL; \ -+ else \ -+ return RING_GET_REQUEST(__name##_back_ring, __name##_back_ring->sring->req_cons++); \ -+} -+ -+/* -+ * Macros for manipulating rings. -+ * -+ * FRONT_RING_whatever works on the "front end" of a ring: here -+ * requests are pushed on to the ring and responses taken off it. -+ * -+ * BACK_RING_whatever works on the "back end" of a ring: here -+ * requests are taken off the ring and responses put on. -+ * -+ */ -+ -+/* Initialising empty rings */ -+#define SHARED_RING_INIT(_s) do { \ -+ (_s)->req_prod = (_s)->rsp_prod = 0; \ -+ (_s)->req_cons = (_s)->rsp_cons = 0; \ -+ (void)memset((_s)->pad, 0, sizeof((_s)->pad)); \ -+} while(0) -+ -+#define FRONT_RING_INIT(_r, _s, __size) do { \ -+ (_r)->req_prod_pvt = 0; \ -+ (_r)->nr_ents = __RING_SIZE(_s, __size); \ -+ (_r)->sring = (_s); \ -+} while (0) -+ -+#define BACK_RING_INIT(_r, _s, __size) do { \ -+ (_r)->rsp_prod_pvt = 0; \ -+ (_r)->nr_ents = __RING_SIZE(_s, __size); \ -+ (_r)->sring = (_s); \ -+} while (0) -+ -+/* How big is this ring? */ -+#define RING_SIZE(_r) \ -+ ((_r)->nr_ents) -+ -+/* Number of free requests (for use on front side only -+ * with non 1-to-1 (non injective) communication). */ -+#define RING_FREE_REQUESTS(_r) \ -+ (RING_SIZE(_r) - ((_r)->req_prod_pvt - (_r)->sring->req_cons)) -+ -+/* Same for response (back side only) */ -+#define RING_FREE_RESPONSES(_r) \ -+ (RING_SIZE(_r) - ((_r)->rsp_prod_pvt - (_r)->sring->rsp_cons)) -+ -+/* Test if there is an empty slot available on the front ring. */ -+#define RING_RSP_FULL(_r) \ -+ (RING_FREE_RESPONSES(_r) == 0) -+ -+#define RING_REQ_FULL(_r) \ -+ (RING_FREE_REQUESTS(_r) == 0) -+ -+/* Test if there are outstanding messages to be processed on a ring. */ -+#define RING_HAS_UNCONSUMED_RESPONSES(_r) \ -+ ((_r)->sring->rsp_prod - (_r)->sring->rsp_cons) -+ -+#define RING_HAS_UNCONSUMED_REQUESTS(_r) \ -+ ((_r)->sring->req_prod - (_r)->sring->req_cons) -+ -+/* Direct access to individual ring elements, by index. */ -+#define RING_GET_REQUEST(_r, _idx) \ -+ (&((_r)->sring->ring[((_idx) & (RING_SIZE(_r) - 1))].req)) -+ -+#define RING_GET_RESPONSE(_r, _idx) \ -+ (&((_r)->sring->ring[((_idx) & (RING_SIZE(_r) - 1))].rsp)) -+ -+#define RING_PUSH_REQUESTS(_r) do { \ -+ __smp_wmb(); /* back sees requests /before/ updated producer index */ \ -+ (_r)->sring->req_prod = (_r)->req_prod_pvt; \ -+} while (0) -+ -+#define RING_PUSH_RESPONSES(_r) do { \ -+ __smp_wmb(); /* front sees responses /before/ updated producer index */ \ -+ (_r)->sring->rsp_prod = (_r)->rsp_prod_pvt; \ -+} while (0) -+ -+#define RING_FREE_RESPONSES(_r) \ -+ (RING_SIZE(_r) - ((_r)->rsp_prod_pvt - (_r)->sring->rsp_cons)) -+ -+#define RING_RESP_FULL(_r) \ -+ (RING_FREE_RESPONSES(_r) == 0) -+ -+#endif /* __RING_H__ */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0052-roxml.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0052-roxml.h.patch deleted file mode 100644 index 7ae5578..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0052-roxml.h.patch +++ /dev/null @@ -1,1378 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/roxml.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/roxml.h 2026-03-13 13:24:35.603512017 +0100 -@@ -0,0 +1,1375 @@ -+/** -+ * \file roxml.h -+ * \brief header for libroxml.so -+ * -+ * (C) Copyright 2014 -+ * Tristan Lelong -+ * -+ * SPDX-Licence-Identifier: LGPL-2.1+ -+ * The author added a static linking exception, see License.txt. -+ */ -+ -+#ifndef ROXML_H -+#define ROXML_H -+ -+#ifdef __cplusplus -+extern "C" { -+#endif -+ -+/** -+ * \def ROXML_API -+ * -+ * part of the public API -+ */ -+#define ROXML_API -+ -+#ifndef ROXML_INT -+/** \typedef node_t -+ * -+ * \brief node_t structure -+ * -+ * This is the structure for a node. This struct is very -+ * little as it only contains offset for node in file and -+ * tree links -+ */ -+typedef struct node node_t; -+#endif -+ -+/** -+ * \def ROXML_INVALID_NODE -+ * -+ * constant for invalid nodes -+ */ -+#define ROXML_INVALID_NODE 0x000 -+ -+/** -+ * \def ROXML_ATTR_NODE -+ * -+ * constant for attribute nodes -+ * \see roxml_add_node -+ */ -+#define ROXML_ATTR_NODE 0x008 -+ -+/** -+ * \def ROXML_STD_NODE -+ * -+ * \deprecated -+ * constant for standard nodes -+ * -+ * \see roxml_add_node -+ * -+ */ -+#define ROXML_STD_NODE 0x010 -+ -+/** -+ * \def ROXML_ELM_NODE -+ * -+ * constant for element nodes -+ * \see roxml_add_node -+ */ -+#define ROXML_ELM_NODE 0x010 -+ -+/** -+ * \def ROXML_TXT_NODE -+ * -+ * constant for text nodes -+ * \see roxml_add_node -+ */ -+#define ROXML_TXT_NODE 0x020 -+ -+/** -+ * \def ROXML_CMT_NODE -+ * -+ * constant for comment nodes -+ * \see roxml_add_node -+ */ -+#define ROXML_CMT_NODE 0x040 -+ -+/** -+ * \def ROXML_PI_NODE -+ * -+ * constant for processing_intruction nodes -+ * \see roxml_add_node -+ */ -+#define ROXML_PI_NODE 0x080 -+ -+/** -+ * \def ROXML_NS_NODE -+ * -+ * constant for namespace nodes -+ * \see roxml_add_node -+ */ -+#define ROXML_NS_NODE 0x100 -+ -+/** -+ * \def ROXML_NSDEF_NODE -+ * -+ * constant for namespace definition nodes -+ * \see roxml_add_node -+ */ -+#define ROXML_NSDEF_NODE (ROXML_NS_NODE | ROXML_ATTR_NODE) -+ -+/** -+ * \def ROXML_CDATA_MOD -+ * -+ * constant for cdata nodes modifier applied to ROXML_TXT_NODE. -+ * \see roxml_add_node -+ */ -+#define ROXML_CDATA_MOD 0x200 -+ -+/** -+ * \def ROXML_CDATA_NODE -+ * -+ * constant for cdata nodes -+ * \see roxml_add_node -+ */ -+#define ROXML_CDATA_NODE (ROXML_TXT_NODE | ROXML_CDATA_MOD) -+ -+/** -+ * \def ROXML_DOCTYPE_NODE -+ * -+ * constant for doctype nodes -+ * \see roxml_add_node -+ */ -+#define ROXML_DOCTYPE_NODE 0x400 -+ -+/** -+ * \def ROXML_ALL_NODES -+ * -+ * constant for all types of nodes -+ * \see roxml_add_node -+ */ -+#define ROXML_ALL_NODES (ROXML_PI_NODE | ROXML_CMT_NODE | ROXML_TXT_NODE | ROXML_ATTR_NODE | ROXML_ELM_NODE) -+ -+/** -+ * \def ROXML_ALL_NODE -+ * -+ * constant for all types of nodes for backward compatibility -+ * \see roxml_add_node -+ */ -+#define ROXML_ALL_NODE ROXML_ALL_NODES -+ -+/** -+ * \def ROXML_NODE_TYPES -+ * -+ * constant for all nodes types -+ * \see roxml_get_types -+ */ -+#define ROXML_NODE_TYPES 0x05f8 -+ -+/** -+ * \def ROXML_ESCAPED_MOD -+ * -+ * constant for node modifier use to indicate escaped text. -+ * \see roxml_add_node -+ */ -+#define ROXML_ESCAPED_MOD 0x800 -+ -+/** -+ * \def ROXML_NON_ESCAPABLE_NODES -+ * -+ * constant for nodes that should not be escaped. -+ * \see roxml_add_node -+ */ -+#define ROXML_NON_ESCAPABLE_NODES (ROXML_CMT_NODE | ROXML_PI_NODE | ROXML_NS_NODE | ROXML_CDATA_MOD | ROXML_DOCTYPE_NODE) -+ -+/** -+ * \def ENCODE -+ * -+ * constant for requesting escape of a string. -+ * \see roxml_escape -+ */ -+#define ENCODE 0 -+ -+/** -+ * \def DECODE -+ * -+ * constant for requesting unescape of a string. -+ * \see roxml_escape -+ */ -+#define DECODE 1 -+ -+/** -+ * \def RELEASE_ALL -+ * -+ * when used with roxml_release, release all memory allocated by current thread -+ * \see roxml_release -+ */ -+#define RELEASE_ALL (void*)-1 -+ -+/** -+ * \def RELEASE_LAST -+ * -+ * when used with roxml_release, release last variable allocated -+ * \see roxml_release -+ * -+ * example: -+ * \code -+ * #include -+ * #include -+ * int main(void) -+ * { -+ * int len; -+ * node_t *root = roxml_load_doc("/tmp/doc.xml"); -+ * -+ * // roxml_get_content allocate a buffer and store the content in it if no buffer was given -+ * printf("root content = '%s'\n", roxml_get_content(root, NULL, 0, &len)); -+ * -+ * // release the last allocated buffer even if no pointer is maintained by the user -+ * roxml_release(RELEASE_LAST); -+ * -+ * // here no memory leak can occur. -+ * -+ * roxml_close(root); -+ * return 0; -+ * } -+ * \endcode -+ */ -+#define RELEASE_LAST (void*)-2 -+ -+/** -+ * \def ROXML_INVALID_DOC -+ * -+ * constant for invalid documents -+ */ -+#define ROXML_INVALID_DOC (node_t*)0 -+ -+/** \brief load function for buffers -+ * -+ * \fn node_t* roxml_load_buf(char *buffer); -+ * This function load a document by parsing all the corresponding nodes. -+ * The document must be contained inside the char * buffer given in parameter -+ * and remain valid until the roxml_close() function is called -+ * \param buffer the XML buffer to load -+ * \return the root node or ROXML_INVALID_DOC (NULL). errno is set to EINVAL in case of parsing error -+ * \see roxml_close -+ * \see roxml_load_fd -+ * \see roxml_load_doc -+ */ -+ROXML_API node_t * roxml_load_buf(char *buffer); -+ -+/** \brief load function for files -+ * -+ * \fn node_t* roxml_load_doc(char *filename); -+ * This function load a file document by parsing all the corresponding nodes -+ * \warning the file is not fully copied and thus, it should stay untouched until roxml_close is called on the corresponding XML tree. -+ * \param filename the XML document to load -+ * \return the root node or ROXML_INVALID_DOC (NULL). errno is set to EINVAL in case of parsing error -+ * \see roxml_close -+ * \see roxml_load_fd -+ * \see roxml_load_buf -+ */ -+ROXML_API node_t * roxml_load_doc(char *filename); -+ -+/** \brief load function for file descriptors -+ * -+ * \fn node_t* roxml_load_fd(int fd); -+ * This function load a document by parsing all the corresponding nodes -+ * \param fd the opened file descriptor to XML document to load -+ * \return the root node or ROXML_INVALID_DOC (NULL). errno is set to EINVAL in case of parsing error -+ * \see roxml_close -+ * \see roxml_load_doc -+ * \see roxml_load_buf -+ */ -+ROXML_API node_t * roxml_load_fd(int fd); -+ -+/** \brief unload function -+ * -+ * \fn void roxml_close(node_t *n); -+ * This function clear a document and all the corresponding nodes -+ * It release all memory allocated during roxml_load_doc or roxml_load_file or roxml_add_node. -+ * All nodes from the tree are not available anymore. -+ * \param n is any node of the tree to be cleaned -+ * \return void -+ * \see roxml_load_doc -+ * \see roxml_load_buf -+ * \see roxml_add_node -+ */ -+ROXML_API void roxml_close(node_t *n); -+ -+/** \brief next sibling getter function -+ * -+ * \fn node_t* roxml_get_next_sibling(node_t *n); -+ * This function returns the next sibling of a given node -+ * \param n is one node of the tree -+ * \return the next sibling node -+ */ -+ROXML_API node_t * roxml_get_next_sibling(node_t *n); -+ -+/** \brief prev sibling getter function -+ * -+ * \fn node_t* roxml_get_prev_sibling(node_t *n); -+ * This function returns the prev sibling of a given node -+ * \param n is one node of the tree -+ * \return the prev sibling node -+ */ -+ROXML_API node_t * roxml_get_prev_sibling(node_t *n); -+ -+/** \brief parent getter function -+ * -+ * \fn node_t* roxml_get_parent(node_t *n); -+ * This function returns the parent of a given node -+ * \param n is one node of the tree -+ * \return the parent node -+ */ -+ROXML_API node_t * roxml_get_parent(node_t *n); -+ -+/** \brief root getter function -+ * -+ * \fn node_t* roxml_get_root(node_t *n); -+ * This function returns the root of a tree containing the given node -+ * The root is defined as a virtual node that contains all first rank nodes if document is -+ * not a valid xml document: -+ * \verbatim -+ -+ -+ -+ -+ -+ -+ -+ -+\endverbatim -+ * will be processed successfully and the root node will have 2 children: data1 and data2 -+ * -+ * if document was: -+ * \verbatim -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+\endverbatim -+ * In this case, the node "doc" will be the root, and will contain 2 children: data1 and data2 -+ * -+ * For a document to be valid, following conditions must be met: -+ *
    -+ *
  • the first node is a processing instruction with the string "xml" as target application.
  • -+ *
  • there is only one ELM node containing all document (but there may be several process-instructions or comments)
  • -+ *
-+ * \param n is one node of the tree -+ * \return the root node -+ */ -+ROXML_API node_t * roxml_get_root(node_t *n); -+ -+/** \brief namespace getter function -+ * -+ * \fn node_t* roxml_get_ns(node_t *n); -+ * This function returns the namespace of a node -+ * -+ * \param n is one node of the tree -+ * \return the namespace or NULL if none are set for this node -+ * \see roxml_add_node -+ * \see roxml_set_ns -+ * \see roxml_get_nodes -+ * -+ * example: -+ * given the following xml file -+ * \verbatim -+ -+ -+ -+\endverbatim -+ * \code -+ * #include -+ * #include -+ * -+ * int main(void) -+ * { -+ * node_t *root = roxml_load_doc("/tmp/doc.xml"); -+ * node_t *xml = roxml_get_chld(root, NULL, 0); -+ * node_t *nsdef = roxml_get_attr(xml, NULL, 0); -+ * node_t *node1 = roxml_get_chld(xml, NULL, 0); -+ * node_t *attr1 = roxml_get_attr(node1, NULL, 0); -+ * node_t *node1_ns = roxml_get_ns(node1); -+ * node_t *attr1_ns = roxml_get_ns(attr1); -+ * -+ * // here node1_ns and attr1_ns are the "test:" namespace -+ * if(node1_ns == nsdef) { -+ * printf("got the correct namespace node for elem\n"); -+ * } -+ * if(attr1_ns == nsdef) { -+ * printf("got the correct namespace node for attr\n"); -+ * } -+ * if(strcmp(roxml_get_name(node1_ns, NULL, 0), "test") == 0) { -+ * printf("got the correct namespace alias\n"); -+ * } -+ * if(strcmp(roxml_get_content(node1_ns, NULL, 0, NULL), "http://www.test.org") == 0) { -+ * printf("got the correct namespace\n"); -+ * } -+ * -+ * roxml_close(root); -+ * return 0; -+ * } -+ * -+ * \endcode -+ */ -+ROXML_API node_t * roxml_get_ns(node_t *n); -+ -+/** \brief namespace setter function -+ * -+ * \fn node_t* roxml_set_ns(node_t *n, node_t *ns); -+ * This function set the namespace of a node to the given namespace definition. -+ * The namespace must be previously defined in the xml tree in an ancestor of node n. -+ * -+ * \param n is one node of the tree -+ * \param ns is one nsdef node of the tree -+ * \return the node or ROXML_INVALID_DOC (NULL) if ns cannot be set -+ * \see roxml_add_node -+ * \see roxml_get_ns -+ * \see roxml_get_nodes -+ * -+ * \warning: Setting a namespace to a node is recursif: -+ * - it will update all element and attribute that are descendant from current node -+ * - namespace will be applied to all new node added as descendant as current node -+ */ -+ROXML_API node_t * roxml_set_ns(node_t *n, node_t * ns); -+ -+/** \brief comment getter function -+ * -+ * \fn node_t* roxml_get_cmt(node_t *n, int nth); -+ * This function returns the nth comment of a node -+ * -+ * \param n is one node of the tree -+ * \param nth is the id of the cmt to get -+ * \return the comment corresponding to id -+ * \see roxml_get_cmt_nb -+ * \see roxml_get_nodes -+ * -+ * example: -+ * given the following xml file -+ * \verbatim -+ -+ -+ -+ -+ -+ -+ -+\endverbatim -+ * \code -+ * #include -+ * #include -+ * -+ * int main(void) -+ * { -+ * node_t *root = roxml_load_doc("/tmp/doc.xml"); -+ * node_t *xml = roxml_get_chld(root, NULL, 0); -+ * node_t *cmt1 = roxml_get_cmt(xml, 0); -+ * node_t *cmt2 = roxml_get_cmt(xml, 1); -+ * -+ * // here cmt1 is the "comment1" node -+ * if(strcmp(roxml_get_content(cmt1, NULL, 0, NULL), "comment1") == 0) { -+ * printf("got the first comment\n"); -+ * } -+ * // and cmt2 is the "comment2" node -+ * if(strcmp(roxml_get_content(cmt2, NULL, 0, NULL), "comment2") == 0) { -+ * printf("got the second comment\n"); -+ * } -+ * -+ * roxml_close(root); -+ * return 0; -+ * } -+ * -+ * \endcode -+ */ -+ROXML_API node_t * roxml_get_cmt(node_t *n, int nth); -+ -+/** \brief comments number getter function -+ * -+ * \fn int roxml_get_cmt_nb(node_t *n); -+ * This function return the number of comments for a given node -+ * \param n is one node of the tree -+ * \return the number of comments -+ * \see roxml_get_cmt_nb -+ * \see roxml_get_nodes -+ */ -+ROXML_API int roxml_get_cmt_nb(node_t *n); -+ -+/** \brief chld getter function -+ * -+ * \fn node_t* roxml_get_chld(node_t *n, char * name, int nth); -+ * This function returns a given chld of a node etheir by name, or the nth child. -+ * -+ * \param n is one node of the tree -+ * \param name is the name of the child to get -+ * \param nth is the id of the chld to get -+ * \return the chld corresponding to name or id (if both are set, name is used) -+ * \see roxml_get_chld_nb -+ * -+ * example: -+ * given the following xml file -+ * \verbatim -+ -+ -+ -+ -+ -+\endverbatim -+ * \code -+ * #include -+ * #include -+ * -+ * int main(void) -+ * { -+ * node_t *root = roxml_load_doc("/tmp/doc.xml"); -+ * -+ * node_t *child_by_name = roxml_get_chld(root, "item2", 0); -+ * node_t *child_by_nth = roxml_get_chld(root, NULL, 2); -+ * -+ * // here child_by_name == child_by_nth -+ * if(child_by_name == child_by_nth) { -+ * printf("Nodes are equal\n"); -+ * } -+ * -+ * roxml_close(root); -+ * return 0; -+ * } -+ * \endcode -+ */ -+ROXML_API node_t * roxml_get_chld(node_t *n, char *name, int nth); -+ -+/** \brief chlds number getter function -+ * -+ * \fn int roxml_get_chld_nb(node_t *n); -+ * This function return the number of chlidren for a given node -+ * \param n is one node of the tree -+ * \return the number of chlildren -+ */ -+ROXML_API int roxml_get_chld_nb(node_t *n); -+ -+/** \brief process-instruction getter function -+ * -+ * \fn node_t* roxml_get_pi(node_t *n, int nth); -+ * This function returns the nth process-instruction of a node. -+ * -+ * \param n is one node of the tree -+ * \param nth is the id of the pi to get -+ * \return the process-instruction corresponding to id -+ * \see roxml_get_pi_nb -+ * \see roxml_get_nodes -+ * -+ * example: -+ * given the following xml file -+ * \verbatim -+ -+ -+ -+ -+ -+ -+ -+\endverbatim -+ * \code -+ * #include -+ * #include -+ * -+ * int main(void) -+ * { -+ * node_t *root = roxml_load_doc("/tmp/doc.xml"); -+ * node_t *xml = roxml_get_chld(root, NULL, 0); -+ * node_t *pi1 = roxml_get_pi(xml, 0); -+ * node_t *pi2 = roxml_get_pi(xml, 1); -+ * -+ * // here pi1 is the node -+ * if(strcmp(roxml_get_content(pi1, NULL, 0, NULL), "value=\"2\"") == 0) { -+ * printf("got the first process-instruction\n"); -+ * } -+ * // and pi2 is the node -+ * if(strcmp(roxml_get_content(pi2, NULL, 0, NULL), "param=\"3\"") == 0) { -+ * printf("got the second process-instruction\n"); -+ * } -+ * -+ * roxml_close(root); -+ * return 0; -+ * } -+ * -+ * \endcode -+ */ -+ROXML_API node_t * roxml_get_pi(node_t *n, int nth); -+ -+/** \brief process-instruction number getter function -+ * -+ * \fn int roxml_get_pi_nb(node_t *n); -+ * This function return the number of process-instruction in a given node -+ * \param n is one node of the tree -+ * \return the number of process-instructions -+ * \see roxml_get_pi -+ * \see roxml_get_nodes_nb -+ */ -+ROXML_API int roxml_get_pi_nb(node_t *n); -+ -+/** \brief name getter function -+ * -+ * \fn char* roxml_get_name(node_t *n, char * buffer, int size); -+ * This function return the name of the node or fill the current buffer with it if not NULL. -+ * if name is NULL, the function will allocate a buffer that user should free using -+ * roxml_release when no longer needed. -+ * depending on node type it will return: -+ *
    -+ *
  • ROXML_ELM_NODE: returns the node name
  • -+ *
  • ROXML_ATTR_NODE: returns the attribute name
  • -+ *
  • ROXML_PI_NODE: returns the process-instruction targeted application
  • -+ *
  • ROXML_TXT_NODE: returns NULL (or empty string if you provided a buffer in buffer param)
  • -+ *
  • ROXML_CMT_NODE: returns NULL (or empty string if you provided a buffer in buffer param)
  • -+ *
  • ROXML_NS_NODE: returns the namespace alias associated with the ns node
  • -+ *
-+ * Be carreful as if your buffer is too short for the returned string, it will be truncated -+ * \param n is one node of the tree -+ * \param buffer a buffer pointer or NULL if has to be auto allocated -+ * \param size the size of buffer pointed by buffer if not NULL -+ * \return the name of the node (return our buffer pointer if it wasn't NULL) -+ * \see roxml_release -+ */ -+ROXML_API char * roxml_get_name(node_t *n, char *buffer, int size); -+ -+/** \brief content getter function -+ * -+ * \fn char * roxml_get_content(node_t *n, char * buffer, int bufsize, int * size); -+ * -+ * This function returns the content of a node.; -+ * if the returned pointer is NULL then the node either has no content or this function is irrelevant for this kind of node. -+ * depending on node type it will return: -+ *
    -+ *
  • ROXML_ELM_NODE: returns the concatenation of all direct text node children
  • -+ *
  • ROXML_ATTR_NODE: returns the attribute value
  • -+ *
  • ROXML_PI_NODE: returns the process-instruction instruction
  • -+ *
  • ROXML_TXT_NODE: returns the text content of the node
  • -+ *
  • ROXML_CMT_NODE: returns the text content of the comment
  • -+ *
  • ROXML_NS_NODE: returns the namespace definition (usually an URL)
  • -+ *
-+ * returned string should be freed using roxml_release when not used anymore -+ * \param n is one node of the tree -+ * \param buffer is the buffer where result will be written or NULL for internal allocation -+ * \param bufsize the size if using custom buffer -+ * \param size the actual size of copied result. returned size should be less that buffer size since roxml_get_content -+ * will add the \0. if buffer was not NULL and size == buf_size, then given buffer was too small and node content was truncated -+ * \return the text content -+ * \see roxml_release -+ */ -+ROXML_API char * roxml_get_content(node_t *n, char *buffer, int bufsize, int *size); -+ -+/** \brief XML encoding/decoding function -+ * -+ * \fn roxml_escape(const char *buf, int decode, char *out) -+ * this function converts the escape codes into ascii char or special carachers in escape codes. -+ * \param buf the bytes to be converted -+ * \param decode indicates whether to encde or decode escape caracteres. -+ * \param out is filled with the encoded/decoded data if not null. -+ * \return the size of encoded/decoded data -+ * \see roxml_add_node -+ * \see ENCODE -+ * \see DECODE -+ */ -+ROXML_API int roxml_escape(const char *buf, int decode, char *out); -+ -+/** \brief number of nodes getter function -+ * -+ * \fn int roxml_get_nodes_nb(node_t *n, int type); -+ * -+ * This function returns the number of nodes matching type flag contained in a given node -+ * all other roxml_get_*_nb are wrapper to this -+ * \param n is one node of the tree -+ * \param type is the bitmask of node types we want to consider -+ * \return the number of nodes -+ * \see roxml_get_attr_nb -+ * \see roxml_get_chld_nb -+ * \see roxml_get_txt_nb -+ * \see roxml_get_cmt_nb -+ * \see roxml_get_pi_nb -+ * -+ * example: -+ * given the following xml file -+ * \verbatim -+ -+ -+ -+ -+ -+ -+\endverbatim -+ * \code -+ * #include -+ * #include -+ * -+ * int main(void) -+ * { -+ * node_t *root = roxml_load_doc("/tmp/doc.xml"); -+ * -+ * int all_nodes_1 = roxml_get_nodes_nb(root, ROXML_ELM_NODE | ROXML_CMT_NODE | ROXML_PI_NODE | ROXML_TXT_NODE | ROXML_ATTR_NODE); -+ * int all_nodes_2 = roxml_get_nodes_nb(root, ROXML_ALL_NODES); -+ * -+ * // here all_nodes_1 == all_nodes_2 -+ * if(all_nodes_1 == all_nodes_2) { -+ * printf("%d Nodes are contained in root\n", all_nodes_1); -+ * } -+ * -+ * // let's count elm node (== children) -+ * int elm_nodes1 = roxml_get_nodes_nb(root, ROXML_ELM_NODE); -+ * int elm_nodes2 = roxml_get_chld_nb(root); -+ * // here elm_nodes1 == elm_nodes2 == 2 -+ * if(elm_nodes1 == elm_nodes2) { -+ * printf("%d ELM Nodes are contained in root\n", elm_nodes_1); -+ * } -+ * -+ * // we can also count all node except elm nodes, doing: -+ * int almost_all_nodes = roxml_get_nodes_nb(root, ROXML_ALL_NODES & ~ROXML_ELM_NODE); -+ * // here almost_all_nodes = 2 since we have one comment node and one processing-instruction node -+ * if(almost_all_nodes == 2) { -+ * printf("%d non ELM Nodes are contained in root\n", almost_all_nodes_1); -+ * } -+ * -+ * roxml_close(root); -+ * return 0; -+ * } -+ * \endcode -+ */ -+ROXML_API int roxml_get_nodes_nb(node_t *n, int type); -+ -+/** \brief nodes getter function -+ * -+ * \fn char* roxml_get_nodes(node_t *n, int type, char * name, int nth); -+ * This function get the nth node matching type contained in a node, or the first node named name. -+ * All other roxml_get_* are wrapper to this function. -+ * When asking for several node type (let say ROXML_ALL_NODES), all ROXML_ATTR_NODE will be -+ * placed first, then, all other nodes will come mixed, depending on xml document order. -+ * -+ * \param n is one node of the tree -+ * \param type is the bitmask of node types we want to consider -+ * \param name is the name of the child to get. This parameter is only relevant for node with types: \ref ROXML_ELM_NODE, \ref ROXML_ATTR_NODE, \ref ROXML_PI_NODE -+ * \param nth the id of attribute to read -+ * \return the node corresponding to name or id (if both are set, name is used) -+ * \see roxml_get_attr -+ * \see roxml_get_chld -+ * \see roxml_get_txt -+ * \see roxml_get_cmt -+ * \see roxml_get_pi -+ */ -+ROXML_API node_t * roxml_get_nodes(node_t *n, int type, char *name, int nth); -+ -+/** \brief number of attribute getter function -+ * -+ * \fn int roxml_get_attr_nb(node_t *n); -+ * -+ * This function returns the number of attributes for a given node -+ * \param n is one node of the tree -+ * \return the number of attributes in node -+ */ -+ROXML_API int roxml_get_attr_nb(node_t *n); -+ -+/** \brief attribute getter function -+ * -+ * \fn node_t* roxml_get_attr(node_t *n, char * name, int nth); -+ * This function get the nth attribute of a node. -+ * \param n is one node of the tree -+ * \param name is the name of the attribute to get -+ * \param nth the id of attribute to read -+ * \return the attribute corresponding to name or id (if both are set, name is used) -+ * -+ * example: -+ * given the following xml file -+ * \verbatim -+ -+ -+ -+\endverbatim -+ * \code -+ * #include -+ * #include -+ * -+ * int main(void) -+ * { -+ * node_t *root = roxml_load_doc("/tmp/doc.xml"); -+ * node_t *item1 = roxml_get_chld(root, NULL, 0); -+ * node_t *item2 = roxml_get_chld(item1, NULL, 0); -+ * -+ * node_t *attr_by_name = roxml_get_attr(item2, "id", 0); -+ * node_t *attr_by_nth = roxml_get_attr(item2, NULL, 0); -+ * -+ * // here attr_by_name == attr_by_nth -+ * if(attr_by_name == attr_by_nth) { -+ * printf("Nodes are equal\n"); -+ * } -+ * -+ * roxml_close(root); -+ * return 0; -+ * } -+ * \endcode -+ */ -+ROXML_API node_t * roxml_get_attr(node_t *n, char *name, int nth); -+ -+/** \brief exec path function -+ * -+ * \fn roxml_xpath(node_t *n, char * path, int *nb_ans); -+ * This function return a node set (table of nodes) corresponding to a given xpath. -+ * resulting node set should be roxml_release when not used anymore (but not individual nodes) -+ * \param n is one node of the tree -+ * \param path the xpath to use -+ * \param nb_ans the number of results -+ * \return the node table or NULL -+ * -+ * handled xpath are described in \ref xpath -+ */ -+ROXML_API node_t ** roxml_xpath(node_t *n, char *path, int *nb_ans); -+ -+/** \brief node type function -+ * -+ * \fn roxml_get_type(node_t *n); -+ * This function tells if a node is an \ref ROXML_ATTR_NODE, \ref ROXML_TXT_NODE, \ref ROXML_PI_NODE, \ref ROXML_CMT_NODE or \ref ROXML_ELM_NODE. -+ * Warning: ROXML_CDATA_NODE are special. They return a type as ROXML_TXT_NODE. -+ * \param n is the node to test -+ * \return the node type -+ */ -+ROXML_API int roxml_get_type(node_t *n); -+ -+/** \brief node get position function -+ * -+ * \fn roxml_get_node_position(node_t *n); -+ * This function tells the index of a node between all its siblings homonyns. -+ * \param n is the node to test -+ * \return the postion between 1 and N -+ */ -+ROXML_API int roxml_get_node_position(node_t *n); -+ -+/** \brief memory cleanning function -+ * -+ * \fn roxml_release(void * data); -+ * This function release the memory pointed by pointer -+ * just like free would but for memory allocated with roxml_malloc. -+ * Freeing a NULL pointer won't do -+ * anything. roxml_release also allow you to remove all -+ * previously allocated memory by using \ref RELEASE_ALL as argument. -+ * You can also safely use \ref RELEASE_LAST argument that will release the -+ * previously allocated varable within the current thread (making this -+ * function thread safe). -+ * if using roxml_release on a variable non roxml_mallocated, nothing will happen (ie variable won't be freed) -+ * \param data the pointer to delete or NULL or \ref RELEASE_ALL or \ref RELEASE_LAST -+ * \return void -+ */ -+ROXML_API void roxml_release(void *data); -+ -+/** \brief add a node to the tree -+ * -+ * \fn roxml_add_node(node_t *parent, int position, int type, char *name, char *value); -+ * this function add a new node to the tree. This will not update de buffer or file, -+ * only the RAM loaded tree. One should call \ref roxml_commit_changes to save modifications. -+ * If the parent node is an \ref ROXML_ELM_NODE, then, new node will be added as a child. Else -+ * the node will be added as a sibling of the parent node. In the later case, position parameter describes -+ * the position in the sibling list, instead of position in the children list. -+ * \param parent the parent node -+ * \param position the position as a child of parent 1 is the first child, 0 for auto position at the end of children list... -+ * \param type the type of node between \ref ROXML_ATTR_NODE, \ref ROXML_ELM_NODE, \ref ROXML_TXT_NODE, \ref ROXML_CDATA_NODE, \ref ROXML_PI_NODE, \ref ROXML_CMT_NODE, \ref ROXML_NSDEF_NODE, \ref ROXML_NS_NODE. -+ * \param name the name of the node (mandatory for \ref ROXML_ATTR_NODE and \ref ROXML_ELM_NODE and \ref ROXML_PI_NODE and \ref ROXML_NSDEF_NODE and \ref ROXML_NS_NODE only) -+ * \param value the text content (mandatory for \ref ROXML_TXT_NODE, \ref ROXML_CDATA_NODE, \ref ROXML_CMT_NODE, \ref ROXML_ATTR_NODE and \ref ROXML_NSDEF_NODE optional for \ref ROXML_ELM_NODE, \ref ROXML_PI_NODE). The text content for an attribute is the attribute value -+ * \return the newly created node -+ * \see roxml_commit_changes -+ * \see roxml_commit_buffer -+ * \see roxml_commit_file -+ * \see roxml_del_node -+ * \see roxml_close -+ * -+ * Escaping the as per XML specifications can be done by adding the ROXML_ESCAPED_MOD modifier to node type as showed below: -+ * \code -+ * roxml_add_node(NULL, 0, ROXML_ESCAPE_MODE | ROXML_ELM_NODE, "node1", "content needs escaping"); -+ * \endcode -+ * This will create a node that exports as: -+ * \verbatim -+ * content <that> needs escaping -+ * \endverbatim -+ * -+ * paramaters name and value depending on node type: -+ * - \ref ROXML_ELM_NODE take at least a node name. the parameter value is optional and represents the text content. -+ * - \ref ROXML_TXT_NODE ignore the node name. the parameter value represents the text content. -+ * - \ref ROXML_CDATA_NODE ignore the node name. the parameter value represents the text content that will be encapsulated in CDATA tags. -+ * - \ref ROXML_CMT_NODE ignore the node name. the parameter value represents the comment. -+ * - \ref ROXML_PI_NODE take the node name as process-instruction target. the parameter value represents the content of processing-instruction. -+ * - \ref ROXML_ATTR_NODE take an attribute name. and the attribute value as given by parameter value. -+ * - \ref ROXML_NSDEF_NODE take an attribute name (empty string for default namespace). and the namespace value as given by parameter value. -+ * - \ref ROXML_NS_NODE take an attribute name (empty string for default namespace). -+ * -+ * some examples to obtain this xml result file -+\verbatim -+ -+ -+ -+ -+ 24 -+ -+ -+ -+\endverbatim -+ * -+ * \code -+ * #include -+ * -+ * int main(void) -+ * { -+ * node_t *root = roxml_add_node(NULL, 0, ROXML_ELM_NODE, "xml", NULL); -+ * node_t *tmp = roxml_add_node(root, 0, ROXML_CMT_NODE, NULL, "sample XML file"); -+ * tmp = roxml_add_node(root, 0, ROXML_ELM_NODE, "item", NULL); -+ * roxml_add_node(tmp, 0, ROXML_ATTR_NODE, "id", "42"); -+ * tmp = roxml_add_node(tmp, 0, ROXML_ELM_NODE, "price", "24"); -+ * roxml_commit_changes(root, "/tmp/test.xml", NULL, 1); -+ * roxml_close(root); -+ * return 0; -+ * } -+ * \endcode -+ * Or also: -+ * \code -+ * #include -+ * -+ * int main(void) -+ * { -+ * node_t *root = roxml_add_node(NULL, 0, ROXML_ELM_NODE, "xml", NULL); -+ * node_t *tmp = roxml_add_node(root, 0, ROXML_CMT_NODE, NULL, "sample XML file"); -+ * tmp = roxml_add_node(root, 0, ROXML_ELM_NODE, "item", NULL); -+ * roxml_add_node(tmp, 0, ROXML_ATTR_NODE, "id", "42"); -+ * tmp = roxml_add_node(tmp, 0, ROXML_ELM_NODE, "price", NULL); -+ * tmp = roxml_add_node(tmp, 0, ROXML_TXT_NODE, NULL, "24"); -+ * roxml_commit_changes(root, "/tmp/test.xml", NULL, 1); -+ * roxml_close(root); -+ * return 0; -+ * } -+ * \endcode -+ * -+ * If you need a valid XML doc, just start by adding a corresponding process-instruction. -+ * Example, to obtain this xml file: -+ * \verbatim -+ -+ -+ -+ basic content -+ -+ -+ -+ -+\endverbatim -+ * \code -+ * #include -+ * -+ * int main(void) -+ * { -+ * node_t *root = roxml_add_node(NULL, 0, ROXML_PI_NODE, "xml", "version=\"1.0\" encoding=\"UTF-8\""); -+ * node_t *node = roxml_add_node(root, 0, ROXML_CMT_NODE, NULL, "sample file"); -+ * node = roxml_add_node(root, 0, ROXML_ELM_NODE, "doc", "basic content"); -+ * roxml_add_node(node, 0, ROXML_ELM_NODE, "item", NULL); -+ * roxml_add_node(node, 0, ROXML_ELM_NODE, "item", NULL); -+ * roxml_add_node(node, 0, ROXML_ELM_NODE, "item", NULL); -+ * roxml_commit_changes(root, "/tmp/test.xml", NULL, 1); -+ * roxml_close(root); -+ * return 0; -+ * } -+ * \endcode -+ */ -+ROXML_API node_t * roxml_add_node(node_t *parent, int position, int type, char *name, char *value); -+ -+/** \brief text node getter function -+ * -+ * \fn roxml_get_txt(node_t *n, int nth); -+ * this function return the text content of a node as a \ref ROXML_TXT_NODE -+ * the content of the text node can be read using the roxml_get_content function -+ * \param n the node that contains text -+ * \param nth the nth text node to retrieve -+ * \return the text node or ROXML_INVALID_DOC (NULL) -+ * \see roxml_get_txt_nb -+ * \see roxml_get_nodes -+ * \see roxml_get_content -+ * -+ * example: -+ * given this xml file: -+ * \verbatim -+ -+ This is -+ -+ an example -+ -+ of text nodes -+ -+\endverbatim -+ * \code -+ * #include -+ * #include -+ * -+ * int main(void) -+ * { -+ * int len; -+ * node_t *root = roxml_load_doc("/tmp/doc.xml"); -+ * node_t *item = roxml_get_chld(root, NULL, 0); -+ * -+ * node_t *text = roxml_get_txt(item, 0); -+ * char * text_content = roxml_get_content(text, NULL, 0, &len); -+ * // HERE text_content is equal to "This is" -+ * printf("text_content = '%s'\n", text_content); -+ * -+ * text = roxml_get_txt(item, 1); -+ * text_content = roxml_get_content(text, NULL, 0, &len); -+ * // HERE text_content is equal to "an example" -+ * printf("text_content = '%s'\n", text_content); -+ * -+ * text = roxml_get_txt(item, 2); -+ * text_content = roxml_get_content(text, NULL, 0, &len); -+ * // HERE text_content is equal to "of text nodes" -+ * printf("text_content = '%s'\n", text_content); -+ * -+ * roxml_close(item); -+ * return 0; -+ * } -+ * \endcode -+ */ -+ROXML_API node_t * roxml_get_txt(node_t *n, int nth); -+ -+/** \brief text node number getter function -+ * -+ * \fn roxml_get_txt_nb(node_t *n); -+ * this function return the number of text nodes in -+ * a standard node -+ * \param n the node to search into -+ * \return the number of text node -+ * \see roxml_get_txt -+ */ -+ROXML_API int roxml_get_txt_nb(node_t *n); -+ -+/** \brief node deletion function -+ * -+ * \fn roxml_del_node(node_t *n); -+ * this function delete a node from the tree. The node is not really deleted -+ * from the file or buffer until the roxml_commit_changes is called, but it won't be -+ * visible anymore in the XML tree. -+ * \param n the node to delete -+ * \return -+ * \see roxml_add_node -+ * \see roxml_commit_changes -+ * \see roxml_commit_buffer -+ * \see roxml_commit_file -+ * -+ * \warning when removing a nsdef node, all node using this namespace will be updated and inherit their parent namespace -+ */ -+ROXML_API void roxml_del_node(node_t *n); -+ -+/** \brief sync function -+ * -+ * \fn roxml_commit_changes(node_t *n, char * dest, char ** buffer, int human); -+ * \deprecated -+ * this function sync changes from the RAM tree to the given buffer or file in human or one-line format -+ * The tree will be processed starting with the root node 'n' and following with all its children or if n is the root, all its siblings and children. -+ * The tree will be dumped to a file if 'dest' is not null and contains a valid path. -+ * The tree will be dumped to a buffer if 'buffer' is not null. the buffer is allocated by the library -+ * and a pointer to it will be stored into 'buffer'. The allocated buffer can be freed usinf free() -+ * \warning in the case of a tree loaded using roxml_load_doc, the roxml_commit_changes cannot be done to that same file -+ * since it may override datas it need. This usually result in a new file filled with garbages. The solution is to write it to a temporary file and rename it after roxml_close the current tree. -+ * -+ * This function is now deprecated and one should use roxml_commit_buffer or roxml_commit_file that achieves the exact same goal. -+ * -+ * \param n the root node of the tree to write -+ * \param dest the path to a file to write tree to -+ * \param buffer the address of a buffer where the tree will be written. This buffer have to be freed after use -+ * \param human 0 for one-line tree, or 1 for human format (using tabs, newlines...) -+ * \return the number of bytes written to file or buffer -+ * \see roxml_commit_buffer -+ * \see roxml_commit_file -+ * -+ * This is a legacy function that proposes the same functionnalities as both -+ * \c roxml_commit_file and \c roxml_commit_buffer. New code should use the -+ * latter functions when needed. -+ * -+ * One should do: -+ * \code -+ * #include -+ * -+ * int main(void) -+ * { -+ * node_t *root = roxml_add_node(NULL, 0, ROXML_ELM_NODE, "xml", NULL); -+ * node_t *tmp = roxml_add_node(root, 0, ROXML_CMT_NODE, NULL, "sample XML file"); -+ * tmp = roxml_add_node(root, 0, ROXML_ELM_NODE, "item", NULL); -+ * roxml_add_node(tmp, 0, ROXML_ATTR_NODE, "id", "42"); -+ * tmp = roxml_add_node(tmp, 0, ROXML_ELM_NODE, "price", "24"); -+ * roxml_commit_changes(root, "/tmp/test.xml", NULL, 1); -+ * return 0; -+ * } -+ * \endcode -+ * to generate the following xml bloc: -+\verbatim -+ -+ -+ -+ -+ 24 -+ -+ -+ -+\endverbatim -+ * or also -+ * \code -+ * #include -+ * -+ * int main(void) -+ * { -+ * node_t *root = roxml_add_node(NULL, 0, ROXML_ELM_NODE, "xml", NULL); -+ * node_t *tmp = roxml_add_node(root, 0, ROXML_CMT_NODE, NULL, "sample XML file"); -+ * tmp = roxml_add_node(root, 0, ROXML_ELM_NODE, "item", NULL); -+ * roxml_add_node(tmp, 0, ROXML_ATTR_NODE, "id", "42"); -+ * tmp = roxml_add_node(tmp, 0, ROXML_ELM_NODE, "price", "24"); -+ * roxml_commit_changes(root, "/tmp/test.xml", NULL, 0); -+ * roxml_close(root); -+ * return 0; -+ * } -+ * \endcode -+ * to generate the following xml bloc: -+\verbatim -+24 -+\endverbatim -+ * the buffer variant works more or less the same way -+ * \code -+ * #include -+ * #include -+ * -+ * int main(void) -+ * { -+ * int len = 0; -+ * char * buffer = NULL; -+ * FILE * file_out; -+ * node_t *root = roxml_add_node(NULL, 0, ROXML_ELM_NODE, "xml", NULL); -+ * node_t *tmp = roxml_add_node(root, 0, ROXML_CMT_NODE, NULL, "sample XML file"); -+ * tmp = roxml_add_node(root, 0, ROXML_ELM_NODE, "item", NULL); -+ * roxml_add_node(tmp, 0, ROXML_ATTR_NODE, "id", "42"); -+ * tmp = roxml_add_node(tmp, 0, ROXML_ELM_NODE, "price", "24"); -+ * -+ * len = roxml_commit_changes(root, NULL, &buffer, 0); -+ * -+ * file_out = fopen("/tmp/test.xml", "w"); -+ * fwrite(buffer, 1, len, file_out); -+ * fclose(file_out); -+ * -+ * roxml_close(root); -+ * return 0; -+ * } -+ * \endcode -+ * to generate the following xml bloc: -+\verbatim -+24 -+\endverbatim -+ * \see roxml_commit_file -+ * \see roxml_commit_buffer -+ * \see roxml_commit_fd -+ */ -+ROXML_API int roxml_commit_changes(node_t *n, char *dest, char **buffer, int human); -+ -+/** \brief sync to named file function -+ * -+ * \fn roxml_commit_file(node_t *n, char * dest, int human); -+ * this function sync changes from the RAM tree to the given file in human or one-line format -+ * The tree will be processed starting with the root node 'n' and following with all its children or if n is the root, all its siblings and children. -+ * The tree will be dumped to a file if 'dest' is not null and contains a valid path. -+ * \warning in the case of a tree loaded using roxml_load_doc, the roxml_commit_file cannot be done to that same file -+ * since it may override datas it needs. This usually resultis in a new file filled with garbage. The solution is to write it to a temporary file and rename it after roxml_close the current tree. -+ * -+ * \param n the root node of the tree to write -+ * \param dest the path to a file to write tree to -+ * \param human 0 for one-line tree, or 1 for human format (using tabs, newlines...) -+ * \return the number of bytes written to file or buffer -+ * -+ * One should do: -+ * \code -+ * #include -+ * -+ * int main(void) -+ * { -+ * node_t *root = roxml_add_node(NULL, 0, ROXML_ELM_NODE, "xml", NULL); -+ * node_t *tmp = roxml_add_node(root, 0, ROXML_CMT_NODE, NULL, "sample XML file"); -+ * tmp = roxml_add_node(root, 0, ROXML_ELM_NODE, "item", NULL); -+ * roxml_add_node(tmp, 0, ROXML_ATTR_NODE, "id", "42"); -+ * tmp = roxml_add_node(tmp, 0, ROXML_ELM_NODE, "price", "24"); -+ * roxml_commit_file(root, "/tmp/test.xml", 1); -+ * roxml_close(root); -+ * return 0; -+ * } -+ * \endcode -+ * to generate the following xml bloc: -+\verbatim -+ -+ -+ -+ -+ 24 -+ -+ -+ -+\endverbatim -+ * or also -+ * \code -+ * #include -+ * -+ * int main(void) -+ * { -+ * node_t *root = roxml_add_node(NULL, 0, ROXML_ELM_NODE, "xml", NULL); -+ * node_t *tmp = roxml_add_node(root, 0, ROXML_CMT_NODE, NULL, "sample XML file"); -+ * tmp = roxml_add_node(root, 0, ROXML_ELM_NODE, "item", NULL); -+ * roxml_add_node(tmp, 0, ROXML_ATTR_NODE, "id", "42"); -+ * tmp = roxml_add_node(tmp, 0, ROXML_ELM_NODE, "price", "24"); -+ * roxml_commit_file(root, "/tmp/test.xml", 0); -+ * roxml_close(root); -+ * return 0; -+ * } -+ * \endcode -+ * to generate the following xml bloc: -+\verbatim -+24 -+\endverbatim -+ * \see roxml_commit_changes -+ * \see roxml_commit_buffer -+ * \see roxml_commit_fd -+ */ -+ROXML_API int roxml_commit_file(node_t *n, char *dest, int human); -+ -+/** \brief sync to a memory buffer function -+ * -+ * \fn roxml_commit_buffer(node_t *n, char ** buffer, int human); -+ * this function syncs changes from the RAM tree to the given buffer in human or one-line format -+ * The tree will be processed starting with the root node 'n' and following with all its children or if n is the root, all its siblings and children. -+ * The tree will be dumped to a buffer if 'buffer' is not null. the buffer is allocated by the library -+ * and a pointer to it will be stored into 'buffer'. The allocated buffer can be freed using free() -+ * -+ * \param n the root node of the tree to write -+ * \param buffer the address of a buffer where the tree will be written. This buffer have to be freed after use -+ * \param human 0 for one-line tree, or 1 for human format (using indentation, newlines...) -+ * \return the number of bytes written to file or buffer -+ * -+ * One should do: -+ * \code -+ * #include -+ * -+ * int main(void) -+ * { -+ * char *buffer = NULL; -+ * node_t *root = roxml_add_node(NULL, 0, ROXML_ELM_NODE, "xml", NULL); -+ * node_t *tmp = roxml_add_node(root, 0, ROXML_CMT_NODE, NULL, "sample XML file"); -+ * tmp = roxml_add_node(root, 0, ROXML_ELM_NODE, "item", NULL); -+ * roxml_add_node(tmp, 0, ROXML_ATTR_NODE, "id", "42"); -+ * tmp = roxml_add_node(tmp, 0, ROXML_ELM_NODE, "price", "24"); -+ * roxml_commit_changes(root, &buffer, 1); -+ * roxml_close(root); -+ * return 0; -+ * } -+ * \endcode -+ * to generate the following xml bloc: -+\verbatim -+ -+ -+ -+ -+ 24 -+ -+ -+ -+\endverbatim -+ * or also -+ * \code -+ * #include -+ * -+ * int main(void) -+ * { -+ * char *buffer = NULL; -+ * node_t *root = roxml_add_node(NULL, 0, ROXML_ELM_NODE, "xml", NULL); -+ * node_t *tmp = roxml_add_node(root, 0, ROXML_CMT_NODE, NULL, "sample XML file"); -+ * tmp = roxml_add_node(root, 0, ROXML_ELM_NODE, "item", NULL); -+ * roxml_add_node(tmp, 0, ROXML_ATTR_NODE, "id", "42"); -+ * tmp = roxml_add_node(tmp, 0, ROXML_ELM_NODE, "price", "24"); -+ * roxml_commit_buffer(root, &buffer, 0); -+ * roxml_close(root); -+ * return 0; -+ * } -+ * \endcode -+ * to generate the following xml bloc: -+\verbatim -+24 -+\endverbatim -+ * \see roxml_commit_changes -+ * \see roxml_commit_file -+ * \see roxml_commit_fd -+ */ -+ROXML_API int roxml_commit_buffer(node_t *n, char **buffer, int human); -+ -+/** \brief sync to file descriptor function -+ * -+ * \fn roxml_commit_fd(node_t *n, int fd, int human); -+ * this function synchronizes changes from the RAM tree to the given file in human or one-line format. -+ * The tree will be processed starting with the root node 'n' and following with all its children or if n is the root, all its siblings and children. -+ * The tree will be dumped to a file if fd is a valid file descriptor. -+ * \warning in the case of a tree loaded using roxml_load_doc, the roxml_commit_fd cannot be done to that same file -+ * since it may override datas it needs. This usually results in a new file filled with garbage. The solution is to write it to a temporary file and rename it after roxml_close the current tree. -+ * -+ * \param n the root node of the tree to write -+ * \param fd the file descriptor to write tree to -+ * \param human 0 for one-line tree, or 1 for human format (using tabs, newlines...) -+ * \return the number of bytes written to file -+ * -+ * The file described by fd is not truncated so this function allows one to append an XML subtree to an existing file. -+ * -+ * One should do: -+ * \code -+ * #include -+ * -+ * int main(void) -+ * { -+ * int fd = open("/tmp/test.xml", O_TRUNC|O_WRONLY, 0666); -+ * node_t *root = roxml_add_node(NULL, 0, ROXML_ELM_NODE, "xml", NULL); -+ * node_t *tmp = roxml_add_node(root, 0, ROXML_CMT_NODE, NULL, "sample XML file"); -+ * tmp = roxml_add_node(root, 0, ROXML_ELM_NODE, "item", NULL); -+ * roxml_add_node(tmp, 0, ROXML_ATTR_NODE, "id", "42"); -+ * tmp = roxml_add_node(tmp, 0, ROXML_ELM_NODE, "price", "24"); -+ * roxml_commit_fd(root, fd, 1); -+ * roxml_close(root); -+ * close(fd); -+ * return 0; -+ * } -+ * \endcode -+ * to generate the following xml bloc: -+\verbatim -+ -+ -+ -+ -+ 24 -+ -+ -+ -+\endverbatim -+ * or also -+ * \code -+ * #include -+ * -+ * int main(void) -+ * { -+ * int fd = open("/tmp/test.xml", O_TRUNC|O_WRONLY, 0666); -+ * node_t *root = roxml_add_node(NULL, 0, ROXML_ELM_NODE, "xml", NULL); -+ * node_t *tmp = roxml_add_node(root, 0, ROXML_CMT_NODE, NULL, "sample XML file"); -+ * tmp = roxml_add_node(root, 0, ROXML_ELM_NODE, "item", NULL); -+ * roxml_add_node(tmp, 0, ROXML_ATTR_NODE, "id", "42"); -+ * tmp = roxml_add_node(tmp, 0, ROXML_ELM_NODE, "price", "24"); -+ * roxml_commit_fd(root, fd, 0); -+ * roxml_close(root); -+ * close(fd); -+ * return 0; -+ * } -+ * \endcode -+ * to generate the following xml bloc: -+\verbatim -+24 -+\endverbatim -+ * \see roxml_commit_changes -+ * \see roxml_commit_file -+ * \see roxml_commit_buffer -+ */ -+ROXML_API int roxml_commit_fd(node_t *n, int fd, int human); -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif /* ROXML_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0053-simulation.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0053-simulation.h.patch deleted file mode 100644 index 26f7fa2..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0053-simulation.h.patch +++ /dev/null @@ -1,59 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/simulation.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/simulation.h 2026-03-13 13:24:35.603751289 +0100 -@@ -0,0 +1,56 @@ -+/* -+ * Copyright (C) 2021 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef SIMULATION_H -+#define SIMULATION_H -+ -+#include -+ -+#include -+ -+#include -+ -+#define BUFFER_SIZE 16*1024 -+ -+ -+/* SOO Smart Object topology (topo) management */ -+ -+/** -+ * Simulation environment -+ */ -+struct soo_simul_env { -+ sl_desc_t *sl_desc; -+ -+ unsigned char buffer[BUFFER_SIZE]; -+ unsigned int recv_count; -+ -+ /* List of topo_node entries */ -+ struct list_head topo_links; -+}; -+ -+typedef struct { -+ soo_env_t *node; -+ -+ struct list_head link; -+ -+} topo_node_entry_t; -+ -+void node_link(soo_env_t *soo, soo_env_t *target); -+void node_unlink(soo_env_t *soo, soo_env_t *soo_target); -+ -+#endif /* SIMULATION_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0054-soo.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0054-soo.h.patch deleted file mode 100644 index 07aabe8..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0054-soo.h.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/soo.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/soo.h 2026-03-13 13:24:35.603926672 +0100 -@@ -0,0 +1,38 @@ -+ -+/* -+ * Copyright (C) 2016-2022 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef SOO_H -+#define SOO_H -+ -+#include -+ -+int get_ME_state(unsigned int ME_slotID); -+void set_ME_state(unsigned int ME_slotID, ME_state_t state); -+ -+int32_t get_ME_free_slot(uint32_t size); -+ -+bool get_ME_id(uint32_t slotID, ME_id_t *ME_id); -+ -+void get_ME_id_array(ME_id_t *ME_id_array); -+char *xml_prepare_id_array(ME_id_t *ME_id_array); -+ -+void get_ME_desc(unsigned int slotID, ME_desc_t *ME_desc); -+ -+ -+#endif /* SOO_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0055-strtod.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0055-strtod.h.patch deleted file mode 100644 index e020ad3..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0055-strtod.h.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/strtod.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/strtod.h 2026-03-13 13:24:35.603696226 +0100 -@@ -0,0 +1,26 @@ -+ -+/* -+ * Copyright (C) 2021 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+ -+#ifndef STRTOD_H -+#define STRTOD_H -+ -+double strtod(const char *s, char **endptr); -+ -+#endif /* STRTOX_D */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0056-sysfs.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0056-sysfs.h.patch deleted file mode 100644 index 90f8a3f..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0056-sysfs.h.patch +++ /dev/null @@ -1,68 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/sysfs.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/sysfs.h 2026-03-13 13:24:35.603733276 +0100 -@@ -0,0 +1,65 @@ -+ -+/* -+ * Copyright (C) 2020 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef SOO_CORE_SYSFS_H -+#define SOO_CORE_SYSFS_H -+ -+/* Attribute names */ -+ -+typedef enum { -+ /* SOO */ -+ agencyUID, -+ name, -+ -+ /** SOOlink **/ -+ -+ /**** Discovery ****/ -+ buffer_count, neighbours, neighbours_ext, -+ -+ /** Backend **/ -+ -+ /**** vsensej ****/ -+ vsensej_js, -+ -+ /**** vfbdev ****/ -+ vfbdev_hres, -+ vfbdev_vres, -+ vfbdev_bpp, -+ vfbdev_size, -+ vfbdev_addr, -+ vfbdev_pid, -+ -+ /**** vwagoled ****/ -+ vwagoled_notify, -+ vwagoled_debug, -+ vwagoled_led_on, -+ vwagoled_led_off, -+ vwagoled_get_topology, -+ vwagoled_get_status -+ -+} soo_sysfs_attr_t; -+ -+/* These callback types are used to make use of show/store sysfs callback as generic as possible. */ -+typedef void (*sysfs_handler_t)(char *str); -+ -+void soo_sysfs_init(void); -+ -+void soo_sysfs_register(soo_sysfs_attr_t attr, sysfs_handler_t show_handler, sysfs_handler_t store_handler); -+ -+#endif /* SOO_CORE_SYSFS_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0057-types.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0057-types.h.patch deleted file mode 100644 index 5e08eac..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0057-types.h.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/types.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/types.h 2026-03-13 13:24:35.604099650 +0100 -@@ -0,0 +1,28 @@ -+ -+/* -+ * Copyright (C) 2016-2019 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+/* Maybe defined elsewhere... */ -+ -+#if defined(__KERNEL__) && !defined(TYPES_H) && !defined(_LINUX_TYPES_H) -+typedef unsigned char bool; -+ -+#define true 1 -+#define false 0 -+ -+#endif /* __KERNEL__ && !TYPES_H && !_LINUX_TYPES_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0058-asf.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0058-asf.h.patch deleted file mode 100644 index afdd2a3..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0058-asf.h.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/uapi/asf.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/uapi/asf.h 2026-03-13 13:24:35.603676192 +0100 -@@ -0,0 +1,34 @@ -+/* -+ * Copyright (C) 2014-2019 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+ -+#ifndef ASF_USR_H -+#define ASF_USR_H -+ -+/* ASF char drv related constants */ -+#define ASF_DEV_MAJOR 100 -+#define ASF_DEV_NAME "/dev/soo/asf" -+ -+/* ASF IOCTL - Send cmd to Hello World TA */ -+#define ASF_IOCTL_CRYPTO_TEST _IOW(0x5000DD30, 0, char) -+#define ASF_IOCTL_HELLO_WORLD_TEST _IOW(0x5000DD30, 1, char) -+#define ASF_IOCTL_OPEN_SESSION _IOW(0x5000DD30, 2, char) -+#define ASF_IOCTL_SESSION_OPENED _IOW(0x5000DD30, 3, char) -+#define ASF_IOCTL_CLOSE_SESSION _IOW(0x5000DD30, 4, char) -+ -+#endif /* ASF_USR_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0059-console.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0059-console.h.patch deleted file mode 100644 index dd81c73..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0059-console.h.patch +++ /dev/null @@ -1,74 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/uapi/console.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/uapi/console.h 2026-03-13 13:24:35.603614636 +0100 -@@ -0,0 +1,71 @@ -+/* -+ * Copyright (C) 2016-2025 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef CONSOLE_H -+#define CONSOLE_H -+ -+#include -+#include -+ -+#define CONSOLEIO_BUFFER_SIZE 256 -+ -+struct pt_regs; -+ -+void init_console(void); -+ -+void lprintk(char *format, ...); -+void lprintk_buffer(void *buffer, uint32_t n); -+void lprintk_buffer_separator(void *buffer, uint32_t n, char separator); -+ -+/* Debug functionalities */ -+void __soo_log(char *info, char *buf); -+void soo_log(char *format, ...); -+void soo_log_buffer(void *buffer, uint32_t n); -+ -+/* Used to print out to the syslog file */ -+void printk_buffer(void *buffer, uint32_t n); -+ -+void __lprintk(const char *format, va_list va); -+ -+void lprintk_int64_post(s64 number, char *post); -+void lprintk_int64(s64 number); -+ -+/* Return the current active domain for the uart console */ -+int avzcons_get_focus(void); -+ -+/* Set the active domain to next_domain for the uart console and return the current active domain. */ -+int avzcons_set_focus(int next_domain); -+ -+#define avzcons_NEXT_FOCUS() (avzcons_set_focus((avzcons_get_focus() + 1) % 4)) -+ -+/* Return the current active domain for the graphic console */ -+int vfb_get_focus(void); -+ -+/* Set the active domain to next_domain for the graphic console and return the current active domain. */ -+int vfb_set_focus(int next_domain); -+ -+#define VFB_NEXT_FOCUS() (vfb_set_focus((vfb_get_focus() + 1) % 3)) -+ -+/* Temporary helper until the vfbback interaction have been cleared up */ -+#define VFB_TRIG_IRQ() \ -+ ({\ -+ extern irqreturn_t vfb_interrupt(int irq, void *dev_id); \ -+ vfb_interrupt(0, NULL); \ -+ }) -+ -+#endif /* CONSOLE_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0060-debug.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0060-debug.h.patch deleted file mode 100644 index 83983b7..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0060-debug.h.patch +++ /dev/null @@ -1,79 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/uapi/debug.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/uapi/debug.h 2026-03-13 13:24:35.603590309 +0100 -@@ -0,0 +1,76 @@ -+/* -+ * Copyright (C) 2015-2019 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef UAPI_DEBUG_H -+#define UAPI_DEBUG_H -+ -+#ifdef __KERNEL__ -+#define force_print lprintk -+#else -+#define force_print printf -+#endif /* __KERNEL__ */ -+ -+#ifdef DEBUG -+#undef DBG -+ -+#ifdef __KERNEL__ -+ -+#include -+ -+#endif /* __KERNEL__ */ -+ -+/* -+ * force_print() is able to manage if the function is called from the kernel or the user space -+*/ -+#ifdef __KERNEL__ -+ -+#define DBG(fmt, ...) \ -+ do { \ -+ force_print("(CPU %d) %s:%d > "fmt, smp_processor_id(), __func__, __LINE__, ##__VA_ARGS__); \ -+ } while (0) -+ -+#else -+ -+#define DBG(fmt, ...) \ -+ do { \ -+ force_print("(user) %s:%d > "fmt, __func__, __LINE__, ##__VA_ARGS__); \ -+ } while (0) -+ -+#endif -+ -+ -+#define DBG0(...) DBG("%s", ##__VA_ARGS__) -+ -+#define DBG_BUFFER(buffer, ...) \ -+ do { \ -+ lprintk_buffer(buffer, ##__VA_ARGS__); \ -+ } while (0) -+ -+#else -+ -+#define DBG(fmt, ...) -+#define RTDBG(fmt, ...) -+#define DBG0(...) -+#define DBG_BUFFER(buffer, ...) -+#define DBG_ON__ -+#define DBG_OFF__ -+ -+#endif -+ -+#endif /* UAPI_DEBUG_H */ -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0061-injector.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0061-injector.h.patch deleted file mode 100644 index 3e63dd5..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0061-injector.h.patch +++ /dev/null @@ -1,111 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/uapi/injector.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/uapi/injector.h 2026-03-13 13:24:35.603632973 +0100 -@@ -0,0 +1,108 @@ -+/* -+ * Copyright (C) 2016 Daniel Rossier -+ * Copyright (C) 2017,2018 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef INJECTOR_H -+#define INJECTOR_H -+ -+#ifdef __KERNEL__ -+#include -+#include -+#include -+#else -+#include -+#include -+ -+#endif /* __KERNEL__ */ -+ -+ -+#define INJECTOR_DEV_NAME "/dev/soo/injector" -+ -+#ifdef __KERNEL__ -+ -+#define INJECTOR_MAJOR 122 -+ -+#define INJECTOR_N_RECV_BUFFERS 10 -+ -+/* Max ME size in bytes */ -+#define DATACOMM_ME_MAX_SIZE (32 * 1024 * 1024) -+ -+#endif /* __KERNEL__ */ -+ -+/* -+ * Types of buffer; helpful to manage buffers in a seamless way. -+ */ -+typedef enum { -+ INJECTOR_BUFFER_SEND = 0, -+ INJECTOR_BUFFER_RECV -+} injector_buffer_direction_t; -+ -+ -+#ifdef __KERNEL__ -+ -+/* -+ * - INJECTOR_BUFFER_FREE means the buffer is ready for send/receive operations. -+ * - INJECTOR_BUFFER_BUSY means the buffer is reserved for a ME. -+ * - INJECTOR_BUFFER_SENDING means the buffer is currently along the path for being sent out. -+ * The buffer can still be altered depending on the steps of sending (See SOOlink/Coder). -+ */ -+typedef enum { -+ INJECTOR_BUFFER_FREE = 0, -+ INJECTOR_BUFFER_BUSY, -+ INJECTOR_BUFFER_SENDING, -+} injector_buffer_status_t; -+ -+/* -+ * Buffer descriptor -+ */ -+typedef struct { -+ injector_buffer_status_t status; -+ -+ /* -+ * Reference to the ME. -+ */ -+ void *ME_data; -+ size_t size; -+ -+ uint32_t prio; -+ -+} injector_buffer_desc_t; -+ -+void injector_prepare(uint32_t size); -+void injector_clean_ME(void); -+uint32_t injector_retrieve_ME(void); -+ -+void *injector_get_ME_buffer(void); -+size_t injector_get_ME_size(void); -+ -+void *injector_get_tmp_buf(void); -+size_t injector_get_tmp_size(void); -+bool injector_is_full(void); -+void injector_set_full(bool _full); -+ -+void injector_receive_ME(void *ME, size_t size); -+ -+int inject_capsule(void *buffer, size_t size, int slotID); -+void start_capsule(int slotID); -+ -+ssize_t agency_read(struct file *fp, char *buff, size_t length, loff_t *ppos); -+ -+#endif /* __KERNEL__ */ -+ -+ -+#endif /* INJECTOR_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0062-soo.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0062-soo.h.patch deleted file mode 100644 index 7b180e9..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0062-soo.h.patch +++ /dev/null @@ -1,498 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/uapi/soo.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/uapi/soo.h 2026-03-20 09:16:24.194824702 +0100 -@@ -0,0 +1,495 @@ -+/* -+ * Copyright (C) 2014-2025 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef UAPI_SOO_H -+#define UAPI_SOO_H -+ -+#ifndef __ASSEMBLY__ -+ -+#include -+ -+/* This signature is used to check the coherency of the ME image, after a migration -+ * or a restoration for example. -+ */ -+#define SOO_ME_SIGNATURE "SooZ" -+ -+#endif /* __ASSEMBLY__ */ -+ -+#define AGENCY_CPU 0 -+#define AGENCY_RT_CPU 1 -+ -+#ifndef __ASSEMBLY__ -+ -+#include -+ -+#ifndef DOMID_T -+#define DOMID_T -+typedef uint16_t domid_t; -+typedef unsigned long addr_t; -+#endif -+ -+typedef uint32_t grant_ref_t; -+ -+/* Grant table management */ -+#define GRANT_INVALID_REF 0 -+ -+/* List of grant table commands which are processed by the hypervisor */ -+ -+#define GNTTAB_grant_page 1 -+#define GNTTAB_revoke_page 2 -+#define GNTTAB_map_page 3 -+#define GNTTAB_unmap_page 4 -+ -+struct gnttab_op { -+ /* Command to be processed in the hypercall */ -+ uint32_t cmd; -+ -+ /* Peer domain */ -+ domid_t domid; -+ -+ /* pfn to be granted or pfn associated to an existing ref */ -+ addr_t pfn; -+ -+ /* Grant reference */ -+ grant_ref_t ref; -+}; -+typedef struct gnttab_op gnttab_op_t; -+ -+void do_gnttab(gnttab_op_t *args); -+ -+/* -+ * Page frame number to set the framebuffer addresses. -+ * The physical addresses may be splitted in multiple parts, which requires to have -+ * multiple set of strating page frame and page count -+ */ -+ -+#define MAX_FBDEV_PFN 8 -+typedef struct fbdev_pfns { -+ size_t pfn_count; -+ addr_t pfn[MAX_FBDEV_PFN]; -+ size_t page_count[MAX_FBDEV_PFN]; -+} fbdev_pfns_t; -+ -+#define AVZ_SCHEDULER_FLIP 0 -+ -+/* -+ * ME states: -+ * - ME_state_stopped: Capsule is stopped (right after start or later) -+ * - ME_state_living: ME is full-functional and activated (all frontend devices are consistent) -+ * - ME_state_suspended: ME is suspended before migrating. This state is maintained for the resident ME instance -+ * - ME_state_hibernate: ME is in a state of hibernate snapshot -+ * - ME_state_resuming: ME ready to perform resuming (after recovering) -+ * - ME_state_awakened: ME is just being awakened -+ * - ME_state_terminated: ME has been terminated (by a shutdown) -+ * - ME_state_dead: ME does not exist -+ */ -+typedef enum { -+ ME_state_stopped, -+ ME_state_living, -+ ME_state_suspended, -+ ME_state_hibernate, -+ ME_state_resuming, -+ ME_state_awakened, -+ ME_state_killed, -+ ME_state_terminated, -+ ME_state_dead -+} ME_state_t; -+ -+/* Keep information about slot availability -+ * FREE: the slot is available (no ME) -+ * BUSY: the slot is allocated a ME -+ */ -+typedef enum { ME_SLOT_FREE, ME_SLOT_BUSY } ME_slotState_t; -+ -+/* ME ID related information */ -+#define ME_NAME_SIZE 40 -+#define ME_SHORTDESC_SIZE 1024 -+ -+/* -+ * Definition of ME ID information used by functions which need -+ * to get a list of running MEs with their information. -+ */ -+typedef struct { -+ uint32_t slotID; -+ ME_state_t state; -+ -+ uint64_t spid; -+ -+ char name[ME_NAME_SIZE]; -+ char shortdesc[ME_SHORTDESC_SIZE]; -+} ME_id_t; -+ -+struct work_struct; -+struct semaphore; -+ -+/* -+ * Directcomm event management -+ */ -+typedef enum { -+ DC_NO_EVENT, -+ DC_PRE_SUSPEND, -+ DC_SUSPEND, -+ DC_RESUME, -+ DC_SHUTDOWN, -+ DC_POST_ACTIVATE, -+ DC_TRIGGER_DEV_PROBE, -+ DC_TRIGGER_LOCAL_COOPERATION, -+ -+ DC_EVENT_MAX /* Used to determine the number of DC events */ -+} dc_event_t; -+ -+/* -+ * Callback function associated to dc_event. -+ */ -+typedef void(dc_event_fn_t)(dc_event_t dc_event); -+ -+extern atomic_t dc_outgoing_domID[DC_EVENT_MAX]; -+extern atomic_t dc_incoming_domID[DC_EVENT_MAX]; -+ -+/* -+ * IOCTL commands for migration. -+ * This part is shared between the kernel and user spaces. -+ */ -+ -+/* -+ * IOCTL codes -+ */ -+ -+#define AGENCY_IOCTL_READ_SNAPSHOT _IOWR('S', 1, agency_ioctl_args_t) -+#define AGENCY_IOCTL_WRITE_SNAPSHOT _IOW('S', 2, agency_ioctl_args_t) -+#define AGENCY_IOCTL_SHUTDOWN _IOW('S', 3, agency_ioctl_args_t) -+#define AGENCY_IOCTL_INJECT_CAPSULE _IOWR('S', 4, agency_ioctl_args_t) -+#define AGENCY_IOCTL_START_CAPSULE _IOWR('S', 5, agency_ioctl_args_t) -+#define AGENCY_IOCTL_GET_ME_ID _IOWR('S', 6, agency_ioctl_args_t) -+#define AGENCY_IOCTL_GET_ME_ID_ARRAY _IOR('S', 7, agency_ioctl_args_t) -+ -+#define SOO_NAME_SIZE 16 -+ -+/* -+ * ME descriptor -+ * -+ * WARNING !! Be careful when modifying this structure. It *MUST* be aligned with -+ * the same structure used in the ME. -+ */ -+typedef struct { -+ unsigned int slotID; -+ uint64_t spid; -+ -+ ME_state_t state; -+ -+ unsigned int size; /* Size of the ME with the struct dom_context size */ -+ unsigned int dc_evtchn; -+ -+ unsigned int vbstore_revtchn, vbstore_levtchn; -+ addr_t vbstore_pfn; -+ -+ void (*resume_fn)(void); -+ -+} ME_desc_t; -+ -+/* -+ * Agency descriptor -+ */ -+typedef struct { -+ /* -+ * SOO agencyUID unique 64-bit ID - Allowing to identify a SOO device. -+ * agencyUID 0 is NOT valid. -+ */ -+ -+ uint64_t agencyUID; /* Agency UID */ -+ -+ /* Event channels used for directcomm channel between agency and agency-RT or ME */ -+ unsigned int dc_evtchn[MAX_DOMAINS]; -+ -+ /* Event channels used by vbstore */ -+ unsigned int vbstore_evtchn[MAX_DOMAINS]; -+ -+ /* Local agency event channel for vbstore */ -+ uint32_t vbstore_levtchn; -+ -+} agency_desc_t; -+ -+/* -+ * SOO agency & ME descriptor - This structure is used in the shared info page of the agency or ME domain. -+ */ -+ -+typedef struct { -+ union { -+ agency_desc_t agency; -+ ME_desc_t ME; -+ } u; -+} dom_desc_t; -+ -+struct avz_shared { -+ domid_t domID; -+ -+ /* Domain related information */ -+ unsigned long nr_pages; /* Total pages allocated to this domain. */ -+ -+ addr_t fdt_paddr; -+ -+ /* Other fields related to domain life */ -+ -+ unsigned long domain_stack; -+ uint8_t evtchn_upcall_pending; -+ -+ /* -+ * A domain can create "event channels" on which it can send and receive -+ * asynchronous event notifications. -+ * Each event channel is assigned a bit in evtchn_pending and its modification has to be -+ * kept atomic. -+ */ -+ -+ volatile bool evtchn_pending[NR_EVTCHN]; -+ -+ atomic_t dc_event; -+ -+ /* This field is used when taking a snapshot of us. It will be -+ * useful to restore later. Some timer deadlines are based on it and -+ * will need to be updated accordingly. -+ */ -+ u64 current_s_time; -+ -+ /* Agency or ME descriptor */ -+ dom_desc_t dom_desc; -+ -+ /* Used to store a signature for consistency checking, for example after a migration/restoration */ -+ char signature[4]; -+}; -+ -+typedef struct avz_shared avz_shared_t; -+extern volatile avz_shared_t *avz_shared; -+ -+/* struct agency_ioctl_args used in IOCTLs */ -+typedef struct agency_ioctl_args { -+ void *buffer; /* IN/OUT */ -+ int slotID; -+ long value; /* IN/OUT */ -+} agency_ioctl_args_t; -+ -+#define NSECS 1000000000ull -+#define SECONDS(_s) ((u64) ((_s) * 1000000000ull)) -+#define MILLISECS(_ms) ((u64) ((_ms) * 1000000ull)) -+#define MICROSECS(_us) ((u64) ((_us) * 1000ull)) -+ -+#define VBUS_TASK_PRIO 50 -+ -+/* -+ * The priority of the Directcomm thread must be higher than the priority of the SDIO -+ * thread to make the Directcomm thread process a DC event and release it before any new -+ * request by the SDIO's side thus avoiding a deadlock. -+ */ -+#define DC_ISR_TASK_PRIO 55 -+ -+/* -+ * SOO hypercall management -+ */ -+ -+/* AVZ hypercalls devoted to SOO */ -+ -+#define AVZ_ME_READ_SNAPSHOT 4 -+#define AVZ_ME_WRITE_SNAPSHOT 5 -+#define AVZ_START_CAPSULE 6 -+#define AVZ_INJECT_CAPSULE 7 -+#define AVZ_KILL_ME 8 -+#define AVZ_DC_EVENT_SET 9 -+#define AVZ_GET_ME_STATE 10 -+#define AVZ_SET_ME_STATE 11 -+#define AVZ_GET_DOM_DESC 12 -+#define AVZ_GRANT_TABLE_OP 13 -+#define AVZ_FBDEV_SET_PFNS 14 -+#define AVZ_FBDEV_CHANGE_FOCUS 15 -+#define AVZ_FBDEV_GET_ME_ADDR 16 -+ -+/* AVZ_INJECT_CAPSULE */ -+typedef struct { -+ void *itb_paddr; -+ int slotID; -+ int capsuleID; -+} avz_inject_capsule_t; -+ -+/* AVZ_START_CAPSULE */ -+typedef struct { -+ int slotID; -+} avz_start_capsule_t; -+ -+/* AVZ_DC_EVENT_SET */ -+typedef struct { -+ unsigned int domID; -+ dc_event_t dc_event; -+ int state; -+} avz_dc_event_t; -+ -+/* AVZ_GET_ME_STATE */ -+/* AVZ_SET_ME_STATE */ -+typedef struct { -+ uint32_t slotID; -+ int state; -+} avz_me_state_t; -+ -+/* AVZ_GET_DOM_DESC */ -+typedef struct { -+ uint32_t slotID; -+ dom_desc_t dom_desc; -+} avz_dom_desc_t; -+ -+/* AVZ_GET_ME_FREE_SLOT */ -+typedef struct { -+ int slotID; -+ int size; -+} avz_free_slot_t; -+ -+/* AVZ_MIG_INIT */ -+typedef struct { -+ int slotID; -+} avz_mig_init_t; -+ -+/* AVZ_READ_SNAPSHOT */ -+/* AVZ_WRITE_SNAPSHOT */ -+typedef struct { -+ void *snapshot_paddr; -+ int32_t slotID; -+ int size; -+} avz_snapshot_t; -+ -+/* AVZ_KILL_ME */ -+typedef struct { -+ uint32_t slotID; -+} avz_kill_me_t; -+ -+/* AVZ_GRANT_TABLE_OP */ -+typedef struct { -+ gnttab_op_t gnttab_op; -+} avz_gnttab_t; -+ -+/* AVZ_FBDEV_SET_PFNS */ -+typedef struct { -+ fbdev_pfns_t fbdev; -+} avz_fbdev_pfns_t; -+ -+/* AVZ_FBDEV_CHANGE_FOCUS */ -+typedef struct { -+ int new_slotID; -+} avz_fbdev_focus_t; -+ -+/* AVZ_FBDEV_GET_ME_ADDR */ -+typedef struct { -+ addr_t paddr; -+} avz_fbdev_addr_t; -+ -+/* -+ * AVZ hypercall argument -+ */ -+typedef struct { -+ int cmd; -+ union { -+ avz_evtchn_t avz_evtchn; -+ avz_inject_capsule_t avz_inject_capsule_args; -+ avz_start_capsule_t avz_start_capsule_args; -+ avz_dc_event_t avz_dc_event_args; -+ avz_me_state_t avz_me_state_args; -+ avz_dom_desc_t avz_dom_desc_args; -+ avz_free_slot_t avz_free_slot_args; -+ avz_mig_init_t avz_mig_init_args; -+ avz_snapshot_t avz_snapshot_args; -+ avz_kill_me_t avz_kill_me_args; -+ avz_console_io_t avz_console_io_args; -+ avz_domctl_t avz_domctl_args; -+ avz_gnttab_t avz_gnttab_args; -+ avz_fbdev_pfns_t avz_fbdev_pfns_args; -+ avz_fbdev_focus_t avz_fbdev_focus_args; -+ avz_fbdev_addr_t avz_fbdev_addr_args; -+ } u; -+} avz_hyp_t; -+ -+typedef struct { -+ void *val; -+} pre_suspend_args_t; -+ -+typedef struct { -+ void *val; -+} pre_resume_args_t; -+ -+typedef struct { -+ void *val; -+} post_activate_args_t; -+ -+typedef struct { -+ char soo_name[SOO_NAME_SIZE]; -+} soo_name_args_t; -+ -+/* -+ * SOO callback functions. -+ * The following definitions are used as argument in domcalls or in the -+ * agency_ctl() function as a callback to be propagated to a specific ME. -+ * -+ */ -+ -+#define CB_PRE_SUSPEND 4 -+#define CB_PRE_RESUME 5 -+#define CB_POST_ACTIVATE 6 -+#define CB_AGENCY_CTL 9 -+ -+typedef struct soo_domcall_arg { -+ /* Stores the agency ctl function. -+ * Possibly, the agency_ctl function can be associated to a callback operation asked by a ME -+ */ -+ unsigned int cmd; -+ unsigned int slotID; /* Origin of the domcall */ -+ -+ union { -+ pre_suspend_args_t pre_suspend_args; -+ pre_resume_args_t pre_resume_args; -+ -+ post_activate_args_t post_activate_args; -+ ME_state_t set_me_state_args; -+ } u; -+ -+} soo_domcall_arg_t; -+ -+/* Callbacks initiated by agency ping */ -+void cb_pre_resume(soo_domcall_arg_t *args); -+void cb_pre_suspend(soo_domcall_arg_t *args); -+ -+void cb_post_activate(soo_domcall_arg_t *args); -+ -+void cb_shutdown(void); -+ -+void callbacks_init(void); -+ -+void set_dc_event(domid_t domid, dc_event_t dc_event); -+ -+void do_soo_activity(void *arg); -+ -+void soo_guest_activity_init(void); -+ -+void dc_stable(int dc_event); -+void tell_dc_stable(int dc_event); -+ -+void do_sync_dom(int slotID, dc_event_t); -+void do_async_dom(int slotID, dc_event_t); -+ -+void perform_task(dc_event_t dc_event); -+ -+void shutdown_ME(unsigned int ME_slotID); -+ -+void cache_flush_all(void); -+ -+#endif /* __ASSEMBLY__ */ -+ -+#endif /* UAPI_SOO_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0063-vbstore.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0063-vbstore.h.patch deleted file mode 100644 index 29fd68f..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0063-vbstore.h.patch +++ /dev/null @@ -1,133 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/vbstore.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/vbstore.h 2026-03-13 13:24:35.604040279 +0100 -@@ -0,0 +1,130 @@ -+/* -+ * Copyright (C) 2016-2018 Baptiste Delporte -+ * Copyright (C) 2016-2019 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef __VBSTORE_H -+#define __VBSTORE_H -+ -+#include -+#include -+#include -+ -+enum vbus_msg_type -+{ -+ VBS_DIRECTORY, -+ VBS_DIRECTORY_EXISTS, -+ VBS_READ, -+ VBS_WATCH, -+ VBS_UNWATCH, -+ VBS_TRANSACTION_END, -+ VBS_WRITE, -+ VBS_MKDIR, -+ VBS_RM, -+ VBS_WATCH_EVENT, -+}; -+typedef enum vbus_msg_type vbus_msg_type_t; -+ -+struct msgvec { -+ void *base; -+ uint32_t len; -+}; -+typedef struct msgvec msgvec_t; -+ -+struct vbus_msg -+{ -+ struct list_head list; /* Used to store the msg into the standby list */ -+ -+ struct completion *reply_wait; -+ -+ uint32_t type; /* vbus_msg type */ -+ uint32_t len; /* Length of data following this. */ -+ -+ uint32_t id; /* Unique msg ID (32-bit circular) */ -+ uint32_t transactionID; /* A non-zero value means we are in a transaction */ -+ -+ struct vbus_msg *reply; /* Refer to another vbus_msg message (case of the reply) */ -+ -+ /* Message content */ -+ char *payload; -+ -+}; -+typedef struct vbus_msg vbus_msg_t; -+ -+/* Inter-domain shared memory communications. */ -+#define VBSTORE_RING_SIZE 1024 -+ -+typedef uint32_t VBSTORE_RING_IDX; -+ -+struct vbstore_domain_interface { -+ char req[VBSTORE_RING_SIZE]; /* Requests to vbstore daemon. */ -+ char rsp[VBSTORE_RING_SIZE]; /* Replies and async watch events. */ -+ volatile VBSTORE_RING_IDX req_cons, req_prod, req_pvt; -+ volatile VBSTORE_RING_IDX rsp_cons, rsp_prod, rsp_pvt; -+ -+ domid_t domid; -+}; -+typedef volatile struct vbstore_domain_interface vbstore_intf_t; -+ -+struct vbs_watcher { -+ struct list_head list; -+ volatile vbstore_intf_t *intf; -+}; -+ -+struct vbs_node { -+ struct list_head children; /* subtree */ -+ struct list_head watchers; -+ struct list_head sibling; /* at the same level */ -+ struct vbs_node *parent; -+ char *key; -+ void *value; -+}; -+ -+void vbstorage_agency_init(void); -+ -+struct vbus_device; -+ -+struct vbs_node *vbs_store_lookup(const char *key); -+void vbs_notify_watchers(vbus_msg_t vbus_msg, struct vbs_node *node); -+int vbs_store_read(const char *key, char **value, size_t size); -+int vbs_store_write(const char *key, const char *value); -+int vbs_store_write_notify(const char *key, const char *value, struct vbs_node **notify_node); -+int vbs_store_mkdir(const char *key); -+int vbs_store_mkdir_notify(const char *key, struct vbs_node **notify_node); -+int vbs_store_rm(const char *key); -+int vbs_store_readdir(const char *key, char *children, const size_t size_children); -+int vbs_store_dir_exists(const char *key, char *result); -+int vbs_store_watch(const char *key, vbstore_intf_t *intf); -+int vbs_store_unwatch(const char *key, vbstore_intf_t *intf); -+ -+void vbs_get_absolute_path(struct vbs_node *node, char *path); -+ -+void vbs_dump(void); -+void vbs_dump_watches(void); -+ -+extern struct vbstore_domain_interface *vbstore_intf[MAX_DOMAINS]; -+extern grant_ref_t vbstore_grant_ref[MAX_DOMAINS]; -+ -+extern vbstore_intf_t *__intf; -+ -+extern int vbus_vbstore_init(void); -+ -+struct vbus_transaction; -+extern unsigned int transactionID; -+ -+ -+#endif /* __VBSTORE_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0064-vbus.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0064-vbus.h.patch deleted file mode 100644 index af03140..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0064-vbus.h.patch +++ /dev/null @@ -1,339 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/vbus.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/vbus.h 2026-03-13 13:24:35.603547515 +0100 -@@ -0,0 +1,336 @@ -+/* -+ * Copyright (C) 2014-2019 Daniel Rossier -+ * Copyright (C) 2016, 2018 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef VBUS_H -+#define VBUS_H -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+/* -+ * The following states are used to synchronize backend and frontend activities. -+ * Detailed description is given in the SOO Framework technical reference. -+ */ -+ -+enum vbus_state -+{ -+ VbusStateUnknown = 0, -+ VbusStateInitialising = 1, -+ VbusStateInitWait = 2, -+ VbusStateInitialised = 3, -+ VbusStateConnected = 4, -+ VbusStateClosing = 5, -+ VbusStateClosed = 6, -+ VbusStateReconfiguring = 7, -+ VbusStateReconfigured = 8, -+ VbusStateSuspending = 9, -+ VbusStateSuspended = 10, -+ VbusStateResuming = 11 -+ -+}; -+ -+/* VBS_KEY_LENGTH as it is managed by vbstore */ -+#define VBS_KEY_LENGTH 50 -+#define VBUS_DEV_TYPE 32 -+ -+/* Register callback to watch this node. */ -+struct vbus_watch -+{ -+ struct list_head list; -+ -+ /* Path being watched. */ -+ char *node; -+ -+ /* Callback (executed in a process context with no locks held). */ -+ void (*callback)(struct vbus_watch *); -+ -+ volatile bool pending; -+}; -+ -+struct vbus_type -+{ -+ char *root; -+ unsigned int levels; -+ void (*get_bus_id)(char bus_id[VBS_KEY_LENGTH], const char *nodename); -+ -+ int (*probe)(struct vbus_type *bus, const char *type, const char *dir); -+ void (*otherend_changed)(struct vbus_watch *watch); -+ -+ void (*suspend)(void); -+ void (*resume)(void); -+ -+ struct bus_type bus; -+}; -+ -+ -+/* A vbus device. */ -+struct vbus_device { -+ char devicetype[VBUS_DEV_TYPE]; -+ char nodename[VBS_KEY_LENGTH]; -+ char otherend[VBS_KEY_LENGTH]; -+ int otherend_id; -+ -+ struct vbus_watch otherend_watch; -+ -+ struct device dev; -+ -+ enum vbus_state state; -+ -+ /* -+ * State of the associated frontend. -+ * As soon as the frontend state, we get a watch event on the state -+ * property from vbstore, and we are up-to-date. -+ */ -+ enum vbus_state fe_state; -+ -+ /* So far, only the ME use this completion struct. On the agency side, -+ * the device can not be shutdown on live. -+ */ -+ struct completion down; -+ -+ /* This completion lock is used for synchronizing interactions during connecting, suspending and resuming activities. */ -+ struct completion sync_backfront; -+ -+ int resuming; -+}; -+ -+static inline struct vbus_device *to_vbus_device(struct device *dev) -+{ -+ return container_of(dev, struct vbus_device, dev); -+} -+ -+/* A vbus driver. */ -+struct vbus_driver { -+ char *name; -+ struct module *owner; -+ char devicetype[32]; -+ -+ struct device_driver driver; -+ -+ /* Private stucture for this vbus driver */ -+ void *priv; -+ -+ void (*probe)(struct vbus_device *dev); -+ void (*remove)(struct vbus_device *dev); -+ -+ void (*otherend_changed)(struct vbus_device *dev, enum vbus_state backend_state); -+ -+ int (*suspend)(struct vbus_device *dev); -+ int (*resume)(struct vbus_device *dev); -+ -+ int (*uevent)(struct vbus_device *, struct kobj_uevent_env *); -+ -+ void (*read_otherend_details)(struct vbus_device *dev); -+}; -+ -+static inline struct vbus_driver *to_vbus_driver(struct device_driver *drv) -+{ -+ return container_of(drv, struct vbus_driver, driver); -+} -+ -+/* -+ * Attach a private structure to a vbus driver -+ */ -+static inline void vdrv_set_priv(struct vbus_driver *vdrv, void *priv) { -+ vdrv->priv = priv; -+} -+ -+/* -+ * Retrieve the private structure attached to a specific vbus driver -+ */ -+static inline const void *vdrv_get_priv(const struct vbus_driver *vdrv) { -+ return vdrv->priv; -+} -+ -+/* -+ * Retrieve the private structure attached to a vbus driver from a particular vbus device -+ */ -+static inline const void *vdrv_get_vdevpriv(const struct vbus_device *vdev) { -+ return vdrv_get_priv(to_vbus_driver(vdev->dev.driver)); -+} -+ -+void __vbus_register_frontend(struct vbus_driver *drv, struct module *owner, const char *mod_name); -+ -+static inline void vbus_register_frontend(struct vbus_driver *drv) -+{ -+ WARN_ON(drv->owner != THIS_MODULE); -+ return __vbus_register_frontend(drv, THIS_MODULE, KBUILD_MODNAME); -+} -+ -+void __vbus_register_backend(struct vbus_driver *drv, struct module *owner, const char *mod_name); -+ -+static inline void vbus_register_backend(struct vbus_driver *drv) -+{ -+ WARN_ON(drv->owner != THIS_MODULE); -+ return __vbus_register_backend(drv, THIS_MODULE, KBUILD_MODNAME); -+} -+ -+void vbus_unregister_driver(struct vbus_driver *drv); -+ -+struct vbus_transaction -+{ -+ u32 id; /* Unique non-zereo value to identify a transaction */ -+}; -+ -+/* Nil transaction ID. */ -+#define VBT_NIL ((struct vbus_transaction) { 0 }) -+ -+char **vbus_directory(struct vbus_transaction t, const char *dir, const char *node, unsigned int *num); -+int vbus_directory_exists(struct vbus_transaction t, const char *dir, const char *node); -+void *vbus_read(struct vbus_transaction t, const char *dir, const char *node, unsigned int *len); -+void vbus_write(struct vbus_transaction t, const char *dir, const char *node, const char *string); -+void vbus_mkdir(struct vbus_transaction t, const char *dir, const char *node); -+int vbus_exists(struct vbus_transaction t, const char *dir, const char *node); -+void vbus_rm(struct vbus_transaction t, const char *dir, const char *node); -+ -+void vbus_transaction_start(struct vbus_transaction *t); -+void vbus_transaction_end(struct vbus_transaction t); -+ -+/* Single read and scanf: returns -errno or num scanned if > 0. */ -+int vbus_scanf(struct vbus_transaction t, const char *dir, const char *node, const char *fmt, ...) -+ __attribute__((format(scanf, 4, 5))); -+ -+/* Single printf and write: returns -errno or 0. */ -+void vbus_printf(struct vbus_transaction t, const char *dir, const char *node, const char *fmt, ...) -+ __attribute__((format(printf, 4, 5))); -+ -+/* Generic read function: NULL-terminated triples of name, -+ * sprintf-style type string, and pointer. Returns 0 or errno.*/ -+bool vbus_gather(struct vbus_transaction t, const char *dir, ...); -+ -+void free_otherend_watch(struct vbus_device *dev, bool with_vbus); -+ -+extern void vbstore_init(void); -+ -+bool is_vbstore_populated(void); -+ -+void register_vbus_watch(struct vbus_watch *watch); -+void unregister_vbus_watch_without_vbus(struct vbus_watch *watch); -+void unregister_vbus_watch(struct vbus_watch *watch); -+ -+void remove_device(const char *path); -+void vbus_cleanup_device(const char *path, struct bus_type *bus); -+ -+struct work_struct; -+ -+extern struct completion backend_initialized; -+ -+extern int vbus_match(struct device *_dev, const struct device_driver *_drv); -+extern int vbus_dev_probe(struct device *_dev); -+ -+int vbus_probe_backend(int domid); -+int vbus_probe_backend_init(void); -+ -+extern void vbus_dev_remove(struct device *_dev); -+extern void vbus_register_driver_common(struct vbus_driver *drv, struct vbus_type *bus, struct module *owner, const char *mod_name); -+ -+extern int vbus_probe_devices(struct vbus_type *bus); -+ -+extern void vbus_dev_changed(const char *node, char *type, struct vbus_type *bus); -+ -+extern void vbus_dev_shutdown(struct device *_dev); -+ -+extern int vbus_dev_suspend(struct device *dev, pm_message_t state); -+extern int vbus_dev_resume(struct device *dev); -+ -+extern void vbus_otherend_changed(struct vbus_watch *watch); -+ -+extern void vbus_read_otherend_details(struct vbus_device *vdev, char *id_node, char *path_node); -+extern int vbus_suspend_dev(struct bus_type *bus, unsigned int domID); -+extern int vbus_resume_dev(struct bus_type *bus, unsigned int domID); -+ -+/* Prepare for domain suspend: then resume or cancel the suspend. */ -+int vbus_suspend_devices(unsigned int domID); -+int vbus_resume_devices(unsigned int domID); -+ -+int vdev_probe(char *node); -+void vbus_probe_frontend_init(void); -+ -+#define VBUS_IS_ERR_READ(str) ({ \ -+ if (!IS_ERR(str) && strlen(str) == 0) { \ -+ kfree(str); \ -+ str = ERR_PTR(-ERANGE); \ -+ } \ -+ IS_ERR(str); \ -+}) -+ -+#define VBUS_EXIST_ERR(err) ((err) == -ENOENT || (err) == -ERANGE) -+ -+void vbus_watch_path(char *path, struct vbus_watch *watch, void (*callback)(struct vbus_watch *)); -+void vbus_watch_pathfmt(struct vbus_device *dev, struct vbus_watch *watch, void (*callback)(struct vbus_watch *), const char *pathfmt, ...) -+ __attribute__ ((format (printf, 4, 5))); -+ -+void vbus_unmap_ring(struct vbus_device *dev, grant_ref_t ref); -+void vbus_map_ring(struct vbus_device *dev, grant_ref_t ref, void **vaddr); -+ -+void vbus_alloc_evtchn(struct vbus_device *dev, uint32_t *port); -+void vbus_bind_evtchn(struct vbus_device *dev, uint32_t remote_port, uint32_t *port); -+void vbus_free_evtchn(struct vbus_device *dev, uint32_t port); -+ -+enum vbus_state vbus_read_driver_state(const char *path); -+ -+const char *vbus_strstate(enum vbus_state state); -+ -+void remove_vbstore_entries(void); -+ -+void vbuswatch_thread_sync(void); -+int get_vbstore_evtchn(void); -+ -+void ping_remote_domain(int domID, void (*ping_callback)(void)); -+ -+void vbs_prepare_to_suspend(struct work_struct *unused); -+void vbs_prepare_to_resume(struct work_struct *unused); -+ -+void vbs_suspend(void); -+void vbs_resume(void); -+ -+void presetup_register_watch(struct vbus_watch *watch); -+void presetup_unregister_watch(struct vbus_watch *watch); -+ -+void vbstore_devices_populate(void); -+void vbstore_trigger_dev_probe(void); -+int vbstore_uart_remove(unsigned int domID); -+ -+void postmig_setup(void); -+int gnttab_remove(bool with_vbus); -+ -+void remove_devices(void); -+ -+void register_dc_event_callback(dc_event_t dc_event, dc_event_fn_t *callback); -+ -+#ifdef DEBUG -+#undef DBG -+#define DBG(fmt, ...) \ -+ do { \ -+ printk("%s:%i > "fmt, __FUNCTION__, __LINE__, ##__VA_ARGS__); \ -+ } while(0) -+#else -+#define DBG(fmt, ...) -+#endif -+ -+#endif /* VBUS_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0065-vdevback.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0065-vdevback.h.patch deleted file mode 100644 index f9f129b..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0065-vdevback.h.patch +++ /dev/null @@ -1,93 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/vdevback.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/vdevback.h 2026-03-13 13:24:35.604174597 +0100 -@@ -0,0 +1,90 @@ -+/* -+ * Copyright (C) 2020 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef VDEVBACK_H -+#define VDEVBACK_H -+ -+#include -+ -+#include -+ -+#include -+#include -+ -+struct vdrvback; -+ -+struct vdevback { -+ -+ /* Backend activity related declarations - managed by vdevback generic code */ -+ -+ atomic_t processing_count; -+ -+ /* Protection against shutdown (or other) */ -+ struct mutex processing_lock; -+ -+ /* Synchronization between ongoing processing and suspend/closing */ -+ struct completion sync; -+ -+ /* Tell if the frontend is in connected state */ -+ bool vdevfront_connected; -+}; -+typedef struct vdevback vdevback_t; -+ -+struct vdrvback { -+ -+ struct vbus_driver vdrv; -+ -+ void (*probe)(struct vbus_device *vdev); -+ void (*remove)(struct vbus_device *vdev); -+ -+ void (*close)(struct vbus_device *vdev); -+ -+ void (*connected)(struct vbus_device *vdev); -+ void (*reconfigured)(struct vbus_device *vdev); -+ void (*resume)(struct vbus_device *vdev); -+ void (*suspend)(struct vbus_device *vdev); -+ -+}; -+typedef struct vdrvback vdrvback_t; -+ -+static inline vdrvback_t *to_vdrvback(struct vbus_device *vdev) { -+ struct vbus_driver *vdrv = to_vbus_driver(vdev->dev.driver); -+ return container_of(vdrv, vdrvback_t, vdrv); -+} -+ -+void vdevback_init(char *name, vdrvback_t *vdrvback); -+bool vdevback_processing_begin(struct vbus_device *vdev); -+void vdevback_processing_end(struct vbus_device *vdev); -+ -+bool vdevfront_is_connected(struct vbus_device *vdev); -+/* Used to generically store a list of connected vbus_device */ -+struct vdev_entry { -+ struct list_head list; -+ struct vbus_device *vdev; -+}; -+typedef struct vdev_entry vdev_entry_t; -+ -+void vdevback_add_entry(struct vbus_device *vdev, struct list_head *list); -+struct vbus_device *vdevback_get_entry(uint32_t domid, struct list_head *_list); -+void vdevback_del_entry(struct vbus_device *vdev, struct list_head *_list); -+ -+#endif /* VDEVBACK_H */ -+ -+ -+ -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0066-Kconfig.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0066-Kconfig.patch deleted file mode 100644 index 172149e..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0066-Kconfig.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/Kconfig 2026-03-13 13:24:35.604269436 +0100 -@@ -0,0 +1,16 @@ -+ -+config SOO -+ bool "Enabling the Smart Object Oriented (SOO) subsystem" -+ -+if SOO -+menu "SOO Framework and subsystems" -+ -+config SOO_CORE_ASF -+ bool "Enabling the security framework capabilities" -+ depends on ARM_PSCI -+ -+source "soo/drivers/Kconfig" -+ -+endmenu # SOO -+ -+endif diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0067-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0067-Makefile.patch deleted file mode 100644 index 5c4cab9..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0067-Makefile.patch +++ /dev/null @@ -1,6 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/arm64/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/arm64/Makefile 2026-03-13 13:24:35.603047039 +0100 -@@ -0,0 +1,3 @@ -+ -+obj-y += paging.o -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0068-paging.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0068-paging.c.patch deleted file mode 100644 index f1175d4..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0068-paging.c.patch +++ /dev/null @@ -1,81 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/arm64/paging.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/arm64/paging.c 2026-03-16 21:08:22.571493942 +0100 -@@ -0,0 +1,78 @@ -+/* -+ * Copyright (C) 2016-2021 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include -+ -+struct uncached_page *alloc_uncached_zeroed_page(gfp_t gfp) -+{ -+ struct page *pg; -+ void *va; -+ struct page *pages[1]; -+ struct uncached_page *uncp; -+ -+ uncp = kmalloc(sizeof(struct uncached_page), GFP_KERNEL); -+ BUG_ON(!uncp); -+ -+ pg = alloc_page(gfp | __GFP_ZERO); -+ BUG_ON(!pg); -+ -+ pages[0] = pg; -+ va = vmap(pages, 1, VM_MAP, PAGE_KERNEL); -+ BUG_ON(!va); -+ -+ uncp->vaddr = va; -+ uncp->pg = pg; -+ -+ return uncp; -+} -+ -+void free_uncached_zeroed_page(struct uncached_page *p) -+{ -+ if (!p) -+ return; -+ -+ vunmap(p->vaddr); -+ __free_page(p->pg); -+ kfree(p); -+} -+ -+void *paging_remap(unsigned long paddr, size_t size) { -+ void *vaddr; -+ -+ vaddr = ioremap_cache(paddr, size); /* Normal WB Cacheable */ -+ BUG_ON(!vaddr); -+ -+ return vaddr; -+} -+ -+void paging_remap_page_range(unsigned long vaddr, unsigned long end, phys_addr_t physaddr) { -+ int ret; -+ -+ ret = ioremap_page_range(vaddr, end, physaddr, __pgprot(PROT_NORMAL_NC)); -+ BUG_ON(ret); -+ -+} -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0069-asf.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0069-asf.c.patch deleted file mode 100644 index 7a618bc..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0069-asf.c.patch +++ /dev/null @@ -1,528 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/asf/asf.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/asf/asf.c 2026-03-13 13:24:35.602731909 +0100 -@@ -0,0 +1,525 @@ -+/* -+ * Copyright (C) 2019-2020 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include "asf_priv.h" -+ -+#if 0 -+#define DEBUG -+#endif -+ -+/* ASF TA supported commands */ -+#define ASF_TA_CMD_ENCODE 0 -+#define ASF_TA_CMD_DECODE 1 -+ -+#define ASF_MAX_BUFF_SIZE (1 << 19) -+#define ASF_TAG_SIZE 16 -+#define ASF_IV_SIZE 12 -+ -+/* Management pTA boostrap command. It is used to install TA in Secure Storage */ -+#define PTA_SECSTOR_TA_MGMT_BOOTSTRAP 0 -+ -+static struct tee_context *asf_ctx; -+static int asf_sess_id; -+ -+static bool asf_enabled = false; -+static bool asf_ctx_openend = false; -+ -+/* UUID of ASF Trusted application */ -+static uint8_t asf_uuid[] = { 0x6a, 0xca, 0x96, 0xec, 0xd0, 0xa4, 0x11, 0xe9, -+ 0xbb, 0x65, 0x2a, 0x2a, 0xe2, 0xdb, 0xcc, 0xe4}; -+ -+/* UUID for management pTA. It is responsible to install TA in Security Storage */ -+static uint8_t mgmt_ta_uuid[] = { 0x6e, 0x25, 0x6c, 0xba, 0xfc, 0x4d, 0x49, 0x41, -+ 0xad, 0x09, 0x2c, 0xa1, 0x86, 0x03, 0x42, 0xdd }; -+ -+ -+DEFINE_MUTEX(asf_mutex); -+ -+/************************************************************************ -+ * ASF core * -+ ************************************************************************/ -+ -+/** -+ * asf_open_session() - Open a context & session with ASF TEE -+ * -+ * @ctx: TEE context -+ * @return the TEE session ID or -1 in case of error -+ */ -+int asf_open_session(struct tee_context **ctx, uint8_t *uuid) -+{ -+ struct tee_ioctl_open_session_arg sess_arg; -+ int ret; -+ -+ /* Initialize a context connecting us to the TEE */ -+ *ctx = teedev_open(optee_svc->teedev); -+ if (IS_ERR(*ctx)) { -+ lprintk("ASF ERROR - Open Context failed\n"); -+ return -1; -+ } -+ -+ memset(&sess_arg, 0, sizeof(sess_arg)); -+ -+ memcpy(sess_arg.uuid, uuid, TEE_IOCTL_UUID_LEN); -+ sess_arg.clnt_login = TEE_IOCTL_LOGIN_PUBLIC; -+ sess_arg.num_params = 0; -+ -+ ret = tee_client_open_session(*ctx, &sess_arg, NULL); -+ if ((ret < 0) || (sess_arg.ret != 0)) { -+ lprintk("ASF ERROR - Open Session failed, error: %x\n", sess_arg.ret); -+ return -1; -+ } -+ -+ return sess_arg.session; -+} -+ -+/** -+ * asf_close_session() - Close a context & session ASF TEE opened by asf_open_session -+ * -+ * @ctx: TEE context -+ * @session_id: the TEE session ID -+ * @return 0 in case of success or -1 -+ */ -+int asf_close_session(struct tee_context *ctx, int session_id) -+{ -+ int ret; -+ -+ ret = tee_client_close_session(ctx, session_id); -+ if (ret) { -+ lprintk("ASF ERROR - Close Context failed\n"); -+ return -1; -+ } -+ -+ tee_client_close_context(ctx); -+ -+ return 0; -+} -+ -+static struct tee_shm *asf_shm_alloc(struct tee_context *ctx) -+{ -+ struct tee_shm *shm = NULL; -+ size_t shm_sz = ASF_MAX_BUFF_SIZE + ASF_TAG_SIZE + ASF_IV_SIZE; -+ -+ shm = tee_shm_alloc(ctx, shm_sz, TEE_SHM_MAPPED | TEE_SHM_DMA_BUF); -+ if (IS_ERR(shm)) { -+ lprintk("ASF ERROR - share buffer allocation failed\n"); -+ return NULL; -+ } -+ -+ return shm; -+} -+ -+static void asf_shm_free(struct tee_shm *shm) -+{ -+ tee_shm_free(shm); -+ -+ /* The share buffer are freed only after one jiffies */ -+#if 0 /* Current tee driver does not delay the 'release' of the shm */ -+ msleep(jiffies_to_msecs(1)); -+ flush_scheduled_work(); -+#endif -+} -+ -+ -+/** -+ * asf_invoke_cypto() - Call the TEE crypto command () -+ * -+ * @ctx: TEE context -+ * @session_id: the TEE session ID -+ * @mode: action mode (ASF_TA_CMD_ENCODE or ASF_TA_CMD_DECODE) -+ * @bufin: Input buffer -+ * @bufout: output/result buffer -+ * @buf_sz: input/output buffer size -+ * @iv: IV used for the encoding (output) or IV to use for the decoding (input) -+ * @tag: Result tag (encoding) - tag to use for the decoding -+ * @return 0 in case of success or -1 -+ */ -+static int asf_invoke_cypto(struct tee_context *ctx, int session_id, int mode, struct tee_shm *shm, -+ sym_key_t key, uint8_t *bufin, uint8_t *bufout, size_t buf_sz, uint8_t *iv, uint8_t *tag) -+{ -+ struct tee_ioctl_invoke_arg arg; -+ uint8_t *data_inout = NULL; -+ uint8_t *data_tag = NULL; -+ uint8_t *data_iv = NULL; -+ struct tee_param param[2]; -+ int ret = 0; -+ -+ memset(&arg, 0, sizeof(arg)); -+ memset(¶m, 0, sizeof(param)); -+ arg.func = mode; -+ arg.session = session_id; -+ arg.num_params = 2; -+ -+ param[0].attr = TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INOUT; -+ param[0].u.memref.shm = shm; -+ param[0].u.memref.shm_offs = 0; -+ param[0].u.memref.size = buf_sz + ASF_TAG_SIZE + ASF_IV_SIZE ; -+ -+ param[1].attr = TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INPUT; -+ param[1].u.value.a = key; -+ -+ data_inout = tee_shm_get_va(shm, 0); -+ data_iv = tee_shm_get_va(shm, buf_sz); -+ data_tag = tee_shm_get_va(shm, buf_sz + ASF_IV_SIZE); -+ -+ memcpy(data_inout, bufin, buf_sz); -+ if (mode == ASF_TA_CMD_DECODE) { -+ memcpy(data_tag, tag, ASF_TAG_SIZE); -+ memcpy(data_iv, iv, ASF_IV_SIZE); -+ } -+ -+ ret = tee_client_invoke_func(ctx, &arg, param); -+ if ((ret) || (arg.ret)) { -+ lprintk("ASF ERROR - cryptographic action, in asf PTA, failed with ret = %d\n", ret); -+ return -1; -+ } -+ -+ memcpy(bufout, data_inout, buf_sz); -+ if (mode == ASF_TA_CMD_ENCODE) { -+ memcpy(iv, data_iv, ASF_IV_SIZE); -+ memcpy(tag, data_tag, ASF_TAG_SIZE); -+ } -+ -+ return ret; -+} -+ -+/** -+ * asf_res_buf_alloc() - Allocation of the result buffer -+ * -+ * @slice_nr: The number of slices composing the input buffer -+ * @rest: the size of the last slice (non-full slice) -+ * @mode: action mode (ASF_TA_CMD_ENCODE or ASF_TA_CMD_DECODE) -+ * @res_buf: result buffer -+ * @return the size of the result buffer or -1 in case of error -+ */ -+static ssize_t asf_res_buf_alloc(size_t slice_nr, size_t rest, int mode, uint8_t **res_buf) -+{ -+ size_t rest_sz; -+ size_t slice_sz; -+ size_t res_buf_sz; -+ -+ if (mode == ASF_TA_CMD_ENCODE) { -+ /* Encoding case (add IV and Tag to result) */ -+ slice_sz = ASF_MAX_BUFF_SIZE + ASF_TAG_SIZE + ASF_IV_SIZE; -+ rest_sz = rest + ASF_TAG_SIZE + ASF_IV_SIZE; -+ } else { -+ /* decoding case (remove IV and Tag to result) */ -+ slice_sz = ASF_MAX_BUFF_SIZE; -+ rest_sz = rest - ASF_TAG_SIZE - ASF_IV_SIZE; -+ } -+ -+ res_buf_sz = slice_nr * slice_sz; -+ res_buf_sz += rest_sz; -+ -+ *res_buf = (uint8_t *) kmalloc(res_buf_sz, GFP_ATOMIC); -+ if (!*res_buf) { -+ lprintk("ASF ERROR - Buffer allocation failed\n"); -+ return -1; -+ } -+ -+ return (ssize_t)res_buf_sz; -+} -+ -+/** -+ * asf_send_slice_buffer() - Slice a buffer and send the blocks to TEE -+ * -+ * @ctx: TEE context -+ * @session_id: TEE Session ID -+ * @mode: TEE action mode (ASF_TA_CMD_ENCODE or ASF_TA_CMD_DECODE) -+ * @inbuf: Input buffer for the TEE action -+ * @outbuf: Result buffer with the result of the TEE action -+ * @slice_nr: The number of slices composing the input buffer -+ * @rest: the size of the last slice (non-full slice) -+ * @return 0 in case of success or -1 in case of error -+ */ -+static int asf_send_slice_buffer(struct tee_context *ctx, uint32_t session_id, int mode, sym_key_t key, uint8_t *inbuf, uint8_t *outbuf, size_t slice_nr, size_t rest) -+{ -+ unsigned loop_nr; -+ struct tee_shm *shm; -+ unsigned i; -+ size_t rest_sz; -+ size_t cur_buf_sz; -+ uint8_t *in = inbuf; -+ uint8_t *out = outbuf; -+ uint8_t *tag; -+ uint8_t *iv; -+ int ret; -+ -+ /* Allocation of shared buffer */ -+ shm = asf_shm_alloc(ctx); -+ if (!shm) -+ return -1; -+ -+ if (mode == ASF_TA_CMD_ENCODE) -+ rest_sz = rest; -+ else -+ rest_sz = rest - ASF_TAG_SIZE - ASF_IV_SIZE; -+ -+ loop_nr = slice_nr; -+ if (rest) -+ loop_nr++; -+ -+ for (i = 0; i < loop_nr; i++) { -+ if (i == (loop_nr-1)) { -+ /* last loop, update its size */ -+ if (rest) -+ cur_buf_sz = rest_sz; -+ else -+ cur_buf_sz = ASF_MAX_BUFF_SIZE; -+ } else { -+ cur_buf_sz = ASF_MAX_BUFF_SIZE; -+ } -+ -+ /* Compute position of elements of the current encoded block */ -+ if (mode == ASF_TA_CMD_ENCODE) -+ iv = out + cur_buf_sz; -+ else -+ iv = in + cur_buf_sz; -+ -+ tag = iv + ASF_IV_SIZE; -+ -+ ret = asf_invoke_cypto(ctx, session_id, mode, shm, key, in, out, cur_buf_sz, iv, tag); -+ if (ret) { -+ lprintk("ASF ERROR - asf_invoke_cypto failed with ret = %d\n", ret); -+ return -1; -+ } -+ -+ /* Update buffer position */ -+ if (mode == ASF_TA_CMD_ENCODE) { -+ in += cur_buf_sz; -+ out += cur_buf_sz + ASF_IV_SIZE + ASF_TAG_SIZE; -+ } else { -+ in += cur_buf_sz + ASF_IV_SIZE + ASF_TAG_SIZE; -+ out += cur_buf_sz; -+ } -+ } -+ -+ asf_shm_free(shm); -+ -+ return 0; -+} -+ -+/************************************************************************ -+ * APIs * -+ ************************************************************************/ -+ -+ssize_t asf_encrypt(sym_key_t key, uint8_t *plain_buf, size_t plain_buf_sz, uint8_t **enc_buf) -+{ -+ ssize_t res_buf_sz; -+ int ret; -+ int block_nr; -+ int rest; -+ -+ mutex_lock(&asf_mutex); -+ -+ /* 1. Encoded/result buffer allocation */ -+ rest = (plain_buf_sz % ASF_MAX_BUFF_SIZE); -+ block_nr = (plain_buf_sz / ASF_MAX_BUFF_SIZE); -+ -+ res_buf_sz = asf_res_buf_alloc(block_nr, rest, ASF_TA_CMD_ENCODE, enc_buf); -+ if (res_buf_sz < 0) -+ return -1; -+ -+ /* 3. 'Slicing' the buffer and sent it to TEE */ -+ ret = asf_send_slice_buffer(asf_ctx, asf_sess_id, ASF_TA_CMD_ENCODE, key, plain_buf, *enc_buf, block_nr, rest); -+ if (ret) -+ goto err_encode; -+ -+ mutex_unlock(&asf_mutex); -+ -+ return res_buf_sz; -+ -+err_encode: -+ mutex_unlock(&asf_mutex); -+ kfree(*enc_buf); -+ -+ return -1; -+} -+ -+ssize_t asf_decrypt(sym_key_t key, uint8_t *enc_buf, size_t enc_buf_sz, uint8_t **plain_buf) -+{ -+ int ret; -+ ssize_t res_buf_sz; -+ uint8_t *res_buf = NULL; -+ int block_nr; -+ int rest; -+ -+ mutex_lock(&asf_mutex); -+ -+ /* 1. Plain/result buffer allocation */ -+ rest = (enc_buf_sz % (ASF_MAX_BUFF_SIZE + ASF_IV_SIZE + ASF_TAG_SIZE)); -+ block_nr = (enc_buf_sz / (ASF_MAX_BUFF_SIZE + ASF_IV_SIZE + ASF_TAG_SIZE)); -+ -+ res_buf_sz = asf_res_buf_alloc(block_nr, rest, ASF_TA_CMD_DECODE, &res_buf); -+ if (res_buf_sz < 0) -+ return -1; -+ -+ /* 3. 'Slicing' the buffer in block of ASF_MAX_BUFF_SIZE size */ -+ ret = asf_send_slice_buffer(asf_ctx, asf_sess_id, ASF_TA_CMD_DECODE, key, enc_buf, res_buf, block_nr, rest); -+ -+ *plain_buf = res_buf; -+ -+ mutex_unlock(&asf_mutex); -+ -+ return res_buf_sz; -+ -+ return -1; -+} -+ -+/************************************************************************ -+ * Char drv related operations * -+ ************************************************************************/ -+ -+ssize_t asf_write(struct file *filp, const char __user *buf, size_t len, loff_t *off) -+{ -+ uint32_t session_id; -+ uint8_t *data_in = NULL; -+ struct tee_context *ctx; -+ struct tee_ioctl_invoke_arg arg; -+ struct tee_param param[1]; -+ struct tee_shm *shm = NULL; -+ int ret1, ret2; -+ -+ printk("ASF - Write --> TA Installation\n"); -+ -+ /* Open Session */ -+ session_id = asf_open_session(&ctx, mgmt_ta_uuid); -+ if (session_id < 0) { -+ printk("ASF Error - Open session failed\n"); -+ return -1; -+ } -+ -+ memset(&arg, 0, sizeof(arg)); -+ memset(¶m, 0, sizeof(param)); -+ -+ arg.func = PTA_SECSTOR_TA_MGMT_BOOTSTRAP; -+ arg.session = session_id; -+ arg.num_params = 1; -+ -+ shm = tee_shm_alloc(ctx, len, TEE_SHM_MAPPED | TEE_SHM_DMA_BUF); -+ data_in = tee_shm_get_va(shm, 0); -+ memcpy(data_in, buf, len); -+ -+ param[0].attr = TEE_IOCTL_PARAM_ATTR_TYPE_MEMREF_INPUT; -+ param[0].u.memref.shm = shm; -+ param[0].u.memref.shm_offs = 0; -+ param[0].u.memref.size = len; -+ -+ ret1 = tee_client_invoke_func(ctx, &arg, param); -+ if ((ret1) || (arg.ret)) { -+ lprintk("ASF ERROR - Installation of TA failed\n"); -+ ret1 = 1; -+ } -+ -+ ret2 = asf_close_session(ctx, session_id); -+ if (ret2) -+ lprintk("ASF ERROR - Close session failed\n"); -+ -+ if ((ret1) || (ret2)) -+ return -1; -+ else -+ return len; -+} -+ -+long asf_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) -+{ -+ int res; -+ -+ switch (cmd) { -+ -+ case ASF_IOCTL_CRYPTO_TEST: -+ asf_crypto_example(); -+ asf_crypto_large_buf_test(); -+ return 0; -+ -+ case ASF_IOCTL_HELLO_WORLD_TEST: -+ return hello_world_ta_cmd((hello_args_t *)(arg)); -+ -+ case ASF_IOCTL_OPEN_SESSION: -+ asf_sess_id = asf_open_session(&asf_ctx, asf_uuid); -+ if (asf_sess_id < 0) { -+ return -1; -+ } else { -+ asf_ctx_openend = true; -+ return 0; -+ } -+ -+ case ASF_IOCTL_SESSION_OPENED: -+ return asf_ctx_openend; -+ -+ case ASF_IOCTL_CLOSE_SESSION: -+ res = asf_close_session(asf_ctx, asf_sess_id); -+ if (res == 0) -+ asf_ctx_openend = false; -+ return res; -+ -+ default: -+ lprintk("ASF ioctl %d unavailable !\n", cmd); -+ panic("ASF"); -+ } -+ -+ return -EINVAL; -+} -+ -+struct file_operations asf_fops = { -+ .owner = THIS_MODULE, -+ .unlocked_ioctl = asf_ioctl, -+ .write = asf_write, -+}; -+ -+/************************************************************************ -+ * ASF Initialization * -+ ************************************************************************/ -+ -+static int asf_init(void) -+{ -+ int rc; -+ -+ /* Check if TrustZone is activated. Currently, this is done -+ * by examining the presence of psci property in the device tree. -+ */ -+ if (!of_find_node_by_name(NULL, "psci")) -+ return 0; -+ -+ lprintk("Agency Security Framework initialization...\n"); -+ -+ /* Registering device */ -+ rc = register_chrdev(ASF_DEV_MAJOR, ASF_DEV_NAME, &asf_fops); -+ if (rc < 0) { -+ printk("Cannot obtain the major number %d\n", ASF_DEV_MAJOR); -+ BUG(); -+ } -+ -+ asf_enabled = true; -+ -+ return 0; -+} -+ -+/* be sure tee driver is loaded before loading asf */ -+late_initcall(asf_init); diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0070-asf_priv.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0070-asf_priv.h.patch deleted file mode 100644 index 2c10be2..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0070-asf_priv.h.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/asf/asf_priv.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/asf/asf_priv.h 2026-03-13 13:24:35.602758437 +0100 -@@ -0,0 +1,44 @@ -+/* -+ * Copyright (C) 2019-2020 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef ASF_PRIV_H -+#define ASF_PRIV_H -+ -+#include -+#include -+ -+#include -+#include -+ -+/* args of Hello world command */ -+typedef struct { -+ int val; -+} hello_args_t; -+ -+ -+/* asf core functions */ -+int asf_open_session(struct tee_context **ctx, uint8_t *uuid); -+int asf_close_session(struct tee_context *ctx, int session_id); -+ -+void asf_crypto_example(void); -+ -+void asf_crypto_large_buf_test(void); -+ -+int hello_world_ta_cmd(hello_args_t *args); -+ -+#endif /* ASF_PRIV_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0071-asf_test.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0071-asf_test.c.patch deleted file mode 100644 index f8c7d95..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0071-asf_test.c.patch +++ /dev/null @@ -1,178 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/asf/asf_test.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/asf/asf_test.c 2026-03-13 13:24:35.602701088 +0100 -@@ -0,0 +1,175 @@ -+/* -+ * Copyright (C) 2019-2020 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include -+ -+#include "asf_priv.h" -+ -+ -+#define TA_HELLO_WORLD_CMD_INC_VALUE 0 -+ -+ -+static uint8_t hello_world_uuid[] = { 0x8a, 0xaa, 0xf2, 0x00, 0x24, 0x50, 0x11, 0xe4, -+ 0xab, 0xe2, 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}; -+ -+ -+/** -+ * asf_crypto_example() - example of ASF encryption/decryption flow -+ */ -+void asf_crypto_example(void) -+{ -+ ssize_t size; -+ uint8_t plain[] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, -+ 0x08, 0x09, 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6}; -+ uint8_t *encoded = NULL; -+ uint8_t *decoded = NULL; -+ -+ lprintk("## ASF Crypto example\n"); -+ -+ lprintk("## %s: Encoding\n", __func__); -+ size = asf_encrypt(ASF_KEY_COM, plain, sizeof(plain), &encoded); -+ if (size > 0) { -+ lprintk("## %s: Encoded buffer size: %d\n", __func__, size); -+ lprintk("buffer: "); -+ lprintk_buffer(encoded, size); -+ } else { -+ lprintk("## %s: Encoding failed\n", __func__); -+ return; -+ } -+ -+ lprintk("## %s: Decoding\n", __func__); -+ size = asf_decrypt(ASF_KEY_COM, encoded, size, &decoded); -+ if (size > 0) { -+ lprintk("## %s: decoded buffer size: %d\n", __func__, size); -+ lprintk("buffer: "); -+ lprintk_buffer(decoded, size); -+ } else { -+ lprintk("## %s: Decoding failed\n", __func__); -+ kfree(encoded); -+ return; -+ } -+ -+ kfree(encoded); -+ kfree(decoded); -+} -+ -+ -+/** -+ * asf_crypto_large_buf_test() - ASF test with a large buffer encryption flow -+ */ -+void asf_crypto_large_buf_test(void) -+{ -+ ssize_t size; -+ int i; -+ uint8_t *plain; -+ uint8_t *encoded; -+ uint8_t *decoded; -+ int plain_sz = 1879878; -+ -+ lprintk("## ASF Testing with a large buffer, size: %d\n", plain_sz); -+ -+ plain = (uint8_t *)kmalloc(plain_sz, GFP_KERNEL); -+ if (!plain) { -+ lprintk("## Buffer allocation failed\n"); -+ return; -+ } -+ -+ for (i = 0; i < plain_sz; i++) -+ plain[i] = (uint8_t)i; -+ -+ lprintk("## %s: Encoding\n", __func__); -+ size = asf_encrypt(ASF_KEY_COM, plain, plain_sz, &encoded); -+ if ((int)size > 0) { -+ lprintk("## %s: Encoded buffer size: %d\n", __func__, size); -+ } else { -+ lprintk("## %s: Encoding failed\n", __func__); -+ goto err0; -+ } -+ -+ lprintk("## %s: Decoding\n", __func__); -+ size = asf_decrypt(ASF_KEY_COM, encoded, size, &decoded); -+ lprintk("decoded buffer size: %d\n", size); -+ -+ if (size != plain_sz) { -+ lprintk("## %s: Decoding failed, decoded buffer size %d, expected %d\n", __func__, size, plain_sz); -+ goto err1; -+ } -+ -+ for (i = 0; i < size; i++) { -+ if (decoded[i] != (uint8_t)i) { -+ lprintk("## %s: Wrong decoded\n", __func__); -+ break; -+ } -+ } -+ -+ kfree(decoded); -+err1: -+ kfree(encoded); -+err0: -+ kfree(plain); -+} -+ -+ -+ -+ -+/** -+ * hello_world_ta_cmd() - Send 'Inc value' cmd to Hello World TA -+ */ -+int hello_world_ta_cmd(hello_args_t *args) -+{ -+ struct tee_context *ctx; -+ uint32_t session_id; -+ struct tee_ioctl_invoke_arg arg; -+ struct tee_param param[1]; -+ int ret1, ret2; -+ -+ /* Open Session */ -+ session_id = asf_open_session(&ctx, hello_world_uuid); -+ if (session_id < 0) { -+ lprintk("ASF Error - Open session failed\n"); -+ return -1; -+ } -+ -+ memset(&arg, 0, sizeof(arg)); -+ memset(¶m, 0, sizeof(param)); -+ arg.func = TA_HELLO_WORLD_CMD_INC_VALUE; -+ arg.session = session_id; -+ arg.num_params = 1; -+ -+ param[0].attr = TEE_IOCTL_PARAM_ATTR_TYPE_VALUE_INOUT; -+ param[0].u.value.a = args->val; -+ -+ ret1 = tee_client_invoke_func(ctx, &arg, param); -+ if ((ret1) || (arg.ret)) { -+ lprintk("ASF ERROR - Installation of TA failed\n"); -+ ret1 = 1; -+ } else { -+ lprintk("ASF - hello_world_cmd result: %d\n", (int)param[0].u.value.a); -+ } -+ -+ ret2 = asf_close_session(ctx, session_id); -+ if (ret2) -+ lprintk("ASF ERROR - Close session failed\n"); -+ -+ if ((ret1) || (ret2)) -+ return -1; -+ else -+ return 0; -+ -+} -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0072-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0072-Makefile.patch deleted file mode 100644 index 8e22c19..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0072-Makefile.patch +++ /dev/null @@ -1,5 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/asf/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/asf/Makefile 2026-03-13 13:24:35.602775346 +0100 -@@ -0,0 +1 @@ -+obj-y += asf.o asf_test.o -\ No newline at end of file diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0073-capsule.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0073-capsule.c.patch deleted file mode 100644 index 6a11f06..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0073-capsule.c.patch +++ /dev/null @@ -1,504 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/capsule.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/capsule.c 2026-03-20 09:16:37.469025577 +0100 -@@ -0,0 +1,500 @@ -+/* -+ * Copyright (C) 2017-2024 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#if 0 -+#define DEBUG -+#endif -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+/* Buffer in which the ME will be received. It is dynamically allocated -+in injector_prepare */ -+uint8_t *ME_buffer; -+ -+/* Full size of the me we are receiving */ -+size_t ME_size; -+ -+/* Current size received */ -+size_t current_size = 0; -+ -+struct device *capsule_dev = NULL; -+ -+#define CMA_MALLOC_DEVICE_FILENAME "cma_malloc" -+ -+static struct file_operations cma_malloc_fileops = { -+ .owner = THIS_MODULE, -+}; -+ -+static struct miscdevice cma_malloc_miscdevice = { -+ .minor = MISC_DYNAMIC_MINOR, -+ .name = CMA_MALLOC_DEVICE_FILENAME, -+ .fops = &cma_malloc_fileops, -+ .mode = S_IRUGO | S_IWUGO, -+}; -+ -+/** -+ * Initiate the injection of a capsule -+ * -+ * The capsule is allocated within the CMA-dedicated memory. -+ * -+ * @param buffer pointer to a buffer -+ * @param size Size of the capsule to load -+ * @param slotID if not equal to -1, try to load in the specific slot -+ * @return int slotID or -1 if no slotID available or not free. -+ */ -+int inject_capsule(void *buffer, size_t size, int slotID) { -+ void *me = NULL; -+ dma_addr_t dma_handle; -+ avz_hyp_t args; -+ -+ DBG("Original contents at address: 0x%08x\n with size %d bytes\n", (unsigned long) buffer, size); -+ -+ /* Allocate a contiguous memory region to host the ME */ -+ me = dma_alloc_coherent(capsule_dev, size, &dma_handle, GFP_KERNEL); -+ BUG_ON(!me); -+ -+ if (copy_from_user(me, buffer, size)) { -+ dma_free_coherent(capsule_dev, size, me, dma_handle); -+ return -1; -+ } -+ -+ /* Since the ME buffer is in the CMA zone and allocated via the -+ * dma_alloc_cohenrent() function, we cannot use virt_to_phys(). So, we -+ * take the CPU phys addr stored in dma_handle, and we force to a -+ * (wrong) virtual address to make sure the soo_hypercall() function -+ * gets the right physical address; indeeed, it uses virt_to_phys() there. -+ */ -+ -+ args.cmd = AVZ_INJECT_CAPSULE; -+ -+ args.u.avz_inject_capsule_args.itb_paddr = (void *) dma_to_phys(capsule_dev, dma_handle); -+ args.u.avz_inject_capsule_args.slotID = slotID; -+ args.u.avz_inject_capsule_args.capsuleID = 0; -+ -+ avz_hypercall(&args); -+ -+ /* Deallocate the memory area reserved for the capsule */ -+ dma_free_coherent(capsule_dev, size, me, dma_handle); -+ -+ return args.u.avz_inject_capsule_args.slotID; -+} -+ -+/** -+ * @brief Start the execution of a pre-loaded capsule (injected) -+ * -+ * @param slotID -+ */ -+void start_capsule(int slotID) { -+ avz_hyp_t args; -+ -+ BUG_ON(get_ME_state(slotID) != ME_state_stopped); -+ -+ args.cmd = AVZ_START_CAPSULE; -+ -+ args.u.avz_start_capsule_args.slotID = slotID; -+ -+ avz_hypercall(&args); -+ -+ /* Wait for all backend/frontend initialized. */ -+ wait_for_completion(&backend_initialized); -+ -+ DBG("Capsule in slot %d in state living...\n", slotID); -+ -+ set_ME_state(slotID, ME_state_living); -+} -+ -+/** -+ * Read a ME snapshot for migration or saving. -+ * The ME is read and stored in a vmalloc'd memory area. -+ * -+ * @param slotID -+ * @param buffer pointer to the ME buffer -+ */ -+void read_snapshot(uint32_t slotID, void *buffer, uint32_t *size) { -+ avz_hyp_t args; -+ void *me = NULL; -+ int ret; -+ dma_addr_t dma_handle; -+ ME_state_t ME_state; -+ -+ /* Ask the size only */ -+ if (*size == 0) { -+ -+ DBG("%s: ask the snapshot size...\n", __func__); -+ -+ args.cmd = AVZ_ME_READ_SNAPSHOT; -+ args.u.avz_snapshot_args.slotID = slotID; -+ args.u.avz_snapshot_args.size = 0; -+ -+ avz_hypercall(&args); -+ *size = args.u.avz_snapshot_args.size; -+ -+ return; -+ } -+ -+ if (get_ME_state(slotID) == ME_state_living) { -+ -+ /* Suspend the ME */ -+ do_sync_dom(slotID, DC_PRE_SUSPEND); -+ -+ /* Set the ME in suspended state */ -+ set_ME_state(slotID, ME_state_suspended); -+ -+ vbus_suspend_devices(slotID); -+ -+ do_sync_dom(slotID, DC_SUSPEND); -+ -+ printk("### state: %d\n", get_ME_state(slotID)); -+ } -+ -+ /* -+ * Prepare a buffer to store the ME and additional header information like migration structure. -+ */ -+ -+ me = dma_alloc_coherent(capsule_dev, *size, &dma_handle, GFP_KERNEL); -+ BUG_ON(!me); -+ -+ args.cmd = AVZ_ME_READ_SNAPSHOT; -+ -+ args.u.avz_snapshot_args.slotID = slotID; -+ args.u.avz_snapshot_args.snapshot_paddr = (void *) dma_to_phys(capsule_dev, dma_handle); -+ args.u.avz_snapshot_args.size = *size; -+ -+ avz_hypercall(&args); -+ -+ /* Copy the snapshot to the user buffer */ -+ ret = copy_to_user(buffer, me, *size); -+ BUG_ON(ret); -+ -+ dma_free_coherent(capsule_dev, *size, me, dma_handle); -+ -+ ME_state = get_ME_state(slotID); -+ -+ if (ME_state == ME_state_resuming) { -+ -+ DBG("Pinging ME %d for DC_RESUME...\n", slotID); -+ do_sync_dom(slotID, DC_RESUME); -+ -+ DBG("Resuming all devices (resuming from backend devices) on domain %d...\n", slotID); -+ vbus_resume_devices(slotID); -+ -+ DBG("Pinging ME %d for DC_POST_ACTIVATE...\n", slotID); -+ do_sync_dom(slotID, DC_POST_ACTIVATE); -+ -+ DBG("Putting ME domid %d in state living...\n", slotID); -+ set_ME_state(slotID, ME_state_living); -+ } -+} -+ -+/** -+ * Write a ME snapshot provided a ME_info_transfer_t descriptor. -+ * -+ * @param slotID -+ * @param buffer Adresse of a buffer of ME_info_transfert_t -+ * @return slotID in case of success, -1 if no available slot -+ */ -+int write_snapshot(void *buffer) { -+ avz_hyp_t args; -+ void *me = NULL; -+ int ret; -+ dma_addr_t dma_handle; -+ uint32_t snapshot_size; -+ uint32_t slotID; -+ ME_state_t ME_state; -+ -+ snapshot_size = *((uint32_t *) buffer); -+ -+ DBG("Retrieving a size of %d bytes.\n", snapshot_size); -+ -+ /* -+ * Prepare a buffer to store the ME and additional header information like migration structure. -+ */ -+ me = dma_alloc_coherent(capsule_dev, snapshot_size, &dma_handle, GFP_KERNEL); -+ BUG_ON(!me); -+ -+ /* Copy the snapshot to the user buffer */ -+ ret = copy_from_user(me, buffer, snapshot_size); -+ BUG_ON(ret); -+ -+ args.cmd = AVZ_ME_WRITE_SNAPSHOT; -+ -+ args.u.avz_snapshot_args.size = snapshot_size; -+ args.u.avz_snapshot_args.slotID = -1; -+ args.u.avz_snapshot_args.snapshot_paddr = (void *) dma_to_phys(capsule_dev, dma_handle); -+ -+ DBG("%s: Now asking AVZ to re-implement the snapshot of size %d bytes...\n", __func__, snapshot_size); -+ -+ avz_hypercall(&args); -+ -+ if (!args.u.avz_snapshot_args.slotID) { -+ printk("%s: No free space...\n", __func__); -+ return -1; /* No free space */ -+ } -+ -+ slotID = args.u.avz_snapshot_args.slotID; -+ -+ dma_free_coherent(capsule_dev, snapshot_size, me, dma_handle); -+ -+ ME_state = get_ME_state(slotID); -+ -+ if (ME_state == ME_state_stopped) { -+ /* Normal processing, start of the capsule */ -+ -+ start_capsule(slotID); -+ return slotID; -+ } -+ -+ BUG_ON((ME_state != ME_state_hibernate) && (ME_state != ME_state_awakened)); -+ -+ DBG0("SOO migration subsys: Entering restoring tasks...\n"); -+ -+ /* The capsule is performing an asynchronous signal-based resume callback and will -+ * be set to ME_state_awakened after its execution -+ */ -+ while (1) { -+ schedule(); -+ -+ if (get_ME_state(slotID) == ME_state_awakened) { -+ DBG("ME now resuming...\n"); -+ break; -+ } -+ } -+ -+ DBG("Pinging ME %d for DC_RESUME...\n", slotID); -+ do_sync_dom(slotID, DC_RESUME); -+ -+ DBG("Resuming all devices (resuming from backend devices) on domain %d...\n", slotID); -+ vbus_resume_devices(slotID); -+ -+ DBG("Pinging ME %d for DC_POST_ACTIVATE...\n", slotID); -+ do_sync_dom(slotID, DC_POST_ACTIVATE); -+ -+ DBG("Putting ME domid %d in state living...\n", slotID); -+ set_ME_state(slotID, ME_state_living); -+ -+ return slotID; -+} -+ -+int get_ME_state(unsigned int ME_slotID) -+{ -+ avz_hyp_t args; -+ -+ args.cmd = AVZ_GET_ME_STATE; -+ args.u.avz_me_state_args.slotID = ME_slotID; -+ -+ avz_hypercall(&args); -+ -+ return args.u.avz_me_state_args.state; -+} -+ -+/* -+ * Setting the ME state to the specific ME_slotID. -+ * The hypercall args is passed by 2 contiguous (unsigned) int, the first one is -+ * used for slotID, the second for the state -+ */ -+void set_ME_state(unsigned int ME_slotID, ME_state_t state) -+{ -+ avz_hyp_t args; -+ -+ args.cmd = AVZ_SET_ME_STATE; -+ -+ args.u.avz_me_state_args.slotID = ME_slotID; -+ args.u.avz_me_state_args.state = state; -+ -+ avz_hypercall(&args); -+} -+ -+/** -+ * Retrieve the ME descriptor including the SPID, the state. -+ */ -+void get_ME_desc(unsigned int slotID, ME_desc_t *ME_desc) { -+ avz_hyp_t args; -+ -+ args.cmd = AVZ_GET_DOM_DESC; -+ args.u.avz_dom_desc_args.slotID = slotID; -+ -+ avz_hypercall(&args); -+ -+ memcpy(ME_desc, &args.u.avz_dom_desc_args.dom_desc, sizeof(ME_desc_t)); -+} -+ -+/** -+ * Retrieve the ME identity information including SPID, state. -+ * -+ * @param slotID -+ * @param ME_id -+ * @return true if a ME has been found in slotID, false otherwise. -+ */ -+bool get_ME_id(uint32_t slotID, ME_id_t *ME_id) { -+ char *prop; -+ char rootname[VBS_KEY_LENGTH]; -+ unsigned int len; -+ -+ /* The ME can be dormant but without any accessible ID information */ -+ ME_id->state = get_ME_state(slotID); -+ -+ if (ME_id->state == ME_state_dead) -+ return false; -+ -+ sprintf(rootname, "soo/me/%d", slotID); -+ -+ /* Check if there is a ME? */ -+ prop = vbus_read(VBT_NIL, rootname, "spid", &len); -+ -+ if (len == 1) { /* If no entry in vbstore, it returns 1 (byte \0) */ -+ return true; -+ } else { -+ sscanf(prop, "%llx", &ME_id->spid); -+ kfree(prop); -+ -+ prop = vbus_read(VBT_NIL, rootname, "name", &len); -+ -+ strcpy(ME_id->name, prop); -+ kfree(prop); -+ -+ prop = vbus_read(VBT_NIL, rootname, "shortdesc", &len); -+ -+ strcpy(ME_id->shortdesc, prop); -+ kfree(prop); -+ -+ ME_id->slotID = slotID; -+ } -+ -+ return true; -+} -+ -+/** -+ * Get a list of all residing MEs in this smart object. -+ * The caller must have allocated an array of elements. -+ * -+ * The ME state will be used to determine if a ME is residing or not (ME_state_dead). -+ */ -+void get_ME_id_array(ME_id_t *ME_id_array) { -+ uint32_t slotID; -+ -+ /* Empty the array first */ -+ memset(ME_id_array, 0, MAX_DOMAINS * sizeof(ME_id_array)); -+ -+ /* Walk through all entries in vbstore regarding MEs */ -+ -+ for (slotID = 2; slotID < MAX_DOMAINS; slotID++) -+ get_ME_id(slotID, &ME_id_array[slotID-2]); -+ -+} -+EXPORT_SYMBOL(get_ME_id_array); -+ -+/** -+ * Prepare a XML message which contains the list of MEs with their specific ID information -+ * (SPID, name, short desc) -+ * -+ * -+ * @return buffer Buffer allocated by the which contains the XML message. Caller must free it. -+ * @param ME_id_array Array of ME_id_t entries (got with get_ME_id_array()) -+ */ -+char *xml_prepare_id_array(ME_id_t *ME_id_array) { -+ uint32_t pos; -+ char *__buffer; -+ char *buffer; /* Output buffer */ -+ node_t *messages, *me, *name, *shortdesc; -+ char spid[17]; /* 64-bit hex string + null terminator */ -+ char slotID[2]; -+ -+ /* Adding the messages node */ -+ messages = roxml_add_node(NULL, 0, ROXML_ELM_NODE, "mobile-entities", NULL); -+ -+ for (pos = 0; pos < MAX_ME_DOMAINS; pos++) { -+ -+ if (ME_id_array[pos].state != ME_state_dead) { -+ -+ /* Adding the message itself */ -+ me = roxml_add_node(messages, 0, ROXML_ELM_NODE, "mobile-entity", NULL); -+ -+ /* Add SPID */ -+ sprintf(spid, "%016llx", ME_id_array[pos].spid); -+ roxml_add_node(me, 0, ROXML_ATTR_NODE, "spid", spid); -+ -+ /* Add the slotID */ -+ sprintf(slotID, "%d", ME_id_array[pos].slotID); -+ roxml_add_node(me, 0, ROXML_ATTR_NODE, "slotID", slotID); -+ -+ /* Add short name */ -+ name = roxml_add_node(me, 0, ROXML_ELM_NODE, "name", NULL); -+ roxml_add_node(name, 0, ROXML_TXT_NODE, NULL, ME_id_array[pos].name); -+ -+ /* And the short description */ -+ shortdesc = roxml_add_node(me, 0, ROXML_ELM_NODE, "description", NULL); -+ roxml_add_node(shortdesc, 0, ROXML_TXT_NODE, NULL, ME_id_array[pos].shortdesc); -+ -+ } -+ -+ } -+ -+ roxml_commit_changes(messages, NULL, &__buffer, 1); -+ -+ /* Allocate the buffer here, as the caller has no way to determine it */ -+ buffer = (char *) kzalloc(strlen(__buffer), GFP_KERNEL); -+ if (buffer == NULL) { -+ return NULL; -+ } -+ -+ strcpy(buffer, __buffer); -+ -+ roxml_release(RELEASE_LAST); -+ roxml_close(messages); -+ -+ return buffer; -+} -+EXPORT_SYMBOL(xml_prepare_id_array); -+ -+void capsule_init(void) { -+ int ret; -+ -+ ret = misc_register(&cma_malloc_miscdevice); -+ BUG_ON(ret); -+ -+ capsule_dev = cma_malloc_miscdevice.this_device; -+ capsule_dev->coherent_dma_mask = DMA_BIT_MASK(64); -+ capsule_dev->dma_mask = &capsule_dev->coherent_dma_mask; -+} -+ -+void capsule_exit(void) { -+ misc_deregister(&cma_malloc_miscdevice); -+ capsule_dev = NULL; -+} -\ No newline at end of file diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0074-console.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0074-console.c.patch deleted file mode 100644 index cc47619..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0074-console.c.patch +++ /dev/null @@ -1,153 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/console/console.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/console/console.c 2026-03-19 16:39:49.260891031 +0100 -@@ -0,0 +1,150 @@ -+/* -+ * Copyright (C) 2016-2019 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+/* 1 is the code for CTRL-A */ -+#define SWITCH_CODE 1 -+ -+#define N_SWITCH_FOCUS 8 -+ -+/* Volatile to ensure the value is read from memory and no optimization occurs */ -+static int volatile avzcons_active = 0; -+static int volatile vfb_active = 0; -+ -+/* Provided by vUART backend */ -+void me_cons_sendc(domid_t domid, uint8_t ch); -+ -+int avzcons_get_focus(void) -+{ -+ return avzcons_active; -+} -+ -+int avzcons_set_focus(int next_domain) -+{ -+ avzcons_active = next_domain; -+ return avzcons_active; -+} -+ -+int vfb_get_focus(void) -+{ -+ return vfb_active; -+} -+ -+int vfb_set_focus(int next_domain) -+{ -+ avz_hyp_t hyp_args; -+ hyp_args.cmd = AVZ_FBDEV_CHANGE_FOCUS; -+ hyp_args.u.avz_fbdev_focus_args.new_slotID = next_domain; -+ avz_hypercall(&hyp_args); -+ -+ vfb_active = next_domain; -+ return vfb_active; -+} -+ -+ -+/* -+ * avz_switch_console() - Allow the user to give input focus to various input sources (agency, MEs, avz) -+ * -+ * Warning !! We are in interrupt context top half when the function is called and a lock is pending -+ * on the UART. Use of printk() is forbidden and we need to use lprintk() to avoid deadlock. -+ * -+ */ -+int avz_switch_console(char ch) -+{ -+ static int switch_code_count = 0; -+ static char *input_str[N_SWITCH_FOCUS] = { "Agency domain", "Agency-RT domain", "ME-1(2)", "ME-2(3)", "ME-3(4)", "ME-4(5)", "ME-5(6)", "Agency AVZ Hypervisor" }; -+ struct device_node *np; -+ int active = 0; -+ u32 focus_max = N_SWITCH_FOCUS - 1; -+ avz_hyp_t args; -+ -+ /* First capsule is in slot #2 */ -+ int next = 2; -+ -+ np = of_find_node_by_name(NULL, "console"); -+ if (np) -+ of_property_read_u32((const struct device_node *) np, "focus-dom-max", &focus_max); -+ -+ if ((SWITCH_CODE != 0) && (ch == SWITCH_CODE)) { -+ -+ /* We eat CTRL- in groups of 2 to switch console input. */ -+ if (++switch_code_count == 1) { -+ -+ active = (avzcons_get_focus() + 1) % (focus_max + 1); -+ active = ((active == 1) ? active+1 : active); -+ -+ next = (active + 1) % (focus_max + 1); -+ next = ((next == 1) ? next+1 : next); -+ -+ avzcons_set_focus(active); -+ vfb_set_focus(active); -+ -+ switch_code_count = 0; -+ -+ lprintk("*** Serial input -> %s (type 'CTRL-%c' twice to switch input to %s).\n", input_str[active], 'a', input_str[next]); -+ -+ return 1; -+ } -+ -+ } else { -+ switch_code_count = 0; -+ -+ switch (avzcons_get_focus()) { -+ default: -+ case 0: /* Input to the agency */ -+ return 0; -+ -+ case 2: /* Input to ME #1 */ -+ case 3: /* Input to ME #2 */ -+ case 4: /* Input to ME #3 */ -+ case 5: /* Input to ME #4 */ -+ case 6: /* Input to ME #5 */ -+#ifdef CONFIG_VUART_BACKEND -+ me_cons_sendc(avzcons_get_focus(), ch); -+#endif /* CONFIG_VUART_BACKEND */ -+ return 1; -+ -+ case 7: /* Input to avz */ -+ args.cmd = AVZ_CONSOLE_IO_OP; -+ -+ args.u.avz_console_io_args.console.cmd = CONSOLE_IO_KEYHANDLER; -+ args.u.avz_console_io_args.console.u.c = ch; -+ -+ avz_hypercall(&args); -+ return 1; -+ } -+ } -+ -+ return 0; -+ -+} -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0075-lprintk.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0075-lprintk.c.patch deleted file mode 100644 index 219cbe0..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0075-lprintk.c.patch +++ /dev/null @@ -1,207 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/console/lprintk.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/console/lprintk.c 2026-03-13 13:24:35.602814743 +0100 -@@ -0,0 +1,203 @@ -+/* -+ * Copyright (C) 2016-2018 Daniel Rossier -+ * Copyright (C) 2019 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+#include -+#include -+#include -+ -+#include -+ -+#include -+ -+#include -+ -+#ifdef CONFIG_X86 -+#include -+#include -+#endif -+ -+/* Agency Core */ -+static bool log_soo_core = false; -+ -+/* Backends */ -+static bool log_soo_backend_vsenseled = true; -+static bool log_soo_backend_vuihandler = true; -+ -+struct mutex soo_log_lock; -+ -+bool __soo_log_lock_initialized = false; -+ -+extern int vsnprintf(char *buf, size_t size, const char *fmt, va_list args); -+ -+#ifdef CONFIG_X86 -+extern bool send_to_uart(char *str); -+extern void smp_kick_vt_out(void); -+ -+atomic64_t str_to_print; -+ -+#endif -+ -+void __lprintk(const char *format, va_list va) { -+ char buf[CONSOLEIO_BUFFER_SIZE]; -+ char *__start; -+ -+ vsnprintf(buf, CONSOLEIO_BUFFER_SIZE, format, va); -+ -+ __start = buf; -+ -+ /* Skip printk prefix issued by the standard Linux printk if any */ -+ if ((*__start != 0) && (*__start < 10)) -+ __start += 2; -+ avz_printstr(__start); -+} -+ -+void lprintk(char *format, ...) { -+ -+ va_list va; -+ va_start(va, format); -+ -+ __lprintk(format, va); -+ -+ va_end(va); -+} -+ -+void __soo_log(char *info, char *buf) { -+ char prefix[50]; -+ static char __internal_buf[CONSOLEIO_BUFFER_SIZE] = { }; -+ -+ bool outlog = false; -+ static bool force_log = false; -+ -+ if (__internal_buf[0] == 0) { -+ -+ if ((buf[0] == '*') && (buf[1] == '*') && (buf[2] == '*')) -+ force_log = true; -+ -+ /* Add log information */ -+ sprintf(prefix, "(%s) ", info); -+ strcat(__internal_buf, prefix); -+ } -+ -+ strcat(__internal_buf, buf); -+ -+ if (buf[strlen(buf)-1] != '\n') -+ return ; -+ -+ /* Agency Core */ -+ if ((log_soo_core && (strstr(__internal_buf, "[soo:core")))) -+ outlog = true; -+ -+ /* Backends */ -+ if ((log_soo_backend_vsenseled && (strstr(__internal_buf, "[soo:backend:vsenseled"))) || -+ (log_soo_backend_vuihandler && (strstr(__internal_buf, "[soo:backend:vuihandler"))) -+ ) -+ outlog = true; -+ -+ /* Print out to the console */ -+ if (!outlog && !force_log) { -+ __internal_buf[0] = 0; -+ return ; -+ } -+ force_log = false; -+ -+ /* Out to the interface...*/ -+ -+ printk("%s", __internal_buf); -+ -+ __internal_buf[0] = 0; -+} -+ -+void soo_log(char *format, ...) { -+ va_list va; -+ char buf[CONSOLEIO_BUFFER_SIZE]; -+ -+ if (unlikely(!__soo_log_lock_initialized)) { -+ mutex_init(&soo_log_lock); -+ __soo_log_lock_initialized = true; -+ } -+ -+ mutex_lock(&soo_log_lock); -+ -+ va_start(va, format); -+ vsnprintf(buf, CONSOLEIO_BUFFER_SIZE, format, va); -+ va_end(va); -+ -+ __soo_log("SOO: ", buf); -+ -+ mutex_unlock(&soo_log_lock); -+} -+ -+/** -+ * Print the contents of a buffer. -+ */ -+void soo_log_buffer(void *buffer, uint32_t n) { -+ uint32_t i; -+ -+ for (i = 0 ; i < n ; i++) -+ soo_log("%02x ", ((char *) buffer)[i]); -+} -+ -+/** -+ * Print the contents of a buffer. -+ */ -+void lprintk_buffer(void *buffer, uint32_t n) { -+ uint32_t i; -+ -+ for (i = 0 ; i < n ; i++) -+ lprintk("%02x ", ((char *) buffer)[i]); -+} -+ -+/** -+ * Print the contents of a buffer. -+ */ -+void printk_buffer(void *buffer, uint32_t n) { -+ uint32_t i; -+ -+ for (i = 0 ; i < n ; i++) -+ pr_cont("%02x ", ((char *) buffer)[i]); -+} -+ -+/** -+ * Print the contents of a buffer. Each element is separated using a given character. -+ */ -+void lprintk_buffer_separator(void *buffer, uint32_t n, char separator) { -+ uint32_t i; -+ -+ for (i = 0 ; i < n ; i++) -+ lprintk("%02x%c", ((char *) buffer)[i], separator); -+ lprintk("\n"); -+} -+ -+/** -+ * Print an uint64_t number and concatenate a string. -+ */ -+void lprintk_int64_post(s64 number, char *post) { -+ uint32_t msb = number >> 32; -+ uint32_t lsb = number & 0xffffffff; -+ -+ lprintk("%08x %08x%s", msb, lsb, post); -+} -+ -+/** -+ * Print an uint64_t number. -+ */ -+void lprintk_int64(s64 number) { -+ lprintk_int64_post(number, "\n"); -+} -+ -+ -\ No newline at end of file diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0076-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0076-Makefile.patch deleted file mode 100644 index 328a336..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0076-Makefile.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/console/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/console/Makefile 2026-03-13 13:24:35.602856966 +0100 -@@ -0,0 +1,5 @@ -+ -+ -+obj-y += console.o -+obj-y += lprintk.o -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0077-core.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0077-core.c.patch deleted file mode 100644 index c4f7ed7..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0077-core.c.patch +++ /dev/null @@ -1,303 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/core.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/core.c 2026-03-19 17:07:34.227996874 +0100 -@@ -0,0 +1,300 @@ -+/* -+ * Copyright (C) 2014-2019 Daniel Rossier -+ * Copyright (C) 2017, 2018 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#if 0 -+#define DEBUG -+#endif -+ -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#define AGENCY_DEV_NAME "soo/core" -+#define AGENCY_DEV_MAJOR 126 -+ -+static struct soo_driver soo_core_driver; -+ -+/* SOO subsystem */ -+struct bus_type soo_subsys; -+ -+static struct device soo_dev; -+ -+/** -+ * @brief Shutdown the capsule in a way it depends on its state. -+ * -+ * @param ME_slotID -+ */ -+static void shutdown_capsule(unsigned int ME_slotID) -+{ -+ avz_hyp_t args; -+ -+ /* Asynchronous termination of the capsule */ -+ if (get_ME_state(ME_slotID) != ME_state_stopped) -+ do_sync_dom(ME_slotID, DC_SHUTDOWN); -+ -+ /* Then, final termination of the residual ME */ -+ if ((get_ME_state(ME_slotID) == ME_state_terminated) || -+ (get_ME_state(ME_slotID) == ME_state_stopped)) { -+ args.cmd = AVZ_KILL_ME; -+ args.u.avz_kill_me_args.slotID = ME_slotID; -+ -+ avz_hypercall(&args); -+ } -+} -+ -+static int agency_open(struct inode *inode, struct file *file) -+{ -+ return 0; -+} -+ -+static int agency_release(struct inode *inode, struct file *filp) -+{ -+ return 0; -+} -+ -+static long agency_ioctl(struct file *file, unsigned int cmd, unsigned long arg) -+{ -+ int ret = 0; -+ agency_ioctl_args_t args; -+ -+ if ((copy_from_user(&args, (void *)arg, sizeof(agency_ioctl_args_t))) != 0) { -+ lprintk("Agency: %s:%d Failed to retrieve args from userspace\n", -+ __func__, __LINE__); -+ BUG(); -+ } -+ -+ switch (cmd) { -+ case AGENCY_IOCTL_GET_ME_ID: -+ args.value = (get_ME_id(args.slotID, (ME_id_t *)args.buffer) ? 0 : -1); -+ break; -+ -+ case AGENCY_IOCTL_READ_SNAPSHOT: -+ read_snapshot(args.slotID, args.buffer, (uint32_t *)&args.value); -+ break; -+ -+ case AGENCY_IOCTL_WRITE_SNAPSHOT: -+ args.slotID = write_snapshot(args.buffer); -+ break; -+ -+ case AGENCY_IOCTL_INJECT_CAPSULE: -+ args.slotID = inject_capsule(args.buffer, args.value, args.slotID); -+ break; -+ -+ case AGENCY_IOCTL_START_CAPSULE: -+ start_capsule(args.slotID); -+ break; -+ -+ case AGENCY_IOCTL_SHUTDOWN: -+ shutdown_capsule(args.slotID); -+ break; -+ -+ case AGENCY_IOCTL_GET_ME_ID_ARRAY: -+ get_ME_id_array((ME_id_t *)args.buffer); -+ break; -+ -+ default: -+ lprintk("%s: Unrecognized IOCTL: 0x%x\n", __func__, cmd); -+ BUG(); -+ } -+ -+ if ((copy_to_user((void *)arg, &args, sizeof(agency_ioctl_args_t))) != 0) { -+ lprintk("Agency: %s:%d Failed to send back args to userspace\n", -+ __func__, __LINE__); -+ BUG(); -+ } -+ -+ return ret; -+} -+ -+struct file_operations agency_fops = { -+ .owner = THIS_MODULE, -+ .open = agency_open, -+ .release = agency_release, -+ .unlocked_ioctl = agency_ioctl, -+}; -+ -+/* Driver core definition */ -+ -+struct soo_device { -+ struct device dev; -+ struct resource resource; -+ unsigned int id; -+}; -+ -+static int soo_probe(struct device *dev) -+{ -+ int rc; -+ -+ DBG("%s: probing...\n", __func__); -+ -+ /* Registering device */ -+ rc = register_chrdev(AGENCY_DEV_MAJOR, AGENCY_DEV_NAME, &agency_fops); -+ if (rc < 0) { -+ lprintk("Cannot obtain the major number %d\n", -+ AGENCY_DEV_MAJOR); -+ BUG(); -+ } -+ -+ return 0; -+} -+ -+struct soo_driver { -+ struct device_driver drv; -+ int (*probe)(struct soo_device *); -+ void (*remove)(struct soo_device *); -+ int (*suspend)(struct soo_device *, pm_message_t); -+ int (*resume)(struct soo_device *); -+}; -+ -+#define to_soo_device(d) container_of(d, struct soo_device, dev) -+#define to_soo_driver(d) container_of(d, struct soo_driver, drv) -+ -+static int soo_match(struct device *dev, const struct device_driver *drv) -+{ -+ /* Nothing at the moment, everything is matching... */ -+ -+ return 1; -+} -+ -+struct bus_type soo_subsys = { -+ .name = "soo", -+ .dev_name = "soo", -+ .match = soo_match, -+}; -+ -+static int soo_driver_register(struct soo_driver *drv) -+{ -+ drv->drv.bus = &soo_subsys; -+ -+ return driver_register(&drv->drv); -+} -+ -+/* Module init and exit */ -+ -+static struct soo_driver soo_core_driver = { -+ .drv = { -+ .name = "soo_driver", -+ .probe = soo_probe, -+ }, -+}; -+ -+static struct device soo_dev = { -+ .bus = &soo_subsys, -+}; -+ -+static int agency_reboot_notify(struct notifier_block *nb, unsigned long code, -+ void *unused) -+{ -+ int slotID; -+ ME_desc_t desc; -+ -+ lprintk("%s: !! Now terminating all Mobile Entities of this smart object...\n", -+ __func__); -+ -+ for (slotID = 2; slotID < MAX_DOMAINS; slotID++) { -+ /* -+ * Check if the ME slot is used or not in order to not -+ call shutdown on an empty slot, which would cause an error. -+ */ -+ -+ get_ME_desc(slotID, &desc); -+ -+ if (desc.size > 0) { -+ lprintk("%s: terminating ME %d...\n", __func__, slotID); -+ shutdown_capsule(slotID); -+ } -+ } -+ -+ return NOTIFY_DONE; -+} -+ -+static struct notifier_block agency_reboot_nb = { -+ .notifier_call = agency_reboot_notify, -+}; -+ -+/** -+ * @brief Retrieve the agency UID -+ * -+ * @param str -+ */ -+static void agencyUID_read(char *str) -+{ -+ sprintf(str, "%16llx", avz_shared->dom_desc.u.agency.agencyUID); -+} -+ -+static int agency_init(void) -+{ -+ int rc; -+ -+ DBG("SOO Migration subsystem registering...\n"); -+ -+ soo_sysfs_init(); -+ -+ soo_guest_activity_init(); -+ -+ rc = subsys_system_register(&soo_subsys, NULL); -+ if (rc < 0) { -+ printk("SOO subsystem register failed with rc = %d!\n", rc); -+ return rc; -+ } -+ -+ rc = soo_driver_register(&soo_core_driver); -+ if (rc < 0) { -+ printk("SOO driver register failed with rc = %d!\n", rc); -+ return rc; -+ } -+ -+ rc = device_register(&soo_dev); -+ if (rc < 0) { -+ printk("SOO device register failed with rc = %d!\n", rc); -+ return rc; -+ } -+ -+ capsule_init(); -+ -+ DBG("SOO Migration subsystem registered...\n"); -+ -+ register_reboot_notifier(&agency_reboot_nb); -+ -+ soo_sysfs_register(agencyUID, agencyUID_read, NULL); -+ -+ return 0; -+} -+ -+static void agency_exit(void) -+{ -+ unregister_chrdev(AGENCY_DEV_MAJOR, AGENCY_DEV_NAME); -+ -+ DBG0("SOO Agency exited.\n"); -+} -+ -+subsys_initcall(agency_init); -+module_exit(agency_exit); diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0078-debug.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0078-debug.c.patch deleted file mode 100644 index 9114871..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0078-debug.c.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/debug/debug.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/debug/debug.c 2026-03-13 13:24:35.602939122 +0100 -@@ -0,0 +1,47 @@ -+/* -+ * Copyright (C) 2022 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include -+ -+#include -+ -+void hexdump(void *mem, unsigned int len) -+{ -+ unsigned int i; -+ -+ lprintk("hexdump %d\n", len); -+ for(i = 0; i < len; i++) -+ { -+ /* print offset */ -+ if(i % HEXDUMP_COLS == 0) -+ { -+ lprintk("\n0x%06x: ", i); -+ } -+ -+ /* print hex data */ -+ if(i < len) -+ { -+ lprintk("%02x ", 0xFF & ((char*)mem)[i]); -+ } -+ else /* end of block, just aligning for ASCII dump */ -+ { -+ lprintk("\n"); -+ } -+ } -+ lprintk("\n"); -+} diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0079-Kconfig.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0079-Kconfig.patch deleted file mode 100644 index 7fc0da1..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0079-Kconfig.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/debug/Kconfig 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/debug/Kconfig 2026-03-13 13:24:35.602895315 +0100 -@@ -0,0 +1,9 @@ -+menuconfig VIRTSHARE_DEBUG -+ default y -+ bool "Virtshare debugging tools" -+ -+if VIRTSHARE_DEBUG -+ -+ -+ -+endif # VIRTSHARE_DEBUG diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0080-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0080-Makefile.patch deleted file mode 100644 index 4a8f5d5..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0080-Makefile.patch +++ /dev/null @@ -1,6 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/debug/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/debug/Makefile 2026-03-13 13:24:35.602957917 +0100 -@@ -0,0 +1,3 @@ -+ -+obj-y += meminfo.o -+obj-y += debug.o diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0081-meminfo.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0081-meminfo.c.patch deleted file mode 100644 index 4507b80..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0081-meminfo.c.patch +++ /dev/null @@ -1,151 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/debug/meminfo.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/debug/meminfo.c 2026-03-13 13:24:35.602918778 +0100 -@@ -0,0 +1,148 @@ -+/* -+ * Copyright (C) 2017 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include -+ -+#include -+#include -+ -+#define TTB_L0_ORDER 9 -+#define TTB_L1_ORDER 9 -+#define TTB_L2_ORDER 9 -+#define TTB_L3_ORDER 9 -+ -+#define TTB_I0_SHIFT 39 -+#define TTB_I0_MASK (~((1 << TTB_I0_SHIFT)-1)) -+ -+#define TTB_I1_SHIFT 30 -+#define TTB_I1_MASK (~((1 << TTB_I1_SHIFT)-1)) -+ -+#define TTB_I2_SHIFT 21 -+#define TTB_I2_MASK (~((1 << TTB_I2_SHIFT)-1)) -+ -+#define TTB_I3_SHIFT 12 -+#define TTB_I3_MASK (~((1 << TTB_I3_SHIFT)-1)) -+ -+#define TTB_L0_ENTRIES (1 << TTB_L0_ORDER) -+#define TTB_L1_ENTRIES (1 << TTB_L1_ORDER) -+#define TTB_L2_ENTRIES (1 << TTB_L2_ORDER) -+#define TTB_L3_ENTRIES (1 << TTB_L3_ORDER) -+ -+/* Block related */ -+#define TTB_L1_BLOCK_ADDR_SHIFT 30 -+#define TTB_L1_BLOCK_ADDR_OFFSET (1 << TTB_L1_BLOCK_ADDR_SHIFT) -+#define TTB_L1_BLOCK_ADDR_MASK ((~(TTB_L1_BLOCK_ADDR_OFFSET - 1)) & ((1UL << 48) - 1)) -+ -+#define TTB_L2_BLOCK_ADDR_SHIFT 21 -+#define TTB_L2_BLOCK_ADDR_OFFSET (1 << TTB_L2_BLOCK_ADDR_SHIFT) -+#define TTB_L2_BLOCK_ADDR_MASK ((~(TTB_L2_BLOCK_ADDR_OFFSET - 1)) & ((1UL << 48) - 1)) -+ -+/* Table related */ -+#define TTB_L0_TABLE_ADDR_SHIFT 12 -+#define TTB_L0_TABLE_ADDR_OFFSET (1 << TTB_L0_TABLE_ADDR_SHIFT) -+#define TTB_L0_TABLE_ADDR_MASK ((~(TTB_L0_TABLE_ADDR_OFFSET - 1)) & ((1UL << 48) - 1)) -+ -+#define TTB_L1_TABLE_ADDR_SHIFT TTB_L0_TABLE_ADDR_SHIFT -+#define TTB_L1_TABLE_ADDR_OFFSET TTB_L0_TABLE_ADDR_OFFSET -+#define TTB_L1_TABLE_ADDR_MASK TTB_L0_TABLE_ADDR_MASK -+ -+#define TTB_L2_TABLE_ADDR_SHIFT TTB_L0_TABLE_ADDR_SHIFT -+#define TTB_L2_TABLE_ADDR_OFFSET TTB_L0_TABLE_ADDR_OFFSET -+#define TTB_L2_TABLE_ADDR_MASK TTB_L0_TABLE_ADDR_MASK -+ -+#define TTB_L3_PAGE_ADDR_SHIFT 12 -+#define TTB_L3_PAGE_ADDR_OFFSET (1 << TTB_L3_PAGE_ADDR_SHIFT) -+#define TTB_L3_PAGE_ADDR_MASK ((~(TTB_L3_PAGE_ADDR_OFFSET - 1)) & ((1UL << 48) - 1)) -+ -+#define PTE_TYPE_FAULT (0 << 0) -+#define PTE_TYPE_TABLE (3 << 0) -+#define PTE_TYPE_BLOCK (1 << 0) -+#define PTE_TYPE_VALID (1 << 0) -+ -+ -+static inline int pte_type(unsigned long *pte) -+{ -+ return *pte & PTE_TYPE_MASK; -+} -+ -+ -+void dump_pgtable(unsigned long *l0pgtable) { -+ -+ unsigned long i, j, k, l; -+ unsigned long *l0pte, *l1pte, *l2pte, *l3pte; -+ -+ lprintk(" ***** Page table dump *****\n"); -+ -+ for (i = 0; i < TTB_L0_ENTRIES; i++) { -+ l0pte = l0pgtable + i; -+ if (*l0pte) { -+ -+ lprintk(" - L0 pte@%lx (idx %x) mapping %lx content: %lx\n", l0pgtable+i, i, i << TTB_I0_SHIFT, *l0pte); -+ BUG_ON(pte_type(l0pte) != PTE_TYPE_TABLE); -+ -+ /* Walking through the blocks/table entries */ -+ for (j = 0; j < TTB_L1_ENTRIES; j++) { -+ l1pte = ((unsigned long *) __va(*l0pte & TTB_L0_TABLE_ADDR_MASK)) + j; -+ if (*l1pte) { -+ if (pte_type(l1pte) == PTE_TYPE_TABLE) { -+ lprintk(" (TABLE) L1 pte@%lx (idx %x) mapping %lx content: %lx\n", l1pte, j, -+ (i << TTB_I0_SHIFT) + (j << TTB_I1_SHIFT), *l1pte); -+ -+ for (k = 0; k < TTB_L2_ENTRIES; k++) { -+ l2pte = ((unsigned long *) __va(*l1pte & TTB_L1_TABLE_ADDR_MASK)) + k; -+ if (*l2pte) { -+ if (pte_type(l2pte) == PTE_TYPE_TABLE) { -+ lprintk(" (TABLE) L2 pte@%lx (idx %x) mapping %lx content: %lx\n", l2pte, k, -+ (i << TTB_I0_SHIFT) + (j << TTB_I1_SHIFT) + (k << TTB_I2_SHIFT), *l2pte); -+ -+ for (l = 0; l < TTB_L3_ENTRIES; l++) { -+ l3pte = ((unsigned long *) __va(*l2pte & TTB_L2_TABLE_ADDR_MASK)) + l; -+ if (*l3pte) -+ lprintk(" (PAGE) L3 pte@%lx (idx %x) mapping %lx content: %lx\n", l3pte, l, -+ (i << TTB_I0_SHIFT) + (j << TTB_I1_SHIFT) + (k << TTB_I2_SHIFT) + (l << TTB_I3_SHIFT), *l3pte); -+ } -+ } else { -+ /* Necessary of BLOCK type */ -+ BUG_ON(pte_type(l2pte) != PTE_TYPE_BLOCK); -+ lprintk(" (PAGE) L2 pte@%lx (idx %x) mapping %lx content: %lx\n", l2pte, k, -+ (i << TTB_I0_SHIFT) + (j << TTB_I1_SHIFT) + (k << TTB_I2_SHIFT), *l2pte); -+ } -+ } -+ } -+ } else { -+ /* Necessary of BLOCK type */ -+ BUG_ON(pte_type(l1pte) != PTE_TYPE_BLOCK); -+ -+ lprintk(" (PAGE) L1 pte@%lx (idx %x) mapping %lx content: %lx\n", l1pte, j, (i << TTB_I0_SHIFT) + (j << TTB_I1_SHIFT), *l1pte); -+ } -+ } -+ } -+ -+ } -+ } -+} -+ -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0082-evtchn.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0082-evtchn.c.patch deleted file mode 100644 index 5415b8f..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0082-evtchn.c.patch +++ /dev/null @@ -1,416 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/evtchn.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/evtchn.c 2026-03-23 10:03:37.924311794 +0100 -@@ -0,0 +1,413 @@ -+ -+/* -+ * Copyright (C) 2014-2016 Daniel Rossier -+ * Copyright (C) 2016 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#if 0 -+#define DEBUG -+#endif -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+ -+#include -+#include -+ -+#include -+#include -+ -+#include -+ -+/* Convenient shorthand for packed representation of an unbound IRQ. */ -+#define IRQ_UNBOUND mk_virq_info(IRQT_UNBOUND, 0, 0) -+ -+/* -+ * This lock protects updates to the following mapping and reference-count -+ * arrays. The lock does not need to be acquired to read the mapping tables. -+ * -+ * All evtchn-indexed arrays are GLOBAL (not per-CPU): an evtchn binding is a -+ * system-wide property. The original per-CPU design caused SMP races where -+ * virq_handle() on CPU Y would not find evtchns bound on CPU X, silently -+ * dropping all ME→Linux event channel notifications. -+ */ -+static DEFINE_SPINLOCK(virq_mapping_update_lock); -+ -+static int evtchn_to_virq[NR_EVTCHN]; /* evtchn -> virq (global) */ -+static u32 virq_to_evtchn[NR_VIRQS]; /* virq -> evtchn (global) */ -+static bool evtchn_valid[NR_EVTCHN]; /* evtchn in use (global) */ -+static bool evtchn_masked[NR_EVTCHN]; /* evtchn masked (global) */ -+static int virq_bindcount[NR_VIRQS]; /* reference counts (global) */ -+ -+inline unsigned int evtchn_from_virq_and_cpu(unsigned int virq, unsigned int cpu) { -+ return virq_to_evtchn[virq]; -+} -+ -+inline unsigned int evtchn_from_virq(int virq) -+{ -+ return virq_to_evtchn[virq]; -+} -+ -+inline unsigned int evtchn_from_irq_data(struct irq_data *irq_data) -+{ -+ return evtchn_from_virq(irq_data->irq - VIRQ_BASE); -+} -+ -+/* __evtchn_from_irq : helpful for irq_chip handlers */ -+#define __evtchn_from_virq evtchn_from_irq_data -+ -+static inline bool evtchn_is_masked(unsigned int b) { -+ return evtchn_masked[b]; -+} -+ -+#if 0 /* debug */ -+static void dump_evtchn_pending(void) { -+ int i; -+ -+ lprintk(" Evtchn info in Agency\n\n"); -+ -+ for (i = 0; i < NR_EVTCHN; i++) -+ lprintk("e:%d m:%d p:%d ", i, evtchn_masked[i], -+ avz_shared->evtchn_pending[i]); -+ -+ lprintk("\n\n"); -+} -+#endif /* 0 */ -+ -+/* NB. Interrupts are disabled on entry. */ -+ -+static struct irq_chip virtirq_chip; -+ -+/* -+ * evtchn_do_upcall -+ * -+ * This is the main entry point for processing IRQs and VIRQs for this domain. -+ * -+ * The function runs with IRQs OFF during the whole execution of the function. As such, this function is executed in top half processing of the IRQ. -+ * - All pending event channels are processed one after the other, according to their bit position within the bitmap. -+ * - Checking pending IRQs in AVZ (low-level IRQ) is performed at the end of the loop so that we can react immediately if some new IRQs have been generated -+ * and are present in the GIC. -+ * -+ */ -+void virq_handle(unsigned irq_nr) -+{ -+ unsigned int evtchn; -+ int l1, virq; -+ int loopmax = 0; -+ -+ BUG_ON(!irqs_disabled()); -+ -+retry: -+ l1 = xchg(&avz_shared->evtchn_upcall_pending, 0); -+ -+ while (true) { -+ for (evtchn = 0; evtchn < NR_EVTCHN; evtchn++) -+ if ((avz_shared->evtchn_pending[evtchn]) && !evtchn_is_masked(evtchn)) -+ break; -+ -+ if (evtchn == NR_EVTCHN) -+ break; -+ -+ BUG_ON(!evtchn_valid[evtchn]); -+ -+ loopmax++; -+ -+ if (loopmax > 500) /* Probably something wrong ;-) */ -+ lprintk("%s: Warning trying to process evtchn: %d IRQ: %d for quite a long time on CPU %d / masked: %d...\n", -+ __func__, evtchn, evtchn_to_virq[evtchn], smp_processor_id(), evtchn_is_masked(evtchn)); -+ -+ virq = evtchn_to_virq[evtchn]; -+ -+ clear_evtchn(evtchn); -+ -+ generic_handle_irq(VIRQ_BASE + virq); -+ -+ BUG_ON(!irqs_disabled()); -+ }; -+ -+ if (avz_shared->evtchn_upcall_pending) -+ goto retry; -+ -+} -+ -+static int find_unbound_virq(int cpu) -+{ -+ int virq; -+ -+ /* virq_bindcount is now global; simple scan suffices */ -+ for (virq = 0; virq < NR_VIRQS; virq++) -+ if (virq_bindcount[virq] == 0) -+ break; -+ -+ if (virq == NR_VIRQS) -+ panic("No available IRQ to bind to: increase NR_IRQS!\n"); -+ -+ return virq; -+} -+ -+static int bind_evtchn_to_virq(unsigned int evtchn) -+{ -+ int virq; -+ int cpu = smp_processor_id(); -+ -+ spin_lock(&virq_mapping_update_lock); -+ -+ if ((virq = evtchn_to_virq[evtchn]) == -1) { -+ virq = find_unbound_virq(cpu); -+ evtchn_to_virq[evtchn] = virq; -+ virq_to_evtchn[virq] = evtchn; -+ evtchn_valid[evtchn] = true; -+ } -+ -+ virq_bindcount[virq]++; -+ -+ spin_unlock(&virq_mapping_update_lock); -+ -+ return virq; -+} -+ -+void unbind_domain_evtchn(unsigned int domID, unsigned int evtchn) -+{ -+ avz_hyp_t args; -+ -+ args.cmd = AVZ_EVENT_CHANNEL_OP; -+ args.u.avz_evtchn.evtchn_op.cmd = EVTCHNOP_unbind_domain; -+ -+ args.u.avz_evtchn.evtchn_op.u.bind_interdomain.remote_dom = domID; -+ args.u.avz_evtchn.evtchn_op.u.bind_interdomain.local_evtchn = evtchn; -+ -+ avz_hypercall(&args); -+ -+ evtchn_valid[evtchn] = false; -+} -+ -+static int bind_interdomain_evtchn_to_virq(unsigned int remote_domain, unsigned int remote_evtchn) -+{ -+ avz_hyp_t args; -+ int virq; -+ -+ args.cmd = AVZ_EVENT_CHANNEL_OP; -+ args.u.avz_evtchn.evtchn_op.cmd = EVTCHNOP_bind_interdomain; -+ -+ args.u.avz_evtchn.evtchn_op.u.bind_interdomain.remote_dom = remote_domain; -+ args.u.avz_evtchn.evtchn_op.u.bind_interdomain.remote_evtchn = remote_evtchn; -+ -+ avz_hypercall(&args); -+ -+ virq = bind_evtchn_to_virq(args.u.avz_evtchn.evtchn_op.u.bind_interdomain.local_evtchn); -+ -+ return virq; -+} -+ -+int bind_existing_interdomain_evtchn(unsigned local_evtchn, unsigned int remote_domain, unsigned int remote_evtchn) -+{ -+ avz_hyp_t args; -+ int virq; -+ -+ args.cmd = AVZ_EVENT_CHANNEL_OP; -+ args.u.avz_evtchn.evtchn_op.cmd = EVTCHNOP_bind_existing_interdomain; -+ -+ args.u.avz_evtchn.evtchn_op.u.bind_interdomain.local_evtchn = local_evtchn; -+ args.u.avz_evtchn.evtchn_op.u.bind_interdomain.remote_dom = remote_domain; -+ args.u.avz_evtchn.evtchn_op.u.bind_interdomain.remote_evtchn = remote_evtchn; -+ -+ avz_hypercall(&args); -+ -+ virq = bind_evtchn_to_virq(args.u.avz_evtchn.evtchn_op.u.bind_interdomain.local_evtchn); -+ -+ return virq; -+} -+ -+static void unbind_from_virq(unsigned int virq) -+{ -+ avz_hyp_t args; -+ int evtchn = virq_to_evtchn[virq]; -+ -+ spin_lock(&virq_mapping_update_lock); -+ -+ if (--virq_bindcount[virq] == 0) { -+ -+ args.cmd = AVZ_EVENT_CHANNEL_OP; -+ args.u.avz_evtchn.evtchn_op.cmd = EVTCHNOP_close; -+ -+ args.u.avz_evtchn.evtchn_op.u.close.evtchn = evtchn; -+ -+ avz_hypercall(&args); -+ -+ evtchn_to_virq[evtchn] = -1; -+ evtchn_valid[evtchn] = false; -+ } -+ -+ spin_unlock(&virq_mapping_update_lock); -+} -+ -+int bind_evtchn_to_virq_handler(unsigned int evtchn, irq_handler_t handler, irq_handler_t thread_fn, unsigned long irqflags, const char *devname, void *dev_id) -+{ -+ unsigned int virq; -+ int retval; -+ -+ virq = bind_evtchn_to_virq(evtchn); -+ -+ retval = request_threaded_irq(VIRQ_BASE + virq, handler, thread_fn, irqflags, devname, dev_id); -+ if (retval != 0) { -+ unbind_from_virq(virq); -+ return retval; -+ } -+ -+ return virq; -+} -+ -+int bind_interdomain_evtchn_to_virqhandler(unsigned int remote_domain, unsigned int remote_evtchn, irq_handler_t handler, irq_handler_t thread_fn, unsigned long irqflags, const char *devname, void *dev_id) -+{ -+ int virq, retval; -+ -+ DBG("%s: devname = %s / remote evtchn: %d remote domain: %d\n", __func__, devname, remote_evtchn, remote_domain); -+ virq = bind_interdomain_evtchn_to_virq(remote_domain, remote_evtchn); -+ BUG_ON(virq < 0); -+ -+ if (handler != NULL) { -+ retval = request_threaded_irq(VIRQ_BASE + virq, handler, thread_fn, irqflags, devname, dev_id); -+ if (retval != 0) -+ BUG(); -+ } -+ -+ return virq; -+} -+ -+void unbind_from_virqhandler(unsigned int virq, void *dev_id) -+{ -+ struct irq_desc *desc = irq_to_desc(VIRQ_BASE + virq); -+ -+ /* If we have a virq only to manage notification (without handler), -+ * we should not free an "already-free" irq in Linux. -+ */ -+ if (desc->action) -+ free_irq(VIRQ_BASE + virq, dev_id); -+ -+ unbind_from_virq(virq); -+ -+} -+ -+/* -+ * Interface to generic handling in irq.c -+ */ -+static unsigned int startup_virtirq(struct irq_data *irq) -+{ -+ int evtchn = evtchn_from_irq_data(irq); -+ -+ unmask_evtchn(evtchn); -+ return 0; -+} -+ -+static void shutdown_virtirq(struct irq_data *irq) -+{ -+ int evtchn = evtchn_from_irq_data(irq); -+ -+ mask_evtchn(evtchn); -+} -+ -+static void enable_virtirq(struct irq_data *irq) -+{ -+ int evtchn = evtchn_from_irq_data(irq); -+ -+ unmask_evtchn(evtchn); -+} -+ -+static void disable_virtirq(struct irq_data *irq) -+{ -+ int evtchn = evtchn_from_irq_data(irq); -+ -+ mask_evtchn(evtchn); -+} -+ -+static struct irq_chip virtirq_chip = { -+ .name = "avz_virt-irq", -+ .irq_startup = startup_virtirq, -+ .irq_shutdown = shutdown_virtirq, -+ .irq_enable = enable_virtirq, -+ .irq_disable = disable_virtirq, -+ .irq_unmask = enable_virtirq, -+ .irq_mask = disable_virtirq, -+}; -+ -+ -+void notify_remote_via_virq(int virq) -+{ -+ /* virq_to_evtchn is now a global array — direct lookup */ -+ notify_remote_via_evtchn(virq_to_evtchn[virq]); -+} -+ -+void mask_evtchn(int evtchn) -+{ -+ evtchn_masked[evtchn] = true; -+} -+ -+void unmask_evtchn(int evtchn) -+{ -+ evtchn_masked[evtchn] = false; -+} -+ -+void virq_init(void) -+{ -+ struct irq_desc *irqdesc; /* Linux IRQ descriptor */ -+ int i; -+ -+ /* Initialize global evtchn state */ -+ for (i = 0; i < NR_EVTCHN; i++) { -+ evtchn_to_virq[i] = -1; -+ evtchn_valid[i] = false; -+ evtchn_masked[i] = true; /* all masked until explicitly unmasked */ -+ } -+ -+#ifdef CONFIG_SPARSE_IRQ -+ irq_alloc_descs(VIRQ_BASE, VIRQ_BASE, NR_VIRQS, numa_node_id()); -+#endif -+ -+ for (i = 0; i < NR_VIRQS; i++) { -+ virq_to_evtchn[i] = 0; -+ virq_bindcount[i] = 0; -+ } -+ -+ /* Configure the irqdesc associated to VIRQs */ -+ for (i = 0; i < NR_VIRQS; i++) { -+ irqdesc = irq_to_desc(VIRQ_BASE + i); -+ -+ irqdesc->irq_data.common->state_use_accessors |= IRQD_IRQ_DISABLED; -+ irqdesc->status_use_accessors &= ~IRQ_NOREQUEST; -+ -+ irqdesc->action = NULL; -+ irqdesc->depth = 1; -+ irqdesc->irq_data.chip = &virtirq_chip; -+ -+ irq_set_handler(VIRQ_BASE + i, handle_level_irq); -+ } -+} diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0083-gnttab.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0083-gnttab.c.patch deleted file mode 100644 index d497cd1..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0083-gnttab.c.patch +++ /dev/null @@ -1,91 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/gnttab.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/gnttab.c 2026-03-13 13:24:35.603255383 +0100 -@@ -0,0 +1,88 @@ -+/* -+ * Copyright (C) 2016-2019 Daniel Rossier -+ * Copyright (C) 2018 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#if 0 -+#define DEBUG -+#endif -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+#include /* hypercall defs */ -+#include -+#include -+ -+extern void unmap_kernel_range(unsigned long addr, unsigned long size); -+ -+#ifdef DEBUG -+void gnttab_dump(void); -+#endif -+ -+/* -+ * Public grant-issuing interface functions -+ */ -+int gnttab_grant_foreign_access(domid_t domid, unsigned long pfn) -+{ -+ gnttab_op_t gnttab_op; -+ -+ /* Invoke the hypercall to grant access to domid */ -+ gnttab_op.cmd = GNTTAB_grant_page; -+ gnttab_op.domid = domid; -+ gnttab_op.pfn = pfn; -+ -+ avz_gnttab(&gnttab_op); -+ -+ return gnttab_op.ref; -+} -+ -+/** -+ * @brief Query the hypervisor to retrieve a pfn from a grant reference and -+ * do a mapping and return a vaddr -+ * -+ * @param gnttab_op -+ */ -+void gnttab_map(domid_t domid, grant_ref_t grant_ref, void **vaddr) { -+ gnttab_op_t gnttab_op; -+ -+ gnttab_op.cmd = GNTTAB_map_page; -+ gnttab_op.domid = domid; -+ gnttab_op.ref = grant_ref; -+ -+ avz_gnttab(&gnttab_op); -+ -+ *vaddr = ioremap_wc(__pfn_to_phys(gnttab_op.pfn), PAGE_SIZE); -+} -+ -+void gnttab_unmap(void *vaddr) { -+ iounmap(vaddr); -+} diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0084-hypervisor.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0084-hypervisor.c.patch deleted file mode 100644 index 21b163d..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0084-hypervisor.c.patch +++ /dev/null @@ -1,137 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/hypervisor.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/hypervisor.c 2026-03-17 12:45:49.802208271 +0100 -@@ -0,0 +1,134 @@ -+/* -+ * Copyright (C) 2016-2019 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include -+#include -+#include -+ -+#include -+ -+/* -+ * SOO hypercall -+ * -+ * Mandatory arguments: -+ * - cmd: hypercall -+ * - addr: a virtual address used within the hypervisor -+ * - p_val1: a (virtual) address to a first value -+ * - p_val2: a (virtual) address to a second value -+ */ -+ -+ #if 0 -+void avz_hypercall(void *args) -+{ -+ avz_hyp_t *__avz_hyp, *avz_hyp = (avz_hyp_t *) args; -+ unsigned long flags; -+ -+ /* Make sure the avz_hyp details are in a linear-mapped zone -+ * to be able to pass the physical address to the hypervisor. -+ */ -+ __avz_hyp = kmalloc(sizeof(avz_hyp_t), GFP_KERNEL); -+ BUG_ON(!__avz_hyp); -+ -+ memcpy(__avz_hyp, avz_hyp, sizeof(avz_hyp_t)); -+ -+ dcache_clean_inval_poc((unsigned long) __avz_hyp, sizeof(avz_hyp_t)); -+ -+ local_irq_save(flags); -+ __avz_hypercall(AVZ_HYPERCALL_TRAP, virt_to_phys(__avz_hyp)); -+ local_irq_restore(flags); -+ -+ memcpy(avz_hyp, __avz_hyp, sizeof(avz_hyp_t)); -+ -+ kfree(__avz_hyp); -+} -+#endif -+ -+void avz_hypercall(void *args) -+{ -+ avz_hyp_t *__avz_hyp; -+ avz_hyp_t *avz_hyp = (avz_hyp_t *) args; -+ -+ __avz_hyp = kmalloc(sizeof(avz_hyp_t), GFP_ATOMIC); -+ BUG_ON(!__avz_hyp); -+ -+ memcpy(__avz_hyp, avz_hyp, sizeof(avz_hyp_t)); -+ -+ dcache_clean_inval_poc((unsigned long) __avz_hyp, sizeof(avz_hyp_t)); -+ __avz_hypercall(AVZ_HYPERCALL_TRAP, virt_to_phys(__avz_hyp)); -+ dcache_clean_inval_poc((unsigned long) __avz_hyp, sizeof(avz_hyp_t)); -+ -+ memcpy(avz_hyp, __avz_hyp, sizeof(avz_hyp_t)); -+ -+ kfree(__avz_hyp); -+ -+} -+ -+void avz_get_shared(void) { -+ avz_hyp_t args; -+ -+ args.cmd = AVZ_DOMAIN_CONTROL_OP; -+ args.u.avz_domctl_args.domctl.cmd = DOMCTL_get_AVZ_shared; -+ -+ avz_hypercall(&args); -+ -+ BUG_ON(!args.u.avz_domctl_args.domctl.avz_shared_paddr); -+ -+ avz_shared = (volatile avz_shared_t *) paging_remap(args.u.avz_domctl_args.domctl.avz_shared_paddr, PAGE_SIZE); -+ BUG_ON(!avz_shared); -+} -+ -+void avz_printch(char c) { -+ avz_hyp_t args; -+ -+ args.cmd = AVZ_CONSOLE_IO_OP; -+ -+ args.u.avz_console_io_args.console.cmd = CONSOLE_IO_PRINTCH; -+ args.u.avz_console_io_args.console.u.c = c; -+ -+ avz_hypercall(&args); -+} -+ -+void avz_printstr(char *s) { -+ avz_hyp_t args; -+ -+ args.cmd = AVZ_CONSOLE_IO_OP; -+ args.u.avz_console_io_args.console.cmd = CONSOLE_IO_PRINTSTR; -+ -+ strncpy(args.u.avz_console_io_args.console.u.str, s, CONSOLE_STR_MAX_LEN); -+ -+ avz_hypercall(&args); -+} -+ -+void avz_gnttab(gnttab_op_t *op) { -+ avz_hyp_t args; -+ -+ args.cmd = AVZ_GRANT_TABLE_OP; -+ -+ memcpy(&args.u.avz_gnttab_args.gnttab_op, op, sizeof(gnttab_op_t)); -+ avz_hypercall(&args); -+ memcpy(op, &args.u.avz_gnttab_args.gnttab_op, sizeof(gnttab_op_t)); -+} -+ -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0085-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0085-Makefile.patch deleted file mode 100644 index a90edcc..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0085-Makefile.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/Makefile 2026-03-13 13:24:35.603218084 +0100 -@@ -0,0 +1,27 @@ -+# -+# Makefile for the linux kernel. -+# -+# -+obj-y += setup.o -+obj-y += sysfs.o -+obj-y += hypervisor.o -+obj-y += evtchn.o -+obj-y += gnttab.o -+obj-y += soo_guest_activity.o -+ -+obj-y += core.o -+obj-y += capsule.o -+ -+obj-y += console/ debug/ -+obj-y += vbus/ vbstore/ -+ -+obj-$(CONFIG_SOO_CORE_ASF) += asf/ -+ -+obj-$(CONFIG_ARM64) += arm64/ -+ -+# dependencies on generated files need to be listed explicitly -+ -+mrproper clean: -+ @find . -name "*.o" | xargs rm -f -+ -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0086-setup.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0086-setup.c.patch deleted file mode 100644 index 5e50203..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0086-setup.c.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/setup.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/setup.c 2026-03-13 13:24:35.602977333 +0100 -@@ -0,0 +1,30 @@ -+/* -+ * Copyright (C) 2014-2021 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include -+ -+#include -+#include -+ -+#include -+ -+#include -+#include -+ -+ -+volatile avz_shared_t *avz_shared; -\ No newline at end of file diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0087-soo_guest_activity.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0087-soo_guest_activity.c.patch deleted file mode 100644 index b5cd869..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0087-soo_guest_activity.c.patch +++ /dev/null @@ -1,194 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/soo_guest_activity.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/soo_guest_activity.c 2026-03-13 13:24:35.602992950 +0100 -@@ -0,0 +1,191 @@ -+/* -+ * Copyright (C) 2016-2019 Daniel Rossier -+ * Copyright (C) 2018-2019 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#if 0 -+#define DEBUG -+#endif -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+ -+#include -+ -+/* -+ * Used to keep track of the target domain for a certain (outgoing) dc_event. -+ * Value -1 means no dc_event in progress. -+ */ -+atomic_t dc_outgoing_domID[DC_EVENT_MAX]; -+ -+/* -+ * Used to store the domID issuing a (incoming) dc_event -+ */ -+atomic_t dc_incoming_domID[DC_EVENT_MAX]; -+ -+static struct completion dc_stable_lock[DC_EVENT_MAX]; -+ -+void dc_stable(int dc_event) -+{ -+ /* It may happen that the thread which performs the down did not have time to perform the call and is not suspended. -+ * In this case, complete() will increment the count and wait_for_completion() will go straightforward. -+ */ -+ -+ complete(&dc_stable_lock[dc_event]); -+ atomic_set(&dc_incoming_domID[dc_event], -1); -+} -+ -+/* -+ * Prepare a remote ME to react to a ping event. -+ * @domID: the target ME -+ */ -+void set_dc_event(domid_t domID, dc_event_t dc_event) -+{ -+ avz_hyp_t args; -+ -+ DBG("%s(%d, %d)\n", __func__, domID, dc_event); -+ -+ args.cmd = AVZ_DC_EVENT_SET; -+ args.u.avz_dc_event_args.domID = domID; -+ args.u.avz_dc_event_args.dc_event = dc_event; -+ -+ avz_hypercall(&args); -+ -+ while (args.u.avz_dc_event_args.state == -EBUSY) { -+ schedule(); -+ avz_hypercall(&args); -+ } -+} -+ -+/* -+ * Sends a ping event to a remote domain in order to get synchronized. -+ * Various types of event (dc_event) can be sent. -+ * -+ * @domID: the target domain -+ * @dc_event: type of event used in the synchronization -+ */ -+void do_sync_dom(int domID, dc_event_t dc_event) -+{ -+ /* Ping the remote domain to perform the task associated to the DC event */ -+ DBG("%s: ping domain %d...\n", __func__, domID); -+ -+ /* Make sure a previous transaction is not ongoing. */ -+ -+ while (atomic_cmpxchg(&dc_outgoing_domID[dc_event], -1, domID) != -1) -+ schedule(); -+ -+ /* Configure the dc event on the target domain */ -+ -+ set_dc_event(domID, dc_event); -+ -+ DBG("%s: notifying via evtchn %d...\n", __func__, avz_shared->dom_desc.u.agency.dc_evtchn[domID]); -+ notify_remote_via_evtchn(avz_shared->dom_desc.u.agency.dc_evtchn[domID]); -+ -+ /* Wait for the response from the outgoing domain, and reset the barrier. */ -+ -+ DBG("%s: waiting for completion on dc_event %d...\n", __func__, dc_event); -+ wait_for_completion(&dc_stable_lock[dc_event]); -+ -+ DBG("%s: all right, got the completion, resetting the barrier.\n", __func__); -+ atomic_set(&dc_outgoing_domID[dc_event], -1); -+} -+ -+/* -+ * Tell a specific domain that we are now in a stable state regarding the dc_event actions. -+ * Typically, this comes after receiving a dc_event leading to a dc_event related action. -+ */ -+void tell_dc_stable(int dc_event) { -+ int domID; -+ -+ domID = atomic_read(&dc_incoming_domID[dc_event]); -+ BUG_ON(domID == -1); -+ -+ DBG("vbus_stable: now pinging domain %d back\n", domID); -+ set_dc_event(domID, dc_event); -+ -+ /* Ping the remote domain to perform the task associated to the DC event */ -+ DBG("%s: ping domain %d...\n", __func__, domID); -+ -+ atomic_set(&dc_incoming_domID[dc_event], -1); -+ notify_remote_via_evtchn(avz_shared->dom_desc.u.agency.dc_evtchn[domID]); -+} -+ -+#if 0 /* debug */ -+ -+static void dump_threads(void) -+{ -+ struct task_struct *p; -+ -+ for_each_process(p) { -+ -+ lprintk(" Backtrace for process pid: %d\n\n", p->pid); -+ -+ show_stack(p, NULL, KERN_INFO); -+ } -+} -+#endif /* 0 */ -+ -+/** -+ * This callback is executed when the TRIGGER_DEV_PROBE dc_event is received. -+ * All vbstore entries required by the frontends are created and ready to -+ * proceed with backend initialization. -+ * -+ * @param dc_event Normal callback argument, must be TRIGGER_DEV_PROBE -+ */ -+static void dc_trigger_dev_probe_fn(dc_event_t dc_event) { -+ -+ vbus_probe_backend(atomic_read(&dc_incoming_domID[dc_event])); -+ -+ tell_dc_stable(dc_event); -+} -+ -+void soo_guest_activity_init(void) -+{ -+ unsigned int i; -+ -+ for (i = 0; i < DC_EVENT_MAX; i++) { -+ atomic_set(&dc_outgoing_domID[i], -1); -+ atomic_set(&dc_incoming_domID[i], -1); -+ -+ init_completion(&dc_stable_lock[i]); -+ } -+ -+ register_dc_event_callback(DC_TRIGGER_DEV_PROBE, dc_trigger_dev_probe_fn); -+ -+} -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0088-sysfs.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0088-sysfs.c.patch deleted file mode 100644 index a7714ae..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0088-sysfs.c.patch +++ /dev/null @@ -1,196 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/sysfs.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/sysfs.c 2026-03-13 13:24:35.603386917 +0100 -@@ -0,0 +1,193 @@ -+ -+/* -+ * Copyright (C) 2020 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include -+ -+/* Required to have a real string for each attribute. */ -+char *soo_sysfs_names[] = { -+ [agencyUID] = "agencyUID", -+ [name] = "name", -+ [vsensej_js]= "vsensej_js", -+ [vfbdev_hres] = "vfbdev_hres", -+ [vfbdev_vres] = "vfbdev_vres", -+ [vfbdev_bpp] = "vfbdev_bpp", -+ [vfbdev_size] = "vfbdev_size", -+ [vfbdev_addr] = "vfbdev_addr", -+ [vfbdev_pid] = "vfbdev_pid", -+}; -+ -+static struct kobject *root_kobj; -+ -+static struct kobject *backend_kobj; -+static struct kobject *backend_vsensej_kobj; -+static struct kobject *backend_vfbdev_kobj; -+ -+ -+/* Internal list structure to manage the diversity of callback functions related to attributes */ -+typedef struct { -+ soo_sysfs_attr_t attr; -+ sysfs_handler_t show_handler, store_handler; -+ struct list_head list; -+} handler_list_t; -+ -+static struct list_head handlers; -+ -+void soo_sysfs_register(soo_sysfs_attr_t attr, sysfs_handler_t show_handler, sysfs_handler_t store_handler) { -+ handler_list_t *handler; -+ -+ handler = kmalloc(sizeof(handler_list_t), GFP_ATOMIC); -+ BUG_ON(!handler); -+ -+ handler->attr = attr; -+ handler->show_handler = show_handler; -+ handler->store_handler = store_handler; -+ -+ list_add(&handler->list, &handlers); -+} -+ -+static ssize_t attr_show(struct kobject *kobj, struct kobj_attribute *attr, char *str) { -+ handler_list_t *handler; -+ -+ list_for_each_entry(handler, &handlers, list) { -+ -+ if (!strcmp(attr->attr.name, soo_sysfs_names[handler->attr])) { -+ if (handler->show_handler) { -+ handler->show_handler(str); -+ -+ return strlen(str); -+ } -+ } -+ } -+ -+ return 0; -+} -+ -+ -+static ssize_t attr_store(struct kobject *kobj, struct kobj_attribute *attr, const char *str, size_t len) { -+ handler_list_t *handler; -+ -+ list_for_each_entry(handler, &handlers, list) { -+ -+ if (!strcmp(attr->attr.name, soo_sysfs_names[handler->attr])) { -+ if (handler->store_handler) -+ handler->store_handler((char *) str); -+ } -+ } -+ -+ return len; -+} -+ -+/***** Attributes declaration *****/ -+ -+/* SOO */ -+static struct kobj_attribute agencyUID_attr = __ATTR(agencyUID, 0664, attr_show, attr_store); -+static struct kobj_attribute name_attr = __ATTR(name, 0664, attr_show, attr_store); -+ -+/** Backends **/ -+ -+/**** vsensej ****/ -+static struct kobj_attribute vsensej_js_attr = __ATTR(vsensej_js, 0664, attr_show, attr_store); -+ -+ -+static struct kobj_attribute vfbdev_hres_attr = __ATTR(vfbdev_hres, 0664, attr_show, attr_store); -+static struct kobj_attribute vfbdev_vres_attr = __ATTR(vfbdev_vres, 0664, attr_show, attr_store); -+static struct kobj_attribute vfbdev_bpp_attr = __ATTR(vfbdev_bpp, 0664, attr_show, attr_store); -+static struct kobj_attribute vfbdev_size_attr = __ATTR(vfbdev_size, 0664, attr_show, attr_store); -+static struct kobj_attribute vfbdev_addr_attr = __ATTR(vfbdev_addr, 0664, attr_show, attr_store); -+static struct kobj_attribute vfbdev_pid_attr = __ATTR(vfbdev_pid, 0664, attr_show, attr_store); -+ -+/* Groups of attributes for SOO (root) */ -+static struct attribute *soo_attrs[] = { -+ &agencyUID_attr.attr, -+ &name_attr.attr, -+ NULL, /* need to NULL terminate the list of attributes */ -+}; -+ -+static struct attribute_group soo_group = { -+ .attrs = soo_attrs, -+}; -+ -+ -+/* Group of attributes for Backends */ -+static struct attribute *backend_vsensej_attrs[] = { -+ &vsensej_js_attr.attr, -+ NULL, /* need to NULL terminate the list of attributes */ -+}; -+ -+static struct attribute_group backend_vsensej_group = { -+ .attrs = backend_vsensej_attrs, -+}; -+ -+static struct attribute *backend_vfbdev_attrs[] = { -+ &vfbdev_hres_attr.attr, -+ &vfbdev_vres_attr.attr, -+ &vfbdev_bpp_attr.attr, -+ &vfbdev_size_attr.attr, -+ &vfbdev_addr_attr.attr, -+ &vfbdev_pid_attr.attr, -+ NULL, /* need to NULL terminate the list of attributes */ -+}; -+ -+static struct attribute_group backend_vfbdev_group = { -+ .attrs = backend_vfbdev_attrs, -+}; -+ -+void soo_sysfs_init(void) { -+ int ret; -+ -+ INIT_LIST_HEAD(&handlers); -+ -+ /* Create the entry in /sys to access the information -+ * which will be exposed to the user space. -+ */ -+ -+ /* SOO root */ -+ root_kobj = kobject_create_and_add("soo", NULL); -+ BUG_ON(!root_kobj); -+ -+ ret = sysfs_create_group(root_kobj, &soo_group); -+ BUG_ON(ret); -+ -+ /** Backends **/ -+ backend_kobj = kobject_create_and_add("backend", root_kobj); -+ BUG_ON(!backend_kobj); -+ -+ /**** vsensej ****/ -+ backend_vsensej_kobj = kobject_create_and_add("vsensej", backend_kobj); -+ BUG_ON(!backend_vsensej_kobj); -+ -+ ret = sysfs_create_group(backend_vsensej_kobj, &backend_vsensej_group); -+ BUG_ON(ret); -+ -+ /**** vfbdev ****/ -+ backend_vfbdev_kobj = kobject_create_and_add("vfbdev", backend_kobj); -+ BUG_ON(!backend_vfbdev_kobj); -+ -+ ret = sysfs_create_group(backend_vfbdev_kobj, &backend_vfbdev_group); -+ BUG_ON(ret); -+} -+ -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0089-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0089-Makefile.patch deleted file mode 100644 index d8e7eed..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0089-Makefile.patch +++ /dev/null @@ -1,6 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/vbstore/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/vbstore/Makefile 2026-03-13 13:24:35.603345761 +0100 -@@ -0,0 +1,3 @@ -+ -+obj-y += vbstore.o -+obj-y += vbstorage.o diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0090-vbstorage.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0090-vbstorage.c.patch deleted file mode 100644 index 1a8d3d1..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0090-vbstorage.c.patch +++ /dev/null @@ -1,531 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/vbstore/vbstorage.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/vbstore/vbstorage.c 2026-03-13 13:24:35.603315739 +0100 -@@ -0,0 +1,528 @@ -+/* -+ * Copyright (C) 2016-2019 Daniel Rossier -+ * Copyright (C) 2018 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#if 0 -+#define DEBUG -+#endif -+ -+#include -+#include /* for kmalloc */ -+#include /* GFP Flags for kmalloc */ -+#include -+#include -+ -+#include -+#include -+ -+/* The vbs store tree */ -+static struct vbs_node *vbs_root; -+ -+/* Allocate a new node, with the given key / value. -+ * returns the node or NULL. */ -+static struct vbs_node *vbs_store_new_node(const char *key, const char *value) { -+ struct vbs_node *new; -+ char *lkey, *lvalue = NULL; -+ -+ if (value != NULL) { -+ lvalue = kstrdup(value, GFP_ATOMIC); -+ if (!lvalue) -+ BUG(); -+ } -+ -+ lkey = kstrdup(key, GFP_ATOMIC); -+ -+ if (!lkey) -+ BUG(); -+ -+ new = kmalloc(sizeof(struct vbs_node), GFP_ATOMIC); -+ -+ if (new) { -+ new->key = lkey; -+ new->value = lvalue; -+ new->parent = NULL; -+ INIT_LIST_HEAD(&new->children); -+ INIT_LIST_HEAD(&new->watchers); -+ } else -+ BUG(); -+ -+ -+ return new; -+} -+ -+/* -+ * Get the absolute path of a specific vbs node. -+ */ -+void vbs_get_absolute_path(struct vbs_node *node, char *path) { -+ char __path[VBS_KEY_LENGTH]; -+ -+ strcpy(path, node->key); -+ -+ /* shortcut */ -+ if (node->parent == NULL) -+ return ; -+ -+ /* The root node key is equal to "" */ -+ while (strcmp(node->parent->key, "")) { -+ -+ /* New level in the ascending path */ -+ strcpy(__path, node->parent->key); -+ strcat(__path, "/"); -+ strcat(__path, path); -+ -+ /* Then replace */ -+ strcpy(path, __path); -+ -+ node = node->parent; -+ } -+} -+ -+struct vbs_node *vbs_store_lookup(const char *key) { -+ struct vbs_node *parent_node, *node; -+ char *left, *free_ptr, *path_elem; -+ bool found; -+ -+ /* free_ptr is used to preserve the reference to the string since left will be updated by strsep() */ -+ free_ptr = left = kstrdup(key, GFP_ATOMIC); -+ if (free_ptr == NULL) -+ /* ENOMEM -> lookup failed. */ -+ return NULL; -+ -+ /* Skip initial slash */ -+ if (left[0] == '/') -+ left++; -+ -+ /* Search query for SLASH. */ -+ if (strlen(left) == 0) { -+ /* ENOMEM -> lookup failed. */ -+ kfree(free_ptr); -+ return vbs_root; -+ } -+ -+ parent_node = vbs_root; -+ -+ /* Find next path_elem to be searched for. */ -+ while ((path_elem = strsep(&left, "/")) != NULL) { -+ found = false; -+ -+ list_for_each_entry(node, &parent_node->children, sibling) -+ { -+ if (strcmp(node->key, path_elem) == 0) -+ { -+ found = true; -+ parent_node = node; -+ break; -+ } -+ } -+ if (!found) { -+ /* path_elem not found in the children -> lookup failed. */ -+ kfree(free_ptr); -+ return NULL; -+ } -+ } -+ -+ kfree(free_ptr); -+ return parent_node; -+} -+ -+/** -+ * Updates value with the content associated to key. -+ * Returns 1 on success -+ * 0 on error, value is unmodified. */ -+int vbs_store_read(const char *key, char **value, size_t size) { -+ struct vbs_node *node; -+ -+ DBG("VBS_STORE_READ(%s)", key); -+ -+ node = vbs_store_lookup(key); -+ if (!node) -+ { -+ DBG("%s: not available (yet?)\n", key); -+ return 0; -+ } -+ -+ if (!node->value) -+ return 0; -+ -+ if (strlen(node->value) >= size) -+ return 0; -+ -+ strcpy(*value, node->value); -+ -+ DBG("value = %s\n", *value); -+ return 1; -+} -+ -+/** Wrapper for those of us which do not want notifications. */ -+int vbs_store_write(const char *key, const char *value) -+{ -+ struct vbs_node *node; -+ int ret; -+ -+ ret = vbs_store_write_notify(key, value, &node); -+ -+ return ret; -+} -+ -+/** -+ * Create or update the value associated to a key. -+ * */ -+int vbs_store_write_notify(const char *key, const char *value, struct vbs_node **notify_node) { -+ struct vbs_node *parent, *new; -+ int base_length; -+ char *parent_key, *lvalue = NULL; -+ -+ DBG("VBS_STORE_WRITE(%s) = %s\n", key, value); -+ -+ new = vbs_store_lookup(key); -+ if (new) { -+ /* We are lucky, this is an update of an existing node. */ -+ kfree(new->value); -+ if (value) { -+ lvalue = kstrdup(value, GFP_ATOMIC); -+ if (!lvalue) -+ BUG(); -+ } -+ -+ new->value = lvalue; -+ *notify_node = new; -+ -+ return 0; -+ } -+ -+ /* We have to find the parent node. */ -+ base_length = (unsigned int) (strrchr(key, '/') - key); -+ -+ parent_key = kmalloc(base_length + 1, GFP_ATOMIC); -+ if (!parent_key) -+ BUG(); -+ -+ strncpy(parent_key, key, base_length); -+ parent_key[base_length] = '\0'; -+ -+ parent = vbs_store_lookup(parent_key); -+ if (!parent) { -+ lprintk("Cannot find parent key: %s\n", parent_key); -+ BUG(); -+ } -+ -+ /* Create a new child and set it up. */ -+ new = vbs_store_new_node((char *) (key + base_length + 1), value); -+ if (!new) -+ BUG(); -+ -+ /* Attach the new sibling to its parent. */ -+ list_add_tail(&new->sibling, &parent->children); -+ new->parent = parent; -+ -+ *notify_node = parent; -+ -+ return 0; -+} -+ -+int vbs_store_mkdir(const char *key) { -+ -+ lprintk("%s: creating backend entry for %s virtual driver...\n", __func__, key); -+ -+ return vbs_store_write(key, NULL); -+} -+ -+/* -+ * Remove a watcher from the watcher list. -+ */ -+static void del_watchers(struct list_head *watchers) { -+ struct vbs_watcher *tmp; -+ struct list_head *pos, *q; -+ -+ list_for_each_safe(pos, q, watchers) { -+ tmp = list_entry(pos, struct vbs_watcher, list); -+ -+ list_del(pos); -+ -+ kfree(tmp); -+ } -+} -+ -+/* Recursive remove of children */ -+static void del_children(struct list_head *sibling) { -+ struct vbs_node *tmp; -+ struct list_head *pos, *q; -+ -+ list_for_each_safe(pos, q, sibling) { -+ tmp = list_entry(pos, struct vbs_node, sibling); -+ -+ DBG("removing %s...\n", tmp->key); -+ -+ if (!list_empty(&tmp->children)) -+ del_children(&tmp->children); -+ -+ if (!list_empty(&tmp->watchers)) -+ del_watchers(&tmp->watchers); -+ -+ list_del(pos); -+ -+ kfree(tmp->key); -+ kfree(tmp->value); -+ kfree(tmp); -+ } -+ -+} -+ -+/* Remove a specific node */ -+int vbs_store_rm(const char *key) { -+ struct vbs_node *node; -+ -+ DBG("removing %s...\n", key); -+ node = vbs_store_lookup(key); -+ if (!node) { -+ printk(" %s: entry %s not existing...\n", __func__, key); -+ return 0; -+ } -+ -+ /* Remove all children */ -+ if (!list_empty(&node->children)) -+ del_children(&node->children); -+ -+ list_del(&node->sibling); -+ -+ kfree(node->key); -+ kfree(node->value); -+ kfree(node); -+ -+ return 0; -+} -+ -+ -+/** -+ * Set children to the children names. -+ * Return the written length or 0 on error. -+ */ -+int vbs_store_readdir(const char *key, char *children, const size_t size_children) { -+ struct vbs_node *node, *parent; -+ int tot_len = 0; -+ char *string = children; -+ -+ parent = vbs_store_lookup(key); -+ if (!parent) -+ return 0; -+ -+ list_for_each_entry(node, &parent->children, sibling) -+ { -+ int len = strlen(node->key); -+ tot_len += len + 1; -+ if (tot_len >= size_children) -+ return 0; -+ -+ strcpy(string, node->key); -+ string[len] = '\0'; -+ string += len + 1; -+ } -+ -+ return tot_len; -+} -+ -+ -+/** -+ * '1' is written into the first byte of result if the directory exists, '0' otherwise. -+ */ -+int vbs_store_dir_exists(const char *key, char *result) { -+ struct vbs_node *parent; -+ result[1] = '\0'; -+ -+ parent = vbs_store_lookup(key); -+ if (!parent) -+ result[0] = '0'; -+ else -+ result[0] = '1'; -+ -+ return 1; -+} -+ -+int vbs_store_watch(const char *key, vbstore_intf_t *intf) { -+ struct vbs_node *node; -+ struct vbs_watcher *watcher; -+ -+ DBG("VBS_STORE_WATCH(%s) on corresponding levtchn(%i) intf = %p\n", key, intf->levtchn, intf); -+ -+ watcher = kmalloc(sizeof(struct vbs_watcher), GFP_ATOMIC); -+ if (!watcher) -+ goto no_mem0; -+ -+ INIT_LIST_HEAD(&watcher->list); -+ -+ node = vbs_store_lookup(key); -+ if (!node) -+ goto not_found; -+ -+ watcher->intf = intf; -+ -+ list_add_tail(&watcher->list, &node->watchers); -+ -+ return 0; -+ -+not_found: -+ -+ kfree(watcher); -+ lprintk(" %s: key %s not_found\n", __func__, key); -+ BUG(); -+ -+no_mem0: -+ lprintk(" %s: no memory\n", __func__); -+ BUG(); -+} -+ -+int vbs_store_unwatch(const char *key, vbstore_intf_t *intf) { -+ struct vbs_node *node; -+ struct vbs_watcher *watcher; -+ struct list_head *p, *next; -+ -+ DBG("removing watch: %s on intf = %p\n", key, intf); -+ -+ node = vbs_store_lookup(key); -+ if (!node) { -+ printk(" %s: entry %s not existing...\n", __func__, key); -+ return 0; -+ } -+ -+ list_for_each_safe(p, next, &node->watchers) { -+ watcher = list_entry(p, struct vbs_watcher, list); -+ if (watcher->intf == intf) { -+ list_del(p); -+ kfree(watcher); -+ return 0; -+ } -+ } -+ -+ return 0; -+} -+ -+void vbstorage_agency_init(void) { -+ struct device_node *np; -+ -+ vbus_probe_backend_init(); -+ -+ /* Initialize Root node. */ -+ vbs_root = vbs_store_new_node("", NULL); -+ if (!vbs_root) -+ panic("VBstore: ERROR: Could not allocate VBstore root node\n"); -+ -+ /* Root keys, which are common to every drivers. */ -+ vbs_store_mkdir("/backend"); -+ vbs_store_mkdir("/device"); -+ -+#warning the following entries (domain + directcomm) need to be revisited (see soo/me entries) -+ -+ vbs_store_mkdir("/domain"); -+ vbs_store_mkdir("/domain/gnttab"); -+ vbs_store_mkdir("/domain/gnttab/0"); -+ vbs_store_mkdir("/domain/gnttab/1"); -+ vbs_store_mkdir("/domain/gnttab/2"); -+ vbs_store_mkdir("/domain/gnttab/3"); -+ vbs_store_mkdir("/domain/gnttab/4"); -+ vbs_store_mkdir("/domain/gnttab/5"); -+ vbs_store_mkdir("/domain/gnttab/6"); -+ -+ /* Target ME directcomm event channel */ -+ vbs_store_mkdir("/soo"); -+ vbs_store_mkdir("/soo/directcomm"); -+ vbs_store_mkdir("/soo/directcomm/0"); -+ vbs_store_mkdir("/soo/directcomm/1"); -+ vbs_store_mkdir("/soo/directcomm/2"); -+ vbs_store_mkdir("/soo/directcomm/3"); -+ vbs_store_mkdir("/soo/directcomm/4"); -+ vbs_store_mkdir("/soo/directcomm/5"); -+ vbs_store_mkdir("/soo/directcomm/6"); -+ -+ /* Prepare the entries for ME ID information */ -+ vbs_store_mkdir("/soo/me"); -+ -+ /* Agency backend side of virtual LED device */ -+ np = of_find_compatible_node(NULL, NULL, "vleds,backend"); -+ if (of_device_is_available(np)) -+ vbs_store_mkdir("/backend/vleds"); -+ -+ /* Agency backend side of virtual UI handler device */ -+ np = of_find_compatible_node(NULL, NULL, "vuihandler,backend"); -+ if (of_device_is_available(np)) -+ vbs_store_mkdir("/backend/vuihandler"); -+ -+ /* Agency backend side of virtual UART device */ -+ np = of_find_compatible_node(NULL, NULL, "vuart,backend"); -+ if (of_device_is_available(np)) -+ vbs_store_mkdir("/backend/vuart"); -+ -+ /* Agency backend side of virtual dummy device (reference backend) */ -+ np = of_find_compatible_node(NULL, NULL, "vdummy,backend"); -+ if (of_device_is_available(np)) -+ vbs_store_mkdir("/backend/vdummy"); -+ -+ /* Agency backend side of virtual weather (weather station) */ -+ np = of_find_compatible_node(NULL, NULL, "vweather,backend"); -+ if (of_device_is_available(np)) -+ vbs_store_mkdir("/backend/vweather"); -+ -+ /* Agency backend side of virtual DOGA 12V 6NM device */ -+ np = of_find_compatible_node(NULL, NULL, "vdoga12v6nm,backend"); -+ if (of_device_is_available(np)) -+ vbs_store_mkdir("/backend/vdoga12v6nm"); -+ -+ /* Agency backend side of virtual senseled (Sense HAT led) device */ -+ np = of_find_compatible_node(NULL, NULL, "vsenseled,backend"); -+ if (of_device_is_available(np)) -+ vbs_store_mkdir("/backend/vsenseled"); -+ -+ /* Agency backend side of virtual sensej (Sense HAT joystick) device */ -+ np = of_find_compatible_node(NULL, NULL, "vsensej,backend"); -+ if (of_device_is_available(np)) -+ vbs_store_mkdir("/backend/vsensej"); -+ -+ /* Agency backend side of virtual wagoled device */ -+ np = of_find_compatible_node(NULL, NULL, "vwagoled,backend"); -+ if (of_device_is_available(np)) -+ vbs_store_mkdir("/backend/vwagoled"); -+ -+ /* Agency backend side of virtual en0cean device */ -+ np = of_find_compatible_node(NULL, NULL, "venocean,backend"); -+ if (of_device_is_available(np)) -+ vbs_store_mkdir("/backend/venocean"); -+ -+ /* Agency backend side of virtual knx device */ -+ np = of_find_compatible_node(NULL, NULL, "vknx,backend"); -+ if (of_device_is_available(np)) -+ vbs_store_mkdir("/backend/vknx"); -+ -+ /* Agency backend side of virtual iuoc device */ -+ np = of_find_compatible_node(NULL, NULL, "viuoc,backend"); -+ if (of_device_is_available(np)) -+ vbs_store_mkdir("/backend/viuoc"); -+ -+ /* Agency backend side of virtual vlogs device */ -+ np = of_find_compatible_node(NULL, NULL, "vlogs,backend"); -+ if (of_device_is_available(np)) -+ vbs_store_mkdir("/backend/vlogs"); -+ -+ /* Agency backend side of virtual vfbdev device */ -+ np = of_find_compatible_node(NULL, NULL, "vfbdev,backend"); -+ if (of_device_is_available(np)) -+ vbs_store_mkdir("/backend/vfbdev"); -+ -+ /* Agency backend side of virtual vinput device */ -+ np = of_find_compatible_node(NULL, NULL, "vinput,backend"); -+ if (of_device_is_available(np)) -+ vbs_store_mkdir("/backend/vinput"); -+} diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0091-vbstore.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0091-vbstore.c.patch deleted file mode 100644 index b614442..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0091-vbstore.c.patch +++ /dev/null @@ -1,487 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/vbstore/vbstore.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/vbstore/vbstore.c 2026-03-17 12:39:07.337636770 +0100 -@@ -0,0 +1,484 @@ -+/* -+ * Copyright (C) 2016-2019 Daniel Rossier -+ * Copyright (C) 2018 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#if 0 -+#define DEBUG -+#endif -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include -+#include -+#include -+ -+#define IRQF_DISABLED 0 -+ -+/* Interfaces/addresses to vbstore and event channel for each domain */ -+ -+/* -+ * vbstore_intf[] contains the grant references used to manage the shared page -+ * between a domain and vbstore. -+ */ -+struct vbstore_domain_interface *vbstore_intf[MAX_DOMAINS]; -+grant_ref_t vbstore_grant_ref[MAX_DOMAINS]; -+ -+static struct list_head notify_list; -+ -+typedef struct { -+ struct list_head list; -+ vbstore_intf_t *intf; -+ struct vbs_node *notify_node; -+ uint32_t transactionID; -+} notify_item_t; -+ -+/* -+ * Read / write primitives to access the ring. Work on a specific ring -+ * retrieved through the given event channel. -+ */ -+static void vbs_s_write(vbstore_intf_t *intf, const void *data, unsigned len) -+{ -+ VBSTORE_RING_IDX prod; -+ volatile char *dst; -+ -+ /* Read indexes, then verify. */ -+ prod = intf->rsp_pvt; -+ -+ /* Check if we are at the end of the ring, i.e. there is no place for len bytes */ -+ if (prod + len >= VBSTORE_RING_SIZE) { -+ prod = intf->rsp_pvt = 0; -+ if (prod + len > intf->rsp_cons) -+ BUG(); -+ } -+ -+#warning assert that the ring is not full -+ -+ dst = &intf->rsp[prod]; -+ -+ /* Must write data /after/ reading the consumer index. */ -+ mb(); -+ -+ memcpy((void *) dst, data, len); -+ -+ intf->rsp_pvt += len; -+ -+ /* Other side must not see new producer until data is there. */ -+ mb(); -+} -+ -+static void vbs_s_read(vbstore_intf_t *intf, void *data, unsigned len) -+{ -+ VBSTORE_RING_IDX cons; -+ volatile const char *src; -+ -+ /* Read indexes, then verify. */ -+ cons = intf->req_cons; -+ -+ if (cons + len >= VBSTORE_RING_SIZE) -+ cons = intf->req_cons = 0; -+ -+ src = &intf->req[cons]; -+ -+ /* Must read data /after/ reading the producer index. */ -+ mb(); -+ -+ memcpy(data, (void *) src, len); -+ -+ intf->req_cons += len; -+ -+ /* Other side must not see free space until we've copied out */ -+ mb(); -+} -+ -+/* -+ * Send the response to the request -+ */ -+static void send_reply(volatile vbstore_intf_t *intf, vbus_msg_t *reply) -+{ -+ /* vbs_s_write() performs a copy of the msg */ -+ vbs_s_write(intf, reply, sizeof(vbus_msg_t)); -+ -+ if (reply->len > 0) -+ vbs_s_write(intf, reply->payload, reply->len); -+ -+ intf->rsp_prod = intf->rsp_pvt; -+ -+ mb(); -+ -+ /* Implies mb(): other side will see the updated producer. */ -+ -+ DBG(" VBstore replying with msg type: %d for msg: %d notifying on remote evtchn: %d ...\n", -+ reply->type, reply->id, -+ avz_shared->dom_desc.u.agency.vbstore_evtchn[intf->domid]); -+ -+ /* We are vbstore, so we notify the remote which is our local :-) */ -+ notify_remote_via_evtchn(avz_shared->dom_desc.u.agency.vbstore_evtchn[intf->domid]); -+} -+ -+/* -+ * Send a WATCH_EVENT to all of the observers watching the modified path and -+ * value. -+ */ -+void vbs_notify_watchers(vbus_msg_t msg, struct vbs_node *node) -+{ -+ const struct vbs_node *current_node = node; -+ struct vbs_watcher *watcher; -+ char path[VBS_KEY_LENGTH]; -+ -+ /* Prepare a watch event vbus_msg message */ -+ msg.type = VBS_WATCH_EVENT; -+ -+ /* -+ * We walk through the whole vbstore tree to notify each parent -+ * from the node when necessary. -+ */ -+ while (current_node != NULL) { -+ -+ list_for_each_entry(watcher, ¤t_node->watchers, list) { -+ -+ vbs_get_absolute_path(node, path); -+ -+ DBG("SENDING WATCH_EVENT %s to watcher revtchn: %d (intf: %p)\n", -+ path, -+ avz_shared->dom_desc.u.agency.vbstore_evtchn[watcher->intf->domid], -+ watcher->intf); -+ -+ msg.payload = path; -+ msg.len = strlen(path) + 1; -+ -+ send_reply(watcher->intf, &msg); -+ } -+ -+ current_node = current_node->parent; -+ } -+} -+ -+/* -+ * Process message received in vbstore from a domain. -+ * -+ * A list of modified properties in vbstore is preserved in a dynamic list so that they can be sent -+ * to the watchers at the end of the transaction (only works with a vbus transaction). -+ * -+ * This function is executed with IRQs remaining disabled. -+ * -+ */ -+static irqreturn_t vbstore_interrupt(int irq, void *__vbstore_intf) -+{ -+ volatile vbstore_intf_t *intf = (vbstore_intf_t *) __vbstore_intf; -+ vbus_msg_t *msg; -+ struct vbs_node *node; -+ int length; -+ static char buffer[VBSTORE_RING_SIZE]; -+ bool found; -+ -+ notify_item_t *notify_item, *tmp_notify_ptr; -+ char *payload, *reply = buffer, *value; -+ -+ DBG("vbstore_interrupt: IRQ : %d %p\n", irq, intf); -+ -+ BUG_ON(!irqs_disabled()); -+ -+ while (intf->req_cons != intf->req_prod) { -+ -+ length = 0; -+ -+ /* msg & payload are the received message to be processed */ -+ -+ msg = kzalloc(sizeof(vbus_msg_t), GFP_ATOMIC); -+ if (msg == NULL) { -+ lprintk("%s - line %d: allocation of kmalloc() failed\n", -+ __func__, __LINE__); -+ BUG(); -+ } -+ -+ vbs_s_read(intf, msg, sizeof(vbus_msg_t)); -+ -+ DBG("CPU: %d got msg: %d\n", smp_processor_id(), msg->id); -+ -+ payload = NULL; -+ if (msg->len > 0) { -+ /* Now, the new message got the ID and the transactionID */ -+ payload = kzalloc(msg->len, GFP_ATOMIC); -+ if (payload == NULL) { -+ lprintk("%s: failure returned by kmalloc at line %d\n", -+ __func__, __LINE__); -+ BUG(); -+ } -+ vbs_s_read(intf, payload, msg->len); -+ } -+ -+ switch (msg->type) { -+ -+ case VBS_DIRECTORY: -+ BUG_ON(payload == NULL); -+ length = vbs_store_readdir(payload, reply, VBSTORE_RING_SIZE); -+ DBG("VBS_DIRECTORY(%s) reply: %s length %i\n", payload, reply, length); -+ break; -+ -+ case VBS_DIRECTORY_EXISTS: -+ BUG_ON(payload == NULL); -+ length = vbs_store_dir_exists(payload, reply); -+ DBG("VBS_DIRECTORY_EXISTS(%s) reply: %s length %i\n", -+ payload, reply, length); -+ break; -+ -+ case VBS_MKDIR: -+ BUG_ON(payload == NULL); -+ length = vbs_store_readdir(payload, reply, VBSTORE_RING_SIZE); -+ vbs_store_mkdir(payload); -+ -+ DBG("VBS_MKDIR(%s)\n", payload); -+ break; -+ -+ case VBS_RM: -+ BUG_ON(payload == NULL); -+ vbs_store_rm(payload); -+ break; -+ -+ case VBS_WATCH: -+ BUG_ON(payload == NULL); -+ vbs_store_watch(payload, intf); -+ -+ DBG("VBS_WATCH on %s\n", payload); -+ break; -+ -+ case VBS_UNWATCH: -+ BUG_ON(payload == NULL); -+ vbs_store_unwatch(payload, intf); -+ break; -+ -+ case VBS_WRITE: -+ BUG_ON(payload == NULL); -+ -+ /* -+ * We get two strings, the first one contains the node name (key), the second one contains the value. -+ * These two strings are simply appended with '\0' at the end of each string. -+ */ -+ value = (payload + strlen(payload) + 1); -+ -+ /* Perform the write in the vbs store and retrieve associated node for notification. */ -+ vbs_store_write_notify(payload, value, &node); -+ -+ DBG("VBS_WRITE(%s) = %s transactionID = %d\n", -+ payload, value, msg->transactionID); -+ -+ if (node != NULL) { -+ -+ found = false; -+ list_for_each_entry(notify_item, ¬ify_list, list) { -+ if ((notify_item->notify_node == node) && -+ (notify_item->intf == intf) && -+ ((msg->transactionID == 0) || -+ (notify_item->transactionID == msg->transactionID))) { -+ found = true; -+ break; -+ } -+ } -+ -+ if (!found) { -+ notify_item = kmalloc(sizeof(notify_item_t), GFP_ATOMIC); -+ if (notify_item == NULL) { -+ lprintk("%s: failure returned by kmalloc at line %d\n", -+ __func__, __LINE__); -+ BUG(); -+ } -+ -+ notify_item->notify_node = node; -+ notify_item->intf = intf; -+ notify_item->transactionID = msg->transactionID; -+ -+ list_add_tail(¬ify_item->list, ¬ify_list); -+ } -+ } -+ break; -+ -+ case VBS_READ: -+ BUG_ON(payload == NULL); -+ vbs_store_read(payload, &reply, VBSTORE_RING_SIZE); -+ length = strlen(reply) + 1; -+ DBG("VBS_READ(%s) '%s' %i\n", payload, reply, length); -+ break; -+ -+ case VBS_TRANSACTION_END: -+ -+ DBG("VBS_TRANSACTION_END: evtchn : %d\n", -+ avz_shared->dom_desc.u.agency.vbstore_evtchn[intf->domid]); -+ -+ /* A Write operation has been done, we need to notify the watchers. */ -+ -+ list_for_each_entry_safe(notify_item, tmp_notify_ptr, -+ ¬ify_list, list) { -+ -+ if ((notify_item->intf == intf) && -+ ((msg->transactionID == 0) || -+ (notify_item->transactionID == msg->transactionID))) { -+ -+ vbs_notify_watchers(*msg, notify_item->notify_node); -+ -+ list_del(¬ify_item->list); -+ kfree(notify_item); -+ } -+ } -+ break; -+ -+ default: -+ lprintk("------------------- vbs_%i(%s) Unexpected !!\n", -+ msg->type, payload); -+ BUG(); -+ break; -+ } -+ -+ msg->payload = reply; -+ msg->len = length; -+ -+ send_reply(intf, msg); -+ -+ /* Reset the buffer and free msg & body used to receive */ -+ memset(reply, 0, length); -+ -+ kfree(msg); -+ kfree(payload); -+ } -+ -+ BUG_ON(!irqs_disabled()); -+ -+ return IRQ_HANDLED; -+} -+ -+/** -+ * @brief Initialize the VBstore subsystem used to manage information between -+ * backend and frontend drivers. -+ * -+ * Each domain has its own VBstore page which is under control of the -+ * Linux domain. Therefore, the Linux domain must grant shared VBstore pages -+ * to each SO3 domain. -+ */ -+void vbstore_init(void) -+{ -+ int res = 0; -+ int i; -+ avz_hyp_t args; -+ struct uncached_page *ucp[MAX_DOMAINS]; -+ -+ lprintk("... vbstore SOO Agency setting up...\n"); -+ -+ /* Allocate a vbstore page for each domain */ -+ for (i = 0; i < MAX_DOMAINS; i++) { -+ -+ /* To make sure we have synchronized vbstore pages, we ask for a non-cached -+ * memory page. -+ */ -+ ucp[i] = alloc_uncached_zeroed_page(GFP_KERNEL); -+ -+ /* Make sure the page will not be cached */ -+ vbstore_intf[i] = (struct vbstore_domain_interface *) ucp[i]->vaddr; -+ vbstore_intf[i]->domid = i; -+ -+ if (i == DOMID_AGENCY) -+ /* Set our local interface to vbstore */ -+ __intf = vbstore_intf[i]; -+ else -+ /* Prepare the capsule to retrieve their dedicated vbstore page */ -+ vbstore_grant_ref[i] = gnttab_grant_foreign_access(i, -+ page_to_pfn(ucp[i]->pg)); -+ } -+ -+ /* -+ * Initialize the list of notification to be propagated belonging -+ * to a transaction. -+ */ -+ INIT_LIST_HEAD(¬ify_list); -+ -+ /* -+ * Allocate unbound evtchns which vbstored/vbstore thread can bind to. -+ */ -+ for (i = 0; i < MAX_DOMAINS; i++) { -+ -+ args.cmd = AVZ_EVENT_CHANNEL_OP; -+ args.u.avz_evtchn.evtchn_op.cmd = EVTCHNOP_alloc_unbound; -+ args.u.avz_evtchn.evtchn_op.u.alloc_unbound.dom = DOMID_SELF; -+ args.u.avz_evtchn.evtchn_op.u.alloc_unbound.remote_dom = i; -+ -+ avz_hypercall(&args); -+ -+ /* Store the allocated unbound evtchn.*/ -+ DBG("%s: allocating unbound evtchn %d for vbstore shared page on domain: %d (intf = %lx)...\n", -+ __func__, -+ args.u.avz_evtchn.evtchn_op.u.alloc_unbound.evtchn, -+ i, vbstore_intf[i]); -+ -+ /* This evtchn will be the remote for all clients, including the agency itself and the ME (using their levtchn). */ -+ avz_shared->dom_desc.u.agency.vbstore_evtchn[i] = -+ args.u.avz_evtchn.evtchn_op.u.alloc_unbound.evtchn; -+ } -+ -+ /* Now, initialize the basic vbstore virtual database */ -+ vbstorage_agency_init(); -+ -+ /* Bind the vbstore listening event channels */ -+ for (i = 0; i < MAX_DOMAINS; i++) { -+ -+ /* Bind IRQ used as event channel to discuss with the ME to the vbstore interrupt handler */ -+ DBG("%s: binding evtchn %d to vbstore_interrupt handler..\n", -+ __func__, avz_shared->dom_desc.u.agency.vbstore_evtchn[i]); -+ -+ res = bind_evtchn_to_virq_handler( -+ avz_shared->dom_desc.u.agency.vbstore_evtchn[i], -+ vbstore_interrupt, NULL, IRQF_DISABLED, -+ "vbstore", vbstore_intf[i]); -+ if (res < 0) { -+ lprintk(KERN_ERR "VBus request virq failed %i\n", res); -+ BUG(); -+ } -+ } -+ -+ /* Initialize the interface to vbstore. */ -+ res = vbus_vbstore_init(); -+ if (res) { -+ printk(KERN_WARNING "VBus: Error initializing vbstore comms: %i\n", res); -+ BUG(); -+ } -+} diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0092-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0092-Makefile.patch deleted file mode 100644 index d90061c..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0092-Makefile.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/vbus/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/vbus/Makefile 2026-03-13 13:24:35.603180663 +0100 -@@ -0,0 +1,11 @@ -+ -+obj-y += vbus_client.o -+obj-y += vbus_vbstore.o -+ -+obj-y += vbus.o -+ -+obj-y += vbus_backend.o -+ -+ -+ -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0093-vbus_backend.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0093-vbus_backend.c.patch deleted file mode 100644 index f34be94..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0093-vbus_backend.c.patch +++ /dev/null @@ -1,317 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/vbus/vbus_backend.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/vbus/vbus_backend.c 2026-03-13 13:24:35.603197443 +0100 -@@ -0,0 +1,314 @@ -+/* -+ * Copyright (C) 2016-2019 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#if 0 -+#define DEBUG -+#endif -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+static struct vbus_type vbus_backend; -+ -+struct completion backend_initialized; -+ -+/* backend/// => -- */ -+static void backend_bus_id(char bus_id[VBS_KEY_LENGTH], const char *nodename) -+{ -+ int domid; -+ const char *devid, *type, frontend[VBS_KEY_LENGTH]; -+ unsigned int typelen; -+ -+ type = strchr(nodename, '/'); -+ if (!type) -+ BUG(); -+ -+ type++; -+ typelen = strcspn(type, "/"); -+ if (!typelen || type[typelen] != '/') -+ BUG(); -+ -+ devid = strrchr(nodename, '/') + 1; -+ -+ vbus_gather(VBT_NIL, nodename, "frontend-id", "%i", &domid, "frontend", "%s", frontend, NULL); -+ -+ if (strlen(frontend) == 0) -+ BUG(); -+ -+ if (snprintf(bus_id, VBS_KEY_LENGTH, "%.*s-%i-%s", typelen, type, domid, devid) >= VBS_KEY_LENGTH) -+ BUG(); -+} -+ -+static int vbus_uevent_backend(const struct device *dev, struct kobj_uevent_env *env) -+{ -+ struct vbus_device *xdev; -+ struct vbus_driver *drv; -+ struct vbus_type *bus; -+ -+ if (dev == NULL) -+ return -ENODEV; -+ -+ xdev = to_vbus_device((struct device *) dev); -+ bus = container_of(xdev->dev.bus, struct vbus_type, bus); -+ -+ if (add_uevent_var(env, "MODALIAS=soo-backend:%s", xdev->devicetype)) -+ return -ENOMEM; -+ -+ /* stuff we want to pass to /sbin/hotplug */ -+ if (add_uevent_var(env, "VBus_TYPE=%s", xdev->devicetype)) -+ return -ENOMEM; -+ -+ if (add_uevent_var(env, "VBus_PATH=%s", xdev->nodename)) -+ return -ENOMEM; -+ -+ if (add_uevent_var(env, "VBus_BASE_PATH=%s", bus->root)) -+ return -ENOMEM; -+ -+ if (dev->driver) { -+ drv = to_vbus_driver(dev->driver); -+ if (drv && drv->uevent) -+ return drv->uevent(xdev, env); -+ } -+ -+ return 0; -+} -+ -+/* backend// */ -+int vbus_probe_backend(int domid) -+{ -+ char noderoot[VBS_KEY_LENGTH]; -+ char target[VBS_KEY_LENGTH]; -+ int err = 0; -+ char **dir; -+ char *type, *pos; -+ unsigned int i, dir_n = 0; -+ -+ DBG("Probing all registered devices bound to domain %d...\n", domid); -+ -+ strcpy(noderoot, "backend"); -+ -+ dir = vbus_directory(VBT_NIL, noderoot, "", &dir_n); -+ if (IS_ERR(dir)) -+ BUG(); -+ -+ for (i = 0; i < dir_n; i++) { -+ DBG("%s %s\n", __func__, dir[i]); -+ -+ strcpy(noderoot, "backend/"); -+ strcat(noderoot, dir[i]); -+ strcat(noderoot, "/%d/0"); /* Currently, only interface 0 is considered... */ -+ -+ sprintf(target, noderoot, domid); -+ -+ strcpy(noderoot, target); -+ -+ pos = target; -+ strsep(&pos, "/"); /* "backend/" */ -+ type = strsep(&pos, "/"); /* " */ -+ -+ vbus_dev_changed(noderoot, type, &vbus_backend); -+ -+ } -+ if (dir) -+ kfree(dir); -+ -+ /* Keep the synchronization with the injector */ -+ if (get_ME_state(domid) == ME_state_stopped) -+ complete(&backend_initialized); -+ -+ return err; -+} -+ -+static void frontend_changed(struct vbus_watch *watch) -+{ -+ vbus_otherend_changed(watch); -+} -+ -+/* device attributes */ -+ -+extern const struct attribute_group *vbus_dev_groups[]; -+ -+static struct attribute *vbus_backend_dev_attrs[5]; -+ -+static struct attribute_group vbus_backend_dev_group = { -+ .attrs = vbus_backend_dev_attrs, -+}; -+ -+const struct attribute_group *vbus_backend_dev_groups[] = { -+ &vbus_backend_dev_group, -+ NULL, -+}; -+ -+/* bus attributes */ -+ -+static ssize_t vbstore_show(const struct bus_type *bus, char *buf) -+{ -+ vbs_dump(); -+ -+ return sprintf(buf, "%s:vbstore\n", bus->name); -+} -+static BUS_ATTR_RO(vbstore); -+ -+static ssize_t watches_show(const struct bus_type *bus, char *buf) -+{ -+ vbs_dump_watches(); -+ -+ return sprintf(buf, "%s:watches\n", bus->name); -+} -+static BUS_ATTR_RO(watches); -+ -+static struct attribute *vbus_bus_attrs[] = { -+ &bus_attr_vbstore.attr, -+ &bus_attr_watches.attr, -+ NULL, -+}; -+ -+ -+static const struct attribute_group vbus_bus_group = { -+ .attrs = vbus_bus_attrs, -+}; -+ -+const struct attribute_group *vbus_bus_groups[] = { -+ &vbus_bus_group, -+ NULL, -+}; -+ -+static struct attribute *vbus_backend_bus_attrs[3]; -+ -+static struct attribute_group vbus_backend_bus_group = { -+ .attrs = vbus_backend_bus_attrs, -+}; -+ -+const struct attribute_group *vbus_backend_bus_groups[] = { -+ &vbus_backend_bus_group, -+ NULL, -+}; -+ -+static struct vbus_type vbus_backend = { -+ .root = "soo", -+ .get_bus_id = backend_bus_id, -+ .otherend_changed = frontend_changed, -+ .bus = { -+ .name = "backend", -+ .match = vbus_match, -+ .uevent = vbus_uevent_backend, -+ .probe = vbus_dev_probe, -+ .remove = vbus_dev_remove, -+ .dev_groups = vbus_backend_dev_groups, -+ .bus_groups = vbus_backend_bus_groups, -+ }, -+}; -+ -+static void read_frontend_details(struct vbus_device *vdev) -+{ -+ vbus_read_otherend_details(vdev, "frontend-id", "frontend"); -+} -+ -+void remove_device(const char *path) { -+ vbus_cleanup_device(path, &vbus_backend.bus); -+} -+ -+void __vbus_register_backend(struct vbus_driver *drv, struct module *owner, const char *mod_name) -+{ -+ drv->read_otherend_details = read_frontend_details; -+ -+ vbus_register_driver_common(drv, &vbus_backend, owner, mod_name); -+} -+ -+ -+int vbus_probe_backend_init(void) -+{ -+ -+ int err; -+ DBG0("Initializing..."); -+ -+ /* Initialize the sysfs structure for all sysfs attrs */ -+ vbus_backend_dev_attrs[0] = vbus_dev_groups[0]->attrs[0]; -+ vbus_backend_dev_attrs[1] = vbus_dev_groups[0]->attrs[1]; -+ vbus_backend_dev_attrs[2] = vbus_dev_groups[0]->attrs[2]; -+ vbus_backend_dev_attrs[3] = vbus_dev_groups[0]->attrs[3]; -+ vbus_backend_dev_attrs[4] = NULL; -+ -+ vbus_backend_bus_attrs[0] = vbus_bus_groups[0]->attrs[0]; -+ vbus_backend_bus_attrs[1] = vbus_bus_groups[0]->attrs[1]; -+ vbus_backend_bus_attrs[2]= NULL; -+ -+ init_completion(&backend_initialized); -+ -+ /* Register ourselves with the kernel bus subsystem */ -+ err = bus_register(&vbus_backend.bus); -+ if (err) { -+ printk("%s failed with err = %d\n",__FUNCTION__, err); -+ return err; -+ } -+ -+ return 0; -+} -+ -+/* -+ * vbus_suspend_devices -+ * -+ * Inform all vbus devices that we are preparing to migrate (or some other scenarios requiring -+ * temporary suspension of their activities) -+ * -+ */ -+int vbus_suspend_devices(unsigned int domID) -+{ -+ return vbus_suspend_dev(&vbus_backend.bus, domID); -+} -+ -+/* -+ * vbus_resume_devices -+ * -+ * Inform all vbus devices that we are preparing to migrate (or some other scenarios requiring -+ * temporary suspension of their activities) -+ * -+ */ -+int vbus_resume_devices(unsigned int domID) -+{ -+ return vbus_resume_dev(&vbus_backend.bus, domID); -+} -+ -+ -+/* This function is called from vs_prepare_to_resume() in vbus/vbus_xs.c -+ * after the FSM thread activities in order to setup post-migration vbus and frontend drivers. -+ */ -+void postmig_setup(void) { -+ -+ /* Nothing at the moment */ -+ -+} diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0094-vbus.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0094-vbus.c.patch deleted file mode 100644 index bcfa1f2..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0094-vbus.c.patch +++ /dev/null @@ -1,873 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/vbus/vbus.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/vbus/vbus.c 2026-03-17 12:39:16.663877659 +0100 -@@ -0,0 +1,870 @@ -+ -+/* -+ * Copyright (C) 2014-2019 Daniel Rossier -+ * Copyright (C) 2016-2017 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#if 0 -+#define DEBUG -+#endif -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+ -+#define SYNC_BACKFRONT_COMPLETE 0 -+#define SYNC_BACKFRONT_SUSPEND 1 -+#define SYNC_BACKFRONT_RESUME 2 -+#define SYNC_BACKFRONT_SUSPENDED 3 -+ -+#define VBUS_TIMEOUT 120 -+ -+dc_event_fn_t *dc_event_callback[DC_EVENT_MAX]; -+ -+spinlock_t dc_lock; -+ -+void register_dc_event_callback(dc_event_t dc_event, dc_event_fn_t *callback) { -+ dc_event_callback[dc_event] = callback; -+} -+ -+static int __vbus_switch_state(struct vbus_device *vdev, enum vbus_state state, bool force) -+{ -+ /* -+ * We check whether the state is currently set to the given value, and if not, then the state is set. We don't want to unconditionally -+ * write the given state, because we don't want to fire watches unnecessarily. Furthermore, if the node has gone, we don't write -+ * to it, as the device will be tearing down, and we don't want to resurrect that directory. -+ * -+ */ -+ -+ struct vbus_transaction vbt; -+ -+ if (!force && (state == vdev->state)) -+ return 0; -+ -+ /* Make visible the new state to the rest of world NOW... -+ * The remaining code is highly asynchronous... -+ */ -+ -+ /* We make the strong assumption that the state can NOT be changed in parallel. The state machine is well-defined -+ * and simultaneous changes should simply NEVER happen. -+ */ -+ -+ vdev->state = state; -+ -+ mb(); -+ -+ vbus_transaction_start(&vbt); -+ vbus_printf(vbt, vdev->nodename, "state", "%d", state); -+ vbus_transaction_end(vbt); -+ -+ return 0; -+} -+ -+/** -+ * vbus_switch_state -+ * @vdev: vbus device -+ * @state: new state -+ * -+ * Advertise in the store a change of the given driver to the given new_state. -+ * Return 0 on success, or -errno on error. -+ */ -+static int vbus_switch_state(struct vbus_device *vdev, enum vbus_state state) -+{ -+ DBG("(CPU %d) --> changing state of %s from %d to %d\n", smp_processor_id(), vdev->nodename, vdev->state, state); -+ -+ return __vbus_switch_state(vdev, state, false); -+} -+ -+static void vbus_set_backend_suspended(struct vbus_device *vdev) -+{ -+ char key[VBS_KEY_LENGTH]; -+ char val[10]; -+ -+ sprintf(key, "%s/state", vdev->nodename); -+ sprintf(val, "%d", VbusStateSuspended); -+ -+ vdev->state = VbusStateSuspended; -+ vbs_store_write(key, val); -+ -+ mb(); -+ -+ complete(&vdev->sync_backfront); -+} -+ -+int vbus_match(struct device *dev, const struct device_driver *drv) { -+ struct vbus_driver *vdrv = to_vbus_driver((struct device_driver *) drv); -+ struct vbus_device *vdev = to_vbus_device(dev); -+ -+ /* Matching is positive if both strings are identical */ -+ return (strcmp(vdrv->devicetype, vdev->devicetype) == 0); -+ -+} -+EXPORT_SYMBOL_GPL(vbus_match); -+ -+/* -+ * Remove the watch associated to remove device (especially useful for monitoring the state). -+ */ -+void free_otherend_watch(struct vbus_device *vdev, bool with_vbus) { -+ -+ if (vdev->otherend_watch.node) { -+ -+ if (with_vbus) -+ unregister_vbus_watch(&vdev->otherend_watch); -+ else -+ unregister_vbus_watch_without_vbus(&vdev->otherend_watch); -+ -+ kfree(vdev->otherend_watch.node); -+ -+ vdev->otherend_watch.node = NULL; -+ } -+ -+ vdev->otherend[0] = 0; -+} -+ -+/* -+ * Specific watch register function to focus on the state of a device on the other side. -+ */ -+static void watch_otherend(struct vbus_device *vdev) { -+ struct vbus_type *bus = container_of(vdev->dev.bus, struct vbus_type, bus); -+ -+ vbus_watch_pathfmt(vdev, &vdev->otherend_watch, bus->otherend_changed, "%s/%s", vdev->otherend, "state"); -+} -+ -+/* -+ * Announce ourself to the otherend managed device. We mainly prepare to set up a watch on the device state. -+ */ -+static void talk_to_otherend(struct vbus_device *vdev) { -+ const struct vbus_driver *vdrv = to_vbus_driver(vdev->dev.driver); -+ -+ BUG_ON(vdev->otherend[0] != 0); -+ BUG_ON(vdev->otherend_watch.node != NULL); -+ -+ vdrv->read_otherend_details(vdev); -+ -+ /* Set up watch on state of otherend */ -+ watch_otherend(vdev); -+ -+} -+ -+void vbus_read_otherend_details(struct vbus_device *vdev, char *id_node, char *path_node) { -+ vbus_gather(VBT_NIL, vdev->nodename, id_node, "%i", &vdev->otherend_id, path_node, "%s", vdev->otherend, NULL); -+} -+ -+/* -+ * The following function is called either in the backend OR the frontend. -+ * On the backend side, it may run on CPU #0 (non-RT) or CPU #1 if the backend is configured as realtime. -+ */ -+void vbus_otherend_changed(struct vbus_watch *watch) { -+ struct vbus_device *vdev = container_of(watch, struct vbus_device, otherend_watch); -+ const struct vbus_driver *vdrv = to_vbus_driver(vdev->dev.driver); -+ -+ enum vbus_state state; -+ -+ state = vbus_read_driver_state(vdev->otherend); -+ -+ /* Update the FE state */ -+ vdev->fe_state = state; -+ -+ DBG("On CPU %d frontend otherend changed / device: %s state: %d\n", smp_processor_id(), vdev->nodename, state); -+ -+ /* We do not want to call a callback in a frontend on InitWait. This is -+ * a state issued from the backend to tell the frontend it can be probed. -+ */ -+ if ((vdrv->otherend_changed) && (state != VbusStateInitWait)) -+ vdrv->otherend_changed(vdev, state); -+ -+ switch (state) { -+ case VbusStateInitialised: -+ case VbusStateReconfigured: -+ -+ vbus_switch_state(vdev, VbusStateConnected); -+ break; -+ -+ /* -+ * Check for a final action. -+ * -+ * The frontend has changed its state to Closing. Therefore, once the backend performs its cleanings/closing, -+ * we remove the underlying device. -+ */ -+ case VbusStateClosing: -+ DBG("Got closing from frontend: %s\n", vdev->nodename); -+ -+ remove_device(vdev->nodename); -+ -+ break; -+ -+ case VbusStateSuspended: -+ -+ vbus_set_backend_suspended(vdev); -+ break; -+ -+ case VbusStateConnected: -+ -+ if (vdev->resuming) { -+ -+ /* -+ * It happens after migration & resume -+ * -+ * If we have migrated, we are already in connected state; -+ * we have been put in this state during the reconfiguring process. -+ * -+ */ -+ -+ /* Resume Step 3 */ -+ DBG("%s: now is %s ...\n", __func__, vdev->nodename); -+ -+ if (vdev->state != VbusStateConnected) -+ /* Only in the case we are locally resuming, the backend is in state Suspended */ -+ vbus_switch_state(vdev, VbusStateConnected); -+ -+ vdev->resuming = 0; -+ } -+ -+ complete(&vdev->sync_backfront); -+ -+ break; -+ -+ default: -+ break; -+ -+ } -+ -+} -+EXPORT_SYMBOL_GPL(vbus_otherend_changed); -+ -+/* -+ * vbus_dev_probe() is called by the Linux device subsystem when probing a device -+ */ -+int vbus_dev_probe(struct device *dev) -+{ -+ struct vbus_device *vdev = (struct vbus_device *) to_vbus_device(dev); -+ const struct vbus_driver *vdrv = to_vbus_driver(dev->driver); -+ enum vbus_state otherend_state; -+ -+ DBG("%s\n", vdev->nodename); -+ -+ if (!vdrv->probe) -+ BUG(); -+ -+ BUG_ON(!vbus_match(dev, dev->driver)); -+ -+ init_completion(&vdev->down); -+ init_completion(&vdev->sync_backfront); -+ -+ DBG("CPU %d talk_to_otherend: %s\n", smp_processor_id(), vdev->nodename); -+ -+ talk_to_otherend(vdev); -+ -+ /* On frontend side, the probe will be executed as soon as the backend reaches the state InitWait */ -+ -+ vdrv->probe(vdev); -+ -+ /* Get the state from the otherend to see if we are in a post-migration situation. */ -+ otherend_state = vbus_read_driver_state(vdev->otherend); -+ -+ /* If the node is probed after a migration, it means that the frontend will be reconfigured. -+ * In this case, the resuming operation can go ahead. -+ * If the ME is not migrated (injected), the node is created and the synchronization will be -+ * achieved once the device gets connected. -+ */ -+ if (otherend_state == VbusStateInitialising) { -+ -+ /* This state will allow to wait until the frontend has performed the probe of its device, therefore -+ * until we get the state Initialised. -+ */ -+ vbus_switch_state(vdev, VbusStateInitWait); -+ -+ /* For both RT and non-RT initialization, we wait that the device gets connected */ -+ wait_for_completion(&vdev->sync_backfront); -+ } -+ -+ return 0; -+} -+ -+ -+void vbus_dev_remove(struct device *_dev) -+{ -+ struct vbus_device *vdev = (struct vbus_device *) to_vbus_device(_dev); -+ const struct vbus_driver *vdrv = to_vbus_driver(_dev->driver); -+ unsigned int dir_exists; -+ -+ DBG("%s", vdev->nodename); -+ -+ /* -+ * If the ME is running on a Smart Object which does not offer all the backends matching the ME's frontends, -+ * some frontend related entries may not have been created. We must check here if the entry matching the dev -+ * to remove exists. -+ */ -+ dir_exists = vbus_directory_exists(VBT_NIL, vdev->otherend_watch.node, ""); -+ if (dir_exists) { -+ -+ if (vdrv->remove) -+ vdrv->remove(vdev); -+ -+ /* Remove the watch on the remote device. */ -+ free_otherend_watch(vdev, true); -+ -+ } -+ -+ vbus_switch_state(vdev, VbusStateClosed); -+ -+ /* We perform a complete on this down in case of the agency initiated a shutdown (see vbus_dev_shutdown below). -+ * If it is not the case, the vdev will be removed anyway and the completion has no effect anymore. -+ */ -+} -+ -+/* -+ * Shutdown a device. This function can be called externally, but *not* by the Linux subsystem -+ * during a reboot operation for instance (because of IRQs off). In this case, force_terminate DC events -+ * will be sent to each running ME during the reboot process. -+ */ -+void vbus_dev_shutdown(struct device *dev) -+{ -+ struct vbus_device *vdev = to_vbus_device(dev); -+ unsigned int dir_exists; -+ -+ DBG("%s", vdev->nodename); -+ -+ dir_exists = vbus_directory_exists(VBT_NIL, vdev->otherend_watch.node, ""); -+ -+ /* -+ * If the ME is running on a Smart Object which does not offer all the backends matching the ME's frontends, -+ * some frontend related entries may not have been created. We must check here if the entry matching the dev -+ * to shutdown exists. -+ */ -+ if (dir_exists) { -+ -+ vbus_switch_state(vdev, VbusStateClosing); -+ -+ /* Wait that the frontend get closed. */ -+ wait_for_completion(&vdev->down); -+ } -+} -+ -+void vbus_register_driver_common(struct vbus_driver *vdrv, struct vbus_type *bus, struct module *owner, const char *mod_name) -+{ -+ int ret; -+ -+ DBG("Registering driver name: %s\n", vdrv->name); -+ -+ vdrv->driver.name = vdrv->name; -+ vdrv->driver.bus = &bus->bus; -+ vdrv->driver.owner = owner; -+ vdrv->driver.mod_name = mod_name; -+ -+ ret = driver_register(&vdrv->driver); -+ if (ret) -+ BUG(); -+} -+ -+void vbus_unregister_driver(struct vbus_driver *vdrv) -+{ -+ driver_unregister(&vdrv->driver); -+} -+ -+struct vb_find_info { -+ struct vbus_device *vdev; -+ const char *nodename; -+}; -+ -+static int cmp_dev(struct device *dev, void *data) -+{ -+ struct vbus_device *vdev = to_vbus_device(dev); -+ struct vb_find_info *info = data; -+ -+ if (!strcmp(vdev->nodename, info->nodename)) { -+ info->vdev = vdev; -+ get_device(dev); -+ return 1; -+ } -+ return 0; -+} -+ -+static struct vbus_device *vbus_device_find(const char *nodename, struct bus_type *bus) -+{ -+ struct vb_find_info info = { .vdev = NULL, .nodename = nodename }; -+ -+ bus_for_each_dev(bus, NULL, &info, cmp_dev); -+ return info.vdev; -+} -+ -+static int cleanup_dev(struct device *dev, void *data) -+{ -+ struct vbus_device *vdev = to_vbus_device(dev); -+ struct vb_find_info *info = data; -+ -+ if (!strcmp(vdev->nodename, info->nodename)) { -+ info->vdev = vdev; -+ get_device(dev); -+ -+ return 1; /* found */ -+ } -+ -+ return 0; -+} -+ -+/* -+ * Look for a specific device to be cleaned up. -+ */ -+void vbus_cleanup_device(const char *path, struct bus_type *bus) -+{ -+ struct vb_find_info info = { .nodename = path }; -+ -+ info.vdev = NULL; -+ -+ bus_for_each_dev(bus, NULL, &info, cleanup_dev); -+ -+ if (info.vdev) { -+ device_unregister(&info.vdev->dev); -+ put_device(&info.vdev->dev); -+ } -+ -+} -+ -+static void vbus_dev_release(struct device *vdev) { -+ if (vdev) -+ kfree(to_vbus_device(vdev)); -+} -+ -+static ssize_t nodename_show(struct device *dev, struct device_attribute *attr, char *buf) -+{ -+ return sprintf(buf, "%s\n", to_vbus_device(dev)->nodename); -+} -+static DEVICE_ATTR_RO(nodename); -+ -+static ssize_t devtype_show(struct device *dev, struct device_attribute *attr, char *buf) -+{ -+ return sprintf(buf, "%s\n", to_vbus_device(dev)->devicetype); -+} -+static DEVICE_ATTR_RO(devtype); -+ -+static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, char *buf) -+{ -+ return sprintf(buf, "%s:%s\n", dev->bus->name, to_vbus_device(dev)->devicetype); -+} -+static DEVICE_ATTR_RO(modalias); -+ -+static ssize_t devstate_show(struct device *dev, struct device_attribute *attr, char *buf) -+{ -+ return sprintf(buf, "%d\n", to_vbus_device(dev)->state); -+} -+static DEVICE_ATTR_RO(devstate); -+ -+static struct attribute *vbus_dev_attrs[] = { -+ &dev_attr_nodename.attr, -+ &dev_attr_devtype.attr, -+ &dev_attr_modalias.attr, -+ &dev_attr_devstate.attr, -+ NULL, -+}; -+ -+static const struct attribute_group vbus_dev_group = { -+ .attrs = vbus_dev_attrs, -+}; -+ -+const struct attribute_group *vbus_dev_groups[] = { -+ &vbus_dev_group, -+ NULL, -+}; -+ -+/* -+ * Create a new node and initialize basic structure (vdev). -+ * This function is NOT re-entrant and must be executed in the specific context during injection or post-migration sequence. -+ */ -+static int vbus_probe_node(struct vbus_type *bus, const char *type, const char *nodename) -+{ -+ char devname[VBS_KEY_LENGTH]; -+ int err; -+ struct vbus_device *vdev; -+ enum vbus_state state; -+ -+ state = vbus_read_driver_state(nodename); -+ -+ /* If the backend driver entry exists, but no frontend is using it, there is no -+ * vbstore entry related to the state and we simply skip it. -+ */ -+ if (state == VbusStateUnknown) -+ return 0; -+ -+ BUG_ON(state != VbusStateInitialising); -+ -+ vdev = kzalloc(sizeof(struct vbus_device), GFP_KERNEL); -+ if (!vdev) -+ BUG(); -+ -+ memset(vdev, 0, sizeof(struct vbus_device)); -+ -+ vdev->state = VbusStateInitialising; -+ vdev->state = VbusStateUnknown; -+ -+ vdev->resuming = 0; -+ -+ /* Copy the strings into the extra space. */ -+ -+ strcpy(vdev->nodename, nodename); -+ strcpy(vdev->devicetype, type); -+ -+ vdev->dev.bus = &bus->bus; -+ vdev->dev.release = vbus_dev_release; -+ -+ bus->get_bus_id(devname, vdev->nodename); -+ -+ dev_set_name(&vdev->dev, "%s", devname); -+ -+ /* -+ * Register with generic device framework. -+ * The link with the driver is also done at this moment. -+ */ -+ err = device_register(&vdev->dev); -+ if (err) -+ BUG(); -+ -+ return 0; -+} -+ -+ -+/******************/ -+ -+/* Suspend devices which eventually match with a certain root name (specific ME) */ -+static int suspend_dev(struct device *dev, void *data) -+{ -+ const struct vbus_driver *vdrv; -+ struct vbus_device *vdev; -+ unsigned int domID = *((unsigned int *) data); -+ unsigned int curDomID; -+ char *ptr_item; -+ char item[80]; -+ -+ if (dev->driver == NULL) { -+ /* Skip if driver is NULL, i.e. probe failed */ -+ return 0; -+ } -+ -+ vdrv = to_vbus_driver(dev->driver); -+ vdev = (struct vbus_device *) to_vbus_device(dev); -+ -+ if (data != NULL) { -+ -+ /* backend/ */ -+ ptr_item = strchr(vdev->nodename, '/'); -+ /* / */ -+ ptr_item = strchr(ptr_item+1, '/'); -+ ptr_item++; -+ -+ sscanf(ptr_item, "%d/%s", &curDomID, item); -+ -+ if (curDomID != domID) -+ return 0; -+ } -+ -+ DBG("Suspending %s (vbdrv=%p, vdev=%p)\n", vdev->nodename, vdrv, vdev); -+ -+ vdrv->suspend(vdev); -+ -+ /* Now propagate the suspending event to the frontend */ -+ -+ vbus_switch_state(vdev, VbusStateSuspending); -+ -+ wait_for_completion(&vdev->sync_backfront); -+ -+ return 0; -+} -+ -+int vbus_suspend_dev(struct bus_type *bus, unsigned int domID) -+{ -+ -+ if (domID == -1) -+ bus_for_each_dev(bus, NULL, NULL, suspend_dev); -+ else -+ bus_for_each_dev(bus, NULL, &domID, suspend_dev); -+ -+ return 0; -+} -+ -+static int resume_dev(struct device *dev, void *data) -+{ -+ const struct vbus_driver *vdrv; -+ struct vbus_device *vdev; -+ unsigned int domID = *((unsigned int *) data); -+ unsigned int curDomID; -+ char *ptr_item; -+ char item[80]; -+ -+ vdrv = to_vbus_driver(dev->driver); -+ vdev = (struct vbus_device *) to_vbus_device(dev); -+ -+ if (dev->driver == NULL) { -+ /* Skip if driver is NULL, i.e. probe failed */ -+ return 0; -+ } -+ -+ if (data != NULL) { -+ -+ /* backend/ */ -+ ptr_item = strchr(vdev->nodename, '/'); -+ /* / */ -+ ptr_item = strchr(ptr_item+1, '/'); -+ ptr_item++; -+ -+ sscanf(ptr_item, "%d/%s", &curDomID, item); -+ -+ if (curDomID != domID) -+ return 0; -+ } -+ -+ DBG("Resuming %s (vbdrv=%p, vdev=%p)\n", vdev->nodename, vdrv, vdev); -+ -+ /* Before resuming, we need to make sure the backend reached a stable state. */ -+ /* Two possible scenarios: either the backend has been suspended, so it is in VbusStateSuspended, or -+ * the backend has just been created and we make sure it reached the VbusStateInitWait state. -+ */ -+ -+ /* The backend is now either in VbusStateSuspended OR VbusStateInitWait */ -+ vdrv->resume(vdev); -+ -+ vdev->resuming = 1; -+ -+ if (vdev->state != VbusStateSuspended) -+ /* we are in StateInitWait because newly create vbstore entries after migration */ -+ vbus_switch_state(vdev, VbusStateReconfiguring); -+ else { -+ DBG("Changing state of %s to resuming\n", vdev->nodename); -+ vbus_switch_state(vdev, VbusStateResuming); -+ } -+ -+ /* -+ * The resuming operation is synchronized on the connected state. -+ * It avoids to have next suspending operation too early, before the device has time to get connected. -+ */ -+ wait_for_completion(&vdev->sync_backfront); -+ -+ return 0; -+} -+ -+int vbus_resume_dev(struct bus_type *bus, unsigned int domID) -+{ -+ -+ if (domID == -1) -+ bus_for_each_dev(bus, NULL, NULL, resume_dev); -+ else -+ bus_for_each_dev(bus, NULL, &domID, resume_dev); -+ -+ return 0; -+} -+ -+/******************/ -+ -+/* -+ * Called at each backend creation when a frontend is initializing. -+ */ -+void vbus_dev_changed(const char *node, char *type, struct vbus_type *bus) { -+ -+ struct vbus_device *vdev; -+ -+ vdev = vbus_device_find(node, &bus->bus); -+ if (vdev) { -+ lprintk("## (agency) Node %s already exits. It should not!\n", node); -+ BUG(); -+ } -+ -+ vbus_probe_node(bus, type, node); -+} -+ -+/* -+ * Perform a bottom half (deferred) processing on the receival of dc_event. -+ * Here, we avoid to use a worqueue. Prefer thread instead, it will be also easier to manage with SO3/virtshare. -+ */ -+static irqreturn_t directcomm_isr_thread(int irq, void *args) { -+ dc_event_t dc_event; -+ -+ dc_event = atomic_read((const atomic_t *) &avz_shared->dc_event); -+ -+ /* Reset the dc_event now so that the domain can send another dc_event */ -+ atomic_set((atomic_t *) &avz_shared->dc_event, DC_NO_EVENT); -+ -+ /* Perform the associated callback function to this particular dc_event */ -+ if (dc_event_callback[dc_event] != NULL) -+ (*dc_event_callback[dc_event])(dc_event); -+ -+ return IRQ_HANDLED; -+} -+ -+/* -+ * Interrupt routine for direct communication event channel -+ * IRQs are off -+ */ -+static irqreturn_t directcomm_isr(int irq, void *args) { -+ dc_event_t dc_event; -+ unsigned int domID = *((unsigned int *) args); -+ -+ dc_event = atomic_read((const atomic_t *) &avz_shared->dc_event); -+ -+ DBG("Received directcomm interrupt for event: %d\n", avz_shared->dc_event); -+ -+ /* We should not receive twice a same dc_event, before it has been fully processed. */ -+ -+ BUG_ON(atomic_read(&dc_incoming_domID[dc_event]) != -1); -+ -+ atomic_set(&dc_incoming_domID[dc_event], domID); -+ -+ switch (dc_event) { -+ -+ /* -+ * Some of these events are processed in the agency *only* when the remote domain will complete the dc_event (dc_stable). -+ * If no dc_event is in progress, this will fail in perform_task(). -+ */ -+ -+ case DC_PRE_SUSPEND: -+ case DC_SUSPEND: -+ case DC_RESUME: -+ case DC_SHUTDOWN: -+ case DC_POST_ACTIVATE: -+ case DC_TRIGGER_DEV_PROBE: -+ case DC_TRIGGER_LOCAL_COOPERATION: -+ -+ /* FALLTHROUGH */ -+ -+ /* Check if it is the response to a dc_event. Can be done immediately in the top half. */ -+ if (atomic_read(&dc_outgoing_domID[dc_event]) != -1) { -+ -+ dc_stable(dc_event); -+ break; /* Out of the switch */ -+ } -+ -+ /* Start the deferred thread */ -+ return IRQ_WAKE_THREAD; -+ -+ default: -+ lprintk("(Agency) %s: something weird happened, directcomm interrupt was triggered with dc_event %d, but no DC event was configured !\n", __func__, dc_event); -+ break; -+ } -+ -+ /* Reset the dc_event now so that the domain can send another dc_event */ -+ atomic_set((atomic_t *) &avz_shared->dc_event, DC_NO_EVENT); -+ -+ return IRQ_HANDLED; -+} -+ -+static int __init vbus_init(void) -+{ -+ int res = 0; -+ int i; -+ int evtchn; -+ struct evtchn_alloc_unbound *alloc_unbound; -+ unsigned int *p_domID; -+ char buf[20]; -+ struct vbus_transaction vbt; -+ avz_hyp_t args; -+ -+ res = -ENODEV; -+ -+ spin_lock_init(&dc_lock); -+ -+ for (i = 0; i < DC_EVENT_MAX; i++) -+ dc_event_callback[i] = NULL; -+ -+ lprintk("%s: initializing vbstore...\n", __func__); -+ -+ /* Now setting up the VBstore */ -+ vbstore_init(); -+ -+ /* -+ * Set up the directcomm communication channel that -+ * is used between the different domains, mainly between the agency and MEs, -+ * or the non-realtime and realtime agency. -+ */ -+ -+ for (i = 1; i < MAX_DOMAINS; i++) { -+ -+ /* Get a free event channel */ -+ args.cmd = AVZ_EVENT_CHANNEL_OP; -+ args.u.avz_evtchn.evtchn_op.cmd = EVTCHNOP_alloc_unbound; -+ args.u.avz_evtchn.evtchn_op.u.alloc_unbound.dom = DOMID_SELF; -+ args.u.avz_evtchn.evtchn_op.u.alloc_unbound.remote_dom = i; -+ -+ avz_hypercall(&args); -+ -+ avz_shared->dom_desc.u.agency.dc_evtchn[i] = args.u.avz_evtchn.evtchn_op.u.alloc_unbound.evtchn; -+ -+ /* Keep a valid reference to the domID */ -+ p_domID = kmalloc(sizeof(int), GFP_KERNEL); -+ BUG_ON(!p_domID); -+ -+ *p_domID = i; -+ -+ /* Binding this event channel to an interrupt handler makes the evtchn state not "unbound" anymore */ -+ evtchn = bind_evtchn_to_virq_handler(avz_shared->dom_desc.u.agency.dc_evtchn[i], -+ directcomm_isr, -+ directcomm_isr_thread, -+ 0, -+ "directcomm_isr", -+ p_domID); -+ -+ if (evtchn <= 0) { -+ printk(KERN_ERR "Error: bind_evtchn_to_irqhandler failed"); -+ BUG(); -+ } -+ -+ /* Finally, we put the directcomm event channel in vbstore (intended to ME usage) */ -+ /* Save it in vbstore */ -+ DBG("%s: writing initial vbstore entries for directcomm activities for ME %d ...\n", __func__, i); -+ -+ vbus_transaction_start(&vbt); -+ -+ sprintf(buf, "soo/directcomm/%d", i); -+ vbus_printf(vbt, buf, "event-channel", "%d", (unsigned int) avz_shared->dom_desc.u.agency.dc_evtchn[i]); -+ -+ vbus_transaction_end(vbt); -+ -+ DBG("%s: direct communication set up between Agency and ME %d with event channel: %d irq: %d\n", __func__, i, -+ avz_shared->dom_desc.u.agency.dc_evtchn[i], evtchn); -+ } -+ -+ kfree(alloc_unbound); -+ -+ DBG("vbus_init OK!\n"); -+ -+ return 0; -+} -+ -+arch_initcall(vbus_init); diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0095-vbus_client.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0095-vbus_client.c.patch deleted file mode 100644 index 5f87372..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0095-vbus_client.c.patch +++ /dev/null @@ -1,192 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/vbus/vbus_client.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/vbus/vbus_client.c 2026-03-13 13:24:35.603135633 +0100 -@@ -0,0 +1,189 @@ -+/* -+ * Copyright (C) 2016-2019 Daniel Rossier -+ * Copyright (C) 2018 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#if 0 -+#define DEBUG -+#endif -+ -+#include -+#include -+#include -+ -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+const char *vbus_strstate(enum vbus_state state) -+{ -+ static const char *const name[] = { -+ [ VbusStateUnknown ] = "Unknown", -+ [ VbusStateInitialising ] = "Initialising", -+ [ VbusStateInitWait ] = "InitWait", -+ [ VbusStateInitialised ] = "Initialised", -+ [ VbusStateConnected ] = "Connected", -+ [ VbusStateClosing ] = "Closing", -+ [ VbusStateClosed ] = "Closed", -+ [ VbusStateReconfiguring] = "Reconfiguring", -+ [ VbusStateReconfigured ] = "Reconfigured", -+ [ VbusStateSuspending ] = "Suspending", -+ [ VbusStateSuspended ] = "Suspended", -+ [ VbusStateResuming ] = "Resuming", -+ }; -+ return (state < ARRAY_SIZE(name)) ? name[state] : "INVALID"; -+} -+ -+/** -+ * vbus_watch_path - register a watch -+ * @dev: vbus device -+ * @path: path to watch -+ * @watch: watch to register -+ * @callback: callback to register -+ * -+ * Register a @watch on the given path, using the given vbus_watch structure -+ * for storage, and the given @callback function as the callback. Return 0 on -+ * success, or -errno on error. On success, the given @path will be saved as -+ * @watch->node, and remains the caller's to free. On error, @watch->node will -+ * be NULL, the device will switch to %VbusStateClosing, and the error will -+ * be saved in the store. -+ */ -+void vbus_watch_path(char *path, struct vbus_watch *watch, void (*callback)(struct vbus_watch *)) -+{ -+ watch->node = path; -+ watch->callback = callback; -+ -+ register_vbus_watch(watch); -+} -+ -+ -+/** -+ * vbus_watch_pathfmt - register a watch on a sprintf-formatted path -+ * @dev: vbus device -+ * @watch: watch to register -+ * @callback: callback to register -+ * @pathfmt: format of path to watch -+ * -+ * Register a watch on the given @path, using the given vbus_watch -+ * structure for storage, and the given @callback function as the callback. -+ * Return 0 on success, or -errno on error. On success, the watched path -+ * (@path/@path2) will be saved as @watch->node, and becomes the caller's to -+ * kfree(). On error, watch->node will be NULL, so the caller has nothing to -+ * free, the device will switch to %VbusStateClosing, and the error will be -+ * saved in the store. -+ */ -+void vbus_watch_pathfmt(struct vbus_device *dev, struct vbus_watch *watch, void (*callback)(struct vbus_watch *), const char *pathfmt, ...) -+{ -+ va_list ap; -+ char *path; -+ -+ va_start(ap, pathfmt); -+ path = kvasprintf(GFP_ATOMIC, pathfmt, ap); -+ va_end(ap); -+ -+ if (!path) { -+ lprintk("%s - line %d: Allocating path for watch failed for device %s\n", __func__, __LINE__, dev->nodename); -+ BUG(); -+ } -+ vbus_watch_path(path, watch, callback); -+ -+} -+ -+/** -+ * Allocate an event channel for the given vbus_device, assigning the newly -+ * created local evtchn to *evtchn. Return 0 on success, or -errno on error. On -+ * error, the device will switch to VbusStateClosing, and the error will be -+ * saved in the store. -+ */ -+void vbus_alloc_evtchn(struct vbus_device *dev, uint32_t *evtchn) -+{ -+ avz_hyp_t args; -+ -+ args.cmd = AVZ_EVENT_CHANNEL_OP; -+ -+ args.u.avz_evtchn.evtchn_op.cmd = EVTCHNOP_alloc_unbound; -+ args.u.avz_evtchn.evtchn_op.u.alloc_unbound.dom = DOMID_SELF; -+ args.u.avz_evtchn.evtchn_op.u.alloc_unbound.remote_dom = dev->otherend_id; -+ -+ avz_hypercall(&args); -+ -+ *evtchn = args.u.avz_evtchn.evtchn_op.u.alloc_unbound.evtchn; -+} -+ -+ -+/** -+ * Bind to an existing interdomain event channel in another domain. Returns 0 -+ * on success and stores the local evtchn in *evtchn. On error, returns -errno, -+ * switches the device to VbusStateClosing, and saves the error in VBstore. -+ */ -+void vbus_bind_evtchn(struct vbus_device *dev, uint32_t remote_evtchn, uint32_t *evtchn) -+{ -+ avz_hyp_t args; -+ -+ args.cmd = AVZ_EVENT_CHANNEL_OP; -+ args.u.avz_evtchn.evtchn_op.cmd = EVTCHNOP_bind_interdomain; -+ -+ args.u.avz_evtchn.evtchn_op.u.bind_interdomain.remote_dom = dev->otherend_id; -+ args.u.avz_evtchn.evtchn_op.u.bind_interdomain.remote_evtchn = remote_evtchn; -+ -+ avz_hypercall(&args); -+ -+ *evtchn = args.u.avz_evtchn.evtchn_op.u.bind_interdomain.local_evtchn; -+ -+ DBG("%s: got local evtchn: %d for remote evtchn: %d\n", __func__, *evtchn, remote_evtchn); -+} -+ -+/** -+ * Free an existing event channel. Returns 0 on success or -errno on error. -+ */ -+void vbus_free_evtchn(struct vbus_device *dev, uint32_t evtchn) -+{ -+ avz_hyp_t args; -+ -+ args.cmd = AVZ_EVENT_CHANNEL_OP; -+ -+ args.u.avz_evtchn.evtchn_op.cmd = EVTCHNOP_close; -+ args.u.avz_evtchn.evtchn_op.u.close.evtchn = evtchn; -+ -+ avz_hypercall(&args); -+} -+ -+/** -+ * vbus_read_driver_state -+ * @path: path for driver -+ * -+ * Return the state of the driver rooted at the given store path, or -+ * VbusStateUnknown if no state can be read. -+ */ -+enum vbus_state vbus_read_driver_state(const char *path) -+{ -+ enum vbus_state result; -+ bool found; -+ -+ found = vbus_gather(VBT_NIL, path, "state", "%d", &result, NULL); -+ -+ if (!found) -+ result = VbusStateUnknown; -+ -+ return result; -+} diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0096-vbus_vbstore.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0096-vbus_vbstore.c.patch deleted file mode 100644 index 13e1598..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0096-vbus_vbstore.c.patch +++ /dev/null @@ -1,922 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/kernel/vbus/vbus_vbstore.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/kernel/vbus/vbus_vbstore.c 2026-03-17 17:07:13.824260003 +0100 -@@ -0,0 +1,919 @@ -+/* -+ * Copyright (C) 2016-2019 Daniel Rossier -+ * Copyright (C) 2018 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#if 0 -+#define DEBUG -+#endif -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+ -+#define IRQF_DISABLED 0 -+ -+struct vbs_handle { -+ /* A list of replies. Currently only one will ever be outstanding. */ -+ struct list_head reply_list; -+ -+ /* -+ * Mutex ordering: transaction_mutex -> watch_mutex -> request_mutex. -+ * -+ * transaction_mutex must be held before incrementing -+ * transaction_count. The mutex is held when a suspend is in -+ * progress to prevent new transactions starting. -+ * -+ * When decrementing transaction_count to zero the wait queue -+ * should be woken up, the suspend code waits for count to -+ * reach zero. -+ */ -+ -+ /* Protect transactions against save/restore. */ -+ struct mutex transaction_mutex; -+ volatile uint32_t transaction_count; -+ -+ struct mutex request_mutex; -+ -+ struct completion watch_wait; -+ -+ /* To manage ongoing transactions when the ME must be suspended */ -+ struct mutex transaction_group_mutex; -+ -+ /* Protect watch (de)register against save/restore. */ -+ struct mutex watch_mutex; -+ -+ spinlock_t msg_list_lock; -+}; -+static struct vbs_handle vbs_state; -+ -+/* List of registered watches, and a lock to protect it. */ -+static LIST_HEAD(watches); -+static LIST_HEAD(vbus_msg_standby_list); -+ -+static uint32_t vbus_msg_ID = 0; -+/* -+ * transactionID = 0 means that there is no attached transaction. Hence, when transaction_start() is called for the first time, -+ * it will be directly incremented to 1. -+ */ -+unsigned int transactionID = 0; -+ -+void vbs_dump_watches(void) { -+ struct vbus_watch *w; -+ printk("----------- VBstore watches dump --------------\n"); -+ list_for_each_entry(w, &watches, list) -+ printk(" %s\n", w->node); -+ printk("--------------- end --------------------\n"); -+} -+ -+/* Local reference to shared vbstore page between us and vbstore */ -+volatile struct vbstore_domain_interface *__intf; -+ -+/** -+ * vbs_write - low level write -+ * @data: buffer to send -+ * @len: length of buffer -+ * -+ * Returns 0 on success, error otherwise. -+ */ -+static void vbs_write(const void *data, unsigned len) -+{ -+ VBSTORE_RING_IDX prod; -+ volatile char *dst; -+ -+ DBG("__intf->req_prod: %d __intf->req_pvt: %d __intf->req_cons: %d\n", -+ __intf->req_prod, __intf->req_pvt, __intf->req_cons); -+ -+ /* Read indexes, then verify. */ -+ prod = __intf->req_pvt; -+ -+ /* Check if we are at the end of the ring, i.e. there is no place for len bytes */ -+ if (prod + len >= VBSTORE_RING_SIZE) { -+ prod = __intf->req_pvt = 0; -+ if (prod + len > __intf->req_cons) -+ BUG(); -+ } -+ -+#warning assert that the ring is not full -+ -+ dst = &__intf->req[prod]; -+ -+ /* Must write data /after/ reading the producer index. */ -+ mb(); -+ -+ memcpy((void *) dst, data, len); -+ mb(); -+ -+ __intf->req_pvt += len; -+ -+ /* Other side must not see new producer until data is there. */ -+ mb(); -+} -+ -+static void vbs_read(void *data, unsigned len) -+{ -+ VBSTORE_RING_IDX cons; -+ volatile const char *src; -+ -+ DBG("__intf->rsp_prod: %d __intf->rsp_pvt: %d __intf->rsp_cons: %d\n", -+ __intf->rsp_prod, __intf->rsp_pvt, __intf->rsp_cons); -+ -+ /* Read indexes, then verify. */ -+ cons = __intf->rsp_cons; -+ -+ if (cons + len >= VBSTORE_RING_SIZE) -+ cons = __intf->rsp_cons = 0; -+ -+ src = &__intf->rsp[cons]; -+ -+ /* Must read data /after/ reading the producer index. */ -+ mb(); -+ -+ memcpy(data, (void *) src, len); -+ -+ __intf->rsp_cons += len; -+ -+ /* Other side must not see free space until we've copied out */ -+ mb(); -+} -+ -+/* -+ * Main function to send a message to vbstore. It is the only way to send a -+ * message to vbstore. It follows a synchronous send/reply scheme. -+ * A message may have several strings within the payload. These (sub-)strings are known as vectors (msgvec_t). -+ */ -+static void *vbs_talkv(struct vbus_transaction t, vbus_msg_type_t type, const msgvec_t *vec, -+ unsigned int num_vecs, unsigned int *len) -+{ -+ vbus_msg_t msg; -+ unsigned int i; -+ char *payload = NULL; -+ char *__payload_pos = NULL; -+ unsigned long flags; -+ -+ /* Interrupts must be enabled because we expect an (asynchronous) reply from the peer.*/ -+ BUG_ON(irqs_disabled()); -+ -+ mutex_lock(&vbs_state.request_mutex); -+ -+ /* Message unique ID (on 32 bits) - 0 is a valid ID */ -+ msg.id = vbus_msg_ID++; -+ -+ msg.transactionID = t.id; -+ -+ /* Allocating a completion structure for this message - need to do that dynamically since the msg is part of the shared vbstore page -+ * and the size may vary depending on SMP is enabled or not. -+ */ -+ msg.reply_wait = (struct completion *) kmalloc(sizeof(struct completion), GFP_ATOMIC); -+ -+ init_completion(msg.reply_wait); -+ -+ msg.type = type; -+ msg.len = 0; -+ for (i = 0; i < num_vecs; i++) -+ msg.len += vec[i].len; -+ -+ vbs_write(&msg, sizeof(msg)); -+ -+ payload = kzalloc(msg.len, GFP_ATOMIC); -+ if (payload == NULL) { -+ lprintk("%s:%d ERROR cannot kmalloc the msg payload.\n", __func__, __LINE__); -+ BUG(); -+ } -+ memset(payload, 0, msg.len); -+ -+ __payload_pos = payload; -+ for (i = 0; i < num_vecs; i++) { -+ memcpy(__payload_pos, vec[i].base, vec[i].len); -+ __payload_pos += vec[i].len; -+ } -+ -+ DBG("Msg type: %d msg len: %d content: %s\n", msg.type, msg.len, payload); -+ -+ vbs_write(payload, msg.len); -+ kfree(payload); -+ -+ /* Store the current vbus_msg into the standby list for waiting the reply from vbstore. */ -+ spin_lock_irqsave(&vbs_state.msg_list_lock, flags); -+ list_add_tail(&msg.list, &vbus_msg_standby_list); -+ spin_unlock_irqrestore(&vbs_state.msg_list_lock, flags); -+ -+ __intf->req_prod = __intf->req_pvt; -+ -+ mb(); -+ -+ notify_remote_via_evtchn(avz_shared->dom_desc.u.agency.vbstore_levtchn); -+ -+ /* Now we are waiting for the answer from vbstore */ -+ DBG("Now, we wait for the reply / msg ID: %d (0x%lx)\n", msg.id, &msg.list); -+ -+ wait_for_completion(msg.reply_wait); -+ -+ DBG("Talkv protocol completed / reply: %lx\n", msg.reply); -+ -+ /* Consistency check */ -+ if ((msg.reply->type != msg.type) || (msg.reply->id != msg.id)) { -+ lprintk("%s: reply msg type or ID does not match...\n", __func__); -+ lprintk("VBus received type [%d] expected: %d, received ID [%d] expected: %d\n", -+ msg.reply->type, msg.type, msg.reply->id, msg.id); -+ BUG(); -+ } -+ -+ payload = msg.reply->payload; -+ if (len != NULL) -+ *len = msg.reply->len; -+ -+ /* Free the reply msg */ -+ kfree(msg.reply); -+ kfree(msg.reply_wait); -+ -+ mutex_unlock(&vbs_state.request_mutex); -+ -+ return payload; -+} -+ -+/* Simplified version of vbs_talkv: single message. */ -+static void *vbs_single(struct vbus_transaction t, vbus_msg_type_t type, -+ const char *string, unsigned int *len) -+{ -+ msgvec_t vec; -+ vec.base = (void *) string; -+ vec.len = strlen(string) + 1; -+ return vbs_talkv(t, type, &vec, 1, len); -+} -+ -+static unsigned int count_strings(const char *strings, unsigned int len) -+{ -+ unsigned int num; -+ const char *p; -+ for (p = strings, num = 0; p < strings + len; p += strlen(p) + 1) -+ num++; -+ return num; -+} -+ -+/* Return the path to dir with /name appended. Buffer must be kfree()'ed. */ -+static char *join(const char *dir, const char *name) -+{ -+ char *buffer; -+ if (strlen(name) == 0) -+ buffer = kasprintf(GFP_ATOMIC, "%s", dir); -+ else -+ buffer = kasprintf(GFP_ATOMIC, "%s/%s", dir, name); -+ if (!buffer) -+ BUG(); -+ return buffer; -+} -+ -+static char **split(char *strings, unsigned int len, unsigned int *num) -+{ -+ char *p, **ret; -+ -+ /* Count the strings. */ -+ *num = count_strings(strings, len); -+ -+ /* Transfer to one big alloc for easy freeing. */ -+ ret = kmalloc(*num * sizeof(char *) + len, GFP_ATOMIC); -+ if (!ret) -+ BUG(); -+ memcpy(&ret[*num], strings, len); -+ kfree(strings); -+ strings = (char *)&ret[*num]; -+ for (p = strings, *num = 0; p < strings + len; p += strlen(p) + 1) -+ ret[(*num)++] = p; -+ return ret; -+} -+ -+char **vbus_directory(struct vbus_transaction t, const char *dir, -+ const char *node, unsigned int *num) -+{ -+ char *strings, *path; -+ unsigned int len; -+ char **rr; -+ -+ path = join(dir, node); -+ if (IS_ERR(path)) -+ BUG(); -+ -+ strings = vbs_single(t, VBS_DIRECTORY, path, &len); -+ kfree(path); -+ -+ if (IS_ERR(strings)) -+ BUG(); -+ -+ /* -+ * If the result is empty, no allocation has been done and there is no need fo kfree'd anything. -+ */ -+ if (len) { -+ rr = split(strings, len, num); -+ return rr; -+ } else -+ BUG(); -+} -+ -+/* -+ * Check if a directory exists. -+ * Return 1 if the directory has been found, 0 otherwise. -+ */ -+int vbus_directory_exists(struct vbus_transaction t, const char *dir, const char *node) -+{ -+ char *strings, *path; -+ unsigned int len; -+ int res; -+ -+ path = join(dir, node); -+ if (IS_ERR(path)) -+ BUG(); -+ -+ strings = vbs_single(t, VBS_DIRECTORY_EXISTS, path, &len); -+ kfree(path); -+ -+ res = (strings[0] == '1') ? 1 : 0; -+ -+ /* Don't forget to free the payload */ -+ kfree(strings); -+ -+ return res; -+} -+ -+/* Get the value of a single file. -+ * Returns a kmalloced value: call free() on it after use. -+ * len indicates length in bytes. -+ */ -+void *vbus_read(struct vbus_transaction t, const char *dir, -+ const char *node, unsigned int *len) -+{ -+ char *path; -+ void *ret; -+ -+ path = join(dir, node); -+ ret = vbs_single(t, VBS_READ, path, len); -+ kfree(path); -+ -+ return ret; -+} -+ -+/* Write the value of a single file. -+ * Returns -err on failure. -+ */ -+void vbus_write(struct vbus_transaction t, const char *dir, -+ const char *node, const char *string) -+{ -+ const char *path; -+ msgvec_t vec[2]; -+ char *str; -+ -+ path = join(dir, node); -+ if (IS_ERR(path)) -+ BUG(); -+ -+ vec[0].base = (void *) path; -+ vec[0].len = strlen(path) + 1; -+ vec[1].base = (void *) string; -+ vec[1].len = strlen(string) + 1; -+ -+ str = vbs_talkv(t, VBS_WRITE, vec, ARRAY_SIZE(vec), NULL); -+ -+ if (IS_ERR(str)) -+ BUG(); -+ if (str) -+ kfree(str); -+ -+ kfree(path); -+} -+ -+/* Create a new directory. */ -+void vbus_mkdir(struct vbus_transaction t, const char *dir, const char *node) -+{ -+ char *path; -+ char *str; -+ -+ path = join(dir, node); -+ if (IS_ERR(path)) -+ BUG(); -+ -+ str = vbs_single(t, VBS_MKDIR, path, NULL); -+ if (IS_ERR(str)) -+ BUG(); -+ if (str) -+ kfree(str); -+ -+ kfree(path); -+} -+ -+/* Destroy a file or directory (directories must be empty). */ -+void vbus_rm(struct vbus_transaction t, const char *dir, const char *node) -+{ -+ char *path; -+ char *str; -+ -+ path = join(dir, node); -+ if (IS_ERR(path)) -+ BUG(); -+ -+ str = vbs_single(t, VBS_RM, path, NULL); -+ if (IS_ERR(str)) -+ BUG(); -+ if (str) -+ kfree(str); -+ -+ kfree(path); -+} -+ -+/* Start a transaction: changes by others will not be seen during this -+ * transaction, and changes will not be visible to others until end. -+ */ -+void vbus_transaction_start(struct vbus_transaction *t) -+{ -+ mutex_lock(&vbs_state.transaction_mutex); -+ -+ if (vbs_state.transaction_count == 0) -+ mutex_lock(&vbs_state.transaction_group_mutex); -+ -+ vbs_state.transaction_count++; -+ transactionID++; -+ -+ /* We make sure that an overflow does not lead to value 0 */ -+ if (unlikely(!transactionID)) -+ transactionID++; -+ -+ DBG("Starting transaction ID: %d...\n", transactionID); -+ t->id = transactionID; -+ -+ mutex_unlock(&vbs_state.transaction_mutex); -+} -+ -+/* -+ * End a transaction. -+ * At this moment, pending watch events raised during operations bound to this transaction ID can be sent to watchers. -+ */ -+void vbus_transaction_end(struct vbus_transaction t) -+{ -+ char *str; -+ -+ str = vbs_single(t, VBS_TRANSACTION_END, "", NULL); -+ if (IS_ERR(str)) -+ BUG(); -+ -+ DBG("Ending transaction ID: %d\n", t.id); -+ -+ if (str) -+ kfree(str); -+ -+ mutex_lock(&vbs_state.transaction_mutex); -+ vbs_state.transaction_count--; -+ if (vbs_state.transaction_count == 0) -+ mutex_unlock(&vbs_state.transaction_group_mutex); -+ mutex_unlock(&vbs_state.transaction_mutex); -+} -+ -+/* Single read and scanf: returns -errno or num scanned. */ -+int vbus_scanf(struct vbus_transaction t, const char *dir, -+ const char *node, const char *fmt, ...) -+{ -+ va_list ap; -+ int ret; -+ char *val; -+ -+ DBG("%s(%s, %s)\n", __func__, dir, node); -+ -+ val = vbus_read(t, dir, node, NULL); -+ if (IS_ERR(val)) -+ return PTR_ERR(val); -+ -+ va_start(ap, fmt); -+ ret = vsscanf(val, fmt, ap); -+ va_end(ap); -+ -+ kfree(val); -+ -+ /* Distinctive errno. */ -+ if (ret == 0) { -+ lprintk("%s: ret=0 for %s, %s\n", __func__, dir, node); -+ BUG(); -+ } -+ -+ return ret; -+} -+EXPORT_SYMBOL_GPL(vbus_scanf); -+ -+/* Single printf and write: returns -errno or 0. */ -+void vbus_printf(struct vbus_transaction t, const char *dir, -+ const char *node, const char *fmt, ...) -+{ -+ va_list ap; -+ int ret; -+#define PRINTF_BUFFER_SIZE 4096 -+ char *printf_buffer; -+ -+ printf_buffer = kmalloc(PRINTF_BUFFER_SIZE, GFP_ATOMIC); -+ if (printf_buffer == NULL) -+ BUG(); -+ -+ va_start(ap, fmt); -+ ret = vsnprintf(printf_buffer, PRINTF_BUFFER_SIZE, fmt, ap); -+ va_end(ap); -+ -+ BUG_ON(ret > PRINTF_BUFFER_SIZE-1); -+ -+ vbus_write(t, dir, node, printf_buffer); -+ kfree(printf_buffer); -+} -+ -+/* Takes tuples of names, scanf-style args, and void **, NULL terminated. */ -+bool vbus_gather(struct vbus_transaction t, const char *dir, ...) -+{ -+ va_list ap; -+ const char *name; -+ -+ va_start(ap, dir); -+ while ((name = va_arg(ap, char *)) != NULL) { -+ const char *fmt = va_arg(ap, char *); -+ void *result = va_arg(ap, void *); -+ char *p; -+ -+ p = vbus_read(t, dir, name, NULL); -+ if (IS_ERR(p)) -+ BUG(); -+ -+ /* Case if len == 0, meaning that the entry has not been found in vbstore for instance. */ -+ if (!strlen(p)) -+ return false; -+ -+ if (sscanf(p, fmt, result) == 0) -+ BUG(); -+ -+ kfree(p); -+ } -+ va_end(ap); -+ -+ return true; -+} -+ -+static void vbs_watch(const char *path) -+{ -+ msgvec_t vec[1]; -+ vec[0].base = (void *) path; -+ vec[0].len = strlen(path) + 1; -+ if (IS_ERR(vbs_talkv(VBT_NIL, VBS_WATCH, vec, ARRAY_SIZE(vec), NULL))) -+ BUG(); -+} -+ -+static void vbs_unwatch(const char *path) -+{ -+ msgvec_t vec[1]; -+ vec[0].base = (char *) path; -+ vec[0].len = strlen(path) + 1; -+ if (IS_ERR(vbs_talkv(VBT_NIL, VBS_UNWATCH, vec, ARRAY_SIZE(vec), NULL))) -+ BUG(); -+} -+ -+/* -+ * Look for an existing watch on a certain node (path). The first one is retrieved. -+ * Since there might be several watches with different callbacks and the same node, the -+ * first watch entry is returned. -+ */ -+static struct vbus_watch *find_first_watch(struct list_head *__watches, const char *node) -+{ -+ struct vbus_watch *__w; -+ list_for_each_entry(__w, __watches, list) -+ if (!strcmp(__w->node, node)) -+ return __w; -+ return NULL; -+} -+ -+/* -+ * Look for a precise watch in the list of watches. If the watch exists, it is returned (same pointer as the argument) -+ * or NULL if it does not exist. -+ */ -+static struct vbus_watch *get_watch(struct list_head *__watches, struct vbus_watch *w) -+{ -+ struct vbus_watch *__w; -+ list_for_each_entry(__w, __watches, list) -+ if (!strcmp(__w->node, w->node) && (__w->callback == w->callback)) -+ return __w; -+ return NULL; -+} -+ -+static void __register_vbus_watch(struct list_head *__watches, struct vbus_watch *watch) -+{ -+ unsigned long flags; -+ -+ /* A watch on a certain node with a certain callback has to be UNIQUE. */ -+ BUG_ON((get_watch(__watches, watch) != NULL)); -+ -+ if (!find_first_watch(__watches, watch->node)) -+ vbs_watch(watch->node); -+ else -+ BUG(); -+ -+ /* Prepare to update the list */ -+ -+ local_irq_save(flags); -+ watch->pending = false; -+ list_add(&watch->list, __watches); -+ local_irq_restore(flags); -+} -+ -+/* Register a watch on a vbstore node */ -+void register_vbus_watch(struct vbus_watch *watch) -+{ -+ __register_vbus_watch(&watches, watch); -+} -+EXPORT_SYMBOL_GPL(register_vbus_watch); -+ -+static void ____unregister_vbus_watch(struct list_head *__watches, -+ struct vbus_watch *watch, int vbus) -+{ -+ unsigned long flags; -+ -+ /* Prevent some undesired operations on the list */ -+ -+ local_irq_save(flags); -+ BUG_ON(!get_watch(__watches, watch)); -+ list_del(&watch->list); -+ -+ /* Check if we can remove the watch from vbstore if there is no associated watch -+ * (with the corresponding node name). -+ */ -+ if (vbus && !find_first_watch(__watches, watch->node)) { -+ local_irq_restore(flags); -+ vbs_unwatch(watch->node); -+ } else -+ local_irq_restore(flags); -+} -+ -+static void __unregister_vbus_watch(struct vbus_watch *watch, int vbus) -+{ -+ ____unregister_vbus_watch(&watches, watch, vbus); -+} -+ -+void unregister_vbus_watch(struct vbus_watch *watch) -+{ -+ __unregister_vbus_watch(watch, 1); -+} -+ -+void unregister_vbus_watch_without_vbus(struct vbus_watch *watch) -+{ -+ __unregister_vbus_watch(watch, 0); -+} -+ -+/* -+ * Main threaded function to monitor watches on vbstore entries. Various callbacks can be associated to an event path which is notified -+ * by an event message. The pair has to be unique. -+ * -+ * The following conditions are handled: -+ * -+ * IRQs are disabled during manipulations on event message and watch list. Interrupt routine could be executed during a callback operation and -+ * some processed event messages may be removed. -+ * -+ * Secondly, a callback operation might decide to unregister some watches. The watch list has to remain consistent as well. -+ * -+ */ -+static int vbus_watch_thread(void *unused) -+{ -+ struct vbus_watch *__w; -+ bool found; -+ int ret; -+ -+ for (;;) { -+ /* Use interruptible version to avoid blocked task message every 120 seconds */ -+ ret = wait_for_completion_interruptible(&vbs_state.watch_wait); -+ if (ret == -ERESTARTSYS) { -+ pr_warn("%s wait_for_completion has been interrupted, ignoring\n", __func__); -+ continue; -+ } -+ -+ /* Avoiding to be suspended during SOO callback processing... */ -+ mutex_lock(&vbs_state.watch_mutex); -+ -+ do { -+ found = false; -+ list_for_each_entry(__w, &watches, list) { -+ -+ /* Is the watch is pending ? */ -+ if (__w->pending) { -+ found = true; -+ __w->pending = false; -+ -+ /* Execute the watch handler */ -+ __w->callback(__w); -+ -+ /* We go out of loop since a callback operation could manipulate the watch list */ -+ break; -+ } -+ } -+ } while (found); -+ -+ mutex_unlock(&vbs_state.watch_mutex); -+ } -+ -+ return 0; -+} -+ -+static irqreturn_t vbus_vbstore_isr(int irq, void *unused) -+{ -+ vbus_msg_t *msg, *orig_msg, *orig_msg_tmp; -+ struct vbus_watch *__w; -+ bool found; -+ -+ DBG("IRQ: %d intf: %lx req_cons: %d req_prod: %d\n", -+ irq, __intf, __intf->req_cons, __intf->req_prod); -+ DBG("IRQ: %d intf: %lx rsp_cons: %d rsp_prod: %d\n", -+ irq, __intf, __intf->rsp_cons, __intf->rsp_prod); -+ -+ BUG_ON(!irqs_disabled()); -+ -+ while (__intf->rsp_cons != __intf->rsp_prod) { -+ -+ msg = kzalloc(sizeof(vbus_msg_t), GFP_ATOMIC); -+ if (msg == NULL) -+ BUG(); -+ -+ memset(msg, 0, sizeof(vbus_msg_t)); -+ -+ /* Read the vbus_msg to process */ -+ vbs_read(msg, sizeof(vbus_msg_t)); -+ -+ if (msg->len > 0) { -+ msg->payload = kzalloc(msg->len, GFP_ATOMIC); -+ BUG_ON(!msg->payload); -+ memset(msg->payload, 0, msg->len); -+ vbs_read(msg->payload, msg->len); -+ } else -+ /* Override previous value */ -+ msg->payload = NULL; -+ -+ if (msg->type == VBS_WATCH_EVENT) { -+ found = false; -+ list_for_each_entry(__w, &watches, list) { -+ if (!strcmp(__w->node, msg->payload)) { -+ __w->pending = true; -+ found = true; -+ mb(); -+ } -+ } -+ if (found) -+ complete(&vbs_state.watch_wait); -+ -+ kfree(msg->payload); -+ kfree(msg); -+ } else { -+ -+ /* Look for the peer vbus_msg which did the request */ -+ found = false; -+ -+ list_for_each_entry_safe(orig_msg, orig_msg_tmp, -+ &vbus_msg_standby_list, list) { -+ if (orig_msg->id == msg->id) { -+ list_del(&orig_msg->list); /* Remove this message from the standby list */ -+ -+ found = true; -+ orig_msg->reply = msg; -+ mb(); -+ -+ /* Wake up the thread waiting for the answer */ -+ complete(orig_msg->reply_wait); -+ -+ break; /* Ending the search loop */ -+ } -+ } -+ -+ if (!found) /* A pending message MUST exist */ -+ BUG(); -+ } -+ } -+ -+ BUG_ON(!irqs_disabled()); -+ -+ return IRQ_HANDLED; -+} -+ -+static void vbs_dump_walk(char *nodename) -+{ -+ char **dir; -+ unsigned int i, dir_n = 0; -+ int ret; -+ char _local[80]; -+ char val[20]; -+ char *msg = val; -+ -+ dir = vbus_directory(VBT_NIL, nodename, "", &dir_n); -+ -+ for (i = 0; i < dir_n; i++) { -+ strcpy(_local, nodename); -+ if (strcmp(_local, "/")) -+ strcat(_local, "/"); -+ strcat(_local, dir[i]); -+ -+ ret = vbs_store_read(_local, &msg, 20); -+ lprintk("%s ", _local); -+ -+ if (ret) -+ printk("= %s", msg); -+ lprintk("\n"); -+ vbs_dump_walk(_local); -+ } -+ -+ kfree(dir); -+} -+ -+void vbs_dump(void) -+{ -+ lprintk("----------- VBstore dump --------------\n"); -+ vbs_dump_walk("/"); -+ lprintk("--------------- end --------------------\n"); -+} -+ -+int vbus_vbstore_init(void) -+{ -+ struct task_struct *task; -+ struct vbus_device dev; -+ struct sched_param param; -+ int vbus_irq; -+ -+ /* -+ * Bind evtchn for interdomain communication: must be executed from the agency or from a ME. -+ */ -+ -+ /* dev temporary used to set up event channel used by vbstore. */ -+ -+ dev.otherend_id = 0; -+ DBG("%s: binding a local event channel to the remote evtchn %d in Agency. ...\n", -+ __func__, avz_shared->dom_desc.u.agency.vbstore_evtchn[DOMID_AGENCY]); -+ -+ vbus_bind_evtchn(&dev, avz_shared->dom_desc.u.agency.vbstore_evtchn[DOMID_AGENCY], -+ (uint32_t *) &avz_shared->dom_desc.u.agency.vbstore_levtchn); -+ -+ DBG("Local vbstore_evtchn is %d (remote is %d)\n", -+ avz_shared->dom_desc.u.agency.vbstore_levtchn, -+ avz_shared->dom_desc.u.agency.vbstore_evtchn[DOMID_AGENCY]); -+ -+ INIT_LIST_HEAD(&vbs_state.reply_list); -+ -+ mutex_init(&vbs_state.request_mutex); -+ mutex_init(&vbs_state.transaction_mutex); -+ mutex_init(&vbs_state.watch_mutex); -+ mutex_init(&vbs_state.transaction_group_mutex); -+ -+ spin_lock_init(&vbs_state.msg_list_lock); -+ -+ vbs_state.transaction_count = 0; -+ init_completion(&vbs_state.watch_wait); -+ -+ vbus_irq = bind_evtchn_to_virq_handler( -+ avz_shared->dom_desc.u.agency.vbstore_levtchn, -+ vbus_vbstore_isr, NULL, IRQF_DISABLED, "vbus_vbstore", NULL); -+ if (vbus_irq <= 0) { -+ lprintk(KERN_ERR "VBus request irq failed %i\n", vbus_irq); -+ BUG(); -+ } -+ -+ task = kthread_run(vbus_watch_thread, NULL, "vbswatch"); -+ if (IS_ERR(task)) -+ return PTR_ERR(task); -+ -+ param.sched_priority = 60; -+ sched_setscheduler_nocheck(task, SCHED_FIFO, ¶m); -+ -+ lprintk("%s: done.\n", __func__); -+ -+ return 0; -+} diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0097-ctype.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0097-ctype.c.patch deleted file mode 100644 index 35e755a..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0097-ctype.c.patch +++ /dev/null @@ -1,68 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/ctype.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/ctype.c 2026-03-13 13:24:35.604885869 +0100 -@@ -0,0 +1,65 @@ -+ -+#include -+ -+#include -+ -+int __isalpha(int c) -+{ -+ return isalpha(c); -+} -+ -+int __isdigit(int c) -+{ -+ return isdigit(c); -+} -+ -+int __isalnum(int c) -+{ -+ return isalnum(c); -+} -+ -+int isblank(int c) -+{ -+ return (c == ' ' || c == '\t'); -+} -+ -+int __iscntrl(int c) -+{ -+ return iscntrl(c); -+} -+ -+int __isgraph(int c) -+{ -+ return isgraph(c); -+} -+ -+int __islower(int c) -+{ -+ return islower(c); -+} -+ -+int __isprint(int c) -+{ -+ return isprint(c); -+} -+ -+int __ispunct(int c) -+{ -+ return ispunct(c); -+} -+ -+int __isspace(int c) -+{ -+ return isspace(c); -+} -+ -+int __isupper(int c) -+{ -+ return isupper(c); -+} -+ -+int __isxdigit(int c) -+{ -+ return isxdigit(c); -+} -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0098-config.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0098-config.h.patch deleted file mode 100644 index 51820e6..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0098-config.h.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/libroxml/config.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/libroxml/config.h 2026-03-13 13:24:35.604514034 +0100 -@@ -0,0 +1,26 @@ -+ -+#ifndef LIBROXML_CONFIG_H -+#define LIBROXML_CONFIG_H -+ -+#define CONFIG_XML_THREAD_SAFE 1 -+#define CONFIG_XML_SMALL_INPUT_FILE 1 -+ -+#define CONFIG_XML_FLOAT 1 -+#define CONFIG_XML_SMALL_BUFFER 1 -+ -+#define FILE int -+ -+#define fopen(...) (0); -+#define fdopen(...) (0); -+#define fwrite(...) do { } while(0); -+#define fflush(...) do { } while(0); -+#define fseek(...) (0) -+#define ftell(...) (0) -+#define fread(...) (0) -+#define fwrite(...) do { } while(0); -+#define fclose(...) do { } while(0); -+#define dup(...) (0); -+#define vfprintf(...) do { } while(0); -+ -+#endif /* LIBROXML_CONFIG_H */ -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0099-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0099-Makefile.patch deleted file mode 100644 index 7a38f03..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0099-Makefile.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/libroxml/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/libroxml/Makefile 2026-03-13 13:24:35.604679267 +0100 -@@ -0,0 +1,12 @@ -+obj-y += roxml_buff.o roxml_commit.o roxml_content.o -+obj-y += roxml_core.o roxml_edit.o roxml_mem.o roxml_nav.o -+obj-y += roxml_parser.o roxml_xpath.o roxml_file.o -+ -+ifeq ($(ARCH),arm) -+ -+CFLAGS_roxml_xpath.o += -march=armv7-a -mfpu=neon -mfloat-abi=softfp -+else ifeq ($(ARCH),arm64) -+ -+CFLAGS_REMOVE_roxml_xpath.o = -mgeneral-regs-only -+ -+endif diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0100-roxml_buff.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0100-roxml_buff.c.patch deleted file mode 100644 index 4a1e52e..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0100-roxml_buff.c.patch +++ /dev/null @@ -1,62 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/libroxml/roxml_buff.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/libroxml/roxml_buff.c 2026-03-13 13:24:35.604665947 +0100 -@@ -0,0 +1,59 @@ -+/** -+ * \file roxml_buff.c -+ * \brief buffer XML document backend -+ * -+ * (C) Copyright 2014 -+ * Tristan Lelong -+ * -+ * SPDX-Licence-Identifier: LGPL-2.1+ -+ * The author added a static linking exception, see License.txt. -+ */ -+ -+#include "roxml_core.h" -+#include "roxml_parser.h" -+#include "roxml_internal.h" -+#include "roxml_buff.h" -+ -+ROXML_INT int roxml_read_buff(int pos, int size, char *buffer, node_t *node) -+{ -+ int ret_len = 0; -+ char *r1 = buffer; -+ char const *r2 = node->src.buf + pos; -+ -+ while (size-- && (*r1++ = *r2++)) ; -+ -+ ret_len = r1 - buffer; -+ -+ return ret_len; -+} -+ -+ROXML_INT void roxml_close_buff(node_t *n) -+{ -+ return; -+} -+ -+ROXML_INT int roxml_parse_buff(roxml_load_ctx_t *context, roxml_parser_item_t *parser, char *buffer) -+{ -+ int ret = 0; -+ -+ context->type = ROXML_BUFF; -+ context->src = (void *)buffer; -+ ret = roxml_parse_line(parser, buffer, 0, context); -+ -+ if (ret >= 0 && context->lvl != 0) -+ ROXML_PARSE_ERROR("mismatch in open/close nodes"); -+ return (ret < 0) ? 1 : 0; -+} -+ -+ROXML_API node_t *roxml_load_buf(char *buffer) -+{ -+ node_t *current_node = NULL; -+ if (buffer == NULL) { -+ errno = ENODATA; -+ return NULL; -+ } -+ -+ current_node = roxml_create_node(0, buffer, ROXML_ELM_NODE | ROXML_BUFF); -+ -+ return roxml_load(current_node, NULL, buffer); -+} diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0101-roxml_buff.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0101-roxml_buff.h.patch deleted file mode 100644 index 7105796..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0101-roxml_buff.h.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/libroxml/roxml_buff.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/libroxml/roxml_buff.h 2026-03-13 13:24:35.604609223 +0100 -@@ -0,0 +1,49 @@ -+/** -+ * \file roxml_buff.h -+ * \brief buffer XML document backend -+ * -+ * (C) Copyright 2014 -+ * Tristan Lelong -+ * -+ * SPDX-Licence-Identifier: LGPL-2.1+ -+ * The author added a static linking exception, see License.txt. -+ */ -+ -+#ifndef ROXML_BUFF_H -+#define ROXML_BUFF_H -+ -+/** \brief read xml doc function -+ * -+ * \fn roxml_read_buff(int pos, int size, char * buffer, node_t *node) -+ * this function read inside a xml buffer and fill the given buffer -+ * \param pos the pos in the xml document -+ * \param size the size of the data to read -+ * \param buffer the destination buffer -+ * \param node the node that belong to the tree we want to read to -+ * \return the number of bytes read -+ */ -+ROXML_INT int roxml_read_buff(int pos, int size, char *buffer, node_t *node); -+ -+/** \brief unload function -+ * -+ * \fn void roxml_close_buff(node_t *n); -+ * This function clear a document that was opened as part of a buffer -+ * \param n is any node of the tree to be cleaned -+ * \return void -+ */ -+ROXML_INT void roxml_close_buff(node_t *n); -+ -+/** \brief generic load function -+ * -+ * \fn node_t* roxml_parse_buff(roxml_load_ctx_t *context, roxml_parser_item_t *parser, char *buffer); -+ * This function parse a buffer document and all the corresponding nodes -+ * \param context internal data used for parsing -+ * \param parser the parser object to run -+ * \param buffer address of buffer that contains xml -+ * \return an error code and filled context -+ * see roxml_close_buff -+ */ -+ROXML_INT int roxml_parse_buff(roxml_load_ctx_t *context, roxml_parser_item_t *parser, char *buffer); -+ -+#endif /* ROXML_BUFF_H */ -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0102-roxml_commit.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0102-roxml_commit.c.patch deleted file mode 100644 index 07782f1..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0102-roxml_commit.c.patch +++ /dev/null @@ -1,369 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/libroxml/roxml_commit.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/libroxml/roxml_commit.c 2026-03-13 13:24:35.604693622 +0100 -@@ -0,0 +1,366 @@ -+/** -+ * \file roxml_commit.c -+ * \brief XML serialize to file or buffer module -+ * -+ * (C) Copyright 2014 -+ * Tristan Lelong -+ * -+ * SPDX-Licence-Identifier: LGPL-2.1+ -+ * The author added a static linking exception, see License.txt. -+ */ -+ -+#include -+#include -+#include -+ -+#include "roxml_core.h" -+ -+/* SOO.tech */ -+ -+ROXML_STATIC ROXML_INT void roxml_realloc_buf(char **buf, int *len, int min_len) -+{ -+ int append = (min_len | (ROXML_BASE_LEN - 1)) + 1; -+ *buf = krealloc(*buf, *len + append, GFP_KERNEL); -+ memset(*buf + *len, 0, append); -+ *len += append; -+} -+ -+/** \brief space printing function -+ * -+ * \fn roxml_print_spaces(FILE *f, char ** buf, int * offset, int * len, int lvl); -+ * this function add some space to output when committing change in human format -+ * \param f the file pointer if any -+ * \param buf the pointer to string if any -+ * \param offset the current offset in stream -+ * \param len the total len of buffer if any -+ * \param lvl the level in the tree -+ * \return -+ */ -+ROXML_STATIC ROXML_INT void roxml_print_spaces(FILE *f, char **buf, int *offset, int *len, int lvl) -+{ -+ int i; -+ -+ if (f) { -+ if ((*offset)++ > 0) -+ fwrite("\n", 1, 1, f); -+ for (i = 0; i < lvl; i++) -+ fwrite(" ", 1, 1, f); -+ } else if (buf && *buf) { -+ if (*offset + lvl + 1 >= *len) -+ roxml_realloc_buf(buf, len, lvl); -+ if (*offset > 0) -+ *(*buf + (*offset)++) = '\n'; -+ for (i = 0; i < lvl; i++) -+ *(*buf + (*offset)++) = ' '; -+ } -+} -+ -+/** \brief string writter function -+ * -+ * \fn void roxml_write_string(FILE *f, char **buf, int *offset, int *len, char *str, ...); -+ * this function write a string to output when committing change -+ * \param f the file pointer if any -+ * \param buf the pointer to string if any -+ * \param str the string to write -+ * \param offset the current offset in stream -+ * \param len the total len of buffer if any -+ * \return -+ */ -+ROXML_STATIC ROXML_INT void roxml_write_string(FILE *f, char **buf, int *offset, int *len, char *str, ...) -+{ -+ va_list args; -+ int min_len; -+ -+ va_start(args, str); -+ min_len = vsnprintf(NULL, 0, str, args); -+ va_end(args); -+ -+ va_start(args, str); -+ -+ if (f) { -+ vfprintf(f, str, args); -+ } else if (buf && *buf) { -+ if (*offset + min_len >= *len) -+ roxml_realloc_buf(buf, len, min_len); -+ *offset += vsprintf(*buf + *offset, str, args); -+ } -+ -+ va_end(args); -+} -+ -+ROXML_STATIC ROXML_INT void roxml_write_other_node(node_t *n, FILE *f, char **buf, int *offset, int *len, char *name) -+{ -+ char *value; -+ int status; -+ char head[8] = "\0"; -+ char tail[8] = "\0"; -+ char cdata_head[16] = "\0"; -+ char cdata_tail[8] = "\0"; -+ -+ ROXML_GET_BASE_BUFFER(val); -+ -+ if ((n->type & ROXML_NODE_TYPES) == ROXML_CMT_NODE) { -+ strcpy(head, ""); -+ } else if ((n->type & ROXML_NODE_TYPES) == ROXML_DOCTYPE_NODE) { -+ strcpy(head, "<"); -+ strcpy(tail, ">"); -+ } else if ((n->type & ROXML_NODE_TYPES) == ROXML_PI_NODE) { -+ strcpy(head, ""); -+ } -+ -+ value = roxml_get_content(n, val, ROXML_BASE_LEN, &status); -+ if (status >= ROXML_BASE_LEN) -+ value = roxml_get_content(n, NULL, 0, &status); -+ -+ if ((n->type & ROXML_CDATA_NODE) == ROXML_CDATA_NODE) { -+ strcpy(cdata_head, ""); -+ } -+ -+ roxml_write_string(f, buf, offset, len, "%s%s%s%s%s%s%s", head, -+ name[0] ? name : "", name[0] ? " " : "", cdata_head, value, cdata_tail, tail); -+ roxml_release(value); -+ -+ ROXML_PUT_BASE_BUFFER(val); -+} -+ -+ROXML_STATIC ROXML_INT void roxml_write_elm_name_open(node_t *n, FILE *f, char **buf, int *offset, int *len, -+ char *name, char *ns) -+{ -+ if (!n->prnt) -+ return; -+ -+ if (n->ns) -+ roxml_get_name(n->ns, ns, ROXML_BASE_LEN); -+ else -+ ns[0] = '\0'; -+ -+ roxml_write_string(f, buf, offset, len, "<%s%s%s", ns[0] ? ns : "", ns[0] ? ":" : "", name); -+} -+ -+ROXML_STATIC ROXML_INT void roxml_write_elm_name_close(node_t *n, FILE *f, char **buf, int *offset, int *len, -+ char *name, char *ns) -+{ -+ char head[8] = "\0"; -+ char tail[8] = "/>"; -+ -+ if (n->chld) { -+ strcpy(head, ""); -+ } -+ -+ roxml_write_string(f, buf, offset, len, "%s%s%s%s%s", head, -+ n->chld && ns[0] ? ns : "", n->chld && ns[0] ? ":" : "", n->chld ? name : "", tail); -+} -+ -+ROXML_STATIC ROXML_INT void roxml_write_elm_attr(node_t *n, FILE *f, char **buf, int *offset, int *len) -+{ -+ node_t *attr = n->attr; -+ -+ while (attr) { -+ int ns_node_attr = attr->type & ROXML_NS_NODE; -+ int status = 0; -+ char arg[ROXML_BASE_LEN]; -+ char val[ROXML_BASE_LEN]; -+ char *value; -+ -+ ROXML_GET_BASE_BUFFER(ns); -+ -+ roxml_get_name(attr, arg, ROXML_BASE_LEN); -+ -+ value = roxml_get_content(attr, val, ROXML_BASE_LEN, &status); -+ if (status >= ROXML_BASE_LEN) -+ value = roxml_get_content(attr, NULL, 0, &status); -+ -+ if (attr->ns) -+ roxml_get_name(attr->ns, ns, ROXML_BASE_LEN); -+ -+ roxml_write_string(f, buf, offset, len, " %s%s%s%s%s=\"%s\"", -+ ns_node_attr ? "xmlns" : "", -+ ns_node_attr && arg[0] ? ":" : "", -+ attr->ns ? ns : "", attr->ns ? ":" : "", arg, value); -+ -+ attr = attr->sibl; -+ roxml_release(value); -+ -+ ROXML_PUT_BASE_BUFFER(ns); -+ } -+} -+ -+/** \brief tree write function -+ * -+ * \fn roxml_write_node(node_t *n, FILE *f, char ** buf, int human, int lvl, int *offset, int *len); -+ * this function write each node of the tree to output -+ * \param n the node to write -+ * \param f the file pointer if any -+ * \param buf the pointer to the buffer string if any -+ * \param human 1 to use the human format else 0 -+ * \param lvl the current level in tree -+ * \param offset the current offset in stream -+ * \param len the total len of buffer if any -+ * \return -+ */ -+ROXML_STATIC ROXML_INT void roxml_write_node(node_t *n, FILE *f, char **buf, int human, int lvl, int *offset, int *len) -+{ -+ ROXML_GET_BASE_BUFFER(name); -+ roxml_get_name(n, name, ROXML_BASE_LEN); -+ -+ if (n->type & ROXML_ELM_NODE) { -+ ROXML_GET_BASE_BUFFER(ns); -+ node_t *chld = n->chld; -+ -+ if (human) -+ roxml_print_spaces(f, buf, offset, len, lvl); -+ roxml_write_elm_name_open(n, f, buf, offset, len, name, ns); -+ roxml_write_elm_attr(n, f, buf, offset, len); -+ -+ if (chld) { -+ node_t *prev = chld; -+ -+ roxml_write_string(f, buf, offset, len, ">"); -+ -+ while (chld) { -+ int keep_human = human; -+ -+ if ((chld->type | prev->type) & ROXML_TXT_NODE) -+ keep_human = 0; -+ -+ roxml_write_node(chld, f, buf, keep_human, lvl + 1, offset, len); -+ -+ prev = chld; -+ chld = chld->sibl; -+ -+ } -+ if (human && !(prev->type & ROXML_TXT_NODE)) -+ roxml_print_spaces(f, buf, offset, len, lvl); -+ } -+ -+ roxml_write_elm_name_close(n, f, buf, offset, len, name, ns); -+ ROXML_PUT_BASE_BUFFER(ns); -+ } else { -+ if (human) -+ roxml_print_spaces(f, buf, offset, len, lvl); -+ roxml_write_other_node(n, f, buf, offset, len, name); -+ } -+ -+ ROXML_PUT_BASE_BUFFER(name); -+} -+ -+ROXML_STATIC ROXML_INT void roxml_commit_nodes(node_t *n, FILE *f, char **buf, int human, int *size, int *len) -+{ -+ node_t fakeroot; -+ -+ if (n->prnt == NULL) { -+ /* Get the first child since we do not write the docroot */ -+ n = n->chld; -+ } else if (n->prnt->prnt == NULL) { -+ /* Get the first sibling since it might be a PI */ -+ n = n->prnt->chld; -+ } else { -+ /* The root is a subtree: simulate a real root */ -+ memcpy(&fakeroot, n, sizeof(node_t)); -+ fakeroot.sibl = NULL; -+ n = &fakeroot; -+ } -+ -+ while (n) { -+ roxml_write_node(n, f, buf, human, 0, size, len); -+ n = n->sibl; -+ } -+} -+ -+ROXML_API int roxml_commit_file(node_t *n, char *dest, int human) -+{ -+ FILE *fout; -+ int size = 0; -+ int len = ROXML_BASE_LEN; -+ -+ if (n == ROXML_INVALID_DOC) -+ return 0; -+ -+ if (!dest) -+ return 0; -+ -+ fout = fopen(dest, "w"); -+ if (!fout) -+ return 0; -+ -+ roxml_commit_nodes(n, fout, NULL, human, &size, &len); -+ -+ size = ftell(fout); -+ fclose(fout); -+ -+ return size; -+} -+ -+ROXML_API int roxml_commit_buffer(node_t *n, char **buffer, int human) -+{ -+ int size = 0; -+ int len = ROXML_BASE_LEN; -+ -+ if (n == ROXML_INVALID_DOC) -+ return 0; -+ -+ if (!buffer) -+ return 0; -+ -+ *buffer = kmalloc(ROXML_BASE_LEN, GFP_KERNEL); -+ if (!*buffer) -+ return 0; -+ memset(*buffer, 0, ROXML_BASE_LEN); -+ -+ roxml_commit_nodes(n, NULL, buffer, human, &size, &len); -+ -+ return size; -+} -+ -+ROXML_API int roxml_commit_fd(node_t *n, int fd, int human) -+{ -+ int fd2; -+ FILE *fout; -+ int size = 0; -+ int len = ROXML_BASE_LEN; -+ -+ if (n == ROXML_INVALID_DOC) -+ return 0; -+ -+ if (fd <= 0) -+ return 0; -+ -+ /* in order to avoid accidental close of fd, we need dup() it */ -+ fd2 = dup(fd); -+ if (fd2 < 0) -+ return 0; -+ -+ /* -+ * fdopen(fd, "w") does not truncate the file - so the user -+ * must have called ftruncate() before calling this function -+ * if needed ; otherwise, data will be appended to the file. -+ */ -+ -+ fout = fdopen(fd2, "w"); -+ if (!fout) -+ return 0; -+ -+ roxml_commit_nodes(n, fout, NULL, human, &size, &len); -+ -+ /* since we pass a fd to this function, we expect it to not be -+ * buffered, so flush everything before doing anything else */ -+ fflush(fout); -+ -+ size = ftell(fout); -+ fclose(fout); -+ -+ return size; -+} -+ -+ROXML_API int roxml_commit_changes(node_t *n, char *dest, char **buffer, int human) -+{ -+ if (dest) -+ return roxml_commit_file(n, dest, human); -+ else if (buffer) -+ return roxml_commit_buffer(n, buffer, human); -+ return 0; -+} diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0103-roxml_content.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0103-roxml_content.c.patch deleted file mode 100644 index e7cf03f..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0103-roxml_content.c.patch +++ /dev/null @@ -1,496 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/libroxml/roxml_content.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/libroxml/roxml_content.c 2026-03-13 13:24:35.604745157 +0100 -@@ -0,0 +1,493 @@ -+/** -+ * \file roxml_content.c -+ * \brief XML content access module -+ * -+ * (C) Copyright 2014 -+ * Tristan Lelong -+ * -+ * SPDX-Licence-Identifier: LGPL-2.1+ -+ * The author added a static linking exception, see License.txt. -+ */ -+ -+#include -+ -+#include "roxml_mem.h" -+#include "roxml_file.h" -+#include "roxml_buff.h" -+ -+struct roxml_escape_char { -+ char code; -+ char *escape; -+}; -+ -+struct roxml_escape_char specials[5] = { -+ { .code = '"', .escape = """ }, -+ { .code = '\'', .escape = "'" }, -+ { .code = '<', .escape = "<"}, -+ { .code = '>', .escape = ">"}, -+ { .code = '&', .escape = "&"} -+}; -+ -+ROXML_API int roxml_escape(const char *buf, int decode, char *out) -+{ -+ size_t i = 0; -+ size_t l = 0; -+ for (; i < strlen(buf); ) { -+ int s = 0; -+ for (; s < 5; s++) { -+ if (decode && (strncmp(specials[s].escape, buf+i, strlen(specials[s].escape)) == 0)) { -+ if (out) -+ out[l] = specials[s].code; -+ l += 1; -+ i += strlen(specials[s].escape); -+ break; -+ } else if (!decode && (buf[i] == specials[s].code)) { -+ if (out) -+ strcpy(out+l, specials[s].escape); -+ l += strlen(specials[s].escape); -+ i += 1; -+ break; -+ } -+ } -+ if (s == 5) { -+ if (out) -+ out[l] = buf[i]; -+ l += 1; -+ i += 1; -+ } -+ } -+ if (out) -+ out[l] = '\0'; -+ return l; -+} -+ -+/** \brief read xml doc function -+ * -+ * \fn roxml_read(int pos, int size, char * buffer, node_t *node) -+ * this function read inside a xml doc (file or buffer) and fill the given buffer -+ * \param pos the pos in the xml document -+ * \param size the size of the data to read -+ * \param buffer the destination buffer -+ * \param node the node that belong to the tree we want to read to -+ * \return the number of bytes read -+ */ -+ROXML_STATIC ROXML_INT inline int roxml_read(int pos, int size, char *buffer, node_t *node) -+{ -+ int len = 0; -+ -+ if (size > 0 && buffer) { -+ if (node->type & ROXML_FILE) -+ len = roxml_read_file(pos, size, buffer, node); -+ else -+ len = roxml_read_buff(pos, size, buffer, node); -+ } -+ -+ return len; -+} -+ -+ROXML_STATIC ROXML_INT inline int roxml_content_size(node_t *n, int *offset) -+{ -+ int total = 0; -+ -+ *offset = 0; -+ -+ if (!n) -+ return 0; -+ -+ if (n->type & ROXML_ELM_NODE) { -+ node_t *ptr = n->chld; -+ while (ptr) { -+ if ((ptr->type & ROXML_NODE_TYPES) == ROXML_TXT_NODE) -+ total += ptr->end - ptr->pos; -+ ptr = ptr->sibl; -+ } -+ } else if (n->type & ROXML_ATTR_NODE) { -+ if (n->chld) { -+ total = n->chld->end - n->chld->pos; -+ *offset = n->chld->pos; -+ } -+ } else { -+ int name_len = 0; -+ -+ ROXML_GET_BASE_BUFFER(name); -+ -+ roxml_get_name(n, name, ROXML_BASE_LEN); -+ name_len = strlen(name); -+ -+ ROXML_PUT_BASE_BUFFER(name); -+ -+ if (n->type & ROXML_DOCTYPE_NODE) -+ name_len += 2; -+ else if (n->type & ROXML_TXT_NODE) -+ name_len = 0; -+ else if (n->type & ROXML_CMT_NODE) -+ name_len = 4; -+ else if (n->type & ROXML_PI_NODE) -+ name_len += 3; -+ -+ total = n->end - n->pos - name_len; -+ *offset = n->pos + name_len; -+ } -+ return total; -+} -+ -+ROXML_STATIC ROXML_INT inline char *roxml_prepare_buffer(node_t *n, char *buffer, int contentsize, int size) -+{ -+ if (n == NULL) { -+ if (buffer) -+ memset(buffer, 0, size); -+ return NULL; -+ } -+ if (buffer == NULL) -+ buffer = roxml_malloc(sizeof(char), contentsize + 1, PTR_CHAR); -+ memset(buffer, 0, size); -+ -+ return buffer; -+} -+ -+ROXML_API char *roxml_get_content(node_t *n, char *buffer, int bufsize, int *size) -+{ -+ int total = 0; -+ int content_offset; -+ int content_size; -+ char *content; -+ -+ if (n == ROXML_INVALID_DOC) -+ return NULL; -+ -+ content_size = roxml_content_size(n, &content_offset); -+ content = roxml_prepare_buffer(n, buffer, content_size, bufsize); -+ -+ if (buffer != content) -+ bufsize = content_size + 1; -+ if (content_size > bufsize - 1) -+ content_size = bufsize - 1; -+ if (content == NULL) { -+ if (size) -+ *size = 0; -+ return buffer; -+ } -+ -+ if (n->type & ROXML_ELM_NODE) { -+ node_t *ptr = n->chld; -+ -+ while (ptr) { -+ if (ptr->type & ROXML_TXT_NODE) { -+ int len = 0; -+ int read_size = ptr->end - ptr->pos; -+ -+ if (total + read_size > bufsize - 1) -+ read_size = bufsize - total - 1; -+ len += roxml_read(ptr->pos, read_size, content + total, ptr); -+ -+ total += len; -+ } -+ ptr = ptr->sibl; -+ } -+ } else { -+ node_t *target = n; -+ if (n->type & ROXML_ATTR_NODE) -+ target = n->chld; -+ total = roxml_read(content_offset, content_size, content, target); -+ } -+ -+ content[total] = '\0'; -+ if (size) -+ *size = total + 1; -+ return content; -+} -+ -+ROXML_STATIC ROXML_INT inline int roxml_name_size(node_t *n, int size, int *offset) -+{ -+ int total = 0; -+ -+ *offset = 0; -+ -+ if (!n) -+ return 0; -+ -+ if ((n->type & ROXML_TXT_NODE) || (n->type & ROXML_CMT_NODE)) { -+ total = 0; -+ } else { -+ *offset = n->pos; -+ -+ if (n->type & ROXML_PI_NODE) -+ *offset += 2; -+ else if (n->type & ROXML_DOCTYPE_NODE) -+ *offset += 1; -+ -+ total = ROXML_BASE_LEN; -+ } -+ -+ return total; -+} -+ -+ROXML_API char *roxml_get_name(node_t *n, char *buffer, int size) -+{ -+ int content_offset; -+ int content_size; -+ char *content; -+ -+ if (n == ROXML_INVALID_DOC) -+ return NULL; -+ -+ content_size = roxml_name_size(n, size, &content_offset); -+ content = roxml_prepare_buffer(n, buffer, content_size, size); -+ -+ if (buffer != content) -+ size = content_size + 1; -+ if (content_size > size - 1) -+ content_size = size - 1; -+ if (content == NULL) -+ return buffer; -+ if (content_size == 0) -+ return content; -+ -+ memset(content, 0, content_size); -+ -+ if (n->prnt == NULL) { -+ strcpy(content, "documentRoot"); -+ } else if (n->type & ROXML_NS_NODE) { -+ roxml_ns_t *ns = (roxml_ns_t *)n->priv; -+ if (ns) -+ strncpy(content, ns->alias, size); -+ else -+ content[0] = '\0'; -+ } else { -+ int total = 0; -+ int count = 0; -+ char *begin = content; -+ -+ total = roxml_read(content_offset, content_size, content, n); -+ -+ while (ROXML_WHITE(begin[0]) || begin[0] == '<') -+ begin++; -+ -+ if (n->type & ROXML_PI_NODE) { -+ for (; count < total; count++) { -+ if (ROXML_WHITE(begin[count])) -+ break; -+ else if ((begin[count] == '?') && (begin[count + 1] == '>')) -+ break; -+ } -+ } else if (n->type & ROXML_ELM_NODE) { -+ for (; count < total; count++) { -+ if (ROXML_WHITE(begin[count])) -+ break; -+ else if ((begin[count] == '/') && (begin[count + 1] == '>')) -+ break; -+ else if (begin[count] == '>') -+ break; -+ } -+ } else if (n->type & ROXML_ATTR_NODE) { -+ for (; count < total; count++) { -+ if (ROXML_WHITE(begin[count])) -+ break; -+ else if (begin[count] == '=') -+ break; -+ else if (begin[count] == '>') -+ break; -+ else if ((begin[count] == '/') && (begin[count + 1] == '>')) -+ break; -+ } -+ } else if (n->type & ROXML_DOCTYPE_NODE) { -+ for (; count < total; count++) { -+ if (ROXML_WHITE(begin[count])) -+ break; -+ else if (begin[count] == '>') -+ break; -+ } -+ } -+ begin[count++] = '\0'; -+ memmove(content, begin, count); -+ } -+ -+ return content; -+} -+ -+ROXML_API int roxml_get_nodes_nb(node_t *n, int type) -+{ -+ node_t *ptr = n; -+ int nb; -+ -+ if (n == ROXML_INVALID_DOC) -+ return -1; -+ -+ nb = 0; -+ if (ptr->chld) { -+ ptr = ptr->chld; -+ do { -+ if (ptr->type & type) -+ nb++; -+ ptr = ptr->sibl; -+ } while (ptr); -+ } -+ -+ if (type & ROXML_ATTR_NODE) { -+ ptr = n->attr; -+ while (ptr) { -+ nb++; -+ ptr = ptr->sibl; -+ } -+ } -+ return nb; -+} -+ -+ROXML_STATIC ROXML_INT inline node_t *roxml_get_nodes_by_name(node_t *n, int type, char *name) -+{ -+ node_t *ptr; -+ -+ if (n->attr && (type & ROXML_ATTR_NODE)) -+ ptr = n->attr; -+ else -+ ptr = n->chld; -+ -+ while (ptr) { -+ if ((ptr->type & ROXML_NODE_TYPES) & type) { -+ int ans = strcmp(roxml_get_name(ptr, NULL, 0), name); -+ roxml_release(RELEASE_LAST); -+ if (ans == 0) -+ return ptr; -+ } -+ ptr = ptr->sibl; -+ } -+ return NULL; -+} -+ -+ROXML_STATIC ROXML_INT inline node_t *roxml_get_nodes_by_nth(node_t *n, int type, int nth) -+{ -+ node_t *ptr; -+ int count = 0; -+ -+ if (n->ns && (type & ROXML_NS_NODE)) { -+ ptr = n->ns; -+ if (nth == 0) -+ return ptr; -+ } else if (n->attr && (type & ROXML_ATTR_NODE)) { -+ ptr = n->attr; -+ if (nth == 0) -+ return ptr; -+ while ((ptr->sibl) && (nth > count)) { -+ ptr = ptr->sibl; -+ count++; -+ } -+ } else { -+ ptr = n->chld; -+ while (ptr && !((ptr->type & ROXML_NODE_TYPES) & type)) -+ ptr = ptr->sibl; -+ } -+ if (nth > count) { -+ ptr = n->chld; -+ while (ptr && !((ptr->type & ROXML_NODE_TYPES) & type)) -+ ptr = ptr->sibl; -+ while (ptr && (ptr->sibl) && (nth > count)) { -+ ptr = ptr->sibl; -+ if ((ptr->type & ROXML_NODE_TYPES) & type) -+ count++; -+ } -+ } -+ if (nth > count) -+ return NULL; -+ return ptr; -+} -+ -+ROXML_API node_t *roxml_get_nodes(node_t *n, int type, char *name, int nth) -+{ -+ if (n == ROXML_INVALID_DOC) -+ return ROXML_INVALID_DOC; -+ else if (name == NULL) -+ return roxml_get_nodes_by_nth(n, type, nth); -+ else -+ return roxml_get_nodes_by_name(n, type, name); -+} -+ -+ROXML_API inline node_t *roxml_get_ns(node_t *n) -+{ -+ return roxml_get_nodes(n, ROXML_NS_NODE, NULL, 0); -+} -+ -+ROXML_API inline int roxml_get_pi_nb(node_t *n) -+{ -+ return roxml_get_nodes_nb(n, ROXML_PI_NODE); -+} -+ -+ROXML_API inline node_t *roxml_get_pi(node_t *n, int nth) -+{ -+ return roxml_get_nodes(n, ROXML_PI_NODE, NULL, nth); -+} -+ -+ROXML_API inline int roxml_get_cmt_nb(node_t *n) -+{ -+ return roxml_get_nodes_nb(n, ROXML_CMT_NODE); -+} -+ -+ROXML_API inline node_t *roxml_get_cmt(node_t *n, int nth) -+{ -+ return roxml_get_nodes(n, ROXML_CMT_NODE, NULL, nth); -+} -+ -+ROXML_API inline int roxml_get_txt_nb(node_t *n) -+{ -+ return roxml_get_nodes_nb(n, ROXML_TXT_NODE); -+} -+ -+ROXML_API inline node_t *roxml_get_txt(node_t *n, int nth) -+{ -+ return roxml_get_nodes(n, ROXML_TXT_NODE, NULL, nth); -+} -+ -+ROXML_API inline int roxml_get_attr_nb(node_t *n) -+{ -+ return roxml_get_nodes_nb(n, ROXML_ATTR_NODE); -+} -+ -+ROXML_API inline node_t *roxml_get_attr(node_t *n, char *name, int nth) -+{ -+ return roxml_get_nodes(n, ROXML_ATTR_NODE, name, nth); -+} -+ -+ROXML_API inline int roxml_get_chld_nb(node_t *n) -+{ -+ return roxml_get_nodes_nb(n, ROXML_ELM_NODE); -+} -+ -+ROXML_API inline node_t *roxml_get_chld(node_t *n, char *name, int nth) -+{ -+ return roxml_get_nodes(n, ROXML_ELM_NODE, name, nth); -+} -+ -+ROXML_API inline int roxml_get_type(node_t *n) -+{ -+ if (n == ROXML_INVALID_DOC) -+ return ROXML_INVALID_NODE; -+ return (n->type & ROXML_NODE_TYPES); -+} -+ -+ROXML_API int roxml_get_node_position(node_t *n) -+{ -+ int idx = 1; -+ char name[256]; -+ node_t *prnt; -+ node_t *first; -+ -+ if (n == ROXML_INVALID_DOC) -+ return 0; -+ -+ roxml_get_name(n, name, 256); -+ -+ prnt = n->prnt; -+ if (!prnt) -+ return 1; -+ first = prnt->chld; -+ -+ while ((first) && (first != n)) { -+ char twin[256]; -+ -+ roxml_get_name(first, twin, 256); -+ if (strcmp(name, twin) == 0) -+ idx++; -+ first = first->sibl; -+ } -+ -+ return idx; -+} diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0104-roxml_core.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0104-roxml_core.c.patch deleted file mode 100644 index 711ab0a..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0104-roxml_core.c.patch +++ /dev/null @@ -1,861 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/libroxml/roxml_core.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/libroxml/roxml_core.c 2026-03-13 13:24:35.604457825 +0100 -@@ -0,0 +1,858 @@ -+/** -+ * \file roxml_core.c -+ * \brief XML parsing core module -+ * -+ * (C) Copyright 2014 -+ * Tristan Lelong -+ * -+ * SPDX-Licence-Identifier: LGPL-2.1+ -+ * The author added a static linking exception, see License.txt. -+ */ -+ -+#include -+ -+#include "roxml_core.h" -+#include "roxml_file.h" -+#include "roxml_buff.h" -+#include "roxml_parser.h" -+ -+int errno = 0; -+ -+#ifdef __DEBUG -+unsigned int _nb_node = 0; -+unsigned int _nb_attr = 0; -+unsigned int _nb_text = 0; -+#endif -+ -+ROXML_API void roxml_close(node_t *n) -+{ -+ node_t *root = n; -+ -+ if (root == ROXML_INVALID_DOC) -+ return; -+ -+ while (root->prnt != NULL) -+ root = root->prnt; -+ -+ roxml_del_tree(root->chld); -+ roxml_del_tree(root->sibl); -+ -+ if ((root->type & ROXML_FILE) == ROXML_FILE) -+ roxml_close_file(root); -+ else -+ roxml_close_buff(root); -+ -+ roxml_free_node(root); -+} -+ -+ROXML_INT node_t *roxml_create_node(int pos, void *src, int type) -+{ -+ node_t *n = (node_t *)kcalloc(1, sizeof(node_t), GFP_KERNEL); -+ n->type = type; -+ n->src.src = src; -+ n->pos = pos; -+ n->end = pos; -+ -+ return n; -+} -+ -+/** \brief internal function -+ * -+ * \fn void ROXML_STATIC ROXML_INT roxml_close_node(node_t *n, node_t *close); -+ * This function close the node (add the end offset) and parent the node -+ * \param n is the node to close -+ * \param close is the node that close node n -+ * \return void -+ */ -+ROXML_STATIC ROXML_INT void roxml_close_node(node_t *n, node_t *close) -+{ -+ if (n) { -+ n->end = close->pos; -+ kfree(close); -+ -+#ifdef __DEBUG -+ if (n->type & ROXML_ELM_NODE) -+ _nb_node++; -+ if (n->type & ROXML_ATTR_NODE) -+ _nb_attr++; -+ if (n->type & ROXML_TXT_NODE) -+ _nb_text++; -+#endif -+ } -+} -+ -+ROXML_INT void roxml_free_node(node_t *n) -+{ -+ if (!n) -+ return; -+ -+ if (n->type & ROXML_PENDING) -+ if (n->pos == 0) -+ if (n->src.buf) -+ kfree(n->src.buf); -+ -+ if (n->priv) { -+ unsigned char id = *(unsigned char *)n->priv; -+ -+ if (id == ROXML_REQTABLE_ID) { -+ xpath_tok_t *tok; -+ xpath_tok_table_t *table = (xpath_tok_table_t *)n->priv; -+ -+ roxml_lock_destroy(n); -+ -+ tok = table->next; -+ kfree(table); -+ while (tok) { -+ xpath_tok_t *to_delete = tok; -+ tok = tok->next; -+ kfree(to_delete); -+ } -+ } else if (id == ROXML_NS_ID) { -+ roxml_ns_t *ns = (roxml_ns_t *)n->priv; -+ kfree(ns); -+ } -+ } -+ kfree(n); -+} -+ -+ROXML_INT void roxml_del_tree(node_t *n) -+{ -+ if (n == NULL) -+ return; -+ -+ if (n != n->chld) -+ roxml_del_tree(n->chld); -+ if (n != n->sibl) -+ roxml_del_tree(n->sibl); -+ roxml_del_tree(n->attr); -+ roxml_free_node(n); -+} -+ -+ROXML_INT inline int roxml_is_separator(char sep) -+{ -+ int i = 0; -+ char separators[32] = "\r\t\n "; -+ -+ while (separators[i] != 0) -+ if (sep == separators[i++]) -+ return 1; -+ return 0; -+} -+ -+/** \brief namespace without alias name creation during parsing -+ * -+ * \fn roxml_process_unaliased_ns(roxml_load_ctx_t *context); -+ * this function create a new namespace without alias (default ns or remove ns) -+ * \param context the parsing context -+ * \return -+ */ -+ROXML_STATIC ROXML_INT void roxml_process_unaliased_ns(roxml_load_ctx_t *context) -+{ -+ if (context->nsdef) { -+ context->nsdef = 0; -+ context->candidat_arg->type |= ROXML_NS_NODE; -+ -+ if (context->candidat_node->ns && ((context->candidat_node->ns->type & ROXML_INVALID) == ROXML_INVALID)) -+ roxml_free_node(context->candidat_node->ns); -+ -+ if (context->candidat_val->pos == context->candidat_val->end) { -+ context->candidat_node->ns = NULL; -+ context->candidat_arg->ns = NULL; -+ } else { -+ roxml_ns_t *ns = kcalloc(1, sizeof(roxml_ns_t) + 1, GFP_KERNEL); -+ ns->id = ROXML_NS_ID; -+ ns->alias = (char *)ns + sizeof(roxml_ns_t); -+ -+ context->candidat_arg->priv = ns; -+ context->candidat_arg->ns = context->candidat_arg; -+ context->candidat_node->ns = context->candidat_arg; -+ -+ context->namespaces = context->candidat_arg; -+ } -+ } -+} -+ -+/** \brief node creation during parsing -+ * -+ * \fn roxml_process_begin_node(roxml_load_ctx_t *context, int position); -+ * this function create a new node upon finding new opening sign. It closes previous node if necessary -+ * \param context the parsing context -+ * \param position the position in the file -+ * \return -+ */ -+ROXML_STATIC ROXML_INT void roxml_process_begin_node(roxml_load_ctx_t *context, int position) -+{ -+ if (context->candidat_txt) { -+#ifdef IGNORE_EMPTY_TEXT_NODES -+ if (context->empty_text_node == 0) { -+#endif /* IGNORE_EMPTY_TEXT_NODES */ -+ node_t *to_be_closed = -+ roxml_create_node(position, context->src, ROXML_TXT_NODE | context->type); -+ context->candidat_txt = roxml_append_node(context->current_node, context->candidat_txt); -+ roxml_close_node(context->candidat_txt, to_be_closed); -+ context->current_node = context->candidat_txt->prnt; -+#ifdef IGNORE_EMPTY_TEXT_NODES -+ } else { -+ roxml_free_node(context->candidat_txt); -+ } -+#endif /* IGNORE_EMPTY_TEXT_NODES */ -+ context->candidat_txt = NULL; -+ } -+ context->candidat_node = roxml_create_node(position, context->src, ROXML_ELM_NODE | context->type); -+} -+ -+ROXML_INT node_t *roxml_load(node_t *current_node, FILE *file, char *buffer) -+{ -+ int error = 0; -+ node_t *root = current_node; -+ roxml_load_ctx_t context; -+ roxml_parser_item_t *parser = NULL; -+ -+ memset(&context, 0, sizeof(roxml_load_ctx_t)); -+ context.empty_text_node = 1; -+ context.current_node = current_node; -+ -+ parser = roxml_append_parser_item(parser, " ", _func_load_white); -+ parser = roxml_append_parser_item(parser, "<", _func_load_open_node); -+ parser = roxml_append_parser_item(parser, ">", _func_load_close_node); -+ parser = roxml_append_parser_item(parser, "/", _func_load_end_node); -+ parser = roxml_append_parser_item(parser, "'", _func_load_quoted); -+ parser = roxml_append_parser_item(parser, "\"", _func_load_dquoted); -+ parser = roxml_append_parser_item(parser, "\t", _func_load_white); -+ parser = roxml_append_parser_item(parser, "\n", _func_load_white); -+ parser = roxml_append_parser_item(parser, "\r", _func_load_white); -+ parser = roxml_append_parser_item(parser, "!", _func_load_open_spec_node); -+ parser = roxml_append_parser_item(parser, "]", _func_load_close_cdata); -+ parser = roxml_append_parser_item(parser, "-", _func_load_close_comment); -+ parser = roxml_append_parser_item(parser, "?", _func_load_close_pi); -+ parser = roxml_append_parser_item(parser, ":", _func_load_colon); -+ parser = roxml_append_parser_item(parser, "", _func_load_default); -+ -+ parser = roxml_parser_prepare(parser); -+ -+ if (file) -+ error = roxml_parse_file(&context, parser, file); -+ else -+ error = roxml_parse_buff(&context, parser, buffer); -+ -+ roxml_parser_free(parser); -+ -+ if (context.empty_text_node == 1) { -+ roxml_free_node(context.candidat_txt); -+ } else if (context.candidat_txt) { -+ node_t *to_be_closed = roxml_create_node(context.pos, context.src, ROXML_TXT_NODE | context.type); -+ context.candidat_txt = roxml_append_node(context.current_node, context.candidat_txt); -+ roxml_close_node(context.candidat_txt, to_be_closed); -+ } -+ current_node = NULL; -+ -+ if (error == 0) { -+ current_node = roxml_create_root(root); -+ } else { -+ roxml_close(root); -+ current_node = ROXML_INVALID_DOC; -+ } -+ -+ return current_node; -+} -+ -+ROXML_INT node_t *roxml_create_root(node_t *n) -+{ -+ xpath_tok_table_t *table = (xpath_tok_table_t *)kcalloc(1, sizeof(xpath_tok_table_t), GFP_KERNEL); -+ -+ table->id = ROXML_REQTABLE_ID; -+ table->ids[ROXML_REQTABLE_ID] = 1; -+ -+ n->priv = (void *)table; -+ -+ roxml_lock_init(n); -+ -+ return n; -+} -+ -+/** \brief name space lookup in list -+ * -+ * \fn roxml_lookup_nsdef(node_t *nsdef, char * ns); -+ * this function look for requested name space in nsdef list -+ * \param nsdef the nsdef list -+ * \param ns the namespace to find -+ * \return the nsdef node or NULL -+ */ -+ROXML_STATIC ROXML_INT node_t *roxml_lookup_nsdef(node_t *nsdef, char *ns) -+{ -+ int len = 0; -+ char namespace[MAX_NAME_LEN]; -+ -+ for (len = 0; ns[len] != '\0' && ns[len] != ':' && len < MAX_NAME_LEN; len++) -+ namespace[len] = ns[len]; -+ -+ if (len == MAX_NAME_LEN) -+ return NULL; /* truncated */ -+ -+ namespace[len] = '\0'; -+ -+ while (nsdef) { -+ if (nsdef->priv && strcmp(namespace, ((roxml_ns_t *)nsdef->priv)->alias) == 0) -+ break; -+ nsdef = nsdef->next; -+ } -+ return nsdef; -+} -+ -+/** \brief node type setter function -+ * -+ * \fn roxml_set_type(node_t *n, int type); -+ * this function change the type of a node -+ * \param n the node to modify -+ * \param type the new type to set -+ * \return -+ */ -+ROXML_STATIC ROXML_INT inline void roxml_set_type(node_t *n, int type) -+{ -+ n->type &= ~(ROXML_ATTR_NODE | ROXML_ELM_NODE | ROXML_TXT_NODE | ROXML_CMT_NODE | ROXML_PI_NODE); -+ n->type |= type; -+} -+ -+ROXML_INT node_t *roxml_set_parent(node_t *parent, node_t *n) -+{ -+ if (parent == NULL) -+ return NULL; -+ -+ n->prnt = parent; -+ -+ if (parent->ns && ((parent->ns->type & ROXML_INVALID) != ROXML_INVALID) -+ && parent->ns->priv && ((roxml_ns_t *)parent->ns->priv)->alias[0] == '\0') -+ if (n->ns == NULL) -+ n->ns = parent->ns; -+ return n; -+} -+ -+ROXML_STATIC ROXML_INT node_t *roxml_append_attr(node_t *parent, node_t *n) -+{ -+ if (parent->attr) { -+ node_t *attr = parent->attr; -+ while (attr->sibl) -+ attr = attr->sibl; -+ attr->sibl = n; -+ } else { -+ parent->attr = n; -+ } -+ -+ return n; -+} -+ -+ROXML_STATIC ROXML_INT node_t *roxml_append_other(node_t *parent, node_t *n) -+{ -+ if (parent->next) -+ parent->next->sibl = n; -+ else -+ parent->chld = n; -+ parent->next = n; -+ -+ return n; -+} -+ -+ROXML_INT node_t *roxml_append_node(node_t *parent, node_t *n) -+{ -+ if (!roxml_set_parent(parent, n)) -+ return n; -+ -+ if (n->type & ROXML_ATTR_NODE) -+ roxml_append_attr(parent, n); -+ else -+ roxml_append_other(parent, n); -+ -+ return n; -+} -+ -+ROXML_INT int _func_load_quoted(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+#ifdef DEBUG_PARSING -+ printk("calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ roxml_load_ctx_t *context = (roxml_load_ctx_t *)data; -+ -+ if (context->state != STATE_NODE_CONTENT && context->state != STATE_NODE_COMMENT) { -+ if (context->mode == MODE_COMMENT_NONE) -+ context->mode = MODE_COMMENT_QUOTE; -+ else if (context->mode == MODE_COMMENT_QUOTE) -+ context->mode = MODE_COMMENT_NONE; -+ } -+ -+ return 0; -+} -+ -+ROXML_INT int _func_load_dquoted(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+#ifdef DEBUG_PARSING -+ printk("calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ roxml_load_ctx_t *context = (roxml_load_ctx_t *)data; -+ -+ if (context->state != STATE_NODE_CONTENT && context->state != STATE_NODE_COMMENT) { -+ if (context->mode == MODE_COMMENT_NONE) -+ context->mode = MODE_COMMENT_DQUOTE; -+ else if (context->mode == MODE_COMMENT_DQUOTE) -+ context->mode = MODE_COMMENT_NONE; -+ } -+ -+ return 0; -+} -+ -+ROXML_INT int _func_load_open_node(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+#ifdef DEBUG_PARSING -+ printk("calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ int cur = 1; -+ roxml_load_ctx_t *context = (roxml_load_ctx_t *)data; -+ -+ switch (context->state) { -+ case STATE_NODE_CDATA: -+ case STATE_NODE_COMMENT: -+ break; -+ case STATE_NODE_ATTR: -+ case STATE_NODE_BEG: -+ if (context->mode == MODE_COMMENT_NONE) -+ ROXML_PARSE_ERROR("unexpected '<' within node definition"); -+ break; -+ default: -+ context->state = STATE_NODE_BEG; -+ context->previous_state = STATE_NODE_BEG; -+ break; -+ } -+ -+ context->pos += cur; -+ return cur; -+} -+ -+ROXML_INT int _func_load_close_node(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+#ifdef DEBUG_PARSING -+ printk("calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ int cur = 1; -+ roxml_load_ctx_t *context = (roxml_load_ctx_t *)data; -+ -+ switch (context->state) { -+ case STATE_NODE_NAME: -+ context->empty_text_node = 1; -+ context->current_node = roxml_append_node(context->current_node, context->candidat_node); -+ break; -+ case STATE_NODE_ATTR: -+ if ((context->mode != MODE_COMMENT_DQUOTE) && (context->mode != MODE_COMMENT_QUOTE)) { -+ if (context->inside_node_state == STATE_INSIDE_VAL) { -+ node_t *to_be_closed = NULL; -+ if (context->content_quoted) { -+ context->content_quoted = 0; -+ to_be_closed = -+ roxml_create_node(context->pos - 1, context->src, -+ ROXML_ATTR_NODE | context->type); -+ } else { -+ to_be_closed = -+ roxml_create_node(context->pos, context->src, -+ ROXML_ATTR_NODE | context->type); -+ } -+ roxml_close_node(context->candidat_val, to_be_closed); -+ } -+ context->current_node = roxml_append_node(context->current_node, context->candidat_node); -+ context->inside_node_state = STATE_INSIDE_ARG_BEG; -+ roxml_process_unaliased_ns(context); -+ } else { -+ context->pos++; -+ return 1; -+ } -+ break; -+ case STATE_NODE_SINGLE: -+ if (context->doctype) { -+ context->doctype--; -+ if (context->doctype > 0) { -+ context->pos++; -+ return 1; -+ } -+ context->candidat_node->end = context->pos; -+ } -+ context->empty_text_node = 1; -+ context->current_node = roxml_append_node(context->current_node, context->candidat_node); -+ if (context->current_node->prnt != NULL) { -+ context->current_node = context->current_node->prnt; -+ } -+ roxml_process_unaliased_ns(context); -+ break; -+ case STATE_NODE_END: -+ context->empty_text_node = 1; -+ roxml_close_node(context->current_node, context->candidat_node); -+ context->candidat_node = NULL; -+ if (context->current_node->prnt != NULL) { -+ context->current_node = context->current_node->prnt; -+ } -+ break; -+ case STATE_NODE_CDATA: -+ case STATE_NODE_CONTENT: -+ default: -+ context->pos++; -+ return 1; -+ break; -+ } -+ -+ if (context->candidat_node && context->candidat_node->ns -+ && ((context->candidat_node->ns->type & ROXML_INVALID) == ROXML_INVALID)) { -+ roxml_free_node(context->candidat_node->ns); -+ context->candidat_node->ns = NULL; -+ } -+ -+ context->state = STATE_NODE_CONTENT; -+ context->previous_state = STATE_NODE_CONTENT; -+ context->candidat_txt = roxml_create_node(context->pos + 1, context->src, ROXML_TXT_NODE | context->type); -+#ifdef IGNORE_EMPTY_TEXT_NODES -+ while (chunk[cur] != '\0') { -+ if (chunk[cur] == '<') { -+ break; -+ } else if (!ROXML_WHITE(chunk[cur])) { -+ context->empty_text_node = 0; -+ break; -+ } -+ cur++; -+ } -+#endif /* IGNORE_EMPTY_TEXT_NODES */ -+ while ((chunk[cur] != '<') && (chunk[cur] != '\0')) -+ cur++; -+ -+ context->pos += cur; -+ return cur; -+} -+ -+ROXML_INT int _func_load_open_spec_node(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+#ifdef DEBUG_PARSING -+ printk("calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ int cur = 1; -+ -+ roxml_load_ctx_t *context = (roxml_load_ctx_t *)data; -+ -+ if (context->state == STATE_NODE_BEG) { -+ if (strncmp(chunk, "!--", 3) == 0) { -+ cur = 3; -+ roxml_process_begin_node(context, context->pos - 1); -+ roxml_set_type(context->candidat_node, ROXML_CMT_NODE); -+ context->state = STATE_NODE_COMMENT; -+ while ((chunk[cur] != '-') && (chunk[cur] != '\0')) -+ cur++; -+ } else if (strncmp(chunk, "![CDATA[", 8) == 0) { -+ roxml_process_begin_node(context, context->pos - 1); -+ roxml_set_type(context->candidat_node, ROXML_CDATA_NODE); -+ context->state = STATE_NODE_CDATA; -+ while ((chunk[cur] != '[') && (chunk[cur] != '\0')) -+ cur++; -+ } else { -+ if (context->doctype == 0) { -+ roxml_process_begin_node(context, context->pos - 1); -+ roxml_set_type(context->candidat_node, ROXML_DOCTYPE_NODE); -+ } -+ context->state = STATE_NODE_SINGLE; -+ context->previous_state = STATE_NODE_SINGLE; -+ context->doctype++; -+ } -+ } -+ -+ context->pos += cur; -+ return cur; -+} -+ -+ROXML_INT int _func_load_close_comment(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+#ifdef DEBUG_PARSING -+ printk("calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ int cur = 1; -+ roxml_load_ctx_t *context = (roxml_load_ctx_t *)data; -+ -+ if (context->state == STATE_NODE_COMMENT) { -+ if (chunk[1] == '-') { -+ cur = 2; -+ context->state = STATE_NODE_SINGLE; -+ context->candidat_node->end = context->pos; -+ } -+ } -+ -+ context->pos += cur; -+ return cur; -+} -+ -+ROXML_INT int _func_load_close_cdata(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+#ifdef DEBUG_PARSING -+ printk("calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ int cur = 1; -+ roxml_load_ctx_t *context = (roxml_load_ctx_t *)data; -+ -+ if (context->state == STATE_NODE_CDATA) { -+ if (chunk[1] == ']') { -+ cur = 2; -+ context->state = STATE_NODE_SINGLE; -+ context->candidat_node->pos += 9; -+ context->candidat_node->end = context->pos; -+ } -+ } -+ -+ context->pos += cur; -+ return cur; -+} -+ -+ROXML_INT int _func_load_close_pi(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+#ifdef DEBUG_PARSING -+ printk("calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ int cur = 1; -+ roxml_load_ctx_t *context = (roxml_load_ctx_t *)data; -+ -+ if (context->state == STATE_NODE_BEG) { -+ cur = 1; -+ context->state = STATE_NODE_PI; -+ context->previous_state = STATE_NODE_PI; -+ roxml_process_begin_node(context, context->pos - 1); -+ roxml_set_type(context->candidat_node, ROXML_PI_NODE); -+ // while((chunk[cur] != '?')&&(chunk[cur] != '\0')) { cur++; } -+ } else if (context->state == STATE_NODE_PI) { -+ if (context->mode == MODE_COMMENT_NONE) { -+ cur = 1; -+ context->candidat_node->end = context->pos; -+ context->previous_state = STATE_NODE_PI; -+ context->state = STATE_NODE_SINGLE; -+ } -+ } -+ -+ context->pos += cur; -+ return cur; -+} -+ -+ROXML_INT int _func_load_end_node(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+#ifdef DEBUG_PARSING -+ printk("calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ int cur = 1; -+ roxml_load_ctx_t *context = (roxml_load_ctx_t *)data; -+ -+ switch (context->state) { -+ case STATE_NODE_BEG: -+ context->lvl--; -+ roxml_process_begin_node(context, context->pos - 1); -+ context->state = STATE_NODE_END; -+ if (context->lvl < 0) -+ ROXML_PARSE_ERROR("missing opening node"); -+ break; -+ case STATE_NODE_NAME: -+ context->lvl--; -+ context->state = STATE_NODE_SINGLE; -+ break; -+ case STATE_NODE_ATTR: -+ if ((context->mode != MODE_COMMENT_DQUOTE) && (context->mode != MODE_COMMENT_QUOTE)) { -+ if (context->inside_node_state == STATE_INSIDE_VAL) { -+ node_t *to_be_closed = NULL; -+ if (context->content_quoted) { -+ context->content_quoted = 0; -+ to_be_closed = -+ roxml_create_node(context->pos - 1, context->src, -+ ROXML_ATTR_NODE | context->type); -+ } else { -+ to_be_closed = -+ roxml_create_node(context->pos, context->src, -+ ROXML_ATTR_NODE | context->type); -+ } -+ roxml_close_node(context->candidat_val, to_be_closed); -+ } -+ context->inside_node_state = STATE_INSIDE_ARG_BEG; -+ context->state = STATE_NODE_SINGLE; -+ context->lvl--; -+ } -+ break; -+ } -+ -+ context->pos += cur; -+ return cur; -+} -+ -+ROXML_INT int _func_load_white(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+#ifdef DEBUG_PARSING -+ printk("calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ int cur = 1; -+ roxml_load_ctx_t *context = (roxml_load_ctx_t *)data; -+ -+ switch (context->state) { -+ case STATE_NODE_SINGLE: -+ context->state = context->previous_state; -+ break; -+ case STATE_NODE_NAME: -+ context->state = STATE_NODE_ATTR; -+ context->inside_node_state = STATE_INSIDE_ARG_BEG; -+ break; -+ case STATE_NODE_ATTR: -+ if (context->mode == MODE_COMMENT_NONE) { -+ if (context->inside_node_state == STATE_INSIDE_VAL) { -+ node_t *to_be_closed = NULL; -+ if (context->content_quoted) { -+ context->content_quoted = 0; -+ to_be_closed = -+ roxml_create_node(context->pos - 1, context->src, -+ ROXML_ATTR_NODE | context->type); -+ } else { -+ to_be_closed = -+ roxml_create_node(context->pos, context->src, -+ ROXML_ATTR_NODE | context->type); -+ } -+ roxml_close_node(context->candidat_val, to_be_closed); -+ context->inside_node_state = STATE_INSIDE_ARG_BEG; -+ roxml_process_unaliased_ns(context); -+ } -+ } -+ break; -+ } -+ context->pos += cur; -+ return cur; -+} -+ -+ROXML_INT int _func_load_colon(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+ int cur = 1; -+ roxml_load_ctx_t *context = (roxml_load_ctx_t *)data; -+#ifdef DEBUG_PARSING -+ printk("calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ -+ if (context->state == STATE_NODE_NAME) { -+ context->state = STATE_NODE_BEG; -+ context->candidat_node->ns = roxml_lookup_nsdef(context->namespaces, context->curr_name); -+ if (!context->candidat_node->ns) { -+ char *nsname = kmalloc(context->curr_name_len + 1, GFP_KERNEL); -+ memcpy(nsname, context->curr_name, context->curr_name_len); -+ nsname[context->curr_name_len] = '\0'; -+ context->candidat_node->ns = -+ roxml_create_node(0, nsname, ROXML_NSDEF_NODE | ROXML_PENDING | ROXML_INVALID); -+ } -+ context->candidat_node->pos += context->curr_name_len + 2; -+ context->ns = 1; -+ } else if (context->state == STATE_NODE_ATTR) { -+ if (context->inside_node_state == STATE_INSIDE_ARG) { -+ context->inside_node_state = STATE_INSIDE_ARG_BEG; -+ if ((context->curr_name_len == 5) && (strncmp(context->curr_name, "xmlns", 5) == 0)) { -+ context->candidat_arg->type |= ROXML_NS_NODE; -+ context->nsdef = 1; -+ } else { -+ context->candidat_arg->ns = roxml_lookup_nsdef(context->namespaces, context->curr_name); -+ context->candidat_arg->pos += context->curr_name_len + 2; -+ context->ns = 1; -+ } -+ -+ } -+ } -+ -+ context->pos += cur; -+ return cur; -+} -+ -+ROXML_INT int _func_load_default(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+ int cur = 1; -+ roxml_load_ctx_t *context = (roxml_load_ctx_t *)data; -+#ifdef DEBUG_PARSING -+ printk("calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ -+ switch (context->state) { -+ case STATE_NODE_SINGLE: -+ context->state = context->previous_state; -+ break; -+ case STATE_NODE_BEG: -+ if (context->ns == 0) { -+ context->lvl++; -+ roxml_process_begin_node(context, context->pos - 1); -+ } -+ context->ns = 0; -+ context->state = STATE_NODE_NAME; -+ strncpy(context->curr_name, chunk, MAX_NAME_LEN); -+ while (!ROXML_WHITE(chunk[cur]) && (chunk[cur] != '>') && (chunk[cur] != '/') && (chunk[cur] != ':') -+ && (chunk[cur] != '\0')) { -+ cur++; -+ } -+ context->curr_name_len = cur; -+ break; -+ case STATE_NODE_ATTR: -+ if (context->inside_node_state == STATE_INSIDE_ARG_BEG) { -+ if (context->nsdef) { -+ if (context->namespaces == NULL) { -+ context->namespaces = context->candidat_arg; -+ context->last_ns = context->candidat_arg; -+ } else { -+ context->last_ns->next = context->candidat_arg; -+ context->last_ns = context->candidat_arg; -+ } -+ } else if (context->ns == 0) { -+ context->candidat_arg = -+ roxml_create_node(context->pos - 1, context->src, ROXML_ATTR_NODE | context->type); -+ context->candidat_arg = -+ roxml_append_node(context->candidat_node, context->candidat_arg); -+ } -+ context->ns = 0; -+ context->inside_node_state = STATE_INSIDE_ARG; -+ strncpy(context->curr_name, chunk, MAX_NAME_LEN); -+ while ((chunk[cur] != '=') && (chunk[cur] != '>') && (chunk[cur] != ':') -+ && (chunk[cur] != '\0')) { -+ cur++; -+ } -+ context->curr_name_len = cur; -+ if (context->nsdef) { -+ roxml_ns_t *ns = kcalloc(1, sizeof(roxml_ns_t) + (1 + context->curr_name_len), GFP_KERNEL); -+ ns->id = ROXML_NS_ID; -+ ns->alias = (char *)ns + sizeof(roxml_ns_t); -+ memcpy(ns->alias, context->curr_name, context->curr_name_len); -+ context->candidat_arg->priv = ns; -+ context->nsdef = 0; -+ if (context->candidat_node->ns) { -+ if ((context->candidat_node->ns->type & ROXML_INVALID) == ROXML_INVALID) { -+ if (strcmp(context->candidat_arg->prnt->ns->src.buf, ns->alias) == 0) { -+ roxml_free_node(context->candidat_node->ns); -+ context->candidat_node->ns = context->candidat_arg; -+ } -+ } -+ } -+ } -+ } else if (context->inside_node_state == STATE_INSIDE_VAL_BEG) { -+ if (context->mode != MODE_COMMENT_NONE) { -+ context->content_quoted = 1; -+ context->candidat_val = -+ roxml_create_node(context->pos + 1, context->src, ROXML_TXT_NODE | context->type); -+ } else { -+ context->candidat_val = -+ roxml_create_node(context->pos, context->src, ROXML_TXT_NODE | context->type); -+ } -+ context->candidat_val = roxml_append_node(context->candidat_arg, context->candidat_val); -+ context->inside_node_state = STATE_INSIDE_VAL; -+ } else if ((context->inside_node_state == STATE_INSIDE_ARG) && (chunk[0] == '=')) { -+ node_t *to_be_closed; -+ -+ context->inside_node_state = STATE_INSIDE_VAL_BEG; -+ to_be_closed = roxml_create_node(context->pos, context->src, ROXML_ATTR_NODE | context->type); -+ roxml_close_node(context->candidat_arg, to_be_closed); -+ if ((context->curr_name_len == 5) && (strncmp(context->curr_name, "xmlns", 5) == 0)) { -+ context->nsdef = 1; -+ if (context->namespaces == NULL) { -+ context->namespaces = context->candidat_arg; -+ context->last_ns = context->candidat_arg; -+ } else { -+ context->last_ns->next = context->candidat_arg; -+ context->last_ns = context->candidat_arg; -+ } -+ } -+ } -+ break; -+ } -+ -+ context->pos += cur; -+ return cur; -+} diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0105-roxml_core.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0105-roxml_core.h.patch deleted file mode 100644 index 85939d3..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0105-roxml_core.h.patch +++ /dev/null @@ -1,123 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/libroxml/roxml_core.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/libroxml/roxml_core.h 2026-03-13 13:24:35.604711753 +0100 -@@ -0,0 +1,120 @@ -+/** -+ * \file roxml_core.h -+ * \brief XML parsing core module -+ * -+ * (C) Copyright 2014 -+ * Tristan Lelong -+ * -+ * SPDX-Licence-Identifier: LGPL-2.1+ -+ * The author added a static linking exception, see License.txt. -+ */ -+ -+#ifndef ROXML_CORE_H -+#define ROXML_CORE_H -+ -+#include "roxml_internal.h" -+ -+#ifdef __DEBUG -+unsigned int _nb_node; -+unsigned int _nb_attr; -+unsigned int _nb_text; -+#endif -+ -+/** \brief internal function -+ * -+ * \fn node_t* ROXML_INT roxml_create_node(int pos, void * src, int type); -+ * This function allocate a new node -+ * \param pos is the beginning offset of the node in the file -+ * \param src is the pointer to the buffer or file -+ * \param type is the type of node between arg and val -+ * \return the new node -+ */ -+ROXML_INT node_t *roxml_create_node(int pos, void *src, int type); -+ -+/** \brief internal function -+ * -+ * \fn void ROXML_INT roxml_free_node(node_t *n); -+ * This function delete a node without handling its tree -+ * \param n is one node of the tree -+ * \return void -+ */ -+ROXML_INT void roxml_free_node(node_t *n); -+ -+/** \brief internal function -+ * -+ * \fn void ROXML_INT roxml_del_tree(node_t *n); -+ * This function delete a tree recursively -+ * \param n is one node of the tree -+ * \return void -+ * see roxml_close -+ */ -+ROXML_INT void roxml_del_tree(node_t *n); -+ -+/** \brief internal function -+ * -+ * \fn ROXML_INT node_t *roxml_create_root(node_t *n); -+ * This function initialize the root node with xpath table -+ * \param n is the node to initialize -+ * \return void -+ * see roxml_close -+ */ -+ROXML_INT node_t *roxml_create_root(node_t *n); -+ -+/** \brief separator tester -+ * -+ * \fn roxml_is_separator(char sep); -+ * This function tells if a char is a string separator -+ * \param sep char to test -+ * \return 1 if the char was a separator else 0 -+ */ -+ROXML_INT int roxml_is_separator(char sep); -+ -+/** \brief generic load function -+ * -+ * \fn node_t* roxml_load(node_t *current_node, FILE *file, char *buffer); -+ * This function load a document and all the corresponding nodes -+ * file and buffer params are exclusive. You usualy want to load -+ * either a file OR a buffer -+ * \param current_node the XML root -+ * \param file file descriptor of document -+ * \param buffer address of buffer that contains xml -+ * \return the root node or NULL -+ * see roxml_close -+ */ -+ROXML_INT node_t *roxml_load(node_t *current_node, FILE * file, char *buffer); -+ -+/** \brief node parenting function -+ * -+ * \fn node_t *roxml_set_parent(node_t *parent, node_t *n); -+ * this function updates a node to set its parent and namespace if -+ * necessary. -+ * \param parent the parent node -+ * \param n the node to parent -+ * \return -+ */ -+ROXML_INT node_t *roxml_set_parent(node_t *parent, node_t *n); -+ -+/** \brief node append function -+ * -+ * \fn roxml_append_node(node_t *parent, node_t *n); -+ * this function add a given node as the last child of another node -+ * \param parent the parent node -+ * \param n the node to parent -+ * \return -+ */ -+ROXML_INT node_t *roxml_append_node(node_t *parent, node_t * n); -+ -+ROXML_INT ROXML_PARSE int _func_load_quoted(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT ROXML_PARSE int _func_load_dquoted(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT ROXML_PARSE int _func_load_open_node(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT ROXML_PARSE int _func_load_close_node(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT ROXML_PARSE int _func_load_open_spec_node(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT ROXML_PARSE int _func_load_close_comment(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT ROXML_PARSE int _func_load_close_cdata(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT ROXML_PARSE int _func_load_close_pi(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT ROXML_PARSE int _func_load_end_node(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT ROXML_PARSE int _func_load_white(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT ROXML_PARSE int _func_load_colon(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT ROXML_PARSE int _func_load_default(roxml_parser_item_t *parser, char *chunk, void *data); -+ -+#endif /* ROXML_CORE_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0106-roxml_defines.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0106-roxml_defines.h.patch deleted file mode 100644 index 77e6007..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0106-roxml_defines.h.patch +++ /dev/null @@ -1,419 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/libroxml/roxml_defines.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/libroxml/roxml_defines.h 2026-03-13 13:24:35.604763832 +0100 -@@ -0,0 +1,416 @@ -+/** -+ * \file roxml_defines.h -+ * \brief Defines used trhoughout the sources -+ * -+ * (C) Copyright 2014 -+ * Tristan Lelong -+ * -+ * SPDX-Licence-Identifier: LGPL-2.1+ -+ * The author added a static linking exception, see License.txt. -+ */ -+ -+#ifndef ROXML_DEF_H -+#define ROXML_DEF_H -+ -+#ifndef ROXML_TUNE_H -+#error "roxml_tune.h must be included before roxml_defines.h to tune it." -+#endif -+ -+#define ROXML_PATH_OR "|" -+#define ROXML_PATH_AND "&" -+#define ROXML_COND_OR "or" -+#define ROXML_COND_AND "and" -+ -+#define ROXML_OPERATOR_OR 1 -+#define ROXML_OPERATOR_AND 2 -+#define ROXML_OPERATOR_INF 3 -+#define ROXML_OPERATOR_SUP 4 -+#define ROXML_OPERATOR_EINF 5 -+#define ROXML_OPERATOR_ESUP 6 -+#define ROXML_OPERATOR_DIFF 7 -+#define ROXML_OPERATOR_EQU 8 -+#define ROXML_OPERATOR_ADD 9 -+#define ROXML_OPERATOR_SUB 10 -+#define ROXML_OPERATOR_MUL 11 -+#define ROXML_OPERATOR_DIV 12 -+ -+#define ROXML_FUNC_INTCOMP 1 -+#define ROXML_FUNC_STRCOMP 2 -+#define ROXML_FUNC_POS 3 -+#define ROXML_FUNC_FIRST 4 -+#define ROXML_FUNC_LAST 5 -+#define ROXML_FUNC_TEXT 6 -+#define ROXML_FUNC_NODE 7 -+#define ROXML_FUNC_COMMENT 8 -+#define ROXML_FUNC_PI 9 -+#define ROXML_FUNC_XPATH 10 -+#define ROXML_FUNC_NSURI 11 -+#define ROXML_FUNC_LNAME 12 -+ -+#define ROXML_FUNC_POS_STR "position()" -+#define ROXML_FUNC_FIRST_STR "first()" -+#define ROXML_FUNC_LAST_STR "last()" -+#define ROXML_FUNC_NSURI_STR "namespace-uri()" -+#define ROXML_FUNC_LNAME_STR "local-name()" -+ -+#define ROXML_FUNC_TEXT_STR "text()" -+#define ROXML_FUNC_NODE_STR "node()" -+#define ROXML_FUNC_COMMENT_STR "comment()" -+#define ROXML_FUNC_PI_STR "processing-instruction()" -+ -+/** -+ * \def MAX_NAME_LEN -+ * -+ * constant for namespace lenght -+ */ -+#define MAX_NAME_LEN 128 -+ -+/** -+ * \def ROXML_BULK_READ -+ * -+ * This is the internal buffer size for chunk of xml files -+ */ -+#if(CONFIG_XML_SMALL_BUFFER==1) -+#define ROXML_BULK_READ 256 -+#else /* CONFIG_XML_SMALL_BUFFER==0 */ -+#define ROXML_BULK_READ 4096 -+#endif /* CONFIG_XML_SMALL_BUFFER */ -+ -+/** -+ * \def ROXML_BASE_LEN -+ * -+ * This is the max size for XML objects (node name, attribute name and values...) -+ * It is caused by the split of the XML file for parsing: -+ * 512 bytes are reserved as security to handle splitting inside an XML object. -+ * This is also the len of internal buffers. If a requested buffer is bigger, -+ * then a malloc/free will occur and may slow down libroxml. -+ */ -+#if(CONFIG_XML_SMALL_BUFFER==1) -+#define ROXML_BASE_LEN 64 -+#else /* CONFIG_XML_SMALL_BUFFER==0 */ -+#define ROXML_BASE_LEN 512 -+#endif /* CONFIG_XML_SMALL_BUFFER */ -+ -+#define ROXML_ID_CHILD 0 -+#define ROXML_ID_DESC_O_SELF 1 -+#define ROXML_ID_SELF 2 -+#define ROXML_ID_PARENT 3 -+#define ROXML_ID_ATTR 4 -+#define ROXML_ID_DESC 5 -+#define ROXML_ID_ANC 6 -+#define ROXML_ID_NEXT_SIBL 7 -+#define ROXML_ID_PREV_SIBL 8 -+#define ROXML_ID_NEXT 9 -+#define ROXML_ID_PREV 10 -+#define ROXML_ID_NS 11 -+#define ROXML_ID_ANC_O_SELF 12 -+ -+#define ROXML_L_CHILD "child::" -+#define ROXML_L_DESC_O_SELF "descendant-or-self::" -+#define ROXML_L_SELF "self::" -+#define ROXML_L_PARENT "parent::" -+#define ROXML_L_ATTR "attribute::" -+#define ROXML_L_DESC "descendant::" -+#define ROXML_L_ANC "ancestor::" -+#define ROXML_L_NEXT_SIBL "following-sibling::" -+#define ROXML_L_PREV_SIBL "preceding-sibling::" -+#define ROXML_L_NEXT "following::" -+#define ROXML_L_PREV "preceding::" -+#define ROXML_L_NS "namespace::" -+#define ROXML_L_ANC_O_SELF "ancestor-or-self::" -+ -+#define ROXML_S_CHILD -+#define ROXML_S_DESC_O_SELF "" -+#define ROXML_S_SELF "." -+#define ROXML_S_PARENT ".." -+#define ROXML_S_ATTR "@" -+ -+#define ROXML_DIRECT 0 -+#define ROXML_DESC_ONLY 1 -+#define ROXML_DESC_O_SELF 2 -+ -+#define ROXML_REQTABLE_ID 0 -+#define ROXML_NS_ID 1 -+#define ROXML_XPATH_FIRST_ID 16 -+ -+/** -+ * \def PTR_NONE -+ * -+ * constant for void pointers -+ */ -+#define PTR_NONE -1 -+ -+/** -+ * \def PTR_VOID -+ * -+ * constant for void pointers -+ */ -+#define PTR_VOID 0 -+ -+/** -+ * \def PTR_CHAR -+ * -+ * constant for char pointers -+ */ -+#define PTR_CHAR 2 -+ -+/** -+ * \def PTR_CHAR_STAR -+ * -+ * constant for char table pointers -+ */ -+#define PTR_CHAR_STAR 3 -+ -+/** -+ * \def PTR_NODE -+ * -+ * constant for node pointers -+ */ -+#define PTR_NODE 4 -+ -+/** -+ * \def PTR_NODE_STAR -+ * -+ * constant for node table pointers -+ */ -+#define PTR_NODE_STAR 5 -+ -+/** -+ * \def PTR_INT -+ * -+ * constant for int pointer -+ */ -+#define PTR_INT 6 -+ -+/** -+ * \def PTR_INT_STAR -+ * -+ * constant for int table pointers -+ */ -+#define PTR_INT_STAR 7 -+ -+/** -+ * \def PTR_NODE_RESULT -+ * -+ * constant for node table pointers where node are not to delete -+ */ -+#define PTR_NODE_RESULT 8 -+ -+/** -+ * \def PTR_IS_STAR(a) -+ * -+ * macro returning if a memory_cell is a star cell -+ */ -+#define PTR_IS_STAR(a) ((a)->type % 2) -+ -+/** -+ * \def ROXML_FILE -+ * -+ * constant for argument node -+ */ -+#define ROXML_FILE 0x01 -+ -+/** -+ * \def ROXML_BUFF -+ * -+ * constant for buffer document -+ */ -+#define ROXML_BUFF 0x02 -+ -+/** -+ * \def ROXML_PENDING -+ * -+ * constant for pending node -+ */ -+#define ROXML_PENDING 0x04 -+ -+/** -+ * \def ROXML_INVALID -+ * -+ * constant for invalid node -+ */ -+#define ROXML_INVALID 0x03 -+ -+/** -+ * \def STATE_NODE_NONE -+ * -+ * state for the state machine for init -+ */ -+#define STATE_NODE_NONE 0 -+ -+/** -+ * \def STATE_NODE_BEG -+ * -+ * state for the state machine for begining of a node -+ */ -+#define STATE_NODE_BEG 1 -+ -+/** -+ * \def STATE_NODE_NAME -+ * -+ * state for the state machine for name read -+ */ -+#define STATE_NODE_NAME 2 -+ -+/** -+ * \def STATE_NODE_END -+ * -+ * state for the state machine for end of node -+ */ -+#define STATE_NODE_END 3 -+ -+/** -+ * \def STATE_NODE_STRING -+ * -+ * state for the state machine for string reading -+ */ -+#define STATE_NODE_STRING 4 -+ -+/** -+ * \def STATE_NODE_ARG -+ * -+ * state for the state machine for attribute name reading -+ */ -+#define STATE_NODE_ARG 5 -+ -+/** -+ * \def STATE_NODE_ARGVAL -+ * -+ * state for the state machine for attribute value reading -+ */ -+#define STATE_NODE_ARGVAL 6 -+ -+/** -+ * \def STATE_NODE_SEP -+ * -+ * state for the state machine for separator reading -+ */ -+#define STATE_NODE_SEP 7 -+ -+/** -+ * \def STATE_NODE_PI -+ * -+ * state for the state machine for separator reading -+ */ -+#define STATE_NODE_PI 8 -+ -+/** -+ * \def STATE_NODE_SINGLE -+ * -+ * state for the state machine for single nodes -+ */ -+#define STATE_NODE_SINGLE 9 -+ -+/** -+ * \def STATE_NODE_ATTR -+ * -+ * state for the state machine for attribut reading -+ */ -+#define STATE_NODE_ATTR 10 -+ -+/** -+ * \def STATE_NODE_CONTENT -+ * -+ * state for the state machine for content read -+ */ -+#define STATE_NODE_CONTENT 11 -+ -+/** -+ * \def STATE_NODE_COMMENT_BEG -+ * -+ * state for the state machine for separator reading -+ */ -+#define STATE_NODE_COMMENT_BEG 12 -+ -+/** -+ * \def STATE_NODE_COMMENT -+ * -+ * state for the state machine for separator reading -+ */ -+#define STATE_NODE_COMMENT 14 -+ -+/** -+ * \def STATE_NODE_COMMENT_END -+ * -+ * state for the state machine for separator reading -+ */ -+#define STATE_NODE_COMMENT_END 15 -+ -+/** -+ * \def STATE_NODE_CDATA_BEG -+ * -+ * state for the state machine for separator reading -+ */ -+#define STATE_NODE_CDATA_BEG 16 -+ -+/** -+ * \def STATE_NODE_CDATA -+ * -+ * state for the state machine for separator reading -+ */ -+#define STATE_NODE_CDATA 22 -+ -+/** -+ * \def STATE_NODE_CDATA_END -+ * -+ * state for the state machine for separator reading -+ */ -+#define STATE_NODE_CDATA_END 23 -+ -+/** -+ * \def MODE_COMMENT_NONE -+ * -+ * mode init in state machine -+ */ -+#define MODE_COMMENT_NONE 0 -+ -+/** -+ * \def MODE_COMMENT_QUOTE -+ * -+ * mode quoted in state machine -+ */ -+#define MODE_COMMENT_QUOTE 1 -+ -+/** -+ * \def MODE_COMMENT_DQUOTE -+ * -+ * mode double quoted in state machine -+ */ -+#define MODE_COMMENT_DQUOTE 2 -+ -+/** -+ * \def STATE_INSIDE_ARG_BEG -+ * -+ * inside node state begining (attribute declaration) -+ */ -+#define STATE_INSIDE_ARG_BEG 0 -+ -+/** -+ * \def STATE_INSIDE_ARG -+ * -+ * inside node state arg name -+ */ -+#define STATE_INSIDE_ARG 1 -+ -+/** -+ * \def STATE_INSIDE_VAL_BEG -+ * -+ * inside node state arg value -+ */ -+#define STATE_INSIDE_VAL_BEG 2 -+ -+/** -+ * \def STATE_INSIDE_VAL -+ * -+ * inside node state arg value -+ */ -+#define STATE_INSIDE_VAL 3 -+ -+/** -+ * \def ROXML_WHITE(n) -+ * -+ * save current document position and recall to node -+ */ -+#define ROXML_WHITE(n) ((n==' ')||(n=='\t')||(n=='\n')||(n=='\r')) -+ -+#endif /* ROXML_DEF_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0107-roxml_edit.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0107-roxml_edit.c.patch deleted file mode 100644 index a090c01..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0107-roxml_edit.c.patch +++ /dev/null @@ -1,433 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/libroxml/roxml_edit.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/libroxml/roxml_edit.c 2026-03-13 13:24:35.604635472 +0100 -@@ -0,0 +1,430 @@ -+/** -+ * \file roxml_edit.c -+ * \brief XML document edition module -+ * -+ * (C) Copyright 2014 -+ * Tristan Lelong -+ * -+ * SPDX-Licence-Identifier: LGPL-2.1+ -+ * The author added a static linking exception, see License.txt. -+ */ -+ -+#include -+ -+#include "roxml_core.h" -+#include "roxml_mem.h" -+ -+#undef current -+ -+/** \brief get real sibling -+ * -+ * \fn node_t *roxml_get_real_prev_sibling(node_t *n); -+ * This function returns the real previous sibling of a node -+ * no matter what its type is. -+ * \warning do not call this function if n->prnt == NULL -+ * \param n is one node of the tree -+ * \return the previous sibling -+ */ -+ROXML_STATIC ROXML_INT node_t *roxml_get_real_prev_sibling(node_t *n) -+{ -+ node_t *current = n->prnt->chld; -+ node_t *prev = NULL; -+ -+ while (current != n) { -+ prev = current; -+ current = current->sibl; -+ } -+ -+ return prev; -+} -+ -+/** \brief internal function -+ * -+ * \fn void ROXML_STATIC ROXML_INT roxml_reset_ns(node_t *n, node_t *ns); -+ * This function remove the namespace of a node if it is the one -+ * specified as argument, and replace it with its parent one -+ * \param n is one node of the tree -+ * \param ns is one nsdef of the tree -+ * \return void -+ */ -+ROXML_STATIC ROXML_INT void roxml_reset_ns(node_t *n, node_t *ns) -+{ -+ node_t *attr = NULL; -+ node_t *chld = NULL; -+ -+ if (!n) -+ return; -+ -+ if (n->ns == ns) { -+ if (n->prnt) -+ n->ns = n->prnt->ns; -+ else -+ n->ns = NULL; -+ } -+ -+ chld = n->chld; -+ while (chld) { -+ roxml_reset_ns(chld, ns); -+ chld = chld->sibl; -+ } -+ -+ attr = n->attr; -+ while (attr) { -+ if ((attr->type & ROXML_NS_NODE) == 0) -+ if (attr->ns == ns) -+ attr->ns = attr->prnt->ns; -+ attr = attr->sibl; -+ } -+} -+ -+/** \brief node deletion function -+ * -+ * \fn roxml_del_std_node(node_t *n); -+ * this function delete a standard node -+ * \param n the node to delete -+ * \return -+ */ -+ROXML_STATIC ROXML_INT void roxml_del_std_node(node_t *n) -+{ -+ node_t *current = n->prnt->chld; -+ -+ if (n->prnt && n->prnt->next == n) -+ n->prnt->next = roxml_get_real_prev_sibling(n); -+ -+ if (current == n) { -+ n->prnt->chld = n->sibl; -+ } else if (current) { -+ while (current->sibl && current->sibl != n) -+ current = current->sibl; -+ current->sibl = n->sibl; -+ } -+ roxml_del_tree(n->chld); -+ roxml_del_tree(n->attr); -+} -+ -+/** \brief text node deletion function -+ * -+ * \fn roxml_del_txt_node(node_t *n); -+ * this function delete a text node -+ * \param n the node to delete -+ * \return -+ */ -+ROXML_STATIC ROXML_INT void roxml_del_txt_node(node_t *n) -+{ -+ node_t *current = n->prnt->chld; -+ -+ while (current && (current->type & ROXML_TXT_NODE) == 0) -+ current = current->sibl; -+ -+ roxml_del_std_node(current); -+} -+ -+/** \brief attribute node deletion function -+ * -+ * \fn roxml_del_arg_node(node_t *n); -+ * this function delete an attribute node -+ * \param n the node to delete -+ * \return -+ */ -+ROXML_STATIC ROXML_INT void roxml_del_arg_node(node_t *n) -+{ -+ node_t *current = n->prnt->attr; -+ -+ if (n->type & ROXML_NS_NODE) -+ roxml_reset_ns(n->prnt, n); -+ -+ if (current == n) { -+ n->prnt->attr = n->sibl; -+ } else if (current) { -+ while (current->sibl && current->sibl != n) -+ current = current->sibl; -+ current->sibl = n->sibl; -+ } -+ roxml_del_tree(n->chld); -+} -+ -+ROXML_STATIC ROXML_INT node_t *roxml_prepend_node(node_t *parent, node_t *n) -+{ -+ if (n->type & ROXML_ATTR_NODE) { -+ n->sibl = parent->attr; -+ parent->attr = n; -+ } else { -+ n->sibl = parent->chld; -+ parent->chld = n; -+ } -+ return n; -+} -+ -+/** \brief node relocate function -+ * -+ * \fn roxml_parent_node(node_t *parent, node_t *n, int position); -+ * this function change the position of a node in its parent list -+ * \param parent the parent node -+ * \param n the node to parent -+ * \param position the position, 0 means or > nb children means at the end -+ * \return -+ */ -+ROXML_STATIC ROXML_INT node_t *roxml_parent_node(node_t *parent, node_t *n, int position) -+{ -+ int nb; -+ -+ if (n == NULL) -+ return NULL; -+ if (parent == NULL) -+ return n; -+ -+ if (n->type & ROXML_ATTR_NODE) -+ nb = roxml_get_attr_nb(parent); -+ else -+ nb = roxml_get_nodes_nb(parent, -+ ROXML_PI_NODE | ROXML_CMT_NODE | ROXML_TXT_NODE | ROXML_ELM_NODE | -+ ROXML_DOCTYPE_NODE); -+ -+ roxml_set_parent(parent, n); -+ -+ if ((position == 0) || (position > nb)) { -+ return roxml_append_node(parent, n); -+ } else if (position == 1) { -+ return roxml_prepend_node(parent, n); -+ } else { -+ int i; -+ node_t *prev = parent->chld; -+ node_t *next = parent->chld; -+ -+ if (n->type & ROXML_ATTR_NODE) -+ next = parent->attr; -+ for (i = 1; i < position; i++) { -+ prev = next; -+ next = next->sibl; -+ } -+ n->sibl = next; -+ prev->sibl = n; -+ } -+ return n; -+} -+ -+ROXML_API void roxml_del_node(node_t *n) -+{ -+ if (n == ROXML_INVALID_DOC) -+ return; -+ -+ if ((n->type & ROXML_ELM_NODE) || -+ (n->type & ROXML_DOCTYPE_NODE) || (n->type & ROXML_PI_NODE) || (n->type & ROXML_CMT_NODE)) { -+ roxml_del_std_node(n); -+ } else if (n->type & ROXML_ATTR_NODE) { -+ roxml_del_arg_node(n); -+ } else if (n->type & ROXML_TXT_NODE) { -+ roxml_del_txt_node(n); -+ } -+ roxml_free_node(n); -+} -+ -+ROXML_STATIC ROXML_INT void roxml_generate_cmt_node(node_t *n, char *content) -+{ -+ int content_l = strlen(content); -+ -+ n->src.buf = kmalloc(sizeof(char) * (content_l + 8), GFP_KERNEL); -+ sprintf(n->src.buf, "", content); -+ n->end = content_l + 4; -+} -+ -+ROXML_STATIC ROXML_INT void roxml_generate_txt_node(node_t *n, char *content) -+{ -+ int content_l = strlen(content); -+ -+ n->src.buf = kmalloc(sizeof(char) * (content_l + 1), GFP_KERNEL); -+ sprintf(n->src.buf, "%s", content); -+ n->end = content_l + 1; -+} -+ -+ROXML_STATIC ROXML_INT void roxml_generate_elm_node(node_t *n, char *name, char *content) -+{ -+ int content_l = 0; -+ int name_l = strlen(name); -+ node_t *new_txt; -+ -+ if (content) -+ content_l = strlen(content); -+ -+ if (content) { -+ n->src.buf = kmalloc(sizeof(char) * (name_l * 2 + content_l + 6), GFP_KERNEL); -+ sprintf(n->src.buf, "<%s>%s", name, content, name); -+ n->end = name_l + content_l + 2; -+ -+ new_txt = roxml_create_node(name_l + 2, n->src.buf, ROXML_TXT_NODE | ROXML_PENDING | ROXML_BUFF); -+ roxml_append_node(n, new_txt); -+ new_txt->end = name_l + content_l + 2; -+ } else { -+ n->src.buf = kmalloc(sizeof(char) * (name_l + 5), GFP_KERNEL); -+ sprintf(n->src.buf, "<%s />", name); -+ n->end = 0; -+ } -+} -+ -+ROXML_STATIC ROXML_INT void roxml_generate_pi_node(node_t *n, char *name, char *content) -+{ -+ int content_l = 0; -+ int name_l = strlen(name); -+ -+ if (content) -+ content_l = strlen(content); -+ -+ if (content_l) { -+ n->src.buf = kmalloc(sizeof(char) * (name_l + content_l + 8), GFP_KERNEL); -+ sprintf(n->src.buf, "", name, content); -+ n->end = name_l + content_l + 3; -+ } else { -+ n->src.buf = kmalloc(sizeof(char) * (name_l + 7), GFP_KERNEL); -+ sprintf(n->src.buf, "", name); -+ n->end = name_l + 2; -+ } -+} -+ -+ROXML_STATIC ROXML_INT void roxml_generate_attr_node(node_t *n, int type, char *name, char *content) -+{ -+ int xmlns_l = 0; -+ int content_l = strlen(content); -+ int name_l = strlen(name); -+ roxml_ns_t *ns; -+ node_t *new_txt; -+ -+ if (type & ROXML_NS_NODE) { -+ xmlns_l = 5; -+ if (name_l > 0) -+ xmlns_l++; -+ -+ n->src.buf = kmalloc(sizeof(char) * (name_l + content_l + xmlns_l + 4), GFP_KERNEL); -+ sprintf(n->src.buf, "xmlns%s%s=\"%s\"", name_l ? ":" : "", name, content); -+ -+ ns = kcalloc(1, sizeof(roxml_ns_t) + name_l + 1, GFP_KERNEL); -+ ns->id = ROXML_NS_ID; -+ ns->alias = (char *)ns + sizeof(roxml_ns_t); -+ if (name) -+ strcpy(ns->alias, name); -+ n->priv = ns; -+ } else { -+ n->src.buf = kmalloc(sizeof(char) * (name_l + content_l + 4), GFP_KERNEL); -+ sprintf(n->src.buf, "%s=\"%s\"", name, content); -+ } -+ -+ new_txt = roxml_create_node(name_l + 2 + xmlns_l, n->src.buf, ROXML_TXT_NODE | ROXML_PENDING | ROXML_BUFF); -+ new_txt->end = name_l + content_l + 2 + xmlns_l; -+ n->end = name_l + 1 + xmlns_l; -+ roxml_append_node(n, new_txt); -+} -+ -+static ROXML_INT int roxml_add_node_check(node_t *parent, int type, char *name, char *content) -+{ -+ int valid = 1; -+ -+ if (parent) { -+ if (parent->type & ROXML_ATTR_NODE) { -+ if (((type & ROXML_TXT_NODE) == 0) || (parent->chld)) -+ valid = 0; -+ } else if ((parent->type & ROXML_ELM_NODE) == 0) { -+ if (parent->prnt && (parent->prnt->type & ROXML_ELM_NODE)) -+ valid = 2; -+ else -+ valid = 0; -+ } -+ } -+ -+ switch (type & ~ROXML_ESCAPED_MOD) { -+ case ROXML_ATTR_NODE | ROXML_NS_NODE: -+ case ROXML_ATTR_NODE: -+ if (!name || !content) -+ valid = 0; -+ break; -+ case ROXML_TXT_NODE: -+ case ROXML_CMT_NODE: -+ case ROXML_CDATA_NODE: -+ if (!content) -+ valid = 0; -+ break; -+ case ROXML_ELM_NODE: -+ case ROXML_PI_NODE: -+ if (!name) -+ valid = 0; -+ break; -+ default: -+ valid = 0; -+ } -+ -+ return valid; -+} -+ -+ROXML_API node_t *roxml_add_node(node_t *parent, int position, int type, char *name, char *content) -+{ -+ int ret; -+ node_t *new_node = NULL; -+ -+ if (content && (type & ROXML_ESCAPED_MOD) && !(type & ROXML_NON_ESCAPABLE_NODES)) { -+ int size = roxml_escape(content, ENCODE, NULL); -+ char *out = kmalloc(size + 1, GFP_KERNEL); -+ roxml_escape(content, ENCODE, out); -+ content = out; -+ } -+ -+ ret = roxml_add_node_check(parent, type, name, content); -+ if (ret == 0) -+ return NULL; -+ else if (ret == 2) -+ parent = parent->prnt; -+ -+ if (parent == NULL) { -+ node_t *n = roxml_create_node(0, NULL, ROXML_ELM_NODE | ROXML_PENDING | ROXML_BUFF); -+ -+ parent = roxml_create_root(n); -+ } -+ -+ new_node = roxml_create_node(0, NULL, type | ROXML_PENDING | ROXML_BUFF); -+ -+ if (type & ROXML_ATTR_NODE) -+ roxml_generate_attr_node(new_node, type, name, content); -+ else if (type & ROXML_CMT_NODE) -+ roxml_generate_cmt_node(new_node, content); -+ else if (type & ROXML_PI_NODE) -+ roxml_generate_pi_node(new_node, name, content); -+ else if (type & ROXML_TXT_NODE) -+ roxml_generate_txt_node(new_node, content); -+ else if (type & ROXML_ELM_NODE) -+ roxml_generate_elm_node(new_node, name, content); -+ -+ if (((type & ROXML_NON_ESCAPABLE_NODES) == 0) && (type & ROXML_ESCAPED_MOD)) -+ kfree(content); -+ -+ return roxml_parent_node(parent, new_node, position); -+} -+ -+ROXML_API node_t *roxml_set_ns(node_t *n, node_t *ns) -+{ -+ node_t *attr = NULL; -+ node_t *chld = NULL; -+ -+ if (n == ROXML_INVALID_DOC) -+ return ROXML_INVALID_DOC; -+ -+ if (ns) { -+ node_t *common_parent = n; -+ while (common_parent && common_parent != ns->prnt) -+ common_parent = common_parent->prnt; -+ if (common_parent != ns->prnt) -+ return NULL; -+ } -+ -+ n->ns = ns; -+ chld = n->chld; -+ while (chld) { -+ roxml_set_ns(chld, ns); -+ chld = chld->sibl; -+ } -+ -+ attr = n->attr; -+ while (attr) { -+ if ((attr->type & ROXML_NS_NODE) == 0) -+ attr->ns = ns; -+ attr = attr->sibl; -+ } -+ -+ return n; -+} diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0108-roxml_file.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0108-roxml_file.c.patch deleted file mode 100644 index 0e30547..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0108-roxml_file.c.patch +++ /dev/null @@ -1,106 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/libroxml/roxml_file.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/libroxml/roxml_file.c 2026-03-13 13:24:35.604853801 +0100 -@@ -0,0 +1,103 @@ -+/** -+ * \file roxml_file.c -+ * \brief File XML document backend -+ * -+ * (C) Copyright 2014 -+ * Tristan Lelong -+ * -+ * SPDX-Licence-Identifier: LGPL-2.1+ -+ * The author added a static linking exception, see License.txt. -+ */ -+ -+ -+#include -+ -+#include "roxml_core.h" -+#include "roxml_parser.h" -+#include "roxml_internal.h" -+#include "roxml_file.h" -+ -+ROXML_INT int roxml_read_file(int pos, int size, char *buffer, node_t *node) -+{ -+ int ret_len = 0; -+ -+ if (fseek(node->src.fil, pos, SEEK_SET) == 0) -+ ret_len = fread(buffer, 1, size, node->src.fil); -+ -+ return ret_len; -+} -+ -+ROXML_INT void roxml_close_file(node_t *root) -+{ -+ fclose(root->src.fil); -+} -+ -+ROXML_INT int roxml_parse_file(roxml_load_ctx_t *context, roxml_parser_item_t *parser, FILE *file) -+{ -+ char *int_buffer; -+ int error = 0; -+ int circle = 0; -+ int int_len = 0; -+ -+ context->type = ROXML_FILE; -+ context->src = (void *)file; -+ context->pos = 0; -+ -+ int_buffer = kmalloc(ROXML_BULK_READ + 1, GFP_KERNEL); -+ -+ do { -+ int ret = 0; -+ int chunk_len = 0; -+ int_len = fread(int_buffer + circle, 1, ROXML_BULK_READ - circle, file) + circle; -+ int_buffer[int_len] = '\0'; -+ -+ if (int_len == ROXML_BULK_READ) -+ chunk_len = int_len - ROXML_BASE_LEN; -+ else -+ chunk_len = int_len; -+ -+ ret = roxml_parse_line(parser, int_buffer, chunk_len, context); -+ circle = int_len - ret; -+ if ((ret < 0) || (circle < 0)) { -+ error = 1; -+ break; -+ } -+ memmove(int_buffer, int_buffer + ret, circle); -+ } while (int_len == ROXML_BULK_READ); -+ -+ kfree(int_buffer); -+ -+ if (error == 0 && context->lvl != 0) -+ ROXML_PARSE_ERROR("mismatch in open/close nodes"); -+ return error; -+} -+ -+ROXML_API node_t *roxml_load_fd(int fd) -+{ -+ FILE *file = NULL; -+ node_t *current_node = NULL; -+ -+ if (fd < 0) -+ return NULL; -+ -+ file = fdopen(fd, "r"); -+ if (file == NULL) -+ return ROXML_INVALID_DOC; -+ -+ current_node = roxml_create_node(0, file, ROXML_ELM_NODE | ROXML_FILE); -+ -+ return roxml_load(current_node, file, NULL); -+} -+ -+ROXML_API node_t *roxml_load_doc(char *filename) -+{ -+ node_t *current_node = NULL; -+ FILE *file = fopen(filename, "rb"); -+ -+ if (file == NULL) -+ return ROXML_INVALID_DOC; -+ -+ current_node = roxml_create_node(0, file, ROXML_ELM_NODE | ROXML_FILE); -+ -+ return roxml_load(current_node, file, NULL); -+} diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0109-roxml_file.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0109-roxml_file.h.patch deleted file mode 100644 index beb19dd..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0109-roxml_file.h.patch +++ /dev/null @@ -1,51 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/libroxml/roxml_file.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/libroxml/roxml_file.h 2026-03-13 13:24:35.604652909 +0100 -@@ -0,0 +1,48 @@ -+/** -+ * \file roxml_file.h -+ * \brief File XML document backend -+ * -+ * (C) Copyright 2014 -+ * Tristan Lelong -+ * -+ * SPDX-Licence-Identifier: LGPL-2.1+ -+ * The author added a static linking exception, see License.txt. -+ */ -+ -+#ifndef ROXML_FILE_H -+#define ROXML_FILE_H -+ -+/** \brief read xml doc function -+ * -+ * \fn roxml_read_file(int pos, int size, char * buffer, node_t *node) -+ * this function read inside a xml file and fill the given buffer -+ * \param pos the pos in the xml document -+ * \param size the size of the data to read -+ * \param buffer the destination buffer -+ * \param node the node that belong to the tree we want to read to -+ * \return the number of bytes read -+ */ -+ROXML_INT int roxml_read_file(int pos, int size, char *buffer, node_t *node); -+ -+/** \brief unload function -+ * -+ * \fn void roxml_close_file(node_t *n); -+ * This function clear a document that was opened as part of a file -+ * \param n is any node of the tree to be cleaned -+ * \return void -+ */ -+ROXML_INT void roxml_close_file(node_t *root); -+ -+/** \brief generic load function -+ * -+ * \fn node_t* roxml_parse_file(roxml_load_ctx_t *context, roxml_parser_item_t *parser, FILE *file); -+ * This function parse a file document and all the corresponding nodes -+ * \param context internal data used for parsing -+ * \param parser the parser object to run -+ * \param file file pointer to the document -+ * \return an error code and filled context -+ * see roxml_close_buff -+ */ -+ROXML_INT int roxml_parse_file(roxml_load_ctx_t *context, roxml_parser_item_t *parser, FILE *file); -+ -+#endif /* ROXML_FILE_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0110-roxml_internal.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0110-roxml_internal.h.patch deleted file mode 100644 index 365b92c..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0110-roxml_internal.h.patch +++ /dev/null @@ -1,59 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/libroxml/roxml_internal.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/libroxml/roxml_internal.h 2026-03-13 13:24:35.604545340 +0100 -@@ -0,0 +1,56 @@ -+/** -+ * \file roxml_internal.h -+ * \brief internal header required by all libroxml sources -+ * -+ * (c) copyright 2014 -+ * tristan lelong -+ * -+ * SPDX-Licence-Identifier: lgpl-2.1+ -+ * the author added a static linking exception, see license.txt. -+ */ -+ -+#ifndef ROXML_INTERNAL_H -+#define ROXML_INTERNAL_H -+ -+#include -+ -+extern int errno; -+ -+#define ROXML_INT -+#ifdef __DEBUG -+#define ROXML_STATIC -+#else -+#define ROXML_STATIC static -+#endif -+#define ROXML_STATIC_INLINE static inline -+ -+/* STUB function are here to provide a consistent libroxml binary no matter -+ * what the configuration. They are located in a specific section that can be -+ * easily optimized out if necessary */ -+#define ROXML_STUB __attribute__((section("__stub"))) -+ -+/* PARSE functions are used when doing the parsing of document. This is a time -+ * sensitive section and all concerned function are stored inside a same section -+ */ -+/* SOO.tech */ -+#define ROXML_PARSE -+//#define ROXML_PARSE __attribute__((section("__parse"))) -+ -+/* PARSE_ERROR macro will raise an parsing error along with its reason */ -+#ifdef VERBOSE_PARSING -+#define ROXML_PARSE_ERROR(str) do { fprintf(stderr, "Parsing error at offset %d: %s\n", context->pos, str); errno = EINVAL; return -1; } while (0) -+#else /* VERBOSE_PARSING */ -+#define ROXML_PARSE_ERROR(str) do { errno = EINVAL; return -1; } while (0); -+#endif /* VERBOSE_PARSING */ -+ -+/* must be included first */ -+#include "roxml_tune.h" -+ -+#include "roxml_types.h" -+#include "roxml_defines.h" -+#include "roxml_utils.h" -+ -+/* must be included last */ -+#include -+ -+#endif /* ROXML_INTERNAL_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0111-roxml_mem.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0111-roxml_mem.c.patch deleted file mode 100644 index 4706941..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0111-roxml_mem.c.patch +++ /dev/null @@ -1,146 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/libroxml/roxml_mem.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/libroxml/roxml_mem.c 2026-03-13 13:24:35.604593368 +0100 -@@ -0,0 +1,143 @@ -+/** -+ * \file roxml_mem.c -+ * \brief XML internal memory management module -+ * -+ * (C) Copyright 2014 -+ * Tristan Lelong -+ * -+ * SPDX-Licence-Identifier: LGPL-2.1+ -+ * The author added a static linking exception, see License.txt. -+ */ -+ -+#include "roxml_mem.h" -+ -+/** \brief head of memory manager */ -+memory_cell_t head_cell = { PTR_NONE, 0, NULL, 0, NULL, NULL }; -+ -+ROXML_STATIC ROXML_INT inline void roxml_release_last(void *data) -+{ -+ memory_cell_t *ptr = &head_cell; -+ memory_cell_t *to_delete = NULL; -+ -+ while ((ptr->prev != NULL) && (ptr->prev->id != current->pid)) -+ ptr = ptr->prev; -+ -+ if (ptr->prev == NULL) -+ return; -+ -+ to_delete = ptr->prev; -+ -+ if (to_delete->next) { -+ to_delete->prev->next = to_delete->next; -+ to_delete->next->prev = to_delete->prev; -+ } else { -+ if (to_delete->prev != &head_cell) -+ head_cell.prev = to_delete->prev; -+ else -+ head_cell.prev = NULL; -+ to_delete->prev->next = NULL; -+ } -+ -+ if (PTR_IS_STAR(to_delete)) { -+ int i = 0; -+ for (i = 0; i < to_delete->occ; i++) -+ kfree(((void **)(to_delete->ptr))[i]); -+ } -+ if (to_delete->type != PTR_NONE) { -+ kfree(to_delete->ptr); -+ to_delete->type = PTR_NONE; -+ kfree(to_delete); -+ } -+} -+ -+ROXML_STATIC ROXML_INT inline void roxml_release_all(void *data) -+{ -+ memory_cell_t *to_delete = NULL; -+ -+ head_cell.prev = NULL; -+ -+ while ((head_cell.next != NULL)) { -+ to_delete = head_cell.next; -+ if (to_delete->next) -+ to_delete->next->prev = &head_cell; -+ head_cell.next = to_delete->next; -+ -+ if (PTR_IS_STAR(to_delete)) { -+ int i = 0; -+ for (i = 0; i < to_delete->occ; i++) -+ kfree(((void **)(to_delete->ptr))[i]); -+ } -+ kfree(to_delete->ptr); -+ to_delete->ptr = NULL; -+ to_delete->type = PTR_NONE; -+ kfree(to_delete); -+ } -+} -+ -+ROXML_STATIC ROXML_INT inline void roxml_release_pointer(void *data) -+{ -+ memory_cell_t *ptr = &head_cell; -+ memory_cell_t *to_delete = NULL; -+ -+ while ((ptr->next != NULL) && (ptr->next->ptr != data)) -+ ptr = ptr->next; -+ -+ if (ptr->next == NULL) -+ return; -+ -+ to_delete = ptr->next; -+ if (to_delete->next) { -+ to_delete->next->prev = ptr; -+ } else { -+ if (ptr == &head_cell) -+ head_cell.prev = NULL; -+ else -+ head_cell.prev = to_delete->prev; -+ } -+ ptr->next = to_delete->next; -+ if (PTR_IS_STAR(to_delete)) { -+ int i = 0; -+ for (i = 0; i < to_delete->occ; i++) -+ kfree(((void **)(to_delete->ptr))[i]); -+ } -+ kfree(to_delete->ptr); -+ to_delete->type = PTR_NONE; -+ kfree(to_delete); -+} -+ -+ROXML_API void roxml_release(void *data) -+{ -+ if (data == RELEASE_LAST) -+ roxml_release_last(data); -+ else if (data == RELEASE_ALL) -+ roxml_release_all(data); -+ else -+ roxml_release_pointer(data); -+ -+ if (head_cell.next == &head_cell) -+ head_cell.next = NULL; -+ if (head_cell.prev == &head_cell) -+ head_cell.prev = NULL; -+} -+ -+ROXML_INT void *roxml_malloc(int size, int num, int type) -+{ -+ memory_cell_t *cell = &head_cell; -+ while (cell->next != NULL) -+ cell = cell->next; -+ -+ cell->next = kmalloc(sizeof(memory_cell_t), GFP_KERNEL); -+ if (!cell->next) -+ return NULL; -+ -+ cell->next->next = NULL; -+ cell->next->prev = cell; -+ cell = cell->next; -+ cell->type = type; -+ cell->id = current->pid; -+ cell->occ = size; -+ cell->ptr = kcalloc(num, size, GFP_KERNEL); -+ head_cell.prev = cell; -+ -+ return cell->ptr; -+} diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0112-roxml_mem.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0112-roxml_mem.h.patch deleted file mode 100644 index 2da25cb..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0112-roxml_mem.h.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/libroxml/roxml_mem.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/libroxml/roxml_mem.h 2026-03-13 13:24:35.604839354 +0100 -@@ -0,0 +1,30 @@ -+/** -+ * \file roxml_mem.h -+ * \brief XML internal memory management module -+ * -+ * (c) copyright 2014 -+ * tristan lelong -+ * -+ * SPDX-Licence-Identifier: lgpl-2.1+ -+ * the author added a static linking exception, see license.txt. -+ */ -+ -+#ifndef ROXML_MEMORY_H -+#define ROXML_MEMORY_H -+ -+#include "roxml_internal.h" -+ -+extern memory_cell_t head_cell; -+ -+/** \brief alloc memory function -+ * -+ * \fn roxml_malloc(int size, int num, int type) -+ * this function allocate some memory that will be reachable at -+ * any time by libroxml memory manager -+ * \param size the size of memory to allocate for each elem -+ * \param num the number of element -+ * \param type the kind of pointer -+ */ -+ROXML_INT void *roxml_malloc(int size, int num, int type); -+ -+#endif /* ROXML_MEMORY_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0113-roxml_nav.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0113-roxml_nav.c.patch deleted file mode 100644 index e9f5199..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0113-roxml_nav.c.patch +++ /dev/null @@ -1,69 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/libroxml/roxml_nav.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/libroxml/roxml_nav.c 2026-03-13 13:24:35.604622399 +0100 -@@ -0,0 +1,66 @@ -+/** -+ * \file roxml_nav.c -+ * \brief XML document navigation module -+ * -+ * (C) Copyright 2014 -+ * Tristan Lelong -+ * -+ * SPDX-Licence-Identifier: LGPL-2.1+ -+ * The author added a static linking exception, see License.txt. -+ */ -+ -+#include "roxml_internal.h" -+ -+ROXML_API node_t *roxml_get_prev_sibling(node_t *n) -+{ -+ node_t *prev = NULL; -+ node_t *prev_elm = NULL; -+ -+ if (n == ROXML_INVALID_DOC) -+ return ROXML_INVALID_DOC; -+ -+ if (n->prnt) { -+ prev = n->prnt->chld; -+ while (prev && prev != n) { -+ if ((prev->type & ROXML_NODE_TYPES) == ROXML_ELM_NODE) { -+ prev_elm = prev; -+ } -+ prev = prev->sibl; -+ } -+ } -+ return prev_elm; -+} -+ -+ROXML_API node_t *roxml_get_next_sibling(node_t *n) -+{ -+ if (n == ROXML_INVALID_DOC) -+ return ROXML_INVALID_DOC; -+ -+ while (n->sibl && (n->sibl->type & ROXML_NODE_TYPES) != ROXML_ELM_NODE) { -+ n = n->sibl; -+ } -+ return n->sibl; -+} -+ -+ROXML_API node_t *roxml_get_parent(node_t *n) -+{ -+ if (n == ROXML_INVALID_DOC) -+ return ROXML_INVALID_DOC; -+ -+ if (n->prnt == NULL) -+ return n; -+ return n->prnt; -+} -+ -+ROXML_API node_t *roxml_get_root(node_t *n) -+{ -+ node_t *root; -+ -+ if (n == ROXML_INVALID_DOC) -+ return ROXML_INVALID_DOC; -+ -+ root = n; -+ while (root->prnt) -+ root = root->prnt; -+ return root; -+} diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0114-roxml_parser.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0114-roxml_parser.c.patch deleted file mode 100644 index 1dc4fe2..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0114-roxml_parser.c.patch +++ /dev/null @@ -1,185 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/libroxml/roxml_parser.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/libroxml/roxml_parser.c 2026-03-13 13:24:35.604727635 +0100 -@@ -0,0 +1,182 @@ -+/** -+ * \file roxml_parser.c -+ * \brief Parsing engine -+ * -+ * (C) Copyright 2014 -+ * Tristan Lelong -+ * -+ * SPDX-Licence-Identifier: LGPL-2.1+ -+ * The author added a static linking exception, see License.txt. -+ */ -+ -+#include -+ -+#include "roxml_parser.h" -+ -+/* #define DEBUG_PARSING */ -+#define ROXML_PARSER_NCELLS 256 -+#define ROXML_PARSER_NCELLS_MAX 512 -+ -+#define ROXML_PARSER_ITEM(parser, item) (parser + item) -+ -+static ROXML_INT int roxml_parser_multiple(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+ roxml_parser_item_t *item = ROXML_PARSER_ITEM(parser, *chunk)->next; -+ -+ /* collision can only occurs on callbacks -+ * that verify the chunk value so we can -+ * just call all cb in turns */ -+ while (item) { -+ int ret = item->func(parser, chunk, data); -+ -+ if (ret > 0) -+ return ret; -+ else if (ret < 0) -+ return -1; -+ item = item->next; -+ } -+ return 0; -+} -+ -+ROXML_INT roxml_parser_item_t *roxml_append_parser_item(roxml_parser_item_t *parser, char *key, roxml_parse_func func) -+{ -+ if (!parser) -+ parser = roxml_parser_allocate(); -+ -+ if (!ROXML_PARSER_ITEM(parser, *key)->func) { -+ /* first callback registered */ -+ ROXML_PARSER_ITEM(parser, *key)->func = func; -+ } else if (!ROXML_PARSER_ITEM(parser, *key)->next){ -+ /* second callback registered: -+ * 1) find free cells in collision pool -+ * 2) initialize cells -+ * 3) enable multiple callbacks. -+ */ -+ roxml_parser_item_t *collision = parser + ROXML_PARSER_NCELLS; -+ -+ while (collision->func) -+ collision++; -+ -+ /* relocate existing callback in collision pool */ -+ ROXML_PARSER_ITEM(parser, *key)->next = collision; -+ collision->func = ROXML_PARSER_ITEM(parser, *key)->func; -+ collision->next = collision + 1; -+ -+ /* next available callback is right after (since we do not free single entries) */ -+ collision++; -+ collision->func = func; -+ collision->next = NULL; -+ -+ ROXML_PARSER_ITEM(parser, *key)->func = roxml_parser_multiple; -+ } else { -+ /* third or more callback registered: just append */ -+ roxml_parser_item_t *last; -+ roxml_parser_item_t *collision = ROXML_PARSER_ITEM(parser, *key); -+ while (collision->next) -+ collision = collision->next; -+ last = collision; -+ while (collision->func) -+ collision++; -+ last->next = collision; -+ collision->func = func; -+ collision->next = NULL; -+ } -+ -+ return parser; -+} -+ -+ROXML_INT roxml_parser_item_t *roxml_parser_allocate(void) -+{ -+ roxml_parser_item_t *parser; -+ -+ /* allocate a new parser. -+ * 512 cells allow up to 256 collisions. */ -+ parser = kmalloc(sizeof(roxml_parser_item_t) * ROXML_PARSER_NCELLS_MAX, GFP_KERNEL); -+ memset(parser, 0 , sizeof(roxml_parser_item_t) * ROXML_PARSER_NCELLS_MAX); -+ -+ return parser; -+} -+ -+ROXML_INT void roxml_parser_free(roxml_parser_item_t *parser) -+{ -+ kfree(parser); -+} -+ -+ROXML_INT roxml_parser_item_t *roxml_parser_prepare(roxml_parser_item_t *parser) -+{ -+ int i; -+ roxml_parser_item_t *new; -+ roxml_parser_item_t *collision; -+ -+ new = roxml_parser_allocate(); -+ collision = new + ROXML_PARSER_NCELLS; -+ -+ for (i = 0; i < ROXML_PARSER_NCELLS; i++) { -+ /* copy parser and assign default */ -+ if (parser[i].func) { -+ new[i].func = parser[i].func; -+ -+ if (parser[i].next) { -+ roxml_parser_item_t *item = parser[i].next; -+ -+ new[i].next = collision; -+ -+ /* group all collision callbacks in collision pool */ -+ while (1) { -+ collision->func = item->func; -+ -+ if (item->next) -+ collision->next = collision + 1; -+ else -+ break; -+ -+ collision = collision->next; -+ item = item->next; -+ } -+ collision++; -+ } -+ } else { -+ new[i].func = parser[0].func; -+ new[i].next = parser[0].next; -+ } -+ } -+ -+ roxml_parser_free(parser); -+ -+ return new; -+} -+ -+ROXML_INT int roxml_parse_line(roxml_parser_item_t *parser, char *line, int len, void *ctx) -+{ -+ char *line_end = line; -+ char *chunk = line; -+ -+ if (len > 0) -+ line_end = line + len; -+ else -+ line_end = line + strlen(line); -+ -+ while (chunk < line_end) { -+ /* main callbacks */ -+ int ret = ROXML_PARSER_ITEM(parser, *chunk)->func(parser, chunk, ctx); -+ -+ if (ret > 0) { -+ chunk += ret; -+ continue; -+ } else if (ret < 0) { -+ return ret; -+ } -+ -+ /* default callbacks */ -+ ret = ROXML_PARSER_ITEM(parser, 0)->func(parser, chunk, ctx); -+ -+ if (ret > 0) { -+ chunk += ret; -+ continue; -+ } else if (ret < 0) { -+ return ret; -+ } -+ } -+ -+ return (chunk - line); -+} diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0115-roxml_parser.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0115-roxml_parser.h.patch deleted file mode 100644 index 1be0fe6..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0115-roxml_parser.h.patch +++ /dev/null @@ -1,69 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/libroxml/roxml_parser.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/libroxml/roxml_parser.h 2026-03-13 13:24:35.604780104 +0100 -@@ -0,0 +1,66 @@ -+/** -+ * \file roxml_parser.h -+ * \brief Parsing engine -+ * -+ * (c) copyright 2014 -+ * tristan lelong -+ * -+ * SPDX-Licence-Identifier: lgpl-2.1+ -+ * the author added a static linking exception, see license.txt. -+ */ -+ -+#ifndef ROXML_PARSER_H -+#define ROXML_PARSER_H -+ -+#include "roxml_internal.h" -+ -+/** \brief parser item creation function -+ * -+ * \fn roxml_append_parser_item(roxml_parser_item_t *parser, char * key, roxml_parse_func func); -+ * this function create a new parser item and append it to the parser list. -+ * \param parser the parser parser list or NULL for first item -+ * \param key the char to trigger callback for -+ * \param func the function to call on match -+ * \return the parser item -+ */ -+ROXML_INT roxml_parser_item_t *roxml_append_parser_item(roxml_parser_item_t * parser, char *key, roxml_parse_func func); -+ -+/** \brief parser table allocation -+ * -+ * \fn roxml_parser_allocate(void); -+ * this function allocate an empty parser object -+ * \return the allocated parser -+ */ -+ROXML_INT roxml_parser_item_t *roxml_parser_allocate(void); -+ -+/** \brief parser table deletion -+ * -+ * \fn roxml_parser_free(roxml_parser_item_t *parser); -+ * this function delete a prepared parser object -+ * \param parser the parser object -+ * \return -+ */ -+ROXML_INT void roxml_parser_free(roxml_parser_item_t * parser); -+ -+/** \brief parser preparation function -+ * -+ * \fn roxml_parser_prepare(roxml_parser_item_t *parser); -+ * this function compile a parser list into a table and calculate count variables for parsing optim -+ * \param parser the parser object -+ * \return -+ */ -+ROXML_INT roxml_parser_item_t *roxml_parser_prepare(roxml_parser_item_t * parser); -+ -+/** \brief line parsing function -+ * -+ * \fn roxml_parse_line(roxml_parser_item_t * parser, char *line, int len, void * ctx); -+ * this function parse a line : it calls parsing functions when key matches -+ * \param parser the parser object -+ * \param line the string to parse -+ * \param len the len of string or 0 if auto calculate len (using \0) -+ * \param ctx user data passed to the callbacks -+ * \return the number of bytes processed -+ */ -+ROXML_INT ROXML_PARSE int roxml_parse_line(roxml_parser_item_t * parser, char *line, int len, void *ctx); -+ -+#endif /* ROXML_PARSER_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0116-roxml_tune.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0116-roxml_tune.h.patch deleted file mode 100644 index 6e0b036..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0116-roxml_tune.h.patch +++ /dev/null @@ -1,98 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/libroxml/roxml_tune.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/libroxml/roxml_tune.h 2026-03-13 13:24:35.604495226 +0100 -@@ -0,0 +1,95 @@ -+/** -+ * \file roxml_tune.c -+ * \brief Tuning of libroxml behavior for embedded systems -+ * -+ * (C) Copyright 2014 -+ * Tristan Lelong -+ * -+ * SPDX-Licence-Identifier: LGPL-2.1+ -+ * The author added a static linking exception, see License.txt. -+ */ -+ -+/** \page roxml_tune tuning libroxml -+ * -+ * Being dedicated to embedded systems, libroxml include the ability to tune its behaviour. -+ * files \file roxml_tune.h, \file roxml_tiny.h and \file site.in are used for that purpose. -+ * -+ * \section tune -+ * This file describe all options that can be used. Each consist of a #define CONFIG_XML_xxx set to -+ * either 0 or 1. This file describes default values and should not be modified but to had options. -+ * -+ * The configure mecanism will be used to select which files needs to be compiled in. The roxml_stub -+ * will provide an empty stub API when function is disabled to make sure the library interface stays -+ * consistent. -+ * -+ * \section tune_end -+ * -+ */ -+ -+#ifndef ROXML_TUNE_H -+#define ROXML_TUNE_H -+ -+/* SOO.tech */ -+#define HAVE_CONFIG_H -+ -+#ifdef ROXML_DEF_H -+#error "roxml_defines.h must be included after roxml_tune.h to be tuned." -+#endif -+ -+#ifdef HAVE_CONFIG_H -+#include "config.h" -+#endif -+ -+/*************** Define the default behaviour **********************/ -+ -+/* Is the target library thread safe or not -+ * This option should be activated. -+ * If unsure, set to 1 -+ */ -+#ifndef CONFIG_XML_THREAD_SAFE -+#if(CONFIG_XML_HEAP_BUFFERS==1) -+#error "The CONFIG_XML_THREAD_SAFE option is not compatible with CONFIG_XML_HEAP_BUFFERS. Disable one of those." -+#endif -+#define CONFIG_XML_THREAD_SAFE 1 -+#endif /* CONFIG_XML_THREAD_SAFE */ -+ -+/* Is the target library uses stack for internal -+ * buffers or heap. Stack require some RAM while heap -+ * can cut off performances. -+ * This option should not be activated. -+ * If unsure, set to 0 -+ */ -+#ifndef CONFIG_XML_HEAP_BUFFERS -+#define CONFIG_XML_HEAP_BUFFERS 0 -+#endif /* CONFIG_XML_HEAP_BUFFERS */ -+ -+/* Define the size of internal buffer. -+ * For very small systems, large internal buffers -+ * can cause the systeml the behave strangely. -+ * This option should not be activated. -+ * If unsure, set to 0 -+ */ -+#ifndef CONFIG_XML_SMALL_BUFFER -+#define CONFIG_XML_SMALL_BUFFER 0 -+#endif /* CONFIG_XML_SMALL_BUFFER */ -+ -+/* Limit the size of input XML libroxml can handle -+ * to 64kb instead of 4Gb. -+ * Setting this option will reduce the size of RAM loaded tree -+ * This option should not be activated. -+ * If unsure, set to 0 -+ */ -+#ifndef CONFIG_XML_SMALL_INPUT_FILE -+#define CONFIG_XML_SMALL_INPUT_FILE 0 -+#endif /* CONFIG_XML_SMALL_INPUT_FILE */ -+ -+/*************** Implement HEAP/STACK BUFFERS **********************/ -+#if(CONFIG_XML_HEAP_BUFFERS==1) -+ #define ROXML_GET_BASE_BUFFER(name) char *name = malloc(ROXML_BASE_LEN) -+ #define ROXML_PUT_BASE_BUFFER(name) free(name) -+#else /* CONFIG_XML_HEAP_BUFFERS==0 */ -+ #define ROXML_GET_BASE_BUFFER(name) char name[ROXML_BASE_LEN] -+ #define ROXML_PUT_BASE_BUFFER(name) -+#endif /* CONFIG_XML_HEAP_BUFFERS */ -+ -+#endif /* ROXML_TUNE_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0117-roxml_types.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0117-roxml_types.h.patch deleted file mode 100644 index 8890ef0..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0117-roxml_types.h.patch +++ /dev/null @@ -1,231 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/libroxml/roxml_types.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/libroxml/roxml_types.h 2026-03-13 13:24:35.604529708 +0100 -@@ -0,0 +1,228 @@ -+/** -+ * \file roxml_types.c -+ * \brief Type definition for libroxml -+ * -+ * (C) Copyright 2014 -+ * Tristan Lelong -+ * -+ * SPDX-Licence-Identifier: LGPL-2.1+ -+ * The author added a static linking exception, see License.txt. -+ */ -+ -+#ifndef ROXML_TYPES_H -+#define ROXML_TYPES_H -+ -+//#include -+#include "roxml_defines.h" -+ -+/** \typedef roxml_pos_t -+ * -+ * \brief type for node indexes in raw tree -+ * -+ * this is the type used for node indexes in raw tree. -+ * this type induce a maximum size for XML document -+ * that can be handled (both from file or buffer) -+ */ -+#if(CONFIG_XML_SMALL_INPUT_FILE==1) -+typedef unsigned short roxml_pos_t; -+#else /* CONFIG_XML_SMALL_INPUT_FILE==0 */ -+typedef unsigned int roxml_pos_t; -+#endif /* CONFIG_XML_SMALL_INPUT_FILE */ -+ -+/** \struct memory_cell_t -+ * -+ * \brief memory cell structure -+ * -+ * This is the structure for a memory cell. It contains the -+ * pointer info and type. It also contains the caller id so that -+ * it can free without reference to a specific pointer -+ */ -+typedef struct memory_cell { -+ int type; /*!< pointer type from PTR_NODE, PTR_CHAR... */ -+ int occ; /*!< number of element */ -+ void *ptr; /*!< pointer */ -+ unsigned long int id; /*!< thread id of allocator */ -+ struct memory_cell *next; /*!< next memory cell */ -+ struct memory_cell *prev; /*!< prev memory cell */ -+} memory_cell_t; -+ -+/** \struct xpath_cond_t -+ * -+ * \brief xpath cond structure -+ * -+ * This is the structure for a xpath cond. It contains the -+ * node condition -+ */ -+typedef struct _xpath_cond { -+ char rel; /*!< relation with previous */ -+ char axes; /*!< axes for operator */ -+ char op; /*!< operator used */ -+ char op2; /*!< operator used on arg2 */ -+ char func; /*!< function to process */ -+ char func2; /*!< function to process in arg2 */ -+ char *arg1; /*!< condition arg1 as string */ -+ char *arg2; /*!< condition arg2 as string */ -+ struct _xpath_node *xp; /*!< xpath that have to be resolved for condition */ -+ struct _xpath_cond *next; /*!< next xpath condition pointer */ -+} xpath_cond_t; -+ -+/** \struct xpath_node_t -+ * -+ * \brief xpath node structure -+ * -+ * This is the structure for a xpath node. It contains the -+ * node axes and conditions -+ */ -+typedef struct _xpath_node { -+ char abs; /*!< for first node: is path absolute */ -+ char rel; /*!< relation with previous */ -+ char axes; /*!< axes type */ -+ char *name; /*!< axes string */ -+ struct _xpath_cond *xp_cond; /*!< condition for total xpath */ -+ struct _xpath_cond *cond; /*!< condition list */ -+ struct _xpath_node *next; /*!< next xpath pointer */ -+} xpath_node_t; -+ -+/** \struct xpath_tok_table_t -+ * -+ * \brief xpath token structure -+ * -+ * This is the structure for a xpath token. It contains the -+ * xpath id -+ */ -+typedef struct _xpath_tok_table { -+ unsigned char id; /*!< token id == ROXML_REQTABLE_ID */ -+ unsigned char ids[256]; /*!< token id table */ -+ void *lock; /*!< token table allocation mutex */ -+ struct _xpath_tok *next; /*!< next xpath token */ -+} xpath_tok_table_t; -+ -+/** \struct xpath_tok_t -+ * -+ * \brief xpath token structure -+ * -+ * This is the structure for a xpath token. It contains the -+ * xpath id -+ */ -+typedef struct _xpath_tok { -+ unsigned char id; /*!< token id starts at ROXML_XPATH_FIRST_ID */ -+ struct _xpath_tok *next; /*!< next xpath token */ -+} xpath_tok_t; -+ -+/** \struct roxml_ns_t -+ * -+ * \brief namespace structure -+ * -+ * This is the structure for a namespace. It contains the -+ * namespace alias -+ */ -+typedef struct _roxml_ns { -+ unsigned char id; /*!< priv id == ROXML_NS_ID */ -+ void *next; /*!< one other priv data is following */ -+ char *alias; /*!< ns alias */ -+} roxml_ns_t; -+ -+/** \struct node_t -+ * -+ * \brief node_t structure -+ * -+ * This is the structure for a node. This struct is very -+ * little as it only contains offset for node in file and -+ * tree links -+ */ -+typedef struct node { -+ unsigned short type; /*!< document or buffer / attribute or value */ -+ union { -+ char *buf; /*!< buffer address */ -+ FILE *fil; /*!< loaded document */ -+ void *src; /*!< xml src address */ -+ } src; /*!< xml tree source */ -+ roxml_pos_t pos; /*!< offset of begining of opening node in file */ -+ roxml_pos_t end; /*!< offset of begining of closing node in file */ -+ struct node *sibl; /*!< ref to brother */ -+ struct node *chld; /*!< ref to chld */ -+ struct node *prnt; /*!< ref to parent */ -+ struct node *attr; /*!< ref to attribute */ -+ struct node *next; /*!< ref to last chld (internal use) */ -+ struct node *ns; /*!< ref to namespace definition */ -+ void *priv; /*!< ref to xpath tok (internal use) or alias for namespaces */ -+} node_t; -+ -+/** \struct roxml_load_ctx_t -+ * -+ * \brief xml parsing context -+ * -+ * obscure structure that contains all the xml -+ * parsing variables -+ */ -+typedef struct _roxml_load_ctx { -+ int pos; /*!< position in file */ -+ int lvl; /*!< nested elem count */ -+ int empty_text_node; /*!< if text node is empty (only contains tabs, spaces, carriage return and line feed */ -+ int state; /*!< state (state machine main var) */ -+ int previous_state; /*!< previous state */ -+ int mode; /*!< mode quoted or normal */ -+ int inside_node_state; /*!< sub state for attributes */ -+ int content_quoted; /*!< content of attribute was quoted */ -+ int type; /*!< source type (file or buffer) */ -+ int nsdef; /*!< indicate if this is a nsdef */ -+ int ns; /*!< indicate if a ns is used for this node */ -+ void *src; /*!< source (file or buffer) */ -+ node_t *candidat_node; /*!< node being processed */ -+ node_t *candidat_txt; /*!< text node being processed */ -+ node_t *candidat_arg; /*!< attr node being processed */ -+ node_t *candidat_val; /*!< attr value being processed */ -+ node_t *current_node; /*!< current node */ -+ node_t *namespaces; /*!< available namespaces */ -+ node_t *last_ns; /*!< last declared namespaces */ -+ char curr_name[MAX_NAME_LEN+1]; /*!< current node name (attr or elm) */ -+ int curr_name_len; /*!< current node name (attr or elm) lenght */ -+ int doctype; /*!< nested doctype count */ -+} roxml_load_ctx_t; -+ -+/** \struct roxml_xpath_ctx_t -+ * \brief xpath parsing context -+ * -+ * obscure structure that contains all the xapth -+ * parsing variables -+ */ -+typedef struct _roxml_xpath_ctx { -+ int pos; /*!< position in string */ -+ int is_first_node; /*!< is it the first node of xpath */ -+ int wait_first_node; /*!< are we waiting for the first node of a xpath */ -+ int shorten_cond; /*!< is the cond a short condition */ -+ int nbpath; /*!< number of xpath in this string */ -+ int bracket; /*!< are we inside two brackets */ -+ int parenthesys; /*!< are we inside two parenthesys */ -+ int quoted; /*!< are we quoted (') */ -+ int dquoted; /*!< are we double quoted (") */ -+ int context; /*!< is it an inside xpath */ -+ int content_quoted; /*!< content of val was quoted */ -+ xpath_node_t *first_node; /*!< the very first node of xpath string */ -+ xpath_node_t *new_node; /*!< current xpath node */ -+ xpath_cond_t *new_cond; /*!< current xpath cond */ -+} roxml_xpath_ctx_t; -+ -+/** \typedef roxml_parse_func -+ * -+ * \brief parser callback functions -+ * -+ * This is the prototype for a parser callback function. It receive as argument -+ * the chunk that matched the key, and the context as a void. It should return the -+ * number of handled bytes or 0 if doesn't want to handle this key -+ */ -+typedef struct _roxml_parser_item roxml_parser_item_t; -+typedef int (*roxml_parse_func) (roxml_parser_item_t *parser, char *chunk, void *data); -+ -+/** \struct roxml_parser_item_t -+ * -+ * \brief the parser item struct -+ * -+ * this struct contains the key and callback. -+ */ -+struct _roxml_parser_item { -+ roxml_parse_func func; /*!< callback function */ -+ struct _roxml_parser_item *next; /*!< next item (default or multiple) */ -+}; -+ -+#endif /* ROXML_TYPES_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0118-roxml_utils.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0118-roxml_utils.h.patch deleted file mode 100644 index 8cd0c43..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0118-roxml_utils.h.patch +++ /dev/null @@ -1,130 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/libroxml/roxml_utils.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/libroxml/roxml_utils.h 2026-03-13 13:24:35.604823861 +0100 -@@ -0,0 +1,127 @@ -+/** -+ * \file roxml_utils.h -+ * \brief misc functions required in libroxml -+ * -+ * (C) Copyright 2015 -+ * Tristan Lelong -+ * -+ * SPDX-Licence-Identifier: LGPL-2.1+ -+ * The author added a static linking exception, see License.txt. -+ */ -+ -+#ifndef ROXML_UTILS_H -+#define ROXML_UTILS_H -+ -+#include -+#include -+ -+#include -+ -+#include -+ -+#if defined(_WIN32) -+#include "roxml_win32_native.h" -+#else -+ -+#endif -+ -+#if(CONFIG_XML_THREAD_SAFE==0) -+ROXML_STATIC_INLINE ROXML_INT unsigned long int roxml_thread_id(node_t *n) -+{ -+ return 0; -+} -+ -+ROXML_STATIC_INLINE ROXML_INT int roxml_lock_init(node_t *n) -+{ -+ return 0; -+} -+ -+ROXML_STATIC_INLINE ROXML_INT int roxml_lock_destroy(node_t *n) -+{ -+ return 0; -+} -+ -+ROXML_STATIC_INLINE ROXML_INT int roxml_lock(node_t *n) -+{ -+ return 0; -+} -+ -+ROXML_STATIC_INLINE ROXML_INT int roxml_unlock(node_t *n) -+{ -+ return 0; -+} -+#else /* CONFIG_XML_THREAD_SAFE==1 */ -+ROXML_STATIC_INLINE ROXML_INT unsigned long int roxml_thread_id(node_t *n) -+{ -+ /* return pthread_self(); */ -+ return current->pid; -+} -+ -+ROXML_STATIC_INLINE ROXML_INT int roxml_lock_init(node_t *n) -+{ -+ xpath_tok_table_t *table = (xpath_tok_table_t *)n->priv; -+ table->lock = kmalloc(sizeof(struct mutex), GFP_KERNEL); -+ -+ mutex_init((struct mutex *) table->lock); -+ -+ return 0; -+} -+ -+ROXML_STATIC_INLINE ROXML_INT int roxml_lock_destroy(node_t *n) -+{ -+ xpath_tok_table_t *table = (xpath_tok_table_t *)n->priv; -+ -+ kfree(table->lock); -+ -+ return 0; -+} -+ -+ROXML_STATIC_INLINE ROXML_INT int roxml_lock(node_t *n) -+{ -+ xpath_tok_table_t *table; -+ while (n->prnt) -+ n = n->prnt; -+ -+ table = (xpath_tok_table_t *)n->priv; -+ -+ mutex_lock((struct mutex *) table->lock); -+ -+ return 0; -+} -+ -+ROXML_STATIC_INLINE ROXML_INT int roxml_unlock(node_t *n) -+{ -+ xpath_tok_table_t *table; -+ while (n->prnt) -+ n = n->prnt; -+ -+ table = (xpath_tok_table_t *)n->priv; -+ -+ mutex_unlock((struct mutex *) table->lock); -+ -+ return 0; -+} -+#endif /* CONFIG_XML_THREAD_SAFE */ -+ -+#ifdef CONFIG_XML_FLOAT -+ROXML_STATIC_INLINE ROXML_INT double roxml_strtonum(const char *str, char **end) -+{ -+ return strtod(str, end); -+} -+#else /* CONFIG_XML_FLOAT */ -+ROXML_STATIC_INLINE ROXML_INT double roxml_strtonum(const char *str, char **end) -+{ -+ int value = strtol(str, end, 0); -+ -+ /* if the value is a float: -+ * it must be considered a number and we floor it -+ */ -+ if (end && *end && **end == '.') -+ strtol(*(end+1), end, 0); -+ -+ return value; -+ -+} -+#endif /* CONFIG_XML_FLOAT */ -+ -+#endif /* ROXML_UTILS */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0119-roxml_win32_native.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0119-roxml_win32_native.h.patch deleted file mode 100644 index 7237173..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0119-roxml_win32_native.h.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/libroxml/roxml_win32_native.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/libroxml/roxml_win32_native.h 2026-03-13 13:24:35.604808984 +0100 -@@ -0,0 +1,34 @@ -+/** -+ * \file roxml_win32_native.h -+ * \brief special definitions for windows native build -+ * -+ * (C) Copyright 2014 -+ * Tristan Lelong -+ * -+ * SPDX-Licence-Identifier: LGPL-2.1+ -+ * The author added a static linking exception, see License.txt. -+ */ -+ -+#ifndef ROXML_WIN32_NATIVE_THREAD_H -+#define ROXML_WIN32_NATIVE_THREAD_H -+ -+#if defined(_MSC_VER) && _MSC_VER >= 1400 -+#ifndef _CRT_SECURE_NO_DEPRECATE -+#define _CRT_SECURE_NO_DEPRECATE -+#endif -+#pragma warning(disable: 4996) -+#endif -+ -+#define WIN32_LEAN_AND_MEAN -+#include -+ -+typedef HANDLE pthread_t; -+typedef CRITICAL_SECTION pthread_mutex_t; -+ -+#define pthread_self() GetCurrentThread() -+#define pthread_mutex_init(a, b) InitializeCriticalSection(a) -+#define pthread_mutex_lock(a) EnterCriticalSection(a) -+#define pthread_mutex_unlock(a) LeaveCriticalSection(a) -+#define pthread_mutex_destroy(a) DeleteCriticalSection(a) -+ -+#endif /* ROXML_WIN32_NATIVE_THREAD_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0120-roxml_xpath.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0120-roxml_xpath.c.patch deleted file mode 100644 index e4def8d..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0120-roxml_xpath.c.patch +++ /dev/null @@ -1,1648 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/libroxml/roxml_xpath.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/libroxml/roxml_xpath.c 2026-03-13 13:24:35.604561492 +0100 -@@ -0,0 +1,1645 @@ -+/** -+ * \file roxml_xpath.c -+ * \brief xpath execution module -+ * -+ * (C) Copyright 2014 -+ * Tristan Lelong -+ * -+ * SPDX-Licence-Identifier: LGPL-2.1+ -+ * The author added a static linking exception, see License.txt. -+ */ -+ -+#include -+ -+#include "roxml_mem.h" -+#include "roxml_core.h" -+#include "roxml_xpath.h" -+#include "roxml_parser.h" -+ -+#undef current -+ -+/** \brief number tester -+ * -+ * \fn int roxml_is_number(char *input); -+ * This function tells if a string is a number -+ * \param input string to test -+ * \return 1 if the string was a number else 0 -+ */ -+ROXML_STATIC ROXML_INT int roxml_is_number(char *input) -+{ -+ char *end; -+ int is_number = 0; -+ -+ /* -+ * we don't need the value per se and some compiler will -+ * complain about an initialized but unused variable if we -+ * get it. -+ */ -+ roxml_strtonum(input, &end); -+ -+ if ((end == NULL) || -+ (roxml_is_separator(end[0])) || -+ (end[0] == '"') || -+ (end[0] == '\'') || -+ (end[0] == '\0')) { -+ is_number = 1; -+ } -+ -+ return is_number; -+} -+ -+/** \brief xpath condition free function -+ * -+ * \fn roxml_free_xcond(xpath_cond_t *xcond); -+ * this function frees an xpath_cond_t cell -+ * \param xcond the xcond to free -+ * \return -+ */ -+ROXML_STATIC ROXML_INT void roxml_free_xcond(xpath_cond_t *xcond) -+{ -+ if (xcond->next) -+ roxml_free_xcond(xcond->next); -+ if (xcond->xp) -+ roxml_free_xpath(xcond->xp, xcond->func2); -+ kfree(xcond); -+} -+ -+ROXML_INT void roxml_free_xpath(xpath_node_t *xpath, int nb) -+{ -+ int i = 0; -+ for (i = 0; i < nb; i++) { -+ if (xpath[i].next) -+ roxml_free_xpath(xpath[i].next, 1); -+ if (xpath[i].cond) -+ roxml_free_xcond(xpath[i].cond); -+ kfree(xpath[i].xp_cond); -+ } -+ kfree(xpath); -+} -+ -+/** \brief node pool presence tester function -+ * -+ * \fn roxml_in_pool(node_t *root, node_t *n, int req_id); -+ * this function test is a node is in a pool -+ * \param root the root of the tree -+ * \param n the node to test -+ * \param req_id the pool id -+ * \return -+ */ -+ROXML_STATIC ROXML_INT int roxml_in_pool(node_t *root, node_t *n, int req_id) -+{ -+ roxml_lock(root); -+ if (n->priv) { -+ xpath_tok_t *tok = (xpath_tok_t *)n->priv; -+ if (tok->id == req_id) { -+ roxml_unlock(root); -+ return 1; -+ } else { -+ while (tok) { -+ if (tok->id == req_id) { -+ roxml_unlock(root); -+ return 1; -+ } -+ tok = tok->next; -+ } -+ } -+ } -+ roxml_unlock(root); -+ -+ return 0; -+} -+ -+/** \brief pool node delete function -+ * -+ * \fn roxml_del_from_pool(node_t *root, node_t *n, int req_id); -+ * this function remove one node from a pool -+ * \param root the root of the tree -+ * \param n the node to remove -+ * \param req_id the pool id -+ * \return -+ */ -+ROXML_STATIC ROXML_INT void roxml_del_from_pool(node_t *root, node_t *n, int req_id) -+{ -+ roxml_lock(root); -+ if (n->priv) { -+ xpath_tok_t *prev = (xpath_tok_t *)n->priv; -+ xpath_tok_t *tok = (xpath_tok_t *)n->priv; -+ if (tok->id == req_id) { -+ n->priv = (void *)tok->next; -+ kfree(tok); -+ } else { -+ while (tok) { -+ if (tok->id == req_id) { -+ prev->next = tok->next; -+ kfree(tok); -+ break; -+ } -+ prev = tok; -+ tok = tok->next; -+ } -+ } -+ } -+ roxml_unlock(root); -+} -+ -+/** \brief add a token top node function -+ * -+ * \fn roxml_add_to_pool(node_t *root, node_t *n, int req_id); -+ * this function add a token to target node. This token is used to garanty -+ * unicity in xpath results -+ * \param root the root node -+ * \param n the node to mark -+ * \param req_id the id to use -+ * \return 0 if already in the pool, else 1 -+ */ -+ROXML_STATIC ROXML_INT int roxml_add_to_pool(node_t *root, node_t *n, int req_id) -+{ -+ xpath_tok_t *tok; -+ xpath_tok_t *last_tok = NULL; -+ -+ if (req_id == 0) -+ return 1; -+ -+ roxml_lock(root); -+ tok = (xpath_tok_t *)n->priv; -+ -+ while (tok) { -+ if (tok->id == req_id) { -+ roxml_unlock(root); -+ return 0; -+ } -+ last_tok = tok; -+ tok = (xpath_tok_t *)tok->next; -+ } -+ if (last_tok == NULL) { -+ n->priv = kcalloc(1, sizeof(xpath_tok_t), GFP_KERNEL); -+ last_tok = (xpath_tok_t *)n->priv; -+ } else { -+ last_tok->next = kcalloc(1, sizeof(xpath_tok_t), GFP_KERNEL); -+ last_tok = last_tok->next; -+ } -+ last_tok->id = req_id; -+ roxml_unlock(root); -+ -+ return 1; -+} -+ -+/** \brief release id function -+ * -+ * \fn roxml_release_id(node_t *root, node_t **pool, int pool_len, int req_id); -+ * this function release a previously required id and remove all id token from the pool -+ * \param root the root of the tree that was used for id request -+ * \param pool the result from xpath search using this id -+ * \param pool_len the number of node in pool -+ * \param req_id the id to release -+ * \return -+ */ -+ROXML_STATIC ROXML_INT void roxml_release_id(node_t *root, node_t **pool, int pool_len, int req_id) -+{ -+ int i; -+ xpath_tok_table_t *table = (xpath_tok_table_t *)root->priv; -+ -+ for (i = 0; i < pool_len; i++) -+ roxml_del_from_pool(root, pool[i], req_id); -+ -+ roxml_lock(root); -+ table->ids[req_id] = 0; -+ roxml_unlock(root); -+} -+ -+/** \brief id reservation function -+ * -+ * \fn roxml_request_id(node_t *root); -+ * this function request an available id for a new xpath search on the tree -+ * \param root the root of the tree where id table is stored -+ * \return the id between 1 - 255 or -1 if failed -+ */ -+ROXML_STATIC ROXML_INT int roxml_request_id(node_t *root) -+{ -+ int i = 0; -+ xpath_tok_table_t *table = (xpath_tok_table_t *)root->priv; -+ -+ roxml_lock(root); -+ for (i = ROXML_XPATH_FIRST_ID; i < 255; i++) { -+ if (table->ids[i] == 0) { -+ table->ids[i]++; -+ roxml_unlock(root); -+ return i; -+ } -+ } -+ roxml_unlock(root); -+ -+ return -1; -+} -+ -+/** \brief node set and function -+ * -+ * \fn roxml_compute_and(node_t *root, node_t **node_set, int *count, int cur_req_id, int prev_req_id); -+ * this function computes the AND of two node pools. The resulting pool will have the same ID as cur_req_id. -+ * \param root the root of the tree -+ * \param node_set the node set containing the 2 pools -+ * \param count number of node in the node set -+ * \param cur_req_id the id of the first group -+ * \param prev_req_id the id of the second group -+ */ -+ROXML_STATIC ROXML_INT void roxml_compute_and(node_t *root, node_t **node_set, int *count, int cur_req_id, -+ int prev_req_id) -+{ -+ int i = 0; -+ int limit = *count; -+ int pool1 = 0, pool2 = 0; -+ -+ for (i = 0; i < limit; i++) { -+ if (pool1 == 0) -+ if (roxml_in_pool(root, node_set[i], cur_req_id)) -+ pool1++; -+ if (pool2 == 0) -+ if (roxml_in_pool(root, node_set[i], prev_req_id)) -+ pool2++; -+ if (pool1 && pool2) -+ break; -+ } -+ -+ if (!pool1 || !pool2) { -+ for (i = 0; i < limit; i++) { -+ roxml_del_from_pool(root, node_set[i], cur_req_id); -+ roxml_del_from_pool(root, node_set[i], prev_req_id); -+ } -+ *count = 0; -+ } -+} -+ -+/** \brief node set or function -+ * -+ * \fn roxml_compute_or(node_t *root, node_t **node_set, int *count, int req_id, int glob_id); -+ * this function computes the OR of two node pools. The resulting pool will have the same ID as glob_id. -+ * \param root the root of the tree -+ * \param node_set the node set containing the 2 pools -+ * \param count number of node in the node set -+ * \param req_id the id of the first group -+ * \param glob_id the id of the second group -+ * \return -+ */ -+ROXML_STATIC ROXML_INT void roxml_compute_or(node_t *root, node_t **node_set, int *count, int req_id, int glob_id) -+{ -+ int i = 0; -+ for (i = 0; i < *count; i++) { -+ if (roxml_in_pool(root, node_set[i], req_id)) { -+ roxml_add_to_pool(root, node_set[i], glob_id); -+ roxml_del_from_pool(root, node_set[i], req_id); -+ } -+ } -+} -+ -+/** \brief xpath parsing function -+ * -+ * \fn roxml_parse_xpath(char *path, xpath_node_t **xpath, int context); -+ * this function convert an xpath string to a table of list of xpath_node_t -+ * \param path the xpath string -+ * \param xpath the parsed xpath -+ * \param context 0 for a real xpath, 1 for a xpath in predicat -+ * \return the number of xpath list in the table -+ */ -+ROXML_STATIC ROXML_INT int roxml_parse_xpath(char *path, xpath_node_t **xpath, int context) -+{ -+ int ret = 0; -+ roxml_xpath_ctx_t ctx; -+ roxml_parser_item_t *parser = NULL; -+ ctx.pos = 0; -+ ctx.nbpath = 1; -+ ctx.bracket = 0; -+ ctx.parenthesys = 0; -+ ctx.quoted = 0; -+ ctx.dquoted = 0; -+ ctx.content_quoted = 0; -+ ctx.is_first_node = 1; -+ ctx.wait_first_node = 1; -+ ctx.shorten_cond = 0; -+ ctx.context = context; -+ ctx.first_node = kcalloc(1, sizeof(xpath_node_t), GFP_KERNEL); -+ ctx.new_node = ctx.first_node; -+ ctx.new_cond = NULL; -+ ctx.first_node->rel = ROXML_OPERATOR_OR; -+ -+ parser = roxml_append_parser_item(parser, " ", _func_xpath_ignore); -+ parser = roxml_append_parser_item(parser, "\t", _func_xpath_ignore); -+ parser = roxml_append_parser_item(parser, "\n", _func_xpath_ignore); -+ parser = roxml_append_parser_item(parser, "\r", _func_xpath_ignore); -+ parser = roxml_append_parser_item(parser, "\"", _func_xpath_dquote); -+ parser = roxml_append_parser_item(parser, "\'", _func_xpath_quote); -+ parser = roxml_append_parser_item(parser, "/", _func_xpath_new_node); -+ parser = roxml_append_parser_item(parser, "(", _func_xpath_open_parenthesys); -+ parser = roxml_append_parser_item(parser, ")", _func_xpath_close_parenthesys); -+ parser = roxml_append_parser_item(parser, "[", _func_xpath_open_brackets); -+ parser = roxml_append_parser_item(parser, "]", _func_xpath_close_brackets); -+ parser = roxml_append_parser_item(parser, "=", _func_xpath_operator_equal); -+ parser = roxml_append_parser_item(parser, ">", _func_xpath_operator_sup); -+ parser = roxml_append_parser_item(parser, "<", _func_xpath_operator_inf); -+ parser = roxml_append_parser_item(parser, "!", _func_xpath_operator_diff); -+ parser = roxml_append_parser_item(parser, "0", _func_xpath_number); -+ parser = roxml_append_parser_item(parser, "1", _func_xpath_number); -+ parser = roxml_append_parser_item(parser, "2", _func_xpath_number); -+ parser = roxml_append_parser_item(parser, "3", _func_xpath_number); -+ parser = roxml_append_parser_item(parser, "4", _func_xpath_number); -+ parser = roxml_append_parser_item(parser, "5", _func_xpath_number); -+ parser = roxml_append_parser_item(parser, "6", _func_xpath_number); -+ parser = roxml_append_parser_item(parser, "7", _func_xpath_number); -+ parser = roxml_append_parser_item(parser, "8", _func_xpath_number); -+ parser = roxml_append_parser_item(parser, "9", _func_xpath_number); -+ parser = roxml_append_parser_item(parser, "+", _func_xpath_operator_add); -+ parser = roxml_append_parser_item(parser, "-", _func_xpath_operator_subs); -+ parser = roxml_append_parser_item(parser, ROXML_PATH_OR, _func_xpath_path_or); -+ parser = roxml_append_parser_item(parser, ROXML_COND_OR, _func_xpath_condition_or); -+ parser = roxml_append_parser_item(parser, ROXML_COND_AND, _func_xpath_condition_and); -+ parser = roxml_append_parser_item(parser, ROXML_FUNC_POS_STR, _func_xpath_position); -+ parser = roxml_append_parser_item(parser, ROXML_FUNC_FIRST_STR, _func_xpath_first); -+ parser = roxml_append_parser_item(parser, ROXML_FUNC_LAST_STR, _func_xpath_last); -+ parser = roxml_append_parser_item(parser, ROXML_FUNC_NSURI_STR, _func_xpath_nsuri); -+ parser = roxml_append_parser_item(parser, ROXML_FUNC_LNAME_STR, _func_xpath_lname); -+ parser = roxml_append_parser_item(parser, "", _func_xpath_default); -+ -+ parser = roxml_parser_prepare(parser); -+ ret = roxml_parse_line(parser, path, 0, &ctx); -+ roxml_parser_free(parser); -+ -+ if (ret >= 0) { -+ if (xpath) -+ *xpath = ctx.first_node; -+ return ctx.nbpath; -+ } -+ -+ roxml_free_xpath(ctx.first_node, ctx.nbpath); -+ return -1; -+} -+ -+/** \brief node absolute position get -+ * -+ * \fn roxml_get_node_internal_position(node_t *n); -+ * this function returns the absolute position of the node between siblings -+ * \param n the node -+ * \return the absolute position starting at 1 -+ */ -+ROXML_STATIC ROXML_INT int roxml_get_node_internal_position(node_t *n) -+{ -+ int idx = 1; -+ node_t *prnt; -+ node_t *first; -+ if (n == NULL) -+ return 0; -+ -+ prnt = n->prnt; -+ if (!prnt) -+ return 1; -+ first = prnt->chld; -+ -+ while ((first) && (first != n)) { -+ idx++; -+ first = first->sibl; -+ } -+ -+ return idx; -+} -+ -+/** \brief double operation function -+ * -+ * \fn roxml_double_oper(double a, double b, int op); -+ * this function compare two doubles using one defined operator -+ * \param a first operand -+ * \param b second operand -+ * \param op the operator to use -+ * \return 1 if comparison is ok, esle 0 -+ */ -+ROXML_STATIC ROXML_INT double roxml_double_oper(double a, double b, int op) -+{ -+ if (op == ROXML_OPERATOR_ADD) -+ return (a + b); -+ else if (op == ROXML_OPERATOR_SUB) -+ return (a - b); -+ else if (op == ROXML_OPERATOR_MUL) -+ return (a * b); -+ else if (op == ROXML_OPERATOR_DIV) -+ return (a / b); -+ return 0; -+} -+ -+/** \brief double comparison function -+ * -+ * \fn roxml_double_cmp(double a, double b, int op); -+ * this function compare two doubles using one defined operator -+ * \param a first operand -+ * \param b second operand -+ * \param op the operator to use -+ * \return 1 if comparison is ok, esle 0 -+ */ -+ROXML_STATIC ROXML_INT int roxml_double_cmp(double a, double b, int op) -+{ -+ if (op == ROXML_OPERATOR_DIFF) -+ return (a != b); -+ else if (op == ROXML_OPERATOR_EINF) -+ return (a <= b); -+ else if (op == ROXML_OPERATOR_INF) -+ return (a < b); -+ else if (op == ROXML_OPERATOR_ESUP) -+ return (a >= b); -+ else if (op == ROXML_OPERATOR_SUP) -+ return (a > b); -+ else if (op == ROXML_OPERATOR_EQU) -+ return (a == b); -+ return 0; -+} -+ -+/** \brief string comparison function -+ * -+ * \fn roxml_string_cmp(char *sa, char *sb, int op); -+ * this function compare two strings using one defined operator -+ * \param sa first operand -+ * \param sb second operand -+ * \param op the operator to use -+ * \return 1 if comparison is ok, else 0 -+ */ -+ROXML_STATIC ROXML_INT int roxml_string_cmp(char *sa, char *sb, int op) -+{ -+ int result; -+ -+ if (!sa) -+ sa = ""; -+ if (!sb) -+ sb = ""; -+ -+ result = strcmp(sa, sb); -+ -+ if (op == ROXML_OPERATOR_DIFF) -+ return (result != 0); -+ else if (op == ROXML_OPERATOR_EINF) -+ return (result <= 0); -+ else if (op == ROXML_OPERATOR_INF) -+ return (result < 0); -+ else if (op == ROXML_OPERATOR_ESUP) -+ return (result >= 0); -+ else if (op == ROXML_OPERATOR_SUP) -+ return (result > 0); -+ else if (op == ROXML_OPERATOR_EQU) -+ return (result == 0); -+ return 0; -+} -+ -+/** \brief predicat validation function -+ * -+ * \fn roxml_validate_predicat(xpath_node_t *xn, xpath_cond_t *condition, node_t *candidat); -+ * this function check for predicat validity. predicat is part between brackets -+ * \param xn the xpath node containing the predicat to test -+ * \param condition the xpath condition to test -+ * \param candidat the node to test -+ * \return 1 if predicat is validated, else 0 -+ */ -+ROXML_STATIC ROXML_INT int roxml_validate_predicat(xpath_node_t *xn, xpath_cond_t *condition, node_t *candidat) -+{ -+ int valid; -+ -+ if (!condition) -+ return 1; -+ -+ valid = (condition->rel == ROXML_OPERATOR_AND); -+ -+ while (condition) { -+ int status = 0; -+ double iarg2 = 1; -+ double iarg1 = 0; -+ char *sarg1 = NULL; -+ node_t *val = candidat; -+ node_t **node_set; -+ -+ if (xn->name[0] == '*') -+ iarg1 = roxml_get_node_internal_position(candidat); -+ else -+ iarg1 = roxml_get_node_position(candidat); -+ -+ switch (condition->func) { -+ case ROXML_FUNC_POS: -+ iarg2 = roxml_strtonum(condition->arg2, NULL); -+ status = roxml_double_cmp(iarg1, iarg2, condition->op); -+ break; -+ case ROXML_FUNC_LAST: -+ iarg2 = roxml_get_chld_nb(candidat->prnt); -+ fallthrough; -+ case ROXML_FUNC_FIRST: -+ if (condition->op > 0) -+ iarg2 = roxml_double_oper(iarg2, roxml_strtonum(condition->arg2, NULL), condition->op); -+ status = roxml_double_cmp(iarg1, iarg2, ROXML_OPERATOR_EQU); -+ break; -+ case ROXML_FUNC_INTCOMP: -+ if (condition->arg1) -+ val = roxml_get_attr(candidat, condition->arg1 + 1, 0); -+ sarg1 = roxml_get_content(val, NULL, 0, &status); -+ iarg1 = roxml_strtonum(sarg1, NULL); -+ iarg2 = roxml_strtonum(condition->arg2, NULL); -+ status = roxml_double_cmp(iarg1, iarg2, condition->op); -+ roxml_release(sarg1); -+ break; -+ case ROXML_FUNC_NSURI: -+ val = roxml_get_ns(candidat); -+ sarg1 = roxml_get_content(val, NULL, 0, &status); -+ status = roxml_string_cmp(sarg1, condition->arg2, condition->op); -+ roxml_release(sarg1); -+ break; -+ case ROXML_FUNC_STRCOMP: -+ if (condition->arg1) -+ val = roxml_get_attr(candidat, condition->arg1 + 1, 0); -+ sarg1 = roxml_get_content(val, NULL, 0, &status); -+ status = roxml_string_cmp(sarg1, condition->arg2, condition->op); -+ roxml_release(sarg1); -+ break; -+ case ROXML_FUNC_LNAME: -+ sarg1 = roxml_get_name(candidat, NULL, 0); -+ status = strcmp(sarg1, condition->arg2) == 0; -+ roxml_release(sarg1); -+ break; -+ case ROXML_FUNC_XPATH: -+ val = roxml_get_root(candidat); -+ node_set = roxml_exec_xpath(val, candidat, condition->xp, condition->func2, &status); -+ roxml_release(node_set); -+ status = ! !status; -+ break; -+ default: -+ break; -+ } -+ -+ if (condition->rel == ROXML_OPERATOR_OR) -+ valid = valid || status; -+ else if (condition->rel == ROXML_OPERATOR_AND) -+ valid = valid && status; -+ else -+ valid = status; -+ -+ condition = condition->next; -+ } -+ -+ return valid; -+} -+ -+ROXML_STATIC ROXML_INT void roxml_add_to_set(node_t *root, node_t *candidat, node_t ***ans, int *nb, int *max, -+ int req_id) -+{ -+ if (roxml_add_to_pool(root, candidat, req_id)) { -+ if (ans) { -+ if ((*nb) >= (*max)) { -+ int new_max = (*max) * 2; -+ node_t **new_ans = roxml_malloc(sizeof(node_t *), new_max, PTR_NODE_RESULT); -+ memcpy(new_ans, (*ans), *(max) * sizeof(node_t *)); -+ roxml_release(*ans); -+ *ans = new_ans; -+ *max = new_max; -+ } -+ (*ans)[*nb] = candidat; -+ } -+ (*nb)++; -+ } -+} -+ -+ROXML_STATIC ROXML_INT int roxml_validate_axe_func(node_t *root, node_t **candidat, xpath_node_t *xn) -+{ -+ int valid = 0; -+ char *axes = xn->name; -+ int type = (*candidat)->type; -+ -+ if ((axes == NULL) || (strcmp("node()", axes) == 0)) { -+ valid = 1; -+ } else if (strcmp("*", axes) == 0) { -+ if (type & (ROXML_ELM_NODE | ROXML_ATTR_NODE)) -+ valid = 1; -+ } else if (strcmp("comment()", axes) == 0) { -+ if (type & ROXML_CMT_NODE) -+ valid = 1; -+ } else if (strcmp("processing-instruction()", axes) == 0) { -+ if (type & ROXML_PI_NODE) -+ valid = 1; -+ } else if (strcmp("text()", axes) == 0) { -+ if (type & ROXML_TXT_NODE) -+ valid = 1; -+ } else if (strcmp("", axes) == 0) { -+ if (xn->abs) { -+ *candidat = root; -+ valid = 1; -+ } -+ } -+ -+ /* comments and pi can only be reached using their comment() -+ * and processing-instruction() functions */ -+ if (!valid) -+ if (type & (ROXML_PI_NODE | ROXML_CMT_NODE)) -+ return -1; -+ return valid; -+} -+ -+ROXML_STATIC ROXML_INT int roxml_validate_axe_name(node_t *candidat, xpath_node_t *xn) -+{ -+ int valid = 0; -+ int ns_len; -+ char *name; -+ -+ ROXML_GET_BASE_BUFFER(intern_buff); -+ -+ if (candidat->ns) { -+ name = roxml_get_name(candidat->ns, intern_buff, ROXML_BASE_LEN); -+ ns_len = strlen(name); -+ if (ns_len) -+ name[ns_len++] = ':'; -+ } else { -+ ns_len = 0; -+ name = intern_buff; -+ } -+ -+ roxml_get_name(candidat, name + ns_len, ROXML_BASE_LEN - ns_len); -+ if (name && strcmp(name, xn->name) == 0) -+ valid = 1; -+ -+ ROXML_PUT_BASE_BUFFER(intern_buff); -+ -+ return valid; -+} -+ -+/** \brief axe validation function -+ * -+ * \fn roxml_validate_axes(node_t *root, node_t *candidat, node_t ***ans, int *nb, int *max, xpath_node_t *xn, int req_id); -+ * this function validate if an axe is matching the current node -+ * \param root the root node -+ * \param candidat the node to test -+ * \param ans the pointer to answers pool -+ * \param nb the number of answers in pool -+ * \param max the current size of the pool -+ * \param xn the xpath node to test -+ * \param req_id the pool id -+ * \return 1 if axe is validated, else 0 -+ */ -+ROXML_STATIC ROXML_INT int roxml_validate_axes(node_t *root, node_t *candidat, node_t ***ans, int *nb, int *max, -+ xpath_node_t *xn, int req_id) -+{ -+ int valid = 0; -+ int path_end = 0; -+ xpath_node_t empty; -+ -+ if (xn == NULL) { -+ valid = 1; -+ path_end = 1; -+ xn = ∅ -+ memset(xn, 0, sizeof(empty)); -+ } else { -+ valid = roxml_validate_axe_func(root, &candidat, xn); -+ -+ if (xn->next == NULL) -+ path_end = 1; -+ if ((xn->axes == ROXML_ID_SELF) || (xn->axes == ROXML_ID_PARENT)) -+ valid = 1; -+ -+ if (valid == 0) -+ valid = roxml_validate_axe_name(candidat, xn); -+ } -+ -+ if (valid == 1) -+ valid = roxml_validate_predicat(xn, xn->cond, candidat); -+ if (valid == 1) -+ valid = roxml_validate_predicat(xn, xn->xp_cond, candidat); -+ -+ if ((valid == 1) && (path_end)) -+ roxml_add_to_set(root, candidat, ans, nb, max, req_id); -+ -+ return (valid == 1); -+} -+ -+/** \brief real xpath validation function -+ * -+ * \fn roxml_check_node(xpath_node_t *xp, node_t *root, node_t *context, node_t ***ans, int *nb, int *max, int ignore, int req_id); -+ * this function perform the xpath test on a tree -+ * \param xp the xpath nodes to test -+ * \param root the root node -+ * \param context the current context node -+ * \param ans the pointer to answers pool -+ * \param nb the number of answers in pool -+ * \param max the current size of the pool -+ * \param ignore a flag for some axes that are going thru all document -+ * \param req_id the pool id -+ * \return -+ */ -+ROXML_STATIC ROXML_INT void roxml_check_node(xpath_node_t *xp, node_t *root, node_t *context, node_t ***ans, -+ int *nb, int *max, int ignore, int req_id) -+{ -+ int validate_node = 0; -+ -+ if ((req_id == 0) && (*nb > 0)) -+ return; -+ -+ if (!xp) -+ return; -+ -+ // if found a "all document" axes -+ if (ignore == ROXML_DESC_ONLY) { -+ node_t *current = context->chld; -+ while (current) { -+ roxml_check_node(xp, root, current, ans, nb, max, ignore, req_id); -+ current = current->sibl; -+ } -+ } -+ -+ switch (xp->axes) { -+ case ROXML_ID_CHILD:{ -+ node_t *current = context->chld; -+ while (current) { -+ validate_node = roxml_validate_axes(root, current, ans, nb, max, xp, req_id); -+ if (validate_node) -+ roxml_check_node(xp->next, root, current, ans, nb, max, ROXML_DIRECT, req_id); -+ current = current->sibl; -+ } -+ if ((xp->name == NULL) || (strcmp(xp->name, "text()") == 0) -+ || (strcmp(xp->name, "node()") == 0)) { -+ node_t *current = roxml_get_txt(context, 0); -+ while (current) { -+ validate_node = roxml_validate_axes(root, current, ans, nb, max, xp, req_id); -+ current = current->sibl; -+ } -+ } -+ if ((xp->name == NULL) || (strcmp(xp->name, "node()") == 0)) { -+ node_t *current = context->attr; -+ while (current) { -+ validate_node = roxml_validate_axes(root, current, ans, nb, max, xp, req_id); -+ current = current->sibl; -+ } -+ } -+ } -+ break; -+ case ROXML_ID_DESC:{ -+ roxml_check_node(xp->next, root, context, ans, nb, max, ROXML_DESC_ONLY, req_id); -+ } -+ break; -+ case ROXML_ID_DESC_O_SELF:{ -+ xp = xp->next; -+ validate_node = roxml_validate_axes(root, context, ans, nb, max, xp, req_id); -+ if (validate_node) -+ roxml_check_node(xp->next, root, context, ans, nb, max, ROXML_DIRECT, req_id); -+ roxml_check_node(xp, root, context, ans, nb, max, ROXML_DESC_ONLY, req_id); -+ } -+ break; -+ case ROXML_ID_SELF:{ -+ validate_node = roxml_validate_axes(root, context, ans, nb, max, xp, req_id); -+ roxml_check_node(xp->next, root, context, ans, nb, max, ROXML_DIRECT, req_id); -+ } -+ break; -+ case ROXML_ID_PARENT:{ -+ if (context->prnt) { -+ validate_node = roxml_validate_axes(root, context->prnt, ans, nb, max, xp, req_id); -+ roxml_check_node(xp->next, root, context->prnt, ans, nb, max, ROXML_DIRECT, req_id); -+ } else { -+ validate_node = 0; -+ } -+ } -+ break; -+ case ROXML_ID_ATTR:{ -+ node_t *attribute = context->attr; -+ while (attribute) { -+ validate_node = roxml_validate_axes(root, attribute, ans, nb, max, xp, req_id); -+ if (validate_node) -+ roxml_check_node(xp->next, root, context, ans, nb, max, ROXML_DIRECT, req_id); -+ attribute = attribute->sibl; -+ } -+ } -+ break; -+ case ROXML_ID_ANC:{ -+ node_t *current = context->prnt; -+ while (current) { -+ validate_node = roxml_validate_axes(root, current, ans, nb, max, xp, req_id); -+ if (validate_node) -+ roxml_check_node(xp->next, root, current, ans, nb, max, ROXML_DIRECT, req_id); -+ current = current->prnt; -+ } -+ } -+ break; -+ case ROXML_ID_NEXT_SIBL:{ -+ node_t *current = context->sibl; -+ while (current) { -+ validate_node = roxml_validate_axes(root, current, ans, nb, max, xp, req_id); -+ if (validate_node) -+ roxml_check_node(xp->next, root, current, ans, nb, max, ROXML_DIRECT, req_id); -+ current = current->sibl; -+ } -+ } -+ break; -+ case ROXML_ID_PREV_SIBL:{ -+ node_t *current = context->prnt->chld; -+ while (current != context) { -+ validate_node = roxml_validate_axes(root, current, ans, nb, max, xp, req_id); -+ if (validate_node) -+ roxml_check_node(xp->next, root, current, ans, nb, max, ROXML_DIRECT, req_id); -+ current = current->sibl; -+ } -+ } -+ break; -+ case ROXML_ID_NEXT:{ -+ node_t *current = context; -+ while (current) { -+ node_t *following = current->sibl; -+ while (following) { -+ validate_node = roxml_validate_axes(root, following, ans, nb, max, xp, req_id); -+ if (validate_node) { -+ roxml_check_node(xp->next, root, following, ans, nb, max, ROXML_DIRECT, -+ req_id); -+ } else { -+ xp->axes = ROXML_ID_CHILD; -+ roxml_check_node(xp, root, following, ans, nb, max, ROXML_DESC_ONLY, -+ req_id); -+ xp->axes = ROXML_ID_NEXT; -+ } -+ following = following->sibl; -+ } -+ following = current->prnt->chld; -+ while (following != current) -+ following = following->sibl; -+ current = following->sibl; -+ } -+ } -+ break; -+ case ROXML_ID_PREV:{ -+ node_t *current = context; -+ while (current && current->prnt) { -+ node_t *preceding = current->prnt->chld; -+ while (preceding != current) { -+ validate_node = roxml_validate_axes(root, preceding, ans, nb, max, xp, req_id); -+ if (validate_node) { -+ roxml_check_node(xp->next, root, preceding, ans, nb, max, ROXML_DIRECT, -+ req_id); -+ } else { -+ xp->axes = ROXML_ID_CHILD; -+ roxml_check_node(xp, root, preceding, ans, nb, max, ROXML_DESC_ONLY, -+ req_id); -+ xp->axes = ROXML_ID_PREV; -+ } -+ preceding = preceding->sibl; -+ } -+ current = current->prnt; -+ } -+ } -+ break; -+ case ROXML_ID_NS:{ -+ validate_node = roxml_validate_axes(root, context->ns, ans, nb, max, xp, req_id); -+ if (validate_node) -+ roxml_check_node(xp->next, root, context, ans, nb, max, ROXML_DIRECT, req_id); -+ } -+ break; -+ case ROXML_ID_ANC_O_SELF:{ -+ node_t *current = context; -+ while (current) { -+ validate_node = roxml_validate_axes(root, current, ans, nb, max, xp, req_id); -+ if (validate_node) -+ roxml_check_node(xp->next, root, current, ans, nb, max, ROXML_DIRECT, req_id); -+ current = current->prnt; -+ } -+ } -+ break; -+ } -+ -+ return; -+} -+ -+ROXML_INT node_t **roxml_exec_xpath(node_t *root, node_t *n, xpath_node_t *xpath, int index, int *count) -+{ -+ int path_id; -+ int max_answers = 1; -+ int glob_id = 0; -+ int *req_ids = NULL; -+ node_t **node_set; -+ -+ *count = 0; -+ glob_id = roxml_request_id(root); -+ if (glob_id < 0) -+ return NULL; -+ req_ids = kcalloc(index, sizeof(int), GFP_KERNEL); -+ node_set = roxml_malloc(sizeof(node_t *), max_answers, PTR_NODE_RESULT); -+ -+ /* process all AND xpath */ -+ for (path_id = 0; path_id < index; path_id++) { -+ xpath_node_t *cur_xpath = NULL; -+ xpath_node_t *next_xpath = NULL; -+ cur_xpath = &xpath[path_id]; -+ -+ if (path_id < index - 1) -+ next_xpath = &xpath[path_id + 1]; -+ -+ if ((cur_xpath->rel == ROXML_OPERATOR_AND) || ((next_xpath) && (next_xpath->rel == ROXML_OPERATOR_AND))) { -+ int req_id = roxml_request_id(root); -+ node_t *orig = n; -+ -+ if (cur_xpath->abs) -+ /* context node is root */ -+ orig = root; -+ -+ roxml_check_node(cur_xpath, root, orig, &node_set, count, &max_answers, ROXML_DIRECT, req_id); -+ -+ if (cur_xpath->rel == ROXML_OPERATOR_AND) -+ roxml_compute_and(root, node_set, count, req_id, req_ids[path_id - 1]); -+ req_ids[path_id] = req_id; -+ } -+ } -+ -+ /* process all OR xpath */ -+ for (path_id = 0; path_id < index; path_id++) { -+ xpath_node_t *cur_xpath = &xpath[path_id]; -+ -+ if (cur_xpath->rel == ROXML_OPERATOR_OR) { -+ node_t *orig = n; -+ -+ if (req_ids[path_id] == 0) { -+ if (cur_xpath->abs) -+ orig = root; -+ -+ /* assign a new request ID */ -+ roxml_check_node(cur_xpath, root, orig, &node_set, count, &max_answers, ROXML_DIRECT, -+ glob_id); -+ } else { -+ roxml_compute_or(root, node_set, count, req_ids[path_id + 1], glob_id); -+ roxml_release_id(root, node_set, *count, req_ids[path_id + 1]); -+ } -+ } -+ } -+ -+ roxml_release_id(root, node_set, *count, glob_id); -+ -+ for (path_id = 0; path_id < index; path_id++) -+ if (req_ids[path_id] != 0) -+ roxml_release_id(root, node_set, *count, req_ids[path_id]); -+ kfree(req_ids); -+ -+ return node_set; -+} -+ -+static char *strdup(const char *s) -+{ -+ size_t l = strlen(s); -+ char *d = kmalloc(l+1, GFP_KERNEL); -+ if (!d) return NULL; -+ return memcpy(d, s, l+1); -+} -+ -+ROXML_API node_t **roxml_xpath(node_t *n, char *path, int *nb_ans) -+{ -+ int count = 0; -+ node_t **node_set = NULL; -+ int index = 0; -+ xpath_node_t *xpath = NULL; -+ node_t *root = n; -+ char *full_path_to_find; -+ -+ if (n == ROXML_INVALID_DOC) { -+ if (nb_ans) -+ *nb_ans = 0; -+ return NULL; -+ } -+ -+ root = roxml_get_root(n); -+ -+ full_path_to_find = strdup(path); -+ -+ index = roxml_parse_xpath(full_path_to_find, &xpath, 0); -+ -+ if (index >= 0) { -+ node_set = roxml_exec_xpath(root, n, xpath, index, &count); -+ roxml_free_xpath(xpath, index); -+ -+ if (count == 0) { -+ roxml_release(node_set); -+ node_set = NULL; -+ } -+ } -+ if (nb_ans) -+ *nb_ans = count; -+ kfree(full_path_to_find); -+ -+ return node_set; -+} -+ -+/** \brief axes setter function -+ * -+ * \fn roxml_set_axes(xpath_node_t *node, char *axes, int *offset); -+ * this function set the axe to a xpath node from xpath string -+ * \param node the xpath node to fill -+ * \param axes the string where axe is extracted from -+ * \param offset the detected offset in axe string -+ * \return the filled xpath_node -+ */ -+ROXML_STATIC ROXML_INT xpath_node_t *roxml_set_axes(xpath_node_t *node, char *axes, int *offset) -+{ -+ struct _xpath_axes { -+ char id; -+ char *name; -+ }; -+ -+ struct _xpath_axes xpath_axes[14] = { -+ {ROXML_ID_PARENT, ROXML_L_PARENT}, -+ {ROXML_ID_PARENT, ROXML_S_PARENT}, -+ {ROXML_ID_SELF, ROXML_L_SELF}, -+ {ROXML_ID_SELF, ROXML_S_SELF}, -+ {ROXML_ID_ATTR, ROXML_L_ATTR}, -+ {ROXML_ID_ATTR, ROXML_S_ATTR}, -+ {ROXML_ID_ANC, ROXML_L_ANC}, -+ {ROXML_ID_ANC_O_SELF, ROXML_L_ANC_O_SELF}, -+ {ROXML_ID_NEXT_SIBL, ROXML_L_NEXT_SIBL}, -+ {ROXML_ID_PREV_SIBL, ROXML_L_PREV_SIBL}, -+ {ROXML_ID_NEXT, ROXML_L_NEXT}, -+ {ROXML_ID_PREV, ROXML_L_PREV}, -+ {ROXML_ID_NS, ROXML_L_NS}, -+ {ROXML_ID_CHILD, ROXML_L_CHILD}, -+ }; -+ -+ xpath_node_t *tmp_node; -+ if (axes[0] == '/') { -+ axes[0] = '\0'; -+ *offset += 1; -+ axes++; -+ } -+ if (axes[0] == '/') { -+ /* ROXML_S_DESC_O_SELF */ -+ node->axes = ROXML_ID_DESC_O_SELF; -+ node->name = axes + 1; -+ tmp_node = kcalloc(1, sizeof(xpath_node_t), GFP_KERNEL); -+ tmp_node->axes = ROXML_ID_CHILD; -+ node->next = tmp_node; -+ if (strlen(node->name) > 0) { -+ tmp_node = kcalloc(1, sizeof(xpath_node_t), GFP_KERNEL); -+ node->next->next = tmp_node; -+ node = roxml_set_axes(tmp_node, axes + 1, offset); -+ } -+ } else if (strncmp(ROXML_L_DESC_O_SELF, axes, strlen(ROXML_L_DESC_O_SELF)) == 0) { -+ /* ROXML_L_DESC_O_SELF */ -+ node->axes = ROXML_ID_DESC_O_SELF; -+ node->name = axes + strlen(ROXML_L_DESC_O_SELF); -+ *offset += strlen(ROXML_L_DESC_O_SELF); -+ tmp_node = kcalloc(1, sizeof(xpath_node_t), GFP_KERNEL); -+ tmp_node->axes = ROXML_ID_CHILD; -+ node->next = tmp_node; -+ node = roxml_set_axes(tmp_node, axes + strlen(ROXML_L_DESC_O_SELF), offset); -+ } else if (strncmp(ROXML_L_DESC, axes, strlen(ROXML_L_DESC)) == 0) { -+ /* ROXML_L_DESC */ -+ node->axes = ROXML_ID_DESC; -+ node->name = axes + strlen(ROXML_L_DESC); -+ *offset += strlen(ROXML_L_DESC); -+ tmp_node = kcalloc(1, sizeof(xpath_node_t), GFP_KERNEL); -+ tmp_node->axes = ROXML_ID_CHILD; -+ node->next = tmp_node; -+ node = roxml_set_axes(tmp_node, axes + strlen(ROXML_L_DESC), offset); -+ } else { -+ int i = 0; -+ -+ /* ROXML_S_CHILD is default */ -+ node->axes = ROXML_ID_CHILD; -+ node->name = axes; -+ -+ for (i = 0; i < 14; i++) { -+ int len = strlen(xpath_axes[i].name); -+ if (strncmp(xpath_axes[i].name, axes, len) == 0) { -+ node->axes = xpath_axes[i].id; -+ node->name = axes + len; -+ break; -+ } -+ } -+ } -+ return node; -+} -+ -+ROXML_INT int _func_xpath_ignore(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+#ifdef DEBUG_PARSING -+ fprintf(stderr, "calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ return 1; -+} -+ -+ROXML_INT int _func_xpath_new_node(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+ int cur = 0; -+ roxml_xpath_ctx_t *ctx = (roxml_xpath_ctx_t *)data; -+#ifdef DEBUG_PARSING -+ fprintf(stderr, "calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ if (!ctx->quoted && !ctx->dquoted && !ctx->parenthesys && !ctx->bracket) { -+ int offset = 0; -+ xpath_node_t *tmp_node = kcalloc(1, sizeof(xpath_node_t), GFP_KERNEL); -+ if ((chunk[cur] == '/') && (ctx->is_first_node)) { -+ kfree(tmp_node); -+ ctx->new_node = ctx->first_node; -+ ctx->first_node->abs = 1; -+ } else if ((chunk[cur] == '/') && (ctx->wait_first_node)) { -+ kfree(tmp_node); -+ ctx->first_node->abs = 1; -+ } else if ((ctx->is_first_node) || (ctx->wait_first_node)) { -+ kfree(tmp_node); -+ } else { -+ if (ctx->new_node) -+ ctx->new_node->next = tmp_node; -+ ctx->new_node = tmp_node; -+ } -+ ctx->is_first_node = 0; -+ ctx->wait_first_node = 0; -+ ctx->new_node = roxml_set_axes(ctx->new_node, chunk + cur, &offset); -+ cur = offset + 1; -+ } -+ ctx->shorten_cond = 0; -+ return cur; -+} -+ -+ROXML_INT int _func_xpath_quote(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+ roxml_xpath_ctx_t *ctx = (roxml_xpath_ctx_t *)data; -+#ifdef DEBUG_PARSING -+ fprintf(stderr, "calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ if (!ctx->dquoted) { -+ if (ctx->quoted && ctx->content_quoted == MODE_COMMENT_QUOTE) { -+ ctx->content_quoted = MODE_COMMENT_NONE; -+ chunk[0] = '\0'; -+ } -+ ctx->quoted = (ctx->quoted + 1) % 2; -+ } -+ ctx->shorten_cond = 0; -+ return 1; -+} -+ -+ROXML_INT int _func_xpath_dquote(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+ roxml_xpath_ctx_t *ctx = (roxml_xpath_ctx_t *)data; -+#ifdef DEBUG_PARSING -+ fprintf(stderr, "calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ if (!ctx->quoted) { -+ if (ctx->dquoted && ctx->content_quoted == MODE_COMMENT_DQUOTE) { -+ ctx->content_quoted = MODE_COMMENT_NONE; -+ chunk[0] = '\0'; -+ } -+ ctx->dquoted = (ctx->dquoted + 1) % 2; -+ } -+ ctx->shorten_cond = 0; -+ return 1; -+} -+ -+ROXML_INT int _func_xpath_open_parenthesys(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+ roxml_xpath_ctx_t *ctx = (roxml_xpath_ctx_t *)data; -+#ifdef DEBUG_PARSING -+ fprintf(stderr, "calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ if (!ctx->quoted && !ctx->dquoted) -+ ctx->parenthesys = (ctx->parenthesys + 1) % 2; -+ ctx->shorten_cond = 0; -+ return 1; -+} -+ -+ROXML_INT int _func_xpath_close_parenthesys(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+ roxml_xpath_ctx_t *ctx = (roxml_xpath_ctx_t *)data; -+#ifdef DEBUG_PARSING -+ fprintf(stderr, "calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ if (!ctx->quoted && !ctx->dquoted) -+ ctx->parenthesys = (ctx->parenthesys + 1) % 2; -+ ctx->shorten_cond = 0; -+ return 1; -+} -+ -+ROXML_INT int _func_xpath_open_brackets(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+ xpath_cond_t *tmp_cond; -+ int cur = 0; -+#ifdef DEBUG_PARSING -+ fprintf(stderr, "calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ roxml_xpath_ctx_t *ctx = (roxml_xpath_ctx_t *)data; -+ if (!ctx->quoted && !ctx->dquoted) { -+ ctx->bracket = (ctx->bracket + 1) % 2; -+ chunk[0] = '\0'; -+ -+ ctx->shorten_cond = 1; -+ tmp_cond = kcalloc(1, sizeof(xpath_cond_t), GFP_KERNEL); -+ ctx->new_node->cond = tmp_cond; -+ ctx->new_cond = tmp_cond; -+ ctx->new_cond->arg1 = chunk + cur + 1; -+ } else { -+ ctx->shorten_cond = 0; -+ } -+ cur++; -+ return 1; -+} -+ -+ROXML_INT int _func_xpath_close_brackets(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+ int cur = 0; -+ roxml_xpath_ctx_t *ctx = (roxml_xpath_ctx_t *)data; -+#ifdef DEBUG_PARSING -+ fprintf(stderr, "calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ if (!ctx->quoted && !ctx->dquoted) { -+ ctx->bracket = (ctx->bracket + 1) % 2; -+ chunk[0] = '\0'; -+ -+ if (ctx->new_cond) { -+ if (ctx->new_cond->func == ROXML_FUNC_XPATH) { -+ xpath_node_t *xp; -+ ctx->new_cond->func2 = roxml_parse_xpath(ctx->new_cond->arg1, &xp, 1); -+ ctx->new_cond->xp = xp; -+ } -+ } else { -+ return -1; -+ } -+ } -+ cur++; -+ ctx->shorten_cond = 0; -+ return 1; -+} -+ -+ROXML_INT int _func_xpath_condition_or(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+ xpath_node_t *tmp_node; -+ roxml_xpath_ctx_t *ctx = (roxml_xpath_ctx_t *)data; -+ int cur = 0; -+ int len = 0; -+ xpath_cond_t *tmp_cond; -+#ifdef DEBUG_PARSING -+ fprintf(stderr, "calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ -+ len = strlen(ROXML_COND_OR); -+ -+ if (strncmp(chunk, ROXML_COND_OR, len) == 0) { -+ if (roxml_is_separator(*(chunk - 1)) && roxml_is_separator(*(chunk + len))) { -+ if (!ctx->bracket && !ctx->quoted && !ctx->dquoted) { -+ if (ctx->context != 1) { -+ return 0; -+ } -+ chunk[-1] = '\0'; -+ cur += strlen(ROXML_COND_OR); -+ tmp_node = kcalloc(ctx->nbpath + 1, sizeof(xpath_node_t), GFP_KERNEL); -+ memcpy(tmp_node, ctx->first_node, ctx->nbpath * sizeof(xpath_node_t)); -+ kfree(ctx->first_node); -+ ctx->first_node = tmp_node; -+ ctx->wait_first_node = 1; -+ ctx->new_node = tmp_node + ctx->nbpath; -+ ctx->new_node->rel = ROXML_OPERATOR_OR; -+ ctx->nbpath++; -+ } else if (ctx->bracket && !ctx->quoted && !ctx->dquoted) { -+ if (ctx->new_cond->func != ROXML_FUNC_XPATH) { -+ chunk[-1] = '\0'; -+ cur += strlen(ROXML_COND_OR); -+ tmp_cond = kcalloc(1, sizeof(xpath_cond_t), GFP_KERNEL); -+ if (ctx->new_cond) { -+ ctx->new_cond->next = tmp_cond; -+ } -+ ctx->new_cond = tmp_cond; -+ ctx->new_cond->rel = ROXML_OPERATOR_OR; -+ ctx->new_cond->arg1 = chunk + cur + 1; -+ } -+ } -+ } -+ } -+ if (cur) -+ ctx->shorten_cond = 0; -+ return cur; -+} -+ -+ROXML_INT int _func_xpath_condition_and(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+ roxml_xpath_ctx_t *ctx = (roxml_xpath_ctx_t *)data; -+ int cur = 0; -+ int len = 0; -+ xpath_node_t *tmp_node; -+ xpath_cond_t *tmp_cond; -+#ifdef DEBUG_PARSING -+ fprintf(stderr, "calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ -+ len = strlen(ROXML_COND_AND); -+ -+ if (strncmp(chunk, ROXML_COND_AND, len) == 0) { -+ if (roxml_is_separator(*(chunk - 1)) && roxml_is_separator(*(chunk + len))) { -+ if (!ctx->bracket && !ctx->quoted && !ctx->dquoted) { -+ if (ctx->context != 1) -+ return 0; -+ chunk[-1] = '\0'; -+ cur += strlen(ROXML_COND_AND); -+ tmp_node = kcalloc(ctx->nbpath + 1, sizeof(xpath_node_t), GFP_KERNEL); -+ memcpy(tmp_node, ctx->first_node, ctx->nbpath * sizeof(xpath_node_t)); -+ kfree(ctx->first_node); -+ ctx->first_node = tmp_node; -+ ctx->wait_first_node = 1; -+ ctx->new_node = tmp_node + ctx->nbpath; -+ ctx->new_node->rel = ROXML_OPERATOR_AND; -+ ctx->nbpath++; -+ } else if (ctx->bracket && !ctx->quoted && !ctx->dquoted) { -+ if (ctx->new_cond->func != ROXML_FUNC_XPATH) { -+ chunk[-1] = '\0'; -+ cur += strlen(ROXML_COND_AND); -+ tmp_cond = kcalloc(1, sizeof(xpath_cond_t), GFP_KERNEL); -+ if (ctx->new_cond) { -+ ctx->new_cond->next = tmp_cond; -+ } -+ ctx->new_cond = tmp_cond; -+ ctx->new_cond->rel = ROXML_OPERATOR_AND; -+ ctx->new_cond->arg1 = chunk + cur + 1; -+ } -+ } -+ } -+ } -+ if (cur) -+ ctx->shorten_cond = 0; -+ return cur; -+} -+ -+ROXML_INT int _func_xpath_path_or(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+ roxml_xpath_ctx_t *ctx = (roxml_xpath_ctx_t *)data; -+ int cur = 0; -+ xpath_node_t *tmp_node; -+#ifdef DEBUG_PARSING -+ fprintf(stderr, "calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ -+ if (!ctx->bracket && !ctx->quoted && !ctx->dquoted) { -+ chunk[-1] = '\0'; -+ cur += strlen(ROXML_PATH_OR); -+ tmp_node = kcalloc(ctx->nbpath + 1, sizeof(xpath_node_t), GFP_KERNEL); -+ memcpy(tmp_node, ctx->first_node, ctx->nbpath * sizeof(xpath_node_t)); -+ kfree(ctx->first_node); -+ ctx->first_node = tmp_node; -+ ctx->wait_first_node = 1; -+ ctx->new_node = tmp_node + ctx->nbpath; -+ ctx->new_node->rel = ROXML_OPERATOR_OR; -+ ctx->nbpath++; -+ } -+ ctx->shorten_cond = 0; -+ return cur; -+} -+ -+ROXML_INT int _func_xpath_operators(roxml_parser_item_t *parser, char *chunk, void *data, int operator, int operator_bis) -+{ -+ roxml_xpath_ctx_t *ctx = (roxml_xpath_ctx_t *)data; -+ int cur = 0; -+ if (!ctx->bracket && !ctx->quoted && !ctx->dquoted) { -+ xpath_node_t *xp_root = ctx->new_node; -+ xpath_cond_t *xp_cond = kcalloc(1, sizeof(xpath_cond_t), GFP_KERNEL); -+ xp_root->xp_cond = xp_cond; -+ chunk[cur] = '\0'; -+ xp_cond->op = operator; -+ if (ROXML_WHITE(chunk[cur - 1])) -+ chunk[cur - 1] = '\0'; -+ if (chunk[cur + 1] == '=') { -+ chunk[++cur] = '\0'; -+ xp_cond->op = operator_bis; -+ } -+ if (ROXML_WHITE(chunk[cur + 1])) -+ chunk[++cur] = '\0'; -+ -+ xp_cond->arg2 = chunk + cur + 1; -+ if (xp_cond->arg2[0] == '"') { -+ ctx->content_quoted = MODE_COMMENT_DQUOTE; -+ xp_cond->arg2++; -+ } else if (xp_cond->arg2[0] == '\'') { -+ ctx->content_quoted = MODE_COMMENT_QUOTE; -+ xp_cond->arg2++; -+ } -+ if (!xp_cond->func) { -+ xp_cond->func = ROXML_FUNC_INTCOMP; -+ if (!roxml_is_number(xp_cond->arg2)) -+ xp_cond->func = ROXML_FUNC_STRCOMP; -+ } -+ cur++; -+ } else if (ctx->bracket && !ctx->quoted && !ctx->dquoted) { -+ if (ctx->new_cond->func != ROXML_FUNC_XPATH) { -+ chunk[cur] = '\0'; -+ ctx->new_cond->op = operator; -+ if (ROXML_WHITE(chunk[cur - 1])) -+ chunk[cur - 1] = '\0'; -+ if (chunk[cur + 1] == '=') { -+ chunk[++cur] = '\0'; -+ ctx->new_cond->op = operator_bis; -+ } -+ if (ROXML_WHITE(chunk[cur + 1])) -+ chunk[++cur] = '\0'; -+ ctx->new_cond->arg2 = chunk + cur + 1; -+ if (ctx->new_cond->arg2[0] == '"') { -+ ctx->content_quoted = MODE_COMMENT_DQUOTE; -+ ctx->new_cond->arg2++; -+ } else if (ctx->new_cond->arg2[0] == '\'') { -+ ctx->content_quoted = MODE_COMMENT_QUOTE; -+ ctx->new_cond->arg2++; -+ } -+ if (ctx->new_cond->func == 0) { -+ ctx->new_cond->func = ROXML_FUNC_INTCOMP; -+ if (!roxml_is_number(ctx->new_cond->arg2)) -+ ctx->new_cond->func = ROXML_FUNC_STRCOMP; -+ } -+ cur++; -+ } -+ } -+ ctx->shorten_cond = 0; -+ return cur; -+} -+ -+ROXML_INT int _func_xpath_operator_equal(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+#ifdef DEBUG_PARSING -+ fprintf(stderr, "calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ return _func_xpath_operators(parser, chunk, data, ROXML_OPERATOR_EQU, ROXML_OPERATOR_EQU); -+} -+ -+ROXML_INT int _func_xpath_operator_sup(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+#ifdef DEBUG_PARSING -+ fprintf(stderr, "calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ return _func_xpath_operators(parser, chunk, data, ROXML_OPERATOR_SUP, ROXML_OPERATOR_ESUP); -+} -+ -+ROXML_INT int _func_xpath_operator_inf(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+#ifdef DEBUG_PARSING -+ fprintf(stderr, "calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ return _func_xpath_operators(parser, chunk, data, ROXML_OPERATOR_INF, ROXML_OPERATOR_EINF); -+} -+ -+ROXML_INT int _func_xpath_operator_diff(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+#ifdef DEBUG_PARSING -+ fprintf(stderr, "calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ return _func_xpath_operators(parser, chunk, data, ROXML_OPERATOR_DIFF, ROXML_OPERATOR_DIFF); -+} -+ -+ROXML_INT int _func_xpath_number(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+#ifdef DEBUG_PARSING -+ fprintf(stderr, "calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ roxml_xpath_ctx_t *ctx = (roxml_xpath_ctx_t *)data; -+ int cur = 0; -+ if (ctx->bracket && !ctx->quoted && !ctx->dquoted) { -+ if ((ctx->new_cond->func != ROXML_FUNC_XPATH) && (ctx->shorten_cond)) { -+ cur = 1; -+ ctx->new_cond->func = ROXML_FUNC_POS; -+ ctx->new_cond->op = ROXML_OPERATOR_EQU; -+ ctx->new_cond->arg2 = chunk; -+ while ((chunk[cur + 1] >= '0') && (chunk[cur + 1] <= '9')) -+ cur++; -+ } -+ } -+ ctx->shorten_cond = 0; -+ return cur; -+} -+ -+ROXML_INT int _func_xpath_funcs(roxml_parser_item_t *parser, char *chunk, void *data, int func, char *name) -+{ -+#ifdef DEBUG_PARSING -+ fprintf(stderr, "calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ roxml_xpath_ctx_t *ctx = (roxml_xpath_ctx_t *)data; -+ int cur = 0; -+ -+ if (strncmp(chunk, name, strlen(name)) == 0) { -+ if (ctx->new_cond->func != func) { -+ cur += strlen(name); -+ ctx->new_cond->func = func; -+ } -+ } -+ if (cur) -+ ctx->shorten_cond = 0; -+ return cur; -+} -+ -+ROXML_INT int _func_xpath_position(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+#ifdef DEBUG_PARSING -+ fprintf(stderr, "calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ return _func_xpath_funcs(parser, chunk, data, ROXML_FUNC_POS, ROXML_FUNC_POS_STR); -+} -+ -+ROXML_INT int _func_xpath_first(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+#ifdef DEBUG_PARSING -+ fprintf(stderr, "calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ return _func_xpath_funcs(parser, chunk, data, ROXML_FUNC_FIRST, ROXML_FUNC_FIRST_STR); -+} -+ -+ROXML_INT int _func_xpath_last(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+#ifdef DEBUG_PARSING -+ fprintf(stderr, "calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ return _func_xpath_funcs(parser, chunk, data, ROXML_FUNC_LAST, ROXML_FUNC_LAST_STR); -+} -+ -+ROXML_INT int _func_xpath_nsuri(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+#ifdef DEBUG_PARSING -+ fprintf(stderr, "calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ return _func_xpath_funcs(parser, chunk, data, ROXML_FUNC_NSURI, ROXML_FUNC_NSURI_STR); -+} -+ -+ROXML_INT int _func_xpath_lname(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+#ifdef DEBUG_PARSING -+ fprintf(stderr, "calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ return _func_xpath_funcs(parser, chunk, data, ROXML_FUNC_LNAME, ROXML_FUNC_LNAME_STR); -+} -+ -+ROXML_INT int _func_xpath_operator_add(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+#ifdef DEBUG_PARSING -+ fprintf(stderr, "calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ roxml_xpath_ctx_t *ctx = (roxml_xpath_ctx_t *)data; -+ int cur = 0; -+ if (ctx->bracket && !ctx->quoted && !ctx->dquoted) { -+ if (ctx->new_cond->func != ROXML_FUNC_XPATH) { -+ if ((ctx->new_cond->func == ROXML_FUNC_LAST) || (ctx->new_cond->func == ROXML_FUNC_FIRST)) -+ ctx->new_cond->op = ROXML_OPERATOR_ADD; -+ chunk[cur] = '\0'; -+ if (ROXML_WHITE(chunk[cur + 1])) -+ chunk[++cur] = '\0'; -+ ctx->new_cond->arg2 = chunk + cur + 1; -+ } -+ } -+ ctx->shorten_cond = 0; -+ return cur; -+} -+ -+ROXML_INT int _func_xpath_operator_subs(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+#ifdef DEBUG_PARSING -+ fprintf(stderr, "calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ roxml_xpath_ctx_t *ctx = (roxml_xpath_ctx_t *)data; -+ int cur = 0; -+ if (ctx->bracket && !ctx->quoted && !ctx->dquoted) { -+ if (ctx->new_cond->func != ROXML_FUNC_XPATH) { -+ if ((ctx->new_cond->func == ROXML_FUNC_LAST) || (ctx->new_cond->func == ROXML_FUNC_FIRST)) -+ ctx->new_cond->op = ROXML_OPERATOR_SUB; -+ chunk[cur] = '\0'; -+ if (ROXML_WHITE(chunk[cur + 1])) -+ chunk[++cur] = '\0'; -+ ctx->new_cond->arg2 = chunk + cur + 1; -+ } -+ } -+ ctx->shorten_cond = 0; -+ return cur; -+} -+ -+ROXML_INT int _func_xpath_default(roxml_parser_item_t *parser, char *chunk, void *data) -+{ -+#ifdef DEBUG_PARSING -+ fprintf(stderr, "calling func %s chunk %c\n", __func__, chunk[0]); -+#endif /* DEBUG_PARSING */ -+ int cur = 0; -+ roxml_xpath_ctx_t *ctx = (roxml_xpath_ctx_t *)data; -+ -+ if ((ctx->is_first_node) || (ctx->wait_first_node)) { -+ if (!ctx->quoted && !ctx->dquoted && !ctx->parenthesys && !ctx->bracket) { -+ int offset = 0; -+ xpath_node_t *tmp_node = kcalloc(1, sizeof(xpath_node_t), GFP_KERNEL); -+ if ((chunk[cur] == '/') && (ctx->is_first_node)) { -+ kfree(tmp_node); -+ ctx->new_node = ctx->first_node; -+ ctx->first_node->abs = 1; -+ } else if ((chunk[cur] == '/') && (ctx->wait_first_node)) { -+ kfree(tmp_node); -+ ctx->first_node->abs = 1; -+ } else if ((ctx->is_first_node) || (ctx->wait_first_node)) { -+ kfree(tmp_node); -+ } else { -+ if (ctx->new_node) -+ ctx->new_node->next = tmp_node; -+ ctx->new_node = tmp_node; -+ } -+ ctx->is_first_node = 0; -+ ctx->wait_first_node = 0; -+ ctx->new_node = roxml_set_axes(ctx->new_node, chunk + cur, &offset); -+ cur += offset; -+ } -+ } else if (ctx->bracket && !ctx->quoted && !ctx->dquoted) { -+ if (ctx->new_cond->func != ROXML_FUNC_XPATH) { -+ if (ctx->shorten_cond) { -+ int bracket_lvl = 1; -+ ctx->new_cond->func = ROXML_FUNC_XPATH; -+ ctx->new_cond->arg1 = chunk + cur; -+ while (bracket_lvl > 0) { -+ if (chunk[cur] == '[') -+ bracket_lvl++; -+ else if (chunk[cur] == ']') -+ bracket_lvl--; -+ cur++; -+ } -+ cur--; -+ } -+ } -+ } -+ ctx->shorten_cond = 0; -+ return cur > 0 ? cur : 1; -+} diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0121-roxml_xpath.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0121-roxml_xpath.h.patch deleted file mode 100644 index a594579..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0121-roxml_xpath.h.patch +++ /dev/null @@ -1,70 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/libroxml/roxml_xpath.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/libroxml/roxml_xpath.h 2026-03-13 13:24:35.604794940 +0100 -@@ -0,0 +1,67 @@ -+/** -+ * \file roxml_xpath.h -+ * \brief xpath execution module -+ * -+ * (C) Copyright 2014 -+ * Tristan Lelong -+ * -+ * SPDX-Licence-Identifier: LGPL-2.1+ -+ * The author added a static linking exception, see License.txt. -+ */ -+ -+#ifndef ROXML_XPATH_H -+#define ROXML_XPATH_H -+ -+#include "roxml_internal.h" -+ -+/** \brief xpath free function -+ * -+ * \fn roxml_free_xpath(xpath_node_t *xpath, int nb); -+ * this function frees the parsed xpath structure -+ * \param xpath the xpath to free -+ * \param nb the number of xpath structures in the table -+ * \return -+ */ -+ROXML_INT void roxml_free_xpath(xpath_node_t *xpath, int nb); -+ -+/** \brief real xpath execution -+ * -+ * \fn roxml_exec_xpath(node_t *root, node_t *n, xpath_node_t *xpath, int index, int * count); -+ * this function exec a decoded xpath strcuture -+ * \param root the root of the tree -+ * \param n the context node -+ * \param xpath the xpath structure -+ * \param index the number of xpath condition in string -+ * \param count the pointer to a variable that is filled with the resulting node number -+ * \return the resulting node set that have to be freed with roxml_release -+ */ -+ROXML_INT node_t **roxml_exec_xpath(node_t *root, node_t * n, xpath_node_t * xpath, int index, int *count); -+ -+ROXML_INT int _func_xpath_ignore(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT int _func_xpath_new_node(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT int _func_xpath_quote(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT int _func_xpath_dquote(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT int _func_xpath_open_parenthesys(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT int _func_xpath_close_parenthesys(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT int _func_xpath_open_brackets(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT int _func_xpath_close_brackets(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT int _func_xpath_condition_or(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT int _func_xpath_condition_and(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT int _func_xpath_path_or(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT int _func_xpath_operators(roxml_parser_item_t *parser, char *chunk, void *data, int operator, int operator_bis); -+ROXML_INT int _func_xpath_operator_equal(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT int _func_xpath_operator_sup(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT int _func_xpath_operator_inf(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT int _func_xpath_operator_diff(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT int _func_xpath_number(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT int _func_xpath_funcs(roxml_parser_item_t *parser, char *chunk, void *data, int func, char *name); -+ROXML_INT int _func_xpath_position(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT int _func_xpath_first(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT int _func_xpath_last(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT int _func_xpath_nsuri(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT int _func_xpath_lname(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT int _func_xpath_operator_add(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT int _func_xpath_operator_subs(roxml_parser_item_t *parser, char *chunk, void *data); -+ROXML_INT int _func_xpath_default(roxml_parser_item_t *parser, char *chunk, void *data); -+ -+#endif /* ROXML_XPATH_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0122-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0122-Makefile.patch deleted file mode 100644 index 95d7e04..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0122-Makefile.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/Makefile 2026-03-13 13:24:35.604872442 +0100 -@@ -0,0 +1,5 @@ -+obj-y += strtod.o -+obj-y += libroxml/ -+ -+CFLAGS_REMOVE_strtod.o = -mgeneral-regs-only -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0123-strtod.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0123-strtod.c.patch deleted file mode 100644 index 6b6acc2..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0123-strtod.c.patch +++ /dev/null @@ -1,2178 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/lib/strtod.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/lib/strtod.c 2026-03-13 13:24:35.604903286 +0100 -@@ -0,0 +1,2174 @@ -+/**************************************************************** -+ * -+ * The author of this software is David M. Gay. -+ * -+ * Copyright (c) 1991, 2000, 2001 by Lucent Technologies. -+ * -+ * Permission to use, copy, modify, and distribute this software for any -+ * purpose without fee is hereby granted, provided that this entire notice -+ * is included in all copies of any software which is or includes a copy -+ * or modification of this software and in all copies of the supporting -+ * documentation for such software. -+ * -+ * THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED -+ * WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY -+ * REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY -+ * OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. -+ * -+ ***************************************************************/ -+ -+/**************************************************************** -+ * This is dtoa.c by David M. Gay, downloaded from -+ * http://www.netlib.org/fp/dtoa.c on April 15, 2009 and modified for -+ * inclusion into the Python core by Mark E. T. Dickinson and Eric V. Smith. -+ * It was taken from Python distribution then and imported into sphinxbase. -+ * Python version is preferred due to cleanups, though original -+ * version at netlib is still maintained. -+ * -+ * Please remember to check http://www.netlib.org/fp regularly for bugfixes and updates. -+ * -+ * The major modifications from Gay's original code are as follows: -+ * -+ * 0. The original code has been specialized to Sphinxbase's needs by removing -+ * many of the #ifdef'd sections. In particular, code to support VAX and -+ * IBM floating-point formats, hex NaNs, hex floats, locale-aware -+ * treatment of the decimal point, and setting of the inexact flag have -+ * been removed. -+ * -+ * 1. We use cdk_calloc and ckd_free in place of malloc and free. -+ * -+ * 2. The public functions strtod, dtoa and freedtoa all now have -+ * a sb_ prefix. -+ * -+ * 3. Instead of assuming that malloc always succeeds, we thread -+ * malloc failures through the code. The functions -+ * -+ * Balloc, multadd, s2b, i2b, mult, pow5mult, lshift, diff, d2b -+ * -+ * of return type *Bigint all return NULL to indicate a malloc failure. -+ * Similarly, rv_alloc and nrv_alloc (return type char *) return NULL on -+ * failure. bigcomp now has return type int (it used to be void) and -+ * returns -1 on failure and 0 otherwise. sb_dtoa returns NULL -+ * on failure. sb_strtod indicates failure due to malloc failure -+ * by returning -1.0, setting errno=ENOMEM and *se to s00. -+ * -+ * 4. The static variable dtoa_result has been removed. Callers of -+ * sb_dtoa are expected to call sb_freedtoa to free the memory allocated -+ * by sb_dtoa. -+ * -+ * 5. The code has been reformatted to better fit with C style. -+ * -+ * 6. A bug in the memory allocation has been fixed: to avoid FREEing memory -+ * that hasn't been MALLOC'ed, private_mem should only be used when k <= -+ * Kmax. -+ * -+ * 7. sb_strtod has been modified so that it doesn't accept strings with -+ * leading whitespace. -+ * -+ * 8. Global static variables are not used due to memory access issues. Fixes -+ * usage from multiple threads. -+ * -+ ***************************************************************/ -+ -+/* Please send bug reports for the original dtoa.c code to David M. Gay (dmg -+ * at acm dot org, with " at " changed at "@" and " dot " changed to "."). -+ */ -+ -+/* On a machine with IEEE extended-precision registers, it is -+ * necessary to specify double-precision (53-bit) rounding precision -+ * before invoking strtod or dtoa. If the machine uses (the equivalent -+ * of) Intel 80x87 arithmetic, the call -+ * _control87(PC_53, MCW_PC); -+ * does this with many compilers. Whether this or another call is -+ * appropriate depends on the compiler; for this to work, it may be -+ * necessary to #include "float.h" or another system-dependent header -+ * file. -+ */ -+ -+/* strtod for IEEE-, VAX-, and IBM-arithmetic machines. -+ * -+ * This strtod returns a nearest machine number to the input decimal -+ * string (or sets errno to ERANGE). With IEEE arithmetic, ties are -+ * broken by the IEEE round-even rule. Otherwise ties are broken by -+ * biased rounding (add half and chop). -+ * -+ * Inspired loosely by William D. Clinger's paper "How to Read Floating -+ * Point Numbers Accurately" [Proc. ACM SIGPLAN '90, pp. 92-101]. -+ * -+ * Modifications: -+ * -+ * 1. We only require IEEE, IBM, or VAX double-precision -+ * arithmetic (not IEEE double-extended). -+ * 2. We get by with floating-point arithmetic in a case that -+ * Clinger missed -- when we're computing d * 10^n -+ * for a small integer d and the integer n is not too -+ * much larger than 22 (the maximum integer k for which -+ * we can represent 10^k exactly), we may be able to -+ * compute (d*10^k) * 10^(e-k) with just one roundoff. -+ * 3. Rather than a bit-at-a-time adjustment of the binary -+ * result in the hard case, we use floating-point -+ * arithmetic to determine the adjustment to within -+ * one bit; only in really hard cases do we need to -+ * compute a second residual. -+ * 4. Because of 3., we don't need a large table of powers of 10 -+ * for ten-to-e (just some small tables, e.g. of 10^k -+ * for 0 <= k <= 22). -+ */ -+ -+/* Linking of sphinxbase's #defines to Gay's #defines starts here. */ -+ -+#ifdef HAVE_CONFIG_H -+#include "config.h" -+#endif -+ -+#include -+#include -+#include -+#include -+ -+#include -+ -+#ifdef WORDS_BIGENDIAN -+#define IEEE_MC68k -+#else -+#define IEEE_8087 -+#endif -+ -+typedef int int32; -+typedef unsigned int uint32; -+ -+typedef unsigned long long uint64; -+ -+#define HAVE_LONG_LONG -+ -+#define Long int32 /* ZOMG */ -+#define ULong uint32 /* WTF */ -+#ifdef HAVE_LONG_LONG -+#define ULLong uint64 -+#endif -+ -+#define MALLOC(s) kmalloc(s, GFP_ATOMIC) -+#define FREE(p) kfree(p) -+ -+#define DBL_DIG 15 -+#define DBL_MAX_10_EXP 308 -+#define DBL_MAX_EXP 1024 -+#define FLT_RADIX 2 -+ -+/* maximum permitted exponent value for strtod; exponents larger than -+ MAX_ABS_EXP in absolute value get truncated to +-MAX_ABS_EXP. MAX_ABS_EXP -+ should fit into an int. */ -+#ifndef MAX_ABS_EXP -+#define MAX_ABS_EXP 1100000000U -+#endif -+/* Bound on length of pieces of input strings in sb_strtod; specifically, -+ this is used to bound the total number of digits ignoring leading zeros and -+ the number of digits that follow the decimal point. Ideally, MAX_DIGITS -+ should satisfy MAX_DIGITS + 400 < MAX_ABS_EXP; that ensures that the -+ exponent clipping in sb_strtod can't affect the value of the output. */ -+#ifndef MAX_DIGITS -+#define MAX_DIGITS 1000000000U -+#endif -+ -+/* End sphinxbase #define linking */ -+ -+#ifdef DEBUG -+#define Bug(x) {fprintf(stderr, "%s\n", x); exit(1);} -+#endif -+ -+typedef union { double d; ULong L[2]; } U; -+ -+#ifdef IEEE_8087 -+#define word0(x) (x)->L[1] -+#define word1(x) (x)->L[0] -+#else -+#define word0(x) (x)->L[0] -+#define word1(x) (x)->L[1] -+#endif -+#define dval(x) (x)->d -+ -+#ifndef STRTOD_DIGLIM -+#define STRTOD_DIGLIM 40 -+#endif -+ -+/* maximum permitted exponent value for strtod; exponents larger than -+ MAX_ABS_EXP in absolute value get truncated to +-MAX_ABS_EXP. MAX_ABS_EXP -+ should fit into an int. */ -+#ifndef MAX_ABS_EXP -+#define MAX_ABS_EXP 1100000000U -+#endif -+/* Bound on length of pieces of input strings in sb_strtod; specifically, -+ this is used to bound the total number of digits ignoring leading zeros and -+ the number of digits that follow the decimal point. Ideally, MAX_DIGITS -+ should satisfy MAX_DIGITS + 400 < MAX_ABS_EXP; that ensures that the -+ exponent clipping in sb_strtod can't affect the value of the output. */ -+#ifndef MAX_DIGITS -+#define MAX_DIGITS 1000000000U -+#endif -+ -+/* Guard against trying to use the above values on unusual platforms with ints -+ * of width less than 32 bits. */ -+#if MAX_ABS_EXP > 0x7fffffff -+#error "MAX_ABS_EXP should fit in an int" -+#endif -+#if MAX_DIGITS > 0x7fffffff -+#error "MAX_DIGITS should fit in an int" -+#endif -+ -+/* The following definition of Storeinc is appropriate for MIPS processors. -+ * An alternative that might be better on some machines is -+ * #define Storeinc(a,b,c) (*a++ = b << 16 | c & 0xffff) -+ */ -+#if defined(IEEE_8087) -+#define Storeinc(a,b,c) (((unsigned short *)a)[1] = (unsigned short)b, \ -+ ((unsigned short *)a)[0] = (unsigned short)c, a++) -+#else -+#define Storeinc(a,b,c) (((unsigned short *)a)[0] = (unsigned short)b, \ -+ ((unsigned short *)a)[1] = (unsigned short)c, a++) -+#endif -+ -+/* #define P DBL_MANT_DIG */ -+/* Ten_pmax = floor(P*log(2)/log(5)) */ -+/* Bletch = (highest power of 2 < DBL_MAX_10_EXP) / 16 */ -+/* Quick_max = floor((P-1)*log(FLT_RADIX)/log(10) - 1) */ -+/* Int_max = floor(P*log(FLT_RADIX)/log(10) - 1) */ -+ -+#define Exp_shift 20 -+#define Exp_shift1 20 -+#define Exp_msk1 0x100000 -+#define Exp_msk11 0x100000 -+#define Exp_mask 0x7ff00000 -+#define P 53 -+#define Nbits 53 -+#define Bias 1023 -+#define Emax 1023 -+#define Emin (-1022) -+#define Etiny (-1074) /* smallest denormal is 2**Etiny */ -+#define Exp_1 0x3ff00000 -+#define Exp_11 0x3ff00000 -+#define Ebits 11 -+#define Frac_mask 0xfffff -+#define Frac_mask1 0xfffff -+#define Ten_pmax 22 -+#define Bletch 0x10 -+#define Bndry_mask 0xfffff -+#define Bndry_mask1 0xfffff -+#define Sign_bit 0x80000000 -+#define Log2P 1 -+#define Tiny0 0 -+#define Tiny1 1 -+#define Quick_max 14 -+#define Int_max 14 -+ -+#ifndef Flt_Rounds -+#ifdef FLT_ROUNDS -+#define Flt_Rounds FLT_ROUNDS -+#else -+#define Flt_Rounds 1 -+#endif -+#endif /*Flt_Rounds*/ -+ -+#define Rounding Flt_Rounds -+ -+#define Big0 (Frac_mask1 | Exp_msk1*(DBL_MAX_EXP+Bias-1)) -+#define Big1 0xffffffff -+ -+/* Standard NaN used by sb_stdnan. */ -+ -+#define NAN_WORD0 0x7ff80000 -+#define NAN_WORD1 0 -+ -+/* Bits of the representation of positive infinity. */ -+ -+#define POSINF_WORD0 0x7ff00000 -+#define POSINF_WORD1 0 -+ -+/* struct BCinfo is used to pass information from sb_strtod to bigcomp */ -+ -+typedef struct BCinfo BCinfo; -+struct -+BCinfo { -+ int e0, nd, nd0, scale; -+}; -+ -+#define FFFFFFFF 0xffffffffUL -+ -+#define Kmax 7 -+ -+/* struct Bigint is used to represent arbitrary-precision integers. These -+ integers are stored in sign-magnitude format, with the magnitude stored as -+ an array of base 2**32 digits. Bigints are always normalized: if x is a -+ Bigint then x->wds >= 1, and either x->wds == 1 or x[wds-1] is nonzero. -+ -+ The Bigint fields are as follows: -+ -+ - next is a header used by Balloc and Bfree to keep track of lists -+ of freed Bigints; it's also used for the linked list of -+ powers of 5 of the form 5**2**i used by pow5mult. -+ - k indicates which pool this Bigint was allocated from -+ - maxwds is the maximum number of words space was allocated for -+ (usually maxwds == 2**k) -+ - sign is 1 for negative Bigints, 0 for positive. The sign is unused -+ (ignored on inputs, set to 0 on outputs) in almost all operations -+ involving Bigints: a notable exception is the diff function, which -+ ignores signs on inputs but sets the sign of the output correctly. -+ - wds is the actual number of significant words -+ - x contains the vector of words (digits) for this Bigint, from least -+ significant (x[0]) to most significant (x[wds-1]). -+*/ -+ -+struct -+Bigint { -+ struct Bigint *next; -+ int k, maxwds, sign, wds; -+ ULong x[1]; -+}; -+ -+typedef struct Bigint Bigint; -+ -+#if 0 /* OpenCN */ -+#define SPHINXBASE_USING_MEMORY_DEBUGGER 1 -+#endif -+ -+#ifndef SPHINXBASE_USING_MEMORY_DEBUGGER -+ -+#ifndef PRIVATE_MEM -+#define PRIVATE_MEM 2304 -+#endif -+#define PRIVATE_mem ((PRIVATE_MEM+sizeof(double)-1)/sizeof(double)) -+static double private_mem[PRIVATE_mem], *pmem_next = private_mem; -+ -+/* Memory management: memory is allocated from, and returned to, Kmax+1 pools -+ of memory, where pool k (0 <= k <= Kmax) is for Bigints b with b->maxwds == -+ 1 << k. These pools are maintained as linked lists, with freelist[k] -+ pointing to the head of the list for pool k. -+ -+ On allocation, if there's no free slot in the appropriate pool, MALLOC is -+ called to get more memory. This memory is not returned to the system until -+ Python quits. There's also a private memory pool that's allocated from -+ in preference to using MALLOC. -+ -+ For Bigints with more than (1 << Kmax) digits (which implies at least 1233 -+ decimal digits), memory is directly allocated using MALLOC, and freed using -+ FREE. -+ -+ XXX: it would be easy to bypass this memory-management system and -+ translate each call to Balloc into a call to PyMem_Malloc, and each -+ Bfree to PyMem_Free. Investigate whether this has any significant -+ performance on impact. */ -+ -+static Bigint *freelist[Kmax+1]; -+ -+/* Allocate space for a Bigint with up to 1<next; -+ else { -+ x = 1 << k; -+ len = (sizeof(Bigint) + (x-1)*sizeof(ULong) + sizeof(double) - 1) -+ /sizeof(double); -+ if (k <= Kmax && pmem_next - private_mem + len <= PRIVATE_mem) { -+ rv = (Bigint*)pmem_next; -+ pmem_next += len; -+ } -+ else { -+ rv = (Bigint*)MALLOC(len*sizeof(double)); -+ if (rv == NULL) -+ return NULL; -+ } -+ rv->k = k; -+ rv->maxwds = x; -+ } -+ rv->sign = rv->wds = 0; -+ return rv; -+} -+ -+/* Free a Bigint allocated with Balloc */ -+ -+static void -+Bfree(Bigint *v) -+{ -+ if (v) { -+ if (v->k > Kmax) -+ FREE((void*)v); -+ else { -+ v->next = freelist[v->k]; -+ freelist[v->k] = v; -+ } -+ } -+} -+ -+#else -+ -+/* Alternative versions of Balloc and Bfree that use PyMem_Malloc and -+ PyMem_Free directly in place of the custom memory allocation scheme above. -+ These are provided for the benefit of memory debugging tools like -+ Valgrind. */ -+ -+/* Allocate space for a Bigint with up to 1<k = k; -+ rv->maxwds = x; -+ rv->sign = rv->wds = 0; -+ return rv; -+} -+ -+/* Free a Bigint allocated with Balloc */ -+ -+static void -+Bfree(Bigint *v) -+{ -+ if (v) { -+ FREE((void*)v); -+ } -+} -+ -+#endif /* SPHINXBASE_USING_MEMORY_DEBUGGER */ -+ -+#define Bcopy(x,y) memcpy((char *)&x->sign, (char *)&y->sign, \ -+ y->wds*sizeof(Long) + 2*sizeof(int)) -+ -+/* Multiply a Bigint b by m and add a. Either modifies b in place and returns -+ a pointer to the modified b, or Bfrees b and returns a pointer to a copy. -+ On failure, return NULL. In this case, b will have been already freed. */ -+ -+static Bigint * -+multadd(Bigint *b, int m, int a) /* multiply by m and add a */ -+{ -+ int i, wds; -+#ifdef ULLong -+ ULong *x; -+ ULLong carry, y; -+#else -+ ULong carry, *x, y; -+ ULong xi, z; -+#endif -+ Bigint *b1; -+ -+ wds = b->wds; -+ x = b->x; -+ i = 0; -+ carry = a; -+ do { -+#ifdef ULLong -+ y = *x * (ULLong)m + carry; -+ carry = y >> 32; -+ *x++ = (ULong)(y & FFFFFFFF); -+#else -+ xi = *x; -+ y = (xi & 0xffff) * m + carry; -+ z = (xi >> 16) * m + (y >> 16); -+ carry = z >> 16; -+ *x++ = (z << 16) + (y & 0xffff); -+#endif -+ } -+ while(++i < wds); -+ if (carry) { -+ if (wds >= b->maxwds) { -+ b1 = Balloc(b->k+1); -+ if (b1 == NULL){ -+ Bfree(b); -+ return NULL; -+ } -+ Bcopy(b1, b); -+ Bfree(b); -+ b = b1; -+ } -+ b->x[wds++] = (ULong)carry; -+ b->wds = wds; -+ } -+ return b; -+} -+ -+/* convert a string s containing nd decimal digits (possibly containing a -+ decimal separator at position nd0, which is ignored) to a Bigint. This -+ function carries on where the parsing code in sb_strtod leaves off: on -+ entry, y9 contains the result of converting the first 9 digits. Returns -+ NULL on failure. */ -+ -+static Bigint * -+s2b(const char *s, int nd0, int nd, ULong y9) -+{ -+ Bigint *b; -+ int i, k; -+ Long x, y; -+ -+ x = (nd + 8) / 9; -+ for(k = 0, y = 1; x > y; y <<= 1, k++) ; -+ b = Balloc(k); -+ if (b == NULL) -+ return NULL; -+ b->x[0] = y9; -+ b->wds = 1; -+ -+ if (nd <= 9) -+ return b; -+ -+ s += 9; -+ for (i = 9; i < nd0; i++) { -+ b = multadd(b, 10, *s++ - '0'); -+ if (b == NULL) -+ return NULL; -+ } -+ s++; -+ for(; i < nd; i++) { -+ b = multadd(b, 10, *s++ - '0'); -+ if (b == NULL) -+ return NULL; -+ } -+ return b; -+} -+ -+/* count leading 0 bits in the 32-bit integer x. */ -+ -+static int -+hi0bits(ULong x) -+{ -+ int k = 0; -+ -+ if (!(x & 0xffff0000)) { -+ k = 16; -+ x <<= 16; -+ } -+ if (!(x & 0xff000000)) { -+ k += 8; -+ x <<= 8; -+ } -+ if (!(x & 0xf0000000)) { -+ k += 4; -+ x <<= 4; -+ } -+ if (!(x & 0xc0000000)) { -+ k += 2; -+ x <<= 2; -+ } -+ if (!(x & 0x80000000)) { -+ k++; -+ if (!(x & 0x40000000)) -+ return 32; -+ } -+ return k; -+} -+ -+/* convert a small nonnegative integer to a Bigint */ -+ -+static Bigint * -+i2b(int i) -+{ -+ Bigint *b; -+ -+ b = Balloc(1); -+ if (b == NULL) -+ return NULL; -+ b->x[0] = i; -+ b->wds = 1; -+ return b; -+} -+ -+/* multiply two Bigints. Returns a new Bigint, or NULL on failure. Ignores -+ the signs of a and b. */ -+ -+static Bigint * -+mult(Bigint *a, Bigint *b) -+{ -+ Bigint *c; -+ int k, wa, wb, wc; -+ ULong *x, *xa, *xae, *xb, *xbe, *xc, *xc0; -+ ULong y; -+#ifdef ULLong -+ ULLong carry, z; -+#else -+ ULong carry, z; -+ ULong z2; -+#endif -+ -+ if ((!a->x[0] && a->wds == 1) || (!b->x[0] && b->wds == 1)) { -+ c = Balloc(0); -+ if (c == NULL) -+ return NULL; -+ c->wds = 1; -+ c->x[0] = 0; -+ return c; -+ } -+ -+ if (a->wds < b->wds) { -+ c = a; -+ a = b; -+ b = c; -+ } -+ k = a->k; -+ wa = a->wds; -+ wb = b->wds; -+ wc = wa + wb; -+ if (wc > a->maxwds) -+ k++; -+ c = Balloc(k); -+ if (c == NULL) -+ return NULL; -+ for(x = c->x, xa = x + wc; x < xa; x++) -+ *x = 0; -+ xa = a->x; -+ xae = xa + wa; -+ xb = b->x; -+ xbe = xb + wb; -+ xc0 = c->x; -+#ifdef ULLong -+ for(; xb < xbe; xc0++) { -+ if ((y = *xb++)) { -+ x = xa; -+ xc = xc0; -+ carry = 0; -+ do { -+ z = *x++ * (ULLong)y + *xc + carry; -+ carry = z >> 32; -+ *xc++ = (ULong)(z & FFFFFFFF); -+ } -+ while(x < xae); -+ *xc = (ULong)carry; -+ } -+ } -+#else -+ for(; xb < xbe; xb++, xc0++) { -+ if ((y = *xb) & 0xffff) { -+ x = xa; -+ xc = xc0; -+ carry = 0; -+ do { -+ z = (*x & 0xffff) * y + (*xc & 0xffff) + carry; -+ carry = z >> 16; -+ z2 = (*x++ >> 16) * y + (*xc >> 16) + carry; -+ carry = z2 >> 16; -+ Storeinc(xc, z2, z); -+ } -+ while(x < xae); -+ *xc = carry; -+ } -+ if ((y = *xb) >> 16) { -+ x = xa; -+ xc = xc0; -+ carry = 0; -+ z2 = *xc; -+ do { -+ z = (*x & 0xffff) * y + (*xc >> 16) + carry; -+ carry = z >> 16; -+ Storeinc(xc, z, z2); -+ z2 = (*x++ >> 16) * y + (*xc & 0xffff) + carry; -+ carry = z2 >> 16; -+ } -+ while(x < xae); -+ *xc = z2; -+ } -+ } -+#endif -+ for(xc0 = c->x, xc = xc0 + wc; wc > 0 && !*--xc; --wc) ; -+ c->wds = wc; -+ return c; -+} -+ -+#ifndef SPHINXBASE_USING_MEMORY_DEBUGGER -+ -+/* p5s is a linked list of powers of 5 of the form 5**(2**i), i >= 2 */ -+ -+static Bigint *p5s; -+ -+/* multiply the Bigint b by 5**k. Returns a pointer to the result, or NULL on -+ failure; if the returned pointer is distinct from b then the original -+ Bigint b will have been Bfree'd. Ignores the sign of b. */ -+ -+static Bigint * -+pow5mult(Bigint *b, int k) -+{ -+ Bigint *b1, *p5, *p51; -+ int i; -+ static int p05[3] = { 5, 25, 125 }; -+ -+ if ((i = k & 3)) { -+ b = multadd(b, p05[i-1], 0); -+ if (b == NULL) -+ return NULL; -+ } -+ -+ if (!(k >>= 2)) -+ return b; -+ p5 = p5s; -+ if (!p5) { -+ /* first time */ -+ p5 = i2b(625); -+ if (p5 == NULL) { -+ Bfree(b); -+ return NULL; -+ } -+ p5s = p5; -+ p5->next = 0; -+ } -+ for(;;) { -+ if (k & 1) { -+ b1 = mult(b, p5); -+ Bfree(b); -+ b = b1; -+ if (b == NULL) -+ return NULL; -+ } -+ if (!(k >>= 1)) -+ break; -+ p51 = p5->next; -+ if (!p51) { -+ p51 = mult(p5,p5); -+ if (p51 == NULL) { -+ Bfree(b); -+ return NULL; -+ } -+ p51->next = 0; -+ p5->next = p51; -+ } -+ p5 = p51; -+ } -+ return b; -+} -+ -+#else -+ -+/* Version of pow5mult that doesn't cache powers of 5. Provided for -+ the benefit of memory debugging tools like Valgrind. */ -+ -+static Bigint * -+pow5mult(Bigint *b, int k) -+{ -+ Bigint *b1, *p5, *p51; -+ int i; -+ static int p05[3] = { 5, 25, 125 }; -+ -+ if ((i = k & 3)) { -+ b = multadd(b, p05[i-1], 0); -+ if (b == NULL) -+ return NULL; -+ } -+ -+ if (!(k >>= 2)) -+ return b; -+ p5 = i2b(625); -+ if (p5 == NULL) { -+ Bfree(b); -+ return NULL; -+ } -+ -+ for(;;) { -+ if (k & 1) { -+ b1 = mult(b, p5); -+ Bfree(b); -+ b = b1; -+ if (b == NULL) { -+ Bfree(p5); -+ return NULL; -+ } -+ } -+ if (!(k >>= 1)) -+ break; -+ p51 = mult(p5, p5); -+ Bfree(p5); -+ p5 = p51; -+ if (p5 == NULL) { -+ Bfree(b); -+ return NULL; -+ } -+ } -+ Bfree(p5); -+ return b; -+} -+ -+#endif /* SPHINXBASE_USING_MEMORY_DEBUGGER */ -+ -+/* shift a Bigint b left by k bits. Return a pointer to the shifted result, -+ or NULL on failure. If the returned pointer is distinct from b then the -+ original b will have been Bfree'd. Ignores the sign of b. */ -+ -+static Bigint * -+lshift(Bigint *b, int k) -+{ -+ int i, k1, n, n1; -+ Bigint *b1; -+ ULong *x, *x1, *xe, z; -+ -+ if (!k || (!b->x[0] && b->wds == 1)) -+ return b; -+ -+ n = k >> 5; -+ k1 = b->k; -+ n1 = n + b->wds + 1; -+ for(i = b->maxwds; n1 > i; i <<= 1) -+ k1++; -+ b1 = Balloc(k1); -+ if (b1 == NULL) { -+ Bfree(b); -+ return NULL; -+ } -+ x1 = b1->x; -+ for(i = 0; i < n; i++) -+ *x1++ = 0; -+ x = b->x; -+ xe = x + b->wds; -+ if (k &= 0x1f) { -+ k1 = 32 - k; -+ z = 0; -+ do { -+ *x1++ = *x << k | z; -+ z = *x++ >> k1; -+ } -+ while(x < xe); -+ if ((*x1 = z)) -+ ++n1; -+ } -+ else do -+ *x1++ = *x++; -+ while(x < xe); -+ b1->wds = n1 - 1; -+ Bfree(b); -+ return b1; -+} -+ -+/* Do a three-way compare of a and b, returning -1 if a < b, 0 if a == b and -+ 1 if a > b. Ignores signs of a and b. */ -+ -+static int -+cmp(Bigint *a, Bigint *b) -+{ -+ ULong *xa, *xa0, *xb, *xb0; -+ int i, j; -+ -+ i = a->wds; -+ j = b->wds; -+#ifdef DEBUG -+ if (i > 1 && !a->x[i-1]) -+ Bug("cmp called with a->x[a->wds-1] == 0"); -+ if (j > 1 && !b->x[j-1]) -+ Bug("cmp called with b->x[b->wds-1] == 0"); -+#endif -+ if (i -= j) -+ return i; -+ xa0 = a->x; -+ xa = xa0 + j; -+ xb0 = b->x; -+ xb = xb0 + j; -+ for(;;) { -+ if (*--xa != *--xb) -+ return *xa < *xb ? -1 : 1; -+ if (xa <= xa0) -+ break; -+ } -+ return 0; -+} -+ -+/* Take the difference of Bigints a and b, returning a new Bigint. Returns -+ NULL on failure. The signs of a and b are ignored, but the sign of the -+ result is set appropriately. */ -+ -+static Bigint * -+diff(Bigint *a, Bigint *b) -+{ -+ Bigint *c; -+ int i, wa, wb; -+ ULong *xa, *xae, *xb, *xbe, *xc; -+#ifdef ULLong -+ ULLong borrow, y; -+#else -+ ULong borrow, y; -+ ULong z; -+#endif -+ -+ i = cmp(a,b); -+ if (!i) { -+ c = Balloc(0); -+ if (c == NULL) -+ return NULL; -+ c->wds = 1; -+ c->x[0] = 0; -+ return c; -+ } -+ if (i < 0) { -+ c = a; -+ a = b; -+ b = c; -+ i = 1; -+ } -+ else -+ i = 0; -+ c = Balloc(a->k); -+ if (c == NULL) -+ return NULL; -+ c->sign = i; -+ wa = a->wds; -+ xa = a->x; -+ xae = xa + wa; -+ wb = b->wds; -+ xb = b->x; -+ xbe = xb + wb; -+ xc = c->x; -+ borrow = 0; -+#ifdef ULLong -+ do { -+ y = (ULLong)*xa++ - *xb++ - borrow; -+ borrow = y >> 32 & (ULong)1; -+ *xc++ = (ULong)(y & FFFFFFFF); -+ } -+ while(xb < xbe); -+ while(xa < xae) { -+ y = *xa++ - borrow; -+ borrow = y >> 32 & (ULong)1; -+ *xc++ = (ULong)(y & FFFFFFFF); -+ } -+#else -+ do { -+ y = (*xa & 0xffff) - (*xb & 0xffff) - borrow; -+ borrow = (y & 0x10000) >> 16; -+ z = (*xa++ >> 16) - (*xb++ >> 16) - borrow; -+ borrow = (z & 0x10000) >> 16; -+ Storeinc(xc, z, y); -+ } -+ while(xb < xbe); -+ while(xa < xae) { -+ y = (*xa & 0xffff) - borrow; -+ borrow = (y & 0x10000) >> 16; -+ z = (*xa++ >> 16) - borrow; -+ borrow = (z & 0x10000) >> 16; -+ Storeinc(xc, z, y); -+ } -+#endif -+ while(!*--xc) -+ wa--; -+ c->wds = wa; -+ return c; -+} -+ -+/* Given a positive normal double x, return the difference between x and the -+ next double up. Doesn't give correct results for subnormals. */ -+ -+static double -+ulp(U *x) -+{ -+ Long L; -+ U u; -+ -+ L = (word0(x) & Exp_mask) - (P-1)*Exp_msk1; -+ word0(&u) = L; -+ word1(&u) = 0; -+ return dval(&u); -+} -+ -+/* Convert a Bigint to a double plus an exponent */ -+ -+static double -+b2d(Bigint *a, int *e) -+{ -+ ULong *xa, *xa0, w, y, z; -+ int k; -+ U d; -+ -+ xa0 = a->x; -+ xa = xa0 + a->wds; -+ y = *--xa; -+#ifdef DEBUG -+ if (!y) Bug("zero y in b2d"); -+#endif -+ k = hi0bits(y); -+ *e = 32 - k; -+ if (k < Ebits) { -+ word0(&d) = Exp_1 | y >> (Ebits - k); -+ w = xa > xa0 ? *--xa : 0; -+ word1(&d) = y << ((32-Ebits) + k) | w >> (Ebits - k); -+ goto ret_d; -+ } -+ z = xa > xa0 ? *--xa : 0; -+ if (k -= Ebits) { -+ word0(&d) = Exp_1 | y << k | z >> (32 - k); -+ y = xa > xa0 ? *--xa : 0; -+ word1(&d) = z << k | y >> (32 - k); -+ } -+ else { -+ word0(&d) = Exp_1 | y; -+ word1(&d) = z; -+ } -+ ret_d: -+ return dval(&d); -+} -+ -+/* Convert a scaled double to a Bigint plus an exponent. Similar to d2b, -+ except that it accepts the scale parameter used in sb_strtod (which -+ should be either 0 or 2*P), and the normalization for the return value is -+ different (see below). On input, d should be finite and nonnegative, and d -+ / 2**scale should be exactly representable as an IEEE 754 double. -+ -+ Returns a Bigint b and an integer e such that -+ -+ dval(d) / 2**scale = b * 2**e. -+ -+ Unlike d2b, b is not necessarily odd: b and e are normalized so -+ that either 2**(P-1) <= b < 2**P and e >= Etiny, or b < 2**P -+ and e == Etiny. This applies equally to an input of 0.0: in that -+ case the return values are b = 0 and e = Etiny. -+ -+ The above normalization ensures that for all possible inputs d, -+ 2**e gives ulp(d/2**scale). -+ -+ Returns NULL on failure. -+*/ -+ -+static Bigint * -+sd2b(U *d, int scale, int *e) -+{ -+ Bigint *b; -+ -+ b = Balloc(1); -+ if (b == NULL) -+ return NULL; -+ -+ /* First construct b and e assuming that scale == 0. */ -+ b->wds = 2; -+ b->x[0] = word1(d); -+ b->x[1] = word0(d) & Frac_mask; -+ *e = Etiny - 1 + (int)((word0(d) & Exp_mask) >> Exp_shift); -+ if (*e < Etiny) -+ *e = Etiny; -+ else -+ b->x[1] |= Exp_msk1; -+ -+ /* Now adjust for scale, provided that b != 0. */ -+ if (scale && (b->x[0] || b->x[1])) { -+ *e -= scale; -+ if (*e < Etiny) { -+ scale = Etiny - *e; -+ *e = Etiny; -+ -+ /* We can't shift more than P-1 bits without shifting out a 1. */ -+ BUG_ON(!(0 < scale && scale <= P - 1)); -+ -+ if (scale >= 32) { -+ /* The bits shifted out should all be zero. */ -+ BUG_ON(!(b->x[0] == 0)); -+ b->x[0] = b->x[1]; -+ b->x[1] = 0; -+ scale -= 32; -+ } -+ if (scale) { -+ /* The bits shifted out should all be zero. */ -+ BUG_ON(!(b->x[0] << (32 - scale) == 0)); -+ b->x[0] = (b->x[0] >> scale) | (b->x[1] << (32 - scale)); -+ b->x[1] >>= scale; -+ } -+ } -+ } -+ /* Ensure b is normalized. */ -+ if (!b->x[1]) -+ b->wds = 1; -+ -+ return b; -+} -+ -+/* Compute the ratio of two Bigints, as a double. The result may have an -+ error of up to 2.5 ulps. */ -+ -+static double -+ratio(Bigint *a, Bigint *b) -+{ -+ U da, db; -+ int k, ka, kb; -+ -+ dval(&da) = b2d(a, &ka); -+ dval(&db) = b2d(b, &kb); -+ k = ka - kb + 32*(a->wds - b->wds); -+ if (k > 0) -+ word0(&da) += k*Exp_msk1; -+ else { -+ k = -k; -+ word0(&db) += k*Exp_msk1; -+ } -+ return dval(&da) / dval(&db); -+} -+ -+static const double -+tens[] = { -+ 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, -+ 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, -+ 1e20, 1e21, 1e22 -+}; -+ -+static const double -+bigtens[] = { 1e16, 1e32, 1e64, 1e128, 1e256 }; -+static const double tinytens[] = { 1e-16, 1e-32, 1e-64, 1e-128, -+ 9007199254740992.*9007199254740992.e-256 -+ /* = 2^106 * 1e-256 */ -+}; -+/* The factor of 2^53 in tinytens[4] helps us avoid setting the underflow */ -+/* flag unnecessarily. It leads to a song and dance at the end of strtod. */ -+#define Scale_Bit 0x10 -+#define n_bigtens 5 -+ -+#define ULbits 32 -+#define kshift 5 -+#define kmask 31 -+ -+ -+static int -+dshift(Bigint *b, int p2) -+{ -+ int rv = hi0bits(b->x[b->wds-1]) - 4; -+ if (p2 > 0) -+ rv -= p2; -+ return rv & kmask; -+} -+ -+/* special case of Bigint division. The quotient is always in the range 0 <= -+ quotient < 10, and on entry the divisor S is normalized so that its top 4 -+ bits (28--31) are zero and bit 27 is set. */ -+ -+static int -+quorem(Bigint *b, Bigint *S) -+{ -+ int n; -+ ULong *bx, *bxe, q, *sx, *sxe; -+#ifdef ULLong -+ ULLong borrow, carry, y, ys; -+#else -+ ULong borrow, carry, y, ys; -+ ULong si, z, zs; -+#endif -+ -+ n = S->wds; -+#ifdef DEBUG -+ /*debug*/ if (b->wds > n) -+ /*debug*/ Bug("oversize b in quorem"); -+#endif -+ if (b->wds < n) -+ return 0; -+ sx = S->x; -+ sxe = sx + --n; -+ bx = b->x; -+ bxe = bx + n; -+ q = *bxe / (*sxe + 1); /* ensure q <= true quotient */ -+#ifdef DEBUG -+ /*debug*/ if (q > 9) -+ /*debug*/ Bug("oversized quotient in quorem"); -+#endif -+ if (q) { -+ borrow = 0; -+ carry = 0; -+ do { -+#ifdef ULLong -+ ys = *sx++ * (ULLong)q + carry; -+ carry = ys >> 32; -+ y = *bx - (ys & FFFFFFFF) - borrow; -+ borrow = y >> 32 & (ULong)1; -+ *bx++ = (ULong)(y & FFFFFFFF); -+#else -+ si = *sx++; -+ ys = (si & 0xffff) * q + carry; -+ zs = (si >> 16) * q + (ys >> 16); -+ carry = zs >> 16; -+ y = (*bx & 0xffff) - (ys & 0xffff) - borrow; -+ borrow = (y & 0x10000) >> 16; -+ z = (*bx >> 16) - (zs & 0xffff) - borrow; -+ borrow = (z & 0x10000) >> 16; -+ Storeinc(bx, z, y); -+#endif -+ } -+ while(sx <= sxe); -+ if (!*bxe) { -+ bx = b->x; -+ while(--bxe > bx && !*bxe) -+ --n; -+ b->wds = n; -+ } -+ } -+ if (cmp(b, S) >= 0) { -+ q++; -+ borrow = 0; -+ carry = 0; -+ bx = b->x; -+ sx = S->x; -+ do { -+#ifdef ULLong -+ ys = *sx++ + carry; -+ carry = ys >> 32; -+ y = *bx - (ys & FFFFFFFF) - borrow; -+ borrow = y >> 32 & (ULong)1; -+ *bx++ = (ULong)(y & FFFFFFFF); -+#else -+ si = *sx++; -+ ys = (si & 0xffff) + carry; -+ zs = (si >> 16) + (ys >> 16); -+ carry = zs >> 16; -+ y = (*bx & 0xffff) - (ys & 0xffff) - borrow; -+ borrow = (y & 0x10000) >> 16; -+ z = (*bx >> 16) - (zs & 0xffff) - borrow; -+ borrow = (z & 0x10000) >> 16; -+ Storeinc(bx, z, y); -+#endif -+ } -+ while(sx <= sxe); -+ bx = b->x; -+ bxe = bx + n; -+ if (!*bxe) { -+ while(--bxe > bx && !*bxe) -+ --n; -+ b->wds = n; -+ } -+ } -+ return q; -+} -+ -+/* sulp(x) is a version of ulp(x) that takes bc.scale into account. -+ -+ Assuming that x is finite and nonnegative (positive zero is fine -+ here) and x / 2^bc.scale is exactly representable as a double, -+ sulp(x) is equivalent to 2^bc.scale * ulp(x / 2^bc.scale). */ -+ -+static double -+sulp(U *x, BCinfo *bc) -+{ -+ U u; -+ -+ if (bc->scale && 2*P + 1 > (int)((word0(x) & Exp_mask) >> Exp_shift)) { -+ /* rv/2^bc->scale is subnormal */ -+ word0(&u) = (P+2)*Exp_msk1; -+ word1(&u) = 0; -+ return u.d; -+ } -+ else { -+ BUG_ON(!((word0(x) || word1(x)))); /* x != 0.0 */ -+ return ulp(x); -+ } -+} -+ -+/* The bigcomp function handles some hard cases for strtod, for inputs -+ with more than STRTOD_DIGLIM digits. It's called once an initial -+ estimate for the double corresponding to the input string has -+ already been obtained by the code in sb_strtod. -+ -+ The bigcomp function is only called after sb_strtod has found a -+ double value rv such that either rv or rv + 1ulp represents the -+ correctly rounded value corresponding to the original string. It -+ determines which of these two values is the correct one by -+ computing the decimal digits of rv + 0.5ulp and comparing them with -+ the corresponding digits of s0. -+ -+ In the following, write dv for the absolute value of the number represented -+ by the input string. -+ -+ Inputs: -+ -+ s0 points to the first significant digit of the input string. -+ -+ rv is a (possibly scaled) estimate for the closest double value to the -+ value represented by the original input to sb_strtod. If -+ bc->scale is nonzero, then rv/2^(bc->scale) is the approximation to -+ the input value. -+ -+ bc is a struct containing information gathered during the parsing and -+ estimation steps of sb_strtod. Description of fields follows: -+ -+ bc->e0 gives the exponent of the input value, such that dv = (integer -+ given by the bd->nd digits of s0) * 10**e0 -+ -+ bc->nd gives the total number of significant digits of s0. It will -+ be at least 1. -+ -+ bc->nd0 gives the number of significant digits of s0 before the -+ decimal separator. If there's no decimal separator, bc->nd0 == -+ bc->nd. -+ -+ bc->scale is the value used to scale rv to avoid doing arithmetic with -+ subnormal values. It's either 0 or 2*P (=106). -+ -+ Outputs: -+ -+ On successful exit, rv/2^(bc->scale) is the closest double to dv. -+ -+ Returns 0 on success, -1 on failure (e.g., due to a failed malloc call). */ -+ -+static int -+bigcomp(U *rv, const char *s0, BCinfo *bc) -+{ -+ Bigint *b, *d; -+ int b2, d2, dd, i, nd, nd0, odd, p2, p5; -+ -+ nd = bc->nd; -+ nd0 = bc->nd0; -+ p5 = nd + bc->e0; -+ b = sd2b(rv, bc->scale, &p2); -+ if (b == NULL) -+ return -1; -+ -+ /* record whether the lsb of rv/2^(bc->scale) is odd: in the exact halfway -+ case, this is used for round to even. */ -+ odd = b->x[0] & 1; -+ -+ /* left shift b by 1 bit and or a 1 into the least significant bit; -+ this gives us b * 2**p2 = rv/2^(bc->scale) + 0.5 ulp. */ -+ b = lshift(b, 1); -+ if (b == NULL) -+ return -1; -+ b->x[0] |= 1; -+ p2--; -+ -+ p2 -= p5; -+ d = i2b(1); -+ if (d == NULL) { -+ Bfree(b); -+ return -1; -+ } -+ /* Arrange for convenient computation of quotients: -+ * shift left if necessary so divisor has 4 leading 0 bits. -+ */ -+ if (p5 > 0) { -+ d = pow5mult(d, p5); -+ if (d == NULL) { -+ Bfree(b); -+ return -1; -+ } -+ } -+ else if (p5 < 0) { -+ b = pow5mult(b, -p5); -+ if (b == NULL) { -+ Bfree(d); -+ return -1; -+ } -+ } -+ if (p2 > 0) { -+ b2 = p2; -+ d2 = 0; -+ } -+ else { -+ b2 = 0; -+ d2 = -p2; -+ } -+ i = dshift(d, d2); -+ if ((b2 += i) > 0) { -+ b = lshift(b, b2); -+ if (b == NULL) { -+ Bfree(d); -+ return -1; -+ } -+ } -+ if ((d2 += i) > 0) { -+ d = lshift(d, d2); -+ if (d == NULL) { -+ Bfree(b); -+ return -1; -+ } -+ } -+ -+ /* Compare s0 with b/d: set dd to -1, 0, or 1 according as s0 < b/d, s0 == -+ * b/d, or s0 > b/d. Here the digits of s0 are thought of as representing -+ * a number in the range [0.1, 1). */ -+ if (cmp(b, d) >= 0) -+ /* b/d >= 1 */ -+ dd = -1; -+ else { -+ i = 0; -+ for(;;) { -+ b = multadd(b, 10, 0); -+ if (b == NULL) { -+ Bfree(d); -+ return -1; -+ } -+ dd = s0[i < nd0 ? i : i+1] - '0' - quorem(b, d); -+ i++; -+ -+ if (dd) -+ break; -+ if (!b->x[0] && b->wds == 1) { -+ /* b/d == 0 */ -+ dd = i < nd; -+ break; -+ } -+ if (!(i < nd)) { -+ /* b/d != 0, but digits of s0 exhausted */ -+ dd = -1; -+ break; -+ } -+ } -+ } -+ Bfree(b); -+ Bfree(d); -+ if (dd > 0 || (dd == 0 && odd)) -+ dval(rv) += sulp(rv, bc); -+ return 0; -+} -+ -+double strtod(const char *s00, char **se) -+{ -+ int bb2, bb5, bbe, bd2, bd5, bs2, c, dsign, e, e1, error; -+ int esign, i, j, k, lz, nd, nd0, odd, sign; -+ const char *s, *s0, *s1; -+ double aadj, aadj1; -+ U aadj2, adj, rv, rv0; -+ ULong y, z, abs_exp; -+ Long L; -+ BCinfo bc; -+ Bigint *bb, *bb1, *bd, *bd0, *bs, *delta; -+ size_t ndigits, fraclen; -+ -+ dval(&rv) = 0.; -+ -+ /* Start parsing. */ -+ c = *(s = s00); -+ -+ /* Parse optional sign, if present. */ -+ sign = 0; -+ switch (c) { -+ case '-': -+ sign = 1; -+ fallthrough; -+ case '+': -+ c = *++s; -+ } -+ -+ /* Skip leading zeros: lz is true iff there were leading zeros. */ -+ s1 = s; -+ while (c == '0') -+ c = *++s; -+ lz = s != s1; -+ -+ /* Point s0 at the first nonzero digit (if any). fraclen will be the -+ number of digits between the decimal point and the end of the -+ digit string. ndigits will be the total number of digits ignoring -+ leading zeros. */ -+ s0 = s1 = s; -+ while ('0' <= c && c <= '9') -+ c = *++s; -+ ndigits = s - s1; -+ fraclen = 0; -+ -+ /* Parse decimal point and following digits. */ -+ if (c == '.') { -+ c = *++s; -+ if (!ndigits) { -+ s1 = s; -+ while (c == '0') -+ c = *++s; -+ lz = lz || s != s1; -+ fraclen += (s - s1); -+ s0 = s; -+ } -+ s1 = s; -+ while ('0' <= c && c <= '9') -+ c = *++s; -+ ndigits += s - s1; -+ fraclen += s - s1; -+ } -+ -+ /* Now lz is true if and only if there were leading zero digits, and -+ ndigits gives the total number of digits ignoring leading zeros. A -+ valid input must have at least one digit. */ -+ if (!ndigits && !lz) { -+ if (se) -+ *se = (char *)s00; -+ goto parse_error; -+ } -+ -+ /* Range check ndigits and fraclen to make sure that they, and values -+ computed with them, can safely fit in an int. */ -+ if (ndigits > MAX_DIGITS || fraclen > MAX_DIGITS) { -+ if (se) -+ *se = (char *)s00; -+ goto parse_error; -+ } -+ nd = (int)ndigits; -+ nd0 = (int)ndigits - (int)fraclen; -+ -+ /* Parse exponent. */ -+ e = 0; -+ if (c == 'e' || c == 'E') { -+ s00 = s; -+ c = *++s; -+ -+ /* Exponent sign. */ -+ esign = 0; -+ switch (c) { -+ case '-': -+ esign = 1; -+ fallthrough; -+ case '+': -+ c = *++s; -+ } -+ -+ /* Skip zeros. lz is true iff there are leading zeros. */ -+ s1 = s; -+ while (c == '0') -+ c = *++s; -+ lz = s != s1; -+ -+ /* Get absolute value of the exponent. */ -+ s1 = s; -+ abs_exp = 0; -+ while ('0' <= c && c <= '9') { -+ abs_exp = 10*abs_exp + (c - '0'); -+ c = *++s; -+ } -+ -+ /* abs_exp will be correct modulo 2**32. But 10**9 < 2**32, so if -+ there are at most 9 significant exponent digits then overflow is -+ impossible. */ -+ if (s - s1 > 9 || abs_exp > MAX_ABS_EXP) -+ e = (int)MAX_ABS_EXP; -+ else -+ e = (int)abs_exp; -+ if (esign) -+ e = -e; -+ -+ /* A valid exponent must have at least one digit. */ -+ if (s == s1 && !lz) -+ s = s00; -+ } -+ -+ /* Adjust exponent to take into account position of the point. */ -+ e -= nd - nd0; -+ if (nd0 <= 0) -+ nd0 = nd; -+ -+ /* Finished parsing. Set se to indicate how far we parsed */ -+ if (se) -+ *se = (char *)s; -+ -+ /* If all digits were zero, exit with return value +-0.0. Otherwise, -+ strip trailing zeros: scan back until we hit a nonzero digit. */ -+ if (!nd) -+ goto ret; -+ for (i = nd; i > 0; ) { -+ --i; -+ if (s0[i < nd0 ? i : i+1] != '0') { -+ ++i; -+ break; -+ } -+ } -+ e += nd - i; -+ nd = i; -+ if (nd0 > nd) -+ nd0 = nd; -+ -+ /* Summary of parsing results. After parsing, and dealing with zero -+ * inputs, we have values s0, nd0, nd, e, sign, where: -+ * -+ * - s0 points to the first significant digit of the input string -+ * -+ * - nd is the total number of significant digits (here, and -+ * below, 'significant digits' means the set of digits of the -+ * significand of the input that remain after ignoring leading -+ * and trailing zeros). -+ * -+ * - nd0 indicates the position of the decimal point, if present; it -+ * satisfies 1 <= nd0 <= nd. The nd significant digits are in -+ * s0[0:nd0] and s0[nd0+1:nd+1] using the usual Python half-open slice -+ * notation. (If nd0 < nd, then s0[nd0] contains a '.' character; if -+ * nd0 == nd, then s0[nd0] could be any non-digit character.) -+ * -+ * - e is the adjusted exponent: the absolute value of the number -+ * represented by the original input string is n * 10**e, where -+ * n is the integer represented by the concatenation of -+ * s0[0:nd0] and s0[nd0+1:nd+1] -+ * -+ * - sign gives the sign of the input: 1 for negative, 0 for positive -+ * -+ * - the first and last significant digits are nonzero -+ */ -+ -+ /* put first DBL_DIG+1 digits into integer y and z. -+ * -+ * - y contains the value represented by the first min(9, nd) -+ * significant digits -+ * -+ * - if nd > 9, z contains the value represented by significant digits -+ * with indices in [9, min(16, nd)). So y * 10**(min(16, nd) - 9) + z -+ * gives the value represented by the first min(16, nd) sig. digits. -+ */ -+ -+ bc.e0 = e1 = e; -+ y = z = 0; -+ for (i = 0; i < nd; i++) { -+ if (i < 9) -+ y = 10*y + s0[i < nd0 ? i : i+1] - '0'; -+ else if (i < DBL_DIG+1) -+ z = 10*z + s0[i < nd0 ? i : i+1] - '0'; -+ else -+ break; -+ } -+ -+ k = nd < DBL_DIG + 1 ? nd : DBL_DIG + 1; -+ dval(&rv) = y; -+ if (k > 9) { -+ dval(&rv) = tens[k - 9] * dval(&rv) + z; -+ } -+ bd0 = 0; -+ if (nd <= DBL_DIG -+ && Flt_Rounds == 1 -+ ) { -+ if (!e) -+ goto ret; -+ if (e > 0) { -+ if (e <= Ten_pmax) { -+ dval(&rv) *= tens[e]; -+ goto ret; -+ } -+ i = DBL_DIG - nd; -+ if (e <= Ten_pmax + i) { -+ /* A fancier test would sometimes let us do -+ * this for larger i values. -+ */ -+ e -= i; -+ dval(&rv) *= tens[i]; -+ dval(&rv) *= tens[e]; -+ goto ret; -+ } -+ } -+ else if (e >= -Ten_pmax) { -+ dval(&rv) /= tens[-e]; -+ goto ret; -+ } -+ } -+ e1 += nd - k; -+ -+ bc.scale = 0; -+ -+ /* Get starting approximation = rv * 10**e1 */ -+ -+ if (e1 > 0) { -+ if ((i = e1 & 15)) -+ dval(&rv) *= tens[i]; -+ if (e1 &= ~15) { -+ if (e1 > DBL_MAX_10_EXP) -+ goto ovfl; -+ e1 >>= 4; -+ for(j = 0; e1 > 1; j++, e1 >>= 1) -+ if (e1 & 1) -+ dval(&rv) *= bigtens[j]; -+ /* The last multiplication could overflow. */ -+ word0(&rv) -= P*Exp_msk1; -+ dval(&rv) *= bigtens[j]; -+ if ((z = word0(&rv) & Exp_mask) -+ > Exp_msk1*(DBL_MAX_EXP+Bias-P)) -+ goto ovfl; -+ if (z > Exp_msk1*(DBL_MAX_EXP+Bias-1-P)) { -+ /* set to largest number */ -+ /* (Can't trust DBL_MAX) */ -+ word0(&rv) = Big0; -+ word1(&rv) = Big1; -+ } -+ else -+ word0(&rv) += P*Exp_msk1; -+ } -+ } -+ else if (e1 < 0) { -+ /* The input decimal value lies in [10**e1, 10**(e1+16)). -+ -+ If e1 <= -512, underflow immediately. -+ If e1 <= -256, set bc.scale to 2*P. -+ -+ So for input value < 1e-256, bc.scale is always set; -+ for input value >= 1e-240, bc.scale is never set. -+ For input values in [1e-256, 1e-240), bc.scale may or may -+ not be set. */ -+ -+ e1 = -e1; -+ if ((i = e1 & 15)) -+ dval(&rv) /= tens[i]; -+ if (e1 >>= 4) { -+ if (e1 >= 1 << n_bigtens) -+ goto undfl; -+ if (e1 & Scale_Bit) -+ bc.scale = 2*P; -+ for(j = 0; e1 > 0; j++, e1 >>= 1) -+ if (e1 & 1) -+ dval(&rv) *= tinytens[j]; -+ if (bc.scale && (j = 2*P + 1 - ((word0(&rv) & Exp_mask) -+ >> Exp_shift)) > 0) { -+ /* scaled rv is denormal; clear j low bits */ -+ if (j >= 32) { -+ word1(&rv) = 0; -+ if (j >= 53) -+ word0(&rv) = (P+2)*Exp_msk1; -+ else -+ word0(&rv) &= 0xffffffff << (j-32); -+ } -+ else -+ word1(&rv) &= 0xffffffff << j; -+ } -+ if (!dval(&rv)) -+ goto undfl; -+ } -+ } -+ -+ /* Now the hard part -- adjusting rv to the correct value.*/ -+ -+ /* Put digits into bd: true value = bd * 10^e */ -+ -+ bc.nd = nd; -+ bc.nd0 = nd0; /* Only needed if nd > STRTOD_DIGLIM, but done here */ -+ /* to silence an erroneous warning about bc.nd0 */ -+ /* possibly not being initialized. */ -+ if (nd > STRTOD_DIGLIM) { -+ /* ASSERT(STRTOD_DIGLIM >= 18); 18 == one more than the */ -+ /* minimum number of decimal digits to distinguish double values */ -+ /* in IEEE arithmetic. */ -+ -+ /* Truncate input to 18 significant digits, then discard any trailing -+ zeros on the result by updating nd, nd0, e and y suitably. (There's -+ no need to update z; it's not reused beyond this point.) */ -+ for (i = 18; i > 0; ) { -+ /* scan back until we hit a nonzero digit. significant digit 'i' -+ is s0[i] if i < nd0, s0[i+1] if i >= nd0. */ -+ --i; -+ if (s0[i < nd0 ? i : i+1] != '0') { -+ ++i; -+ break; -+ } -+ } -+ e += nd - i; -+ nd = i; -+ if (nd0 > nd) -+ nd0 = nd; -+ if (nd < 9) { /* must recompute y */ -+ y = 0; -+ for(i = 0; i < nd0; ++i) -+ y = 10*y + s0[i] - '0'; -+ for(; i < nd; ++i) -+ y = 10*y + s0[i+1] - '0'; -+ } -+ } -+ bd0 = s2b(s0, nd0, nd, y); -+ if (bd0 == NULL) -+ goto failed_malloc; -+ -+ /* Notation for the comments below. Write: -+ -+ - dv for the absolute value of the number represented by the original -+ decimal input string. -+ -+ - if we've truncated dv, write tdv for the truncated value. -+ Otherwise, set tdv == dv. -+ -+ - srv for the quantity rv/2^bc.scale; so srv is the current binary -+ approximation to tdv (and dv). It should be exactly representable -+ in an IEEE 754 double. -+ */ -+ -+ for(;;) { -+ -+ /* This is the main correction loop for sb_strtod. -+ -+ We've got a decimal value tdv, and a floating-point approximation -+ srv=rv/2^bc.scale to tdv. The aim is to determine whether srv is -+ close enough (i.e., within 0.5 ulps) to tdv, and to compute a new -+ approximation if not. -+ -+ To determine whether srv is close enough to tdv, compute integers -+ bd, bb and bs proportional to tdv, srv and 0.5 ulp(srv) -+ respectively, and then use integer arithmetic to determine whether -+ |tdv - srv| is less than, equal to, or greater than 0.5 ulp(srv). -+ */ -+ -+ bd = Balloc(bd0->k); -+ if (bd == NULL) { -+ Bfree(bd0); -+ goto failed_malloc; -+ } -+ Bcopy(bd, bd0); -+ bb = sd2b(&rv, bc.scale, &bbe); /* srv = bb * 2^bbe */ -+ if (bb == NULL) { -+ Bfree(bd); -+ Bfree(bd0); -+ goto failed_malloc; -+ } -+ /* Record whether lsb of bb is odd, in case we need this -+ for the round-to-even step later. */ -+ odd = bb->x[0] & 1; -+ -+ /* tdv = bd * 10**e; srv = bb * 2**bbe */ -+ bs = i2b(1); -+ if (bs == NULL) { -+ Bfree(bb); -+ Bfree(bd); -+ Bfree(bd0); -+ goto failed_malloc; -+ } -+ -+ if (e >= 0) { -+ bb2 = bb5 = 0; -+ bd2 = bd5 = e; -+ } -+ else { -+ bb2 = bb5 = -e; -+ bd2 = bd5 = 0; -+ } -+ if (bbe >= 0) -+ bb2 += bbe; -+ else -+ bd2 -= bbe; -+ bs2 = bb2; -+ bb2++; -+ bd2++; -+ -+ /* At this stage bd5 - bb5 == e == bd2 - bb2 + bbe, bb2 - bs2 == 1, -+ and bs == 1, so: -+ -+ tdv == bd * 10**e = bd * 2**(bbe - bb2 + bd2) * 5**(bd5 - bb5) -+ srv == bb * 2**bbe = bb * 2**(bbe - bb2 + bb2) -+ 0.5 ulp(srv) == 2**(bbe-1) = bs * 2**(bbe - bb2 + bs2) -+ -+ It follows that: -+ -+ M * tdv = bd * 2**bd2 * 5**bd5 -+ M * srv = bb * 2**bb2 * 5**bb5 -+ M * 0.5 ulp(srv) = bs * 2**bs2 * 5**bb5 -+ -+ for some constant M. (Actually, M == 2**(bb2 - bbe) * 5**bb5, but -+ this fact is not needed below.) -+ */ -+ -+ /* Remove factor of 2**i, where i = min(bb2, bd2, bs2). */ -+ i = bb2 < bd2 ? bb2 : bd2; -+ if (i > bs2) -+ i = bs2; -+ if (i > 0) { -+ bb2 -= i; -+ bd2 -= i; -+ bs2 -= i; -+ } -+ -+ /* Scale bb, bd, bs by the appropriate powers of 2 and 5. */ -+ if (bb5 > 0) { -+ bs = pow5mult(bs, bb5); -+ if (bs == NULL) { -+ Bfree(bb); -+ Bfree(bd); -+ Bfree(bd0); -+ goto failed_malloc; -+ } -+ bb1 = mult(bs, bb); -+ Bfree(bb); -+ bb = bb1; -+ if (bb == NULL) { -+ Bfree(bs); -+ Bfree(bd); -+ Bfree(bd0); -+ goto failed_malloc; -+ } -+ } -+ if (bb2 > 0) { -+ bb = lshift(bb, bb2); -+ if (bb == NULL) { -+ Bfree(bs); -+ Bfree(bd); -+ Bfree(bd0); -+ goto failed_malloc; -+ } -+ } -+ if (bd5 > 0) { -+ bd = pow5mult(bd, bd5); -+ if (bd == NULL) { -+ Bfree(bb); -+ Bfree(bs); -+ Bfree(bd0); -+ goto failed_malloc; -+ } -+ } -+ if (bd2 > 0) { -+ bd = lshift(bd, bd2); -+ if (bd == NULL) { -+ Bfree(bb); -+ Bfree(bs); -+ Bfree(bd0); -+ goto failed_malloc; -+ } -+ } -+ if (bs2 > 0) { -+ bs = lshift(bs, bs2); -+ if (bs == NULL) { -+ Bfree(bb); -+ Bfree(bd); -+ Bfree(bd0); -+ goto failed_malloc; -+ } -+ } -+ -+ /* Now bd, bb and bs are scaled versions of tdv, srv and 0.5 ulp(srv), -+ respectively. Compute the difference |tdv - srv|, and compare -+ with 0.5 ulp(srv). */ -+ -+ delta = diff(bb, bd); -+ if (delta == NULL) { -+ Bfree(bb); -+ Bfree(bs); -+ Bfree(bd); -+ Bfree(bd0); -+ goto failed_malloc; -+ } -+ dsign = delta->sign; -+ delta->sign = 0; -+ i = cmp(delta, bs); -+ if (bc.nd > nd && i <= 0) { -+ if (dsign) -+ break; /* Must use bigcomp(). */ -+ -+ /* Here rv overestimates the truncated decimal value by at most -+ 0.5 ulp(rv). Hence rv either overestimates the true decimal -+ value by <= 0.5 ulp(rv), or underestimates it by some small -+ amount (< 0.1 ulp(rv)); either way, rv is within 0.5 ulps of -+ the true decimal value, so it's possible to exit. -+ -+ Exception: if scaled rv is a normal exact power of 2, but not -+ DBL_MIN, then rv - 0.5 ulp(rv) takes us all the way down to the -+ next double, so the correctly rounded result is either rv - 0.5 -+ ulp(rv) or rv; in this case, use bigcomp to distinguish. */ -+ -+ if (!word1(&rv) && !(word0(&rv) & Bndry_mask)) { -+ /* rv can't be 0, since it's an overestimate for some -+ nonzero value. So rv is a normal power of 2. */ -+ j = (int)(word0(&rv) & Exp_mask) >> Exp_shift; -+ /* rv / 2^bc.scale = 2^(j - 1023 - bc.scale); use bigcomp if -+ rv / 2^bc.scale >= 2^-1021. */ -+ if (j - bc.scale >= 2) { -+ dval(&rv) -= 0.5 * sulp(&rv, &bc); -+ break; /* Use bigcomp. */ -+ } -+ } -+ -+ { -+ bc.nd = nd; -+ i = -1; /* Discarded digits make delta smaller. */ -+ } -+ } -+ -+ if (i < 0) { -+ /* Error is less than half an ulp -- check for -+ * special case of mantissa a power of two. -+ */ -+ if (dsign || word1(&rv) || word0(&rv) & Bndry_mask -+ || (word0(&rv) & Exp_mask) <= (2*P+1)*Exp_msk1 -+ ) { -+ break; -+ } -+ if (!delta->x[0] && delta->wds <= 1) { -+ /* exact result */ -+ break; -+ } -+ delta = lshift(delta,Log2P); -+ if (delta == NULL) { -+ Bfree(bb); -+ Bfree(bs); -+ Bfree(bd); -+ Bfree(bd0); -+ goto failed_malloc; -+ } -+ if (cmp(delta, bs) > 0) -+ goto drop_down; -+ break; -+ } -+ if (i == 0) { -+ /* exactly half-way between */ -+ if (dsign) { -+ if ((word0(&rv) & Bndry_mask1) == Bndry_mask1 -+ && word1(&rv) == ( -+ (bc.scale && -+ (y = word0(&rv) & Exp_mask) <= 2*P*Exp_msk1) ? -+ (0xffffffff & (0xffffffff << (2*P+1-(y>>Exp_shift)))) : -+ 0xffffffff)) { -+ /*boundary case -- increment exponent*/ -+ word0(&rv) = (word0(&rv) & Exp_mask) -+ + Exp_msk1 -+ ; -+ word1(&rv) = 0; -+ /* dsign = 0; */ -+ break; -+ } -+ } -+ else if (!(word0(&rv) & Bndry_mask) && !word1(&rv)) { -+ drop_down: -+ /* boundary case -- decrement exponent */ -+ if (bc.scale) { -+ L = word0(&rv) & Exp_mask; -+ if (L <= (2*P+1)*Exp_msk1) { -+ if (L > (P+2)*Exp_msk1) -+ /* round even ==> */ -+ /* accept rv */ -+ break; -+ /* rv = smallest denormal */ -+ if (bc.nd > nd) -+ break; -+ goto undfl; -+ } -+ } -+ L = (word0(&rv) & Exp_mask) - Exp_msk1; -+ word0(&rv) = L | Bndry_mask1; -+ word1(&rv) = 0xffffffff; -+ break; -+ } -+ if (!odd) -+ break; -+ if (dsign) -+ dval(&rv) += sulp(&rv, &bc); -+ else { -+ dval(&rv) -= sulp(&rv, &bc); -+ if (!dval(&rv)) { -+ if (bc.nd >nd) -+ break; -+ goto undfl; -+ } -+ } -+ /* dsign = 1 - dsign; */ -+ break; -+ } -+ if ((aadj = ratio(delta, bs)) <= 2.) { -+ if (dsign) -+ aadj = aadj1 = 1.; -+ else if (word1(&rv) || word0(&rv) & Bndry_mask) { -+ if (word1(&rv) == Tiny1 && !word0(&rv)) { -+ if (bc.nd >nd) -+ break; -+ goto undfl; -+ } -+ aadj = 1.; -+ aadj1 = -1.; -+ } -+ else { -+ /* special case -- power of FLT_RADIX to be */ -+ /* rounded down... */ -+ -+ if (aadj < 2./FLT_RADIX) -+ aadj = 1./FLT_RADIX; -+ else -+ aadj *= 0.5; -+ aadj1 = -aadj; -+ } -+ } -+ else { -+ aadj *= 0.5; -+ aadj1 = dsign ? aadj : -aadj; -+ if (Flt_Rounds == 0) -+ aadj1 += 0.5; -+ } -+ y = word0(&rv) & Exp_mask; -+ -+ /* Check for overflow */ -+ -+ if (y == Exp_msk1*(DBL_MAX_EXP+Bias-1)) { -+ dval(&rv0) = dval(&rv); -+ word0(&rv) -= P*Exp_msk1; -+ adj.d = aadj1 * ulp(&rv); -+ dval(&rv) += adj.d; -+ if ((word0(&rv) & Exp_mask) >= -+ Exp_msk1*(DBL_MAX_EXP+Bias-P)) { -+ if (word0(&rv0) == Big0 && word1(&rv0) == Big1) { -+ Bfree(bb); -+ Bfree(bd); -+ Bfree(bs); -+ Bfree(bd0); -+ Bfree(delta); -+ goto ovfl; -+ } -+ word0(&rv) = Big0; -+ word1(&rv) = Big1; -+ goto cont; -+ } -+ else -+ word0(&rv) += P*Exp_msk1; -+ } -+ else { -+ if (bc.scale && y <= 2*P*Exp_msk1) { -+ if (aadj <= 0x7fffffff) { -+ if ((z = (ULong)aadj) <= 0) -+ z = 1; -+ aadj = z; -+ aadj1 = dsign ? aadj : -aadj; -+ } -+ dval(&aadj2) = aadj1; -+ word0(&aadj2) += (2*P+1)*Exp_msk1 - y; -+ aadj1 = dval(&aadj2); -+ } -+ adj.d = aadj1 * ulp(&rv); -+ dval(&rv) += adj.d; -+ } -+ z = word0(&rv) & Exp_mask; -+ if (bc.nd == nd) { -+ if (!bc.scale) -+ if (y == z) { -+ /* Can we stop now? */ -+ L = (Long)aadj; -+ aadj -= L; -+ /* The tolerances below are conservative. */ -+ if (dsign || word1(&rv) || word0(&rv) & Bndry_mask) { -+ if (aadj < .4999999 || aadj > .5000001) -+ break; -+ } -+ else if (aadj < .4999999/FLT_RADIX) -+ break; -+ } -+ } -+ cont: -+ Bfree(bb); -+ Bfree(bd); -+ Bfree(bs); -+ Bfree(delta); -+ } -+ Bfree(bb); -+ Bfree(bd); -+ Bfree(bs); -+ Bfree(bd0); -+ Bfree(delta); -+ if (bc.nd > nd) { -+ error = bigcomp(&rv, s0, &bc); -+ if (error) -+ goto failed_malloc; -+ } -+ -+ if (bc.scale) { -+ word0(&rv0) = Exp_1 - 2*P*Exp_msk1; -+ word1(&rv0) = 0; -+ dval(&rv) *= dval(&rv0); -+ } -+ -+ ret: -+ return sign ? -dval(&rv) : dval(&rv); -+ -+ parse_error: -+ return 0.0; -+ -+ failed_malloc: -+ /* errno = ENOMEM; */ -+ return -1.0; -+ -+ undfl: -+ return sign ? -0.0 : 0.0; -+ -+ ovfl: -+ /* errno = ERANGE; */ -+ /* Can't trust HUGE_VAL */ -+ word0(&rv) = Exp_mask; -+ word1(&rv) = 0; -+ return sign ? -dval(&rv) : dval(&rv); -+ -+} -+ -+ -+ -+ -\ No newline at end of file diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0124-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0124-Makefile.patch deleted file mode 100644 index 2056cd8..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0124-Makefile.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/Makefile 2026-03-13 13:24:35.605366060 +0100 -@@ -0,0 +1,5 @@ -+ -+obj-y += kernel/ -+obj-y += drivers/ -+obj-y += lib/ -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0125-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0125-Makefile.patch deleted file mode 100644 index 4647212..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0125-Makefile.patch +++ /dev/null @@ -1,4 +0,0 @@ ---- ./build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/drivers/vfbdevback/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/drivers/vfbdevback/Makefile 2026-02-17 08:18:11.150593301 +0100 -@@ -0,0 +1 @@ -+obj-y := vfbdev.o diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0126-vfbdev.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0126-vfbdev.c.patch deleted file mode 100644 index b8dd15c..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0126-vfbdev.c.patch +++ /dev/null @@ -1,404 +0,0 @@ ---- ./build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/drivers/vfbdevback/vfbdev.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/drivers/vfbdevback/vfbdev.c 2026-02-17 08:18:11.150617457 +0100 -@@ -0,0 +1,401 @@ -+/* -+ * Copyright (C) 2026 Clément Dieperink -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#if 0 -+#define DEBUG -+#endif -+ -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include -+ -+#include -+#include -+ -+typedef struct { -+ /* Must be the first field */ -+ vfbdev_t vfbdev; -+ -+ /* Reference to the ring */ -+ grant_ref_t ring_ref; -+ -+} vfbdev_priv_t; -+ -+typedef struct { -+ uint32_t hres; -+ uint32_t vres; -+ uint32_t bpp; -+ addr_t vaddr; -+ size_t size; -+ pid_t pid; -+} vfbdev_global_t; -+ -+static vfbdev_global_t vfbdev_global; -+ -+/** -+ * Helper macro used by va_to_pa function to get and check next level of page tables -+ * for given virtual address. This will also check if current level is a leaf and -+ * return the physical address and leaf size. -+ * -+ * This is useful as each level have different names (pgd, p4d, ...), but the same -+ * functions/flow to get and check required values. Also, each called functions are -+ * aware of the actual number of level supported and/or used and so it isn't -+ * necessary to check for it before hand. -+ */ -+#define PT_LEVEL_GET_CHECK(level_name, upper_level, va, page, size) \ -+ do { \ -+ level_name = level_name##_offset(upper_level, va); \ -+ if (level_name##_none(*level_name) || \ -+ level_name##_bad(*level_name)) { \ -+ DBG(VFBDEV_PREFIX \ -+ "BAD " __stringify(level_name) " 0x%llx\n", \ -+ level_name##_val(*level_name)); \ -+ return 0; \ -+ } \ -+ if (level_name##_leaf(*level_name)) { \ -+ page = level_name##_page(*level_name); \ -+ *size = level_name##_leaf_size(*level_name); \ -+ return page_to_phys(page); \ -+ } \ -+ } while (0) -+ -+/** -+ * Translate userspace virtual address to physical one. -+ * -+ * @param pid Process ID associated with the VA. -+ * @param va Virtual address to translate. -+ * @param size output size of found leaf entry -+ * -+ * @return Translated physical address or 0 in case of error. -+ */ -+static uint64_t va_to_pa(pid_t pid, addr_t va, size_t *size) -+{ -+ pgd_t *pgd; -+ p4d_t *p4d; -+ pud_t *pud; -+ pmd_t *pmd; -+ pte_t *pte; -+ addr_t pa; -+ struct mm_struct *mm; -+ struct task_struct *task; -+ struct page *page = NULL; -+ -+ if (pid == 0) { -+ return 0; -+ } -+ -+ /* Get memory map structure associated with the given PID. */ -+ task = pid_task(find_vpid(pid), PIDTYPE_PID); -+ mm = task->mm; -+ -+ /* Go through all page tables levels */ -+ PT_LEVEL_GET_CHECK(pgd, mm, va, page, size); -+ PT_LEVEL_GET_CHECK(p4d, pgd, va, page, size); -+ PT_LEVEL_GET_CHECK(pud, p4d, va, page, size); -+ PT_LEVEL_GET_CHECK(pmd, pud, va, page, size); -+ -+ /* Got to last level of page table, get the entry and associated physical address */ -+ pte = pte_offset_map(pmd, va); -+ if (pte_none(*pte)) { -+ DBG(VFBDEV_PREFIX "Bad PTE 0x%llx\n", pte_val(*pte)); -+ pte_unmap(pte); -+ return 0; -+ } -+ -+ page = pte_page(*pte); -+ pa = page_to_phys(page); -+ *size = pte_leaf_size(*pte); -+ -+ pte_unmap(pte); -+ -+ return pa; -+} -+ -+/** -+ * Retrieve all physical address ranges information for the given virtual address. -+ * -+ * @param pfns_info Output structure with the informations -+ * @param pid Process ID associated with the VA. -+ * @param va Virtual address to translate. -+ */ -+static void retrieve_pfns(fbdev_pfns_t *pfns_info, pid_t pid, addr_t va) -+{ -+ phys_addr_t pa = 0; -+ phys_addr_t next_pa = 0; -+ size_t entry_size = 0; -+ size_t retrieved_size = 0; -+ -+ memset(pfns_info, 0, sizeof(*pfns_info)); -+ -+ while (retrieved_size < vfbdev_global.size) { -+ pa = va_to_pa(pid, va + retrieved_size, &entry_size); -+ if (pa == 0) { -+ DBG(VFBDEV_PREFIX -+ "Process request: couldn't get physical address\n"); -+ BUG(); -+ return; -+ } -+ -+ /* Check if we are in a new physical range */ -+ if (pa != next_pa) { -+ BUG_ON(pfns_info->pfn_count >= MAX_FBDEV_PFN); -+ -+ pfns_info->pfn[pfns_info->pfn_count] = PHYS_PFN(pa); -+ pfns_info->page_count[pfns_info->pfn_count] = 0; -+ next_pa = pa; -+ pfns_info->pfn_count++; -+ } -+ -+ pfns_info->page_count[pfns_info->pfn_count - 1] += -+ entry_size / PAGE_SIZE; -+ next_pa += entry_size; -+ retrieved_size += entry_size; -+ } -+} -+ -+static void avz_set_pfns(void) -+{ -+ avz_hyp_t hyp_args; -+ -+ /* Not all required value are set yet. */ -+ if ((vfbdev_global.size == 0) || (vfbdev_global.vaddr == 0) || -+ (vfbdev_global.pid == 0)) -+ return; -+ -+ hyp_args.cmd = AVZ_FBDEV_SET_PFNS; -+ DBG(VFBDEV_PREFIX "Getting FB physical address\n"); -+ retrieve_pfns(&hyp_args.u.avz_fbdev_pfns_args.fbdev, vfbdev_global.pid, -+ vfbdev_global.vaddr); -+ -+ avz_hypercall(&hyp_args); -+} -+ -+static void process_request(struct vbus_device *vdev) -+{ -+ vfbdev_priv_t *vfbdev_priv = dev_get_drvdata(&vdev->dev); -+ vfbdev_request_t *ring_req; -+ vfbdev_response_t *ring_rsp; -+ -+ vdevback_processing_begin(vdev); -+ -+ while ((ring_req = vfbdev_get_ring_request( -+ &vfbdev_priv->vfbdev.ring)) != NULL) { -+ ring_rsp = vfbdev_new_ring_response(&vfbdev_priv->vfbdev.ring); -+ -+ ring_rsp->hres = vfbdev_global.hres; -+ ring_rsp->vres = vfbdev_global.vres; -+ ring_rsp->bpp = vfbdev_global.bpp; -+ ring_rsp->size = vfbdev_global.size; -+ -+ vfbdev_ring_response_ready(&vfbdev_priv->vfbdev.ring); -+ notify_remote_via_virq(vfbdev_priv->vfbdev.irq); -+ } -+ -+ vdevback_processing_end(vdev); -+} -+ -+static irqreturn_t vfbdev_interrupt_bh(int irq, void *dev_id) -+{ -+ struct vbus_device *vdev = (struct vbus_device *)dev_id; -+ -+ process_request(vdev); -+ -+ return IRQ_HANDLED; -+} -+ -+static irqreturn_t vfbdev_interrupt(int irq, void *dev_id) -+{ -+ /* All processing in the bottom half */ -+ -+ return IRQ_WAKE_THREAD; -+} -+ -+static void vfbdev_probe(struct vbus_device *vdev) -+{ -+ vfbdev_priv_t *vfbdev_priv; -+ -+ vfbdev_priv = kzalloc(sizeof(vfbdev_priv_t), GFP_ATOMIC); -+ BUG_ON(!vfbdev_priv); -+ -+ spin_lock_init(&vfbdev_priv->vfbdev.ring_lock); -+ -+ dev_set_drvdata(&vdev->dev, vfbdev_priv); -+ -+ DBG(VFBDEV_PREFIX "Backend probe: %d\n", vdev->otherend_id); -+} -+ -+static void vfbdev_remove(struct vbus_device *vdev) -+{ -+ vfbdev_priv_t *vfbdev_priv = dev_get_drvdata(&vdev->dev); -+ -+ DBG("%s: freeing the vfbdev structure for %s\n", __func__, -+ vdev->nodename); -+ kfree(vfbdev_priv); -+} -+ -+static void vfbdev_close(struct vbus_device *vdev) -+{ -+ vfbdev_priv_t *vfbdev_priv = dev_get_drvdata(&vdev->dev); -+ -+ DBG(VFBDEV_PREFIX "Backend close: %d\n", vdev->otherend_id); -+ -+ /* -+ * Free the ring and unbind evtchn. -+ */ -+ -+ BACK_RING_INIT(&vfbdev_priv->vfbdev.ring, -+ vfbdev_priv->vfbdev.ring.sring, PAGE_SIZE); -+ unbind_from_virqhandler(vfbdev_priv->vfbdev.irq, vdev); -+ -+ gnttab_unmap(vfbdev_priv->vfbdev.ring.sring); -+ -+ vfbdev_priv->vfbdev.ring.sring = NULL; -+} -+ -+static void vfbdev_suspend(struct vbus_device *vdev) -+{ -+ DBG(VFBDEV_PREFIX "Backend suspend: %d\n", vdev->otherend_id); -+} -+ -+static void vfbdev_resume(struct vbus_device *vdev) -+{ -+ DBG(VFBDEV_PREFIX "Backend resume: %d\n", vdev->otherend_id); -+} -+ -+static void vfbdev_reconfigured(struct vbus_device *vdev) -+{ -+ unsigned int evtchn; -+ vfbdev_sring_t *sring; -+ vfbdev_priv_t *vfbdev_priv = dev_get_drvdata(&vdev->dev); -+ -+ DBG(VFBDEV_PREFIX "Backend reconfigured: %d\n", vdev->otherend_id); -+ -+ /* -+ * Set up a ring (shared page & event channel) between the agency and the ME. -+ */ -+ -+ vbus_gather(VBT_NIL, vdev->otherend, "ring-ref", "%lu", -+ &vfbdev_priv->ring_ref, "ring-evtchn", "%u", &evtchn, NULL); -+ -+ DBG("BE: ring-ref=%u, event-channel=%u\n", vfbdev_priv->ring_ref, -+ evtchn); -+ -+ gnttab_map(vdev->otherend_id, vfbdev_priv->ring_ref, (void **)&sring); -+ -+ BACK_RING_INIT(&vfbdev_priv->vfbdev.ring, sring, PAGE_SIZE); -+ -+ vfbdev_priv->vfbdev.irq = bind_interdomain_evtchn_to_virqhandler( -+ vdev->otherend_id, evtchn, vfbdev_interrupt, -+ vfbdev_interrupt_bh, 0, VFBDEV_NAME "-backend", vdev); -+} -+ -+static void vfbdev_connected(struct vbus_device *vdev) -+{ -+ DBG(VFBDEV_PREFIX "Backend connected: %d\n", vdev->otherend_id); -+ -+ process_request(vdev); -+} -+ -+vdrvback_t vfbdevdrv = { .probe = vfbdev_probe, -+ .remove = vfbdev_remove, -+ .close = vfbdev_close, -+ .connected = vfbdev_connected, -+ .reconfigured = vfbdev_reconfigured, -+ .resume = vfbdev_resume, -+ .suspend = vfbdev_suspend }; -+ -+static void vfbdev_hres_store(char *str) -+{ -+ if (kstrtoint(str, 16, &vfbdev_global.hres)) -+ printk(KERN_WARNING VFBDEV_PREFIX "%s not a valid number\n", str); -+} -+ -+static void vfbdev_vres_store(char *str) -+{ -+ if (kstrtoint(str, 16, &vfbdev_global.vres)) -+ printk(KERN_WARNING VFBDEV_PREFIX "%s not a valid number\n", str); -+} -+ -+static void vfbdev_bpp_store(char *str) -+{ -+ if (kstrtoint(str, 16, &vfbdev_global.bpp)) -+ printk(KERN_WARNING VFBDEV_PREFIX "%s not a valid number\n", str); -+} -+ -+static void vfbdev_size_store(char *str) -+{ -+ if (kstrtoul(str, 16, &vfbdev_global.size)) -+ printk(KERN_WARNING VFBDEV_PREFIX "%s not a valid number\n", str); -+ avz_set_pfns(); -+} -+ -+static void vfbdev_addr_store(char *str) -+{ -+ if (kstrtoul(str, 16, &vfbdev_global.vaddr)) -+ printk(KERN_WARNING VFBDEV_PREFIX "%s not a valid number\n", str); -+ avz_set_pfns(); -+} -+ -+static void vfbdev_pid_store(char *str) -+{ -+ if (kstrtoint(str, 16, &vfbdev_global.pid)) -+ printk(KERN_WARNING VFBDEV_PREFIX "%s not a valid number\n", str); -+ avz_set_pfns(); -+} -+ -+static int vfbdev_init(void) -+{ -+ struct device_node *np; -+ -+ np = of_find_compatible_node(NULL, NULL, "vfbdev,backend"); -+ -+ /* Check if DTS has vfbdev enabled */ -+ if (!of_device_is_available(np)) -+ return 0; -+ -+ vdevback_init(VFBDEV_NAME, &vfbdevdrv); -+ -+ vfbdev_global = (vfbdev_global_t){}; -+ -+ soo_sysfs_register(vfbdev_hres, NULL, vfbdev_hres_store); -+ soo_sysfs_register(vfbdev_vres, NULL, vfbdev_vres_store); -+ soo_sysfs_register(vfbdev_bpp, NULL, vfbdev_bpp_store); -+ soo_sysfs_register(vfbdev_size, NULL, vfbdev_size_store); -+ soo_sysfs_register(vfbdev_addr, NULL, vfbdev_addr_store); -+ soo_sysfs_register(vfbdev_pid, NULL, vfbdev_pid_store); -+ -+ return 0; -+} -+ -+device_initcall(vfbdev_init); diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0127-vfbdev.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0127-vfbdev.h.patch deleted file mode 100644 index 266b8a0..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0127-vfbdev.h.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- ./build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/include/soo/dev/vfbdev.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/dev/vfbdev.h 2026-02-17 08:18:11.149506081 +0100 -@@ -0,0 +1,49 @@ -+/* -+ * Copyright (C) 2026 Clément Dieperink -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef VFBDEV_H -+#define VFBDEV_H -+ -+#include -+#include -+ -+#define VFBDEV_NAME "vfbdev" -+#define VFBDEV_PREFIX "[" VFBDEV_NAME "] " -+ -+typedef struct { -+ /* Nothing */ -+} vfbdev_request_t; -+ -+typedef struct { -+ uint32_t hres; -+ uint32_t vres; -+ uint32_t bpp; -+ uint64_t size; -+} vfbdev_response_t; -+ -+DEFINE_RING_TYPES(vfbdev, vfbdev_request_t, vfbdev_response_t); -+ -+typedef struct { -+ vdevback_t vdevback; -+ -+ spinlock_t ring_lock; -+ vfbdev_back_ring_t ring; -+ unsigned int irq; -+} vfbdev_t; -+ -+#endif /* VFBDEV_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0128-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0128-Makefile.patch deleted file mode 100644 index 99d2ef0..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0128-Makefile.patch +++ /dev/null @@ -1,5 +0,0 @@ ---- /home/cdk/project/micofe/micofe/build/tmp/work/linux-6.12-r0/linux-6.12/soo/drivers/vinputback/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/drivers/vinputback/Makefile 2026-04-28 16:34:33.037734565 +0200 -@@ -0,0 +1,2 @@ -+obj-y := vinput.o -+ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0129-vinput.c.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0129-vinput.c.patch deleted file mode 100644 index c9f4900..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0129-vinput.c.patch +++ /dev/null @@ -1,339 +0,0 @@ ---- /home/cdk/project/micofe/micofe/build/tmp/work/linux-6.12-r0/linux-6.12/soo/drivers/vinputback/vinput.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/drivers/vinputback/vinput.c 2026-05-01 11:12:17.081409871 +0200 -@@ -0,0 +1,336 @@ -+/* -+ * Copyright (C) 2016-2018 Daniel Rossier -+ * Copyright (C) 2016 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#if 1 -+#define DEBUG -+#endif -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include -+ -+typedef struct { -+ /* Must be the first field */ -+ vinput_t vinput; -+ -+ /* Reference to the ring */ -+ grant_ref_t ring_ref; -+ -+} vinput_priv_t; -+ -+/* -+ * We maintain a list of vdev_destination -+ */ -+struct vdev_destination { -+ struct list_head list; -+ struct vbus_device *vdev_destination; -+}; -+ -+static struct miscdevice miscdev; -+static struct list_head vdev_destinations; -+ -+ -+/* -+ * Add a new destination for a new ME. -+ */ -+static void add_destination(struct vbus_device *vdev_destination) -+{ -+ struct vdev_destination *destination; -+ -+ destination = kzalloc(sizeof(*destination), GFP_ATOMIC); -+ BUG_ON(!destination); -+ -+ destination->vdev_destination = vdev_destination; -+ -+ list_add(&destination->list, &vdev_destinations); -+} -+ -+/* -+ * Search for a destination related to a specific ME according to its domid. -+ */ -+static struct vbus_device *get_destination(uint32_t domid) -+{ -+ struct vdev_destination *entry; -+ -+ list_for_each_entry(entry, &vdev_destinations, list) -+ if (entry->vdev_destination->otherend_id == domid) -+ return entry->vdev_destination; -+ return NULL; -+} -+ -+/* -+ * Remove a destination attached to a specific ME -+ */ -+static void del_destination(struct vbus_device *vdev_destination) -+{ -+ struct vdev_destination *entry; -+ -+ list_for_each_entry(entry, &vdev_destinations, list) -+ if (entry->vdev_destination == vdev_destination) { -+ list_del(&entry->list); -+ kfree(entry); -+ return; -+ } -+ BUG(); -+} -+ -+static void process_request(struct vbus_device *vdev) -+{ -+ vinput_priv_t *vinput_priv = dev_get_drvdata(&vdev->dev); -+ vinput_request_t *ring_req; -+ -+ vdevback_processing_begin(vdev); -+ -+ while ((ring_req = vinput_get_ring_request(&vinput_priv->vinput.ring)) != -+ NULL) { -+ /* Nothing to do ... */ -+ } -+ -+ vdevback_processing_end(vdev); -+} -+ -+static irqreturn_t vinput_interrupt_bh(int irq, void *dev_id) -+{ -+ struct vbus_device *vdev = (struct vbus_device *)dev_id; -+ -+ process_request(vdev); -+ -+ return IRQ_HANDLED; -+} -+ -+static irqreturn_t vinput_interrupt(int irq, void *dev_id) -+{ -+ /* All processing in the bottom half */ -+ -+ return IRQ_WAKE_THREAD; -+} -+ -+/** -+ * This function is called in interrupt context. -+ * - If the state is Connected, the character can directly be pushed in the ring. -+ * - If the state is not Connected, the character is pushed into a circular buffer that -+ * will be flushed at the next call to the Connected callback. -+ */ -+void me_cons_send_input(domid_t domid, struct input_event *event) -+{ -+ struct vbus_device *destination; -+ vinput_priv_t *vinput_priv; -+ vinput_response_t *vinput_rsp; -+ -+ destination = get_destination(domid); -+ -+ if (!destination || !vdevfront_is_connected(destination)) -+ return; -+ -+ vdevback_processing_begin(destination); -+ -+ vinput_priv = dev_get_drvdata(&destination->dev); -+ -+ spin_lock(&vinput_priv->vinput.ring_lock); -+ vinput_rsp = vinput_new_ring_response(&vinput_priv->vinput.ring); -+ -+ vinput_rsp->type = event->type; -+ vinput_rsp->code = event->code; -+ vinput_rsp->value = event->value; -+ -+ spin_unlock(&vinput_priv->vinput.ring_lock); -+ -+ vinput_ring_response_ready(&vinput_priv->vinput.ring); -+ -+ if (destination->state == VbusStateConnected) -+ notify_remote_via_virq(vinput_priv->vinput.irq); -+ -+ vdevback_processing_end(destination); -+} -+ -+static void vinput_probe(struct vbus_device *vdev) -+{ -+ vinput_priv_t *vinput_priv; -+ -+ vinput_priv = kzalloc(sizeof(vinput_priv_t), GFP_ATOMIC); -+ BUG_ON(!vinput_priv); -+ -+ spin_lock_init(&vinput_priv->vinput.ring_lock); -+ -+ dev_set_drvdata(&vdev->dev, vinput_priv); -+ -+ add_destination(vdev); -+ -+ DBG(VINPUT_PREFIX "Backend probe: %d\n", vdev->otherend_id); -+} -+ -+static void vinput_remove(struct vbus_device *vdev) -+{ -+ vinput_priv_t *vinput_priv = dev_get_drvdata(&vdev->dev); -+ -+ del_destination(vdev); -+ -+ DBG("%s: freeing the vinput structure for %s\n", __func__, -+ vdev->nodename); -+ kfree(vinput_priv); -+} -+ -+static void vinput_close(struct vbus_device *vdev) -+{ -+ vinput_priv_t *vinput_priv = dev_get_drvdata(&vdev->dev); -+ -+ DBG("(vinput) Backend close: %d\n", vdev->otherend_id); -+ -+ /* -+ * Free the ring and unbind evtchn. -+ */ -+ -+ BACK_RING_INIT(&vinput_priv->vinput.ring, vinput_priv->vinput.ring.sring, -+ PAGE_SIZE); -+ unbind_from_virqhandler(vinput_priv->vinput.irq, vdev); -+ -+ gnttab_unmap(vinput_priv->vinput.ring.sring); -+ -+ vinput_priv->vinput.ring.sring = NULL; -+} -+ -+static void vinput_suspend(struct vbus_device *vdev) -+{ -+ DBG("(vinput) Backend suspend: %d\n", vdev->otherend_id); -+} -+ -+static void vinput_resume(struct vbus_device *vdev) -+{ -+ DBG("(vinput) Backend resume: %d\n", vdev->otherend_id); -+} -+ -+static void vinput_reconfigured(struct vbus_device *vdev) -+{ -+ unsigned int evtchn; -+ vinput_sring_t *sring; -+ vinput_priv_t *vinput_priv = dev_get_drvdata(&vdev->dev); -+ -+ DBG(VINPUT_PREFIX "Backend reconfigured: %d\n", vdev->otherend_id); -+ -+ /* -+ * Set up a ring (shared page & event channel) between the agency and the ME. -+ */ -+ -+ vbus_gather(VBT_NIL, vdev->otherend, "ring-ref", "%lu", -+ &vinput_priv->ring_ref, "ring-evtchn", "%u", &evtchn, NULL); -+ -+ DBG("BE: ring-ref=%u, event-channel=%u\n", vinput_priv->ring_ref, evtchn); -+ -+ gnttab_map(vdev->otherend_id, vinput_priv->ring_ref, (void **)&sring); -+ -+ BACK_RING_INIT(&vinput_priv->vinput.ring, sring, PAGE_SIZE); -+ -+ vinput_priv->vinput.irq = bind_interdomain_evtchn_to_virqhandler( -+ vdev->otherend_id, evtchn, vinput_interrupt, vinput_interrupt_bh, -+ 0, VINPUT_NAME "-backend", vdev); -+} -+ -+static void vinput_connected(struct vbus_device *vdev) -+{ -+ DBG(VINPUT_PREFIX "Backend connected: %d\n", vdev->otherend_id); -+ -+ process_request(vdev); -+} -+ -+vdrvback_t vinputdrv = { .probe = vinput_probe, -+ .remove = vinput_remove, -+ .close = vinput_close, -+ .connected = vinput_connected, -+ .reconfigured = vinput_reconfigured, -+ .resume = vinput_resume, -+ .suspend = vinput_suspend }; -+ -+static ssize_t vinput_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos) -+{ -+ size_t handled_event = 0; -+ size_t ret; -+ size_t event_count; -+ struct input_event __user *u_event; -+ struct input_event event; -+ -+ if ((len % sizeof(struct input_event)) != 0) { -+ return -EINVAL; -+ } -+ -+ u_event = (struct input_event __user *)buf; -+ event_count = len / sizeof(struct input_event); -+ -+ for (handled_event = 0; handled_event < event_count; handled_event++) { -+ ret = copy_from_user(&event, &u_event[handled_event], sizeof(event)); -+ if (ret != 0) { -+ return -EFAULT; -+ } -+ -+ me_cons_send_input(vfb_get_focus(), &event); -+ } -+ -+ return len; -+} -+ -+static struct file_operations vinput_fops = { -+ .write = vinput_write, -+}; -+ -+static int vinput_init(void) -+{ -+ struct device_node *np; -+ int ret; -+ -+ np = of_find_compatible_node(NULL, NULL, "vinput,backend"); -+ -+ /* Check if DTS has vinput enabled */ -+ if (!of_device_is_available(np)) -+ return 0; -+ -+ INIT_LIST_HEAD(&vdev_destinations); -+ -+ vdevback_init(VINPUT_NAME, &vinputdrv); -+ -+ memset(&miscdev, 0, sizeof(miscdev)); -+ miscdev.minor = MISC_DYNAMIC_MINOR; -+ miscdev.name = VINPUT_NAME; -+ miscdev.mode = 0666; -+ miscdev.fops = &vinput_fops; -+ -+ ret = misc_register(&miscdev); -+ if (ret != 0) { -+ printk(KERN_ERR VINPUT_PREFIX "Couldn't register misc device: %d\n", ret); -+ return ret; -+ } -+ -+ return 0; -+} -+ -+device_initcall(vinput_init); diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0130-vinput.h.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0130-vinput.h.patch deleted file mode 100644 index 60caf7a..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/0130-vinput.h.patch +++ /dev/null @@ -1,66 +0,0 @@ ---- /home/cdk/project/micofe/micofe/build/tmp/work/linux-6.12-r0/linux-6.12/soo/include/soo/dev/vinput.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/include/soo/dev/vinput.h 2026-05-01 11:12:40.364419986 +0200 -@@ -0,0 +1,63 @@ -+/* -+ * Copyright (C) 2016-2018 Baptiste Delporte -+ * Copyright (C) 2018-2019 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef VINPUT_H -+#define VINPUT_H -+ -+#include -+#include -+ -+#include -+ -+#include -+ -+#define VINPUT_NAME "vinput" -+#define VINPUT_PREFIX "[" VINPUT_NAME "] " -+ -+#define SRC_MOUSE 0 -+#define SRC_KEYBOARD 1 -+ -+typedef struct { -+ /* No request */ -+} vinput_request_t; -+ -+typedef struct { -+ unsigned int type; -+ unsigned int code; -+ int value; -+} vinput_response_t; -+ -+DEFINE_RING_TYPES(vinput, vinput_request_t, vinput_response_t); -+ -+/* -+ * General structure for this virtual device (backend side) -+ */ -+ -+typedef struct { -+ vdevback_t vdevback; -+ -+ spinlock_t ring_lock; -+ vinput_back_ring_t ring; -+ unsigned int irq; -+ -+} vinput_t; -+ -+void me_cons_send_input(domid_t domid, struct input_event *event); -+ -+#endif /* VINPUT_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/1001-bcm2711-rpi-4-b.dts.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/1001-bcm2711-rpi-4-b.dts.patch deleted file mode 100644 index cfe2b1b..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/1001-bcm2711-rpi-4-b.dts.patch +++ /dev/null @@ -1,109 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/arch/arm64/boot/dts/broadcom/bcm2711-rpi-4-b.dts 2026-03-23 18:27:32.526573736 +0100 -+++ ./arch/arm64/boot/dts/broadcom/bcm2711-rpi-4-b.dts 2026-03-22 19:54:13.857503178 +0100 -@@ -85,3 +85,106 @@ - reg = <0x28>; /* This is due to the control byte (101) + A2, A1, A0 (000) combination (101000 = 0x28) */ - }; - }; -+ -+/ { -+ agency: agency { -+ backends { -+ vdummy { -+ compatible = "vdummy,backend"; -+ status = "disabled"; -+ }; -+ -+ vuart { -+ compatible = "vuart,backend"; -+ status = "ok"; -+ }; -+ -+ vlogs { -+ compatible = "vlogs,backend"; -+ status = "ok"; -+ }; -+ -+ vfbdev { -+ compatible = "vfbdev,backend"; -+ status = "ok"; -+ }; -+ -+ vinput { -+ compatible = "vinput,backend"; -+ status = "ok"; -+ }; -+ }; -+ }; -+}; -+ -+&cma { -+ size = <0x10000000>; -+}; -+ -+&ddc0 { -+ status = "okay"; -+}; -+ -+&ddc1 { -+ status = "okay"; -+}; -+ -+&hdmi0 { -+ status = "okay"; -+}; -+ -+&hdmi1 { -+ status = "okay"; -+}; -+ -+&hvs { -+ status = "okay"; -+}; -+ -+&pixelvalve0 { -+ status = "okay"; -+}; -+ -+&pixelvalve1 { -+ status = "okay"; -+}; -+ -+&pixelvalve2 { -+ status = "okay"; -+}; -+ -+&pixelvalve3 { -+ status = "okay"; -+}; -+ -+&pixelvalve4 { -+ status = "okay"; -+}; -+ -+&v3d { -+ status = "okay"; -+}; -+ -+&vc4 { -+ status = "okay"; -+}; -+ -+&txp { -+ status = "okay"; -+}; -+ -+&fb { -+ status = "disabled"; -+}; -+ -+&firmwarekms { -+ status = "disabled"; -+}; -+ -+&dvp { -+ status = "okay"; -+}; -+ -+&aon_intr { -+ status = "okay"; -+}; diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/1016-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/1016-Makefile.patch deleted file mode 100644 index d6b6a09..0000000 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-rpi4-r0/1016-Makefile.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/linux-6.12-rpi4-r0/linux-6.12-rpi4/soo/drivers/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ ./soo/drivers/Makefile 2026-03-13 13:24:35.605109501 +0100 -@@ -0,0 +1,14 @@ -+# -+# Makefile for SOO general drivers. -+# -+ -+obj-y += vdevback.o -+ -+obj-$(CONFIG_VDUMMY_BACKEND) += vdummyback/ -+obj-$(CONFIG_VUART_BACKEND) += vuartback/ -+obj-$(CONFIG_VLEDS_BACKEND) += vledsback/ -+obj-$(CONFIG_VSENSELED_BACKEND) += vsenseledback/ -+obj-$(CONFIG_VSENSEJ_BACKEND) += vsensejback/ -+obj-$(CONFIG_VLOGS_BACKEND) += vlogsback/ -+obj-$(CONFIG_VFBDEV_BACKEND) += vfbdevback/ -+obj-$(CONFIG_VINPUT_BACKEND) += vinputback/ diff --git a/build/meta-linux/recipes-linux/soo/files/soo-generic-patches.inc b/build/meta-linux/recipes-linux/soo/files/soo-generic-patches.inc new file mode 100644 index 0000000..a470806 --- /dev/null +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic-patches.inc @@ -0,0 +1,138 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD +# +# Generic SOO agency patch set: the kernel-version-agnostic SOO code +# (soo/kernel, soo/drivers, soo/include, glue). Applied to EVERY agency +# kernel. Kernel-version or platform specifics live in the per-${PF} +# directory next to this one: a same-named patch there SHADOWS the +# generic one (FILESPATH order), extra files are listed in the per-PF +# patches.inc. + +SRC_URI:append:soo = "\ + file://0071-asf_test.c.patch \ + file://0048-guest_api.h.patch \ + file://0052-roxml.h.patch \ + file://0066-Kconfig.patch \ + file://0104-roxml_core.c.patch \ + file://0075-lprintk.c.patch \ + file://0014-Kconfig.patch \ + file://0116-roxml_tune.h.patch \ + file://0064-vbus.h.patch \ + file://0069-asf.c.patch \ + file://0032-vuart.c.patch \ + file://0024-rpisense-joystick.c.patch \ + file://0060-debug.h.patch \ + file://0055-strtod.h.patch \ + file://0050-paging.h.patch \ + file://0056-sysfs.h.patch \ + file://0098-config.h.patch \ + file://0016-Makefile.patch \ + file://0079-Kconfig.patch \ + file://0086-setup.c.patch \ + file://0019-Makefile.patch \ + file://0087-soo_guest_activity.c.patch \ + file://0053-simulation.h.patch \ + file://0084-hypervisor.c.patch \ + file://0067-Makefile.patch \ + file://0018-Kconfig.patch \ + file://0094-vbus.c.patch \ + file://0117-roxml_types.h.patch \ + file://0012-tty_flip.h.patch \ + file://0022-vdummy.c.patch \ + file://0081-meminfo.c.patch \ + file://0110-roxml_internal.h.patch \ + file://0033-avz.h.patch \ + file://0059-console.h.patch \ + file://0038-vdummy.h.patch \ + file://0078-debug.c.patch \ + file://0027-Makefile.patch \ + file://0095-vbus_client.c.patch \ + file://0085-Makefile.patch \ + file://0041-vuart.h.patch \ + file://0074-console.c.patch \ + file://0047-gnttab.h.patch \ + file://0042-device_access.h.patch \ + file://0082-evtchn.c.patch \ + file://0122-Makefile.patch \ + file://0120-roxml_xpath.c.patch \ + file://0083-gnttab.c.patch \ + file://0054-soo.h.patch \ + file://0111-roxml_mem.c.patch \ + file://0080-Makefile.patch \ + file://0096-vbus_vbstore.c.patch \ + file://0028-rpisense-led.c.patch \ + file://0101-roxml_buff.h.patch \ + file://0035-avzcons.h.patch \ + file://0113-roxml_nav.c.patch \ + file://0070-asf_priv.h.patch \ + file://0107-roxml_edit.c.patch \ + file://0020-vdevback.c.patch \ + file://0045-errno.h.patch \ + file://0077-core.c.patch \ + file://0109-roxml_file.h.patch \ + file://0100-roxml_buff.c.patch \ + file://0090-vbstorage.c.patch \ + file://0099-Makefile.patch \ + file://0036-capsule.h.patch \ + file://0029-rpisense-led.h.patch \ + file://0013-main.c.patch \ + file://0061-injector.h.patch \ + file://0030-vsenseled.c.patch \ + file://0097-ctype.c.patch \ + file://0006-.clang-format.patch \ + file://0089-Makefile.patch \ + file://0102-roxml_commit.c.patch \ + file://0105-roxml_core.h.patch \ + file://0114-roxml_parser.c.patch \ + file://0004-irq.c.patch \ + file://0034-asf.h.patch \ + file://0010-.gitattributes.patch \ + file://0103-roxml_content.c.patch \ + file://0106-roxml_defines.h.patch \ + file://0003-entry.S.patch \ + file://0072-Makefile.patch \ + file://0115-roxml_parser.h.patch \ + file://0039-vsensej.h.patch \ + file://0023-Makefile.patch \ + file://0062-soo.h.patch \ + file://0058-asf.h.patch \ + file://0088-sysfs.c.patch \ + file://0091-vbstore.c.patch \ + file://0005-smp.c.patch \ + file://0044-errno-base.h.patch \ + file://0063-vbstore.h.patch \ + file://0076-Makefile.patch \ + file://0031-Makefile.patch \ + file://0025-rpisense-joystick.h.patch \ + file://0043-err.h.patch \ + file://0021-Makefile.patch \ + file://0121-roxml_xpath.h.patch \ + file://0119-roxml_win32_native.h.patch \ + file://0124-Makefile.patch \ + file://0051-ring.h.patch \ + file://0118-roxml_utils.h.patch \ + file://0026-vsensej.c.patch \ + file://0057-types.h.patch \ + file://0046-evtchn.h.patch \ + file://0068-paging.c.patch \ + file://0112-roxml_mem.h.patch \ + file://0092-Makefile.patch \ + file://0040-vsenseled.h.patch \ + file://0093-vbus_backend.c.patch \ + file://0037-debug.h.patch \ + file://0073-capsule.c.patch \ + file://0108-roxml_file.c.patch \ + file://0049-hypervisor.h.patch \ + file://0065-vdevback.h.patch \ + file://0015-.mailmap.patch \ + file://0123-strtod.c.patch \ + file://0125-Makefile.patch \ + file://0126-vlogs.c.patch \ + file://0127-vlogs.h.patch \ + file://0128-vfbdev.c.patch \ + file://0129-vfbdev.h.patch \ + file://0130-vinput.c.patch \ + file://0131-vinput.h.patch \ + file://0132-Makefile.patch \ + file://0133-Makefile.patch \ +" diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0003-entry.S.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0003-entry.S.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0003-entry.S.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0003-entry.S.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0004-irq.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0004-irq.c.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0004-irq.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0004-irq.c.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0005-smp.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0005-smp.c.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0005-smp.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0005-smp.c.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0006-.clang-format.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0006-.clang-format.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0006-.clang-format.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0006-.clang-format.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0010-.gitattributes.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0010-.gitattributes.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0010-.gitattributes.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0010-.gitattributes.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0012-tty_flip.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0012-tty_flip.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0012-tty_flip.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0012-tty_flip.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0013-main.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0013-main.c.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0013-main.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0013-main.c.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0014-Kconfig.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0014-Kconfig.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0014-Kconfig.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0014-Kconfig.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0015-.mailmap.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0015-.mailmap.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0015-.mailmap.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0015-.mailmap.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0016-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0016-Makefile.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0016-Makefile.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0016-Makefile.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0018-Kconfig.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0018-Kconfig.patch similarity index 89% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0018-Kconfig.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0018-Kconfig.patch index 5c95329..d028908 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0018-Kconfig.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0018-Kconfig.patch @@ -1,6 +1,6 @@ --- /home/rossierd/soo/git/micofe/build/tmp/work/linux-6.12-r0/linux-6.12/soo/drivers/Kconfig 1970-01-01 01:00:00.000000000 +0100 +++ ./soo/drivers/Kconfig 2025-08-29 08:46:41.395616621 +0200 -@@ -0,0 +1,51 @@ +@@ -0,0 +1,54 @@ +# +# SOO device configuration +# @@ -9,10 +9,10 @@ +menu "Smart Object Oriented subsystem" + +config VDUMMY_BACKEND -+ bool "SOO (realtime and no-RT) vDummy support for debugging and testing" ++ bool "SOO vDummy support for debugging and testing" + +config VUART_BACKEND -+ bool "vuart UART Backend support for SOO Mobile Entity consoles" ++ bool "vuart UART Backend support for SO3 capsule consoles" + select SERIAL_CORE_CONSOLE + +config VLEDS_BACKEND @@ -51,4 +51,7 @@ + The vinput driver is used to allow capsules to access a mouse/keyboard inputs from Linux. + +endmenu ++ ++ ++ + diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0019-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0019-Makefile.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0019-Makefile.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0019-Makefile.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0020-vdevback.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0020-vdevback.c.patch similarity index 97% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0020-vdevback.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0020-vdevback.c.patch index 99e3f75..69e4e37 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0020-vdevback.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0020-vdevback.c.patch @@ -3,7 +3,7 @@ @@ -0,0 +1,309 @@ + +/* -+ * Copyright (C) 2020 Daniel Rossier ++ * Copyright (C) 2020 Daniel Rossier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as @@ -285,7 +285,7 @@ +} + +/* -+ * Search for a console related to a specific ME according to its domid. ++ * Search for a console related to a specific S3C according to its domid. + */ +struct vbus_device *vdevback_get_entry(uint32_t domid, struct list_head *_list) { + vdev_entry_t *entry; @@ -297,7 +297,7 @@ +} + +/* -+ * Remove a console attached to a specific ME ++ * Remove a console attached to a specific S3C + */ +void vdevback_del_entry(struct vbus_device *vdev, struct list_head *_list) { + vdev_entry_t *entry; diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0021-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0021-Makefile.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0021-Makefile.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0021-Makefile.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0022-vdummy.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0022-vdummy.c.patch similarity index 98% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0022-vdummy.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0022-vdummy.c.patch index b9778da..16485b0 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0022-vdummy.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0022-vdummy.c.patch @@ -2,7 +2,7 @@ +++ ./soo/drivers/vdummyback/vdummy.c 2025-08-29 08:46:41.395591085 +0200 @@ -0,0 +1,183 @@ +/* -+ * Copyright (C) 2016-2018 Daniel Rossier ++ * Copyright (C) 2016-2018 Daniel Rossier + * Copyright (C) 2016 Baptiste Delporte + * + * This program is free software; you can redistribute it and/or modify @@ -135,7 +135,7 @@ + DBG(VDUMMY_PREFIX "Backend reconfigured: %d\n", vdev->otherend_id); + + /* -+ * Set up a ring (shared page & event channel) between the agency and the ME. ++ * Set up a ring (shared page & event channel) between the agency and the S3C. + */ + + vbus_gather(VBT_NIL, vdev->otherend, "ring-ref", "%lu", &vdummy_priv->ring_ref, "ring-evtchn", "%u", &evtchn, NULL); diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0023-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0023-Makefile.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0023-Makefile.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0023-Makefile.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0024-rpisense-joystick.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0024-rpisense-joystick.c.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0024-rpisense-joystick.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0024-rpisense-joystick.c.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0025-rpisense-joystick.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0025-rpisense-joystick.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0025-rpisense-joystick.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0025-rpisense-joystick.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0026-vsensej.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0026-vsensej.c.patch similarity index 99% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0026-vsensej.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0026-vsensej.c.patch index 08ba07f..8956618 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0026-vsensej.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0026-vsensej.c.patch @@ -170,7 +170,7 @@ + DBG(VSENSEJ_PREFIX "Backend reconfigured: %d\n", vdev->otherend_id); + + /* -+ * Set up a ring (shared page & event channel) between the agency and the ME. ++ * Set up a ring (shared page & event channel) between the agency and the S3C. + */ + + vbus_gather(VBT_NIL, vdev->otherend, "ring-ref", "%lu", &ring_ref, "ring-evtchn", "%u", &evtchn, NULL); diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0027-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0027-Makefile.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0027-Makefile.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0027-Makefile.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0028-rpisense-led.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0028-rpisense-led.c.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0028-rpisense-led.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0028-rpisense-led.c.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0029-rpisense-led.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0029-rpisense-led.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0029-rpisense-led.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0029-rpisense-led.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0030-vsenseled.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0030-vsenseled.c.patch similarity index 99% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0030-vsenseled.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0030-vsenseled.c.patch index 21e6640..2eccab3 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0030-vsenseled.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0030-vsenseled.c.patch @@ -141,7 +141,7 @@ + DBG(VSENSELED_PREFIX "Backend reconfigured: %d\n", vdev->otherend_id); + + /* -+ * Set up a ring (shared page & event channel) between the agency and the ME. ++ * Set up a ring (shared page & event channel) between the agency and the S3C. + */ + + vbus_gather(VBT_NIL, vdev->otherend, "ring-ref", "%lu", &ring_ref, "ring-evtchn", "%u", &evtchn, NULL); diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0031-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0031-Makefile.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0031-Makefile.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0031-Makefile.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0032-vuart.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0032-vuart.c.patch similarity index 95% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0032-vuart.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0032-vuart.c.patch index 78dae41..ad90931 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0032-vuart.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0032-vuart.c.patch @@ -2,7 +2,7 @@ +++ ./soo/drivers/vuartback/vuart.c 2025-08-29 08:46:41.395804736 +0200 @@ -0,0 +1,327 @@ +/* -+ * Copyright (C) 2016-2018 Daniel Rossier ++ * Copyright (C) 2016-2018 Daniel Rossier + * Copyright (C) 2016 Baptiste Delporte + * + * This program is free software; you can redistribute it and/or modify @@ -83,13 +83,13 @@ +} + +/* -+ * Add a new console for a new ME. ++ * Add a new console for a new S3C. + */ +static void add_console(struct vbus_device *vdev_console) +{ + struct vdev_console *console; + -+ console = kzalloc(sizeof(*console), GFP_ATOMIC); ++ console = kzalloc(sizeof(struct vdev_console), GFP_ATOMIC); + BUG_ON(!console); + + console->vdev_console = vdev_console; @@ -98,7 +98,7 @@ +} + +/* -+ * Search for a console related to a specific ME according to its domid. ++ * Search for a console related to a specific S3C according to its domid. + */ +static struct vbus_device *get_console(uint32_t domid) +{ @@ -111,7 +111,7 @@ +} + +/* -+ * Remove a console attached to a specific ME ++ * Remove a console attached to a specific S3C + */ +static void del_console(struct vbus_device *vdev_console) +{ @@ -183,7 +183,7 @@ + * - If the state is not Connected, the character is pushed into a circular buffer that + * will be flushed at the next call to the Connected callback. + */ -+void me_cons_sendc(domid_t domid, uint8_t ch) ++void s3c_cons_sendc(domid_t domid, uint8_t ch) +{ + struct vbus_device *console; + vuart_priv_t *vuart_priv; @@ -191,7 +191,7 @@ + + console = get_console(domid); + -+ if (!console || !vdevfront_is_connected(console)) ++ if (!vdevfront_is_connected(console)) + return; + + vdevback_processing_begin(console); @@ -278,7 +278,7 @@ + DBG(VUART_PREFIX "Backend reconfigured: %d\n", vdev->otherend_id); + + /* -+ * Set up a ring (shared page & event channel) between the agency and the ME. ++ * Set up a ring (shared page & event channel) between the agency and the S3C. + */ + + vbus_gather(VBT_NIL, vdev->otherend, "ring-ref", "%lu", diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0033-avz.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0033-avz.h.patch similarity index 96% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0033-avz.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0033-avz.h.patch index f1f5d39..71f9bc2 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0033-avz.h.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0033-avz.h.patch @@ -1,6 +1,6 @@ --- /home/rossierd/soo/git/micofe/build/tmp/work/linux-6.12-r0/linux-6.12/soo/include/avz/uapi/avz.h 1970-01-01 01:00:00.000000000 +0100 +++ ./soo/include/avz/uapi/avz.h 2025-08-29 08:46:41.396291602 +0200 -@@ -0,0 +1,304 @@ +@@ -0,0 +1,300 @@ +/* + * Copyright (C) 2016-2022 Daniel Rossier + * @@ -37,7 +37,6 @@ +#define NR_VIRQS 256 + +#define VIRQ_TIMER 0 /* System timer tick virtualized interrupt */ -+#define VIRQ_TIMER_RT 1 /* Timer tick issued from the oneshot timer (for RT agency and MEs */ + +/**************************************************/ + @@ -53,17 +52,14 @@ +/* DOMID_SELF is used in certain contexts to refer to oneself. */ +#define DOMID_SELF (0x7FF0U) + -+#define MAX_ME_DOMAINS 5 ++#define MAX_S3C_DOMAINS 5 + -+/* We include the (non-RT & RT) agency domain */ -+#define MAX_DOMAINS (2 + MAX_ME_DOMAINS) ++/* domains[]: 0 = agency, 1 = reserved, 2.. = up to MAX_S3C_DOMAINS capsules */ ++#define MAX_DOMAINS (2 + MAX_S3C_DOMAINS) + +/* Agency */ +#define DOMID_AGENCY 0 + -+/* Realtime agency subdomain */ -+#define DOMID_AGENCY_RT 1 -+ +#define DOMID_INVALID (0x7FF4U) + +#define AVZ_HYPERCALL_TRAP 0x2605 @@ -288,7 +284,7 @@ + */ + u64 current_s_time; + -+ /* Used to store a signature for consistency checking, for example after a migration/restoration */ ++ /* Used to store a signature for consistency checking, for example after a snapshot restoration */ + char signature[4]; +}; + diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0034-asf.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0034-asf.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0034-asf.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0034-asf.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0035-avzcons.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0035-avzcons.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0035-avzcons.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0035-avzcons.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0036-capsule.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0036-capsule.h.patch similarity index 76% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0036-capsule.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0036-capsule.h.patch index d98bce2..864d8cd 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0036-capsule.h.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0036-capsule.h.patch @@ -2,7 +2,7 @@ +++ ./soo/include/soo/capsule.h 2025-08-30 15:30:27.244692708 +0200 @@ -0,0 +1,40 @@ +/* -+ * Copyright (C) 2017-2025 Daniel Rossier ++ * Copyright (C) 2017-2025 Daniel Rossier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as @@ -28,14 +28,14 @@ +void read_snapshot(uint32_t slotID, void *buffer, uint32_t *size); +int write_snapshot(void *buffer); + -+int get_ME_state(unsigned int ME_slotID); -+void set_ME_state(unsigned int ME_slotID, ME_state_t state); ++int get_S3C_state(unsigned int S3C_slotID); ++void set_S3C_state(unsigned int S3C_slotID, S3C_state_t state); + -+void get_ME_desc(unsigned int slotID, ME_desc_t *ME_desc); ++void get_S3C_desc(unsigned int slotID, S3C_desc_t *S3C_desc); + -+bool get_ME_id(uint32_t slotID, ME_id_t *ME_id); -+char *xml_prepare_id_array(ME_id_t *ME_id_array); -+void get_ME_id_array(ME_id_t *ME_id_array); ++bool get_S3C_id(uint32_t slotID, S3C_id_t *S3C_id); ++char *xml_prepare_id_array(S3C_id_t *S3C_id_array); ++void get_S3C_id_array(S3C_id_t *S3C_id_array); + +void capsule_init(void); +void capsule_exit(void); diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0037-debug.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0037-debug.h.patch similarity index 94% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0037-debug.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0037-debug.h.patch index f09aaa0..01ab656 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0037-debug.h.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0037-debug.h.patch @@ -2,7 +2,7 @@ +++ ./soo/include/soo/debug.h 2025-08-29 08:46:41.396116173 +0200 @@ -0,0 +1,27 @@ +/* -+ * Copyright (C) 2022 Daniel Rossier ++ * Copyright (C) 2022 Daniel Rossier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0038-vdummy.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0038-vdummy.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0038-vdummy.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0038-vdummy.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0039-vsensej.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0039-vsensej.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0039-vsensej.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0039-vsensej.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0040-vsenseled.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0040-vsenseled.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0040-vsenseled.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0040-vsenseled.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0041-vuart.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0041-vuart.h.patch similarity index 97% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0041-vuart.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0041-vuart.h.patch index b39dd81..0c8bc12 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0041-vuart.h.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0041-vuart.h.patch @@ -58,6 +58,6 @@ +} vuart_t; + +bool vuart_ready(void); -+void me_cons_sendc(domid_t domid, uint8_t ch); ++void s3c_cons_sendc(domid_t domid, uint8_t ch); + +#endif /* VUART_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0042-device_access.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0042-device_access.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0042-device_access.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0042-device_access.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0043-err.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0043-err.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0043-err.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0043-err.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0044-errno-base.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0044-errno-base.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0044-errno-base.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0044-errno-base.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0045-errno.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0045-errno.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0045-errno.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0045-errno.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0046-evtchn.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0046-evtchn.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0046-evtchn.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0046-evtchn.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0047-gnttab.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0047-gnttab.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0047-gnttab.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0047-gnttab.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0048-guest_api.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0048-guest_api.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0048-guest_api.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0048-guest_api.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0049-hypervisor.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0049-hypervisor.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0049-hypervisor.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0049-hypervisor.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0050-paging.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0050-paging.h.patch similarity index 95% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0050-paging.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0050-paging.h.patch index 6bcb4cd..ea20bc9 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0050-paging.h.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0050-paging.h.patch @@ -2,7 +2,7 @@ +++ ./soo/include/soo/paging.h 2025-08-29 08:46:41.395959078 +0200 @@ -0,0 +1,36 @@ +/* -+ * Copyright (C) 2016-2019 Daniel Rossier ++ * Copyright (C) 2016-2019 Daniel Rossier + * Copyright (C) 2018 Baptiste Delporte + * + * This program is free software; you can redistribute it and/or modify diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0051-ring.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0051-ring.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0051-ring.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0051-ring.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0052-roxml.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0052-roxml.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0052-roxml.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0052-roxml.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0053-simulation.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0053-simulation.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0053-simulation.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0053-simulation.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0054-soo.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0054-soo.h.patch similarity index 74% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0054-soo.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0054-soo.h.patch index cc0e96c..904ef2d 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0054-soo.h.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0054-soo.h.patch @@ -25,17 +25,17 @@ + +#include + -+int get_ME_state(unsigned int ME_slotID); -+void set_ME_state(unsigned int ME_slotID, ME_state_t state); ++int get_S3C_state(unsigned int S3C_slotID); ++void set_S3C_state(unsigned int S3C_slotID, S3C_state_t state); + -+int32_t get_ME_free_slot(uint32_t size); ++int32_t get_S3C_free_slot(uint32_t size); + -+bool get_ME_id(uint32_t slotID, ME_id_t *ME_id); ++bool get_S3C_id(uint32_t slotID, S3C_id_t *S3C_id); + -+void get_ME_id_array(ME_id_t *ME_id_array); -+char *xml_prepare_id_array(ME_id_t *ME_id_array); ++void get_S3C_id_array(S3C_id_t *S3C_id_array); ++char *xml_prepare_id_array(S3C_id_t *S3C_id_array); + -+void get_ME_desc(unsigned int slotID, ME_desc_t *ME_desc); ++void get_S3C_desc(unsigned int slotID, S3C_desc_t *S3C_desc); + + +#endif /* SOO_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0055-strtod.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0055-strtod.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0055-strtod.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0055-strtod.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0056-sysfs.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0056-sysfs.h.patch similarity index 96% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0056-sysfs.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0056-sysfs.h.patch index 0133623..3347448 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0056-sysfs.h.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0056-sysfs.h.patch @@ -3,7 +3,7 @@ @@ -0,0 +1,65 @@ + +/* -+ * Copyright (C) 2020 Daniel Rossier ++ * Copyright (C) 2020 Daniel Rossier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0057-types.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0057-types.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0057-types.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0057-types.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0058-asf.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0058-asf.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0058-asf.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0058-asf.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0059-console.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0059-console.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0059-console.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0059-console.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0060-debug.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0060-debug.h.patch similarity index 94% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0060-debug.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0060-debug.h.patch index c93fc0e..a0f1cb9 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0060-debug.h.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0060-debug.h.patch @@ -1,8 +1,8 @@ --- /home/rossierd/soo/git/micofe/build/tmp/work/linux-6.12-r0/linux-6.12/soo/include/soo/uapi/debug.h 1970-01-01 01:00:00.000000000 +0100 +++ ./soo/include/soo/uapi/debug.h 2025-08-29 08:46:41.395937531 +0200 -@@ -0,0 +1,76 @@ +@@ -0,0 +1,75 @@ +/* -+ * Copyright (C) 2015-2019 Daniel Rossier ++ * Copyright (C) 2015-2019 Daniel Rossier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as @@ -67,7 +67,6 @@ +#else + +#define DBG(fmt, ...) -+#define RTDBG(fmt, ...) +#define DBG0(...) +#define DBG_BUFFER(buffer, ...) +#define DBG_ON__ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0061-injector.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0061-injector.h.patch similarity index 84% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0061-injector.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0061-injector.h.patch index b076898..7b4eb6c 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0061-injector.h.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0061-injector.h.patch @@ -2,7 +2,7 @@ +++ ./soo/include/soo/uapi/injector.h 2025-08-29 08:46:41.395900289 +0200 @@ -0,0 +1,108 @@ +/* -+ * Copyright (C) 2016 Daniel Rossier ++ * Copyright (C) 2016 Daniel Rossier + * Copyright (C) 2017,2018 Baptiste Delporte + * + * This program is free software; you can redistribute it and/or modify @@ -42,8 +42,8 @@ + +#define INJECTOR_N_RECV_BUFFERS 10 + -+/* Max ME size in bytes */ -+#define DATACOMM_ME_MAX_SIZE (32 * 1024 * 1024) ++/* Max S3C size in bytes */ ++#define DATACOMM_S3C_MAX_SIZE (32 * 1024 * 1024) + +#endif /* __KERNEL__ */ + @@ -60,7 +60,7 @@ + +/* + * - INJECTOR_BUFFER_FREE means the buffer is ready for send/receive operations. -+ * - INJECTOR_BUFFER_BUSY means the buffer is reserved for a ME. ++ * - INJECTOR_BUFFER_BUSY means the buffer is reserved for a S3C. + * - INJECTOR_BUFFER_SENDING means the buffer is currently along the path for being sent out. + * The buffer can still be altered depending on the steps of sending (See SOOlink/Coder). + */ @@ -77,9 +77,9 @@ + injector_buffer_status_t status; + + /* -+ * Reference to the ME. ++ * Reference to the S3C. + */ -+ void *ME_data; ++ void *S3C_data; + size_t size; + + uint32_t prio; @@ -87,18 +87,18 @@ +} injector_buffer_desc_t; + +void injector_prepare(uint32_t size); -+void injector_clean_ME(void); -+uint32_t injector_retrieve_ME(void); ++void injector_clean_S3C(void); ++uint32_t injector_retrieve_S3C(void); + -+void *injector_get_ME_buffer(void); -+size_t injector_get_ME_size(void); ++void *injector_get_S3C_buffer(void); ++size_t injector_get_S3C_size(void); + +void *injector_get_tmp_buf(void); +size_t injector_get_tmp_size(void); +bool injector_is_full(void); +void injector_set_full(bool _full); + -+void injector_receive_ME(void *ME, size_t size); ++void injector_receive_S3C(void *S3C, size_t size); + +int inject_capsule(void *buffer, size_t size, int slotID, unsigned capsuleID); +void start_capsule(int slotID); diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0062-soo.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0062-soo.h.patch similarity index 73% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0062-soo.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0062-soo.h.patch index f9b7c15..9c14c7b 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0062-soo.h.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0062-soo.h.patch @@ -1,6 +1,6 @@ --- /home/rossierd/soo/git/micofe/build/tmp/work/linux-6.12-r0/linux-6.12/soo/include/soo/uapi/soo.h 1970-01-01 01:00:00.000000000 +0100 +++ ./soo/include/soo/uapi/soo.h 2025-08-29 08:46:41.395924678 +0200 -@@ -0,0 +1,496 @@ +@@ -0,0 +1,510 @@ +/* + * Copyright (C) 2014-2025 Daniel Rossier + * @@ -26,15 +26,14 @@ + +#include + -+/* This signature is used to check the coherency of the ME image, after a migration ++/* This signature is used to check the coherency of the S3C image, after a snapshot + * or a restoration for example. + */ -+#define SOO_ME_SIGNATURE "SooZ" ++#define SOO_S3C_SIGNATURE "SooZ" + +#endif /* __ASSEMBLY__ */ + +#define AGENCY_CPU 0 -+#define AGENCY_RT_CPU 1 + +#ifndef __ASSEMBLY__ + @@ -75,12 +74,6 @@ + +void do_gnttab(gnttab_op_t *args); + -+/* -+ * Page frame number to set the framebuffer addresses. -+ * The physical addresses may be splitted in multiple parts, which requires to have -+ * multiple set of strating page frame and page count -+ */ -+ +#define MAX_FBDEV_PFN 8 +typedef struct fbdev_pfns { + size_t pfn_count; @@ -91,51 +84,51 @@ +#define AVZ_SCHEDULER_FLIP 0 + +/* -+ * ME states: -+ * - ME_state_stopped: Capsule is stopped (right after start or later) -+ * - ME_state_living: ME is full-functional and activated (all frontend devices are consistent) -+ * - ME_state_suspended: ME is suspended before migrating. This state is maintained for the resident ME instance -+ * - ME_state_hibernate: ME is in a state of hibernate snapshot -+ * - ME_state_resuming: ME ready to perform resuming (after recovering) -+ * - ME_state_awakened: ME is just being awakened -+ * - ME_state_terminated: ME has been terminated (by a shutdown) -+ * - ME_state_dead: ME does not exist ++ * S3C states: ++ * - S3C_state_stopped: Capsule is stopped (right after start or later) ++ * - S3C_state_living: S3C is full-functional and activated (all frontend devices are consistent) ++ * - S3C_state_suspended: S3C is suspended (e.g. before taking a snapshot) ++ * - S3C_state_hibernate: S3C is in a state of hibernate snapshot ++ * - S3C_state_resuming: S3C ready to perform resuming (after recovering) ++ * - S3C_state_awakened: S3C is just being awakened ++ * - S3C_state_terminated: S3C has been terminated (by a shutdown) ++ * - S3C_state_dead: S3C does not exist + */ +typedef enum { -+ ME_state_stopped, -+ ME_state_living, -+ ME_state_suspended, -+ ME_state_hibernate, -+ ME_state_resuming, -+ ME_state_awakened, -+ ME_state_killed, -+ ME_state_terminated, -+ ME_state_dead -+} ME_state_t; ++ S3C_state_stopped, ++ S3C_state_living, ++ S3C_state_suspended, ++ S3C_state_hibernate, ++ S3C_state_resuming, ++ S3C_state_awakened, ++ S3C_state_killed, ++ S3C_state_terminated, ++ S3C_state_dead ++} S3C_state_t; + +/* Keep information about slot availability -+ * FREE: the slot is available (no ME) -+ * BUSY: the slot is allocated a ME ++ * FREE: the slot is available (no S3C) ++ * BUSY: the slot is allocated a S3C + */ -+typedef enum { ME_SLOT_FREE, ME_SLOT_BUSY } ME_slotState_t; ++typedef enum { S3C_SLOT_FREE, S3C_SLOT_BUSY } S3C_slotState_t; + -+/* ME ID related information */ -+#define ME_NAME_SIZE 40 -+#define ME_SHORTDESC_SIZE 1024 ++/* S3C ID related information */ ++#define S3C_NAME_SIZE 40 ++#define S3C_SHORTDESC_SIZE 1024 + +/* -+ * Definition of ME ID information used by functions which need ++ * Definition of S3C ID information used by functions which need + * to get a list of running MEs with their information. + */ +typedef struct { + uint32_t slotID; -+ ME_state_t state; ++ S3C_state_t state; + + uint64_t spid; + -+ char name[ME_NAME_SIZE]; -+ char shortdesc[ME_SHORTDESC_SIZE]; -+} ME_id_t; ++ char name[S3C_NAME_SIZE]; ++ char shortdesc[S3C_SHORTDESC_SIZE]; ++} S3C_id_t; + +struct work_struct; +struct semaphore; @@ -165,7 +158,7 @@ +extern atomic_t dc_incoming_domID[DC_EVENT_MAX]; + +/* -+ * IOCTL commands for migration. ++ * IOCTL commands for S3C management. + * This part is shared between the kernel and user spaces. + */ + @@ -178,24 +171,24 @@ +#define AGENCY_IOCTL_SHUTDOWN _IOW('S', 3, agency_ioctl_args_t) +#define AGENCY_IOCTL_INJECT_CAPSULE _IOWR('S', 4, agency_ioctl_args_t) +#define AGENCY_IOCTL_START_CAPSULE _IOWR('S', 5, agency_ioctl_args_t) -+#define AGENCY_IOCTL_GET_ME_ID _IOWR('S', 6, agency_ioctl_args_t) -+#define AGENCY_IOCTL_GET_ME_ID_ARRAY _IOR('S', 7, agency_ioctl_args_t) ++#define AGENCY_IOCTL_GET_S3C_ID _IOWR('S', 6, agency_ioctl_args_t) ++#define AGENCY_IOCTL_GET_S3C_ID_ARRAY _IOR('S', 7, agency_ioctl_args_t) + +#define SOO_NAME_SIZE 16 + +/* -+ * ME descriptor ++ * S3C descriptor + * + * WARNING !! Be careful when modifying this structure. It *MUST* be aligned with -+ * the same structure used in the ME. ++ * the same structure used in the S3C. + */ +typedef struct { + unsigned int slotID; + uint64_t spid; + -+ ME_state_t state; ++ S3C_state_t state; + -+ unsigned int size; /* Size of the ME with the struct dom_context size */ ++ unsigned int size; /* Size of the S3C with the struct dom_context size */ + unsigned int dc_evtchn; + + unsigned int vbstore_revtchn, vbstore_levtchn; @@ -203,7 +196,7 @@ + + void (*resume_fn)(void); + -+} ME_desc_t; ++} S3C_desc_t; + +/* + * Agency descriptor @@ -216,7 +209,7 @@ + + uint64_t agencyUID; /* Agency UID */ + -+ /* Event channels used for directcomm channel between agency and agency-RT or ME */ ++ /* Event channels used for directcomm channel between agency and S3C */ + unsigned int dc_evtchn[MAX_DOMAINS]; + + /* Event channels used by vbstore */ @@ -228,13 +221,13 @@ +} agency_desc_t; + +/* -+ * SOO agency & ME descriptor - This structure is used in the shared info page of the agency or ME domain. ++ * SOO agency & S3C descriptor - This structure is used in the shared info page of the agency or S3C domain. + */ + +typedef struct { + union { + agency_desc_t agency; -+ ME_desc_t ME; ++ S3C_desc_t S3C; + } u; +} dom_desc_t; + @@ -268,10 +261,10 @@ + */ + u64 current_s_time; + -+ /* Agency or ME descriptor */ ++ /* Agency or S3C descriptor */ + dom_desc_t dom_desc; + -+ /* Used to store a signature for consistency checking, for example after a migration/restoration */ ++ /* Used to store a signature for consistency checking, for example after a snapshot restoration */ + char signature[4]; +}; + @@ -306,25 +299,44 @@ + +/* AVZ hypercalls devoted to SOO */ + -+#define AVZ_ME_READ_SNAPSHOT 4 -+#define AVZ_ME_WRITE_SNAPSHOT 5 ++#define AVZ_S3C_READ_SNAPSHOT 4 ++#define AVZ_S3C_WRITE_SNAPSHOT 5 +#define AVZ_START_CAPSULE 6 +#define AVZ_INJECT_CAPSULE 7 -+#define AVZ_KILL_ME 8 ++#define AVZ_KILL_S3C 8 +#define AVZ_DC_EVENT_SET 9 -+#define AVZ_GET_ME_STATE 10 -+#define AVZ_SET_ME_STATE 11 ++#define AVZ_GET_S3C_STATE 10 ++#define AVZ_SET_S3C_STATE 11 +#define AVZ_GET_DOM_DESC 12 +#define AVZ_GRANT_TABLE_OP 13 -+#define AVZ_FBDEV_SET_PFNS 14 -+#define AVZ_FBDEV_CHANGE_FOCUS 15 -+#define AVZ_FBDEV_GET_ME_ADDR 16 ++#define AVZ_FBDEV_SET_PFNS 14 ++#define AVZ_FBDEV_CHANGE_FOCUS 15 ++#define AVZ_FBDEV_GET_S3C_ADDR 16 ++ ++/* Staged hypercalls. ++ * ++ * The hypercalls which move a whole capsule memslot around (injection, ++ * snapshot read/write) would otherwise spend seconds at EL2 with IRQs off ++ * on the calling CPU. They are therefore split into stages driven by the ++ * agency, the bulk copy being done one bounded chunk per CHUNK call, so ++ * that the calling CPU takes its interrupts back in between (issue #287). ++ * ++ * INIT prepare (parse, allocate, pause, ...); returns the number of ++ * bytes the CHUNK stage has to move, in `offset`. ++ * CHUNK move the next chunk; `offset` is the IN/OUT byte cursor. ++ * FINALIZE complete (load, construct, resume, ...). ++ */ ++#define AVZ_STAGE_INIT 0 ++#define AVZ_STAGE_CHUNK 1 ++#define AVZ_STAGE_FINALIZE 2 + +/* AVZ_INJECT_CAPSULE */ +typedef struct { + void *itb_paddr; + int slotID; -+ unsigned int capsuleID; ++ unsigned int capsuleID; ++ uint32_t stage; /* IN: AVZ_STAGE_* */ ++ uint32_t offset; /* CHUNK: IN/OUT byte cursor / INIT: OUT bytes to clear */ +} avz_inject_capsule_t; + +/* AVZ_START_CAPSULE */ @@ -339,8 +351,8 @@ + int state; +} avz_dc_event_t; + -+/* AVZ_GET_ME_STATE */ -+/* AVZ_SET_ME_STATE */ ++/* AVZ_GET_S3C_STATE */ ++/* AVZ_SET_S3C_STATE */ +typedef struct { + uint32_t slotID; + int state; @@ -352,7 +364,7 @@ + dom_desc_t dom_desc; +} avz_dom_desc_t; + -+/* AVZ_GET_ME_FREE_SLOT */ ++/* AVZ_GET_S3C_FREE_SLOT */ +typedef struct { + int slotID; + int size; @@ -369,9 +381,11 @@ + void *snapshot_paddr; + int32_t slotID; + int size; ++ uint32_t stage; /* IN: AVZ_STAGE_* */ ++ uint32_t offset; /* CHUNK: IN/OUT byte cursor / INIT: OUT bytes to copy */ +} avz_snapshot_t; + -+/* AVZ_KILL_ME */ ++/* AVZ_KILL_S3C */ +typedef struct { + uint32_t slotID; +} avz_kill_me_t; @@ -391,7 +405,7 @@ + int new_slotID; +} avz_fbdev_focus_t; + -+/* AVZ_FBDEV_GET_ME_ADDR */ ++/* AVZ_FBDEV_GET_S3C_ADDR */ +typedef struct { + addr_t paddr; +} avz_fbdev_addr_t; @@ -440,7 +454,7 @@ +/* + * SOO callback functions. + * The following definitions are used as argument in domcalls or in the -+ * agency_ctl() function as a callback to be propagated to a specific ME. ++ * agency_ctl() function as a callback to be propagated to a specific S3C. + * + */ + @@ -451,7 +465,7 @@ + +typedef struct soo_domcall_arg { + /* Stores the agency ctl function. -+ * Possibly, the agency_ctl function can be associated to a callback operation asked by a ME ++ * Possibly, the agency_ctl function can be associated to a callback operation asked by a S3C + */ + unsigned int cmd; + unsigned int slotID; /* Origin of the domcall */ @@ -461,7 +475,7 @@ + pre_resume_args_t pre_resume_args; + + post_activate_args_t post_activate_args; -+ ME_state_t set_me_state_args; ++ S3C_state_t set_me_state_args; + } u; + +} soo_domcall_arg_t; @@ -476,7 +490,7 @@ + +void callbacks_init(void); + -+void set_dc_event(domid_t domid, dc_event_t dc_event); ++int set_dc_event(domid_t domid, dc_event_t dc_event); + +void do_soo_activity(void *arg); + @@ -490,7 +504,7 @@ + +void perform_task(dc_event_t dc_event); + -+void shutdown_ME(unsigned int ME_slotID); ++void shutdown_S3C(unsigned int S3C_slotID); + +void cache_flush_all(void); + diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0063-vbstore.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0063-vbstore.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0063-vbstore.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0063-vbstore.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0064-vbus.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0064-vbus.h.patch similarity index 98% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0064-vbus.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0064-vbus.h.patch index 8669905..a618647 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0064-vbus.h.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0064-vbus.h.patch @@ -2,7 +2,7 @@ +++ ./soo/include/soo/vbus.h 2025-08-29 08:46:41.396103436 +0200 @@ -0,0 +1,336 @@ +/* -+ * Copyright (C) 2014-2019 Daniel Rossier ++ * Copyright (C) 2014-2019 Daniel Rossier + * Copyright (C) 2016, 2018 Baptiste Delporte + * + * This program is free software; you can redistribute it and/or modify @@ -111,7 +111,7 @@ + */ + enum vbus_state fe_state; + -+ /* So far, only the ME use this completion struct. On the agency side, ++ /* So far, only the S3C use this completion struct. On the agency side, + * the device can not be shutdown on live. + */ + struct completion down; @@ -319,7 +319,7 @@ +void vbstore_trigger_dev_probe(void); +int vbstore_uart_remove(unsigned int domID); + -+void postmig_setup(void); ++void postresume_setup(void); +int gnttab_remove(bool with_vbus); + +void remove_devices(void); diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0065-vdevback.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0065-vdevback.h.patch similarity index 97% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0065-vdevback.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0065-vdevback.h.patch index 4e31e10..a257a27 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0065-vdevback.h.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0065-vdevback.h.patch @@ -2,7 +2,7 @@ +++ ./soo/include/soo/vdevback.h 2025-08-29 08:46:41.396178895 +0200 @@ -0,0 +1,90 @@ +/* -+ * Copyright (C) 2020 Daniel Rossier ++ * Copyright (C) 2020 Daniel Rossier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0066-Kconfig.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0066-Kconfig.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0066-Kconfig.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0066-Kconfig.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0067-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0067-Makefile.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0067-Makefile.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0067-Makefile.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0068-paging.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0068-paging.c.patch similarity index 91% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0068-paging.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0068-paging.c.patch index e553f92..3927cd1 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0068-paging.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0068-paging.c.patch @@ -2,7 +2,7 @@ +++ ./soo/kernel/arm64/paging.c 2025-08-29 08:46:41.395097877 +0200 @@ -0,0 +1,76 @@ +/* -+ * Copyright (C) 2016-2021 Daniel Rossier ++ * Copyright (C) 2016-2021 Daniel Rossier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as @@ -43,7 +43,7 @@ + BUG_ON(!pg); + + pages[0] = pg; -+ va = vmap(pages, 1, VM_MAP, pgprot_noncached(PAGE_KERNEL)); ++ va = vmap(pages, 1, VM_MAP, pgprot_writecombine(PAGE_KERNEL)); + BUG_ON(!va); + + uncp->vaddr = va; @@ -63,7 +63,7 @@ +void *paging_remap(unsigned long paddr, size_t size) { + void *vaddr; + -+ vaddr = ioremap_wc(paddr, size); ++ vaddr = memremap(paddr, size, MEMREMAP_WB); + BUG_ON(!vaddr); + + return vaddr; diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0069-asf.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0069-asf.c.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0069-asf.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0069-asf.c.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0070-asf_priv.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0070-asf_priv.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0070-asf_priv.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0070-asf_priv.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0071-asf_test.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0071-asf_test.c.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0071-asf_test.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0071-asf_test.c.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0072-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0072-Makefile.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0072-Makefile.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0072-Makefile.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0073-capsule.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0073-capsule.c.patch similarity index 55% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0073-capsule.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0073-capsule.c.patch index bee3db2..7c85d02 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0073-capsule.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0073-capsule.c.patch @@ -1,6 +1,6 @@ --- /home/rossierd/soo/git/micofe/build/tmp/work/linux-6.12-r0/linux-6.12/soo/kernel/capsule.c 1970-01-01 01:00:00.000000000 +0100 +++ ./soo/kernel/capsule.c 2025-08-30 15:37:09.704925348 +0200 -@@ -0,0 +1,498 @@ +@@ -0,0 +1,627 @@ +/* + * Copyright (C) 2017-2024 Daniel Rossier + * @@ -47,18 +47,22 @@ +#include +#include + -+/* Buffer in which the ME will be received. It is dynamically allocated ++/* Buffer in which the S3C will be received. It is dynamically allocated +in injector_prepare */ -+uint8_t *ME_buffer; ++uint8_t *S3C_buffer; + +/* Full size of the me we are receiving */ -+size_t ME_size; ++size_t S3C_size; + +/* Current size received */ +size_t current_size = 0; + +struct device *capsule_dev = NULL; + ++/* Serialize the staged injection hypercall sequence (issue #287). */ ++ ++static DEFINE_MUTEX(inject_lock); ++ +#define CMA_MALLOC_DEVICE_FILENAME "cma_malloc" + +static struct file_operations cma_malloc_fileops = { @@ -87,30 +91,68 @@ + void *me = NULL; + dma_addr_t dma_handle; + avz_hyp_t args; ++ uint32_t slot_size; + + DBG("Original contents at address: 0x%08x\n with size %d bytes\n", (unsigned long) buffer, size); + -+ /* Allocate a contiguous memory region to host the ME */ ++ /* Allocate a contiguous memory region to host the S3C */ + me = dma_alloc_coherent(capsule_dev, size, &dma_handle, GFP_KERNEL); + BUG_ON(!me); + + memcpy(me, buffer, size); + -+ /* Since the ME buffer is in the CMA zone and allocated via the ++ /* Since the S3C buffer is in the CMA zone and allocated via the + * dma_alloc_cohenrent() function, we cannot use virt_to_phys(). So, we + * take the CPU phys addr stored in dma_handle, and we force to a + * (wrong) virtual address to make sure the soo_hypercall() function + * gets the right physical address; indeeed, it uses virt_to_phys() there. + */ + ++ /* The injection is staged (issue #287): one hypercall per stage so ++ * that the calling CPU gets its interrupts back between two stages ++ * instead of freezing at EL2 for the whole slot processing. ++ */ ++ ++ mutex_lock(&inject_lock); ++ + args.cmd = AVZ_INJECT_CAPSULE; + + args.u.avz_inject_capsule_args.itb_paddr = (void *) dma_handle; + args.u.avz_inject_capsule_args.slotID = slotID; + args.u.avz_inject_capsule_args.capsuleID = capsuleID; ++ args.u.avz_inject_capsule_args.stage = AVZ_STAGE_INIT; ++ ++ avz_hypercall(&args); ++ ++ if (args.u.avz_inject_capsule_args.slotID < 0) ++ goto out; ++ ++ /* INIT returns the amount of slot memory to be cleared. */ ++ ++ slot_size = args.u.avz_inject_capsule_args.offset; ++ ++ /* Clear the slot RAM chunk by chunk. */ ++ ++ args.u.avz_inject_capsule_args.offset = 0; ++ ++ while (args.u.avz_inject_capsule_args.offset < slot_size) { ++ args.u.avz_inject_capsule_args.stage = AVZ_STAGE_CHUNK; ++ ++ avz_hypercall(&args); ++ ++ if (args.u.avz_inject_capsule_args.slotID < 0) ++ goto out; ++ ++ cond_resched(); ++ } ++ ++ args.u.avz_inject_capsule_args.stage = AVZ_STAGE_FINALIZE; + + avz_hypercall(&args); + ++out: ++ mutex_unlock(&inject_lock); ++ + /* Deallocate the memory area reserved for the capsule */ + dma_free_coherent(capsule_dev, size, me, dma_handle); + @@ -125,7 +167,10 @@ +void start_capsule(int slotID) { + avz_hyp_t args; + -+ BUG_ON(get_ME_state(slotID) != ME_state_stopped); ++ if (get_S3C_state(slotID) != S3C_state_stopped) { ++ lprintk("%s: no stopped capsule in slot %d, nothing to start.\n", __func__, slotID); ++ return; ++ } + + args.cmd = AVZ_START_CAPSULE; + @@ -138,31 +183,41 @@ + + DBG("Capsule in slot %d in state living...\n", slotID); + -+ set_ME_state(slotID, ME_state_living); ++ set_S3C_state(slotID, S3C_state_living); +} + +/** -+ * Read a ME snapshot for migration or saving. -+ * The ME is read and stored in a vmalloc'd memory area. ++ * Read a S3C snapshot for saving. ++ * The S3C is read and stored in a vmalloc'd memory area. + * + * @param slotID -+ * @param buffer pointer to the ME buffer ++ * @param buffer pointer to the S3C buffer + */ +void read_snapshot(uint32_t slotID, void *buffer, uint32_t *size) { + avz_hyp_t args; + void *me = NULL; + int ret; ++ uint32_t payload_size; + dma_addr_t dma_handle; -+ ME_state_t ME_state; ++ S3C_state_t S3C_state; ++ ++ /* No snapshot can be taken from a slot which does not host any capsule. */ ++ ++ if (get_S3C_state(slotID) == S3C_state_dead) { ++ lprintk("%s: no capsule in slot %d, no snapshot to read.\n", __func__, slotID); ++ *size = 0; ++ return; ++ } + + /* Ask the size only */ + if (*size == 0) { + + DBG("%s: ask the snapshot size...\n", __func__); + -+ args.cmd = AVZ_ME_READ_SNAPSHOT; ++ args.cmd = AVZ_S3C_READ_SNAPSHOT; + args.u.avz_snapshot_args.slotID = slotID; + args.u.avz_snapshot_args.size = 0; ++ args.u.avz_snapshot_args.stage = AVZ_STAGE_INIT; + + avz_hypercall(&args); + *size = args.u.avz_snapshot_args.size; @@ -170,65 +225,99 @@ + return; + } + -+ if (get_ME_state(slotID) == ME_state_living) { ++ if (get_S3C_state(slotID) == S3C_state_living) { + -+ /* Suspend the ME */ ++ /* Suspend the S3C */ + do_sync_dom(slotID, DC_PRE_SUSPEND); + -+ /* Set the ME in suspended state */ -+ set_ME_state(slotID, ME_state_suspended); ++ /* Set the S3C in suspended state */ ++ set_S3C_state(slotID, S3C_state_suspended); + + vbus_suspend_devices(slotID); + + do_sync_dom(slotID, DC_SUSPEND); + -+ printk("### state: %d\n", get_ME_state(slotID)); ++ printk("### state: %d\n", get_S3C_state(slotID)); + } + + /* -+ * Prepare a buffer to store the ME and additional header information like migration structure. ++ * Prepare a buffer to store the S3C and additional header information like the snapshot structure. + */ + + me = dma_alloc_coherent(capsule_dev, *size, &dma_handle, GFP_KERNEL); + BUG_ON(!me); -+ -+ args.cmd = AVZ_ME_READ_SNAPSHOT; ++ ++ /* The snapshot is read in stages (issue #287) so that the calling CPU ++ * gets its interrupts back between two chunks of capsule memory. ++ */ ++ ++ mutex_lock(&inject_lock); ++ ++ args.cmd = AVZ_S3C_READ_SNAPSHOT; + + args.u.avz_snapshot_args.slotID = slotID; + args.u.avz_snapshot_args.snapshot_paddr = (void *) dma_handle; + args.u.avz_snapshot_args.size = *size; ++ args.u.avz_snapshot_args.stage = AVZ_STAGE_INIT; + + avz_hypercall(&args); + ++ if (args.u.avz_snapshot_args.size == 0) ++ goto out; ++ ++ /* INIT returns the amount of capsule memory to be copied. */ ++ ++ payload_size = args.u.avz_snapshot_args.offset; ++ ++ args.u.avz_snapshot_args.offset = 0; ++ ++ while (args.u.avz_snapshot_args.offset < payload_size) { ++ args.u.avz_snapshot_args.stage = AVZ_STAGE_CHUNK; ++ ++ avz_hypercall(&args); ++ ++ if (args.u.avz_snapshot_args.size == 0) ++ goto out; ++ ++ cond_resched(); ++ } ++ ++ args.u.avz_snapshot_args.stage = AVZ_STAGE_FINALIZE; ++ ++ avz_hypercall(&args); ++ ++out: ++ mutex_unlock(&inject_lock); ++ + /* Copy the snapshot to the user buffer */ + ret = copy_to_user(buffer, me, *size); + BUG_ON(ret); -+ ++ + dma_free_coherent(capsule_dev, *size, me, dma_handle); + -+ ME_state = get_ME_state(slotID); ++ S3C_state = get_S3C_state(slotID); + -+ if (ME_state == ME_state_resuming) { ++ if (S3C_state == S3C_state_resuming) { + -+ DBG("Pinging ME %d for DC_RESUME...\n", slotID); ++ DBG("Pinging S3C %d for DC_RESUME...\n", slotID); + do_sync_dom(slotID, DC_RESUME); + + DBG("Resuming all devices (resuming from backend devices) on domain %d...\n", slotID); + vbus_resume_devices(slotID); + -+ DBG("Pinging ME %d for DC_POST_ACTIVATE...\n", slotID); ++ DBG("Pinging S3C %d for DC_POST_ACTIVATE...\n", slotID); + do_sync_dom(slotID, DC_POST_ACTIVATE); + -+ DBG("Putting ME domid %d in state living...\n", slotID); -+ set_ME_state(slotID, ME_state_living); ++ DBG("Putting S3C domid %d in state living...\n", slotID); ++ set_S3C_state(slotID, S3C_state_living); + } +} + +/** -+ * Write a ME snapshot provided a ME_info_transfer_t descriptor. ++ * Write a S3C snapshot provided a S3C_info_transfer_t descriptor. + * + * @param slotID -+ * @param buffer Adresse of a buffer of ME_info_transfert_t ++ * @param buffer Adresse of a buffer of S3C_info_transfert_t + * @return slotID in case of success, -1 if no available slot + */ +int write_snapshot(void *buffer) { @@ -237,15 +326,16 @@ + int ret; + dma_addr_t dma_handle; + uint32_t snapshot_size; ++ uint32_t payload_size; + uint32_t slotID; -+ ME_state_t ME_state; ++ S3C_state_t S3C_state; + + snapshot_size = *((uint32_t *) buffer); + + DBG("Retrieving a size of %d bytes.\n", snapshot_size); + + /* -+ * Prepare a buffer to store the ME and additional header information like migration structure. ++ * Prepare a buffer to store the S3C and additional header information like the snapshot structure. + */ + me = dma_alloc_coherent(capsule_dev, snapshot_size, &dma_handle, GFP_KERNEL); + BUG_ON(!me); @@ -254,18 +344,57 @@ + ret = copy_from_user(me, buffer, snapshot_size); + BUG_ON(ret); + -+ args.cmd = AVZ_ME_WRITE_SNAPSHOT; -+ ++ /* The snapshot is written in stages (issue #287) so that the calling ++ * CPU gets its interrupts back between two chunks of capsule memory. ++ */ ++ ++ mutex_lock(&inject_lock); ++ ++ args.cmd = AVZ_S3C_WRITE_SNAPSHOT; ++ + args.u.avz_snapshot_args.size = snapshot_size; + args.u.avz_snapshot_args.slotID = -1; + args.u.avz_snapshot_args.snapshot_paddr = (void *) dma_handle; ++ args.u.avz_snapshot_args.stage = AVZ_STAGE_INIT; + + DBG("%s: Now asking AVZ to re-implement the snapshot of size %d bytes...\n", __func__, snapshot_size); + + avz_hypercall(&args); + -+ if (!args.u.avz_snapshot_args.slotID) { ++ /* AVZ leaves the slotID unchanged (-1) when no slot could be allocated; ++ * capsule slots start at 2 (0 = agency, 1 = reserved). ++ */ ++ ++ if (args.u.avz_snapshot_args.slotID < 2) ++ goto out; ++ ++ /* INIT returns the amount of capsule memory to be copied. */ ++ ++ payload_size = args.u.avz_snapshot_args.offset; ++ ++ args.u.avz_snapshot_args.offset = 0; ++ ++ while (args.u.avz_snapshot_args.offset < payload_size) { ++ args.u.avz_snapshot_args.stage = AVZ_STAGE_CHUNK; ++ ++ avz_hypercall(&args); ++ ++ if (args.u.avz_snapshot_args.slotID < 2) ++ goto out; ++ ++ cond_resched(); ++ } ++ ++ args.u.avz_snapshot_args.stage = AVZ_STAGE_FINALIZE; ++ ++ avz_hypercall(&args); ++ ++out: ++ mutex_unlock(&inject_lock); ++ ++ if (args.u.avz_snapshot_args.slotID < 2) { + printk("%s: No free space...\n", __func__); ++ dma_free_coherent(capsule_dev, snapshot_size, me, dma_handle); + return -1; /* No free space */ + } + @@ -273,52 +402,52 @@ + + dma_free_coherent(capsule_dev, snapshot_size, me, dma_handle); + -+ ME_state = get_ME_state(slotID); ++ S3C_state = get_S3C_state(slotID); + -+ if (ME_state == ME_state_stopped) { ++ if (S3C_state == S3C_state_stopped) { + /* Normal processing, start of the capsule */ + + start_capsule(slotID); + return slotID; + } + -+ BUG_ON((ME_state != ME_state_hibernate) && (ME_state != ME_state_awakened)); ++ BUG_ON((S3C_state != S3C_state_hibernate) && (S3C_state != S3C_state_awakened)); + -+ DBG0("SOO migration subsys: Entering restoring tasks...\n"); ++ DBG0("SOO capsule subsys: Entering restoring tasks...\n"); + + /* The capsule is performing an asynchronous signal-based resume callback and will -+ * be set to ME_state_awakened after its execution ++ * be set to S3C_state_awakened after its execution + */ + while (1) { + schedule(); + -+ if (get_ME_state(slotID) == ME_state_awakened) { -+ DBG("ME now resuming...\n"); ++ if (get_S3C_state(slotID) == S3C_state_awakened) { ++ DBG("S3C now resuming...\n"); + break; + } + } + -+ DBG("Pinging ME %d for DC_RESUME...\n", slotID); ++ DBG("Pinging S3C %d for DC_RESUME...\n", slotID); + do_sync_dom(slotID, DC_RESUME); + + DBG("Resuming all devices (resuming from backend devices) on domain %d...\n", slotID); + vbus_resume_devices(slotID); + -+ DBG("Pinging ME %d for DC_POST_ACTIVATE...\n", slotID); ++ DBG("Pinging S3C %d for DC_POST_ACTIVATE...\n", slotID); + do_sync_dom(slotID, DC_POST_ACTIVATE); + -+ DBG("Putting ME domid %d in state living...\n", slotID); -+ set_ME_state(slotID, ME_state_living); ++ DBG("Putting S3C domid %d in state living...\n", slotID); ++ set_S3C_state(slotID, S3C_state_living); + + return slotID; +} + -+int get_ME_state(unsigned int ME_slotID) ++int get_S3C_state(unsigned int S3C_slotID) +{ + avz_hyp_t args; + -+ args.cmd = AVZ_GET_ME_STATE; -+ args.u.avz_me_state_args.slotID = ME_slotID; ++ args.cmd = AVZ_GET_S3C_STATE; ++ args.u.avz_me_state_args.slotID = S3C_slotID; + + avz_hypercall(&args); + @@ -326,26 +455,26 @@ +} + +/* -+ * Setting the ME state to the specific ME_slotID. ++ * Setting the S3C state to the specific S3C_slotID. + * The hypercall args is passed by 2 contiguous (unsigned) int, the first one is + * used for slotID, the second for the state + */ -+void set_ME_state(unsigned int ME_slotID, ME_state_t state) ++void set_S3C_state(unsigned int S3C_slotID, S3C_state_t state) +{ + avz_hyp_t args; + -+ args.cmd = AVZ_SET_ME_STATE; ++ args.cmd = AVZ_SET_S3C_STATE; + -+ args.u.avz_me_state_args.slotID = ME_slotID; ++ args.u.avz_me_state_args.slotID = S3C_slotID; + args.u.avz_me_state_args.state = state; + + avz_hypercall(&args); +} + +/** -+ * Retrieve the ME descriptor including the SPID, the state. ++ * Retrieve the S3C descriptor including the SPID, the state. + */ -+void get_ME_desc(unsigned int slotID, ME_desc_t *ME_desc) { ++void get_S3C_desc(unsigned int slotID, S3C_desc_t *S3C_desc) { + avz_hyp_t args; + + args.cmd = AVZ_GET_DOM_DESC; @@ -353,49 +482,49 @@ + + avz_hypercall(&args); + -+ memcpy(ME_desc, &args.u.avz_dom_desc_args.dom_desc, sizeof(ME_desc_t)); ++ memcpy(S3C_desc, &args.u.avz_dom_desc_args.dom_desc, sizeof(S3C_desc_t)); +} + +/** -+ * Retrieve the ME identity information including SPID, state. ++ * Retrieve the S3C identity information including SPID, state. + * + * @param slotID -+ * @param ME_id -+ * @return true if a ME has been found in slotID, false otherwise. ++ * @param S3C_id ++ * @return true if a S3C has been found in slotID, false otherwise. + */ -+bool get_ME_id(uint32_t slotID, ME_id_t *ME_id) { ++bool get_S3C_id(uint32_t slotID, S3C_id_t *S3C_id) { + char *prop; + char rootname[VBS_KEY_LENGTH]; + unsigned int len; + -+ /* The ME can be dormant but without any accessible ID information */ -+ ME_id->state = get_ME_state(slotID); ++ /* The S3C can be dormant but without any accessible ID information */ ++ S3C_id->state = get_S3C_state(slotID); + -+ if (ME_id->state == ME_state_dead) ++ if (S3C_id->state == S3C_state_dead) + return false; + -+ sprintf(rootname, "soo/me/%d", slotID); ++ sprintf(rootname, "soo/s3c/%d", slotID); + -+ /* Check if there is a ME? */ ++ /* Check if there is a S3C? */ + prop = vbus_read(VBT_NIL, rootname, "spid", &len); + + if (len == 1) { /* If no entry in vbstore, it returns 1 (byte \0) */ + return true; + } else { -+ sscanf(prop, "%llx", &ME_id->spid); ++ sscanf(prop, "%llx", &S3C_id->spid); + kfree(prop); + + prop = vbus_read(VBT_NIL, rootname, "name", &len); + -+ strcpy(ME_id->name, prop); ++ strcpy(S3C_id->name, prop); + kfree(prop); + + prop = vbus_read(VBT_NIL, rootname, "shortdesc", &len); + -+ strcpy(ME_id->shortdesc, prop); ++ strcpy(S3C_id->shortdesc, prop); + kfree(prop); + -+ ME_id->slotID = slotID; ++ S3C_id->slotID = slotID; + } + + return true; @@ -403,23 +532,23 @@ + +/** + * Get a list of all residing MEs in this smart object. -+ * The caller must have allocated an array of elements. ++ * The caller must have allocated an array of elements. + * -+ * The ME state will be used to determine if a ME is residing or not (ME_state_dead). ++ * The S3C state will be used to determine if a S3C is residing or not (S3C_state_dead). + */ -+void get_ME_id_array(ME_id_t *ME_id_array) { ++void get_S3C_id_array(S3C_id_t *S3C_id_array) { + uint32_t slotID; + + /* Empty the array first */ -+ memset(ME_id_array, 0, MAX_DOMAINS * sizeof(ME_id_array)); ++ memset(S3C_id_array, 0, MAX_DOMAINS * sizeof(S3C_id_array)); + + /* Walk through all entries in vbstore regarding MEs */ + + for (slotID = 2; slotID < MAX_DOMAINS; slotID++) -+ get_ME_id(slotID, &ME_id_array[slotID-2]); ++ get_S3C_id(slotID, &S3C_id_array[slotID-2]); + +} -+EXPORT_SYMBOL(get_ME_id_array); ++EXPORT_SYMBOL(get_S3C_id_array); + +/** + * Prepare a XML message which contains the list of MEs with their specific ID information @@ -427,9 +556,9 @@ + * + * + * @return buffer Buffer allocated by the which contains the XML message. Caller must free it. -+ * @param ME_id_array Array of ME_id_t entries (got with get_ME_id_array()) ++ * @param S3C_id_array Array of S3C_id_t entries (got with get_S3C_id_array()) + */ -+char *xml_prepare_id_array(ME_id_t *ME_id_array) { ++char *xml_prepare_id_array(S3C_id_t *S3C_id_array) { + uint32_t pos; + char *__buffer; + char *buffer; /* Output buffer */ @@ -440,28 +569,28 @@ + /* Adding the messages node */ + messages = roxml_add_node(NULL, 0, ROXML_ELM_NODE, "mobile-entities", NULL); + -+ for (pos = 0; pos < MAX_ME_DOMAINS; pos++) { ++ for (pos = 0; pos < MAX_S3C_DOMAINS; pos++) { + -+ if (ME_id_array[pos].state != ME_state_dead) { ++ if (S3C_id_array[pos].state != S3C_state_dead) { + + /* Adding the message itself */ + me = roxml_add_node(messages, 0, ROXML_ELM_NODE, "mobile-entity", NULL); + + /* Add SPID */ -+ sprintf(spid, "%016llx", ME_id_array[pos].spid); ++ sprintf(spid, "%016llx", S3C_id_array[pos].spid); + roxml_add_node(me, 0, ROXML_ATTR_NODE, "spid", spid); + + /* Add the slotID */ -+ sprintf(slotID, "%d", ME_id_array[pos].slotID); ++ sprintf(slotID, "%d", S3C_id_array[pos].slotID); + roxml_add_node(me, 0, ROXML_ATTR_NODE, "slotID", slotID); + + /* Add short name */ + name = roxml_add_node(me, 0, ROXML_ELM_NODE, "name", NULL); -+ roxml_add_node(name, 0, ROXML_TXT_NODE, NULL, ME_id_array[pos].name); ++ roxml_add_node(name, 0, ROXML_TXT_NODE, NULL, S3C_id_array[pos].name); + + /* And the short description */ + shortdesc = roxml_add_node(me, 0, ROXML_ELM_NODE, "description", NULL); -+ roxml_add_node(shortdesc, 0, ROXML_TXT_NODE, NULL, ME_id_array[pos].shortdesc); ++ roxml_add_node(shortdesc, 0, ROXML_TXT_NODE, NULL, S3C_id_array[pos].shortdesc); + + } + @@ -499,4 +628,3 @@ + misc_deregister(&cma_malloc_miscdevice); + capsule_dev = NULL; +} -\ No newline at end of file diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0074-console.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0074-console.c.patch similarity index 85% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0074-console.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0074-console.c.patch index ae26e46..39baf59 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0074-console.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0074-console.c.patch @@ -1,8 +1,8 @@ --- /home/rossierd/soo/git/micofe/build/tmp/work/linux-6.12-r0/linux-6.12/soo/kernel/console/console.c 1970-01-01 01:00:00.000000000 +0100 +++ ./soo/kernel/console/console.c 2025-08-29 08:46:41.394716106 +0200 -@@ -0,0 +1,158 @@ +@@ -0,0 +1,159 @@ +/* -+ * Copyright (C) 2016-2019 Daniel Rossier ++ * Copyright (C) 2016-2019 Daniel Rossier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as @@ -44,7 +44,7 @@ +static int volatile vfb_active = 0; + +/* Provided by vUART backend */ -+void me_cons_sendc(domid_t domid, uint8_t ch); ++void s3c_cons_sendc(domid_t domid, uint8_t ch); + +int avzcons_get_focus(void) +{ @@ -65,6 +65,7 @@ +int vfb_set_focus(int next_domain) +{ + avz_hyp_t hyp_args; ++ + hyp_args.cmd = AVZ_FBDEV_CHANGE_FOCUS; + hyp_args.u.avz_fbdev_focus_args.new_slotID = next_domain; + avz_hypercall(&hyp_args); @@ -84,13 +85,13 @@ +int avz_switch_console(char ch) +{ + static int switch_code_count = 0; -+ static char *input_str[N_SWITCH_FOCUS] = { "Agency domain", "Agency-RT domain", "ME-1(2)", "ME-2(3)", "ME-3(4)", "ME-4(5)", "ME-5(6)", "Agency AVZ Hypervisor" }; ++ static char *input_str[N_SWITCH_FOCUS] = { "Agency domain", "reserved", "S3C-1(2)", "S3C-2(3)", "S3C-3(4)", "S3C-4(5)", "S3C-5(6)", "Agency AVZ Hypervisor" }; + struct device_node *np; + int active = 0; + u32 focus_max = N_SWITCH_FOCUS - 1; + avz_hyp_t args; + -+#if 0 /* Interactions with RT domain? */ ++#if 0 /* Interactions with reserved domain? */ + int next = 1; +#endif + int next = 2; @@ -99,9 +100,9 @@ + if (np) + of_property_read_u32((const struct device_node *) np, "focus-dom-max", &focus_max); + -+/* Debugging purpose - enabled forces to forward to an ME */ ++/* Debugging purpose - enabled forces to forward to an S3C */ +#if 0 -+ me_cons_sendc(1, ch); ++ s3c_cons_sendc(1, ch); +#endif + + if ((SWITCH_CODE != 0) && (ch == SWITCH_CODE)) { @@ -133,14 +134,14 @@ + case 0: /* Input to the agency */ + return 0; + -+ case 1: /* RT domain */ -+ case 2: /* Input to ME #1 */ -+ case 3: /* Input to ME #2 */ -+ case 4: /* Input to ME #3 */ -+ case 5: /* Input to ME #4 */ -+ case 6: /* Input to ME #5 */ ++ case 1: /* reserved domain */ ++ case 2: /* Input to S3C #1 */ ++ case 3: /* Input to S3C #2 */ ++ case 4: /* Input to S3C #3 */ ++ case 5: /* Input to S3C #4 */ ++ case 6: /* Input to S3C #5 */ +#ifdef CONFIG_VUART_BACKEND -+ me_cons_sendc(avzcons_get_focus(), ch); ++ s3c_cons_sendc(avzcons_get_focus(), ch); +#endif /* CONFIG_VUART_BACKEND */ + return 1; + diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0075-lprintk.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0075-lprintk.c.patch similarity index 98% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0075-lprintk.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0075-lprintk.c.patch index f09c6b8..4a04d36 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0075-lprintk.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0075-lprintk.c.patch @@ -2,7 +2,7 @@ +++ ./soo/kernel/console/lprintk.c 2025-08-29 08:46:41.394703669 +0200 @@ -0,0 +1,203 @@ +/* -+ * Copyright (C) 2016-2018 Daniel Rossier ++ * Copyright (C) 2016-2018 Daniel Rossier + * Copyright (C) 2019 Baptiste Delporte + * + * This program is free software; you can redistribute it and/or modify diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0076-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0076-Makefile.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0076-Makefile.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0076-Makefile.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0077-core.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0077-core.c.patch similarity index 77% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0077-core.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0077-core.c.patch index f3b31ca..30e7ac8 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0077-core.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0077-core.c.patch @@ -1,8 +1,8 @@ --- /home/rossierd/soo/git/micofe/build/tmp/work/linux-6.12-r0/linux-6.12/soo/kernel/core.c 1970-01-01 01:00:00.000000000 +0100 +++ ./soo/kernel/core.c 2025-08-30 15:29:26.627707308 +0200 -@@ -0,0 +1,300 @@ +@@ -0,0 +1,317 @@ +/* -+ * Copyright (C) 2014-2019 Daniel Rossier ++ * Copyright (C) 2014-2019 Daniel Rossier + * Copyright (C) 2017, 2018 Baptiste Delporte + * + * This program is free software; you can redistribute it and/or modify @@ -52,25 +52,42 @@ + +/** + * @brief Shutdown the capsule in a way it depends on its state. -+ * -+ * @param ME_slotID ++ * ++ * @param S3C_slotID ++ * @return 0 on success, -ESRCH if the slot does not host any capsule + */ -+static void shutdown_capsule(unsigned int ME_slotID) ++static int shutdown_capsule(unsigned int S3C_slotID) +{ + avz_hyp_t args; + -+ /* Asynchronous termination of the capsule */ -+ if (get_ME_state(ME_slotID) != ME_state_stopped) -+ do_sync_dom(ME_slotID, DC_SHUTDOWN); ++ /* Nothing to do if the slot does not host any capsule; a DC event ++ * sent to an empty slot has no possible recipient. ++ */ ++ ++ if (get_S3C_state(S3C_slotID) == S3C_state_dead) { ++ lprintk("%s: no capsule in slot %d, nothing to shut down.\n", __func__, S3C_slotID); ++ return -ESRCH; ++ } ++ ++ /* Asynchronous termination of the capsule. A crashed capsule (killed ++ * by AVZ after a fault) cannot answer the DC_SHUTDOWN handshake ++ * anymore: it is reaped directly. ++ */ ++ ++ if ((get_S3C_state(S3C_slotID) != S3C_state_stopped) && (get_S3C_state(S3C_slotID) != S3C_state_killed)) ++ do_sync_dom(S3C_slotID, DC_SHUTDOWN); + -+ /* Then, final termination of the residual ME */ -+ if ((get_ME_state(ME_slotID) == ME_state_terminated) || -+ (get_ME_state(ME_slotID) == ME_state_stopped)) { -+ args.cmd = AVZ_KILL_ME; -+ args.u.avz_kill_me_args.slotID = ME_slotID; ++ /* Then, final termination of the residual S3C */ ++ if ((get_S3C_state(S3C_slotID) == S3C_state_terminated) || ++ (get_S3C_state(S3C_slotID) == S3C_state_stopped) || ++ (get_S3C_state(S3C_slotID) == S3C_state_killed)) { ++ args.cmd = AVZ_KILL_S3C; ++ args.u.avz_kill_me_args.slotID = S3C_slotID; + + avz_hypercall(&args); + } ++ ++ return 0; +} + +static int agency_open(struct inode *inode, struct file *file) @@ -95,8 +112,8 @@ + } + + switch (cmd) { -+ case AGENCY_IOCTL_GET_ME_ID: -+ args.value = (get_ME_id(args.slotID, (ME_id_t *)args.buffer) ? 0 : -1); ++ case AGENCY_IOCTL_GET_S3C_ID: ++ args.value = (get_S3C_id(args.slotID, (S3C_id_t *)args.buffer) ? 0 : -1); + break; + + case AGENCY_IOCTL_READ_SNAPSHOT: @@ -116,11 +133,11 @@ + break; + + case AGENCY_IOCTL_SHUTDOWN: -+ shutdown_capsule(args.slotID); ++ args.value = shutdown_capsule(args.slotID); + break; + -+ case AGENCY_IOCTL_GET_ME_ID_ARRAY: -+ get_ME_id_array((ME_id_t *)args.buffer); ++ case AGENCY_IOCTL_GET_S3C_ID_ARRAY: ++ get_S3C_id_array((S3C_id_t *)args.buffer); + break; + + default: @@ -217,21 +234,21 @@ + void *unused) +{ + int slotID; -+ ME_desc_t desc; ++ S3C_desc_t desc; + -+ lprintk("%s: !! Now terminating all Mobile Entities of this smart object...\n", ++ lprintk("%s: !! Now terminating all SO3 capsules of this smart object...\n", + __func__); + + for (slotID = 2; slotID < MAX_DOMAINS; slotID++) { + /* -+ * Check if the ME slot is used or not in order to not ++ * Check if the S3C slot is used or not in order to not + call shutdown on an empty slot, which would cause an error. + */ + -+ get_ME_desc(slotID, &desc); ++ get_S3C_desc(slotID, &desc); + + if (desc.size > 0) { -+ lprintk("%s: terminating ME %d...\n", __func__, slotID); ++ lprintk("%s: terminating S3C %d...\n", __func__, slotID); + shutdown_capsule(slotID); + } + } @@ -257,7 +274,7 @@ +{ + int rc; + -+ DBG("SOO Migration subsystem registering...\n"); ++ DBG("SOO capsule subsystem registering...\n"); + + soo_sysfs_init(); + @@ -283,7 +300,7 @@ + + capsule_init(); + -+ DBG("SOO Migration subsystem registered...\n"); ++ DBG("SOO capsule subsystem registered...\n"); + + register_reboot_notifier(&agency_reboot_nb); + diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0078-debug.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0078-debug.c.patch similarity index 96% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0078-debug.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0078-debug.c.patch index ce99a8c..e8526b1 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0078-debug.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0078-debug.c.patch @@ -2,7 +2,7 @@ +++ ./soo/kernel/debug/debug.c 2025-08-29 08:46:41.394757773 +0200 @@ -0,0 +1,47 @@ +/* -+ * Copyright (C) 2022 Daniel Rossier ++ * Copyright (C) 2022 Daniel Rossier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0079-Kconfig.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0079-Kconfig.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0079-Kconfig.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0079-Kconfig.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0080-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0080-Makefile.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0080-Makefile.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0080-Makefile.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0081-meminfo.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0081-meminfo.c.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0081-meminfo.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0081-meminfo.c.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0082-evtchn.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0082-evtchn.c.patch similarity index 74% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0082-evtchn.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0082-evtchn.c.patch index 14ba5ed..22d0ed1 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0082-evtchn.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0082-evtchn.c.patch @@ -1,6 +1,6 @@ --- /home/rossierd/soo/git/micofe/build/tmp/work/linux-6.12-r0/linux-6.12/soo/kernel/evtchn.c 1970-01-01 01:00:00.000000000 +0100 +++ ./soo/kernel/evtchn.c 2025-08-29 08:46:41.394868986 +0200 -@@ -0,0 +1,413 @@ +@@ -0,0 +1,434 @@ + +/* + * Copyright (C) 2014-2016 Daniel Rossier @@ -57,27 +57,31 @@ +/* + * This lock protects updates to the following mapping and reference-count + * arrays. The lock does not need to be acquired to read the mapping tables. -+ * -+ * All evtchn-indexed arrays are GLOBAL (not per-CPU): an evtchn binding is a -+ * system-wide property. The original per-CPU design caused SMP races where -+ * virq_handle() on CPU Y would not find evtchns bound on CPU X, silently -+ * dropping all ME→Linux event channel notifications. + */ +static DEFINE_SPINLOCK(virq_mapping_update_lock); + -+static int evtchn_to_virq[NR_EVTCHN]; /* evtchn -> virq (global) */ -+static u32 virq_to_evtchn[NR_VIRQS]; /* virq -> evtchn (global) */ -+static bool evtchn_valid[NR_EVTCHN]; /* evtchn in use (global) */ -+static bool evtchn_masked[NR_EVTCHN]; /* evtchn masked (global) */ -+static int virq_bindcount[NR_VIRQS]; /* reference counts (global) */ -+ -+inline unsigned int evtchn_from_virq_and_cpu(unsigned int virq, unsigned int cpu) { -+ return virq_to_evtchn[virq]; -+} ++typedef struct { ++ int evtchn_to_virq[NR_EVTCHN]; /* evtchn -> IRQ */ ++ u32 virq_to_evtchn[NR_VIRQS]; /* IRQ -> evtchn */ ++ bool valid[NR_EVTCHN]; /* Indicate if the event channel can be used for notification for example */ ++ bool evtchn_mask[NR_EVTCHN]; ++ int virq_bindcount[NR_VIRQS]; ++} evtchn_info_t; ++ ++/* The evtchn <-> VIRQ mapping is global, NOT per-CPU: the Linux IRQ space ++ * (request_irq) is system-wide and AVZ delivers a domain's upcalls on the ++ * boot CPU only (d->processor). A per-CPU table — the historical layout, ++ * harmless as long as every agency was UP de facto — breaks under the SMP ++ * agency: a binding performed on CPU1/2 was invisible to the upcall path ++ * on CPU0, and find_unbound_virq() scanning only the calling CPU's ++ * bindcounts handed out the same VIRQ twice (genirq "Flags mismatch" ++ * panic in vbus_init when the init task migrated between two bindings). ++ */ ++static evtchn_info_t evtchn_info; + +inline unsigned int evtchn_from_virq(int virq) +{ -+ return virq_to_evtchn[virq]; ++ return evtchn_info.virq_to_evtchn[virq]; +} + +inline unsigned int evtchn_from_irq_data(struct irq_data *irq_data) @@ -89,17 +93,17 @@ +#define __evtchn_from_virq evtchn_from_irq_data + +static inline bool evtchn_is_masked(unsigned int b) { -+ return evtchn_masked[b]; ++ return evtchn_info.evtchn_mask[b]; +} + +#if 0 /* debug */ +static void dump_evtchn_pending(void) { + int i; + -+ lprintk(" Evtchn info in Agency\n\n"); ++ lprintk(" Evtchn info in Agency CPU %d\n\n", smp_processor_id()); + + for (i = 0; i < NR_EVTCHN; i++) -+ lprintk("e:%d m:%d p:%d ", i, evtchn_masked[i], ++ lprintk("e:%d m:%d p:%d ", i, evtchn_info.evtchn_mask[i], + avz_shared->evtchn_pending[i]); + + lprintk("\n\n"); @@ -140,17 +144,17 @@ + if (evtchn == NR_EVTCHN) + break; + -+ BUG_ON(!evtchn_valid[evtchn]); ++ BUG_ON(!evtchn_info.valid[evtchn]); + + loopmax++; + + if (loopmax > 500) /* Probably something wrong ;-) */ + lprintk("%s: Warning trying to process evtchn: %d IRQ: %d for quite a long time on CPU %d / masked: %d...\n", -+ __func__, evtchn, evtchn_to_virq[evtchn], smp_processor_id(), evtchn_is_masked(evtchn)); ++ __func__, evtchn, evtchn_info.evtchn_to_virq[evtchn], smp_processor_id(), evtchn_is_masked(evtchn)); + -+ virq = evtchn_to_virq[evtchn]; ++ virq = evtchn_info.evtchn_to_virq[evtchn]; + -+ clear_evtchn(evtchn); ++ clear_evtchn(evtchn_from_virq(virq)); + + generic_handle_irq(VIRQ_BASE + virq); + @@ -162,13 +166,12 @@ + +} + -+static int find_unbound_virq(int cpu) ++static int find_unbound_virq(void) +{ + int virq; + -+ /* virq_bindcount is now global; simple scan suffices */ + for (virq = 0; virq < NR_VIRQS; virq++) -+ if (virq_bindcount[virq] == 0) ++ if (evtchn_info.virq_bindcount[virq] == 0) + break; + + if (virq == NR_VIRQS) @@ -180,18 +183,18 @@ +static int bind_evtchn_to_virq(unsigned int evtchn) +{ + int virq; -+ int cpu = smp_processor_id(); + + spin_lock(&virq_mapping_update_lock); + -+ if ((virq = evtchn_to_virq[evtchn]) == -1) { -+ virq = find_unbound_virq(cpu); -+ evtchn_to_virq[evtchn] = virq; -+ virq_to_evtchn[virq] = evtchn; -+ evtchn_valid[evtchn] = true; ++ if ((virq = evtchn_info.evtchn_to_virq[evtchn]) == -1) { ++ virq = find_unbound_virq(); ++ evtchn_info.evtchn_to_virq[evtchn] = virq; ++ evtchn_info.virq_to_evtchn[virq] = evtchn; ++ evtchn_info.valid[evtchn] = true; ++ + } + -+ virq_bindcount[virq]++; ++ evtchn_info.virq_bindcount[virq]++; + + spin_unlock(&virq_mapping_update_lock); + @@ -210,7 +213,7 @@ + + avz_hypercall(&args); + -+ evtchn_valid[evtchn] = false; ++ evtchn_info.valid[evtchn] = false; +} + +static int bind_interdomain_evtchn_to_virq(unsigned int remote_domain, unsigned int remote_evtchn) @@ -253,11 +256,11 @@ +static void unbind_from_virq(unsigned int virq) +{ + avz_hyp_t args; -+ int evtchn = virq_to_evtchn[virq]; ++ int evtchn = evtchn_from_virq(virq); + + spin_lock(&virq_mapping_update_lock); + -+ if (--virq_bindcount[virq] == 0) { ++ if (--evtchn_info.virq_bindcount[virq] == 0) { + + args.cmd = AVZ_EVENT_CHANNEL_OP; + args.u.avz_evtchn.evtchn_op.cmd = EVTCHNOP_close; @@ -266,8 +269,8 @@ + + avz_hypercall(&args); + -+ evtchn_to_virq[evtchn] = -1; -+ evtchn_valid[evtchn] = false; ++ evtchn_info.evtchn_to_virq[evtchn] = -1; ++ evtchn_info.valid[evtchn] = false; + } + + spin_unlock(&virq_mapping_update_lock); @@ -352,6 +355,22 @@ + mask_evtchn(evtchn); +} + ++/* ++ * AVZ always delivers this domain's evtchn upcalls on its boot CPU ++ * (agency: d->processor = AGENCY_CPU = 0). Without an irq_set_affinity op, ++ * irq_do_set_affinity() returns -EINVAL under SMP: the VIRQ irqdesc keeps no ++ * valid affinity and the threaded-IRQ kthread ends up with no runnable CPU, ++ * so IRQ_WAKE_THREAD never runs the bottom half (e.g. the directcomm/vbus ++ * dev-probe handshake stalls the capsule injection). Accept the mask so ++ * genirq records it and the kthread gets a schedulable CPU. ++ */ ++ ++static int set_affinity_virtirq(struct irq_data *data, const struct cpumask *dest, bool force) ++{ ++ irq_data_update_effective_affinity(data, cpumask_of(0)); ++ return IRQ_SET_MASK_OK; ++} ++ +static struct irq_chip virtirq_chip = { + .name = "avz_virt-irq", + .irq_startup = startup_virtirq, @@ -360,23 +379,25 @@ + .irq_disable = disable_virtirq, + .irq_unmask = enable_virtirq, + .irq_mask = disable_virtirq, ++ .irq_set_affinity = set_affinity_virtirq, +}; + + +void notify_remote_via_virq(int virq) +{ -+ /* virq_to_evtchn is now a global array — direct lookup */ -+ notify_remote_via_evtchn(virq_to_evtchn[virq]); ++ int evtchn = evtchn_from_virq(virq); ++ ++ notify_remote_via_evtchn(evtchn); +} + +void mask_evtchn(int evtchn) +{ -+ evtchn_masked[evtchn] = true; ++ evtchn_info.evtchn_mask[evtchn] = true; +} + +void unmask_evtchn(int evtchn) +{ -+ evtchn_masked[evtchn] = false; ++ evtchn_info.evtchn_mask[evtchn] = false; +} + +void virq_init(void) @@ -384,21 +405,21 @@ + struct irq_desc *irqdesc; /* Linux IRQ descriptor */ + int i; + -+ /* Initialize global evtchn state */ ++ /* No event-channel -> IRQ mappings. */ + for (i = 0; i < NR_EVTCHN; i++) { -+ evtchn_to_virq[i] = -1; -+ evtchn_valid[i] = false; -+ evtchn_masked[i] = true; /* all masked until explicitly unmasked */ ++ evtchn_info.evtchn_to_virq[i] = -1; ++ evtchn_info.valid[i] = false; ++ ++ evtchn_info.evtchn_mask[i] = true; + } + +#ifdef CONFIG_SPARSE_IRQ + irq_alloc_descs(VIRQ_BASE, VIRQ_BASE, NR_VIRQS, numa_node_id()); +#endif + -+ for (i = 0; i < NR_VIRQS; i++) { -+ virq_to_evtchn[i] = 0; -+ virq_bindcount[i] = 0; -+ } ++ /* Dynamic IRQ space is currently unbound. Zero the refcnts. */ ++ for (i = 0; i < NR_VIRQS; i++) ++ evtchn_info.virq_bindcount[i] = 0; + + /* Configure the irqdesc associated to VIRQs */ + for (i = 0; i < NR_VIRQS; i++) { @@ -414,4 +435,3 @@ + irq_set_handler(VIRQ_BASE + i, handle_level_irq); + } +} - diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0083-gnttab.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0083-gnttab.c.patch similarity index 97% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0083-gnttab.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0083-gnttab.c.patch index a8c919b..233239b 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0083-gnttab.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0083-gnttab.c.patch @@ -2,7 +2,7 @@ +++ ./soo/kernel/gnttab.c 2025-08-29 08:46:41.394805040 +0200 @@ -0,0 +1,88 @@ +/* -+ * Copyright (C) 2016-2019 Daniel Rossier ++ * Copyright (C) 2016-2019 Daniel Rossier + * Copyright (C) 2018 Baptiste Delporte + * + * This program is free software; you can redistribute it and/or modify diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0084-hypervisor.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0084-hypervisor.c.patch similarity index 97% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0084-hypervisor.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0084-hypervisor.c.patch index 536e031..d4d9649 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0084-hypervisor.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0084-hypervisor.c.patch @@ -2,7 +2,7 @@ +++ ./soo/kernel/hypervisor.c 2025-08-30 15:04:15.207689288 +0200 @@ -0,0 +1,108 @@ +/* -+ * Copyright (C) 2016-2019 Daniel Rossier ++ * Copyright (C) 2016-2019 Daniel Rossier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0085-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0085-Makefile.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0085-Makefile.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0085-Makefile.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0086-setup.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0086-setup.c.patch similarity index 94% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0086-setup.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0086-setup.c.patch index 8b4e7f3..5e1d6f1 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0086-setup.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0086-setup.c.patch @@ -2,7 +2,7 @@ +++ ./soo/kernel/setup.c 2025-08-29 08:46:41.394853981 +0200 @@ -0,0 +1,30 @@ +/* -+ * Copyright (C) 2014-2021 Daniel Rossier ++ * Copyright (C) 2014-2021 Daniel Rossier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0087-soo_guest_activity.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0087-soo_guest_activity.c.patch similarity index 90% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0087-soo_guest_activity.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0087-soo_guest_activity.c.patch index 500f0f1..beefdab 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0087-soo_guest_activity.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0087-soo_guest_activity.c.patch @@ -1,8 +1,8 @@ --- /home/rossierd/soo/git/micofe/build/tmp/work/linux-6.12-r0/linux-6.12/soo/kernel/soo_guest_activity.c 1970-01-01 01:00:00.000000000 +0100 +++ ./soo/kernel/soo_guest_activity.c 2025-08-29 08:46:41.394793300 +0200 -@@ -0,0 +1,191 @@ +@@ -0,0 +1,201 @@ +/* -+ * Copyright (C) 2016-2019 Daniel Rossier ++ * Copyright (C) 2016-2019 Daniel Rossier + * Copyright (C) 2018-2019 Baptiste Delporte + * + * This program is free software; you can redistribute it and/or modify @@ -74,13 +74,13 @@ +} + +/* -+ * Prepare a remote ME to react to a ping event. -+ * @domID: the target ME ++ * Prepare a remote S3C to react to a ping event. ++ * @domID: the target S3C + */ -+void set_dc_event(domid_t domID, dc_event_t dc_event) ++int set_dc_event(domid_t domID, dc_event_t dc_event) +{ + avz_hyp_t args; -+ ++ + DBG("%s(%d, %d)\n", __func__, domID, dc_event); + + args.cmd = AVZ_DC_EVENT_SET; @@ -93,6 +93,8 @@ + schedule(); + avz_hypercall(&args); + } ++ ++ return args.u.avz_dc_event_args.state; +} + +/* @@ -114,7 +116,15 @@ + + /* Configure the dc event on the target domain */ + -+ set_dc_event(domID, dc_event); ++ if (set_dc_event(domID, dc_event)) { ++ /* The target domain has vanished in the meantime; there is ++ * nobody to synchronize with anymore. ++ */ ++ ++ lprintk("%s: domain %d has vanished, skipping dc_event %d.\n", __func__, domID, dc_event); ++ atomic_set(&dc_outgoing_domID[dc_event], -1); ++ return; ++ } + + DBG("%s: notifying via evtchn %d...\n", __func__, avz_shared->dom_desc.u.agency.dc_evtchn[domID]); + notify_remote_via_evtchn(avz_shared->dom_desc.u.agency.dc_evtchn[domID]); diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0088-sysfs.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0088-sysfs.c.patch similarity index 98% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0088-sysfs.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0088-sysfs.c.patch index 24d4e4f..0f605e8 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0088-sysfs.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0088-sysfs.c.patch @@ -3,7 +3,7 @@ @@ -0,0 +1,193 @@ + +/* -+ * Copyright (C) 2020 Daniel Rossier ++ * Copyright (C) 2020 Daniel Rossier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0089-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0089-Makefile.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0089-Makefile.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0089-Makefile.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0090-vbstorage.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0090-vbstorage.c.patch similarity index 95% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0090-vbstorage.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0090-vbstorage.c.patch index 29703a4..d49e2af 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0090-vbstorage.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0090-vbstorage.c.patch @@ -1,8 +1,8 @@ --- /home/rossierd/soo/git/micofe/build/tmp/work/linux-6.12-r0/linux-6.12/soo/kernel/vbstore/vbstorage.c 1970-01-01 01:00:00.000000000 +0100 +++ ./soo/kernel/vbstore/vbstorage.c 2025-08-29 08:46:41.395120704 +0200 -@@ -0,0 +1,528 @@ +@@ -0,0 +1,520 @@ +/* -+ * Copyright (C) 2016-2019 Daniel Rossier ++ * Copyright (C) 2016-2019 Daniel Rossier + * Copyright (C) 2018 Baptiste Delporte + * + * This program is free software; you can redistribute it and/or modify @@ -428,7 +428,7 @@ + vbs_store_mkdir("/backend"); + vbs_store_mkdir("/device"); + -+#warning the following entries (domain + directcomm) need to be revisited (see soo/me entries) ++#warning the following entries (domain + directcomm) need to be revisited (see soo/s3c entries) + + vbs_store_mkdir("/domain"); + vbs_store_mkdir("/domain/gnttab"); @@ -440,7 +440,7 @@ + vbs_store_mkdir("/domain/gnttab/5"); + vbs_store_mkdir("/domain/gnttab/6"); + -+ /* Target ME directcomm event channel */ ++ /* Target S3C directcomm event channel */ + vbs_store_mkdir("/soo"); + vbs_store_mkdir("/soo/directcomm"); + vbs_store_mkdir("/soo/directcomm/0"); @@ -451,8 +451,8 @@ + vbs_store_mkdir("/soo/directcomm/5"); + vbs_store_mkdir("/soo/directcomm/6"); + -+ /* Prepare the entries for ME ID information */ -+ vbs_store_mkdir("/soo/me"); ++ /* Prepare the entries for S3C ID information */ ++ vbs_store_mkdir("/soo/s3c"); + + /* Agency backend side of virtual LED device */ + np = of_find_compatible_node(NULL, NULL, "vleds,backend"); @@ -518,14 +518,6 @@ + np = of_find_compatible_node(NULL, NULL, "vlogs,backend"); + if (of_device_is_available(np)) + vbs_store_mkdir("/backend/vlogs"); -+ -+ /* Agency backend side of virtual vfbdev device */ -+ np = of_find_compatible_node(NULL, NULL, "vfbdev,backend"); -+ if (of_device_is_available(np)) + vbs_store_mkdir("/backend/vfbdev"); -+ -+ /* Agency backend side of virtual vinput device */ -+ np = of_find_compatible_node(NULL, NULL, "vinput,backend"); -+ if (of_device_is_available(np)) + vbs_store_mkdir("/backend/vinput"); +} diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0091-vbstore.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0091-vbstore.c.patch similarity index 98% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0091-vbstore.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0091-vbstore.c.patch index b80de25..c751b94 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0091-vbstore.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0091-vbstore.c.patch @@ -2,7 +2,7 @@ +++ ./soo/kernel/vbstore/vbstore.c 2025-08-29 08:46:41.395147867 +0200 @@ -0,0 +1,475 @@ +/* -+ * Copyright (C) 2016-2019 Daniel Rossier ++ * Copyright (C) 2016-2019 Daniel Rossier + * Copyright (C) 2018 Baptiste Delporte + * + * This program is free software; you can redistribute it and/or modify @@ -446,7 +446,7 @@ + DBG("%s: allocating unbound evtchn %d for vbstore shared page on domain: %d (intf = %lx)...\n", __func__, + args.u.avz_evtchn.evtchn_op.u.alloc_unbound.evtchn, i, vbstore_intf[i]); + -+ /* This evtchn will be the remote for all clients, including the agency itself and the ME (using their levtchn). */ ++ /* This evtchn will be the remote for all clients, including the agency itself and the S3C (using their levtchn). */ + avz_shared->dom_desc.u.agency.vbstore_evtchn[i] = args.u.avz_evtchn.evtchn_op.u.alloc_unbound.evtchn; + } + @@ -456,7 +456,7 @@ + /* Bind the vbstore listening event channels */ + for (i = 0; i < MAX_DOMAINS; i++) { + -+ /* Bind IRQ used as event channel to discuss with the ME to the vbstore interrupt handler */ ++ /* Bind IRQ used as event channel to discuss with the S3C to the vbstore interrupt handler */ + DBG("%s: binding evtchn %d to vbstore_interrupt handler..\n", __func__, avz_shared->dom_desc.u.agency.vbstore_evtchn[i]); + + res = bind_evtchn_to_virq_handler(avz_shared->dom_desc.u.agency.vbstore_evtchn[i], diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0092-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0092-Makefile.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0092-Makefile.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0092-Makefile.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0093-vbus_backend.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0093-vbus_backend.c.patch similarity index 95% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0093-vbus_backend.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0093-vbus_backend.c.patch index 5bbab32..06a77a0 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0093-vbus_backend.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0093-vbus_backend.c.patch @@ -2,7 +2,7 @@ +++ ./soo/kernel/vbus/vbus_backend.c 2025-08-29 08:46:41.395033838 +0200 @@ -0,0 +1,314 @@ +/* -+ * Copyright (C) 2016-2019 Daniel Rossier ++ * Copyright (C) 2016-2019 Daniel Rossier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as @@ -150,7 +150,7 @@ + kfree(dir); + + /* Keep the synchronization with the injector */ -+ if (get_ME_state(domid) == ME_state_stopped) ++ if (get_S3C_state(domid) == S3C_state_stopped) + complete(&backend_initialized); + + return err; @@ -285,7 +285,7 @@ +/* + * vbus_suspend_devices + * -+ * Inform all vbus devices that we are preparing to migrate (or some other scenarios requiring ++ * Inform all vbus devices that we are preparing to suspend (or some other scenarios requiring + * temporary suspension of their activities) + * + */ @@ -297,7 +297,7 @@ +/* + * vbus_resume_devices + * -+ * Inform all vbus devices that we are preparing to migrate (or some other scenarios requiring ++ * Inform all vbus devices that we are preparing to suspend (or some other scenarios requiring + * temporary suspension of their activities) + * + */ @@ -308,9 +308,9 @@ + + +/* This function is called from vs_prepare_to_resume() in vbus/vbus_xs.c -+ * after the FSM thread activities in order to setup post-migration vbus and frontend drivers. ++ * after the FSM thread activities in order to setup post-resume vbus and frontend drivers. + */ -+void postmig_setup(void) { ++void postresume_setup(void) { + + /* Nothing at the moment */ + diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0094-vbus.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0094-vbus.c.patch similarity index 95% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0094-vbus.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0094-vbus.c.patch index f4df9f2..c91c6ab 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0094-vbus.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0094-vbus.c.patch @@ -195,7 +195,7 @@ + +/* + * The following function is called either in the backend OR the frontend. -+ * On the backend side, it may run on CPU #0 (non-RT) or CPU #1 if the backend is configured as realtime. ++ * On the backend side, it runs on the agency CPU. + */ +void vbus_otherend_changed(struct vbus_watch *watch) { + struct vbus_device *vdev = container_of(watch, struct vbus_device, otherend_watch); @@ -246,9 +246,9 @@ + if (vdev->resuming) { + + /* -+ * It happens after migration & resume ++ * It happens after resume + * -+ * If we have migrated, we are already in connected state; ++ * If we have resumed, we are already in connected state; + * we have been put in this state during the reconfiguring process. + * + */ @@ -302,12 +302,12 @@ + + vdrv->probe(vdev); + -+ /* Get the state from the otherend to see if we are in a post-migration situation. */ ++ /* Get the state from the otherend to see if we are in a post-resume situation. */ + otherend_state = vbus_read_driver_state(vdev->otherend); + -+ /* If the node is probed after a migration, it means that the frontend will be reconfigured. ++ /* If the node is probed after a resume, it means that the frontend will be reconfigured. + * In this case, the resuming operation can go ahead. -+ * If the ME is not migrated (injected), the node is created and the synchronization will be ++ * If the S3C is freshly injected, the node is created and the synchronization will be + * achieved once the device gets connected. + */ + if (otherend_state == VbusStateInitialising) { @@ -317,7 +317,7 @@ + */ + vbus_switch_state(vdev, VbusStateInitWait); + -+ /* For both RT and non-RT initialization, we wait that the device gets connected */ ++ /* We wait until the device gets connected */ + wait_for_completion(&vdev->sync_backfront); + } + @@ -334,7 +334,7 @@ + DBG("%s", vdev->nodename); + + /* -+ * If the ME is running on a Smart Object which does not offer all the backends matching the ME's frontends, ++ * If the S3C is running on a Smart Object which does not offer all the backends matching the S3C's frontends, + * some frontend related entries may not have been created. We must check here if the entry matching the dev + * to remove exists. + */ @@ -359,7 +359,7 @@ +/* + * Shutdown a device. This function can be called externally, but *not* by the Linux subsystem + * during a reboot operation for instance (because of IRQs off). In this case, force_terminate DC events -+ * will be sent to each running ME during the reboot process. ++ * will be sent to each running S3C during the reboot process. + */ +void vbus_dev_shutdown(struct device *dev) +{ @@ -371,7 +371,7 @@ + dir_exists = vbus_directory_exists(VBT_NIL, vdev->otherend_watch.node, ""); + + /* -+ * If the ME is running on a Smart Object which does not offer all the backends matching the ME's frontends, ++ * If the S3C is running on a Smart Object which does not offer all the backends matching the S3C's frontends, + * some frontend related entries may not have been created. We must check here if the entry matching the dev + * to shutdown exists. + */ @@ -512,7 +512,7 @@ + +/* + * Create a new node and initialize basic structure (vdev). -+ * This function is NOT re-entrant and must be executed in the specific context during injection or post-migration sequence. ++ * This function is NOT re-entrant and must be executed in the specific context during injection or post-resume sequence. + */ +static int vbus_probe_node(struct vbus_type *bus, const char *type, const char *nodename) +{ @@ -568,7 +568,7 @@ + +/******************/ + -+/* Suspend devices which eventually match with a certain root name (specific ME) */ ++/* Suspend devices which eventually match with a certain root name (specific S3C) */ +static int suspend_dev(struct device *dev, void *data) +{ + const struct vbus_driver *vdrv; @@ -668,7 +668,7 @@ + vdev->resuming = 1; + + if (vdev->state != VbusStateSuspended) -+ /* we are in StateInitWait because newly create vbstore entries after migration */ ++ /* we are in StateInitWait because newly create vbstore entries after resume */ + vbus_switch_state(vdev, VbusStateReconfiguring); + else { + DBG("Changing state of %s to resuming\n", vdev->nodename); @@ -813,8 +813,8 @@ + + /* + * Set up the directcomm communication channel that -+ * is used between the different domains, mainly between the agency and MEs, -+ * or the non-realtime and realtime agency. ++ * is used between the different domains, mainly between the agency and the ++ * MEs (capsules). + */ + + for (i = 1; i < MAX_DOMAINS; i++) { @@ -848,9 +848,9 @@ + BUG(); + } + -+ /* Finally, we put the directcomm event channel in vbstore (intended to ME usage) */ ++ /* Finally, we put the directcomm event channel in vbstore (intended to S3C usage) */ + /* Save it in vbstore */ -+ DBG("%s: writing initial vbstore entries for directcomm activities for ME %d ...\n", __func__, i); ++ DBG("%s: writing initial vbstore entries for directcomm activities for S3C %d ...\n", __func__, i); + + vbus_transaction_start(&vbt); + @@ -859,7 +859,7 @@ + + vbus_transaction_end(vbt); + -+ DBG("%s: direct communication set up between Agency and ME %d with event channel: %d irq: %d\n", __func__, i, ++ DBG("%s: direct communication set up between Agency and S3C %d with event channel: %d irq: %d\n", __func__, i, + avz_shared->dom_desc.u.agency.dc_evtchn[i], evtchn); + } + diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0095-vbus_client.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0095-vbus_client.c.patch similarity index 98% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0095-vbus_client.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0095-vbus_client.c.patch index 82a8e23..c0afc8b 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0095-vbus_client.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0095-vbus_client.c.patch @@ -2,7 +2,7 @@ +++ ./soo/kernel/vbus/vbus_client.c 2025-08-29 08:46:41.395021714 +0200 @@ -0,0 +1,189 @@ +/* -+ * Copyright (C) 2016-2019 Daniel Rossier ++ * Copyright (C) 2016-2019 Daniel Rossier + * Copyright (C) 2018 Baptiste Delporte + * + * This program is free software; you can redistribute it and/or modify diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0096-vbus_vbstore.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0096-vbus_vbstore.c.patch similarity index 97% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0096-vbus_vbstore.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0096-vbus_vbstore.c.patch index 89b5674..24764b7 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0096-vbus_vbstore.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0096-vbus_vbstore.c.patch @@ -2,7 +2,7 @@ +++ ./soo/kernel/vbus/vbus_vbstore.c 2025-08-29 08:46:41.394977570 +0200 @@ -0,0 +1,974 @@ +/* -+ * Copyright (C) 2016-2019 Daniel Rossier ++ * Copyright (C) 2016-2019 Daniel Rossier + * Copyright (C) 2018 Baptiste Delporte + * + * This program is free software; you can redistribute it and/or modify @@ -78,7 +78,7 @@ + + struct completion watch_wait; + -+ /* To manage ongoing transactions when the ME must be suspended */ ++ /* To manage ongoing transactions when the S3C must be suspended */ + struct mutex transaction_group_mutex; + + /* Protect watch (de)register against save/restore. */ @@ -748,18 +748,12 @@ +{ + struct vbus_watch *__w; + bool found; -+ int ret; + + BUG_ON(smp_processor_id() != AGENCY_CPU); + + for (;;) { + -+ /* Use interruptible version to avoid blocked task message every 120 seconds */ -+ ret = wait_for_completion_interruptible(&vbs_state.watch_wait); -+ if (ret == -ERESTARTSYS) { -+ pr_warn("%s wait_for_completion has been interrupted, ignoring\n", __func__); -+ continue; -+ } ++ wait_for_completion(&vbs_state.watch_wait); + + /* Avoiding to be suspended during SOO callback processing... */ + mutex_lock(&vbs_state.watch_mutex); @@ -929,7 +923,7 @@ + int vbus_irq; + + /* -+ * Bind evtchn for interdomain communication: must be executed from the agency or from a ME. ++ * Bind evtchn for interdomain communication: must be executed from the agency or from a S3C. + */ + + /* dev temporary used to set up event channel used by vbstore. */ @@ -963,10 +957,16 @@ + BUG(); + } + -+ task = kthread_run(vbus_watch_thread, NULL, "vbswatch"); ++ /* The watch thread MUST run on the agency CPU (see the BUG_ON in ++ * vbus_watch_thread): the vbstore evtchn upcalls are delivered there. ++ * kthread_run would let the SMP scheduler place it on any CPU. */ ++ task = kthread_create(vbus_watch_thread, NULL, "vbswatch"); + if (IS_ERR(task)) + return PTR_ERR(task); + ++ kthread_bind(task, AGENCY_CPU); ++ wake_up_process(task); ++ + param.sched_priority = 60; + + sched_setscheduler_nocheck(task, SCHED_FIFO, ¶m); diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0097-ctype.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0097-ctype.c.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0097-ctype.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0097-ctype.c.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0098-config.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0098-config.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0098-config.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0098-config.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0099-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0099-Makefile.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0099-Makefile.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0099-Makefile.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0100-roxml_buff.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0100-roxml_buff.c.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0100-roxml_buff.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0100-roxml_buff.c.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0101-roxml_buff.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0101-roxml_buff.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0101-roxml_buff.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0101-roxml_buff.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0102-roxml_commit.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0102-roxml_commit.c.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0102-roxml_commit.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0102-roxml_commit.c.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0103-roxml_content.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0103-roxml_content.c.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0103-roxml_content.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0103-roxml_content.c.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0104-roxml_core.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0104-roxml_core.c.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0104-roxml_core.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0104-roxml_core.c.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0105-roxml_core.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0105-roxml_core.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0105-roxml_core.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0105-roxml_core.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0106-roxml_defines.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0106-roxml_defines.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0106-roxml_defines.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0106-roxml_defines.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0107-roxml_edit.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0107-roxml_edit.c.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0107-roxml_edit.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0107-roxml_edit.c.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0108-roxml_file.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0108-roxml_file.c.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0108-roxml_file.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0108-roxml_file.c.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0109-roxml_file.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0109-roxml_file.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0109-roxml_file.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0109-roxml_file.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0110-roxml_internal.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0110-roxml_internal.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0110-roxml_internal.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0110-roxml_internal.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0111-roxml_mem.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0111-roxml_mem.c.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0111-roxml_mem.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0111-roxml_mem.c.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0112-roxml_mem.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0112-roxml_mem.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0112-roxml_mem.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0112-roxml_mem.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0113-roxml_nav.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0113-roxml_nav.c.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0113-roxml_nav.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0113-roxml_nav.c.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0114-roxml_parser.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0114-roxml_parser.c.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0114-roxml_parser.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0114-roxml_parser.c.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0115-roxml_parser.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0115-roxml_parser.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0115-roxml_parser.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0115-roxml_parser.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0116-roxml_tune.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0116-roxml_tune.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0116-roxml_tune.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0116-roxml_tune.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0117-roxml_types.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0117-roxml_types.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0117-roxml_types.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0117-roxml_types.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0118-roxml_utils.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0118-roxml_utils.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0118-roxml_utils.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0118-roxml_utils.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0119-roxml_win32_native.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0119-roxml_win32_native.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0119-roxml_win32_native.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0119-roxml_win32_native.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0120-roxml_xpath.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0120-roxml_xpath.c.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0120-roxml_xpath.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0120-roxml_xpath.c.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0121-roxml_xpath.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0121-roxml_xpath.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0121-roxml_xpath.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0121-roxml_xpath.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0122-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0122-Makefile.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0122-Makefile.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0122-Makefile.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0123-strtod.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0123-strtod.c.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0123-strtod.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0123-strtod.c.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0124-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0124-Makefile.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0124-Makefile.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0124-Makefile.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0125-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0125-Makefile.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0125-Makefile.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0125-Makefile.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0126-vlogs.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0126-vlogs.c.patch similarity index 99% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0126-vlogs.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0126-vlogs.c.patch index 96e8978..3deda2f 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0126-vlogs.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0126-vlogs.c.patch @@ -147,7 +147,7 @@ + DBG(VLOGS_PREFIX "Backend reconfigured: %d\n", vdev->otherend_id); + + /* -+ * Set up a ring (shared page & event channel) between the agency and the ME. ++ * Set up a ring (shared page & event channel) between the agency and the S3C. + */ + + vbus_gather(VBT_NIL, vdev->otherend, "ring-ref", "%lu", diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0127-vlogs.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0127-vlogs.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0127-vlogs.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0127-vlogs.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0129-vfbdev.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0128-vfbdev.c.patch similarity index 99% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0129-vfbdev.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0128-vfbdev.c.patch index 75c8c9a..075270c 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0129-vfbdev.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0128-vfbdev.c.patch @@ -305,7 +305,7 @@ + DBG(VFBDEV_PREFIX "Backend reconfigured: %d\n", vdev->otherend_id); + + /* -+ * Set up a ring (shared page & event channel) between the agency and the ME. ++ * Set up a ring (shared page & event channel) between the agency and the S3C. + */ + + vbus_gather(VBT_NIL, vdev->otherend, "ring-ref", "%lu", diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0130-vfbdev.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0129-vfbdev.h.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0130-vfbdev.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0129-vfbdev.h.patch diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0132-vinput.c.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0130-vinput.c.patch similarity index 96% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0132-vinput.c.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0130-vinput.c.patch index d39abf4..4246049 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0132-vinput.c.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0130-vinput.c.patch @@ -65,7 +65,7 @@ + + +/* -+ * Add a new destination for a new ME. ++ * Add a new destination for a new S3C. + */ +static void add_destination(struct vbus_device *vdev_destination) +{ @@ -80,7 +80,7 @@ +} + +/* -+ * Search for a destination related to a specific ME according to its domid. ++ * Search for a destination related to a specific S3C according to its domid. + */ +static struct vbus_device *get_destination(uint32_t domid) +{ @@ -93,7 +93,7 @@ +} + +/* -+ * Remove a destination attached to a specific ME ++ * Remove a destination attached to a specific S3C + */ +static void del_destination(struct vbus_device *vdev_destination) +{ @@ -145,7 +145,7 @@ + * - If the state is not Connected, the character is pushed into a circular buffer that + * will be flushed at the next call to the Connected callback. + */ -+void me_cons_send_input(domid_t domid, struct input_event *event) ++void s3c_cons_send_input(domid_t domid, struct input_event *event) +{ + struct vbus_device *destination; + vinput_priv_t *vinput_priv; @@ -242,7 +242,7 @@ + DBG(VINPUT_PREFIX "Backend reconfigured: %d\n", vdev->otherend_id); + + /* -+ * Set up a ring (shared page & event channel) between the agency and the ME. ++ * Set up a ring (shared page & event channel) between the agency and the S3C. + */ + + vbus_gather(VBT_NIL, vdev->otherend, "ring-ref", "%lu", @@ -295,7 +295,7 @@ + return -EFAULT; + } + -+ me_cons_send_input(vfb_get_focus(), &event); ++ s3c_cons_send_input(vfb_get_focus(), &event); + } + + return len; diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0133-vinput.h.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0131-vinput.h.patch similarity index 96% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0133-vinput.h.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0131-vinput.h.patch index 28b16b2..4b24de2 100644 --- a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0133-vinput.h.patch +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0131-vinput.h.patch @@ -60,6 +60,6 @@ + +} vinput_t; + -+void me_cons_send_input(domid_t domid, struct input_event *event); ++void s3c_cons_send_input(domid_t domid, struct input_event *event); + +#endif /* VINPUT_H */ diff --git a/build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0128-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0132-Makefile.patch similarity index 100% rename from build/meta-linux/recipes-linux/soo/files/0001-linux-6.12-r0/0128-Makefile.patch rename to build/meta-linux/recipes-linux/soo/files/soo-generic/0132-Makefile.patch diff --git a/build/meta-linux/recipes-linux/soo/files/soo-generic/0133-Makefile.patch b/build/meta-linux/recipes-linux/soo/files/soo-generic/0133-Makefile.patch new file mode 100644 index 0000000..e37967a --- /dev/null +++ b/build/meta-linux/recipes-linux/soo/files/soo-generic/0133-Makefile.patch @@ -0,0 +1,4 @@ +--- ./build/tmp/work/linux-6.12-r0/linux-6.12/soo/drivers/vinputback/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ ./soo/drivers/vinputback/Makefile 2026-04-28 16:34:33.037734565 +0200 +@@ -0,0 +1 @@ ++obj-y := vinput.o diff --git a/build/meta-linux/recipes-linux/soo/linux_6.12%.bbappend b/build/meta-linux/recipes-linux/soo/linux_6.12%.bbappend index 6c4ccb3..d22bf63 100644 --- a/build/meta-linux/recipes-linux/soo/linux_6.12%.bbappend +++ b/build/meta-linux/recipes-linux/soo/linux_6.12%.bbappend @@ -1,11 +1,18 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD SUMMARY = "Linux Operating System running as guest on AVZ" DESCRIPTION = "Linux OS used as main domain (agency) running on the embedded platform" LICENSE = "GPLv2" -# These patches contain lv_port_linux patch -FILESEXTRAPATHS:soo:prepend = "${THISDIR}/../soo/files/0001-${PF}:" - +# SOO agency patches: the generic set (soo-generic) is shared by every +# agency kernel; the per-${PF} directory carries kernel-version/platform +# specifics. FILESPATH order puts the per-PF dir FIRST, so a same-named +# patch there shadows its generic counterpart. + +FILESEXTRAPATHS:soo:prepend = "${THISDIR}/../soo/files/0001-${PF}:${THISDIR}/../soo/files/soo-generic:" + +require files/soo-generic-patches.inc require files/0001-${PF}-patches.inc do_configure[nostamp] = "1" diff --git a/build/meta-qemu/classes/qemu.bbclass b/build/meta-qemu/classes/qemu.bbclass index eaf77e5..30ee400 100644 --- a/build/meta-qemu/classes/qemu.bbclass +++ b/build/meta-qemu/classes/qemu.bbclass @@ -1,11 +1,26 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD # Class for building QEMU in infrabase +do_configure[nostamp] = "1" qemu_do_configure () { - echo "Configuring QEMU..." cd ${IB_DIR}/qemu - ./configure ${QEMU_CONFIGURE:${IB_PLATFORM}} + + # Build the softmmu target of the current platform (QEMU_TARGET, selected + # per IB_PLATFORM), but PRESERVE any other arch already built in a prior + # run — otherwise meson would drop it. So building arm-softmmu then + # aarch64-softmmu (or vice-versa) keeps both qemu-system-* binaries. + tlist="${QEMU_TARGET}" + for t in arm-softmmu aarch64-softmmu; do + if [ "$t" != "${QEMU_TARGET}" ] && ls build/$t/qemu-system-* >/dev/null 2>&1; then + tlist="$tlist,$t" + fi + done + + echo "Configuring QEMU (target-list=$tlist)..." + ./configure --target-list=$tlist ${QEMU_OPTS} } diff --git a/build/meta-qemu/conf/layer.conf b/build/meta-qemu/conf/layer.conf index 476015f..242f622 100644 --- a/build/meta-qemu/conf/layer.conf +++ b/build/meta-qemu/conf/layer.conf @@ -1,3 +1,6 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + BBPATH .= ":${LAYERDIR}" BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend" diff --git a/build/meta-qemu/recipes-qemu/qemu/files/0001-qemu-8.2.2-r0-patches.inc b/build/meta-qemu/recipes-qemu/qemu/files/0001-qemu-8.2.2-r0-patches.inc index 343d052..de740bf 100644 --- a/build/meta-qemu/recipes-qemu/qemu/files/0001-qemu-8.2.2-r0-patches.inc +++ b/build/meta-qemu/recipes-qemu/qemu/files/0001-qemu-8.2.2-r0-patches.inc @@ -1,4 +1,7 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + SRC_URI += "\ - file://0002-virt.h.patch \ file://0001-virt.c.patch \ + file://0002-virt.h.patch \ " diff --git a/build/meta-qemu/recipes-qemu/qemu/files/0001-qemu-8.2.2-r0/0001-virt.c.patch b/build/meta-qemu/recipes-qemu/qemu/files/0001-qemu-8.2.2-r0/0001-virt.c.patch index 12b9088..4f73c20 100644 --- a/build/meta-qemu/recipes-qemu/qemu/files/0001-qemu-8.2.2-r0/0001-virt.c.patch +++ b/build/meta-qemu/recipes-qemu/qemu/files/0001-qemu-8.2.2-r0/0001-virt.c.patch @@ -1,15 +1,17 @@ ---- /home/rossierd/edgemtech/infrabase/build/tmp/work/qemu-8.0.0-r0/qemu-8.0.0/hw/arm/virt.c 2023-04-19 18:31:47.000000000 +0200 -+++ ./hw/arm/virt.c 2023-06-06 18:46:06.848082559 +0200 -@@ -81,6 +81,8 @@ +--- a/hw/arm/virt.c ++++ b/hw/arm/virt.c +@@ -82,6 +82,10 @@ #include "hw/char/pl011.h" #include "qemu/guest-random.h" +#include "hw/input/ps2.h" ++ ++#include "ui/input.h" + #define DEFINE_VIRT_MACHINE_LATEST(major, minor, latest) \ static void virt_##major##_##minor##_class_init(ObjectClass *oc, \ void *data) \ -@@ -144,6 +146,11 @@ +@@ -145,6 +149,12 @@ [VIRT_GIC_ITS] = { 0x08080000, 0x00020000 }, /* This redistributor space allows up to 2*64kB*123 CPUs */ [VIRT_GIC_REDIST] = { 0x080A0000, 0x00F60000 }, @@ -17,23 +19,24 @@ + [VIRT_CLCD] = { 0x08800000, 0x00001000 }, + [VIRT_KMI0] = { 0x08801000, 0x00001000 }, + [VIRT_KMI1] = { 0x08802000, 0x00001000 }, ++ [VIRT_ABSMOUSE] = { 0x08803000, 0x00001000 }, + [VIRT_UART] = { 0x09000000, 0x00001000 }, [VIRT_RTC] = { 0x09010000, 0x00001000 }, [VIRT_FW_CFG] = { 0x09020000, 0x00000018 }, -@@ -198,6 +205,11 @@ +@@ -199,6 +209,11 @@ [VIRT_SECURE_UART] = 8, [VIRT_ACPI_GED] = 9, [VIRT_MMIO] = 16, /* ...to 16 + NUM_VIRTIO_TRANSPORTS - 1 */ + -+ [VIRT_CLCD] = 35, -+ [VIRT_KMI0] = 36, -+ [VIRT_KMI1] = 37, ++ [VIRT_CLCD] = 10, ++ [VIRT_KMI0] = 11, ++ [VIRT_KMI1] = 12, + [VIRT_GIC_V2M] = 48, /* ...to 48 + NUM_GICV2M_SPIS - 1 */ [VIRT_SMMU] = 74, /* ...to 74 + NUM_SMMU_IRQS - 1 */ [VIRT_PLATFORM_BUS] = 112, /* ...to 112 + PLATFORM_BUS_NUM_IRQS -1 */ -@@ -2018,6 +2030,14 @@ +@@ -2022,6 +2037,109 @@ } } @@ -44,11 +47,106 @@ + void *opaque; + int n; +}; ++ ++/* ++ * SO3 absolute pointer ("so3,absmouse"). ++ * ++ * A tiny read-only MMIO device fed by QEMU's *absolute* input handler. ++ * SO3's only other pointer is the relative PL050 PS/2 mouse, which forces ++ * QEMU into relative mode (pointer grab/warp) — broken under Wayland and ++ * always prone to host/guest position drift. Registering an absolute input ++ * handler makes QEMU use absolute pointer mode (no grab, no warp): the host ++ * pointer position maps 1:1 onto the guest. The guest simply polls the X/Y/ ++ * button registers (no IRQ needed; the LVGL/slv mouse read_cb polls every ++ * refresh). Coordinates are reported in QEMU's absolute range ++ * [0 .. INPUT_EVENT_ABS_MAX]; the guest scales them to its screen size. ++ */ ++#define VIRT_ABSMOUSE_REG_X 0x00 /* uint32: 0 .. INPUT_EVENT_ABS_MAX */ ++#define VIRT_ABSMOUSE_REG_Y 0x04 /* uint32: 0 .. INPUT_EVENT_ABS_MAX */ ++#define VIRT_ABSMOUSE_REG_BTN 0x08 /* uint32: bit0 left, bit1 right, bit2 middle */ ++#define VIRT_ABSMOUSE_REG_MAX 0x0c /* uint32: INPUT_EVENT_ABS_MAX (scale reference) */ ++ ++typedef struct { ++ uint32_t x; ++ uint32_t y; ++ uint32_t buttons; ++} VirtAbsMouseState; ++ ++static VirtAbsMouseState virt_absmouse; ++ ++static void virt_absmouse_event(DeviceState *dev, QemuConsole *src, ++ InputEvent *evt) ++{ ++ InputMoveEvent *move; ++ InputBtnEvent *btn; ++ uint32_t bit; ++ ++ switch (evt->type) { ++ case INPUT_EVENT_KIND_ABS: ++ move = evt->u.abs.data; ++ if (move->axis == INPUT_AXIS_X) { ++ virt_absmouse.x = move->value; ++ } else if (move->axis == INPUT_AXIS_Y) { ++ virt_absmouse.y = move->value; ++ } ++ break; ++ case INPUT_EVENT_KIND_BTN: ++ btn = evt->u.btn.data; ++ bit = 0; ++ if (btn->button == INPUT_BUTTON_LEFT) { ++ bit = 1; ++ } else if (btn->button == INPUT_BUTTON_RIGHT) { ++ bit = 2; ++ } else if (btn->button == INPUT_BUTTON_MIDDLE) { ++ bit = 4; ++ } ++ if (bit) { ++ if (btn->down) { ++ virt_absmouse.buttons |= bit; ++ } else { ++ virt_absmouse.buttons &= ~bit; ++ } ++ } ++ break; ++ default: ++ break; ++ } ++} ++ ++static const QemuInputHandler virt_absmouse_handler = { ++ .name = "SO3 absolute pointer", ++ .mask = INPUT_EVENT_MASK_ABS | INPUT_EVENT_MASK_BTN, ++ .event = virt_absmouse_event, ++}; ++ ++static uint64_t virt_absmouse_read(void *opaque, hwaddr addr, unsigned size) ++{ ++ switch (addr) { ++ case VIRT_ABSMOUSE_REG_X: return virt_absmouse.x; ++ case VIRT_ABSMOUSE_REG_Y: return virt_absmouse.y; ++ case VIRT_ABSMOUSE_REG_BTN: return virt_absmouse.buttons; ++ case VIRT_ABSMOUSE_REG_MAX: return INPUT_EVENT_ABS_MAX; ++ default: return 0; ++ } ++} ++ ++static void virt_absmouse_write(void *opaque, hwaddr addr, uint64_t val, ++ unsigned size) ++{ ++ /* Read-only device. */ ++} ++ ++static const MemoryRegionOps virt_absmouse_ops = { ++ .read = virt_absmouse_read, ++ .write = virt_absmouse_write, ++ .endianness = DEVICE_NATIVE_ENDIAN, ++ .valid = { .min_access_size = 4, .max_access_size = 4 }, ++}; + static void machvirt_init(MachineState *machine) { VirtMachineState *vms = VIRT_MACHINE(machine); -@@ -2326,6 +2346,27 @@ +@@ -2326,6 +2444,51 @@ vms->fw_cfg, OBJECT(vms)); } @@ -62,7 +160,8 @@ + memory_region_init_ram(vram, NULL, "virt.vram", vram_size, NULL); + memory_region_add_subregion(sysmem, 0x30000000, vram); + -+ sysbus_create_simple("pl111", (hwaddr) vms->memmap[VIRT_CLCD].base, NULL); ++ sysbus_create_simple("pl111", (hwaddr) vms->memmap[VIRT_CLCD].base, ++ qdev_get_gpio_in(vms->gic, vms->irqmap[VIRT_CLCD])); + + sysbus_create_simple("pl050_keyboard", (hwaddr) vms->memmap[VIRT_KMI0].base, + qdev_get_gpio_in(vms->gic, vms->irqmap[VIRT_KMI0])); @@ -71,6 +170,29 @@ + sysbus_create_simple("pl050_mouse", (hwaddr) vms->memmap[VIRT_KMI1].base, + qdev_get_gpio_in(vms->gic, vms->irqmap[VIRT_KMI1])); + ++ /* SO3 absolute pointer: a polled MMIO device whose registers are ++ * driven by QEMU's absolute input handler. Registering the handler ++ * also switches QEMU to absolute pointer mode (no grab/warp), so the ++ * guest cursor maps 1:1 to the host pointer on every backend ++ * (Wayland/X11) and every monitor. See VirtAbsMouseState above. */ ++ { ++ MemoryRegion *absmouse = g_new(MemoryRegion, 1); ++ ++ memory_region_init_io(absmouse, NULL, &virt_absmouse_ops, ++ &virt_absmouse, "so3.absmouse", 0x1000); ++ memory_region_add_subregion(sysmem, ++ vms->memmap[VIRT_ABSMOUSE].base, absmouse); ++ ++ /* Activate (move to head of the handler list) so this handler ++ * claims pointer BUTTON events too: the relative pl050_mouse ++ * registered earlier also masks BTN, and qemu_input_find_handler() ++ * returns the first matching handler. ABS events already reach us ++ * (only we mask ABS); activating ensures clicks do as well. KEY ++ * events still fall through to the pl050 keyboard. */ ++ qemu_input_handler_activate( ++ qemu_input_handler_register(NULL, &virt_absmouse_handler)); ++ } ++ + } + vms->bootinfo.ram_size = machine->ram_size; diff --git a/build/meta-qemu/recipes-qemu/qemu/files/0001-qemu-8.2.2-r0/0002-virt.h.patch b/build/meta-qemu/recipes-qemu/qemu/files/0001-qemu-8.2.2-r0/0002-virt.h.patch index b103b08..dcac85b 100644 --- a/build/meta-qemu/recipes-qemu/qemu/files/0001-qemu-8.2.2-r0/0002-virt.h.patch +++ b/build/meta-qemu/recipes-qemu/qemu/files/0001-qemu-8.2.2-r0/0002-virt.h.patch @@ -1,6 +1,6 @@ ---- /home/rossierd/edgemtech/infrabase/build/tmp/work/qemu-8.0.0-r0/qemu-8.0.0/include/hw/arm/virt.h 2023-04-19 18:31:47.000000000 +0200 -+++ ./include/hw/arm/virt.h 2023-06-06 18:46:06.923080803 +0200 -@@ -68,6 +68,11 @@ +--- a/include/hw/arm/virt.h ++++ b/include/hw/arm/virt.h +@@ -58,6 +58,12 @@ VIRT_GIC_VCPU, VIRT_GIC_ITS, VIRT_GIC_REDIST, @@ -8,6 +8,7 @@ + VIRT_CLCD, + VIRT_KMI0, + VIRT_KMI1, ++ VIRT_ABSMOUSE, + VIRT_SMMU, VIRT_UART, diff --git a/build/meta-qemu/recipes-qemu/qemu/qemu_8.2.2.bb b/build/meta-qemu/recipes-qemu/qemu/qemu_8.2.2.bb index d8c0871..3aaaa8f 100644 --- a/build/meta-qemu/recipes-qemu/qemu/qemu_8.2.2.bb +++ b/build/meta-qemu/recipes-qemu/qemu/qemu_8.2.2.bb @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD SUMMARY = "QEMU EMulator" DESCRIPTION = "QEMU emulation environment core receipt" @@ -22,8 +24,27 @@ require files/0001-${PF}-patches.inc # Where the working directory will be placed in infrabase root dir IB_TARGET = "${IB_DIR}/qemu" -QEMU_CONFIGURE:virt32 = "--target-list=arm-softmmu --disable-attr --disable-werror --disable-docs" -QEMU_CONFIGURE:virt64 = "--target-list=aarch64-softmmu --disable-attr --disable-werror --disable-docs --enable-sdl" +# Keep generated/fetched trees out of the updiff patchset so only hand-edited +# sources (hw/arm/virt.c, include/hw/arm/virt.h, ...) are diffed against the +# pristine snapshot: +# build/ — QEMU's out-of-tree meson/ninja dir (1000+ generated files) +# subprojects/ — meson subprojects (dtc, libslirp, ...) cloned during +# do_configure, i.e. AFTER the pristine snapshot is taken, so +# they'd otherwise show up as hundreds of "added" files. +# GNUmakefile — meson-generated top-level ninja wrapper (qemu ships a +# Makefile + meson.build; this file is created at configure). +# All three are produced AFTER do_unpack snapshots the pristine tree, so they +# read as "added" in the diff; none are ever hand-edited. + +IB_UPDIFF_EXCLUDE = "build subprojects GNUmakefile" + +# Softmmu target per platform (resolved via IB_PLATFORM/OVERRIDES). The +# bbclass builds this target and keeps any other arch already built, so +# building one platform's qemu doesn't wipe the other's. + +QEMU_TARGET:virt32 = "arm-softmmu" +QEMU_TARGET:virt64 = "aarch64-softmmu" +QEMU_OPTS = "--enable-slirp --disable-attr --disable-werror --disable-docs --enable-sdl" do_clean[nostamp] = "1" do_clean () { diff --git a/build/meta-rootfs/classes/rootfs.bbclass b/build/meta-rootfs/classes/rootfs.bbclass index ace04f1..c46e412 100644 --- a/build/meta-rootfs/classes/rootfs.bbclass +++ b/build/meta-rootfs/classes/rootfs.bbclass @@ -1,11 +1,19 @@ -# Class for building rootfs in infrabase +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + +# Class for building rootfs in infrabase. +# +# bitbake runs unprivileged. cpio extraction (-id) and repack (-o) +# need root to preserve device nodes / setuid bits / ownership, so +# both go through utils_sudo (`sudo -n`). The caller (deploy.sh, +# build.sh, mount.sh) is expected to have opened a sudo session. IB_ROOTFS_PATH:linux = "${IB_DIR}/linux/rootfs" IB_ROOTFS_PATH:so3 = "${IB_DIR}/so3/rootfs" inherit filesystem -def __do_rootfs_mount(d): +def __do_rootfs_mount(d): import os @@ -13,28 +21,34 @@ def __do_rootfs_mount(d): IB_ROOTFS_PATH = d.getVar('IB_ROOTFS_PATH') WORKDIR = d.getVar('WORKDIR') IB_PLATFORM = d.getVar('IB_PLATFORM') - + # Read and preserve the current working directory original_cwd = os.getcwd() if ROOTFS_FILENAME != "": - # Remove a previous mount - os.system("sudo rm -rf {}/fs".format(WORKDIR)) - - os.makedirs("{}/fs".format(WORKDIR), exist_ok=True) - - os.chdir("{}/fs".format(WORKDIR)) - - if not os.path.isfile("{}/board/{}/{}.cpio".format(IB_ROOTFS_PATH, IB_PLATFORM, ROOTFS_FILENAME)): - bb.fatal("{} is missing ...".format("{}/board/{}/{}.cpio".format(IB_ROOTFS_PATH, IB_PLATFORM, ROOTFS_FILENAME))) - - os.system("sudo cpio -id < {}/board/{}/{}.cpio".format(IB_ROOTFS_PATH, IB_PLATFORM, ROOTFS_FILENAME)) - + # Remove a previous mount (cpio -id may have produced root-owned + # files / device nodes, hence sudo). + utils_sudo(["rm", "-rf", f"{WORKDIR}/fs"]) + + os.makedirs(f"{WORKDIR}/fs", exist_ok=True) + + os.chdir(f"{WORKDIR}/fs") + + cpio_path = f"{IB_ROOTFS_PATH}/board/{IB_PLATFORM}/{ROOTFS_FILENAME}.cpio" + if not os.path.isfile(cpio_path): + bb.fatal(f"{cpio_path} is missing ...") + + # `cpio -id` may create device nodes / setuid bits — needs root. + # stdin redirection is done in Python so the cpio archive is read + # from a user-owned fd (Python opens it before forking sudo). + with open(cpio_path, "rb") as f: + utils_sudo(["cpio", "-id"], stdin=f, check=True) + if os.path.lexists(IB_ROOTFS_PATH + "/fs"): os.remove(IB_ROOTFS_PATH + "/fs") - os.symlink("{}/fs".format(WORKDIR), IB_ROOTFS_PATH + "/fs") - + os.symlink(f"{WORKDIR}/fs", IB_ROOTFS_PATH + "/fs") + # Change back to the original working directory os.chdir(original_cwd) else: @@ -52,55 +66,93 @@ def __do_rootfs_umount(d): WORKDIR = d.getVar('WORKDIR') IB_PLATFORM = d.getVar('IB_PLATFORM') - # Read and preserve the current working directory + # Read and preserve the current working directory original_cwd = os.getcwd() - - if ROOTFS_FILENAME != "": - ROOTFS_FILENAME = "{}/board/{}/{}.cpio".format(IB_ROOTFS_PATH, IB_PLATFORM, ROOTFS_FILENAME) - os.system("cp -L {} {}.backup".format(ROOTFS_FILENAME, ROOTFS_FILENAME)) - - os.chdir("{}/fs".format(WORKDIR)) - os.system("sudo truncate -s 0 {}".format(ROOTFS_FILENAME)) + if ROOTFS_FILENAME != "": + ROOTFS_FILENAME = f"{IB_ROOTFS_PATH}/board/{IB_PLATFORM}/{ROOTFS_FILENAME}.cpio" + os.system(f"cp -L {ROOTFS_FILENAME} {ROOTFS_FILENAME}.backup") + + os.chdir(f"{WORKDIR}/fs") + + TMP_CPIO = ROOTFS_FILENAME + ".tmp" + + # find/cpio must run as root to traverse / read root-owned files + # created by the earlier `cpio -id`. We pass the output fd from + # Python so the resulting archive is user-owned regardless of who + # ran the pipeline. + with open(TMP_CPIO, "wb") as f_out: + utils_sudo("find . | LC_ALL=C sort | cpio -o --format='newc' --reproducible", + shell=True, stdout=f_out, check=True) + + # Zero mtime fields in newc cpio headers to make the archive content-deterministic. + # --reproducible only zeroes inodes/devices; timestamps still vary across mounts. + import hashlib + + def _zero_cpio_mtimes(src, dst): + with open(src, 'rb') as fin: + data = fin.read() + out = bytearray() + i = 0 + while i < len(data): + if i + 110 > len(data): + out += data[i:] + break + magic = data[i:i+6] + if magic not in (b'070701', b'070702'): + out += data[i:] + break + hdr = bytearray(data[i:i+110]) + hdr[46:54] = b'00000000' # zero mtime + out += hdr + namesize = int(data[i+94:i+102], 16) + filesize = int(data[i+54:i+62], 16) + name_pad = (4 - ((110 + namesize) % 4)) % 4 + name_end = i + 110 + namesize + name_pad + out += data[i+110:name_end] + if data[i+110:i+110+namesize].rstrip(b'\x00') == b'TRAILER!!!': + out += data[name_end:] + break + file_pad = (4 - (filesize % 4)) % 4 if filesize % 4 else 0 + data_end = name_end + filesize + file_pad + out += data[name_end:data_end] + i = data_end + with open(dst, 'wb') as fout: + fout.write(out) + + def _sha256(path): + h = hashlib.sha256() + try: + with open(path, 'rb') as f: + for chunk in iter(lambda: f.read(65536), b''): + h.update(chunk) + return h.hexdigest() + except Exception: + return None + + STABLE_CPIO = ROOTFS_FILENAME + ".stable" + _zero_cpio_mtimes(TMP_CPIO, STABLE_CPIO) + # TMP_CPIO and STABLE_CPIO are user-owned (Python opened them); + # plain os.remove / os.replace suffice — no sudo. + os.remove(TMP_CPIO) + + if _sha256(STABLE_CPIO) != _sha256(ROOTFS_FILENAME): + os.replace(STABLE_CPIO, ROOTFS_FILENAME) + else: + os.remove(STABLE_CPIO) + + # The unpacked tree under WORKDIR/fs is root-owned (cpio -id). + utils_sudo(["rm", "-rf", f"{WORKDIR}/fs"]) - os.system("sudo find . | sudo cpio -o --format='newc' >> {}".format(ROOTFS_FILENAME)) - os.system("sudo rm -rf {}/fs".format(WORKDIR)) - # Change back to the original working directory os.chdir(original_cwd) else: os.chdir(IB_ROOTFS_PATH) os.system("./umount.sh") - + # Change back to the original working directory os.chdir(original_cwd) -# This function extracts the torizon-rootfs contents from the tar archive -# and writes to the second partition of the disk image -# This function is specific to TorizonOS - -def __torizon_rootfs_archive_path(d): - import os - - IB_ROOTFS_PATH = d.getVar('IB_ROOTFS_PATH') - IB_TORIZON_MACHINE_ID = d.getVar('IB_TORIZON_MACHINE_ID') - IB_TORIZON_MAIN_RECIPE = d.getVar('IB_TORIZON_MAIN_RECIPE') - - # First, check if TorizonOS was built - if not os.path.exists(IB_ROOTFS_PATH): - __do_fs_umount(d) - bb.fatal((f"The image for {IB_TORIZON_MACHINE_ID} was not built, " - f"try running: 'build.sh -t' first rootfs should be at {IB_ROOTFS_PATH}")) - - - p = f"{IB_ROOTFS_PATH}/{IB_TORIZON_MAIN_RECIPE}-{IB_TORIZON_MACHINE_ID}.ota.tar.zst" - - if not os.path.exists(p): - bb.fatal(f"The rootfs archive: {p} is not present") - - return p - - do_rootfs_mount[nostamp] = "1" python do_rootfs_mount () { @@ -122,15 +174,15 @@ do_ramfs_mount[nostamp] = "1" python do_ramfs_mount () { d.setVar('ROOTFS_FILENAME', 'initrd') __do_rootfs_mount(d) -} +} addtask do_ramfs_mount do_ramfs_umount[nostamp] = "1" -python do_ramfs_mount () { +python do_ramfs_umount () { d.setVar('ROOTFS_FILENAME', 'initrd') __do_rootfs_umount(d) -} +} addtask do_ramfs_umount # Deployment tasks diff --git a/build/meta-rootfs/conf/layer.conf b/build/meta-rootfs/conf/layer.conf index e93d8cd..3847e47 100644 --- a/build/meta-rootfs/conf/layer.conf +++ b/build/meta-rootfs/conf/layer.conf @@ -1,3 +1,6 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + BBPATH .= ":${LAYERDIR}" BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend" diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/buildroot_2024.11.bb b/build/meta-rootfs/recipes-rootfs/buildroot/buildroot_2024.11.bb index fb14cff..0b7a5ac 100644 --- a/build/meta-rootfs/recipes-rootfs/buildroot/buildroot_2024.11.bb +++ b/build/meta-rootfs/recipes-rootfs/buildroot/buildroot_2024.11.bb @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD SUMMARY = "Buildroot rottfs" DESCRIPTION = "Buildroot is used as rootfs generator" @@ -9,43 +11,53 @@ PV = "2024.11" OVERRIDES += ":linux" -inherit logging inherit rootfs SRC_URI = "https://buildroot.org/downloads/buildroot-2024.11.tar.gz;protocol=https" SRC_URI[sha256sum] = "4a601600b846058c2710cfda7d152d5d820b433ff4a4bce65c7eeb49f87e5540" -# defconfig patches +# defconfig patches and auto-getty patches FILESPATH:prepend: := "${THISDIR}/files/0001-${PF}:" -# auto-getty package -FILESPATH:prepend: := "${THISDIR}/files/0002-${PF}:" - -# JSONCPP and LIBHTTPSERVER -FILESPATH:prepend: := "${THISDIR}/files/0003-${PF}:" - require files/0001-${PF}-patches.inc -require files/0002-${PF}-patches.inc -require files/0003-${PF}-patches.inc - + # Where the working directory will be placed in infrabase root dir IB_TARGET = "${IB_ROOTFS_PATH}/buildroot" +# BR2_DL_DIR: buildroot download cache. Defaults to ${HOME}/.buildroot-dl +# — same persistence pattern as BR2_CCACHE_DIR in the defconfigs. Survives +# workspace cleanups in local builds AND in CI (gitlab-runner $HOME is +# stable), saves ~hundreds of MB of tarball re-downloads. Override via +# env or local.conf if a different location is needed (e.g. multi-user +# host where each user wants their own cache). +IB_BUILDROOT_DL_DIR ?= "${HOME}/.buildroot-dl" + do_configure () { cd ${IB_TARGET} - + if [ ! -f ${IB_TARGET}/configs/${IB_PLATFORM}_defconfig ]; then bbfatal "${IB_PLATFORM}_defconfig is missing in buildroot/configs ..." fi - - make O=${IB_ROOTFS_PATH} ${IB_PLATFORM}_defconfig + + mkdir -p "${IB_BUILDROOT_DL_DIR}" + make O=${IB_ROOTFS_PATH} BR2_DL_DIR="${IB_BUILDROOT_DL_DIR}" ${IB_PLATFORM}_defconfig } +do_build[nostamp] = "1" + +# post_image.sh writes rootfs.cpio into ${IB_ROOTFS_PATH}/board/${IB_PLATFORM}, +# which is the board working copy + symlink set up by rootfs-linux:do_attach_ +# infrabase under tmp/work. Make sure that copy exists before we build, +# otherwise post_image.sh has nowhere to deposit rootfs.cpio on a fresh tree. +# (buildroot here is the linux rootfs generator only — OVERRIDES += ":linux".) + +do_build[depends] += "rootfs-linux:do_attach_infrabase" + do_build () { bbnote "Building buildroot based rootfs..." - + cd ${IB_TARGET} - make O=${IB_ROOTFS_PATH} BR2_EXTERNAL_DIRS=.. --no-print-directory + make O=${IB_ROOTFS_PATH} BR2_EXTERNAL_DIRS=.. BR2_DL_DIR="${IB_BUILDROOT_DL_DIR}" --no-print-directory } do_clean[nostamp] = "1" diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0-patches.inc b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0-patches.inc index 4a90b67..280ed2f 100644 --- a/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0-patches.inc +++ b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0-patches.inc @@ -1,3 +1,24 @@ SRC_URI += "\ - file://0004-virt64_defconfig.patch \ + file://0001-rpi4_64_defconfig.patch \ + file://0003-virt64_defconfig.patch \ + file://0004-auto-getty.mk.patch \ + file://0005-Config.in.patch \ + file://0006-auto-getty.patch \ + file://0007-autogetty.patch \ + file://0008-auto-root-login.patch \ + file://0009-S91auto-getty.patch \ + file://0010-Config.in.patch \ + file://0011-.br2-external.in.init.patch \ + file://0012-.br2-external.in.jpeg.patch \ + file://0013-.br2-external.in.linux.patch \ + file://0014-.br2-external.in.menus.patch \ + file://0015-.br2-external.in.openssl.patch \ + file://0016-.br2-external.in.paths.patch \ + file://0017-.br2-external.in.skeleton.patch \ + file://0018-.br2-external.in.toolchains.patch \ + file://0019-.br2-external.mk.patch \ + file://0020-.depend.patch \ + file://0021-Config.in.patch \ + file://0022-sfdisk.001.include_sys_syscalls_h.patch.patch \ + file://0023-sfdisk.mk.patch \ " \ No newline at end of file diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0/0019-rpi4_64_defconfig.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0001-rpi4_64_defconfig.patch similarity index 99% rename from build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0/0019-rpi4_64_defconfig.patch rename to build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0001-rpi4_64_defconfig.patch index 58374cc..3879916 100644 --- a/build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0/0019-rpi4_64_defconfig.patch +++ b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0001-rpi4_64_defconfig.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/soo/infrabase/build/tmp/work/buildroot-2024.11-r0/buildroot-2024.11/configs/rpi4_64_defconfig 1970-01-01 01:00:00.000000000 +0100 -+++ ./configs/rpi4_64_defconfig 2025-09-08 14:12:53.809741670 +0200 +--- a/configs/rpi4_64_defconfig ++++ b/configs/rpi4_64_defconfig @@ -0,0 +1,4202 @@ +# +# Automatically generated file; DO NOT EDIT. @@ -1836,7 +1836,7 @@ +BR2_PACKAGE_JSON_C=y +# BR2_PACKAGE_JSON_FOR_MODERN_CPP is not set +# BR2_PACKAGE_JSON_GLIB is not set -+# BR2_PACKAGE_JSONCPP is not set ++BR2_PACKAGE_JSONCPP=y +# BR2_PACKAGE_LIBBSON is not set +# BR2_PACKAGE_LIBFASTJSON is not set +# BR2_PACKAGE_LIBJSON is not set @@ -1987,7 +1987,7 @@ +# BR2_PACKAGE_LIBGSASL is not set +# BR2_PACKAGE_LIBHTP is not set +# BR2_PACKAGE_LIBHTTPPARSER is not set -+# BR2_PACKAGE_LIBHTTPSERVER is not set ++BR2_PACKAGE_LIBHTTPSERVER=y +# BR2_PACKAGE_LIBIDN is not set +# BR2_PACKAGE_LIBIDN2 is not set +# BR2_PACKAGE_LIBISCSI is not set diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0004-virt64_defconfig.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0003-virt64_defconfig.patch similarity index 95% rename from build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0004-virt64_defconfig.patch rename to build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0003-virt64_defconfig.patch index 7c864f6..c057a51 100644 --- a/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0004-virt64_defconfig.patch +++ b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0003-virt64_defconfig.patch @@ -1,9 +1,9 @@ ---- /home/rossierd/edgemtech/tmp/infrabase/build/tmp/work/buildroot-2024.11-r0/buildroot-2024.11/configs/virt64_defconfig 1970-01-01 01:00:00.000000000 +0100 -+++ ./configs/virt64_defconfig 2024-12-20 11:41:27.053017285 +0100 +--- a/configs/virt64_defconfig ++++ b/configs/virt64_defconfig @@ -0,0 +1,4202 @@ +# +# Automatically generated file; DO NOT EDIT. -+# Buildroot -ge5ce03f6b-dirty Configuration ++# Buildroot -gedd1d5e1 Configuration +# +BR2_HAVE_DOT_CONFIG=y +BR2_HOST_GCC_AT_LEAST_4_9=y @@ -14,7 +14,6 @@ +BR2_HOST_GCC_AT_LEAST_9=y +BR2_HOST_GCC_AT_LEAST_10=y +BR2_HOST_GCC_AT_LEAST_11=y -+BR2_NEEDS_HOST_UTF8_LOCALE=y + +# +# Target options @@ -346,8 +345,8 @@ +# +BR2_ROOTFS_SKELETON_DEFAULT=y +# BR2_ROOTFS_SKELETON_CUSTOM is not set -+BR2_TARGET_GENERIC_HOSTNAME="infrabase" -+BR2_TARGET_GENERIC_ISSUE="EDGEMTech Infrabase" ++BR2_TARGET_GENERIC_HOSTNAME="micofe" ++BR2_TARGET_GENERIC_ISSUE="MICOFE" +BR2_TARGET_GENERIC_PASSWD_SHA256=y +# BR2_TARGET_GENERIC_PASSWD_SHA512 is not set +BR2_TARGET_GENERIC_PASSWD_METHOD="sha-256" @@ -356,9 +355,9 @@ +# General purpose +# +# BR2_INIT_BUSYBOX is not set -+# BR2_INIT_SYSV is not set ++BR2_INIT_SYSV=y +# BR2_INIT_OPENRC is not set -+BR2_INIT_SYSTEMD=y ++# BR2_INIT_SYSTEMD is not set + +# +# Special purpose (read help) @@ -366,12 +365,10 @@ +# BR2_INIT_TINI is not set +# BR2_INIT_TINYINIT is not set +# BR2_INIT_NONE is not set -+BR2_INIT_SYSTEMD_POPULATE_TMPFILES=y -+BR2_PACKAGE_SYSTEMD_DEFAULT_TARGET="multi-user.target" -+ -+# -+# /dev management using udev (from systemd) -+# ++# BR2_ROOTFS_DEVICE_CREATION_STATIC is not set ++BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y ++# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV is not set ++# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV is not set +BR2_ROOTFS_DEVICE_TABLE="system/device_table.txt" +# BR2_ROOTFS_DEVICE_TABLE_SUPPORTS_EXTENDED_ATTRIBUTES is not set +BR2_ROOTFS_MERGED_USR=y @@ -421,9 +418,9 @@ +BR2_PACKAGE_BUSYBOX_WATCHDOG_PERIOD="5" +BR2_PACKAGE_SKELETON=y +BR2_PACKAGE_HAS_SKELETON=y -+BR2_PACKAGE_PROVIDES_SKELETON="skeleton-init-systemd" ++BR2_PACKAGE_PROVIDES_SKELETON="skeleton-init-sysv" +BR2_PACKAGE_SKELETON_INIT_COMMON=y -+BR2_PACKAGE_SKELETON_INIT_SYSTEMD=y ++BR2_PACKAGE_SKELETON_INIT_SYSV=y + +# +# Audio and video applications @@ -506,7 +503,10 @@ +# +# BR2_PACKAGE_GST1_RTSP_SERVER is not set +# BR2_PACKAGE_GST1_SHARK is not set -+# BR2_PACKAGE_GST1_VAAPI is not set ++ ++# ++# gst1-vaapi needs udev /dev management and a toolchain w/ threads, dynamic library, C++ ++# + +# +# gst-omx requires a OpenMAX implementation @@ -520,14 +520,22 @@ +# +# kodi needs python3 w/ .py modules, a uClibc or glibc toolchain w/ C++, threads, wchar, dynamic library, gcc >= 9.x, host gcc >= 9.x +# -+BR2_PACKAGE_KODI_PLATFORM_SUPPORTS=y -+BR2_PACKAGE_KODI_PLATFORM_SUPPORTS_GBM=y -+BR2_PACKAGE_KODI_PLATFORM_SUPPORTS_WAYLAND=y ++ ++# ++# kodi needs udev support for gbm ++# ++ ++# ++# kodi needs an OpenGL EGL backend with OpenGL or GLES support ++# +# BR2_PACKAGE_LAME is not set +# BR2_PACKAGE_MADPLAY is not set +# BR2_PACKAGE_MIMIC is not set +# BR2_PACKAGE_MINIMODEM is not set -+# BR2_PACKAGE_MIRACLECAST is not set ++ ++# ++# miraclecast needs systemd and a glibc toolchain w/ threads and wchar ++# +# BR2_PACKAGE_MJPEGTOOLS is not set +# BR2_PACKAGE_MODPLUGTOOLS is not set +# BR2_PACKAGE_MOTION is not set @@ -681,7 +689,10 @@ +# +# sysprof needs a toolchain w/ dynamic library, wchar, threads, C++, gcc >= 7, headers >= 5.12 +# -+# BR2_PACKAGE_TBTOOLS is not set ++ ++# ++# tbtools needs udev /dev management w/ glibc toolchain ++# +# BR2_PACKAGE_TCF_AGENT is not set +BR2_PACKAGE_TCF_AGENT_ARCH="a64" +BR2_PACKAGE_TCF_AGENT_ARCH_SUPPORTS=y @@ -864,7 +875,10 @@ +# +# Graphic applications +# -+BR2_PACKAGE_CAGE=y ++ ++# ++# cage needs udev, EGL and OpenGL ES support ++# + +# +# cog needs wpewebkit and a toolchain w/ threads @@ -874,17 +888,23 @@ +# +# flutter packages need flutter-engine +# -+# BR2_PACKAGE_FLUTTER_PI is not set ++ ++# ++# flutter-pi needs GBM, systemd, and udev ++# +# BR2_PACKAGE_FOOT is not set +# BR2_PACKAGE_FSWEBCAM is not set +# BR2_PACKAGE_GHOSTSCRIPT is not set -+BR2_PACKAGE_GLMARK2_FLAVOR_ANY=y -+BR2_PACKAGE_GLMARK2_FLAVOR_DRM_GLESV2=y -+BR2_PACKAGE_GLMARK2_FLAVOR_WAYLAND_GLESV2=y -+# BR2_PACKAGE_GLMARK2 is not set ++ ++# ++# glmark2 needs an OpenGL or an openGL ES and EGL backend ++# +# BR2_PACKAGE_GLSLSANDBOX_PLAYER is not set +# BR2_PACKAGE_GNUPLOT is not set -+BR2_PACKAGE_IGT_GPU_TOOLS=y ++ ++# ++# igt-gpu-tools needs udev /dev management and toolchain w/ threads, wchar, dynamic library, locale, headers >= 4.11 ++# +# BR2_PACKAGE_IVI_HOMESCREEN is not set +# BR2_PACKAGE_JHEAD is not set +BR2_PACKAGE_KMSCUBE=y @@ -900,7 +920,10 @@ +# +# stellarium needs Qt5 and an OpenGL provider +# -+# BR2_PACKAGE_SWAY is not set ++ ++# ++# sway needs systemd, udev, EGL and OpenGL ES support ++# +# BR2_PACKAGE_SWAYBG is not set +# BR2_PACKAGE_TESSERACT_OCR is not set +# BR2_PACKAGE_TINIFIER is not set @@ -996,38 +1019,10 @@ +# +# tekui needs a Lua interpreter and a toolchain w/ threads, dynamic library +# -+BR2_PACKAGE_WESTON=y -+BR2_PACKAGE_WESTON_DEFAULT_DRM=y -+# BR2_PACKAGE_WESTON_DEFAULT_HEADLESS is not set -+# BR2_PACKAGE_WESTON_DEFAULT_WAYLAND is not set -+ -+# -+# X11 (nested) backend needs X.org -+# -+BR2_PACKAGE_WESTON_DEFAULT_COMPOSITOR="drm" -+BR2_PACKAGE_WESTON_DRM=y -+ -+# -+# RDP compositor needs a toolchain w/ wchar, C++, X.org -+# -+BR2_PACKAGE_WESTON_HEADLESS=y -+# BR2_PACKAGE_WESTON_WAYLAND is not set -+ -+# -+# X11 (nested) compositor needs X.org enabled -+# + +# -+# XWayland support needs libepoxy and X.org enabled ++# weston needs udev and a toolchain w/ locale, threads, dynamic library, headers >= 3.0 +# -+BR2_PACKAGE_WESTON_HAS_SHELL=y -+BR2_PACKAGE_WESTON_SHELL_DESKTOP=y -+BR2_PACKAGE_WESTON_SHELL_FULLSCREEN=y -+BR2_PACKAGE_WESTON_SHELL_IVI=y -+BR2_PACKAGE_WESTON_SHELL_KIOSK=y -+BR2_PACKAGE_WESTON_SCREENSHARE=y -+BR2_PACKAGE_WESTON_SIMPLE_CLIENTS=y -+BR2_PACKAGE_WESTON_DEMO_CLIENTS=y +# BR2_PACKAGE_XORG7 is not set +# BR2_PACKAGE_APITRACE is not set +# BR2_PACKAGE_MUPDF is not set @@ -1063,9 +1058,15 @@ +# BR2_PACKAGE_ALTERA_STAPL is not set +# BR2_PACKAGE_APCUPSD is not set +# BR2_PACKAGE_AVRDUDE is not set -+BR2_PACKAGE_BCACHE_TOOLS=y ++ ++# ++# bcache-tools needs udev /dev management ++# +# BR2_PACKAGE_BFSCRIPTS is not set -+# BR2_PACKAGE_BRICKD is not set ++ ++# ++# brickd needs udev /dev management, a toolchain w/ threads, wchar ++# +# BR2_PACKAGE_BRLTTY is not set +# BR2_PACKAGE_CC_TOOL is not set +# BR2_PACKAGE_CDRKIT is not set @@ -1081,7 +1082,10 @@ +# dahdi-tools needs a toolchain w/ threads and a Linux kernel to be built +# +BR2_PACKAGE_DBUS=y -+# BR2_PACKAGE_DBUS_BROKER is not set ++ ++# ++# dbusbroker needs systemd and a toolchain w/ threads ++# +# BR2_PACKAGE_DBUS_CPP is not set +# BR2_PACKAGE_DBUS_CXX is not set +# BR2_PACKAGE_DBUS_GLIB is not set @@ -1090,7 +1094,10 @@ +# BR2_PACKAGE_DFU_UTIL is not set +# BR2_PACKAGE_DMIDECODE is not set +# BR2_PACKAGE_DMRAID is not set -+# BR2_PACKAGE_DT_UTILS is not set ++ ++# ++# dt-utils needs udev /dev management ++# + +# +# dtbocfg needs a Linux kernel to be built @@ -1103,8 +1110,10 @@ +# +# esp-hosted needs a Linux kernel to be built +# -+# BR2_PACKAGE_ESPFLASH is not set -+BR2_PACKAGE_PROVIDES_UDEV="systemd" ++ ++# ++# espflash needs udev /dev management ++# + +# +# eudev needs eudev /dev management @@ -1143,7 +1152,10 @@ +# BR2_PACKAGE_IRDA_UTILS is not set +BR2_PACKAGE_KBD=y +# BR2_PACKAGE_LCDPROC is not set -+# BR2_PACKAGE_LEDMON is not set ++ ++# ++# ledmon needs udev and a toolchain w/ threads ++# +# BR2_PACKAGE_LIBIEC61850 is not set +# BR2_PACKAGE_LIBMANETTE is not set +# BR2_PACKAGE_LIBUBOOTENV is not set @@ -1273,17 +1285,28 @@ +# BR2_PACKAGE_UBOOT_BOOTCOUNT is not set +# BR2_PACKAGE_UBOOT_TOOLS is not set +# BR2_PACKAGE_UBUS is not set -+BR2_PACKAGE_HAS_UDEV=y -+# BR2_PACKAGE_UDISKS is not set ++ ++# ++# udisks needs udev /dev management ++# +# BR2_PACKAGE_UEFISETTINGS is not set +# BR2_PACKAGE_UHUBCTL is not set +# BR2_PACKAGE_UMTPRD is not set -+# BR2_PACKAGE_UPOWER is not set ++ ++# ++# upower needs udev /dev management ++# +# BR2_PACKAGE_USB_MODESWITCH is not set +# BR2_PACKAGE_USB_MODESWITCH_DATA is not set +# BR2_PACKAGE_USBGUARD is not set -+# BR2_PACKAGE_USBMOUNT is not set -+# BR2_PACKAGE_USBUTILS is not set ++ ++# ++# usbmount requires udev to be enabled ++# ++ ++# ++# usbutils needs udev /dev management and toolchain w/ threads, gcc >= 4.9 ++# +# BR2_PACKAGE_W_SCAN is not set + +# @@ -1581,10 +1604,7 @@ +BR2_PACKAGE_BAYER2RGB_NEON_ARCH_SUPPORTS=y +# BR2_PACKAGE_BAYER2RGB_NEON is not set +# BR2_PACKAGE_BULLET is not set -+BR2_PACKAGE_CAIRO=y -+BR2_PACKAGE_CAIRO_PNG=y -+# BR2_PACKAGE_CAIRO_TEE is not set -+# BR2_PACKAGE_CAIRO_ZLIB is not set ++# BR2_PACKAGE_CAIRO is not set +# BR2_PACKAGE_CAIROMM is not set +# BR2_PACKAGE_CAIROMM1_14 is not set + @@ -1626,8 +1646,7 @@ +# BR2_PACKAGE_JPEG_TURBO_TOOLS is not set +BR2_PACKAGE_HAS_JPEG=y +BR2_PACKAGE_PROVIDES_JPEG="jpeg-turbo" -+BR2_PACKAGE_KMSXX=y -+# BR2_PACKAGE_KMSXX_INSTALL_TESTS is not set ++# BR2_PACKAGE_KMSXX is not set +# BR2_PACKAGE_LCMS2 is not set +# BR2_PACKAGE_LENSFUN is not set +# BR2_PACKAGE_LEPTONICA is not set @@ -1637,15 +1656,14 @@ +# BR2_PACKAGE_LIBDMTX is not set +BR2_PACKAGE_LIBDRM=y +BR2_PACKAGE_LIBDRM_HAS_ATOMIC=y -+BR2_PACKAGE_LIBDRM_ENABLE_ATOMIC=y -+BR2_PACKAGE_LIBDRM_INTEL=y ++# BR2_PACKAGE_LIBDRM_INTEL is not set +# BR2_PACKAGE_LIBDRM_RADEON is not set +# BR2_PACKAGE_LIBDRM_AMDGPU is not set -+BR2_PACKAGE_LIBDRM_NOUVEAU=y ++# BR2_PACKAGE_LIBDRM_NOUVEAU is not set +# BR2_PACKAGE_LIBDRM_ETNAVIV is not set +# BR2_PACKAGE_LIBDRM_FREEDRENO is not set +# BR2_PACKAGE_LIBDRM_VC4 is not set -+BR2_PACKAGE_LIBDRM_INSTALL_TESTS=y ++# BR2_PACKAGE_LIBDRM_INSTALL_TESTS is not set +# BR2_PACKAGE_LIBEPOXY is not set +# BR2_PACKAGE_LIBEXIF is not set + @@ -1663,7 +1681,6 @@ +# +# libglew depends on X.org and needs an OpenGL backend +# -+BR2_PACKAGE_LIBGLFW=y + +# +# libglu needs an OpenGL backend @@ -1695,30 +1712,23 @@ +BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF=y +BR2_PACKAGE_HAS_LIBGLES=y +# BR2_PACKAGE_OPENJPEG is not set -+BR2_PACKAGE_PANGO=y ++# BR2_PACKAGE_PANGO is not set +# BR2_PACKAGE_PANGOMM is not set +# BR2_PACKAGE_PANGOMM2_46 is not set +BR2_PACKAGE_PIXMAN=y +# BR2_PACKAGE_POPPLER is not set +# BR2_PACKAGE_STB is not set +# BR2_PACKAGE_TIFF is not set -+BR2_PACKAGE_WAFFLE_SUPPORTS_WAYLAND=y -+BR2_PACKAGE_WAFFLE_SUPPORTS_GBM=y -+# BR2_PACKAGE_WAFFLE is not set -+BR2_PACKAGE_WAYLAND=y -+BR2_PACKAGE_WAYLAND_PROTOCOLS=y -+BR2_PACKAGE_WAYLAND_UTILS=y -+# BR2_PACKAGE_WAYLANDPP is not set ++# BR2_PACKAGE_WAYLAND is not set +BR2_PACKAGE_WEBKITGTK_ARCH_SUPPORTS=y + +# +# webkitgtk needs libgtk3 and a toolchain w/ C++, wchar, threads, dynamic library, gcc >= 10, host gcc >= 4.9 +# +# BR2_PACKAGE_WEBP is not set -+BR2_PACKAGE_WLROOTS=y + +# -+# XWayland support needs X.org enabled ++# wlroots needs udev, EGL and OpenGL ES support +# +# BR2_PACKAGE_WOFF2 is not set +# BR2_PACKAGE_WPEBACKEND_FDO is not set @@ -1737,13 +1747,22 @@ +BR2_PACKAGE_GNU_EFI_ARCH_SUPPORTS=y +# BR2_PACKAGE_GNU_EFI is not set +# BR2_PACKAGE_HACKRF is not set -+# BR2_PACKAGE_HIDAPI is not set ++ ++# ++# hidapi needs udev /dev management and a toolchain w/ NPTL, gcc >= 4.9 ++# +# BR2_PACKAGE_JITTERENTROPY_LIBRARY is not set +# BR2_PACKAGE_LCDAPI is not set +# BR2_PACKAGE_LET_ME_CREATE is not set +# BR2_PACKAGE_LIBAIO is not set -+# BR2_PACKAGE_LIBATASMART is not set -+# BR2_PACKAGE_LIBBLOCKDEV is not set ++ ++# ++# libatasmart requires udev to be enabled ++# ++ ++# ++# libblockdev needs udev /dev management and a toolchain w/ wchar, threads, dynamic library, locale ++# +# BR2_PACKAGE_LIBCEC is not set +BR2_PACKAGE_LIBDISPLAY_INFO=y +# BR2_PACKAGE_LIBFREEFARE is not set @@ -1755,10 +1774,16 @@ +# +# libgpiod2 needs kernel headers >= 5.10 +# -+# BR2_PACKAGE_LIBGUDEV is not set ++ ++# ++# libgudev needs udev /dev handling and a toolchain w/ wchar, threads ++# +# BR2_PACKAGE_LIBHID is not set +# BR2_PACKAGE_LIBIIO is not set -+BR2_PACKAGE_LIBINPUT=y ++ ++# ++# libinput needs udev /dev management ++# +# BR2_PACKAGE_LIBIQRF is not set +# BR2_PACKAGE_LIBLLCP is not set +# BR2_PACKAGE_LIBMBIM is not set @@ -1996,8 +2021,7 @@ +# BR2_PACKAGE_LIBMAXMINDDB is not set +# BR2_PACKAGE_LIBMBUS is not set +# BR2_PACKAGE_LIBMEMCACHED is not set -+BR2_PACKAGE_LIBMICROHTTPD=y -+# BR2_PACKAGE_LIBMICROHTTPD_SSL is not set ++# BR2_PACKAGE_LIBMICROHTTPD is not set +# BR2_PACKAGE_LIBMINIUPNPC is not set +# BR2_PACKAGE_LIBMNL is not set +# BR2_PACKAGE_LIBMODBUS is not set @@ -2063,6 +2087,7 @@ +# BR2_PACKAGE_NETOPEER2 is not set +# BR2_PACKAGE_NGHTTP2 is not set +# BR2_PACKAGE_NORM is not set ++# BR2_PACKAGE_NSS_MYHOSTNAME is not set +# BR2_PACKAGE_NSS_PAM_LDAPD is not set +# BR2_PACKAGE_OATPP is not set +# BR2_PACKAGE_OMNIORB is not set @@ -2404,9 +2429,7 @@ +# BR2_PACKAGE_BANDWIDTHD is not set +# BR2_PACKAGE_BATCTL is not set +# BR2_PACKAGE_BCUSDK is not set -+BR2_PACKAGE_BIND=y -+# BR2_PACKAGE_BIND_SERVER is not set -+# BR2_PACKAGE_BIND_TOOLS is not set ++# BR2_PACKAGE_BIND is not set +# BR2_PACKAGE_BIRD is not set +# BR2_PACKAGE_BLUEZ5_UTILS is not set +# BR2_PACKAGE_BMON is not set @@ -2493,6 +2516,7 @@ +# BR2_PACKAGE_IFPLUGD is not set +# BR2_PACKAGE_IFTOP is not set +# BR2_PACKAGE_IFUPDOWN is not set ++BR2_PACKAGE_IFUPDOWN_SCRIPTS=y +# BR2_PACKAGE_IGD2_FOR_LINUX is not set + +# @@ -2566,8 +2590,10 @@ +# BR2_PACKAGE_NETPLUG is not set +# BR2_PACKAGE_NETSNMP is not set +# BR2_PACKAGE_NETSTAT_NAT is not set -+# BR2_PACKAGE_NETWORK_MANAGER is not set -+# BR2_PACKAGE_NETWORKD_DISPATCHER is not set ++ ++# ++# NetworkManager needs udev /dev management and a glibc or musl toolchain w/ headers >= 4.6, dynamic library, wchar, threads, gcc >= 4.9 ++# +# BR2_PACKAGE_NFACCT is not set +# BR2_PACKAGE_NFTABLES is not set +# BR2_PACKAGE_NGINX is not set @@ -2798,6 +2824,7 @@ +# +# setools needs python3 +# ++BR2_PACKAGE_URANDOM_SCRIPTS=y + +# +# Shell and utilities @@ -2870,6 +2897,7 @@ +# BR2_PACKAGE_AUDIT is not set +# BR2_PACKAGE_BALENA_ENGINE is not set +# BR2_PACKAGE_BUBBLEWRAP is not set ++# BR2_PACKAGE_CGROUPFS_MOUNT is not set + +# +# circus needs Python 3 and a toolchain w/ C++, threads @@ -2909,6 +2937,7 @@ +# BR2_PACKAGE_GKRELLM is not set +# BR2_PACKAGE_HTOP is not set +# BR2_PACKAGE_IBM_SW_TPM2 is not set ++BR2_PACKAGE_INITSCRIPTS=y + +# +# iotop depends on python3 @@ -2929,7 +2958,10 @@ +# libostree needs a uClibc or glibc toolchain w/ threads, dynamic library, wchar, headers >= 5.8 +# +BR2_PACKAGE_LIBVIRT_ARCH_SUPPORTS=y -+# BR2_PACKAGE_LIBVIRT is not set ++ ++# ++# libvirt needs udev /dev management, a toolchain w/ threads, dynamic library, wchar, kernel headers >= 3.12 (4.11 for AArch64) ++# +# BR2_PACKAGE_LXC is not set +BR2_PACKAGE_MAKEDUMPFILE_ARCH_SUPPORTS=y +# BR2_PACKAGE_MAKEDUMPFILE is not set @@ -2943,7 +2975,10 @@ +# mokutil needs a toolchain w/ dynamic library, threads, gcc >= 4.9, headers >= 3.12 +# +# BR2_PACKAGE_MONIT is not set -+# BR2_PACKAGE_MULTIPATH_TOOLS is not set ++ ++# ++# multipath-tools needs udev and a toolchain w/ threads, dynamic library, C++ ++# +# BR2_PACKAGE_NCDU is not set +# BR2_PACKAGE_NERDCTL is not set + @@ -2958,7 +2993,10 @@ +# +# pamtester depends on linux-pam +# -+# BR2_PACKAGE_PETITBOOT is not set ++ ++# ++# petitboot needs a toolchain w/ wchar, dynamic library, threads, udev /dev management ++# +# BR2_PACKAGE_POLKIT is not set +BR2_PACKAGE_PROCPS_NG=y +# BR2_PACKAGE_PROCPS_NG_ORIGINAL_TOP is not set @@ -2980,8 +3018,14 @@ +# BR2_PACKAGE_S6_RC is not set +# BR2_PACKAGE_SCRUB is not set +# BR2_PACKAGE_SCRYPT is not set -+# BR2_PACKAGE_SDBUS_CPP is not set -+# BR2_PACKAGE_SDBUSPLUS is not set ++ ++# ++# sdbus-c++ needs systemd and a toolchain w/ C++, gcc >= 8 ++# ++ ++# ++# sdbusplus needs systemd and a toolchain w/ C++, gcc >= 7 ++# +BR2_PACKAGE_SEATD=y +# BR2_PACKAGE_SEATD_BUILTIN is not set +BR2_PACKAGE_SEATD_DAEMON=y @@ -2996,52 +3040,8 @@ +# BR2_PACKAGE_SYSKLOGD is not set +BR2_PACKAGE_SYSLOG_NG=y +BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS=y -+BR2_PACKAGE_SYSTEMD=y -+# BR2_PACKAGE_SYSTEMD_INITRD is not set -+# BR2_PACKAGE_SYSTEMD_KERNELINSTALL is not set -+# BR2_PACKAGE_SYSTEMD_ANALYZE is not set -+# BR2_PACKAGE_SYSTEMD_EFI is not set -+# BR2_PACKAGE_SYSTEMD_JOURNAL_REMOTE is not set -+# BR2_PACKAGE_SYSTEMD_BACKLIGHT is not set -+# BR2_PACKAGE_SYSTEMD_BINFMT is not set -+# BR2_PACKAGE_SYSTEMD_COREDUMP is not set -+BR2_PACKAGE_SYSTEMD_PSTORE=y -+# BR2_PACKAGE_SYSTEMD_FIRSTBOOT is not set -+# BR2_PACKAGE_SYSTEMD_HIBERNATE is not set -+# BR2_PACKAGE_SYSTEMD_HOMED is not set -+BR2_PACKAGE_SYSTEMD_HOSTNAMED=y -+BR2_PACKAGE_SYSTEMD_HWDB=y -+# BR2_PACKAGE_SYSTEMD_IMPORTD is not set -+# BR2_PACKAGE_SYSTEMD_CATALOGDB is not set -+# BR2_PACKAGE_SYSTEMD_LOCALED is not set -+# BR2_PACKAGE_SYSTEMD_LOGIND is not set -+# BR2_PACKAGE_SYSTEMD_MACHINED is not set -+# BR2_PACKAGE_SYSTEMD_NSRESOURCED is not set -+BR2_PACKAGE_SYSTEMD_MYHOSTNAME=y -+BR2_PACKAGE_SYSTEMD_NETWORKD=y -+# BR2_PACKAGE_SYSTEMD_OOMD is not set -+# BR2_PACKAGE_SYSTEMD_POLKIT is not set -+# BR2_PACKAGE_SYSTEMD_PORTABLED is not set -+# BR2_PACKAGE_SYSTEMD_QUOTACHECK is not set -+# BR2_PACKAGE_SYSTEMD_RANDOMSEED is not set -+# BR2_PACKAGE_SYSTEMD_REPART is not set -+BR2_PACKAGE_SYSTEMD_RESOLVED=y -+# BR2_PACKAGE_SYSTEMD_RFKILL is not set -+# BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT is not set -+# BR2_PACKAGE_SYSTEMD_SYSEXT is not set -+# BR2_PACKAGE_SYSTEMD_MOUNTFSD is not set -+# BR2_PACKAGE_SYSTEMD_SYSUPDATE is not set -+# BR2_PACKAGE_SYSTEMD_SYSUSERS is not set -+BR2_PACKAGE_SYSTEMD_TIMEDATED=y -+BR2_PACKAGE_SYSTEMD_TIMESYNCD=y -+# BR2_PACKAGE_SYSTEMD_USERDB is not set -+# BR2_PACKAGE_SYSTEMD_UTMP is not set -+BR2_PACKAGE_SYSTEMD_VCONSOLE=y -+BR2_PACKAGE_SYSTEMD_VCONSOLE_DEFAULT_KEYMAP="us" -+BR2_PACKAGE_SYSTEMD_VMSPAWN_ARCH_SUPPORTS=y -+# BR2_PACKAGE_SYSTEMD_VMSPAWN is not set +BR2_PACKAGE_SYSTEMD_BOOTCHART_ARCH_SUPPORTS=y -+# BR2_PACKAGE_SYSTEMD_BOOTCHART is not set ++BR2_PACKAGE_SYSVINIT=y +# BR2_PACKAGE_TAR is not set +# BR2_PACKAGE_TEALDEER is not set +# BR2_PACKAGE_TPM_TOOLS is not set @@ -3050,7 +3050,6 @@ +# BR2_PACKAGE_TPM2_TOTP is not set +# BR2_PACKAGE_UNSCD is not set +BR2_PACKAGE_UTIL_LINUX=y -+BR2_PACKAGE_UTIL_LINUX_LIBS=y +BR2_PACKAGE_UTIL_LINUX_LIBBLKID=y +# BR2_PACKAGE_UTIL_LINUX_LIBFDISK is not set +BR2_PACKAGE_UTIL_LINUX_LIBMOUNT=y @@ -3328,7 +3327,6 @@ +# BR2_PACKAGE_HOST_SWIG is not set +# BR2_PACKAGE_HOST_SWTPM is not set +# BR2_PACKAGE_HOST_SWUGENERATOR is not set -+BR2_PACKAGE_HOST_SYSTEMD=y +# BR2_PACKAGE_HOST_TIPIDEE is not set +# BR2_PACKAGE_HOST_UBOOT_TOOLS is not set +# BR2_PACKAGE_HOST_UTIL_LINUX is not set diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0/0012-auto-getty.mk.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0004-auto-getty.mk.patch similarity index 81% rename from build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0/0012-auto-getty.mk.patch rename to build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0004-auto-getty.mk.patch index 2d4537f..eb95536 100644 --- a/build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0/0012-auto-getty.mk.patch +++ b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0004-auto-getty.mk.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/edgemtech/infrabase/build/tmp/work/buildroot-2024.11-r0/buildroot-2024.11/package/auto-getty/auto-getty.mk 1970-01-01 01:00:00.000000000 +0100 -+++ ./package/auto-getty/auto-getty.mk 2024-11-13 15:28:29.606258950 +0100 +--- a/package/auto-getty/auto-getty.mk ++++ b/package/auto-getty/auto-getty.mk @@ -0,0 +1,33 @@ +################################################################################ +# diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0/0013-Config.in.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0005-Config.in.patch similarity index 71% rename from build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0/0013-Config.in.patch rename to build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0005-Config.in.patch index 1b347ad..406ea2e 100644 --- a/build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0/0013-Config.in.patch +++ b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0005-Config.in.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/edgemtech/infrabase/build/tmp/work/buildroot-2024.11-r0/buildroot-2024.11/package/auto-getty/Config.in 1970-01-01 01:00:00.000000000 +0100 -+++ ./package/auto-getty/Config.in 2024-11-13 15:28:29.606258950 +0100 +--- a/package/auto-getty/Config.in ++++ b/package/auto-getty/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_AUTO_GETTY_SUPPORT + bool "auto-getty: Enable auto console support" diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0/0014-auto-getty.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0006-auto-getty.patch similarity index 79% rename from build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0/0014-auto-getty.patch rename to build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0006-auto-getty.patch index 3c3b442..30b1f06 100644 --- a/build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0/0014-auto-getty.patch +++ b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0006-auto-getty.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/edgemtech/infrabase/build/tmp/work/buildroot-2024.11-r0/buildroot-2024.11/package/auto-getty/src/auto-getty 1970-01-01 01:00:00.000000000 +0100 -+++ ./package/auto-getty/src/auto-getty 2024-11-13 15:28:29.606258950 +0100 +--- a/package/auto-getty/src/auto-getty ++++ b/package/auto-getty/src/auto-getty @@ -0,0 +1,36 @@ +#!/bin/sh -e + diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0007-autogetty.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0007-autogetty.patch new file mode 100644 index 0000000..696ceb1 --- /dev/null +++ b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0007-autogetty.patch @@ -0,0 +1,5 @@ +--- a/package/auto-getty/src/autogetty ++++ b/package/auto-getty/src/autogetty +@@ -0,0 +1,2 @@ ++# here you can provide what to run instead of /bin/login ++AUTOGETTY_ARGS="-n -l /usr/bin/auto-root-login" diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0008-auto-root-login.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0008-auto-root-login.patch new file mode 100644 index 0000000..6e09356 --- /dev/null +++ b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0008-auto-root-login.patch @@ -0,0 +1,6 @@ +--- a/package/auto-getty/src/auto-root-login ++++ b/package/auto-getty/src/auto-root-login +@@ -0,0 +1,3 @@ ++#!/bin/sh ++ ++exec /bin/login -f root diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0/0017-S91auto-getty.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0009-S91auto-getty.patch similarity index 69% rename from build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0/0017-S91auto-getty.patch rename to build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0009-S91auto-getty.patch index de63d61..f6df33a 100644 --- a/build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0/0017-S91auto-getty.patch +++ b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0009-S91auto-getty.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/edgemtech/infrabase/build/tmp/work/buildroot-2024.11-r0/buildroot-2024.11/package/auto-getty/src/S91auto-getty 1970-01-01 01:00:00.000000000 +0100 -+++ ./package/auto-getty/src/S91auto-getty 2024-11-13 15:28:29.606258950 +0100 +--- a/package/auto-getty/src/S91auto-getty ++++ b/package/auto-getty/src/S91auto-getty @@ -0,0 +1,28 @@ +#!/bin/sh + diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0010-Config.in.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0010-Config.in.patch new file mode 100644 index 0000000..e6d000f --- /dev/null +++ b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0010-Config.in.patch @@ -0,0 +1,23 @@ +--- a/package/Config.in ++++ b/package/Config.in +@@ -620,6 +620,10 @@ + source "package/sdparm/Config.in" + source "package/sedutil/Config.in" + source "package/setserial/Config.in" ++ if !BR2_PACKAGE_BUSYBOX_HIDE_OTHERS ++ # busybox has fdisk ++ source "package/sfdisk/Config.in" ++ endif + source "package/sg3_utils/Config.in" + source "package/sigrok-cli/Config.in" + source "package/sispmctl/Config.in" +@@ -2756,6 +2760,9 @@ + source "package/apg/Config.in" + source "package/at/Config.in" + source "package/bash-completion/Config.in" ++ ++ source "package/auto-getty/Config.in" ++ + source "package/catatonit/Config.in" + source "package/ccrypt/Config.in" + source "package/crudini/Config.in" diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0011-.br2-external.in.init.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0011-.br2-external.in.init.patch new file mode 100644 index 0000000..a1082a9 --- /dev/null +++ b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0011-.br2-external.in.init.patch @@ -0,0 +1,8 @@ +--- a/output/.br2-external.in.init ++++ b/output/.br2-external.in.init +@@ -0,0 +1,5 @@ ++# ++# Automatically generated file; DO NOT EDIT. ++# ++ ++# No br2-external tree defined. diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0012-.br2-external.in.jpeg.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0012-.br2-external.in.jpeg.patch new file mode 100644 index 0000000..25f7dac --- /dev/null +++ b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0012-.br2-external.in.jpeg.patch @@ -0,0 +1,8 @@ +--- a/output/.br2-external.in.jpeg ++++ b/output/.br2-external.in.jpeg +@@ -0,0 +1,5 @@ ++# ++# Automatically generated file; DO NOT EDIT. ++# ++ ++# No br2-external tree defined. diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0013-.br2-external.in.linux.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0013-.br2-external.in.linux.patch new file mode 100644 index 0000000..5eff260 --- /dev/null +++ b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0013-.br2-external.in.linux.patch @@ -0,0 +1,8 @@ +--- a/output/.br2-external.in.linux ++++ b/output/.br2-external.in.linux +@@ -0,0 +1,5 @@ ++# ++# Automatically generated file; DO NOT EDIT. ++# ++ ++# No br2-external tree defined. diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0014-.br2-external.in.menus.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0014-.br2-external.in.menus.patch new file mode 100644 index 0000000..cc9c53a --- /dev/null +++ b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0014-.br2-external.in.menus.patch @@ -0,0 +1,8 @@ +--- a/output/.br2-external.in.menus ++++ b/output/.br2-external.in.menus +@@ -0,0 +1,5 @@ ++# ++# Automatically generated file; DO NOT EDIT. ++# ++ ++# No br2-external tree defined. diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0015-.br2-external.in.openssl.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0015-.br2-external.in.openssl.patch new file mode 100644 index 0000000..6631733 --- /dev/null +++ b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0015-.br2-external.in.openssl.patch @@ -0,0 +1,8 @@ +--- a/output/.br2-external.in.openssl ++++ b/output/.br2-external.in.openssl +@@ -0,0 +1,5 @@ ++# ++# Automatically generated file; DO NOT EDIT. ++# ++ ++# No br2-external tree defined. diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0016-.br2-external.in.paths.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0016-.br2-external.in.paths.patch new file mode 100644 index 0000000..2ab6c4d --- /dev/null +++ b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0016-.br2-external.in.paths.patch @@ -0,0 +1,8 @@ +--- a/output/.br2-external.in.paths ++++ b/output/.br2-external.in.paths +@@ -0,0 +1,5 @@ ++# ++# Automatically generated file; DO NOT EDIT. ++# ++ ++# No br2-external tree defined. diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0017-.br2-external.in.skeleton.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0017-.br2-external.in.skeleton.patch new file mode 100644 index 0000000..4d69b58 --- /dev/null +++ b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0017-.br2-external.in.skeleton.patch @@ -0,0 +1,8 @@ +--- a/output/.br2-external.in.skeleton ++++ b/output/.br2-external.in.skeleton +@@ -0,0 +1,5 @@ ++# ++# Automatically generated file; DO NOT EDIT. ++# ++ ++# No br2-external tree defined. diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0018-.br2-external.in.toolchains.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0018-.br2-external.in.toolchains.patch new file mode 100644 index 0000000..44bd384 --- /dev/null +++ b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0018-.br2-external.in.toolchains.patch @@ -0,0 +1,8 @@ +--- a/output/.br2-external.in.toolchains ++++ b/output/.br2-external.in.toolchains +@@ -0,0 +1,5 @@ ++# ++# Automatically generated file; DO NOT EDIT. ++# ++ ++# No br2-external tree defined. diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0019-.br2-external.mk.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0019-.br2-external.mk.patch new file mode 100644 index 0000000..e920ee8 --- /dev/null +++ b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0019-.br2-external.mk.patch @@ -0,0 +1,13 @@ +--- a/output/.br2-external.mk ++++ b/output/.br2-external.mk +@@ -0,0 +1,10 @@ ++# ++# Automatically generated file; DO NOT EDIT. ++# ++ ++BR2_EXTERNAL ?= ++export BR2_EXTERNAL_NAMES = ++BR2_EXTERNAL_DIRS = ++BR2_EXTERNAL_MKS = ++ ++# No br2-external tree defined. diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0020-.depend.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0020-.depend.patch new file mode 100644 index 0000000..2b9cd24 --- /dev/null +++ b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0020-.depend.patch @@ -0,0 +1,16 @@ +--- a/output/build/buildroot-config/.depend ++++ b/output/build/buildroot-config/.depend +@@ -0,0 +1,13 @@ ++conf.o: conf.c lkc.h expr.h list.h lkc_proto.h ++confdata.o: confdata.c lkc.h expr.h list.h lkc_proto.h ++expr.o: expr.c lkc.h expr.h list.h lkc_proto.h ++gconf.o: gconf.c lkc.h expr.h list.h lkc_proto.h images.c ++images.o: images.c ++kconf_id.o: kconf_id.c ++kxgettext.o: kxgettext.c lkc.h expr.h list.h lkc_proto.h ++mconf.o: mconf.c lkc.h expr.h list.h lkc_proto.h lxdialog/dialog.h ++menu.o: menu.c lkc.h expr.h list.h lkc_proto.h ++nconf.o: nconf.c lkc.h expr.h list.h lkc_proto.h nconf.h ++nconf.gui.o: nconf.gui.c nconf.h lkc.h expr.h list.h lkc_proto.h ++symbol.o: symbol.c lkc.h expr.h list.h lkc_proto.h ++util.o: util.c lkc.h expr.h list.h lkc_proto.h diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0021-Config.in.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0021-Config.in.patch new file mode 100644 index 0000000..19ebd9d --- /dev/null +++ b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0021-Config.in.patch @@ -0,0 +1,8 @@ +--- a/package/sfdisk/Config.in ++++ b/package/sfdisk/Config.in +@@ -0,0 +1,5 @@ ++config BR2_PACKAGE_SFDISK ++ bool "sfdisk" ++ default n ++ help ++ Partition table manipulator for Linux. diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0022-sfdisk.001.include_sys_syscalls_h.patch.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0022-sfdisk.001.include_sys_syscalls_h.patch.patch new file mode 100644 index 0000000..01869b9 --- /dev/null +++ b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0022-sfdisk.001.include_sys_syscalls_h.patch.patch @@ -0,0 +1,15 @@ +--- a/package/sfdisk/sfdisk.001.include_sys_syscalls_h.patch ++++ b/package/sfdisk/sfdisk.001.include_sys_syscalls_h.patch +@@ -0,0 +1,12 @@ ++--- sfdisk/sfdisk.c.oorig 2006-10-09 16:24:06.000000000 +0200 +++++ sfdisk/sfdisk.c 2006-10-09 16:24:20.000000000 +0200 ++@@ -47,6 +47,9 @@ ++ #include ++ #include ++ #ifdef __linux__ +++#define _LIBC +++#include +++#undef _LIBC ++ #include /* _syscall */ ++ #endif ++ #include "nls.h" diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0023-sfdisk.mk.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0023-sfdisk.mk.patch new file mode 100644 index 0000000..9c00bdb --- /dev/null +++ b/build/meta-rootfs/recipes-rootfs/buildroot/files/0001-buildroot-2024.11-r0/0023-sfdisk.mk.patch @@ -0,0 +1,52 @@ +--- a/package/sfdisk/sfdisk.mk ++++ b/package/sfdisk/sfdisk.mk +@@ -0,0 +1,49 @@ ++############################################################# ++# ++# sfdisk support ++# ++############################################################# ++SFDISK_VERSION:= ++SFDISK_SOURCE=sfdisk$(SFDISK_VERSION).tar.bz2 ++SFDISK_CAT:=$(BZCAT) ++SFDISK_SITE:=http://www.uclibc.org/ ++SFDISK_DIR=$(BUILD_DIR)/sfdisk$(SFDISK_VERSION) ++ ++$(DL_DIR)/$(SFDISK_SOURCE): ++ $(WGET) -P $(DL_DIR) $(SFDISK_SITE)/$(SFDISK_SOURCE) ++ ++$(SFDISK_DIR)/.patched: $(DL_DIR)/$(SFDISK_SOURCE) ++ $(SFDISK_CAT) $(DL_DIR)/$(SFDISK_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - ++ toolchain/patch-kernel.sh $(SFDISK_DIR) package/sfdisk/ sfdisk.\*.patch ++ touch $@ ++ ++ ++$(SFDISK_DIR)/sfdisk: $(SFDISK_DIR)/.patched ++ $(MAKE) \ ++ CROSS=$(TARGET_CROSS) DEBUG=false OPTIMIZATION="$(TARGET_CFLAGS)" \ ++ -C $(SFDISK_DIR) ++ -$(STRIPCMD) $(SFDISK_DIR)/sfdisk ++ touch -c $(SFDISK_DIR)/sfdisk ++ ++$(TARGET_DIR)/sbin/sfdisk: $(SFDISK_DIR)/sfdisk ++ cp $(SFDISK_DIR)/sfdisk $(TARGET_DIR)/sbin/sfdisk ++ touch -c $(TARGET_DIR)/sbin/sfdisk ++ ++sfdisk: uclibc $(TARGET_DIR)/sbin/sfdisk ++ ++sfdisk-source: $(DL_DIR)/$(SFDISK_SOURCE) ++ ++sfdisk-clean: ++ rm -f $(TARGET_DIR)/sbin/sfdisk ++ -$(MAKE) -C $(SFDISK_DIR) clean ++ ++sfdisk-dirclean: ++ rm -rf $(SFDISK_DIR) ++############################################################# ++# ++# Toplevel Makefile options ++# ++############################################################# ++ifeq ($(BR2_PACKAGE_SFDISK),y) ++TARGETS+=sfdisk ++endif diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0-patches.inc b/build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0-patches.inc deleted file mode 100644 index 96b2533..0000000 --- a/build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0-patches.inc +++ /dev/null @@ -1,10 +0,0 @@ -SRC_URI += "\ - file://0015-autogetty.patch \ - file://0017-S91auto-getty.patch \ - file://0014-auto-getty.patch \ - file://0012-auto-getty.mk.patch \ - file://0016-auto-root-login.patch \ - file://0018-Config.in.patch \ - file://0013-Config.in.patch \ - file://0019-rpi4_64_defconfig.patch \ -" diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0/0015-autogetty.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0/0015-autogetty.patch deleted file mode 100644 index 89da875..0000000 --- a/build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0/0015-autogetty.patch +++ /dev/null @@ -1,5 +0,0 @@ ---- /home/rossierd/edgemtech/infrabase/build/tmp/work/buildroot-2024.11-r0/buildroot-2024.11/package/auto-getty/src/autogetty 1970-01-01 01:00:00.000000000 +0100 -+++ ./package/auto-getty/src/autogetty 2024-11-13 15:28:29.606258950 +0100 -@@ -0,0 +1,2 @@ -+# here you can provide what to run instead of /bin/login -+AUTOGETTY_ARGS="-n -l /usr/bin/auto-root-login" diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0/0016-auto-root-login.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0/0016-auto-root-login.patch deleted file mode 100644 index d29076b..0000000 --- a/build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0/0016-auto-root-login.patch +++ /dev/null @@ -1,6 +0,0 @@ ---- /home/rossierd/edgemtech/infrabase/build/tmp/work/buildroot-2024.11-r0/buildroot-2024.11/package/auto-getty/src/auto-root-login 1970-01-01 01:00:00.000000000 +0100 -+++ ./package/auto-getty/src/auto-root-login 2024-11-13 15:28:29.606258950 +0100 -@@ -0,0 +1,3 @@ -+#!/bin/sh -+ -+exec /bin/login -f root diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0/0018-Config.in.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0/0018-Config.in.patch deleted file mode 100644 index 7c619ce..0000000 --- a/build/meta-rootfs/recipes-rootfs/buildroot/files/0002-buildroot-2024.11-r0/0018-Config.in.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- /home/rossierd/edgemtech/infrabase/build/tmp/work/buildroot-2024.11-r0/buildroot-2024.11/package/Config.in 2024-12-08 11:18:01.000000000 +0100 -+++ ./package/Config.in 2024-12-15 17:13:00.370627268 +0100 -@@ -2756,6 +2756,9 @@ - source "package/apg/Config.in" - source "package/at/Config.in" - source "package/bash-completion/Config.in" -+ -+ source "package/auto-getty/Config.in" -+ - source "package/catatonit/Config.in" - source "package/ccrypt/Config.in" - source "package/crudini/Config.in" diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0003-buildroot-2024.11-r0-patches.inc b/build/meta-rootfs/recipes-rootfs/buildroot/files/0003-buildroot-2024.11-r0-patches.inc deleted file mode 100644 index 015068d..0000000 --- a/build/meta-rootfs/recipes-rootfs/buildroot/files/0003-buildroot-2024.11-r0-patches.inc +++ /dev/null @@ -1,3 +0,0 @@ -SRC_URI += "\ - file://0001-rpi4_64_defconfig.patch \ -" \ No newline at end of file diff --git a/build/meta-rootfs/recipes-rootfs/buildroot/files/0003-buildroot-2024.11-r0/0001-rpi4_64_defconfig.patch b/build/meta-rootfs/recipes-rootfs/buildroot/files/0003-buildroot-2024.11-r0/0001-rpi4_64_defconfig.patch deleted file mode 100644 index d8c35d0..0000000 --- a/build/meta-rootfs/recipes-rootfs/buildroot/files/0003-buildroot-2024.11-r0/0001-rpi4_64_defconfig.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- /home/rossierd/soo/micofe/27/build/tmp/work/buildroot-2024.11-r0/buildroot-2024.11/configs/rpi4_64_defconfig 2026-03-13 09:29:30.423242388 +0100 -+++ ./configs/rpi4_64_defconfig 2026-03-13 09:30:39.195383719 +0100 -@@ -1,6 +1,6 @@ - # - # Automatically generated file; DO NOT EDIT. --# Buildroot -ge5ce03f6b-dirty Configuration -+# Buildroot -g531352d-dirty Configuration - # - BR2_HAVE_DOT_CONFIG=y - BR2_HOST_GCC_AT_LEAST_4_9=y -@@ -1833,7 +1833,7 @@ - BR2_PACKAGE_JSON_C=y - # BR2_PACKAGE_JSON_FOR_MODERN_CPP is not set - # BR2_PACKAGE_JSON_GLIB is not set --# BR2_PACKAGE_JSONCPP is not set -+BR2_PACKAGE_JSONCPP=y - # BR2_PACKAGE_LIBBSON is not set - # BR2_PACKAGE_LIBFASTJSON is not set - # BR2_PACKAGE_LIBJSON is not set -@@ -1984,7 +1984,7 @@ - # BR2_PACKAGE_LIBGSASL is not set - # BR2_PACKAGE_LIBHTP is not set - # BR2_PACKAGE_LIBHTTPPARSER is not set --# BR2_PACKAGE_LIBHTTPSERVER is not set -+BR2_PACKAGE_LIBHTTPSERVER=y - # BR2_PACKAGE_LIBIDN is not set - # BR2_PACKAGE_LIBIDN2 is not set - # BR2_PACKAGE_LIBISCSI is not set -@@ -1993,7 +1993,8 @@ - # BR2_PACKAGE_LIBMAXMINDDB is not set - # BR2_PACKAGE_LIBMBUS is not set - # BR2_PACKAGE_LIBMEMCACHED is not set --# BR2_PACKAGE_LIBMICROHTTPD is not set -+BR2_PACKAGE_LIBMICROHTTPD=y -+# BR2_PACKAGE_LIBMICROHTTPD_SSL is not set - # BR2_PACKAGE_LIBMINIUPNPC is not set - # BR2_PACKAGE_LIBMNL is not set - # BR2_PACKAGE_LIBMODBUS is not set -@@ -4200,3 +4201,4 @@ - # BR2_PACKAGE_PERF is not set - # BR2_BINUTILS_VERSION_2_22 is not set - # BR2_PACKAGE_GPU_VIV_BIN_MX6Q is not set -+# BR2_TARGET_UBOOT_NETWORK is not set diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/common/post_build.sh b/build/meta-rootfs/recipes-rootfs/linux/files/board/common/post_build.sh index 446b130..8bea1a8 100755 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/common/post_build.sh +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/common/post_build.sh @@ -1,5 +1,7 @@ #! /bin/bash +# Copyright (c) 2025-2026 EDGEMTech SA + # Here, you can do something after build of rootfs is done but # before the final images (i.e. rootfs.tar) are generated. # See post_image.sh script for the latter. diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/common/post_image.sh b/build/meta-rootfs/recipes-rootfs/linux/files/board/common/post_image.sh index 468dce7..2baeed7 100755 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/common/post_image.sh +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/common/post_image.sh @@ -1,5 +1,7 @@ #! /bin/bash +# Copyright (c) 2025-2026 EDGEMTech SA + # Here, you can do something after the rootfs images has been # generated. # See post_build.sh script if you want to do something just before diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/default/dropbear b/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/default/dropbear new file mode 100644 index 0000000..b94f333 --- /dev/null +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/default/dropbear @@ -0,0 +1,2 @@ +# Allow blank password logins (development only) +DROPBEAR_ARGS="-B" diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/hostname b/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/hostname new file mode 100644 index 0000000..6dd468e --- /dev/null +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/hostname @@ -0,0 +1 @@ +micofe diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/init.d/S30soo b/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/init.d/S30soo new file mode 100755 index 0000000..781f371 --- /dev/null +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/init.d/S30soo @@ -0,0 +1,23 @@ +#!/bin/sh +# +# Create the SOO core device node used by the capsule management +# applications (s3c-inject, s3c-save, ...). The soo core driver +# registers char major 126 (soo/core) but does not create the node +# itself, and this rootfs boots with busybox init (no systemd, no +# udev) so it must be created here. + +case "$1" in +start) + if [ ! -c /dev/soo/core ]; then + mkdir -p /dev/soo + mknod /dev/soo/core c 126 0 + fi + ;; +stop) ;; +*) + echo "Usage: $0 {start|stop}" + exit 1 + ;; +esac + +exit 0 diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/inittab.d/.gitkeep b/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/inittab.d/.gitkeep new file mode 100644 index 0000000..33fe2a8 --- /dev/null +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/inittab.d/.gitkeep @@ -0,0 +1,6 @@ +# Placeholder so /etc/inittab.d exists in the rootfs. +# +# sysvinit >= 3.04 scans /etc/inittab.d/*.conf in addition to /etc/inittab +# and prints "INIT: No inittab.d directory found" when the directory is +# absent. Shipping the (empty) directory silences that boot message. Only +# *.conf snippets are read here, so this file is ignored by init. diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/issue b/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/issue new file mode 100644 index 0000000..daa43b5 --- /dev/null +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/issue @@ -0,0 +1,2 @@ +MICOFE — REDS Institute, HEIG-VD + diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/network/interfaces b/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/network/interfaces index 5ee4469..c2c3f23 100755 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/network/interfaces +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/network/interfaces @@ -2,15 +2,6 @@ auto lo iface lo inet loopback -# Physical eth0 interface +# Ethernet — DHCP auto eth0 -#iface eth0 inet dhcp -iface eth0 inet6 manual -up ip link set eth0 up -down ip link set eth0 down - -# wifi -#auto wlan0 -#allow-hotplug wlan0 - - +iface eth0 inet dhcp diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/profile b/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/profile index e3c52ce..5986153 100755 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/profile +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/profile @@ -9,6 +9,20 @@ export PATH=\ /usr/local/bin:\ /opt/bin +if [ "$PS1" ]; then + printf "\n" + printf "\033[38;2;120;215;255m ███╗ ███╗██╗ ██████╗ ██████╗ ███████╗███████╗\033[0m\n" + printf "\033[38;2;90;190;255m ████╗ ████║██║██╔════╝██╔═══██╗██╔════╝██╔════╝\033[0m\n" + printf "\033[38;2;64;160;248m ██╔████╔██║██║██║ ██║ ██║█████╗ █████╗ \033[0m\n" + printf "\033[38;2;48;132;240m ██║╚██╔╝██║██║██║ ██║ ██║██╔══╝ ██╔══╝ \033[0m\n" + printf "\033[38;2;36;106;230m ██║ ╚═╝ ██║██║╚██████╗╚██████╔╝██║ ███████╗\033[0m\n" + printf "\033[38;2;28;84;220m ╚═╝ ╚═╝╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝\033[0m\n" + printf "\n" + printf "\033[38;2;120;215;255m Welcome to \033[1;38;2;48;132;240mMICOFE\033[0m\n" + printf "\033[0;37m REDS HEIG-VD — %s %s\033[0m\n" "$(uname -s)" "$(uname -r)" + printf "\n" +fi + # If running interactively, then: if [ "$PS1" ]; then diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/soo/remove_logs.sh b/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/soo/remove_logs.sh index 9ddfba7..7b55c9b 100755 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/soo/remove_logs.sh +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/soo/remove_logs.sh @@ -1,5 +1,7 @@ #!/bin/sh +# Copyright (c) 2025-2026 EDGEMTech SA + # Remove the README in Capsules image folder rm -f /mnt/capsules/image/README diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/syslog-ng.conf b/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/syslog-ng.conf index 2dc9a9e..3d3f708 100644 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/syslog-ng.conf +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/common/rootfs_overlay/etc/syslog-ng.conf @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA + @version: 4.7 # syslog configuration for a smart object (SOO) @@ -23,16 +25,16 @@ source s_kernel { }; # Define a custom parser -parser p_me { +parser p_s3c { regexp-parser( prefix("parsed_") - patterns('\[ME:(?\d+)\].*$') + patterns('\[S3C:(?\d+)\].*$') ); }; -# Logging of MEs -destination d_me { - file("/var/log/soo/me_${parsed_id}.log" +# Logging of capsules +destination d_s3c { + file("/var/log/soo/s3c_${parsed_id}.log" # It’s good to ensure directory creation and permissions create_dirs(yes) dir_owner("root") @@ -47,6 +49,6 @@ destination d_me { log { source(s_kernel); - parser(p_me); - destination(d_me); + parser(p_s3c); + destination(d_s3c); }; diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/post_image.sh b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/post_image.sh index 3c54434..15e30f2 100755 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/post_image.sh +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/post_image.sh @@ -1,9 +1,12 @@ #! /bin/bash +# Copyright (c) 2025-2026 EDGEMTech SA + # Here, you can do something after the rootfs images has been # generated. # See post_build.sh script if you want to do something just before # the images are generated. # Note: you should have access to most BR variables here. + cp ${BASE_DIR}/images/rootfs.cpio ${BASE_DIR}/board/rpi4 diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/etc/bluetooth/input.conf b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/etc/bluetooth/input.conf index 3e1d65a..577646c 100644 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/etc/bluetooth/input.conf +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/etc/bluetooth/input.conf @@ -1,7 +1,10 @@ +# Copyright (c) 2025-2026 EDGEMTech SA + # Configuration file for the input service # This section contains options which are not specific to any # particular interface + [General] # Set idle timeout (in minutes) before the connection will diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/etc/bluetooth/main.conf b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/etc/bluetooth/main.conf index 511d98a..785f589 100644 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/etc/bluetooth/main.conf +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/etc/bluetooth/main.conf @@ -1,7 +1,10 @@ +# Copyright (c) 2025-2026 EDGEMTech SA + [General] # Default adapter name # Defaults to 'BlueZ X.YZ' + Name = soo-rpi4-bt # Default device class. Only the major and minor device class bits are @@ -11,6 +14,7 @@ Name = soo-rpi4-bt # How long to stay in discoverable mode before going back to non-discoverable # The value is in seconds. Default is 180, i.e. 3 minutes. # 0 = disable timer, i.e. stay discoverable forever + DiscoverableTimeout = 0 # How long to stay in pairable mode before going back to non-discoverable @@ -93,4 +97,5 @@ DiscoverableTimeout = 0 # AutoEnable defines option to enable all controllers when they are found. # This includes adapters present on start as well as adapters that are plugged # in later on. Defaults to 'false'. + AutoEnable=true diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/etc/bluetooth/network.conf b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/etc/bluetooth/network.conf index 5f11639..d4b5a5c 100644 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/etc/bluetooth/network.conf +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/etc/bluetooth/network.conf @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA + # Configuration file for the network service [General] diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/etc/bluetooth/proximity.conf b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/etc/bluetooth/proximity.conf index 417610f..4147dd8 100644 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/etc/bluetooth/proximity.conf +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/etc/bluetooth/proximity.conf @@ -1,9 +1,13 @@ +# Copyright (c) 2025-2026 EDGEMTech SA + # Configuration file for the proximity service # This section contains options which are not specific to any # particular interface + [General] # Configuration to allow disabling Proximity services # Allowed values: LinkLoss,PathLoss,FindMe + Disable=PathLoss diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/etc/fstab b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/etc/fstab index 61eb11e..3a3abb0 100644 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/etc/fstab +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/etc/fstab @@ -8,7 +8,7 @@ tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0 sysfs /sys sysfs defaults 0 0 /dev/mmcblk0p1 /mnt/boot vfat defaults 0 2 /dev/mmcblk0p2 /mnt/rootfs1 ext4 defaults 0 2 -/dev/mmcblk0p3 /mnt/ME ext4 defaults 0 2 +/dev/mmcblk0p3 /mnt/s3c ext4 defaults 0 2 /dev/mmcblk0p4 /mnt/rootfs2 ext4 defaults 0 2 diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/root/btmanager.sh b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/root/btmanager.sh index da1e656..fcd8571 100755 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/root/btmanager.sh +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/root/btmanager.sh @@ -1,5 +1,7 @@ #!/bin/bash +# Copyright (c) 2025-2026 EDGEMTech SA + # BT_TTY="/dev/ttyAMA0" diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/root/otherapps.sh b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/root/otherapps.sh index 30370ad..4e0b3ec 100755 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/root/otherapps.sh +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/root/otherapps.sh @@ -1,5 +1,7 @@ #!/bin/bash +# Copyright (c) 2025-2026 EDGEMTech SA + python /root/sootest.py & diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/root/soo_env.sh b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/root/soo_env.sh index 377db18..b94b5cd 100755 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/root/soo_env.sh +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/root/soo_env.sh @@ -1,3 +1,4 @@ +# Copyright (c) 2025-2026 EDGEMTech SA # This script is sourced by initd script diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/root/wifimanager.sh b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/root/wifimanager.sh index 39d8a1a..fada97d 100755 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/root/wifimanager.sh +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4/rootfs_overlay/root/wifimanager.sh @@ -1,4 +1,7 @@ #!/bin/sh + +# Copyright (c) 2025-2026 EDGEMTech SA + iw reg set CH iw wlan0 set type ibss iwconfig wlan0 essid "soo-wifi" diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/initrd.cpio b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/initrd.cpio index 3ae6c8c..4f9654d 100644 Binary files a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/initrd.cpio and b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/initrd.cpio differ diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/initrd_init.sh b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/initrd_init.sh new file mode 100755 index 0000000..4550e3c --- /dev/null +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/initrd_init.sh @@ -0,0 +1,46 @@ +#!/bin/sh +# Initramfs that pivots to the real root filesystem on disk. +# +# The agency Linux guest boots this small busybox ramfs from the ITB, then +# switch_root's into the full rootfs deployed by rootfs-linux:do_deploy on +# the SD card (p2, ext4 = /dev/mmcblk0p2). Selected with +# IB_RAMFS_SOURCE = "initrd" in conf/local.conf. + +/bin/mount -t proc proc /proc +/bin/mount -t sysfs sysfs /sys +/bin/mount -t devtmpfs devtmpfs /dev + +exec 0/dev/console +exec 2>/dev/console + +# The kernel always boots the ramfs (root=/dev/ram); mounting the real root +# is this script's job. p2 = the ext4 rootfs on the SD card. +ROOT_DEV=/dev/mmcblk0p2 + +# Wait for the SD-card rootfs partition to appear (~5 s max). +tries=0 +while [ ! -b "$ROOT_DEV" ] && [ "$tries" -lt 50 ]; do + /bin/sleep 0.1 + tries=$((tries + 1)) +done + +if [ ! -b "$ROOT_DEV" ]; then + echo "init: rootfs device $ROOT_DEV not found — emergency shell" + exec /bin/sh +fi + +/bin/mkdir -p /mnt/root +if ! /bin/mount -t ext4 -o rw "$ROOT_DEV" /mnt/root; then + echo "init: cannot mount $ROOT_DEV — emergency shell" + exec /bin/sh +fi + +# Carry the pseudo-filesystems into the new root (the kernel does not +# auto-mount devtmpfs once an initramfs /init has run). +/bin/mount --move /dev /mnt/root/dev 2>/dev/null +/bin/mount --move /proc /mnt/root/proc 2>/dev/null +/bin/mount --move /sys /mnt/root/sys 2>/dev/null + +echo "init: switching root to $ROOT_DEV" +exec /sbin/switch_root /mnt/root /sbin/init diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/post_image.sh b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/post_image.sh index 10eb8ba..e38b9e7 100755 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/post_image.sh +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/post_image.sh @@ -1,9 +1,12 @@ #! /bin/bash +# Copyright (c) 2025-2026 EDGEMTech SA + # Here, you can do something after the rootfs images has been # generated. # See post_build.sh script if you want to do something just before # the images are generated. # Note: you should have access to most BR variables here. + cp ${BASE_DIR}/images/rootfs.cpio ${BASE_DIR}/board/rpi4_64 diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/etc/bluetooth/input.conf b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/etc/bluetooth/input.conf index 3e1d65a..577646c 100644 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/etc/bluetooth/input.conf +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/etc/bluetooth/input.conf @@ -1,7 +1,10 @@ +# Copyright (c) 2025-2026 EDGEMTech SA + # Configuration file for the input service # This section contains options which are not specific to any # particular interface + [General] # Set idle timeout (in minutes) before the connection will diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/etc/bluetooth/main.conf b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/etc/bluetooth/main.conf index 511d98a..785f589 100644 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/etc/bluetooth/main.conf +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/etc/bluetooth/main.conf @@ -1,7 +1,10 @@ +# Copyright (c) 2025-2026 EDGEMTech SA + [General] # Default adapter name # Defaults to 'BlueZ X.YZ' + Name = soo-rpi4-bt # Default device class. Only the major and minor device class bits are @@ -11,6 +14,7 @@ Name = soo-rpi4-bt # How long to stay in discoverable mode before going back to non-discoverable # The value is in seconds. Default is 180, i.e. 3 minutes. # 0 = disable timer, i.e. stay discoverable forever + DiscoverableTimeout = 0 # How long to stay in pairable mode before going back to non-discoverable @@ -93,4 +97,5 @@ DiscoverableTimeout = 0 # AutoEnable defines option to enable all controllers when they are found. # This includes adapters present on start as well as adapters that are plugged # in later on. Defaults to 'false'. + AutoEnable=true diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/etc/bluetooth/network.conf b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/etc/bluetooth/network.conf index 5f11639..d4b5a5c 100644 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/etc/bluetooth/network.conf +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/etc/bluetooth/network.conf @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA + # Configuration file for the network service [General] diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/etc/bluetooth/proximity.conf b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/etc/bluetooth/proximity.conf index 417610f..4147dd8 100644 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/etc/bluetooth/proximity.conf +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/etc/bluetooth/proximity.conf @@ -1,9 +1,13 @@ +# Copyright (c) 2025-2026 EDGEMTech SA + # Configuration file for the proximity service # This section contains options which are not specific to any # particular interface + [General] # Configuration to allow disabling Proximity services # Allowed values: LinkLoss,PathLoss,FindMe + Disable=PathLoss diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/etc/hostname b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/etc/hostname new file mode 100644 index 0000000..6dd468e --- /dev/null +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/etc/hostname @@ -0,0 +1 @@ +micofe diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/etc/issue b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/etc/issue new file mode 100644 index 0000000..ba712da --- /dev/null +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/etc/issue @@ -0,0 +1,2 @@ +MICOFE — Raspberry Pi 4 (64-bit) + diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/root/btmanager.sh b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/root/btmanager.sh index a5ed30f..d937cc7 100755 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/root/btmanager.sh +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/root/btmanager.sh @@ -1,5 +1,7 @@ #!/bin/bash +# Copyright (c) 2025-2026 EDGEMTech SA + BT_TTY="/dev/ttyAMA0" diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/root/otherapps.sh b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/root/otherapps.sh index 30370ad..4e0b3ec 100755 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/root/otherapps.sh +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/root/otherapps.sh @@ -1,5 +1,7 @@ #!/bin/bash +# Copyright (c) 2025-2026 EDGEMTech SA + python /root/sootest.py & diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/root/soo_env.sh b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/root/soo_env.sh index 377db18..b94b5cd 100755 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/root/soo_env.sh +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/root/soo_env.sh @@ -1,3 +1,4 @@ +# Copyright (c) 2025-2026 EDGEMTech SA # This script is sourced by initd script diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/root/wifimanager.sh b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/root/wifimanager.sh index 39d8a1a..fada97d 100755 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/root/wifimanager.sh +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/rpi4_64/rootfs_overlay/root/wifimanager.sh @@ -1,4 +1,7 @@ #!/bin/sh + +# Copyright (c) 2025-2026 EDGEMTech SA + iw reg set CH iw wlan0 set type ibss iwconfig wlan0 essid "soo-wifi" diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/virt32/post_image.sh b/build/meta-rootfs/recipes-rootfs/linux/files/board/virt32/post_image.sh index 66cf7b5..0773f9b 100755 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/virt32/post_image.sh +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/virt32/post_image.sh @@ -1,10 +1,13 @@ #! /bin/bash +# Copyright (c) 2025-2026 EDGEMTech SA + # Here, you can do something after the rootfs images has been # generated. # See post_build.sh script if you want to do something just before # the images are generated. # Note: you should have access to most BR variables here. + cp ${BASE_DIR}/images/rootfs.cpio ${BASE_DIR}/board/virt32 diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/virt32/rootfs_overlay/etc/fstab b/build/meta-rootfs/recipes-rootfs/linux/files/board/virt32/rootfs_overlay/etc/fstab index b3380d9..bf4f5f2 100644 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/virt32/rootfs_overlay/etc/fstab +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/virt32/rootfs_overlay/etc/fstab @@ -6,5 +6,5 @@ tmpfs /dev/shm tmpfs mode=0777 0 0 tmpfs /tmp tmpfs mode=1777 0 0 tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0 sysfs /sys sysfs defaults 0 0 -/dev/vda3 /mnt/ME ext4 defaults 0 2 +/dev/vda3 /mnt/s3c ext4 defaults 0 2 diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/virt64/initrd.cpio b/build/meta-rootfs/recipes-rootfs/linux/files/board/virt64/initrd.cpio index 80b1e86..eecd39d 100644 Binary files a/build/meta-rootfs/recipes-rootfs/linux/files/board/virt64/initrd.cpio and b/build/meta-rootfs/recipes-rootfs/linux/files/board/virt64/initrd.cpio differ diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/virt64/initrd_init.sh b/build/meta-rootfs/recipes-rootfs/linux/files/board/virt64/initrd_init.sh new file mode 100644 index 0000000..e1abf99 --- /dev/null +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/virt64/initrd_init.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# Initramfs that pivots to the real root filesystem on disk. +# +# The agency Linux guest boots this small busybox ramfs from the ITB, then +# switch_root's into the full rootfs deployed by rootfs-linux:do_deploy on +# the virtio-blk disk (p2, ext4 = /dev/vda2). Selected with +# IB_RAMFS_SOURCE = "initrd" in conf/local.conf. + +/bin/mount -t proc proc /proc +/bin/mount -t sysfs sysfs /sys +/bin/mount -t devtmpfs devtmpfs /dev + +exec 0/dev/console +exec 2>/dev/console + +# Create the SOO core device node used by the capsule management +# applications (s3c-inject, s3c-save, ...). The soo core driver registers +# char major 126 (soo/core) but does not create the node itself and +# devtmpfs does not know it either. Created here (and carried into the +# real root by the mount --move below) so that it exists in every boot +# flavour, including the emergency shell. + +if [ ! -c /dev/soo/core ]; then + /bin/mkdir -p /dev/soo + /bin/mknod /dev/soo/core c 126 0 +fi + +# The kernel always boots the ramfs (root=/dev/ram); mounting the real root +# is this script's job. p2 = the ext4 rootfs on the virtio-blk disk. +ROOT_DEV=/dev/vda2 + +# Wait for the virtio-blk rootfs partition to appear (~5 s max). +tries=0 +while [ ! -b "$ROOT_DEV" ] && [ "$tries" -lt 50 ]; do + /bin/sleep 0.1 + tries=$((tries + 1)) +done + +if [ ! -b "$ROOT_DEV" ]; then + echo "init: rootfs device $ROOT_DEV not found — emergency shell" + exec /bin/sh +fi + +/bin/mkdir -p /mnt/root +if ! /bin/mount -t ext4 -o rw "$ROOT_DEV" /mnt/root; then + echo "init: cannot mount $ROOT_DEV — emergency shell" + exec /bin/sh +fi + +# Carry the pseudo-filesystems into the new root (the kernel does not +# auto-mount devtmpfs once an initramfs /init has run). +/bin/mount --move /dev /mnt/root/dev 2>/dev/null +/bin/mount --move /proc /mnt/root/proc 2>/dev/null +/bin/mount --move /sys /mnt/root/sys 2>/dev/null + +echo "init: switching root to $ROOT_DEV" +exec /sbin/switch_root /mnt/root /sbin/init diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/virt64/post_image.sh b/build/meta-rootfs/recipes-rootfs/linux/files/board/virt64/post_image.sh index 2aaa385..cdce699 100755 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/virt64/post_image.sh +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/virt64/post_image.sh @@ -1,9 +1,12 @@ #! /bin/bash +# Copyright (c) 2025-2026 EDGEMTech SA + # Here, you can do something after the rootfs images has been # generated. # See post_build.sh script if you want to do something just before # the images are generated. # Note: you should have access to most BR variables here. + cp ${BASE_DIR}/images/rootfs.cpio ${BASE_DIR}/board/virt64 diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/virt64/rootfs_overlay/etc/inittab b/build/meta-rootfs/recipes-rootfs/linux/files/board/virt64/rootfs_overlay/etc/inittab index 1e21896..a3aa8ae 100644 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/virt64/rootfs_overlay/etc/inittab +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/virt64/rootfs_overlay/etc/inittab @@ -1,35 +1,32 @@ -# /etc/inittab -# -# Copyright (C) 2001 Erik Andersen -# -# Note: BusyBox init doesn't support runlevels. The runlevels field is -# completely ignored by BusyBox init. If you want runlevels, use -# sysvinit. +# /etc/inittab for sysvinit # # Format for each entry: ::: # -# id == tty to run on, or empty for /dev/console -# runlevels == ignored -# action == one of sysinit, respawn, askfirst, wait, and once +# id == unique 1-4 char identifier +# runlevels == runlevels for which the entry applies +# action == one of initdefault, sysinit, wait, respawn, ctrlaltdel, shutdown, etc. # process == program to run +id:3:initdefault: + # Startup the system -null::sysinit:/bin/mount -t proc proc /proc -null::sysinit:/bin/mount -o remount,rw / -null::sysinit:/bin/mkdir -p /dev/pts -null::sysinit:/bin/mkdir -p /dev/shm -null::sysinit:/bin/mount -a -null::sysinit:/bin/hostname -F /etc/hostname +si0::sysinit:/bin/mount -t proc proc /proc +si1::sysinit:/bin/mount -o remount,rw / +si2::sysinit:/bin/mkdir -p /dev/pts +si3::sysinit:/bin/mkdir -p /dev/shm +si4::sysinit:/bin/mount -a +si5::sysinit:/bin/mkdir -p /run/lock +si6::sysinit:/bin/hostname -F /etc/hostname # now run any rc scripts -::sysinit:/etc/init.d/rcS +rcS::sysinit:/etc/init.d/rcS # Put a getty on the serial port -ttyAMA0::respawn:/sbin/getty -L -l /usr/bin/auto-root-login -n ttyAMA0 0 vt100 # GENERIC_SERIAL +AMA0::respawn:/sbin/getty -L -l /usr/bin/auto-root-login -n ttyAMA0 0 vt100 # GENERIC_SERIAL # Stuff to do for the 3-finger salute -::ctrlaltdel:/sbin/reboot +ca::ctrlaltdel:/sbin/reboot -# Stuff to do before rebooting -::shutdown:/etc/init.d/rcK -::shutdown:/sbin/swapoff -a -::shutdown:/bin/umount -a -r +# Stuff to do before rebooting (runlevels 0=halt, 6=reboot) +sd0:06:wait:/etc/init.d/rcK +sd1:06:wait:/sbin/swapoff -a +sd2:06:wait:/bin/umount -a -r diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/x86-qemu/post_build.sh b/build/meta-rootfs/recipes-rootfs/linux/files/board/x86-qemu/post_build.sh index 720d11f..0765942 100755 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/x86-qemu/post_build.sh +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/x86-qemu/post_build.sh @@ -1,5 +1,7 @@ #! /bin/bash +# Copyright (c) 2025-2026 EDGEMTech SA + # Here, you can do something after build of rootfs is done but # before the final images (i.e. rootfs.tar) are generated. # See post_image.sh script for the latter. diff --git a/build/meta-rootfs/recipes-rootfs/linux/files/board/x86-qemu/post_image.sh b/build/meta-rootfs/recipes-rootfs/linux/files/board/x86-qemu/post_image.sh index 0a5c46e..f745f0c 100755 --- a/build/meta-rootfs/recipes-rootfs/linux/files/board/x86-qemu/post_image.sh +++ b/build/meta-rootfs/recipes-rootfs/linux/files/board/x86-qemu/post_image.sh @@ -1,9 +1,12 @@ #! /bin/bash +# Copyright (c) 2025-2026 EDGEMTech SA + # Here, you can do something after the rootfs images has been # generated. # See post_build.sh script if you want to do something just before # the images are generated. # Note: you should have access to most BR variables here. + cp ${BASE_DIR}/images/rootfs.cpio ${BASE_DIR}/board/x86_qemu diff --git a/build/meta-rootfs/recipes-rootfs/linux/rootfs-linux_1.0.bb b/build/meta-rootfs/recipes-rootfs/linux/rootfs-linux_1.0.bb index 5da6c3c..d65f500 100644 --- a/build/meta-rootfs/recipes-rootfs/linux/rootfs-linux_1.0.bb +++ b/build/meta-rootfs/recipes-rootfs/linux/rootfs-linux_1.0.bb @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD SUMMARY = "Root filesystem" DESCRIPTION = "Root filesystem contents to be deployed on the target platform" @@ -21,7 +23,12 @@ do_configure[noexec] = "1" do_build[depends] = "${IB_ROOTFS_METHOD}:do_build" do_build[depends] += "linux:do_build" -# Check that the image is present before deploying rootfs +# do_deploy is a pure DEPLOY step: it extracts the already-built rootfs.cpio +# (apps baked in by usr-linux:do_deploy during the build) onto p2. It must +# NOT pull ${IB_ROOTFS_METHOD}:do_build — that would rebuild buildroot on +# every `deploy.sh`. The workflow is edit -> build.sh (produces rootfs.cpio) +# -> deploy.sh; a deploy with no prior build fails clearly in +# __do_rootfs_mount (missing rootfs.cpio) rather than silently rebuilding. do_deploy[depends] += "filesystem:do_fs_check" do_build[nostamp] = "1" @@ -32,13 +39,34 @@ do_build () { addtask do_build do_attach_infrabase[depends] = "${IB_ROOTFS_METHOD}:do_attach_infrabase" - + +# Re-run on every build so edits to the source board files (post_image.sh, +# rootfs_overlay, ...) are propagated into the working copy below. + +do_attach_infrabase[nostamp] = "1" + do_attach_infrabase () { - - # Remove previous link if any - rm -f ${IB_TARGET}/board - ln -fs ${FILE_DIRNAME}/files/board ${IB_TARGET}/board + # Keep a private working copy of the board directory under WORKDIR + # (tmp/work). The rootfs generator writes its productions there during + # the build (rootfs.cpio via post_image.sh, then rootfs.cpio.backup, + # initrd.cpio.gz, initrd.cpio.gz.srchash). Pointing the board symlink + # at this copy keeps those productions out of the git-tracked source + # tree under files/board. Note: board//initrd.cpio is now a + # git-tracked SOURCE (the static embedded ramfs for IB_RAMFS_SOURCE = + # "initrd"), refreshed from files/board on every attach. + # + # `cp -r .../board/.` refreshes the source config files on top of the + # copy but does NOT remove the dest-only productions, so the + # do_prepare_initrd content-hash guard (initrd.cpio.gz.srchash + + # initrd.cpio.gz) keeps working across builds. + mkdir -p ${WORKDIR}/board + cp -r ${FILE_DIRNAME}/files/board/. ${WORKDIR}/board + + # Expose the working copy through the historical board symlink so every + # consumer keeps referencing ${IB_ROOTFS_PATH}/board/... unchanged. + rm -f ${IB_TARGET}/board + ln -fs ${WORKDIR}/board ${IB_TARGET}/board } # Deployment of the rootfs contents @@ -54,6 +82,15 @@ python do_deploy () { bb.plain("Deploy the rootfs into the filesystem") + # Verdin-imx8mp does not deploy its rootfs via a build-time partition + # mount: storage is delivered through the platform's Tezi / HTTP recovery + # flow (IB_STORAGE_MODE = "http"), so the verdin __do_fs_mount would try + # to mount a physical /dev/sda1 that is absent in a build/CI context, + # so do_deploy returns early for verdin here. + if d.getVar('IB_PLATFORM') == "verdin-imx8mp": + bb.plain("verdin-imx8mp: rootfs delivered via Tezi/HTTP, skipping partition deploy") + return + __do_fs_mount(d) d.setVar('ROOTFS_FILENAME', 'rootfs') @@ -80,7 +117,12 @@ python do_deploy () { cmd = f"ls {IB_TARGET}/fs/." result = subprocess.run(cmd, shell=True, check=True) - cmd = f"cp -rv {IB_TARGET}/fs/. {IB_FILESYSTEM_PATH}/{IB_ROOTFS_PARTITION}" + # Privileged + archive copy: the source IB_TARGET/fs is the rootfs image + # loop-mounted as root (so its files are root-owned, some unreadable to the + # unprivileged builder — a plain `cp` aborts with exit 1), and the ext4 p2 + # rootfs needs ownership/perms/symlinks preserved (setuid bins, /etc/shadow, + # ...). `sudo cp -a` both reads the root-owned tree and reproduces it faithfully. + cmd = f"sudo cp -av {IB_TARGET}/fs/. {IB_FILESYSTEM_PATH}/{IB_ROOTFS_PARTITION}" result = subprocess.run(cmd, shell=True, check=True) @@ -90,9 +132,6 @@ python do_deploy () { __do_rootfs_umount(d) __do_fs_umount(d) - # Avoid creating logs,stamps and run files as root - utils_restore_user_ownership(d) - } addtask do_deploy @@ -101,11 +140,11 @@ do_clean[depends] = "${IB_ROOTFS_METHOD}:do_clean" do_clean[nostamp] = "1" do_clean () { - if ls "${IB_TARGET}/board/${IB_PLATFORM}/rootfs.cpio"* >/dev/null 2>&1; then - rm "${IB_TARGET}/board/${IB_PLATFORM}/rootfs.cpio"* - fi - - rm -f ${IB_TARGET}/board + # Drop the board working copy (holds every build production) and the + # symlink that exposed it under the rootfs path. + + rm -rf ${WORKDIR}/board + rm -f ${IB_TARGET}/board rm -f ${TMPDIR}/stamps/rootfs-linux* } diff --git a/build/meta-rootfs/recipes-rootfs/so3/rootfs-so3_1.0.bb b/build/meta-rootfs/recipes-rootfs/so3/rootfs-so3_1.0.bb index 7cce4bf..867a4bb 100644 --- a/build/meta-rootfs/recipes-rootfs/so3/rootfs-so3_1.0.bb +++ b/build/meta-rootfs/recipes-rootfs/so3/rootfs-so3_1.0.bb @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD SUMMARY = "SO3 root filesystem" DESCRIPTION = "SO3 root filesystem contents to be deployed on the target platform" @@ -9,7 +11,10 @@ inherit rootfs PR = "r0" PV = "1.0" -OVERRIDES += ":so3" +# :append (not +=) so no space is inserted before ":so3" — otherwise the +# preceding CPU token parses as "arm "/"aarch64 " and : overrides +# stop matching. See usr-so3_1.0.bb for the full rationale. +OVERRIDES:append = ":so3" IB_TARGET = "${IB_DIR}/so3/rootfs" diff --git a/build/meta-so3/classes/avz.bbclass b/build/meta-so3/classes/avz.bbclass index f9f592d..1a8f4dc 100644 --- a/build/meta-so3/classes/avz.bbclass +++ b/build/meta-so3/classes/avz.bbclass @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD # Class for building SO3 in infrabase diff --git a/build/meta-so3/classes/so3.bbclass b/build/meta-so3/classes/so3.bbclass index 12d3a88..7cbd146 100644 --- a/build/meta-so3/classes/so3.bbclass +++ b/build/meta-so3/classes/so3.bbclass @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD # Class for building SO3 in infrabase diff --git a/build/meta-so3/conf/layer.conf b/build/meta-so3/conf/layer.conf index 11e001c..1dda486 100644 --- a/build/meta-so3/conf/layer.conf +++ b/build/meta-so3/conf/layer.conf @@ -1,3 +1,6 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + BBPATH .= ":${LAYERDIR}" BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend" diff --git a/build/meta-so3/recipes-so3/avz/avz_6.1.0.bb b/build/meta-so3/recipes-so3/avz/avz_6.1.0.bb deleted file mode 100644 index 84eb37c..0000000 --- a/build/meta-so3/recipes-so3/avz/avz_6.1.0.bb +++ /dev/null @@ -1,55 +0,0 @@ - -SUMMARY = "AVZ Hypervisor" -DESCRIPTION = "AVZ (Agency Virtualizer) hypervisor based on polymorphic SO3 Operating System" -LICENSE = "GPLv2" - -inherit avz - -# Version and revision - -PR = "r0" -PV = "6.1.0" - -OVERRIDES += ":avz" - -# Where the working directory will be placed in infrabase root dir -IB_TARGET = "${IB_AVZ_PATH}" - -SRC_URI = "git://github.com/smartobjectoriented/so3.git;nobranch=1;protocol=https" -SRCREV = "5826b0c0266cd561b82925eea4ad8fdc8bceef79" - -# FILESPATH:prepend = "${THISDIR}/files/0001-${PF}:" -# require files/0001-${PF}-patches.inc - -python do_handle_fetch_git() { - - import os - import subprocess - - # Copy only the SO3 kernel - - gitdir = os.path.join(d.getVar('WORKDIR'), 'git') - dst_dir = d.getVar('S') - - cmd = f"find . -not -path '*/.git/*' -and \( -type f -or -type d -empty \) -exec cp -r --parents -t {dst_dir} {{}} +" - result = subprocess.run(cmd, shell=True, check=True, cwd=os.path.join(gitdir, "so3")) -} - -do_configure[nostamp] = "1" -do_configure () { - cd ${IB_TARGET} - make ${IB_CONFIG} -} - -do_build () { - echo "Building AVZ..." - - cd ${IB_TARGET} - make -} - -do_clean[nostamp] = "1" -do_clean () { - rm -f ${TMPDIR}/stamps/avz* -} -addtask do_clean diff --git a/build/meta-so3/recipes-so3/avz/avz_6.3.0.bb b/build/meta-so3/recipes-so3/avz/avz_6.3.0.bb new file mode 100644 index 0000000..bcf70b2 --- /dev/null +++ b/build/meta-so3/recipes-so3/avz/avz_6.3.0.bb @@ -0,0 +1,71 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + +SUMMARY = "AVZ Hypervisor" +DESCRIPTION = "AVZ (Agency Virtualizer) hypervisor based on polymorphic SO3 Operating System" +LICENSE = "GPLv2" + +inherit avz + +# Version and revision + +PR = "r0" +PV = "6.3.0" + +OVERRIDES += ":avz" + +# Where the working directory will be placed in infrabase root dir +IB_TARGET = "${IB_AVZ_PATH}" + +# MICOFE is a separate repository and does not embed the SO3/AVZ sources, so +# AVZ is FETCHED from the SO3 repo (unlike the SO3 tree itself, which builds +# in place). Pinned to the SO3 release tag IB_SO3_TAG (see below; +# the bitbake git fetcher takes the tag's commit as +# SRCREV; IB_SO3_TAG records the human-readable tag it corresponds to. +IB_SO3_TAG = "v6.3.0" +SRC_URI = "git://github.com/smartobjectoriented/so3.git;nobranch=1;protocol=https" +SRCREV = "0ac36a952c6274591058df668f0571a8e77ac44f" + +# MICOFE-specific AVZ patches applied on top of the fetched SO3 tree. +# Generate/refresh the set with `bitbake avz -c updiff` (do_diffcompose +# diffs the fetched .pristine snapshot against ${IB_AVZ_PATH} and do_updiff +# regenerates the numbered patchset + this .inc). +FILESPATH:prepend = "${THISDIR}/files/0001-${PF}:" + +require files/0001-${PF}-patches.inc + +python do_handle_fetch_git() { + + import os + import subprocess + + # Copy only the SO3 kernel (AVZ is the polymorphic SO3 built with an avz + # config; its sources live inside the kernel tree). The repo nests the + # kernel under /so3/so3, so copy from gitdir/so3/so3. + + gitdir = os.path.join(d.getVar('WORKDIR'), 'git') + dst_dir = d.getVar('S') + + cmd = f"find . -not -path '*/.git/*' -and \( -type f -or -type d -empty \) -exec cp -r --parents -t {dst_dir} {{}} +" + result = subprocess.run(cmd, shell=True, check=True, cwd=os.path.join(gitdir, "so3", "so3")) +} + +do_configure[nostamp] = "1" +do_configure () { + cd ${IB_TARGET} + make ${IB_CONFIG} +} + +do_build[nostamp] = "1" +do_build () { + echo "Building AVZ..." + + cd ${IB_TARGET} + make +} + +do_clean[nostamp] = "1" +do_clean () { + rm -f ${TMPDIR}/stamps/avz* +} +addtask do_clean diff --git a/build/meta-so3/recipes-so3/avz/files/0001-avz-6.3.0-r0-patches.inc b/build/meta-so3/recipes-so3/avz/files/0001-avz-6.3.0-r0-patches.inc new file mode 100644 index 0000000..c78a2af --- /dev/null +++ b/build/meta-so3/recipes-so3/avz/files/0001-avz-6.3.0-r0-patches.inc @@ -0,0 +1,7 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD +# +# MICOFE patch manifest — auto-regenerated by 'bitbake -c updiff'. +# Empty until the first updiff: a clean SO3 (SRCREV) is fetched and no +# patch is applied. Add MICOFE deltas to ${IB_TARGET}, then run updiff. + diff --git a/build/meta-so3/recipes-so3/so3/files/0001-so3-6.3.0-r0-patches.inc b/build/meta-so3/recipes-so3/so3/files/0001-so3-6.3.0-r0-patches.inc new file mode 100644 index 0000000..0057ca1 --- /dev/null +++ b/build/meta-so3/recipes-so3/so3/files/0001-so3-6.3.0-r0-patches.inc @@ -0,0 +1,10 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD +# +# MICOFE patch manifest — auto-regenerated by 'bitbake -c updiff'. +# Empty until the first updiff: a clean SO3 (SRCREV) is fetched and no +# patch is applied. Add MICOFE deltas to ${IB_TARGET}, then run updiff. + +SRC_URI += " \ + file://0001-virt64_capsule.dts.patch \ + " diff --git a/build/meta-so3/recipes-so3/so3/files/0001-so3-6.3.0-r0/0001-virt64_capsule.dts.patch b/build/meta-so3/recipes-so3/so3/files/0001-so3-6.3.0-r0/0001-virt64_capsule.dts.patch new file mode 100644 index 0000000..6e7069b --- /dev/null +++ b/build/meta-so3/recipes-so3/so3/files/0001-so3-6.3.0-r0/0001-virt64_capsule.dts.patch @@ -0,0 +1,31 @@ +--- a/so3/dts/virt64_capsule.dts ++++ b/so3/dts/virt64_capsule.dts +@@ -129,21 +129,19 @@ + status = "ok"; + }; + +- /* Framebuffer support: disabled — the Linux agency built from +- * this repo provides no vfbdev backend (vuart/vlogs only), and +- * the capsule BUG()s at vbstore init when the backend node is +- * missing. Re-enable when an agency with the virtual +- * framebuffer backend is used. */ ++ /* Framebuffer support: enabled — the MICOFE Linux agency ++ * provides the vfbdev backend (virtualized framebuffer via ++ * the 2-stage MMU IPA remap, fb_mapper user space). */ + vfbdev { + compatible = "vfbdev,frontend"; +- status = "disabled"; ++ status = "ok"; + }; + +- /* Input support: disabled — no vinput backend in the agency +- * (see vfbdev above). */ ++ /* Input support: enabled — the MICOFE agency provides the ++ * vinput backend (input_forwarding user space). */ + vinput { + compatible = "vinput,frontend"; +- status = "disabled"; ++ status = "ok"; + }; + }; + }; diff --git a/build/meta-so3/recipes-so3/so3/so3_6.1.0.bb b/build/meta-so3/recipes-so3/so3/so3_6.1.0.bb deleted file mode 100644 index 2623aec..0000000 --- a/build/meta-so3/recipes-so3/so3/so3_6.1.0.bb +++ /dev/null @@ -1,40 +0,0 @@ - -SUMMARY = "SO3 kernel" -DESCRIPTION = "Smart Object Oriented Operating System" -LICENSE = "GPLv2" - -inherit so3 - -# Version and revision -PR = "r0" -PV = "6.1.0" - -OVERRIDES += ":so3" - -# Where the working directory will be placed in infrabase root dir -IB_TARGET = "${IB_SO3_PATH}" - -SRC_URI = "git://github.com/smartobjectoriented/so3.git;nobranch=1;protocol=https" -SRCREV = "5826b0c0266cd561b82925eea4ad8fdc8bceef79" - -# FILESPATH:prepend = "${THISDIR}/files/0001-${PF}:" -# require files/0001-${PF}-patches.inc - -do_configure[nostamp] = "1" -do_configure () { - cd ${IB_SO3_PATH}/so3 - make ${IB_CONFIG} -} - -do_build () { - echo "Building SO3..." - - cd ${IB_SO3_PATH}/so3 - make -} - -do_clean[nostamp] = "1" -do_clean () { - rm -f ${TMPDIR}/stamps/so3* -} -addtask do_clean diff --git a/build/meta-so3/recipes-so3/so3/so3_6.3.0.bb b/build/meta-so3/recipes-so3/so3/so3_6.3.0.bb new file mode 100644 index 0000000..732babb --- /dev/null +++ b/build/meta-so3/recipes-so3/so3/so3_6.3.0.bb @@ -0,0 +1,87 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + +SUMMARY = "SO3 kernel" +DESCRIPTION = "Smart Object Oriented Operating System" +LICENSE = "GPLv2" + +inherit so3 + +# Version and revision +PR = "r0" +PV = "6.3.0" + +# :append (not +=) so no space is inserted before ":so3" — otherwise the +# preceding CPU token parses as "arm "/"aarch64 " and : overrides +# stop matching. See usr-so3_1.0.bb for the full rationale. +OVERRIDES:append = ":so3" + +# Where the working directory will be placed in infrabase root dir +IB_TARGET = "${IB_SO3_PATH}" + +# MICOFE is a separate repository and does not embed the SO3 sources, so the +# kernel is FETCHED from the SO3 repo (unlike the SO3 tree itself, which builds +# in place). Pinned to the SO3 release tag IB_SO3_TAG (see below; +# the bitbake git fetcher takes the tag's commit as +# SRCREV; IB_SO3_TAG records the human-readable tag it corresponds to. +IB_SO3_TAG = "v6.3.0" +SRC_URI = "git://github.com/smartobjectoriented/so3.git;nobranch=1;protocol=https" +SRCREV = "0ac36a952c6274591058df668f0571a8e77ac44f" + +# MICOFE-specific SO3 patches applied on top of the fetched tree. +# Generate/refresh the set with `bitbake so3 -c updiff` (do_diffcompose +# diffs the fetched .pristine snapshot against ${IB_SO3_PATH} and do_updiff +# regenerates the numbered patchset + this .inc). +FILESPATH:prepend = "${THISDIR}/files/0001-${PF}:" + +require files/0001-${PF}-patches.inc + +python do_handle_fetch_git() { + + import os + import subprocess + + # Copy the SO3 sources subtree only. The repo nests its sources under + # /so3 (which itself contains so3/=kernel, usr/, rootfs/, target/), + # so copy from gitdir/so3 — this makes ${IB_SO3_PATH}/so3 the kernel root, + # matching the in-place SO3 build layout. + + gitdir = os.path.join(d.getVar('WORKDIR'), 'git') + dst_dir = d.getVar('S') + + cmd = f"find . -not -path '*/.git/*' -and \( -type f -or -type d -empty \) -exec cp -r --parents -t {dst_dir} {{}} +" + result = subprocess.run(cmd, shell=True, check=True, cwd=os.path.join(gitdir, "so3")) +} + +do_configure[nostamp] = "1" +do_configure () { + cd ${IB_SO3_PATH}/so3 + + # The kernel is built in place, so a stale .config/objects from the + # other architecture (virt64<->virt32, i.e. aarch64<->arm) would + # otherwise survive and produce a wrong-arch kernel. Track the last + # built arch in a marker file and distclean only when it changes — + # so same-arch rebuilds stay incremental. + _arch_marker=".ib_last_arch" + if [ -f "$_arch_marker" ] && [ "$(cat $_arch_marker)" != "${IB_PLAT_CPU}" ]; then + echo "SO3 arch changed ($(cat $_arch_marker) -> ${IB_PLAT_CPU}); running make distclean" + make distclean + fi + + make ${IB_CONFIG} + + echo "${IB_PLAT_CPU}" > "$_arch_marker" +} + +do_build () { + echo "Building SO3..." + + cd ${IB_SO3_PATH}/so3 + make +} + +do_clean[nostamp] = "1" +do_clean () { + rm -f ${TMPDIR}/stamps/so3* +} +addtask do_clean diff --git a/build/meta-toolchain/conf/layer.conf b/build/meta-toolchain/conf/layer.conf new file mode 100644 index 0000000..e44c6ea --- /dev/null +++ b/build/meta-toolchain/conf/layer.conf @@ -0,0 +1,12 @@ +BBPATH .= ":${LAYERDIR}" +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend" + +# append layer name to list of configured layers +BBFILE_COLLECTIONS += "toolchain" + +LAYERSERIES_COMPAT_toolchain = "infrabase_core" +LAYERDEPENDS_toolchain = "toolchain" + +# and use name as suffix for other properties +BBFILE_PATTERN_toolchain = "^${LAYERDIR}/" +BBFILE_PRIORITY_toolchain = "4" diff --git a/build/meta-toolchain/recipes-toolchain/musl/files/config.mak b/build/meta-toolchain/recipes-toolchain/musl/files/config.mak new file mode 100644 index 0000000..3597134 --- /dev/null +++ b/build/meta-toolchain/recipes-toolchain/musl/files/config.mak @@ -0,0 +1,55 @@ +# +# musl-cross-make configuration for the SO3 user-space toolchain. +# +# This is the common (arch-independent) configuration. The recipe +# (musl-toolchain_*.bb) appends the TARGET and OUTPUT lines, selecting +# the target from the configured platform CPU (local.conf): +# aarch64 -> aarch64-linux-musl +# arm -> arm-linux-musleabihf +# + +# musl-cross-make downloads the gcc/binutils/gmp/mpfr/mpc/musl tarballs during +# the build (do_build). The stock GNU_SITE is ftpmirror.gnu.org, which 302- +# redirects to a RANDOM mirror; some mirrors are incomplete (404) or stall, and +# wget --tries just re-hits the same redirect, so the toolchain build failed +# intermittently in CI (passed on re-run). Fetch GNU components from the +# canonical, complete host instead of a random mirror, and still add retries/ +# timeouts as a safety net. (-O must stay last: the Makefile appends +# after DL_CMD.) +GNU_SITE = https://ftp.gnu.org/gnu +DL_CMD = wget -c --tries=5 --waitretry=10 --timeout=30 -O + +# Same story for the musl tarball itself: musl.libc.org is a single host with +# no mirror rotation, and when it goes down (timeouts, then "Unable to +# establish SSL connection" — observed 2026-08-10, both CI platforms and from +# outside CI) the toolchain build fails at ~2 min and no amount of retrying +# helps. Fetch it from the MacPorts distfiles mirror, which carries the exact +# upstream tarball. musl-cross-make checks every download against +# hashes/.sha1, so a mirror serving anything else fails the build loudly +# rather than silently building something different (verified: the mirrored +# musl-1.2.5.tar.gz matches hashes/musl-1.2.5.tar.gz.sha1). +MUSL_SITE = https://distfiles.macports.org/musl + +BINUTILS_VER = 2.44 +GCC_VER = 12.4.0 +# MUSL_VER = git-master +# GMP_VER = +# MPC_VER = +# MPFR_VER = +# ISL_VER = +# LINUX_VER = + +# Recommended options for a smaller toolchain / deployable binaries: +COMMON_CONFIG += CFLAGS="-g -Os" CXXFLAGS="-g0 -Os" LDFLAGS="-s" + +# Disable autotools "maintainer mode" when configuring gcc and its in-tree +# deps (gmp/mpfr/mpc/isl). Without this, if the extracted/copied source files +# have inconsistent timestamps (configure.ac newer than configure — which +# happens when the tree is copied without preserving mtimes, e.g. the CI +# container's fresh build), make tries to regenerate configure/Makefile.in and +# fails with "automake-1.17: command not found" / "autoconf: command not found". +# The so3-env CI image has no autotools (and Ubuntu ships automake 1.16, not the +# 1.17 mpfr wants), so the regen can never succeed there. Disabling maintainer +# mode turns those regen rules into no-ops and makes the build environment- and +# timestamp-independent. +GCC_CONFIG += --disable-maintainer-mode diff --git a/build/meta-toolchain/recipes-toolchain/musl/musl-toolchain_1.0.bb b/build/meta-toolchain/recipes-toolchain/musl/musl-toolchain_1.0.bb new file mode 100644 index 0000000..d477f63 --- /dev/null +++ b/build/meta-toolchain/recipes-toolchain/musl/musl-toolchain_1.0.bb @@ -0,0 +1,66 @@ +SUMMARY = "MUSL cross toolchain for SO3 user space" +DESCRIPTION = "Builds the cross toolchain used to compile the SO3 user-space \ +applications, via richfelker/musl-cross-make. Replaces the former \ +toolchains/build-toolchain.sh script. Only the toolchain matching the \ +configured platform CPU (local.conf) is built." + +LICENSE = "GPLv2 & MIT" + +# Release and version +PR = "r0" +PV = "1.0" + +# musl-cross-make pinned commit (was GIT_COMMIT=3635262 in the old +# toolchains/build-toolchain.sh). +SRC_URI = "git://github.com/richfelker/musl-cross-make;protocol=https;nobranch=1" +SRCREV = "3635262e4524c991552789af6f36211a335a77b3" + +# The common config.mak shipped alongside this recipe. +FILESPATH:prepend = "${THISDIR}/files:" +SRC_URI += "file://config.mak" + +# IB_MUSL_TARGET follows the platform CPU (defined in local.conf; +# OVERRIDES carries ${IB_PLAT_CPU}). Building for aarch64 does not build +# the arm variant and vice-versa. + +# Fetched musl-cross-make source/build tree and the final install +# prefix, both under the bitbake-managed build/tmp area +# (IB_MUSL_TOOLCHAIN_DIR is defined in local.conf). +IB_TARGET = "${IB_MUSL_TOOLCHAIN_DIR}/musl-cross-make" +IB_MUSL_OUTPUT = "${IB_MUSL_TOOLCHAIN_DIR}/${IB_MUSL_TARGET}" + +do_configure[nostamp] = "1" +do_configure () { + cd ${IB_TARGET} + + # Common settings + the arch-specific TARGET/OUTPUT selected here. + cp ${WORKDIR}/config.mak config.mak + echo "TARGET = ${IB_MUSL_TARGET}" >> config.mak + echo "OUTPUT = ${IB_MUSL_OUTPUT}" >> config.mak +} + +# do_configure is nostamp (it re-pins TARGET/OUTPUT in config.mak per arch), +# which forces this do_build to re-run on every build that depends on +# musl-toolchain:do_build (e.g. `build.sh -x usr-so3`). Guard against that: +# if the compiler for the current IB_MUSL_TARGET is already installed, skip +# the (very long) binutils/gcc/musl build. A different arch yields a different +# IB_MUSL_OUTPUT path, so it still builds; `do_clean` wipes the output to force +# a rebuild. +do_build () { + if [ -x "${IB_MUSL_OUTPUT}/bin/${IB_MUSL_TARGET}-gcc" ]; then + echo "musl cross toolchain '${IB_MUSL_TARGET}' already built — skipping." + else + echo "Building musl cross toolchain '${IB_MUSL_TARGET}' — this downloads and compiles binutils/gcc/musl, expect a long first build..." + + cd ${IB_TARGET} + make -j${CORES} + make install + fi +} + +do_clean[nostamp] = "1" +do_clean () { + rm -rf ${IB_MUSL_OUTPUT} + rm -f ${TMPDIR}/stamps/musl-toolchain* +} +addtask do_clean diff --git a/build/meta-uboot/classes/uboot.bbclass b/build/meta-uboot/classes/uboot.bbclass index 54644e4..a3f554a 100644 --- a/build/meta-uboot/classes/uboot.bbclass +++ b/build/meta-uboot/classes/uboot.bbclass @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD # Class for building U-boot in infrabase diff --git a/build/meta-uboot/conf/layer.conf b/build/meta-uboot/conf/layer.conf index 6e762e5..7380d62 100644 --- a/build/meta-uboot/conf/layer.conf +++ b/build/meta-uboot/conf/layer.conf @@ -1,3 +1,6 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + BBPATH .= ":${LAYERDIR}" BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend" diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0-patches.inc b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0-patches.inc index 95553a6..5a04a5b 100644 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0-patches.inc +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0-patches.inc @@ -1,32 +1,56 @@ -SRC_URI += "\ - file://0001-lowlevel_init.S.patch \ - file://0015-virt32_defconfig.patch \ - file://0021-ti_omap5_common.h.patch \ - file://0027-image-cipher.c.patch \ - file://0003-hardware_am33xx.h.patch \ - file://0010-am335x_evm_defconfig.patch \ - file://0013-rpi4_64_defconfig.patch \ - file://0029-image-fit-sig.c.patch \ - file://0020-ti_armv7_common.h.patch \ - file://0007-image-board.c.patch \ - file://0012-rpi_4_32b_defconfig.patch \ - file://0018-qemu-arm.h.patch \ - file://0025-fdt_region.c.patch \ - file://0002-am335x-osd335x-common.dtsi.patch \ - file://0030-image-host.c.patch \ - file://0011-am57xx_evm_defconfig.patch \ - file://0009-Kconfig.patch \ - file://0023-Makefile.patch \ - file://0017-am335x_evm.h.patch \ - file://0016-virt64_defconfig.patch \ - file://0005-hwinit-common.c.patch \ - file://0019-rpi.h.patch \ - file://0028-image-fit.c.patch \ - file://0004-board.c.patch \ - file://0022-mmc.h.patch \ - file://0024-bootm.c.patch \ - file://0006-bootm.c.patch \ - file://0026-image.c.patch \ - file://0008-setexpr.c.patch \ - file://0014-rpi4_64_rpi_dtb_defconfig.patch \ -" +SRC_URI += "\ + file://0001-lowlevel_init.S.patch \ + file://0002-am335x-osd335x-common.dtsi.patch \ + file://0003-hardware_am33xx.h.patch \ + file://0004-board.c.patch \ + file://0005-hwinit-common.c.patch \ + file://0006-bootm.c.patch \ + file://0007-image-board.c.patch \ + file://0008-guest_boot.c.patch \ + file://0009-Kconfig.patch \ + file://0010-Makefile.patch \ + file://0011-setexpr.c.patch \ + file://0012-Kconfig.patch \ + file://0013-am335x_evm_defconfig.patch \ + file://0014-am57xx_evm_defconfig.patch \ + file://0015-rpi_4_32b_defconfig.patch \ + file://0016-rpi4_64_defconfig.patch \ + file://0017-rpi4_64_rpi_dtb_defconfig.patch \ + file://0018-virt32_defconfig.patch \ + file://0019-virt64_defconfig.patch \ + file://0020-config.h.patch \ + file://0021-am335x_evm.h.patch \ + file://0022-qemu-arm.h.patch \ + file://0023-rpi.h.patch \ + file://0024-ti_armv7_common.h.patch \ + file://0025-ti_omap5_common.h.patch \ + file://0026-mmc.h.patch \ + file://0027-Makefile.patch \ + file://0028-bootm.c.patch \ + file://0029-fdt_region.c.patch \ + file://0030-image.c.patch \ + file://0031-image-cipher.c.patch \ + file://0032-image-fit.c.patch \ + file://0033-image-fit-sig.c.patch \ + file://0034-image-host.c.patch \ + file://0035-hash.c.patch \ + file://0036-embedded.c.patch \ + file://0037-aes-decrypt.c.patch \ + file://0038-aes-encrypt.c.patch \ + file://0039-crc16.c.patch \ + file://0040-crc32.c.patch \ + file://0041-crc8.c.patch \ + file://0042-ecdsa-libcrypto.c.patch \ + file://0043-fdtdec.c.patch \ + file://0044-fdtdec_common.c.patch \ + file://0045-fdt-libcrypto.c.patch \ + file://0046-hash-checksum.c.patch \ + file://0047-md5.c.patch \ + file://0048-rc4.c.patch \ + file://0049-rsa-mod-exp.c.patch \ + file://0050-rsa-sign.c.patch \ + file://0051-rsa-verify.c.patch \ + file://0052-sha1.c.patch \ + file://0053-sha256.c.patch \ + file://0054-sha512.c.patch \ +" \ No newline at end of file diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0001-lowlevel_init.S.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0001-lowlevel_init.S.patch index f2196b6..f02033c 100644 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0001-lowlevel_init.S.patch +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0001-lowlevel_init.S.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/arch/arm/cpu/armv7/lowlevel_init.S 2025-09-11 16:44:26.426711278 +0200 -+++ ./arch/arm/cpu/armv7/lowlevel_init.S 2025-09-11 16:34:39.293214469 +0200 +--- a/arch/arm/cpu/armv7/lowlevel_init.S ++++ b/arch/arm/cpu/armv7/lowlevel_init.S @@ -22,6 +22,25 @@ .pushsection .text.lowlevel_init, "ax" diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0002-am335x-osd335x-common.dtsi.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0002-am335x-osd335x-common.dtsi.patch index a22d80f..33980b7 100644 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0002-am335x-osd335x-common.dtsi.patch +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0002-am335x-osd335x-common.dtsi.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/arch/arm/dts/am335x-osd335x-common.dtsi 2025-09-11 16:44:26.431474397 +0200 -+++ ./arch/arm/dts/am335x-osd335x-common.dtsi 2025-09-11 16:34:39.337910988 +0200 +--- a/arch/arm/dts/am335x-osd335x-common.dtsi ++++ b/arch/arm/dts/am335x-osd335x-common.dtsi @@ -16,6 +16,10 @@ device_type = "memory"; reg = <0x80000000 0x20000000>; /* 512 MB */ diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0003-hardware_am33xx.h.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0003-hardware_am33xx.h.patch index 52e00c2..f9842d0 100644 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0003-hardware_am33xx.h.patch +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0003-hardware_am33xx.h.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/arch/arm/include/asm/arch-am33xx/hardware_am33xx.h 2025-09-11 16:44:26.504637797 +0200 -+++ ./arch/arm/include/asm/arch-am33xx/hardware_am33xx.h 2025-09-11 16:34:39.338443005 +0200 +--- a/arch/arm/include/asm/arch-am33xx/hardware_am33xx.h ++++ b/arch/arm/include/asm/arch-am33xx/hardware_am33xx.h @@ -60,6 +60,7 @@ /* RTC base address */ diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0004-board.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0004-board.c.patch index fb2c395..e264444 100644 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0004-board.c.patch +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0004-board.c.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/arch/arm/mach-omap2/am33xx/board.c 2025-09-11 16:44:26.547693906 +0200 -+++ ./arch/arm/mach-omap2/am33xx/board.c 2025-09-11 16:34:39.358932745 +0200 +--- a/arch/arm/mach-omap2/am33xx/board.c ++++ b/arch/arm/mach-omap2/am33xx/board.c @@ -417,6 +417,8 @@ { } diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0005-hwinit-common.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0005-hwinit-common.c.patch index a8690c7..072332d 100644 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0005-hwinit-common.c.patch +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0005-hwinit-common.c.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/arch/arm/mach-omap2/hwinit-common.c 2025-09-11 16:44:26.548023867 +0200 -+++ ./arch/arm/mach-omap2/hwinit-common.c 2025-09-11 16:34:39.359723681 +0200 +--- a/arch/arm/mach-omap2/hwinit-common.c ++++ b/arch/arm/mach-omap2/hwinit-common.c @@ -135,6 +135,16 @@ } diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0006-bootm.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0006-bootm.c.patch index e7d26e4..a93fa45 100644 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0006-bootm.c.patch +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0006-bootm.c.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/boot/bootm.c 2025-09-11 16:44:26.707884622 +0200 -+++ ./boot/bootm.c 2025-09-11 16:34:39.288174907 +0200 +--- a/boot/bootm.c ++++ b/boot/bootm.c @@ -251,6 +251,13 @@ { int ret; diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0007-image-board.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0007-image-board.c.patch index fb3439f..55ff4d1 100644 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0007-image-board.c.patch +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0007-image-board.c.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/boot/image-board.c 2025-09-11 16:44:26.707884622 +0200 -+++ ./boot/image-board.c 2025-09-11 16:34:39.288145557 +0200 +--- a/boot/image-board.c ++++ b/boot/image-board.c @@ -767,6 +767,9 @@ const char *uname; u8 img_type; diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0008-guest_boot.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0008-guest_boot.c.patch new file mode 100644 index 0000000..97bf346 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0008-guest_boot.c.patch @@ -0,0 +1,216 @@ +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD +--- a/cmd/guest_boot.c ++++ b/cmd/guest_boot.c +@@ -0,0 +1,212 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++/* ++ * Copyright (C) 2026 EDGEMTech SA ++ * ++ * guest-boot: load an AVZ FIT image and an guest FIT image individually, ++ * place each declared loadable/kernel/fdt/ramdisk at its declared load address, ++ * then transfer control to the AVZ entry point. ++ * ++ * Argument convention to AVZ (aarch64): ++ * x0 = AVZ FIT base (so AVZ can locate its avz_dt loadable inside it) ++ * x1 = guest FIT base (so AVZ can later load the guest from it) ++ * x2 = 0 ++ * x3 = 0 ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++static int guest_place_image(const void *fit, int img_off, const char *desc, ++ ulong *load_out, ulong *entry_out) ++{ ++ const void *data; ++ size_t size; ++ ulong load; ++ ++ if (fit_image_get_data_and_size(fit, img_off, &data, &size)) { ++ printf("guest-boot: %s: missing data\n", desc); ++ return -1; ++ } ++ ++ if (fit_image_get_load(fit, img_off, &load)) { ++ printf("guest-boot: %s: missing load address\n", desc); ++ return -1; ++ } ++ ++ debug("guest-boot: %s -> 0x%lx (%zu bytes)\n", desc, load, size); ++ memmove((void *)load, data, size); ++ flush_cache(load, size); ++ ++ if (load_out) ++ *load_out = load; ++ ++ if (entry_out) { ++ ulong entry; ++ ++ if (fit_image_get_entry(fit, img_off, &entry)) ++ entry = load; ++ *entry_out = entry; ++ } ++ return 0; ++} ++ ++static int guest_place_named(const void *fit, int conf_off, const char *prop, ++ ulong *load_out, ulong *entry_out, bool required) ++{ ++ int img_off; ++ ++ img_off = fit_conf_get_prop_node(fit, conf_off, prop); ++ if (img_off < 0) { ++ if (required) { ++ printf("guest-boot: config has no '%s' image\n", prop); ++ return -1; ++ } ++ return 0; ++ } ++ return guest_place_image(fit, img_off, prop, load_out, entry_out); ++} ++ ++static int guest_place_loadables(const void *fit, int conf_off) ++{ ++ const char *uname; ++ int idx; ++ ++ for (idx = 0; ++ (uname = fdt_stringlist_get(fit, conf_off, FIT_LOADABLE_PROP, ++ idx, NULL)) != NULL; ++ idx++) { ++ int img_off = fit_image_get_node(fit, uname); ++ ++ if (img_off < 0) { ++ printf("guest-boot: loadable '%s' not found\n", uname); ++ return -1; ++ } ++ if (guest_place_image(fit, img_off, uname, NULL, NULL)) ++ return -1; ++ } ++ return 0; ++} ++ ++static int guest_load_fit(ulong fit_addr, const char *conf_name, ++ ulong *kernel_entry, ulong *fdt_load) ++{ ++ const void *fit = (const void *)fit_addr; ++ int conf_off; ++ ++ if (fit_check_format(fit, IMAGE_SIZE_INVAL)) { ++ printf("guest-boot: invalid FIT at 0x%lx\n", fit_addr); ++ return -1; ++ } ++ ++ conf_off = fit_conf_get_node(fit, conf_name); ++ if (conf_off < 0) { ++ printf("guest-boot: config '%s' not found at 0x%lx\n", ++ conf_name ? conf_name : "", fit_addr); ++ return -1; ++ } ++ ++ if (guest_place_named(fit, conf_off, FIT_KERNEL_PROP, NULL, ++ kernel_entry, kernel_entry != NULL)) ++ return -1; ++ ++ if (guest_place_named(fit, conf_off, FIT_FDT_PROP, fdt_load, ++ NULL, false)) ++ return -1; ++ ++ if (guest_place_named(fit, conf_off, FIT_RAMDISK_PROP, NULL, ++ NULL, false)) ++ return -1; ++ ++ if (guest_place_loadables(fit, conf_off)) ++ return -1; ++ ++ return 0; ++} ++ ++static int do_guest_boot(struct cmd_tbl *cmdtp, int flag, int argc, ++ char *const argv[]) ++{ ++ ulong avz_itb, guest_itb, avz_entry = 0, capsule_fdt = 0; ++ ++ if (argc != 3) ++ return CMD_RET_USAGE; ++ ++ avz_itb = simple_strtoul(argv[1], NULL, 16); ++ guest_itb = simple_strtoul(argv[2], NULL, 16); ++ ++ printf("guest-boot: AVZ ITB @ 0x%lx, guest ITB @ 0x%lx\n", ++ avz_itb, guest_itb); ++ ++ if (guest_load_fit(avz_itb, "avz", &avz_entry, NULL)) ++ return CMD_RET_FAILURE; ++ if (!avz_entry) { ++ printf("guest-boot: AVZ config has no kernel entry\n"); ++ return CMD_RET_FAILURE; ++ } ++ ++ if (guest_load_fit(guest_itb, "capsule", NULL, &capsule_fdt)) ++ return CMD_RET_FAILURE; ++ ++ /* Propagate U-Boot's bootargs env into the guest FDT's /chosen so the ++ * guest kernel sees the cmdline. guest-boot replaces bootm's standard ++ * fdt_chosen() call — without this, the guest kernel cmdline is empty ++ * and OSTree-aware initramfs (e.g. TorizonOS) can't find its root. */ ++ if (capsule_fdt) { ++ void *fdt = (void *)capsule_fdt; ++ const char *ba = env_get("bootargs"); ++ int ret; ++ ++ printf("guest-boot: capsule fdt @ 0x%lx, bootargs=[%s]\n", ++ capsule_fdt, ba ? ba : ""); ++ ++ /* The guest DTB is tightly packed by mkimage and has no room ++ * for fdt_chosen() to add bootargs (FDT_ERR_NOSPACE). Expand ++ * in place with 4 KiB headroom — plenty for bootargs + any ++ * extra props AVZ injects later. */ ++ ret = fdt_open_into(fdt, fdt, fdt_totalsize(fdt) + 0x1000); ++ if (ret < 0) { ++ printf("guest-boot: WARN: fdt_open_into failed (%d)\n", ++ ret); ++ } ++ ++ ret = fdt_chosen(fdt); ++ if (ret < 0) ++ printf("guest-boot: WARN: fdt_chosen failed (%d)\n", ret); ++ else ++ flush_cache(capsule_fdt, fdt_totalsize(fdt)); ++ } ++ ++ printf("guest-boot: jumping to AVZ at 0x%lx (capsule ITB @ 0x%lx)\n", ++ avz_entry, guest_itb); ++ ++ cleanup_before_linux(); ++ ++ armv8_switch_to_el2(avz_itb, guest_itb, 0, 0, avz_entry, ++ ES_TO_AARCH64); ++ ++ return CMD_RET_FAILURE; ++} ++ ++#ifdef CONFIG_SYS_LONGHELP ++static char guest_boot_help_text[] = ++ " \n" ++ " - Parse the AVZ FIT and the guest FIT loaded at the given\n" ++ " addresses, place every kernel/fdt/ramdisk/loadable at its\n" ++ " declared load address, then jump to the AVZ entry point with:\n" ++ " x0 = avz_itb_addr (AVZ scans this FIT for its avz_dt)\n" ++ " x1 = guest_itb_addr (AVZ uses this FIT to load the guest)"; ++#endif ++ ++ll_entry_declare(struct cmd_tbl, guest_boot, cmd) = { ++ "guest-boot", 3, cmd_never_repeatable, do_guest_boot, ++ "boot AVZ hypervisor with an guest", ++#ifdef CONFIG_SYS_LONGHELP ++ guest_boot_help_text ++#endif ++}; diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0008-setexpr.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0008-setexpr.c.patch deleted file mode 100644 index fe39ff1..0000000 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0008-setexpr.c.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/cmd/setexpr.c 2025-09-11 16:44:26.716036695 +0200 -+++ ./cmd/setexpr.c 2025-09-11 16:34:39.229143872 +0200 -@@ -11,7 +11,7 @@ - #include - #include - #include --#include -+#include - #include - #include - #include diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0009-Kconfig.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0009-Kconfig.patch index 27a4792..dbf2e31 100644 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0009-Kconfig.patch +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0009-Kconfig.patch @@ -1,17 +1,19 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/common/Kconfig 2025-09-11 16:44:26.717830853 +0200 -+++ ./common/Kconfig 2025-09-11 16:34:39.289787151 +0200 -@@ -850,6 +850,14 @@ +--- a/cmd/Kconfig ++++ b/cmd/Kconfig +@@ -213,6 +213,16 @@ + help + Boot an AArch64 Linux Kernel image from memory. - endmenu - -+# EDGEMTech (DT) -+config USE_RPI4_DTB_WITH_FIT -+ bool "Activate this config to be able to use a FIT image without a DTB specified" -+ depends on BCM2711 -+ default false ++config CMD_GUEST_BOOT ++ bool "guest-boot" ++ depends on ARM64 && FIT + help -+ Indicate to U-Boot that it must use the RPi4 SPL DTB and not a DTB from the FIT -+ - source "common/spl/Kconfig" - - config IMAGE_SIGN_INFO ++ Boot the AVZ hypervisor together with a guest (Linux) via the two-ITB scheme ++ from two separate FIT images. Each FIT is parsed individually; every ++ declared kernel/fdt/ramdisk/loadable is copied to its load address, ++ then control is transferred to the AVZ entry point with the AVZ FIT ++ base in x0 and the capsule FIT base in x1. ++ + config BOOTM_LINUX + bool "Support booting Linux OS images" + depends on CMD_BOOTM || CMD_BOOTZ || CMD_BOOTI diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0010-Makefile.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0010-Makefile.patch new file mode 100644 index 0000000..8110ec1 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0010-Makefile.patch @@ -0,0 +1,10 @@ +--- a/cmd/Makefile ++++ b/cmd/Makefile +@@ -54,6 +54,7 @@ + obj-$(CONFIG_CMD_ADTIMG) += adtimg.o + obj-$(CONFIG_CMD_ABOOTIMG) += abootimg.o + obj-$(CONFIG_CMD_EXTENSION) += extension_board.o ++obj-$(CONFIG_CMD_GUEST_BOOT) += guest_boot.o + obj-$(CONFIG_CMD_ECHO) += echo.o + obj-$(CONFIG_ENV_IS_IN_EEPROM) += eeprom.o + obj-$(CONFIG_CMD_EEPROM) += eeprom.o diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0011-setexpr.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0011-setexpr.c.patch new file mode 100644 index 0000000..008c278 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0011-setexpr.c.patch @@ -0,0 +1,11 @@ +--- a/cmd/setexpr.c ++++ b/cmd/setexpr.c +@@ -11,7 +11,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0012-Kconfig.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0012-Kconfig.patch new file mode 100644 index 0000000..f78de70 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0012-Kconfig.patch @@ -0,0 +1,17 @@ +--- a/common/Kconfig ++++ b/common/Kconfig +@@ -850,6 +850,14 @@ + + endmenu + ++# EDGEMTech (DT) ++config USE_RPI4_DTB_WITH_FIT ++ bool "Activate this config to be able to use a FIT image without a DTB specified" ++ depends on BCM2711 ++ default false ++ help ++ Indicate to U-Boot that it must use the RPi4 SPL DTB and not a DTB from the FIT ++ + source "common/spl/Kconfig" + + config IMAGE_SIGN_INFO diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0010-am335x_evm_defconfig.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0013-am335x_evm_defconfig.patch similarity index 93% rename from build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0010-am335x_evm_defconfig.patch rename to build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0013-am335x_evm_defconfig.patch index 5aa354c..c5ce112 100644 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0010-am335x_evm_defconfig.patch +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0013-am335x_evm_defconfig.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/configs/am335x_evm_defconfig 2025-09-11 16:44:26.727028493 +0200 -+++ ./configs/am335x_evm_defconfig 2025-09-11 16:34:39.224756147 +0200 +--- a/configs/am335x_evm_defconfig ++++ b/configs/am335x_evm_defconfig @@ -2,7 +2,7 @@ CONFIG_ARCH_CPU_INIT=y CONFIG_ARCH_OMAP2PLUS=y diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0011-am57xx_evm_defconfig.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0014-am57xx_evm_defconfig.patch similarity index 91% rename from build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0011-am57xx_evm_defconfig.patch rename to build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0014-am57xx_evm_defconfig.patch index c09bd8f..f3cc232 100644 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0011-am57xx_evm_defconfig.patch +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0014-am57xx_evm_defconfig.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/configs/am57xx_evm_defconfig 2025-09-11 16:44:26.728028519 +0200 -+++ ./configs/am57xx_evm_defconfig 2025-09-11 16:34:39.221140750 +0200 +--- a/configs/am57xx_evm_defconfig ++++ b/configs/am57xx_evm_defconfig @@ -5,12 +5,11 @@ CONFIG_NR_DRAM_BANKS=2 CONFIG_DM_GPIO=y diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0012-rpi_4_32b_defconfig.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0015-rpi_4_32b_defconfig.patch similarity index 99% rename from build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0012-rpi_4_32b_defconfig.patch rename to build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0015-rpi_4_32b_defconfig.patch index c500016..7ed0b60 100644 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0012-rpi_4_32b_defconfig.patch +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0015-rpi_4_32b_defconfig.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/configs/rpi_4_32b_defconfig 2025-09-11 16:44:26.746028984 +0200 -+++ ./configs/rpi_4_32b_defconfig 2025-09-11 16:34:39.224773816 +0200 +--- a/configs/rpi_4_32b_defconfig ++++ b/configs/rpi_4_32b_defconfig @@ -1,66 +1,1541 @@ +# +# Automatically generated file; DO NOT EDIT. diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0013-rpi4_64_defconfig.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0016-rpi4_64_defconfig.patch similarity index 99% rename from build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0013-rpi4_64_defconfig.patch rename to build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0016-rpi4_64_defconfig.patch index ee13be1..51b8dbc 100644 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0013-rpi4_64_defconfig.patch +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0016-rpi4_64_defconfig.patch @@ -1,6 +1,6 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/configs/rpi4_64_defconfig 1970-01-01 01:00:00.000000000 +0100 -+++ ./configs/rpi4_64_defconfig 2025-09-11 16:34:39.206987204 +0200 -@@ -0,0 +1,1514 @@ +--- a/configs/rpi4_64_defconfig ++++ b/configs/rpi4_64_defconfig +@@ -0,0 +1,1516 @@ +# +# Automatically generated file; DO NOT EDIT. +# U-Boot 2022.04 Configuration @@ -62,8 +62,9 @@ +# CONFIG_SEMIHOSTING is not set +# CONFIG_SYS_L2CACHE_OFF is not set +# CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK is not set -+# CONFIG_USE_ARCH_MEMCPY is not set -+# CONFIG_USE_ARCH_MEMSET is not set ++CONFIG_USE_ARCH_MEMCPY=y ++CONFIG_USE_ARCH_MEMMOVE=y ++CONFIG_USE_ARCH_MEMSET=y +CONFIG_ARM64_SUPPORT_AARCH32=y +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_DAVINCI is not set @@ -438,6 +439,7 @@ +CONFIG_BOOTM_EFI=y +# CONFIG_CMD_BOOTZ is not set +CONFIG_CMD_BOOTI=y ++CONFIG_CMD_GUEST_BOOT=y +CONFIG_BOOTM_LINUX=y +CONFIG_BOOTM_NETBSD=y +# CONFIG_BOOTM_OPENRTOS is not set diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0016-virt64_defconfig.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0016-virt64_defconfig.patch deleted file mode 100644 index 38baa16..0000000 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0016-virt64_defconfig.patch +++ /dev/null @@ -1,1376 +0,0 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/configs/virt64_defconfig 1970-01-01 01:00:00.000000000 +0100 -+++ ./configs/virt64_defconfig 2025-09-11 16:34:39.207286547 +0200 -@@ -0,0 +1,1373 @@ -+# -+# Automatically generated file; DO NOT EDIT. -+# U-Boot 2022.04 Configuration -+# -+ -+# -+# Compiler: aarch64-linux-gnu-gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 -+# -+CONFIG_CREATE_ARCH_SYMLINK=y -+CONFIG_SYS_CACHE_SHIFT_6=y -+CONFIG_SYS_CACHELINE_SIZE=64 -+CONFIG_LINKER_LIST_ALIGN=8 -+# CONFIG_ARC is not set -+CONFIG_ARM=y -+# CONFIG_M68K is not set -+# CONFIG_MICROBLAZE is not set -+# CONFIG_MIPS is not set -+# CONFIG_NDS32 is not set -+# CONFIG_NIOS2 is not set -+# CONFIG_PPC is not set -+# CONFIG_RISCV is not set -+# CONFIG_SANDBOX is not set -+# CONFIG_SH is not set -+# CONFIG_X86 is not set -+# CONFIG_XTENSA is not set -+CONFIG_SYS_ARCH="arm" -+CONFIG_SYS_CPU="armv8" -+CONFIG_SYS_VENDOR="emulation" -+CONFIG_SYS_BOARD="qemu-arm" -+CONFIG_SYS_CONFIG_NAME="qemu-arm" -+# CONFIG_SKIP_LOWLEVEL_INIT is not set -+# CONFIG_SKIP_LOWLEVEL_INIT_ONLY is not set -+# CONFIG_SYS_ICACHE_OFF is not set -+# CONFIG_SYS_DCACHE_OFF is not set -+ -+# -+# ARM architecture -+# -+CONFIG_ARM64=y -+CONFIG_ARM64_CRC32=y -+# CONFIG_POSITION_INDEPENDENT is not set -+# CONFIG_INIT_SP_RELATIVE is not set -+# CONFIG_GIC_V3_ITS is not set -+CONFIG_STATIC_RELA=y -+CONFIG_DMA_ADDR_T_64BIT=y -+CONFIG_ARM_ASM_UNIFIED=y -+# CONFIG_SYS_ARM_CACHE_CP15 is not set -+# CONFIG_SYS_ARM_MMU is not set -+# CONFIG_SYS_ARM_MPU is not set -+CONFIG_SYS_ARM_ARCH=8 -+CONFIG_SYS_ARM_CACHE_WRITEBACK=y -+# CONFIG_SYS_ARM_CACHE_WRITETHROUGH is not set -+# CONFIG_SYS_ARM_CACHE_WRITEALLOC is not set -+# CONFIG_ARCH_CPU_INIT is not set -+CONFIG_SYS_ARCH_TIMER=y -+CONFIG_ARM_SMCCC=y -+# CONFIG_SEMIHOSTING is not set -+# CONFIG_SYS_L2CACHE_OFF is not set -+# CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK is not set -+# CONFIG_USE_ARCH_MEMCPY is not set -+# CONFIG_USE_ARCH_MEMSET is not set -+CONFIG_ARM64_SUPPORT_AARCH32=y -+# CONFIG_ARCH_AT91 is not set -+# CONFIG_ARCH_DAVINCI is not set -+# CONFIG_ARCH_KIRKWOOD is not set -+# CONFIG_ARCH_MVEBU is not set -+# CONFIG_ARCH_ORION5X is not set -+# CONFIG_TARGET_STV0991 is not set -+# CONFIG_ARCH_BCM283X is not set -+# CONFIG_ARCH_BCM63158 is not set -+# CONFIG_ARCH_BCM68360 is not set -+# CONFIG_ARCH_BCM6858 is not set -+# CONFIG_ARCH_BCMSTB is not set -+# CONFIG_TARGET_VEXPRESS_CA9X4 is not set -+# CONFIG_TARGET_BCMCYGNUS is not set -+# CONFIG_TARGET_BCMNS2 is not set -+# CONFIG_TARGET_BCMNS3 is not set -+# CONFIG_ARCH_EXYNOS is not set -+# CONFIG_ARCH_S5PC1XX is not set -+# CONFIG_ARCH_HIGHBANK is not set -+# CONFIG_ARCH_INTEGRATOR is not set -+# CONFIG_ARCH_IPQ40XX is not set -+# CONFIG_ARCH_KEYSTONE is not set -+# CONFIG_ARCH_K3 is not set -+# CONFIG_ARCH_OMAP2PLUS is not set -+# CONFIG_ARCH_MESON is not set -+# CONFIG_ARCH_MEDIATEK is not set -+# CONFIG_ARCH_LPC32XX is not set -+# CONFIG_ARCH_IMX8 is not set -+# CONFIG_ARCH_IMX8M is not set -+# CONFIG_ARCH_IMX8ULP is not set -+# CONFIG_ARCH_IMXRT is not set -+# CONFIG_ARCH_MX23 is not set -+# CONFIG_ARCH_MX28 is not set -+# CONFIG_ARCH_MX31 is not set -+# CONFIG_ARCH_MX7ULP is not set -+# CONFIG_ARCH_MX7 is not set -+# CONFIG_ARCH_MX6 is not set -+CONFIG_SPL_LDSCRIPT="arch/arm/cpu/armv8/u-boot-spl.lds" -+# CONFIG_ARCH_MX5 is not set -+# CONFIG_ARCH_NEXELL is not set -+# CONFIG_ARCH_APPLE is not set -+# CONFIG_ARCH_OWL is not set -+CONFIG_ARCH_QEMU=y -+# CONFIG_ARCH_RMOBILE is not set -+# CONFIG_ARCH_SNAPDRAGON is not set -+# CONFIG_ARCH_SOCFPGA is not set -+# CONFIG_ARCH_SUNXI is not set -+# CONFIG_ARCH_U8500 is not set -+# CONFIG_ARCH_VERSAL is not set -+# CONFIG_ARCH_VF610 is not set -+# CONFIG_ARCH_ZYNQ is not set -+# CONFIG_ARCH_ZYNQMP_R5 is not set -+# CONFIG_ARCH_ZYNQMP is not set -+# CONFIG_ARCH_TEGRA is not set -+# CONFIG_TARGET_VEXPRESS64_AEMV8A is not set -+# CONFIG_TARGET_VEXPRESS64_BASE_FVP is not set -+# CONFIG_TARGET_VEXPRESS64_JUNO is not set -+# CONFIG_TARGET_TOTAL_COMPUTE is not set -+# CONFIG_TARGET_LS2080A_EMU is not set -+# CONFIG_TARGET_LS1088AQDS is not set -+# CONFIG_TARGET_LS2080AQDS is not set -+# CONFIG_TARGET_LS2080ARDB is not set -+# CONFIG_TARGET_LS2081ARDB is not set -+# CONFIG_TARGET_LX2160ARDB is not set -+# CONFIG_TARGET_LX2160AQDS is not set -+# CONFIG_TARGET_LX2162AQDS is not set -+# CONFIG_TARGET_HIKEY is not set -+# CONFIG_TARGET_HIKEY960 is not set -+# CONFIG_TARGET_POPLAR is not set -+# CONFIG_TARGET_LS1012AQDS is not set -+# CONFIG_TARGET_LS1012ARDB is not set -+# CONFIG_TARGET_LS1012A2G5RDB is not set -+# CONFIG_TARGET_LS1012AFRWY is not set -+# CONFIG_TARGET_LS1012AFRDM is not set -+# CONFIG_TARGET_LS1028AQDS is not set -+# CONFIG_TARGET_LS1028ARDB is not set -+# CONFIG_TARGET_LS1088ARDB is not set -+# CONFIG_TARGET_LS1021AQDS is not set -+# CONFIG_TARGET_LS1021ATWR is not set -+# CONFIG_TARGET_PG_WCOM_SELI8 is not set -+# CONFIG_TARGET_PG_WCOM_EXPU1 is not set -+# CONFIG_TARGET_LS1021ATSN is not set -+# CONFIG_TARGET_LS1021AIOT is not set -+# CONFIG_TARGET_LS1043AQDS is not set -+# CONFIG_TARGET_LS1043ARDB is not set -+# CONFIG_TARGET_LS1046AQDS is not set -+# CONFIG_TARGET_LS1046ARDB is not set -+# CONFIG_TARGET_LS1046AFRWY is not set -+# CONFIG_TARGET_SL28 is not set -+# CONFIG_TARGET_TEN64 is not set -+# CONFIG_TARGET_COLIBRI_PXA270 is not set -+# CONFIG_ARCH_UNIPHIER is not set -+# CONFIG_ARCH_SYNQUACER is not set -+# CONFIG_ARCH_STM32 is not set -+# CONFIG_ARCH_STI is not set -+# CONFIG_ARCH_STM32MP is not set -+# CONFIG_ARCH_ROCKCHIP is not set -+# CONFIG_ARCH_OCTEONTX is not set -+# CONFIG_ARCH_OCTEONTX2 is not set -+# CONFIG_TARGET_THUNDERX_88XX is not set -+# CONFIG_ARCH_ASPEED is not set -+# CONFIG_TARGET_DURIAN is not set -+# CONFIG_TARGET_PRESIDIO_ASIC is not set -+# CONFIG_TARGET_XENGUEST_ARM64 is not set -+# CONFIG_STATIC_MACH_TYPE is not set -+CONFIG_SYS_TEXT_BASE=0x00000000 -+CONFIG_SYS_MALLOC_LEN=0x400000 -+CONFIG_SYS_MALLOC_F_LEN=0x400 -+CONFIG_NR_DRAM_BANKS=1 -+CONFIG_BOARD_SPECIFIC_OPTIONS=y -+CONFIG_ENV_SIZE=0x1f000 -+# CONFIG_DM_GPIO is not set -+CONFIG_DEFAULT_DEVICE_TREE="qemu-arm64" -+CONFIG_MULTI_DTB_FIT_UNCOMPRESS_SZ=0x8000 -+# CONFIG_TARGET_QEMU_ARM_32BIT is not set -+CONFIG_TARGET_QEMU_ARM_64BIT=y -+CONFIG_ERR_PTR_OFFSET=0x0 -+CONFIG_BOOTSTAGE_STASH_ADDR=0 -+CONFIG_IDENT_STRING="" -+CONFIG_SYS_CLK_FREQ=0 -+# CONFIG_CHIP_DIP_SCAN is not set -+# CONFIG_ARMV8_MULTIENTRY is not set -+# CONFIG_ARMV8_SET_SMPEN is not set -+ -+# -+# ARMv8 secure monitor firmware -+# -+# CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT is not set -+# CONFIG_SPL_ARMV8_SEC_FIRMWARE_SUPPORT is not set -+# CONFIG_SPL_RECOVER_DATA_SECTION is not set -+CONFIG_PSCI_RESET=y -+# CONFIG_ARMV8_PSCI is not set -+# CONFIG_ARMV8_EA_EL3_FIRST is not set -+# CONFIG_CMD_DEKBLOB is not set -+# CONFIG_IMX_CAAM_DEK_ENCAP is not set -+# CONFIG_IMX_OPTEE_DEK_ENCAP is not set -+# CONFIG_IMX_SECO_DEK_ENCAP is not set -+# CONFIG_CMD_HDMIDETECT is not set -+CONFIG_IMX_DCD_ADDR=0x00910000 -+ -+# -+# ARM debug -+# -+CONFIG_BUILD_TARGET="" -+# CONFIG_SYS_PCI_64BIT is not set -+# CONFIG_DEBUG_UART is not set -+CONFIG_AHCI=y -+# CONFIG_OF_BOARD_FIXUP is not set -+ -+# -+# General setup -+# -+CONFIG_LOCALVERSION="" -+CONFIG_LOCALVERSION_AUTO=y -+CONFIG_CC_IS_GCC=y -+CONFIG_GCC_VERSION=110400 -+CONFIG_CLANG_VERSION=0 -+CONFIG_CC_OPTIMIZE_FOR_SIZE=y -+# CONFIG_OPTIMIZE_INLINING is not set -+CONFIG_ARCH_SUPPORTS_LTO=y -+# CONFIG_LTO is not set -+CONFIG_CC_HAS_ASM_INLINE=y -+# CONFIG_XEN is not set -+CONFIG_DISTRO_DEFAULTS=y -+CONFIG_ENV_VARS_UBOOT_CONFIG=y -+# CONFIG_SYS_BOOT_GET_CMDLINE is not set -+# CONFIG_SYS_BOOT_GET_KBD is not set -+CONFIG_SYS_MALLOC_F=y -+CONFIG_EXPERT=y -+CONFIG_SYS_MALLOC_CLEAR_ON_INIT=y -+# CONFIG_SYS_MALLOC_DEFAULT_TO_INIT is not set -+# CONFIG_TOOLS_DEBUG is not set -+CONFIG_PHYS_64BIT=y -+# CONFIG_REMAKE_ELF is not set -+# CONFIG_SYS_CUSTOM_LDSCRIPT is not set -+CONFIG_SYS_LOAD_ADDR=0x1000000 -+CONFIG_PLATFORM_ELFENTRY="_start" -+CONFIG_STACK_SIZE=0x1000000 -+CONFIG_SYS_SRAM_BASE=0x0 -+CONFIG_SYS_SRAM_SIZE=0x0 -+# CONFIG_MP is not set -+CONFIG_EXAMPLES=y -+ -+# -+# API -+# -+# CONFIG_API is not set -+ -+# -+# Boot options -+# -+ -+# -+# Boot images -+# -+# CONFIG_ANDROID_BOOT_IMAGE is not set -+CONFIG_FIT=y -+# CONFIG_TIMESTAMP is not set -+CONFIG_FIT_EXTERNAL_OFFSET=0x0 -+CONFIG_FIT_FULL_CHECK=y -+# CONFIG_FIT_SIGNATURE is not set -+# CONFIG_FIT_CIPHER is not set -+CONFIG_FIT_VERBOSE=y -+# CONFIG_FIT_BEST_MATCH is not set -+CONFIG_FIT_PRINT=y -+CONFIG_LEGACY_IMAGE_FORMAT=y -+CONFIG_SUPPORT_RAW_INITRD=y -+# CONFIG_OF_BOARD_SETUP is not set -+# CONFIG_OF_SYSTEM_SETUP is not set -+# CONFIG_OF_STDOUT_VIA_ALIAS is not set -+CONFIG_SYS_EXTRA_OPTIONS="" -+CONFIG_HAVE_SYS_TEXT_BASE=y -+# CONFIG_DYNAMIC_SYS_CLK_FREQ is not set -+# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set -+# CONFIG_CHROMEOS is not set -+# CONFIG_CHROMEOS_VBOOT is not set -+# CONFIG_RAMBOOT_PBL is not set -+ -+# -+# Boot timing -+# -+# CONFIG_BOOTSTAGE is not set -+CONFIG_BOOTSTAGE_STASH_SIZE=0x1000 -+# CONFIG_SHOW_BOOT_PROGRESS is not set -+ -+# -+# Boot media -+# -+# CONFIG_NAND_BOOT is not set -+# CONFIG_ONENAND_BOOT is not set -+# CONFIG_QSPI_BOOT is not set -+# CONFIG_SATA_BOOT is not set -+# CONFIG_SD_BOOT is not set -+# CONFIG_SD_BOOT_QSPI is not set -+# CONFIG_SPI_BOOT is not set -+ -+# -+# Autoboot options -+# -+CONFIG_AUTOBOOT=y -+CONFIG_BOOTDELAY=2 -+# CONFIG_AUTOBOOT_KEYED is not set -+# CONFIG_AUTOBOOT_USE_MENUKEY is not set -+# CONFIG_USE_BOOTARGS is not set -+# CONFIG_BOOTARGS_SUBST is not set -+# CONFIG_USE_BOOTCOMMAND is not set -+# CONFIG_USE_PREBOOT is not set -+CONFIG_DEFAULT_FDT_FILE="" -+ -+# -+# Console -+# -+CONFIG_MENU=y -+# CONFIG_CONSOLE_RECORD is not set -+# CONFIG_DISABLE_CONSOLE is not set -+CONFIG_LOGLEVEL=4 -+CONFIG_SPL_LOGLEVEL=4 -+CONFIG_TPL_LOGLEVEL=4 -+# CONFIG_SILENT_CONSOLE is not set -+# CONFIG_PRE_CONSOLE_BUFFER is not set -+# CONFIG_CONSOLE_MUX is not set -+# CONFIG_SYS_CONSOLE_IS_IN_ENV is not set -+# CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE is not set -+# CONFIG_SYS_CONSOLE_ENV_OVERWRITE is not set -+# CONFIG_SYS_CONSOLE_INFO_QUIET is not set -+# CONFIG_SYS_STDIO_DEREGISTER is not set -+# CONFIG_SPL_SYS_STDIO_DEREGISTER is not set -+# CONFIG_SYS_DEVICE_NULLDEV is not set -+ -+# -+# Logging -+# -+# CONFIG_LOG is not set -+ -+# -+# Init options -+# -+# CONFIG_BOARD_TYPES is not set -+# CONFIG_DISPLAY_CPUINFO is not set -+# CONFIG_DISPLAY_BOARDINFO is not set -+# CONFIG_DISPLAY_BOARDINFO_LATE is not set -+ -+# -+# Start-up hooks -+# -+# CONFIG_ARCH_EARLY_INIT_R is not set -+# CONFIG_ARCH_MISC_INIT is not set -+# CONFIG_BOARD_EARLY_INIT_F is not set -+# CONFIG_BOARD_EARLY_INIT_R is not set -+CONFIG_BOARD_LATE_INIT=y -+# CONFIG_LAST_STAGE_INIT is not set -+# CONFIG_MISC_INIT_F is not set -+# CONFIG_MISC_INIT_R is not set -+# CONFIG_ID_EEPROM is not set -+# CONFIG_PCI_INIT_R is not set -+ -+# -+# Security support -+# -+CONFIG_HASH=y -+# CONFIG_STACKPROTECTOR is not set -+ -+# -+# Update support -+# -+# CONFIG_UPDATE_TFTP is not set -+# CONFIG_ANDROID_AB is not set -+ -+# -+# Blob list -+# -+# CONFIG_BLOBLIST is not set -+ -+# -+# SPL / TPL -+# -+CONFIG_SPL_SYS_STACK_F_CHECK_BYTE=0xaa -+# CONFIG_SPL_SYS_REPORT_STACK_F_USAGE is not set -+# CONFIG_SPL_SHOW_ERRORS is not set -+ -+# -+# PowerPC and LayerScape SPL Boot options -+# -+# CONFIG_SPL_MD5 is not set -+# CONFIG_FDT_SIMPLEFB is not set -+ -+# -+# Command line interface -+# -+CONFIG_CMDLINE=y -+CONFIG_HUSH_PARSER=y -+CONFIG_CMDLINE_EDITING=y -+CONFIG_AUTO_COMPLETE=y -+CONFIG_SYS_LONGHELP=y -+CONFIG_SYS_PROMPT="=> " -+CONFIG_SYS_PROMPT_HUSH_PS2="> " -+CONFIG_SYS_XTRACE=y -+ -+# -+# Commands -+# -+ -+# -+# Info commands -+# -+CONFIG_CMD_BDI=y -+# CONFIG_CMD_CONFIG is not set -+# CONFIG_CMD_CONSOLE is not set -+# CONFIG_CMD_LICENSE is not set -+# CONFIG_CMD_PMC is not set -+ -+# -+# Boot commands -+# -+# CONFIG_CMD_BOOTD is not set -+CONFIG_CMD_BOOTM=y -+CONFIG_BOOTM_EFI=y -+# CONFIG_CMD_BOOTZ is not set -+CONFIG_CMD_BOOTI=y -+CONFIG_BOOTM_LINUX=y -+CONFIG_BOOTM_NETBSD=y -+# CONFIG_BOOTM_OPENRTOS is not set -+# CONFIG_BOOTM_OSE is not set -+CONFIG_BOOTM_PLAN9=y -+CONFIG_BOOTM_RTEMS=y -+CONFIG_BOOTM_VXWORKS=y -+CONFIG_CMD_BOOTEFI=y -+CONFIG_CMD_BOOTEFI_HELLO_COMPILE=y -+# CONFIG_CMD_BOOTEFI_HELLO is not set -+CONFIG_CMD_BOOTEFI_SELFTEST=y -+# CONFIG_CMD_BOOTMENU is not set -+# CONFIG_CMD_ADTIMG is not set -+CONFIG_CMD_ELF=y -+CONFIG_CMD_FDT=y -+CONFIG_CMD_GO=y -+CONFIG_CMD_RUN=y -+CONFIG_CMD_IMI=y -+# CONFIG_CMD_IMLS is not set -+# CONFIG_CMD_XIMG is not set -+# CONFIG_CMD_THOR_DOWNLOAD is not set -+# CONFIG_CMD_ZBOOT is not set -+ -+# -+# Environment commands -+# -+# CONFIG_CMD_ASKENV is not set -+CONFIG_CMD_EXPORTENV=y -+CONFIG_CMD_IMPORTENV=y -+# CONFIG_CMD_EDITENV is not set -+# CONFIG_CMD_GREPENV is not set -+CONFIG_CMD_SAVEENV=y -+# CONFIG_CMD_ERASEENV is not set -+CONFIG_CMD_ENV_EXISTS=y -+# CONFIG_CMD_ENV_CALLBACK is not set -+# CONFIG_CMD_ENV_FLAGS is not set -+# CONFIG_CMD_NVEDIT_EFI is not set -+# CONFIG_CMD_NVEDIT_INFO is not set -+# CONFIG_CMD_NVEDIT_LOAD is not set -+# CONFIG_CMD_NVEDIT_SELECT is not set -+ -+# -+# Memory commands -+# -+# CONFIG_CMD_BINOP is not set -+# CONFIG_CMD_BLOBLIST is not set -+CONFIG_CMD_CRC32=y -+# CONFIG_CRC32_VERIFY is not set -+# CONFIG_CMD_EEPROM is not set -+# CONFIG_LOOPW is not set -+# CONFIG_CMD_MD5SUM is not set -+# CONFIG_CMD_MEMINFO is not set -+CONFIG_CMD_MEMORY=y -+# CONFIG_CMD_MEM_SEARCH is not set -+# CONFIG_CMD_MX_CYCLIC is not set -+CONFIG_CMD_RANDOM=y -+# CONFIG_CMD_MEMTEST is not set -+# CONFIG_CMD_SHA1SUM is not set -+# CONFIG_CMD_STRINGS is not set -+ -+# -+# Compression commands -+# -+# CONFIG_CMD_LZMADEC is not set -+CONFIG_CMD_UNLZ4=y -+# CONFIG_CMD_UNZIP is not set -+# CONFIG_CMD_ZIP is not set -+ -+# -+# Device access commands -+# -+# CONFIG_CMD_ARMFLASH is not set -+# CONFIG_CMD_BIND is not set -+# CONFIG_CMD_CLK is not set -+# CONFIG_CMD_DEMO is not set -+# CONFIG_CMD_DFU is not set -+# CONFIG_CMD_DM is not set -+# CONFIG_CMD_FPGAD is not set -+# CONFIG_CMD_FUSE is not set -+# CONFIG_CMD_GPIO is not set -+# CONFIG_CMD_GPT is not set -+# CONFIG_RANDOM_UUID is not set -+# CONFIG_CMD_IDE is not set -+# CONFIG_CMD_IO is not set -+# CONFIG_CMD_IOTRACE is not set -+# CONFIG_CMD_I2C is not set -+# CONFIG_CMD_LOADB is not set -+# CONFIG_CMD_LOADS is not set -+# CONFIG_CMD_LSBLK is not set -+# CONFIG_CMD_MBR is not set -+# CONFIG_CMD_CLONE is not set -+# CONFIG_CMD_OSD is not set -+CONFIG_CMD_PART=y -+# CONFIG_CMD_PCI is not set -+# CONFIG_CMD_POWEROFF is not set -+# CONFIG_CMD_READ is not set -+# CONFIG_CMD_SATA is not set -+# CONFIG_CMD_SAVES is not set -+CONFIG_CMD_SCSI=y -+# CONFIG_CMD_SDRAM is not set -+# CONFIG_CMD_TSI148 is not set -+# CONFIG_CMD_UNIVERSE is not set -+# CONFIG_CMD_USB_SDP is not set -+CONFIG_CMD_VIRTIO=y -+ -+# -+# Shell scripting commands -+# -+CONFIG_CMD_ECHO=y -+# CONFIG_CMD_ITEST is not set -+CONFIG_CMD_SOURCE=y -+# CONFIG_CMD_SETEXPR is not set -+ -+# -+# Android support commands -+# -+CONFIG_CMD_NET=y -+CONFIG_CMD_BOOTP=y -+CONFIG_CMD_DHCP=y -+CONFIG_BOOTP_BOOTPATH=y -+CONFIG_BOOTP_DNS=y -+# CONFIG_BOOTP_DNS2 is not set -+CONFIG_BOOTP_GATEWAY=y -+CONFIG_BOOTP_HOSTNAME=y -+# CONFIG_BOOTP_PREFER_SERVERIP is not set -+CONFIG_BOOTP_SUBNETMASK=y -+# CONFIG_BOOTP_NTPSERVER is not set -+# CONFIG_CMD_PCAP is not set -+CONFIG_BOOTP_PXE=y -+CONFIG_BOOTP_PXE_CLIENTARCH=0x16 -+CONFIG_BOOTP_VCI_STRING="U-Boot.armv8" -+CONFIG_CMD_TFTPBOOT=y -+# CONFIG_CMD_TFTPPUT is not set -+# CONFIG_CMD_TFTPSRV is not set -+CONFIG_NET_TFTP_VARS=y -+# CONFIG_CMD_RARP is not set -+# CONFIG_CMD_NFS is not set -+CONFIG_CMD_MII=y -+CONFIG_CMD_PING=y -+# CONFIG_CMD_CDP is not set -+# CONFIG_CMD_SNTP is not set -+# CONFIG_CMD_DNS is not set -+# CONFIG_CMD_LINK_LOCAL is not set -+# CONFIG_CMD_ETHSW is not set -+CONFIG_CMD_PXE=y -+# CONFIG_CMD_WOL is not set -+ -+# -+# Misc commands -+# -+# CONFIG_CMD_BSP is not set -+# CONFIG_CMD_BLOCK_CACHE is not set -+# CONFIG_CMD_CACHE is not set -+# CONFIG_CMD_CONITRACE is not set -+# CONFIG_CMD_EFIDEBUG is not set -+# CONFIG_CMD_EXCEPTION is not set -+# CONFIG_CMD_DATE is not set -+# CONFIG_CMD_TIME is not set -+# CONFIG_CMD_GETTIME is not set -+# CONFIG_CMD_RNG is not set -+# CONFIG_CMD_KASLRSEED is not set -+CONFIG_CMD_SLEEP=y -+# CONFIG_CMD_TIMER is not set -+CONFIG_CMD_SYSBOOT=y -+CONFIG_CMD_QFW=y -+# CONFIG_CMD_PSTORE is not set -+# CONFIG_CMD_TERMINAL is not set -+# CONFIG_CMD_UUID is not set -+ -+# -+# TI specific command line interface -+# -+# CONFIG_CMD_DDR3 is not set -+ -+# -+# Power commands -+# -+ -+# -+# Security commands -+# -+# CONFIG_CMD_AES is not set -+# CONFIG_CMD_BLOB is not set -+# CONFIG_CMD_HASH is not set -+# CONFIG_CMD_HVC is not set -+# CONFIG_CMD_SMC is not set -+ -+# -+# Firmware commands -+# -+ -+# -+# Filesystem commands -+# -+# CONFIG_CMD_BTRFS is not set -+CONFIG_CMD_EXT2=y -+CONFIG_CMD_EXT4=y -+# CONFIG_CMD_EXT4_WRITE is not set -+CONFIG_CMD_FAT=y -+# CONFIG_CMD_SQUASHFS is not set -+CONFIG_CMD_FS_GENERIC=y -+# CONFIG_CMD_FS_UUID is not set -+# CONFIG_CMD_JFFS2 is not set -+# CONFIG_CMD_REISER is not set -+# CONFIG_CMD_ZFS is not set -+ -+# -+# Debug commands -+# -+# CONFIG_CMD_DIAG is not set -+# CONFIG_CMD_LOG is not set -+# CONFIG_CMD_UBI is not set -+ -+# -+# Partition Types -+# -+CONFIG_PARTITIONS=y -+# CONFIG_MAC_PARTITION is not set -+CONFIG_DOS_PARTITION=y -+CONFIG_ISO_PARTITION=y -+# CONFIG_AMIGA_PARTITION is not set -+CONFIG_EFI_PARTITION=y -+CONFIG_EFI_PARTITION_ENTRIES_NUMBERS=128 -+CONFIG_EFI_PARTITION_ENTRIES_OFF=0 -+CONFIG_PARTITION_UUIDS=y -+# CONFIG_PARTITION_TYPE_GUID is not set -+CONFIG_SUPPORT_OF_CONTROL=y -+ -+# -+# Device Tree Control -+# -+CONFIG_OF_CONTROL=y -+CONFIG_OF_REAL=y -+# CONFIG_OF_LIVE is not set -+CONFIG_OF_SEPARATE=y -+# CONFIG_OF_EMBED is not set -+CONFIG_OF_BOARD=y -+CONFIG_OF_HAS_PRIOR_STAGE=y -+CONFIG_OF_OMIT_DTB=y -+CONFIG_DEVICE_TREE_INCLUDES="" -+CONFIG_OF_LIST="qemu-arm64" -+# CONFIG_MULTI_DTB_FIT is not set -+# CONFIG_OF_DTB_PROPS_REMOVE is not set -+ -+# -+# Environment -+# -+CONFIG_ENV_SUPPORT=y -+CONFIG_ENV_SOURCE_FILE="" -+CONFIG_SAVEENV=y -+# CONFIG_ENV_OVERWRITE is not set -+CONFIG_ENV_IS_NOWHERE=y -+# CONFIG_ENV_IS_IN_EEPROM is not set -+# CONFIG_ENV_IS_IN_FAT is not set -+# CONFIG_ENV_IS_IN_EXT4 is not set -+# CONFIG_ENV_IS_IN_FLASH is not set -+# CONFIG_ENV_IS_IN_NAND is not set -+# CONFIG_ENV_IS_IN_NVRAM is not set -+# CONFIG_ENV_IS_IN_ONENAND is not set -+# CONFIG_ENV_IS_IN_REMOTE is not set -+# CONFIG_SYS_REDUNDAND_ENVIRONMENT is not set -+# CONFIG_SYS_RELOC_GD_ENV_ADDR is not set -+# CONFIG_USE_DEFAULT_ENV_FILE is not set -+# CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG is not set -+# CONFIG_ENV_IMPORT_FDT is not set -+# CONFIG_ENV_APPEND is not set -+# CONFIG_ENV_WRITEABLE_LIST is not set -+# CONFIG_ENV_ACCESS_IGNORE_FORCE is not set -+# CONFIG_VERSION_VARIABLE is not set -+CONFIG_NET=y -+# CONFIG_PROT_UDP is not set -+# CONFIG_BOOTP_SEND_HOSTNAME is not set -+# CONFIG_NET_RANDOM_ETHADDR is not set -+# CONFIG_NETCONSOLE is not set -+# CONFIG_IP_DEFRAG is not set -+CONFIG_TFTP_BLOCKSIZE=512 -+CONFIG_TFTP_WINDOWSIZE=1 -+# CONFIG_TFTP_TSIZE is not set -+# CONFIG_SERVERIP_FROM_PROXYDHCP is not set -+CONFIG_SERVERIP_FROM_PROXYDHCP_DELAY_MS=100 -+# CONFIG_KEEP_SERVERADDR is not set -+# CONFIG_UDP_CHECKSUM is not set -+# CONFIG_BOOTP_SERVERIP is not set -+ -+# -+# Device Drivers -+# -+ -+# -+# Generic Driver Options -+# -+CONFIG_DM=y -+# CONFIG_DM_WARN is not set -+# CONFIG_DM_DEBUG is not set -+# CONFIG_DM_DEVICE_REMOVE is not set -+# CONFIG_DM_STDIO is not set -+# CONFIG_DM_SEQ_ALIAS is not set -+# CONFIG_DM_DMA is not set -+# CONFIG_REGMAP is not set -+# CONFIG_DEVRES is not set -+# CONFIG_SIMPLE_BUS is not set -+# CONFIG_OF_TRANSLATE is not set -+# CONFIG_TRANSLATION_OFFSET is not set -+CONFIG_DM_DEV_READ_INLINE=y -+# CONFIG_ACPIGEN is not set -+# CONFIG_BOUNCE_BUFFER is not set -+# CONFIG_ADC is not set -+# CONFIG_ADC_EXYNOS is not set -+# CONFIG_ADC_SANDBOX is not set -+# CONFIG_SARADC_MESON is not set -+# CONFIG_SARADC_ROCKCHIP is not set -+# CONFIG_SATA is not set -+# CONFIG_SCSI_AHCI is not set -+ -+# -+# SATA/SCSI device support -+# -+# CONFIG_AHCI_PCI is not set -+# CONFIG_DWC_AHCI is not set -+# CONFIG_DWC_AHSATA is not set -+# CONFIG_MTK_AHCI is not set -+# CONFIG_SUNXI_AHCI is not set -+# CONFIG_AXI is not set -+ -+# -+# Bus devices -+# -+CONFIG_BLK=y -+CONFIG_HAVE_BLOCK_DEVICE=y -+CONFIG_BLOCK_CACHE=y -+# CONFIG_EFI_MEDIA is not set -+# CONFIG_IDE is not set -+# CONFIG_BOOTCOUNT_LIMIT is not set -+ -+# -+# Button Support -+# -+# CONFIG_BUTTON is not set -+ -+# -+# Cache Controller drivers -+# -+# CONFIG_CACHE is not set -+# CONFIG_L2X0_CACHE is not set -+# CONFIG_NCORE_CACHE is not set -+# CONFIG_SIFIVE_CCACHE is not set -+ -+# -+# Clock -+# -+# CONFIG_CLK is not set -+# CONFIG_CLK_CCF is not set -+# CONFIG_CPU is not set -+ -+# -+# Hardware crypto devices -+# -+# CONFIG_DM_HASH is not set -+# CONFIG_FSL_CAAM is not set -+CONFIG_CAAM_64BIT=y -+# CONFIG_SYS_FSL_SEC_BE is not set -+# CONFIG_SYS_FSL_SEC_LE is not set -+# CONFIG_DDR_SPD is not set -+ -+# -+# Demo for driver model -+# -+# CONFIG_DM_DEMO is not set -+ -+# -+# DFU support -+# -+ -+# -+# DMA Support -+# -+# CONFIG_DMA is not set -+# CONFIG_DMA_LPC32XX is not set -+# CONFIG_TI_EDMA3 is not set -+# CONFIG_DMA_LEGACY is not set -+ -+# -+# Fastboot support -+# -+# CONFIG_UDP_FUNCTION_FASTBOOT is not set -+CONFIG_FIRMWARE=y -+# CONFIG_SPL_FIRMWARE is not set -+CONFIG_ARM_PSCI_FW=y -+# CONFIG_ZYNQMP_FIRMWARE is not set -+# CONFIG_SCMI_FIRMWARE is not set -+ -+# -+# FPGA support -+# -+# CONFIG_FPGA_ALTERA is not set -+# CONFIG_FPGA_SOCFPGA is not set -+# CONFIG_FPGA_XILINX is not set -+CONFIG_GPIO=y -+# CONFIG_AT91_GPIO is not set -+# CONFIG_DA8XX_GPIO is not set -+# CONFIG_INTEL_BROADWELL_GPIO is not set -+# CONFIG_IMX_RGPIO2P is not set -+# CONFIG_IPROC_GPIO is not set -+# CONFIG_KIRKWOOD_GPIO is not set -+# CONFIG_LPC32XX_GPIO is not set -+# CONFIG_MCP230XX_GPIO is not set -+# CONFIG_MXC_GPIO is not set -+# CONFIG_MXS_GPIO is not set -+# CONFIG_CMD_PCA953X is not set -+# CONFIG_CMD_TCA642X is not set -+# CONFIG_VYBRID_GPIO is not set -+ -+# -+# Hardware Spinlock Support -+# -+# CONFIG_DM_HWSPINLOCK is not set -+CONFIG_I2C=y -+# CONFIG_DM_I2C is not set -+# CONFIG_SYS_I2C_LEGACY is not set -+# CONFIG_SYS_I2C_FSL is not set -+# CONFIG_SYS_I2C_DW is not set -+# CONFIG_SYS_I2C_IMX_LPI2C is not set -+# CONFIG_SYS_I2C_MICROCHIP is not set -+# CONFIG_SYS_I2C_MXC is not set -+# CONFIG_SYS_I2C_SOFT is not set -+# CONFIG_SYS_I2C_MV is not set -+# CONFIG_SYS_I2C_MVTWSI is not set -+# CONFIG_INPUT is not set -+# CONFIG_DM_KEYBOARD is not set -+# CONFIG_KEYBOARD is not set -+# CONFIG_TEGRA_KEYBOARD is not set -+# CONFIG_TWL4030_INPUT is not set -+ -+# -+# IOMMU device drivers -+# -+# CONFIG_IOMMU is not set -+ -+# -+# LED Support -+# -+# CONFIG_LED is not set -+# CONFIG_LED_STATUS is not set -+ -+# -+# Mailbox Controller Support -+# -+# CONFIG_DM_MAILBOX is not set -+ -+# -+# Memory Controller drivers -+# -+ -+# -+# Multifunction device drivers -+# -+# CONFIG_MISC is not set -+# CONFIG_CROS_EC is not set -+# CONFIG_DS4510 is not set -+# CONFIG_FSL_SEC_MON is not set -+# CONFIG_IRQ is not set -+# CONFIG_NUVOTON_NCT6102D is not set -+# CONFIG_PWRSEQ is not set -+# CONFIG_PCA9551_LED is not set -+# CONFIG_TEST_DRV is not set -+# CONFIG_TWL4030_LED is not set -+# CONFIG_WINBOND_W83627 is not set -+CONFIG_QFW=y -+CONFIG_QFW_MMIO=y -+# CONFIG_FS_LOADER is not set -+# CONFIG_SPL_FS_LOADER is not set -+ -+# -+# MMC Host controller Support -+# -+# CONFIG_MMC is not set -+# CONFIG_MMC_BROKEN_CD is not set -+# CONFIG_DM_MMC is not set -+# CONFIG_FSL_ESDHC is not set -+# CONFIG_FSL_ESDHC_IMX is not set -+ -+# -+# MTD Support -+# -+# CONFIG_MTD is not set -+# CONFIG_DM_MTD is not set -+# CONFIG_MTD_NOR_FLASH is not set -+# CONFIG_FLASH_CFI_DRIVER is not set -+# CONFIG_USE_SYS_MAX_FLASH_BANKS is not set -+# CONFIG_MTD_RAW_NAND is not set -+ -+# -+# SPI Flash Support -+# -+# CONFIG_SPI_FLASH is not set -+ -+# -+# UBI support -+# -+# CONFIG_UBI_SILENCE_MSG is not set -+# CONFIG_MTD_UBI is not set -+ -+# -+# Multiplexer drivers -+# -+# CONFIG_MULTIPLEXER is not set -+# CONFIG_BITBANGMII is not set -+# CONFIG_MV88E6352_SWITCH is not set -+# CONFIG_PHYLIB is not set -+# CONFIG_FSL_PFE is not set -+# CONFIG_BNXT_ETH is not set -+CONFIG_ETH=y -+CONFIG_DM_ETH=y -+# CONFIG_DM_ETH_PHY is not set -+CONFIG_NETDEVICES=y -+# CONFIG_PHY_GIGE is not set -+# CONFIG_ALTERA_TSE is not set -+# CONFIG_BCM_SF2_ETH is not set -+# CONFIG_BCMGENET is not set -+# CONFIG_CALXEDA_XGMAC is not set -+# CONFIG_DWC_ETH_QOS is not set -+CONFIG_E1000=y -+# CONFIG_E1000_SPI_GENERIC is not set -+# CONFIG_E1000_SPI is not set -+# CONFIG_CMD_E1000 is not set -+# CONFIG_EEPRO100 is not set -+# CONFIG_ETH_DESIGNWARE is not set -+# CONFIG_ETH_DESIGNWARE_MESON8B is not set -+# CONFIG_ETHOC is not set -+# CONFIG_FMAN_ENET is not set -+# CONFIG_FTMAC100 is not set -+# CONFIG_FTGMAC100 is not set -+# CONFIG_MCFFEC is not set -+# CONFIG_FSLDMAFEC is not set -+# CONFIG_KS8851_MLL is not set -+# CONFIG_MACB is not set -+# CONFIG_PCH_GBE is not set -+# CONFIG_RGMII is not set -+# CONFIG_MII is not set -+# CONFIG_PCNET is not set -+# CONFIG_QE_UEC is not set -+# CONFIG_RTL8139 is not set -+# CONFIG_RTL8169 is not set -+# CONFIG_SMC911X is not set -+# CONFIG_SUN7I_GMAC is not set -+# CONFIG_SUN4I_EMAC is not set -+# CONFIG_SUN8I_EMAC is not set -+# CONFIG_SH_ETHER is not set -+# CONFIG_DRIVER_TI_CPSW is not set -+# CONFIG_DRIVER_TI_EMAC is not set -+# CONFIG_DRIVER_TI_KEYSTONE_NET is not set -+# CONFIG_TULIP is not set -+# CONFIG_XILINX_AXIEMAC is not set -+# CONFIG_XILINX_EMACLITE is not set -+# CONFIG_ZYNQ_GEM is not set -+# CONFIG_SYS_DPAA_QBMAN is not set -+# CONFIG_TSEC_ENET is not set -+# CONFIG_MEDIATEK_ETH is not set -+# CONFIG_HIGMACV300_ETH is not set -+# CONFIG_NVME is not set -+# CONFIG_NVME_APPLE is not set -+# CONFIG_NVME_PCI is not set -+CONFIG_PCI=y -+# CONFIG_DM_PCI_COMPAT is not set -+CONFIG_PCI_PNP=y -+# CONFIG_PCI_REGION_MULTI_ENTRY is not set -+# CONFIG_PCI_SRIOV is not set -+# CONFIG_PCI_ARID is not set -+CONFIG_PCIE_ECAM_GENERIC=y -+# CONFIG_PCIE_ECAM_SYNQUACER is not set -+# CONFIG_PCI_PHYTIUM is not set -+# CONFIG_PCIE_FSL is not set -+# CONFIG_PCI_MPC85XX is not set -+# CONFIG_PCI_XILINX is not set -+# CONFIG_PCIE_LAYERSCAPE_RC is not set -+# CONFIG_PCIE_LAYERSCAPE_EP is not set -+# CONFIG_PCIE_LAYERSCAPE_GEN4 is not set -+# CONFIG_PCIE_INTEL_FPGA is not set -+# CONFIG_PCIE_IPROC is not set -+# CONFIG_PCI_KEYSTONE is not set -+ -+# -+# PCI Endpoint -+# -+# CONFIG_PCI_ENDPOINT is not set -+# CONFIG_X86_PCH7 is not set -+# CONFIG_X86_PCH9 is not set -+ -+# -+# PHY Subsystem -+# -+# CONFIG_PHY is not set -+# CONFIG_MIPI_DPHY_HELPERS is not set -+ -+# -+# Rockchip PHY driver -+# -+# CONFIG_MVEBU_COMPHY_SUPPORT is not set -+ -+# -+# Pin controllers -+# -+# CONFIG_PINCTRL is not set -+CONFIG_POWER=y -+# CONFIG_POWER_LEGACY is not set -+# CONFIG_SPL_POWER_LEGACY is not set -+# CONFIG_ACPI_PMC is not set -+# CONFIG_SPL_ACPI_PMC is not set -+# CONFIG_TPL_ACPI_PMC is not set -+ -+# -+# Power Domain Support -+# -+# CONFIG_POWER_DOMAIN is not set -+# CONFIG_DM_PMIC is not set -+# CONFIG_POWER_MC34VR500 is not set -+# CONFIG_DM_REGULATOR is not set -+# CONFIG_POWER_MT6323 is not set -+# CONFIG_DM_PWM is not set -+# CONFIG_PWM_IMX is not set -+# CONFIG_PWM_SANDBOX is not set -+# CONFIG_U_QE is not set -+# CONFIG_RAM is not set -+ -+# -+# Reboot Mode Support -+# -+# CONFIG_DM_REBOOT_MODE is not set -+ -+# -+# Remote Processor drivers -+# -+ -+# -+# Reset Controller Support -+# -+# CONFIG_DM_RESET is not set -+# CONFIG_RESET_SCMI is not set -+CONFIG_DM_RNG=y -+# CONFIG_RNG_MSM is not set -+# CONFIG_RNG_IPROC200 is not set -+ -+# -+# Real Time Clock -+# -+# CONFIG_DM_RTC is not set -+# CONFIG_RTC_ENABLE_32KHZ_OUTPUT is not set -+# CONFIG_RTC_PCF8563 is not set -+# CONFIG_RTC_PL031 is not set -+# CONFIG_RTC_S35392A is not set -+# CONFIG_RTC_MC146818 is not set -+# CONFIG_RTC_M41T62 is not set -+CONFIG_SCSI=y -+CONFIG_DM_SCSI=y -+CONFIG_SERIAL=y -+CONFIG_BAUDRATE=115200 -+CONFIG_REQUIRE_SERIAL_CONSOLE=y -+# CONFIG_SPECIFY_CONSOLE_INDEX is not set -+CONFIG_SERIAL_PRESENT=y -+CONFIG_DM_SERIAL=y -+# CONFIG_SERIAL_RX_BUFFER is not set -+# CONFIG_SERIAL_SEARCH_ALL is not set -+# CONFIG_SERIAL_PROBE_ALL is not set -+# CONFIG_ALTERA_JTAG_UART is not set -+# CONFIG_ALTERA_UART is not set -+# CONFIG_ARC_SERIAL is not set -+# CONFIG_ARM_DCC is not set -+# CONFIG_ATMEL_USART is not set -+# CONFIG_BCM6345_SERIAL is not set -+# CONFIG_COREBOOT_SERIAL is not set -+# CONFIG_CORTINA_UART is not set -+# CONFIG_FSL_LINFLEXUART is not set -+# CONFIG_FSL_LPUART is not set -+# CONFIG_MVEBU_A3700_UART is not set -+# CONFIG_MCFUART is not set -+# CONFIG_NULLDEV_SERIAL is not set -+# CONFIG_SYS_NS16550 is not set -+# CONFIG_NS16550_DYNAMIC is not set -+CONFIG_PL01X_SERIAL=y -+# CONFIG_XILINX_UARTLITE is not set -+# CONFIG_MSM_SERIAL is not set -+# CONFIG_MSM_GENI_SERIAL is not set -+# CONFIG_OMAP_SERIAL is not set -+# CONFIG_PXA_SERIAL is not set -+# CONFIG_SIFIVE_SERIAL is not set -+# CONFIG_ZYNQ_SERIAL is not set -+# CONFIG_MTK_SERIAL is not set -+# CONFIG_MT7620_SERIAL is not set -+# CONFIG_SMEM is not set -+ -+# -+# Sound support -+# -+# CONFIG_SOUND is not set -+# CONFIG_SOUND_MAX98357A is not set -+ -+# -+# SOC (System On Chip) specific Drivers -+# -+# CONFIG_SOC_DEVICE is not set -+# CONFIG_SOC_TI is not set -+# CONFIG_SPI is not set -+ -+# -+# SPMI support -+# -+# CONFIG_SPMI is not set -+# CONFIG_SYSINFO is not set -+ -+# -+# System reset device drivers -+# -+CONFIG_SYSRESET=y -+CONFIG_SYSRESET_CMD_RESET=y -+# CONFIG_POWEROFF_GPIO is not set -+# CONFIG_SYSRESET_GPIO is not set -+CONFIG_SYSRESET_PSCI=y -+# CONFIG_SYSRESET_SYSCON is not set -+# CONFIG_SYSRESET_WATCHDOG is not set -+# CONFIG_SYSRESET_RESETCTL is not set -+# CONFIG_SYSRESET_MPC83XX is not set -+# CONFIG_TEE is not set -+# CONFIG_DM_THERMAL is not set -+ -+# -+# Timer Support -+# -+# CONFIG_TIMER is not set -+ -+# -+# TPM support -+# -+# CONFIG_USB is not set -+ -+# -+# UFS Host Controller Support -+# -+# CONFIG_UFS is not set -+# CONFIG_TI_J721E_UFS is not set -+ -+# -+# Graphics support -+# -+# CONFIG_DM_VIDEO is not set -+# CONFIG_SYS_WHITE_ON_BLACK is not set -+# CONFIG_NO_FB_CLEAR is not set -+ -+# -+# TrueType Fonts -+# -+# CONFIG_VIDEO_VESA is not set -+# CONFIG_VIDEO_LCD_ANX9804 is not set -+# CONFIG_VIDEO_LCD_SSD2828 is not set -+# CONFIG_VIDEO_LCD_HITACHI_TX18D42VM is not set -+# CONFIG_VIDEO_MVEBU is not set -+# CONFIG_I2C_EDID is not set -+# CONFIG_DISPLAY is not set -+# CONFIG_ATMEL_HLCD is not set -+# CONFIG_AM335X_LCD is not set -+# CONFIG_VIDEO_TEGRA20 is not set -+# CONFIG_VIDEO_BRIDGE is not set -+# CONFIG_VIDEO is not set -+# CONFIG_LCD is not set -+# CONFIG_VIDEO_SIMPLE is not set -+# CONFIG_VIDEO_DT_SIMPLEFB is not set -+# CONFIG_OSD is not set -+# CONFIG_SPLASH_SCREEN is not set -+# CONFIG_VIDEO_VCXK is not set -+ -+# -+# VirtIO Drivers -+# -+CONFIG_VIRTIO=y -+CONFIG_VIRTIO_MMIO=y -+CONFIG_VIRTIO_PCI=y -+CONFIG_VIRTIO_NET=y -+CONFIG_VIRTIO_BLK=y -+CONFIG_VIRTIO_RNG=y -+ -+# -+# 1-Wire support -+# -+# CONFIG_W1 is not set -+ -+# -+# 1-wire EEPROM support -+# -+# CONFIG_W1_EEPROM is not set -+ -+# -+# Watchdog Timer Support -+# -+# CONFIG_WATCHDOG is not set -+CONFIG_WATCHDOG_TIMEOUT_MSECS=60000 -+# CONFIG_IMX_WATCHDOG is not set -+# CONFIG_ULP_WATCHDOG is not set -+# CONFIG_DESIGNWARE_WATCHDOG is not set -+# CONFIG_WDT is not set -+# CONFIG_PVBLOCK is not set -+# CONFIG_PHYS_TO_BUS is not set -+ -+# -+# File systems -+# -+# CONFIG_FS_BTRFS is not set -+# CONFIG_FS_CBFS is not set -+# CONFIG_SPL_FS_CBFS is not set -+CONFIG_FS_EXT4=y -+# CONFIG_EXT4_WRITE is not set -+CONFIG_FS_FAT=y -+CONFIG_FAT_WRITE=y -+CONFIG_FS_FAT_MAX_CLUSTSIZE=65536 -+# CONFIG_FS_JFFS2 is not set -+# CONFIG_UBIFS_SILENCE_MSG is not set -+# CONFIG_FS_CRAMFS is not set -+# CONFIG_YAFFS2 is not set -+# CONFIG_FS_SQUASHFS is not set -+ -+# -+# Library routines -+# -+# CONFIG_ADDR_MAP is not set -+# CONFIG_PHYSMEM is not set -+# CONFIG_BCH is not set -+# CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED is not set -+CONFIG_CHARSET=y -+# CONFIG_DYNAMIC_CRC_TABLE is not set -+CONFIG_LIB_UUID=y -+CONFIG_PRINTF=y -+CONFIG_SPRINTF=y -+CONFIG_STRTO=y -+CONFIG_SYS_HZ=1000 -+# CONFIG_PANIC_HANG is not set -+CONFIG_REGEX=y -+CONFIG_LIB_RAND=y -+# CONFIG_LIB_HW_RAND is not set -+CONFIG_SUPPORT_ACPI=y -+# CONFIG_GENERATE_ACPI_TABLE is not set -+# CONFIG_SPL_TINY_MEMSET is not set -+# CONFIG_TPL_TINY_MEMSET is not set -+# CONFIG_BITREVERSE is not set -+# CONFIG_TRACE is not set -+# CONFIG_CIRCBUF is not set -+# CONFIG_CMD_DHRYSTONE is not set -+ -+# -+# Security support -+# -+# CONFIG_AES is not set -+# CONFIG_ECDSA is not set -+# CONFIG_RSA is not set -+# CONFIG_ASYMMETRIC_KEY_TYPE is not set -+# CONFIG_TPM is not set -+ -+# -+# Android Verified Boot -+# -+ -+# -+# Hashing Support -+# -+# CONFIG_BLAKE2 is not set -+CONFIG_SHA1=y -+CONFIG_SHA256=y -+# CONFIG_SHA512 is not set -+# CONFIG_SHA384 is not set -+# CONFIG_SHA_HW_ACCEL is not set -+CONFIG_MD5=y -+CONFIG_CRC32=y -+ -+# -+# Compression Support -+# -+CONFIG_LZ4=y -+# CONFIG_LZMA is not set -+# CONFIG_LZO is not set -+# CONFIG_GZIP is not set -+# CONFIG_ZLIB_UNCOMPRESS is not set -+# CONFIG_BZIP2 is not set -+CONFIG_ZLIB=y -+# CONFIG_ZSTD is not set -+# CONFIG_SPL_LZ4 is not set -+# CONFIG_SPL_LZMA is not set -+# CONFIG_SPL_LZO is not set -+# CONFIG_SPL_GZIP is not set -+# CONFIG_SPL_ZSTD is not set -+# CONFIG_ERRNO_STR is not set -+# CONFIG_HEXDUMP is not set -+# CONFIG_GETOPT is not set -+CONFIG_OF_LIBFDT=y -+CONFIG_OF_LIBFDT_ASSUME_MASK=0 -+# CONFIG_OF_LIBFDT_OVERLAY is not set -+# CONFIG_SPL_OF_LIBFDT is not set -+CONFIG_SPL_OF_LIBFDT_ASSUME_MASK=0xff -+# CONFIG_TPL_OF_LIBFDT is not set -+CONFIG_TPL_OF_LIBFDT_ASSUME_MASK=0xff -+ -+# -+# System tables -+# -+CONFIG_GENERATE_SMBIOS_TABLE=y -+# CONFIG_LIB_RATIONAL is not set -+# CONFIG_SMBIOS_PARSER is not set -+CONFIG_EFI_LOADER=y -+CONFIG_CMD_BOOTEFI_BOOTMGR=y -+CONFIG_EFI_VARIABLE_FILE_STORE=y -+# CONFIG_EFI_VARIABLES_PRESEED is not set -+CONFIG_EFI_VAR_BUF_SIZE=16384 -+# CONFIG_EFI_RUNTIME_UPDATE_CAPSULE is not set -+# CONFIG_EFI_CAPSULE_ON_DISK is not set -+CONFIG_EFI_DEVICE_PATH_TO_TEXT=y -+CONFIG_EFI_DEVICE_PATH_UTIL=y -+CONFIG_EFI_DT_FIXUP=y -+CONFIG_EFI_LOADER_HII=y -+CONFIG_EFI_UNICODE_COLLATION_PROTOCOL2=y -+CONFIG_EFI_UNICODE_CAPITALIZATION=y -+# CONFIG_EFI_LOADER_BOUNCE_BUFFER is not set -+CONFIG_EFI_PLATFORM_LANG_CODES="en-US" -+CONFIG_EFI_HAVE_RUNTIME_RESET=y -+CONFIG_EFI_RNG_PROTOCOL=y -+CONFIG_EFI_LOAD_FILE2_INITRD=y -+# CONFIG_OPTEE_LIB is not set -+# CONFIG_OPTEE_IMAGE is not set -+# CONFIG_BOOTM_OPTEE is not set -+# CONFIG_TEST_FDTDEC is not set -+CONFIG_LIB_ELF=y -+CONFIG_LMB=y -+CONFIG_LMB_USE_MAX_REGIONS=y -+CONFIG_LMB_MAX_REGIONS=8 -+# CONFIG_PHANDLE_CHECK_SEQ is not set -+# CONFIG_UNIT_TEST is not set -+# CONFIG_SPL_UNIT_TEST is not set -+ -+# -+# Tools options -+# -+CONFIG_MKIMAGE_DTC_PATH="dtc" -+CONFIG_TOOLS_CRC32=y -+CONFIG_TOOLS_LIBCRYPTO=y -+CONFIG_TOOLS_FIT=y -+CONFIG_TOOLS_FIT_FULL_CHECK=y -+CONFIG_TOOLS_FIT_PRINT=y -+CONFIG_TOOLS_FIT_RSASSA_PSS=y -+CONFIG_TOOLS_FIT_SIGNATURE=y -+CONFIG_TOOLS_FIT_SIGNATURE_MAX_SIZE=0x10000000 -+CONFIG_TOOLS_FIT_VERBOSE=y -+CONFIG_TOOLS_MD5=y -+CONFIG_TOOLS_OF_LIBFDT=y -+CONFIG_TOOLS_SHA1=y -+CONFIG_TOOLS_SHA256=y -+CONFIG_TOOLS_SHA384=y -+CONFIG_TOOLS_SHA512=y -+# CONFIG_TOOLS_MKEFICAPSULE is not set diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0014-rpi4_64_rpi_dtb_defconfig.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0017-rpi4_64_rpi_dtb_defconfig.patch similarity index 99% rename from build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0014-rpi4_64_rpi_dtb_defconfig.patch rename to build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0017-rpi4_64_rpi_dtb_defconfig.patch index 151488c..0326526 100644 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0014-rpi4_64_rpi_dtb_defconfig.patch +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0017-rpi4_64_rpi_dtb_defconfig.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/configs/rpi4_64_rpi_dtb_defconfig 1970-01-01 01:00:00.000000000 +0100 -+++ ./configs/rpi4_64_rpi_dtb_defconfig 2025-09-11 16:34:39.224804260 +0200 +--- a/configs/rpi4_64_rpi_dtb_defconfig ++++ b/configs/rpi4_64_rpi_dtb_defconfig @@ -0,0 +1,1382 @@ +# +# Automatically generated file; DO NOT EDIT. diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0015-virt32_defconfig.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0018-virt32_defconfig.patch similarity index 99% rename from build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0015-virt32_defconfig.patch rename to build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0018-virt32_defconfig.patch index 3add16a..9937973 100644 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0015-virt32_defconfig.patch +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0018-virt32_defconfig.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/configs/virt32_defconfig 1970-01-01 01:00:00.000000000 +0100 -+++ ./configs/virt32_defconfig 2025-09-11 16:34:39.224728887 +0200 +--- a/configs/virt32_defconfig ++++ b/configs/virt32_defconfig @@ -0,0 +1,1495 @@ +# +# Automatically generated file; DO NOT EDIT. diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0019-virt64_defconfig.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0019-virt64_defconfig.patch new file mode 100644 index 0000000..8f5c87a --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0019-virt64_defconfig.patch @@ -0,0 +1,2750 @@ +--- a/configs/virt64_defconfig ++++ b/configs/virt64_defconfig +@@ -0,0 +1,2747 @@ ++# ++# Automatically generated file; DO NOT EDIT. ++# U-Boot 2022.04 Configuration ++# ++ ++# ++# Compiler: aarch64-linux-gnu-gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 ++# ++CONFIG_CREATE_ARCH_SYMLINK=y ++CONFIG_SYS_CACHE_SHIFT_6=y ++CONFIG_SYS_CACHELINE_SIZE=64 ++CONFIG_LINKER_LIST_ALIGN=8 ++# CONFIG_ARC is not set ++CONFIG_ARM=y ++# CONFIG_M68K is not set ++# CONFIG_MICROBLAZE is not set ++# CONFIG_MIPS is not set ++# CONFIG_NDS32 is not set ++# CONFIG_NIOS2 is not set ++# CONFIG_PPC is not set ++# CONFIG_RISCV is not set ++# CONFIG_SANDBOX is not set ++# CONFIG_SH is not set ++# CONFIG_X86 is not set ++# CONFIG_XTENSA is not set ++CONFIG_SYS_ARCH="arm" ++CONFIG_SYS_CPU="armv8" ++CONFIG_SYS_VENDOR="emulation" ++CONFIG_SYS_BOARD="qemu-arm" ++CONFIG_SYS_CONFIG_NAME="qemu-arm" ++CONFIG_SKIP_LOWLEVEL_INIT=y ++# CONFIG_SKIP_LOWLEVEL_INIT_ONLY is not set ++# CONFIG_SYS_ICACHE_OFF is not set ++# CONFIG_SYS_DCACHE_OFF is not set ++ ++# ++# ARM architecture ++# ++CONFIG_ARM64=y ++CONFIG_ARM64_CRC32=y ++# CONFIG_POSITION_INDEPENDENT is not set ++# CONFIG_INIT_SP_RELATIVE is not set ++# CONFIG_GIC_V3_ITS is not set ++CONFIG_STATIC_RELA=y ++CONFIG_DMA_ADDR_T_64BIT=y ++CONFIG_ARM_ASM_UNIFIED=y ++# CONFIG_SYS_ARM_CACHE_CP15 is not set ++# CONFIG_SYS_ARM_MMU is not set ++# CONFIG_SYS_ARM_MPU is not set ++CONFIG_SYS_ARM_ARCH=8 ++CONFIG_SYS_ARM_CACHE_WRITEBACK=y ++# CONFIG_SYS_ARM_CACHE_WRITETHROUGH is not set ++# CONFIG_SYS_ARM_CACHE_WRITEALLOC is not set ++# CONFIG_ARCH_CPU_INIT is not set ++CONFIG_SYS_ARCH_TIMER=y ++CONFIG_ARM_SMCCC=y ++# CONFIG_SEMIHOSTING is not set ++# CONFIG_SYS_L2CACHE_OFF is not set ++# CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK is not set ++# CONFIG_USE_ARCH_MEMCPY is not set ++# CONFIG_USE_ARCH_MEMSET is not set ++CONFIG_ARM64_SUPPORT_AARCH32=y ++# CONFIG_ARCH_AT91 is not set ++# CONFIG_ARCH_DAVINCI is not set ++# CONFIG_ARCH_KIRKWOOD is not set ++# CONFIG_ARCH_MVEBU is not set ++# CONFIG_ARCH_ORION5X is not set ++# CONFIG_TARGET_STV0991 is not set ++# CONFIG_ARCH_BCM283X is not set ++# CONFIG_ARCH_BCM63158 is not set ++# CONFIG_ARCH_BCM68360 is not set ++# CONFIG_ARCH_BCM6858 is not set ++# CONFIG_ARCH_BCMSTB is not set ++# CONFIG_TARGET_VEXPRESS_CA9X4 is not set ++# CONFIG_TARGET_BCMCYGNUS is not set ++# CONFIG_TARGET_BCMNS2 is not set ++# CONFIG_TARGET_BCMNS3 is not set ++# CONFIG_ARCH_EXYNOS is not set ++# CONFIG_ARCH_S5PC1XX is not set ++# CONFIG_ARCH_HIGHBANK is not set ++# CONFIG_ARCH_INTEGRATOR is not set ++# CONFIG_ARCH_IPQ40XX is not set ++# CONFIG_ARCH_KEYSTONE is not set ++# CONFIG_ARCH_K3 is not set ++# CONFIG_ARCH_OMAP2PLUS is not set ++# CONFIG_ARCH_MESON is not set ++# CONFIG_ARCH_MEDIATEK is not set ++# CONFIG_ARCH_LPC32XX is not set ++# CONFIG_ARCH_IMX8 is not set ++# CONFIG_ARCH_IMX8M is not set ++# CONFIG_ARCH_IMX8ULP is not set ++# CONFIG_ARCH_IMXRT is not set ++# CONFIG_ARCH_MX23 is not set ++# CONFIG_ARCH_MX28 is not set ++# CONFIG_ARCH_MX31 is not set ++# CONFIG_ARCH_MX7ULP is not set ++# CONFIG_ARCH_MX7 is not set ++# CONFIG_ARCH_MX6 is not set ++CONFIG_SPL_LDSCRIPT="arch/arm/cpu/armv8/u-boot-spl.lds" ++# CONFIG_ARCH_MX5 is not set ++# CONFIG_ARCH_NEXELL is not set ++# CONFIG_ARCH_APPLE is not set ++# CONFIG_ARCH_OWL is not set ++CONFIG_ARCH_QEMU=y ++# CONFIG_ARCH_RMOBILE is not set ++# CONFIG_ARCH_SNAPDRAGON is not set ++# CONFIG_ARCH_SOCFPGA is not set ++# CONFIG_ARCH_SUNXI is not set ++# CONFIG_ARCH_U8500 is not set ++# CONFIG_ARCH_VERSAL is not set ++# CONFIG_ARCH_VF610 is not set ++# CONFIG_ARCH_ZYNQ is not set ++# CONFIG_ARCH_ZYNQMP_R5 is not set ++# CONFIG_ARCH_ZYNQMP is not set ++# CONFIG_ARCH_TEGRA is not set ++# CONFIG_TARGET_VEXPRESS64_AEMV8A is not set ++# CONFIG_TARGET_VEXPRESS64_BASE_FVP is not set ++# CONFIG_TARGET_VEXPRESS64_JUNO is not set ++# CONFIG_TARGET_TOTAL_COMPUTE is not set ++# CONFIG_TARGET_LS2080A_EMU is not set ++# CONFIG_TARGET_LS1088AQDS is not set ++# CONFIG_TARGET_LS2080AQDS is not set ++# CONFIG_TARGET_LS2080ARDB is not set ++# CONFIG_TARGET_LS2081ARDB is not set ++# CONFIG_TARGET_LX2160ARDB is not set ++# CONFIG_TARGET_LX2160AQDS is not set ++# CONFIG_TARGET_LX2162AQDS is not set ++# CONFIG_TARGET_HIKEY is not set ++# CONFIG_TARGET_HIKEY960 is not set ++# CONFIG_TARGET_POPLAR is not set ++# CONFIG_TARGET_LS1012AQDS is not set ++# CONFIG_TARGET_LS1012ARDB is not set ++# CONFIG_TARGET_LS1012A2G5RDB is not set ++# CONFIG_TARGET_LS1012AFRWY is not set ++# CONFIG_TARGET_LS1012AFRDM is not set ++# CONFIG_TARGET_LS1028AQDS is not set ++# CONFIG_TARGET_LS1028ARDB is not set ++# CONFIG_TARGET_LS1088ARDB is not set ++# CONFIG_TARGET_LS1021AQDS is not set ++# CONFIG_TARGET_LS1021ATWR is not set ++# CONFIG_TARGET_PG_WCOM_SELI8 is not set ++# CONFIG_TARGET_PG_WCOM_EXPU1 is not set ++# CONFIG_TARGET_LS1021ATSN is not set ++# CONFIG_TARGET_LS1021AIOT is not set ++# CONFIG_TARGET_LS1043AQDS is not set ++# CONFIG_TARGET_LS1043ARDB is not set ++# CONFIG_TARGET_LS1046AQDS is not set ++# CONFIG_TARGET_LS1046ARDB is not set ++# CONFIG_TARGET_LS1046AFRWY is not set ++# CONFIG_TARGET_SL28 is not set ++# CONFIG_TARGET_TEN64 is not set ++# CONFIG_TARGET_COLIBRI_PXA270 is not set ++# CONFIG_ARCH_UNIPHIER is not set ++# CONFIG_ARCH_SYNQUACER is not set ++# CONFIG_ARCH_STM32 is not set ++# CONFIG_ARCH_STI is not set ++# CONFIG_ARCH_STM32MP is not set ++# CONFIG_ARCH_ROCKCHIP is not set ++# CONFIG_ARCH_OCTEONTX is not set ++# CONFIG_ARCH_OCTEONTX2 is not set ++# CONFIG_TARGET_THUNDERX_88XX is not set ++# CONFIG_ARCH_ASPEED is not set ++# CONFIG_TARGET_DURIAN is not set ++# CONFIG_TARGET_PRESIDIO_ASIC is not set ++# CONFIG_TARGET_XENGUEST_ARM64 is not set ++# CONFIG_STATIC_MACH_TYPE is not set ++CONFIG_SYS_TEXT_BASE=0x60000000 ++CONFIG_SYS_MALLOC_LEN=0x400000 ++CONFIG_SYS_MALLOC_F_LEN=0x400 ++CONFIG_NR_DRAM_BANKS=1 ++CONFIG_BOARD_SPECIFIC_OPTIONS=y ++CONFIG_ENV_SIZE=0x1f000 ++# CONFIG_DM_GPIO is not set ++CONFIG_DEFAULT_DEVICE_TREE="qemu-arm64" ++CONFIG_MULTI_DTB_FIT_UNCOMPRESS_SZ=0x8000 ++# CONFIG_TARGET_QEMU_ARM_32BIT is not set ++CONFIG_TARGET_QEMU_ARM_64BIT=y ++CONFIG_ERR_PTR_OFFSET=0x0 ++CONFIG_BOOTSTAGE_STASH_ADDR=0 ++CONFIG_IDENT_STRING="" ++CONFIG_SYS_CLK_FREQ=0 ++# CONFIG_CHIP_DIP_SCAN is not set ++# CONFIG_ARMV8_MULTIENTRY is not set ++# CONFIG_ARMV8_SET_SMPEN is not set ++ ++# ++# ARMv8 secure monitor firmware ++# ++# CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT is not set ++# CONFIG_SPL_ARMV8_SEC_FIRMWARE_SUPPORT is not set ++# CONFIG_SPL_RECOVER_DATA_SECTION is not set ++CONFIG_PSCI_RESET=y ++# CONFIG_ARMV8_PSCI is not set ++# CONFIG_ARMV8_EA_EL3_FIRST is not set ++# CONFIG_CMD_DEKBLOB is not set ++# CONFIG_IMX_CAAM_DEK_ENCAP is not set ++# CONFIG_IMX_OPTEE_DEK_ENCAP is not set ++# CONFIG_IMX_SECO_DEK_ENCAP is not set ++# CONFIG_CMD_HDMIDETECT is not set ++CONFIG_IMX_DCD_ADDR=0x00910000 ++ ++# ++# ARM debug ++# ++CONFIG_BUILD_TARGET="" ++# CONFIG_SYS_PCI_64BIT is not set ++# CONFIG_DEBUG_UART is not set ++CONFIG_AHCI=y ++# CONFIG_OF_BOARD_FIXUP is not set ++ ++# ++# General setup ++# ++CONFIG_LOCALVERSION="" ++CONFIG_LOCALVERSION_AUTO=y ++CONFIG_CC_IS_GCC=y ++CONFIG_GCC_VERSION=110400 ++CONFIG_CLANG_VERSION=0 ++CONFIG_CC_OPTIMIZE_FOR_SIZE=y ++# CONFIG_OPTIMIZE_INLINING is not set ++CONFIG_ARCH_SUPPORTS_LTO=y ++# CONFIG_LTO is not set ++CONFIG_CC_HAS_ASM_INLINE=y ++# CONFIG_XEN is not set ++CONFIG_DISTRO_DEFAULTS=y ++CONFIG_ENV_VARS_UBOOT_CONFIG=y ++# CONFIG_SYS_BOOT_GET_CMDLINE is not set ++# CONFIG_SYS_BOOT_GET_KBD is not set ++CONFIG_SYS_MALLOC_F=y ++CONFIG_EXPERT=y ++CONFIG_SYS_MALLOC_CLEAR_ON_INIT=y ++# CONFIG_SYS_MALLOC_DEFAULT_TO_INIT is not set ++# CONFIG_TOOLS_DEBUG is not set ++CONFIG_PHYS_64BIT=y ++# CONFIG_REMAKE_ELF is not set ++# CONFIG_SYS_CUSTOM_LDSCRIPT is not set ++CONFIG_SYS_LOAD_ADDR=0x1000000 ++CONFIG_PLATFORM_ELFENTRY="_start" ++CONFIG_STACK_SIZE=0x1000000 ++CONFIG_SYS_SRAM_BASE=0x0 ++CONFIG_SYS_SRAM_SIZE=0x0 ++# CONFIG_MP is not set ++CONFIG_EXAMPLES=y ++ ++# ++# API ++# ++# CONFIG_API is not set ++ ++# ++# Boot options ++# ++ ++# ++# Boot images ++# ++# CONFIG_ANDROID_BOOT_IMAGE is not set ++CONFIG_FIT=y ++# CONFIG_TIMESTAMP is not set ++CONFIG_FIT_EXTERNAL_OFFSET=0x0 ++CONFIG_FIT_FULL_CHECK=y ++# CONFIG_FIT_SIGNATURE is not set ++# CONFIG_FIT_CIPHER is not set ++CONFIG_FIT_VERBOSE=y ++# CONFIG_FIT_BEST_MATCH is not set ++CONFIG_FIT_PRINT=y ++CONFIG_LEGACY_IMAGE_FORMAT=y ++CONFIG_SUPPORT_RAW_INITRD=y ++# CONFIG_OF_BOARD_SETUP is not set ++# CONFIG_OF_SYSTEM_SETUP is not set ++# CONFIG_OF_STDOUT_VIA_ALIAS is not set ++CONFIG_SYS_EXTRA_OPTIONS="" ++CONFIG_HAVE_SYS_TEXT_BASE=y ++# CONFIG_DYNAMIC_SYS_CLK_FREQ is not set ++# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set ++# CONFIG_CHROMEOS is not set ++# CONFIG_CHROMEOS_VBOOT is not set ++# CONFIG_RAMBOOT_PBL is not set ++ ++# ++# Boot timing ++# ++# CONFIG_BOOTSTAGE is not set ++CONFIG_BOOTSTAGE_STASH_SIZE=0x1000 ++# CONFIG_SHOW_BOOT_PROGRESS is not set ++ ++# ++# Boot media ++# ++# CONFIG_NAND_BOOT is not set ++# CONFIG_ONENAND_BOOT is not set ++# CONFIG_QSPI_BOOT is not set ++# CONFIG_SATA_BOOT is not set ++# CONFIG_SD_BOOT is not set ++# CONFIG_SD_BOOT_QSPI is not set ++# CONFIG_SPI_BOOT is not set ++ ++# ++# Autoboot options ++# ++CONFIG_AUTOBOOT=y ++CONFIG_BOOTDELAY=2 ++# CONFIG_AUTOBOOT_KEYED is not set ++# CONFIG_AUTOBOOT_USE_MENUKEY is not set ++# CONFIG_USE_BOOTARGS is not set ++# CONFIG_BOOTARGS_SUBST is not set ++# CONFIG_USE_BOOTCOMMAND is not set ++# CONFIG_USE_PREBOOT is not set ++CONFIG_DEFAULT_FDT_FILE="" ++ ++# ++# Console ++# ++CONFIG_MENU=y ++# CONFIG_CONSOLE_RECORD is not set ++# CONFIG_DISABLE_CONSOLE is not set ++CONFIG_LOGLEVEL=4 ++CONFIG_SPL_LOGLEVEL=4 ++CONFIG_TPL_LOGLEVEL=4 ++# CONFIG_SILENT_CONSOLE is not set ++# CONFIG_PRE_CONSOLE_BUFFER is not set ++# CONFIG_CONSOLE_MUX is not set ++# CONFIG_SYS_CONSOLE_IS_IN_ENV is not set ++# CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE is not set ++# CONFIG_SYS_CONSOLE_ENV_OVERWRITE is not set ++# CONFIG_SYS_CONSOLE_INFO_QUIET is not set ++# CONFIG_SYS_STDIO_DEREGISTER is not set ++# CONFIG_SPL_SYS_STDIO_DEREGISTER is not set ++# CONFIG_SYS_DEVICE_NULLDEV is not set ++ ++# ++# Logging ++# ++# CONFIG_LOG is not set ++ ++# ++# Init options ++# ++# CONFIG_BOARD_TYPES is not set ++# CONFIG_DISPLAY_CPUINFO is not set ++# CONFIG_DISPLAY_BOARDINFO is not set ++# CONFIG_DISPLAY_BOARDINFO_LATE is not set ++ ++# ++# Start-up hooks ++# ++# CONFIG_ARCH_EARLY_INIT_R is not set ++# CONFIG_ARCH_MISC_INIT is not set ++# CONFIG_BOARD_EARLY_INIT_F is not set ++# CONFIG_BOARD_EARLY_INIT_R is not set ++CONFIG_BOARD_LATE_INIT=y ++# CONFIG_LAST_STAGE_INIT is not set ++# CONFIG_MISC_INIT_F is not set ++# CONFIG_MISC_INIT_R is not set ++# CONFIG_ID_EEPROM is not set ++# CONFIG_PCI_INIT_R is not set ++ ++# ++# Security support ++# ++CONFIG_HASH=y ++# CONFIG_STACKPROTECTOR is not set ++ ++# ++# Update support ++# ++# CONFIG_UPDATE_TFTP is not set ++# CONFIG_ANDROID_AB is not set ++ ++# ++# Blob list ++# ++# CONFIG_BLOBLIST is not set ++ ++# ++# SPL / TPL ++# ++CONFIG_SPL_SYS_STACK_F_CHECK_BYTE=0xaa ++# CONFIG_SPL_SYS_REPORT_STACK_F_USAGE is not set ++# CONFIG_SPL_SHOW_ERRORS is not set ++ ++# ++# PowerPC and LayerScape SPL Boot options ++# ++# CONFIG_SPL_MD5 is not set ++# CONFIG_FDT_SIMPLEFB is not set ++ ++# ++# Command line interface ++# ++CONFIG_CMDLINE=y ++CONFIG_HUSH_PARSER=y ++CONFIG_CMDLINE_EDITING=y ++CONFIG_AUTO_COMPLETE=y ++CONFIG_SYS_LONGHELP=y ++CONFIG_SYS_PROMPT="=> " ++CONFIG_SYS_PROMPT_HUSH_PS2="> " ++CONFIG_SYS_XTRACE=y ++ ++# ++# Commands ++# ++ ++# ++# Info commands ++# ++CONFIG_CMD_BDI=y ++# CONFIG_CMD_CONFIG is not set ++# CONFIG_CMD_CONSOLE is not set ++# CONFIG_CMD_LICENSE is not set ++# CONFIG_CMD_PMC is not set ++ ++# ++# Boot commands ++# ++# CONFIG_CMD_BOOTD is not set ++CONFIG_CMD_BOOTM=y ++CONFIG_BOOTM_EFI=y ++# CONFIG_CMD_BOOTZ is not set ++CONFIG_CMD_BOOTI=y ++CONFIG_CMD_GUEST_BOOT=y ++CONFIG_BOOTM_LINUX=y ++CONFIG_BOOTM_NETBSD=y ++# CONFIG_BOOTM_OPENRTOS is not set ++# CONFIG_BOOTM_OSE is not set ++CONFIG_BOOTM_PLAN9=y ++CONFIG_BOOTM_RTEMS=y ++CONFIG_BOOTM_VXWORKS=y ++CONFIG_CMD_BOOTEFI=y ++CONFIG_CMD_BOOTEFI_HELLO_COMPILE=y ++# CONFIG_CMD_BOOTEFI_HELLO is not set ++CONFIG_CMD_BOOTEFI_SELFTEST=y ++# CONFIG_CMD_BOOTMENU is not set ++# CONFIG_CMD_ADTIMG is not set ++CONFIG_CMD_ELF=y ++CONFIG_CMD_FDT=y ++CONFIG_CMD_GO=y ++CONFIG_CMD_RUN=y ++CONFIG_CMD_IMI=y ++# CONFIG_CMD_IMLS is not set ++# CONFIG_CMD_XIMG is not set ++# CONFIG_CMD_THOR_DOWNLOAD is not set ++# CONFIG_CMD_ZBOOT is not set ++ ++# ++# Environment commands ++# ++# CONFIG_CMD_ASKENV is not set ++CONFIG_CMD_EXPORTENV=y ++CONFIG_CMD_IMPORTENV=y ++# CONFIG_CMD_EDITENV is not set ++# CONFIG_CMD_GREPENV is not set ++CONFIG_CMD_SAVEENV=y ++# CONFIG_CMD_ERASEENV is not set ++CONFIG_CMD_ENV_EXISTS=y ++# CONFIG_CMD_ENV_CALLBACK is not set ++# CONFIG_CMD_ENV_FLAGS is not set ++# CONFIG_CMD_NVEDIT_EFI is not set ++# CONFIG_CMD_NVEDIT_INFO is not set ++# CONFIG_CMD_NVEDIT_LOAD is not set ++# CONFIG_CMD_NVEDIT_SELECT is not set ++ ++# ++# Memory commands ++# ++# CONFIG_CMD_BINOP is not set ++# CONFIG_CMD_BLOBLIST is not set ++CONFIG_CMD_CRC32=y ++# CONFIG_CRC32_VERIFY is not set ++# CONFIG_CMD_EEPROM is not set ++# CONFIG_LOOPW is not set ++# CONFIG_CMD_MD5SUM is not set ++# CONFIG_CMD_MEMINFO is not set ++CONFIG_CMD_MEMORY=y ++# CONFIG_CMD_MEM_SEARCH is not set ++# CONFIG_CMD_MX_CYCLIC is not set ++CONFIG_CMD_RANDOM=y ++# CONFIG_CMD_MEMTEST is not set ++# CONFIG_CMD_SHA1SUM is not set ++# CONFIG_CMD_STRINGS is not set ++ ++# ++# Compression commands ++# ++# CONFIG_CMD_LZMADEC is not set ++CONFIG_CMD_UNLZ4=y ++# CONFIG_CMD_UNZIP is not set ++# CONFIG_CMD_ZIP is not set ++ ++# ++# Device access commands ++# ++# CONFIG_CMD_ARMFLASH is not set ++# CONFIG_CMD_BIND is not set ++# CONFIG_CMD_CLK is not set ++# CONFIG_CMD_DEMO is not set ++# CONFIG_CMD_DFU is not set ++# CONFIG_CMD_DM is not set ++# CONFIG_CMD_FPGAD is not set ++# CONFIG_CMD_FUSE is not set ++# CONFIG_CMD_GPIO is not set ++# CONFIG_CMD_GPT is not set ++# CONFIG_RANDOM_UUID is not set ++# CONFIG_CMD_IDE is not set ++# CONFIG_CMD_IO is not set ++# CONFIG_CMD_IOTRACE is not set ++# CONFIG_CMD_I2C is not set ++# CONFIG_CMD_LOADB is not set ++# CONFIG_CMD_LOADS is not set ++# CONFIG_CMD_LSBLK is not set ++# CONFIG_CMD_MBR is not set ++# CONFIG_CMD_CLONE is not set ++# CONFIG_CMD_OSD is not set ++CONFIG_CMD_PART=y ++# CONFIG_CMD_PCI is not set ++# CONFIG_CMD_POWEROFF is not set ++# CONFIG_CMD_READ is not set ++# CONFIG_CMD_SATA is not set ++# CONFIG_CMD_SAVES is not set ++CONFIG_CMD_SCSI=y ++# CONFIG_CMD_SDRAM is not set ++# CONFIG_CMD_TSI148 is not set ++# CONFIG_CMD_UNIVERSE is not set ++# CONFIG_CMD_USB_SDP is not set ++CONFIG_CMD_VIRTIO=y ++ ++# ++# Shell scripting commands ++# ++CONFIG_CMD_ECHO=y ++# CONFIG_CMD_ITEST is not set ++CONFIG_CMD_SOURCE=y ++# CONFIG_CMD_SETEXPR is not set ++ ++# ++# Android support commands ++# ++CONFIG_CMD_NET=y ++CONFIG_CMD_BOOTP=y ++CONFIG_CMD_DHCP=y ++CONFIG_BOOTP_BOOTPATH=y ++CONFIG_BOOTP_DNS=y ++# CONFIG_BOOTP_DNS2 is not set ++CONFIG_BOOTP_GATEWAY=y ++CONFIG_BOOTP_HOSTNAME=y ++# CONFIG_BOOTP_PREFER_SERVERIP is not set ++CONFIG_BOOTP_SUBNETMASK=y ++# CONFIG_BOOTP_NTPSERVER is not set ++# CONFIG_CMD_PCAP is not set ++CONFIG_BOOTP_PXE=y ++CONFIG_BOOTP_PXE_CLIENTARCH=0x16 ++CONFIG_BOOTP_VCI_STRING="U-Boot.armv8" ++CONFIG_CMD_TFTPBOOT=y ++# CONFIG_CMD_TFTPPUT is not set ++# CONFIG_CMD_TFTPSRV is not set ++CONFIG_NET_TFTP_VARS=y ++# CONFIG_CMD_RARP is not set ++# CONFIG_CMD_NFS is not set ++CONFIG_CMD_MII=y ++CONFIG_CMD_PING=y ++# CONFIG_CMD_CDP is not set ++# CONFIG_CMD_SNTP is not set ++# CONFIG_CMD_DNS is not set ++# CONFIG_CMD_LINK_LOCAL is not set ++# CONFIG_CMD_ETHSW is not set ++CONFIG_CMD_PXE=y ++# CONFIG_CMD_WOL is not set ++ ++# ++# Misc commands ++# ++# CONFIG_CMD_BSP is not set ++# CONFIG_CMD_BLOCK_CACHE is not set ++# CONFIG_CMD_CACHE is not set ++# CONFIG_CMD_CONITRACE is not set ++# CONFIG_CMD_EFIDEBUG is not set ++# CONFIG_CMD_EXCEPTION is not set ++# CONFIG_CMD_DATE is not set ++# CONFIG_CMD_TIME is not set ++# CONFIG_CMD_GETTIME is not set ++# CONFIG_CMD_RNG is not set ++# CONFIG_CMD_KASLRSEED is not set ++CONFIG_CMD_SLEEP=y ++# CONFIG_CMD_TIMER is not set ++CONFIG_CMD_SYSBOOT=y ++CONFIG_CMD_QFW=y ++# CONFIG_CMD_PSTORE is not set ++# CONFIG_CMD_TERMINAL is not set ++# CONFIG_CMD_UUID is not set ++ ++# ++# TI specific command line interface ++# ++# CONFIG_CMD_DDR3 is not set ++ ++# ++# Power commands ++# ++ ++# ++# Security commands ++# ++# CONFIG_CMD_AES is not set ++# CONFIG_CMD_BLOB is not set ++# CONFIG_CMD_HASH is not set ++# CONFIG_CMD_HVC is not set ++# CONFIG_CMD_SMC is not set ++ ++# ++# Firmware commands ++# ++ ++# ++# Filesystem commands ++# ++# CONFIG_CMD_BTRFS is not set ++CONFIG_CMD_EXT2=y ++CONFIG_CMD_EXT4=y ++# CONFIG_CMD_EXT4_WRITE is not set ++CONFIG_CMD_FAT=y ++# CONFIG_CMD_SQUASHFS is not set ++CONFIG_CMD_FS_GENERIC=y ++# CONFIG_CMD_FS_UUID is not set ++# CONFIG_CMD_JFFS2 is not set ++# CONFIG_CMD_REISER is not set ++# CONFIG_CMD_ZFS is not set ++ ++# ++# Debug commands ++# ++# CONFIG_CMD_DIAG is not set ++# CONFIG_CMD_LOG is not set ++# CONFIG_CMD_UBI is not set ++ ++# ++# Partition Types ++# ++CONFIG_PARTITIONS=y ++# CONFIG_MAC_PARTITION is not set ++CONFIG_DOS_PARTITION=y ++CONFIG_ISO_PARTITION=y ++# CONFIG_AMIGA_PARTITION is not set ++CONFIG_EFI_PARTITION=y ++CONFIG_EFI_PARTITION_ENTRIES_NUMBERS=128 ++CONFIG_EFI_PARTITION_ENTRIES_OFF=0 ++CONFIG_PARTITION_UUIDS=y ++# CONFIG_PARTITION_TYPE_GUID is not set ++CONFIG_SUPPORT_OF_CONTROL=y ++ ++# ++# Device Tree Control ++# ++CONFIG_OF_CONTROL=y ++CONFIG_OF_REAL=y ++# CONFIG_OF_LIVE is not set ++CONFIG_OF_SEPARATE=y ++# CONFIG_OF_EMBED is not set ++CONFIG_OF_BOARD=y ++CONFIG_OF_HAS_PRIOR_STAGE=y ++CONFIG_OF_OMIT_DTB=y ++CONFIG_DEVICE_TREE_INCLUDES="" ++CONFIG_OF_LIST="qemu-arm64" ++# CONFIG_MULTI_DTB_FIT is not set ++# CONFIG_OF_DTB_PROPS_REMOVE is not set ++ ++# ++# Environment ++# ++CONFIG_ENV_SUPPORT=y ++CONFIG_ENV_SOURCE_FILE="" ++CONFIG_SAVEENV=y ++# CONFIG_ENV_OVERWRITE is not set ++CONFIG_ENV_IS_NOWHERE=y ++# CONFIG_ENV_IS_IN_EEPROM is not set ++# CONFIG_ENV_IS_IN_FAT is not set ++# CONFIG_ENV_IS_IN_EXT4 is not set ++# CONFIG_ENV_IS_IN_FLASH is not set ++# CONFIG_ENV_IS_IN_NAND is not set ++# CONFIG_ENV_IS_IN_NVRAM is not set ++# CONFIG_ENV_IS_IN_ONENAND is not set ++# CONFIG_ENV_IS_IN_REMOTE is not set ++# CONFIG_SYS_REDUNDAND_ENVIRONMENT is not set ++# CONFIG_SYS_RELOC_GD_ENV_ADDR is not set ++# CONFIG_USE_DEFAULT_ENV_FILE is not set ++# CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG is not set ++# CONFIG_ENV_IMPORT_FDT is not set ++# CONFIG_ENV_APPEND is not set ++# CONFIG_ENV_WRITEABLE_LIST is not set ++# CONFIG_ENV_ACCESS_IGNORE_FORCE is not set ++# CONFIG_VERSION_VARIABLE is not set ++CONFIG_NET=y ++# CONFIG_PROT_UDP is not set ++# CONFIG_BOOTP_SEND_HOSTNAME is not set ++# CONFIG_NET_RANDOM_ETHADDR is not set ++# CONFIG_NETCONSOLE is not set ++# CONFIG_IP_DEFRAG is not set ++CONFIG_TFTP_BLOCKSIZE=512 ++CONFIG_TFTP_WINDOWSIZE=1 ++# CONFIG_TFTP_TSIZE is not set ++# CONFIG_SERVERIP_FROM_PROXYDHCP is not set ++CONFIG_SERVERIP_FROM_PROXYDHCP_DELAY_MS=100 ++# CONFIG_KEEP_SERVERADDR is not set ++# CONFIG_UDP_CHECKSUM is not set ++# CONFIG_BOOTP_SERVERIP is not set ++ ++# ++# Device Drivers ++# ++ ++# ++# Generic Driver Options ++# ++CONFIG_DM=y ++# CONFIG_DM_WARN is not set ++# CONFIG_DM_DEBUG is not set ++# CONFIG_DM_DEVICE_REMOVE is not set ++# CONFIG_DM_STDIO is not set ++# CONFIG_DM_SEQ_ALIAS is not set ++# CONFIG_DM_DMA is not set ++# CONFIG_REGMAP is not set ++# CONFIG_DEVRES is not set ++# CONFIG_SIMPLE_BUS is not set ++# CONFIG_OF_TRANSLATE is not set ++# CONFIG_TRANSLATION_OFFSET is not set ++CONFIG_DM_DEV_READ_INLINE=y ++# CONFIG_ACPIGEN is not set ++# CONFIG_BOUNCE_BUFFER is not set ++# CONFIG_ADC is not set ++# CONFIG_ADC_EXYNOS is not set ++# CONFIG_ADC_SANDBOX is not set ++# CONFIG_SARADC_MESON is not set ++# CONFIG_SARADC_ROCKCHIP is not set ++# CONFIG_SATA is not set ++# CONFIG_SCSI_AHCI is not set ++ ++# ++# SATA/SCSI device support ++# ++# CONFIG_AHCI_PCI is not set ++# CONFIG_DWC_AHCI is not set ++# CONFIG_DWC_AHSATA is not set ++# CONFIG_MTK_AHCI is not set ++# CONFIG_SUNXI_AHCI is not set ++# CONFIG_AXI is not set ++ ++# ++# Bus devices ++# ++CONFIG_BLK=y ++CONFIG_HAVE_BLOCK_DEVICE=y ++CONFIG_BLOCK_CACHE=y ++# CONFIG_EFI_MEDIA is not set ++# CONFIG_IDE is not set ++# CONFIG_BOOTCOUNT_LIMIT is not set ++ ++# ++# Button Support ++# ++# CONFIG_BUTTON is not set ++ ++# ++# Cache Controller drivers ++# ++# CONFIG_CACHE is not set ++# CONFIG_L2X0_CACHE is not set ++# CONFIG_NCORE_CACHE is not set ++# CONFIG_SIFIVE_CCACHE is not set ++ ++# ++# Clock ++# ++# CONFIG_CLK is not set ++# CONFIG_CLK_CCF is not set ++# CONFIG_CPU is not set ++ ++# ++# Hardware crypto devices ++# ++# CONFIG_DM_HASH is not set ++# CONFIG_FSL_CAAM is not set ++CONFIG_CAAM_64BIT=y ++# CONFIG_SYS_FSL_SEC_BE is not set ++# CONFIG_SYS_FSL_SEC_LE is not set ++# CONFIG_DDR_SPD is not set ++ ++# ++# Demo for driver model ++# ++# CONFIG_DM_DEMO is not set ++ ++# ++# DFU support ++# ++ ++# ++# DMA Support ++# ++# CONFIG_DMA is not set ++# CONFIG_DMA_LPC32XX is not set ++# CONFIG_TI_EDMA3 is not set ++# CONFIG_DMA_LEGACY is not set ++ ++# ++# Fastboot support ++# ++# CONFIG_UDP_FUNCTION_FASTBOOT is not set ++CONFIG_FIRMWARE=y ++# CONFIG_SPL_FIRMWARE is not set ++CONFIG_ARM_PSCI_FW=y ++# CONFIG_ZYNQMP_FIRMWARE is not set ++# CONFIG_SCMI_FIRMWARE is not set ++ ++# ++# FPGA support ++# ++# CONFIG_FPGA_ALTERA is not set ++# CONFIG_FPGA_SOCFPGA is not set ++# CONFIG_FPGA_XILINX is not set ++CONFIG_GPIO=y ++# CONFIG_AT91_GPIO is not set ++# CONFIG_DA8XX_GPIO is not set ++# CONFIG_INTEL_BROADWELL_GPIO is not set ++# CONFIG_IMX_RGPIO2P is not set ++# CONFIG_IPROC_GPIO is not set ++# CONFIG_KIRKWOOD_GPIO is not set ++# CONFIG_LPC32XX_GPIO is not set ++# CONFIG_MCP230XX_GPIO is not set ++# CONFIG_MXC_GPIO is not set ++# CONFIG_MXS_GPIO is not set ++# CONFIG_CMD_PCA953X is not set ++# CONFIG_CMD_TCA642X is not set ++# CONFIG_VYBRID_GPIO is not set ++ ++# ++# Hardware Spinlock Support ++# ++# CONFIG_DM_HWSPINLOCK is not set ++CONFIG_I2C=y ++# CONFIG_DM_I2C is not set ++# CONFIG_SYS_I2C_LEGACY is not set ++# CONFIG_SYS_I2C_FSL is not set ++# CONFIG_SYS_I2C_DW is not set ++# CONFIG_SYS_I2C_IMX_LPI2C is not set ++# CONFIG_SYS_I2C_MICROCHIP is not set ++# CONFIG_SYS_I2C_MXC is not set ++# CONFIG_SYS_I2C_SOFT is not set ++# CONFIG_SYS_I2C_MV is not set ++# CONFIG_SYS_I2C_MVTWSI is not set ++# CONFIG_INPUT is not set ++# CONFIG_DM_KEYBOARD is not set ++# CONFIG_KEYBOARD is not set ++# CONFIG_TEGRA_KEYBOARD is not set ++# CONFIG_TWL4030_INPUT is not set ++ ++# ++# IOMMU device drivers ++# ++# CONFIG_IOMMU is not set ++ ++# ++# LED Support ++# ++# CONFIG_LED is not set ++# CONFIG_LED_STATUS is not set ++ ++# ++# Mailbox Controller Support ++# ++# CONFIG_DM_MAILBOX is not set ++ ++# ++# Memory Controller drivers ++# ++ ++# ++# Multifunction device drivers ++# ++# CONFIG_MISC is not set ++# CONFIG_CROS_EC is not set ++# CONFIG_DS4510 is not set ++# CONFIG_FSL_SEC_MON is not set ++# CONFIG_IRQ is not set ++# CONFIG_NUVOTON_NCT6102D is not set ++# CONFIG_PWRSEQ is not set ++# CONFIG_PCA9551_LED is not set ++# CONFIG_TEST_DRV is not set ++# CONFIG_TWL4030_LED is not set ++# CONFIG_WINBOND_W83627 is not set ++CONFIG_QFW=y ++CONFIG_QFW_MMIO=y ++# CONFIG_FS_LOADER is not set ++# CONFIG_SPL_FS_LOADER is not set ++ ++# ++# MMC Host controller Support ++# ++# CONFIG_MMC is not set ++# CONFIG_MMC_BROKEN_CD is not set ++# CONFIG_DM_MMC is not set ++# CONFIG_FSL_ESDHC is not set ++# CONFIG_FSL_ESDHC_IMX is not set ++ ++# ++# MTD Support ++# ++# CONFIG_MTD is not set ++# CONFIG_DM_MTD is not set ++# CONFIG_MTD_NOR_FLASH is not set ++# CONFIG_FLASH_CFI_DRIVER is not set ++# CONFIG_USE_SYS_MAX_FLASH_BANKS is not set ++# CONFIG_MTD_RAW_NAND is not set ++ ++# ++# SPI Flash Support ++# ++# CONFIG_SPI_FLASH is not set ++ ++# ++# UBI support ++# ++# CONFIG_UBI_SILENCE_MSG is not set ++# CONFIG_MTD_UBI is not set ++ ++# ++# Multiplexer drivers ++# ++# CONFIG_MULTIPLEXER is not set ++# CONFIG_BITBANGMII is not set ++# CONFIG_MV88E6352_SWITCH is not set ++# CONFIG_PHYLIB is not set ++# CONFIG_FSL_PFE is not set ++# CONFIG_BNXT_ETH is not set ++CONFIG_ETH=y ++CONFIG_DM_ETH=y ++# CONFIG_DM_ETH_PHY is not set ++CONFIG_NETDEVICES=y ++# CONFIG_PHY_GIGE is not set ++# CONFIG_ALTERA_TSE is not set ++# CONFIG_BCM_SF2_ETH is not set ++# CONFIG_BCMGENET is not set ++# CONFIG_CALXEDA_XGMAC is not set ++# CONFIG_DWC_ETH_QOS is not set ++CONFIG_E1000=y ++# CONFIG_E1000_SPI_GENERIC is not set ++# CONFIG_E1000_SPI is not set ++# CONFIG_CMD_E1000 is not set ++# CONFIG_EEPRO100 is not set ++# CONFIG_ETH_DESIGNWARE is not set ++# CONFIG_ETH_DESIGNWARE_MESON8B is not set ++# CONFIG_ETHOC is not set ++# CONFIG_FMAN_ENET is not set ++# CONFIG_FTMAC100 is not set ++# CONFIG_FTGMAC100 is not set ++# CONFIG_MCFFEC is not set ++# CONFIG_FSLDMAFEC is not set ++# CONFIG_KS8851_MLL is not set ++# CONFIG_MACB is not set ++# CONFIG_PCH_GBE is not set ++# CONFIG_RGMII is not set ++# CONFIG_MII is not set ++# CONFIG_PCNET is not set ++# CONFIG_QE_UEC is not set ++# CONFIG_RTL8139 is not set ++# CONFIG_RTL8169 is not set ++# CONFIG_SMC911X is not set ++# CONFIG_SUN7I_GMAC is not set ++# CONFIG_SUN4I_EMAC is not set ++# CONFIG_SUN8I_EMAC is not set ++# CONFIG_SH_ETHER is not set ++# CONFIG_DRIVER_TI_CPSW is not set ++# CONFIG_DRIVER_TI_EMAC is not set ++# CONFIG_DRIVER_TI_KEYSTONE_NET is not set ++# CONFIG_TULIP is not set ++# CONFIG_XILINX_AXIEMAC is not set ++# CONFIG_XILINX_EMACLITE is not set ++# CONFIG_ZYNQ_GEM is not set ++# CONFIG_SYS_DPAA_QBMAN is not set ++# CONFIG_TSEC_ENET is not set ++# CONFIG_MEDIATEK_ETH is not set ++# CONFIG_HIGMACV300_ETH is not set ++# CONFIG_NVME is not set ++# CONFIG_NVME_APPLE is not set ++# CONFIG_NVME_PCI is not set ++CONFIG_PCI=y ++# CONFIG_DM_PCI_COMPAT is not set ++CONFIG_PCI_PNP=y ++# CONFIG_PCI_REGION_MULTI_ENTRY is not set ++# CONFIG_PCI_SRIOV is not set ++# CONFIG_PCI_ARID is not set ++CONFIG_PCIE_ECAM_GENERIC=y ++# CONFIG_PCIE_ECAM_SYNQUACER is not set ++# CONFIG_PCI_PHYTIUM is not set ++# CONFIG_PCIE_FSL is not set ++# CONFIG_PCI_MPC85XX is not set ++# CONFIG_PCI_XILINX is not set ++# CONFIG_PCIE_LAYERSCAPE_RC is not set ++# CONFIG_PCIE_LAYERSCAPE_EP is not set ++# CONFIG_PCIE_LAYERSCAPE_GEN4 is not set ++# CONFIG_PCIE_INTEL_FPGA is not set ++# CONFIG_PCIE_IPROC is not set ++# CONFIG_PCI_KEYSTONE is not set ++ ++# ++# PCI Endpoint ++# ++# CONFIG_PCI_ENDPOINT is not set ++# CONFIG_X86_PCH7 is not set ++# CONFIG_X86_PCH9 is not set ++ ++# ++# PHY Subsystem ++# ++# CONFIG_PHY is not set ++# CONFIG_MIPI_DPHY_HELPERS is not set ++ ++# ++# Rockchip PHY driver ++# ++# CONFIG_MVEBU_COMPHY_SUPPORT is not set ++ ++# ++# Pin controllers ++# ++# CONFIG_PINCTRL is not set ++CONFIG_POWER=y ++# CONFIG_POWER_LEGACY is not set ++# CONFIG_SPL_POWER_LEGACY is not set ++# CONFIG_ACPI_PMC is not set ++# CONFIG_SPL_ACPI_PMC is not set ++# CONFIG_TPL_ACPI_PMC is not set ++ ++# ++# Power Domain Support ++# ++# CONFIG_POWER_DOMAIN is not set ++# CONFIG_DM_PMIC is not set ++# CONFIG_POWER_MC34VR500 is not set ++# CONFIG_DM_REGULATOR is not set ++# CONFIG_POWER_MT6323 is not set ++# CONFIG_DM_PWM is not set ++# CONFIG_PWM_IMX is not set ++# CONFIG_PWM_SANDBOX is not set ++# CONFIG_U_QE is not set ++# CONFIG_RAM is not set ++ ++# ++# Reboot Mode Support ++# ++# CONFIG_DM_REBOOT_MODE is not set ++ ++# ++# Remote Processor drivers ++# ++ ++# ++# Reset Controller Support ++# ++# CONFIG_DM_RESET is not set ++# CONFIG_RESET_SCMI is not set ++CONFIG_DM_RNG=y ++# CONFIG_RNG_MSM is not set ++# CONFIG_RNG_IPROC200 is not set ++ ++# ++# Real Time Clock ++# ++# CONFIG_DM_RTC is not set ++# CONFIG_RTC_ENABLE_32KHZ_OUTPUT is not set ++# CONFIG_RTC_PCF8563 is not set ++# CONFIG_RTC_PL031 is not set ++# CONFIG_RTC_S35392A is not set ++# CONFIG_RTC_MC146818 is not set ++# CONFIG_RTC_M41T62 is not set ++CONFIG_SCSI=y ++CONFIG_DM_SCSI=y ++CONFIG_SERIAL=y ++CONFIG_BAUDRATE=115200 ++CONFIG_REQUIRE_SERIAL_CONSOLE=y ++# CONFIG_SPECIFY_CONSOLE_INDEX is not set ++CONFIG_SERIAL_PRESENT=y ++CONFIG_DM_SERIAL=y ++# CONFIG_SERIAL_RX_BUFFER is not set ++# CONFIG_SERIAL_SEARCH_ALL is not set ++# CONFIG_SERIAL_PROBE_ALL is not set ++# CONFIG_ALTERA_JTAG_UART is not set ++# CONFIG_ALTERA_UART is not set ++# CONFIG_ARC_SERIAL is not set ++# CONFIG_ARM_DCC is not set ++# CONFIG_ATMEL_USART is not set ++# CONFIG_BCM6345_SERIAL is not set ++# CONFIG_COREBOOT_SERIAL is not set ++# CONFIG_CORTINA_UART is not set ++# CONFIG_FSL_LINFLEXUART is not set ++# CONFIG_FSL_LPUART is not set ++# CONFIG_MVEBU_A3700_UART is not set ++# CONFIG_MCFUART is not set ++# CONFIG_NULLDEV_SERIAL is not set ++# CONFIG_SYS_NS16550 is not set ++# CONFIG_NS16550_DYNAMIC is not set ++CONFIG_PL01X_SERIAL=y ++# CONFIG_XILINX_UARTLITE is not set ++# CONFIG_MSM_SERIAL is not set ++# CONFIG_MSM_GENI_SERIAL is not set ++# CONFIG_OMAP_SERIAL is not set ++# CONFIG_PXA_SERIAL is not set ++# CONFIG_SIFIVE_SERIAL is not set ++# CONFIG_ZYNQ_SERIAL is not set ++# CONFIG_MTK_SERIAL is not set ++# CONFIG_MT7620_SERIAL is not set ++# CONFIG_SMEM is not set ++ ++# ++# Sound support ++# ++# CONFIG_SOUND is not set ++# CONFIG_SOUND_MAX98357A is not set ++ ++# ++# SOC (System On Chip) specific Drivers ++# ++# CONFIG_SOC_DEVICE is not set ++# CONFIG_SOC_TI is not set ++# CONFIG_SPI is not set ++ ++# ++# SPMI support ++# ++# CONFIG_SPMI is not set ++# CONFIG_SYSINFO is not set ++ ++# ++# System reset device drivers ++# ++CONFIG_SYSRESET=y ++CONFIG_SYSRESET_CMD_RESET=y ++# CONFIG_POWEROFF_GPIO is not set ++# CONFIG_SYSRESET_GPIO is not set ++CONFIG_SYSRESET_PSCI=y ++# CONFIG_SYSRESET_SYSCON is not set ++# CONFIG_SYSRESET_WATCHDOG is not set ++# CONFIG_SYSRESET_RESETCTL is not set ++# CONFIG_SYSRESET_MPC83XX is not set ++# CONFIG_TEE is not set ++# CONFIG_DM_THERMAL is not set ++ ++# ++# Timer Support ++# ++# CONFIG_TIMER is not set ++ ++# ++# TPM support ++# ++# CONFIG_USB is not set ++ ++# ++# UFS Host Controller Support ++# ++# CONFIG_UFS is not set ++# CONFIG_TI_J721E_UFS is not set ++ ++# ++# Graphics support ++# ++# CONFIG_DM_VIDEO is not set ++# CONFIG_SYS_WHITE_ON_BLACK is not set ++# CONFIG_NO_FB_CLEAR is not set ++ ++# ++# TrueType Fonts ++# ++# CONFIG_VIDEO_VESA is not set ++# CONFIG_VIDEO_LCD_ANX9804 is not set ++# CONFIG_VIDEO_LCD_SSD2828 is not set ++# CONFIG_VIDEO_LCD_HITACHI_TX18D42VM is not set ++# CONFIG_VIDEO_MVEBU is not set ++# CONFIG_I2C_EDID is not set ++# CONFIG_DISPLAY is not set ++# CONFIG_ATMEL_HLCD is not set ++# CONFIG_AM335X_LCD is not set ++# CONFIG_VIDEO_TEGRA20 is not set ++# CONFIG_VIDEO_BRIDGE is not set ++# CONFIG_VIDEO is not set ++# CONFIG_LCD is not set ++# CONFIG_VIDEO_SIMPLE is not set ++# CONFIG_VIDEO_DT_SIMPLEFB is not set ++# CONFIG_OSD is not set ++# CONFIG_SPLASH_SCREEN is not set ++# CONFIG_VIDEO_VCXK is not set ++ ++# ++# VirtIO Drivers ++# ++CONFIG_VIRTIO=y ++CONFIG_VIRTIO_MMIO=y ++CONFIG_VIRTIO_PCI=y ++CONFIG_VIRTIO_NET=y ++CONFIG_VIRTIO_BLK=y ++CONFIG_VIRTIO_RNG=y ++ ++# ++# 1-Wire support ++# ++# CONFIG_W1 is not set ++ ++# ++# 1-wire EEPROM support ++# ++# CONFIG_W1_EEPROM is not set ++ ++# ++# Watchdog Timer Support ++# ++# CONFIG_WATCHDOG is not set ++CONFIG_WATCHDOG_TIMEOUT_MSECS=60000 ++# CONFIG_IMX_WATCHDOG is not set ++# CONFIG_ULP_WATCHDOG is not set ++# CONFIG_DESIGNWARE_WATCHDOG is not set ++# CONFIG_WDT is not set ++# CONFIG_PVBLOCK is not set ++# CONFIG_PHYS_TO_BUS is not set ++ ++# ++# File systems ++# ++# CONFIG_FS_BTRFS is not set ++# CONFIG_FS_CBFS is not set ++# CONFIG_SPL_FS_CBFS is not set ++CONFIG_FS_EXT4=y ++# CONFIG_EXT4_WRITE is not set ++CONFIG_FS_FAT=y ++CONFIG_FAT_WRITE=y ++CONFIG_FS_FAT_MAX_CLUSTSIZE=65536 ++# CONFIG_FS_JFFS2 is not set ++# CONFIG_UBIFS_SILENCE_MSG is not set ++# CONFIG_FS_CRAMFS is not set ++# CONFIG_YAFFS2 is not set ++# CONFIG_FS_SQUASHFS is not set ++ ++# ++# Library routines ++# ++# CONFIG_ADDR_MAP is not set ++# CONFIG_PHYSMEM is not set ++# CONFIG_BCH is not set ++# CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED is not set ++CONFIG_CHARSET=y ++# CONFIG_DYNAMIC_CRC_TABLE is not set ++CONFIG_LIB_UUID=y ++CONFIG_PRINTF=y ++CONFIG_SPRINTF=y ++CONFIG_STRTO=y ++CONFIG_SYS_HZ=1000 ++# CONFIG_PANIC_HANG is not set ++CONFIG_REGEX=y ++CONFIG_LIB_RAND=y ++# CONFIG_LIB_HW_RAND is not set ++CONFIG_SUPPORT_ACPI=y ++# CONFIG_GENERATE_ACPI_TABLE is not set ++# CONFIG_SPL_TINY_MEMSET is not set ++# CONFIG_TPL_TINY_MEMSET is not set ++# CONFIG_BITREVERSE is not set ++# CONFIG_TRACE is not set ++# CONFIG_CIRCBUF is not set ++# CONFIG_CMD_DHRYSTONE is not set ++ ++# ++# Security support ++# ++# CONFIG_AES is not set ++# CONFIG_ECDSA is not set ++# CONFIG_RSA is not set ++# CONFIG_ASYMMETRIC_KEY_TYPE is not set ++# CONFIG_TPM is not set ++ ++# ++# Android Verified Boot ++# ++ ++# ++# Hashing Support ++# ++# CONFIG_BLAKE2 is not set ++CONFIG_SHA1=y ++CONFIG_SHA256=y ++# CONFIG_SHA512 is not set ++# CONFIG_SHA384 is not set ++# CONFIG_SHA_HW_ACCEL is not set ++CONFIG_MD5=y ++CONFIG_CRC32=y ++ ++# ++# Compression Support ++# ++CONFIG_LZ4=y ++# CONFIG_LZMA is not set ++# CONFIG_LZO is not set ++# CONFIG_GZIP is not set ++# CONFIG_ZLIB_UNCOMPRESS is not set ++# CONFIG_BZIP2 is not set ++CONFIG_ZLIB=y ++# CONFIG_ZSTD is not set ++# CONFIG_SPL_LZ4 is not set ++# CONFIG_SPL_LZMA is not set ++# CONFIG_SPL_LZO is not set ++# CONFIG_SPL_GZIP is not set ++# CONFIG_SPL_ZSTD is not set ++# CONFIG_ERRNO_STR is not set ++# CONFIG_HEXDUMP is not set ++# CONFIG_GETOPT is not set ++CONFIG_OF_LIBFDT=y ++CONFIG_OF_LIBFDT_ASSUME_MASK=0 ++# CONFIG_OF_LIBFDT_OVERLAY is not set ++# CONFIG_SPL_OF_LIBFDT is not set ++CONFIG_SPL_OF_LIBFDT_ASSUME_MASK=0xff ++# CONFIG_TPL_OF_LIBFDT is not set ++CONFIG_TPL_OF_LIBFDT_ASSUME_MASK=0xff ++ ++# ++# System tables ++# ++CONFIG_GENERATE_SMBIOS_TABLE=y ++# CONFIG_LIB_RATIONAL is not set ++# CONFIG_SMBIOS_PARSER is not set ++CONFIG_EFI_LOADER=y ++CONFIG_CMD_BOOTEFI_BOOTMGR=y ++CONFIG_EFI_VARIABLE_FILE_STORE=y ++# CONFIG_EFI_VARIABLES_PRESEED is not set ++CONFIG_EFI_VAR_BUF_SIZE=16384 ++# CONFIG_EFI_RUNTIME_UPDATE_CAPSULE is not set ++# CONFIG_EFI_CAPSULE_ON_DISK is not set ++CONFIG_EFI_DEVICE_PATH_TO_TEXT=y ++CONFIG_EFI_DEVICE_PATH_UTIL=y ++CONFIG_EFI_DT_FIXUP=y ++CONFIG_EFI_LOADER_HII=y ++CONFIG_EFI_UNICODE_COLLATION_PROTOCOL2=y ++CONFIG_EFI_UNICODE_CAPITALIZATION=y ++# CONFIG_EFI_LOADER_BOUNCE_BUFFER is not set ++CONFIG_EFI_PLATFORM_LANG_CODES="en-US" ++CONFIG_EFI_HAVE_RUNTIME_RESET=y ++CONFIG_EFI_RNG_PROTOCOL=y ++CONFIG_EFI_LOAD_FILE2_INITRD=y ++# CONFIG_OPTEE_LIB is not set ++# CONFIG_OPTEE_IMAGE is not set ++# CONFIG_BOOTM_OPTEE is not set ++# CONFIG_TEST_FDTDEC is not set ++CONFIG_LIB_ELF=y ++CONFIG_LMB=y ++CONFIG_LMB_USE_MAX_REGIONS=y ++CONFIG_LMB_MAX_REGIONS=8 ++# CONFIG_PHANDLE_CHECK_SEQ is not set ++# CONFIG_UNIT_TEST is not set ++# CONFIG_SPL_UNIT_TEST is not set ++ ++# ++# Tools options ++# ++CONFIG_MKIMAGE_DTC_PATH="dtc" ++CONFIG_TOOLS_CRC32=y ++CONFIG_TOOLS_LIBCRYPTO=y ++CONFIG_TOOLS_FIT=y ++CONFIG_TOOLS_FIT_FULL_CHECK=y ++CONFIG_TOOLS_FIT_PRINT=y ++CONFIG_TOOLS_FIT_RSASSA_PSS=y ++CONFIG_TOOLS_FIT_SIGNATURE=y ++CONFIG_TOOLS_FIT_SIGNATURE_MAX_SIZE=0x10000000 ++CONFIG_TOOLS_FIT_VERBOSE=y ++CONFIG_TOOLS_MD5=y ++CONFIG_TOOLS_OF_LIBFDT=y ++CONFIG_TOOLS_SHA1=y ++CONFIG_TOOLS_SHA256=y ++CONFIG_TOOLS_SHA384=y ++CONFIG_TOOLS_SHA512=y ++# CONFIG_TOOLS_MKEFICAPSULE is not set ++# ++# Automatically generated file; DO NOT EDIT. ++# U-Boot 2022.04 Configuration ++# ++ ++# ++# Compiler: aarch64-linux-gnu-gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 ++# ++CONFIG_CREATE_ARCH_SYMLINK=y ++CONFIG_SYS_CACHE_SHIFT_6=y ++CONFIG_SYS_CACHELINE_SIZE=64 ++CONFIG_LINKER_LIST_ALIGN=8 ++# CONFIG_ARC is not set ++CONFIG_ARM=y ++# CONFIG_M68K is not set ++# CONFIG_MICROBLAZE is not set ++# CONFIG_MIPS is not set ++# CONFIG_NDS32 is not set ++# CONFIG_NIOS2 is not set ++# CONFIG_PPC is not set ++# CONFIG_RISCV is not set ++# CONFIG_SANDBOX is not set ++# CONFIG_SH is not set ++# CONFIG_X86 is not set ++# CONFIG_XTENSA is not set ++CONFIG_SYS_ARCH="arm" ++CONFIG_SYS_CPU="armv8" ++CONFIG_SYS_VENDOR="emulation" ++CONFIG_SYS_BOARD="qemu-arm" ++CONFIG_SYS_CONFIG_NAME="qemu-arm" ++CONFIG_SKIP_LOWLEVEL_INIT=y ++# CONFIG_SKIP_LOWLEVEL_INIT_ONLY is not set ++# CONFIG_SYS_ICACHE_OFF is not set ++# CONFIG_SYS_DCACHE_OFF is not set ++ ++# ++# ARM architecture ++# ++CONFIG_ARM64=y ++CONFIG_ARM64_CRC32=y ++# CONFIG_POSITION_INDEPENDENT is not set ++# CONFIG_INIT_SP_RELATIVE is not set ++# CONFIG_GIC_V3_ITS is not set ++CONFIG_STATIC_RELA=y ++CONFIG_DMA_ADDR_T_64BIT=y ++CONFIG_ARM_ASM_UNIFIED=y ++# CONFIG_SYS_ARM_CACHE_CP15 is not set ++# CONFIG_SYS_ARM_MMU is not set ++# CONFIG_SYS_ARM_MPU is not set ++CONFIG_SYS_ARM_ARCH=8 ++CONFIG_SYS_ARM_CACHE_WRITEBACK=y ++# CONFIG_SYS_ARM_CACHE_WRITETHROUGH is not set ++# CONFIG_SYS_ARM_CACHE_WRITEALLOC is not set ++# CONFIG_ARCH_CPU_INIT is not set ++CONFIG_SYS_ARCH_TIMER=y ++CONFIG_ARM_SMCCC=y ++# CONFIG_SEMIHOSTING is not set ++# CONFIG_SYS_L2CACHE_OFF is not set ++# CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK is not set ++# CONFIG_USE_ARCH_MEMCPY is not set ++# CONFIG_USE_ARCH_MEMSET is not set ++CONFIG_ARM64_SUPPORT_AARCH32=y ++# CONFIG_ARCH_AT91 is not set ++# CONFIG_ARCH_DAVINCI is not set ++# CONFIG_ARCH_KIRKWOOD is not set ++# CONFIG_ARCH_MVEBU is not set ++# CONFIG_ARCH_ORION5X is not set ++# CONFIG_TARGET_STV0991 is not set ++# CONFIG_ARCH_BCM283X is not set ++# CONFIG_ARCH_BCM63158 is not set ++# CONFIG_ARCH_BCM68360 is not set ++# CONFIG_ARCH_BCM6858 is not set ++# CONFIG_ARCH_BCMSTB is not set ++# CONFIG_TARGET_VEXPRESS_CA9X4 is not set ++# CONFIG_TARGET_BCMCYGNUS is not set ++# CONFIG_TARGET_BCMNS2 is not set ++# CONFIG_TARGET_BCMNS3 is not set ++# CONFIG_ARCH_EXYNOS is not set ++# CONFIG_ARCH_S5PC1XX is not set ++# CONFIG_ARCH_HIGHBANK is not set ++# CONFIG_ARCH_INTEGRATOR is not set ++# CONFIG_ARCH_IPQ40XX is not set ++# CONFIG_ARCH_KEYSTONE is not set ++# CONFIG_ARCH_K3 is not set ++# CONFIG_ARCH_OMAP2PLUS is not set ++# CONFIG_ARCH_MESON is not set ++# CONFIG_ARCH_MEDIATEK is not set ++# CONFIG_ARCH_LPC32XX is not set ++# CONFIG_ARCH_IMX8 is not set ++# CONFIG_ARCH_IMX8M is not set ++# CONFIG_ARCH_IMX8ULP is not set ++# CONFIG_ARCH_IMXRT is not set ++# CONFIG_ARCH_MX23 is not set ++# CONFIG_ARCH_MX28 is not set ++# CONFIG_ARCH_MX31 is not set ++# CONFIG_ARCH_MX7ULP is not set ++# CONFIG_ARCH_MX7 is not set ++# CONFIG_ARCH_MX6 is not set ++CONFIG_SPL_LDSCRIPT="arch/arm/cpu/armv8/u-boot-spl.lds" ++# CONFIG_ARCH_MX5 is not set ++# CONFIG_ARCH_NEXELL is not set ++# CONFIG_ARCH_APPLE is not set ++# CONFIG_ARCH_OWL is not set ++CONFIG_ARCH_QEMU=y ++# CONFIG_ARCH_RMOBILE is not set ++# CONFIG_ARCH_SNAPDRAGON is not set ++# CONFIG_ARCH_SOCFPGA is not set ++# CONFIG_ARCH_SUNXI is not set ++# CONFIG_ARCH_U8500 is not set ++# CONFIG_ARCH_VERSAL is not set ++# CONFIG_ARCH_VF610 is not set ++# CONFIG_ARCH_ZYNQ is not set ++# CONFIG_ARCH_ZYNQMP_R5 is not set ++# CONFIG_ARCH_ZYNQMP is not set ++# CONFIG_ARCH_TEGRA is not set ++# CONFIG_TARGET_VEXPRESS64_AEMV8A is not set ++# CONFIG_TARGET_VEXPRESS64_BASE_FVP is not set ++# CONFIG_TARGET_VEXPRESS64_JUNO is not set ++# CONFIG_TARGET_TOTAL_COMPUTE is not set ++# CONFIG_TARGET_LS2080A_EMU is not set ++# CONFIG_TARGET_LS1088AQDS is not set ++# CONFIG_TARGET_LS2080AQDS is not set ++# CONFIG_TARGET_LS2080ARDB is not set ++# CONFIG_TARGET_LS2081ARDB is not set ++# CONFIG_TARGET_LX2160ARDB is not set ++# CONFIG_TARGET_LX2160AQDS is not set ++# CONFIG_TARGET_LX2162AQDS is not set ++# CONFIG_TARGET_HIKEY is not set ++# CONFIG_TARGET_HIKEY960 is not set ++# CONFIG_TARGET_POPLAR is not set ++# CONFIG_TARGET_LS1012AQDS is not set ++# CONFIG_TARGET_LS1012ARDB is not set ++# CONFIG_TARGET_LS1012A2G5RDB is not set ++# CONFIG_TARGET_LS1012AFRWY is not set ++# CONFIG_TARGET_LS1012AFRDM is not set ++# CONFIG_TARGET_LS1028AQDS is not set ++# CONFIG_TARGET_LS1028ARDB is not set ++# CONFIG_TARGET_LS1088ARDB is not set ++# CONFIG_TARGET_LS1021AQDS is not set ++# CONFIG_TARGET_LS1021ATWR is not set ++# CONFIG_TARGET_PG_WCOM_SELI8 is not set ++# CONFIG_TARGET_PG_WCOM_EXPU1 is not set ++# CONFIG_TARGET_LS1021ATSN is not set ++# CONFIG_TARGET_LS1021AIOT is not set ++# CONFIG_TARGET_LS1043AQDS is not set ++# CONFIG_TARGET_LS1043ARDB is not set ++# CONFIG_TARGET_LS1046AQDS is not set ++# CONFIG_TARGET_LS1046ARDB is not set ++# CONFIG_TARGET_LS1046AFRWY is not set ++# CONFIG_TARGET_SL28 is not set ++# CONFIG_TARGET_TEN64 is not set ++# CONFIG_TARGET_COLIBRI_PXA270 is not set ++# CONFIG_ARCH_UNIPHIER is not set ++# CONFIG_ARCH_SYNQUACER is not set ++# CONFIG_ARCH_STM32 is not set ++# CONFIG_ARCH_STI is not set ++# CONFIG_ARCH_STM32MP is not set ++# CONFIG_ARCH_ROCKCHIP is not set ++# CONFIG_ARCH_OCTEONTX is not set ++# CONFIG_ARCH_OCTEONTX2 is not set ++# CONFIG_TARGET_THUNDERX_88XX is not set ++# CONFIG_ARCH_ASPEED is not set ++# CONFIG_TARGET_DURIAN is not set ++# CONFIG_TARGET_PRESIDIO_ASIC is not set ++# CONFIG_TARGET_XENGUEST_ARM64 is not set ++# CONFIG_STATIC_MACH_TYPE is not set ++CONFIG_SYS_TEXT_BASE=0x60000000 ++CONFIG_SYS_MALLOC_LEN=0x400000 ++CONFIG_SYS_MALLOC_F_LEN=0x400 ++CONFIG_NR_DRAM_BANKS=1 ++CONFIG_BOARD_SPECIFIC_OPTIONS=y ++CONFIG_ENV_SIZE=0x1f000 ++# CONFIG_DM_GPIO is not set ++CONFIG_DEFAULT_DEVICE_TREE="qemu-arm64" ++CONFIG_MULTI_DTB_FIT_UNCOMPRESS_SZ=0x8000 ++# CONFIG_TARGET_QEMU_ARM_32BIT is not set ++CONFIG_TARGET_QEMU_ARM_64BIT=y ++CONFIG_ERR_PTR_OFFSET=0x0 ++CONFIG_BOOTSTAGE_STASH_ADDR=0 ++CONFIG_IDENT_STRING="" ++CONFIG_SYS_CLK_FREQ=0 ++# CONFIG_CHIP_DIP_SCAN is not set ++# CONFIG_ARMV8_MULTIENTRY is not set ++# CONFIG_ARMV8_SET_SMPEN is not set ++ ++# ++# ARMv8 secure monitor firmware ++# ++# CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT is not set ++# CONFIG_SPL_ARMV8_SEC_FIRMWARE_SUPPORT is not set ++# CONFIG_SPL_RECOVER_DATA_SECTION is not set ++CONFIG_PSCI_RESET=y ++# CONFIG_ARMV8_PSCI is not set ++# CONFIG_ARMV8_EA_EL3_FIRST is not set ++# CONFIG_CMD_DEKBLOB is not set ++# CONFIG_IMX_CAAM_DEK_ENCAP is not set ++# CONFIG_IMX_OPTEE_DEK_ENCAP is not set ++# CONFIG_IMX_SECO_DEK_ENCAP is not set ++# CONFIG_CMD_HDMIDETECT is not set ++CONFIG_IMX_DCD_ADDR=0x00910000 ++ ++# ++# ARM debug ++# ++CONFIG_BUILD_TARGET="" ++# CONFIG_SYS_PCI_64BIT is not set ++# CONFIG_DEBUG_UART is not set ++CONFIG_AHCI=y ++# CONFIG_OF_BOARD_FIXUP is not set ++ ++# ++# General setup ++# ++CONFIG_LOCALVERSION="" ++CONFIG_LOCALVERSION_AUTO=y ++CONFIG_CC_IS_GCC=y ++CONFIG_GCC_VERSION=110400 ++CONFIG_CLANG_VERSION=0 ++CONFIG_CC_OPTIMIZE_FOR_SIZE=y ++# CONFIG_OPTIMIZE_INLINING is not set ++CONFIG_ARCH_SUPPORTS_LTO=y ++# CONFIG_LTO is not set ++CONFIG_CC_HAS_ASM_INLINE=y ++# CONFIG_XEN is not set ++CONFIG_DISTRO_DEFAULTS=y ++CONFIG_ENV_VARS_UBOOT_CONFIG=y ++# CONFIG_SYS_BOOT_GET_CMDLINE is not set ++# CONFIG_SYS_BOOT_GET_KBD is not set ++CONFIG_SYS_MALLOC_F=y ++CONFIG_EXPERT=y ++CONFIG_SYS_MALLOC_CLEAR_ON_INIT=y ++# CONFIG_SYS_MALLOC_DEFAULT_TO_INIT is not set ++# CONFIG_TOOLS_DEBUG is not set ++CONFIG_PHYS_64BIT=y ++# CONFIG_REMAKE_ELF is not set ++# CONFIG_SYS_CUSTOM_LDSCRIPT is not set ++CONFIG_SYS_LOAD_ADDR=0x1000000 ++CONFIG_PLATFORM_ELFENTRY="_start" ++CONFIG_STACK_SIZE=0x1000000 ++CONFIG_SYS_SRAM_BASE=0x0 ++CONFIG_SYS_SRAM_SIZE=0x0 ++# CONFIG_MP is not set ++CONFIG_EXAMPLES=y ++ ++# ++# API ++# ++# CONFIG_API is not set ++ ++# ++# Boot options ++# ++ ++# ++# Boot images ++# ++# CONFIG_ANDROID_BOOT_IMAGE is not set ++CONFIG_FIT=y ++# CONFIG_TIMESTAMP is not set ++CONFIG_FIT_EXTERNAL_OFFSET=0x0 ++CONFIG_FIT_FULL_CHECK=y ++# CONFIG_FIT_SIGNATURE is not set ++# CONFIG_FIT_CIPHER is not set ++CONFIG_FIT_VERBOSE=y ++# CONFIG_FIT_BEST_MATCH is not set ++CONFIG_FIT_PRINT=y ++CONFIG_LEGACY_IMAGE_FORMAT=y ++CONFIG_SUPPORT_RAW_INITRD=y ++# CONFIG_OF_BOARD_SETUP is not set ++# CONFIG_OF_SYSTEM_SETUP is not set ++# CONFIG_OF_STDOUT_VIA_ALIAS is not set ++CONFIG_SYS_EXTRA_OPTIONS="" ++CONFIG_HAVE_SYS_TEXT_BASE=y ++# CONFIG_DYNAMIC_SYS_CLK_FREQ is not set ++# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set ++# CONFIG_CHROMEOS is not set ++# CONFIG_CHROMEOS_VBOOT is not set ++# CONFIG_RAMBOOT_PBL is not set ++ ++# ++# Boot timing ++# ++# CONFIG_BOOTSTAGE is not set ++CONFIG_BOOTSTAGE_STASH_SIZE=0x1000 ++# CONFIG_SHOW_BOOT_PROGRESS is not set ++ ++# ++# Boot media ++# ++# CONFIG_NAND_BOOT is not set ++# CONFIG_ONENAND_BOOT is not set ++# CONFIG_QSPI_BOOT is not set ++# CONFIG_SATA_BOOT is not set ++# CONFIG_SD_BOOT is not set ++# CONFIG_SD_BOOT_QSPI is not set ++# CONFIG_SPI_BOOT is not set ++ ++# ++# Autoboot options ++# ++CONFIG_AUTOBOOT=y ++CONFIG_BOOTDELAY=2 ++# CONFIG_AUTOBOOT_KEYED is not set ++# CONFIG_AUTOBOOT_USE_MENUKEY is not set ++# CONFIG_USE_BOOTARGS is not set ++# CONFIG_BOOTARGS_SUBST is not set ++# CONFIG_USE_BOOTCOMMAND is not set ++# CONFIG_USE_PREBOOT is not set ++CONFIG_DEFAULT_FDT_FILE="" ++ ++# ++# Console ++# ++CONFIG_MENU=y ++# CONFIG_CONSOLE_RECORD is not set ++# CONFIG_DISABLE_CONSOLE is not set ++CONFIG_LOGLEVEL=4 ++CONFIG_SPL_LOGLEVEL=4 ++CONFIG_TPL_LOGLEVEL=4 ++# CONFIG_SILENT_CONSOLE is not set ++# CONFIG_PRE_CONSOLE_BUFFER is not set ++# CONFIG_CONSOLE_MUX is not set ++# CONFIG_SYS_CONSOLE_IS_IN_ENV is not set ++# CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE is not set ++# CONFIG_SYS_CONSOLE_ENV_OVERWRITE is not set ++# CONFIG_SYS_CONSOLE_INFO_QUIET is not set ++# CONFIG_SYS_STDIO_DEREGISTER is not set ++# CONFIG_SPL_SYS_STDIO_DEREGISTER is not set ++# CONFIG_SYS_DEVICE_NULLDEV is not set ++ ++# ++# Logging ++# ++# CONFIG_LOG is not set ++ ++# ++# Init options ++# ++# CONFIG_BOARD_TYPES is not set ++# CONFIG_DISPLAY_CPUINFO is not set ++# CONFIG_DISPLAY_BOARDINFO is not set ++# CONFIG_DISPLAY_BOARDINFO_LATE is not set ++ ++# ++# Start-up hooks ++# ++# CONFIG_ARCH_EARLY_INIT_R is not set ++# CONFIG_ARCH_MISC_INIT is not set ++# CONFIG_BOARD_EARLY_INIT_F is not set ++# CONFIG_BOARD_EARLY_INIT_R is not set ++CONFIG_BOARD_LATE_INIT=y ++# CONFIG_LAST_STAGE_INIT is not set ++# CONFIG_MISC_INIT_F is not set ++# CONFIG_MISC_INIT_R is not set ++# CONFIG_ID_EEPROM is not set ++# CONFIG_PCI_INIT_R is not set ++ ++# ++# Security support ++# ++CONFIG_HASH=y ++# CONFIG_STACKPROTECTOR is not set ++ ++# ++# Update support ++# ++# CONFIG_UPDATE_TFTP is not set ++# CONFIG_ANDROID_AB is not set ++ ++# ++# Blob list ++# ++# CONFIG_BLOBLIST is not set ++ ++# ++# SPL / TPL ++# ++CONFIG_SPL_SYS_STACK_F_CHECK_BYTE=0xaa ++# CONFIG_SPL_SYS_REPORT_STACK_F_USAGE is not set ++# CONFIG_SPL_SHOW_ERRORS is not set ++ ++# ++# PowerPC and LayerScape SPL Boot options ++# ++# CONFIG_SPL_MD5 is not set ++# CONFIG_FDT_SIMPLEFB is not set ++ ++# ++# Command line interface ++# ++CONFIG_CMDLINE=y ++CONFIG_HUSH_PARSER=y ++CONFIG_CMDLINE_EDITING=y ++CONFIG_AUTO_COMPLETE=y ++CONFIG_SYS_LONGHELP=y ++CONFIG_SYS_PROMPT="=> " ++CONFIG_SYS_PROMPT_HUSH_PS2="> " ++CONFIG_SYS_XTRACE=y ++ ++# ++# Commands ++# ++ ++# ++# Info commands ++# ++CONFIG_CMD_BDI=y ++# CONFIG_CMD_CONFIG is not set ++# CONFIG_CMD_CONSOLE is not set ++# CONFIG_CMD_LICENSE is not set ++# CONFIG_CMD_PMC is not set ++ ++# ++# Boot commands ++# ++# CONFIG_CMD_BOOTD is not set ++CONFIG_CMD_BOOTM=y ++CONFIG_BOOTM_EFI=y ++# CONFIG_CMD_BOOTZ is not set ++CONFIG_CMD_BOOTI=y ++CONFIG_BOOTM_LINUX=y ++CONFIG_BOOTM_NETBSD=y ++# CONFIG_BOOTM_OPENRTOS is not set ++# CONFIG_BOOTM_OSE is not set ++CONFIG_BOOTM_PLAN9=y ++CONFIG_BOOTM_RTEMS=y ++CONFIG_BOOTM_VXWORKS=y ++CONFIG_CMD_BOOTEFI=y ++CONFIG_CMD_BOOTEFI_HELLO_COMPILE=y ++# CONFIG_CMD_BOOTEFI_HELLO is not set ++CONFIG_CMD_BOOTEFI_SELFTEST=y ++# CONFIG_CMD_BOOTMENU is not set ++# CONFIG_CMD_ADTIMG is not set ++CONFIG_CMD_ELF=y ++CONFIG_CMD_FDT=y ++CONFIG_CMD_GO=y ++CONFIG_CMD_RUN=y ++CONFIG_CMD_IMI=y ++# CONFIG_CMD_IMLS is not set ++# CONFIG_CMD_XIMG is not set ++# CONFIG_CMD_THOR_DOWNLOAD is not set ++# CONFIG_CMD_ZBOOT is not set ++ ++# ++# Environment commands ++# ++# CONFIG_CMD_ASKENV is not set ++CONFIG_CMD_EXPORTENV=y ++CONFIG_CMD_IMPORTENV=y ++# CONFIG_CMD_EDITENV is not set ++# CONFIG_CMD_GREPENV is not set ++CONFIG_CMD_SAVEENV=y ++# CONFIG_CMD_ERASEENV is not set ++CONFIG_CMD_ENV_EXISTS=y ++# CONFIG_CMD_ENV_CALLBACK is not set ++# CONFIG_CMD_ENV_FLAGS is not set ++# CONFIG_CMD_NVEDIT_EFI is not set ++# CONFIG_CMD_NVEDIT_INFO is not set ++# CONFIG_CMD_NVEDIT_LOAD is not set ++# CONFIG_CMD_NVEDIT_SELECT is not set ++ ++# ++# Memory commands ++# ++# CONFIG_CMD_BINOP is not set ++# CONFIG_CMD_BLOBLIST is not set ++CONFIG_CMD_CRC32=y ++# CONFIG_CRC32_VERIFY is not set ++# CONFIG_CMD_EEPROM is not set ++# CONFIG_LOOPW is not set ++# CONFIG_CMD_MD5SUM is not set ++# CONFIG_CMD_MEMINFO is not set ++CONFIG_CMD_MEMORY=y ++# CONFIG_CMD_MEM_SEARCH is not set ++# CONFIG_CMD_MX_CYCLIC is not set ++CONFIG_CMD_RANDOM=y ++# CONFIG_CMD_MEMTEST is not set ++# CONFIG_CMD_SHA1SUM is not set ++# CONFIG_CMD_STRINGS is not set ++ ++# ++# Compression commands ++# ++# CONFIG_CMD_LZMADEC is not set ++CONFIG_CMD_UNLZ4=y ++# CONFIG_CMD_UNZIP is not set ++# CONFIG_CMD_ZIP is not set ++ ++# ++# Device access commands ++# ++# CONFIG_CMD_ARMFLASH is not set ++# CONFIG_CMD_BIND is not set ++# CONFIG_CMD_CLK is not set ++# CONFIG_CMD_DEMO is not set ++# CONFIG_CMD_DFU is not set ++# CONFIG_CMD_DM is not set ++# CONFIG_CMD_FPGAD is not set ++# CONFIG_CMD_FUSE is not set ++# CONFIG_CMD_GPIO is not set ++# CONFIG_CMD_GPT is not set ++# CONFIG_RANDOM_UUID is not set ++# CONFIG_CMD_IDE is not set ++# CONFIG_CMD_IO is not set ++# CONFIG_CMD_IOTRACE is not set ++# CONFIG_CMD_I2C is not set ++# CONFIG_CMD_LOADB is not set ++# CONFIG_CMD_LOADS is not set ++# CONFIG_CMD_LSBLK is not set ++# CONFIG_CMD_MBR is not set ++# CONFIG_CMD_CLONE is not set ++# CONFIG_CMD_OSD is not set ++CONFIG_CMD_PART=y ++# CONFIG_CMD_PCI is not set ++# CONFIG_CMD_POWEROFF is not set ++# CONFIG_CMD_READ is not set ++# CONFIG_CMD_SATA is not set ++# CONFIG_CMD_SAVES is not set ++CONFIG_CMD_SCSI=y ++# CONFIG_CMD_SDRAM is not set ++# CONFIG_CMD_TSI148 is not set ++# CONFIG_CMD_UNIVERSE is not set ++# CONFIG_CMD_USB_SDP is not set ++CONFIG_CMD_VIRTIO=y ++ ++# ++# Shell scripting commands ++# ++CONFIG_CMD_ECHO=y ++# CONFIG_CMD_ITEST is not set ++CONFIG_CMD_SOURCE=y ++# CONFIG_CMD_SETEXPR is not set ++ ++# ++# Android support commands ++# ++CONFIG_CMD_NET=y ++CONFIG_CMD_BOOTP=y ++CONFIG_CMD_DHCP=y ++CONFIG_BOOTP_BOOTPATH=y ++CONFIG_BOOTP_DNS=y ++# CONFIG_BOOTP_DNS2 is not set ++CONFIG_BOOTP_GATEWAY=y ++CONFIG_BOOTP_HOSTNAME=y ++# CONFIG_BOOTP_PREFER_SERVERIP is not set ++CONFIG_BOOTP_SUBNETMASK=y ++# CONFIG_BOOTP_NTPSERVER is not set ++# CONFIG_CMD_PCAP is not set ++CONFIG_BOOTP_PXE=y ++CONFIG_BOOTP_PXE_CLIENTARCH=0x16 ++CONFIG_BOOTP_VCI_STRING="U-Boot.armv8" ++CONFIG_CMD_TFTPBOOT=y ++# CONFIG_CMD_TFTPPUT is not set ++# CONFIG_CMD_TFTPSRV is not set ++CONFIG_NET_TFTP_VARS=y ++# CONFIG_CMD_RARP is not set ++# CONFIG_CMD_NFS is not set ++CONFIG_CMD_MII=y ++CONFIG_CMD_PING=y ++# CONFIG_CMD_CDP is not set ++# CONFIG_CMD_SNTP is not set ++# CONFIG_CMD_DNS is not set ++# CONFIG_CMD_LINK_LOCAL is not set ++# CONFIG_CMD_ETHSW is not set ++CONFIG_CMD_PXE=y ++# CONFIG_CMD_WOL is not set ++ ++# ++# Misc commands ++# ++# CONFIG_CMD_BSP is not set ++# CONFIG_CMD_BLOCK_CACHE is not set ++# CONFIG_CMD_CACHE is not set ++# CONFIG_CMD_CONITRACE is not set ++# CONFIG_CMD_EFIDEBUG is not set ++# CONFIG_CMD_EXCEPTION is not set ++# CONFIG_CMD_DATE is not set ++# CONFIG_CMD_TIME is not set ++# CONFIG_CMD_GETTIME is not set ++# CONFIG_CMD_RNG is not set ++# CONFIG_CMD_KASLRSEED is not set ++CONFIG_CMD_SLEEP=y ++# CONFIG_CMD_TIMER is not set ++CONFIG_CMD_SYSBOOT=y ++CONFIG_CMD_QFW=y ++# CONFIG_CMD_PSTORE is not set ++# CONFIG_CMD_TERMINAL is not set ++# CONFIG_CMD_UUID is not set ++ ++# ++# TI specific command line interface ++# ++# CONFIG_CMD_DDR3 is not set ++ ++# ++# Power commands ++# ++ ++# ++# Security commands ++# ++# CONFIG_CMD_AES is not set ++# CONFIG_CMD_BLOB is not set ++# CONFIG_CMD_HASH is not set ++# CONFIG_CMD_HVC is not set ++# CONFIG_CMD_SMC is not set ++ ++# ++# Firmware commands ++# ++ ++# ++# Filesystem commands ++# ++# CONFIG_CMD_BTRFS is not set ++CONFIG_CMD_EXT2=y ++CONFIG_CMD_EXT4=y ++# CONFIG_CMD_EXT4_WRITE is not set ++CONFIG_CMD_FAT=y ++# CONFIG_CMD_SQUASHFS is not set ++CONFIG_CMD_FS_GENERIC=y ++# CONFIG_CMD_FS_UUID is not set ++# CONFIG_CMD_JFFS2 is not set ++# CONFIG_CMD_REISER is not set ++# CONFIG_CMD_ZFS is not set ++ ++# ++# Debug commands ++# ++# CONFIG_CMD_DIAG is not set ++# CONFIG_CMD_LOG is not set ++# CONFIG_CMD_UBI is not set ++ ++# ++# Partition Types ++# ++CONFIG_PARTITIONS=y ++# CONFIG_MAC_PARTITION is not set ++CONFIG_DOS_PARTITION=y ++CONFIG_ISO_PARTITION=y ++# CONFIG_AMIGA_PARTITION is not set ++CONFIG_EFI_PARTITION=y ++CONFIG_EFI_PARTITION_ENTRIES_NUMBERS=128 ++CONFIG_EFI_PARTITION_ENTRIES_OFF=0 ++CONFIG_PARTITION_UUIDS=y ++# CONFIG_PARTITION_TYPE_GUID is not set ++CONFIG_SUPPORT_OF_CONTROL=y ++ ++# ++# Device Tree Control ++# ++CONFIG_OF_CONTROL=y ++CONFIG_OF_REAL=y ++# CONFIG_OF_LIVE is not set ++CONFIG_OF_SEPARATE=y ++# CONFIG_OF_EMBED is not set ++CONFIG_OF_BOARD=y ++CONFIG_OF_HAS_PRIOR_STAGE=y ++CONFIG_OF_OMIT_DTB=y ++CONFIG_DEVICE_TREE_INCLUDES="" ++CONFIG_OF_LIST="qemu-arm64" ++# CONFIG_MULTI_DTB_FIT is not set ++# CONFIG_OF_DTB_PROPS_REMOVE is not set ++ ++# ++# Environment ++# ++CONFIG_ENV_SUPPORT=y ++CONFIG_ENV_SOURCE_FILE="" ++CONFIG_SAVEENV=y ++# CONFIG_ENV_OVERWRITE is not set ++CONFIG_ENV_IS_NOWHERE=y ++# CONFIG_ENV_IS_IN_EEPROM is not set ++# CONFIG_ENV_IS_IN_FAT is not set ++# CONFIG_ENV_IS_IN_EXT4 is not set ++# CONFIG_ENV_IS_IN_FLASH is not set ++# CONFIG_ENV_IS_IN_NAND is not set ++# CONFIG_ENV_IS_IN_NVRAM is not set ++# CONFIG_ENV_IS_IN_ONENAND is not set ++# CONFIG_ENV_IS_IN_REMOTE is not set ++# CONFIG_SYS_REDUNDAND_ENVIRONMENT is not set ++# CONFIG_SYS_RELOC_GD_ENV_ADDR is not set ++# CONFIG_USE_DEFAULT_ENV_FILE is not set ++# CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG is not set ++# CONFIG_ENV_IMPORT_FDT is not set ++# CONFIG_ENV_APPEND is not set ++# CONFIG_ENV_WRITEABLE_LIST is not set ++# CONFIG_ENV_ACCESS_IGNORE_FORCE is not set ++# CONFIG_VERSION_VARIABLE is not set ++CONFIG_NET=y ++# CONFIG_PROT_UDP is not set ++# CONFIG_BOOTP_SEND_HOSTNAME is not set ++# CONFIG_NET_RANDOM_ETHADDR is not set ++# CONFIG_NETCONSOLE is not set ++# CONFIG_IP_DEFRAG is not set ++CONFIG_TFTP_BLOCKSIZE=512 ++CONFIG_TFTP_WINDOWSIZE=1 ++# CONFIG_TFTP_TSIZE is not set ++# CONFIG_SERVERIP_FROM_PROXYDHCP is not set ++CONFIG_SERVERIP_FROM_PROXYDHCP_DELAY_MS=100 ++# CONFIG_KEEP_SERVERADDR is not set ++# CONFIG_UDP_CHECKSUM is not set ++# CONFIG_BOOTP_SERVERIP is not set ++ ++# ++# Device Drivers ++# ++ ++# ++# Generic Driver Options ++# ++CONFIG_DM=y ++# CONFIG_DM_WARN is not set ++# CONFIG_DM_DEBUG is not set ++# CONFIG_DM_DEVICE_REMOVE is not set ++# CONFIG_DM_STDIO is not set ++# CONFIG_DM_SEQ_ALIAS is not set ++# CONFIG_DM_DMA is not set ++# CONFIG_REGMAP is not set ++# CONFIG_DEVRES is not set ++# CONFIG_SIMPLE_BUS is not set ++# CONFIG_OF_TRANSLATE is not set ++# CONFIG_TRANSLATION_OFFSET is not set ++CONFIG_DM_DEV_READ_INLINE=y ++# CONFIG_ACPIGEN is not set ++# CONFIG_BOUNCE_BUFFER is not set ++# CONFIG_ADC is not set ++# CONFIG_ADC_EXYNOS is not set ++# CONFIG_ADC_SANDBOX is not set ++# CONFIG_SARADC_MESON is not set ++# CONFIG_SARADC_ROCKCHIP is not set ++# CONFIG_SATA is not set ++# CONFIG_SCSI_AHCI is not set ++ ++# ++# SATA/SCSI device support ++# ++# CONFIG_AHCI_PCI is not set ++# CONFIG_DWC_AHCI is not set ++# CONFIG_DWC_AHSATA is not set ++# CONFIG_MTK_AHCI is not set ++# CONFIG_SUNXI_AHCI is not set ++# CONFIG_AXI is not set ++ ++# ++# Bus devices ++# ++CONFIG_BLK=y ++CONFIG_HAVE_BLOCK_DEVICE=y ++CONFIG_BLOCK_CACHE=y ++# CONFIG_EFI_MEDIA is not set ++# CONFIG_IDE is not set ++# CONFIG_BOOTCOUNT_LIMIT is not set ++ ++# ++# Button Support ++# ++# CONFIG_BUTTON is not set ++ ++# ++# Cache Controller drivers ++# ++# CONFIG_CACHE is not set ++# CONFIG_L2X0_CACHE is not set ++# CONFIG_NCORE_CACHE is not set ++# CONFIG_SIFIVE_CCACHE is not set ++ ++# ++# Clock ++# ++# CONFIG_CLK is not set ++# CONFIG_CLK_CCF is not set ++# CONFIG_CPU is not set ++ ++# ++# Hardware crypto devices ++# ++# CONFIG_DM_HASH is not set ++# CONFIG_FSL_CAAM is not set ++CONFIG_CAAM_64BIT=y ++# CONFIG_SYS_FSL_SEC_BE is not set ++# CONFIG_SYS_FSL_SEC_LE is not set ++# CONFIG_DDR_SPD is not set ++ ++# ++# Demo for driver model ++# ++# CONFIG_DM_DEMO is not set ++ ++# ++# DFU support ++# ++ ++# ++# DMA Support ++# ++# CONFIG_DMA is not set ++# CONFIG_DMA_LPC32XX is not set ++# CONFIG_TI_EDMA3 is not set ++# CONFIG_DMA_LEGACY is not set ++ ++# ++# Fastboot support ++# ++# CONFIG_UDP_FUNCTION_FASTBOOT is not set ++CONFIG_FIRMWARE=y ++# CONFIG_SPL_FIRMWARE is not set ++CONFIG_ARM_PSCI_FW=y ++# CONFIG_ZYNQMP_FIRMWARE is not set ++# CONFIG_SCMI_FIRMWARE is not set ++ ++# ++# FPGA support ++# ++# CONFIG_FPGA_ALTERA is not set ++# CONFIG_FPGA_SOCFPGA is not set ++# CONFIG_FPGA_XILINX is not set ++CONFIG_GPIO=y ++# CONFIG_AT91_GPIO is not set ++# CONFIG_DA8XX_GPIO is not set ++# CONFIG_INTEL_BROADWELL_GPIO is not set ++# CONFIG_IMX_RGPIO2P is not set ++# CONFIG_IPROC_GPIO is not set ++# CONFIG_KIRKWOOD_GPIO is not set ++# CONFIG_LPC32XX_GPIO is not set ++# CONFIG_MCP230XX_GPIO is not set ++# CONFIG_MXC_GPIO is not set ++# CONFIG_MXS_GPIO is not set ++# CONFIG_CMD_PCA953X is not set ++# CONFIG_CMD_TCA642X is not set ++# CONFIG_VYBRID_GPIO is not set ++ ++# ++# Hardware Spinlock Support ++# ++# CONFIG_DM_HWSPINLOCK is not set ++CONFIG_I2C=y ++# CONFIG_DM_I2C is not set ++# CONFIG_SYS_I2C_LEGACY is not set ++# CONFIG_SYS_I2C_FSL is not set ++# CONFIG_SYS_I2C_DW is not set ++# CONFIG_SYS_I2C_IMX_LPI2C is not set ++# CONFIG_SYS_I2C_MICROCHIP is not set ++# CONFIG_SYS_I2C_MXC is not set ++# CONFIG_SYS_I2C_SOFT is not set ++# CONFIG_SYS_I2C_MV is not set ++# CONFIG_SYS_I2C_MVTWSI is not set ++# CONFIG_INPUT is not set ++# CONFIG_DM_KEYBOARD is not set ++# CONFIG_KEYBOARD is not set ++# CONFIG_TEGRA_KEYBOARD is not set ++# CONFIG_TWL4030_INPUT is not set ++ ++# ++# IOMMU device drivers ++# ++# CONFIG_IOMMU is not set ++ ++# ++# LED Support ++# ++# CONFIG_LED is not set ++# CONFIG_LED_STATUS is not set ++ ++# ++# Mailbox Controller Support ++# ++# CONFIG_DM_MAILBOX is not set ++ ++# ++# Memory Controller drivers ++# ++ ++# ++# Multifunction device drivers ++# ++# CONFIG_MISC is not set ++# CONFIG_CROS_EC is not set ++# CONFIG_DS4510 is not set ++# CONFIG_FSL_SEC_MON is not set ++# CONFIG_IRQ is not set ++# CONFIG_NUVOTON_NCT6102D is not set ++# CONFIG_PWRSEQ is not set ++# CONFIG_PCA9551_LED is not set ++# CONFIG_TEST_DRV is not set ++# CONFIG_TWL4030_LED is not set ++# CONFIG_WINBOND_W83627 is not set ++CONFIG_QFW=y ++CONFIG_QFW_MMIO=y ++# CONFIG_FS_LOADER is not set ++# CONFIG_SPL_FS_LOADER is not set ++ ++# ++# MMC Host controller Support ++# ++# CONFIG_MMC is not set ++# CONFIG_MMC_BROKEN_CD is not set ++# CONFIG_DM_MMC is not set ++# CONFIG_FSL_ESDHC is not set ++# CONFIG_FSL_ESDHC_IMX is not set ++ ++# ++# MTD Support ++# ++# CONFIG_MTD is not set ++# CONFIG_DM_MTD is not set ++# CONFIG_MTD_NOR_FLASH is not set ++# CONFIG_FLASH_CFI_DRIVER is not set ++# CONFIG_USE_SYS_MAX_FLASH_BANKS is not set ++# CONFIG_MTD_RAW_NAND is not set ++ ++# ++# SPI Flash Support ++# ++# CONFIG_SPI_FLASH is not set ++ ++# ++# UBI support ++# ++# CONFIG_UBI_SILENCE_MSG is not set ++# CONFIG_MTD_UBI is not set ++ ++# ++# Multiplexer drivers ++# ++# CONFIG_MULTIPLEXER is not set ++# CONFIG_BITBANGMII is not set ++# CONFIG_MV88E6352_SWITCH is not set ++# CONFIG_PHYLIB is not set ++# CONFIG_FSL_PFE is not set ++# CONFIG_BNXT_ETH is not set ++CONFIG_ETH=y ++CONFIG_DM_ETH=y ++# CONFIG_DM_ETH_PHY is not set ++CONFIG_NETDEVICES=y ++# CONFIG_PHY_GIGE is not set ++# CONFIG_ALTERA_TSE is not set ++# CONFIG_BCM_SF2_ETH is not set ++# CONFIG_BCMGENET is not set ++# CONFIG_CALXEDA_XGMAC is not set ++# CONFIG_DWC_ETH_QOS is not set ++CONFIG_E1000=y ++# CONFIG_E1000_SPI_GENERIC is not set ++# CONFIG_E1000_SPI is not set ++# CONFIG_CMD_E1000 is not set ++# CONFIG_EEPRO100 is not set ++# CONFIG_ETH_DESIGNWARE is not set ++# CONFIG_ETH_DESIGNWARE_MESON8B is not set ++# CONFIG_ETHOC is not set ++# CONFIG_FMAN_ENET is not set ++# CONFIG_FTMAC100 is not set ++# CONFIG_FTGMAC100 is not set ++# CONFIG_MCFFEC is not set ++# CONFIG_FSLDMAFEC is not set ++# CONFIG_KS8851_MLL is not set ++# CONFIG_MACB is not set ++# CONFIG_PCH_GBE is not set ++# CONFIG_RGMII is not set ++# CONFIG_MII is not set ++# CONFIG_PCNET is not set ++# CONFIG_QE_UEC is not set ++# CONFIG_RTL8139 is not set ++# CONFIG_RTL8169 is not set ++# CONFIG_SMC911X is not set ++# CONFIG_SUN7I_GMAC is not set ++# CONFIG_SUN4I_EMAC is not set ++# CONFIG_SUN8I_EMAC is not set ++# CONFIG_SH_ETHER is not set ++# CONFIG_DRIVER_TI_CPSW is not set ++# CONFIG_DRIVER_TI_EMAC is not set ++# CONFIG_DRIVER_TI_KEYSTONE_NET is not set ++# CONFIG_TULIP is not set ++# CONFIG_XILINX_AXIEMAC is not set ++# CONFIG_XILINX_EMACLITE is not set ++# CONFIG_ZYNQ_GEM is not set ++# CONFIG_SYS_DPAA_QBMAN is not set ++# CONFIG_TSEC_ENET is not set ++# CONFIG_MEDIATEK_ETH is not set ++# CONFIG_HIGMACV300_ETH is not set ++# CONFIG_NVME is not set ++# CONFIG_NVME_APPLE is not set ++# CONFIG_NVME_PCI is not set ++CONFIG_PCI=y ++# CONFIG_DM_PCI_COMPAT is not set ++CONFIG_PCI_PNP=y ++# CONFIG_PCI_REGION_MULTI_ENTRY is not set ++# CONFIG_PCI_SRIOV is not set ++# CONFIG_PCI_ARID is not set ++CONFIG_PCIE_ECAM_GENERIC=y ++# CONFIG_PCIE_ECAM_SYNQUACER is not set ++# CONFIG_PCI_PHYTIUM is not set ++# CONFIG_PCIE_FSL is not set ++# CONFIG_PCI_MPC85XX is not set ++# CONFIG_PCI_XILINX is not set ++# CONFIG_PCIE_LAYERSCAPE_RC is not set ++# CONFIG_PCIE_LAYERSCAPE_EP is not set ++# CONFIG_PCIE_LAYERSCAPE_GEN4 is not set ++# CONFIG_PCIE_INTEL_FPGA is not set ++# CONFIG_PCIE_IPROC is not set ++# CONFIG_PCI_KEYSTONE is not set ++ ++# ++# PCI Endpoint ++# ++# CONFIG_PCI_ENDPOINT is not set ++# CONFIG_X86_PCH7 is not set ++# CONFIG_X86_PCH9 is not set ++ ++# ++# PHY Subsystem ++# ++# CONFIG_PHY is not set ++# CONFIG_MIPI_DPHY_HELPERS is not set ++ ++# ++# Rockchip PHY driver ++# ++# CONFIG_MVEBU_COMPHY_SUPPORT is not set ++ ++# ++# Pin controllers ++# ++# CONFIG_PINCTRL is not set ++CONFIG_POWER=y ++# CONFIG_POWER_LEGACY is not set ++# CONFIG_SPL_POWER_LEGACY is not set ++# CONFIG_ACPI_PMC is not set ++# CONFIG_SPL_ACPI_PMC is not set ++# CONFIG_TPL_ACPI_PMC is not set ++ ++# ++# Power Domain Support ++# ++# CONFIG_POWER_DOMAIN is not set ++# CONFIG_DM_PMIC is not set ++# CONFIG_POWER_MC34VR500 is not set ++# CONFIG_DM_REGULATOR is not set ++# CONFIG_POWER_MT6323 is not set ++# CONFIG_DM_PWM is not set ++# CONFIG_PWM_IMX is not set ++# CONFIG_PWM_SANDBOX is not set ++# CONFIG_U_QE is not set ++# CONFIG_RAM is not set ++ ++# ++# Reboot Mode Support ++# ++# CONFIG_DM_REBOOT_MODE is not set ++ ++# ++# Remote Processor drivers ++# ++ ++# ++# Reset Controller Support ++# ++# CONFIG_DM_RESET is not set ++# CONFIG_RESET_SCMI is not set ++CONFIG_DM_RNG=y ++# CONFIG_RNG_MSM is not set ++# CONFIG_RNG_IPROC200 is not set ++ ++# ++# Real Time Clock ++# ++# CONFIG_DM_RTC is not set ++# CONFIG_RTC_ENABLE_32KHZ_OUTPUT is not set ++# CONFIG_RTC_PCF8563 is not set ++# CONFIG_RTC_PL031 is not set ++# CONFIG_RTC_S35392A is not set ++# CONFIG_RTC_MC146818 is not set ++# CONFIG_RTC_M41T62 is not set ++CONFIG_SCSI=y ++CONFIG_DM_SCSI=y ++CONFIG_SERIAL=y ++CONFIG_BAUDRATE=115200 ++CONFIG_REQUIRE_SERIAL_CONSOLE=y ++# CONFIG_SPECIFY_CONSOLE_INDEX is not set ++CONFIG_SERIAL_PRESENT=y ++CONFIG_DM_SERIAL=y ++# CONFIG_SERIAL_RX_BUFFER is not set ++# CONFIG_SERIAL_SEARCH_ALL is not set ++# CONFIG_SERIAL_PROBE_ALL is not set ++# CONFIG_ALTERA_JTAG_UART is not set ++# CONFIG_ALTERA_UART is not set ++# CONFIG_ARC_SERIAL is not set ++# CONFIG_ARM_DCC is not set ++# CONFIG_ATMEL_USART is not set ++# CONFIG_BCM6345_SERIAL is not set ++# CONFIG_COREBOOT_SERIAL is not set ++# CONFIG_CORTINA_UART is not set ++# CONFIG_FSL_LINFLEXUART is not set ++# CONFIG_FSL_LPUART is not set ++# CONFIG_MVEBU_A3700_UART is not set ++# CONFIG_MCFUART is not set ++# CONFIG_NULLDEV_SERIAL is not set ++# CONFIG_SYS_NS16550 is not set ++# CONFIG_NS16550_DYNAMIC is not set ++CONFIG_PL01X_SERIAL=y ++# CONFIG_XILINX_UARTLITE is not set ++# CONFIG_MSM_SERIAL is not set ++# CONFIG_MSM_GENI_SERIAL is not set ++# CONFIG_OMAP_SERIAL is not set ++# CONFIG_PXA_SERIAL is not set ++# CONFIG_SIFIVE_SERIAL is not set ++# CONFIG_ZYNQ_SERIAL is not set ++# CONFIG_MTK_SERIAL is not set ++# CONFIG_MT7620_SERIAL is not set ++# CONFIG_SMEM is not set ++ ++# ++# Sound support ++# ++# CONFIG_SOUND is not set ++# CONFIG_SOUND_MAX98357A is not set ++ ++# ++# SOC (System On Chip) specific Drivers ++# ++# CONFIG_SOC_DEVICE is not set ++# CONFIG_SOC_TI is not set ++# CONFIG_SPI is not set ++ ++# ++# SPMI support ++# ++# CONFIG_SPMI is not set ++# CONFIG_SYSINFO is not set ++ ++# ++# System reset device drivers ++# ++CONFIG_SYSRESET=y ++CONFIG_SYSRESET_CMD_RESET=y ++# CONFIG_POWEROFF_GPIO is not set ++# CONFIG_SYSRESET_GPIO is not set ++CONFIG_SYSRESET_PSCI=y ++# CONFIG_SYSRESET_SYSCON is not set ++# CONFIG_SYSRESET_WATCHDOG is not set ++# CONFIG_SYSRESET_RESETCTL is not set ++# CONFIG_SYSRESET_MPC83XX is not set ++# CONFIG_TEE is not set ++# CONFIG_DM_THERMAL is not set ++ ++# ++# Timer Support ++# ++# CONFIG_TIMER is not set ++ ++# ++# TPM support ++# ++# CONFIG_USB is not set ++ ++# ++# UFS Host Controller Support ++# ++# CONFIG_UFS is not set ++# CONFIG_TI_J721E_UFS is not set ++ ++# ++# Graphics support ++# ++# CONFIG_DM_VIDEO is not set ++# CONFIG_SYS_WHITE_ON_BLACK is not set ++# CONFIG_NO_FB_CLEAR is not set ++ ++# ++# TrueType Fonts ++# ++# CONFIG_VIDEO_VESA is not set ++# CONFIG_VIDEO_LCD_ANX9804 is not set ++# CONFIG_VIDEO_LCD_SSD2828 is not set ++# CONFIG_VIDEO_LCD_HITACHI_TX18D42VM is not set ++# CONFIG_VIDEO_MVEBU is not set ++# CONFIG_I2C_EDID is not set ++# CONFIG_DISPLAY is not set ++# CONFIG_ATMEL_HLCD is not set ++# CONFIG_AM335X_LCD is not set ++# CONFIG_VIDEO_TEGRA20 is not set ++# CONFIG_VIDEO_BRIDGE is not set ++# CONFIG_VIDEO is not set ++# CONFIG_LCD is not set ++# CONFIG_VIDEO_SIMPLE is not set ++# CONFIG_VIDEO_DT_SIMPLEFB is not set ++# CONFIG_OSD is not set ++# CONFIG_SPLASH_SCREEN is not set ++# CONFIG_VIDEO_VCXK is not set ++ ++# ++# VirtIO Drivers ++# ++CONFIG_VIRTIO=y ++CONFIG_VIRTIO_MMIO=y ++CONFIG_VIRTIO_PCI=y ++CONFIG_VIRTIO_NET=y ++CONFIG_VIRTIO_BLK=y ++CONFIG_VIRTIO_RNG=y ++ ++# ++# 1-Wire support ++# ++# CONFIG_W1 is not set ++ ++# ++# 1-wire EEPROM support ++# ++# CONFIG_W1_EEPROM is not set ++ ++# ++# Watchdog Timer Support ++# ++# CONFIG_WATCHDOG is not set ++CONFIG_WATCHDOG_TIMEOUT_MSECS=60000 ++# CONFIG_IMX_WATCHDOG is not set ++# CONFIG_ULP_WATCHDOG is not set ++# CONFIG_DESIGNWARE_WATCHDOG is not set ++# CONFIG_WDT is not set ++# CONFIG_PVBLOCK is not set ++# CONFIG_PHYS_TO_BUS is not set ++ ++# ++# File systems ++# ++# CONFIG_FS_BTRFS is not set ++# CONFIG_FS_CBFS is not set ++# CONFIG_SPL_FS_CBFS is not set ++CONFIG_FS_EXT4=y ++# CONFIG_EXT4_WRITE is not set ++CONFIG_FS_FAT=y ++CONFIG_FAT_WRITE=y ++CONFIG_FS_FAT_MAX_CLUSTSIZE=65536 ++# CONFIG_FS_JFFS2 is not set ++# CONFIG_UBIFS_SILENCE_MSG is not set ++# CONFIG_FS_CRAMFS is not set ++# CONFIG_YAFFS2 is not set ++# CONFIG_FS_SQUASHFS is not set ++ ++# ++# Library routines ++# ++# CONFIG_ADDR_MAP is not set ++# CONFIG_PHYSMEM is not set ++# CONFIG_BCH is not set ++# CONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED is not set ++CONFIG_CHARSET=y ++# CONFIG_DYNAMIC_CRC_TABLE is not set ++CONFIG_LIB_UUID=y ++CONFIG_PRINTF=y ++CONFIG_SPRINTF=y ++CONFIG_STRTO=y ++CONFIG_SYS_HZ=1000 ++# CONFIG_PANIC_HANG is not set ++CONFIG_REGEX=y ++CONFIG_LIB_RAND=y ++# CONFIG_LIB_HW_RAND is not set ++CONFIG_SUPPORT_ACPI=y ++# CONFIG_GENERATE_ACPI_TABLE is not set ++# CONFIG_SPL_TINY_MEMSET is not set ++# CONFIG_TPL_TINY_MEMSET is not set ++# CONFIG_BITREVERSE is not set ++# CONFIG_TRACE is not set ++# CONFIG_CIRCBUF is not set ++# CONFIG_CMD_DHRYSTONE is not set ++ ++# ++# Security support ++# ++# CONFIG_AES is not set ++# CONFIG_ECDSA is not set ++# CONFIG_RSA is not set ++# CONFIG_ASYMMETRIC_KEY_TYPE is not set ++# CONFIG_TPM is not set ++ ++# ++# Android Verified Boot ++# ++ ++# ++# Hashing Support ++# ++# CONFIG_BLAKE2 is not set ++CONFIG_SHA1=y ++CONFIG_SHA256=y ++# CONFIG_SHA512 is not set ++# CONFIG_SHA384 is not set ++# CONFIG_SHA_HW_ACCEL is not set ++CONFIG_MD5=y ++CONFIG_CRC32=y ++ ++# ++# Compression Support ++# ++CONFIG_LZ4=y ++# CONFIG_LZMA is not set ++# CONFIG_LZO is not set ++# CONFIG_GZIP is not set ++# CONFIG_ZLIB_UNCOMPRESS is not set ++# CONFIG_BZIP2 is not set ++CONFIG_ZLIB=y ++# CONFIG_ZSTD is not set ++# CONFIG_SPL_LZ4 is not set ++# CONFIG_SPL_LZMA is not set ++# CONFIG_SPL_LZO is not set ++# CONFIG_SPL_GZIP is not set ++# CONFIG_SPL_ZSTD is not set ++# CONFIG_ERRNO_STR is not set ++# CONFIG_HEXDUMP is not set ++# CONFIG_GETOPT is not set ++CONFIG_OF_LIBFDT=y ++CONFIG_OF_LIBFDT_ASSUME_MASK=0 ++# CONFIG_OF_LIBFDT_OVERLAY is not set ++# CONFIG_SPL_OF_LIBFDT is not set ++CONFIG_SPL_OF_LIBFDT_ASSUME_MASK=0xff ++# CONFIG_TPL_OF_LIBFDT is not set ++CONFIG_TPL_OF_LIBFDT_ASSUME_MASK=0xff ++ ++# ++# System tables ++# ++CONFIG_GENERATE_SMBIOS_TABLE=y ++# CONFIG_LIB_RATIONAL is not set ++# CONFIG_SMBIOS_PARSER is not set ++CONFIG_EFI_LOADER=y ++CONFIG_CMD_BOOTEFI_BOOTMGR=y ++CONFIG_EFI_VARIABLE_FILE_STORE=y ++# CONFIG_EFI_VARIABLES_PRESEED is not set ++CONFIG_EFI_VAR_BUF_SIZE=16384 ++# CONFIG_EFI_RUNTIME_UPDATE_CAPSULE is not set ++# CONFIG_EFI_CAPSULE_ON_DISK is not set ++CONFIG_EFI_DEVICE_PATH_TO_TEXT=y ++CONFIG_EFI_DEVICE_PATH_UTIL=y ++CONFIG_EFI_DT_FIXUP=y ++CONFIG_EFI_LOADER_HII=y ++CONFIG_EFI_UNICODE_COLLATION_PROTOCOL2=y ++CONFIG_EFI_UNICODE_CAPITALIZATION=y ++# CONFIG_EFI_LOADER_BOUNCE_BUFFER is not set ++CONFIG_EFI_PLATFORM_LANG_CODES="en-US" ++CONFIG_EFI_HAVE_RUNTIME_RESET=y ++CONFIG_EFI_RNG_PROTOCOL=y ++CONFIG_EFI_LOAD_FILE2_INITRD=y ++# CONFIG_OPTEE_LIB is not set ++# CONFIG_OPTEE_IMAGE is not set ++# CONFIG_BOOTM_OPTEE is not set ++# CONFIG_TEST_FDTDEC is not set ++CONFIG_LIB_ELF=y ++CONFIG_LMB=y ++CONFIG_LMB_USE_MAX_REGIONS=y ++CONFIG_LMB_MAX_REGIONS=8 ++# CONFIG_PHANDLE_CHECK_SEQ is not set ++# CONFIG_UNIT_TEST is not set ++# CONFIG_SPL_UNIT_TEST is not set ++ ++# ++# Tools options ++# ++CONFIG_MKIMAGE_DTC_PATH="dtc" ++CONFIG_TOOLS_CRC32=y ++CONFIG_TOOLS_LIBCRYPTO=y ++CONFIG_TOOLS_FIT=y ++CONFIG_TOOLS_FIT_FULL_CHECK=y ++CONFIG_TOOLS_FIT_PRINT=y ++CONFIG_TOOLS_FIT_RSASSA_PSS=y ++CONFIG_TOOLS_FIT_SIGNATURE=y ++CONFIG_TOOLS_FIT_SIGNATURE_MAX_SIZE=0x10000000 ++CONFIG_TOOLS_FIT_VERBOSE=y ++CONFIG_TOOLS_MD5=y ++CONFIG_TOOLS_OF_LIBFDT=y ++CONFIG_TOOLS_SHA1=y ++CONFIG_TOOLS_SHA256=y ++CONFIG_TOOLS_SHA384=y ++CONFIG_TOOLS_SHA512=y ++# CONFIG_TOOLS_MKEFICAPSULE is not set diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0020-config.h.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0020-config.h.patch new file mode 100644 index 0000000..12c9e61 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0020-config.h.patch @@ -0,0 +1,10 @@ +--- a/include/config.h ++++ b/include/config.h +@@ -0,0 +1,7 @@ ++/* Automatically generated - do not edit */ ++#define CONFIG_BOARDDIR board/emulation/qemu-arm ++#include ++#include ++#include ++#include ++#include diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0017-am335x_evm.h.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0021-am335x_evm.h.patch similarity index 96% rename from build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0017-am335x_evm.h.patch rename to build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0021-am335x_evm.h.patch index 2d54818..a92c196 100644 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0017-am335x_evm.h.patch +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0021-am335x_evm.h.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/include/configs/am335x_evm.h 2025-09-11 16:44:26.930033739 +0200 -+++ ./include/configs/am335x_evm.h 2025-09-07 09:29:44.733656375 +0200 +--- a/include/configs/am335x_evm.h ++++ b/include/configs/am335x_evm.h @@ -44,6 +44,20 @@ #define NANDARGS "" #endif diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0018-qemu-arm.h.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0022-qemu-arm.h.patch similarity index 67% rename from build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0018-qemu-arm.h.patch rename to build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0022-qemu-arm.h.patch index 906b41e..b051e04 100644 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0018-qemu-arm.h.patch +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0022-qemu-arm.h.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/include/configs/qemu-arm.h 2025-09-11 16:44:26.946034153 +0200 -+++ ./include/configs/qemu-arm.h 2025-09-07 09:29:44.733688605 +0200 +--- a/include/configs/qemu-arm.h ++++ b/include/configs/qemu-arm.h @@ -45,6 +45,8 @@ # define BOOT_TARGET_DHCP(func) #endif diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0019-rpi.h.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0023-rpi.h.patch similarity index 54% rename from build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0019-rpi.h.patch rename to build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0023-rpi.h.patch index 0a3f320..003b175 100644 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0019-rpi.h.patch +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0023-rpi.h.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/include/configs/rpi.h 2025-09-11 16:44:26.946034153 +0200 -+++ ./include/configs/rpi.h 2025-09-07 09:29:44.733675083 +0200 +--- a/include/configs/rpi.h ++++ b/include/configs/rpi.h @@ -36,9 +36,12 @@ CONFIG_SYS_SDRAM_SIZE - \ GENERATED_GBL_DATA_SIZE) @@ -22,14 +22,23 @@ #define ENV_MEM_LAYOUT_SETTINGS \ "fdt_high=" FDT_HIGH "\0" \ "initrd_high=" INITRD_HIGH "\0" \ -@@ -168,12 +173,21 @@ +@@ -168,12 +173,30 @@ #include +#endif /* 0 */ + ++/* ++ * Import uEnv.txt with an explicit format and length. Without them, "env ++ * import" scans from the load address for a double-NUL to guess the size, so ++ * it swallows whatever stale memory follows the file: on arm32 that yielded ++ * "input data size = 4447" for a 117-byte file and the import failed with ++ * errno 22. It only appeared to work on arm64 because the byte after the file ++ * happened to be NUL. fatload sets ${filesize}, so use it, and state -t rather ++ * than lean on the "defaulting to text format" warning. ++ */ +#define CONFIG_BOOTCOMMAND \ -+ "fatload mmc 0 0x02000000 uEnv.txt; env import 0x02000000; run start\0\0" \ ++ "fatload mmc 0 0x02000000 uEnv.txt; env import -t 0x02000000 ${filesize}; run start\0\0" \ + "bootdelay=0\0" + + diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0024-bootm.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0024-bootm.c.patch deleted file mode 100644 index 030f596..0000000 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0024-bootm.c.patch +++ /dev/null @@ -1,4 +0,0 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/tools/boot/bootm.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./tools/boot/bootm.c 2025-09-11 16:34:43.027924515 +0200 -@@ -0,0 +1 @@ -+#include <../boot/bootm.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0020-ti_armv7_common.h.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0024-ti_armv7_common.h.patch similarity index 99% rename from build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0020-ti_armv7_common.h.patch rename to build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0024-ti_armv7_common.h.patch index 3b0a6f9..186b18a 100644 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0020-ti_armv7_common.h.patch +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0024-ti_armv7_common.h.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/include/configs/ti_armv7_common.h 2025-09-11 16:44:26.950034257 +0200 -+++ ./include/configs/ti_armv7_common.h 2025-09-07 09:29:44.733709799 +0200 +--- a/include/configs/ti_armv7_common.h ++++ b/include/configs/ti_armv7_common.h @@ -96,6 +96,702 @@ /* Boot Argument Buffer Size */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0025-fdt_region.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0025-fdt_region.c.patch deleted file mode 100644 index 7e44c8a..0000000 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0025-fdt_region.c.patch +++ /dev/null @@ -1,4 +0,0 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/tools/boot/fdt_region.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./tools/boot/fdt_region.c 2025-09-11 16:34:43.027343942 +0200 -@@ -0,0 +1 @@ -+#include <../boot/fdt_region.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0021-ti_omap5_common.h.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0025-ti_omap5_common.h.patch similarity index 78% rename from build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0021-ti_omap5_common.h.patch rename to build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0025-ti_omap5_common.h.patch index dba1a70..592cdb4 100644 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0021-ti_omap5_common.h.patch +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0025-ti_omap5_common.h.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/include/configs/ti_omap5_common.h 2025-09-11 16:44:26.950034257 +0200 -+++ ./include/configs/ti_omap5_common.h 2025-09-07 09:29:44.733637144 +0200 +--- a/include/configs/ti_omap5_common.h ++++ b/include/configs/ti_omap5_common.h @@ -256,13 +256,14 @@ "if test $fdtfile = undefined; then " \ "echo WARNING: Could not determine device tree to use; fi; \0" diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0026-image.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0026-image.c.patch deleted file mode 100644 index 386d9b7..0000000 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0026-image.c.patch +++ /dev/null @@ -1,4 +0,0 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/tools/boot/image.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./tools/boot/image.c 2025-09-11 16:34:43.029149890 +0200 -@@ -0,0 +1 @@ -+#include <../boot/image.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0022-mmc.h.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0026-mmc.h.patch similarity index 94% rename from build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0022-mmc.h.patch rename to build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0026-mmc.h.patch index 017193c..9b60060 100644 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0022-mmc.h.patch +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0026-mmc.h.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/include/environment/ti/mmc.h 2025-09-11 16:44:26.967483707 +0200 -+++ ./include/environment/ti/mmc.h 2025-09-11 16:34:39.427910196 +0200 +--- a/include/environment/ti/mmc.h ++++ b/include/environment/ti/mmc.h @@ -11,20 +11,73 @@ #define DEFAULT_MMC_TI_ARGS \ "mmcdev=0\0" \ diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0023-Makefile.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0027-Makefile.patch similarity index 56% rename from build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0023-Makefile.patch rename to build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0027-Makefile.patch index be95375..e4f72d0 100644 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0023-Makefile.patch +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0027-Makefile.patch @@ -1,5 +1,5 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/Makefile 2025-09-11 16:44:26.419020533 +0200 -+++ ./Makefile 2025-09-11 16:34:39.187252108 +0200 +--- a/Makefile ++++ b/Makefile @@ -268,6 +268,8 @@ ######################################################################### diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0027-image-cipher.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0027-image-cipher.c.patch deleted file mode 100644 index f7df2e6..0000000 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0027-image-cipher.c.patch +++ /dev/null @@ -1,4 +0,0 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/tools/boot/image-cipher.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./tools/boot/image-cipher.c 2025-09-11 16:34:43.027343942 +0200 -@@ -0,0 +1 @@ -+#include <../boot/image-cipher.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0028-bootm.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0028-bootm.c.patch new file mode 100644 index 0000000..5ff63b6 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0028-bootm.c.patch @@ -0,0 +1,4 @@ +--- a/tools/boot/bootm.c ++++ b/tools/boot/bootm.c +@@ -0,0 +1 @@ ++#include <../boot/bootm.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0028-image-fit.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0028-image-fit.c.patch deleted file mode 100644 index 8a4e350..0000000 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0028-image-fit.c.patch +++ /dev/null @@ -1,4 +0,0 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/tools/boot/image-fit.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./tools/boot/image-fit.c 2025-09-11 16:34:43.026796376 +0200 -@@ -0,0 +1 @@ -+#include <../boot/image-fit.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0029-fdt_region.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0029-fdt_region.c.patch new file mode 100644 index 0000000..6bd4068 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0029-fdt_region.c.patch @@ -0,0 +1,4 @@ +--- a/tools/boot/fdt_region.c ++++ b/tools/boot/fdt_region.c +@@ -0,0 +1 @@ ++#include <../boot/fdt_region.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0029-image-fit-sig.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0029-image-fit-sig.c.patch deleted file mode 100644 index b4025fb..0000000 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0029-image-fit-sig.c.patch +++ /dev/null @@ -1,4 +0,0 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/tools/boot/image-fit-sig.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./tools/boot/image-fit-sig.c 2025-09-11 16:34:43.027233486 +0200 -@@ -0,0 +1 @@ -+#include <../boot/image-fit-sig.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0030-image-host.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0030-image-host.c.patch deleted file mode 100644 index 4ceca71..0000000 --- a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0030-image-host.c.patch +++ /dev/null @@ -1,4 +0,0 @@ ---- /home/rossierd/soo/git/infrabase/build/tmp/work/uboot-2022.04-r0/uboot-2022.04/tools/boot/image-host.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./tools/boot/image-host.c 2025-09-11 16:34:43.029561478 +0200 -@@ -0,0 +1 @@ -+#include <../boot/image-host.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0030-image.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0030-image.c.patch new file mode 100644 index 0000000..461c4aa --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0030-image.c.patch @@ -0,0 +1,4 @@ +--- a/tools/boot/image.c ++++ b/tools/boot/image.c +@@ -0,0 +1 @@ ++#include <../boot/image.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0031-image-cipher.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0031-image-cipher.c.patch new file mode 100644 index 0000000..21bddf9 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0031-image-cipher.c.patch @@ -0,0 +1,4 @@ +--- a/tools/boot/image-cipher.c ++++ b/tools/boot/image-cipher.c +@@ -0,0 +1 @@ ++#include <../boot/image-cipher.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0032-image-fit.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0032-image-fit.c.patch new file mode 100644 index 0000000..a54ce4f --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0032-image-fit.c.patch @@ -0,0 +1,4 @@ +--- a/tools/boot/image-fit.c ++++ b/tools/boot/image-fit.c +@@ -0,0 +1 @@ ++#include <../boot/image-fit.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0033-image-fit-sig.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0033-image-fit-sig.c.patch new file mode 100644 index 0000000..8f87683 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0033-image-fit-sig.c.patch @@ -0,0 +1,4 @@ +--- a/tools/boot/image-fit-sig.c ++++ b/tools/boot/image-fit-sig.c +@@ -0,0 +1 @@ ++#include <../boot/image-fit-sig.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0034-image-host.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0034-image-host.c.patch new file mode 100644 index 0000000..5639778 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0034-image-host.c.patch @@ -0,0 +1,4 @@ +--- a/tools/boot/image-host.c ++++ b/tools/boot/image-host.c +@@ -0,0 +1 @@ ++#include <../boot/image-host.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0035-hash.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0035-hash.c.patch new file mode 100644 index 0000000..96d751a --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0035-hash.c.patch @@ -0,0 +1,4 @@ +--- a/tools/common/hash.c ++++ b/tools/common/hash.c +@@ -0,0 +1 @@ ++#include <../common/hash.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0036-embedded.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0036-embedded.c.patch new file mode 100644 index 0000000..d096abf --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0036-embedded.c.patch @@ -0,0 +1,4 @@ +--- a/tools/env/embedded.c ++++ b/tools/env/embedded.c +@@ -0,0 +1 @@ ++#include <../env/embedded.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0037-aes-decrypt.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0037-aes-decrypt.c.patch new file mode 100644 index 0000000..51e7f91 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0037-aes-decrypt.c.patch @@ -0,0 +1,4 @@ +--- a/tools/lib/aes/aes-decrypt.c ++++ b/tools/lib/aes/aes-decrypt.c +@@ -0,0 +1 @@ ++#include <../lib/aes/aes-decrypt.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0038-aes-encrypt.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0038-aes-encrypt.c.patch new file mode 100644 index 0000000..b69eba8 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0038-aes-encrypt.c.patch @@ -0,0 +1,4 @@ +--- a/tools/lib/aes/aes-encrypt.c ++++ b/tools/lib/aes/aes-encrypt.c +@@ -0,0 +1 @@ ++#include <../lib/aes/aes-encrypt.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0039-crc16.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0039-crc16.c.patch new file mode 100644 index 0000000..946bedd --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0039-crc16.c.patch @@ -0,0 +1,4 @@ +--- a/tools/lib/crc16.c ++++ b/tools/lib/crc16.c +@@ -0,0 +1 @@ ++#include <../lib/crc16.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0040-crc32.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0040-crc32.c.patch new file mode 100644 index 0000000..050651c --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0040-crc32.c.patch @@ -0,0 +1,4 @@ +--- a/tools/lib/crc32.c ++++ b/tools/lib/crc32.c +@@ -0,0 +1 @@ ++#include <../lib/crc32.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0041-crc8.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0041-crc8.c.patch new file mode 100644 index 0000000..7d2e90d --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0041-crc8.c.patch @@ -0,0 +1,4 @@ +--- a/tools/lib/crc8.c ++++ b/tools/lib/crc8.c +@@ -0,0 +1 @@ ++#include <../lib/crc8.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0042-ecdsa-libcrypto.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0042-ecdsa-libcrypto.c.patch new file mode 100644 index 0000000..8b2cbe5 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0042-ecdsa-libcrypto.c.patch @@ -0,0 +1,4 @@ +--- a/tools/lib/ecdsa/ecdsa-libcrypto.c ++++ b/tools/lib/ecdsa/ecdsa-libcrypto.c +@@ -0,0 +1 @@ ++#include <../lib/ecdsa/ecdsa-libcrypto.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0043-fdtdec.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0043-fdtdec.c.patch new file mode 100644 index 0000000..b20282d --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0043-fdtdec.c.patch @@ -0,0 +1,4 @@ +--- a/tools/lib/fdtdec.c ++++ b/tools/lib/fdtdec.c +@@ -0,0 +1 @@ ++#include <../lib/fdtdec.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0044-fdtdec_common.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0044-fdtdec_common.c.patch new file mode 100644 index 0000000..456ba4c --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0044-fdtdec_common.c.patch @@ -0,0 +1,4 @@ +--- a/tools/lib/fdtdec_common.c ++++ b/tools/lib/fdtdec_common.c +@@ -0,0 +1 @@ ++#include <../lib/fdtdec_common.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0045-fdt-libcrypto.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0045-fdt-libcrypto.c.patch new file mode 100644 index 0000000..d359d16 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0045-fdt-libcrypto.c.patch @@ -0,0 +1,4 @@ +--- a/tools/lib/fdt-libcrypto.c ++++ b/tools/lib/fdt-libcrypto.c +@@ -0,0 +1 @@ ++#include <../lib/fdt-libcrypto.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0046-hash-checksum.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0046-hash-checksum.c.patch new file mode 100644 index 0000000..a9e1230 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0046-hash-checksum.c.patch @@ -0,0 +1,4 @@ +--- a/tools/lib/hash-checksum.c ++++ b/tools/lib/hash-checksum.c +@@ -0,0 +1 @@ ++#include <../lib/hash-checksum.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0047-md5.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0047-md5.c.patch new file mode 100644 index 0000000..4c1af13 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0047-md5.c.patch @@ -0,0 +1,4 @@ +--- a/tools/lib/md5.c ++++ b/tools/lib/md5.c +@@ -0,0 +1 @@ ++#include <../lib/md5.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0048-rc4.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0048-rc4.c.patch new file mode 100644 index 0000000..9b4a735 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0048-rc4.c.patch @@ -0,0 +1,4 @@ +--- a/tools/lib/rc4.c ++++ b/tools/lib/rc4.c +@@ -0,0 +1 @@ ++#include <../lib/rc4.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0049-rsa-mod-exp.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0049-rsa-mod-exp.c.patch new file mode 100644 index 0000000..ed65584 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0049-rsa-mod-exp.c.patch @@ -0,0 +1,4 @@ +--- a/tools/lib/rsa/rsa-mod-exp.c ++++ b/tools/lib/rsa/rsa-mod-exp.c +@@ -0,0 +1 @@ ++#include <../lib/rsa/rsa-mod-exp.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0050-rsa-sign.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0050-rsa-sign.c.patch new file mode 100644 index 0000000..b121713 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0050-rsa-sign.c.patch @@ -0,0 +1,4 @@ +--- a/tools/lib/rsa/rsa-sign.c ++++ b/tools/lib/rsa/rsa-sign.c +@@ -0,0 +1 @@ ++#include <../lib/rsa/rsa-sign.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0051-rsa-verify.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0051-rsa-verify.c.patch new file mode 100644 index 0000000..79c6734 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0051-rsa-verify.c.patch @@ -0,0 +1,4 @@ +--- a/tools/lib/rsa/rsa-verify.c ++++ b/tools/lib/rsa/rsa-verify.c +@@ -0,0 +1 @@ ++#include <../lib/rsa/rsa-verify.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0052-sha1.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0052-sha1.c.patch new file mode 100644 index 0000000..e21ff7c --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0052-sha1.c.patch @@ -0,0 +1,4 @@ +--- a/tools/lib/sha1.c ++++ b/tools/lib/sha1.c +@@ -0,0 +1 @@ ++#include <../lib/sha1.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0053-sha256.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0053-sha256.c.patch new file mode 100644 index 0000000..d055f2d --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0053-sha256.c.patch @@ -0,0 +1,4 @@ +--- a/tools/lib/sha256.c ++++ b/tools/lib/sha256.c +@@ -0,0 +1 @@ ++#include <../lib/sha256.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0054-sha512.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0054-sha512.c.patch new file mode 100644 index 0000000..0d7e156 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2022.04-r0/0054-sha512.c.patch @@ -0,0 +1,4 @@ +--- a/tools/lib/sha512.c ++++ b/tools/lib/sha512.c +@@ -0,0 +1 @@ ++#include <../lib/sha512.c> diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0-patches.inc b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0-patches.inc new file mode 100644 index 0000000..7362e2b --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0-patches.inc @@ -0,0 +1,47 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + +SRC_URI += "\ + file://0025-verdin-imx8mm_defconfig.patch \ + file://0024-toradex-smarc-imx8mp_defconfig.patch \ + file://0020-lpddr4_timing.c.patch \ + file://0005-soc.c.patch \ + file://0016-Makefile.patch \ + file://0014-lpddr4_timing.h.patch \ + file://0022-apalis_imx6_defconfig.patch \ + file://0009-tdx-cfg-block.h.patch \ + file://0026-verdin-imx8mp_defconfig.patch \ + file://0012-Kconfig.patch \ + file://0021-verdin-imx8mm.c.patch \ + file://0030-imx8mp-verdin.dtsi.patch \ + file://0006-apalis_imx6.c.patch \ + file://0017-smarc-imx8mp.c.patch \ + file://0013-lpddr4_timing.c.patch \ + file://0032-verdin-imx8mm.h.patch \ + file://0010-tdx-common.c.patch \ + file://0031-toradex-smarc-imx8mp.h.patch \ + file://0029-imx8mm-verdin.dtsi.patch \ + file://0002-imx8mp-toradex-smarc-dev-u-boot.dtsi.patch \ + file://0027-index.rst.patch \ + file://0004-Kconfig.patch \ + file://0023-colibri_imx6_defconfig.patch \ + file://0007-colibri_imx6.c.patch \ + file://0008-tdx-cfg-block.c.patch \ + file://0001-imx8mp-toradex-smarc-dev.dts.patch \ + file://0015-MAINTAINERS.patch \ + file://0019-spl.c.patch \ + file://0028-smarc-imx8mp.rst.patch \ + file://0003-imx8mp-toradex-smarc.dtsi.patch \ + file://0011-imximage.cfg.patch \ + file://0018-smarc-imx8mp.env.patch \ + file://0033-image-board.c.patch \ + file://0034-verdin-imx8mp.h.patch \ + file://0035-verdin-imx8mp_defconfig.patch \ + file://0036-imx8mp-u-boot.dtsi.patch \ + file://0037-verdin-imx8mp.c.patch \ + file://0038-soc.c.patch \ + file://0070-Kconfig.patch \ + file://0071-Makefile.patch \ + file://0072-verdin-imx8mp_defconfig.patch \ + file://0073-guest_boot.c.patch \ +" \ No newline at end of file diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0001-imx8mp-toradex-smarc-dev.dts.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0001-imx8mp-toradex-smarc-dev.dts.patch new file mode 100644 index 0000000..e7dcddf --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0001-imx8mp-toradex-smarc-dev.dts.patch @@ -0,0 +1,254 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/arch/arm/dts/imx8mp-toradex-smarc-dev.dts 1970-01-01 01:00:00.000000000 +0100 ++++ ./arch/arm/dts/imx8mp-toradex-smarc-dev.dts 2025-11-21 14:54:55.135231501 +0100 +@@ -0,0 +1,251 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++/* Copyright (C) 2024 Toradex */ ++ ++/dts-v1/; ++ ++#include "imx8mp-toradex-smarc.dtsi" ++ ++/ { ++ model = "Toradex SMARC iMX8M Plus on Toradex SMARC Development Board"; ++ compatible = "toradex,smarc-imx8mp-dev", ++ "toradex,smarc-imx8mp", ++ "fsl,imx8mp"; ++ ++ reg_carrier_1p8v: regulator-carrier-1p8v { ++ compatible = "regulator-fixed"; ++ regulator-max-microvolt = <1800000>; ++ regulator-min-microvolt = <1800000>; ++ regulator-name = "On-carrier 1V8"; ++ }; ++ ++ sound { ++ compatible = "simple-audio-card"; ++ simple-audio-card,bitclock-master = <&codec_dai>; ++ simple-audio-card,format = "i2s"; ++ simple-audio-card,frame-master = <&codec_dai>; ++ simple-audio-card,mclk-fs = <256>; ++ simple-audio-card,name = "tdx-smarc-wm8904"; ++ simple-audio-card,routing = ++ "Headphone Jack", "HPOUTL", ++ "Headphone Jack", "HPOUTR", ++ "IN2L", "Line In Jack", ++ "IN2R", "Line In Jack", ++ "Microphone Jack", "MICBIAS", ++ "IN1L", "Microphone Jack"; ++ simple-audio-card,widgets = ++ "Microphone", "Microphone Jack", ++ "Headphone", "Headphone Jack", ++ "Line", "Line In Jack"; ++ ++ codec_dai: simple-audio-card,codec { ++ clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SAI1_MCLK1>; ++ sound-dai = <&wm8904_1a>; ++ }; ++ ++ simple-audio-card,cpu { ++ sound-dai = <&sai1>; ++ }; ++ }; ++}; ++ ++/* SMARC SPI0 */ ++&ecspi1 { ++ status = "okay"; ++}; ++ ++/* SMARC GBE0 */ ++&eqos { ++ status = "okay"; ++}; ++ ++/* SMARC GBE1 */ ++&fec { ++ status = "okay"; ++}; ++ ++/* SMARC CAN1 */ ++&flexcan1 { ++ status = "okay"; ++}; ++ ++/* SMARC CAN0 */ ++&flexcan2 { ++ status = "okay"; ++}; ++ ++&gpio1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_gpio7>, ++ <&pinctrl_gpio8>, ++ <&pinctrl_gpio9>, ++ <&pinctrl_gpio10>, ++ <&pinctrl_gpio11>, ++ <&pinctrl_gpio12>, ++ <&pinctrl_gpio13>; ++}; ++ ++&gpio3 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_lvds_dsi_sel>; ++}; ++ ++&gpio4 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_gpio4>, <&pinctrl_gpio6>; ++}; ++ ++/* SMARC I2C_LCD */ ++&i2c2 { ++ status = "okay"; ++ ++ i2c-mux@70 { ++ compatible = "nxp,pca9543"; ++ reg = <0x70>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ ++ /* I2C on DSI Connector Pins 4/6 */ ++ i2c_dsi_0: i2c@0 { ++ reg = <0>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ }; ++ ++ /* I2C on DSI Connector Pins 52/54 */ ++ i2c_dsi_1: i2c@1 { ++ reg = <1>; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ }; ++ }; ++}; ++ ++/* SMARC I2C_CAM0 */ ++&i2c3 { ++ status = "okay"; ++}; ++ ++/* SMARC I2C_GP */ ++&i2c4 { ++ /* Audio Codec */ ++ wm8904_1a: audio-codec@1a { ++ compatible = "wlf,wm8904"; ++ reg = <0x1a>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_sai1>, <&pinctrl_sai1_mclk>; ++ #sound-dai-cells = <0>; ++ clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SAI1_MCLK1>; ++ clock-names = "mclk"; ++ AVDD-supply = <®_carrier_1p8v>; ++ CPVDD-supply = <®_carrier_1p8v>; ++ DBVDD-supply = <®_carrier_1p8v>; ++ DCVDD-supply = <®_carrier_1p8v>; ++ MICVDD-supply = <®_carrier_1p8v>; ++ }; ++ ++ /* On-Carrier Temperature Sensor */ ++ temperature-sensor@4f { ++ compatible = "ti,tmp1075"; ++ reg = <0x4f>; ++ }; ++ ++ /* On-Carrier EEPROM */ ++ eeprom@57 { ++ compatible = "st,24c02"; ++ reg = <0x57>; ++ pagesize = <16>; ++ }; ++}; ++ ++/* SMARC I2C_CAM1 */ ++&i2c5 { ++ status = "okay"; ++}; ++ ++/* SMARC I2C_PM */ ++&i2c6 { ++ clock-frequency = <100000>; ++ status = "okay"; ++ ++ /* Fan controller */ ++ fan@18 { ++ compatible = "ti,amc6821"; ++ reg = <0x18>; ++ }; ++ ++ /* Current measurement into module VDD */ ++ hwmon@40 { ++ compatible = "ti,ina226"; ++ reg = <0x40>; ++ shunt-resistor = <5000>; ++ }; ++}; ++ ++/* SMARC I2S0 */ ++&sai1 { ++ assigned-clocks = <&clk IMX8MP_CLK_SAI1>; ++ assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>; ++ assigned-clock-rates = <24576000>; ++ fsl,sai-mclk-direction-output; ++ status = "okay"; ++}; ++ ++/* SMARC PCIE_A, M2 Key B */ ++&pcie { ++ status = "okay"; ++}; ++ ++&pcie_phy { ++ status = "okay"; ++}; ++ ++/* SMARC LCD1_BKLT_PWM */ ++&pwm1 { ++ status = "okay"; ++}; ++ ++/* SMARC LCD0_BKLT_PWM */ ++&pwm2 { ++ status = "okay"; ++}; ++ ++/* SMARC SER0, RS485. Optional M.2 KEY E */ ++&uart1 { ++ linux,rs485-enabled-at-boot-time; ++ rs485-rts-active-low; ++ rs485-rx-during-tx; ++ status = "okay"; ++}; ++ ++/* SMARC SER2 */ ++&uart2 { ++ status = "okay"; ++}; ++ ++/* SMARC SER1, used as the Linux Console */ ++&uart4 { ++ status = "okay"; ++}; ++ ++/* SMARC USB0 */ ++&usb3_0 { ++ status = "okay"; ++}; ++ ++/* SMARC USB1..4 */ ++&usb3_1 { ++ status = "okay"; ++}; ++ ++&usb3_phy0 { ++ status = "okay"; ++}; ++ ++&usb3_phy1 { ++ status = "okay"; ++}; ++ ++/* SMARC SDIO */ ++&usdhc2 { ++ status = "okay"; ++}; diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0002-imx8mp-toradex-smarc-dev-u-boot.dtsi.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0002-imx8mp-toradex-smarc-dev-u-boot.dtsi.patch new file mode 100644 index 0000000..f696cc5 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0002-imx8mp-toradex-smarc-dev-u-boot.dtsi.patch @@ -0,0 +1,83 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/arch/arm/dts/imx8mp-toradex-smarc-dev-u-boot.dtsi 1970-01-01 01:00:00.000000000 +0100 ++++ ./arch/arm/dts/imx8mp-toradex-smarc-dev-u-boot.dtsi 2025-11-21 14:54:55.135216347 +0100 +@@ -0,0 +1,80 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++/* Copyright (C) 2024 Toradex */ ++ ++#include "imx8mp-u-boot.dtsi" ++ ++/ { ++ sysinfo { ++ compatible = "toradex,sysinfo"; ++ }; ++}; ++ ++&gpio2 { ++ bt_uart_gpio { ++ gpio-hog; ++ gpios = <9 GPIO_ACTIVE_HIGH>; ++ input; ++ line-name = "BT_UART_RXD_GPIO"; ++ }; ++}; ++ ++&gpio3 { ++ wifi_en_gpio { ++ gpio-hog; ++ gpios = <14 GPIO_ACTIVE_HIGH>; ++ output-high; ++ line-name = "CTRL_EN_WIFI"; ++ }; ++}; ++ ++&gpio1 { ++ bootph-pre-ram; ++}; ++ ++&gpio5 { ++ bootph-pre-ram; ++}; ++ ++&i2c1 { ++ bootph-pre-ram; ++}; ++ ++&pca9450 { ++ bootph-pre-ram; ++ ++ regulators { ++ bootph-pre-ram; ++ }; ++}; ++ ++&pinctrl_i2c1 { ++ bootph-pre-ram; ++}; ++ ++&pinctrl_i2c1_gpio { ++ bootph-pre-ram; ++}; ++ ++&pinctrl_pmic { ++ bootph-pre-ram; ++}; ++ ++&pinctrl_uart4 { ++ bootph-pre-ram; ++}; ++ ++&uart3 { ++ status = "disabled"; ++}; ++ ++&uart4 { ++ bootph-pre-ram; ++}; ++ ++&usdhc1 { ++ status = "disabled"; ++}; ++ ++&usdhc3 { ++ bootph-pre-ram; ++}; diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0003-imx8mp-toradex-smarc.dtsi.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0003-imx8mp-toradex-smarc.dtsi.patch new file mode 100644 index 0000000..d27cadc --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0003-imx8mp-toradex-smarc.dtsi.patch @@ -0,0 +1,1277 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/arch/arm/dts/imx8mp-toradex-smarc.dtsi 1970-01-01 01:00:00.000000000 +0100 ++++ ./arch/arm/dts/imx8mp-toradex-smarc.dtsi 2025-11-21 14:54:55.135247992 +0100 +@@ -0,0 +1,1274 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later OR MIT ++/* Copyright (C) 2024 Toradex */ ++ ++#include ++#include ++#include "imx8mp.dtsi" ++ ++/ { ++ aliases { ++ can0 = &flexcan2; ++ can1 = &flexcan1; ++ ethernet0 = &eqos; ++ ethernet1 = &fec; ++ mmc0 = &usdhc3; ++ mmc1 = &usdhc2; ++ mmc2 = &usdhc1; ++ rtc0 = &rtc_i2c; ++ rtc1 = &snvs_rtc; ++ serial0 = &uart1; ++ serial1 = &uart4; ++ serial2 = &uart2; ++ serial3 = &uart3; ++ }; ++ ++ chosen { ++ stdout-path = &uart4; ++ }; ++ ++ connector { ++ compatible = "gpio-usb-b-connector", "usb-b-connector"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_usb0_id>; ++ id-gpios = <&gpio5 2 GPIO_ACTIVE_HIGH>; ++ label = "USB0"; ++ self-powered; ++ type = "micro"; ++ vbus-supply = <®_usb0_vbus>; ++ ++ port { ++ usb_dr_connector: endpoint { ++ remote-endpoint = <&usb3_0_dwc>; ++ }; ++ }; ++ }; ++ ++ gpio-keys { ++ compatible = "gpio-keys"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_sleep>; ++ ++ key-sleep { ++ debounce-interval = <10>; ++ gpios = <&gpio3 1 GPIO_ACTIVE_LOW>; ++ label = "SMARC_SLEEP#"; ++ wakeup-source; ++ linux,code = ; ++ }; ++ }; ++ ++ reg_usb0_vbus: regulator-usb0-vbus { ++ compatible = "regulator-fixed"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_usb0_en_oc>; ++ gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; ++ enable-active-high; ++ regulator-name = "USB0_EN_OC#"; ++ }; ++ ++ reg_usb1_vbus: regulator-usb1-vbus { ++ compatible = "regulator-fixed"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_usb1_en_oc>; ++ gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; ++ enable-active-high; ++ regulator-name = "USB2_EN_OC#"; ++ }; ++ ++ reg_usdhc2_vmmc: regulator-usdhc2-vmmc { ++ compatible = "regulator-fixed"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_usdhc2_pwr_en>; ++ enable-active-high; ++ gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>; ++ off-on-delay-us = <100000>; ++ regulator-max-microvolt = <3300000>; ++ regulator-min-microvolt = <3300000>; ++ regulator-name = "3V3_SD"; ++ startup-delay-us = <20000>; ++ }; ++ ++ reg_usdhc2_vqmmc: regulator-usdhc2-vqmmc { ++ compatible = "regulator-gpio"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_usdhc2_vsel>; ++ gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>; ++ regulator-max-microvolt = <3300000>; ++ regulator-min-microvolt = <1800000>; ++ states = <1800000 0x1>, ++ <3300000 0x0>; ++ regulator-name = "PMIC_USDHC_VSELECT"; ++ vin-supply = <®_sd_3v3_1v8>; ++ }; ++ ++ reg_wifi_en: regulator-wifi-en { ++ compatible = "regulator-fixed"; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_wifi_pwr_en>; ++ gpio = <&gpio3 14 GPIO_ACTIVE_HIGH>; ++ enable-active-high; ++ regulator-max-microvolt = <3300000>; ++ regulator-min-microvolt = <3300000>; ++ regulator-name = "CTRL_EN_WIFI"; ++ startup-delay-us = <2000>; ++ }; ++}; ++ ++&A53_0 { ++ cpu-supply = <®_vdd_arm>; ++}; ++ ++&A53_1 { ++ cpu-supply = <®_vdd_arm>; ++}; ++ ++&A53_2 { ++ cpu-supply = <®_vdd_arm>; ++}; ++ ++&A53_3 { ++ cpu-supply = <®_vdd_arm>; ++}; ++ ++&dsp_reserved { ++ status = "disabled"; ++}; ++ ++/* SMARC SPI0 */ ++&ecspi1 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_ecspi1>; ++ cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>, <&gpio4 28 GPIO_ACTIVE_LOW>; ++}; ++ ++/* SMARC SPI1 */ ++&ecspi2 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_ecspi2>, <&pinctrl_tpm_cs>; ++ cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>, ++ <&gpio4 3 GPIO_ACTIVE_LOW>, ++ <&gpio3 6 GPIO_ACTIVE_LOW>; ++ status = "okay"; ++ ++ tpm@2 { ++ compatible = "infineon,slb9670", "tcg,tpm_tis-spi"; ++ reg = <2>; ++ spi-max-frequency = <18500000>; ++ }; ++}; ++ ++/* SMARC GBE0 */ ++&eqos { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_eqos>, ++ <&pinctrl_eth_mdio>, ++ <&pinctrl_eqos_1588_event>; ++ phy-handle = <&eqos_phy>; ++ phy-mode = "rgmii-id"; ++ snps,force_thresh_dma_mode; ++ snps,mtl-rx-config = <&mtl_rx_setup>; ++ snps,mtl-tx-config = <&mtl_tx_setup>; ++ ++ mdio: mdio { ++ compatible = "snps,dwmac-mdio"; ++ #address-cells = <1>; ++ #size-cells = <0>; ++ }; ++ ++ mtl_rx_setup: rx-queues-config { ++ snps,rx-queues-to-use = <5>; ++ ++ queue0 { ++ snps,dcb-algorithm; ++ snps,priority = <0x1>; ++ snps,map-to-dma-channel = <0>; ++ }; ++ ++ queue1 { ++ snps,dcb-algorithm; ++ snps,priority = <0x2>; ++ snps,map-to-dma-channel = <1>; ++ }; ++ ++ queue2 { ++ snps,dcb-algorithm; ++ snps,priority = <0x4>; ++ snps,map-to-dma-channel = <2>; ++ }; ++ ++ queue3 { ++ snps,dcb-algorithm; ++ snps,priority = <0x8>; ++ snps,map-to-dma-channel = <3>; ++ }; ++ ++ queue4 { ++ snps,dcb-algorithm; ++ snps,priority = <0xf0>; ++ snps,map-to-dma-channel = <4>; ++ }; ++ }; ++ ++ mtl_tx_setup: tx-queues-config { ++ snps,tx-queues-to-use = <5>; ++ ++ queue0 { ++ snps,dcb-algorithm; ++ snps,priority = <0x1>; ++ }; ++ ++ queue1 { ++ snps,dcb-algorithm; ++ snps,priority = <0x2>; ++ }; ++ ++ queue2 { ++ snps,dcb-algorithm; ++ snps,priority = <0x4>; ++ }; ++ ++ queue3 { ++ snps,dcb-algorithm; ++ snps,priority = <0x8>; ++ }; ++ ++ queue4 { ++ snps,dcb-algorithm; ++ snps,priority = <0xf0>; ++ }; ++ }; ++}; ++ ++/* SMARC GBE1 */ ++&fec { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_fec>, <&pinctrl_fec_1588_event>; ++ phy-handle = <&fec_phy>; ++ phy-mode = "rgmii-id"; ++ fsl,magic-packet; ++}; ++ ++/* SMARC CAN1 */ ++&flexcan1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_flexcan1>; ++}; ++ ++/* SMARC CAN0 */ ++&flexcan2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_flexcan2>; ++}; ++ ++&gpio1 { ++ gpio-line-names = "SMARC_GPIO7", /* 0 */ ++ "SMARC_GPIO8", ++ "", ++ "PMIC_INT#", ++ "PMIC_USDHC_VSELECT", ++ "SMARC_GPIO9", ++ "SMARC_GPIO10", ++ "SMARC_GPIO11", ++ "SMARC_GPIO12", ++ "", ++ "SMARC_GPIO5", /* 10 */ ++ "", ++ "SMARC_USB0_EN_OC#", ++ "SMARC_GPIO13", ++ "SMARC_USB2_EN_OC#"; ++}; ++ ++&gpio2 { ++ gpio-line-names = "", /* 0 */ ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", /* 10 */ ++ "", ++ "SMARC_SDIO_CD#", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "SMARC_SDIO_PWR_EN", ++ "SMARC_SDIO_WP"; /* 20 */ ++}; ++ ++&gpio3 { ++ gpio-line-names = "ETH_0_INT#", /* 0 */ ++ "SLEEP#", ++ "", ++ "", ++ "", ++ "", ++ "TPM_CS#", ++ "LVDS_DSI_SEL", ++ "MCU_INT#", ++ "GPIO_EX_INT#", ++ "", /* 10 */ ++ "", ++ "", ++ "", ++ "", ++ "", ++ "SMARC_SMB_ALERT#", ++ "", ++ "", ++ "", ++ "SMARC_I2C_PM_DAT", /* 20 */ ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "SMARC_I2C_PM_CK"; ++ ++ lvds_dsi_mux_hog: lvds-dsi-mux-hog { ++ gpio-hog; ++ gpios = <7 GPIO_ACTIVE_HIGH>; ++ line-name = "LVDS_DSI_SEL"; ++ /* LVDS_DSI_SEL as DSI */ ++ output-low; ++ }; ++}; ++ ++&gpio4 { ++ gpio-line-names = "SMARC_PCIE_WAKE#", /* 0 */ ++ "", ++ "", ++ "SMARC_SPI1_CS1#", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", /* 10 */ ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "SMARC_GPIO4", ++ "SMARC_PCIE_A_RST#", ++ "", /* 20 */ ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "", ++ "SMARC_SPI0_CS1#", ++ "SMARC_GPIO6"; ++}; ++ ++&gpio5 { ++ gpio-line-names = "", /* 0 */ ++ "", ++ "SMARC_USB0_OTG_ID", ++ "SMARC_I2C_CAM1_CK", ++ "SMARC_I2C_CAM1_DAT", ++ "", ++ "", ++ "", ++ "", ++ "SMARC_SPI0_CS0#", ++ "", /* 10 */ ++ "", ++ "", ++ "SMARC_SPI1_CS0#", ++ "CTRL_I2C_SCL", ++ "CTRL_I2C_SDA", ++ "SMARC_I2C_LCD_CK", ++ "SMARC_I2C_LCD_DAT", ++ "SMARC_I2C_CAM0_CK", ++ "SMARC_I2C_CAM0_DAT", ++ "SMARC_I2C_GP_CK", /* 20 */ ++ "SMARC_I2C_GP_DAT"; ++}; ++ ++/* On-module I2C */ ++&i2c1 { ++ pinctrl-names = "default", "gpio"; ++ pinctrl-0 = <&pinctrl_i2c1>; ++ pinctrl-1 = <&pinctrl_i2c1_gpio>; ++ clock-frequency = <400000>; ++ scl-gpios = <&gpio5 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; ++ sda-gpios = <&gpio5 15 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; ++ single-master; ++ status = "okay"; ++ ++ som_gpio_expander: gpio-expander@21 { ++ compatible = "nxp,pcal6408"; ++ reg = <0x21>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_pcal6408>; ++ #interrupt-cells = <2>; ++ interrupt-controller; ++ interrupt-parent = <&gpio3>; ++ interrupts = <9 IRQ_TYPE_LEVEL_LOW>; ++ #gpio-cells = <2>; ++ gpio-controller; ++ gpio-line-names = ++ "SMARC_GPIO0", ++ "SMARC_GPIO1", ++ "SMARC_GPIO2", ++ "SMARC_GPIO3", ++ "SMARC_LCD0_VDD_EN", ++ "SMARC_LCD0_BKLT_EN", ++ "SMARC_LCD1_VDD_EN", ++ "SMARC_LCD1_BKLT_EN"; ++ }; ++ ++ pca9450: pmic@25 { ++ compatible = "nxp,pca9450c"; ++ reg = <0x25>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_pmic>; ++ interrupt-parent = <&gpio1>; ++ interrupts = <3 IRQ_TYPE_LEVEL_LOW>; ++ ++ regulators { ++ BUCK1 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-max-microvolt = <1000000>; ++ regulator-min-microvolt = <805000>; ++ regulator-name = "+VDD_SOC (PMIC BUCK1)"; ++ regulator-ramp-delay = <3125>; ++ }; ++ ++ reg_vdd_arm: BUCK2 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-max-microvolt = <1000000>; ++ regulator-min-microvolt = <805000>; ++ regulator-name = "+VDD_ARM (PMIC BUCK2)"; ++ regulator-ramp-delay = <3125>; ++ nxp,dvs-run-voltage = <950000>; ++ nxp,dvs-standby-voltage = <850000>; ++ }; ++ ++ reg_3v3: BUCK4 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-max-microvolt = <3300000>; ++ regulator-min-microvolt = <3300000>; ++ regulator-name = "+V3.3 (PMIC BUCK4)"; ++ }; ++ ++ reg_1v8: BUCK5 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-max-microvolt = <1800000>; ++ regulator-min-microvolt = <1800000>; ++ regulator-name = "+V1.8 (PMIC BUCK5)"; ++ }; ++ ++ BUCK6 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-max-microvolt = <1155000>; ++ regulator-min-microvolt = <1045000>; ++ regulator-name = "+VDD_DDR (PMIC BUCK6)"; ++ }; ++ ++ LDO1 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-max-microvolt = <1950000>; ++ regulator-min-microvolt = <1710000>; ++ regulator-name = "+V1.8_SNVS (PMIC LDO1)"; ++ }; ++ ++ LDO3 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-max-microvolt = <1800000>; ++ regulator-min-microvolt = <1800000>; ++ regulator-name = "+V1.8A (PMIC LDO3)"; ++ }; ++ ++ LDO4 { ++ regulator-always-on; ++ regulator-boot-on; ++ regulator-max-microvolt = <3300000>; ++ regulator-min-microvolt = <3300000>; ++ regulator-name = "+V3.3_ADC (PMIC LDO4)"; ++ }; ++ ++ reg_sd_3v3_1v8: LDO5 { ++ regulator-max-microvolt = <3300000>; ++ regulator-min-microvolt = <1800000>; ++ regulator-name = "+V3.3_1.8_SD (PMIC LDO5)"; ++ }; ++ }; ++ }; ++ ++ rtc_i2c: rtc@32 { ++ compatible = "epson,rx8130"; ++ reg = <0x32>; ++ }; ++ ++ temperature-sensor@48 { ++ compatible = "ti,tmp1075"; ++ reg = <0x48>; ++ }; ++ ++ eeprom@50 { ++ compatible = "st,24c02"; ++ reg = <0x50>; ++ pagesize = <16>; ++ }; ++}; ++ ++ ++/* SMARC I2C_LCD */ ++&i2c2 { ++ pinctrl-names = "default", "gpio"; ++ pinctrl-0 = <&pinctrl_i2c2>; ++ pinctrl-1 = <&pinctrl_i2c2_gpio>; ++ clock-frequency = <100000>; ++ scl-gpios = <&gpio5 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; ++ sda-gpios = <&gpio5 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; ++ single-master; ++}; ++ ++/* SMARC I2C_CAM0 */ ++&i2c3 { ++ pinctrl-names = "default", "gpio"; ++ pinctrl-0 = <&pinctrl_i2c3>; ++ pinctrl-1 = <&pinctrl_i2c3_gpio>; ++ clock-frequency = <400000>; ++ scl-gpios = <&gpio5 18 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; ++ sda-gpios = <&gpio5 19 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; ++ single-master; ++}; ++ ++/* SMARC I2C_GP */ ++&i2c4 { ++ pinctrl-names = "default", "gpio"; ++ pinctrl-0 = <&pinctrl_i2c4>; ++ pinctrl-1 = <&pinctrl_i2c4_gpio>; ++ clock-frequency = <400000>; ++ scl-gpios = <&gpio5 20 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; ++ sda-gpios = <&gpio5 21 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; ++ single-master; ++ status = "okay"; ++ ++ eeprom@50 { ++ compatible = "st,24c32"; ++ reg = <0x50>; ++ pagesize = <32>; ++ }; ++}; ++ ++/* SMARC I2C_CAM1 */ ++&i2c5 { ++ pinctrl-names = "default", "gpio"; ++ pinctrl-0 = <&pinctrl_i2c5>; ++ pinctrl-1 = <&pinctrl_i2c5_gpio>; ++ clock-frequency = <400000>; ++ scl-gpios = <&gpio5 3 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; ++ sda-gpios = <&gpio5 4 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; ++ single-master; ++}; ++ ++/* SMARC I2C_PM */ ++&i2c6 { ++ pinctrl-names = "default", "gpio"; ++ pinctrl-0 = <&pinctrl_i2c6>; ++ pinctrl-1 = <&pinctrl_i2c6_gpio>; ++ clock-frequency = <400000>; ++ scl-gpios = <&gpio3 28 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; ++ sda-gpios = <&gpio3 20 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; ++ single-master; ++}; ++ ++&mdio { ++ eqos_phy: ethernet-phy@1 { ++ reg = <1>; ++ interrupt-parent = <&gpio3>; ++ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; ++ ti,rx-internal-delay = ; ++ ti,tx-internal-delay = ; ++ }; ++ ++ fec_phy: ethernet-phy@2 { ++ reg = <2>; ++ interrupt-parent = <&gpio3>; ++ interrupts = <0 IRQ_TYPE_LEVEL_LOW>; ++ ti,rx-internal-delay = ; ++ ti,tx-internal-delay = ; ++ }; ++}; ++ ++/* SMARC PCIE_A */ ++&pcie { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_pcie>; ++ host-wake-gpios = <&gpio4 0 GPIO_ACTIVE_LOW>; ++ reset-gpio = <&gpio4 19 GPIO_ACTIVE_LOW>; ++}; ++ ++&pcie_phy { ++ clocks = <&hsio_blk_ctrl>; ++ clock-names = "ref"; ++ fsl,clkreq-unsupported; ++ fsl,refclk-pad-mode = ; ++}; ++ ++/* SMARC LCD1_BKLT_PWM */ ++&pwm1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_lcd1_bklt_pwm1>; ++}; ++ ++/* SMARC LCD0_BKLT_PWM */ ++&pwm2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_lcd0_bklt_pwm2>; ++}; ++ ++/* SMARC GPIO5 as PWM */ ++&pwm3 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_gpio5_pwm>; ++}; ++ ++&snvs_pwrkey { ++ status = "okay"; ++}; ++ ++/* SMARC SER0 */ ++&uart1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_uart1>; ++ uart-has-rtscts; ++}; ++ ++/* SMARC SER2 */ ++&uart2 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_uart2>; ++ uart-has-rtscts; ++}; ++ ++/* On-module Bluetooth, optional SMARC SER3 */ ++&uart3 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_bt_uart>; ++ uart-has-rtscts; ++ status = "okay"; ++ ++ som_bt: bluetooth { ++ compatible = "mrvl,88w8997"; ++ max-speed = <921600>; ++ }; ++}; ++ ++/* SMARC SER1, used as the Linux Console */ ++&uart4 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_uart4>; ++}; ++ ++/* SMARC USB0 */ ++&usb3_0 { ++ fsl,disable-port-power-control; ++}; ++ ++/* SMARC USB1..4 */ ++&usb3_1 { ++ fsl,disable-port-power-control; ++}; ++ ++&usb_dwc3_0 { ++ adp-disable; ++ dr_mode = "otg"; ++ hnp-disable; ++ maximum-speed = "high-speed"; ++ srp-disable; ++ usb-role-switch; ++ ++ port { ++ usb3_0_dwc: endpoint { ++ remote-endpoint = <&usb_dr_connector>; ++ }; ++ }; ++}; ++ ++&usb_dwc3_1 { ++ dr_mode = "host"; ++}; ++ ++&usb3_phy1 { ++ vbus-supply = <®_usb1_vbus>; ++}; ++ ++/* On-module Wi-Fi */ ++&usdhc1 { ++ pinctrl-names = "default", "state_100mhz", "state_200mhz"; ++ pinctrl-0 = <&pinctrl_usdhc1>; ++ pinctrl-1 = <&pinctrl_usdhc1_100mhz>; ++ pinctrl-2 = <&pinctrl_usdhc1_200mhz>; ++ keep-power-in-suspend; ++ non-removable; ++ vmmc-supply = <®_wifi_en>; ++ status = "okay"; ++}; ++ ++/* SMARC SDIO */ ++&usdhc2 { ++ pinctrl-names = "default", "state_100mhz", "state_200mhz", "sleep"; ++ pinctrl-0 = <&pinctrl_usdhc2>, ++ <&pinctrl_usdhc2_cd>, ++ <&pinctrl_usdhc2_wp>; ++ pinctrl-1 = <&pinctrl_usdhc2_100mhz>, ++ <&pinctrl_usdhc2_cd>, ++ <&pinctrl_usdhc2_wp>; ++ pinctrl-2 = <&pinctrl_usdhc2_200mhz>, ++ <&pinctrl_usdhc2_cd>, ++ <&pinctrl_usdhc2_wp>; ++ pinctrl-3 = <&pinctrl_usdhc2_sleep>, ++ <&pinctrl_usdhc2_cd_sleep>, ++ <&pinctrl_usdhc2_wp>; ++ assigned-clocks = <&clk IMX8MP_CLK_USDHC2>; ++ assigned-clock-rates = <400000000>; ++ cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>; ++ vmmc-supply = <®_usdhc2_vmmc>; ++ vqmmc-supply = <®_usdhc2_vqmmc>; ++ wp-gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>; ++}; ++ ++/* On-module eMMC */ ++&usdhc3 { ++ pinctrl-names = "default", "state_100mhz", "state_200mhz"; ++ pinctrl-0 = <&pinctrl_usdhc3>; ++ pinctrl-1 = <&pinctrl_usdhc3_100mhz>; ++ pinctrl-2 = <&pinctrl_usdhc3_200mhz>; ++ assigned-clocks = <&clk IMX8MP_CLK_USDHC3_ROOT>; ++ assigned-clock-rates = <400000000>; ++ bus-width = <8>; ++ non-removable; ++ status = "okay"; ++}; ++ ++&wdog1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pinctrl_wdog>; ++ fsl,ext-reset-output; ++ status = "okay"; ++}; ++ ++&iomuxc { ++ /* On-module Bluetooth */ ++ pinctrl_bt_uart: btuartgrp { ++ fsl,pins = , /* WiFi_UART_TXD */ ++ , /* WiFi_UART_RXD */ ++ , /* WiFi_UART_RTS */ ++ ; /* WiFi_UART_CTS */ ++ }; ++ ++ /* SMARC CAM_MCK */ ++ pinctrl_csi_mclk: csimclkgrp { ++ fsl,pins = ; /* SMARC S6 - CAM_MCK */ ++ }; ++ ++ /* SMARC SPI0 */ ++ pinctrl_ecspi1: ecspi1grp { ++ fsl,pins = , /* SMARC P45 - SPI0_DIN */ ++ , /* SMARC P46 - SPI0_DO */ ++ , /* SMARC P44 - SPI0_CK */ ++ , /* SMARC P43 - SPI0_CS0# */ ++ ; /* SMARC P31 - SPI0_CS1# */ ++ }; ++ ++ /* SMARC SPI1 */ ++ pinctrl_ecspi2: ecspi2grp { ++ fsl,pins = , /* SMARC P56 - SPI1_DIN */ ++ , /* SMARC P57 - SPI1_DO */ ++ , /* SMARC P58 - SPI1_CK */ ++ , /* SMARC P54 - SPI1_CS0# */ ++ ; /* SMARC P55 - SPI1_CS1# */ ++ }; ++ ++ /* ETH_0 RGMII (On-module PHY) */ ++ pinctrl_eqos: eqosgrp { ++ fsl,pins = , /* ETH0_RGMII_RXD0 */ ++ , /* ETH0_RGMII_RXD1 */ ++ , /* ETH0_RGMII_RXD2 */ ++ , /* ETH0_RGMII_RXD3 */ ++ , /* ETH0_RGMII_RXC */ ++ , /* ETH0_RGMII_RX_CTL */ ++ , /* ETH0_RGMII_TXD0 */ ++ , /* ETH0_RGMII_TXD1 */ ++ , /* ETH0_RGMII_TXD2 */ ++ , /* ETH0_RGMII_TXD3 */ ++ , /* ETH0_RGMII_TX_CTL */ ++ ; /* ETH0_RGMII_TXC */ ++ }; ++ ++ /* SMARC GBE0_SDP */ ++ pinctrl_eqos_1588_event: eqos1588eventgrp { ++ fsl,pins = ; /* SMARC P6 - GBE0_SDP */ ++ }; ++ ++ /* ETH_0_MDIO and ETH_0_INT# shared between ETH_PHY0 and ETH_PHY1 */ ++ pinctrl_eth_mdio: ethmdiogrp { ++ fsl,pins = , /* ETH_0_MDC */ ++ , /* ETH_0_MDIO */ ++ ; /* ETH_0_INT# */ ++ }; ++ ++ /* ETH_1 RGMII (On-module PHY) */ ++ pinctrl_fec: fecgrp { ++ fsl,pins = , /* ETH1_RGMII_RXD0 */ ++ , /* ETH1_RGMII_RXD1 */ ++ , /* ETH1_RGMII_RXD2 */ ++ , /* ETH1_RGMII_RXD3 */ ++ , /* ETH1_RGMII_RXC */ ++ , /* ETH1_RGMII_RX_CTL */ ++ , /* ETH1_RGMII_TXD0 */ ++ , /* ETH1_RGMII_TXD1 */ ++ , /* ETH1_RGMII_TXD2 */ ++ , /* ETH1_RGMII_TXD3 */ ++ , /* ETH1_RGMII_TX_CTL */ ++ ; /* ETH1_RGMII_TXC */ ++ }; ++ ++ /* SMARC GBE1_SDP */ ++ pinctrl_fec_1588_event: fec1588eventgrp { ++ fsl,pins = ; /* SMARC P5 - GBE1_SDP */ ++ }; ++ ++ /* SMARC CAN1 */ ++ pinctrl_flexcan1: flexcan1grp { ++ fsl,pins = , /* SMARC P146 - CAN1_RX */ ++ ; /* SMARC P145 - CAN1_TX */ ++ }; ++ ++ /* SMARC CAN0 */ ++ pinctrl_flexcan2: flexcan2grp { ++ fsl,pins = , /* SMARC P144 - CAN0_RX */ ++ ; /* SMARC P143 - CAN0_TX */ ++ }; ++ ++ /* SMARC GPIO4 */ ++ pinctrl_gpio4: gpio4grp { ++ fsl,pins = ; /* SMARC P112 - GPIO4 */ ++ }; ++ ++ /* SMARC GPIO5 */ ++ pinctrl_gpio5: gpio5grp { ++ fsl,pins = ; /* SMARC P113 - GPIO5 */ ++ }; ++ ++ /* SMARC GPIO5 as PWM */ ++ pinctrl_gpio5_pwm: gpio5pwmgrp { ++ fsl,pins = ; /* SMARC P113 - PWM_OUT */ ++ }; ++ ++ /* SMARC GPIO6 */ ++ pinctrl_gpio6: gpio6grp { ++ fsl,pins = ; /* SMARC P114 - GPIO6 */ ++ }; ++ ++ /* SMARC GPIO7 */ ++ pinctrl_gpio7: gpio7grp { ++ fsl,pins = ; /* SMARC P115 - GPIO7 */ ++ }; ++ ++ /* SMARC GPIO8 */ ++ pinctrl_gpio8: gpio8grp { ++ fsl,pins = ; /* SMARC P116 - GPIO8 */ ++ }; ++ ++ /* SMARC GPIO9 */ ++ pinctrl_gpio9: gpio9grp { ++ fsl,pins = ; /* SMARC P117 - GPIO9 */ ++ }; ++ ++ /* SMARC GPIO10 */ ++ pinctrl_gpio10: gpio10grp { ++ fsl,pins = ; /* SMARC P118 - GPIO10 */ ++ }; ++ ++ /* SMARC GPIO11 */ ++ pinctrl_gpio11: gpio11grp { ++ fsl,pins = ; /* SMARC P119 - GPIO11 */ ++ }; ++ ++ /* SMARC GPIO12 */ ++ pinctrl_gpio12: gpio12grp { ++ fsl,pins = ; /* SMARC S142 - GPIO12 */ ++ }; ++ ++ /* SMARC GPIO13 */ ++ pinctrl_gpio13: gpio13grp { ++ fsl,pins = ; /* SMARC S123 - GPIO13 */ ++ }; ++ ++ /* SMARC HDMI */ ++ pinctrl_hdmi: hdmigrp { ++ fsl,pins = , /* SMARC P105 - HDMI_CTRL_CK */ ++ , /* SMARC P106 - HDMI_CTRL_DAT */ ++ ; /* SMARC P104 - HDMI_HPD */ ++ }; ++ ++ /* On-module I2C */ ++ pinctrl_i2c1: i2c1grp { ++ fsl,pins = , /* CTRL_I2C_SCL */ ++ ; /* CTRL_I2C_SDA */ ++ }; ++ ++ /* On-module I2C as GPIOs */ ++ pinctrl_i2c1_gpio: i2c1gpiogrp { ++ fsl,pins = , /* CTRL_I2C_SCL */ ++ ; /* CTRL_I2C_SDA */ ++ }; ++ ++ /* SMARC I2C_LCD */ ++ pinctrl_i2c2: i2c2grp { ++ fsl,pins = , /* SMARC S139 - I2C_LCD_CK */ ++ ; /* SMARC S140 - I2C_LCD_DAT */ ++ }; ++ ++ /* SMARC I2C_LCD as GPIOs */ ++ pinctrl_i2c2_gpio: i2c2gpiogrp { ++ fsl,pins = , /* SMARC S139 - I2C_LCD_CK */ ++ ; /* SMARC S140 - I2C_LCD_DAT */ ++ }; ++ ++ /* SMARC I2C_CAM0 */ ++ pinctrl_i2c3: i2c3grp { ++ fsl,pins = , /* SMARC S5 - I2C_CAM0_CK */ ++ ; /* SMARC S7 - I2C_CAM0_DAT */ ++ }; ++ ++ /* SMARC I2C_CAM0 as GPIOs */ ++ pinctrl_i2c3_gpio: i2c3gpiogrp { ++ fsl,pins = , /* SMARC S5 - I2C_CAM0_CK */ ++ ; /* SMARC S7 - I2C_CAM0_DAT */ ++ }; ++ ++ /* SMARC I2C_GP */ ++ pinctrl_i2c4: i2c4grp { ++ fsl,pins = , /* SMARC S48 - I2C_GP_CK */ ++ ; /* SMARC S49 - I2C_GP_DAT */ ++ }; ++ ++ /* SMARC I2C_GP as GPIOs */ ++ pinctrl_i2c4_gpio: i2c4gpiogrp { ++ fsl,pins = , /* SMARC S48 - I2C_GP_CK */ ++ ; /* SMARC S49 - I2C_GP_DAT */ ++ }; ++ ++ /* SMARC I2C_CAM1 */ ++ pinctrl_i2c5: i2c5grp { ++ fsl,pins = , /* SMARC S2 - I2C_CAM1_DAT */ ++ ; /* SMARC S1 - I2C_CAM1_CK */ ++ }; ++ ++ /* SMARC I2C_CAM1 as GPIOs */ ++ pinctrl_i2c5_gpio: i2c5gpiogrp { ++ fsl,pins = , /* SMARC S2 - I2C_CAM1_DAT */ ++ ; /* SMARC S1 - I2C_CAM1_CK */ ++ }; ++ ++ /* SMARC I2C_PM */ ++ pinctrl_i2c6: i2c6grp { ++ fsl,pins = , /* SMARC P121 - I2C_PM_CK */ ++ ; /* SMARC P122 - I2C_PM_DAT */ ++ }; ++ ++ /* SMARC I2C_PM as GPIOs */ ++ pinctrl_i2c6_gpio: i2c6gpiogrp { ++ fsl,pins = , /* SMARC P121 - I2C_PM_CK */ ++ ; /* SMARC P122 - I2C_PM_DAT */ ++ }; ++ ++ pinctrl_lvds_dsi_sel: lvdsdsiselgrp { ++ fsl,pins = ; /* LVDS_DSI_SEL */ ++ }; ++ ++ pinctrl_mcu_int: mcuintgrp { ++ fsl,pins = ; /* MCU_INT# */ ++ }; ++ ++ /* SMARC LCD1_BKLT_PWM */ ++ pinctrl_lcd1_bklt_pwm1: pwm1grp { ++ fsl,pins = ; /* SMARC S122 - LCD1_BKLT_PWM */ ++ }; ++ ++ /* SMARC LCD0_BKLT_PWM */ ++ pinctrl_lcd0_bklt_pwm2: pwm2grp { ++ fsl,pins = ; /* SMARC S141 - LCD0_BKLT_PWM */ ++ }; ++ ++ /* PCAL6408 Interrupt */ ++ pinctrl_pcal6408: pcal6408intgrp { ++ fsl,pins = ; /* GPIO_EX_INT# */ ++ }; ++ ++ /* SMARC PCIE_A */ ++ pinctrl_pcie: pciegrp { ++ fsl,pins = , /* SMARC S146 - PCIE_WAKE# */ ++ ; /* SMARC P75 - PCIE_A_RST# */ ++ }; ++ ++ /* PMIC Interrupt */ ++ pinctrl_pmic: pmicintgrp { ++ fsl,pins = ; /* PMIC_INT# */ ++ }; ++ ++ /* SMARC I2S0 */ ++ pinctrl_sai1: sai1grp { ++ fsl,pins = , /* SMARC S42 - I2S0_CK */ ++ , /* SMARC S39 - I2S0_LRCLK */ ++ , /* SMARC S41 - I2S0_SDIN */ ++ ; /* SMARC S40 - I2S0_SDOUT */ ++ }; ++ ++ /* SMARC AUDIO_MCK */ ++ pinctrl_sai1_mclk: sai1mclkgrp { ++ fsl,pins = ; /* SMARC S38 - AUDIO_MCK */ ++ }; ++ ++ /* SMARC I2S2 */ ++ pinctrl_sai3: sai3grp { ++ fsl,pins = , /* SMARC S52 - I2S2_SDIN */ ++ , /* SMARC S53 - I2S2_CK */ ++ , /* SMARC S51 - I2S2_SDOUT */ ++ ; /* SMARC S50 - I2S2_LRCLK */ ++ }; ++ ++ /* SMARC SLEEP# */ ++ pinctrl_sleep: sleepgrp { ++ fsl,pins = ; /* SMARC S149 - SLEEP# */ ++ }; ++ ++ /* SMARC SMB_ALERT# */ ++ pinctrl_smb_alert: smbalertgrp { ++ fsl,pins = ; /* SMARC P1 - SMB_ALERT# */ ++ }; ++ ++ /* TPM_CS# */ ++ pinctrl_tpm_cs: tpmcsgrp { ++ fsl,pins = ; /* TPM_CS# */ ++ }; ++ ++ /* WIFI_BT_WKUP_HOST/TPM_INT# */ ++ pinctrl_tpm_irq_wifi_bt_wkup: tpmirq-wifibtwkupgrp { ++ fsl,pins = ; /* WIFI_BT_WKUP_HOST/TPM_INT# */ ++ }; ++ ++ /* SMARC SER0 */ ++ pinctrl_uart1: uart1grp { ++ fsl,pins = , /* SMARC P132 - SER2_CTS */ ++ , /* SMARC P131 - SER2_RTS */ ++ , /* SMARC P130 - SER2_RX */ ++ ; /* SMARC P139 - SER2_TX */ ++ }; ++ ++ /* SMARC SER2 */ ++ pinctrl_uart2: uart2grp { ++ fsl,pins = , /* SMARC P139 - SER2_CTS */ ++ , /* SMARC P138 - SER2_RTS */ ++ , /* SMARC P137 - SER2_RX */ ++ ; /* SMARC P136 - SER2_TX */ ++ }; ++ ++ /* SMARC SER3 */ ++ pinctrl_uart3: uart3grp { ++ fsl,pins = , /* SMARC P141 - SER3_RX */ ++ ; /* SMARC P140 - SER3_TX */ ++ }; ++ ++ /* SMARC SER1 */ ++ pinctrl_uart4: uart4grp { ++ fsl,pins = , /* SMARC P135 - SER1_RX */ ++ ; /* SMARC P134 - SER1_TX */ ++ }; ++ ++ /* SMARC USB0_OTG_ID */ ++ pinctrl_usb0_id: usb0idgrp { ++ fsl,pins = ; /* SMARC P64 - USB0_OTG_ID */ ++ }; ++ ++ /* SMARC USB0_EN_OC# */ ++ pinctrl_usb0_en_oc: usb0enocgrp { ++ fsl,pins = ; /* SMARC P62 - USB0_EN_OC# */ ++ }; ++ ++ /* On module USB Hub VBUS, or SMARC USB2_EN_OC# depending on assembling */ ++ pinctrl_usb1_en_oc: usb1enocgrp { ++ fsl,pins = ; /* SMARC P71 - USB2_EN_OC# */ ++ }; ++ ++ /* On-module Wi-Fi */ ++ pinctrl_usdhc1: usdhc1grp { ++ fsl,pins = , /* WiFi_SDIO_CLK */ ++ , /* WiFi_SDIO_CMD */ ++ , /* WiFi_SDIO_DATA0 */ ++ , /* WiFi_SDIO_DATA1 */ ++ , /* WiFi_SDIO_DATA2 */ ++ ; /* WiFi_SDIO_DATA3 */ ++ }; ++ ++ /* On-module Wi-Fi */ ++ pinctrl_usdhc1_100mhz: usdhc1-100mhzgrp { ++ fsl,pins = , /* WiFi_SDIO_CLK */ ++ , /* WiFi_SDIO_CMD */ ++ , /* WiFi_SDIO_DATA0 */ ++ , /* WiFi_SDIO_DATA1 */ ++ , /* WiFi_SDIO_DATA2 */ ++ ; /* WiFi_SDIO_DATA3 */ ++ }; ++ ++ /* On-module Wi-Fi */ ++ pinctrl_usdhc1_200mhz: usdhc1-200mhzgrp { ++ fsl,pins = , /* WiFi_SDIO_CLK */ ++ , /* WiFi_SDIO_CMD */ ++ , /* WiFi_SDIO_DATA0 */ ++ , /* WiFi_SDIO_DATA1 */ ++ , /* WiFi_SDIO_DATA2 */ ++ ; /* WiFi_SDIO_DATA3 */ ++ }; ++ ++ /* SMARC SDIO */ ++ pinctrl_usdhc2: usdhc2grp { ++ fsl,pins = , /* SMARC P36 - SDIO_CK */ ++ , /* SMARC P34 - SDIO_CMD */ ++ , /* SMARC P39 - SDIO_DO */ ++ , /* SMARC P40 - SDIO_D1 */ ++ , /* SMARC P41 - SDIO_D2 */ ++ ; /* SMARC P42 - SDIO_D3 */ ++ }; ++ ++ /* SMARC SDIO 100MHz */ ++ pinctrl_usdhc2_100mhz: usdhc2-100mhzgrp { ++ fsl,pins = , /* SMARC P36 - SDIO_CK */ ++ , /* SMARC P34 - SDIO_CMD */ ++ , /* SMARC P39 - SDIO_DO */ ++ , /* SMARC P40 - SDIO_D1 */ ++ , /* SMARC P41 - SDIO_D2 */ ++ ; /* SMARC P42 - SDIO_D3 */ ++ }; ++ ++ /* SMARC SDIO 200MHz */ ++ pinctrl_usdhc2_200mhz: usdhc2-200mhzgrp { ++ fsl,pins = , /* SMARC P36 - SDIO_CK */ ++ , /* SMARC P34 - SDIO_CMD */ ++ , /* SMARC P39 - SDIO_DO */ ++ , /* SMARC P40 - SDIO_D1 */ ++ , /* SMARC P41 - SDIO_D2 */ ++ ; /* SMARC P42 - SDIO_D3 */ ++ }; ++ ++ /* SMARC SDIO_CD# */ ++ pinctrl_usdhc2_cd: usdhc2cdgrp { ++ fsl,pins = ; /* SMARC P35 - SDIO_CD# */ ++ }; ++ ++ /* SMARC SDIO_CD# */ ++ pinctrl_usdhc2_cd_sleep: usdhc2cdslpgrp { ++ fsl,pins = ; /* SMARC P35 - SDIO_CD# */ ++ }; ++ ++ /* SMARC SDIO_PWR_EN */ ++ pinctrl_usdhc2_pwr_en: usdhc2pwrengrp { ++ fsl,pins = ; /* SMARC P37 - SDIO_PWR_EN */ ++ }; ++ ++ /* SMARC SDIO Sleep - Avoid backfeeding with removed card power */ ++ pinctrl_usdhc2_sleep: usdhc2slpgrp { ++ fsl,pins = , /* SMARC P36 - SDIO_CK */ ++ , /* SMARC P34 - SDIO_CMD */ ++ , /* SMARC P39 - SDIO_DO */ ++ , /* SMARC P39 - SDIO_D1 */ ++ , /* SMARC P39 - SDIO_D2 */ ++ ; /* SMARC P39 - SDIO_D3 */ ++ }; ++ ++ pinctrl_usdhc2_vsel: usdhc2vselgrp { ++ fsl,pins = ; /* PMIC_USDHC_VSELECT */ ++ }; ++ ++ /* SMARC SDIO_WP */ ++ pinctrl_usdhc2_wp: usdhc2wpgrp { ++ fsl,pins = ; /* SMARC P33 - SDIO_WP */ ++ }; ++ ++ /* On-module eMMC */ ++ pinctrl_usdhc3: usdhc3grp { ++ fsl,pins = , /* eMMC_STROBE */ ++ , /* eMMC_DATA5 */ ++ , /* eMMC_DATA6 */ ++ , /* eMMC_DATA7 */ ++ , /* eMMC_DATA0 */ ++ , /* eMMC_DATA1 */ ++ , /* eMMC_DATA2 */ ++ , /* eMMC_DATA3 */ ++ , /* eMMC_DATA4 */ ++ , /* eMMC_CLK */ ++ ; /* eMMC_CMD */ ++ }; ++ ++ /* On-module eMMC */ ++ pinctrl_usdhc3_100mhz: usdhc3-100mhzgrp { ++ fsl,pins = , /* eMMC_STROBE */ ++ , /* eMMC_DATA5 */ ++ , /* eMMC_DATA6 */ ++ , /* eMMC_DATA7 */ ++ , /* eMMC_DATA0 */ ++ , /* eMMC_DATA1 */ ++ , /* eMMC_DATA2 */ ++ , /* eMMC_DATA3 */ ++ , /* eMMC_DATA4 */ ++ , /* eMMC_CLK */ ++ ; /* eMMC_CMD */ ++ }; ++ ++ /* On-module eMMC */ ++ pinctrl_usdhc3_200mhz: usdhc3-200mhzgrp { ++ fsl,pins = , /* eMMC_STROBE */ ++ , /* eMMC_DATA5 */ ++ , /* eMMC_DATA6 */ ++ , /* eMMC_DATA7 */ ++ , /* eMMC_DATA0 */ ++ , /* eMMC_DATA1 */ ++ , /* eMMC_DATA2 */ ++ , /* eMMC_DATA3 */ ++ , /* eMMC_DATA4 */ ++ , /* eMMC_CLK */ ++ ; /* eMMC_CMD */ ++ }; ++ ++ /* On-module Wi-Fi power enable */ ++ pinctrl_wifi_pwr_en: wifipwrengrp { ++ fsl,pins = ; /* CTRL_EN_WIFI */ ++ }; ++ ++ /* SoC Watchdog */ ++ pinctrl_wdog: wdoggrp { ++ fsl,pins = ; /* CTRL_SOC_WDOG */ ++ }; ++}; diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0004-Kconfig.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0004-Kconfig.patch new file mode 100644 index 0000000..28e14cd --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0004-Kconfig.patch @@ -0,0 +1,23 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/arch/arm/mach-imx/imx8m/Kconfig 2025-11-21 14:56:51.328620960 +0100 ++++ ./arch/arm/mach-imx/imx8m/Kconfig 2025-11-21 14:54:55.153969190 +0100 +@@ -257,6 +257,12 @@ + select IMX8MQ + select IMX8M_LPDDR4 + ++config TARGET_TORADEX_SMARC_IMX8MP ++ bool "Support Toradex SMARC iMX8M Plus module" ++ select IMX8MP ++ select SUPPORT_SPL ++ select IMX8M_LPDDR4 ++ + config TARGET_VERDIN_IMX8MM + bool "Support Toradex Verdin iMX8M Mini module" + select IMX8MM +@@ -373,6 +379,7 @@ + source "board/ronetix/imx8mq-cm/Kconfig" + source "board/technexion/pico-imx8mq/Kconfig" + source "board/variscite/imx8mn_var_som/Kconfig" ++source "board/toradex/smarc-imx8mp/Kconfig" + source "board/toradex/verdin-imx8mm/Kconfig" + source "board/toradex/verdin-imx8mp/Kconfig" + diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0005-soc.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0005-soc.c.patch new file mode 100644 index 0000000..238e20a --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0005-soc.c.patch @@ -0,0 +1,10 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/arch/arm/mach-imx/imx8m/soc.c 2025-11-21 14:56:51.329079605 +0100 ++++ ./arch/arm/mach-imx/imx8m/soc.c 2025-11-21 14:54:55.153940138 +0100 +@@ -955,6 +955,7 @@ + "/soc@0/video-codec@38300000", + "/soc@0/video-codec@38310000", + "/soc@0/blk-ctrl@38330000", ++ "/soc@0/blk-ctl@38330000", + }; + + if (is_imx8mq()) diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0006-apalis_imx6.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0006-apalis_imx6.c.patch new file mode 100644 index 0000000..2ad47ac --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0006-apalis_imx6.c.patch @@ -0,0 +1,61 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/board/toradex/apalis_imx6/apalis_imx6.c 2025-11-21 14:56:51.517012477 +0100 ++++ ./board/toradex/apalis_imx6/apalis_imx6.c 2025-11-21 14:54:55.266029383 +0100 +@@ -36,6 +36,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -77,6 +78,8 @@ + + #define APALIS_IMX6_SATA_INIT_RETRIES 10 + ++#define I2C_PWR 1 ++ + int dram_init(void) + { + /* use the DDR controllers configured size */ +@@ -689,6 +692,32 @@ + return 0; + } + ++static bool is_som_variant_1_2(void) ++{ ++ struct udevice *bus; ++ struct udevice *i2c_dev; ++ int ret; ++ ++ ret = uclass_get_device_by_seq(UCLASS_I2C, I2C_PWR, &bus); ++ if (ret) { ++ printf("Failed to get I2C_PWR\n"); ++ return false; ++ } ++ ++ /* V1.2 uses the TLA2024 at 0x49 instead of the STMPE811 at 0x41 */ ++ ret = dm_i2c_probe(bus, 0x49, 0, &i2c_dev); ++ ++ return (bool)!ret; ++} ++ ++static void select_dt_from_module_version(void) ++{ ++ if (is_som_variant_1_2()) ++ env_set("variant", "-v1.2"); ++ else ++ env_set("variant", ""); ++} ++ + #ifdef CONFIG_BOARD_LATE_INIT + int board_late_init(void) + { +@@ -696,6 +725,8 @@ + char env_str[256]; + u32 rev; + ++ select_dt_from_module_version(); ++ + rev = get_board_revision(); + snprintf(env_str, ARRAY_SIZE(env_str), "%.4x", rev); + env_set("board_rev", env_str); diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0007-colibri_imx6.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0007-colibri_imx6.c.patch new file mode 100644 index 0000000..1f6b34d --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0007-colibri_imx6.c.patch @@ -0,0 +1,61 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/board/toradex/colibri_imx6/colibri_imx6.c 2025-11-21 14:56:51.517697200 +0100 ++++ ./board/toradex/colibri_imx6/colibri_imx6.c 2025-11-21 14:54:55.266404523 +0100 +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -71,6 +72,8 @@ + + #define OUTPUT_RGB (PAD_CTL_SPEED_MED|PAD_CTL_DSE_60ohm|PAD_CTL_SRE_FAST) + ++#define I2C_PWR 1 ++ + int dram_init(void) + { + /* use the DDR controllers configured size */ +@@ -609,6 +612,32 @@ + return 0; + } + ++static bool is_som_variant_1_2(void) ++{ ++ struct udevice *bus; ++ struct udevice *i2c_dev; ++ int ret; ++ ++ ret = uclass_get_device_by_seq(UCLASS_I2C, I2C_PWR, &bus); ++ if (ret) { ++ printf("Failed to get I2C_PWR\n"); ++ return false; ++ } ++ ++ /* V1.2 uses the TLA2024 at 0x49 instead of the STMPE811 at 0x41 */ ++ ret = dm_i2c_probe(bus, 0x49, 0, &i2c_dev); ++ ++ return (bool)!ret; ++} ++ ++static void select_dt_from_module_version(void) ++{ ++ if (is_som_variant_1_2()) ++ env_set("variant", "-v1.2"); ++ else ++ env_set("variant", ""); ++} ++ + #ifdef CONFIG_BOARD_LATE_INIT + int board_late_init(void) + { +@@ -616,6 +645,8 @@ + char env_str[256]; + u32 rev; + ++ select_dt_from_module_version(); ++ + rev = get_board_revision(); + snprintf(env_str, ARRAY_SIZE(env_str), "%.4x", rev); + env_set("board_rev", env_str); diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0008-tdx-cfg-block.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0008-tdx-cfg-block.c.patch new file mode 100644 index 0000000..e650d34 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0008-tdx-cfg-block.c.patch @@ -0,0 +1,258 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/board/toradex/common/tdx-cfg-block.c 2025-11-21 14:56:51.518386446 +0100 ++++ ./board/toradex/common/tdx-cfg-block.c 2025-11-21 14:54:55.266886714 +0100 +@@ -70,94 +70,102 @@ + #define TARGET_IS_ENABLED(x) IS_ENABLED(CONFIG_TARGET_ ## x) + + const struct toradex_som toradex_modules[] = { +- [0] = { "UNKNOWN MODULE", 0 }, +- [1] = { "Colibri PXA270 312MHz", 0 }, +- [2] = { "Colibri PXA270 520MHz", 0 }, +- [3] = { "Colibri PXA320 806MHz", 0 }, +- [4] = { "Colibri PXA300 208MHz", 0 }, +- [5] = { "Colibri PXA310 624MHz", 0 }, +- [6] = { "Colibri PXA320IT 806MHz", 0 }, +- [7] = { "Colibri PXA300 208MHz XT", 0 }, +- [8] = { "Colibri PXA270 312MHz", 0 }, +- [9] = { "Colibri PXA270 520MHz", 0 }, +- [10] = { "Colibri VF50 128MB", TARGET_IS_ENABLED(COLIBRI_VF) }, +- [11] = { "Colibri VF61 256MB", TARGET_IS_ENABLED(COLIBRI_VF) }, +- [12] = { "Colibri VF61 256MB IT", TARGET_IS_ENABLED(COLIBRI_VF) }, +- [13] = { "Colibri VF50 128MB IT", TARGET_IS_ENABLED(COLIBRI_VF) }, +- [14] = { "Colibri iMX6S 256MB", TARGET_IS_ENABLED(COLIBRI_IMX6) }, +- [15] = { "Colibri iMX6DL 512MB", TARGET_IS_ENABLED(COLIBRI_IMX6) }, +- [16] = { "Colibri iMX6S 256MB IT", TARGET_IS_ENABLED(COLIBRI_IMX6) }, +- [17] = { "Colibri iMX6DL 512MB IT", TARGET_IS_ENABLED(COLIBRI_IMX6) }, +- [18] = { "UNKNOWN MODULE", 0 }, +- [19] = { "UNKNOWN MODULE", 0 }, +- [20] = { "Colibri T20 256MB", TARGET_IS_ENABLED(COLIBRI_T20) }, +- [21] = { "Colibri T20 512MB", TARGET_IS_ENABLED(COLIBRI_T20) }, +- [22] = { "Colibri T20 512MB IT", TARGET_IS_ENABLED(COLIBRI_T20) }, +- [23] = { "Colibri T30 1GB", TARGET_IS_ENABLED(COLIBRI_T30) }, +- [24] = { "Colibri T20 256MB IT", TARGET_IS_ENABLED(COLIBRI_T20) }, +- [25] = { "Apalis T30 2GB", TARGET_IS_ENABLED(APALIS_T30) }, +- [26] = { "Apalis T30 1GB", TARGET_IS_ENABLED(APALIS_T30) }, +- [27] = { "Apalis iMX6Q 1GB", TARGET_IS_ENABLED(APALIS_IMX6) }, +- [28] = { "Apalis iMX6Q 2GB IT", TARGET_IS_ENABLED(APALIS_IMX6) }, +- [29] = { "Apalis iMX6D 512MB", TARGET_IS_ENABLED(APALIS_IMX6) }, +- [30] = { "Colibri T30 1GB IT", TARGET_IS_ENABLED(COLIBRI_T30) }, +- [31] = { "Apalis T30 1GB IT", TARGET_IS_ENABLED(APALIS_T30) }, +- [32] = { "Colibri iMX7S 256MB", TARGET_IS_ENABLED(COLIBRI_IMX7) }, +- [33] = { "Colibri iMX7D 512MB", TARGET_IS_ENABLED(COLIBRI_IMX7) }, +- [34] = { "Apalis TK1 2GB", TARGET_IS_ENABLED(APALIS_TK1) }, +- [35] = { "Apalis iMX6D 1GB IT", TARGET_IS_ENABLED(APALIS_IMX6) }, +- [36] = { "Colibri iMX6ULL 256MB", TARGET_IS_ENABLED(COLIBRI_IMX6ULL) }, +- [37] = { "Apalis iMX8QM 4GB WB IT", TARGET_IS_ENABLED(APALIS_IMX8) }, +- [38] = { "Colibri iMX8QXP 2GB WB IT", TARGET_IS_ENABLED(COLIBRI_IMX8X) }, +- [39] = { "Colibri iMX7D 1GB", TARGET_IS_ENABLED(COLIBRI_IMX7) }, +- [40] = { "Colibri iMX6ULL 512MB WB IT", TARGET_IS_ENABLED(COLIBRI_IMX6ULL) }, +- [41] = { "Colibri iMX7D 512MB EPDC", TARGET_IS_ENABLED(COLIBRI_IMX7) }, +- [42] = { "Apalis TK1 4GB", TARGET_IS_ENABLED(APALIS_TK1) }, +- [43] = { "Colibri T20 512MB IT SETEK", TARGET_IS_ENABLED(COLIBRI_T20) }, +- [44] = { "Colibri iMX6ULL 512MB IT", TARGET_IS_ENABLED(COLIBRI_IMX6ULL) }, +- [45] = { "Colibri iMX6ULL 512MB WB", TARGET_IS_ENABLED(COLIBRI_IMX6ULL) }, +- [46] = { "Apalis iMX8QXP 2GB WB IT", 0 }, +- [47] = { "Apalis iMX8QM 4GB IT", TARGET_IS_ENABLED(APALIS_IMX8) }, +- [48] = { "Apalis iMX8QP 2GB WB", TARGET_IS_ENABLED(APALIS_IMX8) }, +- [49] = { "Apalis iMX8QP 2GB", TARGET_IS_ENABLED(APALIS_IMX8) }, +- [50] = { "Colibri iMX8QXP 2GB IT", TARGET_IS_ENABLED(COLIBRI_IMX8X) }, +- [51] = { "Colibri iMX8DX 1GB WB", TARGET_IS_ENABLED(COLIBRI_IMX8X) }, +- [52] = { "Colibri iMX8DX 1GB", TARGET_IS_ENABLED(COLIBRI_IMX8X) }, +- [53] = { "Apalis iMX8QXP 2GB ECC IT", 0 }, +- [54] = { "Apalis iMX8DXP 1GB", TARGET_IS_ENABLED(APALIS_IMX8) }, +- [55] = { "Verdin iMX8M Mini Quad 2GB WB IT", TARGET_IS_ENABLED(VERDIN_IMX8MM) }, +- [56] = { "Verdin iMX8M Nano Quad 1GB WB", 0 }, +- [57] = { "Verdin iMX8M Mini DualLite 1GB", TARGET_IS_ENABLED(VERDIN_IMX8MM) }, +- [58] = { "Verdin iMX8M Plus Quad 4GB WB IT", TARGET_IS_ENABLED(VERDIN_IMX8MP) }, +- [59] = { "Verdin iMX8M Mini Quad 2GB IT", TARGET_IS_ENABLED(VERDIN_IMX8MM) }, +- [60] = { "Verdin iMX8M Mini DualLite 1GB WB IT", TARGET_IS_ENABLED(VERDIN_IMX8MM) }, +- [61] = { "Verdin iMX8M Plus Quad 2GB", TARGET_IS_ENABLED(VERDIN_IMX8MP) }, +- [62] = { "Colibri iMX6ULL 1GB IT", TARGET_IS_ENABLED(COLIBRI_IMX6ULL) }, +- [63] = { "Verdin iMX8M Plus Quad 4GB IT", TARGET_IS_ENABLED(VERDIN_IMX8MP) }, +- [64] = { "Verdin iMX8M Plus Quad 2GB WB IT", TARGET_IS_ENABLED(VERDIN_IMX8MP) }, +- [65] = { "Verdin iMX8M Plus QuadLite 1GB IT", TARGET_IS_ENABLED(VERDIN_IMX8MP) }, +- [66] = { "Verdin iMX8M Plus Quad 8GB WB", TARGET_IS_ENABLED(VERDIN_IMX8MP) }, +- [67] = { "Apalis iMX8QM 8GB WB IT", TARGET_IS_ENABLED(APALIS_IMX8) }, +- [68] = { "Verdin iMX8M Mini Quad 2GB WB IT", TARGET_IS_ENABLED(VERDIN_IMX8MM) }, +- [69] = { "Verdin AM62 Quad 1GB WB IT", TARGET_IS_ENABLED(VERDIN_AM62_A53) }, +- [70] = { "Verdin iMX8M Plus Quad 8GB WB IT", TARGET_IS_ENABLED(VERDIN_IMX8MP) }, +- [71] = { "Verdin AM62 Solo 512MB", TARGET_IS_ENABLED(VERDIN_AM62_A53) }, +- [72] = { "Verdin AM62 Solo 512MB WB IT", TARGET_IS_ENABLED(VERDIN_AM62_A53) }, +- [73] = { "Verdin AM62 Dual 1GB ET", TARGET_IS_ENABLED(VERDIN_AM62_A53) }, +- [74] = { "Verdin AM62 Dual 1GB IT", TARGET_IS_ENABLED(VERDIN_AM62_A53) }, +- [75] = { "Verdin AM62 Dual 1GB WB IT", TARGET_IS_ENABLED(VERDIN_AM62_A53) }, +- [76] = { "Verdin AM62 Quad 2GB WB IT", TARGET_IS_ENABLED(VERDIN_AM62_A53) }, +- [77] = { "Colibri iMX6S 256MB", TARGET_IS_ENABLED(COLIBRI_IMX6) }, +- [78] = { "Colibri iMX6S 256MB IT", TARGET_IS_ENABLED(COLIBRI_IMX6) }, +- [79] = { "Colibri iMX6DL 512MB", TARGET_IS_ENABLED(COLIBRI_IMX6) }, +- [80] = { "Colibri iMX6DL 512MB IT", TARGET_IS_ENABLED(COLIBRI_IMX6) }, +- [81] = { "Colibri iMX7D 512MB", TARGET_IS_ENABLED(COLIBRI_IMX7) }, +- [82] = { "Apalis iMX6D 512MB", TARGET_IS_ENABLED(APALIS_IMX6) }, +- [83] = { "Apalis iMX6Q 1GB", TARGET_IS_ENABLED(APALIS_IMX6) }, +- [84] = { "Apalis iMX6D 1GB IT", TARGET_IS_ENABLED(APALIS_IMX6) }, +- [85] = { "Apalis iMX6Q 2GB IT", TARGET_IS_ENABLED(APALIS_IMX6) }, +- [86] = { "Verdin iMX8M Mini DualLite 2GB IT", TARGET_IS_ENABLED(VERDIN_IMX8MM) }, +- [87] = { "Verdin iMX8M Mini Quad 2GB IT", TARGET_IS_ENABLED(VERDIN_IMX8MM) }, ++ { 0, "UNKNOWN MODULE", 0 }, ++ { COLIBRI_PXA270_V1_312MHZ, "Colibri PXA270 312MHz", 0 }, ++ { COLIBRI_PXA270_V1_520MHZ, "Colibri PXA270 520MHz", 0 }, ++ { COLIBRI_PXA320, "Colibri PXA320 806MHz", 0 }, ++ { COLIBRI_PXA300, "Colibri PXA300 208MHz", 0 }, ++ { COLIBRI_PXA310, "Colibri PXA310 624MHz", 0 }, ++ { COLIBRI_PXA320_IT, "Colibri PXA320IT 806MHz", 0 }, ++ { COLIBRI_PXA300_XT, "Colibri PXA300 208MHz XT", 0 }, ++ { COLIBRI_PXA270_312MHZ, "Colibri PXA270 312MHz", 0 }, ++ { COLIBRI_PXA270_520MHZ, "Colibri PXA270 520MHz", 0 }, ++ { COLIBRI_VF50, "Colibri VF50 128MB", TARGET_IS_ENABLED(COLIBRI_VF) }, ++ { COLIBRI_VF61, "Colibri VF61 256MB", TARGET_IS_ENABLED(COLIBRI_VF) }, ++ { COLIBRI_VF61_IT, "Colibri VF61 256MB IT", TARGET_IS_ENABLED(COLIBRI_VF) }, ++ { COLIBRI_VF50_IT, "Colibri VF50 128MB IT", TARGET_IS_ENABLED(COLIBRI_VF) }, ++ { COLIBRI_IMX6S, "Colibri iMX6S 256MB", TARGET_IS_ENABLED(COLIBRI_IMX6) }, ++ { COLIBRI_IMX6DL, "Colibri iMX6DL 512MB", TARGET_IS_ENABLED(COLIBRI_IMX6) }, ++ { COLIBRI_IMX6S_IT, "Colibri iMX6S 256MB IT", TARGET_IS_ENABLED(COLIBRI_IMX6) }, ++ { COLIBRI_IMX6DL_IT, "Colibri iMX6DL 512MB IT", TARGET_IS_ENABLED(COLIBRI_IMX6) }, ++ { COLIBRI_T20_256MB, "Colibri T20 256MB", TARGET_IS_ENABLED(COLIBRI_T20) }, ++ { COLIBRI_T20_512MB, "Colibri T20 512MB", TARGET_IS_ENABLED(COLIBRI_T20) }, ++ { COLIBRI_T20_512MB_IT, "Colibri T20 512MB IT", TARGET_IS_ENABLED(COLIBRI_T20) }, ++ { COLIBRI_T30, "Colibri T30 1GB", TARGET_IS_ENABLED(COLIBRI_T30) }, ++ { COLIBRI_T20_256MB_IT, "Colibri T20 256MB IT", TARGET_IS_ENABLED(COLIBRI_T20) }, ++ { APALIS_T30_2GB, "Apalis T30 2GB", TARGET_IS_ENABLED(APALIS_T30) }, ++ { APALIS_T30_1GB, "Apalis T30 1GB", TARGET_IS_ENABLED(APALIS_T30) }, ++ { APALIS_IMX6Q, "Apalis iMX6Q 1GB", TARGET_IS_ENABLED(APALIS_IMX6) }, ++ { APALIS_IMX6Q_IT, "Apalis iMX6Q 2GB IT", TARGET_IS_ENABLED(APALIS_IMX6) }, ++ { APALIS_IMX6D, "Apalis iMX6D 512MB", TARGET_IS_ENABLED(APALIS_IMX6) }, ++ { COLIBRI_T30_IT, "Colibri T30 1GB IT", TARGET_IS_ENABLED(COLIBRI_T30) }, ++ { APALIS_T30_IT, "Apalis T30 1GB IT", TARGET_IS_ENABLED(APALIS_T30) }, ++ { COLIBRI_IMX7S, "Colibri iMX7S 256MB", TARGET_IS_ENABLED(COLIBRI_IMX7) }, ++ { COLIBRI_IMX7D, "Colibri iMX7D 512MB", TARGET_IS_ENABLED(COLIBRI_IMX7) }, ++ { APALIS_TK1_2GB, "Apalis TK1 2GB", TARGET_IS_ENABLED(APALIS_TK1) }, ++ { APALIS_IMX6D_IT, "Apalis iMX6D 1GB IT", TARGET_IS_ENABLED(APALIS_IMX6) }, ++ { COLIBRI_IMX6ULL, "Colibri iMX6ULL 256MB", TARGET_IS_ENABLED(COLIBRI_IMX6ULL) }, ++ { APALIS_IMX8QM_WIFI_BT_IT, "Apalis iMX8QM 4GB WB IT", TARGET_IS_ENABLED(APALIS_IMX8) }, ++ { COLIBRI_IMX8QXP_WIFI_BT_IT, "Colibri iMX8QXP 2GB WB IT", TARGET_IS_ENABLED(COLIBRI_IMX8X) }, ++ { COLIBRI_IMX7D_EMMC, "Colibri iMX7D 1GB", TARGET_IS_ENABLED(COLIBRI_IMX7) }, ++ { COLIBRI_IMX6ULL_WIFI_BT_IT, "Colibri iMX6ULL 512MB WB IT", TARGET_IS_ENABLED(COLIBRI_IMX6ULL) }, ++ { COLIBRI_IMX7D_EPDC, "Colibri iMX7D 512MB EPDC", TARGET_IS_ENABLED(COLIBRI_IMX7) }, ++ { APALIS_TK1_4GB, "Apalis TK1 4GB", TARGET_IS_ENABLED(APALIS_TK1) }, ++ { COLIBRI_T20_512MB_IT_SETEK, "Colibri T20 512MB IT SETEK", TARGET_IS_ENABLED(COLIBRI_T20) }, ++ { COLIBRI_IMX6ULL_IT, "Colibri iMX6ULL 512MB IT", TARGET_IS_ENABLED(COLIBRI_IMX6ULL) }, ++ { COLIBRI_IMX6ULL_WIFI_BT, "Colibri iMX6ULL 512MB WB", TARGET_IS_ENABLED(COLIBRI_IMX6ULL) }, ++ { APALIS_IMX8QXP_WIFI_BT_IT, "Apalis iMX8QXP 2GB WB IT", 0 }, ++ { APALIS_IMX8QM_IT, "Apalis iMX8QM 4GB IT", TARGET_IS_ENABLED(APALIS_IMX8) }, ++ { APALIS_IMX8QP_WIFI_BT, "Apalis iMX8QP 2GB WB", TARGET_IS_ENABLED(APALIS_IMX8) }, ++ { APALIS_IMX8QP, "Apalis iMX8QP 2GB", TARGET_IS_ENABLED(APALIS_IMX8) }, ++ { COLIBRI_IMX8QXP_IT, "Colibri iMX8QXP 2GB IT", TARGET_IS_ENABLED(COLIBRI_IMX8X) }, ++ { COLIBRI_IMX8DX_WIFI_BT, "Colibri iMX8DX 1GB WB", TARGET_IS_ENABLED(COLIBRI_IMX8X) }, ++ { COLIBRI_IMX8DX, "Colibri iMX8DX 1GB", TARGET_IS_ENABLED(COLIBRI_IMX8X) }, ++ { APALIS_IMX8QXP, "Apalis iMX8QXP 2GB ECC IT", 0 }, ++ { APALIS_IMX8DXP, "Apalis iMX8DXP 1GB", TARGET_IS_ENABLED(APALIS_IMX8) }, ++ { VERDIN_IMX8MMQ_WIFI_BT_IT, "Verdin iMX8M Mini Quad 2GB WB IT", TARGET_IS_ENABLED(VERDIN_IMX8MM) }, ++ { VERDIN_IMX8MNQ_WIFI_BT, "Verdin iMX8M Nano Quad 1GB WB", 0 }, ++ { VERDIN_IMX8MMDL, "Verdin iMX8M Mini DualLite 1GB", TARGET_IS_ENABLED(VERDIN_IMX8MM) }, ++ { VERDIN_IMX8MPQ_WIFI_BT_IT, "Verdin iMX8M Plus Quad 4GB WB IT", TARGET_IS_ENABLED(VERDIN_IMX8MP) }, ++ { VERDIN_IMX8MMQ_IT, "Verdin iMX8M Mini Quad 2GB IT", TARGET_IS_ENABLED(VERDIN_IMX8MM) }, ++ { VERDIN_IMX8MMDL_WIFI_BT_IT, "Verdin iMX8M Mini DualLite 1GB WB IT", TARGET_IS_ENABLED(VERDIN_IMX8MM) }, ++ { VERDIN_IMX8MPQ, "Verdin iMX8M Plus Quad 2GB", TARGET_IS_ENABLED(VERDIN_IMX8MP) }, ++ { COLIBRI_IMX6ULL_IT_EMMC, "Colibri iMX6ULL 1GB IT", TARGET_IS_ENABLED(COLIBRI_IMX6ULL) }, ++ { VERDIN_IMX8MPQ_IT, "Verdin iMX8M Plus Quad 4GB IT", TARGET_IS_ENABLED(VERDIN_IMX8MP) }, ++ { VERDIN_IMX8MPQ_2GB_WIFI_BT_IT, "Verdin iMX8M Plus Quad 2GB WB IT", TARGET_IS_ENABLED(VERDIN_IMX8MP) }, ++ { VERDIN_IMX8MPQL_IT, "Verdin iMX8M Plus QuadLite 1GB IT", TARGET_IS_ENABLED(VERDIN_IMX8MP) }, ++ { VERDIN_IMX8MPQ_8GB_WIFI_BT, "Verdin iMX8M Plus Quad 8GB WB", TARGET_IS_ENABLED(VERDIN_IMX8MP) }, ++ { APALIS_IMX8QM_8GB_WIFI_BT_IT, "Apalis iMX8QM 8GB WB IT", TARGET_IS_ENABLED(APALIS_IMX8) }, ++ { VERDIN_IMX8MMQ_WIFI_BT_IT_NO_CAN, "Verdin iMX8M Mini Quad 2GB WB IT", TARGET_IS_ENABLED(VERDIN_IMX8MM) }, ++ { VERDIN_AM62Q_WIFI_BT_IT, "Verdin AM62 Quad 1GB WB IT", TARGET_IS_ENABLED(VERDIN_AM62_A53) }, ++ { VERDIN_IMX8MPQ_8GB_WIFI_BT_IT, "Verdin iMX8M Plus Quad 8GB WB IT", TARGET_IS_ENABLED(VERDIN_IMX8MP) }, ++ { VERDIN_AM62S_512MB, "Verdin AM62 Solo 512MB", TARGET_IS_ENABLED(VERDIN_AM62_A53) }, ++ { VERDIN_AM62S_512MB_WIFI_BT_IT, "Verdin AM62 Solo 512MB WB IT", TARGET_IS_ENABLED(VERDIN_AM62_A53) }, ++ { VERDIN_AM62D_1G_ET, "Verdin AM62 Dual 1GB ET", TARGET_IS_ENABLED(VERDIN_AM62_A53) }, ++ { VERDIN_AM62D_1G_IT, "Verdin AM62 Dual 1GB IT", TARGET_IS_ENABLED(VERDIN_AM62_A53) }, ++ { VERDIN_AM62D_1G_WIFI_BT_IT, "Verdin AM62 Dual 1GB WB IT", TARGET_IS_ENABLED(VERDIN_AM62_A53) }, ++ { VERDIN_AM62Q_2G_WIFI_BT_IT, "Verdin AM62 Quad 2GB WB IT", TARGET_IS_ENABLED(VERDIN_AM62_A53) }, ++ { COLIBRI_IMX6S_NOWINCE, "Colibri iMX6S 256MB", TARGET_IS_ENABLED(COLIBRI_IMX6) }, ++ { COLIBRI_IMX6S_IT_NOWINCE, "Colibri iMX6S 256MB IT", TARGET_IS_ENABLED(COLIBRI_IMX6) }, ++ { COLIBRI_IMX6DL_NOWINCE, "Colibri iMX6DL 512MB", TARGET_IS_ENABLED(COLIBRI_IMX6) }, ++ { COLIBRI_IMX6DL_IT_NOWINCE, "Colibri iMX6DL 512MB IT", TARGET_IS_ENABLED(COLIBRI_IMX6) }, ++ { COLIBRI_IMX7D_NOWINCE, "Colibri iMX7D 512MB", TARGET_IS_ENABLED(COLIBRI_IMX7) }, ++ { APALIS_IMX6D_NOWINCE, "Apalis iMX6D 512MB", TARGET_IS_ENABLED(APALIS_IMX6) }, ++ { APALIS_IMX6Q_NOWINCE, "Apalis iMX6Q 1GB", TARGET_IS_ENABLED(APALIS_IMX6) }, ++ { APALIS_IMX6D_IT_NOWINCE, "Apalis iMX6D 1GB IT", TARGET_IS_ENABLED(APALIS_IMX6) }, ++ { APALIS_IMX6Q_IT_NOWINCE, "Apalis iMX6Q 2GB IT", TARGET_IS_ENABLED(APALIS_IMX6) }, ++ { VERDIN_IMX8MMDL_2G_IT, "Verdin iMX8M Mini DualLite 2GB IT", TARGET_IS_ENABLED(VERDIN_IMX8MM) }, ++ { VERDIN_IMX8MMQ_2G_IT_NO_CAN, "Verdin iMX8M Mini Quad 2GB IT", TARGET_IS_ENABLED(VERDIN_IMX8MM) }, ++ { AQUILA_AM69O_32G_WIFI_BT_IT, "Aquila AM69 Octa 32GB WB IT", TARGET_IS_ENABLED(AQUILA_AM69_A72) }, ++ { VERDIN_IMX95H_16G_WIFI_BT_IT, "Verdin iMX95 Hexa 16GB WB IT", TARGET_IS_ENABLED(VERDIN_IMX95) }, ++ { VERDIN_IMX8MMQ_4G_WIFI_BT_ET, "Verdin iMX8M Mini Quad 4GB WB ET", TARGET_IS_ENABLED(VERDIN_IMX8MM) }, ++ { APALIS_IMX8QM_WIFI_BT_IT_1300MHZ, "Apalis iMX8QM 4GB WB IT", TARGET_IS_ENABLED(APALIS_IMX8) }, ++ { APALIS_IMX8QM_IT_1300MHZ, "Apalis iMX8QM 4GB IT", TARGET_IS_ENABLED(APALIS_IMX8) }, ++ { APALIS_IMX8QP_WIFI_BT_1300MHZ, "Apalis iMX8QP 2GB WB", TARGET_IS_ENABLED(APALIS_IMX8) }, ++ { APALIS_IMX8QP_1300MHZ, "Apalis iMX8QP 2GB", TARGET_IS_ENABLED(APALIS_IMX8) }, ++ { APALIS_IMX8QM_8GB_WIFI_BT_IT_1300MHZ, "Apalis iMX8QM 8GB WB IT", TARGET_IS_ENABLED(APALIS_IMX8) }, ++ { SMARC_IMX95_HEXA_8GB_WB_IT, "SMARC iMX95 Hexa 8GB WB IT", 0 }, ++ { SMARC_IMX8MPQ_4GB_WB_IT, "SMARC iMX8M Plus Quad 4GB WB IT", TARGET_IS_ENABLED(TORADEX_SMARC_IMX8MP) }, + }; + + struct pid4list { +@@ -185,6 +193,20 @@ + [1] = 0x8c06cbUL, + }; + ++int get_toradex_modules_idx(int pid4) ++{ ++ int i, index = 0; ++ ++ for (i = 1; i < ARRAY_SIZE(toradex_modules); i++) { ++ if (pid4 == toradex_modules[i].pid4) { ++ index = i; ++ break; ++ } ++ } ++ ++ return index; ++} ++ + const char * const get_toradex_carrier_boards(int pid4) + { + int i, index = 0; +@@ -358,7 +380,7 @@ + + int read_tdx_cfg_block(void) + { +- int ret = 0; ++ int idx, ret = 0; + u8 *config_block = NULL; + struct toradex_tag *tag; + size_t size = TDX_CFG_BLOCK_MAX_SIZE; +@@ -427,7 +449,8 @@ + } + + /* Cap product id to avoid issues with a yet unknown one */ +- if (tdx_hw_tag.prodid >= ARRAY_SIZE(toradex_modules)) ++ idx = get_toradex_modules_idx(tdx_hw_tag.prodid); ++ if (!toradex_modules[idx].pid4) + tdx_hw_tag.prodid = 0; + + out: +@@ -453,19 +476,21 @@ + int len = 0; + int ret = 0; + unsigned int prodid; +- int i; ++ int i, idx; + + printf("Enabled modules:\n"); + for (i = 0; i < ARRAY_SIZE(toradex_modules); i++) { + if (toradex_modules[i].is_enabled) +- printf(" %04d %s\n", i, toradex_modules[i].name); ++ printf(" %04d %s\n", toradex_modules[i].pid4, ++ toradex_modules[i].name); + } + + sprintf(message, "Enter the module ID: "); + len = cli_readline(message); + + prodid = dectoul(console_buffer, NULL); +- if (prodid >= ARRAY_SIZE(toradex_modules) || !toradex_modules[prodid].is_enabled) { ++ idx = get_toradex_modules_idx(prodid); ++ if (!toradex_modules[idx].pid4 || !toradex_modules[idx].is_enabled) { + printf("Parsing module id failed\n"); + return -1; + } diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0009-tdx-cfg-block.h.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0009-tdx-cfg-block.h.patch new file mode 100644 index 0000000..5f4ae06 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0009-tdx-cfg-block.h.patch @@ -0,0 +1,35 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/board/toradex/common/tdx-cfg-block.h 2025-11-21 14:56:51.518386446 +0100 ++++ ./board/toradex/common/tdx-cfg-block.h 2025-11-21 14:54:55.266914032 +0100 +@@ -21,6 +21,7 @@ + } __attribute__((__packed__)); + + struct toradex_som { ++ int pid4; + const char *name; + int is_enabled; + }; +@@ -113,6 +114,16 @@ + APALIS_IMX6Q_IT_NOWINCE, /* 85 */ + VERDIN_IMX8MMDL_2G_IT, + VERDIN_IMX8MMQ_2G_IT_NO_CAN, ++ AQUILA_AM69O_32G_WIFI_BT_IT, ++ VERDIN_IMX95H_16G_WIFI_BT_IT, ++ VERDIN_IMX8MMQ_4G_WIFI_BT_ET, /* 90 */ ++ APALIS_IMX8QM_WIFI_BT_IT_1300MHZ, ++ APALIS_IMX8QM_IT_1300MHZ, ++ APALIS_IMX8QP_WIFI_BT_1300MHZ, ++ APALIS_IMX8QP_1300MHZ, ++ APALIS_IMX8QM_8GB_WIFI_BT_IT_1300MHZ, /* 95 */ ++ SMARC_IMX95_HEXA_8GB_WB_IT, ++ SMARC_IMX8MPQ_4GB_WB_IT, + }; + + enum { +@@ -136,6 +147,7 @@ + + int read_tdx_cfg_block(void); + int read_tdx_cfg_block_carrier(void); ++int get_toradex_modules_idx(int pid4); + const char * const get_toradex_carrier_boards(int pid4); + const char * const get_toradex_display_adapters(int pid4); + int try_migrate_tdx_cfg_block_carrier(void); diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0010-tdx-common.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0010-tdx-common.c.patch new file mode 100644 index 0000000..afb0e19 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0010-tdx-common.c.patch @@ -0,0 +1,20 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/board/toradex/common/tdx-common.c 2025-11-21 14:56:51.518386446 +0100 ++++ ./board/toradex/common/tdx-common.c 2025-11-21 14:54:55.266838468 +0100 +@@ -191,13 +191,16 @@ + static int tdx_get_str(struct udevice *dev, int id, size_t size, char *val) + { + int ret = -ENOTSUPP; ++ int idx; + + switch (id) { + case SYSINFO_ID_BOARD_MODEL: ++ idx = get_toradex_modules_idx(tdx_hw_tag.prodid); ++ + snprintf(val, size, + "Toradex %04d %s %s", + tdx_hw_tag.prodid, +- toradex_modules[tdx_hw_tag.prodid].name, ++ toradex_modules[idx].name, + tdx_board_rev_str); + + ret = 0; diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0011-imximage.cfg.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0011-imximage.cfg.patch new file mode 100644 index 0000000..f655fd3 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0011-imximage.cfg.patch @@ -0,0 +1,9 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/board/toradex/smarc-imx8mp/imximage.cfg 1970-01-01 01:00:00.000000000 +0100 ++++ ./board/toradex/smarc-imx8mp/imximage.cfg 2025-11-21 14:54:55.267341960 +0100 +@@ -0,0 +1,6 @@ ++/* SPDX-License-Identifier: GPL-2.0-or-later */ ++/* Copyright (C) 2024 Toradex */ ++ ++ROM_VERSION v2 ++BOOT_FROM emmc_fastboot ++LOADER u-boot-spl-ddr.bin 0x920000 diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0012-Kconfig.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0012-Kconfig.patch new file mode 100644 index 0000000..8378e73 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0012-Kconfig.patch @@ -0,0 +1,42 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/board/toradex/smarc-imx8mp/Kconfig 1970-01-01 01:00:00.000000000 +0100 ++++ ./board/toradex/smarc-imx8mp/Kconfig 2025-11-21 14:54:55.267305134 +0100 +@@ -0,0 +1,39 @@ ++if TARGET_TORADEX_SMARC_IMX8MP ++ ++config IMX_CONFIG ++ default "board/toradex/smarc-imx8mp/imximage.cfg" ++ ++config SYS_BOARD ++ default "smarc-imx8mp" ++ ++config SYS_CONFIG_NAME ++ default "toradex-smarc-imx8mp" ++ ++config SYS_VENDOR ++ default "toradex" ++ ++config TDX_CFG_BLOCK ++ default y ++ ++config TDX_CFG_BLOCK_2ND_ETHADDR ++ default y ++ ++config TDX_CFG_BLOCK_DEV ++ default "0" ++ ++# Toradex config block in eMMC, at the end of 1st "boot sector" ++config TDX_CFG_BLOCK_OFFSET ++ default "-512" ++ ++config TDX_CFG_BLOCK_PART ++ default "1" ++ ++config TDX_HAVE_EEPROM_EXTRA ++ default y ++ ++config TDX_HAVE_MMC ++ default y ++ ++source "board/toradex/common/Kconfig" ++ ++endif diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0013-lpddr4_timing.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0013-lpddr4_timing.c.patch new file mode 100644 index 0000000..d6c4376 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0013-lpddr4_timing.c.patch @@ -0,0 +1,1906 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/board/toradex/smarc-imx8mp/lpddr4_timing.c 1970-01-01 01:00:00.000000000 +0100 ++++ ./board/toradex/smarc-imx8mp/lpddr4_timing.c 2025-11-21 14:54:55.267354512 +0100 +@@ -0,0 +1,1903 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later ++/* Copyright (C) 2024 Toradex */ ++ ++#include ++#include ++ ++#include "lpddr4_timing.h" ++ ++struct dram_cfg_param ddr_ddrc_cfg_single_rank_patch[] = { ++ { 0x3d400000, 0xa1080020}, ++ { 0x3d400200, 0x1f}, ++ { 0x3d40021c, 0xf07} ++}; ++ ++struct dram_cfg_param ddr_fsp0_cfg_single_rank_patch[] = { ++ { 0x54012, 0x110}, ++ { 0x5402c, 0x1} ++}; ++ ++struct dram_cfg_param ddr_fsp1_cfg_single_rank_patch[] = { ++ { 0x54012, 0x110}, ++ { 0x5402c, 0x1} ++}; ++ ++struct dram_cfg_param ddr_fsp2_cfg_single_rank_patch[] = { ++ { 0x54012, 0x110}, ++ { 0x5402c, 0x1} ++}; ++ ++struct dram_cfg_param ddr_fsp0_2d_cfg_single_rank_patch[] = { ++ { 0x54012, 0x110}, ++ { 0x5402c, 0x1} ++}; ++ ++struct dram_cfg_param ddr_ddrc_cfg[] = { ++ /** Initialize DDRC registers **/ ++ { 0x3d400304, 0x1 }, ++ { 0x3d400030, 0x1 }, ++ { 0x3d400000, 0xa3080020 }, ++ { 0x3d400020, 0x1303 }, ++ { 0x3d400024, 0x1e84800 }, ++ { 0x3d400064, 0x7a017c }, ++ { 0x3d400070, 0x7027f90 }, ++ { 0x3d400074, 0x790 }, ++ { 0x3d4000d0, 0xc00307a3 }, ++ { 0x3d4000d4, 0xc50000 }, ++ { 0x3d4000dc, 0xf4003f }, ++ { 0x3d4000e0, 0x330000 }, ++ { 0x3d4000e8, 0x660048 }, ++ { 0x3d4000ec, 0x160048 }, ++ { 0x3d400100, 0x2028222a }, ++ { 0x3d400104, 0x8083f }, ++ { 0x3d40010c, 0xe0e000 }, ++ { 0x3d400110, 0x12040a12 }, ++ { 0x3d400114, 0x2050f0f }, ++ { 0x3d400118, 0x1010009 }, ++ { 0x3d40011c, 0x502 }, ++ { 0x3d400130, 0x20800 }, ++ { 0x3d400134, 0xe100002 }, ++ { 0x3d400138, 0x184 }, ++ { 0x3d400144, 0xc80064 }, ++ { 0x3d400180, 0x3e8001e }, ++ { 0x3d400184, 0x3207a12 }, ++ { 0x3d400188, 0x0 }, ++ { 0x3d400190, 0x49f820e }, ++ { 0x3d400194, 0x80303 }, ++ { 0x3d4001b4, 0x1f0e }, ++ { 0x3d4001a0, 0xe0400018 }, ++ { 0x3d4001a4, 0xdf00e4 }, ++ { 0x3d4001a8, 0x80000000 }, ++ { 0x3d4001b0, 0x11 }, ++ { 0x3d4001c0, 0x1 }, ++ { 0x3d4001c4, 0x1 }, ++ { 0x3d4000f4, 0x799 }, ++ { 0x3d400108, 0x9121b1c }, ++ { 0x3d400200, 0x17 }, ++ { 0x3d400208, 0x0 }, ++ { 0x3d40020c, 0x0 }, ++ { 0x3d400210, 0x1f1f }, ++ { 0x3d400204, 0x80808 }, ++ { 0x3d400214, 0x7070707 }, ++ { 0x3d400218, 0x7070707 }, ++ { 0x3d40021c, 0xf08 }, ++ { 0x3d400250, 0x1705 }, ++ { 0x3d400254, 0x2c }, ++ { 0x3d40025c, 0x4000030 }, ++ { 0x3d400264, 0x900093e7 }, ++ { 0x3d40026c, 0x2005574 }, ++ { 0x3d400400, 0x111 }, ++ { 0x3d400404, 0x72ff }, ++ { 0x3d400408, 0x72ff }, ++ { 0x3d400494, 0x2100e07 }, ++ { 0x3d400498, 0x620096 }, ++ { 0x3d40049c, 0x1100e07 }, ++ { 0x3d4004a0, 0xc8012c }, ++ { 0x3d402020, 0x1001 }, ++ { 0x3d402024, 0x30d400 }, ++ { 0x3d402050, 0x20d000 }, ++ { 0x3d402064, 0xc0026 }, ++ { 0x3d4020dc, 0x840000 }, ++ { 0x3d4020e0, 0x330000 }, ++ { 0x3d4020e8, 0x660048 }, ++ { 0x3d4020ec, 0x160048 }, ++ { 0x3d402100, 0xa040305 }, ++ { 0x3d402104, 0x30407 }, ++ { 0x3d402108, 0x203060b }, ++ { 0x3d40210c, 0x505000 }, ++ { 0x3d402110, 0x2040202 }, ++ { 0x3d402114, 0x2030202 }, ++ { 0x3d402118, 0x1010004 }, ++ { 0x3d40211c, 0x302 }, ++ { 0x3d402130, 0x20300 }, ++ { 0x3d402134, 0xa100002 }, ++ { 0x3d402138, 0x27 }, ++ { 0x3d402144, 0x14000a }, ++ { 0x3d402180, 0x640004 }, ++ { 0x3d402190, 0x3818200 }, ++ { 0x3d402194, 0x80303 }, ++ { 0x3d4021b4, 0x100 }, ++ { 0x3d4020f4, 0x599 }, ++ { 0x3d403020, 0x1001 }, ++ { 0x3d403024, 0xc3500 }, ++ { 0x3d403050, 0x20d000 }, ++ { 0x3d403064, 0x3000a }, ++ { 0x3d4030dc, 0x840000 }, ++ { 0x3d4030e0, 0x330000 }, ++ { 0x3d4030e8, 0x660048 }, ++ { 0x3d4030ec, 0x160048 }, ++ { 0x3d403100, 0xa010102 }, ++ { 0x3d403104, 0x30404 }, ++ { 0x3d403108, 0x203060b }, ++ { 0x3d40310c, 0x505000 }, ++ { 0x3d403110, 0x2040202 }, ++ { 0x3d403114, 0x2030202 }, ++ { 0x3d403118, 0x1010004 }, ++ { 0x3d40311c, 0x302 }, ++ { 0x3d403130, 0x20300 }, ++ { 0x3d403134, 0xa100002 }, ++ { 0x3d403138, 0xa }, ++ { 0x3d403144, 0x50003 }, ++ { 0x3d403180, 0x190004 }, ++ { 0x3d403190, 0x3818200 }, ++ { 0x3d403194, 0x80303 }, ++ { 0x3d4031b4, 0x100 }, ++ { 0x3d4030f4, 0x599 }, ++ { 0x3d400028, 0x0 }, ++}; ++ ++/* PHY Initialize Configuration */ ++struct dram_cfg_param ddr_ddrphy_cfg[] = { ++ { 0x100a0, 0x1 }, ++ { 0x100a1, 0x6 }, ++ { 0x100a2, 0x4 }, ++ { 0x100a3, 0x3 }, ++ { 0x100a4, 0x2 }, ++ { 0x100a5, 0x7 }, ++ { 0x100a6, 0x5 }, ++ { 0x100a7, 0x0 }, ++ { 0x110a0, 0x0 }, ++ { 0x110a1, 0x1 }, ++ { 0x110a2, 0x3 }, ++ { 0x110a3, 0x4 }, ++ { 0x110a4, 0x5 }, ++ { 0x110a5, 0x2 }, ++ { 0x110a6, 0x6 }, ++ { 0x110a7, 0x7 }, ++ { 0x120a0, 0x0 }, ++ { 0x120a1, 0x1 }, ++ { 0x120a2, 0x3 }, ++ { 0x120a3, 0x2 }, ++ { 0x120a4, 0x5 }, ++ { 0x120a5, 0x4 }, ++ { 0x120a6, 0x6 }, ++ { 0x120a7, 0x7 }, ++ { 0x130a0, 0x0 }, ++ { 0x130a1, 0x1 }, ++ { 0x130a2, 0x4 }, ++ { 0x130a3, 0x3 }, ++ { 0x130a4, 0x2 }, ++ { 0x130a5, 0x6 }, ++ { 0x130a6, 0x5 }, ++ { 0x130a7, 0x7 }, ++ { 0x1005f, 0x1ff }, ++ { 0x1015f, 0x1ff }, ++ { 0x1105f, 0x1ff }, ++ { 0x1115f, 0x1ff }, ++ { 0x1205f, 0x1ff }, ++ { 0x1215f, 0x1ff }, ++ { 0x1305f, 0x1ff }, ++ { 0x1315f, 0x1ff }, ++ { 0x11005f, 0x1ff }, ++ { 0x11015f, 0x1ff }, ++ { 0x11105f, 0x1ff }, ++ { 0x11115f, 0x1ff }, ++ { 0x11205f, 0x1ff }, ++ { 0x11215f, 0x1ff }, ++ { 0x11305f, 0x1ff }, ++ { 0x11315f, 0x1ff }, ++ { 0x21005f, 0x1ff }, ++ { 0x21015f, 0x1ff }, ++ { 0x21105f, 0x1ff }, ++ { 0x21115f, 0x1ff }, ++ { 0x21205f, 0x1ff }, ++ { 0x21215f, 0x1ff }, ++ { 0x21305f, 0x1ff }, ++ { 0x21315f, 0x1ff }, ++ { 0x55, 0x1ff }, ++ { 0x1055, 0x1ff }, ++ { 0x2055, 0x1ff }, ++ { 0x3055, 0x1ff }, ++ { 0x4055, 0x1ff }, ++ { 0x5055, 0x1ff }, ++ { 0x6055, 0x1ff }, ++ { 0x7055, 0x1ff }, ++ { 0x8055, 0x1ff }, ++ { 0x9055, 0x1ff }, ++ { 0x200c5, 0x18 }, ++ { 0x1200c5, 0x7 }, ++ { 0x2200c5, 0x7 }, ++ { 0x2002e, 0x2 }, ++ { 0x12002e, 0x2 }, ++ { 0x22002e, 0x2 }, ++ { 0x90204, 0x0 }, ++ { 0x190204, 0x0 }, ++ { 0x290204, 0x0 }, ++ { 0x20024, 0x1e3 }, ++ { 0x2003a, 0x2 }, ++ { 0x120024, 0x1e3 }, ++ { 0x2003a, 0x2 }, ++ { 0x220024, 0x1e3 }, ++ { 0x2003a, 0x2 }, ++ { 0x20056, 0x3 }, ++ { 0x120056, 0x3 }, ++ { 0x220056, 0x3 }, ++ { 0x1004d, 0xe00 }, ++ { 0x1014d, 0xe00 }, ++ { 0x1104d, 0xe00 }, ++ { 0x1114d, 0xe00 }, ++ { 0x1204d, 0xe00 }, ++ { 0x1214d, 0xe00 }, ++ { 0x1304d, 0xe00 }, ++ { 0x1314d, 0xe00 }, ++ { 0x11004d, 0xe00 }, ++ { 0x11014d, 0xe00 }, ++ { 0x11104d, 0xe00 }, ++ { 0x11114d, 0xe00 }, ++ { 0x11204d, 0xe00 }, ++ { 0x11214d, 0xe00 }, ++ { 0x11304d, 0xe00 }, ++ { 0x11314d, 0xe00 }, ++ { 0x21004d, 0xe00 }, ++ { 0x21014d, 0xe00 }, ++ { 0x21104d, 0xe00 }, ++ { 0x21114d, 0xe00 }, ++ { 0x21204d, 0xe00 }, ++ { 0x21214d, 0xe00 }, ++ { 0x21304d, 0xe00 }, ++ { 0x21314d, 0xe00 }, ++ { 0x10049, 0xeba }, ++ { 0x10149, 0xeba }, ++ { 0x11049, 0xeba }, ++ { 0x11149, 0xeba }, ++ { 0x12049, 0xeba }, ++ { 0x12149, 0xeba }, ++ { 0x13049, 0xeba }, ++ { 0x13149, 0xeba }, ++ { 0x110049, 0xeba }, ++ { 0x110149, 0xeba }, ++ { 0x111049, 0xeba }, ++ { 0x111149, 0xeba }, ++ { 0x112049, 0xeba }, ++ { 0x112149, 0xeba }, ++ { 0x113049, 0xeba }, ++ { 0x113149, 0xeba }, ++ { 0x210049, 0xeba }, ++ { 0x210149, 0xeba }, ++ { 0x211049, 0xeba }, ++ { 0x211149, 0xeba }, ++ { 0x212049, 0xeba }, ++ { 0x212149, 0xeba }, ++ { 0x213049, 0xeba }, ++ { 0x213149, 0xeba }, ++ { 0x43, 0x63 }, ++ { 0x1043, 0x63 }, ++ { 0x2043, 0x63 }, ++ { 0x3043, 0x63 }, ++ { 0x4043, 0x63 }, ++ { 0x5043, 0x63 }, ++ { 0x6043, 0x63 }, ++ { 0x7043, 0x63 }, ++ { 0x8043, 0x63 }, ++ { 0x9043, 0x63 }, ++ { 0x20018, 0x3 }, ++ { 0x20075, 0x4 }, ++ { 0x20050, 0x0 }, ++ { 0x20008, 0x3e8 }, ++ { 0x120008, 0x64 }, ++ { 0x220008, 0x19 }, ++ { 0x20088, 0x9 }, ++ { 0x200b2, 0x104 }, ++ { 0x10043, 0x5a1 }, ++ { 0x10143, 0x5a1 }, ++ { 0x11043, 0x5a1 }, ++ { 0x11143, 0x5a1 }, ++ { 0x12043, 0x5a1 }, ++ { 0x12143, 0x5a1 }, ++ { 0x13043, 0x5a1 }, ++ { 0x13143, 0x5a1 }, ++ { 0x1200b2, 0x104 }, ++ { 0x110043, 0x5a1 }, ++ { 0x110143, 0x5a1 }, ++ { 0x111043, 0x5a1 }, ++ { 0x111143, 0x5a1 }, ++ { 0x112043, 0x5a1 }, ++ { 0x112143, 0x5a1 }, ++ { 0x113043, 0x5a1 }, ++ { 0x113143, 0x5a1 }, ++ { 0x2200b2, 0x104 }, ++ { 0x210043, 0x5a1 }, ++ { 0x210143, 0x5a1 }, ++ { 0x211043, 0x5a1 }, ++ { 0x211143, 0x5a1 }, ++ { 0x212043, 0x5a1 }, ++ { 0x212143, 0x5a1 }, ++ { 0x213043, 0x5a1 }, ++ { 0x213143, 0x5a1 }, ++ { 0x200fa, 0x1 }, ++ { 0x1200fa, 0x1 }, ++ { 0x2200fa, 0x1 }, ++ { 0x20019, 0x1 }, ++ { 0x120019, 0x1 }, ++ { 0x220019, 0x1 }, ++ { 0x200f0, 0x660 }, ++ { 0x200f1, 0x0 }, ++ { 0x200f2, 0x4444 }, ++ { 0x200f3, 0x8888 }, ++ { 0x200f4, 0x5665 }, ++ { 0x200f5, 0x0 }, ++ { 0x200f6, 0x0 }, ++ { 0x200f7, 0xf000 }, ++ { 0x20025, 0x0 }, ++ { 0x2002d, 0x0 }, ++ { 0x12002d, 0x0 }, ++ { 0x22002d, 0x0 }, ++ { 0x2007d, 0x212 }, ++ { 0x12007d, 0x212 }, ++ { 0x22007d, 0x212 }, ++ { 0x2007c, 0x61 }, ++ { 0x12007c, 0x61 }, ++ { 0x22007c, 0x61 }, ++ { 0x1004a, 0x500 }, ++ { 0x1104a, 0x500 }, ++ { 0x1204a, 0x500 }, ++ { 0x1304a, 0x500 }, ++ { 0x2002c, 0x0 }, ++}; ++ ++/* ddr phy trained csr */ ++struct dram_cfg_param ddr_ddrphy_trained_csr[] = { ++ { 0x200b2, 0x0 }, ++ { 0x1200b2, 0x0 }, ++ { 0x2200b2, 0x0 }, ++ { 0x200cb, 0x0 }, ++ { 0x10043, 0x0 }, ++ { 0x110043, 0x0 }, ++ { 0x210043, 0x0 }, ++ { 0x10143, 0x0 }, ++ { 0x110143, 0x0 }, ++ { 0x210143, 0x0 }, ++ { 0x11043, 0x0 }, ++ { 0x111043, 0x0 }, ++ { 0x211043, 0x0 }, ++ { 0x11143, 0x0 }, ++ { 0x111143, 0x0 }, ++ { 0x211143, 0x0 }, ++ { 0x12043, 0x0 }, ++ { 0x112043, 0x0 }, ++ { 0x212043, 0x0 }, ++ { 0x12143, 0x0 }, ++ { 0x112143, 0x0 }, ++ { 0x212143, 0x0 }, ++ { 0x13043, 0x0 }, ++ { 0x113043, 0x0 }, ++ { 0x213043, 0x0 }, ++ { 0x13143, 0x0 }, ++ { 0x113143, 0x0 }, ++ { 0x213143, 0x0 }, ++ { 0x80, 0x0 }, ++ { 0x100080, 0x0 }, ++ { 0x200080, 0x0 }, ++ { 0x1080, 0x0 }, ++ { 0x101080, 0x0 }, ++ { 0x201080, 0x0 }, ++ { 0x2080, 0x0 }, ++ { 0x102080, 0x0 }, ++ { 0x202080, 0x0 }, ++ { 0x3080, 0x0 }, ++ { 0x103080, 0x0 }, ++ { 0x203080, 0x0 }, ++ { 0x4080, 0x0 }, ++ { 0x104080, 0x0 }, ++ { 0x204080, 0x0 }, ++ { 0x5080, 0x0 }, ++ { 0x105080, 0x0 }, ++ { 0x205080, 0x0 }, ++ { 0x6080, 0x0 }, ++ { 0x106080, 0x0 }, ++ { 0x206080, 0x0 }, ++ { 0x7080, 0x0 }, ++ { 0x107080, 0x0 }, ++ { 0x207080, 0x0 }, ++ { 0x8080, 0x0 }, ++ { 0x108080, 0x0 }, ++ { 0x208080, 0x0 }, ++ { 0x9080, 0x0 }, ++ { 0x109080, 0x0 }, ++ { 0x209080, 0x0 }, ++ { 0x10080, 0x0 }, ++ { 0x110080, 0x0 }, ++ { 0x210080, 0x0 }, ++ { 0x10180, 0x0 }, ++ { 0x110180, 0x0 }, ++ { 0x210180, 0x0 }, ++ { 0x11080, 0x0 }, ++ { 0x111080, 0x0 }, ++ { 0x211080, 0x0 }, ++ { 0x11180, 0x0 }, ++ { 0x111180, 0x0 }, ++ { 0x211180, 0x0 }, ++ { 0x12080, 0x0 }, ++ { 0x112080, 0x0 }, ++ { 0x212080, 0x0 }, ++ { 0x12180, 0x0 }, ++ { 0x112180, 0x0 }, ++ { 0x212180, 0x0 }, ++ { 0x13080, 0x0 }, ++ { 0x113080, 0x0 }, ++ { 0x213080, 0x0 }, ++ { 0x13180, 0x0 }, ++ { 0x113180, 0x0 }, ++ { 0x213180, 0x0 }, ++ { 0x10081, 0x0 }, ++ { 0x110081, 0x0 }, ++ { 0x210081, 0x0 }, ++ { 0x10181, 0x0 }, ++ { 0x110181, 0x0 }, ++ { 0x210181, 0x0 }, ++ { 0x11081, 0x0 }, ++ { 0x111081, 0x0 }, ++ { 0x211081, 0x0 }, ++ { 0x11181, 0x0 }, ++ { 0x111181, 0x0 }, ++ { 0x211181, 0x0 }, ++ { 0x12081, 0x0 }, ++ { 0x112081, 0x0 }, ++ { 0x212081, 0x0 }, ++ { 0x12181, 0x0 }, ++ { 0x112181, 0x0 }, ++ { 0x212181, 0x0 }, ++ { 0x13081, 0x0 }, ++ { 0x113081, 0x0 }, ++ { 0x213081, 0x0 }, ++ { 0x13181, 0x0 }, ++ { 0x113181, 0x0 }, ++ { 0x213181, 0x0 }, ++ { 0x100d0, 0x0 }, ++ { 0x1100d0, 0x0 }, ++ { 0x2100d0, 0x0 }, ++ { 0x101d0, 0x0 }, ++ { 0x1101d0, 0x0 }, ++ { 0x2101d0, 0x0 }, ++ { 0x110d0, 0x0 }, ++ { 0x1110d0, 0x0 }, ++ { 0x2110d0, 0x0 }, ++ { 0x111d0, 0x0 }, ++ { 0x1111d0, 0x0 }, ++ { 0x2111d0, 0x0 }, ++ { 0x120d0, 0x0 }, ++ { 0x1120d0, 0x0 }, ++ { 0x2120d0, 0x0 }, ++ { 0x121d0, 0x0 }, ++ { 0x1121d0, 0x0 }, ++ { 0x2121d0, 0x0 }, ++ { 0x130d0, 0x0 }, ++ { 0x1130d0, 0x0 }, ++ { 0x2130d0, 0x0 }, ++ { 0x131d0, 0x0 }, ++ { 0x1131d0, 0x0 }, ++ { 0x2131d0, 0x0 }, ++ { 0x100d1, 0x0 }, ++ { 0x1100d1, 0x0 }, ++ { 0x2100d1, 0x0 }, ++ { 0x101d1, 0x0 }, ++ { 0x1101d1, 0x0 }, ++ { 0x2101d1, 0x0 }, ++ { 0x110d1, 0x0 }, ++ { 0x1110d1, 0x0 }, ++ { 0x2110d1, 0x0 }, ++ { 0x111d1, 0x0 }, ++ { 0x1111d1, 0x0 }, ++ { 0x2111d1, 0x0 }, ++ { 0x120d1, 0x0 }, ++ { 0x1120d1, 0x0 }, ++ { 0x2120d1, 0x0 }, ++ { 0x121d1, 0x0 }, ++ { 0x1121d1, 0x0 }, ++ { 0x2121d1, 0x0 }, ++ { 0x130d1, 0x0 }, ++ { 0x1130d1, 0x0 }, ++ { 0x2130d1, 0x0 }, ++ { 0x131d1, 0x0 }, ++ { 0x1131d1, 0x0 }, ++ { 0x2131d1, 0x0 }, ++ { 0x10068, 0x0 }, ++ { 0x10168, 0x0 }, ++ { 0x10268, 0x0 }, ++ { 0x10368, 0x0 }, ++ { 0x10468, 0x0 }, ++ { 0x10568, 0x0 }, ++ { 0x10668, 0x0 }, ++ { 0x10768, 0x0 }, ++ { 0x10868, 0x0 }, ++ { 0x11068, 0x0 }, ++ { 0x11168, 0x0 }, ++ { 0x11268, 0x0 }, ++ { 0x11368, 0x0 }, ++ { 0x11468, 0x0 }, ++ { 0x11568, 0x0 }, ++ { 0x11668, 0x0 }, ++ { 0x11768, 0x0 }, ++ { 0x11868, 0x0 }, ++ { 0x12068, 0x0 }, ++ { 0x12168, 0x0 }, ++ { 0x12268, 0x0 }, ++ { 0x12368, 0x0 }, ++ { 0x12468, 0x0 }, ++ { 0x12568, 0x0 }, ++ { 0x12668, 0x0 }, ++ { 0x12768, 0x0 }, ++ { 0x12868, 0x0 }, ++ { 0x13068, 0x0 }, ++ { 0x13168, 0x0 }, ++ { 0x13268, 0x0 }, ++ { 0x13368, 0x0 }, ++ { 0x13468, 0x0 }, ++ { 0x13568, 0x0 }, ++ { 0x13668, 0x0 }, ++ { 0x13768, 0x0 }, ++ { 0x13868, 0x0 }, ++ { 0x10069, 0x0 }, ++ { 0x10169, 0x0 }, ++ { 0x10269, 0x0 }, ++ { 0x10369, 0x0 }, ++ { 0x10469, 0x0 }, ++ { 0x10569, 0x0 }, ++ { 0x10669, 0x0 }, ++ { 0x10769, 0x0 }, ++ { 0x10869, 0x0 }, ++ { 0x11069, 0x0 }, ++ { 0x11169, 0x0 }, ++ { 0x11269, 0x0 }, ++ { 0x11369, 0x0 }, ++ { 0x11469, 0x0 }, ++ { 0x11569, 0x0 }, ++ { 0x11669, 0x0 }, ++ { 0x11769, 0x0 }, ++ { 0x11869, 0x0 }, ++ { 0x12069, 0x0 }, ++ { 0x12169, 0x0 }, ++ { 0x12269, 0x0 }, ++ { 0x12369, 0x0 }, ++ { 0x12469, 0x0 }, ++ { 0x12569, 0x0 }, ++ { 0x12669, 0x0 }, ++ { 0x12769, 0x0 }, ++ { 0x12869, 0x0 }, ++ { 0x13069, 0x0 }, ++ { 0x13169, 0x0 }, ++ { 0x13269, 0x0 }, ++ { 0x13369, 0x0 }, ++ { 0x13469, 0x0 }, ++ { 0x13569, 0x0 }, ++ { 0x13669, 0x0 }, ++ { 0x13769, 0x0 }, ++ { 0x13869, 0x0 }, ++ { 0x1008c, 0x0 }, ++ { 0x11008c, 0x0 }, ++ { 0x21008c, 0x0 }, ++ { 0x1018c, 0x0 }, ++ { 0x11018c, 0x0 }, ++ { 0x21018c, 0x0 }, ++ { 0x1108c, 0x0 }, ++ { 0x11108c, 0x0 }, ++ { 0x21108c, 0x0 }, ++ { 0x1118c, 0x0 }, ++ { 0x11118c, 0x0 }, ++ { 0x21118c, 0x0 }, ++ { 0x1208c, 0x0 }, ++ { 0x11208c, 0x0 }, ++ { 0x21208c, 0x0 }, ++ { 0x1218c, 0x0 }, ++ { 0x11218c, 0x0 }, ++ { 0x21218c, 0x0 }, ++ { 0x1308c, 0x0 }, ++ { 0x11308c, 0x0 }, ++ { 0x21308c, 0x0 }, ++ { 0x1318c, 0x0 }, ++ { 0x11318c, 0x0 }, ++ { 0x21318c, 0x0 }, ++ { 0x1008d, 0x0 }, ++ { 0x11008d, 0x0 }, ++ { 0x21008d, 0x0 }, ++ { 0x1018d, 0x0 }, ++ { 0x11018d, 0x0 }, ++ { 0x21018d, 0x0 }, ++ { 0x1108d, 0x0 }, ++ { 0x11108d, 0x0 }, ++ { 0x21108d, 0x0 }, ++ { 0x1118d, 0x0 }, ++ { 0x11118d, 0x0 }, ++ { 0x21118d, 0x0 }, ++ { 0x1208d, 0x0 }, ++ { 0x11208d, 0x0 }, ++ { 0x21208d, 0x0 }, ++ { 0x1218d, 0x0 }, ++ { 0x11218d, 0x0 }, ++ { 0x21218d, 0x0 }, ++ { 0x1308d, 0x0 }, ++ { 0x11308d, 0x0 }, ++ { 0x21308d, 0x0 }, ++ { 0x1318d, 0x0 }, ++ { 0x11318d, 0x0 }, ++ { 0x21318d, 0x0 }, ++ { 0x100c0, 0x0 }, ++ { 0x1100c0, 0x0 }, ++ { 0x2100c0, 0x0 }, ++ { 0x101c0, 0x0 }, ++ { 0x1101c0, 0x0 }, ++ { 0x2101c0, 0x0 }, ++ { 0x102c0, 0x0 }, ++ { 0x1102c0, 0x0 }, ++ { 0x2102c0, 0x0 }, ++ { 0x103c0, 0x0 }, ++ { 0x1103c0, 0x0 }, ++ { 0x2103c0, 0x0 }, ++ { 0x104c0, 0x0 }, ++ { 0x1104c0, 0x0 }, ++ { 0x2104c0, 0x0 }, ++ { 0x105c0, 0x0 }, ++ { 0x1105c0, 0x0 }, ++ { 0x2105c0, 0x0 }, ++ { 0x106c0, 0x0 }, ++ { 0x1106c0, 0x0 }, ++ { 0x2106c0, 0x0 }, ++ { 0x107c0, 0x0 }, ++ { 0x1107c0, 0x0 }, ++ { 0x2107c0, 0x0 }, ++ { 0x108c0, 0x0 }, ++ { 0x1108c0, 0x0 }, ++ { 0x2108c0, 0x0 }, ++ { 0x110c0, 0x0 }, ++ { 0x1110c0, 0x0 }, ++ { 0x2110c0, 0x0 }, ++ { 0x111c0, 0x0 }, ++ { 0x1111c0, 0x0 }, ++ { 0x2111c0, 0x0 }, ++ { 0x112c0, 0x0 }, ++ { 0x1112c0, 0x0 }, ++ { 0x2112c0, 0x0 }, ++ { 0x113c0, 0x0 }, ++ { 0x1113c0, 0x0 }, ++ { 0x2113c0, 0x0 }, ++ { 0x114c0, 0x0 }, ++ { 0x1114c0, 0x0 }, ++ { 0x2114c0, 0x0 }, ++ { 0x115c0, 0x0 }, ++ { 0x1115c0, 0x0 }, ++ { 0x2115c0, 0x0 }, ++ { 0x116c0, 0x0 }, ++ { 0x1116c0, 0x0 }, ++ { 0x2116c0, 0x0 }, ++ { 0x117c0, 0x0 }, ++ { 0x1117c0, 0x0 }, ++ { 0x2117c0, 0x0 }, ++ { 0x118c0, 0x0 }, ++ { 0x1118c0, 0x0 }, ++ { 0x2118c0, 0x0 }, ++ { 0x120c0, 0x0 }, ++ { 0x1120c0, 0x0 }, ++ { 0x2120c0, 0x0 }, ++ { 0x121c0, 0x0 }, ++ { 0x1121c0, 0x0 }, ++ { 0x2121c0, 0x0 }, ++ { 0x122c0, 0x0 }, ++ { 0x1122c0, 0x0 }, ++ { 0x2122c0, 0x0 }, ++ { 0x123c0, 0x0 }, ++ { 0x1123c0, 0x0 }, ++ { 0x2123c0, 0x0 }, ++ { 0x124c0, 0x0 }, ++ { 0x1124c0, 0x0 }, ++ { 0x2124c0, 0x0 }, ++ { 0x125c0, 0x0 }, ++ { 0x1125c0, 0x0 }, ++ { 0x2125c0, 0x0 }, ++ { 0x126c0, 0x0 }, ++ { 0x1126c0, 0x0 }, ++ { 0x2126c0, 0x0 }, ++ { 0x127c0, 0x0 }, ++ { 0x1127c0, 0x0 }, ++ { 0x2127c0, 0x0 }, ++ { 0x128c0, 0x0 }, ++ { 0x1128c0, 0x0 }, ++ { 0x2128c0, 0x0 }, ++ { 0x130c0, 0x0 }, ++ { 0x1130c0, 0x0 }, ++ { 0x2130c0, 0x0 }, ++ { 0x131c0, 0x0 }, ++ { 0x1131c0, 0x0 }, ++ { 0x2131c0, 0x0 }, ++ { 0x132c0, 0x0 }, ++ { 0x1132c0, 0x0 }, ++ { 0x2132c0, 0x0 }, ++ { 0x133c0, 0x0 }, ++ { 0x1133c0, 0x0 }, ++ { 0x2133c0, 0x0 }, ++ { 0x134c0, 0x0 }, ++ { 0x1134c0, 0x0 }, ++ { 0x2134c0, 0x0 }, ++ { 0x135c0, 0x0 }, ++ { 0x1135c0, 0x0 }, ++ { 0x2135c0, 0x0 }, ++ { 0x136c0, 0x0 }, ++ { 0x1136c0, 0x0 }, ++ { 0x2136c0, 0x0 }, ++ { 0x137c0, 0x0 }, ++ { 0x1137c0, 0x0 }, ++ { 0x2137c0, 0x0 }, ++ { 0x138c0, 0x0 }, ++ { 0x1138c0, 0x0 }, ++ { 0x2138c0, 0x0 }, ++ { 0x100c1, 0x0 }, ++ { 0x1100c1, 0x0 }, ++ { 0x2100c1, 0x0 }, ++ { 0x101c1, 0x0 }, ++ { 0x1101c1, 0x0 }, ++ { 0x2101c1, 0x0 }, ++ { 0x102c1, 0x0 }, ++ { 0x1102c1, 0x0 }, ++ { 0x2102c1, 0x0 }, ++ { 0x103c1, 0x0 }, ++ { 0x1103c1, 0x0 }, ++ { 0x2103c1, 0x0 }, ++ { 0x104c1, 0x0 }, ++ { 0x1104c1, 0x0 }, ++ { 0x2104c1, 0x0 }, ++ { 0x105c1, 0x0 }, ++ { 0x1105c1, 0x0 }, ++ { 0x2105c1, 0x0 }, ++ { 0x106c1, 0x0 }, ++ { 0x1106c1, 0x0 }, ++ { 0x2106c1, 0x0 }, ++ { 0x107c1, 0x0 }, ++ { 0x1107c1, 0x0 }, ++ { 0x2107c1, 0x0 }, ++ { 0x108c1, 0x0 }, ++ { 0x1108c1, 0x0 }, ++ { 0x2108c1, 0x0 }, ++ { 0x110c1, 0x0 }, ++ { 0x1110c1, 0x0 }, ++ { 0x2110c1, 0x0 }, ++ { 0x111c1, 0x0 }, ++ { 0x1111c1, 0x0 }, ++ { 0x2111c1, 0x0 }, ++ { 0x112c1, 0x0 }, ++ { 0x1112c1, 0x0 }, ++ { 0x2112c1, 0x0 }, ++ { 0x113c1, 0x0 }, ++ { 0x1113c1, 0x0 }, ++ { 0x2113c1, 0x0 }, ++ { 0x114c1, 0x0 }, ++ { 0x1114c1, 0x0 }, ++ { 0x2114c1, 0x0 }, ++ { 0x115c1, 0x0 }, ++ { 0x1115c1, 0x0 }, ++ { 0x2115c1, 0x0 }, ++ { 0x116c1, 0x0 }, ++ { 0x1116c1, 0x0 }, ++ { 0x2116c1, 0x0 }, ++ { 0x117c1, 0x0 }, ++ { 0x1117c1, 0x0 }, ++ { 0x2117c1, 0x0 }, ++ { 0x118c1, 0x0 }, ++ { 0x1118c1, 0x0 }, ++ { 0x2118c1, 0x0 }, ++ { 0x120c1, 0x0 }, ++ { 0x1120c1, 0x0 }, ++ { 0x2120c1, 0x0 }, ++ { 0x121c1, 0x0 }, ++ { 0x1121c1, 0x0 }, ++ { 0x2121c1, 0x0 }, ++ { 0x122c1, 0x0 }, ++ { 0x1122c1, 0x0 }, ++ { 0x2122c1, 0x0 }, ++ { 0x123c1, 0x0 }, ++ { 0x1123c1, 0x0 }, ++ { 0x2123c1, 0x0 }, ++ { 0x124c1, 0x0 }, ++ { 0x1124c1, 0x0 }, ++ { 0x2124c1, 0x0 }, ++ { 0x125c1, 0x0 }, ++ { 0x1125c1, 0x0 }, ++ { 0x2125c1, 0x0 }, ++ { 0x126c1, 0x0 }, ++ { 0x1126c1, 0x0 }, ++ { 0x2126c1, 0x0 }, ++ { 0x127c1, 0x0 }, ++ { 0x1127c1, 0x0 }, ++ { 0x2127c1, 0x0 }, ++ { 0x128c1, 0x0 }, ++ { 0x1128c1, 0x0 }, ++ { 0x2128c1, 0x0 }, ++ { 0x130c1, 0x0 }, ++ { 0x1130c1, 0x0 }, ++ { 0x2130c1, 0x0 }, ++ { 0x131c1, 0x0 }, ++ { 0x1131c1, 0x0 }, ++ { 0x2131c1, 0x0 }, ++ { 0x132c1, 0x0 }, ++ { 0x1132c1, 0x0 }, ++ { 0x2132c1, 0x0 }, ++ { 0x133c1, 0x0 }, ++ { 0x1133c1, 0x0 }, ++ { 0x2133c1, 0x0 }, ++ { 0x134c1, 0x0 }, ++ { 0x1134c1, 0x0 }, ++ { 0x2134c1, 0x0 }, ++ { 0x135c1, 0x0 }, ++ { 0x1135c1, 0x0 }, ++ { 0x2135c1, 0x0 }, ++ { 0x136c1, 0x0 }, ++ { 0x1136c1, 0x0 }, ++ { 0x2136c1, 0x0 }, ++ { 0x137c1, 0x0 }, ++ { 0x1137c1, 0x0 }, ++ { 0x2137c1, 0x0 }, ++ { 0x138c1, 0x0 }, ++ { 0x1138c1, 0x0 }, ++ { 0x2138c1, 0x0 }, ++ { 0x10020, 0x0 }, ++ { 0x110020, 0x0 }, ++ { 0x210020, 0x0 }, ++ { 0x11020, 0x0 }, ++ { 0x111020, 0x0 }, ++ { 0x211020, 0x0 }, ++ { 0x12020, 0x0 }, ++ { 0x112020, 0x0 }, ++ { 0x212020, 0x0 }, ++ { 0x13020, 0x0 }, ++ { 0x113020, 0x0 }, ++ { 0x213020, 0x0 }, ++ { 0x20072, 0x0 }, ++ { 0x20073, 0x0 }, ++ { 0x20074, 0x0 }, ++ { 0x100aa, 0x0 }, ++ { 0x110aa, 0x0 }, ++ { 0x120aa, 0x0 }, ++ { 0x130aa, 0x0 }, ++ { 0x20010, 0x0 }, ++ { 0x120010, 0x0 }, ++ { 0x220010, 0x0 }, ++ { 0x20011, 0x0 }, ++ { 0x120011, 0x0 }, ++ { 0x220011, 0x0 }, ++ { 0x100ae, 0x0 }, ++ { 0x1100ae, 0x0 }, ++ { 0x2100ae, 0x0 }, ++ { 0x100af, 0x0 }, ++ { 0x1100af, 0x0 }, ++ { 0x2100af, 0x0 }, ++ { 0x110ae, 0x0 }, ++ { 0x1110ae, 0x0 }, ++ { 0x2110ae, 0x0 }, ++ { 0x110af, 0x0 }, ++ { 0x1110af, 0x0 }, ++ { 0x2110af, 0x0 }, ++ { 0x120ae, 0x0 }, ++ { 0x1120ae, 0x0 }, ++ { 0x2120ae, 0x0 }, ++ { 0x120af, 0x0 }, ++ { 0x1120af, 0x0 }, ++ { 0x2120af, 0x0 }, ++ { 0x130ae, 0x0 }, ++ { 0x1130ae, 0x0 }, ++ { 0x2130ae, 0x0 }, ++ { 0x130af, 0x0 }, ++ { 0x1130af, 0x0 }, ++ { 0x2130af, 0x0 }, ++ { 0x20020, 0x0 }, ++ { 0x120020, 0x0 }, ++ { 0x220020, 0x0 }, ++ { 0x100a0, 0x0 }, ++ { 0x100a1, 0x0 }, ++ { 0x100a2, 0x0 }, ++ { 0x100a3, 0x0 }, ++ { 0x100a4, 0x0 }, ++ { 0x100a5, 0x0 }, ++ { 0x100a6, 0x0 }, ++ { 0x100a7, 0x0 }, ++ { 0x110a0, 0x0 }, ++ { 0x110a1, 0x0 }, ++ { 0x110a2, 0x0 }, ++ { 0x110a3, 0x0 }, ++ { 0x110a4, 0x0 }, ++ { 0x110a5, 0x0 }, ++ { 0x110a6, 0x0 }, ++ { 0x110a7, 0x0 }, ++ { 0x120a0, 0x0 }, ++ { 0x120a1, 0x0 }, ++ { 0x120a2, 0x0 }, ++ { 0x120a3, 0x0 }, ++ { 0x120a4, 0x0 }, ++ { 0x120a5, 0x0 }, ++ { 0x120a6, 0x0 }, ++ { 0x120a7, 0x0 }, ++ { 0x130a0, 0x0 }, ++ { 0x130a1, 0x0 }, ++ { 0x130a2, 0x0 }, ++ { 0x130a3, 0x0 }, ++ { 0x130a4, 0x0 }, ++ { 0x130a5, 0x0 }, ++ { 0x130a6, 0x0 }, ++ { 0x130a7, 0x0 }, ++ { 0x2007c, 0x0 }, ++ { 0x12007c, 0x0 }, ++ { 0x22007c, 0x0 }, ++ { 0x2007d, 0x0 }, ++ { 0x12007d, 0x0 }, ++ { 0x22007d, 0x0 }, ++ { 0x400fd, 0x0 }, ++ { 0x400c0, 0x0 }, ++ { 0x90201, 0x0 }, ++ { 0x190201, 0x0 }, ++ { 0x290201, 0x0 }, ++ { 0x90202, 0x0 }, ++ { 0x190202, 0x0 }, ++ { 0x290202, 0x0 }, ++ { 0x90203, 0x0 }, ++ { 0x190203, 0x0 }, ++ { 0x290203, 0x0 }, ++ { 0x90204, 0x0 }, ++ { 0x190204, 0x0 }, ++ { 0x290204, 0x0 }, ++ { 0x90205, 0x0 }, ++ { 0x190205, 0x0 }, ++ { 0x290205, 0x0 }, ++ { 0x90206, 0x0 }, ++ { 0x190206, 0x0 }, ++ { 0x290206, 0x0 }, ++ { 0x90207, 0x0 }, ++ { 0x190207, 0x0 }, ++ { 0x290207, 0x0 }, ++ { 0x90208, 0x0 }, ++ { 0x190208, 0x0 }, ++ { 0x290208, 0x0 }, ++ { 0x10062, 0x0 }, ++ { 0x10162, 0x0 }, ++ { 0x10262, 0x0 }, ++ { 0x10362, 0x0 }, ++ { 0x10462, 0x0 }, ++ { 0x10562, 0x0 }, ++ { 0x10662, 0x0 }, ++ { 0x10762, 0x0 }, ++ { 0x10862, 0x0 }, ++ { 0x11062, 0x0 }, ++ { 0x11162, 0x0 }, ++ { 0x11262, 0x0 }, ++ { 0x11362, 0x0 }, ++ { 0x11462, 0x0 }, ++ { 0x11562, 0x0 }, ++ { 0x11662, 0x0 }, ++ { 0x11762, 0x0 }, ++ { 0x11862, 0x0 }, ++ { 0x12062, 0x0 }, ++ { 0x12162, 0x0 }, ++ { 0x12262, 0x0 }, ++ { 0x12362, 0x0 }, ++ { 0x12462, 0x0 }, ++ { 0x12562, 0x0 }, ++ { 0x12662, 0x0 }, ++ { 0x12762, 0x0 }, ++ { 0x12862, 0x0 }, ++ { 0x13062, 0x0 }, ++ { 0x13162, 0x0 }, ++ { 0x13262, 0x0 }, ++ { 0x13362, 0x0 }, ++ { 0x13462, 0x0 }, ++ { 0x13562, 0x0 }, ++ { 0x13662, 0x0 }, ++ { 0x13762, 0x0 }, ++ { 0x13862, 0x0 }, ++ { 0x20077, 0x0 }, ++ { 0x10001, 0x0 }, ++ { 0x11001, 0x0 }, ++ { 0x12001, 0x0 }, ++ { 0x13001, 0x0 }, ++ { 0x10040, 0x0 }, ++ { 0x10140, 0x0 }, ++ { 0x10240, 0x0 }, ++ { 0x10340, 0x0 }, ++ { 0x10440, 0x0 }, ++ { 0x10540, 0x0 }, ++ { 0x10640, 0x0 }, ++ { 0x10740, 0x0 }, ++ { 0x10840, 0x0 }, ++ { 0x10030, 0x0 }, ++ { 0x10130, 0x0 }, ++ { 0x10230, 0x0 }, ++ { 0x10330, 0x0 }, ++ { 0x10430, 0x0 }, ++ { 0x10530, 0x0 }, ++ { 0x10630, 0x0 }, ++ { 0x10730, 0x0 }, ++ { 0x10830, 0x0 }, ++ { 0x11040, 0x0 }, ++ { 0x11140, 0x0 }, ++ { 0x11240, 0x0 }, ++ { 0x11340, 0x0 }, ++ { 0x11440, 0x0 }, ++ { 0x11540, 0x0 }, ++ { 0x11640, 0x0 }, ++ { 0x11740, 0x0 }, ++ { 0x11840, 0x0 }, ++ { 0x11030, 0x0 }, ++ { 0x11130, 0x0 }, ++ { 0x11230, 0x0 }, ++ { 0x11330, 0x0 }, ++ { 0x11430, 0x0 }, ++ { 0x11530, 0x0 }, ++ { 0x11630, 0x0 }, ++ { 0x11730, 0x0 }, ++ { 0x11830, 0x0 }, ++ { 0x12040, 0x0 }, ++ { 0x12140, 0x0 }, ++ { 0x12240, 0x0 }, ++ { 0x12340, 0x0 }, ++ { 0x12440, 0x0 }, ++ { 0x12540, 0x0 }, ++ { 0x12640, 0x0 }, ++ { 0x12740, 0x0 }, ++ { 0x12840, 0x0 }, ++ { 0x12030, 0x0 }, ++ { 0x12130, 0x0 }, ++ { 0x12230, 0x0 }, ++ { 0x12330, 0x0 }, ++ { 0x12430, 0x0 }, ++ { 0x12530, 0x0 }, ++ { 0x12630, 0x0 }, ++ { 0x12730, 0x0 }, ++ { 0x12830, 0x0 }, ++ { 0x13040, 0x0 }, ++ { 0x13140, 0x0 }, ++ { 0x13240, 0x0 }, ++ { 0x13340, 0x0 }, ++ { 0x13440, 0x0 }, ++ { 0x13540, 0x0 }, ++ { 0x13640, 0x0 }, ++ { 0x13740, 0x0 }, ++ { 0x13840, 0x0 }, ++ { 0x13030, 0x0 }, ++ { 0x13130, 0x0 }, ++ { 0x13230, 0x0 }, ++ { 0x13330, 0x0 }, ++ { 0x13430, 0x0 }, ++ { 0x13530, 0x0 }, ++ { 0x13630, 0x0 }, ++ { 0x13730, 0x0 }, ++ { 0x13830, 0x0 }, ++}; ++ ++/* P0 message block parameter for training firmware */ ++struct dram_cfg_param ddr_fsp0_cfg[] = { ++ { 0xd0000, 0x0 }, ++ { 0x54003, 0xfa0 }, ++ { 0x54004, 0x2 }, ++ { 0x54005, 0x2228 }, ++ { 0x54006, 0x14 }, ++ { 0x54008, 0x131f }, ++ { 0x54009, 0xc8 }, ++ { 0x5400b, 0x2 }, ++ { 0x5400f, 0x100 }, ++ { 0x54012, 0x310 }, ++ { 0x54019, 0x3ff4 }, ++ { 0x5401a, 0x33 }, ++ { 0x5401b, 0x4866 }, ++ { 0x5401c, 0x4800 }, ++ { 0x5401e, 0x16 }, ++ { 0x5401f, 0x3ff4 }, ++ { 0x54020, 0x33 }, ++ { 0x54021, 0x4866 }, ++ { 0x54022, 0x4800 }, ++ { 0x54024, 0x16 }, ++ { 0x5402b, 0x1000 }, ++ { 0x5402c, 0x3 }, ++ { 0x54032, 0xf400 }, ++ { 0x54033, 0x333f }, ++ { 0x54034, 0x6600 }, ++ { 0x54035, 0x48 }, ++ { 0x54036, 0x48 }, ++ { 0x54037, 0x1600 }, ++ { 0x54038, 0xf400 }, ++ { 0x54039, 0x333f }, ++ { 0x5403a, 0x6600 }, ++ { 0x5403b, 0x48 }, ++ { 0x5403c, 0x48 }, ++ { 0x5403d, 0x1600 }, ++ { 0xd0000, 0x1 }, ++}; ++ ++/* P1 message block parameter for training firmware */ ++struct dram_cfg_param ddr_fsp1_cfg[] = { ++ { 0xd0000, 0x0 }, ++ { 0x54002, 0x101 }, ++ { 0x54003, 0x190 }, ++ { 0x54004, 0x2 }, ++ { 0x54005, 0x2228 }, ++ { 0x54006, 0x14 }, ++ { 0x54008, 0x121f }, ++ { 0x54009, 0xc8 }, ++ { 0x5400b, 0x2 }, ++ { 0x5400f, 0x100 }, ++ { 0x54012, 0x310 }, ++ { 0x54019, 0x84 }, ++ { 0x5401a, 0x33 }, ++ { 0x5401b, 0x4866 }, ++ { 0x5401c, 0x4800 }, ++ { 0x5401e, 0x16 }, ++ { 0x5401f, 0x84 }, ++ { 0x54020, 0x33 }, ++ { 0x54021, 0x4866 }, ++ { 0x54022, 0x4800 }, ++ { 0x54024, 0x16 }, ++ { 0x5402b, 0x1000 }, ++ { 0x5402c, 0x3 }, ++ { 0x54032, 0x8400 }, ++ { 0x54033, 0x3300 }, ++ { 0x54034, 0x6600 }, ++ { 0x54035, 0x48 }, ++ { 0x54036, 0x48 }, ++ { 0x54037, 0x1600 }, ++ { 0x54038, 0x8400 }, ++ { 0x54039, 0x3300 }, ++ { 0x5403a, 0x6600 }, ++ { 0x5403b, 0x48 }, ++ { 0x5403c, 0x48 }, ++ { 0x5403d, 0x1600 }, ++ { 0xd0000, 0x1 }, ++}; ++ ++/* P2 message block parameter for training firmware */ ++struct dram_cfg_param ddr_fsp2_cfg[] = { ++ { 0xd0000, 0x0 }, ++ { 0x54002, 0x102 }, ++ { 0x54003, 0x64 }, ++ { 0x54004, 0x2 }, ++ { 0x54005, 0x2228 }, ++ { 0x54006, 0x14 }, ++ { 0x54008, 0x121f }, ++ { 0x54009, 0xc8 }, ++ { 0x5400b, 0x2 }, ++ { 0x5400f, 0x100 }, ++ { 0x54012, 0x310 }, ++ { 0x54019, 0x84 }, ++ { 0x5401a, 0x33 }, ++ { 0x5401b, 0x4866 }, ++ { 0x5401c, 0x4800 }, ++ { 0x5401e, 0x16 }, ++ { 0x5401f, 0x84 }, ++ { 0x54020, 0x33 }, ++ { 0x54021, 0x4866 }, ++ { 0x54022, 0x4800 }, ++ { 0x54024, 0x16 }, ++ { 0x5402b, 0x1000 }, ++ { 0x5402c, 0x3 }, ++ { 0x54032, 0x8400 }, ++ { 0x54033, 0x3300 }, ++ { 0x54034, 0x6600 }, ++ { 0x54035, 0x48 }, ++ { 0x54036, 0x48 }, ++ { 0x54037, 0x1600 }, ++ { 0x54038, 0x8400 }, ++ { 0x54039, 0x3300 }, ++ { 0x5403a, 0x6600 }, ++ { 0x5403b, 0x48 }, ++ { 0x5403c, 0x48 }, ++ { 0x5403d, 0x1600 }, ++ { 0xd0000, 0x1 }, ++}; ++ ++/* P0 2D message block parameter for training firmware */ ++struct dram_cfg_param ddr_fsp0_2d_cfg[] = { ++ { 0xd0000, 0x0 }, ++ { 0x54003, 0xfa0 }, ++ { 0x54004, 0x2 }, ++ { 0x54005, 0x2228 }, ++ { 0x54006, 0x14 }, ++ { 0x54008, 0x61 }, ++ { 0x54009, 0xc8 }, ++ { 0x5400b, 0x2 }, ++ { 0x5400f, 0x100 }, ++ { 0x54010, 0x1f7f }, ++ { 0x54012, 0x310 }, ++ { 0x54019, 0x3ff4 }, ++ { 0x5401a, 0x33 }, ++ { 0x5401b, 0x4866 }, ++ { 0x5401c, 0x4800 }, ++ { 0x5401e, 0x16 }, ++ { 0x5401f, 0x3ff4 }, ++ { 0x54020, 0x33 }, ++ { 0x54021, 0x4866 }, ++ { 0x54022, 0x4800 }, ++ { 0x54024, 0x16 }, ++ { 0x5402b, 0x1000 }, ++ { 0x5402c, 0x3 }, ++ { 0x54032, 0xf400 }, ++ { 0x54033, 0x333f }, ++ { 0x54034, 0x6600 }, ++ { 0x54035, 0x48 }, ++ { 0x54036, 0x48 }, ++ { 0x54037, 0x1600 }, ++ { 0x54038, 0xf400 }, ++ { 0x54039, 0x333f }, ++ { 0x5403a, 0x6600 }, ++ { 0x5403b, 0x48 }, ++ { 0x5403c, 0x48 }, ++ { 0x5403d, 0x1600 }, ++ { 0xd0000, 0x1 }, ++}; ++ ++/* DRAM PHY init engine image */ ++struct dram_cfg_param ddr_phy_pie[] = { ++ { 0xd0000, 0x0 }, ++ { 0x90000, 0x10 }, ++ { 0x90001, 0x400 }, ++ { 0x90002, 0x10e }, ++ { 0x90003, 0x0 }, ++ { 0x90004, 0x0 }, ++ { 0x90005, 0x8 }, ++ { 0x90029, 0xb }, ++ { 0x9002a, 0x480 }, ++ { 0x9002b, 0x109 }, ++ { 0x9002c, 0x8 }, ++ { 0x9002d, 0x448 }, ++ { 0x9002e, 0x139 }, ++ { 0x9002f, 0x8 }, ++ { 0x90030, 0x478 }, ++ { 0x90031, 0x109 }, ++ { 0x90032, 0x0 }, ++ { 0x90033, 0xe8 }, ++ { 0x90034, 0x109 }, ++ { 0x90035, 0x2 }, ++ { 0x90036, 0x10 }, ++ { 0x90037, 0x139 }, ++ { 0x90038, 0xb }, ++ { 0x90039, 0x7c0 }, ++ { 0x9003a, 0x139 }, ++ { 0x9003b, 0x44 }, ++ { 0x9003c, 0x633 }, ++ { 0x9003d, 0x159 }, ++ { 0x9003e, 0x14f }, ++ { 0x9003f, 0x630 }, ++ { 0x90040, 0x159 }, ++ { 0x90041, 0x47 }, ++ { 0x90042, 0x633 }, ++ { 0x90043, 0x149 }, ++ { 0x90044, 0x4f }, ++ { 0x90045, 0x633 }, ++ { 0x90046, 0x179 }, ++ { 0x90047, 0x8 }, ++ { 0x90048, 0xe0 }, ++ { 0x90049, 0x109 }, ++ { 0x9004a, 0x0 }, ++ { 0x9004b, 0x7c8 }, ++ { 0x9004c, 0x109 }, ++ { 0x9004d, 0x0 }, ++ { 0x9004e, 0x1 }, ++ { 0x9004f, 0x8 }, ++ { 0x90050, 0x0 }, ++ { 0x90051, 0x45a }, ++ { 0x90052, 0x9 }, ++ { 0x90053, 0x0 }, ++ { 0x90054, 0x448 }, ++ { 0x90055, 0x109 }, ++ { 0x90056, 0x40 }, ++ { 0x90057, 0x633 }, ++ { 0x90058, 0x179 }, ++ { 0x90059, 0x1 }, ++ { 0x9005a, 0x618 }, ++ { 0x9005b, 0x109 }, ++ { 0x9005c, 0x40c0 }, ++ { 0x9005d, 0x633 }, ++ { 0x9005e, 0x149 }, ++ { 0x9005f, 0x8 }, ++ { 0x90060, 0x4 }, ++ { 0x90061, 0x48 }, ++ { 0x90062, 0x4040 }, ++ { 0x90063, 0x633 }, ++ { 0x90064, 0x149 }, ++ { 0x90065, 0x0 }, ++ { 0x90066, 0x4 }, ++ { 0x90067, 0x48 }, ++ { 0x90068, 0x40 }, ++ { 0x90069, 0x633 }, ++ { 0x9006a, 0x149 }, ++ { 0x9006b, 0x10 }, ++ { 0x9006c, 0x4 }, ++ { 0x9006d, 0x18 }, ++ { 0x9006e, 0x0 }, ++ { 0x9006f, 0x4 }, ++ { 0x90070, 0x78 }, ++ { 0x90071, 0x549 }, ++ { 0x90072, 0x633 }, ++ { 0x90073, 0x159 }, ++ { 0x90074, 0xd49 }, ++ { 0x90075, 0x633 }, ++ { 0x90076, 0x159 }, ++ { 0x90077, 0x94a }, ++ { 0x90078, 0x633 }, ++ { 0x90079, 0x159 }, ++ { 0x9007a, 0x441 }, ++ { 0x9007b, 0x633 }, ++ { 0x9007c, 0x149 }, ++ { 0x9007d, 0x42 }, ++ { 0x9007e, 0x633 }, ++ { 0x9007f, 0x149 }, ++ { 0x90080, 0x1 }, ++ { 0x90081, 0x633 }, ++ { 0x90082, 0x149 }, ++ { 0x90083, 0x0 }, ++ { 0x90084, 0xe0 }, ++ { 0x90085, 0x109 }, ++ { 0x90086, 0xa }, ++ { 0x90087, 0x10 }, ++ { 0x90088, 0x109 }, ++ { 0x90089, 0x9 }, ++ { 0x9008a, 0x3c0 }, ++ { 0x9008b, 0x149 }, ++ { 0x9008c, 0x9 }, ++ { 0x9008d, 0x3c0 }, ++ { 0x9008e, 0x159 }, ++ { 0x9008f, 0x18 }, ++ { 0x90090, 0x10 }, ++ { 0x90091, 0x109 }, ++ { 0x90092, 0x0 }, ++ { 0x90093, 0x3c0 }, ++ { 0x90094, 0x109 }, ++ { 0x90095, 0x18 }, ++ { 0x90096, 0x4 }, ++ { 0x90097, 0x48 }, ++ { 0x90098, 0x18 }, ++ { 0x90099, 0x4 }, ++ { 0x9009a, 0x58 }, ++ { 0x9009b, 0xb }, ++ { 0x9009c, 0x10 }, ++ { 0x9009d, 0x109 }, ++ { 0x9009e, 0x1 }, ++ { 0x9009f, 0x10 }, ++ { 0x900a0, 0x109 }, ++ { 0x900a1, 0x5 }, ++ { 0x900a2, 0x7c0 }, ++ { 0x900a3, 0x109 }, ++ { 0x40000, 0x811 }, ++ { 0x40020, 0x880 }, ++ { 0x40040, 0x0 }, ++ { 0x40060, 0x0 }, ++ { 0x40001, 0x4008 }, ++ { 0x40021, 0x83 }, ++ { 0x40041, 0x4f }, ++ { 0x40061, 0x0 }, ++ { 0x40002, 0x4040 }, ++ { 0x40022, 0x83 }, ++ { 0x40042, 0x51 }, ++ { 0x40062, 0x0 }, ++ { 0x40003, 0x811 }, ++ { 0x40023, 0x880 }, ++ { 0x40043, 0x0 }, ++ { 0x40063, 0x0 }, ++ { 0x40004, 0x720 }, ++ { 0x40024, 0xf }, ++ { 0x40044, 0x1740 }, ++ { 0x40064, 0x0 }, ++ { 0x40005, 0x16 }, ++ { 0x40025, 0x83 }, ++ { 0x40045, 0x4b }, ++ { 0x40065, 0x0 }, ++ { 0x40006, 0x716 }, ++ { 0x40026, 0xf }, ++ { 0x40046, 0x2001 }, ++ { 0x40066, 0x0 }, ++ { 0x40007, 0x716 }, ++ { 0x40027, 0xf }, ++ { 0x40047, 0x2800 }, ++ { 0x40067, 0x0 }, ++ { 0x40008, 0x716 }, ++ { 0x40028, 0xf }, ++ { 0x40048, 0xf00 }, ++ { 0x40068, 0x0 }, ++ { 0x40009, 0x720 }, ++ { 0x40029, 0xf }, ++ { 0x40049, 0x1400 }, ++ { 0x40069, 0x0 }, ++ { 0x4000a, 0xe08 }, ++ { 0x4002a, 0xc15 }, ++ { 0x4004a, 0x0 }, ++ { 0x4006a, 0x0 }, ++ { 0x4000b, 0x625 }, ++ { 0x4002b, 0x15 }, ++ { 0x4004b, 0x0 }, ++ { 0x4006b, 0x0 }, ++ { 0x4000c, 0x4028 }, ++ { 0x4002c, 0x80 }, ++ { 0x4004c, 0x0 }, ++ { 0x4006c, 0x0 }, ++ { 0x4000d, 0xe08 }, ++ { 0x4002d, 0xc1a }, ++ { 0x4004d, 0x0 }, ++ { 0x4006d, 0x0 }, ++ { 0x4000e, 0x625 }, ++ { 0x4002e, 0x1a }, ++ { 0x4004e, 0x0 }, ++ { 0x4006e, 0x0 }, ++ { 0x4000f, 0x4040 }, ++ { 0x4002f, 0x80 }, ++ { 0x4004f, 0x0 }, ++ { 0x4006f, 0x0 }, ++ { 0x40010, 0x2604 }, ++ { 0x40030, 0x15 }, ++ { 0x40050, 0x0 }, ++ { 0x40070, 0x0 }, ++ { 0x40011, 0x708 }, ++ { 0x40031, 0x5 }, ++ { 0x40051, 0x0 }, ++ { 0x40071, 0x2002 }, ++ { 0x40012, 0x8 }, ++ { 0x40032, 0x80 }, ++ { 0x40052, 0x0 }, ++ { 0x40072, 0x0 }, ++ { 0x40013, 0x2604 }, ++ { 0x40033, 0x1a }, ++ { 0x40053, 0x0 }, ++ { 0x40073, 0x0 }, ++ { 0x40014, 0x708 }, ++ { 0x40034, 0xa }, ++ { 0x40054, 0x0 }, ++ { 0x40074, 0x2002 }, ++ { 0x40015, 0x4040 }, ++ { 0x40035, 0x80 }, ++ { 0x40055, 0x0 }, ++ { 0x40075, 0x0 }, ++ { 0x40016, 0x60a }, ++ { 0x40036, 0x15 }, ++ { 0x40056, 0x1200 }, ++ { 0x40076, 0x0 }, ++ { 0x40017, 0x61a }, ++ { 0x40037, 0x15 }, ++ { 0x40057, 0x1300 }, ++ { 0x40077, 0x0 }, ++ { 0x40018, 0x60a }, ++ { 0x40038, 0x1a }, ++ { 0x40058, 0x1200 }, ++ { 0x40078, 0x0 }, ++ { 0x40019, 0x642 }, ++ { 0x40039, 0x1a }, ++ { 0x40059, 0x1300 }, ++ { 0x40079, 0x0 }, ++ { 0x4001a, 0x4808 }, ++ { 0x4003a, 0x880 }, ++ { 0x4005a, 0x0 }, ++ { 0x4007a, 0x0 }, ++ { 0x900a4, 0x0 }, ++ { 0x900a5, 0x790 }, ++ { 0x900a6, 0x11a }, ++ { 0x900a7, 0x8 }, ++ { 0x900a8, 0x7aa }, ++ { 0x900a9, 0x2a }, ++ { 0x900aa, 0x10 }, ++ { 0x900ab, 0x7b2 }, ++ { 0x900ac, 0x2a }, ++ { 0x900ad, 0x0 }, ++ { 0x900ae, 0x7c8 }, ++ { 0x900af, 0x109 }, ++ { 0x900b0, 0x10 }, ++ { 0x900b1, 0x10 }, ++ { 0x900b2, 0x109 }, ++ { 0x900b3, 0x10 }, ++ { 0x900b4, 0x2a8 }, ++ { 0x900b5, 0x129 }, ++ { 0x900b6, 0x8 }, ++ { 0x900b7, 0x370 }, ++ { 0x900b8, 0x129 }, ++ { 0x900b9, 0xa }, ++ { 0x900ba, 0x3c8 }, ++ { 0x900bb, 0x1a9 }, ++ { 0x900bc, 0xc }, ++ { 0x900bd, 0x408 }, ++ { 0x900be, 0x199 }, ++ { 0x900bf, 0x14 }, ++ { 0x900c0, 0x790 }, ++ { 0x900c1, 0x11a }, ++ { 0x900c2, 0x8 }, ++ { 0x900c3, 0x4 }, ++ { 0x900c4, 0x18 }, ++ { 0x900c5, 0xe }, ++ { 0x900c6, 0x408 }, ++ { 0x900c7, 0x199 }, ++ { 0x900c8, 0x8 }, ++ { 0x900c9, 0x8568 }, ++ { 0x900ca, 0x108 }, ++ { 0x900cb, 0x18 }, ++ { 0x900cc, 0x790 }, ++ { 0x900cd, 0x16a }, ++ { 0x900ce, 0x8 }, ++ { 0x900cf, 0x1d8 }, ++ { 0x900d0, 0x169 }, ++ { 0x900d1, 0x10 }, ++ { 0x900d2, 0x8558 }, ++ { 0x900d3, 0x168 }, ++ { 0x900d4, 0x70 }, ++ { 0x900d5, 0x788 }, ++ { 0x900d6, 0x16a }, ++ { 0x900d7, 0x1ff8 }, ++ { 0x900d8, 0x85a8 }, ++ { 0x900d9, 0x1e8 }, ++ { 0x900da, 0x50 }, ++ { 0x900db, 0x798 }, ++ { 0x900dc, 0x16a }, ++ { 0x900dd, 0x60 }, ++ { 0x900de, 0x7a0 }, ++ { 0x900df, 0x16a }, ++ { 0x900e0, 0x8 }, ++ { 0x900e1, 0x8310 }, ++ { 0x900e2, 0x168 }, ++ { 0x900e3, 0x8 }, ++ { 0x900e4, 0xa310 }, ++ { 0x900e5, 0x168 }, ++ { 0x900e6, 0xa }, ++ { 0x900e7, 0x408 }, ++ { 0x900e8, 0x169 }, ++ { 0x900e9, 0x6e }, ++ { 0x900ea, 0x0 }, ++ { 0x900eb, 0x68 }, ++ { 0x900ec, 0x0 }, ++ { 0x900ed, 0x408 }, ++ { 0x900ee, 0x169 }, ++ { 0x900ef, 0x0 }, ++ { 0x900f0, 0x8310 }, ++ { 0x900f1, 0x168 }, ++ { 0x900f2, 0x0 }, ++ { 0x900f3, 0xa310 }, ++ { 0x900f4, 0x168 }, ++ { 0x900f5, 0x1ff8 }, ++ { 0x900f6, 0x85a8 }, ++ { 0x900f7, 0x1e8 }, ++ { 0x900f8, 0x68 }, ++ { 0x900f9, 0x798 }, ++ { 0x900fa, 0x16a }, ++ { 0x900fb, 0x78 }, ++ { 0x900fc, 0x7a0 }, ++ { 0x900fd, 0x16a }, ++ { 0x900fe, 0x68 }, ++ { 0x900ff, 0x790 }, ++ { 0x90100, 0x16a }, ++ { 0x90101, 0x8 }, ++ { 0x90102, 0x8b10 }, ++ { 0x90103, 0x168 }, ++ { 0x90104, 0x8 }, ++ { 0x90105, 0xab10 }, ++ { 0x90106, 0x168 }, ++ { 0x90107, 0xa }, ++ { 0x90108, 0x408 }, ++ { 0x90109, 0x169 }, ++ { 0x9010a, 0x58 }, ++ { 0x9010b, 0x0 }, ++ { 0x9010c, 0x68 }, ++ { 0x9010d, 0x0 }, ++ { 0x9010e, 0x408 }, ++ { 0x9010f, 0x169 }, ++ { 0x90110, 0x0 }, ++ { 0x90111, 0x8b10 }, ++ { 0x90112, 0x168 }, ++ { 0x90113, 0x1 }, ++ { 0x90114, 0xab10 }, ++ { 0x90115, 0x168 }, ++ { 0x90116, 0x0 }, ++ { 0x90117, 0x1d8 }, ++ { 0x90118, 0x169 }, ++ { 0x90119, 0x80 }, ++ { 0x9011a, 0x790 }, ++ { 0x9011b, 0x16a }, ++ { 0x9011c, 0x18 }, ++ { 0x9011d, 0x7aa }, ++ { 0x9011e, 0x6a }, ++ { 0x9011f, 0xa }, ++ { 0x90120, 0x0 }, ++ { 0x90121, 0x1e9 }, ++ { 0x90122, 0x8 }, ++ { 0x90123, 0x8080 }, ++ { 0x90124, 0x108 }, ++ { 0x90125, 0xf }, ++ { 0x90126, 0x408 }, ++ { 0x90127, 0x169 }, ++ { 0x90128, 0xc }, ++ { 0x90129, 0x0 }, ++ { 0x9012a, 0x68 }, ++ { 0x9012b, 0x9 }, ++ { 0x9012c, 0x0 }, ++ { 0x9012d, 0x1a9 }, ++ { 0x9012e, 0x0 }, ++ { 0x9012f, 0x408 }, ++ { 0x90130, 0x169 }, ++ { 0x90131, 0x0 }, ++ { 0x90132, 0x8080 }, ++ { 0x90133, 0x108 }, ++ { 0x90134, 0x8 }, ++ { 0x90135, 0x7aa }, ++ { 0x90136, 0x6a }, ++ { 0x90137, 0x0 }, ++ { 0x90138, 0x8568 }, ++ { 0x90139, 0x108 }, ++ { 0x9013a, 0xb7 }, ++ { 0x9013b, 0x790 }, ++ { 0x9013c, 0x16a }, ++ { 0x9013d, 0x1f }, ++ { 0x9013e, 0x0 }, ++ { 0x9013f, 0x68 }, ++ { 0x90140, 0x8 }, ++ { 0x90141, 0x8558 }, ++ { 0x90142, 0x168 }, ++ { 0x90143, 0xf }, ++ { 0x90144, 0x408 }, ++ { 0x90145, 0x169 }, ++ { 0x90146, 0xd }, ++ { 0x90147, 0x0 }, ++ { 0x90148, 0x68 }, ++ { 0x90149, 0x0 }, ++ { 0x9014a, 0x408 }, ++ { 0x9014b, 0x169 }, ++ { 0x9014c, 0x0 }, ++ { 0x9014d, 0x8558 }, ++ { 0x9014e, 0x168 }, ++ { 0x9014f, 0x8 }, ++ { 0x90150, 0x3c8 }, ++ { 0x90151, 0x1a9 }, ++ { 0x90152, 0x3 }, ++ { 0x90153, 0x370 }, ++ { 0x90154, 0x129 }, ++ { 0x90155, 0x20 }, ++ { 0x90156, 0x2aa }, ++ { 0x90157, 0x9 }, ++ { 0x90158, 0x8 }, ++ { 0x90159, 0xe8 }, ++ { 0x9015a, 0x109 }, ++ { 0x9015b, 0x0 }, ++ { 0x9015c, 0x8140 }, ++ { 0x9015d, 0x10c }, ++ { 0x9015e, 0x10 }, ++ { 0x9015f, 0x8138 }, ++ { 0x90160, 0x104 }, ++ { 0x90161, 0x8 }, ++ { 0x90162, 0x448 }, ++ { 0x90163, 0x109 }, ++ { 0x90164, 0xf }, ++ { 0x90165, 0x7c0 }, ++ { 0x90166, 0x109 }, ++ { 0x90167, 0x0 }, ++ { 0x90168, 0xe8 }, ++ { 0x90169, 0x109 }, ++ { 0x9016a, 0x47 }, ++ { 0x9016b, 0x630 }, ++ { 0x9016c, 0x109 }, ++ { 0x9016d, 0x8 }, ++ { 0x9016e, 0x618 }, ++ { 0x9016f, 0x109 }, ++ { 0x90170, 0x8 }, ++ { 0x90171, 0xe0 }, ++ { 0x90172, 0x109 }, ++ { 0x90173, 0x0 }, ++ { 0x90174, 0x7c8 }, ++ { 0x90175, 0x109 }, ++ { 0x90176, 0x8 }, ++ { 0x90177, 0x8140 }, ++ { 0x90178, 0x10c }, ++ { 0x90179, 0x0 }, ++ { 0x9017a, 0x478 }, ++ { 0x9017b, 0x109 }, ++ { 0x9017c, 0x0 }, ++ { 0x9017d, 0x1 }, ++ { 0x9017e, 0x8 }, ++ { 0x9017f, 0x8 }, ++ { 0x90180, 0x4 }, ++ { 0x90181, 0x0 }, ++ { 0x90006, 0x8 }, ++ { 0x90007, 0x7c8 }, ++ { 0x90008, 0x109 }, ++ { 0x90009, 0x0 }, ++ { 0x9000a, 0x400 }, ++ { 0x9000b, 0x106 }, ++ { 0xd00e7, 0x400 }, ++ { 0x90017, 0x0 }, ++ { 0x9001f, 0x29 }, ++ { 0x90026, 0x68 }, ++ { 0x400d0, 0x0 }, ++ { 0x400d1, 0x101 }, ++ { 0x400d2, 0x105 }, ++ { 0x400d3, 0x107 }, ++ { 0x400d4, 0x10f }, ++ { 0x400d5, 0x202 }, ++ { 0x400d6, 0x20a }, ++ { 0x400d7, 0x20b }, ++ { 0x2003a, 0x2 }, ++ { 0x200be, 0x3 }, ++ { 0x2000b, 0x465 }, ++ { 0x2000c, 0xfa }, ++ { 0x2000d, 0x9c4 }, ++ { 0x2000e, 0x2c }, ++ { 0x12000b, 0x70 }, ++ { 0x12000c, 0x19 }, ++ { 0x12000d, 0xfa }, ++ { 0x12000e, 0x10 }, ++ { 0x22000b, 0x1c }, ++ { 0x22000c, 0x6 }, ++ { 0x22000d, 0x3e }, ++ { 0x22000e, 0x10 }, ++ { 0x9000c, 0x0 }, ++ { 0x9000d, 0x173 }, ++ { 0x9000e, 0x60 }, ++ { 0x9000f, 0x6110 }, ++ { 0x90010, 0x2152 }, ++ { 0x90011, 0xdfbd }, ++ { 0x90012, 0x2060 }, ++ { 0x90013, 0x6152 }, ++ { 0x20010, 0x5a }, ++ { 0x20011, 0x3 }, ++ { 0x40080, 0xe0 }, ++ { 0x40081, 0x12 }, ++ { 0x40082, 0xe0 }, ++ { 0x40083, 0x12 }, ++ { 0x40084, 0xe0 }, ++ { 0x40085, 0x12 }, ++ { 0x140080, 0xe0 }, ++ { 0x140081, 0x12 }, ++ { 0x140082, 0xe0 }, ++ { 0x140083, 0x12 }, ++ { 0x140084, 0xe0 }, ++ { 0x140085, 0x12 }, ++ { 0x240080, 0xe0 }, ++ { 0x240081, 0x12 }, ++ { 0x240082, 0xe0 }, ++ { 0x240083, 0x12 }, ++ { 0x240084, 0xe0 }, ++ { 0x240085, 0x12 }, ++ { 0x400fd, 0xf }, ++ { 0x10011, 0x1 }, ++ { 0x10012, 0x1 }, ++ { 0x10013, 0x180 }, ++ { 0x10018, 0x1 }, ++ { 0x10002, 0x6209 }, ++ { 0x100b2, 0x1 }, ++ { 0x101b4, 0x1 }, ++ { 0x102b4, 0x1 }, ++ { 0x103b4, 0x1 }, ++ { 0x104b4, 0x1 }, ++ { 0x105b4, 0x1 }, ++ { 0x106b4, 0x1 }, ++ { 0x107b4, 0x1 }, ++ { 0x108b4, 0x1 }, ++ { 0x11011, 0x1 }, ++ { 0x11012, 0x1 }, ++ { 0x11013, 0x180 }, ++ { 0x11018, 0x1 }, ++ { 0x11002, 0x6209 }, ++ { 0x110b2, 0x1 }, ++ { 0x111b4, 0x1 }, ++ { 0x112b4, 0x1 }, ++ { 0x113b4, 0x1 }, ++ { 0x114b4, 0x1 }, ++ { 0x115b4, 0x1 }, ++ { 0x116b4, 0x1 }, ++ { 0x117b4, 0x1 }, ++ { 0x118b4, 0x1 }, ++ { 0x12011, 0x1 }, ++ { 0x12012, 0x1 }, ++ { 0x12013, 0x180 }, ++ { 0x12018, 0x1 }, ++ { 0x12002, 0x6209 }, ++ { 0x120b2, 0x1 }, ++ { 0x121b4, 0x1 }, ++ { 0x122b4, 0x1 }, ++ { 0x123b4, 0x1 }, ++ { 0x124b4, 0x1 }, ++ { 0x125b4, 0x1 }, ++ { 0x126b4, 0x1 }, ++ { 0x127b4, 0x1 }, ++ { 0x128b4, 0x1 }, ++ { 0x13011, 0x1 }, ++ { 0x13012, 0x1 }, ++ { 0x13013, 0x180 }, ++ { 0x13018, 0x1 }, ++ { 0x13002, 0x6209 }, ++ { 0x130b2, 0x1 }, ++ { 0x131b4, 0x1 }, ++ { 0x132b4, 0x1 }, ++ { 0x133b4, 0x1 }, ++ { 0x134b4, 0x1 }, ++ { 0x135b4, 0x1 }, ++ { 0x136b4, 0x1 }, ++ { 0x137b4, 0x1 }, ++ { 0x138b4, 0x1 }, ++ { 0x20089, 0x1 }, ++ { 0x20088, 0x19 }, ++ { 0xc0080, 0x2 }, ++ { 0xd0000, 0x1 } ++}; ++ ++struct dram_fsp_msg ddr_dram_fsp_msg[] = { ++ { ++ /* P0 4000mts 1D */ ++ .drate = 4000, ++ .fw_type = FW_1D_IMAGE, ++ .fsp_cfg = ddr_fsp0_cfg, ++ .fsp_cfg_num = ARRAY_SIZE(ddr_fsp0_cfg), ++ }, ++ { ++ /* P1 400mts 1D */ ++ .drate = 400, ++ .fw_type = FW_1D_IMAGE, ++ .fsp_cfg = ddr_fsp1_cfg, ++ .fsp_cfg_num = ARRAY_SIZE(ddr_fsp1_cfg), ++ }, ++ { ++ /* P2 100mts 1D */ ++ .drate = 100, ++ .fw_type = FW_1D_IMAGE, ++ .fsp_cfg = ddr_fsp2_cfg, ++ .fsp_cfg_num = ARRAY_SIZE(ddr_fsp2_cfg), ++ }, ++ { ++ /* P0 4000mts 2D */ ++ .drate = 4000, ++ .fw_type = FW_2D_IMAGE, ++ .fsp_cfg = ddr_fsp0_2d_cfg, ++ .fsp_cfg_num = ARRAY_SIZE(ddr_fsp0_2d_cfg), ++ }, ++}; ++ ++/* ddr timing config params */ ++struct dram_timing_info dram_timing = { ++ .ddrc_cfg = ddr_ddrc_cfg, ++ .ddrc_cfg_num = ARRAY_SIZE(ddr_ddrc_cfg), ++ .ddrphy_cfg = ddr_ddrphy_cfg, ++ .ddrphy_cfg_num = ARRAY_SIZE(ddr_ddrphy_cfg), ++ .fsp_msg = ddr_dram_fsp_msg, ++ .fsp_msg_num = ARRAY_SIZE(ddr_dram_fsp_msg), ++ .ddrphy_trained_csr = ddr_ddrphy_trained_csr, ++ .ddrphy_trained_csr_num = ARRAY_SIZE(ddr_ddrphy_trained_csr), ++ .ddrphy_pie = ddr_phy_pie, ++ .ddrphy_pie_num = ARRAY_SIZE(ddr_phy_pie), ++ .fsp_table = { 4000, 400, 100, }, ++}; ++ ++static void apply_cfg_patch(struct dram_cfg_param *cfg, int cfg_sz, ++ struct dram_cfg_param *patch, int patch_sz) ++{ ++ int i, j; ++ ++ for (i = 0; i < cfg_sz; i++) ++ for (j = 0; j < patch_sz; j++) ++ if (cfg[i].reg == patch[j].reg) ++ cfg[i].val = patch[j].val; ++} ++ ++void lpddr4_single_rank_training_patch(void) ++{ ++ apply_cfg_patch(ddr_ddrc_cfg, ARRAY_SIZE(ddr_ddrc_cfg), ++ ddr_ddrc_cfg_single_rank_patch, ++ ARRAY_SIZE(ddr_ddrc_cfg_single_rank_patch)); ++ ++ apply_cfg_patch(ddr_fsp0_cfg, ARRAY_SIZE(ddr_fsp0_cfg), ++ ddr_fsp0_cfg_single_rank_patch, ++ ARRAY_SIZE(ddr_fsp0_cfg_single_rank_patch)); ++ ++ apply_cfg_patch(ddr_fsp1_cfg, ARRAY_SIZE(ddr_fsp1_cfg), ++ ddr_fsp1_cfg_single_rank_patch, ++ ARRAY_SIZE(ddr_fsp1_cfg_single_rank_patch)); ++ ++ apply_cfg_patch(ddr_fsp2_cfg, ARRAY_SIZE(ddr_fsp2_cfg), ++ ddr_fsp2_cfg_single_rank_patch, ++ ARRAY_SIZE(ddr_fsp2_cfg_single_rank_patch)); ++ ++ apply_cfg_patch(ddr_fsp0_2d_cfg, ARRAY_SIZE(ddr_fsp0_2d_cfg), ++ ddr_fsp0_2d_cfg_single_rank_patch, ++ ARRAY_SIZE(ddr_fsp0_2d_cfg_single_rank_patch)); ++} diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0014-lpddr4_timing.h.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0014-lpddr4_timing.h.patch new file mode 100644 index 0000000..c5263c1 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0014-lpddr4_timing.h.patch @@ -0,0 +1,12 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/board/toradex/smarc-imx8mp/lpddr4_timing.h 1970-01-01 01:00:00.000000000 +0100 ++++ ./board/toradex/smarc-imx8mp/lpddr4_timing.h 2025-11-21 14:54:55.267379857 +0100 +@@ -0,0 +1,9 @@ ++/* SPDX-License-Identifier: GPL-2.0-or-later */ ++/* Copyright (C) 2024 Toradex */ ++ ++#ifndef __LPDDR4_TIMING_H__ ++#define __LPDDR4_TIMING_H__ ++ ++void lpddr4_single_rank_training_patch(void); ++ ++#endif /* __LPDDR4_TIMING_H__ */ diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0015-MAINTAINERS.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0015-MAINTAINERS.patch new file mode 100644 index 0000000..cfda188 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0015-MAINTAINERS.patch @@ -0,0 +1,13 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/board/toradex/smarc-imx8mp/MAINTAINERS 1970-01-01 01:00:00.000000000 +0100 ++++ ./board/toradex/smarc-imx8mp/MAINTAINERS 2025-11-21 14:54:55.267319243 +0100 +@@ -0,0 +1,10 @@ ++Toradex Smarc iMX8M Plus ++F: arch/arm/dts/imx8mp-toradex-smarc-dev-u-boot.dtsi ++F: board/toradex/smarc-imx8mp/ ++F: board/toradex/common/ ++F: configs/toradex-smarc-imx8mp_defconfig ++F: doc/board/toradex/toradex-smarc-imx8mp.rst ++F: include/configs/toradex-smarc-imx8mp.h ++M: Francesco Dolcini ++S: Maintained ++W: https://www.toradex.com/computer-on-modules/smarc-arm-family/nxp-imx-8m-plus diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0016-Makefile.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0016-Makefile.patch new file mode 100644 index 0000000..190a82c --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0016-Makefile.patch @@ -0,0 +1,12 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/board/toradex/smarc-imx8mp/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ ./board/toradex/smarc-imx8mp/Makefile 2025-11-21 14:54:55.267330121 +0100 +@@ -0,0 +1,9 @@ ++# SPDX-License-Identifier: GPL-2.0-or-later ++# Copyright (C) 2024 Toradex ++ ++obj-y += smarc-imx8mp.o ++ ++ifdef CONFIG_SPL_BUILD ++obj-y += spl.o ++obj-$(CONFIG_IMX8M_LPDDR4) += lpddr4_timing.o ++endif diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0017-smarc-imx8mp.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0017-smarc-imx8mp.c.patch new file mode 100644 index 0000000..b04fd04 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0017-smarc-imx8mp.c.patch @@ -0,0 +1,88 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/board/toradex/smarc-imx8mp/smarc-imx8mp.c 1970-01-01 01:00:00.000000000 +0100 ++++ ./board/toradex/smarc-imx8mp/smarc-imx8mp.c 2025-11-21 14:54:55.267390796 +0100 +@@ -0,0 +1,85 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later ++/* Copyright (C) 2024 Toradex */ ++ ++#include ++#include ++#include ++#include ++ ++#include "../common/tdx-cfg-block.h" ++ ++DECLARE_GLOBAL_DATA_PTR; ++ ++int board_init(void) ++{ ++ return 0; ++} ++ ++int board_phys_sdram_size(phys_size_t *size) ++{ ++ if (!size) ++ return -EINVAL; ++ ++ *size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE + PHYS_SDRAM_2_SIZE); ++ ++ return 0; ++} ++ ++#if IS_ENABLED(CONFIG_OF_LIBFDT) && IS_ENABLED(CONFIG_OF_BOARD_SETUP) ++static bool board_has_wifi(void) ++{ ++ struct gpio_desc *desc; ++ ++ if (!gpio_hog_lookup_name("BT_UART_RXD_GPIO", &desc)) ++ return !!dm_gpio_get_value(desc); ++ ++ return true; ++} ++ ++/* ++ * Module variants with a Wi-Fi/Bluetooth module use UART3 for Bluetooth, ++ * those without use UART3 as the SMARC SER3 UART. ++ * Test for a Wi-Fi module and if none found reassign UART3 interface to ++ * the SMARC SER3 pins. ++ */ ++static void ft_board_assign_uart(void *blob) ++{ ++ const char *uart_path = "/soc@0/bus@30800000/spba-bus@30800000/serial@30880000"; ++ const char *pinctrl_path = "/soc@0/bus@30000000/pinctrl@30330000/uart3grp"; ++ int pinctrl_offset; ++ int uart_offset; ++ int bt_offset; ++ u32 phandle; ++ ++ if (board_has_wifi()) ++ return; ++ ++ uart_offset = fdt_path_offset(blob, uart_path); ++ if (uart_offset < 0) ++ return; ++ ++ fdt_delprop(blob, uart_offset, "uart-has-rtscts"); ++ bt_offset = fdt_subnode_offset(blob, uart_offset, "bluetooth"); ++ if (bt_offset < 0) ++ return; ++ ++ fdt_del_node(blob, bt_offset); ++ ++ pinctrl_offset = fdt_path_offset(blob, pinctrl_path); ++ if (pinctrl_offset < 0) ++ return; ++ ++ phandle = fdt_get_phandle(blob, pinctrl_offset); ++ if (phandle < 0) ++ return; ++ ++ fdt_setprop_u32(blob, uart_offset, "pinctrl-0", phandle); ++} ++ ++int ft_board_setup(void *blob, struct bd_info *bd) ++{ ++ ft_board_assign_uart(blob); ++ ++ return ft_common_board_setup(blob, bd); ++} ++#endif diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0018-smarc-imx8mp.env.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0018-smarc-imx8mp.env.patch new file mode 100644 index 0000000..937fc8a --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0018-smarc-imx8mp.env.patch @@ -0,0 +1,23 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/board/toradex/smarc-imx8mp/smarc-imx8mp.env 1970-01-01 01:00:00.000000000 +0100 ++++ ./board/toradex/smarc-imx8mp/smarc-imx8mp.env 2025-11-21 14:54:55.267402206 +0100 +@@ -0,0 +1,20 @@ ++boot_script_dhcp=boot.scr ++boot_targets=mmc1 mmc0 dhcp ++console=ttymxc1 ++fdt_addr_r=0x50200000 ++fdt_board=dev ++initrd_addr=0x43800000 ++initrd_high=0xffffffffffffffff ++kernel_addr_r=CONFIG_SYS_LOAD_ADDR ++kernel_comp_addr_r=0x40200000 ++kernel_comp_size=0x08000000 ++ramdisk_addr_r=0x50300000 ++scriptaddr=0x50280000 ++ ++update_uboot= ++ askenv confirm Did you load flash.bin (y/N)?; ++ if test $confirm = y; then ++ setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ++ ${blkcnt} / 0x200; mmc dev 0 1; mmc write ${loadaddr} 0x0 ++ ${blkcnt}; ++ fi diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0019-spl.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0019-spl.c.patch new file mode 100644 index 0000000..feb3fd6 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0019-spl.c.patch @@ -0,0 +1,133 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/board/toradex/smarc-imx8mp/spl.c 1970-01-01 01:00:00.000000000 +0100 ++++ ./board/toradex/smarc-imx8mp/spl.c 2025-11-21 14:54:55.267413006 +0100 +@@ -0,0 +1,130 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later ++/* Copyright (C) 2024 Toradex */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "lpddr4_timing.h" ++ ++DECLARE_GLOBAL_DATA_PTR; ++ ++int spl_board_boot_device(enum boot_device boot_dev_spl) ++{ ++ return BOOT_DEVICE_BOOTROM; ++} ++ ++void spl_dram_init(void) ++{ ++ /* ++ * Try configuring for dual rank memory falling back to single rank ++ */ ++ if (!ddr_init(&dram_timing)) { ++ puts("DDR configured as dual rank\n"); ++ return; ++ } ++ ++ lpddr4_single_rank_training_patch(); ++ if (!ddr_init(&dram_timing)) { ++ puts("DDR configured as single rank\n"); ++ return; ++ } ++ puts("DDR configuration failed\n"); ++} ++ ++void spl_board_init(void) ++{ ++ arch_misc_init(); ++ ++ /* ++ * Set GIC clock to 500Mhz for OD VDD_SOC. Kernel driver does ++ * not allow to change it. Should set the clock after PMIC ++ * setting done. Default is 400Mhz (system_pll1_800m with div = 2) ++ * set by ROM for ND VDD_SOC ++ */ ++ clock_enable(CCGR_GIC, 0); ++ clock_set_target_val(GIC_CLK_ROOT, CLK_ROOT_ON | CLK_ROOT_SOURCE_SEL(5)); ++ clock_enable(CCGR_GIC, 1); ++ ++ puts("Normal Boot\n"); ++} ++ ++int power_init_board(void) ++{ ++ struct udevice *dev; ++ int ret; ++ ++ ret = pmic_get("pmic@25", &dev); ++ if (ret == -ENODEV) { ++ puts("No pmic@25\n"); ++ return 0; ++ } ++ if (ret < 0) ++ return ret; ++ ++ /* BUCKxOUT_DVS0/1 control BUCK123 output */ ++ pmic_reg_write(dev, PCA9450_BUCK123_DVS, 0x29); ++ ++ /* ++ * Increase VDD_SOC to typical value 0.95V before first ++ * DRAM access, set DVS1 to 0.85V for suspend. ++ * Enable DVS control through PMIC_STBY_REQ and ++ * set B1_ENMODE=1 (ON by PMIC_ON_REQ=H) ++ */ ++ if (IS_ENABLED(CONFIG_IMX8M_VDD_SOC_850MV)) ++ /* set DVS0 to 0.85v for special case */ ++ pmic_reg_write(dev, PCA9450_BUCK1OUT_DVS0, 0x14); ++ else ++ pmic_reg_write(dev, PCA9450_BUCK1OUT_DVS0, 0x1c); ++ ++ pmic_reg_write(dev, PCA9450_BUCK1OUT_DVS1, 0x14); ++ pmic_reg_write(dev, PCA9450_BUCK1CTRL, 0x59); ++ ++ /* ++ * Kernel uses OD/OD freq for SOC. ++ * To avoid timing risk from SOC to ARM,increase VDD_ARM to OD ++ * voltage 0.95V. ++ */ ++ pmic_reg_write(dev, PCA9450_BUCK2OUT_DVS0, 0x1c); ++ ++ /* set LDO4 and CONFIG2 to enable the I2C level translator */ ++ pmic_reg_write(dev, PCA9450_LDO4CTRL, 0x59); ++ pmic_reg_write(dev, PCA9450_CONFIG2, 0x1); ++ ++ return 0; ++} ++ ++/* Do not use BSS area in this phase */ ++void board_init_f(ulong dummy) ++{ ++ int ret; ++ ++ arch_cpu_init(); ++ ++ init_uart_clk(3); ++ ++ ret = spl_early_init(); ++ if (ret) { ++ debug("spl_init() failed: %d\n", ret); ++ hang(); ++ } ++ ++ preloader_console_init(); ++ ++ enable_tzc380(); ++ ++ /* PMIC initialization */ ++ power_init_board(); ++ ++ /* DDR initialization */ ++ spl_dram_init(); ++} diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0020-lpddr4_timing.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0020-lpddr4_timing.c.patch new file mode 100644 index 0000000..360579d --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0020-lpddr4_timing.c.patch @@ -0,0 +1,65 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/board/toradex/verdin-imx8mm/lpddr4_timing.c 2025-11-21 14:56:51.518826848 +0100 ++++ ./board/toradex/verdin-imx8mm/lpddr4_timing.c 2025-11-21 14:54:55.267114225 +0100 +@@ -18,7 +18,7 @@ + {0x3d400000, 0xa1080020}, + {0x3d400020, 0x202}, + {0x3d400024, 0x3a980}, +- {0x3d400064, 0x2d00d2}, ++ {0x3d400064, 0x2d011d}, + {0x3d4000d0, 0xc00305ba}, + {0x3d4000d4, 0x940000}, + {0x3d4000dc, 0xd4002d}, +@@ -34,7 +34,7 @@ + {0x3d40011c, 0x402}, + {0x3d400130, 0x20600}, + {0x3d400134, 0xc100002}, +- {0x3d400138, 0xd8}, ++ {0x3d400138, 0x123}, + {0x3d400144, 0x96004b}, + {0x3d400180, 0x2ee0017}, + {0x3d400184, 0x2605b8e}, +@@ -56,7 +56,7 @@ + {0x3d400204, 0x80808}, + {0x3d400214, 0x7070707}, + {0x3d400218, 0x7070707}, +- {0x3d40021c, 0xf0f}, ++ {0x3d40021c, 0xf07}, + {0x3d400250, 0x29001701}, + {0x3d400254, 0x2c}, + {0x3d40025c, 0x4000030}, +@@ -71,7 +71,7 @@ + {0x3d402020, 0x0}, + {0x3d402024, 0x7d00}, + {0x3d402050, 0x20d040}, +- {0x3d402064, 0x6001c}, ++ {0x3d402064, 0x60026}, + {0x3d4020dc, 0x840000}, + {0x3d4020e0, 0x310000}, + {0x3d4020e8, 0x66004d}, +@@ -86,7 +86,7 @@ + {0x3d40211c, 0x302}, + {0x3d402130, 0x20300}, + {0x3d402134, 0xa100002}, +- {0x3d402138, 0x1d}, ++ {0x3d402138, 0x27}, + {0x3d402144, 0x14000a}, + {0x3d402180, 0x640004}, + {0x3d402190, 0x3818200}, +@@ -96,7 +96,7 @@ + {0x3d403020, 0x0}, + {0x3d403024, 0x1f40}, + {0x3d403050, 0x20d040}, +- {0x3d403064, 0x30007}, ++ {0x3d403064, 0x3000A}, + {0x3d4030dc, 0x840000}, + {0x3d4030e0, 0x310000}, + {0x3d4030e8, 0x66004d}, +@@ -111,7 +111,7 @@ + {0x3d40311c, 0x302}, + {0x3d403130, 0x20300}, + {0x3d403134, 0xa100002}, +- {0x3d403138, 0x8}, ++ {0x3d403138, 0xA}, + {0x3d403144, 0x50003}, + {0x3d403180, 0x190004}, + {0x3d403190, 0x3818200}, diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0021-verdin-imx8mm.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0021-verdin-imx8mm.c.patch new file mode 100644 index 0000000..b07c27c --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0021-verdin-imx8mm.c.patch @@ -0,0 +1,57 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/board/toradex/verdin-imx8mm/verdin-imx8mm.c 2025-11-21 14:56:51.518826848 +0100 ++++ ./board/toradex/verdin-imx8mm/verdin-imx8mm.c 2025-11-21 14:54:55.267149306 +0100 +@@ -84,7 +84,8 @@ + */ + is_wifi = (tdx_hw_tag.prodid == VERDIN_IMX8MMQ_WIFI_BT_IT) || + (tdx_hw_tag.prodid == VERDIN_IMX8MMDL_WIFI_BT_IT) || +- (tdx_hw_tag.prodid == VERDIN_IMX8MMQ_WIFI_BT_IT_NO_CAN); ++ (tdx_hw_tag.prodid == VERDIN_IMX8MMQ_WIFI_BT_IT_NO_CAN) || ++ (tdx_hw_tag.prodid == VERDIN_IMX8MMQ_4G_WIFI_BT_ET); + } + + switch (get_pcb_revision()) { +@@ -117,7 +118,7 @@ + if (!size) + return -EINVAL; + +- *size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE); ++ *size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE + PHYS_SDRAM_2_SIZE); + + return 0; + } +@@ -125,6 +126,35 @@ + #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) + int ft_board_setup(void *blob, struct bd_info *bd) + { ++ const char *canoscpath = "/oscillator"; ++ int freq = 40000000; /* 40 MHz is used on most variants */ ++ int canoscoff, ret; ++ ++ canoscoff = fdt_path_offset(blob, canoscpath); ++ if (canoscoff < 0) /* No CAN oscillator found. */ ++ goto exit; ++ ++ /* ++ * The following "prodid" (PID4 in Toradex naming) use ++ * a 20MHz CAN oscillator: ++ * - 0055, V1.1A, V1.1B, V1.1C and V1.1D ++ * - 0059, V1.1A and V1.1B ++ */ ++ if ((tdx_hw_tag.ver_major == 1 && tdx_hw_tag.ver_minor == 1) && ++ ((tdx_hw_tag.prodid == VERDIN_IMX8MMQ_IT && ++ tdx_hw_tag.ver_assembly <= 1) || /* 0059 rev. A or B */ ++ (tdx_hw_tag.prodid == VERDIN_IMX8MMQ_WIFI_BT_IT && ++ tdx_hw_tag.ver_assembly <= 3))) { /* 0055 rev. A/B/C/D */ ++ freq = 20000000; ++ } ++ ++ ret = fdt_setprop_u32(blob, canoscoff, "clock-frequency", freq); ++ if (ret < 0) { ++ printf("Failed to set CAN oscillator clock-frequency, ret=%d\n", ++ ret); ++ } ++ ++exit: + return ft_common_board_setup(blob, bd); + } + #endif diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0022-apalis_imx6_defconfig.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0022-apalis_imx6_defconfig.patch new file mode 100644 index 0000000..8066b44 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0022-apalis_imx6_defconfig.patch @@ -0,0 +1,11 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/configs/apalis_imx6_defconfig 2025-11-21 14:56:51.554341987 +0100 ++++ ./configs/apalis_imx6_defconfig 2025-11-21 14:54:55.283301958 +0100 +@@ -33,7 +33,7 @@ + CONFIG_BOOTDELAY=1 + CONFIG_BOOTCOMMAND="run distro_bootcmd; usb start; setenv stdout serial,vidconsole; setenv stdin serial,usbkbd" + CONFIG_USE_PREBOOT=y +-CONFIG_PREBOOT="test -n ${fdtfile} || setenv fdtfile imx6q-apalis-${fdt_board}.dtb" ++CONFIG_PREBOOT="test -n ${fdtfile} || setenv fdtfile imx6q-apalis${variant}-${fdt_board}.dtb" + CONFIG_SYS_CBSIZE=1024 + CONFIG_SYS_PBSIZE=1055 + CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0023-colibri_imx6_defconfig.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0023-colibri_imx6_defconfig.patch new file mode 100644 index 0000000..91741df --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0023-colibri_imx6_defconfig.patch @@ -0,0 +1,11 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/configs/colibri_imx6_defconfig 2025-11-21 14:56:51.556341839 +0100 ++++ ./configs/colibri_imx6_defconfig 2025-11-21 14:54:55.285120816 +0100 +@@ -32,7 +32,7 @@ + CONFIG_BOOTDELAY=1 + CONFIG_BOOTCOMMAND="run distro_bootcmd; usb start; setenv stdout serial,vidconsole; setenv stdin serial,usbkbd" + CONFIG_USE_PREBOOT=y +-CONFIG_PREBOOT="test -n ${fdtfile} || setenv fdtfile imx6dl-colibri-${fdt_board}.dtb" ++CONFIG_PREBOOT="test -n ${fdtfile} || setenv fdtfile imx6dl-colibri${variant}-${fdt_board}.dtb" + CONFIG_SYS_CBSIZE=1024 + CONFIG_SYS_PBSIZE=1056 + CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE=y diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0024-toradex-smarc-imx8mp_defconfig.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0024-toradex-smarc-imx8mp_defconfig.patch new file mode 100644 index 0000000..784f920 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0024-toradex-smarc-imx8mp_defconfig.patch @@ -0,0 +1,187 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/configs/toradex-smarc-imx8mp_defconfig 1970-01-01 01:00:00.000000000 +0100 ++++ ./configs/toradex-smarc-imx8mp_defconfig 2025-11-21 14:54:55.299537021 +0100 +@@ -0,0 +1,184 @@ ++CONFIG_ARM=y ++CONFIG_ARCH_IMX8M=y ++CONFIG_TEXT_BASE=0x40200000 ++CONFIG_SPL_GPIO=y ++CONFIG_SPL_LIBCOMMON_SUPPORT=y ++CONFIG_SPL_LIBGENERIC_SUPPORT=y ++CONFIG_NR_DRAM_BANKS=2 ++CONFIG_ENV_SIZE=0x2000 ++CONFIG_ENV_OFFSET=0xFFFFDE00 ++CONFIG_DM_GPIO=y ++CONFIG_DEFAULT_DEVICE_TREE="imx8mp-toradex-smarc-dev" ++CONFIG_SPL_TEXT_BASE=0x920000 ++CONFIG_TARGET_TORADEX_SMARC_IMX8MP=y ++CONFIG_OF_LIBFDT_OVERLAY=y ++CONFIG_DM_RESET=y ++CONFIG_SYS_MONITOR_LEN=524288 ++CONFIG_SPL_MMC=y ++CONFIG_SPL_SERIAL=y ++CONFIG_SPL_DRIVERS_MISC=y ++CONFIG_SPL_STACK=0x960000 ++CONFIG_SPL_SYS_MALLOC_F_LEN=0x4000 ++CONFIG_SPL_HAS_BSS_LINKER_SECTION=y ++CONFIG_SPL_BSS_START_ADDR=0x98fc00 ++CONFIG_SPL_BSS_MAX_SIZE=0x400 ++CONFIG_SPL=y ++CONFIG_IMX_BOOTAUX=y ++CONFIG_SPL_IMX_ROMAPI_LOADADDR=0x48000000 ++CONFIG_SYS_LOAD_ADDR=0x48200000 ++CONFIG_PCI=y ++CONFIG_SYS_MEMTEST_START=0x40000000 ++CONFIG_SYS_MEMTEST_END=0x80000000 ++CONFIG_REMAKE_ELF=y ++CONFIG_FIT=y ++CONFIG_FIT_EXTERNAL_OFFSET=0x3000 ++CONFIG_FIT_VERBOSE=y ++CONFIG_SPL_LOAD_FIT=y ++CONFIG_BOOTSTD_FULL=y ++# CONFIG_BOOTSTD_BOOTCOMMAND is not set ++CONFIG_BOOTDELAY=1 ++CONFIG_OF_SYSTEM_SETUP=y ++CONFIG_BOOTCOMMAND="bootflow scan -b" ++CONFIG_USE_PREBOOT=y ++CONFIG_PREBOOT="test -n ${fdtfile} || setenv fdtfile imx8mp-toradex-smarc-dev.dtb" ++CONFIG_SYS_CBSIZE=2048 ++CONFIG_SYS_PBSIZE=2081 ++CONFIG_LOG=y ++# CONFIG_DISPLAY_BOARDINFO is not set ++CONFIG_DISPLAY_BOARDINFO_LATE=y ++CONFIG_ARCH_MISC_INIT=y ++CONFIG_SPL_MAX_SIZE=0x26000 ++CONFIG_SPL_BOARD_INIT=y ++CONFIG_SPL_BOOTROM_SUPPORT=y ++CONFIG_SPL_SYS_MALLOC_SIMPLE=y ++# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set ++CONFIG_SPL_SYS_MALLOC=y ++CONFIG_SPL_HAS_CUSTOM_MALLOC_START=y ++CONFIG_SPL_CUSTOM_SYS_MALLOC_ADDR=0x42200000 ++CONFIG_SPL_SYS_MALLOC_SIZE=0x80000 ++CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y ++CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x300 ++CONFIG_SPL_I2C=y ++CONFIG_SPL_POWER=y ++CONFIG_SPL_WATCHDOG=y ++CONFIG_SYS_PROMPT="SMARC iMX8MP # " ++# CONFIG_BOOTM_NETBSD is not set ++CONFIG_CMD_ASKENV=y ++# CONFIG_CMD_EXPORTENV is not set ++CONFIG_CRC32_VERIFY=y ++CONFIG_CMD_MD5SUM=y ++CONFIG_MD5SUM_VERIFY=y ++CONFIG_CMD_MEMTEST=y ++CONFIG_CMD_CLK=y ++CONFIG_CMD_FUSE=y ++CONFIG_CMD_GPIO=y ++CONFIG_CMD_I2C=y ++CONFIG_CMD_MMC=y ++CONFIG_CMD_PCI=y ++CONFIG_CMD_READ=y ++CONFIG_CMD_USB=y ++CONFIG_CMD_USB_MASS_STORAGE=y ++CONFIG_CMD_BOOTCOUNT=y ++CONFIG_CMD_CACHE=y ++CONFIG_CMD_TIME=y ++CONFIG_CMD_SYSBOOT=y ++CONFIG_CMD_UUID=y ++CONFIG_CMD_REGULATOR=y ++CONFIG_CMD_EXT4_WRITE=y ++# CONFIG_ISO_PARTITION is not set ++# CONFIG_SPL_EFI_PARTITION is not set ++CONFIG_OF_CONTROL=y ++CONFIG_SPL_OF_CONTROL=y ++CONFIG_ENV_OVERWRITE=y ++CONFIG_ENV_IS_IN_MMC=y ++CONFIG_SYS_RELOC_GD_ENV_ADDR=y ++CONFIG_SYS_MMC_ENV_DEV=0 ++CONFIG_SYS_MMC_ENV_PART=1 ++CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y ++CONFIG_USE_ETHPRIME=y ++CONFIG_ETHPRIME="eth0" ++CONFIG_VERSION_VARIABLE=y ++CONFIG_NET_RANDOM_ETHADDR=y ++CONFIG_IP_DEFRAG=y ++CONFIG_TFTP_BLOCKSIZE=4096 ++CONFIG_SPL_DM=y ++CONFIG_BOOTCOUNT_LIMIT=y ++CONFIG_BOOTCOUNT_ENV=y ++CONFIG_CLK_COMPOSITE_CCF=y ++CONFIG_CLK_IMX8MP=y ++CONFIG_FSL_CAAM=y ++CONFIG_USB_FUNCTION_FASTBOOT=y ++CONFIG_FASTBOOT_BUF_ADDR=0x44200000 ++CONFIG_FASTBOOT_FLASH=y ++CONFIG_FASTBOOT_UUU_SUPPORT=y ++CONFIG_FASTBOOT_FLASH_MMC_DEV=0 ++CONFIG_GPIO_HOG=y ++CONFIG_SPL_GPIO_HOG=y ++CONFIG_MXC_GPIO=y ++CONFIG_DM_PCA953X=y ++CONFIG_DM_I2C=y ++CONFIG_LED=y ++CONFIG_LED_GPIO=y ++CONFIG_I2C_EEPROM=y ++CONFIG_SUPPORT_EMMC_BOOT=y ++CONFIG_MMC_IO_VOLTAGE=y ++CONFIG_SPL_MMC_IO_VOLTAGE=y ++CONFIG_MMC_UHS_SUPPORT=y ++CONFIG_SPL_MMC_UHS_SUPPORT=y ++CONFIG_MMC_HS400_ES_SUPPORT=y ++CONFIG_MMC_HS400_SUPPORT=y ++CONFIG_SPL_MMC_HS400_SUPPORT=y ++CONFIG_FSL_USDHC=y ++CONFIG_PHY_ADDR_ENABLE=y ++CONFIG_PHY_TI_DP83867=y ++CONFIG_DM_MDIO=y ++CONFIG_DM_ETH_PHY=y ++CONFIG_DWC_ETH_QOS=y ++CONFIG_DWC_ETH_QOS_IMX=y ++CONFIG_FEC_MXC=y ++CONFIG_RGMII=y ++CONFIG_MII=y ++CONFIG_NVME_PCI=y ++CONFIG_PCIE_DW_IMX=y ++CONFIG_PHY=y ++CONFIG_PHY_IMX8MQ_USB=y ++CONFIG_PHY_IMX8M_PCIE=y ++CONFIG_PINCTRL=y ++CONFIG_SPL_PINCTRL=y ++CONFIG_PINCTRL_IMX8M=y ++CONFIG_POWER_DOMAIN=y ++CONFIG_IMX8M_POWER_DOMAIN=y ++CONFIG_IMX8MP_HSIOMIX_BLKCTRL=y ++CONFIG_DM_PMIC=y ++CONFIG_DM_PMIC_PCA9450=y ++CONFIG_SPL_DM_PMIC_PCA9450=y ++CONFIG_DM_REGULATOR_PCA9450=y ++CONFIG_SPL_DM_REGULATOR_PCA9450=y ++CONFIG_DM_REGULATOR_FIXED=y ++CONFIG_DM_REGULATOR_GPIO=y ++CONFIG_DM_SERIAL=y ++CONFIG_MXC_UART=y ++CONFIG_SYSRESET=y ++CONFIG_SPL_SYSRESET=y ++CONFIG_SYSRESET_PSCI=y ++CONFIG_SYSRESET_WATCHDOG=y ++CONFIG_DM_THERMAL=y ++CONFIG_IMX_TMU=y ++CONFIG_USB=y ++# CONFIG_SPL_DM_USB is not set ++CONFIG_DM_USB_GADGET=y ++CONFIG_USB_XHCI_HCD=y ++CONFIG_USB_XHCI_DWC3=y ++CONFIG_USB_XHCI_DWC3_OF_SIMPLE=y ++CONFIG_USB_EHCI_HCD=y ++# CONFIG_USB_EHCI_MX7 is not set ++CONFIG_USB_DWC3=y ++CONFIG_USB_DWC3_GENERIC=y ++CONFIG_USB_KEYBOARD=y ++CONFIG_USB_HOST_ETHER=y ++CONFIG_USB_GADGET=y ++CONFIG_USB_GADGET_MANUFACTURER="Toradex" ++CONFIG_USB_GADGET_VENDOR_NUM=0x1b67 ++CONFIG_USB_GADGET_PRODUCT_NUM=0x4000 ++CONFIG_IMX_WATCHDOG=y ++CONFIG_HEXDUMP=y diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0025-verdin-imx8mm_defconfig.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0025-verdin-imx8mm_defconfig.patch new file mode 100644 index 0000000..2221653 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0025-verdin-imx8mm_defconfig.patch @@ -0,0 +1,20 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/configs/verdin-imx8mm_defconfig 2025-11-21 14:56:51.574340514 +0100 ++++ ./configs/verdin-imx8mm_defconfig 2025-11-21 14:54:55.298673396 +0100 +@@ -29,6 +29,7 @@ + CONFIG_FIT_EXTERNAL_OFFSET=0x3000 + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_LOAD_FIT=y ++CONFIG_SPL_LOAD_FIT_ADDRESS=0x44000000 + CONFIG_DISTRO_DEFAULTS=y + CONFIG_BOOTDELAY=1 + CONFIG_OF_SYSTEM_SETUP=y +@@ -99,8 +100,7 @@ + CONFIG_SPL_CLK_IMX8MM=y + CONFIG_CLK_IMX8MM=y + CONFIG_USB_FUNCTION_FASTBOOT=y +-CONFIG_FASTBOOT_BUF_ADDR=0x42800000 +-CONFIG_FASTBOOT_BUF_SIZE=0x40000000 ++CONFIG_FASTBOOT_BUF_ADDR=0x44200000 + CONFIG_FASTBOOT_FLASH=y + CONFIG_FASTBOOT_UUU_SUPPORT=y + CONFIG_FASTBOOT_FLASH_MMC_DEV=0 diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0026-verdin-imx8mp_defconfig.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0026-verdin-imx8mp_defconfig.patch new file mode 100644 index 0000000..2f6c824 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0026-verdin-imx8mp_defconfig.patch @@ -0,0 +1,28 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/configs/verdin-imx8mp_defconfig 2025-11-21 14:56:51.574340514 +0100 ++++ ./configs/verdin-imx8mp_defconfig 2025-11-21 14:54:55.298690449 +0100 +@@ -38,6 +38,7 @@ + CONFIG_FIT_EXTERNAL_OFFSET=0x3000 + CONFIG_FIT_VERBOSE=y + CONFIG_SPL_LOAD_FIT=y ++CONFIG_SPL_LOAD_FIT_ADDRESS=0x44000000 + CONFIG_DISTRO_DEFAULTS=y + CONFIG_BOOTDELAY=1 + CONFIG_OF_SYSTEM_SETUP=y +@@ -81,6 +82,7 @@ + CONFIG_CMD_CLK=y + CONFIG_CMD_FUSE=y + CONFIG_CMD_GPIO=y ++CONFIG_CMD_GPIO_READ=y + CONFIG_CMD_I2C=y + CONFIG_CMD_MMC=y + CONFIG_CMD_PCI=y +@@ -111,8 +113,7 @@ + CONFIG_CLK_IMX8MP=y + CONFIG_FSL_CAAM=y + CONFIG_USB_FUNCTION_FASTBOOT=y +-CONFIG_FASTBOOT_BUF_ADDR=0x42800000 +-CONFIG_FASTBOOT_BUF_SIZE=0x40000000 ++CONFIG_FASTBOOT_BUF_ADDR=0x44200000 + CONFIG_FASTBOOT_FLASH=y + CONFIG_FASTBOOT_UUU_SUPPORT=y + CONFIG_FASTBOOT_FLASH_MMC_DEV=0 diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0027-index.rst.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0027-index.rst.patch new file mode 100644 index 0000000..b59ad17 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0027-index.rst.patch @@ -0,0 +1,7 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/doc/board/toradex/index.rst 2025-11-21 14:56:51.590210899 +0100 ++++ ./doc/board/toradex/index.rst 2025-11-21 14:54:55.307180811 +0100 +@@ -12,3 +12,4 @@ + verdin-am62 + verdin-imx8mm + verdin-imx8mp ++ smarc-imx8mp diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0028-smarc-imx8mp.rst.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0028-smarc-imx8mp.rst.patch new file mode 100644 index 0000000..64208d3 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0028-smarc-imx8mp.rst.patch @@ -0,0 +1,119 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/doc/board/toradex/smarc-imx8mp.rst 1970-01-01 01:00:00.000000000 +0100 ++++ ./doc/board/toradex/smarc-imx8mp.rst 2025-11-21 14:54:55.307193671 +0100 +@@ -0,0 +1,116 @@ ++.. SPDX-License-Identifier: GPL-2.0-or-later ++ ++Toradex SMARC iMX8M Plus Module ++=============================== ++ ++- SoM: https://www.toradex.com/computer-on-modules/smarc-arm-family/nxp-imx-8m-plus ++- Carrier board: https://www.toradex.com/products/carrier-board/smarc-development-board-kit ++ ++Quick Start ++----------- ++ ++- Build the ARM trusted firmware binary ++- Get the DDR firmware ++- Build U-Boot ++- Flash to eMMC ++- Boot ++ ++Get and Build the ARM Trusted Firmware (Trusted Firmware A) ++----------------------------------------------------------- ++ ++.. code-block:: bash ++ ++ $ echo "Downloading and building TF-A..." ++ $ git clone https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git ++ $ cd trusted-firmware-a ++ ++Then build ATF (TF-A): ++ ++.. code-block:: bash ++ ++ $ export CROSS_COMPILE=aarch64-linux-gnu- ++ $ make PLAT=imx8mp IMX_BOOT_UART_BASE=0x30a60000 bl31 ++ $ cp build/imx8mp/release/bl31.bin ../ ++ ++Get the DDR Firmware ++-------------------- ++ ++.. code-block:: bash ++ ++ $ cd .. ++ $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.10.1.bin ++ $ chmod +x firmware-imx-8.10.1.bin ++ $ ./firmware-imx-8.10.1.bin ++ $ cp firmware-imx-8.10.1/firmware/ddr/synopsys/lpddr4*_202006.bin ./ ++ ++Build U-Boot ++------------ ++ ++.. code-block:: bash ++ ++ $ export CROSS_COMPILE=aarch64-linux-gnu- ++ $ make toradex-smarc-imx8mp_defconfig ++ $ make ++ ++Flash to eMMC ++------------- ++ ++.. code-block:: bash ++ ++ > tftpboot ${loadaddr} flash.bin ++ > setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt ${blkcnt} / 0x200 ++ > mmc dev 0 1 && mmc write ${loadaddr} 0x0 ${blkcnt} ++ ++As a convenience, instead of the last two commands, one may also use the update ++U-Boot wrapper: ++ ++.. code-block:: bash ++ ++ > run update_uboot ++ ++Boot ++---- ++ ++ATF, U-Boot proper and u-boot.dtb images are packed into a FIT image, ++which is loaded and parsed by SPL. ++ ++Boot sequence is: ++ ++* SPL ---> ATF (TF-A) ---> U-Boot proper ++ ++Output:: ++ ++U-Boot SPL 2024.07-7.2.0-devel+git.3f772959501c (Jul 01 2024 - 18:07:18 +0000) ++Training FAILED ++DDR configured as single rank ++SEC0: RNG instantiated ++Normal Boot ++Trying to boot from BOOTROM ++Boot Stage: Primary boot ++Find img info 0x4802f400, size 1052 ++Need continue download 1024 ++NOTICE: Do not release JR0 to NS as it can be used by HAB ++NOTICE: BL31: v2.10.0 (release):android-14.0.0_2.2.0-rc2-0-g7c64d4e864c1-dirty ++NOTICE: BL31: Built : 10:35:32, Aug 29 2024 ++ ++ ++U-Boot 2024.07-7.2.0-devel+git.3f772959501c (Jul 01 2024 - 18:07:18 +0000) ++ ++CPU: Freescale i.MX8MP[8] rev1.1 1600 MHz (running at 1200 MHz) ++CPU: Industrial temperature grade (-40C to 105C) at 71C ++Reset cause: POR ++DRAM: 4 GiB ++Core: 183 devices, 31 uclasses, devicetree: separate ++WDT: Started watchdog@30280000 with servicing every 1000ms (60s timeout) ++MMC: FSL_SDHC: 1, FSL_SDHC: 0 ++Loading Environment from MMC... Reading from MMC(0)... OK ++In: serial@30a60000 ++Out: serial@30a60000 ++Err: serial@30a60000 ++Model: Toradex 0097 SMARC iMX8M Plus Quad 4GB WB IT V1.0A ++Serial#: 15603364 ++SEC0: RNG instantiated ++Net: Get shared mii bus on ethernet@30be0000 ++eth1: ethernet@30be0000, eth0: ethernet@30bf0000 [PRIME] ++Hit any key to stop autoboot: 0 ++SMARC iMX8MP # diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0029-imx8mm-verdin.dtsi.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0029-imx8mm-verdin.dtsi.patch new file mode 100644 index 0000000..3667b53 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0029-imx8mm-verdin.dtsi.patch @@ -0,0 +1,11 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/dts/upstream/src/arm64/freescale/imx8mm-verdin.dtsi 2025-11-21 14:56:52.006308725 +0100 ++++ ./dts/upstream/src/arm64/freescale/imx8mm-verdin.dtsi 2025-11-21 14:54:55.548301147 +0100 +@@ -145,7 +145,7 @@ + regulator-max-microvolt = <3300000>; + regulator-min-microvolt = <3300000>; + regulator-name = "+V3.3_SD"; +- startup-delay-us = <2000>; ++ startup-delay-us = <20000>; + }; + + reserved-memory { diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0030-imx8mp-verdin.dtsi.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0030-imx8mp-verdin.dtsi.patch new file mode 100644 index 0000000..4dec4e8 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0030-imx8mp-verdin.dtsi.patch @@ -0,0 +1,11 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/dts/upstream/src/arm64/freescale/imx8mp-verdin.dtsi 2025-11-21 14:56:52.009308513 +0100 ++++ ./dts/upstream/src/arm64/freescale/imx8mp-verdin.dtsi 2025-11-21 14:54:55.549694624 +0100 +@@ -151,7 +151,7 @@ + regulator-max-microvolt = <3300000>; + regulator-min-microvolt = <3300000>; + regulator-name = "+V3.3_SD"; +- startup-delay-us = <2000>; ++ startup-delay-us = <20000>; + }; + + reserved-memory { diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0031-toradex-smarc-imx8mp.h.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0031-toradex-smarc-imx8mp.h.patch new file mode 100644 index 0000000..9d39cf3 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0031-toradex-smarc-imx8mp.h.patch @@ -0,0 +1,31 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/include/configs/toradex-smarc-imx8mp.h 1970-01-01 01:00:00.000000000 +0100 ++++ ./include/configs/toradex-smarc-imx8mp.h 2025-11-21 14:54:55.599947130 +0100 +@@ -0,0 +1,28 @@ ++/* SPDX-License-Identifier: GPL-2.0-or-later */ ++/* Copyright (C) 2024 Toradex */ ++ ++#ifndef __TORADEX_SMARC_IMX8MP_H ++#define __TORADEX_SMARC_IMX8MP_H ++ ++#include ++#include ++ ++#define CFG_SYS_UBOOT_BASE \ ++ (QSPI0_AMBA_BASE + CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR * 512) ++ ++#ifdef CONFIG_SPL_BUILD ++/* malloc f used before GD_FLG_FULL_MALLOC_INIT set */ ++#define CFG_MALLOC_F_ADDR 0x184000 ++#endif /* CONFIG_SPL_BUILD */ ++ ++#define CFG_SYS_INIT_RAM_ADDR 0x40000000 ++#define CFG_SYS_INIT_RAM_SIZE SZ_512K ++ ++/* i.MX 8M Plus supports max. 8GB memory in two albeit consecutive banks */ ++#define CFG_SYS_SDRAM_BASE 0x40000000 ++#define PHYS_SDRAM 0x40000000 ++#define PHYS_SDRAM_SIZE (SZ_2G + SZ_1G) ++#define PHYS_SDRAM_2 0x100000000 ++#define PHYS_SDRAM_2_SIZE (SZ_4G + SZ_1G) ++ ++#endif /* __TORADEX_SMARC_IMX8MP_H */ diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0032-verdin-imx8mm.h.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0032-verdin-imx8mm.h.patch new file mode 100644 index 0000000..034dadd --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0032-verdin-imx8mm.h.patch @@ -0,0 +1,15 @@ +--- /home/rossierd/edgemtech/products/edgem1/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/include/configs/verdin-imx8mm.h 2025-11-21 14:56:52.104301824 +0100 ++++ ./include/configs/verdin-imx8mm.h 2025-11-21 14:54:55.599352148 +0100 +@@ -58,8 +58,10 @@ + #define CFG_SYS_SDRAM_BASE 0x40000000 + + /* SDRAM configuration */ +-#define PHYS_SDRAM 0x40000000 +-#define PHYS_SDRAM_SIZE SZ_2G /* 2GB DDR */ ++#define PHYS_SDRAM 0x40000000 ++#define PHYS_SDRAM_SIZE (long)(SZ_2G + SZ_1G) ++#define PHYS_SDRAM_2 0x100000000 ++#define PHYS_SDRAM_2_SIZE (long)(SZ_1G) + + /* USB Configs */ + #define CFG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW) diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0033-image-board.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0033-image-board.c.patch new file mode 100644 index 0000000..7288f91 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0033-image-board.c.patch @@ -0,0 +1,36 @@ +--- /home/rossierd/edgemtech/products/edgem1/edgem1/30/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/boot/image-board.c 2026-04-17 12:12:36.494906463 +0200 ++++ ./boot/image-board.c 2026-04-17 16:43:48.335346611 +0200 +@@ -730,6 +730,9 @@ + const char *uname; + u8 img_type; + ++ /* EDGEMTech */ ++ ulong load, entry; ++ + /* Check to see if the images struct has a FIT configuration */ + if (!genimg_has_config(images)) { + debug("## FIT configuration was not specified\n"); +@@ -780,6 +783,23 @@ + return fit_img_result; + } + ++ /* EDGEMTech - Prepare to send information of agency image to the AVZ hypervisor */ ++ ++ fit_image_get_load(buf, fit_image_get_node(buf, uname), &load); ++ fit_image_get_entry(buf, fit_image_get_node(buf, uname), &entry); ++ ++ fdt_add_mem_rsv(images->ft_addr, load, img_len); ++ ++ fdt_shrink_to_minimum(images->ft_addr, 128); ++ ++ fdt_record_loadable(images->ft_addr, loadables_index, uname, ++ load, img_len, entry, ++ fdt_getprop(buf, fit_image_get_node(buf, uname), "type", NULL), ++ fdt_getprop(buf, fit_image_get_node(buf, uname), "os", NULL), ++ fdt_getprop(buf, fit_image_get_node(buf, uname), "arch", NULL)); ++ ++ /************/ ++ + fit_loadable_process(img_type, img_data, img_len); + } + break; diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0034-verdin-imx8mp.h.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0034-verdin-imx8mp.h.patch new file mode 100644 index 0000000..ed52a5d --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0034-verdin-imx8mp.h.patch @@ -0,0 +1,27 @@ +--- a/include/configs/verdin-imx8mp.h ++++ b/include/configs/verdin-imx8mp.h +@@ -28,13 +28,16 @@ + "ramdisk_addr_r=0x50300000\0" \ + "scriptaddr=0x50280000\0" + ++#if 0 /* EDGEMTech */ + /* Enable Distro Boot */ + #define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 1) \ + func(MMC, mmc, 2) \ + func(DHCP, dhcp, na) + #include ++#endif /* 0 */ + ++#if 0 /* EDGEMTech */ + /* Initial environment variables */ + #define CFG_EXTRA_ENV_SETTINGS \ + BOOTENV \ +@@ -49,6 +52,7 @@ + "setexpr blkcnt ${filesize} + 0x1ff && setexpr blkcnt " \ + "${blkcnt} / 0x200; mmc dev 2 1; mmc write ${loadaddr} 0x0 " \ + "${blkcnt}; fi\0" ++#endif /* 0 */ + + #define CFG_SYS_INIT_RAM_ADDR 0x40000000 + #define CFG_SYS_INIT_RAM_SIZE SZ_512K diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0035-verdin-imx8mp_defconfig.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0035-verdin-imx8mp_defconfig.patch new file mode 100644 index 0000000..b79f760 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0035-verdin-imx8mp_defconfig.patch @@ -0,0 +1,11 @@ +--- /home/rossierd/edgemtech/products/edgem1/edgem1/30/build/tmp/work/uboot-2024.07-r0/uboot-2024.07/configs/verdin-imx8mp_defconfig 2026-04-17 12:12:41.987694841 +0200 ++++ ./configs/verdin-imx8mp_defconfig 2026-04-17 17:04:17.189200957 +0200 +@@ -41,6 +41,8 @@ + CONFIG_SPL_LOAD_FIT_ADDRESS=0x44000000 + CONFIG_DISTRO_DEFAULTS=y + CONFIG_BOOTDELAY=1 ++CONFIG_USE_BOOTCOMMAND=y ++CONFIG_BOOTCOMMAND="ext4load mmc 2:1 0x50280000 uEnv.txt; env import 0x50280000; run start" + CONFIG_OF_SYSTEM_SETUP=y + CONFIG_USE_PREBOOT=y + CONFIG_PREBOOT="test -n ${fdtfile} || setenv fdtfile imx8mp-verdin-${variant}-${fdt_board}.dtb" diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0036-imx8mp-u-boot.dtsi.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0036-imx8mp-u-boot.dtsi.patch new file mode 100644 index 0000000..c9e738b --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0036-imx8mp-u-boot.dtsi.patch @@ -0,0 +1,38 @@ +--- a/arch/arm/dts/imx8mp-u-boot.dtsi ++++ b/arch/arm/dts/imx8mp-u-boot.dtsi +@@ -167,6 +167,22 @@ + }; + #endif + ++#ifdef CONFIG_TARGET_VERDIN_IMX8MP ++ tee { ++ description = "OP-TEE"; ++ type = "firmware"; ++ arch = "arm64"; ++ os = "tee"; ++ compression = "none"; ++ load = <0xbe000000>; ++ entry = <0xbe000000>; ++ ++ blob-ext { ++ filename = "tee.bin"; ++ }; ++ }; ++#endif ++ + @fdt-SEQ { + description = "NAME"; + type = "flat_dt"; +@@ -186,8 +202,12 @@ + fdt = "fdt-SEQ"; + firmware = "uboot"; + #ifndef CONFIG_ARMV8_PSCI ++#ifdef CONFIG_TARGET_VERDIN_IMX8MP ++ loadables = "atf", "tee"; ++#else + loadables = "atf"; + #endif ++#endif + }; + }; + }; diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0037-verdin-imx8mp.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0037-verdin-imx8mp.c.patch new file mode 100644 index 0000000..58f8ec6 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0037-verdin-imx8mp.c.patch @@ -0,0 +1,13 @@ +--- a/board/toradex/verdin-imx8mp/verdin-imx8mp.c ++++ b/board/toradex/verdin-imx8mp/verdin-imx8mp.c +@@ -108,7 +108,9 @@ + if (!size) + return -EINVAL; + +- *size = get_ram_size((void *)PHYS_SDRAM, PHYS_SDRAM_SIZE + PHYS_SDRAM_2_SIZE); ++ /* Hardcode 2 GiB: get_ram_size() hangs because SPL's TZASC lockdown ++ * blocks non-secure probing of the upper DRAM boundary. */ ++ *size = SZ_2G; + + return 0; + } diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0038-soc.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0038-soc.c.patch new file mode 100644 index 0000000..0922a79 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0038-soc.c.patch @@ -0,0 +1,11 @@ +--- a/arch/arm/mach-imx/imx8m/soc.c ++++ b/arch/arm/mach-imx/imx8m/soc.c +@@ -1366,7 +1366,7 @@ + } + + subpath = "optee"; +- offs = fdt_add_subnode(fdt, offs, subpath); ++ offs = fdt_find_or_add_subnode(fdt, offs, subpath); + if (offs < 0) { + printf("Could not create %s node.\n", subpath); + return offs; diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0070-Kconfig.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0070-Kconfig.patch new file mode 100644 index 0000000..0bae2a9 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0070-Kconfig.patch @@ -0,0 +1,19 @@ +--- a/cmd/Kconfig ++++ b/cmd/Kconfig +@@ -333,6 +333,16 @@ + help + Boot an AArch64 Linux Kernel image from memory. + ++config CMD_GUEST_BOOT ++ bool "guest-boot" ++ depends on ARM64 && FIT ++ help ++ Boot the AVZ hypervisor together with a guest (Linux) via the two-ITB scheme ++ from two separate FIT images. Each FIT is parsed individually; every ++ declared kernel/fdt/ramdisk/loadable is copied to its load address, ++ then control is transferred to the AVZ entry point with the AVZ FIT ++ base in x0 and the capsule FIT base in x1. ++ + config BOOTM_LINUX + bool "Support booting Linux OS images" + depends on CMD_BOOTM || CMD_BOOTZ || CMD_BOOTI diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0071-Makefile.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0071-Makefile.patch new file mode 100644 index 0000000..91eb1c6 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0071-Makefile.patch @@ -0,0 +1,10 @@ +--- a/cmd/Makefile ++++ b/cmd/Makefile +@@ -63,6 +63,7 @@ + obj-$(CONFIG_CMD_CYCLIC) += cyclic.o + obj-$(CONFIG_CMD_EVENT) += event.o + obj-$(CONFIG_CMD_EXTENSION) += extension_board.o ++obj-$(CONFIG_CMD_GUEST_BOOT) += guest_boot.o + obj-$(CONFIG_CMD_ECHO) += echo.o + obj-$(CONFIG_ENV_IS_IN_EEPROM) += eeprom.o + obj-$(CONFIG_CMD_EEPROM) += eeprom.o diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0072-verdin-imx8mp_defconfig.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0072-verdin-imx8mp_defconfig.patch new file mode 100644 index 0000000..c43cac1 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0072-verdin-imx8mp_defconfig.patch @@ -0,0 +1,7 @@ +--- a/configs/verdin-imx8mp_defconfig ++++ b/configs/verdin-imx8mp_defconfig +@@ -190,3 +190,4 @@ + CONFIG_USB_GADGET_PRODUCT_NUM=0x4000 + CONFIG_IMX_WATCHDOG=y + CONFIG_HEXDUMP=y ++CONFIG_CMD_GUEST_BOOT=y diff --git a/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0073-guest_boot.c.patch b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0073-guest_boot.c.patch new file mode 100644 index 0000000..65e24ef --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/files/0001-uboot-2024.07-r0/0073-guest_boot.c.patch @@ -0,0 +1,216 @@ +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD +--- /dev/null ++++ b/cmd/guest_boot.c +@@ -0,0 +1,212 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++/* ++ * Copyright (C) 2026 EDGEMTech SA ++ * ++ * guest-boot: load an AVZ FIT image and an guest FIT image individually, ++ * place each declared loadable/kernel/fdt/ramdisk at its declared load address, ++ * then transfer control to the AVZ entry point. ++ * ++ * Argument convention to AVZ (aarch64): ++ * x0 = AVZ FIT base (so AVZ can locate its avz_dt loadable inside it) ++ * x1 = guest FIT base (so AVZ can later load the guest from it) ++ * x2 = 0 ++ * x3 = 0 ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++static int guest_place_image(const void *fit, int img_off, const char *desc, ++ ulong *load_out, ulong *entry_out) ++{ ++ const void *data; ++ size_t size; ++ ulong load; ++ ++ if (fit_image_get_data_and_size(fit, img_off, &data, &size)) { ++ printf("guest-boot: %s: missing data\n", desc); ++ return -1; ++ } ++ ++ if (fit_image_get_load(fit, img_off, &load)) { ++ printf("guest-boot: %s: missing load address\n", desc); ++ return -1; ++ } ++ ++ debug("guest-boot: %s -> 0x%lx (%zu bytes)\n", desc, load, size); ++ memmove((void *)load, data, size); ++ flush_cache(load, size); ++ ++ if (load_out) ++ *load_out = load; ++ ++ if (entry_out) { ++ ulong entry; ++ ++ if (fit_image_get_entry(fit, img_off, &entry)) ++ entry = load; ++ *entry_out = entry; ++ } ++ return 0; ++} ++ ++static int guest_place_named(const void *fit, int conf_off, const char *prop, ++ ulong *load_out, ulong *entry_out, bool required) ++{ ++ int img_off; ++ ++ img_off = fit_conf_get_prop_node(fit, conf_off, prop, IH_PHASE_NONE); ++ if (img_off < 0) { ++ if (required) { ++ printf("guest-boot: config has no '%s' image\n", prop); ++ return -1; ++ } ++ return 0; ++ } ++ return guest_place_image(fit, img_off, prop, load_out, entry_out); ++} ++ ++static int guest_place_loadables(const void *fit, int conf_off) ++{ ++ const char *uname; ++ int idx; ++ ++ for (idx = 0; ++ (uname = fdt_stringlist_get(fit, conf_off, FIT_LOADABLE_PROP, ++ idx, NULL)) != NULL; ++ idx++) { ++ int img_off = fit_image_get_node(fit, uname); ++ ++ if (img_off < 0) { ++ printf("guest-boot: loadable '%s' not found\n", uname); ++ return -1; ++ } ++ if (guest_place_image(fit, img_off, uname, NULL, NULL)) ++ return -1; ++ } ++ return 0; ++} ++ ++static int guest_load_fit(ulong fit_addr, const char *conf_name, ++ ulong *kernel_entry, ulong *fdt_load) ++{ ++ const void *fit = (const void *)fit_addr; ++ int conf_off; ++ ++ if (fit_check_format(fit, IMAGE_SIZE_INVAL)) { ++ printf("guest-boot: invalid FIT at 0x%lx\n", fit_addr); ++ return -1; ++ } ++ ++ conf_off = fit_conf_get_node(fit, conf_name); ++ if (conf_off < 0) { ++ printf("guest-boot: config '%s' not found at 0x%lx\n", ++ conf_name ? conf_name : "", fit_addr); ++ return -1; ++ } ++ ++ if (guest_place_named(fit, conf_off, FIT_KERNEL_PROP, NULL, ++ kernel_entry, kernel_entry != NULL)) ++ return -1; ++ ++ if (guest_place_named(fit, conf_off, FIT_FDT_PROP, fdt_load, ++ NULL, false)) ++ return -1; ++ ++ if (guest_place_named(fit, conf_off, FIT_RAMDISK_PROP, NULL, ++ NULL, false)) ++ return -1; ++ ++ if (guest_place_loadables(fit, conf_off)) ++ return -1; ++ ++ return 0; ++} ++ ++static int do_guest_boot(struct cmd_tbl *cmdtp, int flag, int argc, ++ char *const argv[]) ++{ ++ ulong avz_itb, guest_itb, avz_entry = 0, capsule_fdt = 0; ++ ++ if (argc != 3) ++ return CMD_RET_USAGE; ++ ++ avz_itb = simple_strtoul(argv[1], NULL, 16); ++ guest_itb = simple_strtoul(argv[2], NULL, 16); ++ ++ printf("guest-boot: AVZ ITB @ 0x%lx, guest ITB @ 0x%lx\n", ++ avz_itb, guest_itb); ++ ++ if (guest_load_fit(avz_itb, "avz", &avz_entry, NULL)) ++ return CMD_RET_FAILURE; ++ if (!avz_entry) { ++ printf("guest-boot: AVZ config has no kernel entry\n"); ++ return CMD_RET_FAILURE; ++ } ++ ++ if (guest_load_fit(guest_itb, "capsule", NULL, &capsule_fdt)) ++ return CMD_RET_FAILURE; ++ ++ /* Propagate U-Boot's bootargs env into the guest FDT's /chosen so the ++ * guest kernel sees the cmdline. guest-boot replaces bootm's standard ++ * fdt_chosen() call — without this, the guest kernel cmdline is empty ++ * and OSTree-aware initramfs (e.g. TorizonOS) can't find its root. */ ++ if (capsule_fdt) { ++ void *fdt = (void *)capsule_fdt; ++ const char *ba = env_get("bootargs"); ++ int ret; ++ ++ printf("guest-boot: capsule fdt @ 0x%lx, bootargs=[%s]\n", ++ capsule_fdt, ba ? ba : ""); ++ ++ /* The guest DTB is tightly packed by mkimage and has no room ++ * for fdt_chosen() to add bootargs (FDT_ERR_NOSPACE). Expand ++ * in place with 4 KiB headroom — plenty for bootargs + any ++ * extra props AVZ injects later. */ ++ ret = fdt_open_into(fdt, fdt, fdt_totalsize(fdt) + 0x1000); ++ if (ret < 0) { ++ printf("guest-boot: WARN: fdt_open_into failed (%d)\n", ++ ret); ++ } ++ ++ ret = fdt_chosen(fdt); ++ if (ret < 0) ++ printf("guest-boot: WARN: fdt_chosen failed (%d)\n", ret); ++ else ++ flush_cache(capsule_fdt, fdt_totalsize(fdt)); ++ } ++ ++ printf("guest-boot: jumping to AVZ at 0x%lx (capsule ITB @ 0x%lx)\n", ++ avz_entry, guest_itb); ++ ++ cleanup_before_linux(); ++ ++ armv8_switch_to_el2(avz_itb, guest_itb, 0, 0, avz_entry, ++ ES_TO_AARCH64); ++ ++ return CMD_RET_FAILURE; ++} ++ ++#ifdef CONFIG_SYS_LONGHELP ++static char guest_boot_help_text[] = ++ " \n" ++ " - Parse the AVZ FIT and the guest FIT loaded at the given\n" ++ " addresses, place every kernel/fdt/ramdisk/loadable at its\n" ++ " declared load address, then jump to the AVZ entry point with:\n" ++ " x0 = avz_itb_addr (AVZ scans this FIT for its avz_dt)\n" ++ " x1 = guest_itb_addr (AVZ uses this FIT to load the guest)"; ++#endif ++ ++ll_entry_declare(struct cmd_tbl, guest_boot, cmd) = { ++ "guest-boot", 3, cmd_never_repeatable, do_guest_boot, ++ "boot AVZ hypervisor with an guest", ++#ifdef CONFIG_SYS_LONGHELP ++ guest_boot_help_text ++#endif ++}; diff --git a/build/meta-uboot/recipes-uboot/uboot/uboot_2022.04.bb b/build/meta-uboot/recipes-uboot/uboot/uboot_2022.04.bb index 28b9c97..0760814 100644 --- a/build/meta-uboot/recipes-uboot/uboot/uboot_2022.04.bb +++ b/build/meta-uboot/recipes-uboot/uboot/uboot_2022.04.bb @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD SUMMARY = "U-boot Universal Bootloader" DESCRIPTION = "U-boot bootloader receipt" @@ -15,7 +17,7 @@ SRCREV = "e4b6ebd3de982ae7185dbf689a030e73fd06e0d2" SRC_URI = "git://github.com/u-boot/u-boot;branch=master;protocol=https" -# Set of patches to be applied to get a version adapted +# Set of patches to be applied to get a version adapted # and adding various defconfig files. FILESPATH:prepend = "${THISDIR}/files/0001-${PF}:" @@ -25,28 +27,51 @@ require files/0001-${PF}-patches.inc # Where the working directory will be placed in infrabase root dir IB_TARGET = "${IB_UBOOT_PATH}" -# Future enhancement with ATF -# do_configure[depends] += "atf:do_build" -# do_configure[depends] += "bsp-linux:do_build_firmware" +# ATF is only needed when the boot chain actually carries it (FIP-loaded +# U-Boot in atf+uboot / full modes). In "uboot" mode QEMU's -bios loads +# u-boot.bin directly — no BL31 in the chain, no reason to build ATF. +# bb.utils.contains_any returns the second arg when IB_BOOT_CHAIN is in +# the set, else the third arg. -# The following code is here as example, but actually currently not used +do_configure[depends] = "${@bb.utils.contains_any('IB_BOOT_CHAIN', 'atf+uboot full', 'atf:do_build', '', d)}" do_configure[nostamp] = "1" do_configure () { - + cd ${IB_TARGET} - make ${IB_PLATFORM}_defconfig - + + # Defconfig selection on virt64: + # - IB_BOOT_CHAIN="uboot" (bare bsp-linux, no ATF): + # upstream qemu_arm64_defconfig — CONFIG_POSITION_INDEPENDENT=y + # and CONFIG_ARCH_QEMU=y, both required for QEMU `-kernel` to + # load the U-Boot ELF at any address. Linux runs at EL1 (no + # secure / no virtualization in QEMU machine). + # - IB_BOOT_CHAIN="atf+uboot" and "full" (capsule) both use + # virt64_defconfig — same FIP-aware U-Boot, the boot chain + # difference lives in ATF (no SPD vs SPD=opteed) and the guest + # DT. U-Boot is entered at EL2 by ATF and does NOT switch to EL1 + # before booting the kernel — the kernel performs its own + # el2_setup and drops to EL1 itself, as per the arm64 boot + # protocol. + # - verdin platforms: ${IB_PLATFORM}_defconfig (verdin uses + # uboot_2024.07.bb anyway). + + if [ "${IB_PLATFORM}" = "virt64" ] && [ "${IB_BOOT_CHAIN}" = "uboot" ]; then + make qemu_arm64_defconfig + else + make ${IB_PLATFORM}_defconfig + fi + # Specific handling for bbb platform if [ "${IB_PLATFORM}" = "bbb" ]; then - + # If a disk image is used with BBB, it is intended to be # deployed in the eMMC, hence some different uEnv configurations - - if [ "${IB_STORAGE}" = "soft" ]; then - ln -fs ${IB_UBOOT_PATH}/uEnv.d/uEnv_bbb_flash.txt ${IB_UBOOT_PATH}/uEnv.d/uEnv_bbb.txt + + if [ "${IB_STORAGE_MODE}" = "soft" ]; then + ln -fs ${IB_UBOOT_PATH}/uEnv.d/uEnv_bbb_flash.txt ${IB_UBOOT_PATH}/uEnv.d/uEnv_bbb.txt else - ln -fs ${IB_UBOOT_PATH}/uEnv.d/uEnv_bbb_sd.txt ${IB_UBOOT_PATH}/uEnv.d/uEnv_bbb.txt + ln -fs ${IB_UBOOT_PATH}/uEnv.d/uEnv_bbb_sd.txt ${IB_UBOOT_PATH}/uEnv.d/uEnv_bbb.txt fi elif [ "${IB_PLATFORM}" = "imx8_colibri" ]; then @@ -54,17 +79,25 @@ do_configure () { ln -fs ${IB_ATF_PATH}/build/imx8qx/release/bl31.bin . echo "--> ${IB_BSP_PATH}" cp ${IB_BSP_PATH}/mx8qxc0-ahab-container.img mx8qx-ahab-container.img - + fi - + } do_build[nostamp] = "1" do_build () { - - bbplain "Building U-boot with ${CORES} cores..." + + bbplain "Building U-boot with ${CORES} cores (CROSS_COMPILE=${IB_TOOLCHAIN}-)..." cd ${IB_TARGET} - make -j${CORES} + # Pin the cross compiler per platform (IB_TOOLCHAIN) so the build does + # not depend on a CROSS_COMPILE inherited from the caller's shell — + # e.g. virt32 (arm-linux-gnueabihf) vs virt64 (aarch64-none-linux-gnu). + make CROSS_COMPILE=${IB_TOOLCHAIN}- -j${CORES} + + if [ "${IB_PLATFORM}" = "virt64" ]; then + mkdir -p ${IB_DIR}/filesystem + cp ${IB_UBOOT_PATH}/u-boot.bin ${IB_DIR}/filesystem/ + fi } def __do_platform_deploy(d): diff --git a/build/meta-uboot/recipes-uboot/uboot/uboot_2024.07.bb b/build/meta-uboot/recipes-uboot/uboot/uboot_2024.07.bb new file mode 100644 index 0000000..b5a1701 --- /dev/null +++ b/build/meta-uboot/recipes-uboot/uboot/uboot_2024.07.bb @@ -0,0 +1,133 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + +SUMMARY = "U-boot Universal Bootloader" +DESCRIPTION = "U-boot bootloader receipt" +LICENSE = "GPLv2" + +# Release and version +PR = "r0" +PV = "2024.07" + +inherit filesystem +inherit uboot +inherit bsp +inherit atf + +SRCREV = "3f772959501c99fbe5aa0b22a36efe3478d1ae1c" +SRC_URI = "git://gitlab.com/u-boot/u-boot.git;nobranch=1;protocol=https" + +# Set of patches to be applied to get a version adapted +# and adding various defconfig files. + +FILESPATH:prepend = "${THISDIR}/files/0001-${PF}:" + +require files/0001-${PF}-patches.inc + +# Where the working directory will be placed in infrabase root dir +IB_TARGET = "${IB_UBOOT_PATH}" + +# Future enhancement with ATF +do_configure[depends] += "atf:do_build" + +# Verdin's do_configure shells out to OP-TEE's gen_tee_bin.py and +# consumes tee.elf to produce ./tee.bin embedded in flash.bin. Optee +# must be built (and its source attached at ${IB_OPTEE_PATH}) first. +# Gated on platform via anonymous python because the optee path is +# wrapped in `if [ "${IB_PLATFORM}" = "verdin-imx8mp" ]` below — virt64 +# and other targets don't touch optee here. +python () { + if d.getVar('IB_PLATFORM') == 'verdin-imx8mp': + d.appendVarFlag('do_configure', 'depends', ' optee:do_build') +} + +do_configure[nostamp] = "1" +do_configure () { + + cd ${IB_TARGET} + make ${IB_PLATFORM}_defconfig + + # Hand the OS off at EL1 instead of EL2 (SO3 standalone is EL1-native; + # AVZ needs EL2, so this is opt-in via IB_UBOOT_SWITCH_EL1 in local.conf). + if [ "${IB_UBOOT_SWITCH_EL1}" = "1" ]; then + echo "CONFIG_ARMV8_SWITCH_TO_EL1=y" >> .config + make olddefconfig + fi + + # NXP DDR training firmware (lpddr4 PMU), vendored capsule-free under + # meta-bsp; IB_IMX_FIRMWARE_PATH (local.conf) is one flat directory. + IMX8MP_FW_PATH="${IB_IMX_FIRMWARE_PATH}" + + if [ "${IB_PLATFORM}" = "verdin-imx8mp" ]; then + + cp ${IB_ATF_PATH}/build/imx8mp/release/bl31.bin . + # Use raw binary (no OPTE v1 header): ATF BL31-only mode jumps directly + # to BL32_BASE so the binary must start with _start, not a header. + python3 ${IB_OPTEE_PATH}/scripts/gen_tee_bin.py \ + --input ${IB_OPTEE_PATH}/out/arm-plat-imx/core/tee.elf \ + --out_tee_raw_bin ./tee.bin + + cp ${IMX8MP_FW_PATH}/lpddr4*_202006.bin . + fi +} + +addtask do_configure + +# do_build must run after do_configure so atf:do_build (a do_configure dep) is triggered first +addtask do_build after do_configure + +do_build[nostamp] = "1" +do_build[depends] += "atf:do_build" +do_build () { + + bbplain "Building U-boot with ${CORES} cores..." + cd ${IB_TARGET} + if [ "${IB_PLATFORM}" = "verdin-imx8mp" ]; then + BL31="${IB_ATF_PATH}/build/imx8mp/release/bl31.bin" + TEE_ELF="${IB_OPTEE_PATH}/out/arm-plat-imx/core/tee.elf" + HASH_FILE="flash.bin.inputs.sha256" + CURRENT_HASH="$(sha256sum "$BL31" "$TEE_ELF" 2>/dev/null | sha256sum | cut -d' ' -f1)" + if [ -f flash.bin ] && [ -f "$HASH_FILE" ] && [ "$(cat $HASH_FILE)" = "$CURRENT_HASH" ]; then + echo "U-Boot flash.bin is up to date, skipping rebuild" + else + make CROSS_COMPILE=${IB_TOOLCHAIN}- TEE=./tee.bin -j${CORES} + echo "$CURRENT_HASH" > "$HASH_FILE" + fi + else + make CROSS_COMPILE=${IB_TOOLCHAIN}- -j${CORES} + fi +} + +def __do_platform_deploy(d): + import os + import subprocess + + src_dir = d.getVar('FILE_DIRNAME') + dst_dir = d.getVar('IB_FILESYSTEM_PATH') + u_boot_path = d.getVar('IB_UBOOT_PATH') + IB_PLATFORM = d.getVar('IB_PLATFORM') + + if IB_PLATFORM == "verdin-imx8mp": + + cmd = f"cp -r {u_boot_path}/flash.bin {dst_dir}/p1/imx-boot" + result = subprocess.run(cmd, shell=True, check=True) + + else: + cmd = f"cp {u_boot_path}/u-boot.bin {dst_dir}/p1/" + result = subprocess.run(cmd, shell=True, check=True) + +do_deploy[nostamp] = "1" +python do_deploy() { + + bb.plain("Deploy U-boot only ...") + + __do_deploy_boot(d); +} + +addtask do_deploy + +do_clean[nostamp] = "1" +do_clean () { + rm -f ${TMPDIR}/stamps/uboot* +} +addtask do_clean diff --git a/build/meta-usr/classes/usr.bbclass b/build/meta-usr/classes/usr.bbclass index de6cf2c..08f7a23 100644 --- a/build/meta-usr/classes/usr.bbclass +++ b/build/meta-usr/classes/usr.bbclass @@ -1,6 +1,7 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD inherit filesystem -inherit logging inherit rootfs # Class for managing the user space environment @@ -11,20 +12,20 @@ usr_do_install_file_root () { echo "Installing $1" mkdir -p ${IB_TARGET}/build/deploy/root - cp $1 ${IB_TARGET}/build/deploy/root + cp $1 ${IB_TARGET}/build/deploy/root 2>/dev/null || true } usr_do_install_directory_root () { echo "Installing $1" mkdir -p ${IB_TARGET}/build/deploy/root - cp -R "$1" "${IB_TARGET}/build/deploy/root" + cp -R "$1" "${IB_TARGET}/build/deploy/root" 2>/dev/null || true } usr_do_install_file_dir () { echo "Installing $1 into $2" mkdir -p ${IB_TARGET}/build/deploy/$2 - cp -r $1 ${IB_TARGET}/build/deploy/$2 + cp -r $1 ${IB_TARGET}/build/deploy/$2 2>/dev/null || true } @@ -55,6 +56,41 @@ python retrieve_usr_dir() { __retrieve_usr_dir(d) } +# De-duplicate add_subdirectory() lines in CMakeLists.txt files. +# Implemented as a separate Python function and attached to do_configure via +# [prefuncs] — using `python do_configure:prepend()` directly mixes badly +# with the shell do_configure on some bitbake versions and the parser +# treats the python body as shell code. + +python usr_dedup_add_subdirectory() { + import os + import glob + + target = d.getVar('IB_TARGET') + for cmake_file in glob.glob(os.path.join(target, '**', 'CMakeLists.txt'), recursive=True): + with open(cmake_file, 'r') as f: + lines = f.readlines() + + seen = set() + deduped = [] + removed = [] + for line in lines: + key = line.strip() + if key.startswith('add_subdirectory(') and key in seen: + removed.append(key) + else: + if key.startswith('add_subdirectory('): + seen.add(key) + deduped.append(line) + + if removed: + bb.warn("Duplicate add_subdirectory removed in %s: %s" % (cmake_file, ', '.join(removed))) + with open(cmake_file, 'w') as f: + f.writelines(deduped) +} + +do_configure[prefuncs] += "usr_dedup_add_subdirectory" + do_configure () { mkdir -p ${IB_TARGET}/build } @@ -85,13 +121,31 @@ do_build () { do_clean[nostamp] = "1" addtask do_clean -do_clean () { - - # Remove all patches - rm -rf ${IB_TARGET}/patches - - # Clean the user space apps - rm -rf ${IB_TARGET}/build +# Implemented in Python on purpose: a *shell* task needs ${WORKDIR}/temp to +# exist so bitbake can create its output fifo there, but do_clean often runs +# when that dir is absent (fresh tree / already-cleaned), giving +# "No such file or directory: .../temp/fifo.NNNN". Python tasks create the +# temp dir themselves and use no fifo, so they are robust here. +python do_clean() { + import os, shutil + target = d.getVar('IB_TARGET') + # Remove the applied patches and the (in-tree) user-space build dir. + shutil.rmtree(target + '/patches', ignore_errors=True) + shutil.rmtree(target + '/build', ignore_errors=True) + + # Clear the do_attach_infrabase manifest (${IB_TARGET}.attach.sha256) so the + # next attach re-attaches from a fresh fetch+patch instead of aborting with + # "Refusing to re-attach". Generic to every usr recipe: the usr build mutates + # IB_TARGET in place (e.g. the :lvgl override fetches lib/lvgl and renames its + # stray CMakeLists.txt to hide them from the recursive CMake glob), and those + # renames/removals make the manifest's `sha256sum -c` fail on the next attach. + # A clean is an explicit reset, and the attach still backs the tree up to + # ${IB_TARGET}.back, so dropping the manifest here is the safe, generic fix — + # the guard stays fully active for builds that were NOT preceded by a clean. + try: + os.remove(target + '.attach.sha256') + except OSError: + pass } diff --git a/build/meta-usr/conf/layer.conf b/build/meta-usr/conf/layer.conf index 288ef22..22def7b 100644 --- a/build/meta-usr/conf/layer.conf +++ b/build/meta-usr/conf/layer.conf @@ -1,3 +1,6 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + BBPATH .= ":${LAYERDIR}" BBFILES += "${LAYERDIR}/recipes-*/*/*.bb ${LAYERDIR}/recipes-*/*/*.bbappend" diff --git a/build/meta-usr/recipes-usr/linux/usr-linux_1.0.bb b/build/meta-usr/recipes-usr/linux/usr-linux_1.0.bb index d7fa17d..97c327a 100644 --- a/build/meta-usr/recipes-usr/linux/usr-linux_1.0.bb +++ b/build/meta-usr/recipes-usr/linux/usr-linux_1.0.bb @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD SUMMARY = "User space applications for Linux" DESCRIPTION = "All (Linux) user space custom applications which take place in the rootfs of Linux" @@ -29,64 +31,75 @@ do_deploy[nostamp] = "1" python do_deploy() { import os - + __do_fs_mount(d) - + IB_USR_PATH = d.getVar('IB_USR_PATH') IB_FILESYSTEM_PATH = d.getVar('IB_FILESYSTEM_PATH') IB_ROOTFS_PARTITION = d.getVar('IB_ROOTFS_PARTITION') if not os.path.isdir(os.path.join(IB_USR_PATH, "build", "deploy")): - + __do_fs_umount(d) bb.fatal("The {} does not exist; please build usr first...".format(IB_USR_PATH)) if not os.path.isdir(os.path.join(IB_FILESYSTEM_PATH, IB_ROOTFS_PARTITION, "root")): __do_fs_umount(d) bb.fatal("The root directory is not present in the second partition; please deploy rootfs...") - - - os.system("cp -r {}/build/deploy/* {}/{}/".format(IB_USR_PATH, IB_FILESYSTEM_PATH, IB_ROOTFS_PARTITION)) - + + + # Copy as root: the rootfs cpio extraction (run via sudo) creates /root + # owned by root (0700), and bitbake runs unprivileged — a plain cp would + # be denied and silently drop the apps. check=True so a failure is no + # longer swallowed (the old os.system() ignored the return code, which is + # why the soo apps never reached the agency /root). + utils_sudo("cp -r {}/build/deploy/* {}/{}/".format(IB_USR_PATH, IB_FILESYSTEM_PATH, IB_ROOTFS_PARTITION), shell=True, check=True) + __do_fs_umount(d) } - -addtask do_deploy + +# `after do_build` is required: do_deploy expects ${IB_USR_PATH}/build/deploy/ +# (populated by do_build) to exist. Without explicit ordering, bitbake +# schedules do_deploy as soon as its declared depends (rootfs-linux:do_deploy) +# are met — which can be before this recipe's own do_build has run. +addtask do_deploy after do_build # Build extra components which is not in src/ directory like modules do_build:prepend () { # Modules - - if [ ! -f ${IB_LINUX_PATH}/Module.symvers ]; then - echo "Generating Module.symvers..." ; - make -j${CORES} -C ${IB_LINUX_PATH} modules ; + + if [ ! -f ${IB_LINUX_PATH}/Module.symvers ]; then + echo "Generating Module.symvers..." ; + make -j${CORES} -C ${IB_LINUX_PATH} modules ; make INSTALL_MOD_PATH=${IB_ROOTFS_PATH}/target -C ${IB_LINUX_PATH} modules_install ; \ fi - make -C ${IB_LINUX_PATH} M=${IB_TARGET}/src/modules modules -} + make -C ${IB_LINUX_PATH} M=${IB_TARGET}/src/modules modules IB_PLATFORM=${IB_PLATFORM} +} # Installing usr apps mean to move the binary and all files which need to # be copied to the rootfs. Be aware that it is a deploy directory and not # the rootfs itself; this is achieved with the do_deploy task (by the bsp recipe) do_install_apps () { - + usr_do_install_file_root "${IB_TARGET}/build/src/examples/hello" - + usr_do_install_file_root "${IB_TARGET}/build/bin/capsule-flash-test" + usr_do_install_file_root "${IB_TARGET}/build/bin/capsule-http-test" + # Installation of modules if any - + usr_do_install_file_root "${IB_TARGET}/src/modules/*.ko" } do_clean:append () { - + # Clean the modules if [ -d ${IB_TARGET}/src/modules ]; then make -C ${IB_LINUX_PATH} M=${IB_TARGET}/src/modules clean fi - + rm -f ${TMPDIR}/stamps/usr-linux* # Remove the usr organization in the build directory to avoid @@ -96,7 +109,7 @@ do_clean:append () { # Remove all patches rm -rf ${IB_TARGET}/patches - + # Clean the user space apps rm -rf ${IB_TARGET}/build } diff --git a/build/meta-usr/recipes-usr/linux/usr-linux_1.0.bbappend b/build/meta-usr/recipes-usr/linux/usr-linux_1.0.bbappend new file mode 100644 index 0000000..de4db47 --- /dev/null +++ b/build/meta-usr/recipes-usr/linux/usr-linux_1.0.bbappend @@ -0,0 +1,47 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + +SUMMARY = "EDGE-M1 Factory Capsule - User space applications for Linux" +DESCRIPTION = "All (Linux) user space custom applications which take place in the rootfs of Linux" +LICENSE = "GPLv2" + +inherit usr +inherit linux +inherit filesystem +inherit rootfs + +# This is a BUILD step, not a media deploy: it bakes the agency apps INTO +# rootfs.cpio (rsync into the cpio tree, then re-pack). That single rootfs +# image is then the source for both targets: +# - the embedded ramfs (gzip -> initrd.cpio.gz -> ITB) for +# IB_RAMFS_SOURCE="rootfs"; +# - the p2 ext4 partition, which rootfs-linux:do_deploy populates by +# extracting this same (apps-included) rootfs.cpio at DEPLOY time. +# So p2 gets the apps for free via the final rootfs.cpio — no separate +# media write here. Depends on buildroot (rootfs.cpio) + usr:do_build +# (the apps), NOT on rootfs-linux:do_deploy, so the build never touches +# the boot media. +do_deploy[depends] = "${IB_ROOTFS_METHOD}:do_build" + +python do_deploy() { + + import os + + IB_USR_PATH = d.getVar('IB_USR_PATH') + IB_ROOTFS_PATH = d.getVar('IB_ROOTFS_PATH') + IB_PLATFORM = d.getVar('IB_PLATFORM') + + deploy_src = os.path.join(IB_USR_PATH, "build", "deploy") + if not os.path.isdir(deploy_src): + bb.fatal("The {} does not exist; please build usr first...".format(IB_USR_PATH)) + if not os.path.isfile(os.path.join(IB_ROOTFS_PATH, "board", IB_PLATFORM, "rootfs.cpio")): + bb.fatal("rootfs.cpio is missing; please build rootfs first...") + + # The destination tree is root-owned (cpio -id), so rsync needs root to + # preserve mode bits / ownership while writing into it. + d.setVar('ROOTFS_FILENAME', 'rootfs') + __do_rootfs_mount(d) + utils_sudo(["rsync", "-a", "--keep-dirlinks", + deploy_src + "/", f"{IB_ROOTFS_PATH}/fs/"], check=True) + __do_rootfs_umount(d) +} \ No newline at end of file diff --git a/build/meta-usr/recipes-usr/lvgl/files/0001-usr-linux-1.0-r0/0001-CMakeLists.txt.patch b/build/meta-usr/recipes-usr/lvgl/files/0001-usr-linux-1.0-r0/0001-CMakeLists.txt.patch index 0779a14..37fd162 100644 --- a/build/meta-usr/recipes-usr/lvgl/files/0001-usr-linux-1.0-r0/0001-CMakeLists.txt.patch +++ b/build/meta-usr/recipes-usr/lvgl/files/0001-usr-linux-1.0-r0/0001-CMakeLists.txt.patch @@ -1,7 +1,8 @@ --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -@@ -1 +1,3 @@ +@@ -1,2 +1,4 @@ add_subdirectory(examples) + add_subdirectory(soo) +add_subdirectory(lvgl) +add_subdirectory(graphic) diff --git a/build/meta-usr/recipes-usr/lvgl/usr-so3_1.0.bbappend b/build/meta-usr/recipes-usr/lvgl/usr-so3_1.0.bbappend index 3be41b0..3ef5485 100644 --- a/build/meta-usr/recipes-usr/lvgl/usr-so3_1.0.bbappend +++ b/build/meta-usr/recipes-usr/lvgl/usr-so3_1.0.bbappend @@ -33,7 +33,12 @@ python do_handle_fetch_git() { target_dir = d.getVar('S') dst_dir = os.path.join(target_dir, 'lib', 'lvgl') - + + # Since SO3 v6.2.0 the fetched so3/usr no longer ships lib/lvgl (LVGL is + # fetched separately, not a submodule), so retrieve_usr_dir does not create + # it — create the destination before copying into it. + os.makedirs(dst_dir, exist_ok=True) + # Fetch the submodules using full path # Copy everything except .git, preserving symlinks/metadata cmd = ( diff --git a/build/meta-usr/recipes-usr/so3/files/0001-usr-so3-1.0-r0-patches.inc b/build/meta-usr/recipes-usr/so3/files/0001-usr-so3-1.0-r0-patches.inc index 1b91339..ee1c1be 100644 --- a/build/meta-usr/recipes-usr/so3/files/0001-usr-so3-1.0-r0-patches.inc +++ b/build/meta-usr/recipes-usr/so3/files/0001-usr-so3-1.0-r0-patches.inc @@ -1,4 +1,7 @@ -LVGL_FILES = "\ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + +SRC_URI += "\ file://0026-lvgl_benchmark.c.patch \ file://0023-CMakeLists.txt.patch \ file://0010-CMakeLists.txt.patch \ @@ -18,6 +21,4 @@ LVGL_FILES = "\ file://0024-fillfb.c.patch \ file://0015-slv_fb.h.patch \ file://0028-lvgl_perf.c.patch \ -" -SRC_URI += "${LVGL_FILES}" -SRC_URI:remove:lvgl = "${LVGL_FILES}" +" \ No newline at end of file diff --git a/build/meta-usr/recipes-usr/so3/files/0001-usr-so3-1.0-r0/0014-slv_fb.c.patch b/build/meta-usr/recipes-usr/so3/files/0001-usr-so3-1.0-r0/0014-slv_fb.c.patch index 69c78b7..b456af8 100644 --- a/build/meta-usr/recipes-usr/so3/files/0001-usr-so3-1.0-r0/0014-slv_fb.c.patch +++ b/build/meta-usr/recipes-usr/so3/files/0001-usr-so3-1.0-r0/0014-slv_fb.c.patch @@ -1,5 +1,5 @@ --- build/tmp/work/usr-so3-1.0-r0/usr-so3-1.0/lib/slv/slv_fb.c 2026-01-23 09:53:53.371401254 +0100 -+++ ./lib/slv/slv_fb.c 1970-01-01 01:00:00.000000000 +0100 ++++ ./lib/slv/slv_fb.c 2026-01-23 07:53:14.427120833 +0100 @@ -1,146 +0,0 @@ -/* - * Copyright (C) 2025 André Costa diff --git a/build/meta-usr/recipes-usr/so3/usr-so3_1.0.bb b/build/meta-usr/recipes-usr/so3/usr-so3_1.0.bb index 62ecd75..6cfdef8 100644 --- a/build/meta-usr/recipes-usr/so3/usr-so3_1.0.bb +++ b/build/meta-usr/recipes-usr/so3/usr-so3_1.0.bb @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD SUMMARY = "User space applications for SO3" DESCRIPTION = "All (SO3) user space custom applications which take place in the rootfs of SO3" @@ -9,7 +11,11 @@ inherit usr PR = "r0" PV = "1.0" -OVERRIDES += ":so3" +# Use :append (not +=) so no space is inserted before ":so3". With +=, +# OVERRIDES becomes "...:arm :so3" and the CPU token parses as "arm " +# (trailing space), so :arm overrides like IB_MUSL_TARGET:arm never +# collapse — breaking the musl toolchain PATH on virt32. +OVERRIDES:append = ":so3" # These patches bring lv_port_linux/lvgl in the usr structure FILESPATH:prepend = "${THISDIR}/files/0001-${PF}:" @@ -21,8 +27,41 @@ IB_TARGET = "${IB_DIR}/so3/usr" IB_TOOLCHAIN_PATH = "${IB_TARGET}/${IB_PLAT_CPU}-linux-musl.cmake" +# lvgl is FETCHED at build time (see the meta-usr/recipes-usr/lvgl +# usr-so3 bbappend, gated on the :lvgl override) into usr/lib/lvgl — it is +# NOT a committed git submodule. do_fetch/do_unpack/do_attach therefore run +# so the bbappend's do_handle_fetch_git can pull lvgl into the workdir and +# attach it back into usr/. +# +# do_patch stays noexec: the slv/lvgl integration patches are already baked +# into the in-tree usr/ source, so re-applying them fails (reversed patch). +do_patch[noexec] = "1" + do_build[depends] = "rootfs-so3:do_build" +# The user space is cross-compiled with the SO3 musl toolchain built by +# the musl-toolchain recipe (meta-toolchain). Make it available and put +# its bin/ on PATH so the bare compiler names in the cmake toolchain +# file (e.g. aarch64-linux-musl-gcc) resolve. +do_build[depends] += "musl-toolchain:do_build" +do_build:prepend () { + export PATH="${IB_MUSL_TOOLCHAIN_DIR}/${IB_MUSL_TARGET}/bin:$PATH" + + # The cmake build dir caches the toolchain (CMakeCache.txt pins the + # compiler), so switching IB_PLATFORM between virt64 and virt32 + # (aarch64<->arm) would otherwise keep producing wrong-arch user + # binaries (e.g. an aarch64 init.elf on a 32-bit kernel -> prefetch + # abort at boot). Wipe build/ when the arch changes; same-arch + # rebuilds stay incremental. The marker lives at the usr/ root so it + # survives the build/ wipe. + _arch_marker="${IB_TARGET}/.ib_last_arch" + if [ -f "$_arch_marker" ] && [ "$(cat $_arch_marker)" != "${IB_PLAT_CPU}" ]; then + echo "SO3 usr arch changed ($(cat $_arch_marker) -> ${IB_PLAT_CPU}); wiping build/" + rm -rf ${IB_TARGET}/build + fi + echo "${IB_PLAT_CPU}" > "$_arch_marker" +} + # Make sure so3 has been installed correctly to fetch other components if required do_unpack[depends] += "so3:do_attach_infrabase" @@ -40,14 +79,18 @@ python do_deploy() { src_dir = os.path.join(d.getVar('IB_TARGET'), 'build', 'deploy') dst_dir = os.path.join(d.getVar('IB_ROOTFS_PATH'), 'fs') - - cmd = f"cp -r {src_dir}/. {dst_dir}/" - + + # The SO3 rootfs.fat is loop-mounted at rootfs/fs as root + # (rootfs/mount.sh), so the copy must be privileged. The split + # debug-info files (*.debug) are host-side gdb symbols, not + # runtime artifacts — keep them out of the (small) rootfs. + # -r only (no -a): vfat rejects chown/owner/perms preservation. + cmd = f"sudo rsync -rL --exclude='*.debug' {src_dir}/ {dst_dir}/" + result = subprocess.run(cmd, shell=True, check=True) __do_rootfs_umount(d) else: - utils_restore_user_ownership(d) bb.fatal("Hum, it seeems the so3 usr has not been built correctly - rootfs missing...") } @@ -65,7 +108,14 @@ do_install_apps () { usr_do_install_file_dir "${IB_TARGET}/out/*" . } -do_clean:append () { - rm -f ${TMPDIR}/stamps/usr-so3* +# Python (not shell) to match the Python do_clean in usr.bbclass and to +# avoid the shell-task temp/fifo failure. Removes this recipe's stamps. +python do_clean:append() { + import glob, os + for f in glob.glob(d.getVar('TMPDIR') + '/stamps/usr-so3*'): + try: + os.remove(f) + except OSError: + pass } diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0-patches.inc b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0-patches.inc deleted file mode 100644 index 2810f65..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0-patches.inc +++ /dev/null @@ -1,53 +0,0 @@ -SOO_URI:append = "\ - file://0020-capsule.cpp.patch \ - file://0040-plugins.hpp.patch \ - file://0039-plugins.cpp.patch \ - file://0006-receive.h.patch \ - file://0002-debug.h.patch \ - file://0038-network.hpp.patch \ - file://0022-daemon.cpp.patch \ - file://0046-webserver.hpp.patch \ - file://0029-utils.cpp.patch \ - file://0051-shutdownme.c.patch \ - file://0017-cli.cpp.patch \ - file://0037-network.cpp.patch \ - file://0007-send.h.patch \ - file://0027-config.hpp.patch \ - file://0023-daemon.hpp.patch \ - file://0028-utils.hpp.patch \ - file://0030-container.cpp.patch \ - file://0036-image_inspect.hpp.patch \ - file://0042-system.hpp.patch \ - file://0016-CMakeLists.txt.patch \ - file://0050-saveme.c.patch \ - file://0001-core.h.patch \ - file://0025-image.hpp.patch \ - file://0048-melist.c.patch \ - file://0026-emiso_engine.cpp.patch \ - file://0019-CMakeLists.txt.patch \ - file://0033-container_logs.hpp.patch \ - file://0035-image.hpp.patch \ - file://0008-types.h.patch \ - file://0004-injector.h.patch \ - file://0047-injector.c.patch \ - file://0021-capsule.hpp.patch \ - file://0003-device_access.h.patch \ - file://0045-webserver.cpp.patch \ - file://0031-container.hpp.patch \ - file://0012-soo.h.patch \ - file://0043-volume.cpp.patch \ - file://0049-restoreme.c.patch \ - file://0044-volume.hpp.patch \ - file://0041-system.cpp.patch \ - file://0011-debug.h.patch \ - file://0034-image.cpp.patch \ - file://0018-cli.hpp.patch \ - file://0032-container_inspect.hpp.patch \ - file://0009-upgrader.h.patch \ - file://0024-image.cpp.patch \ - file://0005-leds.h.patch \ - file://0010-core.h.patch \ - file://0052-CMakeLists.txt.patch \ - file://0053-fb_mapper.c.patch \ - file://0054-input_forwarding.c.patch \ -" diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0001-core.h.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0001-core.h.patch deleted file mode 100644 index 16f874b..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0001-core.h.patch +++ /dev/null @@ -1,63 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/include/core/core.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./include/core/core.h 2025-10-10 17:28:33.584649635 +0200 -@@ -0,0 +1,60 @@ -+/* -+ * Copyright (C) 2014-2019 Daniel Rossier -+ * Copyright (C) 2018-2019 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef CORE_H -+#define CORE_H -+ -+#include -+ -+#include -+ -+#define AGENCY_CORE_VERSION "2025.5" -+ -+/* Cycle period express in ms */ -+#define AG_CYCLE_PERIOD 100 -+ -+#define SOO_CORE_DEVICE "/dev/soo/core" -+ -+extern int fd_core; -+extern int fd_dcm; -+ -+/* Arguments of the agency application */ -+extern bool opt_noinject; -+extern bool opt_nosend; -+ -+/* To indicate f the main agency cycle loop is interrupted */ -+extern bool ag_cycle_interrupted; -+ -+int initialize_migration(unsigned int ME_slotID); -+ -+int get_ME_free_slot(size_t ME_size); -+ -+bool get_ME_id(uint32_t slotID, ME_id_t *ME_id); -+ -+void read_ME_snapshot(unsigned int slotID, void **buffer, uint32_t *buffer_size); -+void write_ME_snapshot(unsigned int slotID, unsigned char *ME_buffer); -+ -+void *prepare_ME_slot(unsigned int slotID); -+int finalize_migration(unsigned int slotID); -+ -+void main_loop(int cycle_period); -+ -+void migration_init(void); -+ -+#endif /* CORE_H */ diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0002-debug.h.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0002-debug.h.patch deleted file mode 100644 index 94d5b0d..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0002-debug.h.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/include/core/debug.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./include/core/debug.h 2025-10-10 17:28:33.584702104 +0200 -@@ -0,0 +1,49 @@ -+/* -+ * Copyright (C) 2014-2019 Daniel Rossier -+ * Copyright (C) 2018-2019 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef DEBUG_H -+#define DEBUG_H -+ -+#include -+#include -+ -+#ifdef DEBUG -+#undef DBG -+ -+#define DBG(fmt, ...) \ -+ do { \ -+ printf("(user) %s:%d > "fmt, __func__, __LINE__, ##__VA_ARGS__); \ -+ } while (0) -+ -+#define BUG() do { printf("BUG\n"); fflush(stdout); exit(-1); } while (0); -+ -+#define DBG0(...) DBG("%s", ##__VA_ARGS__) -+ -+#else -+ -+#define DBG(fmt, ...) -+#define RTDBG(fmt, ...) -+#define DBG0(...) -+#define DBG_BUFFER(buffer, ...) -+#define DBG_ON__ -+#define DBG_OFF__ -+ -+#endif -+ -+#endif /* DEBUG_H */ diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0003-device_access.h.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0003-device_access.h.patch deleted file mode 100644 index 5e9e78f..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0003-device_access.h.patch +++ /dev/null @@ -1,61 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/include/core/device_access.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./include/core/device_access.h 2025-10-10 17:28:33.584702104 +0200 -@@ -0,0 +1,58 @@ -+ /* -+ * Copyright (C) 2014-2019 Daniel Rossier -+ * Copyright (c) 2018 Baptiste Delporte -+ * Copyright (C) 2019 David Truan -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef DEVICE_ACCESS_H -+#define DEVICE_ACCESS_H -+ -+#define FILENAME_MAX_LEN 80 -+ -+#define SOO_ME_DIRECTORY "/mnt/ME" -+#define SOO_BOOT_PART "/mnt/boot/" -+#define SOO_ROOTFS_P2 "/mnt/rootfs1/" -+#define SOO_ROOTFS_P4 "/mnt/rootfs2/" -+#define ROOT_PATH "/root/" -+ -+#define ROOTFS1_PART '2' -+#define ROOTFS2_PART '4' -+ -+#define ROOTFS_ARCHIVE_NAME "rootfs.tar" -+#define AGENCY_JSON_NAME "agency.json" -+#define AGENCY_JSON_PATH SOO_BOOT_PART AGENCY_JSON_NAME -+#define ROOT_FLAG_NAME "root_flag" -+#define ROOT_FLAG_PATH SOO_BOOT_PART ROOT_FLAG_NAME -+#define UENV_TXT_NAME "uEnv.txt" -+#define UENV_TXT_PATH SOO_BOOT_PART UENV_TXT_NAME -+ -+#define ITB_NAME "soo.itb" -+ -+#define ITB_PATH SOO_BOOT_PART ITB_NAME -+ -+void agency_inject_ME_from_memory(void); -+void sig_inject_ME_from_memory(int sig); -+ -+void inject_MEs_from_filesystem(void); -+ -+int upgrade_uEnv_txt(char *uEnv_updated, size_t size); -+int upgrade_itb(char *itb_updated, size_t size); -+int upgrade_rootfs(char *rootfs_updated, size_t size); -+ -+void device_access_init(void); -+ -+#endif /* DEVICE_ACCESS_H */ diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0004-injector.h.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0004-injector.h.patch deleted file mode 100644 index b473edf..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0004-injector.h.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/include/core/injector.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./include/core/injector.h 2025-10-10 17:28:33.584702104 +0200 -@@ -0,0 +1,29 @@ -+ -+/* -+ * Copyright (C) 2014-2019 Daniel Rossier -+ * Copyright (C) 2018-2019 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef INJECTOR_CORE_H -+#define INJECTOR_CORE_H -+ -+void injector_init(void); -+void inject_from_BT(void); -+ -+void ME_inject(unsigned char *ME_buffer, uint32_t size); -+ -+#endif /* INJECTOR_CORE_H */ diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0005-leds.h.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0005-leds.h.patch deleted file mode 100644 index 31507e7..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0005-leds.h.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/include/core/leds.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./include/core/leds.h 2025-10-10 17:28:33.584702104 +0200 -@@ -0,0 +1,37 @@ -+/* -+ * Copyright (C) 2018-2019 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef LEDS_H -+#define LEDS_H -+ -+#include -+ -+#include -+ -+#define SOO_N_LEDS 6 -+ -+#define SOO_LED_SYSFS_PREFIX "/sys/class/leds/led_d" -+#define SOO_LED_SYSFS_SUFFIX "/brightness" -+ -+void led_set(uint32_t id, uint8_t value); -+void led_on(uint32_t id); -+void led_off(uint32_t id); -+ -+void leds_init(void); -+ -+#endif /* LEDS_H */ diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0006-receive.h.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0006-receive.h.patch deleted file mode 100644 index 1a4b570..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0006-receive.h.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/include/core/receive.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./include/core/receive.h 2025-10-10 17:28:33.584702104 +0200 -@@ -0,0 +1,27 @@ -+/* -+ * Copyright (C) 2014-2019 Daniel Rossier -+ * Copyright (C) 2018-2019 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef RECEIVE_H -+#define RECEIVE_H -+ -+#include -+ -+void ME_processing_receive(void); -+ -+#endif /* RECEIVE_H */ diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0007-send.h.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0007-send.h.patch deleted file mode 100644 index 65a13f3..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0007-send.h.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/include/core/send.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./include/core/send.h 2025-10-10 17:28:33.584702104 +0200 -@@ -0,0 +1,28 @@ -+/* -+ * Copyright (C) 2014-2019 Daniel Rossier -+ * Copyright (C) 2018-2019 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef SEND_H -+#define SEND_H -+ -+#include -+ -+void try_to_send_ME(void); -+void sig_initiate_migration(int sig); -+ -+#endif /* SEND_H */ diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0008-types.h.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0008-types.h.patch deleted file mode 100644 index 3aae65c..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0008-types.h.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/include/core/types.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./include/core/types.h 2025-10-10 17:28:33.584702104 +0200 -@@ -0,0 +1,26 @@ -+/* -+ * Copyright (C) 2014-2019 Daniel Rossier -+ * Copyright (C) 2018-2019 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef TYPES_H -+#define TYPES_H -+ -+#define likely(expr) expr -+#define unlikely(expr) expr -+ -+#endif /* TYPES_H */ diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0009-upgrader.h.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0009-upgrader.h.patch deleted file mode 100644 index 7cd8cc8..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0009-upgrader.h.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/include/core/upgrader.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./include/core/upgrader.h 2025-10-10 17:28:33.584702104 +0200 -@@ -0,0 +1,49 @@ -+/* -+ * Copyright (C) 2019 David Truan -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef UPGRADER_H -+#define UPGRADER_H -+ -+#define UPGRADABLE_COMPONENTS 3 -+#define UPGRADE_POLL_PERIOD_MS 500 -+ -+/** -+ * Image format: | uncompressed size | ITB version | U-boot version | rootfs version | -+ * The payload is composed of the 3 components as follows: for each component. -+ * Each field except the images themself are on 4B unsigned -+ * -+ */ -+#define HEADER_SIZE (4 + 3 * 4) -+ -+typedef enum { -+ ITB, -+ UBOOT, -+ ROOTFS -+} component_type_t; -+ -+/* Used to pass information between the upgarde stages */ -+typedef struct { -+ char *header; -+ size_t compressed_size; -+ char *decompressed_image; -+ unsigned int ME_slotID; -+} upgrader_args_t; -+ -+void upgrader_init(void); -+ -+#endif /* UPGRADER_H */ diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0010-core.h.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0010-core.h.patch deleted file mode 100644 index b0ae3c7..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0010-core.h.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/include/soo/core.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./include/soo/core.h 2025-10-10 17:28:33.584702104 +0200 -@@ -0,0 +1,30 @@ -+/* -+ * Copyright (C) 2014-2019 Daniel Rossier -+ * Copyright (C) 2018-2019 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef CORE_H -+#define CORE_H -+ -+#include -+ -+#include -+ -+#define SOO_VERSION "1.0" -+#define SOO_CORE_DEVICE "/dev/soo/core" -+ -+#endif /* CORE_H */ diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0011-debug.h.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0011-debug.h.patch deleted file mode 100644 index 9ea3b5b..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0011-debug.h.patch +++ /dev/null @@ -1,52 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/include/soo/debug.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./include/soo/debug.h 2025-10-10 17:28:33.584815499 +0200 -@@ -0,0 +1,49 @@ -+/* -+ * Copyright (C) 2014-2019 Daniel Rossier -+ * Copyright (C) 2018-2019 Baptiste Delporte -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef DEBUG_H -+#define DEBUG_H -+ -+#include -+#include -+ -+#ifdef DEBUG -+#undef DBG -+ -+#define DBG(fmt, ...) \ -+ do { \ -+ printf("(user) %s:%d > "fmt, __func__, __LINE__, ##__VA_ARGS__); \ -+ } while (0) -+ -+#define BUG() do { printf("BUG\n"); fflush(stdout); exit(-1); } while (0); -+ -+#define DBG0(...) DBG("%s", ##__VA_ARGS__) -+ -+#else -+ -+#define DBG(fmt, ...) -+#define RTDBG(fmt, ...) -+#define DBG0(...) -+#define DBG_BUFFER(buffer, ...) -+#define DBG_ON__ -+#define DBG_OFF__ -+ -+#endif -+ -+#endif /* DEBUG_H */ diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0012-soo.h.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0012-soo.h.patch deleted file mode 100644 index 4708110..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0012-soo.h.patch +++ /dev/null @@ -1,101 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/include/soo/uapi/soo.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./include/soo/uapi/soo.h 2025-10-10 17:28:33.584815499 +0200 -@@ -0,0 +1,98 @@ -+/* -+ * Copyright (C) 2014-2025 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef UAPI_SOO_H -+#define UAPI_SOO_H -+ -+#include -+ -+#define MAX_ME_DOMAINS 5 -+ -+/* -+ * ME states: -+ * - ME_state_stopped: Capsule is stopped (right after start or later) -+ * - ME_state_living: ME is full-functional and activated (all frontend devices are consistent) -+ * - ME_state_suspended: ME is suspended before migrating. This state is maintained for the resident ME instance -+ * - ME_state_hibernate: ME is in a state of hibernate snapshot -+ * - ME_state_resuming: ME ready to perform resuming (after recovering) -+ * - ME_state_awakened: ME is just being awakened -+ * - ME_state_terminated: ME has been terminated (by a shutdown) -+ * - ME_state_dead: ME does not exist -+ */ -+typedef enum { -+ ME_state_stopped, -+ ME_state_living, -+ ME_state_suspended, -+ ME_state_hibernate, -+ ME_state_resuming, -+ ME_state_awakened, -+ ME_state_killed, -+ ME_state_terminated, -+ ME_state_dead -+} ME_state_t; -+ -+/* Keep information about slot availability -+ * FREE: the slot is available (no ME) -+ * BUSY: the slot is allocated a ME -+ */ -+typedef enum { ME_SLOT_FREE, ME_SLOT_BUSY } ME_slotState_t; -+ -+/* ME ID related information */ -+#define ME_NAME_SIZE 40 -+#define ME_SHORTDESC_SIZE 1024 -+ -+/* -+ * Definition of ME ID information used by functions which need -+ * to get a list of running MEs with their information. -+ */ -+typedef struct { -+ uint32_t slotID; -+ ME_state_t state; -+ -+ uint64_t spid; -+ -+ char name[ME_NAME_SIZE]; -+ char shortdesc[ME_SHORTDESC_SIZE]; -+} ME_id_t; -+ -+/* -+ * IOCTL commands for migration. -+ * This part is shared between the kernel and user spaces. -+ */ -+ -+/* -+ * IOCTL codes -+ */ -+ -+#define AGENCY_IOCTL_READ_SNAPSHOT _IOWR('S', 1, agency_ioctl_args_t) -+#define AGENCY_IOCTL_WRITE_SNAPSHOT _IOW('S', 2, agency_ioctl_args_t) -+#define AGENCY_IOCTL_SHUTDOWN _IOW('S', 3, agency_ioctl_args_t) -+#define AGENCY_IOCTL_INJECT_CAPSULE _IOWR('S', 4, agency_ioctl_args_t) -+#define AGENCY_IOCTL_START_CAPSULE _IOWR('S', 5, agency_ioctl_args_t) -+#define AGENCY_IOCTL_GET_ME_ID _IOWR('S', 6, agency_ioctl_args_t) -+#define AGENCY_IOCTL_GET_ME_ID_ARRAY _IOR('S', 7, agency_ioctl_args_t) -+ -+/* struct agency_ioctl_args used in IOCTLs */ -+typedef struct agency_ioctl_args { -+ void *buffer; /* IN/OUT */ -+ int slotID; -+ unsigned capsuleID; -+ long value; /* IN/OUT */ -+} agency_ioctl_args_t; -+ -+#endif /* UAPI_SOO_H */ diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0016-CMakeLists.txt.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0016-CMakeLists.txt.patch deleted file mode 100644 index 79a9d8c..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0016-CMakeLists.txt.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/CMakeLists.txt 2025-10-10 17:28:33.593542342 +0200 -@@ -0,0 +1,17 @@ -+ -+ -+add_executable(injector injector.c) -+ -+add_executable(saveme saveme.c) -+add_executable(restoreme restoreme.c) -+add_executable(shutdownme shutdownme.c) -+ -+add_executable(melist melist.c) -+ -+add_executable(fb_mapper fb_mapper.c) -+add_executable(input_forwarding input_forwarding.c) -+ -+add_subdirectory(emiso_engine) -+ -+target_link_libraries(saveme zip) -+target_link_libraries(restoreme zip) diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0017-cli.cpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0017-cli.cpp.patch deleted file mode 100644 index dc771a5..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0017-cli.cpp.patch +++ /dev/null @@ -1,127 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/cli/cli.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/cli/cli.cpp 2025-10-10 17:28:33.593649878 +0200 -@@ -0,0 +1,123 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include -+#include -+ -+#include "cli.hpp" -+ -+#define EMISO_CLI_PROMPT "(emiso)>> " -+ -+namespace emiso { -+ -+Cli::Cli() {} -+ -+Cli::~Cli() {} -+ -+void Cli::splitCmd(std::string const &str, const char delim, std::vector &out) -+{ -+ // create a stream from the string -+ std::stringstream s(str); -+ -+ std::string s2; -+ while (std::getline (s, s2, delim)) { -+ out.push_back(s2); // store the string in s2 -+ } -+} -+ -+ -+// Function to handle the "hello" command -+void Cli::handleHelloCommand() { -+ std::cout << "Hello, World!" << std::endl; -+} -+ -+// Function to handle the "help" command -+void Cli::handleHelpCommand() { -+ std::cout << "Available commands:" << std::endl; -+ std::cout << " hello - Print a greeting" << std::endl; -+ std::cout << " help - Show available commands" << std::endl; -+ std::cout << " exit - Exit the program" << std::endl; -+} -+ -+ -+void Cli::handleImagesCommand(std::vector &tokens) -+{ -+ std::map info; -+ -+ // TODO - Add checks on 'tokens' -+ if (tokens[1] == "info") { -+ _image.info(info); -+ -+ for (auto it = info.begin(); it != info.end(); ++it) { -+ std::string name = it->second.name; -+ size_t size = it->second.size; -+ std::string id = it->second.id; -+ auto date = it->second.date; -+ -+ std::cout << name << std::endl; -+ std::cout << " Size: " << size << std::endl; -+ std::cout << " ID: " << id << std::endl; -+ std::cout << " date: " << date << std::endl; -+ } -+ } else if (tokens[1] == "rm") { -+ // TODO - Add checks on 'tokens[2]' -+ _image.remove(tokens[2]); -+ } else { -+ std::cout << "[ERROR] image cmd '" << tokens[1] << "' is not supported" << std::endl; -+ } -+} -+ -+void Cli::start() -+{ -+ std::cout << "Starting interactive mode" << std::endl; -+ while (true) { -+ char* input = readline(EMISO_CLI_PROMPT); -+ if (!input) { -+ break; // User pressed Ctrl+D (EOF) -+ } -+ -+ std::string command(input); -+ free(input); -+ -+ // Add the command to readline's history -+ if (!command.empty()) { -+ add_history(command.c_str()); -+ } -+ -+ std::vector tokens; -+ Cli::splitCmd(command, ' ', tokens); -+ -+ -+ if (tokens[0] == "hello") { -+ Cli::handleHelloCommand(); -+ } else if (tokens[0] == "help") { -+ Cli::handleHelpCommand(); -+ } else if (tokens[0] == "image") { -+ Cli::handleImagesCommand(tokens); -+ } else if (tokens[0] == "exit") { -+ break; // Exit the program -+ } else { -+ std::cout << "Unknown command. Type 'help' for a list of available commands." << std::endl; -+ } -+ } -+ -+ std::cout << "Stopping interactive mode" << std::endl; -+ -+} -+ -+} // emiso -\ No newline at end of file diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0018-cli.hpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0018-cli.hpp.patch deleted file mode 100644 index 6fb87dd..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0018-cli.hpp.patch +++ /dev/null @@ -1,53 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/cli/cli.hpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/cli/cli.hpp 2025-10-10 17:28:33.593649878 +0200 -@@ -0,0 +1,50 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef EMISO_CLI_H -+#define EMISO_CLI_H -+ -+#include -+#include -+#include -+ -+#include "../daemon/image.hpp" -+ -+namespace emiso { -+ -+ class Cli { -+ public: -+ Cli(); -+ -+ // Destructor -+ ~Cli(); -+ -+ void start(); -+ -+ private: -+ daemon::Image _image; -+ -+ void splitCmd(std::string const &str, const char delim, std::vector &out); -+ -+ void handleHelloCommand(); -+ void handleHelpCommand(); -+ void handleImagesCommand(std::vector &tockens); -+ }; -+} -+ -+#endif // EMISO_CLI_H diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0019-CMakeLists.txt.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0019-CMakeLists.txt.patch deleted file mode 100644 index 013828e..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0019-CMakeLists.txt.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/CMakeLists.txt 2025-10-10 17:28:33.593608138 +0200 -@@ -0,0 +1,25 @@ -+project(emiso_engine LANGUAGES C CXX) -+ -+set(CMAKE_CXX_STANDARD 20) -+set(CMAKE_CXX_STANDARD_REQUIRED ON) -+ -+add_executable(${PROJECT_NAME} emiso_engine.cpp -+ utils.cpp -+ webserver/webserver.cpp -+ webserver/system/system.cpp -+ webserver/container/container.cpp -+ webserver/image/image.cpp -+ webserver/network/network.cpp -+ webserver/volume/volume.cpp -+ webserver/plugins/plugins.cpp -+ daemon/image.cpp -+ daemon/capsule.cpp -+ daemon/daemon.cpp -+ #cli/cli.cpp -+) -+ -+target_include_directories(${PROJECT_NAME} PRIVATE include) -+ -+target_link_libraries(${PROJECT_NAME} httpserver jsoncpp readline zip) -+ -+install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_BINARY_DIR}/bin) diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0020-capsule.cpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0020-capsule.cpp.patch deleted file mode 100644 index 6be1230..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0020-capsule.cpp.patch +++ /dev/null @@ -1,546 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/daemon/capsule.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/daemon/capsule.cpp 2025-10-10 17:28:33.593649878 +0200 -@@ -0,0 +1,543 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include -+ -+#include -+ -+#include -+ -+#include "capsule.hpp" -+ -+using namespace std; -+ -+// Path where the Capsule images are stored -+#define EMISO_IMAGE_PATH "/mnt/capsules/image/" -+ -+// Path where the Capsule snapshot are stored -+#define EMISO_CAPSULE_CACHE_DIR "/mnt/capsules/snapshot" -+ -+// Path of SOO driver -+#define SOO_CORE_DRV_PATH "/dev/soo/core" -+ -+#define LOG_PREFIX "[EMISO:DAEMON] " -+ -+namespace emiso { -+ -+map Capsule::_capsules; -+unsigned Capsule::_capsuleIdx = 0; -+ -+Capsule::Capsule(){}; -+ -+Capsule::~Capsule(){}; -+ -+/** -+ * @brief Return NOW in epoch format, in seconds -+ * -+ * It is used to set Capsule's creation time -+ * -+ * @return now, since EPOCH, in second -+ */ -+uint64_t Capsule::createdTime() -+{ -+ const auto now = chrono::system_clock::now(); -+ const auto epoch = chrono::duration_cast(now.time_since_epoch()).count(); -+ -+ return epoch; -+} -+ -+ -+/* -+ * @brief Inject a capsule -+ * -+ * @param imageName Name image, without .itb suffix, used to inject the capsule -+ * @return The ID of the create capsule or a negative value in case of error -+ */ -+int Capsule::inject(string imageName, bool start_capsule, unsigned capsuleId) -+{ -+ int fd; -+ int ret; -+ streampos capsuleSize; -+ string filename; -+ char *capsuleBuf; -+ struct agency_ioctl_args args; -+ -+ cout << LOG_PREFIX "Capsule injection from image " << imageName << endl; -+ -+ filename = std::format("{}{}.itb", EMISO_IMAGE_PATH, imageName); -+ -+ ifstream image(filename, ios::in | ios::binary | ios::ate); -+ if (!image.is_open()) { -+ cerr << LOG_PREFIX "Error: Failed to open image file '" << filename << "'" << endl; -+ return EXIT_FAILURE; -+ } -+ -+ capsuleSize = image.tellg(); -+ -+ capsuleBuf = new char[capsuleSize]; -+ -+ image.seekg(0, ios::beg); -+ image.read(capsuleBuf, capsuleSize); -+ image.close(); -+ -+ args.buffer = capsuleBuf; -+ args.value = capsuleSize; -+ args.slotID = -1; /* Wherever */ -+ args.capsuleID = capsuleId; -+ -+ fd = open(SOO_CORE_DRV_PATH, O_RDWR); -+ if (fd < 0) { -+ cerr << "[EMISO:DAEMON] Failing to open /dev soo entry ..." << endl; -+ delete[] capsuleBuf; -+ return EXIT_FAILURE; -+ } -+ -+ /* Inject the capsule */ -+ ret = ioctl(fd, AGENCY_IOCTL_INJECT_CAPSULE, &args); -+ if ((ret < 0) || (args.slotID == -1)) { -+ cerr << "[EMISO:DAEMON] No available ME slot further..." << endl; -+ close(fd); -+ delete[] capsuleBuf; -+ return EXIT_FAILURE; -+ } -+ -+ if (start_capsule) { -+ ioctl(fd, AGENCY_IOCTL_START_CAPSULE, &args); -+ } -+ -+ delete[] capsuleBuf; -+ close(fd); -+ -+ return args.slotID; -+} -+ -+ -+/* -+ * @brief Save a snapshot of a Capsule -+ * -+ * @param slotId The slot ID of the capsule for which to create a snapshot. -+ * @param snapshotName The name of the snapshot -+ * @return negative value in case of error, 0 otherwise -+ */ -+int Capsule::saveSnapshot(int slotId, string snapshotName) -+{ -+ int fd; -+ int ret; -+ struct agency_ioctl_args args; -+ struct zip_t *zip; -+ string filename; -+ -+ cout << LOG_PREFIX "Save Capsule - slot ID: " << slotId << ", name: " << snapshotName << endl; -+ -+ fd = open(SOO_CORE_DRV_PATH, O_RDWR); -+ if (fd < 0) { -+ printf("[EMISO:DAEMON] Failing to open /dev/soo entry ...\n"); -+ return EXIT_FAILURE; -+ } -+ -+ /* Get the size of the snapshot */ -+ args.slotID = slotId; -+ args.value = 0; /* To get the size of the snapshot */ -+ -+ ret = ioctl(fd, AGENCY_IOCTL_READ_SNAPSHOT, &args); -+ if (ret < 0) { -+ printf(LOG_PREFIX "Get the size with IOCTL_READ_SNAPSHOT failed.\n"); -+ close(fd); -+ return EXIT_FAILURE; -+ } -+ -+ args.buffer = new (std::nothrow) char[args.value]; -+ if (args.buffer == NULL) { -+ printf(LOG_PREFIX " %s - malloc failed\n", __func__); -+ close(fd); -+ return EXIT_FAILURE; -+ } -+ -+ ret = ioctl(fd, AGENCY_IOCTL_READ_SNAPSHOT, &args); -+ if (ret < 0) { -+ printf(LOG_PREFIX "Read the snapshot IOCTL_READ_SNAPSHOT failed.\n"); -+ delete[] args.buffer; -+ close(fd); -+ return EXIT_FAILURE; -+ } -+ -+ close(fd); -+ -+ filename = string(EMISO_CAPSULE_CACHE_DIR) + "/" + snapshotName; -+ -+ cout << "Save capsule in: " << filename << endl; -+ -+ /* Compress the snapshot */ -+ zip = zip_open(filename.c_str(), ZIP_DEFAULT_COMPRESSION_LEVEL, 'w'); -+ if (!zip) { -+ printf(LOG_PREFIX "Failed to open the zip file. Is there a bad sync after saving the snapshot?...\n"); -+ perror(""); -+ delete[] args.buffer; -+ close(fd); -+ return EXIT_FAILURE; -+ } -+ zip_entry_open(zip, "me"); -+ zip_entry_write(zip, args.buffer, args.value); -+ zip_entry_close(zip); -+ -+ zip_close(zip); -+ delete[] args.buffer; -+ -+ return 0; -+} -+ -+/* -+ * @brief Restore a Capsule for a snapshot -+ * -+ * @param snapshotName The name of the snapshot -+ * @return The slot ID used for the capsule or a negative value in case of error -+ */ -+int Capsule::restoreSnapshot(string snapshotName) -+{ -+ int fd; -+ int ret; -+ struct agency_ioctl_args args; -+ size_t buffer_size; -+ struct zip_t *zip; -+ string filename; -+ -+ /* Open the channel to the kernel soo submodule. */ -+ fd = open(SOO_CORE_DRV_PATH, O_RDWR); -+ if ((fd < 0)) { -+ printf(LOG_PREFIX "Failed to open soo /dev entry...\n"); -+ return EXIT_FAILURE; -+ } -+ -+ filename = std::string(EMISO_CAPSULE_CACHE_DIR) + "/" + snapshotName; -+ -+ zip = zip_open(filename.c_str(), 0, 'r'); -+ if (!zip) { -+ printf(LOG_PREFIX "Failed to open the zip file. Is there a bad sync after saving the snapshot?...\n"); -+ close(fd); -+ return EXIT_FAILURE; -+ } -+ -+ zip_entry_open(zip, "me"); -+ zip_entry_read(zip, &args.buffer, &buffer_size); -+ zip_entry_close(zip); -+ -+ zip_close(zip); -+ -+ /* Restore the snapshot which is in stated */ -+ cout << LOG_PREFIX "Re-implementing snapshot of size " << buffer_size << " bytes." << endl; -+ args.slotID = -1; -+ ret = ioctl(fd, AGENCY_IOCTL_WRITE_SNAPSHOT, &args); -+ if (ret < 0) { -+ printf("Failed to initialize migration (%d)\n", ret); -+ close(fd); -+ return EXIT_FAILURE; -+ } -+ -+ free(args.buffer); -+ close(fd); -+ -+ return args.slotID; -+} -+ -+/* -+ * @brief Shutdown a Capsule -+ * -+ * @param slotId The slot ID of the capsule to shutdown. -+ * @return a negative value in case of error, 0 otherwise -+ */ -+int Capsule::shutdown(int slotId) -+{ -+ int fd; -+ int ret; -+ struct agency_ioctl_args args; -+ -+ fd = open(SOO_CORE_DRV_PATH, O_RDWR); -+ if (fd < 0) { -+ printf("[EMISO:DAEMON] Failing to open /dev/soo entry ...\n"); -+ return EXIT_FAILURE; -+ } -+ -+ /* Shutdown the capsule so that it will be removed from the memory */ -+ args.slotID = slotId; -+ -+ ret = ioctl(fd, AGENCY_IOCTL_SHUTDOWN, &args); -+ if (ret < 0) { -+ printf(LOG_PREFIX "Read the snapshot IOCTL_READ_SNAPSHOT failed.\n"); -+ close(fd); -+ return EXIT_FAILURE; -+ } -+ -+ close(fd); -+ -+ return 0; -+} -+ -+/** -+ * @brief Retrieve the info of all the capsules -+ * -+ * @param capsuleList A map which contains the info of all capsules. -+ */ -+void Capsule::info(map &capsuleList) -+{ -+ capsuleList = _capsules; -+} -+ -+ -+/** -+ * @brief Retrieve the info of a specific capsule -+ * -+ * @param id ID of the capsule from which to retrieve the information -+ * @param info The info of the capsule -+ */ -+void Capsule::info(int id, CapsuleInfo &info) -+{ -+ info = _capsules.at(id); -+} -+ -+ -+/** -+ * @brief The create() method of Capsule leads to the injection of a capsule, but -+ * without starting its execution. It will perform a snapshot, write it to -+ * a specific location and shutdown the stopped capsule. -+ * -+ * @param imageName Name image, without .itb suffix, used to create the capsule -+ * @param capsuleName The name of the capsule to create -+ * @return The ID of the create capsule -+ */ -+int Capsule::create(string imageName, string capsuleName) -+{ -+ int slotId; -+ -+ cout << LOG_PREFIX "Create capsule " << capsuleName << " from image " << imageName << endl; -+ -+ // Inject the Capsule -+ slotId = this->inject(imageName, false, _capsuleIdx); -+ -+ // Save the info of the new capsule -+ CapsuleInfo capsule; -+ capsule.id = _capsuleIdx; -+ capsule.name = capsuleName; -+ capsule.state = "created"; -+ capsule.image = imageName; -+ capsule.slotId = slotId; -+ capsule.created = this->createdTime(); -+ -+ _capsules[_capsuleIdx] = capsule; -+ _capsuleIdx++; -+ -+ // Save the snapshot to the capsule cache directory and shutdown it -+ this->saveSnapshot(slotId, capsuleName); -+ -+ // Shutdown the capsule -+ this->shutdown(slotId); -+ -+ // Set the Capsule state -+ _capsules[capsule.id].state = "created"; -+ -+ return capsule.id; -+} -+ -+/** -+ * @brief Start an existing capsule -+ * -+ * Depending in the state of the capsule, it is restored or injected -+ * -+ * @param capsuleName -+ * @param capsuleId -+ * @return -+ */ -+int Capsule::start(unsigned capsuleId) -+{ -+ int ret; -+ string capsuleName = _capsules[capsuleId].name; -+ int slotId; -+ -+ cout << LOG_PREFIX "Start capsule " << capsuleName << endl; -+ -+ if (_capsules[capsuleId].state == "created") { -+ slotId = this->restoreSnapshot(capsuleName); -+ -+ } else if (_capsules[capsuleId].state == "exited") { -+ slotId = this->inject(_capsules[capsuleId].image, true, capsuleId); -+ -+ } else { -+ cerr << "[EMISO:DAEMON] Capsule start failed. The capsule it is not in a correct state (" -+ << _capsules[capsuleId].state << ")" << endl; -+ return -1; -+ } -+ -+ _capsules[capsuleId].state = "running"; -+ _capsules[capsuleId].slotId = slotId; -+ -+ return ret; -+} -+ -+ -+/** -+ * @brief Shutdown a capsule -+ * -+ * @param capsuleId ID of the capsule to shutdown -+ * @return 0 in case of success or a negative value -+ */ -+int Capsule::stop(unsigned capsuleId) -+{ -+ int ret; -+ struct agency_ioctl_args args; -+ -+ ret = this->shutdown(_capsules[capsuleId].slotId); -+ -+ _capsules[capsuleId].state = "exited"; -+ -+ return ret; -+} -+ -+ -+/** -+ * @brief Restart a capsule -+ * -+ * @param capsuleId ID of the capsule to shutdown -+ * @return 0 in case of success or a negative value -+ */ -+int Capsule::restart(unsigned capsuleId) -+{ -+ int ret; -+ -+ auto imageName = _capsules[capsuleId].image; -+ auto capsuleName = _capsules[capsuleId].name; -+ -+ // Stop & remove the capsule -+ ret = this->shutdown(capsuleId); -+ if (ret < 0) -+ return ret; -+ -+ // re-create the capsule -+ ret = this->inject(imageName, true, capsuleId); -+ if (ret < 0) -+ return ret; -+ -+ _capsules[capsuleId].state = "running"; -+ -+ return 0; -+} -+ -+ -+/** -+ * @brief Pause a capsule -+ * -+ * @param capsuleId ID of the capsule to pause -+ * @return 0 in case of success or a negative value -+ */ -+int Capsule::pause(unsigned capsuleId) -+{ -+ int ret; -+ -+ cout << LOG_PREFIX "Pause capsule with ID " << capsuleId << endl; -+ -+ this->saveSnapshot(_capsules[capsuleId].slotId, _capsules[capsuleId].name); -+ -+ this->shutdown(_capsules[capsuleId].slotId); -+ -+ _capsules[capsuleId].state = "paused"; -+ -+ return ret; -+} -+ -+ -+/** -+ * @brief Unpause a capsule -+ * -+ * @param capsuleId ID of the capsule to pause -+ * @return 0 in case of success or a negative value -+ */ -+int Capsule::unpause(unsigned capsuleId) -+{ -+ int ret; -+ -+ ret = this->restoreSnapshot(_capsules[capsuleId].name); -+ _capsules[capsuleId].state = "running"; -+ -+ return ret; -+} -+ -+/** -+ * @brief Remove a capsule -+ * -+ * @param capsuleId ID of the capsule to pause -+ * @return 0 in case of success or a negative value -+ */ -+int Capsule::remove(unsigned capsuleId) -+{ -+ int ret = 0; -+ -+ if (_capsules[capsuleId].state == "running") -+ ret = this->shutdown(_capsules[capsuleId].slotId); -+ -+ if (ret == 0) -+ _capsules.erase(capsuleId); -+ -+ return ret; -+} -+ -+vector Capsule::retrieveLogs(unsigned capsuleId, unsigned lineNr) -+{ -+ vector lines; -+ -+ // Create the file path -+ string fileName = "/var/log/soo/me_" + to_string(capsuleId) + ".log"; -+ -+ cout << "[DEBUG] Logfile name: " << fileName << endl; -+ -+ // Read the file -+ ifstream file(fileName); -+ -+ if (!file.is_open()) { -+ cerr << "Error opening file: " << fileName << endl; -+ return lines; // return empty vector if file couldn't be opened -+ } -+ -+ // Read the whole file -+ if (lineNr == -1) { -+ // Count the number of lines -+ lineNr = count(istreambuf_iterator(file), -+ istreambuf_iterator(), '\n'); -+ -+ -+ // Reset the file stream back to beginning -+ file.clear(); -+ file.seekg(0, ios::beg); -+ } -+ -+ string line; -+ while (getline(file, line) && lineNr-- > 0) { -+ lines.push_back(line); -+ } -+ -+ file.close(); -+ return lines; -+} -+ -+} // namespace emiso diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0021-capsule.hpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0021-capsule.hpp.patch deleted file mode 100644 index e718b0e..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0021-capsule.hpp.patch +++ /dev/null @@ -1,75 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/daemon/capsule.hpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/daemon/capsule.hpp 2025-10-10 17:28:33.593796339 +0200 -@@ -0,0 +1,72 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef EMISO_DAEMON_CAPSULE_H -+#define EMISO_DAEMON_CAPSULE_H -+ -+#include -+#include -+#include -+ -+using namespace std; -+ -+namespace emiso { -+ -+ struct CapsuleInfo { -+ int id; -+ string name; -+ string state; -+ string image; -+ uint64_t created; -+ int slotId; -+ }; -+ -+ class Capsule { -+ -+ public: -+ Capsule(); -+ ~Capsule(); -+ -+ void info(map &capsuleList); -+ void info(int id, CapsuleInfo &info); -+ -+ int create(string imageName, string capsuleName); -+ int start(unsigned capsuleId); -+ int stop(unsigned capsuleId); -+ int restart(unsigned capsuleId); -+ int pause(unsigned capsuleId); -+ int unpause(unsigned capsuleId); -+ int remove(unsigned capsuleId); -+ -+ vector retrieveLogs(unsigned capsuleId, unsigned lineNr); -+ -+ private: -+ uint64_t createdTime(); -+ int inject(string imageName, bool start_capsule, unsigned capsuleId); -+ int saveSnapshot(int slotId, string snapshotName); -+ int restoreSnapshot(string snapshotName); -+ int shutdown(int slotId); -+ -+ // List of the Capsules - running or paused -+ static map _capsules; -+ // Capsule Idx, used with the map -+ static unsigned _capsuleIdx; -+ }; -+} -+ -+#endif // EMISO_DAEMON_CAPSULE_H diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0022-daemon.cpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0022-daemon.cpp.patch deleted file mode 100644 index 6350dc1..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0022-daemon.cpp.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/daemon/daemon.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/daemon/daemon.cpp 2025-10-10 17:28:33.593796339 +0200 -@@ -0,0 +1,40 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include "daemon.hpp" -+ -+namespace emiso { -+ -+Daemon* Daemon::_daemon = nullptr; -+ -+Daemon::Daemon() {}; -+ -+Daemon::~Daemon() {}; -+ -+ -+Daemon* Daemon::getInstance() -+{ -+ -+ if (_daemon == nullptr) { -+ _daemon = new Daemon(); -+ } -+ -+ return _daemon; -+} -+ -+} // namespace emiso diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0023-daemon.hpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0023-daemon.hpp.patch deleted file mode 100644 index d25a54d..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0023-daemon.hpp.patch +++ /dev/null @@ -1,49 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/daemon/daemon.hpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/daemon/daemon.hpp 2025-10-10 17:28:33.593796339 +0200 -@@ -0,0 +1,46 @@ -+/* -+ * Copyright (C) 2024 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+ -+#ifndef EMISO_DAEMON_H -+#define EMISO_DAEMON_H -+ -+#include "image.hpp" -+#include "capsule.hpp" -+ -+ -+namespace emiso { -+ -+ class Daemon { -+ -+ public: -+ Image image; -+ Capsule container; -+ -+ static Daemon* getInstance(); -+ -+ private: -+ Daemon(); -+ ~Daemon(); -+ -+ static Daemon* _daemon; -+ }; -+} -+ -+#endif // EMISO_DAEMON_H -+ diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0024-image.cpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0024-image.cpp.patch deleted file mode 100644 index 1b77c3e..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0024-image.cpp.patch +++ /dev/null @@ -1,176 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/daemon/image.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/daemon/image.cpp 2025-10-10 17:28:33.593796339 +0200 -@@ -0,0 +1,173 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include -+#include -+ -+#include -+#include -+ -+ -+#include "image.hpp" -+ -+// Path where the Capsule images are stored -+#define EMISO_IMAGE_PATH "/mnt/capsules/image/" -+#define EMISO_IMAGE_ID_MODE "md5" -+ -+namespace emiso { -+ -+Image::Image() {}; -+ -+Image::~Image() {}; -+ -+namespace fs = std::filesystem; -+ -+std::string Image::calculateId(const std::string& filePath) -+{ -+ std::ifstream file(filePath, std::ios::binary); -+ if (!file) { -+ std::cerr << "Failed to open file '" << filePath << "'" << std::endl; -+ return ""; -+ } -+ -+ // Create an MD5 hash function -+ std::hash md5Hash; -+ -+ // Read the file content and calculate the MD5 checksum -+ std::stringstream buffer; -+ buffer << file.rdbuf(); -+ std::string fileContent = buffer.str(); -+ std::string id = std::to_string(md5Hash(fileContent)); -+ -+ return id; -+} -+ -+ -+int Image::createdTime(const std::string& filePath) -+{ -+ try { -+ // Check if the file exists and retrieve its status -+ if (fs::exists(filePath)) { -+ fs::file_time_type fileTime = fs::last_write_time(filePath); -+ -+ // Convert file_time_type → system_clock::time_point -+ auto sctp = std::chrono::clock_cast(fileTime); -+ -+ // Get Unix timestamp -+ std::time_t unix_ts = std::chrono::system_clock::to_time_t(sctp); -+ -+ return unix_ts; -+ } else { -+ std::cout << "[WARNING] File '" << filePath << "' does not exist." << std::endl; -+ return -1; -+ } -+ -+ } catch (const std::filesystem::filesystem_error& e) { -+ std::cerr << "[ERROR]: " << e.what() << std::endl; -+ return -1; -+ } -+} -+ -+ -+void Image::info(std::map &imagesList) -+{ -+ // Check if the folder exists -+ if (std::filesystem::exists(EMISO_IMAGE_PATH) && std::filesystem::is_directory(EMISO_IMAGE_PATH)) { -+ // Iterate through the files in the folder -+ for (const auto& entry : std::filesystem::directory_iterator(EMISO_IMAGE_PATH)) { -+ if (std::filesystem::is_regular_file(entry)) { -+ ImageInfo info; -+ -+ info.name = entry.path().filename(); -+ info.size = std::filesystem::file_size(entry); -+ info.date = this->createdTime(EMISO_IMAGE_PATH + info.name); -+ -+ auto id = this->calculateId(EMISO_IMAGE_PATH + info.name); -+ std::string mode = EMISO_IMAGE_ID_MODE; -+ info.id = mode + ":" + id; -+ -+ imagesList[info.name] = info; -+ } -+ } -+ } else { -+ std::cerr << "Folder '" << EMISO_IMAGE_PATH << "' does not exist or is not a directory." << std::endl; -+ } -+} -+ -+int Image::info(std::string name, ImageInfo &info) -+{ -+ bool isID = false; -+ std::string id_orig; -+ -+ // The 'name' parameter can be the image name of the image ID -+ -+ std::cout << "info a image '" << name << "' called" << std::endl; -+ -+ // 1. extracting the "code" from the 'name' -+ auto pos = name.find(':'); -+ if (pos != std::string::npos) { -+ id_orig = name.substr(pos + 1); -+ -+ } else { -+ id_orig = this->calculateId(EMISO_IMAGE_PATH + name + ".itb"); -+ } -+ -+ // == Searching for the image which has this ID == -+ -+ // Iterate through the files in the folder -+ for (const auto& entry : std::filesystem::directory_iterator(EMISO_IMAGE_PATH)) { -+ if (std::filesystem::is_regular_file(entry)) { -+ info.name = entry.path().filename(); -+ auto id = this->calculateId(EMISO_IMAGE_PATH + info.name); -+ -+ if (id == id_orig) { -+ info.size = std::filesystem::file_size(entry); -+ info.date = this->createdTime(EMISO_IMAGE_PATH + info.name); -+ std::string mode = EMISO_IMAGE_ID_MODE; -+ info.id = mode + ":" + id; -+ -+ return 0; -+ } -+ } -+ } -+ -+ // No image found with the same ID as the one in 'image' parameter -+ std::cerr << "[ERROR]: Image '" << name << "' not found" << std::endl; -+ return -1; -+} -+ -+void Image::remove(std::string name) -+{ -+ std::filesystem::path filePath = EMISO_IMAGE_PATH + name; -+ -+ if (std::filesystem::exists(filePath)) { -+ try { -+ // Remove the file -+ std::filesystem::remove(filePath); -+ -+ std::cout << "File removed successfully." << std::endl; -+ } catch (const std::filesystem::filesystem_error& e) { -+ std::cerr << "Error removing file: " << e.what() << std::endl; -+ -+ } -+ } else { -+ std::cout << "[WARNING] File '" << filePath << "' does not exists" << std::endl; -+ } -+} -+ -+} // emiso diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0025-image.hpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0025-image.hpp.patch deleted file mode 100644 index 3442ee3..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0025-image.hpp.patch +++ /dev/null @@ -1,66 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/daemon/image.hpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/daemon/image.hpp 2025-10-10 17:28:33.593796339 +0200 -@@ -0,0 +1,63 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef EMISO_DAEMON_IMAGE_H -+#define EMISO_DAEMON_IMAGE_H -+ -+#include -+#include -+#include -+#include -+ -+namespace emiso { -+// namespace daemon { -+ -+ struct ImageInfo { -+ std::string id; -+ std::string name; -+ size_t size; -+ uint64_t date; -+ }; -+ -+ class Image { -+ -+ public: -+ Image(); -+ ~Image(); -+ -+ // Retrieve information about all the images -+ void info(std::map &imagesList); -+ -+ // Retrieve info about image 'name' -+ // return 0 in case of success, -1 otherwise -+ int info(std::string name, ImageInfo &info); -+ -+ // Remove image 'name' from the disk -+ void remove(std::string name); -+ private: -+ // The ID corresponds to the MD5 checksum -+ std::string calculateId(const std::string& filePath); -+ -+ // Get the date at which the image was created (Unix timestamp) -+ int createdTime(const std::string& filePath); -+ -+ }; -+// } -+} -+ -+#endif // EMISO_DAEMON_IMAGE_H diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0026-emiso_engine.cpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0026-emiso_engine.cpp.patch deleted file mode 100644 index abae6e7..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0026-emiso_engine.cpp.patch +++ /dev/null @@ -1,71 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/emiso_engine.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/emiso_engine.cpp 2025-10-10 17:28:33.593796339 +0200 -@@ -0,0 +1,68 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+// EMISO Engine - Start the engine on port '2375'. It can be started in secure -+// mode (HTTPS/TLS) with '-s' option -+// The interactive mode ('-i' option) starts a cli interface instead of the web -+// server -+ -+#include -+#include -+ -+#include "webserver/webserver.hpp" -+// #include "cli/cli.hpp" -+#include "daemon/daemon.hpp" -+ -+#define SERVER_PORT 2375 -+ -+int main(int argc, char **argv) -+{ -+ int c; -+ bool secure = false; -+ bool interactive = false; -+ -+ // TODO - Use C++ parameter handler lib ! -+ while ((c = getopt(argc, argv, "is")) != EOF) { -+ switch (c) { -+ case 'i': -+ interactive = true; -+ break; -+ case 's': -+ secure = true; -+ break; -+ default: -+ // usage(); -+ exit(1); -+ break; -+ } -+ } -+ -+ emiso::Daemon *daemon = emiso::Daemon::getInstance(); -+ -+// if (interactive) { -+// emiso::Cli cli; -+// cli.start(); -+// -+// } else { -+ // TODO - in interactive mode, also start the webserver ! -+ emiso::WebServer server(SERVER_PORT, secure, daemon); -+ server.start(true); -+// } -+ -+ return 0; -+} diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0027-config.hpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0027-config.hpp.patch deleted file mode 100644 index 02bdd95..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0027-config.hpp.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/include/emiso/config.hpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/include/emiso/config.hpp 2025-10-10 17:28:33.593945536 +0200 -@@ -0,0 +1,34 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+/* Basic - Constant configuration for EMISO engine */ -+ -+#ifndef EMISO_CONFIG_H -+#define EMISO_CONFIG_H -+ -+#define EMISO_VERSION "1.0" -+#define EMISO_PLATFORM_NAME "emiso" -+ -+// Webserver configuration -+#define EMISO_WEB_COMP_NAME "engine" -+#define EMISO_WEB_API_VERSION "1.43" -+#define EMISO_WEB_EXPERIMENTAL false -+#define EMISO_WEB_SWARM "inactive" -+ -+#endif // EMISO_CONFIG_H -+ diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0028-utils.hpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0028-utils.hpp.patch deleted file mode 100644 index b3a28ad..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0028-utils.hpp.patch +++ /dev/null @@ -1,74 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/include/emiso/utils.hpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/include/emiso/utils.hpp 2025-10-10 17:28:33.593969054 +0200 -@@ -0,0 +1,71 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+/* Provide basic functions for the EMISO engine */ -+ -+#ifndef EMISO_UTILS_H -+#define EMISO_UTILS_H -+ -+#include -+ -+namespace emiso { -+ -+ struct SystemInfo { -+ std::string kernel_version; -+ std::string os; -+ std::string os_version; -+ std::string os_type; -+ std::string arch; -+ }; -+ -+ class Utils { -+ -+ public: -+ static Utils& getInstance() { -+ // Create the instance if it doesn't exist -+ static Utils instance; -+ return instance; -+ } -+ -+ /* Return info in the platform */ -+ SystemInfo getInfo(); -+ -+ // Return the current system time, in RFC 3339 format with nano-seconds -+ std::string getSystemTime(); -+ -+ // Return the Agency UUID of the Smart Object -+ std::string getAgencyUID(); -+ -+ private: -+ SystemInfo _info; -+ -+ Utils(); -+ ~Utils(); -+ -+ // Make copy constructor and assignment operator private to prevent copying -+ Utils(const Utils&) = delete; -+ Utils& operator=(const Utils&) = delete; -+ }; -+ -+} // emiso -+ -+#endif // EMISO_UTILS_H -+ -+ -+ -+ diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0029-utils.cpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0029-utils.cpp.patch deleted file mode 100644 index c628c03..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0029-utils.cpp.patch +++ /dev/null @@ -1,117 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/utils.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/utils.cpp 2025-10-10 17:28:33.593969054 +0200 -@@ -0,0 +1,114 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+ -+#define EMISO_OS_RELEASE_PATH "/etc/os-release" -+#define EMISO_AGENCY_UID_PATH "/sys/soo/agencyUID" -+ -+namespace emiso { -+ -+Utils::Utils () -+{ -+ // Retrieve platform info -+ struct utsname unameData; -+ if (uname(&unameData) != -1) { -+ _info.kernel_version = unameData.release; -+ _info.os_type = unameData.sysname; -+ _info.arch = unameData.machine; -+ } -+ -+ // Retrieve OS information -+ std::ifstream osReleaseFile(EMISO_OS_RELEASE_PATH); -+ if (osReleaseFile.is_open()) { -+ std::string line; -+ while (std::getline(osReleaseFile, line)) { -+ if (line.find("PRETTY_NAME=") != std::string::npos) { -+ _info.os = line.substr(13); -+ } -+ if (line.find("VERSION=") != std::string::npos) { -+ _info.os_version = line.substr(8); -+ } -+ } -+ osReleaseFile.close(); -+ } else { -+ std::cerr << "Failed to open /etc/os-release" << std::endl; -+ } -+} -+ -+Utils::~Utils() {} -+ -+SystemInfo Utils::getInfo() -+{ -+ return _info; -+} -+ -+ -+std::string Utils::getSystemTime() -+{ -+ // Get the current time with nanoseconds -+ auto currentTime = std::chrono::system_clock::now(); -+ -+ // Convert to RFC 3339 format with nanoseconds -+ auto timeT = std::chrono::system_clock::to_time_t(currentTime); -+ auto fractionalSeconds = std::chrono::duration_cast(currentTime.time_since_epoch()).count() % 1000000000; -+ struct tm timeinfo; -+ gmtime_r(&timeT, &timeinfo); -+ -+ // Format the date and time -+ char buffer[64]; // Sufficient size for RFC 3339 format -+ strftime(buffer, sizeof(buffer), "%Y-%m-%dT%H:%M:%S", &timeinfo); -+ -+ // Create an output string stream to capture the formatted time -+ std::ostringstream formattedTime; -+ formattedTime << buffer << "." << std::setw(9) << std::setfill('0') << fractionalSeconds << "Z"; -+ -+ // Get the formatted time as a string -+ return formattedTime.str(); -+} -+ -+ -+std::string Utils::getAgencyUID() -+{ -+ std::ifstream sysfsFile(EMISO_AGENCY_UID_PATH); -+ if (!sysfsFile.is_open()) { -+ std::cerr << "Failed to open sysfs file: " << EMISO_AGENCY_UID_PATH << std::endl; -+ // TODO - handle error -+ } -+ -+ std::string fileContent; -+ std::getline(sysfsFile, fileContent); // Read the content of the file -+ -+ sysfsFile.close(); // Close the file -+ -+ if (sysfsFile.fail()) { -+ std::cerr << "Error occurred while reading the sysfs file." << std::endl; -+ // TODO - handle error -+ } -+ -+ return fileContent; -+} -+ -+ -+} // emiso diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0030-container.cpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0030-container.cpp.patch deleted file mode 100644 index ba699dc..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0030-container.cpp.patch +++ /dev/null @@ -1,78 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/webserver/container/container.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/webserver/container/container.cpp 2025-10-10 17:28:33.594021097 +0200 -@@ -0,0 +1,75 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include "container.hpp" -+ -+namespace emiso { -+ -+ namespace container { -+ -+ ContainerApi::ContainerApi(httpserver::webserver *server, Daemon *daemon) -+ : _server(server) { -+ string path = "/containers"; -+ -+ // Create routes and handlers -+ _listHandler = new ListHandler(daemon); -+ _createHandler = new CreateHandler(daemon); -+ _startHandler = new StartHandler(daemon); -+ _stopHandler = new StopHandler(daemon); -+ _restartHandler = new RestartHandler(daemon); -+ _pauseHandler = new PauseHandler(daemon); -+ _unpauseHandler = new UnpauseHandler(daemon); -+ _removeHandler = new RemoveHandler(daemon); -+ _inspectHandler = new InspectHandler(daemon); -+ _logsHandler = new LogsHandler(daemon); -+ -+ _server->register_resource(path + "/json", _listHandler); -+ _server->register_resource("/v[1-9]+.[0-9]+" + path + "/json", _listHandler); -+ -+ _server->register_resource(path + "/create", _createHandler); -+ _server->register_resource("/v[1-9]+.[0-9]+" + path + "/create", _createHandler); -+ -+ _server->register_resource(path + "/{[a-zA-Z0-9_-]+}/start", _startHandler); -+ _server->register_resource("/v[1-9]+.[0-9]+" +path + "/{[a-zA-Z0-9_-]+}/start", _startHandler); -+ -+ _server->register_resource(path + "/{id|[0-9]+}/stop", _stopHandler); -+ _server->register_resource("/v[1-9]+.[0-9]+" + path + "/{id|[0-9]+}/stop", _stopHandler); -+ -+ _server->register_resource(path + "/{id|[0-9]+}/restart", _restartHandler); -+ _server->register_resource("/v[1-9]+.[0-9]+" + path + "/{id|[0-9]+}/restart", _restartHandler); -+ -+ _server->register_resource(path + "/{id|[0-9]+}/pause", _pauseHandler); -+ _server->register_resource("/v[1-9]+.[0-9]+" + path + "/{id|[0-9]+}/pause", _pauseHandler); -+ -+ _server->register_resource(path + "/{id|[0-9]+}/unpause", _unpauseHandler); -+ _server->register_resource("/v[1-9]+.[0-9]+" + path + "/{id|[0-9]+}/unpause", _unpauseHandler); -+ -+ _server->register_resource(path + "/{id|[0-9]+}", _removeHandler); -+ _server->register_resource("/v[1-9]+.[0-9]+" + path + "/{id|[0-9]+}", _removeHandler); -+ -+ _server->register_resource(path + "/{id|[0-9]+}/json", _inspectHandler); -+ _server->register_resource("/v[1-9]+.[0-9]+" + path + "/{id|[0-9]+}/json", _inspectHandler); -+ -+ _server->register_resource(path + "/{id|[0-9]+}/logs", _logsHandler); -+ _server->register_resource("/v[1-9]+.[0-9]+" + path + "/{id|[0-9]+}/logs", _logsHandler); -+ } -+ -+ ContainerApi::~ContainerApi() {} -+ -+ } -+} diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0031-container.hpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0031-container.hpp.patch deleted file mode 100644 index bd4fc6a..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0031-container.hpp.patch +++ /dev/null @@ -1,428 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/webserver/container/container.hpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/webserver/container/container.hpp 2025-10-10 17:28:33.594049579 +0200 -@@ -0,0 +1,425 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef EMISO_CONTAINER_H -+#define EMISO_CONTAINER_H -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "../../daemon/daemon.hpp" -+ -+#include "container_inspect.hpp" -+#include "container_logs.hpp" -+ -+#define LOG_PREFIX "[EMISO:WEBSERVER] " -+ -+using namespace std; -+ -+namespace emiso { -+namespace container { -+ -+ class ListHandler : public httpserver::http_resource { -+ public: -+ ListHandler(Daemon *daemon) : _daemon(daemon) {}; -+ -+ shared_ptr render_GET(const httpserver::http_request &req) { -+ string payload_str = ""; -+ Json::Value payload_json; -+ -+ cout << LOG_PREFIX "'" << req.get_path() << "' (" << req.get_method() << ") called" << endl; -+ -+ // Retrieve the command args - -+ // only "all" and "filters/name" args are handled -+ bool allArg = false; -+ bool sizeArg = false; -+ string filtersArg = ""; -+ -+ for (const auto &arg : req.get_args()) { -+ if (string(arg.first) == "all") { -+ allArg = (string(arg.second) == "true"); -+ } -+ if (arg.first == "filters") { -+ filtersArg = arg.second; -+ } -+ } -+ -+ vector namesFilter; -+ -+ if (!filtersArg.empty()) { -+ Json::CharReaderBuilder readerBuilder; -+ Json::Value filtersJsonValue; -+ istringstream filtersJsonStream(filtersArg); -+ -+ if (!Json::parseFromStream(readerBuilder, filtersJsonStream, &filtersJsonValue, nullptr)) { -+ // Parsing failed, handle the error as needed -+ cerr << LOG_PREFIX "Error parsing JSON!" << endl; -+ } -+ -+ if (filtersJsonValue.isMember("name")) { -+ for (int i = 0; i < filtersJsonValue["name"].size(); ++i) { -+ namesFilter.push_back(filtersJsonValue["name"][i].asString()); -+ } -+ } -+ } -+ -+ // Retrieve container info -+ map info; -+ -+ _daemon->container.info(info); -+ -+ if (info.empty()) { -+ payload_json = Json::arrayValue; -+ } else { -+ unsigned idx = 0; -+ for (auto it = info.begin(); it != info.end(); ++it) { -+ -+ // == Checks the args passed to the command == -+ -+ // 'all' - if true, return all containers. else only running -+ // containers are returned. -+ if ((!allArg) && (it->second.state != "running")) { -+ // Only return running containers -+ continue; -+ } -+ -+ // 'filters' (only name filter is supported) -+ bool nameFound = false; -+ if (!namesFilter.empty()) { -+ for (const auto &pattern : namesFilter) { -+ regex regexPattern(pattern); -+ if (regex_match("/" + it->second.name, regexPattern)) { -+ nameFound = true; -+ break; -+ } -+ } -+ } else { -+ nameFound = true; -+ } -+ -+ if (!nameFound) { -+ continue; -+ } -+ -+ // Retrieve info about the image used to create the container -+ ImageInfo imageInfo; -+ _daemon->image.info(it->second.image, imageInfo); -+ -+ // == Return info of the container == -+ -+ payload_json[idx]["Id"] = to_string(it->second.id); -+ payload_json[idx]["Names"][0] = "/" + it->second.name; -+ -+ payload_json[idx]["Image"] = it->second.image + ":latest"; -+ payload_json[idx]["ImageID"] = imageInfo.id; -+ payload_json[idx]["Command"] = "/inject"; -+ -+ payload_json[idx]["Created"] = it->second.created; -+ payload_json[idx]["Ports"] = Json::arrayValue; -+ payload_json[idx]["Labels"] = Json::objectValue; -+ payload_json[idx]["State"] = it->second.state; -+ payload_json[idx]["Status"] = it->second.state; -+ -+ // Network setting as the values obtained on the test PC -+ payload_json[idx]["HostConfig"]["NetworkMode"] = "bridge"; -+ payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["IPAMConfig"] = Json::objectValue; -+ payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["Links"] = Json::Value::null; -+ payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["Aliases"] = Json::Value::null; -+ -+ payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["NetworkID"] = "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812", -+ -+ payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["EndpointID"] = ""; -+ payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["Gateway"] = ""; -+ payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["IPAddress"] = ""; -+ payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["IPPrefixLen"] = 0; -+ payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["IPv6Gateway"] = ""; -+ payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["GlobalIPv6Address"] = ""; -+ payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["GlobalIPv6PrefixLen"] = 0; -+ payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["MacAddress"] = ""; -+ payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["DriverOpts"] = Json::Value::null; -+ payload_json[idx]["Mounts"] = Json::arrayValue; -+ -+ idx++; -+ } -+ } -+ -+ Json::StreamWriterBuilder builder; -+ -+ payload_str = Json::writeString(builder, payload_json); -+ auto response = make_shared(payload_str, -+ httpserver::http::http_utils::http_ok, "application/json"); -+ return response; -+ } -+ -+ private: -+ Daemon *_daemon; -+ }; -+ -+ -+ class CreateHandler : public httpserver::http_resource { -+ public: -+ CreateHandler(Daemon *daemon) : _daemon(daemon) {}; -+ -+ shared_ptr render_POST(const httpserver::http_request &req) { -+ string payload_str = ""; -+ Json::Value payload_json; -+ int containerId; -+ string containerName; -+ -+ cout << LOG_PREFIX "'" << req.get_path() << "' (" << req.get_method() << ") called" << endl; -+ -+ // Extract info from body -+ const string requestBody = string(req.get_content()); -+ -+ // Retrieve the 'name' from request args -+ for (const auto &arg : req.get_args()) { -+ if (string(arg.first) == "name") { -+ containerName = string(arg.second); -+ } -+ } -+ -+ Json::Value jsonData; -+ Json::Reader jsonReader; -+ -+ if (!jsonReader.parse(requestBody, jsonData)) { -+ cout << "Failed to parse requestBody" << endl; -+ // JSON parsing error -+ // Return error message -+ } -+ -+ string imageName = jsonData["Image"].asString(); -+ -+ // Remove the image version of the name -+ size_t colonPosition = imageName.find(':'); -+ imageName = imageName.substr(0, colonPosition); -+ -+ cout << LOG_PREFIX "Create container '" << containerName << "' based on '" << imageName << "' name" << endl; -+ -+ unsigned id = _daemon->container.create(imageName, containerName); -+ cout << " Container ID: " << id << endl; -+ -+ // build the response -+ payload_json["Id"] = std::to_string(id); -+ payload_json["Warnings"] = Json::arrayValue; -+ -+ Json::StreamWriterBuilder builder; -+ payload_str = Json::writeString(builder, payload_json); -+ -+ auto response = make_shared(payload_str, -+ httpserver::http::http_utils::http_created, "application/json"); -+ return response; -+ } -+ -+ private: -+ Daemon *_daemon; -+ }; -+ -+ class StartHandler : public httpserver::http_resource { -+ public: -+ StartHandler(Daemon *daemon) : _daemon(daemon) {}; -+ -+ shared_ptr render_POST(const httpserver::http_request &req) { -+ string payload_str = ""; -+ Json::Value payload_json; -+ -+ cout << LOG_PREFIX << "'" << req.get_path() << "' (" << req.get_method() << ") called" << endl; -+ -+ // Extract info from body -+ const string requestBody = string(req.get_content()); -+ -+ string path = string(req.get_path()); -+ smatch match; -+ regex rgx("(/v[0-9]+.[0-9]+)?/containers/([^/]+)/start"); -+ -+ unsigned containerId; -+ if (regex_match(path, match, rgx)) { -+ // containerName = match[2]; -+ containerId = std::stoi(match[2].str()); -+ } -+ -+ cout << LOG_PREFIX "Start container based on '" << containerId << "' ID" << endl; -+ -+ // == Retrieve container ID from the request path == -+ //int containerId = __cxx11::stoi(req.get_arg("id")); -+ -+ _daemon->container.start(containerId); -+ -+ auto response = make_shared(payload_str, -+ httpserver::http::http_utils::http_no_content, "application/json"); -+ return response; -+ } -+ -+ private: -+ Daemon *_daemon; -+ }; -+ -+ class StopHandler : public httpserver::http_resource { -+ public: -+ StopHandler(Daemon *daemon) : _daemon(daemon) {}; -+ -+ shared_ptr render_POST(const httpserver::http_request &req) { -+ string payload_str = ""; -+ Json::Value payload_json; -+ -+ cout << "[WEBERVER] '" << req.get_path() << "' (" << req.get_method() << ") called" << endl; -+ -+ // == Retrieve container ID from the request path == -+ int containerId = __cxx11::stoi(req.get_arg("id")); -+ -+ _daemon->container.stop(containerId); -+ -+ auto response = make_shared(payload_str, -+ httpserver::http::http_utils::http_no_content, "application/json"); -+ return response; -+ } -+ -+ private: -+ Daemon *_daemon; -+ }; -+ -+ -+ class RestartHandler : public httpserver::http_resource { -+ public: -+ RestartHandler(Daemon *daemon) : _daemon(daemon) {}; -+ -+ shared_ptr render_POST(const httpserver::http_request &req) { -+ string payload_str = ""; -+ Json::Value payload_json; -+ -+ cout << "[WEBERVER] '" << req.get_path() << "' (" << req.get_method() << ") called" << endl; -+ -+ // == Retrieve container ID from the request path == -+ int containerId = stoi(req.get_arg("id")); -+ -+ _daemon->container.restart(containerId); -+ -+ auto response = make_shared(payload_str, -+ httpserver::http::http_utils::http_no_content, "application/json"); -+ return response; -+ } -+ -+ private: -+ Daemon *_daemon; -+ }; -+ -+ class PauseHandler : public httpserver::http_resource { -+ public: -+ PauseHandler(Daemon *daemon) : _daemon(daemon) {}; -+ -+ shared_ptr render_POST(const httpserver::http_request &req) { -+ string payload_str = ""; -+ Json::Value payload_json; -+ -+ cout << "[WEBERVER] '" << req.get_path() << "' (" << req.get_method() << ") called" << endl; -+ -+ // == Retrieve container ID from the request path == -+ int containerId = __cxx11::stoi(req.get_arg("id")); -+ -+ _daemon->container.pause(containerId); -+ -+ auto response = make_shared(payload_str, -+ httpserver::http::http_utils::http_no_content, "application/json"); -+ return response; -+ } -+ -+ private: -+ Daemon *_daemon; -+ -+ }; -+ -+ class UnpauseHandler : public httpserver::http_resource { -+ public: -+ UnpauseHandler(Daemon *daemon) : _daemon(daemon) {}; -+ -+ shared_ptr render_POST(const httpserver::http_request &req) { -+ string payload_str = ""; -+ Json::Value payload_json; -+ -+ cout << "[WEBERVER] '" << req.get_path() << "' (" << req.get_method() << ") called" << endl; -+ -+ // == Retrieve container ID from the request path == -+ int containerId = __cxx11::stoi(req.get_arg("id")); -+ -+ _daemon->container.unpause(containerId); -+ -+ auto response = make_shared(payload_str, -+ httpserver::http::http_utils::http_no_content, "application/json"); -+ return response; -+ } -+ -+ private: -+ Daemon *_daemon; -+ }; -+ -+ -+ class RemoveHandler : public httpserver::http_resource { -+ public: -+ RemoveHandler(Daemon *daemon) : _daemon(daemon) {}; -+ -+ shared_ptr render_DELETE(const httpserver::http_request &req) { -+ string payload_str = ""; -+ Json::Value payload_json; -+ -+ cout << "[WEBERVER] '" << req.get_path() << "' (" << req.get_method() << ") called" << endl; -+ -+ // == Retrieve container ID from the request path == -+ int containerId = __cxx11::stoi(req.get_arg("id")); -+ -+ _daemon->container.remove(containerId); -+ -+ auto response = make_shared(payload_str, -+ httpserver::http::http_utils::http_no_content, "application/json"); -+ return response; -+ } -+ -+ private: -+ Daemon *_daemon; -+ }; -+ -+ class ContainerApi { -+ public: -+ // Constructor -+ ContainerApi(httpserver::webserver *server, Daemon *daemon); -+ -+ // Destructor -+ ~ContainerApi(); -+ -+ private: -+ httpserver::webserver *_server; -+ -+ // Handler for the different 'container' routes -+ ListHandler *_listHandler; -+ CreateHandler *_createHandler; -+ StartHandler *_startHandler; -+ StopHandler *_stopHandler; -+ PauseHandler *_pauseHandler; -+ UnpauseHandler *_unpauseHandler; -+ RestartHandler *_restartHandler; -+ RemoveHandler *_removeHandler; -+ InspectHandler *_inspectHandler; -+ LogsHandler *_logsHandler; -+ }; -+ -+} // container -+} // emiso -+ -+#endif /* EMISO_CONTAINER_H */ diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0032-container_inspect.hpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0032-container_inspect.hpp.patch deleted file mode 100644 index a008bf8..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0032-container_inspect.hpp.patch +++ /dev/null @@ -1,252 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/webserver/container/container_inspect.hpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/webserver/container/container_inspect.hpp 2025-10-10 17:28:33.594049579 +0200 -@@ -0,0 +1,249 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef EMISO_CONTAINER_INSPECT_H -+#define EMISO_CONTAINER_INSPECT_H -+ -+#define LOG_PREFIX "[EMISO:WEBSERVER] " -+ -+namespace emiso { -+namespace container { -+ -+class InspectHandler : public httpserver::http_resource { -+ public: -+ InspectHandler(Daemon *daemon) : _daemon(daemon){}; -+ -+ std::shared_ptr render_GET(const httpserver::http_request &req) { -+ std::string payload_str = ""; -+ Json::Value payloadJson; -+ -+ cout << LOG_PREFIX "'" << req.get_path() << "' (" << req.get_method() << ") called" << endl; -+ -+ // == Retrieve container ID from the request path == -+ int containerId = stoi(req.get_arg("id")); -+ -+ CapsuleInfo info; -+ ImageInfo imageInfo; -+ -+ _daemon->container.info(containerId, info); -+ -+ _daemon->image.info(info.image, imageInfo); -+ -+ std::tm *ptm; -+ char createdDate[32]; -+ char startedDate[32]; -+ // char endDate[32]; -+ -+ ptm = std::localtime((const long int *) &info.created); -+ std::strftime(createdDate, 32, "%Y-%m-%dT%H:%M:%SZ", ptm); -+ -+ // TODO = add start time in container info -+ uint64_t tmp = info.created + 10; -+ ptm = std::localtime((const long int *) &tmp); -+ std::strftime(startedDate, 32, "%Y-%m-%dT%H:%M:%SZ", ptm); -+ -+ // ptm = std::localtime((const long int*)&info.created + 500); -+ // std::strftime(endDate, 32, "%Y-%M-%dT%H.%M.%S", ptm); -+ -+ // == Build the response message == -+ payloadJson["Id"] = std::to_string(containerId); -+ payloadJson["Created"] = createdDate; -+ payloadJson["Path"] = "/inject"; -+ payloadJson["Args"] = Json::arrayValue; -+ payloadJson["State"]["Status"] = info.state; -+ payloadJson["State"]["Running"] = (info.state == "running") ? true : false; -+ payloadJson["State"]["Paused"] = (info.state == "paused") ? true : false; -+ payloadJson["State"]["Restarting"] = (info.state == "restarting") ? true : false; -+ payloadJson["State"]["OOMKilled"] = false; -+ payloadJson["State"]["Dead"] = (info.state == "dead") ? true : false; -+ payloadJson["State"]["Pid"] = 0; -+ payloadJson["State"]["ExitCode"] = 0; -+ payloadJson["State"]["Error"] = ""; -+ payloadJson["State"]["StartedAt"] = createdDate; // to update -+ payloadJson["State"]["FinishedAt"] = ""; -+ payloadJson["State"]["Health"] = Json::nullValue; -+ payloadJson["Image"] = imageInfo.id; -+ payloadJson["ResolvConfPath"] = -+ "/var/lib/docker/containers/ed856fa2c435daac513a0eff537018034fd0ce2843d84eae4dbfd22203bd10de/resolv.conf"; -+ payloadJson["HostnamePath"] = -+ "/var/lib/docker/containers/ed856fa2c435daac513a0eff537018034fd0ce2843d84eae4dbfd22203bd10de/hostname"; -+ payloadJson["HostsPath"] = -+ "/var/lib/docker/containers/ed856fa2c435daac513a0eff537018034fd0ce2843d84eae4dbfd22203bd10de/hosts"; -+ payloadJson["LogPath"] = -+ "/var/lib/docker/containers/ed856fa2c435daac513a0eff537018034fd0ce2843d84eae4dbfd22203bd10de/" -+ "ed856fa2c435daac513a0eff537018034fd0ce2843d84eae4dbfd22203bd10de-json.log"; -+ payloadJson["Name"] = "/" + info.name; -+ payloadJson["RestartCount"] = 0; -+ payloadJson["Driver"] = "overlay2"; -+ payloadJson["Platform"] = "linux"; -+ payloadJson["MountLabel"] = ""; -+ payloadJson["ProcessLabel"] = ""; -+ payloadJson["AppArmorProfile"] = ""; -+ payloadJson["ExecIDs"] = Json::nullValue; -+ payloadJson["HostConfig"]["Binds"] = Json::nullValue; -+ payloadJson["HostConfig"]["ContainerIDFile"] = ""; -+ payloadJson["HostConfig"]["LogConfig"]["Type"] = "json-file"; -+ payloadJson["HostConfig"]["LogConfig"]["Config"] = Json::objectValue; -+ payloadJson["HostConfig"]["LogConfig"]["NetworkMode"] = "default"; -+ payloadJson["HostConfig"]["LogConfig"]["PortBindings"] = Json::objectValue; -+ payloadJson["HostConfig"]["RestartPolicy"]["Name"] = "no"; -+ payloadJson["HostConfig"]["RestartPolicy"]["MaximumRetryCount"] = 0; -+ payloadJson["HostConfig"]["AutoRemove"] = false; -+ payloadJson["HostConfig"]["VolumeDriver"] = ""; -+ payloadJson["HostConfig"]["VolumesFrom"] = Json::nullValue; -+ payloadJson["HostConfig"]["ConsoleSize"][0] = 24; -+ payloadJson["HostConfig"]["ConsoleSize"][0] = 80; -+ payloadJson["HostConfig"]["CapAdd"] = Json::nullValue; -+ payloadJson["HostConfig"]["CapDrop"] = Json::nullValue; -+ payloadJson["HostConfig"]["CgroupnsMode"] = "host"; -+ payloadJson["HostConfig"]["Dns"] = Json::arrayValue; -+ payloadJson["HostConfig"]["DnsOptions"] = Json::arrayValue; -+ payloadJson["HostConfig"]["DnsSearch"] = Json::arrayValue; -+ payloadJson["HostConfig"]["ExtraHosts"] = Json::nullValue; -+ payloadJson["HostConfig"]["GroupAdd"] = Json::nullValue; -+ payloadJson["HostConfig"]["IpcMode"] = "private"; -+ payloadJson["HostConfig"]["Cgroup"] = ""; -+ payloadJson["HostConfig"]["Links"] = Json::nullValue; -+ payloadJson["HostConfig"]["OomScoreAdj"] = 0; -+ payloadJson["HostConfig"]["PidMode"] = ""; -+ payloadJson["HostConfig"]["Privileged"] = false; -+ payloadJson["HostConfig"]["PublishAllPorts"] = false; -+ payloadJson["HostConfig"]["ReadonlyRootfs"] = false; -+ payloadJson["HostConfig"]["SecurityOpt"] = Json::nullValue; -+ payloadJson["HostConfig"]["UTSMode"] = ""; -+ payloadJson["HostConfig"]["UsernsMode"] = ""; -+ payloadJson["HostConfig"]["ShmSize"] = 67108864; -+ payloadJson["HostConfig"]["Runtime"] = "runc"; -+ payloadJson["HostConfig"]["Isolation"] = ""; -+ payloadJson["HostConfig"]["CpuShares"] = 0; -+ payloadJson["HostConfig"]["Memory"] = 0; -+ payloadJson["HostConfig"]["NanoCpus"] = 0; -+ payloadJson["HostConfig"]["CgroupParent"] = ""; -+ payloadJson["HostConfig"]["BlkioWeight"] = 0; -+ payloadJson["HostConfig"]["BlkioWeightDevice"] = Json::arrayValue; -+ payloadJson["HostConfig"]["BlkioDeviceReadBps"] = Json::arrayValue; -+ payloadJson["HostConfig"]["BlkioDeviceWriteBps"] = Json::arrayValue; -+ payloadJson["HostConfig"]["BlkioDeviceReadIOps"] = Json::arrayValue; -+ payloadJson["HostConfig"]["BlkioDeviceWriteIOps"] = Json::arrayValue; -+ payloadJson["HostConfig"]["CpuPeriod"] = 0; -+ payloadJson["HostConfig"]["CpuQuota"] = 0; -+ payloadJson["HostConfig"]["CpuRealtimePeriod"] = 0; -+ payloadJson["HostConfig"]["CpuRealtimeRuntime"] = 0; -+ payloadJson["HostConfig"]["CpusetCpus"] = ""; -+ payloadJson["HostConfig"]["CpusetMems"] = ""; -+ payloadJson["HostConfig"]["Devices"] = Json::arrayValue; -+ payloadJson["HostConfig"]["DeviceCgroupRules"] = Json::nullValue; -+ payloadJson["HostConfig"]["DeviceRequests"] = Json::nullValue; -+ payloadJson["HostConfig"]["MemoryReservation"] = 0; -+ payloadJson["HostConfig"]["MemorySwap"] = 0; -+ payloadJson["HostConfig"]["MemorySwappiness"] = Json::nullValue; -+ payloadJson["HostConfig"]["OomKillDisable"] = Json::nullValue; -+ payloadJson["HostConfig"]["PidsLimit"] = Json::nullValue; -+ payloadJson["HostConfig"]["Ulimits"] = Json::nullValue; -+ payloadJson["HostConfig"]["CpuCount"] = 0; -+ payloadJson["HostConfig"]["CpuPercent"] = 0; -+ payloadJson["HostConfig"]["IOMaximumIOps"] = 0; -+ payloadJson["HostConfig"]["IOMaximumBandwidth"] = 0; -+ payloadJson["HostConfig"]["MaskedPaths"][0] = "/proc/asound"; -+ payloadJson["HostConfig"]["MaskedPaths"][1] = "/proc/acpi"; -+ payloadJson["HostConfig"]["MaskedPaths"][2] = "/proc/kcore"; -+ payloadJson["HostConfig"]["MaskedPaths"][3] = "/proc/keys"; -+ payloadJson["HostConfig"]["MaskedPaths"][4] = "/proc/latency_stats"; -+ payloadJson["HostConfig"]["MaskedPaths"][5] = "/proc/timer_list"; -+ payloadJson["HostConfig"]["MaskedPaths"][6] = "/proc/timer_stats"; -+ payloadJson["HostConfig"]["MaskedPaths"][7] = "/proc/sched_debug"; -+ payloadJson["HostConfig"]["MaskedPaths"][8] = "/proc/scsi"; -+ payloadJson["HostConfig"]["MaskedPaths"][9] = "/sys/firmware"; -+ payloadJson["HostConfig"]["ReadonlyPaths"][0] = "/proc/bus"; -+ payloadJson["HostConfig"]["ReadonlyPaths"][1] = "/proc/fs"; -+ payloadJson["HostConfig"]["ReadonlyPaths"][2] = "/proc/irq"; -+ payloadJson["HostConfig"]["ReadonlyPaths"][3] = "/proc/sys"; -+ payloadJson["HostConfig"]["ReadonlyPaths"][4] = "/proc/sysrq-trigger"; -+ payloadJson["GraphDriver"]["Data"]["LowerDir"] = -+ "/var/lib/docker/overlay2/5132a5d000dc493f64e1076a4fbefcfd6d04705bb52590b639668d9d82c6652f-init/diff:/var/" -+ "lib/docker/overlay2/0ffcf17c5b7310dcbced19f13a63e8b7566325eaabf34ded9bc67b7c56057fa2/diff"; -+ payloadJson["GraphDriver"]["Data"]["MergedDir"] = "/etc/emiso/merged"; -+ payloadJson["GraphDriver"]["Data"]["UpperDir"] = "/etc/emiso/diff"; -+ payloadJson["GraphDriver"]["Data"]["WorkDir"] = "/etc/emiso/work"; -+ payloadJson["GraphDriver"]["Name"] = "overlay2"; -+ payloadJson["Mounts"] = Json::arrayValue; -+ payloadJson["Config"]["Hostname"] = "ed856fa2c435"; -+ payloadJson["Config"]["Domainname"] = ""; -+ payloadJson["Config"]["User"] = ""; -+ payloadJson["Config"]["AttachStdin"] = false; -+ payloadJson["Config"]["AttachStdout"] = true; -+ payloadJson["Config"]["AttachStderr"] = true; -+ payloadJson["Config"]["Tty"] = false; -+ payloadJson["Config"]["OpenStdin"] = false; -+ payloadJson["Config"]["StdinOnce"] = false; -+ payloadJson["Config"]["Env"][0] = "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"; -+ payloadJson["Config"]["Cmd"][0] = ""; -+ payloadJson["Config"]["Image"] = info.image; -+ payloadJson["Config"]["Volumes"] = Json::nullValue; -+ payloadJson["Config"]["WorkingDir"] = ""; -+ payloadJson["Config"]["Entrypoint"] = Json::nullValue; -+ payloadJson["Config"]["OnBuild"] = Json::nullValue; -+ payloadJson["Config"]["Labels"] = Json::objectValue; -+ payloadJson["NetworkSettings"]["Bridge"] = ""; -+ payloadJson["NetworkSettings"]["SandboxID"] = -+ "a7c9c2fe37e94ade66a9969d7070fe5d3e894753bb20fe14953692074af9ef00"; -+ payloadJson["NetworkSettings"]["HairpinMode"] = false; -+ payloadJson["NetworkSettings"]["LinkLocalIPv6Address"] = ""; -+ payloadJson["NetworkSettings"]["LinkLocalIPv6PrefixLen"] = 0; -+ payloadJson["NetworkSettings"]["Ports"] = Json::objectValue; -+ payloadJson["NetworkSettings"]["SandboxKey"] = "/var/run/docker/netns/a7c9c2fe37e9"; -+ payloadJson["NetworkSettings"]["SecondaryIPAddresses"] = Json::nullValue; -+ payloadJson["NetworkSettings"]["SecondaryIPv6Addresses"] = Json::nullValue; -+ payloadJson["NetworkSettings"]["EndpointID"] = ""; -+ payloadJson["NetworkSettings"]["Gateway"] = ""; -+ payloadJson["NetworkSettings"]["GlobalIPv6Address"] = ""; -+ payloadJson["NetworkSettings"]["GlobalIPv6PrefixLen"] = 0; -+ payloadJson["NetworkSettings"]["IPAddress"] = ""; -+ payloadJson["NetworkSettings"]["IPPrefixLen"] = 0; -+ payloadJson["NetworkSettings"]["IPv6Gateway"] = ""; -+ payloadJson["NetworkSettings"]["MacAddress"] = ""; -+ payloadJson["NetworkSettings"]["Networks"]["bridge"]["IPAMConfig"] = Json::nullValue; -+ payloadJson["NetworkSettings"]["Networks"]["bridge"]["Links"] = Json::nullValue; -+ payloadJson["NetworkSettings"]["Networks"]["bridge"]["Aliases"] = Json::nullValue; -+ payloadJson["NetworkSettings"]["Networks"]["bridge"]["NetworkID"] = -+ "1cacb396f2c32029fe35d73d8d061575bc69baadc15c1cc8fa596aa2ac3c1eaa"; -+ payloadJson["NetworkSettings"]["Networks"]["bridge"]["EndpointID"] = ""; -+ payloadJson["NetworkSettings"]["Networks"]["bridge"]["Gateway"] = ""; -+ payloadJson["NetworkSettings"]["Networks"]["bridge"]["IPAddress"] = ""; -+ payloadJson["NetworkSettings"]["Networks"]["bridge"]["IPPrefixLen"] = 0; -+ payloadJson["NetworkSettings"]["Networks"]["bridge"]["IPv6Gateway"] = ""; -+ payloadJson["NetworkSettings"]["Networks"]["bridge"]["GlobalIPv6Address"] = ""; -+ payloadJson["NetworkSettings"]["Networks"]["bridge"]["GlobalIPv6PrefixLen"] = 0; -+ payloadJson["NetworkSettings"]["Networks"]["bridge"]["MacAddress"] = ""; -+ payloadJson["NetworkSettings"]["Networks"]["bridge"]["DriverOpts"] = Json::nullValue; -+ -+ Json::StreamWriterBuilder builder; -+ payload_str = Json::writeString(builder, payloadJson); -+ auto response = std::make_shared( -+ payload_str, httpserver::http::http_utils::http_ok, "application/json"); -+ return response; -+ } -+ -+ private: -+ Daemon *_daemon; -+}; -+ -+} // namespace container -+} // namespace emiso -+ -+#endif /* EMISO_CONTAINER_INSPECT_H */ diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0033-container_logs.hpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0033-container_logs.hpp.patch deleted file mode 100644 index a99c243..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0033-container_logs.hpp.patch +++ /dev/null @@ -1,72 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/webserver/container/container_logs.hpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/webserver/container/container_logs.hpp 2025-10-10 17:28:33.594049579 +0200 -@@ -0,0 +1,69 @@ -+/* -+ * Copyright (C) 2024 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef EMISO_CONTAINER_LOGS_H -+#define EMISO_CONTAINER_LOGS_H -+ -+namespace emiso { -+namespace container { -+ -+class LogsHandler : public httpserver::http_resource { -+ public: -+ LogsHandler(Daemon *daemon) : _daemon(daemon) {}; -+ -+ std::shared_ptr render_GET(const httpserver::http_request &req) { -+ int lineNr = -1; -+ -+ std::cout << "[WEBERVER] '" << std::string(req.get_path()) << "' (" << std::string(req.get_method()) << ") called" << std::endl; -+ -+ // == Retrieve container ID from the request path == -+ int containerId = std::__cxx11::stoi(req.get_arg("id")); -+ std::cout << "container ID: " << containerId << std::endl; -+ -+ // == Retrieve QUERY params == -+ for (const auto& arg : req.get_args()) { -+ std::cout << "param: " << std::string(arg.first) << ", value: " << std::string(arg.second) << std::endl; -+ -+ // Retrieve 'tail' parameter - if present -+ if (std::string(arg.first) == "tail") { -+ lineNr = stoi(arg.second); -+ } -+ } -+ -+ std::vector lines; -+ lines = _daemon->container.retrieveLogs(containerId, lineNr); -+ -+ std::string message; -+ for (int i = 0; i < lines.size(); i++) { -+ message += lines[i] + "\n"; -+ } -+ -+ auto response = std::make_shared(message, -+ httpserver::http::http_utils::http_ok, "application/json"); -+ return response; -+ } -+ -+ private: -+ Daemon *_daemon; -+ }; -+ -+ -+} // container -+} // emiso -+ -+#endif // EMISO_CONTAINER_LOGS_H diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0034-image.cpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0034-image.cpp.patch deleted file mode 100644 index e5665f3..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0034-image.cpp.patch +++ /dev/null @@ -1,49 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/webserver/image/image.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/webserver/image/image.cpp 2025-10-10 17:28:33.594049579 +0200 -@@ -0,0 +1,46 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include "image.hpp" -+ -+namespace emiso { -+ -+ namespace image { -+ -+ ImageApi::ImageApi(httpserver::webserver *server, Daemon *daemon) -+ : _server(server) { -+ std::string path = "/images"; -+ -+ // Create routes and handlers -+ _listHandler = new ListHandler(daemon); -+ _historyHandler = new HistoryHandler(daemon); -+ _inspectHandler = new InspectHandler(daemon); -+ -+ _server->register_resource(path + "/json", _listHandler); -+ _server->register_resource("/v[1-9]+.[0-9]+" + path + "/json", _listHandler); -+ -+ _server->register_resource(path + "/{[a-zA-Z0-9_-]+}/history", _listHandler); -+ _server->register_resource("/v[1-9]+.[0-9]+" + path + "/{[a-zA-Z0-9_-]+}/history", _listHandler); -+ -+ _server->register_resource(path + "/{[a-zA-Z0-9_-]+}/json", _inspectHandler); -+ _server->register_resource("/v[1-9]+.[0-9]+" + path + "/{[a-zA-Z0-9_-]+}/json", _inspectHandler); -+ } -+ -+ ImageApi::~ImageApi() {} -+ } -+} diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0035-image.hpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0035-image.hpp.patch deleted file mode 100644 index 2237094..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0035-image.hpp.patch +++ /dev/null @@ -1,140 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/webserver/image/image.hpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/webserver/image/image.hpp 2025-10-10 17:28:33.594158860 +0200 -@@ -0,0 +1,137 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef EMISO_IMAGE_H -+#define EMISO_IMAGE_H -+ -+#include -+#include -+#include -+ -+#include "../../daemon/image.hpp" -+#include "../../daemon/daemon.hpp" -+ -+#include "image_inspect.hpp" -+ -+namespace emiso { -+namespace image { -+ -+ class ListHandler : public httpserver::http_resource { -+ public: -+ ListHandler(Daemon *daemon) : _daemon(daemon) {}; -+ -+ std::shared_ptr render_GET(const httpserver::http_request &req) { -+ std::string payload_str = ""; -+ Json::Value payload_json; -+ -+ std::cout << "[WEBERVER] '" << std::string(req.get_path()) << "' (" << std::string(req.get_method()) << ") called" << std::endl; -+ -+ // Retrieve image info -+ std::map info; -+ _daemon->image.info(info); -+ -+ unsigned idx = 0; -+ for (auto it = info.begin(); it != info.end(); ++it) { -+ -+ payload_json[idx]["Id"] = it->second.id; -+ payload_json[idx]["ParentId"] = ""; -+ payload_json[idx]["RepoTags"][0] = it->second.name + ":latest"; -+ payload_json[idx]["Created"] = it->second.date; -+ payload_json[idx]["Size"] = it->second.size; -+ payload_json[idx]["SharedSize"] = -1; // Value not set or calculated -+ payload_json[idx]["Containers"] = -1; // Value not set or calculated -+ payload_json[idx]["Labels"] = Json::Value::null; -+ -+ idx++; -+ } -+ -+ Json::StreamWriterBuilder builder; -+ payload_str = Json::writeString(builder, payload_json); -+ -+ auto response = std::make_shared(payload_str, -+ httpserver::http::http_utils::http_ok, "application/json"); -+ return response; -+ } -+ -+ private: -+ // daemon::Image _image; -+ Daemon *_daemon; -+ -+ }; -+ -+ -+ class HistoryHandler : public httpserver::http_resource { -+ public: -+ HistoryHandler(Daemon *daemon) : _daemon(daemon) {}; -+ -+ std::shared_ptr render_GET(const httpserver::http_request &req) { -+ std::cout << "[WEBERVER] '" << std::string(req.get_path()) << "' (" << std::string(req.get_method()) << ") called" << std::endl; -+ -+ std::string payload_str = ""; -+ Json::Value payload_json; -+ -+ // Retrieve image info -+ std::map info; -+ _daemon->image.info(info); -+ -+ unsigned idx = 0; -+ for (auto it = info.begin(); it != info.end(); ++it) { -+ -+ payload_json[idx]["Id"] = it->second.id; -+ payload_json[idx]["Created"] = it->second.date; -+ payload_json[idx]["CreatedBy"] = "Micofe"; -+ payload_json[idx]["Tags"] = Json::arrayValue; -+ payload_json[idx]["Size"] = it->second.size; -+ payload_json[idx]["Comment"] = ""; -+ -+ idx++; -+ } -+ -+ Json::StreamWriterBuilder builder; -+ payload_str = Json::writeString(builder, payload_json); -+ -+ auto response = std::make_shared(payload_str, -+ httpserver::http::http_utils::http_ok, "application/json"); -+ return response; -+ } -+ -+ private: -+ // daemon::Image _image; -+ Daemon *_daemon; -+ }; -+ -+ class ImageApi { -+ public: -+ // Constructor -+ ImageApi(httpserver::webserver *server, Daemon *daemon); -+ -+ // Destructor -+ ~ImageApi(); -+ -+ private: -+ httpserver::webserver *_server; -+ -+ // Handler for the different 'list' routes -+ ListHandler *_listHandler; -+ HistoryHandler *_historyHandler; -+ InspectHandler *_inspectHandler; -+ }; -+} // image -+} // emiso -+ -+#endif /* EMISO_IMAGE_H */ diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0036-image_inspect.hpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0036-image_inspect.hpp.patch deleted file mode 100644 index dd49603..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0036-image_inspect.hpp.patch +++ /dev/null @@ -1,94 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/webserver/image/image_inspect.hpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/webserver/image/image_inspect.hpp 2025-10-10 17:28:33.594158860 +0200 -@@ -0,0 +1,90 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef EMISO_INSPECT_IMAGE_H -+#define EMISO_INSPECT_IMAGE_H -+ -+#include -+#include -+#include -+ -+#include "../../daemon/image.hpp" -+#include "../../daemon/daemon.hpp" -+ -+namespace emiso { -+namespace image { -+ -+ class InspectHandler : public httpserver::http_resource { -+ public: -+ InspectHandler(Daemon *daemon) : _daemon(daemon){}; -+ -+ std::shared_ptr render_GET(const httpserver::http_request &req) { -+ std::string payload_str = ""; -+ Json::Value payload_json; -+ int error; -+ -+ std::cout << "[WEBERVER] '" << std::string(req.get_path()) << "' (" << std::string(req.get_method()) << ") called" << std::endl; -+ -+ // Retrieve the image 'name' form the path (the 'name' correspond -+ // here to the image ID) -+ string path = string(req.get_path()); -+ smatch match; -+ regex rgx("(/v[0-9]+.[0-9]+)?/images/([a-zA-Z0-9_:-]+)/json"); -+ -+ string imageName; -+ if (regex_match(path, match, rgx)) { -+ imageName = match[2]; -+ -+ // The name/id has been found - get the image info -+ ImageInfo info; -+ int ret = _daemon->image.info(imageName, info); -+ -+ if (ret == 0) { -+ payload_json["Id"] = info.id; -+ payload_json["Created"] = info.date; -+ payload_json["Size"] = info.size; -+ payload_json["Created"] = info.date; -+ payload_json["RepoTags"][0] = info.name + ":latest"; -+ -+ Json::StreamWriterBuilder builder; -+ payload_str = Json::writeString(builder, payload_json); -+ error = httpserver::http::http_utils::http_ok; -+ } else { -+ payload_str = "Image '" + imageName + "' not found"; -+ error = httpserver::http::http_utils::http_not_found; -+ } -+ } else { -+ // The name/id has not been found - error -+ payload_str = "Server Error - Failed to extract the image name from the path"; -+ error = httpserver::http::http_utils::http_internal_server_error; -+ } -+ -+ auto response = std::make_shared(payload_str, -+ error, "application/json"); -+ -+ return response; -+ } -+ -+ private: -+ Daemon *_daemon; -+ }; -+ -+} // image -+} // emiso -+ -+#endif // EMISO_INSPECT_IMAGE_H -\ No newline at end of file diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0037-network.cpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0037-network.cpp.patch deleted file mode 100644 index dcde72a..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0037-network.cpp.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/webserver/network/network.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/webserver/network/network.cpp 2025-10-10 17:28:33.594158860 +0200 -@@ -0,0 +1,38 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include "network.hpp" -+ -+namespace emiso { -+ -+ namespace network { -+ -+ NetworkApi::NetworkApi(httpserver::webserver *server) -+ : _server(server) { -+ std::string path = "/networks"; -+ -+ // Create routes and handlers -+ _listHandler = new ListHandler(); -+ -+ _server->register_resource(path, _listHandler); -+ _server->register_resource("/v[1-9]+.[0-9]+" + path, _listHandler); -+ } -+ -+ NetworkApi::~NetworkApi() {} -+ } -+} diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0038-network.hpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0038-network.hpp.patch deleted file mode 100644 index 9a8fe09..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0038-network.hpp.patch +++ /dev/null @@ -1,66 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/webserver/network/network.hpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/webserver/network/network.hpp 2025-10-10 17:28:33.594220426 +0200 -@@ -0,0 +1,63 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef EMISO_NETWORK_H -+#define EMISO_NETWORK_H -+ -+#include -+#include -+#include -+ -+namespace emiso { -+ -+ namespace network { -+ -+ class ListHandler : public httpserver::http_resource { -+ public: -+ -+ // In emiso, network is not supported --> return an empty list ! -+ std::shared_ptr render_GET(const httpserver::http_request &req) { -+ std::string payload_str = "[]"; -+ -+ std::cout << "[WEBERVER] '" << req.get_path() << "' (" << req.get_method() << ") called" << std::endl; -+ -+ auto response = std::make_shared(payload_str, -+ httpserver::http::http_utils::http_ok, "application/json"); -+ return response; -+ } -+ }; -+ -+ class NetworkApi { -+ public: -+ // Constructor -+ NetworkApi(httpserver::webserver *server); -+ -+ // Destructor -+ ~NetworkApi(); -+ -+ private: -+ httpserver::webserver *_server; -+ -+ // Handler for the different 'list' routes -+ ListHandler *_listHandler; -+ -+ }; -+ } -+} -+ -+#endif /* EMISO_NETWORK_H */ diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0039-plugins.cpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0039-plugins.cpp.patch deleted file mode 100644 index 1958ddc..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0039-plugins.cpp.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/webserver/plugins/plugins.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/webserver/plugins/plugins.cpp 2025-10-10 17:28:33.594220426 +0200 -@@ -0,0 +1,37 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include "plugins.hpp" -+ -+namespace emiso { -+namespace plugins { -+ -+ PluginsApi::PluginsApi(httpserver::webserver *server): _server(server) { -+ std::string path = "/plugins"; -+ -+ // Create routes and handlers -+ _listHandler = new ListHandler(); -+ -+ _server->register_resource(path, _listHandler); -+ _server->register_resource("/v[1-9]+.[0-9]+" + path, _listHandler); -+ } -+ -+ PluginsApi::~PluginsApi() {} -+ -+} // plugins -+} // emiso diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0040-plugins.hpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0040-plugins.hpp.patch deleted file mode 100644 index 73bc118..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0040-plugins.hpp.patch +++ /dev/null @@ -1,71 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/webserver/plugins/plugins.hpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/webserver/plugins/plugins.hpp 2025-10-10 17:28:33.594256882 +0200 -@@ -0,0 +1,68 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef EMISO_PLUGINS_H -+#define EMISO_PLUGINS_H -+ -+#include -+#include -+#include -+ -+namespace emiso { -+namespace plugins { -+ -+ class ListHandler : public httpserver::http_resource { -+ public: -+ -+ std::shared_ptr render_GET(const httpserver::http_request &req) { -+ std::cout << "[WEBERVER] '" << req.get_path() << "' (" << req.get_method() << ") called" << std::endl; -+ -+ std::string payload_str = ""; -+ Json::Value payload_json; -+ -+ payload_json = Json::arrayValue; // empty array -+ -+ Json::StreamWriterBuilder builder; -+ payload_str = Json::writeString(builder, payload_json); -+ -+ auto response = std::make_shared(payload_str, -+ httpserver::http::http_utils::http_ok, "application/json"); -+ return response; -+ } -+ }; -+ -+ class PluginsApi { -+ public: -+ // Constructor -+ PluginsApi(httpserver::webserver *server); -+ -+ // Destructor -+ ~PluginsApi(); -+ -+ private: -+ httpserver::webserver *_server; -+ -+ // Handler for the different 'list' routes -+ ListHandler *_listHandler; -+ -+ }; -+ -+} // plugins -+} // emiso -+ -+#endif /* EMISO_PLUGINS_H */ diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0041-system.cpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0041-system.cpp.patch deleted file mode 100644 index a21cd7e..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0041-system.cpp.patch +++ /dev/null @@ -1,45 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/webserver/system/system.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/webserver/system/system.cpp 2025-10-10 17:28:33.594256882 +0200 -@@ -0,0 +1,42 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include "system.hpp" -+ -+namespace emiso { -+ namespace system { -+ -+ SytemApi::SytemApi(httpserver::webserver *server, Daemon *daemon) -+ : _server(server) { -+ -+ // Create routes and handlers -+ _pinghandler = new PingHandler(); -+ _sysInfoHandler = new SysInfoHandler(daemon); -+ _getVersionHandler = new GetVersionHandler(); -+ -+ _server->register_resource("/_ping", _pinghandler); -+ _server->register_resource("/v[1-9]+.[0-9]+/_ping", _pinghandler); -+ _server->register_resource("/v[1-9]+.[0-9]+/info", _sysInfoHandler); -+ _server->register_resource("/info", _sysInfoHandler); -+ _server->register_resource("/version", _getVersionHandler); -+ _server->register_resource("/v[1-9]+.[0-9]+/version", _getVersionHandler); -+ } -+ -+ SytemApi::~SytemApi() {} -+ } -+} diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0042-system.hpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0042-system.hpp.patch deleted file mode 100644 index 9089fa0..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0042-system.hpp.patch +++ /dev/null @@ -1,239 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/webserver/system/system.hpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/webserver/system/system.hpp 2025-10-10 17:28:33.594295771 +0200 -@@ -0,0 +1,236 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef EMISO_SYSTEM_H -+#define EMISO_SYSTEM_H -+ -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include "../../daemon/image.hpp" -+#include "../../daemon/capsule.hpp" -+#include "../../daemon/daemon.hpp" -+ -+namespace emiso { -+ namespace system { -+ -+ class PingHandler : public httpserver::http_resource { -+ public: -+ -+ std::shared_ptr render_GET(const httpserver::http_request &req) { -+ std::cout << "[WEBERVER] '" << std::string(req.get_path()) << "' (" << std::string(req.get_method()) << ") called" << std::endl; -+ -+ // Respond is a simple 'OK' -+ auto response = std::make_shared("OK"); -+ return response; -+ } -+ -+ std::shared_ptr render_HEAD(const httpserver::http_request &req) { -+ std::cout << "[WEBERVER] '" << std::string(req.get_path()) << "' (" << std::string(req.get_method()) << ") called" << std::endl; -+ -+ auto response = std::shared_ptr(new httpserver::string_response("")); -+ -+ response->with_header("Api-Version", EMISO_WEB_API_VERSION); -+ response->with_header("Builder-Version", EMISO_VERSION); -+ if (EMISO_WEB_EXPERIMENTAL) -+ response->with_header("Docker-Experimental", "true"); -+ else -+ response->with_header("Docker-Experimental", "false"); -+ response->with_header("Swarm", EMISO_WEB_SWARM); -+ response->with_header("Cache-Control", "no-cache, no-store, must-revalidate"); -+ response->with_header("Pragma", "no-cache"); -+ -+ return response; -+ } -+ }; -+ -+ class SysInfoHandler : public httpserver::http_resource { -+ public: -+ SysInfoHandler(Daemon *daemon) : _daemon(daemon) {}; -+ -+ std::shared_ptr render_GET(const httpserver::http_request &req) { -+ std::cout << "[WEBERVER] '" << std::string(req.get_path()) << "' (" << std::string(req.get_method()) << ") called" << std::endl; -+ -+ std::string payload_str = ""; -+ Json::Value payload_json; -+ Utils& utils = Utils::getInstance(); -+ auto config = utils.getInfo(); -+ // daemon::Image image; -+ std::map info; -+ std::map capsuleInfo; -+ -+ // Retrieve images info -+ _daemon->image.info(info); -+ auto image_nr = info.size(); -+ -+ // Retrieve container info -+ _daemon->container.info(capsuleInfo); -+ auto containerNr = capsuleInfo.size(); -+ -+ payload_json["ID"] = utils.getAgencyUID(); -+ payload_json["Containers"] = containerNr; // To update next -+ payload_json["ContainersRunning"] = containerNr; // To update next -+ payload_json["ContainersPaused"] = 0; // To update next -+ payload_json["ContainersStopped"] = 0; // To update next -+ payload_json["Images"] = image_nr; // To update next -+ -+ // WARNING - hardcoded values got from Docker answer of JMI PC -+ payload_json["Driver"] = "overlay2"; -+ payload_json["DriverStatus"][0].append("Backing Filesystem"); -+ payload_json["DriverStatus"][0].append("extfs"); -+ payload_json["DriverStatus"][1].append("Supports d_type"); -+ payload_json["DriverStatus"][1].append("true"); -+ payload_json["DriverStatus"][2].append("Using metacopy"); -+ payload_json["DriverStatus"][2].append("false"); -+ payload_json["DriverStatus"][3].append("Native Overlay Diff"); -+ payload_json["DriverStatus"][3].append("true"); -+ payload_json["DriverStatus"][4].append("userxattr"); -+ payload_json["DriverStatus"][4].append("false"); -+ -+ payload_json["DockerRootDir"] = "/var/lib/docker"; // default value on Linux -+ payload_json["Plugins"] = Json::objectValue; -+ -+ // Set these values to false as not supported/handled by emiso -+ payload_json["MemoryLimit"] = false; -+ payload_json["SwapLimit"] = false; -+ payload_json["CpuCfsPeriod"] = false; -+ payload_json["CpuCfsQuota"] = false; -+ payload_json["CPUShares"] = false; -+ payload_json["CPUSet"] = false; -+ payload_json["PidsLimit"] = false; -+ payload_json["OomKillDisable"] = false; -+ payload_json["IPv4Forwarding"] = false; -+ payload_json["BridgeNfIptables"] = false; -+ payload_json["BridgeNfIp6tables"] = false; -+ payload_json["Debug"] = false; -+ -+ payload_json["SystemTime"] = utils.getSystemTime(); -+ payload_json["LoggingDriver"] = "json-file"; // WARNING - hardcoded values got from Docker answer of JMI PC -+ payload_json["CgroupDriver"] = "none"; -+ payload_json["CgroupVersion"] = "1"; // Default docker value -+ payload_json["NEventsListener"] = 0; -+ -+ payload_json["KernelVersion"] = config.kernel_version; -+ payload_json["OperatingSystem"] = config.os; -+ payload_json["OSVersion"] = config.os_version; -+ payload_json["OSType"] = config.os_type; -+ payload_json["Architecture"] = config.arch; -+ -+ payload_json["NCPU"] = 1; // Get info from Agency ? -+ payload_json["MemTotal"] = 536870912; // Get info from Agency ? -+ payload_json["IndexServerAddress"] = "https://index.docker.io/v1/"; -+ payload_json["RegistryConfig"] = Json::objectValue; -+ payload_json["GenericResources"] = Json::arrayValue; -+ -+ payload_json["HttpProxy"] = ""; // use 'HTTP_PROXY' env variable -+ payload_json["HttpsProxy"] = ""; // use 'HTTPS_PROXY' env variable -+ payload_json["NoProxy"] = ""; // use 'NO_PROXY' env variable -+ payload_json["Name"] = "agency"; // Host name -+ payload_json["Labels"] = Json::arrayValue; -+ payload_json["ExperimentalBuild"] = EMISO_WEB_EXPERIMENTAL; -+ payload_json["ServerVersion"] = "28.3.3"; -+ payload_json["DefaultRuntime"] = ""; -+ -+ payload_json["Swarm"]["NodeID"] = ""; -+ payload_json["Swarm"]["NodeAddr"] = ""; -+ payload_json["Swarm"]["LocalNodeState"] = "inactive"; -+ payload_json["Swarm"]["ControlAvailable"] = false; -+ payload_json["Swarm"]["Error"] = ""; -+ payload_json["Swarm"]["RemoteManagers"] = Json::Value::null; -+ -+ payload_json["LiveRestoreEnabled"] = false; -+ payload_json["Isolation"] = "VT"; // TODO - platform specific -+ payload_json["SecurityOptions"] = Json::arrayValue; -+ -+ Json::StreamWriterBuilder builder; -+ payload_str = Json::writeString(builder, payload_json); -+ -+ auto response = std::make_shared(payload_str, -+ httpserver::http::http_utils::http_ok, "application/json"); -+ return response; -+ } -+ private: -+ Daemon *_daemon; -+ }; -+ -+ class GetVersionHandler : public httpserver::http_resource { -+ public: -+ -+ std::shared_ptr render_GET(const httpserver::http_request &req) { -+ std::cout << "[WEBERVER] '" << std::string(req.get_path()) << "' (" << std::string(req.get_method()) << ") called" << std::endl; -+ -+ std::string payload_str = ""; -+ Json::Value payload_json; -+ Utils& utils = Utils::getInstance(); -+ int response_code = httpserver::http::http_utils::http_ok; -+ -+ auto config = utils.getInfo(); -+ -+ payload_json["Platform"]["name"] = EMISO_PLATFORM_NAME; -+ payload_json["Components"][0]["name"] = EMISO_WEB_COMP_NAME; -+ payload_json["Components"][0]["version"] = EMISO_VERSION; -+ payload_json["Version"] = EMISO_VERSION; -+ payload_json["ApiVersion"] = EMISO_WEB_API_VERSION; -+ payload_json["MinAPIVersion"] = EMISO_WEB_API_VERSION; -+ -+ // Get info directly from the system -+ payload_json["Os"] = config.os_type; -+ payload_json["Arch"] = config.arch; -+ payload_json["KernelVersion"] = config.kernel_version; -+ -+ payload_json["Experimental"] = EMISO_WEB_EXPERIMENTAL; -+ -+ // not implemented yet ! -+ // payload_json["GitCommit"] -+ // payload_json["GoVersion"] -+ // payload_json["BuildTime"] -+ -+ Json::StreamWriterBuilder builder; -+ payload_str = Json::writeString(builder, payload_json); -+ -+ auto response = std::make_shared(payload_str, -+ response_code, "application/json"); -+ return response; -+ } -+ }; -+ -+ -+ class SytemApi { -+ public: -+ // Constructor -+ SytemApi(httpserver::webserver *server, Daemon *daemon); -+ -+ // Destructor -+ ~SytemApi(); -+ -+ private: -+ httpserver::webserver *_server; -+ -+ // Handler for the different routes -+ PingHandler *_pinghandler; -+ SysInfoHandler *_sysInfoHandler; -+ GetVersionHandler *_getVersionHandler; -+ }; -+ } -+} -+ -+#endif /* EMISO_SYSTEM_H */ diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0043-volume.cpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0043-volume.cpp.patch deleted file mode 100644 index a6a8ab5..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0043-volume.cpp.patch +++ /dev/null @@ -1,41 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/webserver/volume/volume.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/webserver/volume/volume.cpp 2025-10-10 17:28:33.594295771 +0200 -@@ -0,0 +1,38 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include "volume.hpp" -+ -+namespace emiso { -+ -+ namespace volume { -+ -+ VolumeApi::VolumeApi(httpserver::webserver *server) -+ : _server(server) { -+ std::string path = "/volumes"; -+ -+ // Create routes and handlers -+ _listHandler = new ListHandler(); -+ -+ _server->register_resource(path, _listHandler); -+ _server->register_resource("/v[1-9]+.[0-9]+" + path, _listHandler); -+ } -+ -+ VolumeApi::~VolumeApi() {} -+ } -+} diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0044-volume.hpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0044-volume.hpp.patch deleted file mode 100644 index a7c1dc5..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0044-volume.hpp.patch +++ /dev/null @@ -1,71 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/webserver/volume/volume.hpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/webserver/volume/volume.hpp 2025-10-10 17:28:33.594328500 +0200 -@@ -0,0 +1,68 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef EMISO_VOLUME_H -+#define EMISO_VOLUME_H -+ -+#include -+#include -+#include -+ -+namespace emiso { -+ -+ namespace volume { -+ -+ class ListHandler : public httpserver::http_resource { -+ public: -+ -+ std::shared_ptr render_GET(const httpserver::http_request &req) { -+ std::cout << "[WEBERVER] '" << req.get_path() << "' (" << req.get_method() << ") called" << std::endl; -+ -+ std::string payload_str = ""; -+ Json::Value payload_json; -+ -+ payload_json["Volumes"] = Json::arrayValue; // empty array -+ -+ Json::StreamWriterBuilder builder; -+ payload_str = Json::writeString(builder, payload_json); -+ -+ auto response = std::make_shared(payload_str, -+ httpserver::http::http_utils::http_ok, "application/json"); -+ return response; -+ } -+ }; -+ -+ class VolumeApi { -+ public: -+ // Constructor -+ VolumeApi(httpserver::webserver *server); -+ -+ // Destructor -+ ~VolumeApi(); -+ -+ private: -+ httpserver::webserver *_server; -+ -+ // Handler for the different 'list' routes -+ ListHandler *_listHandler; -+ -+ }; -+ } -+} -+ -+#endif /* EMISO_VOLUME_H */ diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0045-webserver.cpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0045-webserver.cpp.patch deleted file mode 100644 index 9de19dc..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0045-webserver.cpp.patch +++ /dev/null @@ -1,64 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/webserver/webserver.cpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/webserver/webserver.cpp 2025-10-10 17:28:33.594328500 +0200 -@@ -0,0 +1,61 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include -+ -+#include "webserver.hpp" -+ -+namespace emiso { -+ -+ WebServer::WebServer(int port, bool secure, Daemon *daemon) -+ : _port(port), _secure(secure) { -+ -+ // Use builder to define webserver configuration options -+ httpserver::create_webserver cw = httpserver::create_webserver(_port); -+ if (secure) -+ cw.use_ssl().https_mem_key("key.pem").https_mem_cert("cert.pem"); -+ -+ // Create webserver using the configured options -+ _server = new httpserver::webserver(cw); -+ -+ // Registration of the different APIs -+ _system = new system::SytemApi(_server, daemon); -+ _container = new container::ContainerApi(_server, daemon); -+ _image = new image::ImageApi(_server, daemon); -+ _network = new network::NetworkApi(_server); -+ _volume = new volume::VolumeApi(_server); -+ _plugins = new plugins::PluginsApi(_server); -+ -+ // Create the default path - it responds to all paths -+ _defaultHandler = new DefaultHandler(); -+ _server->register_resource("^/.*$", _defaultHandler); -+ } -+ -+ WebServer:: ~WebServer() {} -+ -+ void WebServer::start(bool blocking) -+ { -+ // Start the server -+ std::cout << "Server started on port " << _port; -+ if (_secure) -+ std::cout << " (HTTPS/TLS mode ON)"; -+ std::cout << std::endl; -+ -+ _server->start(blocking); -+ } -+} diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0046-webserver.hpp.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0046-webserver.hpp.patch deleted file mode 100644 index 3c19004..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0046-webserver.hpp.patch +++ /dev/null @@ -1,95 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/emiso_engine/webserver/webserver.hpp 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/emiso_engine/webserver/webserver.hpp 2025-10-10 17:28:33.594328500 +0200 -@@ -0,0 +1,92 @@ -+/* -+ * Copyright (C) 2023 Jean-Pierre Miceli -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef EMISO_WEBSERVER_H -+#define EMISO_WEBSERVER_H -+ -+#include -+ -+#include "system/system.hpp" -+#include "container/container.hpp" -+#include "image/image.hpp" -+#include "network/network.hpp" -+#include "volume/volume.hpp" -+#include "plugins/plugins.hpp" -+#include "../daemon/daemon.hpp" -+ -+#define LOG_PREFIX "[EMISO:WEBSERVER] " -+ -+// DefaultHandler - used to print info for all paths not already registered to the -+// server -+class DefaultHandler : public httpserver::http_resource { -+public: -+ std::shared_ptr render(const httpserver::http_request& req) { -+ -+ std::cout << LOG_PREFIX "End-point not implemented" << std::endl; -+ std::cout << "\tPath: " << req.get_path() << std::endl; -+ std::cout << "\tMethod: " << req.get_method() << std::endl; -+ std::cout << "\tHeaders:" << std::endl; -+ for (const auto& header : req.get_headers()) { -+ std::cout << "\t\t" << header.first << ": " << header.second << std::endl; -+ } -+ std::cout << "\tBody: " << req.get_content() << std::endl; -+ -+ // Respond with a simple message -+ std::string message = "Path '" + std::string(req.get_path()) + "' not implemented\n"; -+ -+ auto response = std::make_shared(message); -+ return response; -+ } -+}; -+ -+namespace emiso { -+ -+ class WebServer { -+ public: -+ // Constructor -+ WebServer(int port, bool secure, Daemon *daemon); -+ -+ // Destructor -+ ~WebServer(); -+ -+ // Start the server -+ void start(bool blocking = false); -+ -+ // Stop the server -+ // void stop(); -+ -+ private: -+ int _port; -+ bool _secure; -+ httpserver::webserver *_server; -+ -+ // Different services -+ system::SytemApi *_system; -+ container::ContainerApi *_container; -+ image::ImageApi *_image; -+ network::NetworkApi *_network; -+ volume::VolumeApi *_volume; -+ plugins::PluginsApi *_plugins; -+ -+ // Default handler - not registered routes -+ DefaultHandler *_defaultHandler; -+ -+ }; -+} -+ -+#endif /* EMISO_WEBSERVER_H */ diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0047-injector.c.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0047-injector.c.patch deleted file mode 100644 index e34752b..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0047-injector.c.patch +++ /dev/null @@ -1,142 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/injector.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/injector.c 2025-10-10 17:28:33.594328500 +0200 -@@ -0,0 +1,139 @@ -+/* -+ * Copyright (C) 2016-2022 Daniel Rossier -+ * Copyright (C) January 2018 Baptiste Delporte -+ * Copyright (C) 2019-2022 David Truan -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#if 0 -+#define DEBUG -+#endif -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+ -+ /** -+ * @brief Injector performs loading of a capsule and start its execution. -+ * -+ * @param argc -+ * @param argv -+ * @return int -+ */ -+int main(int argc, char *argv[]) { -+ int fd_migration, fd, ret; -+ int nread, ME_size; -+ void *ME_buffer; -+ struct stat filestat; -+ struct agency_ioctl_args args; -+ bool hold_capsule = false; -+ int opt; -+ -+ // Parse command-line options -+ while ((opt = getopt(argc, argv, "s")) != -1) { -+ switch (opt) { -+ case 's': -+ hold_capsule = true; -+ break; -+ default: -+ fprintf(stderr, "Usage: %s [-s] \n", argv[0]); -+ exit(EXIT_FAILURE); -+ } -+ } -+ -+ if (optind >= argc) { -+ fprintf(stderr, "Expected ME file path after options\n"); -+ exit(EXIT_FAILURE); -+ } -+ -+ char *me_file_path = argv[optind]; -+ -+ printf("SOO ME injector (Smart Object Oriented based virtualization framework).\n"); -+ printf("Version: %s\n", SOO_VERSION); -+ -+ fd_migration = open(SOO_CORE_DEVICE, O_RDWR); -+ if (fd_migration < 0) { -+ printf("Failed to open device: " SOO_CORE_DEVICE " (%d)\n", fd_migration); -+ exit(EXIT_FAILURE); -+ } -+ -+ stat(me_file_path, &filestat); -+ -+ fd = open(me_file_path, O_RDONLY); -+ if (fd < 0) { -+ perror(me_file_path); -+ printf("%s not found.\n", me_file_path); -+ exit(EXIT_FAILURE); -+ } -+ -+ ME_size = filestat.st_size; -+ -+ /* Allocate the ME buffer */ -+ ME_buffer = malloc(ME_size); -+ assert(ME_buffer != NULL); -+ -+ DBG("agency_core: size to read from sd : %d, buffer address : 0x%08lx\n", ME_size, (unsigned long) ME_buffer); -+ -+ /* Read the ME content */ -+ nread = read(fd, ME_buffer, ME_size); -+ if (nread < 0) { -+ printf("Error when reading the ME\n"); -+ exit(EXIT_FAILURE); -+ } -+ -+ /* Inject the capsule */ -+ args.buffer = ME_buffer; -+ args.value = ME_size; -+ args.slotID = -1; /* Wherever */ -+ -+ if ((ret = ioctl(fd_migration, AGENCY_IOCTL_INJECT_CAPSULE, &args)) < 0) { -+ printf("Failed to inject ME (%d)\n", ret); -+ exit(EXIT_FAILURE); -+ } -+ -+ if (args.slotID == -1) { -+ printf("No available ME slot further...\n"); -+ exit(EXIT_FAILURE); -+ } -+ -+ if (!hold_capsule) { -+ ioctl(fd_migration, AGENCY_IOCTL_START_CAPSULE, &args); -+ } -+ -+ close(fd); -+ -+ free(ME_buffer); -+ -+ return 0; -+} -+ diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0048-melist.c.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0048-melist.c.patch deleted file mode 100644 index c901ec6..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0048-melist.c.patch +++ /dev/null @@ -1,96 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/melist.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/melist.c 2025-10-10 17:28:33.594328500 +0200 -@@ -0,0 +1,93 @@ -+/* -+ * Copyright (C) 2018 Baptiste Delporte -+ * Copyright (C) 2019-2021 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include -+ -+const char *ME_state_str(int state) { -+ -+ switch (state) { -+ case ME_state_stopped: -+ return "ME_state_stopped"; -+ case ME_state_living: -+ return "ME_state_living"; -+ case ME_state_suspended: -+ return "ME_state_suspended"; -+ case ME_state_hibernate: -+ return "ME_state_hibernate"; -+ case ME_state_resuming: -+ return "ME_state_resuming"; -+ case ME_state_awakened: -+ return "ME_state_awakened"; -+ case ME_state_killed: -+ return "ME_state_killed"; -+ case ME_state_terminated: -+ return "ME_state_terminated"; -+ case ME_state_dead: -+ return "ME_state_dead"; -+ } -+ -+ return "(n/a)"; -+} -+ -+/** -+ * Main entry point of the Agency core subsystem. -+ */ -+int main(int argc, char *argv[]) { -+ int i, fd_core; -+ ME_id_t id_array[MAX_ME_DOMAINS]; -+ agency_ioctl_args_t agency_ioctl_args; -+ -+ printf("*** SOO - Mobile Entity ID Retrieval ***\n\n"); -+ -+ fd_core = open("/dev/soo/core", O_RDWR); -+ assert(fd_core > 0); -+ -+ /* Prepare to terminate the running ME (dom #2) */ -+ printf("*** List of residing Mobile Entities: \n"); -+ -+ agency_ioctl_args.buffer = &id_array; -+ ioctl(fd_core, AGENCY_IOCTL_GET_ME_ID_ARRAY, (unsigned long) &agency_ioctl_args); -+ -+ for (i = 0; i < MAX_ME_DOMAINS; i++) { -+ if (id_array[i].state == ME_state_dead) -+ printf(" slot %d -> empty\n", i+2); -+ else { -+ printf(" slot %d -> spid: %" PRIx64 " name: %s state: %s\n", i+2, -+ id_array[i].spid, id_array[i].name, -+ ME_state_str(id_array[i].state)); -+ -+ printf(" Short description: %s\n", id_array[i].shortdesc); -+ } -+ } -+ -+ printf("done.\n"); -+ -+ close(fd_core); -+ -+ return 0; -+} diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0049-restoreme.c.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0049-restoreme.c.patch deleted file mode 100644 index 53db1dd..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0049-restoreme.c.patch +++ /dev/null @@ -1,80 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/restoreme.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/restoreme.c 2025-10-10 17:28:33.594328500 +0200 -@@ -0,0 +1,77 @@ -+/* -+ * Copyright (C) 2014-2020 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+#include -+ -+#include -+ -+int fd_core; -+ -+int main(int argc, char *argv[]) { -+ struct agency_ioctl_args args; -+ size_t buffer_size; -+ struct zip_t *zip; -+ -+ printf("*** SOO - Mobile Entity snapshot restorer ***\n"); -+ -+ if (argc != 2) { -+ printf("## Usage is : restoreme where is the file containing the ME snapshot.\n"); -+ exit(-1); -+ } -+ -+ printf("** Now reading the ME snapshot.\n"); -+ -+ fd_core = open("/dev/soo/core", O_RDWR); -+ assert(fd_core > 0); -+ -+ /* Uncompress the saved snapshot */ -+ zip = zip_open(argv[1], 0, 'r'); -+ -+ if (!zip) { -+ printf("Failed to open the zip file. Is there a bad sync after saving the snapshot?...\n"); -+ perror(""); -+ return EXIT_FAILURE; -+ } -+ -+ zip_entry_open(zip, "me"); -+ zip_entry_read(zip, &args.buffer, &buffer_size); -+ zip_entry_close(zip); -+ -+ zip_close(zip); -+ -+ printf(" ** ME memory re-implantation and resuming the capsule.\n"); -+ -+ args.slotID = -1; -+ ioctl(fd_core, AGENCY_IOCTL_WRITE_SNAPSHOT, &args); -+ -+ free(args.buffer); -+ close(fd_core); -+ -+ printf(" ** ME successfully restored and resumed...\n"); -+ -+ return 0; -+} diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0050-saveme.c.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0050-saveme.c.patch deleted file mode 100644 index b94add3..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0050-saveme.c.patch +++ /dev/null @@ -1,89 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/saveme.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/saveme.c 2025-10-10 17:28:33.594328500 +0200 -@@ -0,0 +1,86 @@ -+/* -+ * Copyright (C) 2014-2025 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include -+ -+#include -+ -+int fd_core; -+ -+int main(int argc, char *argv[]) { -+ int ret; -+ struct zip_t *zip; -+ struct agency_ioctl_args args; -+ -+ printf("*** SOO - Mobile Entity snapshot saver ***\n"); -+ -+ if (argc != 2) { -+ printf("## Usage is : saveme where is the file containing the ME snapshot.\n"); -+ exit(-1); -+ } -+ -+ printf("** Now taking the memory snapshot.\n"); -+ -+ fd_core = open("/dev/soo/core", O_RDWR); -+ assert(fd_core > 0); -+ -+ args.slotID = 2; -+ args.value = 0; /* To get the size of the snapshot */ -+ -+ /* Get the size of the snapshot */ -+ ret = ioctl(fd_core, AGENCY_IOCTL_READ_SNAPSHOT, &args); -+ assert(ret == 0); -+ -+ /* The use of %zu formatter enables to print a size_t variable regardless the underlying architecture. */ -+ printf(" * Size of the snapshot: %zu bytes.\n", args.value); -+ -+ /* Get the snapshot */ -+ args.buffer = malloc(args.value); -+ assert(args.buffer != NULL); -+ -+ /* Get the size of the snapshot */ -+ ret = ioctl(fd_core, AGENCY_IOCTL_READ_SNAPSHOT, &args); -+ assert(ret == 0); -+ -+ printf(" * Saving to the file..."); -+ fflush(stdout); -+ -+ /* Compress the snapshot */ -+ zip = zip_open(argv[1], ZIP_DEFAULT_COMPRESSION_LEVEL, 'w'); -+ -+ zip_entry_open(zip, "me"); -+ zip_entry_write(zip, args.buffer, args.value); -+ zip_entry_close(zip); -+ -+ zip_close(zip); -+ -+ close(fd_core); -+ -+ printf("done.\n\n"); -+ printf(" * snapshot saved successfully\n"); -+ -+ return 0; -+} diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0051-shutdownme.c.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0051-shutdownme.c.patch deleted file mode 100644 index 565a523..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0051-shutdownme.c.patch +++ /dev/null @@ -1,60 +0,0 @@ ---- /home/rossierd/soo/micofe/build/tmp/work/usr-linux-1.0-r0/usr-linux-1.0/src/soo/shutdownme.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/shutdownme.c 2025-10-10 17:28:33.594328500 +0200 -@@ -0,0 +1,57 @@ -+/* -+ * Copyright (C) 2014-2020 Daniel Rossier -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+ -+#include -+ -+int main(int argc, char *argv[]) { -+ int fd_core; -+ agency_ioctl_args_t agency_ioctl_args; -+ -+ printf("*** SOO - Mobile Entity shutdown ***\n"); -+ -+ if (argc != 2) { -+ printf("## Usage is : shutdownme \n"); -+ exit(-1); -+ } -+ -+ printf("** Perform a shutdown of ME #%d (slotID %d)...", atoi(argv[1]), atoi(argv[1])+1); -+ fflush(stdout); -+ -+ fd_core = open("/dev/soo/core", O_RDWR); -+ assert(fd_core > 0); -+ -+ /* Prepare to terminate the running ME (dom #2) */ -+ -+ agency_ioctl_args.slotID = atoi(argv[1]) + 1; -+ -+ ioctl(fd_core, AGENCY_IOCTL_SHUTDOWN, &agency_ioctl_args); -+ -+ printf("done.\n"); -+ -+ close(fd_core); -+ -+ return 0; -+} diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0052-CMakeLists.txt.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0052-CMakeLists.txt.patch deleted file mode 100644 index 8687ea7..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0052-CMakeLists.txt.patch +++ /dev/null @@ -1,5 +0,0 @@ ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -1 +1,2 @@ - add_subdirectory(examples) -+add_subdirectory(soo) diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0053-fb_mapper.c.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0053-fb_mapper.c.patch deleted file mode 100644 index b5e993c..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0053-fb_mapper.c.patch +++ /dev/null @@ -1,172 +0,0 @@ ---- ./src/soo/fb_mapper.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/fb_mapper.c 2026-01-10 17:28:33.594328500 +0200 -@@ -0,0 +1,169 @@ -+/* -+ * Copyright (C) 2026 Clément Dieperink -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#define FB_DEV "/dev/fb0" -+#define SYSFS_BASE_PATH "/sys/soo/backend/vfbdev" -+ -+#define USECONDS 1000000 -+#define FPS 30 -+ -+static char *get_info_and_mmap(int fd, struct fb_fix_screeninfo *finfo, -+ struct fb_var_screeninfo *vinfo, -+ size_t *screen_size) -+{ -+ char *fb_ptr; -+ -+ /* Make sure that the display is on.*/ -+ if (ioctl(fd, FBIOBLANK, FB_BLANK_UNBLANK) != 0) { -+ perror("ioctl(FBIOBLANK)"); -+ /* Don't return. Some framebuffer drivers like efifb or simplefb don't implement FBIOBLANK.*/ -+ } -+ -+ /* Get fixed screen information*/ -+ if (ioctl(fd, FBIOGET_FSCREENINFO, finfo) == -1) { -+ perror("Error reading fixed information"); -+ return NULL; -+ } -+ -+ /* Get variable screen information*/ -+ if (ioctl(fd, FBIOGET_VSCREENINFO, vinfo) == -1) { -+ perror("Error reading variable information"); -+ return NULL; -+ } -+ -+ *screen_size = vinfo->yres * finfo->line_length; -+ -+ /* Map the device to memory*/ -+ fb_ptr = (char *)mmap(0, *screen_size, PROT_READ | PROT_WRITE, -+ MAP_SHARED, fd, 0); -+ if (fb_ptr == MAP_FAILED) { -+ perror("Error: failed to map framebuffer device to memory"); -+ return NULL; -+ } -+ -+ for (size_t i = 0; i < *screen_size; i++) { -+ fb_ptr[i] = 0xff; -+ } -+ -+ return fb_ptr; -+} -+ -+static int write_sysfs(char *property, size_t value) -+{ -+ char tmp[256]; -+ size_t str_size; -+ int fd; -+ -+ printf("Setting %s to 0x%lX", property, value); -+ -+ snprintf(tmp, sizeof(tmp), SYSFS_BASE_PATH "/%s", property); -+ -+ fd = open(tmp, O_RDWR); -+ if (fd == -1) { -+ fprintf(stderr, "Error: couldn't open %s: %s", property, -+ strerror(errno)); -+ return -1; -+ } -+ -+ str_size = snprintf(tmp, sizeof(tmp), "%lx\n", value); -+ if (write(fd, tmp, str_size + 1) == 0) { -+ fprintf(stderr, "Error: couldn't write %s: %s", property, -+ strerror(errno)); -+ return -1; -+ } -+ -+ close(fd); -+ -+ return 0; -+} -+ -+int main(int argc, char *argv[]) -+{ -+ int fd; -+ struct fb_fix_screeninfo finfo; -+ struct fb_var_screeninfo vinfo; -+ char *fb_ptr; -+ size_t screen_size; -+ -+ /* Open and map the framebuffer */ -+ fd = open(FB_DEV, O_RDWR); -+ if (fd == -1) { -+ perror("Couldn't open " FB_DEV "\n"); -+ return EXIT_FAILURE; -+ } -+ -+ fb_ptr = get_info_and_mmap(fd, &finfo, &vinfo, &screen_size); -+ if (fb_ptr == NULL) { -+ return EXIT_FAILURE; -+ } -+ -+ /* Write all sysfs information */ -+ if (write_sysfs("vfbdev_hres", vinfo.xres) < 0) { -+ return EXIT_FAILURE; -+ } -+ -+ if (write_sysfs("vfbdev_vres", vinfo.yres) < 0) { -+ return EXIT_FAILURE; -+ } -+ -+ if (write_sysfs("vfbdev_bpp", vinfo.bits_per_pixel) < 0) { -+ return EXIT_FAILURE; -+ } -+ -+ if (write_sysfs("vfbdev_addr", (uint64_t)fb_ptr) < 0) { -+ return EXIT_FAILURE; -+ } -+ -+ if (write_sysfs("vfbdev_size", screen_size) < 0) { -+ return EXIT_FAILURE; -+ } -+ -+ if (write_sysfs("vfbdev_pid", getpid()) < 0) { -+ return EXIT_FAILURE; -+ } -+ -+ /* Periodically update the display */ -+ while (1) { -+ usleep(USECONDS / FPS); -+ -+ if (ioctl(fd, FBIOPAN_DISPLAY, &vinfo) == -1) { -+ /* Fallback to force the update */ -+ vinfo.activate = FB_ACTIVATE_NOW | FB_ACTIVATE_FORCE; -+ if (ioctl(fd, FBIOPUT_VSCREENINFO, &vinfo) == -1) { -+ perror("Error while updating the FB"); -+ } -+ } -+ } -+ -+ munmap(fb_ptr, screen_size); -+ close(fd); -+ -+ return EXIT_SUCCESS; -+} -+ diff --git a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0054-input_forwarding.c.patch b/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0054-input_forwarding.c.patch deleted file mode 100644 index 75c5b71..0000000 --- a/build/meta-usr/recipes-usr/soo/files/0001-usr-linux-1.0-r0/0054-input_forwarding.c.patch +++ /dev/null @@ -1,247 +0,0 @@ ---- ./src/soo/input_forwarding.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./src/soo/input_forwarding.c 2026-01-10 17:28:33.594328500 +0200 -@@ -0,0 +1,244 @@ -+/* -+ * Copyright (C) 2026 Clément Dieperink -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#define VINPUT_DEV "/dev/vinput" -+#define INPUT_PATH "/dev/input" -+#define MAX_INPUT_PER_READ 10 -+ -+#define INPUT_CAPABITLIES_ABS "/sys/class/input/%s/device/capabilities/abs" -+ -+struct input_info { -+ int has_abs; -+ struct input_absinfo absinfo_x; -+ struct input_absinfo absinfo_y; -+}; -+ -+static struct pollfd *input_devices = NULL; -+static struct input_info *input_info = NULL; -+static size_t input_count = 0; -+ -+static int vinput_fd; -+ -+static void open_input(char *path) -+{ -+ int fd, ret; -+ struct pollfd *tmp_input_devices; -+ struct input_info *tmp_input_info; -+ char full_path[256]; -+ -+ if (strncmp(path, "event", 5) != 0) -+ return; -+ -+ snprintf(full_path, sizeof(full_path), INPUT_PATH "/%s", path); -+ -+ fd = open(full_path, O_RDWR); -+ if (fd == -1) { -+ fprintf(stderr, "%s: Couldnt open file %s\n", strerror(errno), -+ full_path); -+ return; -+ } -+ -+ /* Resizes arrays */ -+ input_count++; -+ tmp_input_devices = reallocarray(input_devices, input_count, -+ sizeof(input_devices[0])); -+ if (tmp_input_devices == NULL) { -+ input_count--; -+ close(fd); -+ perror("Couldn't allocate memory to add new device"); -+ return; -+ } -+ -+ tmp_input_info = -+ reallocarray(input_info, input_count, sizeof(input_info[0])); -+ if (tmp_input_info == NULL) { -+ /* Don't free up newly allocated input_devices entry. -+ * Futur reallocarray will ensure that we get at most one empty entry -+ * in input_devices. */ -+ input_count--; -+ close(fd); -+ perror("Couldn't allocate memory to add new device"); -+ return; -+ } -+ -+ /* Setup poll information */ -+ input_devices = tmp_input_devices; -+ input_devices[input_count - 1] = (struct pollfd){ -+ .fd = fd, -+ .events = POLLIN, -+ }; -+ -+ /* Read absolute information */ -+ input_info = tmp_input_info; -+ input_info[input_count - 1].has_abs = 0; -+ -+ ret = ioctl(fd, EVIOCGABS(ABS_X), -+ &(input_info[input_count - 1].absinfo_x)); -+ if (ret < 0) { -+ return; -+ } -+ -+ ret = ioctl(fd, EVIOCGABS(ABS_Y), -+ &(input_info[input_count - 1].absinfo_y)); -+ if (ret < 0) { -+ return; -+ } -+ -+ /* We got both ABS X and Y information, input is a valid absolute */ -+ input_info[input_count - 1].has_abs = 1; -+ -+ printf("Found absolute input %s with maximum X:%d Y:%d\n", path, -+ input_info[input_count - 1].absinfo_x.maximum, -+ input_info[input_count - 1].absinfo_y.maximum); -+} -+ -+static void scan_inputs(void) -+{ -+ DIR *dir; -+ struct dirent *ent; -+ char path[512]; -+ int i; -+ int ret; -+ -+ for (i = 0; i < input_count; i++) { -+ close(input_devices->fd); -+ } -+ free(input_devices); -+ free(input_info); -+ input_count = 0; -+ -+ dir = opendir(INPUT_PATH); -+ if (dir == NULL) { -+ perror("Couldn't open directory " INPUT_PATH); -+ return; -+ } -+ -+ while ((ent = readdir(dir)) != NULL) { -+ open_input(ent->d_name); -+ } -+} -+ -+static size_t abs_convert(size_t value, struct input_absinfo *absinfo) -+{ -+ return (value * 10000) / absinfo->maximum; -+} -+ -+static int read_input(size_t idx) -+{ -+ ssize_t read_size, write_size; -+ struct input_event events[MAX_INPUT_PER_READ]; -+ size_t ev_i; -+ -+ read_size = read(input_devices[idx].fd, &events, sizeof(events)); -+ if (read_size < 0) { -+ fprintf(stderr, "%s: Couldnt read file %lu\n", strerror(errno), -+ idx); -+ return -1; -+ } -+ -+ if ((read_size % sizeof(events[0])) != 0) { -+ printf("Read size isn't a multiple of structure size %ld, %ld\n", -+ read_size, sizeof(events[0])); -+ return -1; -+ } -+ -+ /* If input is absolute, convert value to be in range 0-10000, as expected by capsules */ -+ if (input_info[idx].has_abs) { -+ for (ev_i = 0; ev_i < (read_size / sizeof(events[0])); ev_i++) { -+ if (events[ev_i].type != EV_ABS) -+ continue; -+ -+ if (events[ev_i].code == ABS_X) { -+ events[ev_i].value = -+ abs_convert(events[ev_i].value, -+ &input_info[idx].absinfo_x); -+ } -+ -+ if (events[ev_i].code == ABS_Y) { -+ events[ev_i].value = -+ abs_convert(events[ev_i].value, -+ &input_info[idx].absinfo_y); -+ } -+ } -+ } -+ -+ write_size = write(vinput_fd, &events, read_size); -+ if (write_size != read_size) { -+ printf("Not all event wrote\n"); -+ return -1; -+ } -+ -+ return 0; -+} -+ -+int main(int argc, char *argv[]) -+{ -+ int ready; -+ size_t i; -+ -+ vinput_fd = open(VINPUT_DEV, O_WRONLY); -+ if (vinput_fd == -1) { -+ perror("Couldn't open " VINPUT_DEV); -+ return EXIT_FAILURE; -+ } -+ -+ scan_inputs(); -+ -+ while (1) { -+ ready = poll(input_devices, input_count, -1); -+ if (ready == -1) { -+ perror("Couldn't poll files"); -+ return EXIT_FAILURE; -+ } -+ -+ for (i = 0; i < input_count; i++) { -+ if (!input_devices[i].revents) { -+ continue; -+ } -+ -+ if (!(input_devices[i].revents & POLLIN)) { -+ printf("Got not POLLIN for %d\n", i); -+ return EXIT_FAILURE; -+ } -+ -+ if (read_input(i) < 0) { -+ return EXIT_FAILURE; -+ } -+ } -+ } -+ -+ close(vinput_fd); -+ for (i = 0; i < input_count; i++) { -+ close(input_devices->fd); -+ } -+ free(input_devices); -+ free(input_info); -+ -+ return EXIT_SUCCESS; -+} diff --git a/build/meta-usr/recipes-usr/soo/usr-linux_1.0.bbappend b/build/meta-usr/recipes-usr/soo/usr-linux_1.0.bbappend index 3d7672f..9572521 100644 --- a/build/meta-usr/recipes-usr/soo/usr-linux_1.0.bbappend +++ b/build/meta-usr/recipes-usr/soo/usr-linux_1.0.bbappend @@ -1,46 +1,32 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD SUMMARY = "Add-ons for SOO user space environment" DESCRIPTION = "Additional applications are used to manage SO3 capsules" LICENSE = "GPLv2" -SRC_URI += " ${@ d.expand(d.getVar('SOO_URI') or '') \ - if 'soo' in (d.getVar('OVERRIDES') or '').split(':') else '' }" - -# These patches bring soo usr apps -FILESPATH:prepend = "${THISDIR}/../soo/files/0001-${PF}:" +# The SOO agency apps (src/soo, include/soo, include/core) are committed +# in-tree under linux/usr and built in place — no patch materialization. +# src/CMakeLists.txt permanently carries add_subdirectory(soo). Only the +# install step (staging the built binaries into the deploy dir) remains, +# gated on the :soo override. -require files/0001-${PF}-patches.inc - # Installing usr apps mean to move the binary and all files which need to # be copied to the rootfs. Be aware that it is a deploy directory and not # the rootfs itself; this is achieved with the do_deploy task (by the bsp recipe) do_install_apps:append () { - + if echo ":${OVERRIDES}:" | grep -q ":soo"; then - usr_do_install_file_root "${IB_TARGET}/build/src/soo/injector" - usr_do_install_file_root "${IB_TARGET}/build/src/soo/restoreme" - usr_do_install_file_root "${IB_TARGET}/build/src/soo/saveme" - usr_do_install_file_root "${IB_TARGET}/build/src/soo/melist" - usr_do_install_file_root "${IB_TARGET}/build/src/soo/shutdownme" + usr_do_install_file_root "${IB_TARGET}/build/src/soo/s3c-inject" + usr_do_install_file_root "${IB_TARGET}/build/src/soo/s3c-restore" + usr_do_install_file_root "${IB_TARGET}/build/src/soo/s3c-save" + usr_do_install_file_root "${IB_TARGET}/build/src/soo/s3c-list" + usr_do_install_file_root "${IB_TARGET}/build/src/soo/s3c-shutdown" - usr_do_install_file_root "${IB_TARGET}/build/src/soo/emiso_engine/emiso_engine" usr_do_install_file_root "${IB_TARGET}/build/src/soo/fb_mapper" usr_do_install_file_root "${IB_TARGET}/build/src/soo/input_forwarding" - fi -} -do_clean:append() { - if echo ":${OVERRIDES}:" | grep -q ":soo"; then - - rm -rf ${IB_TARGET}/src/soo - rm -rf ${IB_TARGET}/include/soo - rm -rf ${IB_TARGET}/include/core - - rm -rf ${S} - - [ -f ${IB_TARGET}.back/src/CMakeLists.txt ] && \ - cp ${IB_TARGET}.back/src/CMakeLists.txt ${IB_TARGET}/src/ || true - - fi + usr_do_install_file_root "${IB_TARGET}/build/src/soo/emiso_engine/emiso_engine" + fi } diff --git a/build/meta/classes/base.bbclass b/build/meta/classes/base.bbclass index 8594c0b..b580471 100644 --- a/build/meta/classes/base.bbclass +++ b/build/meta/classes/base.bbclass @@ -4,6 +4,7 @@ # SPDX-License-Identifier: MIT # +inherit logging inherit patch inherit utils @@ -15,6 +16,7 @@ FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${P # THISDIR only works properly with imediate expansion as it has to run # in the context of the location its used (:=) + THISDIR = "${@os.path.dirname(d.getVar('FILE'))}" python () { @@ -55,6 +57,7 @@ DEPENDS:prepend = "${BASEDEPENDS} " # THISDIR only works properly with imediate expansion as it has to run # in the context of the location its used (:=) + THISDIR = "${@os.path.dirname(d.getVar('FILE'))}" addtask fetch @@ -180,16 +183,47 @@ python do_handle_fetch_git() { } do_unpack[postfuncs] = "do_handle_fetch_git" +# Default to the safe behaviour; set IB_FORCE_ATTACH=1 (env or local.conf) +# to override the dirty-tree guard below. +IB_FORCE_ATTACH ??= "0" + do_attach_infrabase () { + ib_manifest="${IB_TARGET}.attach.sha256" + + # Guard against silently clobbering local edits. + # + # do_attach_infrabase regenerates ${IB_TARGET} from the freshly + # fetched+patched ${S}. The fetched component trees (avz/, u-boot/, + # qemu/, ...) are gitignored, so an edit made directly in ${IB_TARGET} + # that hasn't been folded back into the patch set (via do_updiff) has no + # version-control safety net — re-attaching would destroy it. After each + # attach we record a sha256 manifest of the files we wrote; on the next + # attach we verify those files are still untouched and abort if any were + # modified or removed. Build artefacts produced by a later `make` are not + # in the manifest, so a freshly-built tree still verifies clean. Newly + # *added* source files are not tracked by the manifest — the ${IB_TARGET}.back + # copy remains the last-resort net for that case. + if [ -d "${IB_TARGET}" ] && [ -f "$ib_manifest" ] && [ "${IB_FORCE_ATTACH}" != "1" ]; then + ib_dirty=$(cd "${IB_TARGET}" && LC_ALL=C sha256sum -c --quiet "$ib_manifest" 2>/dev/null | sed -n 's/: FAILED.*$//p') + if [ -n "$ib_dirty" ]; then + bbwarn "Local modifications detected in ${IB_TARGET}, not captured in the ${PN} patch set:" + echo "$ib_dirty" | sed 's|^\./| |' >&2 + bbfatal "Refusing to re-attach ${PN} (would overwrite the files above). Run 'bitbake ${PN} -c updiff' to fold them into the patch set, or set IB_FORCE_ATTACH=1 to discard them and re-attach (prior tree is kept in ${IB_TARGET}.back)." + fi + fi + echo "Attaching ${PN} to ${IB_TARGET}" - + if [ -d "${IB_TARGET}" ]; then rm -rf ${IB_TARGET}.back mv ${IB_TARGET} ${IB_TARGET}.back fi - + mkdir -p ${IB_TARGET} cp -r ${S}/. ${IB_TARGET} + + # Record what we just wrote so the next attach can detect local edits. + ( cd "${IB_TARGET}" && find . -type f -print0 | LC_ALL=C sort -z | xargs -0 sha256sum ) > "$ib_manifest" 2>/dev/null || rm -f "$ib_manifest" } addtask cleansstate after do_clean diff --git a/build/meta/classes/logging.bbclass b/build/meta/classes/logging.bbclass index ce03abf..28cfd63 100644 --- a/build/meta/classes/logging.bbclass +++ b/build/meta/classes/logging.bbclass @@ -14,6 +14,7 @@ LOGFIFO = "${T}/fifo.${@os.getpid()}" # Print the output exactly as it is passed in. Typically used for output of # tasks that should be seen on the console. Use sparingly. # Output: logs console + bbplain() { if [ -p ${LOGFIFO} ] ; then printf "%b\0" "bbplain $*" > ${LOGFIFO} @@ -24,6 +25,7 @@ bbplain() { # Notify the user of a noteworthy condition. # Output: logs + bbnote() { if [ -p ${LOGFIFO} ] ; then printf "%b\0" "bbnote $*" > ${LOGFIFO} @@ -35,6 +37,7 @@ bbnote() { # Print a warning to the log. Warnings are non-fatal, and do not # indicate a build failure. # Output: logs console + bbwarn() { if [ -p ${LOGFIFO} ] ; then printf "%b\0" "bbwarn $*" > ${LOGFIFO} @@ -46,6 +49,7 @@ bbwarn() { # Print an error to the log. Errors are non-fatal in that the build can # continue, but they do indicate a build failure. # Output: logs console + bberror() { if [ -p ${LOGFIFO} ] ; then printf "%b\0" "bberror $*" > ${LOGFIFO} @@ -57,6 +61,7 @@ bberror() { # Print a fatal error to the log. Fatal errors indicate build failure # and halt the build, exiting with an error code. # Output: logs console + bbfatal() { if [ -p ${LOGFIFO} ] ; then printf "%b\0" "bbfatal $*" > ${LOGFIFO} @@ -69,6 +74,7 @@ bbfatal() { # Like bbfatal, except prevents the suppression of the error log by # bitbake's UI. # Output: logs console + bbfatal_log() { if [ -p ${LOGFIFO} ] ; then printf "%b\0" "bbfatal_log $*" > ${LOGFIFO} @@ -84,6 +90,7 @@ bbfatal_log() { # Output: logs console # Usage: bbdebug 1 "first level debug message" # bbdebug 2 "second level debug message" + bbdebug() { USAGE='Usage: bbdebug [123] "message"' if [ $# -lt 2 ]; then diff --git a/build/meta/classes/patch.bbclass b/build/meta/classes/patch.bbclass index 12b730d..f6a23a6 100644 --- a/build/meta/classes/patch.bbclass +++ b/build/meta/classes/patch.bbclass @@ -1,5 +1,6 @@ # Copyright (C) 2006 OpenedHand LTD -# Copyright (C) 2023-2025 EDGEMTech Ltd +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD +# Copyright (C) 2023-2026 EDGEMTech Ltd # # SPDX-License-Identifier: MIT @@ -23,6 +24,14 @@ python () { d.appendVarFlag('do_patch', 'prefuncs', ' patch_task_patch_prefunc') for task in extratasks: d.appendVarFlag(task, 'postfuncs', ' patch_task_postfunc') + + # Append patch_save_pristine after every other do_unpack postfunc — in + # particular do_handle_fetch_git from base.bbclass, which is what + # actually populates ${S} on git-fetched recipes. Done here (parse-time + # anonymous python) so we run AFTER base.bbclass's `do_unpack[postfuncs] + # = ...` overwrite, preserving the run order + # handle_fetch_git → patch_save_pristine. + d.appendVarFlag('do_unpack', 'postfuncs', ' patch_save_pristine') } python patch_task_patch_prefunc() { @@ -175,82 +184,412 @@ def get_next_number(patchdir): do_diffcompose[nostamp] = "1" +# Save an untouched copy of ${S} right after do_unpack (+ its +# do_handle_fetch_git postfunc) populates it, BEFORE do_patch mutates the +# tree. do_diffcompose later compares this pristine snapshot against +# IB_TARGET so that the staged patches reflect the FULL divergence of +# IB_TARGET from upstream — enabling do_updiff to consolidate per-file +# patches instead of appending an ever-growing chain. + +python patch_save_pristine() { + import os + import shutil + s = d.getVar('S') + if not s or not os.path.isdir(s): + return + pristine = s + '.pristine' + if os.path.isdir(pristine): + shutil.rmtree(pristine) + shutil.copytree(s, pristine, symlinks=True) +} + # Infrabase patch generation algorithm +# +# Produces per-file patches in ${FILE_DIRNAME}/files/${PF}/ comparing the +# pristine upstream sources (${S}.pristine, saved by patch_save_pristine +# right after do_unpack) against the local working tree (IB_TARGET). Each +# staged patch is therefore a self-contained "upstream → final" diff for +# one source file; do_updiff can drop it in place at the slot of the +# existing patch for that file, fully replacing the previous content. +# +# Patch headers use git-style "a/" / "b/" labels so the resulting +# patches apply cleanly with `patch -p1` from the source tree root, +# independent of where the project was checked out. Earlier versions of +# this task wrote absolute paths on both sides (e.g. /home/...//.../), +# which silently broke as soon as the repository was cloned anywhere else. +# +# The staging directory ${FILE_DIRNAME}/files/${PF}/ is wiped and recreated +# on every run so that stale patches from previous invocations do not leak +# into the new patchset (do_updiff promotes this directory in place into +# the existing numbered patchset). + python patch_do_diffcompose() { + import os + import re + import shlex + import shutil import subprocess - - source_dir = d.getVar('S') + + source_dir = d.getVar('S') + '.pristine' + if not os.path.isdir(source_dir): + bb.fatal( + f"do_diffcompose: pristine source {source_dir} missing. " + f"Run './scripts/build.sh -xc {d.getVar('PN')}' first so that " + f"do_unpack regenerates the pristine snapshot, then re-run updiff." + ) target_dir = d.getVar('IB_TARGET') - output_dir = d.getVar('FILE_DIRNAME') + '/files/' + d.getVar('PF') - - # Create the output directory if it doesn't exist - os.makedirs(output_dir, exist_ok=True) - - # Diff files - - # To avoid having the temporary file in the directory to patch, - # we create it in the parent directory. + output_dir = os.path.join(d.getVar('FILE_DIRNAME'), 'files', d.getVar('PF')) + + if os.path.isdir(output_dir): + shutil.rmtree(output_dir) + os.makedirs(output_dir) + diff_files_tmp = os.path.join(d.getVar('TMPDIR'), "diff_files.tmp") - - statement = 'diff -Nrq -x "*.su" -x "*.o.d" -x "*.ko" -x "*.mod.*" -x "*.o" -x "*.cmd" -x "*.a" --no-dereference --exclude=.git ' + source_dir + ' . > ' + diff_files_tmp + + # Enumerate differing/added/removed files. cwd=target_dir so the target + # side of each line is reported as "./". + # + # Excludes filter out build artefacts that leak into IB_TARGET when the + # user runs `make` before `updiff`. Without this filter the patchset + # gets polluted with hundreds of generated files (kconfig output, dtc + # intermediates, kbuild auto-generated headers, etc.). Patterns are + # matched against basenames by `diff -x`. + exclude_patterns = [ + # compiler / linker object artefacts. NOTE: *.lds is NOT excluded — + # SO3 ships hand-written linker scripts (e.g. arch/*/so3.lds) and + # filtering them silently kills the corresponding source patch. + '*.o', '*.a', '*.ko', '*.so', '*.cmd', '*.su', '*.o.d', '*.d', + '*.mod', '*.mod.*', + # kbuild auto-generated headers and asm. NOTE: *.lds is generated + # only for some files (e.g. arch/arm64/kernel/module.lds.S → module.lds); + # we cannot blacklist `*.lds` globally so individual names go below. + 'autoconf.h', 'asm-offsets.h', 'asm-offsets.s', + 'devicetable-offsets.h', 'devicetable-offsets.s', + 'elfconfig.h', 'module.lds', + # lex / yacc / bison generated parsers — kconfig, dtc, and any other + # consumer of flex/bison. Sources are *.l / *.y (kept); outputs are + # *.lex.c, *.tab.c, *.tab.h (excluded). + 'lex.zconf.c', 'zconf.tab.c', 'zconf.hash.c', + '*lex.lex.c', '*.lex.c', '*.tab.c', '*.tab.h', '*lexer.l.c', + # kconfig output / state files + '.config', '.config.old', 'auto.conf', 'auto.conf.cmd', + 'tristate.conf', 'config_data', 'config_data.gz', 'config_data.h', + # generated SO3 syscall tables + 'syscall_number.h', 'syscall_table.h', 'syscall_table.h.in', + # device-tree build outputs and intermediates (the *.tmp pattern + # also catches the leading-dot dtc temp files such as + # ".virt64.dtb.dts.tmp") + '*.dtb', '*.dtbo', '*.tmp', + # vmlinux + kallsyms-pass artefacts (`.tmp_vmlinux*.{syms,kallsyms.S}`, + # `.vmlinux.export.c`, `.version` — the build counter file at root). + 'vmlinux*', '.vmlinux.*', '.version', '.tmp_*', '.missing-*', + 'System.map', 'Module.symvers', + 'modules.builtin', 'modules.builtin.modinfo', 'modules.order', + # u-boot build outputs (final binaries, maps, configs) + 'u-boot', 'u-boot.cfg*', 'u-boot.sym', 'u-boot.srec', + 'u-boot.map', 'u-boot.lds', 'u-boot.bin', 'u-boot.bin.*', + 'u-boot-dtb*', 'u-boot-nodtb*', + # u-boot kbuild-generated config + example/efi build outputs that + # leak into IB_TARGET after a `make` (include/generated and + # include/config are dir-excluded below; these live elsewhere). + 'autoconf.mk', 'autoconf.mk.dep', '*.srec', + 'efi_miniapp_*.h', + # initramfs build deps + '.initramfs_*', + ] + # Exclude the quilt working directory + kbuild-generated trees: + # patches/ — quilt staging from do_attach_infrabase + # include/generated/ — kbuild's auto-generated arch headers (cfi.h, + # delay.h, etc. from arch/*/include/asm/Kbuild) + # include/config/ — kbuild's symbol-tracking files + excludes = ' '.join(f'-x "{p}"' for p in exclude_patterns) + excludes += ' --exclude=.git --exclude=patches' + excludes += ' --exclude=generated --exclude=config' + # Recipe-supplied extra excludes — space-separated directory/file + # basenames (glob), matched by `diff --exclude` at any depth. Used for + # things that vary per recipe and would otherwise flood the patchset, + # most notably an out-of-tree build directory (e.g. QEMU's meson/ninja + # `build/`, which holds 1000+ generated files). A blanket exclude in + # this shared class would be unsafe (another recipe might ship real + # source under such a name), so each recipe opts in via IB_UPDIFF_EXCLUDE. + for x in (d.getVar('IB_UPDIFF_EXCLUDE') or '').split(): + excludes += f' --exclude={shlex.quote(x)}' + statement = ( + f'diff -Nrq {excludes} --no-dereference ' + f'{shlex.quote(source_dir)} . > {shlex.quote(diff_files_tmp)}' + ) subprocess.call(statement, shell=True, cwd=target_dir) - - # Prefix before patch (ex. : 0001-mypatch.patch) + new_number = 1 - + src_norm = source_dir.rstrip('/') + '/' + with open(diff_files_tmp, "r") as diff_file: - for line in diff_file: - line = line.strip() - line_parts = line.split() - - type = line_parts[0] - src = line_parts[1] - target = line_parts[3] - - filename = os.path.basename(target) - statement = 'diff --no-dereference -Naur ' + src + ' ' + target + ' --exclude=.git > ' + output_dir + '/' + f"{new_number:04d}-{filename}" + '.patch' - subprocess.call(statement, shell=True, cwd=target_dir) - + for raw_line in diff_file: + line = raw_line.rstrip('\n') + if not line: + continue + + src_path = None + tgt_path = None + rel = None + + # Form 1: "Files and differ" + m = re.match(r'^Files (.+) and (.+) differ$', line) + if m: + src_path = m.group(1) + tgt_path = m.group(2) + if tgt_path.startswith('./'): + rel = tgt_path[2:] + elif src_path.startswith(src_norm): + rel = src_path[len(src_norm):] + else: + bb.warn(f"do_diffcompose: cannot derive relative path for: {line}") + continue + else: + # Form 2: "Only in : " + m = re.match(r'^Only in (.+): (.+)$', line) + if not m: + bb.warn(f"do_diffcompose: unrecognised diff -Nrq line: {line}") + continue + only_dir = m.group(1) + only_name = m.group(2) + full = os.path.join(only_dir, only_name) + if only_dir == source_dir or only_dir.startswith(src_norm): + # Present only in source -> file deleted in target. + src_path = full + rel = os.path.relpath(full, source_dir) + tgt_path = os.path.join('.', rel) + else: + # only_dir is relative to cwd=target_dir; file added locally. + tgt_path = full + rel = os.path.relpath(full, '.') + src_path = os.path.join(source_dir, rel) + + filename = os.path.basename(rel) + output_patch = os.path.join(output_dir, f"{new_number:04d}-{filename}.patch") + + # Per-file unified diff with git-style a/ b/ labels so + # the patch applies cleanly with `patch -p1` regardless of the + # checkout location. + cmd = [ + 'diff', '--no-dereference', '-uN', + '--label', f'a/{rel}', + '--label', f'b/{rel}', + src_path, tgt_path, + ] + with open(output_patch, 'wb') as out: + subprocess.run(cmd, stdout=out, cwd=target_dir, check=False) + + # `diff -uN` emits "Binary files and differ" instead of + # a usable hunk when either side is binary. Writing that as a + # .patch file makes do_patch fail later with "Only garbage was + # found in the patch input". These are typically build + # artefacts (e.g. compiled scripts/kconfig/conf) that leaked + # into IB_TARGET; just drop the patch and move on. + with open(output_patch, 'rb') as f: + first = f.readline() + if first.startswith(b'Binary files '): + bb.note(f"do_diffcompose: skipping binary file: {rel}") + os.remove(output_patch) + continue + new_number += 1 - + os.remove(diff_files_tmp) } def generate_src_uri(patch_directory): - patches = [patch for patch in os.listdir(patch_directory) if patch.endswith(".patch")] - src_uri = "SRC_URI += \"\\ \n" + patches = sorted(p for p in os.listdir(patch_directory) + if p.endswith(".patch")) + # Standard header so repeated updiff runs don't churn it out of the .inc. + src_uri = "# Copyright (c) 2025-2026 EDGEMTech SA\n\n" + src_uri += "SRC_URI += \"\\ \n" for patch in patches: src_uri += " file://" + patch + " \\ \n" src_uri += "\"\n" - return src_uri.strip() + return src_uri + + +def patch_identifier(path): + """Return the relative path encoded in a patch's "--- a/" or + "+++ b/" header line. Patches produced by do_diffcompose always + carry git-style a/ b/ labels, so this identifier uniquely + designates the source file the patch targets, independent of the + patch's own filename or sequence number.""" + src = None + dst = None + try: + with open(path, 'r', errors='replace') as f: + for i, line in enumerate(f): + if i > 8: + break + if line.startswith('--- '): + src = line[4:].rstrip('\r\n').split('\t', 1)[0] + elif line.startswith('+++ '): + dst = line[4:].rstrip('\r\n').split('\t', 1)[0] + break + except OSError: + return None + for s in (dst, src): + if not s or s == '/dev/null': + continue + if s.startswith('a/') or s.startswith('b/'): + return s[2:] + return s + return None + + +def index_patchset(directory): + """Build {relative_path: [patch_filename, ...]} for a patchset + directory. The list lets callers detect when several patches in the + series modify the same source file (a chain) and treat that case + specially — consolidation only works when exactly one patch targets a + given file.""" + idx = {} + if not os.path.isdir(directory): + return idx + for fname in sorted(os.listdir(directory)): + if not fname.endswith('.patch'): + continue + pid = patch_identifier(os.path.join(directory, fname)) + if pid is not None: + idx.setdefault(pid, []).append(fname) + return idx addtask do_updiff do_updiff[nostamp] = "1" +# Merge the staged patchset produced by do_diffcompose +# (${FILE_DIRNAME}/files/${PF}/) into the canonical numbered patchset. +# +# Staged patches are self-contained "pristine → IB_TARGET" diffs (one per +# source file). do_updiff decides, per file, between three outcomes: +# +# * CONSOLIDATE — the patchset already has exactly one patch targeting +# this file. We overwrite that patch in place with the new content +# (keeping its NNNN prefix and series position). This works because +# no earlier patch in the series modifies the file (otherwise the +# existing patch would coexist with another), so the slot's ${S} +# state at do_patch time equals the pristine state our diff is based +# on — the regenerated patch applies cleanly. +# * APPEND — no patch exists yet for this file. The next-available +# NNNN gets the new patch at the end of the series, where ${S} is +# already at its post-all-previous-patches state and the diff (which +# was generated against pristine) is the complete divergence from +# upstream → applies cleanly. +# * SKIP (chain warning) — the patchset already has TWO OR MORE patches +# for this file (a chain of incremental edits accumulated over past +# append-only updiff runs). Consolidation would have to pick one +# entry of the chain to overwrite, and the others would either be +# redundant or actively conflicting. Append would re-apply the chain's +# cumulative effect a second time at the end, which do_patch rejects. +# We log a warning and leave the chain alone; resolution is manual: +# either delete every patch in the chain except the first one (then +# re-run updiff to consolidate into that first slot), or hand-merge +# them into one patch. +# +# Patches present in the target but not in staging are ALWAYS kept +# untouched (e.g. when an existing patch creates a file that's been +# excluded from the diff, or when staging is empty because the user +# hasn't edited anything yet). +# +# If no numbered patchset exists yet, a fresh 0001-${PF}/ is populated. +# The corresponding NNNN-${PF}-patches.inc is regenerated (sorted) from +# the actual contents of the patchset directory. + python do_updiff() { - - # Get the highest four-digit number among existing files - highest_number = 0 - + import os + import re + import shutil + import filecmp + patchdir = d.getVar('FILE_DIRNAME') + '/files/' - - new_number = get_next_number(patchdir) - - patchfile = d.getVar('PF') + ".patch" - - if not os.path.exists(patchfile): - patchfile = d.getVar('PF') - - # Rename the file with the new prefix - - new_filename = f"{new_number:04d}-{patchfile}" - - os.rename(patchdir + patchfile, patchdir + new_filename) - print(f"Renamed {patchfile} to {new_filename}") - - src_uri = generate_src_uri(patchdir + new_filename) - with open(patchdir + new_filename + "-patches.inc", 'w') as file: - file.write(src_uri) + pf = d.getVar('PF') + staging = os.path.join(patchdir, pf) + + if not os.path.isdir(staging): + bb.fatal(f"do_updiff: staging directory {staging} not found " + "(run do_diffcompose first?)") + + # Find existing numbered patchsets matching this PF. + pattern = re.compile(r'^(\d{4})-' + re.escape(pf) + r'$') + existing = [] + if os.path.isdir(patchdir): + for entry in os.listdir(patchdir): + full = os.path.join(patchdir, entry) + m = pattern.match(entry) + if m and os.path.isdir(full): + existing.append((int(m.group(1)), entry)) + + if existing: + existing.sort() + target_dirname = existing[0][1] + target_dir = os.path.join(patchdir, target_dirname) + bb.note(f"do_updiff: merging into existing patchset {target_dirname}") + else: + target_dirname = f"0001-{pf}" + target_dir = os.path.join(patchdir, target_dirname) + os.makedirs(target_dir, exist_ok=True) + bb.note(f"do_updiff: creating initial patchset {target_dirname}") + + target_idx = index_patchset(target_dir) + staging_idx = index_patchset(staging) + + # Highest existing NNNN prefix in the target — used for new patches. + used_numbers = set() + for fnames in target_idx.values(): + for fname in fnames: + try: + used_numbers.add(int(fname[:4])) + except ValueError: + pass + next_number = max(used_numbers, default=0) + 1 + + kept = consolidated = appended = skipped_chain = 0 + + # Per-file: CONSOLIDATE (overwrite the single existing patch), + # APPEND (no existing patch yet), or SKIP (existing chain — manual + # consolidation required). See the docstring above. + for pid, sname_list in staging_idx.items(): + # do_diffcompose only ever emits one patch per pid. + sname = sname_list[0] + spath = os.path.join(staging, sname) + existing = target_idx.get(pid, []) + if len(existing) == 1: + tname = existing[0] + tpath = os.path.join(target_dir, tname) + if filecmp.cmp(spath, tpath, shallow=False): + kept += 1 + else: + shutil.copyfile(spath, tpath) + consolidated += 1 + elif len(existing) == 0: + new_name = f"{next_number:04d}-{os.path.basename(pid)}.patch" + shutil.copyfile(spath, os.path.join(target_dir, new_name)) + next_number += 1 + appended += 1 + else: + bb.warn( + f"do_updiff: {pid} already has {len(existing)} patches " + f"in the series ({', '.join(existing)}). Refusing to " + f"append a cumulative diff on top: it would re-apply the " + f"chain's content and break do_patch. Manually merge the " + f"chain into a single patch, then re-run updiff." + ) + skipped_chain += 1 + + # Drop the staging directory. + shutil.rmtree(staging) + + # Regenerate the .inc manifest (sorted, deterministic). + inc_path = os.path.join(patchdir, target_dirname + "-patches.inc") + with open(inc_path, 'w') as f: + f.write(generate_src_uri(target_dir)) + + bb.plain(f"do_updiff: patchset {target_dirname}: " + f"{kept} unchanged, {consolidated} consolidated, " + f"{appended} appended, {skipped_chain} skipped (existing chain) " + f"({sum(len(v) for v in target_idx.values())} existing patches kept intact)") } addtask do_diffcompose before do_updiff diff --git a/build/meta/classes/utils.bbclass b/build/meta/classes/utils.bbclass index ce45da8..4d5bcf8 100644 --- a/build/meta/classes/utils.bbclass +++ b/build/meta/classes/utils.bbclass @@ -2,9 +2,10 @@ # # Various utility functions # -# Copyright (c) 2025 EDGEMTech Ltd +# Copyright (c) 2025-2026 EDGEMTech Ltd +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD # -# Authors: +# Authors: # EDGEMTech Ltd, Daniel Rossier (daniel.rossier@edgemtech.ch) # EDGEMTech Ltd, Erik Tagirov (erik.tagirov@edgemtech.ch) # @@ -30,136 +31,29 @@ def base_set_filespath(path, d): filespath.append(os.path.join(p, o)) return ":".join(filespath) -# Check if the user is root -def utils_chk_is_root_user(d): - - import os - - if os.geteuid() == 0: - return True - - return False - -# Get uid of the user that ran sudo or su, by -# first attempting to check if the IB_UNPRIVILEDGED_USER_ID -# env var is present this env var is set by env.sh +# Run a single command under `sudo -n` (non-interactive). bitbake itself +# runs unprivileged: only the specific operations that genuinely need +# root (mount/umount/losetup/mkfs/parted/...) are escalated here. # -# if not present then fallback to -# getting the username via logname(1) which uses -# the user name of the active session similar to who -m -# However logname(1) returns the user that opened the session -# so doesn't work if running BB while impersonating a service account - -def utils_get_user_uid(d): - import subprocess - import os - - IB_UNPRIVILEDGED_USER_ID = d.getVar("IB_UNPRIVILEDGED_USER_ID") - - if IB_UNPRIVILEDGED_USER_ID: - return int(IB_UNPRIVILEDGED_USER_ID) - - # Fallback method - try: - - login_name = subprocess.check_output(["logname"], - stderr=subprocess.DEVNULL).strip().decode() - - uid = subprocess.check_output(["id", "-u", login_name], - stderr=subprocess.DEVNULL).strip().decode() - - except Exception as e: - bb.fatal(f"Failed to retrieve user uid error: {e}") - - return int(uid) - -def utils_get_user_gid(d): - import subprocess - import os - - IB_UNPRIVILEDGED_GROUP_ID = d.getVar("IB_UNPRIVILEDGED_GROUP_ID") - - if IB_UNPRIVILEDGED_GROUP_ID: - return int(IB_UNPRIVILEDGED_GROUP_ID) - - # Fallback method - try: - - login_name = subprocess.check_output(["logname"], - stderr=subprocess.DEVNULL).strip().decode() - - gid = subprocess.check_output(["id", "-g", login_name], - stderr=subprocess.DEVNULL).strip().decode() - - except Exception as e: - bb.fatal(f"Failed to retrieve user gid error: {e}") - - return int(gid) - -# Change the owner of a file or directory to the user that opened the -# the session because for the filesystem or rootfs recipes bitbake -# is executed through sudo, Therefore -# changing back to the user required to avoid -# the need for sudo when cleaning the build/tmp directory - -def utils_chown_file(d, path, follow_symlinks=True, recursive=True): - import os +# The caller chain (deploy.sh / build.sh / mount.sh / umount.sh) MUST +# have validated the sudo timestamp via `sudo_session_start` before +# bitbake is launched — otherwise the very first `utils_sudo` call +# fails fast with sudo's standard "a password is required" message. +# +# Args: +# cmd: list of argv items (preferred) — escapes nothing for you +# but is shell-injection-proof +# shell: when True, `cmd` is a shell command string and the call +# becomes `sudo -n sh -c `. Use this for pipelines. +# Stdout redirection inside `cmd` runs as root: pass +# `stdout=open(path, 'wb')` instead to keep the output file +# user-owned. +# **kwargs: forwarded to subprocess.run (check, capture_output, +# input, stdin, stdout, stderr, text, cwd, env, ...). + +def utils_sudo(cmd, shell=False, **kwargs): import subprocess - - uid = utils_get_user_uid(d) - gid = utils_get_user_gid(d) - - try: - param = "-" - - if follow_symlinks: - param = f"{param}L" - - if os.path.isdir(path) and recursive: - param = f"{param}R" - - if os.path.islink(path): - # Change the owner of the link itself - subprocess.check_output(["chown", f"{uid}:{gid}", path]).strip().decode() - - if param != "-": - subprocess.check_output(["chown", param, f"{uid}:{gid}", path]).strip().decode() - else: - subprocess.check_output(["chown", f"{uid}:{gid}", path]).strip().decode() - - except Exception as e: - bb.fatal(f"Failed to change the owner of dir/file: {path} error: {e}") - - -# Change ownership of directory - -# seperate function for clarity at the call site - -def utils_chown_dir(d, dir_path, follow_symlinks=True, recursive=True): - - utils_chown_file(d, dir_path, follow_symlinks, recursive) - -# Changes ownership of bitbake cache tmp/cache -# and the temp dir of the task -# NOTE: This is only called by tasks executed as root - -def utils_restore_user_ownership(d): - - CACHE_PATH = d.getVar("CACHE") - WORKDIR = d.getVar("WORKDIR") - - # Reset the ownership incl. symlinks bitbake creates - utils_chown_dir(d, CACHE_PATH) - utils_chown_dir(d, CACHE_PATH, follow_symlinks=False) - - # Follow symlinks - utils_chown_dir(d, f"{WORKDIR}/temp") - - # Change the ownership of all the symlinks in 'temp' - utils_chown_dir(d, f"{WORKDIR}/temp", follow_symlinks=False) - - # The 'temp' directory itself - utils_chown_dir(d, f"{WORKDIR}/temp", follow_symlinks=False, recursive=False) - - # And finally, the workdir but not its contents - utils_chown_dir(d, f"{WORKDIR}", follow_symlinks=False, recursive=False) + if shell: + return subprocess.run(["sudo", "-n", "sh", "-c", cmd], **kwargs) + return subprocess.run(["sudo", "-n"] + list(cmd), **kwargs) diff --git a/build/meta/conf/bitbake.conf b/build/meta/conf/bitbake.conf index ec68358..e440ecd 100644 --- a/build/meta/conf/bitbake.conf +++ b/build/meta/conf/bitbake.conf @@ -21,6 +21,13 @@ # Necessary to retrieve global variables from there include conf/local.conf +# Optional per-machine overrides, loaded after local.conf so they win. +# Untracked (see .gitignore): this is where a machine deviates from the +# tree defaults — e.g. publishing the TEZI feed somewhere else than +# ${IB_HTTP_DEPLOY_PATH}. Absent on most machines; `include` is silent +# when the file does not exist. +include conf/site.conf + # its own in staging ASSUME_PROVIDED = "\ patch-native \ @@ -68,6 +75,7 @@ PATCHTOOL = "patch" # EDGEMTech # Please do *not* change the IB directory path, it corresponds to the root dir of IB repository + IB_DIR = "${TOPDIR}/.." CORES = "$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu || echo "$NUMBER_OF_PROCESSORS")" diff --git a/build/meta/conf/layer.conf b/build/meta/conf/layer.conf index 0b5927d..1bd1c8b 100644 --- a/build/meta/conf/layer.conf +++ b/build/meta/conf/layer.conf @@ -1,3 +1,6 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + BBPATH .= ":${LAYERDIR}" BBFILES += "${LAYERDIR}/recipes-*/*/*.bb" @@ -12,5 +15,6 @@ LAYERSERIES_CORENAMES = "infrabase_core" # This should only be incremented on significant changes that will # cause compatibility issues with other layers + LAYERVERSION_core = "1" LAYERSERIES_COMPAT_core = "infrabase_core" diff --git a/build/meta/recipes-core/core/core_1.0.bb b/build/meta/recipes-core/core/core_1.0.bb index fb38f24..0d347b4 100644 --- a/build/meta/recipes-core/core/core_1.0.bb +++ b/build/meta/recipes-core/core/core_1.0.bb @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD DESCRIPTION = "Core recipe" diff --git a/doc/source/build.rst b/doc/source/build.rst new file mode 100644 index 0000000..f5bd9a3 --- /dev/null +++ b/doc/source/build.rst @@ -0,0 +1,185 @@ +.. _build: + +Build system +############ + +MICOFE is built with the **Infrabase** build system (bitbake based), aligned on +the SO3 release the framework is pinned to (currently the ``v6.3.0`` tag). +The build tree follows the SO3 reference model: shared recipes and scripts are +kept identical to SO3, and only genuine MICOFE additions (the framebuffer/input +forwarding, the EMISO engine, the agency applications) diverge. + +Source model +************ + +The components fall into two categories: + +* **Fetched** components: ``so3`` (the capsule kernel), ``avz`` (the + hypervisor), ``u-boot`` and ``qemu`` are fetched at build time from their + upstream repositories. SO3 and AVZ are pinned to an SO3 release tag through + ``SRCREV`` / ``IB_SO3_TAG`` in ``build/meta-so3/recipes-so3/{so3,avz}``. The + fetched trees at the repository root (``so3/``, ``avz/``, ``u-boot/``, + ``qemu/``) are build products and are not committed. + +* **In-tree** components: the Linux agency kernel patches live in + ``build/meta-linux`` — the SOO agency set follows the SO3 ``soo-generic`` + model (one generic patch directory shared by every agency kernel, plus a + per-kernel directory whose same-named patches shadow the generic ones); + the MICOFE vfbdev/vinput backends and their wiring are carried directly + in MICOFE's copy of the generic set — and the MICOFE user space applications are committed + under ``linux/usr`` (``src/soo`` holds the capsule management applications, + the framebuffer/input forwarders and the EMISO engine). They are built in + place — no patch materialization. + +Building +******** + +The entry point is ``scripts/build.sh`` with a positional recipe name:: + + ./scripts/build.sh bsp-linux # full agency BSP (kernel, u-boot, rootfs, usr, ITBs) + ./scripts/build.sh bsp-capsules # the SO3 capsule image (virt64_capsule.itb) + ./scripts/build.sh so3 # a single component (also: avz, uboot, usr-linux, ...) + ./scripts/build.sh -l # list the available recipes + ./scripts/build.sh -c bsp-linux # clean, then rebuild + +For a fast edit/build loop on the user-space applications, +``scripts/makeusr.sh`` (run from ``linux/usr``) does a direct cmake+make — +including the out-of-tree kernel modules — without driving bitbake; +``deploy.sh usr-linux`` then pushes the result onto the media. + +bitbake runs unprivileged; the few privileged operations (losetup, mkfs, +rootfs extraction) go through ``sudo -n``. Run +``scripts/common/setup_sudo.sh`` once so the sudo timestamp is shared with the +build (it installs a sudoers drop-in enabling global timestamps). + +Building ``bsp-linux`` bakes the agency applications **into** +``rootfs.cpio``: the user space is compiled, then injected into the rootfs +archive as a build step. Deploying never rebuilds nor modifies that archive. + +Containerized build (dbuild.sh) +=============================== + +The whole build environment (cross toolchains — including the bare-metal +``aarch64-none-elf`` AVZ/SO3 toolchain that is so easy to miss on a +hand-provisioned host — host packages, Python) is available as a Docker +image, defined under ``docker/build-env`` and driven by +``scripts/dbuild.sh``:: + + ./scripts/dbuild.sh --build # build the micofe-build:1.0 image (once) + ./scripts/dbuild.sh build.sh bsp-linux # run any front-end script inside + ./scripts/dbuild.sh # interactive shell, env.sh sourced + ./scripts/dbuild.sh st.sh -d # graphical QEMU from the container + +The image carries only the environment: the repository stays on the host +and is bind-mounted **at its own absolute path**, so bitbake stamps, the +buildroot host tree and the CMake caches remain valid and a tree can be +built from inside or outside the container interchangeably. The container +runs as the calling host user (UID/GID mapped at run time) and carries a +blanket sudo rule, so the privileged storage steps never prompt. + +Image assembly (ITS render) +=========================== + +The FIT image sources (``.its``) are **templates** committed in the layers +(``build/meta-bsp/recipes-bsp/{linux,so3}/files/its/``). At build time the +shared ``do_render_its`` task expands their ``${IB_*_PATH}`` placeholders and +renders them into the git-ignored ``linux/images/`` (or ``so3/images/``), +where ``do_itb`` runs ``mkimage``. The embedded ramfs is selected by +``IB_RAMFS_SOURCE`` in ``build/conf/local.conf``: + +* ``"initrd"`` (MICOFE default) — the small, git-tracked + ``board//initrd.cpio`` busybox ramdisk. Its ``/init`` mounts the ext4 + rootfs on the second partition and ``switch_root``'s into it (two-stage + boot). +* ``"rootfs"`` — the full buildroot ``rootfs.cpio``, run from RAM. + +Deploying +********* + +``scripts/deploy.sh`` is a pure media write (nothing is rebuilt):: + + ./scripts/deploy.sh bsp-linux # ITBs + uEnv.txt on p1, agency rootfs on p2 + ./scripts/deploy.sh bsp-capsules # capsule .itb into p2:/mnt/capsules/image/ + +The target is the ``filesystem/work/sdcard.img.`` image +(``IB_STORAGE_MODE = "soft"``), created once with +``./scripts/build.sh filesystem``. + +Booting +******* + +``scripts/st.sh`` boots the deployed image in QEMU (serial console on stdio). +The AVZ boot is a **two-ITB chain**: U-Boot loads ``virt64_avz.itb`` (the +hypervisor) and ``virt64_guest.itb`` (the Linux agency), then jumps to AVZ +through the ``guest-boot`` command (AVZ FIT in ``x0``, guest ITB in ``x1``). +``st.sh`` detects the AVZ configuration from the selected ITS and enables EL2 +(``-M virt,virtualization=on``) automatically. + +The agency then performs the two-stage boot: the embedded busybox ramdisk +mounts the full rootfs on ``/dev/vda2`` and switches into it, up to the MICOFE +login on the serial console. + +Target platforms +**************** + +The platform is selected by ``IB_PLATFORM`` in ``build/conf/local.conf``. +When switching platforms, purge the per-recipe work directories and stamps +(``build/tmp/work``, ``build/tmp/stamps``) together with the in-place source +trees (``so3/``, ``avz/``, ``linux/usr/build``) — the fetched/attached trees +are replaced by the new platform's sources and a stale tree silently builds +the wrong target. + +virt64 (QEMU) +============= + +The development and validation platform. The whole stack is runtime-validated +there: agency boot, capsule injection (``s3c-*`` tools and the EMISO REST +API), the per-capsule VLOGS logs and the virtualized framebuffer chain. ``st.sh -d`` +opens the QEMU GTK window showing the SO3/PL111 screen; the agency real +framebuffer additionally requires modern virtio:: + + ./scripts/st.sh "-global virtio-mmio.force-legacy=false -device virtio-gpu-device" + +rpi4_64 (Raspberry Pi 4) +======================== + +Set ``IB_PLATFORM ?= "rpi4_64"`` and build as usual — the full chain compiles +up to the two AVZ boot images (``rpi4_64_avz.itb`` and +``rpi4_64_linux_guest.itb`` under ``linux/images/``): the SO3 capsule, AVZ +(``rpi4_64_avz_soo_defconfig``), the Raspberry Pi kernel with the SOO agency +patch set (including the vfbdev/vinput backends), the ``bcm2711-rpi-4-b.dtb`` +and the buildroot root file system. The AVZ guest ITS load addresses follow +the rpi4 memory map (kernel ``0x10000000``, FDT ``0x15000000``, initrd +``0x15c00000``; AVZ at ``0x00080000``). + +.. note:: + + The rpi4_64 environment is **build-validated only** — it has not been + booted on a board yet. Flashing, the U-Boot/`guest-boot` bring-up and + the framebuffer test on the real scanout are the next step. + +.. note:: + + The user-space test module for rpi4_64 is the generic ``modtry``; the + Sense-HAT ``senseled`` module requires the ``VSENSELED``/``VSENSEJ`` + kernel backends, which have never been enabled in the rpi4 defconfig. + +Capsule lifecycle +***************** + +The capsule management applications shipped in the agency ``/root`` are the +SO3 ``s3c-*`` tools:: + + s3c-inject /mnt/capsules/image/virt64_capsule.itb # inject and start a capsule + s3c-list # list residing capsules and their state + s3c-save # snapshot a capsule + s3c-restore # restore a snapshot + s3c-shutdown # shut a capsule down + +They talk to the SOO core driver through ``/dev/soo/core`` (char device, +major 126), created at boot by the ``/etc/init.d/S30soo`` script (the agency +runs SysVinit). A living capsule exposes its console through the vuart +backend, multiplexed on the agency serial console. + +The :ref:`EMISO engine ` offers the same lifecycle through a +Docker-compatible REST API. diff --git a/doc/source/emiso.rst b/doc/source/emiso.rst index 25de9f5..cded368 100644 --- a/doc/source/emiso.rst +++ b/doc/source/emiso.rst @@ -46,10 +46,17 @@ Where Service ******* -A ``emiso`` service has been added to help control the engine. Currently this -service only starts the ``emiso-engine``. +A ``emiso`` systemd service exists to help control the engine on +systemd-based root file systems. -Usage: +.. note:: + + The current MICOFE agency boots with **SysVinit** (busybox), so the + systemd unit is inert there — start the engine from the agency shell + (``/root/emiso_engine &``, log on its stdout) or wire an + ``/etc/init.d`` script. + +Usage on a systemd rootfs: * Control @@ -83,9 +90,10 @@ The different blocks of the engine are: Daemon ****** -The EMISO engine *Daemon* provides an interface to interact with the SO3 capsule. -SO3 capsule are SOO Mobile Entity (ME). ME has been instrumented to be controlled -by the daemon. +The EMISO engine *Daemon* provides an interface to interact with the SO3 +capsules (S3C — the concept formerly called *Mobile Entity*). The capsules are +controlled by the daemon through the SOO core driver (``/dev/soo/core``), the +same interface used by the ``s3c-*`` command line tools. The following table provides the mapping between the Docker and SO3 elements. The Docker elements which are not present in the table - like volumes, networks, … - @@ -112,7 +120,8 @@ SO3 Images ========== An SO3 capsule image consists in a SO3 “itb” file. These images are stored in -``/root/capsule/`` folder. +the ``/mnt/capsules/image/`` folder of the agency (populated by +``deploy.sh bsp-capsules``, see :doc:`build`). SO3 Capsule - Creation ======================== @@ -158,7 +167,7 @@ is sent to the Linux kernel via the VLOGS backend/frontend drives. The logged messages are stored in dedicated log files. Each capsule has its own file. The file path for these logs is as follows: -* File path: ``/var/log/soo/me_.log`` +* File path: ``/var/log/soo/s3c_.log`` The following image shows an overview of this log's mechanism. @@ -171,10 +180,48 @@ The following image shows an overview of this log's mechanism. The behaviors is implemented this way: * **SO3 Capsule**: The ``logs`` function has been added to SO3 containers. This -function adds ``[ME:]`` prefix to the messages. +function adds ``[S3C:]`` prefix to the messages. * **linux**: syslog-ng has been configured to store the messages with this prefix in the logs files. .. note:: - All the ``me_.log`` files are deleted at boot time + All the ``s3c_.log`` files are deleted at boot time + +Quick validation +**************** + +The engine listens on port **2375** (the standard Docker daemon port). The +whole container lifecycle can be exercised from the agency shell with the +busybox ``wget``: + +.. code-block:: shell + + /root/emiso_engine & + + # Docker-compatible discovery (what Portainer probes) + wget -q -O - http://127.0.0.1:2375/_ping # -> OK + wget -q -O - http://127.0.0.1:2375/version # -> ApiVersion 1.43, engine 1.0 + wget -q -O - http://127.0.0.1:2375/images/json # -> lists virt64_capsule.itb + + # Container lifecycle (create = inject + snapshot + shutdown) + wget -q -O - --post-data='{"Image":"virt64_capsule"}' \ + "http://127.0.0.1:2375/containers/create?name=demo1" # -> {"Id": "0"} + wget -q -O - --post-data= http://127.0.0.1:2375/containers/0/start + wget -q -O - http://127.0.0.1:2375/containers/json # -> State "running" + +``s3c-list`` then reports the capsule as ``S3C_state_living``, and its console +shows up on the multiplexed agency serial console. + +.. note:: + + Container Ids start at 0, and a *created* (not started) container does + not appear in ``/containers/json`` — by design, creation snapshots the + capsule and shuts it down until ``start`` restores it. + +.. note:: + + The snapshot path performs a single 128 MB DMA allocation, so the agency + guest needs the 160 MB CMA pool (``linux,cma`` in ``virt64_guest.dts``, + inherited from the SO3 base since v6.2.1-rc). With a smaller pool the + ``create`` request freezes on a kernel BUG. diff --git a/doc/source/glossary.rst b/doc/source/glossary.rst index 79b544f..d0b3093 100644 --- a/doc/source/glossary.rst +++ b/doc/source/glossary.rst @@ -36,8 +36,14 @@ Glossary running container. Mobile Entity - Also abbreviated *ME*. The :term:`SOO` virtualization concept of a self-contained, - migratable execution unit on which SO3 capsules are based. + Also abbreviated *ME*. The historical :term:`SOO` name of the concept now + called the :term:`SO3 Capsule` (S3C): a self-contained execution unit that + can be injected, snapshotted and restored. The term only survives in older + code and papers. + + SO3 Capsule + Also abbreviated *S3C*. The current name of the :term:`mobile entity` + concept; see :term:`Capsule`. EMISO The engine, running in the :term:`agency domain` user space, that manages the diff --git a/doc/source/index.rst b/doc/source/index.rst index 4302080..018d45f 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -25,6 +25,7 @@ the SO3 operating system with Arm64 virtualization. introduction architecture + build emiso portainer syscalls_alignment diff --git a/docker/build-env/Dockerfile b/docker/build-env/Dockerfile new file mode 100644 index 0000000..9fade1e --- /dev/null +++ b/docker/build-env/Dockerfile @@ -0,0 +1,135 @@ +# Build environment for the MICOFE Infrabase build system. +# +# The image carries ONLY the host environment: cross toolchains, host +# packages, Python. It contains NO project source. The repository stays +# on the host and is bind-mounted by scripts/dbuild.sh at its own +# absolute path, so the same tree can be built from inside or outside +# the container interchangeably (bitbake stamps, the buildroot host tree, +# CMake caches and the *.attach.sha256 manifests all embed absolute paths). +# +# Build the image: scripts/dbuild.sh --build +# Use it: scripts/dbuild.sh build.sh bsp-linux +# scripts/dbuild.sh st.sh -d +# +# The build context is this directory only — never the project root, +# which holds tens of GB of build output. +# +# Copyright (c) 2026 REDS Institute - HEIG-VD + +# --------------------------------------------------------------------- +# Stage 1 — fetch the Arm cross toolchains +# --------------------------------------------------------------------- + +FROM ubuntu:24.04 AS toolchains + +# Pinned deliberately: these are the versions the build is validated +# with. Bump them here, rebuild the image and re-validate — never by +# installing something else on a host. +# +# Only the 64-bit toolchains are downloaded. The 32-bit ones come from +# apt (see packages.txt) because Ubuntu's packages carry exactly the +# prefixes the recipes pin. The 64-bit ones do NOT: Ubuntu's +# gcc-aarch64-linux-gnu installs "aarch64-linux-gnu-", while +# IB_TOOLCHAIN:virt64/:rpi4_64 and the patched kernel Makefile pin +# "aarch64-none-linux-gnu-". + +ARG AARCH64_LINUX_VER=12.3.rel1 +ARG AARCH64_ELF_VER=12.3.rel1 +ARG ARM_BASE=https://developer.arm.com/-/media/Files/downloads/gnu + +RUN apt-get update && apt-get install -y --no-install-recommends \ + ca-certificates curl xz-utils \ + && rm -rf /var/lib/apt/lists/* + +RUN mkdir -p /opt/toolchains + +# Linux-hosted toolchain: 64-bit kernel and U-Boot (virt64, rpi4_64). + +RUN curl -fSL "${ARM_BASE}/${AARCH64_LINUX_VER}/binrel/arm-gnu-toolchain-${AARCH64_LINUX_VER}-$(uname -m)-aarch64-none-linux-gnu.tar.xz" \ + | tar -xJ -C /opt/toolchains \ + && mv /opt/toolchains/arm-gnu-toolchain-*-aarch64-none-linux-gnu \ + /opt/toolchains/aarch64-none-linux-gnu + +# Bare-metal toolchain: the SO3 kernel and AVZ, 64-bit. Selected by +# CONFIG_CROSS_COMPILE in the SO3 defconfig, NOT by IB_TOOLCHAIN — which +# is why it is so easy to miss on a hand-built host. + +RUN curl -fSL "${ARM_BASE}/${AARCH64_ELF_VER}/binrel/arm-gnu-toolchain-${AARCH64_ELF_VER}-$(uname -m)-aarch64-none-elf.tar.xz" \ + | tar -xJ -C /opt/toolchains \ + && mv /opt/toolchains/arm-gnu-toolchain-*-aarch64-none-elf \ + /opt/toolchains/aarch64-none-elf + +# --------------------------------------------------------------------- +# Stage 2 — the build environment proper +# --------------------------------------------------------------------- + +FROM ubuntu:24.04 + +ENV DEBIAN_FRONTEND=noninteractive + +# BitBake requires a UTF-8 locale. + +RUN apt-get update && apt-get install -y --no-install-recommends locales \ + && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \ + && rm -rf /var/lib/apt/lists/* + +ENV LANG=en_US.UTF-8 +ENV LC_ALL=en_US.UTF-8 + +# Host packages come from packages.txt — the single source of truth. +# Adding a dependency there is enough. +# +# The list covers building AND running QEMU: qemu/build/qemu-system-* is +# built into the bind-mounted tree but resolves its libraries inside the +# container. + +COPY packages.txt /tmp/packages.txt + +RUN apt-get update \ + && sed -e 's/#.*//' -e '/^[[:space:]]*$/d' /tmp/packages.txt \ + | xargs apt-get install -y --no-install-recommends \ + && apt-get install -y --no-install-recommends vim nano less \ + && rm -rf /var/lib/apt/lists/* /tmp/packages.txt + +# pcpp: pre-processor used by the SO3 ITS/device-tree tooling. + +RUN pip3 install --break-system-packages --no-cache-dir pcpp + +COPY --from=toolchains /opt/toolchains /opt/toolchains + +ENV PATH=/opt/toolchains/aarch64-none-linux-gnu/bin:/opt/toolchains/aarch64-none-elf/bin:${PATH} + +# The build escalates a few operations (losetup, mount, mkfs, cpio with +# device nodes) through `sudo -n`. Inside a throw-away build container a +# blanket NOPASSWD rule is the simplest correct answer, and it makes the +# host-side tty_tickets problem (scripts/common/setup_sudo.sh) moot. +# +# `Defaults !authenticate` is NOT redundant with NOPASSWD. The front-end +# scripts open their session with `sudo -v`, which validates the user +# rather than a specific command: sudo then requires authentication as +# soon as ANY applicable rule asks for it — and the build user also +# matches Ubuntu's `%sudo ALL=(ALL:ALL) ALL`. Without this line, +# `sudo -n true` succeeds while `sudo -v` fails with "a terminal is +# required to read the password", and every `build.sh bsp-linux*` / +# `deploy.sh` dies at sudo_session_start. + +RUN printf 'Defaults !authenticate\nALL ALL=(ALL) NOPASSWD:ALL\n' \ + > /etc/sudoers.d/build-env \ + && chmod 0440 /etc/sudoers.d/build-env + +# The tree is bind-mounted and owned by the host user; keep git quiet if +# the ids ever fail to line up. + +RUN git config --system --add safe.directory '*' + +COPY entrypoint.sh /usr/local/bin/entrypoint.sh +RUN chmod +x /usr/local/bin/entrypoint.sh + +# rc file for `dbuild.sh` with no command: an interactive shell with +# env.sh already sourced (see the file for why it must be sourced there +# and not in a parent). + +COPY bashrc /etc/micofe-build.bashrc + +ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] +CMD ["bash"] diff --git a/docker/build-env/bashrc b/docker/build-env/bashrc new file mode 100644 index 0000000..6b89e70 --- /dev/null +++ b/docker/build-env/bashrc @@ -0,0 +1,62 @@ +# Interactive shell inside the MICOFE build container. +# +# Sourcing env.sh HERE (rather than in a parent process) matters: it +# defines shell functions — the cd/pushd/popd wrappers and +# ib_autoswitch_* — which only exist in the shell that sourced them. +# A parent that sources env.sh then execs bash passes on the exported +# variables but loses the functions. +# +# Copyright (c) 2026 REDS Institute - HEIG-VD + +# NOT sourcing /etc/bash.bashrc here: Debian/Ubuntu bash already reads it for +# every interactive shell, --rcfile only replaces ~/.bashrc. Sourcing it again +# ran its sudo hint — and anything else it prints — twice on entry. + +# Colours and the usual ls shorthands. On a normal Ubuntu login these come from +# the user's ~/.bashrc, which `bash --rcfile` deliberately bypasses in favour of +# this file — so without the block below the container shell is the one place +# where `ls` comes out monochrome. Sourcing ~/.bashrc instead would drag in its +# PS1 and undo the [micofe-build] prompt set at the bottom. + +if [ -x /usr/bin/dircolors ]; then + if [ -r "$HOME/.dircolors" ]; then + eval "$(dircolors -b "$HOME/.dircolors")" + else + eval "$(dircolors -b)" + fi + alias ls='ls --color=auto' + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' +fi + +alias ll='ls -alF' +alias la='ls -A' +alias l='ls -CF' + +if [ -n "$IB_TREE" ] && [ -f "$IB_TREE/env.sh" ]; then + cd "$IB_TREE" && . ./env.sh >/dev/null 2>&1 +fi + +# Return to the directory the user invoked dbuild.sh from. + +[ -n "$IB_CWD" ] && cd "$IB_CWD" + +# Make it obvious at a glance that this shell is inside the container — +# the tree looks identical to the host one, same absolute paths. + +PS1='\[\033[01;33m\][micofe-build]\[\033[00m\] \w \$ ' + +cat <<'EOF' + +MICOFE build container — the repository is bind-mounted from the host and +you are running as the host user, so anything you produce stays yours. +env.sh is already sourced. + + build.sh -l list recipes + build.sh bsp-linux build the agency BSP (bsp-capsules for the S3C image) + deploy.sh bsp-linux deploy (FIT + rootfs + sdcard) + st.sh / st.sh -d run in QEMU (headless / graphical) + exit leave the container + +EOF diff --git a/docker/build-env/entrypoint.sh b/docker/build-env/entrypoint.sh new file mode 100755 index 0000000..4d9c550 --- /dev/null +++ b/docker/build-env/entrypoint.sh @@ -0,0 +1,56 @@ +#!/bin/sh + +# Container entrypoint: run the build as the HOST user, not as root. +# +# Everything the recipes write lands in the bind-mounted repository — +# source trees attached in place, build/tmp, filesystem images. If the +# container ran as root, all of it would come back root-owned on the +# host, reintroducing exactly the ownership churn the unprivileged +# bitbake model was designed to remove. +# +# The UID/GID cannot be baked into the image: they differ per host +# (1000 for a developer laptop, 996 for gitlab-runner on the CI box). +# So the entrypoint starts as root, materialises a matching account, +# then drops to it. +# +# Copyright (c) 2026 REDS Institute - HEIG-VD + +set -e + +HOST_UID=${HOST_UID:-1000} +HOST_GID=${HOST_GID:-1000} + +# Reuse an existing group/user with that id when the base image already +# ships one (ubuntu:24.04 has 'ubuntu' at 1000) — useradd would fail on +# a duplicate id otherwise. + +group_name=$(getent group "$HOST_GID" | cut -d: -f1) +if [ -z "$group_name" ]; then + group_name=builder + groupadd -g "$HOST_GID" "$group_name" +fi + +user_name=$(getent passwd "$HOST_UID" | cut -d: -f1) +if [ -z "$user_name" ]; then + user_name=builder + useradd -m -u "$HOST_UID" -g "$HOST_GID" -s /bin/bash "$user_name" +fi + +usermod -aG sudo "$user_name" 2>/dev/null || true + +# A writable HOME matters: pip caches and ccache land there (the Sense +# HAT emulator venv lives in build/tmp, inside the bind-mounted tree). + +user_home=$(getent passwd "$HOST_UID" | cut -d: -f6) +if [ ! -d "$user_home" ]; then + mkdir -p "$user_home" +fi +chown "$HOST_UID:$HOST_GID" "$user_home" + +export HOME="$user_home" +export USER="$user_name" + +# setpriv (util-linux) rather than su/sudo: no extra process in the +# signal path, so Ctrl-C reaches the build and exit codes propagate. + +exec setpriv --reuid="$HOST_UID" --regid="$HOST_GID" --init-groups "$@" diff --git a/docker/build-env/packages.txt b/docker/build-env/packages.txt new file mode 100644 index 0000000..60293a9 --- /dev/null +++ b/docker/build-env/packages.txt @@ -0,0 +1,167 @@ +# Host packages required to build the MICOFE tree, one per line. +# +# SINGLE SOURCE OF TRUTH — consumed by docker/build-env/Dockerfile, which +# installs this list verbatim. Comments and blank lines are stripped before +# the list reaches apt. +# +# Copyright (c) 2026 REDS Institute - HEIG-VD + +# --- bitbake / Yocto host dependencies --------------------------------- +# What the bundled bitbake itself needs to start and parse the layers. +# A UTF-8 locale is mandatory (locales, generated in the Dockerfile). + +gawk +diffstat +chrpath +socat +python3 +python3-pip +python3-pexpect +python3-git +python3-jinja2 +debianutils +iputils-ping +locales +sudo + +# --- toolchain and generic build --------------------------------------- +# Kernel, U-Boot and buildroot host-side builds, and their menuconfig. +# libelf-dev is for objtool, dwarves (pahole) for CONFIG_DEBUG_INFO_BTF. + +build-essential +make +bc +bison +flex +patch +perl +which +libssl-dev +libelf-dev +libncurses-dev +dwarves + +# --- source and archive handling ---------------------------------------- + +git +wget +curl +file +ca-certificates +xz-utils +bzip2 +gzip +unzip +zstd +lz4 + +# --- boot images ------------------------------------------------------- +# DTB compilation and FIT (.itb) assembly, on every platform. + +device-tree-compiler +u-boot-tools + +# --- rootfs / initrd pipeline ------------------------------------------ +# kmod provides depmod for the out-of-tree modules the labs build +# (usr-linux: access.ko & co); cpio packs the initrd/ramfs. + +cpio +rsync +fakeroot +kmod + +# --- storage images ---------------------------------------------------- +# build.sh filesystem and deploy.sh: partitioning, mkfs, loop devices. +# These live in /usr/sbin and are reached through sudo. + +dosfstools +mtools +e2fsprogs +parted +fdisk +util-linux +mount +kpartx + +# --- user space -------------------------------------------------------- +# CMake drives usr-linux / usr-so3. The distribution CMake (3.28.x on +# 24.04) is what this list pulls, ON PURPOSE: 4.x drops +# cmake_minimum_required(<3.5) support, which buildroot 2024.11 still +# relies on. swig + python3-dev build U-Boot's pylibfdt. + +cmake +ninja-build +meson +pkg-config +python3-venv +python3-dev +python3-setuptools +swig +uuid-dev +libgnutls28-dev + +# --- QEMU: building AND running ---------------------------------------- +# The runtime half is easy to overlook — qemu/build/qemu-system-* is built +# into the bind-mounted tree but resolves its libraries inside the +# container. libgtk-3-dev is not optional for the labs: st.sh -d presents +# the guest PL111 screen through the GTK display (SDL leaves it black). + +libglib2.0-dev +libpixman-1-dev +libgtk-3-dev +libsdl2-dev +libslirp-dev +libepoxy-dev +libcairo2-dev +libxcb-xkb-dev + +# --- Sense HAT emulator (st.sh -g) ------------------------------------- +# The GUI imports the distro PyGObject/Gtk3; numpy and Pillow come from +# apt so the venv (--system-site-packages) does not rebuild them. +# +# python3-gi-cairo is the one whose absence is SILENT and costly: without +# the pycairo foreign-struct converter every Gtk 'draw' callback dies with +# "Couldn't find foreign struct converter for 'cairo.Context'", so the +# emulator window opens with working sliders and a BLANK 8x8 LED matrix +# while the data path is perfectly fine. sense-hat-server.py starts the +# GUI with stderr=devnull, so the TypeError never reaches any log. +# +# librsvg2-common ships the gdk-pixbuf SVG loader (the About dialog's +# logo); dbus-x11 provides dbus-launch, else GTK spams dconf warnings. + +python3-gi +python3-gi-cairo +python3-cairo +gir1.2-gtk-3.0 +python3-numpy +python3-pil +libjpeg-dev +zlib1g-dev +librsvg2-common +dbus-x11 + +# --- 32-bit cross toolchains (from apt) -------------------------------- +# The prefixes the recipes pin, provided as-is by Ubuntu — no download +# needed, unlike the 64-bit ones (see the Dockerfile): +# arm-linux-gnueabihf- virt32/rpi4 kernel + U-Boot (IB_TOOLCHAIN:arm) +# arm-none-eabi- SO3 kernel 32-bit (CONFIG_CROSS_COMPILE) + +gcc-arm-linux-gnueabihf +g++-arm-linux-gnueabihf +gcc-arm-none-eabi + +# --- documentation ------------------------------------------------------ +# `dbuild.sh make -C doc html` builds doc/ (Sphinx + the Read the Docs theme), +# so the doc toolchain lives here too and nothing has to be installed on a +# host just to read the documentation of the tree. + +python3-sphinx +python3-sphinx-rtd-theme + +# --- hardware access / serial console ---------------------------------- +# The rpi4 labs talk to the board over its mini-UART and flash SD cards. + +picocom +usbutils +openssh-client +net-tools diff --git a/env.sh b/env.sh index 2b2e5b7..334cff0 100755 --- a/env.sh +++ b/env.sh @@ -1,11 +1,27 @@ #!/bin/sh + +# Strip the previous tree's contributions from PATH before adding new +# ones. Without this, `cd ../sibling && . ./env.sh` would leave both +# trees' scripts/ entries on PATH, and the older entry could win for +# `which build.sh`. +if [ -n "$IB_ROOT_DIR" ] && [ "$IB_ROOT_DIR" != "$PWD" ]; then + _escaped_root=$(printf '%s' "$IB_ROOT_DIR" | sed 's|[][\.*^$()+?{}\|]|\\&|g') + PATH=$(printf '%s:' "$PATH" | \ + sed -e "s|$_escaped_root/scripts:||g" \ + -e "s|$_escaped_root/build/bitbake/bin:||g" \ + -e 's/:$//') + unset _escaped_root +fi + export IB_ROOT_DIR=$PWD export BUILDDIR="$PWD/build" export BBPATH=$BUILDDIR -PATH=$PATH:$PWD/scripts:$BUILDDIR/bitbake/bin +# Prepend so the active tree's scripts always win, even if leftover +# entries from another tree are still on PATH. +PATH="$PWD/scripts:$BUILDDIR/bitbake/bin:$PATH" # Specify auxiliary layers for the -x component opt -export IB_AUX_LAYERS="meta-usr meta-torizon meta-so3 meta-qemu meta-atf" +export IB_AUX_LAYERS="meta-usr meta-so3 meta-qemu meta-atf" # TODO: It would be nice to test for the presence of such and # such compiler in meta-bsp @@ -14,27 +30,109 @@ then PATH="$PATH:$IB_TOOLCHAIN_PATH" fi -# Avoid setting uid/gid of the regular user -# when sourced again by the root user in deploy.sh -if test -z "$IB_UNPRIVILEDGED_USER_ID" -then - IB_UNPRIVILEDGED_USER_ID=`id -u` -fi - -if test -z "$IB_UNPRIVILEDGED_GROUP_ID" -then - IB_UNPRIVILEDGED_GROUP_ID=`id -g` -fi - -# If not set - set default list of preserved variables -# that are passed to bitbake +# Variables passed through to bitbake task scripts. bitbake now runs +# unprivileged so the IB_UNPRIVILEDGED_USER_ID/GROUP_ID variables that +# used to be needed to chown root-written files back are gone; only +# build inputs remain. if test -z "$BB_ENV_PASSTHROUGH_ADDITIONS" then - BB_ENV_PASSTHROUGH_ADDITIONS='IB_TOOLCHAIN_PATH IB_UNPRIVILEDGED_USER_ID IB_UNPRIVILEDGED_GROUP_ID IB_ROOT_DIR' + BB_ENV_PASSTHROUGH_ADDITIONS='IB_TOOLCHAIN_PATH IB_ROOT_DIR IB_FORCE_ATTACH' export BB_ENV_PASSTHROUGH_ADDITIONS fi export PATH -export IB_UNPRIVILEDGED_USER_ID -export IB_UNPRIVILEDGED_GROUP_ID +# Auto-switch the build env when cwd moves into a sibling infrabase +# tree. The hook runs in the user's interactive shell (bash via +# PROMPT_COMMAND, zsh via chpwd_functions) so the switch is a real +# parent-shell change, not a subshell-local one. The function walks +# up from $PWD looking for env.sh; when it finds one belonging to a +# different tree than IB_ROOT_DIR, it prompts the user and (on y) +# re-sources that env.sh in-place. Cwd is preserved across the switch. +# +# A declined target is remembered in _ib_declined_tree so the user +# isn't re-prompted for the same tree on every subsequent prompt +# cycle (bash's PROMPT_COMMAND fires per-prompt, not per-cd). Cd'ing +# into a different tree resets the prompt. +_ib_chpwd_hook() { + # Per-session opt-out — `export IB_NO_AUTO_SWITCH=1` to silence the + # prompt without unwrapping cd/pushd/popd; `unset IB_NO_AUTO_SWITCH` + # to re-enable. + [ "${IB_NO_AUTO_SWITCH:-}" = "1" ] && return 0 + _t="$PWD" + while [ "$_t" != "/" ] && [ ! -f "$_t/env.sh" ]; do + _t=$(dirname "$_t") + done + if [ ! -f "$_t/env.sh" ]; then + unset _t + return 0 + fi + _t=$(builtin cd "$_t" && pwd) + if [ "$_t" = "$IB_ROOT_DIR" ] || [ "$_t" = "${_ib_declined_tree:-}" ]; then + unset _t + return 0 + fi + + printf '\n[infrabase] env switch requested:\n' >&2 + printf ' current : %s\n' "${IB_ROOT_DIR:-}" >&2 + printf ' target : %s\n\n' "$_t" >&2 + printf 'Switch env to %s? [y/N] ' "$_t" >&2 + # The hook fires from the interactive shell prompt, so plain + # `read` reads from the user's terminal (stdin == tty). + read -r _ib_answer + case "$_ib_answer" in + y|Y|yes|YES) + _ib_orig_pwd="$PWD" + builtin cd "$_t" && . ./env.sh + builtin cd "$_ib_orig_pwd" 2>/dev/null + unset _ib_orig_pwd _ib_declined_tree + ;; + *) + printf '[infrabase] declined — staying on %s\n' \ + "${IB_ROOT_DIR:-}" >&2 + _ib_declined_tree="$_t" + ;; + esac + unset _t _ib_answer +} + +# Wrap cd / pushd / popd so the env-switch check fires after every +# directory change. This is more robust than installing the hook via +# PROMPT_COMMAND (bash) or chpwd_functions (zsh): some shell configs +# rewrite PROMPT_COMMAND aggressively (e.g. edkrepo's +# `edkrepo_combo_chpwd` strips entries it didn't add), and a function +# override is immune. `builtin cd` inside the hook avoids recursion +# when the hook itself cds during the re-source. +cd() { + builtin cd "$@" && _ib_chpwd_hook +} + +pushd() { + builtin pushd "$@" && _ib_chpwd_hook +} + +popd() { + builtin popd "$@" && _ib_chpwd_hook +} + +# Quick toggles for the auto-switch prompt. These are shell functions +# (not scripts) so they run in the current shell and can flip the env +# var that the hook reads. A standalone executable would only flip it +# inside its own subshell. +ib_autoswitch_off() { + export IB_NO_AUTO_SWITCH=1 + echo "[infrabase] auto-switch OFF (cd between trees stays silent)" >&2 +} + +ib_autoswitch_on() { + unset IB_NO_AUTO_SWITCH + echo "[infrabase] auto-switch ON" >&2 +} + +ib_autoswitch_status() { + if [ "${IB_NO_AUTO_SWITCH:-}" = "1" ]; then + echo "auto-switch: OFF" + else + echo "auto-switch: ON" + fi +} diff --git a/linux/target/build.sh b/linux/target/build.sh deleted file mode 100755 index cb8bf5d..0000000 --- a/linux/target/build.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -function usage { - echo "$0 [OPTIONS]" - echo " -v Verbose" -} - -verbose=n - -while getopts cdhvs option - do - case "${option}" - in - v) verbose=y;; - h) usage && exit 1;; - esac - done - -echo Building the ITB - -cd ../build - -if [ $verbose == y ]; then - bitbake bsp -c itb -vDDD - exit 0 -fi - -bitbake bsp -c itb - - diff --git a/linux/target/mkuboot.sh b/linux/target/mkuboot.sh deleted file mode 100755 index a52d33b..0000000 --- a/linux/target/mkuboot.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -function usage { - echo "$0 [OPTIONS]" - echo " -v Verbose" - echo " -h Print this help" -} - -verbose=n - -while getopts cdhvs option - do - case "${option}" - in - v) verbose=y;; - h) usage && exit 1;; - esac - done - - -if [ $verbose == y ]; then - cd ../build - bitbake bsp -c do_itb -vDDD - exit 0 -fi - -cd ../build -bitbake bsp -c do_itb - - - - diff --git a/linux/target/rpi4_64_avz.its b/linux/target/rpi4_64_avz.its deleted file mode 100644 index 1bf78ef..0000000 --- a/linux/target/rpi4_64_avz.its +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (C) 2020-2026 Daniel Rossier - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -/dts-v1/; - -/ { - description = "SOO Agency components for Raspberry Pi 4 64-bit environment"; - - images { - - avz { - description = "AVZ Hypervisor (64-bit)"; - data = /incbin/("../../avz/so3.bin"); - type = "kernel"; - os = "linux"; - arch = "arm64"; - compression = "none"; - load = <0x00080000>; - entry = <0x00080000>; - }; - - avz_dt { - description = "Flattened Device Tree blob"; - data = /incbin/("../../avz/dts/rpi4_64_avz.dtb"); - type = "avz_dt"; - arch = "arm64"; - compression = "none"; - load = <0x03000000>; - }; - - linux { - description = "Linux kernel"; - data = /incbin/("../linux/arch/arm64/boot/Image"); - type = "guest"; - arch = "arm64"; - os = "linux"; - compression = "none"; - load = <0x10000000>; - entry = <0x10000000>; - }; - - fdt { - description = "SOO Agency device tree blob"; - data = /incbin/("../linux/arch/arm64/boot/dts/broadcom/bcm2711-rpi-4-b.dtb"); - type = "flat_dt"; - arch = "arm64"; - compression = "none"; - load = <0x20000000>; - }; - - fdt-overlay { - data = /incbin/("../linux/arch/arm64/boot/dts/overlays/vc4-kms-v3d-pi4.dtbo"); - type = "flat_dt"; - arch = "arm64"; - compression = "none"; - load = <0x20c00000>; - }; - - initrd { - description = "Linux initial rootfs (initrd)"; - data = /incbin/("../rootfs/board/rpi4_64/initrd.cpio"); - type = "ramdisk"; - arch = "arm64"; - os = "linux"; - compression = "none"; - load = <0x20e00000>; - }; - }; - - configurations { - default = "linux_guest"; - - linux_guest { - description = "Linux/AVZ on RPi4 64-bit"; - loadables = "avz_dt", "linux"; - kernel = "avz"; - fdt = "fdt"; - ramdisk = "initrd"; - }; - }; -}; diff --git a/linux/target/rpi4_64_linux.its b/linux/target/rpi4_64_linux.its deleted file mode 100644 index 585c82c..0000000 --- a/linux/target/rpi4_64_linux.its +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (C) 2020-2026 Daniel Rossier - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - */ - -/dts-v1/; - -/ { - description = "SOO Agency components for Raspberry Pi 4 64-bit environment"; - - images { - - linux { - description = "Linux kernel"; - data = /incbin/("../linux/arch/arm64/boot/Image"); - type = "kernel"; - arch = "arm64"; - os = "linux"; - compression = "none"; - load = <0x01000000>; - entry = <0x01000000>; - }; - - fdt { - description = "SOO Agency device tree blob"; - data = /incbin/("../linux/arch/arm64/boot/dts/broadcom/bcm2711-rpi-4-b.dtb"); - type = "flat_dt"; - arch = "arm64"; - compression = "none"; - load = <0x20000000>; - }; - - fdt-overlay { - data = /incbin/("../linux/arch/arm64/boot/dts/overlays/vc4-kms-v3d-pi4.dtbo"); - type = "flat_dt"; - arch = "arm64"; - compression = "none"; - load = <0x20c00000>; - }; - - initrd { - description = "Linux initial rootfs (initrd)"; - data = /incbin/("../rootfs/board/rpi4_64/initrd.cpio"); - type = "ramdisk"; - arch = "arm64"; - os = "linux"; - compression = "none"; - load = <0x20e00000>; - }; - }; - - configurations { - default = "linux"; - - linux { - description = "Linux on RPi4 64-bit"; - kernel = "linux"; - fdt = "fdt"; - ramdisk = "initrd"; - }; - }; -}; diff --git a/linux/target/virt32.its b/linux/target/virt32.its deleted file mode 120000 index 31ce9ba..0000000 --- a/linux/target/virt32.its +++ /dev/null @@ -1 +0,0 @@ -virt32_avz.its \ No newline at end of file diff --git a/linux/target/virt64.its b/linux/target/virt64.its deleted file mode 120000 index 388bdaf..0000000 --- a/linux/target/virt64.its +++ /dev/null @@ -1 +0,0 @@ -virt64_avz.its \ No newline at end of file diff --git a/linux/usr/include/core/core.h b/linux/usr/include/core/core.h new file mode 100644 index 0000000..b9226b0 --- /dev/null +++ b/linux/usr/include/core/core.h @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2014-2019 Daniel Rossier + * Copyright (C) 2018-2019 Baptiste Delporte + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef CORE_H +#define CORE_H + +#include + +#include + +#define AGENCY_CORE_VERSION "2025.5" + +/* Cycle period express in ms */ +#define AG_CYCLE_PERIOD 100 + +#define SOO_CORE_DEVICE "/dev/soo/core" + +extern int fd_core; +extern int fd_dcm; + +/* Arguments of the agency application */ +extern bool opt_noinject; +extern bool opt_nosend; + +/* To indicate f the main agency cycle loop is interrupted */ +extern bool ag_cycle_interrupted; + +int get_S3C_free_slot(size_t S3C_size); + +bool get_S3C_id(uint32_t slotID, S3C_id_t *S3C_id); + +void read_S3C_snapshot(unsigned int slotID, void **buffer, uint32_t *buffer_size); +void write_S3C_snapshot(unsigned int slotID, unsigned char *S3C_buffer); + +void *prepare_S3C_slot(unsigned int slotID); + +void main_loop(int cycle_period); + +#endif /* CORE_H */ diff --git a/linux/usr/include/core/debug.h b/linux/usr/include/core/debug.h new file mode 100644 index 0000000..af435da --- /dev/null +++ b/linux/usr/include/core/debug.h @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2014-2019 Daniel Rossier + * Copyright (C) 2018-2019 Baptiste Delporte + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef DEBUG_H +#define DEBUG_H + +#include +#include + +#ifdef DEBUG +#undef DBG + +#define DBG(fmt, ...) \ + do { \ + printf("(user) %s:%d > "fmt, __func__, __LINE__, ##__VA_ARGS__); \ + } while (0) + +#define BUG() do { printf("BUG\n"); fflush(stdout); exit(-1); } while (0); + +#define DBG0(...) DBG("%s", ##__VA_ARGS__) + +#else + +#define DBG(fmt, ...) +#define DBG0(...) +#define DBG_BUFFER(buffer, ...) +#define DBG_ON__ +#define DBG_OFF__ + +#endif + +#endif /* DEBUG_H */ diff --git a/linux/usr/include/core/device_access.h b/linux/usr/include/core/device_access.h new file mode 100644 index 0000000..030af50 --- /dev/null +++ b/linux/usr/include/core/device_access.h @@ -0,0 +1,58 @@ + /* + * Copyright (C) 2014-2019 Daniel Rossier + * Copyright (c) 2018 Baptiste Delporte + * Copyright (C) 2019 David Truan + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef DEVICE_ACCESS_H +#define DEVICE_ACCESS_H + +#define FILENAME_MAX_LEN 80 + +#define SOO_S3C_DIRECTORY "/mnt/S3C" +#define SOO_BOOT_PART "/mnt/boot/" +#define SOO_ROOTFS_P2 "/mnt/rootfs1/" +#define SOO_ROOTFS_P4 "/mnt/rootfs2/" +#define ROOT_PATH "/root/" + +#define ROOTFS1_PART '2' +#define ROOTFS2_PART '4' + +#define ROOTFS_ARCHIVE_NAME "rootfs.tar" +#define AGENCY_JSON_NAME "agency.json" +#define AGENCY_JSON_PATH SOO_BOOT_PART AGENCY_JSON_NAME +#define ROOT_FLAG_NAME "root_flag" +#define ROOT_FLAG_PATH SOO_BOOT_PART ROOT_FLAG_NAME +#define UENV_TXT_NAME "uEnv.txt" +#define UENV_TXT_PATH SOO_BOOT_PART UENV_TXT_NAME + +#define ITB_NAME "soo.itb" + +#define ITB_PATH SOO_BOOT_PART ITB_NAME + +void agency_inject_S3C_from_memory(void); +void sig_inject_S3C_from_memory(int sig); + +void inject_MEs_from_filesystem(void); + +int upgrade_uEnv_txt(char *uEnv_updated, size_t size); +int upgrade_itb(char *itb_updated, size_t size); +int upgrade_rootfs(char *rootfs_updated, size_t size); + +void device_access_init(void); + +#endif /* DEVICE_ACCESS_H */ diff --git a/linux/usr/include/core/injector.h b/linux/usr/include/core/injector.h new file mode 100644 index 0000000..c3092c9 --- /dev/null +++ b/linux/usr/include/core/injector.h @@ -0,0 +1,29 @@ + +/* + * Copyright (C) 2014-2019 Daniel Rossier + * Copyright (C) 2018-2019 Baptiste Delporte + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef INJECTOR_CORE_H +#define INJECTOR_CORE_H + +void injector_init(void); +void inject_from_BT(void); + +void S3C_inject(unsigned char *S3C_buffer, uint32_t size); + +#endif /* INJECTOR_CORE_H */ diff --git a/linux/usr/include/core/leds.h b/linux/usr/include/core/leds.h new file mode 100644 index 0000000..47ff820 --- /dev/null +++ b/linux/usr/include/core/leds.h @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2018-2019 Baptiste Delporte + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef LEDS_H +#define LEDS_H + +#include + +#include + +#define SOO_N_LEDS 6 + +#define SOO_LED_SYSFS_PREFIX "/sys/class/leds/led_d" +#define SOO_LED_SYSFS_SUFFIX "/brightness" + +void led_set(uint32_t id, uint8_t value); +void led_on(uint32_t id); +void led_off(uint32_t id); + +void leds_init(void); + +#endif /* LEDS_H */ diff --git a/linux/usr/include/core/receive.h b/linux/usr/include/core/receive.h new file mode 100644 index 0000000..b417254 --- /dev/null +++ b/linux/usr/include/core/receive.h @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2014-2019 Daniel Rossier + * Copyright (C) 2018-2019 Baptiste Delporte + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef RECEIVE_H +#define RECEIVE_H + +#include + +void S3C_processing_receive(void); + +#endif /* RECEIVE_H */ diff --git a/linux/usr/include/core/send.h b/linux/usr/include/core/send.h new file mode 100644 index 0000000..e042729 --- /dev/null +++ b/linux/usr/include/core/send.h @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2014-2019 Daniel Rossier + * Copyright (C) 2018-2019 Baptiste Delporte + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef SEND_H +#define SEND_H + +#include + +void try_to_send_ME(void); +void sig_initiate_migration(int sig); + +#endif /* SEND_H */ diff --git a/linux/usr/include/core/types.h b/linux/usr/include/core/types.h new file mode 100644 index 0000000..1a3603b --- /dev/null +++ b/linux/usr/include/core/types.h @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2014-2019 Daniel Rossier + * Copyright (C) 2018-2019 Baptiste Delporte + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef TYPES_H +#define TYPES_H + +#define likely(expr) expr +#define unlikely(expr) expr + +#endif /* TYPES_H */ diff --git a/linux/usr/include/core/upgrader.h b/linux/usr/include/core/upgrader.h new file mode 100644 index 0000000..4ee32c2 --- /dev/null +++ b/linux/usr/include/core/upgrader.h @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2019 David Truan + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef UPGRADER_H +#define UPGRADER_H + +#define UPGRADABLE_COMPONENTS 3 +#define UPGRADE_POLL_PERIOD_MS 500 + +/** + * Image format: | uncompressed size | ITB version | U-boot version | rootfs version | + * The payload is composed of the 3 components as follows: for each component. + * Each field except the images themself are on 4B unsigned + * + */ +#define HEADER_SIZE (4 + 3 * 4) + +typedef enum { + ITB, + UBOOT, + ROOTFS +} component_type_t; + +/* Used to pass information between the upgarde stages */ +typedef struct { + char *header; + size_t compressed_size; + char *decompressed_image; + unsigned int S3C_slotID; +} upgrader_args_t; + +void upgrader_init(void); + +#endif /* UPGRADER_H */ diff --git a/linux/usr/include/soo/core.h b/linux/usr/include/soo/core.h new file mode 100644 index 0000000..3e951dc --- /dev/null +++ b/linux/usr/include/soo/core.h @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2014-2019 Daniel Rossier + * Copyright (C) 2018-2019 Baptiste Delporte + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef CORE_H +#define CORE_H + +#include + +#include + +#define SOO_VERSION "1.0" +#define SOO_CORE_DEVICE "/dev/soo/core" + +#endif /* CORE_H */ diff --git a/linux/usr/include/soo/debug.h b/linux/usr/include/soo/debug.h new file mode 100644 index 0000000..af435da --- /dev/null +++ b/linux/usr/include/soo/debug.h @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2014-2019 Daniel Rossier + * Copyright (C) 2018-2019 Baptiste Delporte + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef DEBUG_H +#define DEBUG_H + +#include +#include + +#ifdef DEBUG +#undef DBG + +#define DBG(fmt, ...) \ + do { \ + printf("(user) %s:%d > "fmt, __func__, __LINE__, ##__VA_ARGS__); \ + } while (0) + +#define BUG() do { printf("BUG\n"); fflush(stdout); exit(-1); } while (0); + +#define DBG0(...) DBG("%s", ##__VA_ARGS__) + +#else + +#define DBG(fmt, ...) +#define DBG0(...) +#define DBG_BUFFER(buffer, ...) +#define DBG_ON__ +#define DBG_OFF__ + +#endif + +#endif /* DEBUG_H */ diff --git a/linux/usr/include/soo/uapi/soo.h b/linux/usr/include/soo/uapi/soo.h new file mode 100644 index 0000000..3808014 --- /dev/null +++ b/linux/usr/include/soo/uapi/soo.h @@ -0,0 +1,98 @@ +/* + * Copyright (C) 2014-2025 Daniel Rossier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef UAPI_SOO_H +#define UAPI_SOO_H + +#include + +#define MAX_S3C_DOMAINS 5 + +/* + * S3C states: + * - S3C_state_stopped: Capsule is stopped (right after start or later) + * - S3C_state_living: S3C is full-functional and activated (all frontend devices are consistent) + * - S3C_state_suspended: S3C is suspended (e.g. before taking a snapshot) + * - S3C_state_hibernate: S3C is in a state of hibernate snapshot + * - S3C_state_resuming: S3C ready to perform resuming (after recovering) + * - S3C_state_awakened: S3C is just being awakened + * - S3C_state_terminated: S3C has been terminated (by a shutdown) + * - S3C_state_dead: S3C does not exist + */ +typedef enum { + S3C_state_stopped, + S3C_state_living, + S3C_state_suspended, + S3C_state_hibernate, + S3C_state_resuming, + S3C_state_awakened, + S3C_state_killed, + S3C_state_terminated, + S3C_state_dead +} S3C_state_t; + +/* Keep information about slot availability + * FREE: the slot is available (no S3C) + * BUSY: the slot is allocated a S3C + */ +typedef enum { S3C_SLOT_FREE, S3C_SLOT_BUSY } S3C_slotState_t; + +/* S3C ID related information */ +#define S3C_NAME_SIZE 40 +#define S3C_SHORTDESC_SIZE 1024 + +/* + * Definition of S3C ID information used by functions which need + * to get a list of running MEs with their information. + */ +typedef struct { + uint32_t slotID; + S3C_state_t state; + + uint64_t spid; + + char name[S3C_NAME_SIZE]; + char shortdesc[S3C_SHORTDESC_SIZE]; +} S3C_id_t; + +/* + * IOCTL commands for S3C management. + * This part is shared between the kernel and user spaces. + */ + +/* + * IOCTL codes + */ + +#define AGENCY_IOCTL_READ_SNAPSHOT _IOWR('S', 1, agency_ioctl_args_t) +#define AGENCY_IOCTL_WRITE_SNAPSHOT _IOW('S', 2, agency_ioctl_args_t) +#define AGENCY_IOCTL_SHUTDOWN _IOW('S', 3, agency_ioctl_args_t) +#define AGENCY_IOCTL_INJECT_CAPSULE _IOWR('S', 4, agency_ioctl_args_t) +#define AGENCY_IOCTL_START_CAPSULE _IOWR('S', 5, agency_ioctl_args_t) +#define AGENCY_IOCTL_GET_S3C_ID _IOWR('S', 6, agency_ioctl_args_t) +#define AGENCY_IOCTL_GET_S3C_ID_ARRAY _IOR('S', 7, agency_ioctl_args_t) + +/* struct agency_ioctl_args used in IOCTLs */ +typedef struct agency_ioctl_args { + void *buffer; /* IN/OUT */ + int slotID; + unsigned capsuleID; + long value; /* IN/OUT */ +} agency_ioctl_args_t; + +#endif /* UAPI_SOO_H */ diff --git a/linux/usr/src/CMakeLists.txt b/linux/usr/src/CMakeLists.txt index 2d2cfee..3fa96ac 100644 --- a/linux/usr/src/CMakeLists.txt +++ b/linux/usr/src/CMakeLists.txt @@ -1 +1,2 @@ add_subdirectory(examples) +add_subdirectory(soo) diff --git a/linux/usr/src/modules/Makefile b/linux/usr/src/modules/Makefile index 6bef522..b6b5a2a 100644 --- a/linux/usr/src/modules/Makefile +++ b/linux/usr/src/modules/Makefile @@ -4,6 +4,10 @@ ifeq ($(IB_PLATFORM),$(filter $(IB_PLATFORM),rpi4)) obj-m := senseled.o endif +ifeq ($(IB_PLATFORM),$(filter $(IB_PLATFORM),rpi4_64)) +obj-m := modtry.o +endif + ifeq ($(IB_PLATFORM),$(filter $(IB_PLATFORM),virt64)) obj-m := modtry.o endif diff --git a/linux/usr/src/modules/senseled.c b/linux/usr/src/modules/senseled.c index dc37f72..b3cb967 100644 --- a/linux/usr/src/modules/senseled.c +++ b/linux/usr/src/modules/senseled.c @@ -45,11 +45,9 @@ static int senseled_probe(struct platform_device *pdev) { } -static int senseled_remove(struct platform_device *pdev) { +static void senseled_remove(struct platform_device *pdev) { printk("%s: releasing all...\n", __func__); - - return 0; } static const struct of_device_id senseled_of_ids[] = { diff --git a/linux/usr/src/soo/CMakeLists.txt b/linux/usr/src/soo/CMakeLists.txt new file mode 100644 index 0000000..6584fc8 --- /dev/null +++ b/linux/usr/src/soo/CMakeLists.txt @@ -0,0 +1,18 @@ + + +add_executable(s3c-inject s3c-inject.c) + +add_executable(s3c-save s3c-save.c) +add_executable(s3c-restore s3c-restore.c) +add_executable(s3c-shutdown s3c-shutdown.c) + +add_executable(s3c-list s3c-list.c) + +target_link_libraries(s3c-save zip) +target_link_libraries(s3c-restore zip) + +# MICOFE additions: the framebuffer/input forwarders and the EMISO engine +add_executable(fb_mapper fb_mapper.c) +add_executable(input_forwarding input_forwarding.c) + +add_subdirectory(emiso_engine) diff --git a/linux/usr/src/soo/emiso_engine/CMakeLists.txt b/linux/usr/src/soo/emiso_engine/CMakeLists.txt new file mode 100644 index 0000000..9b762fb --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/CMakeLists.txt @@ -0,0 +1,25 @@ +project(emiso_engine LANGUAGES C CXX) + +set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +add_executable(${PROJECT_NAME} emiso_engine.cpp + utils.cpp + webserver/webserver.cpp + webserver/system/system.cpp + webserver/container/container.cpp + webserver/image/image.cpp + webserver/network/network.cpp + webserver/volume/volume.cpp + webserver/plugins/plugins.cpp + daemon/image.cpp + daemon/capsule.cpp + daemon/daemon.cpp + #cli/cli.cpp +) + +target_include_directories(${PROJECT_NAME} PRIVATE include) + +target_link_libraries(${PROJECT_NAME} httpserver jsoncpp readline zip) + +install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_BINARY_DIR}/bin) diff --git a/linux/usr/src/soo/emiso_engine/cli/cli.cpp b/linux/usr/src/soo/emiso_engine/cli/cli.cpp new file mode 100644 index 0000000..7eb513f --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/cli/cli.cpp @@ -0,0 +1,123 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include +#include + +#include "cli.hpp" + +#define EMISO_CLI_PROMPT "(emiso)>> " + +namespace emiso { + +Cli::Cli() {} + +Cli::~Cli() {} + +void Cli::splitCmd(std::string const &str, const char delim, std::vector &out) +{ + // create a stream from the string + std::stringstream s(str); + + std::string s2; + while (std::getline (s, s2, delim)) { + out.push_back(s2); // store the string in s2 + } +} + + +// Function to handle the "hello" command +void Cli::handleHelloCommand() { + std::cout << "Hello, World!" << std::endl; +} + +// Function to handle the "help" command +void Cli::handleHelpCommand() { + std::cout << "Available commands:" << std::endl; + std::cout << " hello - Print a greeting" << std::endl; + std::cout << " help - Show available commands" << std::endl; + std::cout << " exit - Exit the program" << std::endl; +} + + +void Cli::handleImagesCommand(std::vector &tokens) +{ + std::map info; + + // TODO - Add checks on 'tokens' + if (tokens[1] == "info") { + _image.info(info); + + for (auto it = info.begin(); it != info.end(); ++it) { + std::string name = it->second.name; + size_t size = it->second.size; + std::string id = it->second.id; + auto date = it->second.date; + + std::cout << name << std::endl; + std::cout << " Size: " << size << std::endl; + std::cout << " ID: " << id << std::endl; + std::cout << " date: " << date << std::endl; + } + } else if (tokens[1] == "rm") { + // TODO - Add checks on 'tokens[2]' + _image.remove(tokens[2]); + } else { + std::cout << "[ERROR] image cmd '" << tokens[1] << "' is not supported" << std::endl; + } +} + +void Cli::start() +{ + std::cout << "Starting interactive mode" << std::endl; + while (true) { + char* input = readline(EMISO_CLI_PROMPT); + if (!input) { + break; // User pressed Ctrl+D (EOF) + } + + std::string command(input); + free(input); + + // Add the command to readline's history + if (!command.empty()) { + add_history(command.c_str()); + } + + std::vector tokens; + Cli::splitCmd(command, ' ', tokens); + + + if (tokens[0] == "hello") { + Cli::handleHelloCommand(); + } else if (tokens[0] == "help") { + Cli::handleHelpCommand(); + } else if (tokens[0] == "image") { + Cli::handleImagesCommand(tokens); + } else if (tokens[0] == "exit") { + break; // Exit the program + } else { + std::cout << "Unknown command. Type 'help' for a list of available commands." << std::endl; + } + } + + std::cout << "Stopping interactive mode" << std::endl; + +} + +} // emiso \ No newline at end of file diff --git a/linux/usr/src/soo/emiso_engine/cli/cli.hpp b/linux/usr/src/soo/emiso_engine/cli/cli.hpp new file mode 100644 index 0000000..2eee2a8 --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/cli/cli.hpp @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef EMISO_CLI_H +#define EMISO_CLI_H + +#include +#include +#include + +#include "../daemon/image.hpp" + +namespace emiso { + + class Cli { + public: + Cli(); + + // Destructor + ~Cli(); + + void start(); + + private: + daemon::Image _image; + + void splitCmd(std::string const &str, const char delim, std::vector &out); + + void handleHelloCommand(); + void handleHelpCommand(); + void handleImagesCommand(std::vector &tockens); + }; +} + +#endif // EMISO_CLI_H diff --git a/linux/usr/src/soo/emiso_engine/daemon/capsule.cpp b/linux/usr/src/soo/emiso_engine/daemon/capsule.cpp new file mode 100644 index 0000000..1399def --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/daemon/capsule.cpp @@ -0,0 +1,542 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include + +#include + +#include "capsule.hpp" + +using namespace std; + +// Path where the Capsule images are stored +#define EMISO_IMAGE_PATH "/mnt/capsules/image/" + +// Path where the Capsule snapshot are stored +#define EMISO_CAPSULE_CACHE_DIR "/mnt/capsules/snapshot" + +// Path of SOO driver +#define SOO_CORE_DRV_PATH "/dev/soo/core" + +#define LOG_PREFIX "[EMISO:DAEMON] " + +namespace emiso { + +map Capsule::_capsules; +unsigned Capsule::_capsuleIdx = 0; + +Capsule::Capsule(){}; + +Capsule::~Capsule(){}; + +/** + * @brief Return NOW in epoch format, in seconds + * + * It is used to set Capsule's creation time + * + * @return now, since EPOCH, in second + */ +uint64_t Capsule::createdTime() +{ + const auto now = chrono::system_clock::now(); + const auto epoch = chrono::duration_cast(now.time_since_epoch()).count(); + + return epoch; +} + + +/* + * @brief Inject a capsule + * + * @param imageName Name image, without .itb suffix, used to inject the capsule + * @return The ID of the create capsule or a negative value in case of error + */ +int Capsule::inject(string imageName, bool start_capsule, unsigned capsuleId) +{ + int fd; + int ret; + streampos capsuleSize; + string filename; + char *capsuleBuf; + struct agency_ioctl_args args; + + cout << LOG_PREFIX "Capsule injection from image " << imageName << endl; + + filename = std::format("{}{}.itb", EMISO_IMAGE_PATH, imageName); + + ifstream image(filename, ios::in | ios::binary | ios::ate); + if (!image.is_open()) { + cerr << LOG_PREFIX "Error: Failed to open image file '" << filename << "'" << endl; + return EXIT_FAILURE; + } + + capsuleSize = image.tellg(); + + capsuleBuf = new char[capsuleSize]; + + image.seekg(0, ios::beg); + image.read(capsuleBuf, capsuleSize); + image.close(); + + args.buffer = capsuleBuf; + args.value = capsuleSize; + args.slotID = -1; /* Wherever */ + args.capsuleID = capsuleId; + + fd = open(SOO_CORE_DRV_PATH, O_RDWR); + if (fd < 0) { + cerr << "[EMISO:DAEMON] Failing to open /dev soo entry ..." << endl; + delete[] capsuleBuf; + return EXIT_FAILURE; + } + + /* Inject the capsule */ + ret = ioctl(fd, AGENCY_IOCTL_INJECT_CAPSULE, &args); + if ((ret < 0) || (args.slotID == -1)) { + cerr << "[EMISO:DAEMON] No available ME slot further..." << endl; + close(fd); + delete[] capsuleBuf; + return EXIT_FAILURE; + } + + if (start_capsule) { + ioctl(fd, AGENCY_IOCTL_START_CAPSULE, &args); + } + + delete[] capsuleBuf; + close(fd); + + return args.slotID; +} + + +/* + * @brief Save a snapshot of a Capsule + * + * @param slotId The slot ID of the capsule for which to create a snapshot. + * @param snapshotName The name of the snapshot + * @return negative value in case of error, 0 otherwise + */ +int Capsule::saveSnapshot(int slotId, string snapshotName) +{ + int fd; + int ret; + struct agency_ioctl_args args; + struct zip_t *zip; + string filename; + + cout << LOG_PREFIX "Save Capsule - slot ID: " << slotId << ", name: " << snapshotName << endl; + + fd = open(SOO_CORE_DRV_PATH, O_RDWR); + if (fd < 0) { + printf("[EMISO:DAEMON] Failing to open /dev/soo entry ...\n"); + return EXIT_FAILURE; + } + + /* Get the size of the snapshot */ + args.slotID = slotId; + args.value = 0; /* To get the size of the snapshot */ + + ret = ioctl(fd, AGENCY_IOCTL_READ_SNAPSHOT, &args); + if (ret < 0) { + printf(LOG_PREFIX "Get the size with IOCTL_READ_SNAPSHOT failed.\n"); + close(fd); + return EXIT_FAILURE; + } + + args.buffer = new (std::nothrow) char[args.value]; + if (args.buffer == NULL) { + printf(LOG_PREFIX " %s - malloc failed\n", __func__); + close(fd); + return EXIT_FAILURE; + } + + ret = ioctl(fd, AGENCY_IOCTL_READ_SNAPSHOT, &args); + if (ret < 0) { + printf(LOG_PREFIX "Read the snapshot IOCTL_READ_SNAPSHOT failed.\n"); + delete[] args.buffer; + close(fd); + return EXIT_FAILURE; + } + + close(fd); + + filename = string(EMISO_CAPSULE_CACHE_DIR) + "/" + snapshotName; + + cout << "Save capsule in: " << filename << endl; + + /* Compress the snapshot */ + zip = zip_open(filename.c_str(), ZIP_DEFAULT_COMPRESSION_LEVEL, 'w'); + if (!zip) { + printf(LOG_PREFIX "Failed to open the zip file. Is there a bad sync after saving the snapshot?...\n"); + perror(""); + delete[] args.buffer; + close(fd); + return EXIT_FAILURE; + } + zip_entry_open(zip, "me"); + zip_entry_write(zip, args.buffer, args.value); + zip_entry_close(zip); + + zip_close(zip); + delete[] args.buffer; + + return 0; +} + +/* + * @brief Restore a Capsule for a snapshot + * + * @param snapshotName The name of the snapshot + * @return The slot ID used for the capsule or a negative value in case of error + */ +int Capsule::restoreSnapshot(string snapshotName) +{ + int fd; + int ret; + struct agency_ioctl_args args; + size_t buffer_size; + struct zip_t *zip; + string filename; + + /* Open the channel to the kernel soo submodule. */ + fd = open(SOO_CORE_DRV_PATH, O_RDWR); + if ((fd < 0)) { + printf(LOG_PREFIX "Failed to open soo /dev entry...\n"); + return EXIT_FAILURE; + } + + filename = std::string(EMISO_CAPSULE_CACHE_DIR) + "/" + snapshotName; + + zip = zip_open(filename.c_str(), 0, 'r'); + if (!zip) { + printf(LOG_PREFIX "Failed to open the zip file. Is there a bad sync after saving the snapshot?...\n"); + close(fd); + return EXIT_FAILURE; + } + + zip_entry_open(zip, "me"); + zip_entry_read(zip, &args.buffer, &buffer_size); + zip_entry_close(zip); + + zip_close(zip); + + /* Restore the snapshot which is in stated */ + cout << LOG_PREFIX "Re-implementing snapshot of size " << buffer_size << " bytes." << endl; + args.slotID = -1; + ret = ioctl(fd, AGENCY_IOCTL_WRITE_SNAPSHOT, &args); + if (ret < 0) { + printf("Failed to initialize migration (%d)\n", ret); + close(fd); + return EXIT_FAILURE; + } + + close(fd); + + return args.slotID; +} + +/* + * @brief Shutdown a Capsule + * + * @param slotId The slot ID of the capsule to shutdown. + * @return a negative value in case of error, 0 otherwise + */ +int Capsule::shutdown(int slotId) +{ + int fd; + int ret; + struct agency_ioctl_args args; + + fd = open(SOO_CORE_DRV_PATH, O_RDWR); + if (fd < 0) { + printf("[EMISO:DAEMON] Failing to open /dev/soo entry ...\n"); + return EXIT_FAILURE; + } + + /* Shutdown the capsule so that it will be removed from the memory */ + args.slotID = slotId; + + ret = ioctl(fd, AGENCY_IOCTL_SHUTDOWN, &args); + if (ret < 0) { + printf(LOG_PREFIX "Read the snapshot IOCTL_READ_SNAPSHOT failed.\n"); + close(fd); + return EXIT_FAILURE; + } + + close(fd); + + return 0; +} + +/** + * @brief Retrieve the info of all the capsules + * + * @param capsuleList A map which contains the info of all capsules. + */ +void Capsule::info(map &capsuleList) +{ + capsuleList = _capsules; +} + + +/** + * @brief Retrieve the info of a specific capsule + * + * @param id ID of the capsule from which to retrieve the information + * @param info The info of the capsule + */ +void Capsule::info(int id, CapsuleInfo &info) +{ + info = _capsules.at(id); +} + + +/** + * @brief The create() method of Capsule leads to the injection of a capsule, but + * without starting its execution. It will perform a snapshot, write it to + * a specific location and shutdown the stopped capsule. + * + * @param imageName Name image, without .itb suffix, used to create the capsule + * @param capsuleName The name of the capsule to create + * @return The ID of the create capsule + */ +int Capsule::create(string imageName, string capsuleName) +{ + int slotId; + + cout << LOG_PREFIX "Create capsule " << capsuleName << " from image " << imageName << endl; + + // Inject the Capsule + slotId = this->inject(imageName, false, _capsuleIdx); + + // Save the info of the new capsule + CapsuleInfo capsule; + capsule.id = _capsuleIdx; + capsule.name = capsuleName; + capsule.state = "created"; + capsule.image = imageName; + capsule.slotId = slotId; + capsule.created = this->createdTime(); + + _capsules[_capsuleIdx] = capsule; + _capsuleIdx++; + + // Save the snapshot to the capsule cache directory and shutdown it + this->saveSnapshot(slotId, capsuleName); + + // Shutdown the capsule + this->shutdown(slotId); + + // Set the Capsule state + _capsules[capsule.id].state = "created"; + + return capsule.id; +} + +/** + * @brief Start an existing capsule + * + * Depending in the state of the capsule, it is restored or injected + * + * @param capsuleName + * @param capsuleId + * @return + */ +int Capsule::start(unsigned capsuleId) +{ + int ret; + string capsuleName = _capsules[capsuleId].name; + int slotId; + + cout << LOG_PREFIX "Start capsule " << capsuleName << endl; + + if (_capsules[capsuleId].state == "created") { + slotId = this->restoreSnapshot(capsuleName); + + } else if (_capsules[capsuleId].state == "exited") { + slotId = this->inject(_capsules[capsuleId].image, true, capsuleId); + + } else { + cerr << "[EMISO:DAEMON] Capsule start failed. The capsule it is not in a correct state (" + << _capsules[capsuleId].state << ")" << endl; + return -1; + } + + _capsules[capsuleId].state = "running"; + _capsules[capsuleId].slotId = slotId; + + return ret; +} + + +/** + * @brief Shutdown a capsule + * + * @param capsuleId ID of the capsule to shutdown + * @return 0 in case of success or a negative value + */ +int Capsule::stop(unsigned capsuleId) +{ + int ret; + struct agency_ioctl_args args; + + ret = this->shutdown(_capsules[capsuleId].slotId); + + _capsules[capsuleId].state = "exited"; + + return ret; +} + + +/** + * @brief Restart a capsule + * + * @param capsuleId ID of the capsule to shutdown + * @return 0 in case of success or a negative value + */ +int Capsule::restart(unsigned capsuleId) +{ + int ret; + + auto imageName = _capsules[capsuleId].image; + auto capsuleName = _capsules[capsuleId].name; + + // Stop & remove the capsule + ret = this->shutdown(capsuleId); + if (ret < 0) + return ret; + + // re-create the capsule + ret = this->inject(imageName, true, capsuleId); + if (ret < 0) + return ret; + + _capsules[capsuleId].state = "running"; + + return 0; +} + + +/** + * @brief Pause a capsule + * + * @param capsuleId ID of the capsule to pause + * @return 0 in case of success or a negative value + */ +int Capsule::pause(unsigned capsuleId) +{ + int ret; + + cout << LOG_PREFIX "Pause capsule with ID " << capsuleId << endl; + + this->saveSnapshot(_capsules[capsuleId].slotId, _capsules[capsuleId].name); + + this->shutdown(_capsules[capsuleId].slotId); + + _capsules[capsuleId].state = "paused"; + + return ret; +} + + +/** + * @brief Unpause a capsule + * + * @param capsuleId ID of the capsule to pause + * @return 0 in case of success or a negative value + */ +int Capsule::unpause(unsigned capsuleId) +{ + int ret; + + ret = this->restoreSnapshot(_capsules[capsuleId].name); + _capsules[capsuleId].state = "running"; + + return ret; +} + +/** + * @brief Remove a capsule + * + * @param capsuleId ID of the capsule to pause + * @return 0 in case of success or a negative value + */ +int Capsule::remove(unsigned capsuleId) +{ + int ret = 0; + + if (_capsules[capsuleId].state == "running") + ret = this->shutdown(_capsules[capsuleId].slotId); + + if (ret == 0) + _capsules.erase(capsuleId); + + return ret; +} + +vector Capsule::retrieveLogs(unsigned capsuleId, unsigned lineNr) +{ + vector lines; + + // Create the file path + string fileName = "/var/log/soo/s3c_" + to_string(capsuleId) + ".log"; + + cout << "[DEBUG] Logfile name: " << fileName << endl; + + // Read the file + ifstream file(fileName); + + if (!file.is_open()) { + cerr << "Error opening file: " << fileName << endl; + return lines; // return empty vector if file couldn't be opened + } + + // Read the whole file + if (lineNr == -1) { + // Count the number of lines + lineNr = count(istreambuf_iterator(file), + istreambuf_iterator(), '\n'); + + + // Reset the file stream back to beginning + file.clear(); + file.seekg(0, ios::beg); + } + + string line; + while (getline(file, line) && lineNr-- > 0) { + lines.push_back(line); + } + + file.close(); + return lines; +} + +} // namespace emiso diff --git a/linux/usr/src/soo/emiso_engine/daemon/capsule.hpp b/linux/usr/src/soo/emiso_engine/daemon/capsule.hpp new file mode 100644 index 0000000..13627b6 --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/daemon/capsule.hpp @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef EMISO_DAEMON_CAPSULE_H +#define EMISO_DAEMON_CAPSULE_H + +#include +#include +#include + +using namespace std; + +namespace emiso { + + struct CapsuleInfo { + int id; + string name; + string state; + string image; + uint64_t created; + int slotId; + }; + + class Capsule { + + public: + Capsule(); + ~Capsule(); + + void info(map &capsuleList); + void info(int id, CapsuleInfo &info); + + int create(string imageName, string capsuleName); + int start(unsigned capsuleId); + int stop(unsigned capsuleId); + int restart(unsigned capsuleId); + int pause(unsigned capsuleId); + int unpause(unsigned capsuleId); + int remove(unsigned capsuleId); + + vector retrieveLogs(unsigned capsuleId, unsigned lineNr); + + private: + uint64_t createdTime(); + int inject(string imageName, bool start_capsule, unsigned capsuleId); + int saveSnapshot(int slotId, string snapshotName); + int restoreSnapshot(string snapshotName); + int shutdown(int slotId); + + // List of the Capsules - running or paused + static map _capsules; + // Capsule Idx, used with the map + static unsigned _capsuleIdx; + }; +} + +#endif // EMISO_DAEMON_CAPSULE_H diff --git a/linux/usr/src/soo/emiso_engine/daemon/daemon.cpp b/linux/usr/src/soo/emiso_engine/daemon/daemon.cpp new file mode 100644 index 0000000..7477e10 --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/daemon/daemon.cpp @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "daemon.hpp" + +namespace emiso { + +Daemon* Daemon::_daemon = nullptr; + +Daemon::Daemon() {}; + +Daemon::~Daemon() {}; + + +Daemon* Daemon::getInstance() +{ + + if (_daemon == nullptr) { + _daemon = new Daemon(); + } + + return _daemon; +} + +} // namespace emiso diff --git a/linux/usr/src/soo/emiso_engine/daemon/daemon.hpp b/linux/usr/src/soo/emiso_engine/daemon/daemon.hpp new file mode 100644 index 0000000..f820574 --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/daemon/daemon.hpp @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2024 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + + +#ifndef EMISO_DAEMON_H +#define EMISO_DAEMON_H + +#include "image.hpp" +#include "capsule.hpp" + + +namespace emiso { + + class Daemon { + + public: + Image image; + Capsule container; + + static Daemon* getInstance(); + + private: + Daemon(); + ~Daemon(); + + static Daemon* _daemon; + }; +} + +#endif // EMISO_DAEMON_H + diff --git a/linux/usr/src/soo/emiso_engine/daemon/image.cpp b/linux/usr/src/soo/emiso_engine/daemon/image.cpp new file mode 100644 index 0000000..b5e8cb9 --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/daemon/image.cpp @@ -0,0 +1,173 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include +#include + +#include +#include + + +#include "image.hpp" + +// Path where the Capsule images are stored +#define EMISO_IMAGE_PATH "/mnt/capsules/image/" +#define EMISO_IMAGE_ID_MODE "md5" + +namespace emiso { + +Image::Image() {}; + +Image::~Image() {}; + +namespace fs = std::filesystem; + +std::string Image::calculateId(const std::string& filePath) +{ + std::ifstream file(filePath, std::ios::binary); + if (!file) { + std::cerr << "Failed to open file '" << filePath << "'" << std::endl; + return ""; + } + + // Create an MD5 hash function + std::hash md5Hash; + + // Read the file content and calculate the MD5 checksum + std::stringstream buffer; + buffer << file.rdbuf(); + std::string fileContent = buffer.str(); + std::string id = std::to_string(md5Hash(fileContent)); + + return id; +} + + +int Image::createdTime(const std::string& filePath) +{ + try { + // Check if the file exists and retrieve its status + if (fs::exists(filePath)) { + fs::file_time_type fileTime = fs::last_write_time(filePath); + + // Convert file_time_type → system_clock::time_point + auto sctp = std::chrono::clock_cast(fileTime); + + // Get Unix timestamp + std::time_t unix_ts = std::chrono::system_clock::to_time_t(sctp); + + return unix_ts; + } else { + std::cout << "[WARNING] File '" << filePath << "' does not exist." << std::endl; + return -1; + } + + } catch (const std::filesystem::filesystem_error& e) { + std::cerr << "[ERROR]: " << e.what() << std::endl; + return -1; + } +} + + +void Image::info(std::map &imagesList) +{ + // Check if the folder exists + if (std::filesystem::exists(EMISO_IMAGE_PATH) && std::filesystem::is_directory(EMISO_IMAGE_PATH)) { + // Iterate through the files in the folder + for (const auto& entry : std::filesystem::directory_iterator(EMISO_IMAGE_PATH)) { + if (std::filesystem::is_regular_file(entry)) { + ImageInfo info; + + info.name = entry.path().filename(); + info.size = std::filesystem::file_size(entry); + info.date = this->createdTime(EMISO_IMAGE_PATH + info.name); + + auto id = this->calculateId(EMISO_IMAGE_PATH + info.name); + std::string mode = EMISO_IMAGE_ID_MODE; + info.id = mode + ":" + id; + + imagesList[info.name] = info; + } + } + } else { + std::cerr << "Folder '" << EMISO_IMAGE_PATH << "' does not exist or is not a directory." << std::endl; + } +} + +int Image::info(std::string name, ImageInfo &info) +{ + bool isID = false; + std::string id_orig; + + // The 'name' parameter can be the image name of the image ID + + std::cout << "info a image '" << name << "' called" << std::endl; + + // 1. extracting the "code" from the 'name' + auto pos = name.find(':'); + if (pos != std::string::npos) { + id_orig = name.substr(pos + 1); + + } else { + id_orig = this->calculateId(EMISO_IMAGE_PATH + name + ".itb"); + } + + // == Searching for the image which has this ID == + + // Iterate through the files in the folder + for (const auto& entry : std::filesystem::directory_iterator(EMISO_IMAGE_PATH)) { + if (std::filesystem::is_regular_file(entry)) { + info.name = entry.path().filename(); + auto id = this->calculateId(EMISO_IMAGE_PATH + info.name); + + if (id == id_orig) { + info.size = std::filesystem::file_size(entry); + info.date = this->createdTime(EMISO_IMAGE_PATH + info.name); + std::string mode = EMISO_IMAGE_ID_MODE; + info.id = mode + ":" + id; + + return 0; + } + } + } + + // No image found with the same ID as the one in 'image' parameter + std::cerr << "[ERROR]: Image '" << name << "' not found" << std::endl; + return -1; +} + +void Image::remove(std::string name) +{ + std::filesystem::path filePath = EMISO_IMAGE_PATH + name; + + if (std::filesystem::exists(filePath)) { + try { + // Remove the file + std::filesystem::remove(filePath); + + std::cout << "File removed successfully." << std::endl; + } catch (const std::filesystem::filesystem_error& e) { + std::cerr << "Error removing file: " << e.what() << std::endl; + + } + } else { + std::cout << "[WARNING] File '" << filePath << "' does not exists" << std::endl; + } +} + +} // emiso diff --git a/linux/usr/src/soo/emiso_engine/daemon/image.hpp b/linux/usr/src/soo/emiso_engine/daemon/image.hpp new file mode 100644 index 0000000..eedc597 --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/daemon/image.hpp @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef EMISO_DAEMON_IMAGE_H +#define EMISO_DAEMON_IMAGE_H + +#include +#include +#include +#include + +namespace emiso { +// namespace daemon { + + struct ImageInfo { + std::string id; + std::string name; + size_t size; + uint64_t date; + }; + + class Image { + + public: + Image(); + ~Image(); + + // Retrieve information about all the images + void info(std::map &imagesList); + + // Retrieve info about image 'name' + // return 0 in case of success, -1 otherwise + int info(std::string name, ImageInfo &info); + + // Remove image 'name' from the disk + void remove(std::string name); + private: + // The ID corresponds to the MD5 checksum + std::string calculateId(const std::string& filePath); + + // Get the date at which the image was created (Unix timestamp) + int createdTime(const std::string& filePath); + + }; +// } +} + +#endif // EMISO_DAEMON_IMAGE_H diff --git a/linux/usr/src/soo/emiso_engine/emiso_engine.cpp b/linux/usr/src/soo/emiso_engine/emiso_engine.cpp new file mode 100644 index 0000000..d87e154 --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/emiso_engine.cpp @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +// EMISO Engine - Start the engine on port '2375'. It can be started in secure +// mode (HTTPS/TLS) with '-s' option +// The interactive mode ('-i' option) starts a cli interface instead of the web +// server + +#include +#include + +#include "webserver/webserver.hpp" +// #include "cli/cli.hpp" +#include "daemon/daemon.hpp" + +#define SERVER_PORT 2375 + +int main(int argc, char **argv) +{ + int c; + bool secure = false; + bool interactive = false; + + // TODO - Use C++ parameter handler lib ! + while ((c = getopt(argc, argv, "is")) != EOF) { + switch (c) { + case 'i': + interactive = true; + break; + case 's': + secure = true; + break; + default: + // usage(); + exit(1); + break; + } + } + + emiso::Daemon *daemon = emiso::Daemon::getInstance(); + +// if (interactive) { +// emiso::Cli cli; +// cli.start(); +// +// } else { + // TODO - in interactive mode, also start the webserver ! + emiso::WebServer server(SERVER_PORT, secure, daemon); + server.start(true); +// } + + return 0; +} diff --git a/linux/usr/src/soo/emiso_engine/include/emiso/config.hpp b/linux/usr/src/soo/emiso_engine/include/emiso/config.hpp new file mode 100644 index 0000000..a1e4ac5 --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/include/emiso/config.hpp @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +/* Basic - Constant configuration for EMISO engine */ + +#ifndef EMISO_CONFIG_H +#define EMISO_CONFIG_H + +#define EMISO_VERSION "1.0" +#define EMISO_PLATFORM_NAME "emiso" + +// Webserver configuration +#define EMISO_WEB_COMP_NAME "engine" +#define EMISO_WEB_API_VERSION "1.43" +#define EMISO_WEB_EXPERIMENTAL false +#define EMISO_WEB_SWARM "inactive" + +#endif // EMISO_CONFIG_H + diff --git a/linux/usr/src/soo/emiso_engine/include/emiso/utils.hpp b/linux/usr/src/soo/emiso_engine/include/emiso/utils.hpp new file mode 100644 index 0000000..1f1759f --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/include/emiso/utils.hpp @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +/* Provide basic functions for the EMISO engine */ + +#ifndef EMISO_UTILS_H +#define EMISO_UTILS_H + +#include + +namespace emiso { + + struct SystemInfo { + std::string kernel_version; + std::string os; + std::string os_version; + std::string os_type; + std::string arch; + }; + + class Utils { + + public: + static Utils& getInstance() { + // Create the instance if it doesn't exist + static Utils instance; + return instance; + } + + /* Return info in the platform */ + SystemInfo getInfo(); + + // Return the current system time, in RFC 3339 format with nano-seconds + std::string getSystemTime(); + + // Return the Agency UUID of the Smart Object + std::string getAgencyUID(); + + private: + SystemInfo _info; + + Utils(); + ~Utils(); + + // Make copy constructor and assignment operator private to prevent copying + Utils(const Utils&) = delete; + Utils& operator=(const Utils&) = delete; + }; + +} // emiso + +#endif // EMISO_UTILS_H + + + + diff --git a/linux/usr/src/soo/emiso_engine/utils.cpp b/linux/usr/src/soo/emiso_engine/utils.cpp new file mode 100644 index 0000000..3383e2a --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/utils.cpp @@ -0,0 +1,114 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include +#include +#include +#include +#include + +#include + +#define EMISO_OS_RELEASE_PATH "/etc/os-release" +#define EMISO_AGENCY_UID_PATH "/sys/soo/agencyUID" + +namespace emiso { + +Utils::Utils () +{ + // Retrieve platform info + struct utsname unameData; + if (uname(&unameData) != -1) { + _info.kernel_version = unameData.release; + _info.os_type = unameData.sysname; + _info.arch = unameData.machine; + } + + // Retrieve OS information + std::ifstream osReleaseFile(EMISO_OS_RELEASE_PATH); + if (osReleaseFile.is_open()) { + std::string line; + while (std::getline(osReleaseFile, line)) { + if (line.find("PRETTY_NAME=") != std::string::npos) { + _info.os = line.substr(13); + } + if (line.find("VERSION=") != std::string::npos) { + _info.os_version = line.substr(8); + } + } + osReleaseFile.close(); + } else { + std::cerr << "Failed to open /etc/os-release" << std::endl; + } +} + +Utils::~Utils() {} + +SystemInfo Utils::getInfo() +{ + return _info; +} + + +std::string Utils::getSystemTime() +{ + // Get the current time with nanoseconds + auto currentTime = std::chrono::system_clock::now(); + + // Convert to RFC 3339 format with nanoseconds + auto timeT = std::chrono::system_clock::to_time_t(currentTime); + auto fractionalSeconds = std::chrono::duration_cast(currentTime.time_since_epoch()).count() % 1000000000; + struct tm timeinfo; + gmtime_r(&timeT, &timeinfo); + + // Format the date and time + char buffer[64]; // Sufficient size for RFC 3339 format + strftime(buffer, sizeof(buffer), "%Y-%m-%dT%H:%M:%S", &timeinfo); + + // Create an output string stream to capture the formatted time + std::ostringstream formattedTime; + formattedTime << buffer << "." << std::setw(9) << std::setfill('0') << fractionalSeconds << "Z"; + + // Get the formatted time as a string + return formattedTime.str(); +} + + +std::string Utils::getAgencyUID() +{ + std::ifstream sysfsFile(EMISO_AGENCY_UID_PATH); + if (!sysfsFile.is_open()) { + std::cerr << "Failed to open sysfs file: " << EMISO_AGENCY_UID_PATH << std::endl; + // TODO - handle error + } + + std::string fileContent; + std::getline(sysfsFile, fileContent); // Read the content of the file + + sysfsFile.close(); // Close the file + + if (sysfsFile.fail()) { + std::cerr << "Error occurred while reading the sysfs file." << std::endl; + // TODO - handle error + } + + return fileContent; +} + + +} // emiso diff --git a/linux/usr/src/soo/emiso_engine/webserver/container/container.cpp b/linux/usr/src/soo/emiso_engine/webserver/container/container.cpp new file mode 100644 index 0000000..3d03bc4 --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/webserver/container/container.cpp @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "container.hpp" + +namespace emiso { + + namespace container { + + ContainerApi::ContainerApi(httpserver::webserver *server, Daemon *daemon) + : _server(server) { + string path = "/containers"; + + // Create routes and handlers + _listHandler = new ListHandler(daemon); + _createHandler = new CreateHandler(daemon); + _startHandler = new StartHandler(daemon); + _stopHandler = new StopHandler(daemon); + _restartHandler = new RestartHandler(daemon); + _pauseHandler = new PauseHandler(daemon); + _unpauseHandler = new UnpauseHandler(daemon); + _removeHandler = new RemoveHandler(daemon); + _inspectHandler = new InspectHandler(daemon); + _logsHandler = new LogsHandler(daemon); + + _server->register_resource(path + "/json", _listHandler); + _server->register_resource("/v[1-9]+.[0-9]+" + path + "/json", _listHandler); + + _server->register_resource(path + "/create", _createHandler); + _server->register_resource("/v[1-9]+.[0-9]+" + path + "/create", _createHandler); + + _server->register_resource(path + "/{[a-zA-Z0-9_-]+}/start", _startHandler); + _server->register_resource("/v[1-9]+.[0-9]+" +path + "/{[a-zA-Z0-9_-]+}/start", _startHandler); + + _server->register_resource(path + "/{id|[0-9]+}/stop", _stopHandler); + _server->register_resource("/v[1-9]+.[0-9]+" + path + "/{id|[0-9]+}/stop", _stopHandler); + + _server->register_resource(path + "/{id|[0-9]+}/restart", _restartHandler); + _server->register_resource("/v[1-9]+.[0-9]+" + path + "/{id|[0-9]+}/restart", _restartHandler); + + _server->register_resource(path + "/{id|[0-9]+}/pause", _pauseHandler); + _server->register_resource("/v[1-9]+.[0-9]+" + path + "/{id|[0-9]+}/pause", _pauseHandler); + + _server->register_resource(path + "/{id|[0-9]+}/unpause", _unpauseHandler); + _server->register_resource("/v[1-9]+.[0-9]+" + path + "/{id|[0-9]+}/unpause", _unpauseHandler); + + _server->register_resource(path + "/{id|[0-9]+}", _removeHandler); + _server->register_resource("/v[1-9]+.[0-9]+" + path + "/{id|[0-9]+}", _removeHandler); + + _server->register_resource(path + "/{id|[0-9]+}/json", _inspectHandler); + _server->register_resource("/v[1-9]+.[0-9]+" + path + "/{id|[0-9]+}/json", _inspectHandler); + + _server->register_resource(path + "/{id|[0-9]+}/logs", _logsHandler); + _server->register_resource("/v[1-9]+.[0-9]+" + path + "/{id|[0-9]+}/logs", _logsHandler); + } + + ContainerApi::~ContainerApi() {} + + } +} diff --git a/linux/usr/src/soo/emiso_engine/webserver/container/container.hpp b/linux/usr/src/soo/emiso_engine/webserver/container/container.hpp new file mode 100644 index 0000000..4be2857 --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/webserver/container/container.hpp @@ -0,0 +1,425 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef EMISO_CONTAINER_H +#define EMISO_CONTAINER_H + +#include +#include +#include +#include +#include +#include + +#include "../../daemon/daemon.hpp" + +#include "container_inspect.hpp" +#include "container_logs.hpp" + +#define LOG_PREFIX "[EMISO:WEBSERVER] " + +using namespace std; + +namespace emiso { +namespace container { + + class ListHandler : public httpserver::http_resource { + public: + ListHandler(Daemon *daemon) : _daemon(daemon) {}; + + shared_ptr render_GET(const httpserver::http_request &req) { + string payload_str = ""; + Json::Value payload_json; + + cout << LOG_PREFIX "'" << req.get_path() << "' (" << req.get_method() << ") called" << endl; + + // Retrieve the command args - + // only "all" and "filters/name" args are handled + bool allArg = false; + bool sizeArg = false; + string filtersArg = ""; + + for (const auto &arg : req.get_args()) { + if (string(arg.first) == "all") { + allArg = (string(arg.second) == "true"); + } + if (arg.first == "filters") { + filtersArg = arg.second; + } + } + + vector namesFilter; + + if (!filtersArg.empty()) { + Json::CharReaderBuilder readerBuilder; + Json::Value filtersJsonValue; + istringstream filtersJsonStream(filtersArg); + + if (!Json::parseFromStream(readerBuilder, filtersJsonStream, &filtersJsonValue, nullptr)) { + // Parsing failed, handle the error as needed + cerr << LOG_PREFIX "Error parsing JSON!" << endl; + } + + if (filtersJsonValue.isMember("name")) { + for (int i = 0; i < filtersJsonValue["name"].size(); ++i) { + namesFilter.push_back(filtersJsonValue["name"][i].asString()); + } + } + } + + // Retrieve container info + map info; + + _daemon->container.info(info); + + if (info.empty()) { + payload_json = Json::arrayValue; + } else { + unsigned idx = 0; + for (auto it = info.begin(); it != info.end(); ++it) { + + // == Checks the args passed to the command == + + // 'all' - if true, return all containers. else only running + // containers are returned. + if ((!allArg) && (it->second.state != "running")) { + // Only return running containers + continue; + } + + // 'filters' (only name filter is supported) + bool nameFound = false; + if (!namesFilter.empty()) { + for (const auto &pattern : namesFilter) { + regex regexPattern(pattern); + if (regex_match("/" + it->second.name, regexPattern)) { + nameFound = true; + break; + } + } + } else { + nameFound = true; + } + + if (!nameFound) { + continue; + } + + // Retrieve info about the image used to create the container + ImageInfo imageInfo; + _daemon->image.info(it->second.image, imageInfo); + + // == Return info of the container == + + payload_json[idx]["Id"] = to_string(it->second.id); + payload_json[idx]["Names"][0] = "/" + it->second.name; + + payload_json[idx]["Image"] = it->second.image + ":latest"; + payload_json[idx]["ImageID"] = imageInfo.id; + payload_json[idx]["Command"] = "/inject"; + + payload_json[idx]["Created"] = it->second.created; + payload_json[idx]["Ports"] = Json::arrayValue; + payload_json[idx]["Labels"] = Json::objectValue; + payload_json[idx]["State"] = it->second.state; + payload_json[idx]["Status"] = it->second.state; + + // Network setting as the values obtained on the test PC + payload_json[idx]["HostConfig"]["NetworkMode"] = "bridge"; + payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["IPAMConfig"] = Json::objectValue; + payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["Links"] = Json::Value::null; + payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["Aliases"] = Json::Value::null; + + payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["NetworkID"] = "7ea29fc1412292a2d7bba362f9253545fecdfa8ce9a6e37dd10ba8bee7129812", + + payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["EndpointID"] = ""; + payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["Gateway"] = ""; + payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["IPAddress"] = ""; + payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["IPPrefixLen"] = 0; + payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["IPv6Gateway"] = ""; + payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["GlobalIPv6Address"] = ""; + payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["GlobalIPv6PrefixLen"] = 0; + payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["MacAddress"] = ""; + payload_json[idx]["NetworkSettings"]["Networks"]["bridge"]["DriverOpts"] = Json::Value::null; + payload_json[idx]["Mounts"] = Json::arrayValue; + + idx++; + } + } + + Json::StreamWriterBuilder builder; + + payload_str = Json::writeString(builder, payload_json); + auto response = make_shared(payload_str, + httpserver::http::http_utils::http_ok, "application/json"); + return response; + } + + private: + Daemon *_daemon; + }; + + + class CreateHandler : public httpserver::http_resource { + public: + CreateHandler(Daemon *daemon) : _daemon(daemon) {}; + + shared_ptr render_POST(const httpserver::http_request &req) { + string payload_str = ""; + Json::Value payload_json; + int containerId; + string containerName; + + cout << LOG_PREFIX "'" << req.get_path() << "' (" << req.get_method() << ") called" << endl; + + // Extract info from body + const string requestBody = string(req.get_content()); + + // Retrieve the 'name' from request args + for (const auto &arg : req.get_args()) { + if (string(arg.first) == "name") { + containerName = string(arg.second); + } + } + + Json::Value jsonData; + Json::Reader jsonReader; + + if (!jsonReader.parse(requestBody, jsonData)) { + cout << "Failed to parse requestBody" << endl; + // JSON parsing error + // Return error message + } + + string imageName = jsonData["Image"].asString(); + + // Remove the image version of the name + size_t colonPosition = imageName.find(':'); + imageName = imageName.substr(0, colonPosition); + + cout << LOG_PREFIX "Create container '" << containerName << "' based on '" << imageName << "' name" << endl; + + unsigned id = _daemon->container.create(imageName, containerName); + cout << " Container ID: " << id << endl; + + // build the response + payload_json["Id"] = std::to_string(id); + payload_json["Warnings"] = Json::arrayValue; + + Json::StreamWriterBuilder builder; + payload_str = Json::writeString(builder, payload_json); + + auto response = make_shared(payload_str, + httpserver::http::http_utils::http_created, "application/json"); + return response; + } + + private: + Daemon *_daemon; + }; + + class StartHandler : public httpserver::http_resource { + public: + StartHandler(Daemon *daemon) : _daemon(daemon) {}; + + shared_ptr render_POST(const httpserver::http_request &req) { + string payload_str = ""; + Json::Value payload_json; + + cout << LOG_PREFIX << "'" << req.get_path() << "' (" << req.get_method() << ") called" << endl; + + // Extract info from body + const string requestBody = string(req.get_content()); + + string path = string(req.get_path()); + smatch match; + regex rgx("(/v[0-9]+.[0-9]+)?/containers/([^/]+)/start"); + + unsigned containerId; + if (regex_match(path, match, rgx)) { + // containerName = match[2]; + containerId = std::stoi(match[2].str()); + } + + cout << LOG_PREFIX "Start container based on '" << containerId << "' ID" << endl; + + // == Retrieve container ID from the request path == + //int containerId = __cxx11::stoi(req.get_arg("id")); + + _daemon->container.start(containerId); + + auto response = make_shared(payload_str, + httpserver::http::http_utils::http_no_content, "application/json"); + return response; + } + + private: + Daemon *_daemon; + }; + + class StopHandler : public httpserver::http_resource { + public: + StopHandler(Daemon *daemon) : _daemon(daemon) {}; + + shared_ptr render_POST(const httpserver::http_request &req) { + string payload_str = ""; + Json::Value payload_json; + + cout << "[WEBERVER] '" << req.get_path() << "' (" << req.get_method() << ") called" << endl; + + // == Retrieve container ID from the request path == + int containerId = __cxx11::stoi(req.get_arg("id")); + + _daemon->container.stop(containerId); + + auto response = make_shared(payload_str, + httpserver::http::http_utils::http_no_content, "application/json"); + return response; + } + + private: + Daemon *_daemon; + }; + + + class RestartHandler : public httpserver::http_resource { + public: + RestartHandler(Daemon *daemon) : _daemon(daemon) {}; + + shared_ptr render_POST(const httpserver::http_request &req) { + string payload_str = ""; + Json::Value payload_json; + + cout << "[WEBERVER] '" << req.get_path() << "' (" << req.get_method() << ") called" << endl; + + // == Retrieve container ID from the request path == + int containerId = stoi(req.get_arg("id")); + + _daemon->container.restart(containerId); + + auto response = make_shared(payload_str, + httpserver::http::http_utils::http_no_content, "application/json"); + return response; + } + + private: + Daemon *_daemon; + }; + + class PauseHandler : public httpserver::http_resource { + public: + PauseHandler(Daemon *daemon) : _daemon(daemon) {}; + + shared_ptr render_POST(const httpserver::http_request &req) { + string payload_str = ""; + Json::Value payload_json; + + cout << "[WEBERVER] '" << req.get_path() << "' (" << req.get_method() << ") called" << endl; + + // == Retrieve container ID from the request path == + int containerId = __cxx11::stoi(req.get_arg("id")); + + _daemon->container.pause(containerId); + + auto response = make_shared(payload_str, + httpserver::http::http_utils::http_no_content, "application/json"); + return response; + } + + private: + Daemon *_daemon; + + }; + + class UnpauseHandler : public httpserver::http_resource { + public: + UnpauseHandler(Daemon *daemon) : _daemon(daemon) {}; + + shared_ptr render_POST(const httpserver::http_request &req) { + string payload_str = ""; + Json::Value payload_json; + + cout << "[WEBERVER] '" << req.get_path() << "' (" << req.get_method() << ") called" << endl; + + // == Retrieve container ID from the request path == + int containerId = __cxx11::stoi(req.get_arg("id")); + + _daemon->container.unpause(containerId); + + auto response = make_shared(payload_str, + httpserver::http::http_utils::http_no_content, "application/json"); + return response; + } + + private: + Daemon *_daemon; + }; + + + class RemoveHandler : public httpserver::http_resource { + public: + RemoveHandler(Daemon *daemon) : _daemon(daemon) {}; + + shared_ptr render_DELETE(const httpserver::http_request &req) { + string payload_str = ""; + Json::Value payload_json; + + cout << "[WEBERVER] '" << req.get_path() << "' (" << req.get_method() << ") called" << endl; + + // == Retrieve container ID from the request path == + int containerId = __cxx11::stoi(req.get_arg("id")); + + _daemon->container.remove(containerId); + + auto response = make_shared(payload_str, + httpserver::http::http_utils::http_no_content, "application/json"); + return response; + } + + private: + Daemon *_daemon; + }; + + class ContainerApi { + public: + // Constructor + ContainerApi(httpserver::webserver *server, Daemon *daemon); + + // Destructor + ~ContainerApi(); + + private: + httpserver::webserver *_server; + + // Handler for the different 'container' routes + ListHandler *_listHandler; + CreateHandler *_createHandler; + StartHandler *_startHandler; + StopHandler *_stopHandler; + PauseHandler *_pauseHandler; + UnpauseHandler *_unpauseHandler; + RestartHandler *_restartHandler; + RemoveHandler *_removeHandler; + InspectHandler *_inspectHandler; + LogsHandler *_logsHandler; + }; + +} // container +} // emiso + +#endif /* EMISO_CONTAINER_H */ diff --git a/linux/usr/src/soo/emiso_engine/webserver/container/container_inspect.hpp b/linux/usr/src/soo/emiso_engine/webserver/container/container_inspect.hpp new file mode 100644 index 0000000..97d5774 --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/webserver/container/container_inspect.hpp @@ -0,0 +1,249 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef EMISO_CONTAINER_INSPECT_H +#define EMISO_CONTAINER_INSPECT_H + +#define LOG_PREFIX "[EMISO:WEBSERVER] " + +namespace emiso { +namespace container { + +class InspectHandler : public httpserver::http_resource { + public: + InspectHandler(Daemon *daemon) : _daemon(daemon){}; + + std::shared_ptr render_GET(const httpserver::http_request &req) { + std::string payload_str = ""; + Json::Value payloadJson; + + cout << LOG_PREFIX "'" << req.get_path() << "' (" << req.get_method() << ") called" << endl; + + // == Retrieve container ID from the request path == + int containerId = stoi(req.get_arg("id")); + + CapsuleInfo info; + ImageInfo imageInfo; + + _daemon->container.info(containerId, info); + + _daemon->image.info(info.image, imageInfo); + + std::tm *ptm; + char createdDate[32]; + char startedDate[32]; + // char endDate[32]; + + ptm = std::localtime((const long int *) &info.created); + std::strftime(createdDate, 32, "%Y-%m-%dT%H:%M:%SZ", ptm); + + // TODO = add start time in container info + uint64_t tmp = info.created + 10; + ptm = std::localtime((const long int *) &tmp); + std::strftime(startedDate, 32, "%Y-%m-%dT%H:%M:%SZ", ptm); + + // ptm = std::localtime((const long int*)&info.created + 500); + // std::strftime(endDate, 32, "%Y-%M-%dT%H.%M.%S", ptm); + + // == Build the response message == + payloadJson["Id"] = std::to_string(containerId); + payloadJson["Created"] = createdDate; + payloadJson["Path"] = "/inject"; + payloadJson["Args"] = Json::arrayValue; + payloadJson["State"]["Status"] = info.state; + payloadJson["State"]["Running"] = (info.state == "running") ? true : false; + payloadJson["State"]["Paused"] = (info.state == "paused") ? true : false; + payloadJson["State"]["Restarting"] = (info.state == "restarting") ? true : false; + payloadJson["State"]["OOMKilled"] = false; + payloadJson["State"]["Dead"] = (info.state == "dead") ? true : false; + payloadJson["State"]["Pid"] = 0; + payloadJson["State"]["ExitCode"] = 0; + payloadJson["State"]["Error"] = ""; + payloadJson["State"]["StartedAt"] = createdDate; // to update + payloadJson["State"]["FinishedAt"] = ""; + payloadJson["State"]["Health"] = Json::nullValue; + payloadJson["Image"] = imageInfo.id; + payloadJson["ResolvConfPath"] = + "/var/lib/docker/containers/ed856fa2c435daac513a0eff537018034fd0ce2843d84eae4dbfd22203bd10de/resolv.conf"; + payloadJson["HostnamePath"] = + "/var/lib/docker/containers/ed856fa2c435daac513a0eff537018034fd0ce2843d84eae4dbfd22203bd10de/hostname"; + payloadJson["HostsPath"] = + "/var/lib/docker/containers/ed856fa2c435daac513a0eff537018034fd0ce2843d84eae4dbfd22203bd10de/hosts"; + payloadJson["LogPath"] = + "/var/lib/docker/containers/ed856fa2c435daac513a0eff537018034fd0ce2843d84eae4dbfd22203bd10de/" + "ed856fa2c435daac513a0eff537018034fd0ce2843d84eae4dbfd22203bd10de-json.log"; + payloadJson["Name"] = "/" + info.name; + payloadJson["RestartCount"] = 0; + payloadJson["Driver"] = "overlay2"; + payloadJson["Platform"] = "linux"; + payloadJson["MountLabel"] = ""; + payloadJson["ProcessLabel"] = ""; + payloadJson["AppArmorProfile"] = ""; + payloadJson["ExecIDs"] = Json::nullValue; + payloadJson["HostConfig"]["Binds"] = Json::nullValue; + payloadJson["HostConfig"]["ContainerIDFile"] = ""; + payloadJson["HostConfig"]["LogConfig"]["Type"] = "json-file"; + payloadJson["HostConfig"]["LogConfig"]["Config"] = Json::objectValue; + payloadJson["HostConfig"]["LogConfig"]["NetworkMode"] = "default"; + payloadJson["HostConfig"]["LogConfig"]["PortBindings"] = Json::objectValue; + payloadJson["HostConfig"]["RestartPolicy"]["Name"] = "no"; + payloadJson["HostConfig"]["RestartPolicy"]["MaximumRetryCount"] = 0; + payloadJson["HostConfig"]["AutoRemove"] = false; + payloadJson["HostConfig"]["VolumeDriver"] = ""; + payloadJson["HostConfig"]["VolumesFrom"] = Json::nullValue; + payloadJson["HostConfig"]["ConsoleSize"][0] = 24; + payloadJson["HostConfig"]["ConsoleSize"][0] = 80; + payloadJson["HostConfig"]["CapAdd"] = Json::nullValue; + payloadJson["HostConfig"]["CapDrop"] = Json::nullValue; + payloadJson["HostConfig"]["CgroupnsMode"] = "host"; + payloadJson["HostConfig"]["Dns"] = Json::arrayValue; + payloadJson["HostConfig"]["DnsOptions"] = Json::arrayValue; + payloadJson["HostConfig"]["DnsSearch"] = Json::arrayValue; + payloadJson["HostConfig"]["ExtraHosts"] = Json::nullValue; + payloadJson["HostConfig"]["GroupAdd"] = Json::nullValue; + payloadJson["HostConfig"]["IpcMode"] = "private"; + payloadJson["HostConfig"]["Cgroup"] = ""; + payloadJson["HostConfig"]["Links"] = Json::nullValue; + payloadJson["HostConfig"]["OomScoreAdj"] = 0; + payloadJson["HostConfig"]["PidMode"] = ""; + payloadJson["HostConfig"]["Privileged"] = false; + payloadJson["HostConfig"]["PublishAllPorts"] = false; + payloadJson["HostConfig"]["ReadonlyRootfs"] = false; + payloadJson["HostConfig"]["SecurityOpt"] = Json::nullValue; + payloadJson["HostConfig"]["UTSMode"] = ""; + payloadJson["HostConfig"]["UsernsMode"] = ""; + payloadJson["HostConfig"]["ShmSize"] = 67108864; + payloadJson["HostConfig"]["Runtime"] = "runc"; + payloadJson["HostConfig"]["Isolation"] = ""; + payloadJson["HostConfig"]["CpuShares"] = 0; + payloadJson["HostConfig"]["Memory"] = 0; + payloadJson["HostConfig"]["NanoCpus"] = 0; + payloadJson["HostConfig"]["CgroupParent"] = ""; + payloadJson["HostConfig"]["BlkioWeight"] = 0; + payloadJson["HostConfig"]["BlkioWeightDevice"] = Json::arrayValue; + payloadJson["HostConfig"]["BlkioDeviceReadBps"] = Json::arrayValue; + payloadJson["HostConfig"]["BlkioDeviceWriteBps"] = Json::arrayValue; + payloadJson["HostConfig"]["BlkioDeviceReadIOps"] = Json::arrayValue; + payloadJson["HostConfig"]["BlkioDeviceWriteIOps"] = Json::arrayValue; + payloadJson["HostConfig"]["CpuPeriod"] = 0; + payloadJson["HostConfig"]["CpuQuota"] = 0; + payloadJson["HostConfig"]["CpuRealtimePeriod"] = 0; + payloadJson["HostConfig"]["CpuRealtimeRuntime"] = 0; + payloadJson["HostConfig"]["CpusetCpus"] = ""; + payloadJson["HostConfig"]["CpusetMems"] = ""; + payloadJson["HostConfig"]["Devices"] = Json::arrayValue; + payloadJson["HostConfig"]["DeviceCgroupRules"] = Json::nullValue; + payloadJson["HostConfig"]["DeviceRequests"] = Json::nullValue; + payloadJson["HostConfig"]["MemoryReservation"] = 0; + payloadJson["HostConfig"]["MemorySwap"] = 0; + payloadJson["HostConfig"]["MemorySwappiness"] = Json::nullValue; + payloadJson["HostConfig"]["OomKillDisable"] = Json::nullValue; + payloadJson["HostConfig"]["PidsLimit"] = Json::nullValue; + payloadJson["HostConfig"]["Ulimits"] = Json::nullValue; + payloadJson["HostConfig"]["CpuCount"] = 0; + payloadJson["HostConfig"]["CpuPercent"] = 0; + payloadJson["HostConfig"]["IOMaximumIOps"] = 0; + payloadJson["HostConfig"]["IOMaximumBandwidth"] = 0; + payloadJson["HostConfig"]["MaskedPaths"][0] = "/proc/asound"; + payloadJson["HostConfig"]["MaskedPaths"][1] = "/proc/acpi"; + payloadJson["HostConfig"]["MaskedPaths"][2] = "/proc/kcore"; + payloadJson["HostConfig"]["MaskedPaths"][3] = "/proc/keys"; + payloadJson["HostConfig"]["MaskedPaths"][4] = "/proc/latency_stats"; + payloadJson["HostConfig"]["MaskedPaths"][5] = "/proc/timer_list"; + payloadJson["HostConfig"]["MaskedPaths"][6] = "/proc/timer_stats"; + payloadJson["HostConfig"]["MaskedPaths"][7] = "/proc/sched_debug"; + payloadJson["HostConfig"]["MaskedPaths"][8] = "/proc/scsi"; + payloadJson["HostConfig"]["MaskedPaths"][9] = "/sys/firmware"; + payloadJson["HostConfig"]["ReadonlyPaths"][0] = "/proc/bus"; + payloadJson["HostConfig"]["ReadonlyPaths"][1] = "/proc/fs"; + payloadJson["HostConfig"]["ReadonlyPaths"][2] = "/proc/irq"; + payloadJson["HostConfig"]["ReadonlyPaths"][3] = "/proc/sys"; + payloadJson["HostConfig"]["ReadonlyPaths"][4] = "/proc/sysrq-trigger"; + payloadJson["GraphDriver"]["Data"]["LowerDir"] = + "/var/lib/docker/overlay2/5132a5d000dc493f64e1076a4fbefcfd6d04705bb52590b639668d9d82c6652f-init/diff:/var/" + "lib/docker/overlay2/0ffcf17c5b7310dcbced19f13a63e8b7566325eaabf34ded9bc67b7c56057fa2/diff"; + payloadJson["GraphDriver"]["Data"]["MergedDir"] = "/etc/emiso/merged"; + payloadJson["GraphDriver"]["Data"]["UpperDir"] = "/etc/emiso/diff"; + payloadJson["GraphDriver"]["Data"]["WorkDir"] = "/etc/emiso/work"; + payloadJson["GraphDriver"]["Name"] = "overlay2"; + payloadJson["Mounts"] = Json::arrayValue; + payloadJson["Config"]["Hostname"] = "ed856fa2c435"; + payloadJson["Config"]["Domainname"] = ""; + payloadJson["Config"]["User"] = ""; + payloadJson["Config"]["AttachStdin"] = false; + payloadJson["Config"]["AttachStdout"] = true; + payloadJson["Config"]["AttachStderr"] = true; + payloadJson["Config"]["Tty"] = false; + payloadJson["Config"]["OpenStdin"] = false; + payloadJson["Config"]["StdinOnce"] = false; + payloadJson["Config"]["Env"][0] = "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"; + payloadJson["Config"]["Cmd"][0] = ""; + payloadJson["Config"]["Image"] = info.image; + payloadJson["Config"]["Volumes"] = Json::nullValue; + payloadJson["Config"]["WorkingDir"] = ""; + payloadJson["Config"]["Entrypoint"] = Json::nullValue; + payloadJson["Config"]["OnBuild"] = Json::nullValue; + payloadJson["Config"]["Labels"] = Json::objectValue; + payloadJson["NetworkSettings"]["Bridge"] = ""; + payloadJson["NetworkSettings"]["SandboxID"] = + "a7c9c2fe37e94ade66a9969d7070fe5d3e894753bb20fe14953692074af9ef00"; + payloadJson["NetworkSettings"]["HairpinMode"] = false; + payloadJson["NetworkSettings"]["LinkLocalIPv6Address"] = ""; + payloadJson["NetworkSettings"]["LinkLocalIPv6PrefixLen"] = 0; + payloadJson["NetworkSettings"]["Ports"] = Json::objectValue; + payloadJson["NetworkSettings"]["SandboxKey"] = "/var/run/docker/netns/a7c9c2fe37e9"; + payloadJson["NetworkSettings"]["SecondaryIPAddresses"] = Json::nullValue; + payloadJson["NetworkSettings"]["SecondaryIPv6Addresses"] = Json::nullValue; + payloadJson["NetworkSettings"]["EndpointID"] = ""; + payloadJson["NetworkSettings"]["Gateway"] = ""; + payloadJson["NetworkSettings"]["GlobalIPv6Address"] = ""; + payloadJson["NetworkSettings"]["GlobalIPv6PrefixLen"] = 0; + payloadJson["NetworkSettings"]["IPAddress"] = ""; + payloadJson["NetworkSettings"]["IPPrefixLen"] = 0; + payloadJson["NetworkSettings"]["IPv6Gateway"] = ""; + payloadJson["NetworkSettings"]["MacAddress"] = ""; + payloadJson["NetworkSettings"]["Networks"]["bridge"]["IPAMConfig"] = Json::nullValue; + payloadJson["NetworkSettings"]["Networks"]["bridge"]["Links"] = Json::nullValue; + payloadJson["NetworkSettings"]["Networks"]["bridge"]["Aliases"] = Json::nullValue; + payloadJson["NetworkSettings"]["Networks"]["bridge"]["NetworkID"] = + "1cacb396f2c32029fe35d73d8d061575bc69baadc15c1cc8fa596aa2ac3c1eaa"; + payloadJson["NetworkSettings"]["Networks"]["bridge"]["EndpointID"] = ""; + payloadJson["NetworkSettings"]["Networks"]["bridge"]["Gateway"] = ""; + payloadJson["NetworkSettings"]["Networks"]["bridge"]["IPAddress"] = ""; + payloadJson["NetworkSettings"]["Networks"]["bridge"]["IPPrefixLen"] = 0; + payloadJson["NetworkSettings"]["Networks"]["bridge"]["IPv6Gateway"] = ""; + payloadJson["NetworkSettings"]["Networks"]["bridge"]["GlobalIPv6Address"] = ""; + payloadJson["NetworkSettings"]["Networks"]["bridge"]["GlobalIPv6PrefixLen"] = 0; + payloadJson["NetworkSettings"]["Networks"]["bridge"]["MacAddress"] = ""; + payloadJson["NetworkSettings"]["Networks"]["bridge"]["DriverOpts"] = Json::nullValue; + + Json::StreamWriterBuilder builder; + payload_str = Json::writeString(builder, payloadJson); + auto response = std::make_shared( + payload_str, httpserver::http::http_utils::http_ok, "application/json"); + return response; + } + + private: + Daemon *_daemon; +}; + +} // namespace container +} // namespace emiso + +#endif /* EMISO_CONTAINER_INSPECT_H */ diff --git a/linux/usr/src/soo/emiso_engine/webserver/container/container_logs.hpp b/linux/usr/src/soo/emiso_engine/webserver/container/container_logs.hpp new file mode 100644 index 0000000..56f5d78 --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/webserver/container/container_logs.hpp @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2024 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef EMISO_CONTAINER_LOGS_H +#define EMISO_CONTAINER_LOGS_H + +namespace emiso { +namespace container { + +class LogsHandler : public httpserver::http_resource { + public: + LogsHandler(Daemon *daemon) : _daemon(daemon) {}; + + std::shared_ptr render_GET(const httpserver::http_request &req) { + int lineNr = -1; + + std::cout << "[WEBERVER] '" << std::string(req.get_path()) << "' (" << std::string(req.get_method()) << ") called" << std::endl; + + // == Retrieve container ID from the request path == + int containerId = std::__cxx11::stoi(req.get_arg("id")); + std::cout << "container ID: " << containerId << std::endl; + + // == Retrieve QUERY params == + for (const auto& arg : req.get_args()) { + std::cout << "param: " << std::string(arg.first) << ", value: " << std::string(arg.second) << std::endl; + + // Retrieve 'tail' parameter - if present + if (std::string(arg.first) == "tail") { + lineNr = stoi(arg.second); + } + } + + std::vector lines; + lines = _daemon->container.retrieveLogs(containerId, lineNr); + + std::string message; + for (int i = 0; i < lines.size(); i++) { + message += lines[i] + "\n"; + } + + auto response = std::make_shared(message, + httpserver::http::http_utils::http_ok, "application/json"); + return response; + } + + private: + Daemon *_daemon; + }; + + +} // container +} // emiso + +#endif // EMISO_CONTAINER_LOGS_H diff --git a/linux/usr/src/soo/emiso_engine/webserver/image/image.cpp b/linux/usr/src/soo/emiso_engine/webserver/image/image.cpp new file mode 100644 index 0000000..3ddd8e3 --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/webserver/image/image.cpp @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "image.hpp" + +namespace emiso { + + namespace image { + + ImageApi::ImageApi(httpserver::webserver *server, Daemon *daemon) + : _server(server) { + std::string path = "/images"; + + // Create routes and handlers + _listHandler = new ListHandler(daemon); + _historyHandler = new HistoryHandler(daemon); + _inspectHandler = new InspectHandler(daemon); + + _server->register_resource(path + "/json", _listHandler); + _server->register_resource("/v[1-9]+.[0-9]+" + path + "/json", _listHandler); + + _server->register_resource(path + "/{[a-zA-Z0-9_-]+}/history", _listHandler); + _server->register_resource("/v[1-9]+.[0-9]+" + path + "/{[a-zA-Z0-9_-]+}/history", _listHandler); + + _server->register_resource(path + "/{[a-zA-Z0-9_-]+}/json", _inspectHandler); + _server->register_resource("/v[1-9]+.[0-9]+" + path + "/{[a-zA-Z0-9_-]+}/json", _inspectHandler); + } + + ImageApi::~ImageApi() {} + } +} diff --git a/linux/usr/src/soo/emiso_engine/webserver/image/image.hpp b/linux/usr/src/soo/emiso_engine/webserver/image/image.hpp new file mode 100644 index 0000000..f80dd98 --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/webserver/image/image.hpp @@ -0,0 +1,137 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef EMISO_IMAGE_H +#define EMISO_IMAGE_H + +#include +#include +#include + +#include "../../daemon/image.hpp" +#include "../../daemon/daemon.hpp" + +#include "image_inspect.hpp" + +namespace emiso { +namespace image { + + class ListHandler : public httpserver::http_resource { + public: + ListHandler(Daemon *daemon) : _daemon(daemon) {}; + + std::shared_ptr render_GET(const httpserver::http_request &req) { + std::string payload_str = ""; + Json::Value payload_json; + + std::cout << "[WEBERVER] '" << std::string(req.get_path()) << "' (" << std::string(req.get_method()) << ") called" << std::endl; + + // Retrieve image info + std::map info; + _daemon->image.info(info); + + unsigned idx = 0; + for (auto it = info.begin(); it != info.end(); ++it) { + + payload_json[idx]["Id"] = it->second.id; + payload_json[idx]["ParentId"] = ""; + payload_json[idx]["RepoTags"][0] = it->second.name + ":latest"; + payload_json[idx]["Created"] = it->second.date; + payload_json[idx]["Size"] = it->second.size; + payload_json[idx]["SharedSize"] = -1; // Value not set or calculated + payload_json[idx]["Containers"] = -1; // Value not set or calculated + payload_json[idx]["Labels"] = Json::Value::null; + + idx++; + } + + Json::StreamWriterBuilder builder; + payload_str = Json::writeString(builder, payload_json); + + auto response = std::make_shared(payload_str, + httpserver::http::http_utils::http_ok, "application/json"); + return response; + } + + private: + // daemon::Image _image; + Daemon *_daemon; + + }; + + + class HistoryHandler : public httpserver::http_resource { + public: + HistoryHandler(Daemon *daemon) : _daemon(daemon) {}; + + std::shared_ptr render_GET(const httpserver::http_request &req) { + std::cout << "[WEBERVER] '" << std::string(req.get_path()) << "' (" << std::string(req.get_method()) << ") called" << std::endl; + + std::string payload_str = ""; + Json::Value payload_json; + + // Retrieve image info + std::map info; + _daemon->image.info(info); + + unsigned idx = 0; + for (auto it = info.begin(); it != info.end(); ++it) { + + payload_json[idx]["Id"] = it->second.id; + payload_json[idx]["Created"] = it->second.date; + payload_json[idx]["CreatedBy"] = "Micofe"; + payload_json[idx]["Tags"] = Json::arrayValue; + payload_json[idx]["Size"] = it->second.size; + payload_json[idx]["Comment"] = ""; + + idx++; + } + + Json::StreamWriterBuilder builder; + payload_str = Json::writeString(builder, payload_json); + + auto response = std::make_shared(payload_str, + httpserver::http::http_utils::http_ok, "application/json"); + return response; + } + + private: + // daemon::Image _image; + Daemon *_daemon; + }; + + class ImageApi { + public: + // Constructor + ImageApi(httpserver::webserver *server, Daemon *daemon); + + // Destructor + ~ImageApi(); + + private: + httpserver::webserver *_server; + + // Handler for the different 'list' routes + ListHandler *_listHandler; + HistoryHandler *_historyHandler; + InspectHandler *_inspectHandler; + }; +} // image +} // emiso + +#endif /* EMISO_IMAGE_H */ diff --git a/linux/usr/src/soo/emiso_engine/webserver/image/image_inspect.hpp b/linux/usr/src/soo/emiso_engine/webserver/image/image_inspect.hpp new file mode 100644 index 0000000..5e8a4e9 --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/webserver/image/image_inspect.hpp @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef EMISO_INSPECT_IMAGE_H +#define EMISO_INSPECT_IMAGE_H + +#include +#include +#include + +#include "../../daemon/image.hpp" +#include "../../daemon/daemon.hpp" + +namespace emiso { +namespace image { + + class InspectHandler : public httpserver::http_resource { + public: + InspectHandler(Daemon *daemon) : _daemon(daemon){}; + + std::shared_ptr render_GET(const httpserver::http_request &req) { + std::string payload_str = ""; + Json::Value payload_json; + int error; + + std::cout << "[WEBERVER] '" << std::string(req.get_path()) << "' (" << std::string(req.get_method()) << ") called" << std::endl; + + // Retrieve the image 'name' form the path (the 'name' correspond + // here to the image ID) + string path = string(req.get_path()); + smatch match; + regex rgx("(/v[0-9]+.[0-9]+)?/images/([a-zA-Z0-9_:-]+)/json"); + + string imageName; + if (regex_match(path, match, rgx)) { + imageName = match[2]; + + // The name/id has been found - get the image info + ImageInfo info; + int ret = _daemon->image.info(imageName, info); + + if (ret == 0) { + payload_json["Id"] = info.id; + payload_json["Created"] = info.date; + payload_json["Size"] = info.size; + payload_json["Created"] = info.date; + payload_json["RepoTags"][0] = info.name + ":latest"; + + Json::StreamWriterBuilder builder; + payload_str = Json::writeString(builder, payload_json); + error = httpserver::http::http_utils::http_ok; + } else { + payload_str = "Image '" + imageName + "' not found"; + error = httpserver::http::http_utils::http_not_found; + } + } else { + // The name/id has not been found - error + payload_str = "Server Error - Failed to extract the image name from the path"; + error = httpserver::http::http_utils::http_internal_server_error; + } + + auto response = std::make_shared(payload_str, + error, "application/json"); + + return response; + } + + private: + Daemon *_daemon; + }; + +} // image +} // emiso + +#endif // EMISO_INSPECT_IMAGE_H \ No newline at end of file diff --git a/linux/usr/src/soo/emiso_engine/webserver/network/network.cpp b/linux/usr/src/soo/emiso_engine/webserver/network/network.cpp new file mode 100644 index 0000000..52d72ee --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/webserver/network/network.cpp @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "network.hpp" + +namespace emiso { + + namespace network { + + NetworkApi::NetworkApi(httpserver::webserver *server) + : _server(server) { + std::string path = "/networks"; + + // Create routes and handlers + _listHandler = new ListHandler(); + + _server->register_resource(path, _listHandler); + _server->register_resource("/v[1-9]+.[0-9]+" + path, _listHandler); + } + + NetworkApi::~NetworkApi() {} + } +} diff --git a/linux/usr/src/soo/emiso_engine/webserver/network/network.hpp b/linux/usr/src/soo/emiso_engine/webserver/network/network.hpp new file mode 100644 index 0000000..e418679 --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/webserver/network/network.hpp @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef EMISO_NETWORK_H +#define EMISO_NETWORK_H + +#include +#include +#include + +namespace emiso { + + namespace network { + + class ListHandler : public httpserver::http_resource { + public: + + // In emiso, network is not supported --> return an empty list ! + std::shared_ptr render_GET(const httpserver::http_request &req) { + std::string payload_str = "[]"; + + std::cout << "[WEBERVER] '" << req.get_path() << "' (" << req.get_method() << ") called" << std::endl; + + auto response = std::make_shared(payload_str, + httpserver::http::http_utils::http_ok, "application/json"); + return response; + } + }; + + class NetworkApi { + public: + // Constructor + NetworkApi(httpserver::webserver *server); + + // Destructor + ~NetworkApi(); + + private: + httpserver::webserver *_server; + + // Handler for the different 'list' routes + ListHandler *_listHandler; + + }; + } +} + +#endif /* EMISO_NETWORK_H */ diff --git a/linux/usr/src/soo/emiso_engine/webserver/plugins/plugins.cpp b/linux/usr/src/soo/emiso_engine/webserver/plugins/plugins.cpp new file mode 100644 index 0000000..998237a --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/webserver/plugins/plugins.cpp @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "plugins.hpp" + +namespace emiso { +namespace plugins { + + PluginsApi::PluginsApi(httpserver::webserver *server): _server(server) { + std::string path = "/plugins"; + + // Create routes and handlers + _listHandler = new ListHandler(); + + _server->register_resource(path, _listHandler); + _server->register_resource("/v[1-9]+.[0-9]+" + path, _listHandler); + } + + PluginsApi::~PluginsApi() {} + +} // plugins +} // emiso diff --git a/linux/usr/src/soo/emiso_engine/webserver/plugins/plugins.hpp b/linux/usr/src/soo/emiso_engine/webserver/plugins/plugins.hpp new file mode 100644 index 0000000..b5e46c5 --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/webserver/plugins/plugins.hpp @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef EMISO_PLUGINS_H +#define EMISO_PLUGINS_H + +#include +#include +#include + +namespace emiso { +namespace plugins { + + class ListHandler : public httpserver::http_resource { + public: + + std::shared_ptr render_GET(const httpserver::http_request &req) { + std::cout << "[WEBERVER] '" << req.get_path() << "' (" << req.get_method() << ") called" << std::endl; + + std::string payload_str = ""; + Json::Value payload_json; + + payload_json = Json::arrayValue; // empty array + + Json::StreamWriterBuilder builder; + payload_str = Json::writeString(builder, payload_json); + + auto response = std::make_shared(payload_str, + httpserver::http::http_utils::http_ok, "application/json"); + return response; + } + }; + + class PluginsApi { + public: + // Constructor + PluginsApi(httpserver::webserver *server); + + // Destructor + ~PluginsApi(); + + private: + httpserver::webserver *_server; + + // Handler for the different 'list' routes + ListHandler *_listHandler; + + }; + +} // plugins +} // emiso + +#endif /* EMISO_PLUGINS_H */ diff --git a/linux/usr/src/soo/emiso_engine/webserver/system/system.cpp b/linux/usr/src/soo/emiso_engine/webserver/system/system.cpp new file mode 100644 index 0000000..211ed8c --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/webserver/system/system.cpp @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "system.hpp" + +namespace emiso { + namespace system { + + SytemApi::SytemApi(httpserver::webserver *server, Daemon *daemon) + : _server(server) { + + // Create routes and handlers + _pinghandler = new PingHandler(); + _sysInfoHandler = new SysInfoHandler(daemon); + _getVersionHandler = new GetVersionHandler(); + + _server->register_resource("/_ping", _pinghandler); + _server->register_resource("/v[1-9]+.[0-9]+/_ping", _pinghandler); + _server->register_resource("/v[1-9]+.[0-9]+/info", _sysInfoHandler); + _server->register_resource("/info", _sysInfoHandler); + _server->register_resource("/version", _getVersionHandler); + _server->register_resource("/v[1-9]+.[0-9]+/version", _getVersionHandler); + } + + SytemApi::~SytemApi() {} + } +} diff --git a/linux/usr/src/soo/emiso_engine/webserver/system/system.hpp b/linux/usr/src/soo/emiso_engine/webserver/system/system.hpp new file mode 100644 index 0000000..be15f17 --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/webserver/system/system.hpp @@ -0,0 +1,236 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef EMISO_SYSTEM_H +#define EMISO_SYSTEM_H + +#include +#include +#include + +#include +#include + +#include "../../daemon/image.hpp" +#include "../../daemon/capsule.hpp" +#include "../../daemon/daemon.hpp" + +namespace emiso { + namespace system { + + class PingHandler : public httpserver::http_resource { + public: + + std::shared_ptr render_GET(const httpserver::http_request &req) { + std::cout << "[WEBERVER] '" << std::string(req.get_path()) << "' (" << std::string(req.get_method()) << ") called" << std::endl; + + // Respond is a simple 'OK' + auto response = std::make_shared("OK"); + return response; + } + + std::shared_ptr render_HEAD(const httpserver::http_request &req) { + std::cout << "[WEBERVER] '" << std::string(req.get_path()) << "' (" << std::string(req.get_method()) << ") called" << std::endl; + + auto response = std::shared_ptr(new httpserver::string_response("")); + + response->with_header("Api-Version", EMISO_WEB_API_VERSION); + response->with_header("Builder-Version", EMISO_VERSION); + if (EMISO_WEB_EXPERIMENTAL) + response->with_header("Docker-Experimental", "true"); + else + response->with_header("Docker-Experimental", "false"); + response->with_header("Swarm", EMISO_WEB_SWARM); + response->with_header("Cache-Control", "no-cache, no-store, must-revalidate"); + response->with_header("Pragma", "no-cache"); + + return response; + } + }; + + class SysInfoHandler : public httpserver::http_resource { + public: + SysInfoHandler(Daemon *daemon) : _daemon(daemon) {}; + + std::shared_ptr render_GET(const httpserver::http_request &req) { + std::cout << "[WEBERVER] '" << std::string(req.get_path()) << "' (" << std::string(req.get_method()) << ") called" << std::endl; + + std::string payload_str = ""; + Json::Value payload_json; + Utils& utils = Utils::getInstance(); + auto config = utils.getInfo(); + // daemon::Image image; + std::map info; + std::map capsuleInfo; + + // Retrieve images info + _daemon->image.info(info); + auto image_nr = info.size(); + + // Retrieve container info + _daemon->container.info(capsuleInfo); + auto containerNr = capsuleInfo.size(); + + payload_json["ID"] = utils.getAgencyUID(); + payload_json["Containers"] = containerNr; // To update next + payload_json["ContainersRunning"] = containerNr; // To update next + payload_json["ContainersPaused"] = 0; // To update next + payload_json["ContainersStopped"] = 0; // To update next + payload_json["Images"] = image_nr; // To update next + + // WARNING - hardcoded values got from Docker answer of JMI PC + payload_json["Driver"] = "overlay2"; + payload_json["DriverStatus"][0].append("Backing Filesystem"); + payload_json["DriverStatus"][0].append("extfs"); + payload_json["DriverStatus"][1].append("Supports d_type"); + payload_json["DriverStatus"][1].append("true"); + payload_json["DriverStatus"][2].append("Using metacopy"); + payload_json["DriverStatus"][2].append("false"); + payload_json["DriverStatus"][3].append("Native Overlay Diff"); + payload_json["DriverStatus"][3].append("true"); + payload_json["DriverStatus"][4].append("userxattr"); + payload_json["DriverStatus"][4].append("false"); + + payload_json["DockerRootDir"] = "/var/lib/docker"; // default value on Linux + payload_json["Plugins"] = Json::objectValue; + + // Set these values to false as not supported/handled by emiso + payload_json["MemoryLimit"] = false; + payload_json["SwapLimit"] = false; + payload_json["CpuCfsPeriod"] = false; + payload_json["CpuCfsQuota"] = false; + payload_json["CPUShares"] = false; + payload_json["CPUSet"] = false; + payload_json["PidsLimit"] = false; + payload_json["OomKillDisable"] = false; + payload_json["IPv4Forwarding"] = false; + payload_json["BridgeNfIptables"] = false; + payload_json["BridgeNfIp6tables"] = false; + payload_json["Debug"] = false; + + payload_json["SystemTime"] = utils.getSystemTime(); + payload_json["LoggingDriver"] = "json-file"; // WARNING - hardcoded values got from Docker answer of JMI PC + payload_json["CgroupDriver"] = "none"; + payload_json["CgroupVersion"] = "1"; // Default docker value + payload_json["NEventsListener"] = 0; + + payload_json["KernelVersion"] = config.kernel_version; + payload_json["OperatingSystem"] = config.os; + payload_json["OSVersion"] = config.os_version; + payload_json["OSType"] = config.os_type; + payload_json["Architecture"] = config.arch; + + payload_json["NCPU"] = 1; // Get info from Agency ? + payload_json["MemTotal"] = 536870912; // Get info from Agency ? + payload_json["IndexServerAddress"] = "https://index.docker.io/v1/"; + payload_json["RegistryConfig"] = Json::objectValue; + payload_json["GenericResources"] = Json::arrayValue; + + payload_json["HttpProxy"] = ""; // use 'HTTP_PROXY' env variable + payload_json["HttpsProxy"] = ""; // use 'HTTPS_PROXY' env variable + payload_json["NoProxy"] = ""; // use 'NO_PROXY' env variable + payload_json["Name"] = "agency"; // Host name + payload_json["Labels"] = Json::arrayValue; + payload_json["ExperimentalBuild"] = EMISO_WEB_EXPERIMENTAL; + payload_json["ServerVersion"] = "28.3.3"; + payload_json["DefaultRuntime"] = ""; + + payload_json["Swarm"]["NodeID"] = ""; + payload_json["Swarm"]["NodeAddr"] = ""; + payload_json["Swarm"]["LocalNodeState"] = "inactive"; + payload_json["Swarm"]["ControlAvailable"] = false; + payload_json["Swarm"]["Error"] = ""; + payload_json["Swarm"]["RemoteManagers"] = Json::Value::null; + + payload_json["LiveRestoreEnabled"] = false; + payload_json["Isolation"] = "VT"; // TODO - platform specific + payload_json["SecurityOptions"] = Json::arrayValue; + + Json::StreamWriterBuilder builder; + payload_str = Json::writeString(builder, payload_json); + + auto response = std::make_shared(payload_str, + httpserver::http::http_utils::http_ok, "application/json"); + return response; + } + private: + Daemon *_daemon; + }; + + class GetVersionHandler : public httpserver::http_resource { + public: + + std::shared_ptr render_GET(const httpserver::http_request &req) { + std::cout << "[WEBERVER] '" << std::string(req.get_path()) << "' (" << std::string(req.get_method()) << ") called" << std::endl; + + std::string payload_str = ""; + Json::Value payload_json; + Utils& utils = Utils::getInstance(); + int response_code = httpserver::http::http_utils::http_ok; + + auto config = utils.getInfo(); + + payload_json["Platform"]["name"] = EMISO_PLATFORM_NAME; + payload_json["Components"][0]["name"] = EMISO_WEB_COMP_NAME; + payload_json["Components"][0]["version"] = EMISO_VERSION; + payload_json["Version"] = EMISO_VERSION; + payload_json["ApiVersion"] = EMISO_WEB_API_VERSION; + payload_json["MinAPIVersion"] = EMISO_WEB_API_VERSION; + + // Get info directly from the system + payload_json["Os"] = config.os_type; + payload_json["Arch"] = config.arch; + payload_json["KernelVersion"] = config.kernel_version; + + payload_json["Experimental"] = EMISO_WEB_EXPERIMENTAL; + + // not implemented yet ! + // payload_json["GitCommit"] + // payload_json["GoVersion"] + // payload_json["BuildTime"] + + Json::StreamWriterBuilder builder; + payload_str = Json::writeString(builder, payload_json); + + auto response = std::make_shared(payload_str, + response_code, "application/json"); + return response; + } + }; + + + class SytemApi { + public: + // Constructor + SytemApi(httpserver::webserver *server, Daemon *daemon); + + // Destructor + ~SytemApi(); + + private: + httpserver::webserver *_server; + + // Handler for the different routes + PingHandler *_pinghandler; + SysInfoHandler *_sysInfoHandler; + GetVersionHandler *_getVersionHandler; + }; + } +} + +#endif /* EMISO_SYSTEM_H */ diff --git a/linux/usr/src/soo/emiso_engine/webserver/volume/volume.cpp b/linux/usr/src/soo/emiso_engine/webserver/volume/volume.cpp new file mode 100644 index 0000000..8b8f11a --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/webserver/volume/volume.cpp @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "volume.hpp" + +namespace emiso { + + namespace volume { + + VolumeApi::VolumeApi(httpserver::webserver *server) + : _server(server) { + std::string path = "/volumes"; + + // Create routes and handlers + _listHandler = new ListHandler(); + + _server->register_resource(path, _listHandler); + _server->register_resource("/v[1-9]+.[0-9]+" + path, _listHandler); + } + + VolumeApi::~VolumeApi() {} + } +} diff --git a/linux/usr/src/soo/emiso_engine/webserver/volume/volume.hpp b/linux/usr/src/soo/emiso_engine/webserver/volume/volume.hpp new file mode 100644 index 0000000..2f69d91 --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/webserver/volume/volume.hpp @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef EMISO_VOLUME_H +#define EMISO_VOLUME_H + +#include +#include +#include + +namespace emiso { + + namespace volume { + + class ListHandler : public httpserver::http_resource { + public: + + std::shared_ptr render_GET(const httpserver::http_request &req) { + std::cout << "[WEBERVER] '" << req.get_path() << "' (" << req.get_method() << ") called" << std::endl; + + std::string payload_str = ""; + Json::Value payload_json; + + payload_json["Volumes"] = Json::arrayValue; // empty array + + Json::StreamWriterBuilder builder; + payload_str = Json::writeString(builder, payload_json); + + auto response = std::make_shared(payload_str, + httpserver::http::http_utils::http_ok, "application/json"); + return response; + } + }; + + class VolumeApi { + public: + // Constructor + VolumeApi(httpserver::webserver *server); + + // Destructor + ~VolumeApi(); + + private: + httpserver::webserver *_server; + + // Handler for the different 'list' routes + ListHandler *_listHandler; + + }; + } +} + +#endif /* EMISO_VOLUME_H */ diff --git a/linux/usr/src/soo/emiso_engine/webserver/webserver.cpp b/linux/usr/src/soo/emiso_engine/webserver/webserver.cpp new file mode 100644 index 0000000..a0d99d8 --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/webserver/webserver.cpp @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include + +#include "webserver.hpp" + +namespace emiso { + + WebServer::WebServer(int port, bool secure, Daemon *daemon) + : _port(port), _secure(secure) { + + // Use builder to define webserver configuration options + httpserver::create_webserver cw = httpserver::create_webserver(_port); + if (secure) + cw.use_ssl().https_mem_key("key.pem").https_mem_cert("cert.pem"); + + // Create webserver using the configured options + _server = new httpserver::webserver(cw); + + // Registration of the different APIs + _system = new system::SytemApi(_server, daemon); + _container = new container::ContainerApi(_server, daemon); + _image = new image::ImageApi(_server, daemon); + _network = new network::NetworkApi(_server); + _volume = new volume::VolumeApi(_server); + _plugins = new plugins::PluginsApi(_server); + + // Create the default path - it responds to all paths + _defaultHandler = new DefaultHandler(); + _server->register_resource("^/.*$", _defaultHandler); + } + + WebServer:: ~WebServer() {} + + void WebServer::start(bool blocking) + { + // Start the server + std::cout << "Server started on port " << _port; + if (_secure) + std::cout << " (HTTPS/TLS mode ON)"; + std::cout << std::endl; + + _server->start(blocking); + } +} diff --git a/linux/usr/src/soo/emiso_engine/webserver/webserver.hpp b/linux/usr/src/soo/emiso_engine/webserver/webserver.hpp new file mode 100644 index 0000000..8af01ea --- /dev/null +++ b/linux/usr/src/soo/emiso_engine/webserver/webserver.hpp @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2023 Jean-Pierre Miceli + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifndef EMISO_WEBSERVER_H +#define EMISO_WEBSERVER_H + +#include + +#include "system/system.hpp" +#include "container/container.hpp" +#include "image/image.hpp" +#include "network/network.hpp" +#include "volume/volume.hpp" +#include "plugins/plugins.hpp" +#include "../daemon/daemon.hpp" + +#define LOG_PREFIX "[EMISO:WEBSERVER] " + +// DefaultHandler - used to print info for all paths not already registered to the +// server +class DefaultHandler : public httpserver::http_resource { +public: + std::shared_ptr render(const httpserver::http_request& req) { + + std::cout << LOG_PREFIX "End-point not implemented" << std::endl; + std::cout << "\tPath: " << req.get_path() << std::endl; + std::cout << "\tMethod: " << req.get_method() << std::endl; + std::cout << "\tHeaders:" << std::endl; + for (const auto& header : req.get_headers()) { + std::cout << "\t\t" << header.first << ": " << header.second << std::endl; + } + std::cout << "\tBody: " << req.get_content() << std::endl; + + // Respond with a simple message + std::string message = "Path '" + std::string(req.get_path()) + "' not implemented\n"; + + auto response = std::make_shared(message); + return response; + } +}; + +namespace emiso { + + class WebServer { + public: + // Constructor + WebServer(int port, bool secure, Daemon *daemon); + + // Destructor + ~WebServer(); + + // Start the server + void start(bool blocking = false); + + // Stop the server + // void stop(); + + private: + int _port; + bool _secure; + httpserver::webserver *_server; + + // Different services + system::SytemApi *_system; + container::ContainerApi *_container; + image::ImageApi *_image; + network::NetworkApi *_network; + volume::VolumeApi *_volume; + plugins::PluginsApi *_plugins; + + // Default handler - not registered routes + DefaultHandler *_defaultHandler; + + }; +} + +#endif /* EMISO_WEBSERVER_H */ diff --git a/linux/usr/src/soo/fb_mapper.c b/linux/usr/src/soo/fb_mapper.c new file mode 100644 index 0000000..9ba921b --- /dev/null +++ b/linux/usr/src/soo/fb_mapper.c @@ -0,0 +1,180 @@ +/* + * Copyright (C) 2026 Clément Dieperink + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define FB_DEV "/dev/fb0" +#define SYSFS_BASE_PATH "/sys/soo/backend/vfbdev" + +#define USECONDS 1000000 +#define FPS 30 + +static char *get_info_and_mmap(int fd, struct fb_fix_screeninfo *finfo, + struct fb_var_screeninfo *vinfo, + size_t *screen_size) +{ + char *fb_ptr; + + /* Make sure that the display is on.*/ + if (ioctl(fd, FBIOBLANK, FB_BLANK_UNBLANK) != 0) { + perror("ioctl(FBIOBLANK)"); + /* Don't return. Some framebuffer drivers like efifb or simplefb don't implement FBIOBLANK.*/ + } + + /* Get fixed screen information*/ + if (ioctl(fd, FBIOGET_FSCREENINFO, finfo) == -1) { + perror("Error reading fixed information"); + return NULL; + } + + /* Get variable screen information*/ + if (ioctl(fd, FBIOGET_VSCREENINFO, vinfo) == -1) { + perror("Error reading variable information"); + return NULL; + } + + *screen_size = vinfo->yres * finfo->line_length; + + /* Map the device to memory*/ + fb_ptr = (char *)mmap(0, *screen_size, PROT_READ | PROT_WRITE, + MAP_SHARED, fd, 0); + if (fb_ptr == MAP_FAILED) { + perror("Error: failed to map framebuffer device to memory"); + return NULL; + } + + for (size_t i = 0; i < *screen_size; i++) { + fb_ptr[i] = 0xff; + } + + return fb_ptr; +} + +static int write_sysfs(char *property, size_t value) +{ + char tmp[256]; + size_t str_size; + int fd; + + printf("Setting %s to 0x%lX", property, value); + + snprintf(tmp, sizeof(tmp), SYSFS_BASE_PATH "/%s", property); + + fd = open(tmp, O_RDWR); + if (fd == -1) { + fprintf(stderr, "Error: couldn't open %s: %s", property, + strerror(errno)); + return -1; + } + + str_size = snprintf(tmp, sizeof(tmp), "%lx\n", value); + if (write(fd, tmp, str_size + 1) == 0) { + fprintf(stderr, "Error: couldn't write %s: %s", property, + strerror(errno)); + return -1; + } + + close(fd); + + return 0; +} + +int main(int argc, char *argv[]) +{ + int fd; + struct fb_fix_screeninfo finfo; + struct fb_var_screeninfo vinfo; + char *fb_ptr; + size_t screen_size; + + /* Open and map the framebuffer */ + fd = open(FB_DEV, O_RDWR); + if (fd == -1) { + perror("Couldn't open " FB_DEV "\n"); + return EXIT_FAILURE; + } + + fb_ptr = get_info_and_mmap(fd, &finfo, &vinfo, &screen_size); + if (fb_ptr == NULL) { + return EXIT_FAILURE; + } + + /* Write all sysfs information */ + if (write_sysfs("vfbdev_hres", vinfo.xres) < 0) { + return EXIT_FAILURE; + } + + if (write_sysfs("vfbdev_vres", vinfo.yres) < 0) { + return EXIT_FAILURE; + } + + if (write_sysfs("vfbdev_bpp", vinfo.bits_per_pixel) < 0) { + return EXIT_FAILURE; + } + + if (write_sysfs("vfbdev_addr", (uint64_t)fb_ptr) < 0) { + return EXIT_FAILURE; + } + + if (write_sysfs("vfbdev_size", screen_size) < 0) { + return EXIT_FAILURE; + } + + if (write_sysfs("vfbdev_pid", getpid()) < 0) { + return EXIT_FAILURE; + } + + /* Periodically update the display */ + while (1) { + usleep(USECONDS / FPS); + + /* On DRM fbdev emulation (e.g. virtio-gpu under QEMU) the + * capsule pixels land in the shadow buffer through the AVZ + * stage-2 remap, bypassing the agency MMU — the deferred-io + * damage tracking never sees them and nothing is presented. + * Rewriting the shadow through write() is an identity copy + * but marks the whole framebuffer damaged, which triggers + * the flush to the host. On a real scanout (e.g. rpi4) the + * hardware reads the memory directly. */ + lseek(fd, 0, SEEK_SET); + if (write(fd, fb_ptr, screen_size) < 0) { + if (ioctl(fd, FBIOPAN_DISPLAY, &vinfo) == -1) { + /* Fallback to force the update */ + vinfo.activate = FB_ACTIVATE_NOW | FB_ACTIVATE_FORCE; + if (ioctl(fd, FBIOPUT_VSCREENINFO, &vinfo) == -1) { + perror("Error while updating the FB"); + } + } + } + } + + munmap(fb_ptr, screen_size); + close(fd); + + return EXIT_SUCCESS; +} + diff --git a/linux/usr/src/soo/input_forwarding.c b/linux/usr/src/soo/input_forwarding.c new file mode 100644 index 0000000..429c42f --- /dev/null +++ b/linux/usr/src/soo/input_forwarding.c @@ -0,0 +1,244 @@ +/* + * Copyright (C) 2026 Clément Dieperink + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define VINPUT_DEV "/dev/vinput" +#define INPUT_PATH "/dev/input" +#define MAX_INPUT_PER_READ 10 + +#define INPUT_CAPABITLIES_ABS "/sys/class/input/%s/device/capabilities/abs" + +struct input_info { + int has_abs; + struct input_absinfo absinfo_x; + struct input_absinfo absinfo_y; +}; + +static struct pollfd *input_devices = NULL; +static struct input_info *input_info = NULL; +static size_t input_count = 0; + +static int vinput_fd; + +static void open_input(char *path) +{ + int fd, ret; + struct pollfd *tmp_input_devices; + struct input_info *tmp_input_info; + char full_path[256]; + + if (strncmp(path, "event", 5) != 0) + return; + + snprintf(full_path, sizeof(full_path), INPUT_PATH "/%s", path); + + fd = open(full_path, O_RDWR); + if (fd == -1) { + fprintf(stderr, "%s: Couldnt open file %s\n", strerror(errno), + full_path); + return; + } + + /* Resizes arrays */ + input_count++; + tmp_input_devices = reallocarray(input_devices, input_count, + sizeof(input_devices[0])); + if (tmp_input_devices == NULL) { + input_count--; + close(fd); + perror("Couldn't allocate memory to add new device"); + return; + } + + tmp_input_info = + reallocarray(input_info, input_count, sizeof(input_info[0])); + if (tmp_input_info == NULL) { + /* Don't free up newly allocated input_devices entry. + * Futur reallocarray will ensure that we get at most one empty entry + * in input_devices. */ + input_count--; + close(fd); + perror("Couldn't allocate memory to add new device"); + return; + } + + /* Setup poll information */ + input_devices = tmp_input_devices; + input_devices[input_count - 1] = (struct pollfd){ + .fd = fd, + .events = POLLIN, + }; + + /* Read absolute information */ + input_info = tmp_input_info; + input_info[input_count - 1].has_abs = 0; + + ret = ioctl(fd, EVIOCGABS(ABS_X), + &(input_info[input_count - 1].absinfo_x)); + if (ret < 0) { + return; + } + + ret = ioctl(fd, EVIOCGABS(ABS_Y), + &(input_info[input_count - 1].absinfo_y)); + if (ret < 0) { + return; + } + + /* We got both ABS X and Y information, input is a valid absolute */ + input_info[input_count - 1].has_abs = 1; + + printf("Found absolute input %s with maximum X:%d Y:%d\n", path, + input_info[input_count - 1].absinfo_x.maximum, + input_info[input_count - 1].absinfo_y.maximum); +} + +static void scan_inputs(void) +{ + DIR *dir; + struct dirent *ent; + char path[512]; + int i; + int ret; + + for (i = 0; i < input_count; i++) { + close(input_devices->fd); + } + free(input_devices); + free(input_info); + input_count = 0; + + dir = opendir(INPUT_PATH); + if (dir == NULL) { + perror("Couldn't open directory " INPUT_PATH); + return; + } + + while ((ent = readdir(dir)) != NULL) { + open_input(ent->d_name); + } +} + +static size_t abs_convert(size_t value, struct input_absinfo *absinfo) +{ + return (value * 10000) / absinfo->maximum; +} + +static int read_input(size_t idx) +{ + ssize_t read_size, write_size; + struct input_event events[MAX_INPUT_PER_READ]; + size_t ev_i; + + read_size = read(input_devices[idx].fd, &events, sizeof(events)); + if (read_size < 0) { + fprintf(stderr, "%s: Couldnt read file %lu\n", strerror(errno), + idx); + return -1; + } + + if ((read_size % sizeof(events[0])) != 0) { + printf("Read size isn't a multiple of structure size %ld, %ld\n", + read_size, sizeof(events[0])); + return -1; + } + + /* If input is absolute, convert value to be in range 0-10000, as expected by capsules */ + if (input_info[idx].has_abs) { + for (ev_i = 0; ev_i < (read_size / sizeof(events[0])); ev_i++) { + if (events[ev_i].type != EV_ABS) + continue; + + if (events[ev_i].code == ABS_X) { + events[ev_i].value = + abs_convert(events[ev_i].value, + &input_info[idx].absinfo_x); + } + + if (events[ev_i].code == ABS_Y) { + events[ev_i].value = + abs_convert(events[ev_i].value, + &input_info[idx].absinfo_y); + } + } + } + + write_size = write(vinput_fd, &events, read_size); + if (write_size != read_size) { + printf("Not all event wrote\n"); + return -1; + } + + return 0; +} + +int main(int argc, char *argv[]) +{ + int ready; + size_t i; + + vinput_fd = open(VINPUT_DEV, O_WRONLY); + if (vinput_fd == -1) { + perror("Couldn't open " VINPUT_DEV); + return EXIT_FAILURE; + } + + scan_inputs(); + + while (1) { + ready = poll(input_devices, input_count, -1); + if (ready == -1) { + perror("Couldn't poll files"); + return EXIT_FAILURE; + } + + for (i = 0; i < input_count; i++) { + if (!input_devices[i].revents) { + continue; + } + + if (!(input_devices[i].revents & POLLIN)) { + printf("Got not POLLIN for %d\n", i); + return EXIT_FAILURE; + } + + if (read_input(i) < 0) { + return EXIT_FAILURE; + } + } + } + + close(vinput_fd); + for (i = 0; i < input_count; i++) { + close(input_devices->fd); + } + free(input_devices); + free(input_info); + + return EXIT_SUCCESS; +} diff --git a/linux/usr/src/soo/s3c-inject.c b/linux/usr/src/soo/s3c-inject.c new file mode 100644 index 0000000..2067e0f --- /dev/null +++ b/linux/usr/src/soo/s3c-inject.c @@ -0,0 +1,144 @@ +/* + * Copyright (C) 2016-2022 Daniel Rossier + * Copyright (C) January 2018 Baptiste Delporte + * Copyright (C) 2019-2022 David Truan + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#if 0 +#define DEBUG +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + + + /** + * @brief Injector performs loading of a capsule and start its execution. + * + * @param argc + * @param argv + * @return int + */ +int main(int argc, char *argv[]) { + int fd_core, fd, ret; + int nread, S3C_size; + void *S3C_buffer; + struct stat filestat; + struct agency_ioctl_args args; + bool hold_capsule = false; + int opt; + + // Parse command-line options + while ((opt = getopt(argc, argv, "s")) != -1) { + switch (opt) { + case 's': + hold_capsule = true; + break; + default: + fprintf(stderr, "Usage: %s [-s] \n", argv[0]); + exit(EXIT_FAILURE); + } + } + + if (optind >= argc) { + fprintf(stderr, "Expected S3C file path after options\n"); + exit(EXIT_FAILURE); + } + + char *s3c_file_path = argv[optind]; + + printf("SOO S3C injector (Smart Object Oriented based virtualization framework).\n"); + printf("Version: %s\n", SOO_VERSION); + + fd_core = open(SOO_CORE_DEVICE, O_RDWR); + if (fd_core < 0) { + printf("Failed to open device: " SOO_CORE_DEVICE " (%d)\n", fd_core); + exit(EXIT_FAILURE); + } + + stat(s3c_file_path, &filestat); + + fd = open(s3c_file_path, O_RDONLY); + if (fd < 0) { + perror(s3c_file_path); + printf("%s not found.\n", s3c_file_path); + exit(EXIT_FAILURE); + } + + S3C_size = filestat.st_size; + + /* Allocate the S3C buffer */ + S3C_buffer = malloc(S3C_size); + assert(S3C_buffer != NULL); + + DBG("agency_core: size to read from sd : %d, buffer address : 0x%08lx\n", S3C_size, (unsigned long) S3C_buffer); + + /* Read the S3C content */ + nread = read(fd, S3C_buffer, S3C_size); + if (nread < 0) { + printf("Error when reading the S3C\n"); + exit(EXIT_FAILURE); + } + + /* Inject the capsule */ + args.buffer = S3C_buffer; + args.value = S3C_size; + args.slotID = -1; /* Wherever */ + + /* No specific capsule identity from the CLI injector (EMISO/MICOFE + * assign real capsule IDs); the field must still be initialized as + * the kernel forwards it verbatim to the AVZ injection hypercall. */ + + args.capsuleID = 0; + + if ((ret = ioctl(fd_core, AGENCY_IOCTL_INJECT_CAPSULE, &args)) < 0) { + printf("Failed to inject S3C (%d)\n", ret); + exit(EXIT_FAILURE); + } + + if (args.slotID == -1) { + printf("No available S3C slot further...\n"); + exit(EXIT_FAILURE); + } + + if (!hold_capsule) { + ioctl(fd_core, AGENCY_IOCTL_START_CAPSULE, &args); + } + + close(fd); + + free(S3C_buffer); + + return 0; +} diff --git a/linux/usr/src/soo/s3c-list.c b/linux/usr/src/soo/s3c-list.c new file mode 100644 index 0000000..149c9f5 --- /dev/null +++ b/linux/usr/src/soo/s3c-list.c @@ -0,0 +1,93 @@ +/* + * Copyright (C) 2018 Baptiste Delporte + * Copyright (C) 2019-2021 Daniel Rossier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include +#include +#include +#include +#include +#include + +#include + +#include + +const char *S3C_state_str(int state) { + + switch (state) { + case S3C_state_stopped: + return "S3C_state_stopped"; + case S3C_state_living: + return "S3C_state_living"; + case S3C_state_suspended: + return "S3C_state_suspended"; + case S3C_state_hibernate: + return "S3C_state_hibernate"; + case S3C_state_resuming: + return "S3C_state_resuming"; + case S3C_state_awakened: + return "S3C_state_awakened"; + case S3C_state_killed: + return "S3C_state_killed"; + case S3C_state_terminated: + return "S3C_state_terminated"; + case S3C_state_dead: + return "S3C_state_dead"; + } + + return "(n/a)"; +} + +/** + * Main entry point of the Agency core subsystem. + */ +int main(int argc, char *argv[]) { + int i, fd_core; + S3C_id_t id_array[MAX_S3C_DOMAINS]; + agency_ioctl_args_t agency_ioctl_args; + + printf("*** SOO - SO3 Capsule ID Retrieval ***\n\n"); + + fd_core = open("/dev/soo/core", O_RDWR); + assert(fd_core > 0); + + /* Prepare to terminate the running S3C (dom #2) */ + printf("*** List of residing SO3 Capsules: \n"); + + agency_ioctl_args.buffer = &id_array; + ioctl(fd_core, AGENCY_IOCTL_GET_S3C_ID_ARRAY, (unsigned long) &agency_ioctl_args); + + for (i = 0; i < MAX_S3C_DOMAINS; i++) { + if (id_array[i].state == S3C_state_dead) + printf(" slot %d -> empty\n", i+2); + else { + printf(" slot %d -> spid: %" PRIx64 " name: %s state: %s\n", i+2, + id_array[i].spid, id_array[i].name, + S3C_state_str(id_array[i].state)); + + printf(" Short description: %s\n", id_array[i].shortdesc); + } + } + + printf("done.\n"); + + close(fd_core); + + return 0; +} diff --git a/linux/usr/src/soo/s3c-restore.c b/linux/usr/src/soo/s3c-restore.c new file mode 100644 index 0000000..20ed99f --- /dev/null +++ b/linux/usr/src/soo/s3c-restore.c @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2014-2020 Daniel Rossier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include + +int fd_core; + +int main(int argc, char *argv[]) { + struct agency_ioctl_args args; + size_t buffer_size; + struct zip_t *zip; + + printf("*** SOO - SO3 Capsule snapshot restorer ***\n"); + + if (argc != 2) { + printf("## Usage is : s3c-restore where is the file containing the S3C snapshot.\n"); + exit(-1); + } + + printf("** Now reading the S3C snapshot.\n"); + + fd_core = open("/dev/soo/core", O_RDWR); + assert(fd_core > 0); + + /* Uncompress the saved snapshot */ + zip = zip_open(argv[1], 0, 'r'); + + if (!zip) { + printf("Failed to open the zip file. Is there a bad sync after saving the snapshot?...\n"); + perror(""); + return EXIT_FAILURE; + } + + zip_entry_open(zip, "me"); + zip_entry_read(zip, &args.buffer, &buffer_size); + zip_entry_close(zip); + + zip_close(zip); + + printf(" ** S3C memory re-implantation and resuming the capsule.\n"); + + args.slotID = -1; + ioctl(fd_core, AGENCY_IOCTL_WRITE_SNAPSHOT, &args); + + close(fd_core); + + printf(" ** S3C successfully restored and resumed...\n"); + + return 0; +} diff --git a/linux/usr/src/soo/s3c-save.c b/linux/usr/src/soo/s3c-save.c new file mode 100644 index 0000000..3a1d399 --- /dev/null +++ b/linux/usr/src/soo/s3c-save.c @@ -0,0 +1,93 @@ +/* + * Copyright (C) 2014-2025 Daniel Rossier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include +#include +#include +#include +#include + +#include + +#include + +#include + +int fd_core; + +int main(int argc, char *argv[]) { + int ret; + struct zip_t *zip; + struct agency_ioctl_args args; + + printf("*** SOO - SO3 Capsule snapshot saver ***\n"); + + if (argc != 2) { + printf("## Usage is : s3c-save where is the file containing the S3C snapshot.\n"); + exit(-1); + } + + printf("** Now taking the memory snapshot.\n"); + + fd_core = open("/dev/soo/core", O_RDWR); + assert(fd_core > 0); + + args.slotID = 2; + args.value = 0; /* To get the size of the snapshot */ + + /* Get the size of the snapshot */ + ret = ioctl(fd_core, AGENCY_IOCTL_READ_SNAPSHOT, &args); + assert(ret == 0); + + if (args.value == 0) { + printf("## No S3C capsule in this slot, nothing to save.\n"); + + close(fd_core); + return -1; + } + + /* The use of %zu formatter enables to print a size_t variable regardless the underlying architecture. */ + printf(" * Size of the snapshot: %zu bytes.\n", args.value); + + /* Get the snapshot */ + args.buffer = malloc(args.value); + assert(args.buffer != NULL); + + /* Get the size of the snapshot */ + ret = ioctl(fd_core, AGENCY_IOCTL_READ_SNAPSHOT, &args); + assert(ret == 0); + + printf(" * Saving to the file..."); + fflush(stdout); + + /* Compress the snapshot */ + zip = zip_open(argv[1], ZIP_DEFAULT_COMPRESSION_LEVEL, 'w'); + + zip_entry_open(zip, "me"); + zip_entry_write(zip, args.buffer, args.value); + zip_entry_close(zip); + + zip_close(zip); + + close(fd_core); + + printf("done.\n\n"); + printf(" * snapshot saved successfully\n"); + + return 0; +} diff --git a/linux/usr/src/soo/s3c-shutdown.c b/linux/usr/src/soo/s3c-shutdown.c new file mode 100644 index 0000000..df93199 --- /dev/null +++ b/linux/usr/src/soo/s3c-shutdown.c @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2014-2020 Daniel Rossier + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include +#include +#include +#include +#include + +#include + +#include + +int main(int argc, char *argv[]) { + int fd_core; + agency_ioctl_args_t agency_ioctl_args; + + printf("*** SOO - SO3 Capsule shutdown ***\n"); + + if (argc != 2) { + printf("## Usage is : s3c-shutdown \n"); + exit(-1); + } + + printf("** Perform a shutdown of S3C #%d (slotID %d)...", atoi(argv[1]), atoi(argv[1])+1); + fflush(stdout); + + fd_core = open("/dev/soo/core", O_RDWR); + assert(fd_core > 0); + + /* Prepare to terminate the running S3C (dom #2) */ + + agency_ioctl_args.slotID = atoi(argv[1]) + 1; + + ioctl(fd_core, AGENCY_IOCTL_SHUTDOWN, &agency_ioctl_args); + + if (agency_ioctl_args.value != 0) { + printf("failed.\n"); + printf("## No S3C capsule in this slot.\n"); + + close(fd_core); + return -1; + } + + printf("done.\n"); + + close(fd_core); + + return 0; +} diff --git a/scripts/bitbake b/scripts/bitbake new file mode 100755 index 0000000..7a5bf6c --- /dev/null +++ b/scripts/bitbake @@ -0,0 +1,53 @@ +#!/bin/sh + +# bitbake wrapper: prints the active infrabase environment to stderr +# before delegating to the real bitbake binary. Picked up automatically +# because env.sh puts $IB_ROOT_DIR/scripts ahead of bitbake/bin in PATH. +# Helps catch the case where the wrong env.sh is loaded for the +# project being worked on. + +if test -z "$IB_ROOT_DIR" || test -z "$BUILDDIR"; then + echo "bitbake wrapper: IB_ROOT_DIR/BUILDDIR not set; source env.sh first." >&2 + exit 1 +fi + +. "$IB_ROOT_DIR/scripts/common/bblayers.sh" + +# Walk argv to extract the recipe and the task (-c ). Skip the +# arguments to bitbake options that take a value (-c, -b, -e, -r, -R, +# -u, -T, --read, --runall, --runonly, --postfile, --prefile, --token). +# We pick the last positional argument as the recipe, which matches +# the common forms `bitbake recipe`, `bitbake -c task recipe`, and +# `bitbake recipe -c task`. +_recipe= +_task= +_skip_next= +for _arg in "$@"; do + if test -n "$_skip_next"; then + case "$_skip_next" in + task) _task="$_arg" ;; + esac + _skip_next= + continue + fi + case "$_arg" in + -c) + _skip_next=task + ;; + --cmd=*) + _task="${_arg#--cmd=}" + ;; + -b|-e|-r|-R|-u|-T|--read|--runall|--runonly|--postfile|--prefile|--token) + _skip_next=other + ;; + --*=*|-*) + ;; + *) + _recipe="$_arg" + ;; + esac +done + +show_env "$_recipe" "$_task" + +exec "$BUILDDIR/bitbake/bin/bitbake" "$@" diff --git a/scripts/build.sh b/scripts/build.sh index a55a058..a32aaa5 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,16 +1,29 @@ #!/bin/sh # General build script for the infrabase infrastructure. +# +# bitbake runs as the unprivileged user. The only build invocation that +# needs root (the filesystem image creation, `-x filesystem`) still runs +# bitbake unprivileged — its recipe calls `sudo -n` for the privileged ops +# (losetup/fdisk/mkfs) via the sudo timestamp opened by +# sudo_session_start. -# Copyright (c) 2014-2023 REDS Institute, HEIG-VD -# Copyright (c) 2023-2025 EDGEMTech +# Copyright (c) 2014-2026 REDS Institute, HEIG-VD +# Copyright (c) 2023-2026 EDGEMTech progname=$(basename $0) +# Resolve the project root from this script's own location, cd there, +# and source env.sh — prompting the user first if the parent shell is +# wired to a different tree. Lets build.sh be invoked from anywhere +# (sibling worktree, build/, etc.) without silently switching shells +# between trees. +. "$(cd "$(dirname "$(command -v -- "$0")")" && pwd)/common/setup_env.sh" + pr_usage() { printf "Infrabase build script\n\n" - printf "Usage: $progname [-h] [-l] [-a|-b|-x|-k|-f|-r] [-c][-v]\n" + printf "Usage: $progname [-h] [-l] [-c] [-v] [-x] \n" } pr_help() @@ -18,20 +31,22 @@ pr_help() printf "\nAvailable options:\n" printf " -h Print this help\n" - printf " -l List available BSPs, kernels, components\n" - printf " -a Build all, the name of BSP is required\n" - printf " -k Build kernel only\n" - printf " -x Build component or tool\n" - printf " -r Build rootfs\n" - printf " -f Create and format filesystem image\n" - printf " -b Build uboot only\n" - printf " -v Emit verbose build logs\n" - printf " -c Clean before rebuilding\n\n" + printf " -l List all available recipes (BSPs and components)\n" + printf " -x Build a recipe. -x is optional: the recipe may be\n" + printf " given as a bare argument. A BSP recipe (e.g.\n" + printf " bsp-linux) pulls its whole dependency tree; a\n" + printf " component (uboot, rootfs, ...) builds just itself.\n" + printf " -c Clean the recipe first, then rebuild\n" + printf " -v Emit verbose build logs\n\n" printf "Examples: \n\n" - printf "$progname -l Print all recipes\n" - printf "$progname -l -a Print all BSP recipes\n" - printf "$progname -l -k Print all kernel recipes\n" - printf "$progname -v -a bsp-linux -c Clean and rebuild all emitting verbose logs\n" + printf "$progname -l List all recipes\n" + printf "$progname uboot Build u-boot\n" + printf "$progname -x usr-so3 Build the SO3 user space\n" + printf "$progname bsp-so3 Build the full SO3 BSP\n" + printf "$progname -v -c bsp-so3 Clean and rebuild the BSP, verbose\n\n" + printf "On virt32/virt64, a BSP build (bsp-so3/bsp-linux) also builds QEMU when its\n" + printf "binary is still missing, so the tree is runnable with st.sh right away.\n" + printf "Set IB_BUILD_QEMU=\"0\" in build/conf/local.conf to skip that.\n" } if test $# -eq 0 @@ -41,18 +56,19 @@ then exit 1 fi -. ./env.sh . ./scripts/common/bblayers.sh +. ./scripts/common/sudo_session.sh -layernames='' recipename='' dolist=0 dobuild=0 doclean=0 optverbose=0 rootprivs=0 - -while getopts "abcfhklrvx" o; do + +# Options first, then the recipe as a positional argument. -x is accepted +# for explicitness/symmetry but is optional (`build.sh bsp-linux` works). +while getopts "chlvx" o; do case "$o" in l) dolist=1 @@ -63,87 +79,50 @@ while getopts "abcfhklrvx" o; do pr_help exit ;; - a) - if ! test -n "$2" - then - # List all recipes in 'meta-bsp' - layernames="meta-bsp" - else - recipename="$2" - dobuild=1 - fi - ;; - r) - if ! test -n "$2" - then - layernames="meta-rootfs" - else - recipename="$2" - dobuild=1 - fi - ;; - b) - layernames="meta-uboot" - recipename="uboot" - dobuild=1 - ;; - x) - if test -n "$2" - then - recipename="$2" - dobuild=1 - else - layernames="$IB_AUX_LAYERS" - fi - ;; c) - recipename="$2" doclean=1 ;; + x) + # Optional "build this recipe" marker; the recipe is positional. + ;; v) optverbose=1 ;; - k) - if ! test -n "$2" - then - layernames="meta-linux meta-so3" - else - recipename="$2" - dobuild=1 - fi - ;; - f) - recipename="filesystem" - rootprivs=1 - ;; *) pr_usage; exit 1 ;; esac done +shift $((OPTIND - 1)) +recipename="$1" + +if test -n "$recipename" +then + dobuild=1 + # Some recipes need root at build time (loop-mount / losetup / mkfs / + # cpio -id). Open a sudo session for them. bsp-linux pulls the rootfs + # mount at build time (do_itb before do_build); filesystem creates the + # image. Extend this match if more are added. + case "$recipename" in + bsp-linux*|filesystem) rootprivs=1 ;; + esac +fi -show_platform +show_env "$recipename" -if test -z $recipename && test $dolist -eq 0 +if test -z "$recipename" && test $dolist -eq 0 then printf "Error: Please specify recipe name\n\n" pr_usage exit 1 fi -# The user is willing to list available recipes -# dolist action is available for component options +# List all available recipes (BSPs and components). if test $dolist -eq 1 then - if test -z "$layernames" - then - printf "Listing ALL available recipes:\n" - else - printf "Listing recipes in layer(s): $layernames\n" - fi - - available_recipes "$layernames" + printf "Listing ALL available recipes:\n" + available_recipes "" exit fi @@ -154,21 +133,85 @@ then IB_BB_OPTS='-vDDD' fi +# Repair stale recipe workdirs first. An interrupted task (e.g. Ctrl-C +# during a clean) can leave a recipe WORKDIR that exists but is missing +# its temp/ subdir; bitbake then can't create that task's fifo and fails +# with "No such file or directory: .../temp/fifo.NNNN" (typically on +# do_clean). Such a workdir holds nothing useful, so remove it and let +# bitbake recreate it cleanly. +if test -d "$BUILDDIR/tmp/work" +then + for _wd in "$BUILDDIR"/tmp/work/*/ + do + if test -d "$_wd" && ! test -d "${_wd}temp" + then + echo "[infrabase] removing stale workdir (no temp/): $_wd" + rm -rf "$_wd" + fi + done +fi + if test $doclean -eq 1 then bitbake $recipename -c clean $IB_BB_OPTS fi +# Read the last uncommented assignment of a variable from local.conf. Handles +# `VAR = "x"`, `VAR ?= "x"`, `VAR := "x"`; a later line (e.g. a CI append) wins. +localconf_get() +{ + grep -E "^[[:space:]]*$1[[:space:]]*[?:]?=" build/conf/local.conf 2>/dev/null \ + | tail -1 | awk -F'"' '{print $2}' +} + +# On the QEMU-emulated platforms (virt32/virt64), a full BSP build should yield +# a runnable emulator without a separate `build.sh qemu` step. Build QEMU here +# when its binary is still missing — a bootstrap only: an already-built emulator +# is left untouched, so the inner build loop pays nothing and the qemu-hacking +# loop stays the explicit `build.sh -x qemu`. Hardware platforms (verdin, rpi4) +# never run under QEMU, so they are skipped. Opt out with IB_BUILD_QEMU="0" +# (e.g. CI that only builds+deploys and never runs the emulator). +maybe_bootstrap_qemu() +{ + case "$1" in + bsp-so3|bsp-linux) ;; + *) return 0 ;; + esac + + if test "$(localconf_get IB_BUILD_QEMU)" = "0" + then + return 0 + fi + + case "$(localconf_get IB_PLATFORM)" in + virt64) _qbin="qemu-system-aarch64" ;; + virt32) _qbin="qemu-system-arm" ;; + *) return 0 ;; + esac + + if test ! -x "$IB_ROOT_DIR/qemu/build/$_qbin" + then + printf "\n[infrabase] %s: the QEMU emulator (%s) is not built yet — building it first.\n" \ + "$1" "$_qbin" + printf " (set IB_BUILD_QEMU=\"0\" in build/conf/local.conf to skip this.)\n\n" + bitbake qemu $IB_BB_OPTS || exit 1 + fi +} + if test $dobuild -eq 1 then + maybe_bootstrap_qemu "$recipename" + if test $rootprivs -eq 1 then - printf "\n *** NOTE: *** '$recipename' requires root access\n" - printf "you may be prompted for the password\n\n" + printf "\n *** NOTE: *** '$recipename' invokes privileged tools\n" + printf "You may be prompted for the sudo password once.\n\n" - preservedvars='IB_TOOLCHAIN_PATH,IB_UNPRIVILEDGED_USER_ID,IB_UNPRIVILEDGED_GROUP_ID' - sudo --preserve-env=$preservedvars sh -c ". $(pwd)/env.sh; bitbake $recipename ${IB_BB_OPTS}" - else - bitbake $recipename $IB_BB_OPTS + # Open a sudo session: validate timestamp upfront + keep alive + # in the background. Recipes escalate individual commands via + # `sudo -n`. bitbake itself stays unprivileged. + sudo_session_start || exit 1 fi + + bitbake $recipename $IB_BB_OPTS fi diff --git a/scripts/check-format.sh b/scripts/check-format.sh new file mode 100755 index 0000000..74b5fca --- /dev/null +++ b/scripts/check-format.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash +# +# check-format.sh — run the CI clang-format style check locally. +# +# Mirrors .github/workflows/style.yml exactly: clang-format 19 over so3/so3 +# (excluding *.S) and so3/usr (excluding the vendored / generated trees), on +# git-TRACKED files only — just like the CI's actions/checkout (so generated +# build artefacts such as the kconfig parser are naturally ignored). +# +# Usage: +# scripts/check-format.sh # report files that need formatting (exit 1 if any) +# scripts/check-format.sh --fix # reformat the offending files in place +# +set -euo pipefail + +cd "$(git rev-parse --show-toplevel)" + +FIX=0 +[ "${1:-}" = "--fix" ] && FIX=1 + +# Prefer clang-format-19 (the version the CI pins); fall back with a warning. +CF="" +for c in clang-format-19 clang-format; do + command -v "$c" >/dev/null 2>&1 && { CF="$c"; break; } +done +[ -n "$CF" ] || { echo "error: clang-format not found (install clang-format-19)" >&2; exit 2; } +ver="$("$CF" --version | grep -oE '[0-9]+' | head -1)" +[ "$ver" = "19" ] || echo "warning: using $CF (v$ver); the CI uses clang-format 19 — results may differ" >&2 + +# C/C++/Protobuf extensions — the jidicula/clang-format-action default set. +ext_re='\.(c|h|C|H|cpp|hpp|cc|hh|cxx|hxx|cu|cuh|proto)$' + +fail=0 + +# check_path (the two style.yml matrix entries) +check_path() { + local path="$1" exclude="$2" f + while IFS= read -r f; do + [[ "$f" =~ $ext_re ]] || continue + [ -n "$exclude" ] && [[ "$f" =~ $exclude ]] && continue + if [ "$FIX" -eq 1 ]; then + "$CF" -i "$f" + elif ! "$CF" --dry-run --Werror "$f" >/dev/null 2>&1; then + echo "FAIL: $f" + fail=1 + fi + done < <(git ls-files "$path") +} + +check_path "so3/so3" '\.S$' +check_path "so3/usr" '(micropython|libxml2|usr/lib/linux|lvgl|lv_)' + +if [ "$FIX" -eq 1 ]; then + echo "clang-format: reformatted in place ($CF)" +elif [ "$fail" -eq 0 ]; then + echo "clang-format: all clean ✓ ($CF)" +else + echo + echo "clang-format violations above. Fix with: scripts/check-format.sh --fix" + exit 1 +fi diff --git a/scripts/ci-local.sh b/scripts/ci-local.sh new file mode 100755 index 0000000..a68155f --- /dev/null +++ b/scripts/ci-local.sh @@ -0,0 +1,109 @@ +#!/usr/bin/env bash +# +# ci-local.sh — run the GitHub "Build" workflow (.github/workflows/build.yml) +# locally, without pushing. +# +# The CI checks out the repository with actions/checkout (only git-TRACKED +# files, a fresh tree with no build output) and then, inside the so3-env +# container, appends IB_PLATFORM and runs `build.sh -x so3` + `build.sh -x +# usr-so3`. To match that faithfully this script exports the tracked files +# into a throwaway directory and runs the exact same docker command. +# +# Why a throwaway copy instead of mounting the repo directly: +# - untracked files are EXCLUDED, so "I forgot to `git add` a patch" fails +# here exactly like it does in CI (instead of silently passing); +# - your real build/tmp is untouched, and the container builds from scratch +# (fresh timestamps), reproducing the toolchain build the CI actually does. +# Uncommitted edits to tracked files ARE included, so you can test before you +# commit. Use -r to test an exact committed state (git archive) instead. +# +# Usage: +# scripts/ci-local.sh # both platforms (virt32, virt64) +# scripts/ci-local.sh -p virt32 # one platform +# scripts/ci-local.sh -p virt32,virt64 +# scripts/ci-local.sh -r HEAD # test committed HEAD exactly (byte-for-byte) +# scripts/ci-local.sh -k # keep the temp dir even on success +# +set -euo pipefail + +IMAGE="ghcr.io/smartobjectoriented/so3-env:latest" +PLATFORMS="virt32,virt64" +REF="" # empty => working-tree tracked files; non-empty => git archive of REF +KEEP=0 + +# Where the throwaway trees are created. This MUST live under $HOME: snap- and +# rootless-packaged Docker daemons are confined and can only bind-mount paths +# under the user's home — a /tmp mount silently shows up EMPTY in the container +# (the daemon has its own /tmp namespace). Override with CI_LOCAL_WORKDIR. +WORKBASE="${CI_LOCAL_WORKDIR:-$HOME/.cache/so3-ci-local}" + +usage() { sed -n '2,40p' "$0"; exit "${1:-0}"; } + +while getopts ":p:r:kh" opt; do + case "$opt" in + p) PLATFORMS="$OPTARG" ;; + r) REF="$OPTARG" ;; + k) KEEP=1 ;; + h) usage 0 ;; + *) usage 1 ;; + esac +done + +ROOT="$(git rev-parse --show-toplevel)" +cd "$ROOT" + +# Export the tree to copy into the container mount. +populate() { + local dest="$1" + if [ -n "$REF" ]; then + git archive --format=tar "$REF" | tar -C "$dest" -xf - + else + # tracked files with current (working-tree) content; build/tmp & other + # gitignored output are not tracked, so they are naturally excluded. + git ls-files -z | tar --null -C "$ROOT" -cf - -T - | tar -C "$dest" -xf - + fi +} + +# The build runs as root inside the container, so it leaves root-owned files in +# the work tree that the host user cannot delete (rm: "Permission denied"). Hand +# ownership back to the invoking user via the same image (root) before the host +# removes or inspects the tree. +reown() { + docker run --rm -v "$1:/w" "$IMAGE" chown -R "$(id -u):$(id -g)" /w 2>/dev/null || true +} + +rc=0 +IFS=',' read -ra PLATS <<< "$PLATFORMS" +for plat in "${PLATS[@]}"; do + [ -n "$plat" ] || continue + src_desc="${REF:-working tree (tracked files)}" + echo "============================================================" + echo "[ci-local] platform=$plat source=$src_desc image=$IMAGE" + echo "============================================================" + + mkdir -p "$WORKBASE" + work="$(mktemp -d "$WORKBASE/$plat.XXXXXX")" + populate "$work" + + # Exact replica of the build.yml step (IB_PLATFORM appended, then the builds). + if docker run --rm -v "$work:/so3" "$IMAGE" bash -c ' + set -e + cd /so3 + echo "IB_PLATFORM = \"'"$plat"'\"" >> build/conf/local.conf + . ./env.sh + build.sh -x so3 + build.sh -x usr-so3 + '; then + echo "[ci-local] platform=$plat: PASS" + reown "$work" + [ "$KEEP" -eq 1 ] || rm -rf "$work" + else + rc=1 + reown "$work" # so the kept tree can be inspected / removed without sudo + echo "[ci-local] platform=$plat: FAIL (tree kept for inspection: $work)" + fi +done + +echo "============================================================" +[ "$rc" -eq 0 ] && echo "[ci-local] ALL PASSED" || echo "[ci-local] FAILURES (exit $rc)" +exit "$rc" diff --git a/scripts/common/bblayers.sh b/scripts/common/bblayers.sh index d32e3ff..f2c2ad7 100755 --- a/scripts/common/bblayers.sh +++ b/scripts/common/bblayers.sh @@ -1,3 +1,5 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD # Display main platform - NOTE: this doesn't handle overrides... show_platform() { @@ -5,9 +7,97 @@ show_platform() { echo "Configured for platform = ${IB_PLATFORM}" } +# Print the active infrabase environment to stderr. Sourced by the +# top-level scripts (build.sh, deploy.sh) and the bitbake wrapper so +# the active project is always visible at invocation time. Also warns +# when cwd lives inside a different infrabase project than the one +# whose env.sh is currently loaded. +# +# Optional arguments: recipe name, then task name. When provided, they +# are shown right after the "[infrabase]" tag so the user sees which +# recipe and task the active env will be applied to. + +show_env() { + _recipe="$1" + _task="$2" + _tag='[infrabase]' + if test -n "$_recipe"; then + _tag="$_tag $_recipe" + fi + if test -n "$_task"; then + _tag="$_tag -c $_task" + fi + + _platform= + if test -n "$BUILDDIR" && test -r "$BUILDDIR/conf/local.conf"; then + # Report the EFFECTIVE platform. bitbake uses last-assignment-wins, + # and an image build may append "IB_PLATFORM = ..." after the + # "IB_PLATFORM ?= ..." default (e.g. the lv_perf Dockerfiles), so + # take the last plain (non-override) assignment, not the first. + _platform=$(grep -E "^IB_PLATFORM[[:space:]]*[?:]?=" "$BUILDDIR/conf/local.conf" \ + | grep -v "^IB_PLATFORM:" \ + | tail -1 | sed -n 's/.*"\([^"]*\)".*/\1/p') + fi + + printf '%s root=%s platform=%s\n' \ + "$_tag" "${IB_ROOT_DIR:-}" "${_platform:-}" >&2 + + # Walk up from cwd looking for an env.sh; if it belongs to a + # different project than IB_ROOT_DIR, that's almost certainly a + # user mistake — flag it. + + _candidate=$(readlink -f "$PWD" 2>/dev/null || pwd) + while test "$_candidate" != "/" && ! test -f "$_candidate/env.sh"; do + _candidate=$(dirname "$_candidate") + done + if test -f "$_candidate/env.sh" && test -n "$IB_ROOT_DIR"; then + _active=$(readlink -f "$IB_ROOT_DIR" 2>/dev/null || echo "$IB_ROOT_DIR") + if test "$_candidate" != "$_active"; then + printf '%s WARNING: cwd is inside %s but loaded env is %s\n' \ + "$_tag" "$_candidate" "$_active" >&2 + printf '%s Re-source %s/env.sh if that was unintended.\n' \ + "$_tag" "$_candidate" >&2 + fi + fi +} + + +# Regenerate build/conf/bblayers.conf with the full set of so3 layers. +# +# The file is rewritten in-place ONLY when its content would change — this +# keeps `git status` quiet for back-to-back invocations. + +regen_bblayers() { + _path="$BUILDDIR/conf/bblayers.conf" + + _tmp=$(mktemp) + { + echo "# Auto-generated by scripts/build.sh —" + echo "# scripts/common/bblayers.sh:regen_bblayers(). Hand edits will be" + echo "# overwritten on the next build.sh invocation." + echo "" + echo 'BBPATH := "${TOPDIR}"' + echo 'BBFILES ?= ""' + echo 'BBLAYERS = " \' + for _l in meta meta-qemu meta-filesystem meta-uboot meta-linux \ + meta-rootfs meta-usr meta-bsp meta-so3 meta-atf \ + meta-toolchain; do + echo " \${TOPDIR}/$_l \\" + done + echo ' "' + } > "$_tmp" + + if ! cmp -s "$_tmp" "$_path" 2>/dev/null; then + mv "$_tmp" "$_path" + printf '[infrabase] bblayers.conf regenerated\n' >&2 + else + rm -f "$_tmp" + fi +} # Determine the amount of first lines to # throw away from the output generated by bitbake-layers + bblayers_header_end_lineno() { echo $1 | grep -n "=== Available recipes: ===" | awk -F':' '{print $1}' } diff --git a/scripts/common/initrd_pack.sh b/scripts/common/initrd_pack.sh new file mode 100644 index 0000000..d75afc6 --- /dev/null +++ b/scripts/common/initrd_pack.sh @@ -0,0 +1,74 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD +# +# Helpers for the `-i`/`initrd` option of mount.sh / umount.sh. +# +# A cpio archive is not a block image, so there is nothing to losetup + +# mount. "Mounting" the initrd means extracting board//initrd.cpio +# into a working tree the user can edit; "unmounting" repacks that tree +# back into initrd.cpio. Both run under fakeroot so the archive keeps its +# root ownership / modes without needing real root — the fake-ownership DB +# is saved on mount and replayed on umount. +# +# Expects env.sh already sourced (IB_ROOT_DIR, BUILDDIR exported). + +# Resolve the target platform from the active (uncommented) IB_PLATFORM in +# local.conf — same source of truth as the build. An explicit arg still +# overrides it; virt64 is the last-resort fallback. +_initrd_platform() { + if [ -n "$1" ]; then echo "$1"; return; fi + _p=$(sed -n 's/^[[:space:]]*IB_PLATFORM[[:space:]]*?\{0,1\}=[[:space:]]*"\([^"]*\)".*/\1/p' \ + "$BUILDDIR/conf/local.conf" 2>/dev/null | tail -1) + [ -n "$_p" ] && echo "$_p" || echo virt64 +} + +# Set _IRD_SRC / _IRD_WORK / _IRD_LINK / _IRD_STATE for the resolved +# platform. Mirrors the partition-mount convention (fs_arm_common.bbclass): +# content extracted under filesystem/work/p1, with a top-level convenience +# symlink filesystem/p1 -> work/p1 that lands straight on the content. +_initrd_paths() { + _plat=$(_initrd_platform "$1") + _IRD_SRC="$IB_ROOT_DIR/build/meta-rootfs/recipes-rootfs/linux/files/board/$_plat/initrd.cpio" + _IRD_WORK="$IB_ROOT_DIR/filesystem/work/p1" + _IRD_LINK="$IB_ROOT_DIR/filesystem/p1" + _IRD_STATE="$IB_ROOT_DIR/filesystem/work/p1.fakeroot" +} + +initrd_mount() { + command -v fakeroot >/dev/null 2>&1 || { echo "fakeroot not installed" >&2; return 1; } + _initrd_paths "$1" + [ -f "$_IRD_SRC" ] || { echo "no initrd.cpio for '$_plat': $_IRD_SRC" >&2; return 1; } + if mountpoint -q "$_IRD_WORK" 2>/dev/null; then + echo "a partition is mounted at $_IRD_WORK — umount.sh first" >&2 + return 1 + fi + if [ -d "$_IRD_WORK" ]; then + echo "already mounted at $_IRD_WORK — umount.sh -i first" >&2 + return 1 + fi + mkdir -p "$_IRD_WORK" + rm -f "$_IRD_STATE" + ( cd "$_IRD_WORK" && fakeroot -s "$_IRD_STATE" sh -c "cpio -idm --quiet < '$_IRD_SRC'" ) || return 1 + ln -sfn "$_IRD_WORK" "$_IRD_LINK" + echo "initrd.cpio ($_plat) extracted; reach it directly via:" + echo " $_IRD_LINK" + echo "edit it, then repack with: umount.sh -i" +} + +initrd_umount() { + command -v fakeroot >/dev/null 2>&1 || { echo "fakeroot not installed" >&2; return 1; } + _initrd_paths "$1" + [ -d "$_IRD_WORK" ] || { echo "not mounted: $_IRD_WORK" >&2; return 1; } + if [ -f "$_IRD_STATE" ]; then + ( cd "$_IRD_WORK" && fakeroot -i "$_IRD_STATE" -s "$_IRD_STATE" \ + sh -c "find . | sort | cpio -o -H newc --quiet > '$_IRD_SRC.tmp'" ) || return 1 + else + echo "warning: no fakeroot state, ownership may be wrong" >&2 + ( cd "$_IRD_WORK" && fakeroot \ + sh -c "find . | sort | cpio -o -H newc --quiet > '$_IRD_SRC.tmp'" ) || return 1 + fi + mv "$_IRD_SRC.tmp" "$_IRD_SRC" + rm -rf "$_IRD_WORK" "$_IRD_STATE" + [ -L "$_IRD_LINK" ] && rm -f "$_IRD_LINK" + echo "repacked $_plat initrd.cpio ($(wc -c < "$_IRD_SRC") bytes); unmounted" +} diff --git a/scripts/common/setup_env.sh b/scripts/common/setup_env.sh new file mode 100755 index 0000000..ef590a6 --- /dev/null +++ b/scripts/common/setup_env.sh @@ -0,0 +1,105 @@ +# Source me from any user-facing script under scripts/ to keep the +# build environment aligned with the user's intent. Three trees may +# disagree at invocation time: +# +# A) script tree — derived from `command -v "$0"` (where the binary +# came from: explicit path or PATH lookup). +# B) cwd tree — found by walking up $PWD looking for env.sh. +# C) env tree — value of IB_ROOT_DIR in the parent shell. +# +# Target = B if cwd lives inside an infrabase tree, else A. This honors +# the "I cd'd here, build here" intuition — without it, a PATH-resolved +# binary from a sibling worktree (because env.sh was sourced there +# earlier) silently wins and the user's `cd` is ignored. +# +# When C disagrees with the target, env.sh is re-sourced from the +# target (interactive prompt) or the script aborts (non-interactive, +# e.g. CI). The switch is local to THIS invocation — the parent shell +# stays as it was; the user is told to re-source env.sh manually if +# they want the change to persist. +# +# Once accepted, the choice is remembered per parent shell session via +# a marker file in /tmp tagged with $PPID and the target tree. As long +# as the user's interactive shell stays alive, subsequent invocations +# from the same shell skip the prompt and silently re-source. New +# shells (different PPID) re-ask. The chpwd hook installed by env.sh +# is still the better path — it switches the parent shell's env for +# real — but the marker keeps the UX clean when a user hasn't sourced +# env.sh in their interactive shell yet. + +_ib_script_path="$(command -v -- "$0")" +_ib_script_dir="$(cd "$(dirname "$_ib_script_path")" && pwd)" +_ib_script_tree="$(cd "$_ib_script_dir/.." && pwd)" + +_ib_cwd_tree="$(readlink -f "$PWD" 2>/dev/null || pwd)" +while [ "$_ib_cwd_tree" != "/" ] && [ ! -f "$_ib_cwd_tree/env.sh" ]; do + _ib_cwd_tree="$(dirname "$_ib_cwd_tree")" +done +[ -f "$_ib_cwd_tree/env.sh" ] || _ib_cwd_tree="" + +if [ -n "$_ib_cwd_tree" ]; then + _ib_target="$_ib_cwd_tree" +else + _ib_target="$_ib_script_tree" +fi + +_ib_env_tree="" +if [ -n "$IB_ROOT_DIR" ]; then + _ib_env_tree="$(realpath "$IB_ROOT_DIR" 2>/dev/null || echo "$IB_ROOT_DIR")" +fi + +_ib_marker="/tmp/.infrabase-accept.$PPID.$(printf '%s' "$_ib_target" | sed 's|/|_|g' | sed 's|_|__SLASH__|g')" + +if [ -n "$_ib_env_tree" ] && [ "$_ib_env_tree" = "$_ib_target" ]; then + # Env already wired to the target tree; normalize cwd silently. + cd "$_ib_target" +elif [ -f "$_ib_marker" ]; then + # This shell session already accepted the switch — silent re-source. + cd "$_ib_target" + . ./env.sh +else + echo "" >&2 + echo "[infrabase] env switch required for this invocation:" >&2 + echo " target tree : $_ib_target" >&2 + if [ -n "$IB_ROOT_DIR" ]; then + echo " current env : $IB_ROOT_DIR" >&2 + else + echo " current env : " >&2 + fi + if [ "$_ib_script_tree" != "$_ib_target" ]; then + echo " script path : $_ib_script_path" >&2 + echo " (resolved via PATH from a sibling tree)" >&2 + fi + echo "" >&2 + echo " env.sh will be re-sourced from the target tree for this" >&2 + echo " invocation only. To make the switch permanent in your" >&2 + echo " interactive shell, run:" >&2 + echo "" >&2 + echo " cd $_ib_target && . ./env.sh" >&2 + echo "" >&2 + if [ -t 0 ]; then + printf "Continue with env.sh from %s? [y/N] " "$_ib_target" >&2 + read -r _ib_answer + case "$_ib_answer" in + y|Y|yes|YES) ;; + *) + echo "Aborted by user." >&2 + exit 1 + ;; + esac + else + echo "ERROR: refusing to reconfigure env in non-interactive mode." >&2 + echo " Source env.sh from $_ib_target first," >&2 + echo " or run the script interactively to confirm." >&2 + exit 1 + fi + # Remember the accept for this shell session so the next invocation + # from the same parent shell is silent. + : > "$_ib_marker" 2>/dev/null || true + cd "$_ib_target" + . ./env.sh + echo "[infrabase] env switched to $_ib_target for this run" >&2 +fi + +unset _ib_script_path _ib_script_dir _ib_script_tree \ + _ib_cwd_tree _ib_env_tree _ib_target _ib_marker _ib_answer diff --git a/scripts/common/setup_sudo.sh b/scripts/common/setup_sudo.sh new file mode 100755 index 0000000..d7697b4 --- /dev/null +++ b/scripts/common/setup_sudo.sh @@ -0,0 +1,84 @@ +#!/bin/sh +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + +# One-time host setup: configure sudo so that privileged operations +# invoked from bitbake recipes (via `sudo -n`) share the credential +# timestamp with the parent deploy/build shell. +# +# By default sudo uses tty_tickets, tying each cached password to a +# specific TTY. bitbake tasks run in subprocesses that may not inherit +# the caller's TTY, so `sudo -n` fails even after sudo_session_start +# has validated the password. Setting timestamp_type=global makes the +# credential UID-scoped and shared across all processes for this user. +# +# This script only needs to be run once per host. It writes to +# /etc/sudoers.d/ and requires sudo itself to do so. +# +# Usage: +# scripts/common/setup_sudo.sh +# scripts/common/setup_sudo.sh --check (check only, no changes) + +# Copyright (c) 2025-2026 EDGEMTech SA + +set -e + +SUDOERS_FILE="/etc/sudoers.d/infrabase-${USER}" +CHECK_ONLY=0 + +if [ "$1" = "--check" ]; then + CHECK_ONLY=1 +fi + +_check_already_configured() { + if [ -f "$SUDOERS_FILE" ]; then + if grep -q "timestamp_type=global" "$SUDOERS_FILE" 2>/dev/null; then + return 0 + fi + fi + # Also check if the main sudoers file already has timestamp_type=global + if sudo grep -q "timestamp_type=global" /etc/sudoers 2>/dev/null; then + return 0 + fi + return 1 +} + +if _check_already_configured; then + printf "sudo timestamp_type=global is already configured for %s.\n" "$USER" + exit 0 +fi + +if [ "$CHECK_ONLY" = "1" ]; then + printf "sudo is NOT configured for global timestamps (tty_tickets is active).\n" + printf "Run: scripts/common/setup_sudo.sh\n" + printf "to fix it (requires your sudo password once).\n" + exit 1 +fi + +printf "Configuring sudo for user '%s' to use global timestamp type.\n" "$USER" +printf "This allows bitbake recipe tasks to use 'sudo -n' after\n" +printf "sudo_session_start has validated your password.\n\n" +printf "You will be prompted for your sudo password once.\n\n" + +# Write the sudoers snippet via a temp file, validate it, then install. +TMPFILE="$(mktemp)" +cat > "$TMPFILE" <&1; then + rm -f "$TMPFILE" + printf "Error: sudoers syntax check failed. Aborting.\n" >&2 + exit 1 +fi + +sudo install -m 0440 -o root -g root "$TMPFILE" "$SUDOERS_FILE" +rm -f "$TMPFILE" + +printf "Installed %s\n" "$SUDOERS_FILE" +printf "Done. Run 'scripts/deploy.sh' or 'scripts/build.sh' normally now.\n" diff --git a/scripts/common/sudo_session.sh b/scripts/common/sudo_session.sh new file mode 100644 index 0000000..ccbcc17 --- /dev/null +++ b/scripts/common/sudo_session.sh @@ -0,0 +1,65 @@ +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD +# +# Sudo session helper: keep a sudo timestamp valid for the lifetime of +# the calling script so privileged operations issued from bitbake +# recipes (via `sudo -n`) never hit an interactive password prompt +# mid-build. +# +# bitbake itself runs as the unprivileged user — only individual +# privileged operations (mount/umount/losetup/mkfs/parted/...) are +# escalated, and each one is invoked with `sudo -n` so a missing +# timestamp fails fast rather than blocking on stdin. +# +# Usage in callers: +# . scripts/common/sudo_session.sh +# sudo_session_start || exit 1 +# # ... run bitbake / scripts that may invoke `sudo -n` ... +# # keep-alive is auto-killed on EXIT/INT/TERM via the installed trap + +sudo_session_start() { + # Validate the sudo timestamp upfront. With a NOPASSWD sudoers + # entry this is a silent no-op; otherwise the user gets a single + # password prompt right here, BEFORE bitbake starts. + if ! sudo -v + then + printf "Error: failed to acquire sudo credentials\n" >&2 + return 1 + fi + + # The keep-alive below refreshes the timestamp every 60 s so that + # bitbake recipe tasks can use `sudo -n` throughout the build. + # This only works when the sudo timestamp is UID-scoped (global), + # not TTY-scoped (the default). Detect the common misconfiguration + # and guide the user to the one-time fix. + _ts_type=$(sudo -V 2>/dev/null | sed -n 's/.*Timestamp type: *//p') + if [ -n "$_ts_type" ] && [ "$_ts_type" != "global" ] + then + printf "\nWARNING: sudo timestamp_type is '%s' (not global).\n" "$_ts_type" >&2 + printf " bitbake recipe tasks run in subprocesses without a TTY\n" >&2 + printf " and will fail with 'sudo: a password is required'.\n\n" >&2 + printf " Fix (run once on this host):\n\n" >&2 + printf " scripts/common/setup_sudo.sh\n\n" >&2 + printf " Continuing anyway — the build may fail mid-task.\n\n" >&2 + fi + unset _ts_type + + # Background poker: refresh the sudo timestamp every 60s. The + # default sudo TTL is 5 min — 60s gives generous headroom while + # staying cheap. The loop exits when the parent shell is gone + # (kill -0 check) so we never leak a daemon if the script dies. + _sudo_parent_pid=$$ + ( + while true; do + sudo -n true 2>/dev/null || exit + sleep 60 + kill -0 "$_sudo_parent_pid" 2>/dev/null || exit + done + ) & + _sudo_keepalive_pid=$! + + # Kill the keep-alive on any exit path (normal, ^C, kill). + trap "kill $_sudo_keepalive_pid 2>/dev/null" EXIT INT TERM + + return 0 +} diff --git a/scripts/dbuild.sh b/scripts/dbuild.sh new file mode 100755 index 0000000..1b3ee4e --- /dev/null +++ b/scripts/dbuild.sh @@ -0,0 +1,257 @@ +#!/bin/sh + +# Run an Infrabase command inside the build container. +# +# The container provides the ENVIRONMENT (cross toolchains, host +# packages, CMake, Python); the repository stays on the host and is +# bind-mounted, so sources, build/tmp and the produced images remain +# exactly where they are and stay owned by the calling user. +# +# Usage: +# dbuild.sh --build Build (or rebuild) the image +# dbuild.sh Interactive shell inside the container +# dbuild.sh build.sh bsp-linux Run a build +# dbuild.sh deploy.sh bsp-linux Deploy it +# dbuild.sh st.sh -d Run it under QEMU, graphical +# +# The command runs with the project root bind-mounted at its OWN +# absolute path and the current directory preserved, so a tree can be +# built from inside or outside the container interchangeably: bitbake +# stamps, CMake caches and the *.attach.sha256 manifests all record +# absolute paths and would otherwise be invalidated on every switch. +# +# Environment overrides: +# IB_DOCKER_IMAGE image name:tag (default: micofe-build:1.0) +# IB_DOCKER_OPTS extra `docker run` options +# +# Copyright (c) 2026 REDS Institute - HEIG-VD + +set -e + +progname=$(basename "$0") + +IB_DOCKER_IMAGE=${IB_DOCKER_IMAGE:-micofe-build:1.0} + +# Resolve the project root from this script's own location so dbuild.sh +# works from anywhere inside the tree. +# +# `pwd -P` (physical path) on purpose: a tree is commonly reached through +# a symlink (~/edgemtech/edgem1 -> products/edgem1/edgem1), and the cwd +# check below and the bind mount both work on plain strings. Without +# resolving, entering by the symlink while the script resolves the real +# path aborts with "current directory is outside ". + +IB_ROOT=$(cd "$(dirname "$(command -v -- "$0")")/.." && pwd -P) +CONTEXT="$IB_ROOT/docker/build-env" + +pr_usage() +{ + printf "Run an Infrabase command inside the build container\n\n" + printf "Usage: %s [--build] [ [args...]]\n\n" "$progname" + printf " --build Build (or rebuild) the %s image\n" "$IB_DOCKER_IMAGE" + printf " Command to run inside the container (default: an\n" + printf " interactive shell). env.sh is sourced first, so\n" + printf " scripts/ and bitbake are on PATH.\n\n" + printf "Examples:\n" + printf " %s --build\n" "$progname" + printf " %s build.sh bsp-linux\n" "$progname" + printf " %s deploy.sh bsp-linux\n" "$progname" + printf " %s st.sh -d\n" "$progname" +} + +if ! command -v docker >/dev/null 2>&1; then + printf "%s: docker is not installed\n" "$progname" >&2 + exit 1 +fi + +case "$1" in + -h|--help) + pr_usage + exit 0 + ;; + --build) + printf "[dbuild] building %s from %s\n" "$IB_DOCKER_IMAGE" "$CONTEXT" + + # Context is docker/build-env only — never the project root, + # which carries tens of GB of build output. + + exec docker build -t "$IB_DOCKER_IMAGE" "$CONTEXT" + ;; +esac + +if ! docker image inspect "$IB_DOCKER_IMAGE" >/dev/null 2>&1; then + printf "%s: image '%s' not found — run: %s --build\n" \ + "$progname" "$IB_DOCKER_IMAGE" "$progname" >&2 + exit 1 +fi + +# The cwd is reused verbatim inside the container and only $IB_ROOT is +# mounted, so it has to live inside the tree. + +cwd=$(pwd -P) +case "$cwd" in + "$IB_ROOT"|"$IB_ROOT"/*) ;; + *) + printf "%s: current directory is outside %s — cd into the tree first\n" \ + "$progname" "$IB_ROOT" >&2 + exit 1 + ;; +esac + +# Build the docker argv by PREPENDING to the user command, so the +# command always stays last and no quoting is lost. +# +# No command: an interactive shell driven by the image's rc file, which +# sources env.sh IN that shell so its cd/pushd/popd wrappers and +# ib_autoswitch_* functions exist (a parent that sources env.sh then +# execs bash would pass on the variables but lose the functions). +# +# With a command: source env.sh first, because the front-end scripts +# refuse to reconfigure the environment in a non-interactive context. + +if [ $# -eq 0 ]; then + set -- "$IB_DOCKER_IMAGE" bash --rcfile /etc/micofe-build.bashrc -i +else + set -- "$IB_DOCKER_IMAGE" bash -c \ + 'cd "$2" && . ./env.sh >/dev/null 2>&1; cd "$1"; shift 2; exec "$@"' \ + dbuild "$cwd" "$IB_ROOT" "$@" +fi + +set -- -e IB_TREE="$IB_ROOT" -e IB_CWD="$cwd" "$@" + +# Hardware deployment: make any IB_HTTP_DEPLOY_PATH feed directory +# visible at its own path so `deploy.sh` can publish into it from inside +# (IB_STORAGE_MODE=http). This serves the verdin-imx8mp TEZI flow; on the +# soft/hard storage platforms it is a no-op. +# IB_STORAGE_MODE=hard needs no extra wiring: /dev is already +# bind-mounted and the container is privileged (it writes the HOST's +# device, so double-check IB_STORAGE_DEVICE). +# +# The DEFAULT feed lives inside the tree (IB_HTTP_DEPLOY_PATH in +# local.conf), which is already bind-mounted, so this loop does nothing +# for it. It only matters for a build/conf/site.conf that redirects the +# feed out of the tree. +# +# A snap-packaged Docker cannot do this: the confined daemon only reaches +# $HOME (and a few allowed paths), so bind-mounting e.g. /var/www/html +# fails with "mkdir /var/www: read-only file system". Skip the mount +# there rather than making every invocation fail, and say so once. + +_snap_docker=0 +case "$(command -v docker)" in + /snap/*) _snap_docker=1 ;; +esac + +# The client path is not proof either way: the docker snap also ships a +# /usr/bin/docker wrapper, so a confined daemon can hide behind an +# ordinary-looking binary. Ask the daemon itself — a snap daemon keeps +# its root under /var/snap. Only worth doing when the path check missed. + +if [ "$_snap_docker" = "0" ]; then + case "$(docker info --format '{{.DockerRootDir}}' 2>/dev/null)" in + /var/snap/*|/snap/*) _snap_docker=1 ;; + esac +fi + +for _feed in $(sed -n 's/^[[:space:]]*IB_HTTP_DEPLOY_PATH[^=]*=[[:space:]]*"\([^"]*\)".*/\1/p' \ + "$IB_ROOT/build/conf/local.conf" "$IB_ROOT/build/conf/site.conf" \ + 2>/dev/null | sort -u); do + # Tree-relative defaults are already inside the bind-mounted tree, and + # ${...} references are not expanded here — skip both. + case "$_feed" in + *'${'*) continue ;; + "$IB_ROOT"|"$IB_ROOT"/*) continue ;; + esac + + [ -d "$_feed" ] || continue + + case "$_feed" in + "$HOME"/*) ;; + *) + if [ "$_snap_docker" = "1" ]; then + printf '%s: skipping bind mount of %s (snap Docker cannot mount outside $HOME) — publish the TEZI feed from the host, or install Docker from the apt repository\n' \ + "$progname" "$_feed" >&2 + continue + fi + ;; + esac + + set -- -v "$_feed:$_feed" "$@" +done + +# Forward the ssh-agent when present, so a git fetch over SSH (private +# submodules) works from inside. Nothing is copied into the image. + +if [ -n "$SSH_AUTH_SOCK" ] && [ -S "$SSH_AUTH_SOCK" ]; then + set -- -e SSH_AUTH_SOCK="$SSH_AUTH_SOCK" \ + -v "$SSH_AUTH_SOCK:$SSH_AUTH_SOCK" "$@" +fi + +# Forward the X11 display for the graphical QEMU launcher (st.sh -d). +# +# The X cookie must come along with the socket: the container user has a +# different HOME, so ~/.Xauthority would not be found, and under Wayland +# the cookie lives outside HOME anyway (XWayland puts it in +# /run/user//). Mount the file at its own path and point XAUTHORITY +# at it; without this the GTK window dies with "Authorization required". + +if [ -n "$DISPLAY" ] && [ -d /tmp/.X11-unix ]; then + set -- -e DISPLAY="$DISPLAY" -v /tmp/.X11-unix:/tmp/.X11-unix "$@" + + _xauth=${XAUTHORITY:-$HOME/.Xauthority} + if [ -f "$_xauth" ]; then + set -- -e XAUTHORITY="$_xauth" -v "$_xauth:$_xauth:ro" "$@" + fi +fi + +# Always keep stdin attached (-i): without it Docker gives the container +# /dev/null, so piping into a containerised command silently delivers +# nothing — e.g. `printf 'cmd\n' | dbuild.sh st.sh` never reaches the +# guest console. Harmless when there is no input: the command just sees +# EOF. Allocate a tty (-t) only for a real terminal, so CI logs stay +# clean. + +if [ -t 0 ] && [ -t 1 ]; then + set -- -it "$@" +else + set -- -i "$@" +fi + +# shellcheck disable=SC2086 +[ -n "$IB_DOCKER_OPTS" ] && set -- $IB_DOCKER_OPTS "$@" + +# --privileged + /dev: the storage steps (build.sh filesystem, deploy.sh) +# need loop devices, mount and mkfs. Loop devices are a HOST-kernel +# resource, so concurrent builds on one machine contend for them exactly +# as they do outside a container. +# +# --network host: keeps st.sh's slirp port forwards (guest ssh on 2222) +# and the GDB stub reachable from the host without publishing ports, and +# lets the recipes fetch through the host resolver. + +set -- --rm \ + --privileged \ + --network host \ + -v /dev:/dev \ + -v "$IB_ROOT:$IB_ROOT" \ + -w "$cwd" \ + -e HOST_UID="$(id -u)" \ + -e HOST_GID="$(id -g)" \ + -e TERM="${TERM:-xterm}" \ + "$@" + +docker run "$@" +_rc=$? + +# The TEZI feed server has to run on the HOST: the container is --rm, so a +# server started inside it dies with the command that started it. It shares +# the host network namespace (--network host above), but not its lifetime. +# +# Run this after the container rather than before, so the very first +# `dbuild.sh deploy.sh ...` — which creates the feed inside the container — +# leaves a serving feed behind too. Idempotent, and a no-op when nothing has +# been published yet or a server is already up. + +"$IB_ROOT/scripts/tezi-feed-serve.sh" --ensure + +exit $_rc diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 0cb47b4..7d4d554 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -1,34 +1,42 @@ #!/bin/sh # General deployment script for the infrabase infrastructure. +# +# bitbake itself runs as the unprivileged user. Privileged operations +# inside individual recipe tasks (mount/umount/losetup/mkfs/parted/...) +# escalate to root via `sudo -n` and rely on the sudo timestamp opened +# here by sudo_session_start. -# Copyright (c) 2014-2023 REDS Institute, HEIG-VD -# Copyright (c) 2023-2025 EDGEMTech +# Copyright (c) 2014-2026 REDS Institute, HEIG-VD +# Copyright (c) 2023-2026 EDGEMTech progname=$(basename $0) +# Resolve project root from this script's own location, cd there, and +# source env.sh — prompting the user first if the parent shell points +# at a different tree. See scripts/common/setup_env.sh for details. +. "$(cd "$(dirname "$(command -v -- "$0")")" && pwd)/common/setup_env.sh" + pr_usage() { printf "Infrabase deployment script\n\n" - printf "Usage: $progname [-h] [-l] [-a|-b|-r|-x|-k] [-v] ... \n" + printf "Usage: $progname [-h] [-l] [-v] [-x] \n" } pr_help() { printf "\nAvailable options:\n" printf " -h Print this help\n" - printf " -l List available recipes per layer or globally\n" - printf " -a Deploy all, kernel, uboot, rootfs, usr\n" - printf " -k Deploy kernel (with ITB)\n" - printf " -b Deploy uboot\n" - printf " -r Deploy specified rootfs\n" - printf " -x Deploy auxiliary component\n" + printf " -l List all deployable recipes\n" + printf " -x Deploy a recipe. -x is optional: the recipe may be\n" + printf " given as a bare argument. A BSP recipe (e.g. bsp-so3)\n" + printf " deploys the full image; a component (usr-so3, ...)\n" + printf " deploys just its own part.\n" printf " -v Emit logs during deployment\n" printf "Examples: \n\n" - printf "$progname -l -a List all deployable BSP recipes\n" - printf "$progname -l -x List all deployable auxiliary components\n" - printf "$progname -b -v Deploy uboot with verbose logs\n" - printf "$progname -a bsp-linux -v Deploy ALL rootfs, kernel, uboot with verbose logs\n" + printf "$progname -l List all deployable recipes\n" + printf "$progname usr-so3 Deploy the SO3 user space into the rootfs\n" + printf "$progname -v bsp-so3 Deploy the full SO3 BSP with verbose logs\n" } if test $# -eq 0 @@ -38,16 +46,17 @@ then exit 1 fi -. ./env.sh . ./scripts/common/bblayers.sh +. ./scripts/common/sudo_session.sh recipename='' -layernames='' optverbose=0 dolist=0 dodeploy=0 - -while getopts "abhklrvx" o; do + +# Options first, then the recipe as a positional argument. -x is accepted +# for explicitness/symmetry but is optional (`deploy.sh bsp-so3` works). +while getopts "hlvx" o; do case "$o" in h) # Help summary @@ -55,53 +64,8 @@ while getopts "abhklrvx" o; do pr_help exit ;; - a) - if ! test -n "$2" - then - layernames="meta-bsp" - else - recipename="$2" - deploytask="do_deploy" - dodeploy=1 - fi - ;; - k) - if ! test -n "$2" - then - layernames="meta-bsp" - else - recipename="$2" - deploytask="do_deploy_boot" - dodeploy=1 - fi - ;; x) - if ! test -n "$2" - then - layernames="$IB_AUX_LAYERS" - else - recipename="$2" - deploytask="do_deploy" - dodeploy=1 - fi - ;; - r) - if ! test -n "$2" - then - layernames="meta-rootfs" - else - recipename="$2" - deploytask="do_deploy" - dodeploy=1 - fi - ;; - b) - # We only currently have uboot for everything - # So no optarg for -b - layernames="meta-uboot" - recipename="uboot" - deploytask="do_deploy" - dodeploy=1 + # Optional "deploy this recipe" marker; the recipe is positional. ;; l) dolist=1 @@ -115,26 +79,32 @@ while getopts "abhklrvx" o; do ;; esac done +shift $((OPTIND - 1)) +recipename="$1" -show_platform +if test -n "$recipename" +then + deploytask="do_deploy" + dodeploy=1 +fi + +show_env "$recipename" -if test -z $recipename && test $dolist -eq 0 +if test -z "$recipename" && test $dolist -eq 0 then printf "Error: please specify a recipe name\n\n" pr_usage exit 1 fi +# deploy.sh inherits the bblayers/build state left by the prior +# `build.sh` invocation for the same recipe. + if test $dolist -eq 1 then - if test -z "$layernames" - then - echo "Listing ALL available deployable recipes:" - else - echo "Listing available deployable recipes in layer(s): $layernames" - fi + echo "Listing ALL available deployable recipes:" - recipes=$(available_recipes "$layernames") + recipes=$(available_recipes "") for r in $recipes do @@ -157,22 +127,28 @@ fi if test $dodeploy -eq 1 then - printf "\n*** NOTE: *** Deployment requires root access, to be able to mount/umount\n" - printf "and access loop devices, you may be prompted for the password\n\n" + printf "\n*** NOTE: *** Deployment may require root access for mount/losetup/\n" + printf "mkfs/parted/... You may be prompted for the sudo password once.\n\n" - # NOTE: Currently these variables need to be specified in /etc/sudoers - # and it is not clear why at this stage - this is not the case with - # the user created during installation of the system - deeper investigations needed.. - preservedvars='IB_TOOLCHAIN_PATH,IB_UNPRIVILEDGED_USER_ID,IB_UNPRIVILEDGED_GROUP_ID' + # Acquire a sudo timestamp upfront and keep it warm for the entire + # deploy. bitbake runs unprivileged below; recipes escalate via + # `sudo -n` so a missing timestamp fails fast rather than blocking + # on stdin mid-build. The keep-alive is killed on EXIT/INT/TERM by + # a trap installed inside sudo_session_start. + sudo_session_start || exit 1 - deploycmd=". $(pwd)/env.sh; bitbake $recipename -c $deploytask ${IB_BB_OPTS}" - sudo --preserve-env=$preservedvars sh -c "$deploycmd; echo \$? > /tmp/ib-deploy-res;" - res=$(cat /tmp/ib-deploy-res) + bitbake $recipename -c $deploytask $IB_BB_OPTS + res=$? if test $res -ne 0 then - # This is required to properly fail the CI - # otherwise 0 is returned and job continues exit 1 fi + + # Make the freshly published TEZI feed reachable without a manual + # step. Idempotent and quiet when a server is already up; a no-op + # when the deploy did not publish an HTTP feed, in CI, and inside + # the build container (dbuild.sh does it on the host instead — + # a server started in the container would die with it). + ./scripts/tezi-feed-serve.sh --ensure fi diff --git a/scripts/diffdir.sh b/scripts/diffdir.sh index a6a64f2..894b9a3 100755 --- a/scripts/diffdir.sh +++ b/scripts/diffdir.sh @@ -1,5 +1,8 @@ #!/bin/bash +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + source_dir=$1 target_dir=$2 output_dir=$3 diff --git a/scripts/init_storage.sh b/scripts/init_storage.sh index 027f7bb..145df3f 100755 --- a/scripts/init_storage.sh +++ b/scripts/init_storage.sh @@ -1,6 +1,19 @@ #!/bin/sh -source $IB_ROOT_DIR/env.sh -cd $IB_ROOT_DIR/build -sudo -E ./bitbake/bin/bitbake filesystem -c fs_init_storage $1 -cd - +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD +# +# Trigger filesystem:fs_init_storage. bitbake itself runs unprivileged +# — the recipe internally invokes losetup/fdisk/parted/mkfs via +# `sudo -n` against the timestamp opened here. + +# Resolve project root from this script's own location, cd there, and +# source env.sh — prompting the user first if the parent shell points +# at a different tree. See scripts/common/setup_env.sh for details. +. "$(cd "$(dirname "$(command -v -- "$0")")" && pwd)/common/setup_env.sh" +. ./scripts/common/sudo_session.sh + +sudo_session_start || exit 1 + +cd "$BUILDDIR" +./bitbake/bin/bitbake filesystem -c fs_init_storage $1 diff --git a/scripts/makeusr.sh b/scripts/makeusr.sh new file mode 100755 index 0000000..348531e --- /dev/null +++ b/scripts/makeusr.sh @@ -0,0 +1,263 @@ +#!/usr/bin/env bash +# +# Standalone cmake+make build for a SO3 / Linux-agency user space, meant to be +# run from inside a usr/ directory (so3/usr or linux/usr). It reproduces what +# the corresponding bitbake recipe does in do_build, so the apps (and, for +# linux/usr, the out-of-tree kernel modules) can be rebuilt quickly without +# invoking bitbake. +# +# It auto-detects the context from the directory it is invoked in: +# - /so3/usr -> musl toolchain (in-tree -linux-musl.cmake) +# - /linux/usr -> buildroot toolchain + kernel modules +# +# Copyright (c) 2026 Daniel Rossier, REDS Institute - HEIG-VD +# + +set -euo pipefail + +# The script operates on the *current directory* (so it can live in ~/scripts), +# which must be a usr/ dir. The repo root is two levels up (…/usr -> … -> root). + +USR_DIR="$PWD" +REPO_ROOT="$(cd "${USR_DIR}/../.." && pwd)" +BUILD_DIR="${USR_DIR}/build" + +# Detect so3 vs linux context from the parent directory name. + +PARENT="$(basename "$(dirname "${USR_DIR}")")" +case "${PARENT}" in + so3) MODE="so3" ;; + linux) MODE="linux" ;; + *) + if [ -f "${USR_DIR}/aarch64-linux-musl.cmake" ]; then + MODE="so3" + else + echo "Run this from so3/usr or linux/usr (current: ${USR_DIR})" >&2 + exit 1 + fi + ;; +esac + +if [ ! -f "${USR_DIR}/CMakeLists.txt" ]; then + echo "No CMakeLists.txt in ${USR_DIR} — not a usr/ directory." >&2 + exit 1 +fi + +# Defaults. + +ARCH="" +BUILD_TYPE="${IB_USR_BUILD_TYPE:-Debug}" +PLATFORM="" +MICROPYTHON="OFF" +DO_CLEAN=0 +RECONFIGURE=0 +SKIP_MODULES=0 +CORES="$(nproc)" + +usage() { + cat < Target CPU (so3/usr only; default: last, else aarch64) + -t, --type CMake build type (default: ${BUILD_TYPE}) + -p, --platform IB_PLATFORM for kernel modules (linux/usr; default: virt64) + -m, --micropython Build the micro-python apps (so3/usr, aarch64 only) + -c, --reconfigure Force a fresh cmake configure step + -M, --no-modules Skip the kernel-module build (linux/usr) + -C, --clean Remove build/ and exit + -j, --jobs Parallel make jobs (default: ${CORES}) + -h, --help This help + +Context detected: ${MODE} (${USR_DIR}) +EOF +} + +while [ $# -gt 0 ]; do + case "$1" in + -a|--arch) ARCH="$2"; shift 2 ;; + -t|--type) BUILD_TYPE="$2"; shift 2 ;; + -p|--platform) PLATFORM="$2"; shift 2 ;; + -m|--micropython) MICROPYTHON="ON"; shift ;; + -c|--reconfigure) RECONFIGURE=1; shift ;; + -M|--no-modules) SKIP_MODULES=1; shift ;; + -C|--clean) DO_CLEAN=1; shift ;; + -j|--jobs) CORES="$2"; shift 2 ;; + -h|--help) usage; exit 0 ;; + *) echo "Unknown option: $1" >&2; usage; exit 1 ;; + esac +done + +if [ "${DO_CLEAN}" = "1" ]; then + echo "Removing ${BUILD_DIR}" + + rm -rf "${BUILD_DIR}" + exit 0 +fi + +# ============================================================================ +# so3/usr +# ============================================================================ + +build_so3() { + local arch_marker="${USR_DIR}/.ib_last_arch" + local toolchain_file musl_target cc_name + + # Resolve target arch: explicit -a, else last built, else aarch64. + + if [ -z "${ARCH}" ]; then + if [ -f "${arch_marker}" ]; then ARCH="$(cat "${arch_marker}")"; else ARCH="aarch64"; fi + fi + + case "${ARCH}" in + aarch64) + toolchain_file="${USR_DIR}/aarch64-linux-musl.cmake" + musl_target="aarch64-linux-musl"; cc_name="aarch64-linux-musl-gcc" ;; + arm) + toolchain_file="${USR_DIR}/arm-linux-musl.cmake" + musl_target="arm-linux-musleabihf"; cc_name="arm-linux-musleabihf-gcc" ;; + *) echo "Unsupported arch '${ARCH}' (aarch64|arm)" >&2; exit 1 ;; + esac + + # The cmake toolchain files use bare compiler names, so the musl bin/ must + # be on PATH. It usually is (/usr/local/bin); else fall back to the + # bitbake-built toolchain under build/tmp/toolchains. + + if ! command -v "${cc_name}" >/dev/null 2>&1; then + local fallback="${REPO_ROOT}/build/tmp/toolchains/${musl_target}/bin" + + if [ -x "${fallback}/${cc_name}" ]; then + export PATH="${fallback}:${PATH}" + else + echo "Cross compiler '${cc_name}' not found on PATH nor in ${fallback}" >&2 + echo "Build the toolchain first (e.g. build.sh -x musl-toolchain)." >&2 + exit 1 + fi + fi + + # The CMakeCache pins the compiler; switching arch without wiping produces + # wrong-arch binaries. Mirror the recipe's do_build:prepend. + + if [ -f "${arch_marker}" ] && [ "$(cat "${arch_marker}")" != "${ARCH}" ]; then + echo "SO3 usr arch changed ($(cat "${arch_marker}") -> ${ARCH}); wiping build/" + + rm -rf "${BUILD_DIR}" + fi + echo "${ARCH}" > "${arch_marker}" + + # Configure (only when needed) then build. + + mkdir -p "${BUILD_DIR}"; cd "${BUILD_DIR}" + + if [ "${RECONFIGURE}" = "1" ] || [ ! -f "${BUILD_DIR}/CMakeCache.txt" ]; then + cmake -Wno-dev --no-warn-unused-cli \ + -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \ + -DMICROPYTHON="${MICROPYTHON}" \ + -DCMAKE_TOOLCHAIN_FILE="${toolchain_file}" \ + "${USR_DIR}" + fi + make -j"${CORES}" + + # Local deploy == do_install_apps: *.elf + out/* into build/deploy. + + local deploy="${BUILD_DIR}/deploy" + mkdir -p "${deploy}" + cp "${BUILD_DIR}"/src/*.elf "${deploy}/" 2>/dev/null || true + cp -r "${USR_DIR}"/out/* "${deploy}/" 2>/dev/null || true + + echo + echo "Done. Built so3/usr ${ARCH} (${BUILD_TYPE}) -> ${deploy}" +} + +# ============================================================================ +# linux/usr +# ============================================================================ + +build_linux() { + local toolchain_file="${REPO_ROOT}/linux/rootfs/host/share/buildroot/toolchainfile.cmake" + local kernel_path="${REPO_ROOT}/linux/linux" + + if [ ! -f "${toolchain_file}" ]; then + echo "Buildroot toolchain missing: ${toolchain_file}" >&2 + echo "Build the rootfs/toolchain first via bitbake." >&2 + exit 1 + fi + + # User apps: cmake + make. The buildroot toolchain file pins absolute + # compiler paths, so no PATH tweak is needed here. + + mkdir -p "${BUILD_DIR}"; cd "${BUILD_DIR}" + + if [ "${RECONFIGURE}" = "1" ] || [ ! -f "${BUILD_DIR}/CMakeCache.txt" ]; then + cmake -Wno-dev --no-warn-unused-cli \ + -DCMAKE_BUILD_TYPE="${BUILD_TYPE}" \ + -DCMAKE_KERNEL_PATH="${kernel_path}" \ + -DCMAKE_TOOLCHAIN_FILE="${toolchain_file}" \ + "${USR_DIR}" + fi + make -j"${CORES}" + + # Out-of-tree kernel modules (best effort), mirroring usr-linux + # do_build:prepend's `make -C linux M=src/modules modules IB_PLATFORM=...`. + # The kernel Makefile is patched with ARCH and CROSS_COMPILE defaults + # (e.g. aarch64-none-linux-gnu-), so — exactly like the recipe — we pass + # neither and let the kernel toolchain resolve from PATH. Do NOT force a + # CROSS_COMPILE from the buildroot host tree: that is the *userspace* + # toolchain and may differ from the one the kernel was built with. + + local mod_dir="${USR_DIR}/src/modules" + + if [ "${SKIP_MODULES}" = "0" ] && [ -d "${mod_dir}" ]; then + + if [ -f "${kernel_path}/Module.symvers" ]; then + + # IB_PLATFORM selects the module set (see src/modules/Makefile). + + local plat="${PLATFORM}" + + if [ -z "${plat}" ]; then + plat="$(grep -E '^[[:space:]]*IB_PLATFORM[[:space:]]*[?:]?=' \ + "${REPO_ROOT}/build/conf/local.conf" 2>/dev/null \ + | grep -v '^[[:space:]]*#' | tail -1 \ + | sed -E 's/.*=[[:space:]]*"?([^"[:space:]]+)"?.*/\1/')" + plat="${plat:-virt64}" + fi + + # Sanity-check the kernel's cross compiler is reachable on PATH. + + local kcross + kcross="$(sed -nE 's/^CROSS_COMPILE[[:space:]]*[?:]?=[[:space:]]*([^[:space:]]+).*/\1/p' \ + "${kernel_path}/Makefile" | head -1)" + + if [ -n "${kcross}" ] && ! command -v "${kcross}gcc" >/dev/null 2>&1; then + echo "WARN: kernel cross compiler '${kcross}gcc' not on PATH; skipping modules." >&2 + else + echo "Building kernel modules (IB_PLATFORM=${plat})" + + make -C "${kernel_path}" M="${mod_dir}" modules IB_PLATFORM="${plat}" + fi + else + echo "WARN: ${kernel_path}/Module.symvers missing; kernel not built." + echo " Skipping kernel modules (build the kernel via bitbake first)." + fi + fi + + # Local deploy == do_install_apps: hello + *.ko into build/deploy/root. + # Plus the SOO s3c-* apps when built (usr-linux :soo bbappend override). + + local deploy="${BUILD_DIR}/deploy/root" + mkdir -p "${deploy}" + cp "${BUILD_DIR}"/src/examples/hello "${deploy}/" 2>/dev/null || true + cp "${mod_dir}"/*.ko "${deploy}/" 2>/dev/null || true + cp "${BUILD_DIR}"/src/soo/s3c-* "${deploy}/" 2>/dev/null || true + + echo + echo "Done. Built linux/usr (${BUILD_TYPE}) -> ${BUILD_DIR}/deploy" +} + +# Dispatch. + +case "${MODE}" in + so3) build_so3 ;; + linux) build_linux ;; +esac diff --git a/scripts/mount.sh b/scripts/mount.sh index cb692e4..96329cb 100755 --- a/scripts/mount.sh +++ b/scripts/mount.sh @@ -1,5 +1,29 @@ #!/bin/sh -cd $IB_ROOT_DIR/build -sudo -E ./bitbake/bin/bitbake filesystem -c fs_mount $1 -cd - +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD +# +# Trigger filesystem:fs_mount. bitbake itself runs unprivileged — the +# recipe internally invokes mount/losetup via `sudo -n` against the +# timestamp opened here. + +# Resolve project root from this script's own location, cd there, and +# source env.sh — prompting the user first if the parent shell points +# at a different tree. See scripts/common/setup_env.sh for details. +. "$(cd "$(dirname "$(command -v -- "$0")")" && pwd)/common/setup_env.sh" + +# `mount.sh -i [platform]` extracts board//initrd.cpio for editing +# instead of loop-mounting the sdcard partitions (no sudo / bitbake needed). +if [ "$1" = "-i" ] || [ "$1" = "initrd" ]; then + shift + . ./scripts/common/initrd_pack.sh + initrd_mount "$1" + exit $? +fi + +. ./scripts/common/sudo_session.sh + +sudo_session_start || exit 1 + +cd "$BUILDDIR" +./bitbake/bin/bitbake filesystem -c fs_mount $1 diff --git a/scripts/qemu-ifdown.sh b/scripts/qemu-ifdown.sh index 671fd9a..f87aba2 100755 --- a/scripts/qemu-ifdown.sh +++ b/scripts/qemu-ifdown.sh @@ -1,5 +1,8 @@ #!/bin/bash +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + other_qemu=`sudo brctl show | grep tap | wc -l` if [[ ${other_qemu} -eq 1 ]] then diff --git a/scripts/qemu-ifup.sh b/scripts/qemu-ifup.sh index 1dd8565..43b10da 100755 --- a/scripts/qemu-ifup.sh +++ b/scripts/qemu-ifup.sh @@ -72,6 +72,7 @@ do_iptables_restore <_capsule while the boot image is the linux one + # (IB_TARGET_ITS:linux = _avz). AVZ is an EL2 hypervisor, so QEMU + # must expose EL2 (virtualization=on); a standalone SO3 boots at EL1. + SO3_ITS=$(grep -E "^IB_TARGET_ITS:so3:${IB_PLATFORM}\b" build/conf/local.conf | awk -F'"' '{print $2}' | tail -1) + LINUX_ITS=$(grep -E "^IB_TARGET_ITS:linux:${IB_PLATFORM}\b" build/conf/local.conf | awk -F'"' '{print $2}' | tail -1) - if [ "$IB_PLATFORM" == "virt32" ]; then - echo Starting on virt32 - echo $1 - sudo qemu/build/arm-softmmu/qemu-system-arm $@ \ - -smp 4 \ - -serial mon:stdio \ - -M virt -cpu cortex-a15 \ + # Display mode. Default: headless (serial console only, -display none). With + # -d: open the QEMU GTK window that presents the guest PL111 CLCD (the LVGL + # screen). SO3 drives PL111 + PL050 (wired unconditionally into '-M virt' by + # the so3 QEMU patch) and has no virtio-gpu, so no extra device flags are + # needed — just switch the display backend. Use GTK, not SDL: SDL leaves the + # PL111 console black, GTK presents it (and its View menu lists every + # console). On a fractionally-scaled HiDPI Wayland panel, route GTK through + # XWayland (GDK_BACKEND=x11) so the so3,absmouse absolute pointer maps 1:1 + # onto the guest surface; harmless on a real X11 session. + if [ "$WITH_DISPLAY" == "1" ]; then + DISPLAY_OPT="-display gtk,zoom-to-fit=off" + export GDK_BACKEND=x11 + export GDK_SCALE=1 + export GDK_DPI_SCALE=1 + else + DISPLAY_OPT="-display none" + fi + + if [ "$IB_PLATFORM" == "virt64" ]; then + QEMU_BIN="$IB_ROOT_DIR/qemu/build/qemu-system-aarch64" + echo Starting on virt64 + # User-mode (slirp) networking: QEMU plays DHCP + DNS + NAT internally, so + # the guest gets 10.0.2.15 immediately and NetworkManager-wait-online + # succeeds in <1 s instead of timing out at 60 s as it did with tap+host + # bridge that had no DHCP server. hostfwd exposes guest SSH on host + # port 2222 for convenience. Trade-off: guest is NAT'd, no LAN visibility. + # Bonus: no sudo needed (no tap device creation), so QEMU artefacts stay + # owned by the regular user across runs. + # + # Boot mode is picked from artefacts in filesystem/ (built by bsp.bbclass + # :do_deploy_boot_chain → bsp_virt64.inc:__do_platform_boot_chain): + # * flash0.img present → ATF chain (AVZ boot chain). + # QEMU exposes EL3 (secure=on) and pflash-loads BL1+FIP; EL2 enabled + # so AVZ (in "full" mode) or U-Boot's hyp-mode can run. + # * flash0.img absent → bare bsp-linux. The boot chain is just + # U-Boot + Linux; QEMU `-kernel`-loads the U-Boot ELF + # (u-boot/u-boot) at EL1 directly. EL2 (and EL3) are deliberately + # disabled — the qemu-arm64 U-Boot config expects to run at EL1, + # and running at EL2 without firmware handling PSCI / breaking + # the bootm path triggers a synchronous external abort during + # AMBA PL011 probe. + + if [ -f filesystem/flash0.img ]; then + # ATF/OP-TEE chain (flash0/FIP): EL3 (secure=on) + EL2 enabled. + MACHINE_OPT="-M virt,virtualization=on,gic-version=2,secure=on" + BOOT_OPT="-drive if=pflash,format=raw,file=filesystem/flash0.img" + elif [[ "$SO3_ITS" == *avz* || "$LINUX_ITS" == *avz* ]]; then + # AVZ via the ITS, no ATF: AVZ is an EL2 hypervisor, so QEMU + # must expose EL2 (virtualization=on). The U-Boot here is + # virt64_defconfig (FIP/EL2-aware), so it runs fine at EL2 and hands + # off to AVZ at EL2. Without this, AVZ faults on its first EL2 + # system-register access (Synchronous Abort -> reset). + echo "AVZ guest (so3 ITS=$SO3_ITS, linux ITS=$LINUX_ITS) — enabling EL2 (virtualization=on)" + MACHINE_OPT="-M virt,gic-version=2,virtualization=on" + BOOT_OPT="-kernel u-boot/u-boot" + else + MACHINE_OPT="-M virt,gic-version=2" + BOOT_OPT="-kernel u-boot/u-boot" + fi + ${QEMU_BIN} $@ ${USR_OPTION} \ + -smp 4 \ + -chardev stdio,id=char0,mux=on,signal=off \ + -mon chardev=char0 \ + -serial chardev:char0 \ + ${MACHINE_OPT} -cpu cortex-a72 \ + ${BOOT_OPT} \ -device virtio-blk-device,drive=hd0 \ - -drive if=none,file=filesystem/sdcard.img.virt32,id=hd0,format=raw,file.locking=off \ + -drive if=none,file=filesystem/sdcard.img.virt64,id=hd0,format=raw,file.locking=off \ -m 1024 \ + ${DISPLAY_OPT} \ + -netdev user,id=n1,hostfwd=tcp::2222-:22 \ + -device virtio-net-device,netdev=n1,mac=${QEMU_MAC_ADDR} \ + -gdb tcp::${GDB_PORT} + fi + + if [ "$IB_PLATFORM" == "virt32" ]; then + QEMU_BIN="$IB_ROOT_DIR/qemu/build/qemu-system-arm" + echo Starting on virt32 + # SO3 standalone on 32-bit ARM virt: U-Boot is loaded directly with + # -kernel (no ATF / flash chain on this platform), cortex-a15 matches + # the SO3 virt32 build. Serial console is muxed onto stdio like virt64; + # slirp user networking keeps QEMU artefacts owned by the regular user. + ${QEMU_BIN} $@ ${USR_OPTION} \ + -smp 4 \ + -chardev stdio,id=char0,mux=on,signal=off \ + -mon chardev=char0 \ + -serial chardev:char0 \ + -M virt -cpu cortex-a15 \ -kernel u-boot/u-boot \ - -net tap,script=scripts/qemu-ifup.sh,downscript=scripts/qemu-ifdown.sh -net nic,macaddr=${QEMU_MAC_ADDR} \ - -nographic \ - -gdb tcp::${GDB_PORT} - fi - - if [ "$IB_PLATFORM" == "x86-qemu" ]; then - echo Starting on x86 - sudo qemu-system-x86_64 $@ $1 \ - -cpu Cascadelake-Server-v4 \ - -smp 4 \ - -serial mon:stdio \ - -netdev tap,id=n1,script=scripts/qemu-ifup.sh,downscript=scripts/qemu-ifdown.sh \ - -device e1000e,netdev=n1,mac=00:01:29:53:97:BA \ - -hda filesystem/sdcard.img.x86_qemu \ - -s \ + -device virtio-blk-device,drive=hd0 \ + -drive if=none,file=filesystem/sdcard.img.virt32,id=hd0,format=raw,file.locking=off \ -m 1024 \ - -kernel linux/linux/arch/x86/boot/bzImage \ - -nographic \ - -append "root=/dev/ram console=ttyS0 earlyprintk=pciserial" - fi - + ${DISPLAY_OPT} \ + -netdev user,id=n1,hostfwd=tcp::2222-:22 \ + -device virtio-net-device,netdev=n1,mac=${QEMU_MAC_ADDR} \ + -gdb tcp::${GDB_PORT} + fi + QEMU_RESULT=$? } -launch_qemu $0 +launch_qemu diff --git a/scripts/stg.sh b/scripts/stg.sh deleted file mode 100755 index df6183a..0000000 --- a/scripts/stg.sh +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/bash - -QEMU_AUDIO_DRV="none" -USR_OPTION=$1 -GDB_PORT_BASE=1234 - -N_QEMU_INSTANCES=`ps -A | grep "qemu-system-\(arm\|aar\)" | wc -l` - -launch_qemu() { - QEMU_MAC_ADDR="$(printf 'DE:AD:BE:EF:%02X:%02X\n' $((N_QEMU_INSTANCES)) $((N_QEMU_INSTANCES)))" - - GDB_PORT=$((${GDB_PORT_BASE} + ${N_QEMU_INSTANCES})) - - echo -e "\033[01;36mMAC addr: " ${QEMU_MAC_ADDR} "\033[0;37m" - echo -e "\033[01;36mGDB port: " ${GDB_PORT} "\033[0;37m" - - while IFS= read -r line; do - # Check if the line starts with "IB_PLATFORM" - if [[ $line == IB_PLATFORM* ]]; then - # Extract the value between the quotes - value=$(echo "$line" | awk -F'"' '{print $2}') - - # Set the IB_PLATFORM variable to the extracted value - IB_PLATFORM="$value" - break - fi - done < build/conf/local.conf - - if [ "$IB_PLATFORM" == "virt64" ]; then - echo Starting on virt64 - sudo qemu/build/aarch64-softmmu/qemu-system-aarch64 $@ ${USR_OPTION} \ - -smp 4 \ - -m 1024 \ - -serial mon:stdio \ - -M virt,gic-version=2 -cpu cortex-a72 \ - -device virtio-blk-device,drive=hd0 \ - -device virtio-gpu-pci \ - -device virtio-keyboard-pci \ - -device virtio-mouse-pci \ - -display sdl \ - -drive if=none,file=filesystem/sdcard.img.virt64,id=hd0,format=raw,file.locking=off \ - -kernel u-boot/u-boot \ - -display sdl \ - -netdev tap,id=n1,script=scripts/qemu-ifup.sh,downscript=scripts/qemu-ifdown.sh \ - -device virtio-net-device,netdev=n1,mac=${QEMU_MAC_ADDR} \ - -gdb tcp::${GDB_PORT} - fi - - if [ "$IB_PLATFORM" == "virt32" ]; then - echo Starting on virt32 - echo $1 - sudo qemu/build/arm-softmmu/qemu-system-arm $@ \ - -smp 4 \ - -serial mon:stdio \ - -M virt -cpu cortex-a15 \ - -device virtio-blk-device,drive=hd0 \ - -drive if=none,file=filesystem/sdcard.img.virt32,id=hd0,format=raw,file.locking=off \ - -m 1024 \ - -kernel u-boot/u-boot \ - -net tap,script=scripts/qemu-ifup.sh,downscript=scripts/qemu-ifdown.sh -net nic,macaddr=${QEMU_MAC_ADDR} \ - -gdb tcp::${GDB_PORT} - fi - - QEMU_RESULT=$? -} - -launch_qemu $0 diff --git a/scripts/stv.sh b/scripts/stv.sh deleted file mode 100755 index 75aa4b6..0000000 --- a/scripts/stv.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -QEMU_AUDIO_DRV="none" -GDB_PORT_BASE=1234 -USR_OPTION=$1 - -N_QEMU_INSTANCES=`ps -A | grep "qemu-system-\(arm\|aar\)" | wc -l` - -launch_qemu() { - QEMU_MAC_ADDR="$(printf 'DE:AD:BE:EF:%02X:%02X\n' $((N_QEMU_INSTANCES)) $((N_QEMU_INSTANCES)))" - - GDB_PORT=$((${GDB_PORT_BASE} + ${N_QEMU_INSTANCES})) - - echo -e "\033[01;36mMAC addr: " ${QEMU_MAC_ADDR} "\033[0;37m" - echo -e "\033[01;36mGDB port: " ${GDB_PORT} "\033[0;37m" - - while IFS= read -r line; do - # Check if the line starts with "IB_PLATFORM" - if [[ $line == IB_PLATFORM* ]]; then - # Extract the value between the quotes - value=$(echo "$line" | awk -F'"' '{print $2}') - - # Set the IB_PLATFORM variable to the extracted value - IB_PLATFORM="$value" - break - fi - done < build/conf/local.conf - - if [ "$IB_PLATFORM" == "virt64" ]; then - echo Starting on virt64 - sudo qemu-system-aarch64 $@ ${USR_OPTION} \ - -smp 4 \ - -serial mon:stdio \ - -M virt,virtualization=on,gic-version=2 -cpu cortex-a72 \ - -device virtio-blk-device,drive=hd0 \ - -drive if=none,file=filesystem/sdcard.img.virt64,id=hd0,format=raw,file.locking=off \ - -m 1024 \ - -kernel u-boot/u-boot \ - -nographic \ - -netdev tap,id=n1,script=scripts/qemu-ifup.sh,downscript=scripts/qemu-ifdown.sh \ - -device virtio-net-device,netdev=n1,mac=${QEMU_MAC_ADDR} \ - -gdb tcp::${GDB_PORT} - fi - - - QEMU_RESULT=$? -} - -launch_qemu diff --git a/scripts/stvg.sh b/scripts/stvg.sh deleted file mode 100755 index eb3adde..0000000 --- a/scripts/stvg.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -QEMU_AUDIO_DRV="none" -GDB_PORT_BASE=1234 -USR_OPTION=$1 - -N_QEMU_INSTANCES=`ps -A | grep "qemu-system-\(arm\|aar\)" | wc -l` - -launch_qemu() { - QEMU_MAC_ADDR="$(printf 'DE:AD:BE:EF:%02X:%02X\n' $((N_QEMU_INSTANCES)) $((N_QEMU_INSTANCES)))" - - GDB_PORT=$((${GDB_PORT_BASE} + ${N_QEMU_INSTANCES})) - - echo -e "\033[01;36mMAC addr: " ${QEMU_MAC_ADDR} "\033[0;37m" - echo -e "\033[01;36mGDB port: " ${GDB_PORT} "\033[0;37m" - - while IFS= read -r line; do - # Check if the line starts with "IB_PLATFORM" - if [[ $line == IB_PLATFORM* ]]; then - # Extract the value between the quotes - value=$(echo "$line" | awk -F'"' '{print $2}') - - # Set the IB_PLATFORM variable to the extracted value - IB_PLATFORM="$value" - break - fi - done < build/conf/local.conf - - if [ "$IB_PLATFORM" == "virt64" ]; then - echo Starting on virt64 - sudo qemu-system-aarch64 $@ ${USR_OPTION} \ - -smp 4 \ - -serial mon:stdio \ - -M virt,virtualization=on,gic-version=2 -cpu cortex-a72 \ - -device virtio-blk-device,drive=hd0 \ - -device virtio-gpu-pci \ - -device virtio-keyboard-pci \ - -device virtio-mouse-pci \ - -display sdl \ - -drive if=none,file=filesystem/sdcard.img.virt64,id=hd0,format=raw,file.locking=off \ - -m 1024 \ - -kernel u-boot/u-boot \ - -netdev tap,id=n1,script=scripts/qemu-ifup.sh,downscript=scripts/qemu-ifdown.sh \ - -device virtio-net-device,netdev=n1,mac=${QEMU_MAC_ADDR} \ - -gdb tcp::${GDB_PORT} - fi - - - QEMU_RESULT=$? -} - -launch_qemu diff --git a/scripts/tezi-feed-serve.sh b/scripts/tezi-feed-serve.sh new file mode 100755 index 0000000..7793ece --- /dev/null +++ b/scripts/tezi-feed-serve.sh @@ -0,0 +1,249 @@ +#!/bin/sh + +# Serve the TEZI HTTP feed produced by `deploy.sh` so a board can pull it +# during a TEZI network auto-install. +# +# The feed directory (IB_HTTP_DEPLOY_PATH) lives inside the tree and is +# self-contained: deploy.sh writes image_list.json next to image.json, so +# this script only has to expose that directory as the document root. The +# board's feed URL is therefore always: +# +# http://:/image_list.json +# +# The server runs as the calling user on an unprivileged port — no root, no +# web server configuration, no document-root permissions to arrange, and +# nothing written outside the tree. +# +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + +# Usage: +# tezi-feed-serve.sh Serve in the foreground (Ctrl-C to stop) +# tezi-feed-serve.sh --ensure Start detached if not already running +# tezi-feed-serve.sh --status Report whether it runs, and on which URL +# tezi-feed-serve.sh --stop Stop a detached server +# +# --ensure is what build.sh/deploy.sh/dbuild.sh call, so a normal deploy +# leaves a working feed behind with no manual step. It is idempotent and +# silent when the server is already up. + +progname=$(basename "$0") + +IB_ROOT=$(cd "$(dirname "$(command -v -- "$0")")/.." && pwd -P) + +pr_usage() +{ + printf "Serve the TEZI HTTP feed for network auto-install\n\n" + printf "Usage: %s [--ensure|--status|--stop|-h]\n" "$progname" +} + +pr_help() +{ + printf "\nAvailable options:\n" + printf " -h, --help Print this help\n" + printf " --ensure Start detached unless already running\n" + printf " --status Report state and feed URL\n" + printf " --stop Stop a detached server\n" + printf "\nWith no option the server runs in the foreground.\n" + printf "\nThe feed directory and port come from build/conf/local.conf,\n" + printf "overridable per machine in build/conf/site.conf:\n" + printf " IB_HTTP_DEPLOY_PATH, IB_HTTP_FEED_PORT\n" +} + +# --- configuration ---------------------------------------------------------- +# +# Read a bitbake variable the way the front-end scripts do: last matching +# assignment wins, site.conf after local.conf so a per-machine override +# takes precedence. Only plain `=`/`?=`/`:=` assignments are understood, +# which is all these two variables ever use. + +conf_get() +{ + _var=$1 + _val="" + for _conf in "$IB_ROOT/build/conf/local.conf" "$IB_ROOT/build/conf/site.conf"; do + [ -f "$_conf" ] || continue + _hit=$(sed -n "s/^[[:space:]]*${_var}[[:space:]]*[?:]*=[[:space:]]*\"\([^\"]*\)\".*/\1/p" \ + "$_conf" | tail -1) + [ -n "$_hit" ] && _val=$_hit + done + printf '%s' "$_val" +} + +# IB_PLATFORM is scoped-override aware in check-env.sh; here the bare +# assignment is enough because IB_HTTP_DEPLOY_PATH interpolates it. +platform=$(sed -n 's/^[[:space:]]*IB_PLATFORM[[:space:]]*??*=[[:space:]]*"\([^"]*\)".*/\1/p' \ + "$IB_ROOT/build/conf/local.conf" 2>/dev/null | tail -1) + +feed=$(conf_get IB_HTTP_DEPLOY_PATH) +port=$(conf_get IB_HTTP_FEED_PORT) +[ -n "$port" ] || port=8080 + +# Expand the two bitbake variables the default value uses. Anything else +# left unexpanded means the override is beyond what this parser handles. +feed=$(printf '%s' "$feed" | sed -e "s|\${IB_DIR}|$IB_ROOT|g" -e "s|\${IB_PLATFORM}|$platform|g") + +case "$feed" in + "") printf "%s: IB_HTTP_DEPLOY_PATH not found in build/conf/*.conf\n" "$progname" >&2; exit 1 ;; + *'${'*) printf "%s: cannot expand IB_HTTP_DEPLOY_PATH (%s)\n" "$progname" "$feed" >&2; exit 1 ;; +esac + +runtime_dir="$IB_ROOT/build/deploy" +pidfile="$runtime_dir/tezi-feed.pid" +logfile="$runtime_dir/tezi-feed.log" + +# --- helpers ---------------------------------------------------------------- + +# Host IP as the board sees it: first default route, skipping tunnel-like +# interfaces so an active VPN does not capture the flashing address. This is +# the address printed below and handed to the board with `tezictl feed-add`, +# so a wrong pick sends the board to a host it cannot reach. +host_ip() +{ + ip -4 route show default 2>/dev/null \ + | awk '{for (i = 1; i <= NF; i++) if ($i == "dev") print $(i + 1)}' \ + | while IFS= read -r dev; do + case "$dev" in vpn*|tun*|tap*|wg*|ppp*) continue ;; esac + ip -4 -o addr show dev "$dev" 2>/dev/null \ + | awk 'NR == 1 {sub(/\/.*/, "", $4); print $4; exit}' + break + done +} + +feed_url() +{ + _ip=$(host_ip) + [ -n "$_ip" ] || _ip="" + printf 'http://%s:%s/image_list.json' "$_ip" "$port" +} + +# A live pidfile means our server; a stale one is cleaned up so --ensure +# can restart after a reboot or a kill without manual intervention. +running_pid() +{ + [ -f "$pidfile" ] || return 1 + _pid=$(cat "$pidfile" 2>/dev/null) + case "$_pid" in ''|*[!0-9]*) rm -f "$pidfile"; return 1 ;; esac + if kill -0 "$_pid" 2>/dev/null; then + printf '%s' "$_pid" + return 0 + fi + rm -f "$pidfile" + return 1 +} + +# --- actions ---------------------------------------------------------------- + +do_status() +{ + if _pid=$(running_pid); then + printf "running (pid %s) %s\n" "$_pid" "$(feed_url)" + printf " feed: %s\n" "$feed" + printf " log : %s\n" "$logfile" + return 0 + fi + printf "not running (feed: %s)\n" "$feed" + return 1 +} + +do_stop() +{ + if _pid=$(running_pid); then + kill "$_pid" 2>/dev/null + rm -f "$pidfile" + printf "%s: stopped (pid %s)\n" "$progname" "$_pid" + return 0 + fi + printf "%s: not running\n" "$progname" + return 0 +} + +# Serving an empty or missing directory would answer 404 to the board and +# look like a network fault, so say plainly that a deploy has to run first. +check_feed() +{ + if [ ! -d "$feed" ]; then + printf "%s: feed directory does not exist yet: %s\n" "$progname" "$feed" >&2 + printf "%s: run a deploy first (e.g. deploy.sh bsp-linux)\n" "$progname" >&2 + return 1 + fi + if [ ! -f "$feed/image_list.json" ]; then + printf "%s: %s has no image_list.json — deploy has not published here yet\n" \ + "$progname" "$feed" >&2 + return 1 + fi + return 0 +} + +do_serve_foreground() +{ + check_feed || exit 1 + printf "%s: serving %s\n" "$progname" "$feed" + printf "%s: feed URL %s\n" "$progname" "$(feed_url)" + printf "%s: board cmd tezictl feed-add %s\n" "$progname" "$(feed_url)" + exec python3 -m http.server "$port" --directory "$feed" +} + +do_ensure() +{ + # Never leave a daemon behind on a CI runner: CI builds and deploys to + # verify, it never flashes a board from its own feed. + if [ -n "${CI:-}" ] || [ -n "${GITLAB_CI:-}" ]; then + return 0 + fi + + # Inside the build container this is a no-op: the container is --rm, so + # a server started here would die with it. dbuild.sh starts one on the + # host before the container runs (it shares the host network namespace). + if [ -f /.dockerenv ] || [ -n "${container:-}" ]; then + return 0 + fi + + running_pid >/dev/null && return 0 + + # Quietly: --ensure fires after every deploy (and after every dbuild.sh + # command), most of which publish no feed at all — soft/hard storage + # platforms never do. check_feed's "run a deploy first" belongs to an + # explicit invocation, not to this automatic one. + check_feed 2>/dev/null || return 0 + + command -v python3 >/dev/null 2>&1 || { + printf "%s: python3 not found — cannot serve the feed\n" "$progname" >&2 + return 0 + } + + mkdir -p "$runtime_dir" + + # Detached and immune to the parent shell going away, so the feed + # outlives the deploy that started it. + nohup python3 -m http.server "$port" --directory "$feed" \ + >>"$logfile" 2>&1 & + _pid=$! + printf '%s\n' "$_pid" > "$pidfile" + + # Give it a moment to fail (port already taken by something else) so the + # user hears about it now rather than when a board fails to flash. + sleep 1 + if ! kill -0 "$_pid" 2>/dev/null; then + rm -f "$pidfile" + printf "%s: feed server failed to start on port %s — see %s\n" \ + "$progname" "$port" "$logfile" >&2 + printf "%s: another server on that port? override IB_HTTP_FEED_PORT in build/conf/site.conf\n" \ + "$progname" >&2 + return 0 + fi + + printf "[tezi-feed] serving %s on %s (pid %s)\n" "$feed" "$(feed_url)" "$_pid" + return 0 +} + +# --- main ------------------------------------------------------------------- + +case "${1:-}" in + -h|--help) pr_usage; pr_help; exit 0 ;; + --ensure) do_ensure; exit 0 ;; + --status) do_status; exit $? ;; + --stop) do_stop; exit $? ;; + "") do_serve_foreground ;; + *) pr_usage >&2; exit 1 ;; +esac diff --git a/scripts/umount.sh b/scripts/umount.sh index d131e44..886ee8d 100755 --- a/scripts/umount.sh +++ b/scripts/umount.sh @@ -1,5 +1,29 @@ #!/bin/sh -cd $IB_ROOT_DIR/build -sudo -E ./bitbake/bin/bitbake filesystem -c fs_umount $1 -cd - +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD +# +# Trigger filesystem:fs_umount. bitbake itself runs unprivileged — the +# recipe internally invokes umount/losetup via `sudo -n` against the +# timestamp opened here. + +# Resolve project root from this script's own location, cd there, and +# source env.sh — prompting the user first if the parent shell points +# at a different tree. See scripts/common/setup_env.sh for details. +. "$(cd "$(dirname "$(command -v -- "$0")")" && pwd)/common/setup_env.sh" + +# `umount.sh -i [platform]` repacks the tree extracted by `mount.sh -i` +# back into board//initrd.cpio (no sudo / bitbake needed). +if [ "$1" = "-i" ] || [ "$1" = "initrd" ]; then + shift + . ./scripts/common/initrd_pack.sh + initrd_umount "$1" + exit $? +fi + +. ./scripts/common/sudo_session.sh + +sudo_session_start || exit 1 + +cd "$BUILDDIR" +./bitbake/bin/bitbake filesystem -c fs_umount $1 diff --git a/scripts/updiff.sh b/scripts/updiff.sh new file mode 100755 index 0000000..5da24ba --- /dev/null +++ b/scripts/updiff.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +# Copyright (c) 2025-2026 EDGEMTech SA +# Adapted for MICOFE - Copyright (c) 2026 REDS Institute, HEIG-VD + +bitbake $1 -c updiff +